当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3659:Identify the number

题目描述
Taly likes to take photographs. Because he is interested in geometry and graphics. One day, he went to a museum which exhibits all kinds of things of Mars people. He is surprised that the Mars people use the arabic numberals as human beings. But they only use the number from 0 to 8 and they like to write the numbers in a skew style as the gure sees. Then Taly took many photographs of the number writing (in fact,it is forbidden to take photograph in the so mystical museum). When home, he transformed these photograph into the graph on a 2 - D plane. Taly is confused that how to identify the numbers automatically. Now Taly ask help to you to write a program to identify the numbers.


输入解释
For each test case, the first line is the number n which indicates the number of the segments. Then n lines follow, each line has four float numbers which are x1, y1, x2, y2 with precision up to 6 decimal places. (x1, y1), (x2, y2) are the two endpoints of the segment. Each segment has the same length 1 and one segment connects at least another one. For any line which is paralleled with y-axis and has width of 5, it won't cross more than one number. It means that the minimum absolute di erence of two number's x coordinate is at least 5.
2 ≤ n ≤ 1000, -10000 ≤ x1, y1, x2, y2 ≤ 10000.
输出解释
For each test case, output the numbers from left to right as the sample sees.
输入样例
12
-6.000000 2.000000 -6.000000 3.000000
-6.000000 3.000000 -6.000000 4.000000
0.707107 -0.707107 0.000000 0.000000
0.000000 0.000000 0.707107 0.707107
0.707107 0.707107 1.414213 0.000000
1.414213 0.000000 2.121320 0.707107
2.121320 0.707107 1.414213 1.414213
9.707107 -0.707107 9.000000 0.000000
9.000000 0.000000 9.707107 0.707107
9.707107 0.707107 10.414213 0.000000
9.707107 0.707107 10.414213 1.414213
11.121320 0.707107 10.414213 1.414213
输出样例
123
来自杭电HDUOJ的附加信息
Recommend lcy

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-3659

最后修改于 2020-10-25T23:05:43+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)