|
{
|
|
split($1,p1,",")
|
|
split($3,p2,",")
|
|
x1 = p1[1]; y1=p1[2]
|
|
x2 = p2[1]; y2=p2[2]
|
|
x=x1; y=y1
|
|
while( x!=x2 || y!=y2 ){
|
|
covers[x,y]++
|
|
x += (x2==x1) ? 0 : (x2>x1) ? 1 : -1
|
|
y += (y2==y1) ? 0 : (y2>y1) ? 1 : -1
|
|
}
|
|
covers[x2,y2]++
|
|
}
|
|
END{
|
|
for(i in covers) count += covers[i]>1
|
|
print count
|
|
}
|