Welcome   HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online
Home
FAQs
Problem Set
Practices
Online Contests
Major Exercises
OI Special
Judgement
Submit
Online Status
User Ranklist
Users
Register new
Login
Web Links
Hunan Normal University
College of Information Science and Engineering
Intersection
Time Limit: 1000ms, Special Time Limit:3000ms, Memory Limit:32768KB
Total submit users: 16, Accepted users: 13
Problem 10532 : No special judgement
Problem description
  If a point P is on the segment AB and another segment CD at the same time,we say that P is an intersect point for AB and CD.

      For two segments in two dimensions,how many intersect point do they have?    

Input
  There are multiple test cases.

For each test case:the first line contains 4 integers represent th x-coordinate of point A, y-coordinate of point A,x-coordinate of point B,y-coordinate of point B,the second line contains 4 integers represent th x-coordinate of point C, y-coordinate of point C,x-coordinate of point D,y-coordinate of point D.

You can assume for all input integers v,-2<=v<=2,and A and B are always at different position,,C and D are always at different position,too.

Output
  For each test case:

If AB and CD have no intersect point,output a single line contains the string "None",

If AB and CD have just one intersect point,output a single line contains the string "One",

If AB and CD have more than one intersect point(such as many),output a single line contains the string "Many".

Sample Input
-2 -2 -2 -1
-2 -2 -2 2
-2 -2 -2 -1
-2 -2 -1 0
Sample Output
Many
One
Problem Source
  jiyanmoyu

Submit   Discuss   Judge Status  Problems  Ranklist 

HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online, Version 2010.5.5.final.
Web visits:2100 today,16258827 total, since 2010-05-07