407229: GYM102697 200 Rubber Bands

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

200. Rubber Bandstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output
This problem is worth 70 points.

You have placed $$$n$$$ pins on a bulletin board, and a rubber band. You want to place the rubber band around a certain subset of the pins, such that there aren't any pins inside of the rubber band that aren't touching the rubber band. In other words, the rubber band must touch all of the points inside of it.

Figure out the largest number of pins that you can choose, and still satisfy the condition described above.

Input

The first line of input contains a single positive integer $$$n$$$, less than or equal to 7: the number of pins.

The next $$$n$$$ lines each contain two space-separated integers $$$x$$$ and $$$y$$$: the x and y coordinates of each pin, respectively.

Output

Output a single positive integer $$$k$$$: the size of the largest subset of pins that you can wrap the rubber band around, such that the rubber band is touching all points inside of the rubber band.

ExamplesInput
5
4 1
3 -3
0 0
1 -2
2 2
Output
5
Input
6
0 0
2 0
4 0
2 2
2 -2
2 -1
Output
4
Input
6
0 0
2 0
4 0
2 2
2 -2
3 -1
Output
5

加入题单

上一题 下一题 算法标签: