Chips Out
Submit solution
Points:
1
Time limit:
1.5s
Python 3
3.0s
Memory limit:
512M
Author:
Problem type
Allowed languages
C++, Java, Python
After a successful day at the casino, you're heading back to the exchange machine with your chips when someone accidentally bumps into you, scattering them across the floor. As you begin to pick them up, you notice something interesting, some of the chips have landed in a perfectly straight line. It looks pretty cool!
What is the maximum number of chips that have landed in a straight line?
Input
The first line consists of an integer
, the number of chips that have fallen on the floor.
The next lines contain
and
, representing the position on the floor that the
th chip has landed.
Output
Output the maximum number of chips lying in a straight line.
Clarifications
- For this question, assume chips are points with no width/depth.
- These points must lie on a straight line.
Example
Input
5
1 0
3 1
2 2
5 2
4 0
Output
3
There are chips that lie on a single, straight line, which is the maximum you can get.
Input
6
0 1
0 2
0 5
0 10
1 1
2 2
Output
4
Comments