Company: Sprinkler_1oct
Difficulty: medium
Robot Run Problem Description You're given a 2D plane of size N * N and a set of coins placed on random points of that plane. You have built a robot named Samuel which can identify the coins placed on the plane and grab them for you. The only problem with Samuel is that he can only walk in a straight line. You can configure him to start from any point on the plane. Configure Samuel's direction such that he can grab you the maximum number of coins possible. Each point on the plane can either contain one coin or none. Input Format The first line of input contains 2 integers N and Q, where N * N will be the size of the plane and Q will be the number of coins which are placed on the plane. The next Q lines contain 2 integers X and Y each representing the position of a coin on the plane (X,Y) will be the representation of the coin placement. Output Format Return the maximum number of coins that Samuel can grab for you. Examples Example 1: Input: 5 6 1 1 3 2 5 3 4 1 2 3 1 4 Output: 4 Explana