Solutions are presented as using the least memory and the fastest execution time. It also takes the top
10 most recent solutions from each language. If you want to limit to a specific index, click the
"Solved" button and go to that problem.
ContestId |
Name |
Phase |
Frozen |
Duration (Seconds) |
Relative Time |
Start Time |
329
|
Codeforces Round 192 (Div. 1) |
FINISHED |
False |
7200 |
363371397 |
July 20, 2013, 1:30 p.m. |
Problems
B'I have an undirected graph consisting of n nodes, numbered 1 through n. Each node has at most two incident edges. For each pair of nodes, there is at most an edge connecting them. No edge connects a node to itself. I would like to create a new graph in such a way that: Help me construct the new graph, or tell me if it is impossible. The first line consists of two space-separated integers: n and m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105), denoting the number of nodes and edges, respectively. Then m lines follow. Each of the m lines consists of two space-separated integers u and v (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89u, xe2 x80 x89v xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n; u xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89v), denoting an edge between nodes u and v. If it is not possible to construct a new graph with the mentioned properties, output a single line consisting of -1. Otherwise, output exactly m lines. Each line should contain a description of edge in the same way as used in the input format. The old graph of the first example: A possible new graph for the first example: In the second example, we cannot create any new graph. The old graph of the third example: A possible new graph for the third example: '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
7681101 |
yosupo |
C |
Sept. 4, 2014, 10:56 a.m. |
OK |
D |
TESTS |
106 |
2028 |
3072000 |
|
2600 |
4121775 |
IgorL |
C |
July 20, 2013, 3:27 p.m. |
OK |
Delphi |
TESTS |
106 |
156 |
5632000 |
|
2600 |
4119822 |
Misha100896 |
C |
July 20, 2013, 2:56 p.m. |
OK |
Delphi |
TESTS |
106 |
624 |
16998400 |
|
2600 |
4118998 |
Rubanenko |
C |
July 20, 2013, 2:43 p.m. |
OK |
Delphi |
TESTS |
106 |
1218 |
3993600 |
|
2600 |
4142507 |
Nik_Storm_2010 |
C |
July 23, 2013, 5:56 p.m. |
OK |
FPC |
TESTS |
106 |
93 |
7987200 |
|
2600 |
4117482 |
vilcheuski |
C |
July 20, 2013, 2:22 p.m. |
OK |
FPC |
TESTS |
106 |
140 |
11161600 |
|
2600 |
4125095 |
PeterTong97 |
C |
July 21, 2013, 1:32 a.m. |
OK |
FPC |
TESTS |
106 |
140 |
12492800 |
|
2600 |
4130444 |
Omelianenko |
C |
July 21, 2013, 4:25 p.m. |
OK |
FPC |
TESTS |
106 |
171 |
2560000 |
|
2600 |
4210785 |
ZeRoGerc |
C |
July 31, 2013, 8:05 p.m. |
OK |
FPC |
TESTS |
106 |
186 |
13209600 |
|
2600 |
10843390 |
ljz |
C |
April 24, 2015, 3:55 a.m. |
OK |
FPC |
TESTS |
106 |
468 |
5632000 |
|
2600 |
6713926 |
zyh |
C |
May 26, 2014, 7:43 a.m. |
OK |
GNU C++ |
TESTS |
106 |
92 |
3174400 |
|
2600 |
5001347 |
xyz111 |
C |
Nov. 6, 2013, 7:35 a.m. |
OK |
GNU C++ |
TESTS |
106 |
92 |
3174400 |
|
2600 |
4917596 |
MakingMaker |
C |
Oct. 28, 2013, 2:08 a.m. |
OK |
GNU C++ |
TESTS |
106 |
93 |
3993600 |
|
2600 |
4231026 |
AliceSchuberg |
C |
Aug. 5, 2013, 3:53 a.m. |
OK |
GNU C++ |
TESTS |
106 |
124 |
2355200 |
|
2600 |
40989706 |
ReaLNero1 |
C |
July 30, 2018, 11:12 p.m. |
OK |
GNU C++ |
TESTS |
106 |
124 |
3072000 |
|
2600 |
4129596 |
krijgertje |
C |
July 21, 2013, 1:21 p.m. |
OK |
GNU C++ |
TESTS |
106 |
125 |
1638400 |
|
2600 |
4128010 |
ssmike |
C |
July 21, 2013, 9:16 a.m. |
OK |
GNU C++ |
TESTS |
106 |
125 |
5222400 |
|
2600 |
4124845 |
rprp2012 |
C |
July 21, 2013, 12:35 a.m. |
OK |
GNU C++ |
TESTS |
106 |
125 |
6348800 |
|
2600 |
4126060 |
l1fan |
C |
July 21, 2013, 4:40 a.m. |
OK |
GNU C++ |
TESTS |
106 |
125 |
7577600 |
|
2600 |
4142122 |
sysulby |
C |
July 23, 2013, 4:31 p.m. |
OK |
GNU C++ |
TESTS |
106 |
125 |
9932800 |
|
2600 |
4125644 |
DDDDDDDDDDDDDDDDDDDDDDDD |
C |
July 21, 2013, 3:01 a.m. |
OK |
GNU C++0x |
TESTS |
106 |
140 |
3379200 |
|
2600 |
4123205 |
DDDDDDDDDDDDDDDDDDDDDDDD |
C |
July 20, 2013, 5:52 p.m. |
OK |
GNU C++0x |
TESTS |
106 |
140 |
3379200 |
|
2600 |
4131967 |
ipqhjjybj |
C |
July 22, 2013, 2:19 a.m. |
OK |
GNU C++0x |
TESTS |
106 |
156 |
2252800 |
|
2600 |
4123370 |
ahmed_aly |
C |
July 20, 2013, 6:11 p.m. |
OK |
GNU C++0x |
TESTS |
106 |
171 |
6860800 |
|
2600 |
9209518 |
mrtempo |
C |
Dec. 20, 2014, 6:31 p.m. |
OK |
GNU C++0x |
TESTS |
106 |
186 |
8192000 |
|
2600 |
4126709 |
Dr. |
C |
July 21, 2013, 6:47 a.m. |
OK |
GNU C++0x |
TESTS |
106 |
187 |
3174400 |
|
2600 |
4128763 |
randrew |
C |
July 21, 2013, 11:12 a.m. |
OK |
GNU C++0x |
TESTS |
106 |
218 |
3379200 |
|
2600 |
4129510 |
evima |
C |
July 21, 2013, 1:06 p.m. |
OK |
GNU C++0x |
TESTS |
106 |
218 |
10854400 |
|
2600 |
4129557 |
Mark_Fan |
C |
July 21, 2013, 1:14 p.m. |
OK |
GNU C++0x |
TESTS |
106 |
234 |
5836800 |
|
2600 |
4119458 |
andreihh |
C |
July 20, 2013, 2:51 p.m. |
OK |
GNU C++0x |
TESTS |
106 |
328 |
21606400 |
|
2600 |
14430116 |
Deemo |
C |
Nov. 23, 2015, 4:53 p.m. |
OK |
GNU C++11 |
TESTS |
106 |
186 |
3686400 |
|
2600 |
15786937 |
Archies |
C |
Feb. 4, 2016, 12:24 p.m. |
OK |
GNU C++11 |
TESTS |
106 |
186 |
5017600 |
|
2600 |
17026397 |
.I. |
C |
March 29, 2016, 10:52 p.m. |
OK |
GNU C++11 |
TESTS |
106 |
186 |
11776000 |
|
2600 |
55300404 |
luogu_bot1 |
C |
June 8, 2019, 11:47 a.m. |
OK |
GNU C++11 |
TESTS |
106 |
216 |
8601600 |
|
2600 |
15787004 |
Archies |
C |
Feb. 4, 2016, 12:28 p.m. |
OK |
GNU C++11 |
TESTS |
106 |
218 |
2662400 |
|
2600 |
12144577 |
Might_Guy |
C |
July 21, 2015, 8:54 a.m. |
OK |
GNU C++11 |
TESTS |
106 |
218 |
4915200 |
|
2600 |
69511445 |
Hazyknight |
C |
Jan. 25, 2020, 10:36 a.m. |
OK |
GNU C++11 |
TESTS |
106 |
218 |
7782400 |
|
2600 |
11769689 |
rng__58 |
C |
June 26, 2015, 7:39 a.m. |
OK |
GNU C++11 |
TESTS |
106 |
248 |
3993600 |
|
2600 |
26317782 |
Y_UME |
C |
April 12, 2017, 1:02 p.m. |
OK |
GNU C++11 |
TESTS |
106 |
248 |
7782400 |
|
2600 |
55300360 |
Mirach |
C |
June 8, 2019, 11:46 a.m. |
OK |
GNU C++11 |
TESTS |
106 |
248 |
8601600 |
|
2600 |
29849617 |
Egor.Lifar |
C |
Aug. 28, 2017, 4:04 p.m. |
OK |
GNU C++14 |
TESTS |
106 |
186 |
9420800 |
|
2600 |
49765038 |
anjn98 |
C |
Feb. 11, 2019, 11:15 a.m. |
OK |
GNU C++14 |
TESTS |
106 |
216 |
3379200 |
|
2600 |
47857817 |
KhaledKEE |
C |
Jan. 3, 2019, 1:52 a.m. |
OK |
GNU C++14 |
TESTS |
106 |
216 |
5120000 |
|
2600 |
27536268 |
zhouyuyang |
C |
June 3, 2017, 5:10 a.m. |
OK |
GNU C++14 |
TESTS |
106 |
218 |
3379200 |
|
2600 |
63126990 |
ayk16 |
C |
Oct. 22, 2019, 1:06 p.m. |
OK |
GNU C++14 |
TESTS |
106 |
218 |
4812800 |
|
2600 |
26703701 |
letsbe |
C |
April 27, 2017, 1:51 p.m. |
OK |
GNU C++14 |
TESTS |
106 |
218 |
8908800 |
|
2600 |
33855145 |
mjhun |
C |
Jan. 1, 2018, 9:43 p.m. |
OK |
GNU C++14 |
TESTS |
106 |
218 |
13209600 |
|
2600 |
46699403 |
pikmike |
C |
Dec. 6, 2018, 11:47 p.m. |
OK |
GNU C++14 |
TESTS |
106 |
248 |
5017600 |
|
2600 |
39357709 |
adedalic |
C |
June 18, 2018, 1:41 p.m. |
OK |
GNU C++14 |
TESTS |
106 |
248 |
5734400 |
|
2600 |
23641991 |
Ali.Pi |
C |
Jan. 8, 2017, 7:34 a.m. |
OK |
GNU C++14 |
TESTS |
106 |
248 |
11776000 |
|
2600 |
39862590 |
majk |
C |
July 2, 2018, 8:56 a.m. |
OK |
GNU C++17 |
TESTS |
106 |
216 |
6963200 |
|
2600 |
40993259 |
cai_lw |
C |
July 31, 2018, 1:51 a.m. |
OK |
GNU C++17 |
TESTS |
106 |
218 |
1228800 |
|
2600 |
40993162 |
cai_lw |
C |
July 31, 2018, 1:48 a.m. |
OK |
GNU C++17 |
TESTS |
106 |
218 |
1228800 |
|
2600 |
53823018 |
ruo |
C |
May 6, 2019, 2:18 p.m. |
OK |
GNU C++17 |
TESTS |
106 |
218 |
9830400 |
|
2600 |
66028489 |
ivan100sic |
C |
Nov. 30, 2019, 9:24 a.m. |
OK |
GNU C++17 |
TESTS |
106 |
248 |
1228800 |
|
2600 |
39861194 |
majk |
C |
July 2, 2018, 8:02 a.m. |
OK |
GNU C++17 |
TESTS |
106 |
248 |
3686400 |
|
2600 |
54459745 |
stasio6 |
C |
May 21, 2019, 5:56 p.m. |
OK |
GNU C++17 |
TESTS |
106 |
248 |
5120000 |
|
2600 |
39862604 |
majk |
C |
July 2, 2018, 8:57 a.m. |
OK |
GNU C++17 |
TESTS |
106 |
248 |
6963200 |
|
2600 |
43041301 |
vjudge1 |
C |
Sept. 18, 2018, 3:44 p.m. |
OK |
GNU C++17 |
TESTS |
106 |
248 |
7065600 |
|
2600 |
54523109 |
Kubin |
C |
May 23, 2019, 1:11 p.m. |
OK |
GNU C++17 |
TESTS |
106 |
404 |
1228800 |
|
2600 |
4171465 |
uwi |
C |
July 26, 2013, 6:49 p.m. |
OK |
Java 6 |
TESTS |
106 |
312 |
307200 |
|
2600 |
4358793 |
luckman |
C |
Aug. 27, 2013, 7:44 p.m. |
OK |
Java 6 |
TESTS |
106 |
592 |
307200 |
|
2600 |
4129962 |
mkirsche |
C |
July 21, 2013, 2:38 p.m. |
OK |
Java 6 |
TESTS |
106 |
1390 |
11878400 |
|
2600 |
4147405 |
hama-du |
C |
July 24, 2013, 1:10 p.m. |
OK |
Java 6 |
TESTS |
106 |
2558 |
37376000 |
|
2600 |
4123013 |
tanzaku |
C |
July 20, 2013, 5:34 p.m. |
OK |
Java 7 |
TESTS |
106 |
296 |
24371200 |
|
2600 |
4144662 |
xenoslash |
C |
July 24, 2013, 5:36 a.m. |
OK |
Java 7 |
TESTS |
106 |
312 |
13209600 |
|
2600 |
4119885 |
littlesheep2012 |
C |
July 20, 2013, 2:58 p.m. |
OK |
Java 7 |
TESTS |
106 |
328 |
4812800 |
|
2600 |
4124682 |
Tifuera |
C |
July 20, 2013, 11:38 p.m. |
OK |
Java 7 |
TESTS |
106 |
359 |
204800 |
|
2600 |
4116704 |
Petr |
C |
July 20, 2013, 2:12 p.m. |
OK |
Java 7 |
TESTS |
106 |
375 |
18432000 |
|
2600 |
4120381 |
cerealguy |
C |
July 20, 2013, 3:06 p.m. |
OK |
Java 7 |
TESTS |
106 |
390 |
2969600 |
|
2600 |
4118658 |
chavit |
C |
July 20, 2013, 2:38 p.m. |
OK |
Java 7 |
TESTS |
106 |
546 |
102400 |
|
2600 |
4119675 |
mmaxio |
C |
July 20, 2013, 2:54 p.m. |
OK |
Java 7 |
TESTS |
106 |
577 |
102400 |
|
2600 |
4123861 |
tanzaku |
C |
July 20, 2013, 7:29 p.m. |
OK |
Java 7 |
TESTS |
106 |
593 |
57139200 |
|
2600 |
4142612 |
tsun |
C |
July 23, 2013, 6:18 p.m. |
OK |
Java 7 |
TESTS |
106 |
656 |
307200 |
|
2600 |
4130752 |
QuantumKnight |
C |
July 21, 2013, 6:33 p.m. |
OK |
MS C# |
TESTS |
106 |
343 |
4198400 |
|
2600 |
7041320 |
vjudge4 |
C |
July 7, 2014, 1:55 p.m. |
OK |
MS C++ |
TESTS |
106 |
156 |
1228800 |
|
2600 |
4231011 |
AliceSchuberg |
C |
Aug. 5, 2013, 3:50 a.m. |
OK |
MS C++ |
TESTS |
106 |
186 |
2252800 |
|
2600 |
7038536 |
vjudge1 |
C |
July 7, 2014, 7:17 a.m. |
OK |
MS C++ |
TESTS |
106 |
186 |
3174400 |
|
2600 |
4121767 |
Slevin |
C |
July 20, 2013, 3:27 p.m. |
OK |
MS C++ |
TESTS |
106 |
187 |
4812800 |
|
2600 |
4142865 |
P___ |
C |
July 23, 2013, 7:16 p.m. |
OK |
MS C++ |
TESTS |
106 |
187 |
7065600 |
|
2600 |
4142841 |
P___ |
C |
July 23, 2013, 7:10 p.m. |
OK |
MS C++ |
TESTS |
106 |
187 |
7065600 |
|
2600 |
4122056 |
dimatomp |
C |
July 20, 2013, 3:29 p.m. |
OK |
MS C++ |
TESTS |
106 |
187 |
8294400 |
|
2600 |
4119218 |
NVAL |
C |
July 20, 2013, 2:47 p.m. |
OK |
MS C++ |
TESTS |
106 |
218 |
3788800 |
|
2600 |
4117558 |
RAVEman |
C |
July 20, 2013, 2:23 p.m. |
OK |
MS C++ |
TESTS |
106 |
234 |
8499200 |
|
2600 |
4231025 |
AliceSchuberg |
C |
Aug. 5, 2013, 3:52 a.m. |
OK |
MS C++ |
TESTS |
106 |
248 |
2252800 |
|
2600 |
4122940 |
dolphinigle |
C |
July 20, 2013, 5:28 p.m. |
OK |
Python 2 |
TESTS |
106 |
2437 |
16179200 |
|
2600 |
4119847 |
nwi |
C |
July 20, 2013, 2:57 p.m. |
OK |
Python 2 |
TESTS |
106 |
2593 |
20889600 |
|
2600 |
4136202 |
StyleTang |
C |
July 22, 2013, 2:32 p.m. |
OK |
Python 2 |
TESTS |
106 |
2640 |
16281600 |
|
2600 |
4124088 |
niklasb |
C |
July 20, 2013, 8:09 p.m. |
OK |
Python 2 |
TESTS |
106 |
2828 |
19660800 |
|
2600 |
11936146 |
sensei11 |
C |
July 5, 2015, 2:03 p.m. |
OK |
Python 2 |
TESTS |
106 |
2838 |
14131200 |
|
2600 |
4124020 |
niklasb |
C |
July 20, 2013, 7:56 p.m. |
OK |
Python 2 |
TESTS |
106 |
2843 |
25395200 |
|
2600 |
4124031 |
niklasb |
C |
July 20, 2013, 7:59 p.m. |
OK |
Python 2 |
TESTS |
106 |
2870 |
19660800 |
|
2600 |
4235542 |
Canoe |
C |
Aug. 6, 2013, 5:30 a.m. |
OK |
Python 2 |
TESTS |
106 |
2870 |
21504000 |
|
2600 |
4124763 |
CyberZHG |
C |
July 21, 2013, 12:05 a.m. |
OK |
Python 2 |
TESTS |
106 |
2921 |
21504000 |
|
2600 |
4125059 |
Renkai |
C |
July 21, 2013, 1:24 a.m. |
OK |
Python 2 |
TESTS |
106 |
2953 |
19660800 |
|
2600 |
remove filters
Back to search problems