Vid-cio
N points are given in a plane. Any point has integer coordinates and no two points have the same x coordinates or the same y coordinates. A pair of points A and B uniquely define a rectangle R(A,B) whose sides are parallel to coordinate axes such that the points A and B are endpoints of one of its diagonals. A pair of two given points A and B are very visible if there are no other given points within a rectangle R(A,B). A pair of points consists of two different points and in this problem pairs (A,B) and (B,A) are regarded to be the same pair and are counted as one pair. At the beginning a coordinate plane has no given points. Your program should read coordinates of the given points from a file and after reading coordinates of a point, it should write number of pairs of currently very visible given points.
3
1 4
3 3
2 5 Output
0
1
3 Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.