8505: Laser Alarm

内存限制:128 MB 时间限制:3 S 标准输入输出
题目类型:传统 评测方式:文本比较 上传者:
提交:1 通过:1

题目描述

The museum in Byteland has plenty of jewels on display, secured by n laser alarms. Each laser alarm can be considered as a segment in the 3D space. In this task, your job is to test the quality of the laser alarm system. You need to find a plane such that it touches the most laser alarms. Note that if the plane touches the endpoint of a segment, it should also be counted.

输入格式

The first line contains a single integer T(1T10), the number of test cases. For each test case:

The first line contains a single integer n (1n50), denoting the number of laser alarms.

Each of the following n lines contains six integers xiyizix'iy'i and z'i (1xi,yi,zi,xi,yi,zi100), describing a segment that connects (x_i,y_i,z_i)and (x_i',y_i',z_i'). It is guaranteed that the two endpoints of each segment do not coincide.

输出格式

For each test case, output a single line containing an integer, denoting the maximum possible number of laser alarms that can be touched.

输入样例 复制

1
4
1 1 1 1 1 2
1 1 10 1 1 11
1 10 1 1 10 2
10 1 1 10 1 2

输出样例 复制

3