Hii!!! I took part in the Atcoder ACL contest 1 held a few days ago. Unfortunately, I am getting wrong answer in the first problem Reachable towns, here is my submission.
All I have done is to sort all cities according to x keeping their city numbers, and connect each city to next city with greater y and x coordinate than it with a bidirectional edge, and finally answer will be the size of connected component of graph for every city. Please tell me if I am incorrect somewhere.
Thanks in advance!!