<PREV Problem:
NEXT>
Solved by 15 users: Mirzakhmet, fboy123, Zhukov_Dmitry, wInuX, WsemirZ, zloy_mipt, mazahaka, defrager, yiuyuho, murphy, Dest, LiuChenheng, dragonic, avi2011class, rayaryabinina.
UserDateAttemptTimeCMSC
rayaryabinina21 dec 2015C100.02857 
Dest21 mar 2010C++100.052170 
wInuX04 aug 2008Java536.042268 
wInuX04 aug 2008Java629.612308 
wInuX04 aug 2008Java729.612425 
fboy12308 jan 2007C++2000.032551 
fboy12308 jan 2007C++2100.022561 
LiuChenheng17 sep 2011C++500.052724 
LiuChenheng17 sep 2011C++400.052733 
LiuChenheng17 sep 2011C++200.052788 
yiuyuho10 apr 2009C++1700.093016 
yiuyuho10 apr 2009C++1800.093016 
avi2011class18 nov 2015C++200.873715 
WsemirZ31 aug 2008Kylix3902.104361 
WsemirZ05 sep 2008Kylix4002.034393 
Zhukov_Dmitry07 sep 2008C++4200.334444 
Zhukov_Dmitry02 mar 2007C++3300.314605 
Zhukov_Dmitry02 mar 2007C++3400.314605 
Zhukov_Dmitry02 mar 2007C++3500.304653 
Zhukov_Dmitry02 mar 2007C++3700.294685 
dragonic25 mar 2015C++3707.624998 
Languages
C++
11
C
2
Java
1
Kylix
1
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 

Graph Planarity

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 eE
Where 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#1
2 1
0 1

Output#1
YES


Input#2
6 9
0 3
0 4
0 5
1 3
1 4
1 5
2 3
2 4
2 5
Output#2
NO

Author:
Classic problem, tests and description by Egor Cvetkov
19 Apr 2006

<PREV | Problem set | Search related messages | NEXT>


© acm.mipt DevGroup
The page was generated in 180ms

SW soft NIX
ID = 3.214.184.250