POJ 3304 Segments
来源:互联网 发布:网络佳句赏析最经典 编辑:程序博客网 时间:2024/05/19 12:14
Description
Given n segments in the two dimensional space, write a program, which determines if there exists a line such that after projecting these segments on it, all projected segments have at least one point in common.
Input
Input begins with a number T showing the number of test cases and then, T test cases follow. Each test case begins with a line containing a positive integer n ≤ 100 showing the number of segments. After that, n lines containing four real numbers x1 y1 x2 y2 follow, in which (x1, y1) and (x2, y2) are the coordinates of the two endpoints for one of the segments.
Output
For each test case, your program must output "Yes!", if a line with desired property exists and must output "No!" otherwise. You must assume that two floating point numbers a and b are equal if |a - b| < 10-8.
Sample Input
321.0 2.0 3.0 4.04.0 5.0 6.0 7.030.0 0.0 0.0 1.00.0 1.0 0.0 2.01.0 1.0 2.0 1.030.0 0.0 0.0 1.00.0 2.0 0.0 3.01.0 1.0 2.0 1.0
Sample Output
Yes!Yes!No!
- POJ 3304 Segments
- poj 3304 Segments
- poj 3304 Segments
- poj 3304 Segments
- POJ 3304 Segments
- POJ 3304 Segments
- POJ 3304 Segments
- poj 3304 Segments
- poj 3304 Segments
- POJ 3304 Segments
- poj 3304 Segments
- POJ 3304 Segments
- poj 3304 ( segments)
- poj-3304-Segments
- POJ 3304 Segments
- POJ 3304 Segments
- poj 3304 Segments
- POJ 3304 Segments
- Beginning Linux Programming chapter 11
- sql server 如何清空日志
- 请参考:刚买的诺基亚C5-00死机了
- css一
- 首言
- POJ 3304 Segments
- 在Linux CentOS上安装mysql
- 几个云计算相关概念及其演进历程:PaaS、SaaS、IaaS
- 基于QT C++的网络缓冲区设计(一)——概括
- QQ与360之争
- 微软Silverlight团队关于PDC会议发表官方补充声明(风云翻译版)
- C#中压缩工具整理之一 : DotNetZipLib
- 这是一个好地方
- Monitor MMS