作者giles222449 (海水知天寒)
看板b94902xxx
标题[建议] 一年级单号或修刘邦锋的计程的可以来看XD
时间Tue Sep 20 19:57:21 2005
刚刚无聊...翻译了一下题目...
Given three line segments,
给你三条线段,
write a program to determine if they can form the three sides of a triangle by shifting only.
编写一个程式,这个程式能用以决定是否能仅靠移动线段来构成一个三角形.
Note that you can shift the line segments,
注意:你可以移动线段,
but you may not rotate, flip, or stretch them.
但是不能旋转(旋转角度)翻转(翻过来)以及延长这些线段.
You may assume all segments have different slopes,
你可以假设这些线段有不同的斜率,
so you do not need to worry about the triangles that have area 0.
这样你就不必担心构成的三角形的面积会是0.
The input has three lines.
在input(输入的资料)会分成三行.
Each line is a segment.
每一行代表一个线段.
the first two numbers are the x and y coordinates of the starting point of the segment,
前两个数字代表线段"起"点的x座标和y座标,
while the next two numbers are the end point.
後两个数字代表线段"终"点的x座标和y座标,
All the numbers are between -10000 and 10000.
所有的数字会在-10000到10000之间.
You program should output "Yes" if the segment can form a triangle,
如果这三条线可以构成一个三角形,你的程式应该要输出"Yes",
"No" otherwise.
反之则输出"No"
范例输入 1
Sample Input 1
20 20 23 23
102 98 100 100
50 50 55 51
范例输出 1
Sample output 1
Yes
范例输入 2
Sample Input 2
20 20 23 23
102 98 100 100
250 150 55 51
范例输出 2
Sample output 2
No
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.112.247.107
1F:推 ericsk:同学很热心, 不过期中期末考的题目都会是英文的喔 09/20 20:03
2F:推 hamigwa:仿ACM ? XD 09/20 20:35
3F:推 beagle:资讯系一向只用英文和外星文出题, 作答可以用中文... 09/20 21:46
4F:推 wkilont:所以看不懂的一率算外星文罗~ 09/20 22:10
5F:推 muchwhy:不好意思乱入一下...第一行的given可不可以讲作如果考虑到 09/22 20:47