CiscoOA #23
Find Maximum Number Drop Points Connected
估计简单可在线判题
考点(AI 标注)哈希计数
Choose one horizontal or vertical straight line; directions cannot be mixed, and diagonal lines cannot be chosen. The line must cover at least two input points; output the maximum number of points covered, or 0 if this is impossible. Duplicate coordinates are counted as many times as they are recorded in the input.
输入格式
The input is n, then n x-coordinates and n y-coordinates. The original bound 2≤n≤700 is recovered from the complete supplementary raw; coordinates have no original numeric bound, and this site adds −10^9..10^9. The truncated main raw is recovered from a complete raw of the same problem; another version with a diagonal example 5 conflicts with its own rules and is not adopted.
输出格式
Output a single integer, the answer.
样例 1
输入:
5
2 3 2 4 2
2 2 6 5 8
输出:
3
样例 2
输入:
2
1 2
1 2
输出:
0
样例 3
输入:
2
1 3
2 2
输出:
2
样例说明
The outputs of the three public examples are, in order: 3; 0; 2. Verified by independent enumeration or direct simulation.