8578: Don't Starve

内存限制:256 MB 时间限制:2 S
题面:传统 评测方式:文本比较 上传者:
提交:2 通过:1

题目描述

NIO purchased a new game, Don't Starve, a sandbox game published by Klei Entertainment Inc. This game revolves around a scientist named Wilson who finds himself in a dark and gloomy world and must survive for as long as possible. 

In the very beginning, NIO should help Wilson to gather some food for survival. Assume that when controlling Wilson to walk towards a location on the map, NIO should keep pressing the left button on the mouse, and when Wilson comes to the place where there is food, NIO should stop pressing the mouse, but press the space key on the keyboard to collect the food at this location. The movement of Wilson is controlled by pressing the mouse. As NIO will feel tired of pressing the mouse for a long time and his finger will become very uncomfortable after a long time of  pressing, the time he is willing to press the mouse after each collection is strictly decreased. Suppose there are N locations on the 2-D plane, and each point contains an infinite number of food items, but only one can be taken at a time. And NIO will start at the original point

What is the maximum amount of food can NIO get for Wilson? Note that the food will be refreshed after Wilson left.  

输入格式

The first line is an integer N, representing the number of N distinct locations on the map. 
Following by N lines, each line has two integers, xi,yi, representing the x-coordinate and the y-coordinate of the location where there is food.
1≤N≤2000,−20000≤xi,yi≤200001 

输出格式

One integer, representing the maximum amount of food Wilson will get.

输入样例 复制

7
-7 21
70 64
45 -52
68 -93
-84 -16
-83 64
76 99

输出样例 复制

4