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 |
---|---|---|---|---|---|---|
840 | Codeforces Round 429 (Div. 1) | FINISHED | False | 7200 | 228754499 | Aug. 18, 2017, 3:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 2482 ) | B | Leha and another game about graph | PROGRAMMING | constructive algorithms data structures dfs and similar dp graphs | 2100 |
B"Leha plays a computer game, where is on each level is given a connected graph with n vertices and m edges. Graph can contain multiple edges, but can not contain self loops. Each vertex has an integer di, which can be equal to 0, 1 or xe2 x80 x89- xe2 x80 x891. To pass the level, he needs to find a xc2 xabgood xc2 xbb subset of edges of the graph or say, that it doesn't exist. Subset is called xc2 xabgood xc2 xbb, if by by leaving only edges from this subset in the original graph, we obtain the following: for every vertex i, di xe2 x80 x89= xe2 x80 x89 xe2 x80 x89- xe2 x80 x891 or it's degree modulo 2 is equal to di. Leha wants to pass the game as soon as possible and ask you to help him. In case of multiple correct answers, print any of them. The first line contains two integers n, m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x893 xc2 xb7105, n xe2 x80 x89- xe2 x80 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x893 xc2 xb7105) -- number of vertices and edges. The second line contains n integers d1, xe2 x80 x89d2, xe2 x80 x89..., xe2 x80 x89dn ( xe2 x80 x89- xe2 x80 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89di xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891) -- numbers on the vertices. Each of the next m lines contains two 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) -- edges. It's guaranteed, that graph in the input is connected. Print xe2 x80 x89- xe2 x80 x891 in a single line, if solution doesn't exist. Otherwise in the first line k -- number of edges in a subset. In the next k lines indexes of edges. Edges are numerated in order as they are given in the input, starting from 1. In the first sample we have single vertex without edges. It's degree is 0 and we can not get 1. "... |
Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
29709345 | gamenewer | B | Aug. 23, 2017, 2:02 p.m. | OK | GNU C++ | TESTS | 73 | 93 | 25600000 | 2100 | |
29805587 | yasugongshang | B | Aug. 26, 2017, 11:53 a.m. | OK | GNU C++ | TESTS | 73 | 108 | 59699200 | 2100 | |
41126264 | sgxsgx | B | Aug. 2, 2018, 2:24 p.m. | OK | GNU C++ | TESTS | 73 | 109 | 12288000 | 2100 | |
29923958 | wh2001_ZY | B | Aug. 30, 2017, 4:12 p.m. | OK | GNU C++ | TESTS | 73 | 124 | 23654400 | 2100 | |
40980258 | ReaLNero1 | B | July 30, 2018, 5:26 p.m. | OK | GNU C++ | TESTS | 73 | 124 | 25600000 | 2100 | |
29615387 | Merln | B | Aug. 20, 2017, 7:46 a.m. | OK | GNU C++ | TESTS | 73 | 139 | 25702400 | 2100 | |
29584719 | jiyutian | B | Aug. 19, 2017, 1:15 a.m. | OK | GNU C++ | TESTS | 73 | 140 | 19660800 | 2100 | |
29802799 | UniFYH | B | Aug. 26, 2017, 9:43 a.m. | OK | GNU C++ | TESTS | 73 | 140 | 20582400 | 2100 | |
30257712 | vjudge3 | B | Sept. 11, 2017, 2:10 a.m. | OK | GNU C++ | TESTS | 73 | 140 | 24576000 | 2100 | |
31623870 | cdgyp | B | Oct. 23, 2017, 9:23 a.m. | OK | GNU C++ | TESTS | 73 | 155 | 20172800 | 2100 | |
46394044 | Scut82 | B | Nov. 30, 2018, 7:58 a.m. | OK | GNU C++11 | TESTS | 73 | 93 | 41676800 | 2100 | |
52218625 | yyyz903 | B | April 2, 2019, 4:53 a.m. | OK | GNU C++11 | TESTS | 73 | 108 | 26419200 | 2100 | |
51098047 | Gloid | B | March 9, 2019, 5:30 p.m. | OK | GNU C++11 | TESTS | 73 | 109 | 18022400 | 2100 | |
49075445 | memset0c | B | Jan. 28, 2019, 2:28 a.m. | OK | GNU C++11 | TESTS | 73 | 109 | 34713600 | 2100 | |
62461346 | bigboyy | B | Oct. 13, 2019, 8:22 a.m. | OK | GNU C++11 | TESTS | 73 | 124 | 14131200 | 2100 | |
46393728 | Scut82 | B | Nov. 30, 2018, 7:45 a.m. | OK | GNU C++11 | TESTS | 73 | 124 | 41676800 | 2100 | |
31737961 | PupilFop_zz | B | Oct. 26, 2017, 12:27 p.m. | OK | GNU C++11 | TESTS | 73 | 139 | 17100800 | 2100 | |
29846904 | FizzyDavid | B | Aug. 28, 2017, 1:49 p.m. | OK | GNU C++11 | TESTS | 73 | 140 | 20172800 | 2100 | |
29572716 | lzr_010506 | B | Aug. 18, 2017, 4:04 p.m. | OK | GNU C++11 | TESTS | 73 | 140 | 22630400 | 2100 | |
51853734 | zsben | B | March 26, 2019, 9:31 a.m. | OK | GNU C++11 | TESTS | 73 | 156 | 22630400 | 2100 | |
29838583 | LEOLEI | B | Aug. 28, 2017, 4:47 a.m. | OK | GNU C++14 | TESTS | 73 | 233 | 17203200 | 2100 | |
60147737 | kingofpizza | B | Sept. 6, 2019, 1:40 a.m. | OK | GNU C++14 | TESTS | 73 | 233 | 21094400 | 2100 | |
29597971 | Egor.Lifar | B | Aug. 19, 2017, 12:22 p.m. | OK | GNU C++14 | TESTS | 73 | 233 | 60313600 | 2100 | |
60149371 | HorizonWind | B | Sept. 6, 2019, 2:53 a.m. | OK | GNU C++14 | TESTS | 73 | 233 | 72294400 | 2100 | |
29617877 | drrrzdk | B | Aug. 20, 2017, 10:01 a.m. | OK | GNU C++14 | TESTS | 73 | 234 | 18636800 | 2100 | |
65826615 | lyons | B | Nov. 27, 2019, 12:48 p.m. | OK | GNU C++14 | TESTS | 73 | 248 | 18636800 | 2100 | |
29590076 | FallDream | B | Aug. 19, 2017, 6:19 a.m. | OK | GNU C++14 | TESTS | 73 | 280 | 24678400 | 2100 | |
30980795 | _SHENZHEBEI_ | B | Oct. 4, 2017, 1:37 a.m. | OK | GNU C++14 | TESTS | 73 | 295 | 30412800 | 2100 | |
29636661 | Joovo1 | B | Aug. 21, 2017, 6:32 a.m. | OK | GNU C++14 | TESTS | 73 | 296 | 26214400 | 2100 | |
29908789 | vjudge2 | B | Aug. 30, 2017, 5:47 a.m. | OK | GNU C++14 | TESTS | 73 | 296 | 31232000 | 2100 | |
44764592 | Trisolaris | B | Oct. 24, 2018, 9:05 a.m. | OK | GNU C++17 | TESTS | 73 | 124 | 20787200 | 2100 | |
46584663 | zbtrs | B | Dec. 4, 2018, 12:42 p.m. | OK | GNU C++17 | TESTS | 73 | 249 | 18636800 | 2100 | |
36647420 | LiChenKoh | B | March 26, 2018, 3:49 p.m. | OK | GNU C++17 | TESTS | 73 | 249 | 25907200 | 2100 | |
54095566 | vjudge4 | B | May 14, 2019, 12:54 p.m. | OK | GNU C++17 | TESTS | 73 | 265 | 26316800 | 2100 | |
58557655 | wj123 | B | Aug. 11, 2019, 3:25 a.m. | OK | GNU C++17 | TESTS | 73 | 265 | 129228800 | 2100 | |
54095914 | jkchen | B | May 14, 2019, 1:03 p.m. | OK | GNU C++17 | TESTS | 73 | 280 | 26316800 | 2100 | |
60635044 | mlby | B | Sept. 15, 2019, 1:20 p.m. | OK | GNU C++17 | TESTS | 73 | 280 | 37171200 | 2100 | |
43512891 | 3t4n | B | Sept. 28, 2018, 1:44 a.m. | OK | GNU C++17 | TESTS | 73 | 311 | 25600000 | 2100 | |
67050140 | _user090203 | B | Dec. 17, 2019, 3:22 a.m. | OK | GNU C++17 | TESTS | 73 | 311 | 55910400 | 2100 | |
62957431 | Bohun | B | Oct. 19, 2019, 9:18 p.m. | OK | GNU C++17 | TESTS | 73 | 327 | 32665600 | 2100 | |
29564444 | Egor | B | Aug. 18, 2017, 3:27 p.m. | OK | Java 8 | TESTS | 73 | 358 | 38092800 | 2100 | |
29571104 | fetetriste | B | Aug. 18, 2017, 3:55 p.m. | OK | Java 8 | TESTS | 73 | 421 | 21811200 | 2100 | |
35610100 | tri | B | Feb. 23, 2018, 9:32 p.m. | OK | Java 8 | TESTS | 73 | 421 | 97792000 | 2100 | |
29582691 | fetetriste | B | Aug. 18, 2017, 10:38 p.m. | OK | Java 8 | TESTS | 73 | 436 | 21811200 | 2100 | |
29569802 | Ahmad_Elsagheer | B | Aug. 18, 2017, 3:48 p.m. | OK | Java 8 | TESTS | 73 | 451 | 27238400 | 2100 | |
43511777 | XKev | B | Sept. 28, 2018, 12:25 a.m. | OK | Java 8 | TESTS | 73 | 467 | 70041600 | 2100 | |
29565384 | AndreiNet | B | Aug. 18, 2017, 3:30 p.m. | OK | Java 8 | TESTS | 73 | 545 | 70041600 | 2100 | |
29569863 | mmaxio | B | Aug. 18, 2017, 3:49 p.m. | OK | Java 8 | TESTS | 73 | 608 | 93798400 | 2100 | |
44487190 | Srinivasa_Ramanujan | B | Oct. 18, 2018, 1:03 p.m. | OK | Java 8 | TESTS | 73 | 639 | 116224000 | 2100 | |
35596215 | tmwilliamlin168 | B | Feb. 23, 2018, 12:26 p.m. | OK | Java 8 | TESTS | 73 | 670 | 89702400 | 2100 | |
29574994 | alexey.enkov | B | Aug. 18, 2017, 4:18 p.m. | OK | Kotlin | TESTS | 73 | 2386 | 106905600 | 2100 | |
29593471 | leign | B | Aug. 19, 2017, 8:51 a.m. | OK | Mono C# | TESTS | 73 | 935 | 56729600 | 2100 | |
29571343 | riantkb | B | Aug. 18, 2017, 3:56 p.m. | OK | Mono C# | TESTS | 73 | 1279 | 69939200 | 2100 | |
29621211 | carber | B | Aug. 20, 2017, 12:43 p.m. | OK | MS C++ | TESTS | 73 | 218 | 20172800 | 2100 | |
29568413 | wa1tz719 | B | Aug. 18, 2017, 3:42 p.m. | OK | MS C++ | TESTS | 73 | 327 | 17408000 | 2100 | |
66009902 | vjudge2 | B | Nov. 30, 2019, 1:44 a.m. | OK | MS C++ | TESTS | 73 | 327 | 27852800 | 2100 | |
43509824 | A01410597 | B | Sept. 27, 2018, 10:05 p.m. | OK | MS C++ | TESTS | 73 | 342 | 25088000 | 2100 | |
29567485 | Perforator | B | Aug. 18, 2017, 3:38 p.m. | OK | MS C++ | TESTS | 73 | 343 | 24268800 | 2100 | |
29572458 | natalia | B | Aug. 18, 2017, 4:02 p.m. | OK | MS C++ | TESTS | 73 | 498 | 28160000 | 2100 | |
29575051 | Taube | B | Aug. 18, 2017, 4:19 p.m. | OK | MS C++ | TESTS | 73 | 639 | 50688000 | 2100 | |
29568046 | Ilya_MSU | B | Aug. 18, 2017, 3:41 p.m. | OK | MS C++ | TESTS | 73 | 904 | 26419200 | 2100 | |
66009834 | zhangwen123 | B | Nov. 30, 2019, 1:41 a.m. | OK | MS C++ 2017 | TESTS | 73 | 420 | 26316800 | 2100 | |
54702735 | pajenegod | B | May 27, 2019, 2 a.m. | OK | PyPy 2 | TESTS | 73 | 1809 | 168140800 | 2100 | |
29645821 | .o. | B | Aug. 21, 2017, 2:28 p.m. | OK | PyPy 3 | TESTS | 73 | 2043 | 94310400 | 2100 | |
29916322 | itolstikhin | B | Aug. 30, 2017, 11:53 a.m. | OK | Python 2 | TESTS | 73 | 2979 | 130867200 | 2100 | |
61295052 | vanda | B | Sept. 26, 2019, 12:15 a.m. | OK | Rust | TESTS | 73 | 467 | 155136000 | 2100 | |
30653287 | limed | B | Sept. 23, 2017, 8:41 p.m. | OK | Scala | TESTS | 73 | 1996 | 176640000 | 2100 | |
30653134 | limed | B | Sept. 23, 2017, 8:28 p.m. | OK | Scala | TESTS | 73 | 2136 | 181145600 | 2100 | |
30652744 | limed | B | Sept. 23, 2017, 7:58 p.m. | OK | Scala | TESTS | 73 | 2152 | 168038400 | 2100 |
Back to search problems