F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Segment

Time Limit: 6000/2000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others)
Total Submission(s): 1151    Accepted Submission(s): 316


Problem Description
In the annual Gaozhong Shuxue Liansai in the kingdom of Henryy, difficult geometry problems often appear. Let¡¯s have a look at a problem:
N (1<=N<=300) segments are on a two dimension Cartesian plane. Your task is to check out whether there is a line that the intersection of the projections of all N segments is non-empty.
 

Input
The first line contains an integer T, indicating the number of the test cases.
For each test case, the first line contains an integer N, the number of the segments.
Then N lines follows, each has four integers (x1, y1), (x2, y2), indicating the two endpoints of this segment.
 

Output
For each test case, output a line: if such a line exists, print ¡°Yes¡±; otherwise, print ¡°No¡±.
 

Sample Input
2 2 0 0 1 1 2 1 4 -1 4 6 5 0 1 1 9 0 6 9 7 0 10 7 10 8 7
 

Sample Output
Yes No
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-22 16:22:10, Gzip enabled