#include <cstdio>
#include <cstring>
#include <cctype>
#include <cstdlib>
#include <queue>
#include <stack>
#include <cmath>
#include <string>
#include <iostream>
#include <algorithm>
using namespace std;
#define maxn 700 + 10
#define ll long long
int a[maxn][2];
int main()
{
int t;
char s[2000];
gets(s);
sscanf(s, "%d", &t);
gets(s);
while(t--)
{
int n = 0;
while(gets(s) != NULL)
{
if(s[0] == '\0') break;
sscanf(s, "%d%d", &a[n][0], &a[n][1]);
++n;
}
int ans = 1;
for(int i = 0; i < n-1; ++i)
{
for(int j = i+1; j < n; ++j)
{
int y = a[j][1] - a[i][1], x = a[j][0] - a[i][0];
int num = 2;
for(int k = j+1; k < n; ++k)
{
int y1 = a[k][1] - a[j][1], x1 = a[k][0] - a[j][0];
if(x*y1 == y*x1) ++num;
}
ans = max(ans, num);
}
}
printf("%d\n", ans);
if(t) puts("");
}
return 0;
}
uva 270 - Lining Up
最新推荐文章于 2017-08-04 21:57:00 发布