CF388E.Fox and Meteor Shower
NOI/NOI+/CTSC
通过率:0%
时间限制:6.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
There is a meteor shower on the sky and there are n meteors. The sky can be viewed as a 2D Euclid Plane and the meteor is point on this plane.
Fox Ciel looks at the sky. She finds out that the orbit of each meteor is a straight line, and each meteor has a constant velocity. Now Ciel wants to know: what is the maximum number of meteors such that any pair met at the same position at a certain time? Note that the time is not limited and can be also negative. The meteors will never collide when they appear at the same position at the same time.
天空中正发生一场流星雨,共有 n 颗流星。天空可视为一个二维欧几里得平面,每颗流星是该平面上的一个点。
小狐Ciel正在仰望天空。她发现:每颗流星的运行轨迹是一条直线,且每颗流星均以恒定速度运动。现在Ciel想知道:最多有多少颗流星,使得其中任意两颗流星都在某一时刻(该时刻可以为任意实数,包括负数)恰好处于同一位置?注意:当两颗流星在同一时刻出现在同一位置时,它们并不会发生碰撞。
输入格式
The first line contains an integer n (1 ≤ n ≤ 1000). Each of the next n lines contains six integers: _t_1, _x_1, _y_1, _t_2, _x_2, _y_2 — the description of a meteor's orbit: at time _t_1, the current meteor is located at the point (_x_1, _y_1) and at time _t_2, the meteor is located at point (_x_2, _y_2) ( - 106 ≤ _t_1, _x_1, _y_1, _t_2, _x_2, _y_2 ≤ 106; _t_1 ≠ _t_2).
There will be no two meteors are always in the same position for any time.
第一行包含一个整数 n(1≤n≤1000)。接下来的 n 行中,每行包含六个整数:t1, x1, y1, t2, x2, y2 —— 描述一颗流星的轨道:在时刻 t1,该流星位于点 (x1,y1);在时刻 t2,该流星位于点 (x2,y2)(其中 −106≤t1, x1, y1, t2, x2, y2≤106;且 t1=t2)。
任意时刻都不会有两颗流星始终处于同一位置。
输出格式
Print a single integer — the maximum number of meteors such that any pair met at the same position at a certain time.
输出一个整数——满足“任意两颗流星在某一时刻于同一位置相遇”这一条件的流星的最大数量。
输入输出样例
输入#1
2 0 0 1 1 0 2 0 1 0 1 2 0
输出#1
2
输入#2
3 -1 -1 0 3 3 0 0 2 -1 -1 3 -2 -2 0 -1 6 0 3
输出#2
3
输入#3
4 0 0 0 1 0 1 0 0 1 1 1 1 0 1 1 1 1 0 0 1 0 1 0 0
输出#3
1
输入#4
1 0 0 0 1 0 0
输出#4
1
说明/提示
In example 1, meteor 1 and 2 meet in t=-1 at (0, 0).

In example 2, meteor 1 and 2 meet in t=1 at (1, 0), meteor 1 and 3 meet in t=0 at (0, 0) and meteor 2 and 3 meet in t=2 at (0, 1).

In example 3, no two meteor meet.

In example 4, there is only 1 meteor, and its velocity is zero.

If your browser doesn't support animation png, please see the gif version here:
http://assets.codeforces.com/images/388e/example1.gif
http://assets.codeforces.com/images/388e/example2.gif
http://assets.codeforces.com/images/388e/example3.gif
http://assets.codeforces.com/images/388e/example4.gif
在示例 1 中,流星 1 和 2 在 t=−1 时刻于点 (0,0) 相遇。

在示例 2 中,流星 1 和 2 在 t=1 时刻于点 (1,0) 相遇,流星 1 和 3 在 t=0 时刻于点 (0,0) 相遇,流星 2 和 3 在 t=2 时刻于点 (0,1) 相遇。

在示例 3 中,没有任何两颗流星相遇。

在示例 4 中,仅存在一颗流星,且其速度为零。

如果您的浏览器不支持动画 PNG 格式,请查看以下 GIF 版本:
http://assets.codeforces.com/images/388e/example1.gif
http://assets.codeforces.com/images/388e/example2.gif
http://assets.codeforces.com/images/388e/example3.gif
http://assets.codeforces.com/images/388e/example4.gif
输入解题思路,AI测评打分。不知道怎么写?