Online MIPT programming contest | РУССКИЙ |
<PREV Problem: | NEXT> |
< |
---|
Time limit = 30 second(s)
Graph with V < 3000 vertices and E < 10000 edges. i-th edge connects vertices si and ei (0 ≤ si, ei < V).Input. Graph description:
V E s1 e1 s2 e2 s3 e2 ... sE eEWhere V is number of vertise, E is number of edges, (s1, eE) i-th edge description.
Output. 'YES' if the graph is planar, and 'NO' otherwise.
Input#12 1 0 1 |
Output#1YES |
Input#26 9 0 3 0 4 0 5 1 3 1 4 1 5 2 3 2 4 2 5 |
Output#2NO |
Author:
Classic problem, tests and description by Egor Cvetkov
19 Apr 2006
© acm.mipt DevGroup The page was generated in 180ms |