ÀÂÒ
Language:

Remote Training on Programming

Problems On-line status Contests FAQ
For authors:
Register  ||  Login
 
Hello, Guest! Login or register.

612. E - Points

Time Limit: 2 seconds
Memory Limit:65535KB
Points:10
View Problem Statistics Submit Problem added Administrator

N points are on a plane. You have to find the minimal number of straight lines, so that each point would belong to at least one line. Besides, if you have to use more than one line, then all the lines should be parallel to each other.

Input
In the first line of input file an integer number N is written - number of points on a plane (1 ≤ N ≤ 250). In the next N lines points coordinates are written. All coordinates are integer numbers with absolute value not greater that 106.
Output
Write a single number - the answer to this problem.

Input 1 Output 1 Input 2 Output 2 Input 3 Output 3
3
0 0
2 0
10 0
1
4
0 0
1 0
0 1
1 1
2
4
0 0
1 0
2 1
2 3
3


View Problem Statistics Submit Author/source:
Problems from Contests / Kovrov IT-festival / KIT-2008 /
611. D - Bit Decoder 612. 613. F - Division 614. G - String Multiplication 615. H - Lawyers Council
We can all benefit by doing occasional "toy" programs, when artificial restrictions are set up, so that we are forced to push our abilities to the limit. The art of tackling miniproblems with all our energy will sharpen our talents for the real problems. Donald E. Knuth.
time generating 0.094 sec.
© Copyright VSTU, AVT, Nosov D.A.