| Hanoi final contest |
|---|
| Закончено |
Daniel is a master on Codeforces, thus he is particularly fond of golden color.
Instead of maintaining his streak of master title on Codeforces, Daniel decides to take a day off and goes for real golden treasures in a remote location.
Though the place that he chooses to dig gold is quite complicated, for the sake of simplicity, Daniel models it as the first quadrant of the Cartesian plane:
The place contains $$$N$$$ gold mines in different coordinates. Daniel does not care how much value of gold he could take, but he wants to explore as many gold mines as possible. As he is eager to explore, he considers the following strategy:
So, can you calculate the maximum number of gold mines that Daniel could explore, if he executes his strategy optimally?
The first line contains integer $$$N (N\ge 1)$$$.
$$$N$$$ lines follow, each line contains 2 integer $$$x, y\ (0\le x, y\le 10^{9})$$$ denoting the coordinate of a gold mine. It is guaranteed that no two gold mines is located on the same spot and no goal mine is located at $$$O(0, 0)$$$.
Integers on the same line are separated by spaces.
A single integer denoting the maximum number of gold mines that Daniel could explore, if he executes his strategy optimally.
This problem worths 60 points.
Subtasks:
5 100 400 200 200 200 300 300 400 400 100
3
4 0 1 1 2 2 3 3 0
2
| Название |
|---|


