[BOJ 9706] FIND THE MARBLES

View as PDF

Submit solution

Points: 2
Time limit: 1.0s
Memory limit: 128M

Problem types
Allowed languages
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text

A group of friends are playing "Find the Marbles" game. A handful of marbles are thrown on the ground. The position of the marbles is represented by integer coordinates in a two-dimensional space. The players can only walk on a straight line to find the marbles. The person who can find the highest number of marbles on a straight line wins the game. You are to help them find the number of marbles that the winner found.

입력 형식

The first line of the input is a single positive integer T indicating the number of test cases. Each case starts with the number of marbles N, where 1 < N < 100. On each of the following N lines there are a pair of integers separated by a blank that represents the coordinate in a twodimensional space. No pair will occur twice. 

출력 형식

For each test case, the output contains a line in the format Case #x: M, where x is the case number (starting from 1) and M is an integer representing the largest number of marbles that lie on one line.

예제 입력

2
5
1 1
2 2
3 3
5 10
6 11
3
4 5
6 7
8 8

예제 출력

Case #1: 3
Case #2: 2

Comments

There are no comments at the moment.