|
||||||||||
SegmentTime 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
Sample Output
Source | ||||||||||
|