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 |
---|---|---|---|---|---|---|
901 | Codeforces Round 453 (Div. 1) | FINISHED | False | 7200 | 223482263 | Dec. 19, 2017, 3:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 527 ) | D | Weighting a Tree | PROGRAMMING | constructive algorithms dfs and similar graphs | 2700 |
B'You are given a connected undirected graph with n vertices and m edges. The vertices are enumerated from 1 to n. You are given n integers c1, xe2 x80 x89c2, xe2 x80 x89..., xe2 x80 x89cn, each of them is between xe2 x80 x89- xe2 x80 x89n and n, inclusive. It is also guaranteed that the parity of cv equals the parity of degree of vertex v. The degree of a vertex is the number of edges connected to it. You are to write a weight between xe2 x80 x89- xe2 x80 x892 xc2 xb7n2 and 2 xc2 xb7n2 (inclusive) on each edge in such a way, that for each vertex v the sum of weights on edges connected to this vertex is equal to cv, or determine that this is impossible. The first line contains two integers n and m (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105, n xe2 x80 x89- xe2 x80 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105) -- the number of vertices and the number of edges. The next line contains n integers c1, xe2 x80 x89c2, xe2 x80 x89..., xe2 x80 x89cn ( xe2 x80 x89- xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ci xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n), where ci is the required sum of weights of edges connected to vertex i. It is guaranteed that the parity of ci equals the parity of degree of vertex i. The next m lines describe edges of the graph. The i-th of these lines contains two integers ai and bi (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai, xe2 x80 x89bi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n; ai xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89bi), meaning that the i-th edge connects vertices ai and bi. It is guaranteed that the given graph is connected and does not contain loops and multiple edges. If there is no solution, print "NO". Otherwise print "YES" and then m lines, the i-th of them is the weight of the i-th edge wi ( xe2 x80 x89- xe2 x80 x892 xc2 xb7n2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89wi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892 xc2 xb7n2). '... |
Codeforces Round #453 (Div. 1 & Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
33421319 | yosupo | D | Dec. 19, 2017, 4:05 p.m. | OK | D | TESTS | 92 | 155 | 27136000 | 2700 | |
33469312 | lzr_010506 | D | Dec. 21, 2017, 3:12 a.m. | OK | GNU C++ | TESTS | 92 | 46 | 7987200 | 2700 | |
33445535 | zx2003 | D | Dec. 20, 2017, 5:21 a.m. | OK | GNU C++ | TESTS | 92 | 46 | 8806400 | 2700 | |
33469462 | vjudge5 | D | Dec. 21, 2017, 3:26 a.m. | OK | GNU C++ | TESTS | 92 | 46 | 19353600 | 2700 | |
33469431 | Landia | D | Dec. 21, 2017, 3:24 a.m. | OK | GNU C++ | TESTS | 92 | 46 | 19353600 | 2700 | |
40978878 | ReaLNero1 | D | July 30, 2018, 4:50 p.m. | OK | GNU C++ | TESTS | 92 | 61 | 6553600 | 2700 | |
33469453 | vjudge1 | D | Dec. 21, 2017, 3:26 a.m. | OK | GNU C++ | TESTS | 92 | 61 | 19353600 | 2700 | |
34663030 | luogu_bot2 | D | Jan. 29, 2018, 1:37 p.m. | OK | GNU C++ | TESTS | 92 | 78 | 10137600 | 2700 | |
39179828 | Efina | D | June 12, 2018, 4:10 a.m. | OK | GNU C++ | TESTS | 92 | 93 | 6553600 | 2700 | |
33468395 | david7ch | D | Dec. 21, 2017, 1:18 a.m. | OK | GNU C++ | TESTS | 92 | 93 | 7168000 | 2700 | |
34917480 | vjudge4 | D | Feb. 4, 2018, 8:07 a.m. | OK | GNU C++ | TESTS | 92 | 93 | 7884800 | 2700 | |
44105262 | Hany01 | D | Oct. 11, 2018, 8:51 a.m. | OK | GNU C++11 | TESTS | 92 | 46 | 6860800 | 2700 | |
44105746 | Hany01 | D | Oct. 11, 2018, 9:08 a.m. | OK | GNU C++11 | TESTS | 92 | 61 | 6860800 | 2700 | |
47300095 | newbiegcz | D | Dec. 20, 2018, 1:49 p.m. | OK | GNU C++11 | TESTS | 92 | 62 | 5632000 | 2700 | |
44028012 | dengyixuan | D | Oct. 9, 2018, 9:05 a.m. | OK | GNU C++11 | TESTS | 92 | 62 | 7270400 | 2700 | |
52228338 | p0o9i8u | D | April 2, 2019, 10:47 a.m. | OK | GNU C++11 | TESTS | 92 | 62 | 7782400 | 2700 | |
52228256 | p0o9i8u | D | April 2, 2019, 10:45 a.m. | OK | GNU C++11 | TESTS | 92 | 62 | 7782400 | 2700 | |
33477053 | laofudasuan | D | Dec. 21, 2017, 10:57 a.m. | OK | GNU C++11 | TESTS | 92 | 62 | 7782400 | 2700 | |
62615485 | CTP_314 | D | Oct. 15, 2019, 11:18 a.m. | OK | GNU C++11 | TESTS | 92 | 62 | 7987200 | 2700 | |
62615393 | CTP_314 | D | Oct. 15, 2019, 11:17 a.m. | OK | GNU C++11 | TESTS | 92 | 62 | 7987200 | 2700 | |
33983326 | wfj_2048 | D | Jan. 7, 2018, 1:07 p.m. | OK | GNU C++11 | TESTS | 92 | 62 | 8089600 | 2700 | |
33432497 | FizzyDavid | D | Dec. 19, 2017, 5:12 p.m. | OK | GNU C++14 | TESTS | 92 | 78 | 12697600 | 2700 | |
44105457 | teafrogsf | D | Oct. 11, 2018, 8:58 a.m. | OK | GNU C++14 | TESTS | 92 | 93 | 8192000 | 2700 | |
44473988 | Fish_Li | D | Oct. 18, 2018, 7:52 a.m. | OK | GNU C++14 | TESTS | 92 | 93 | 9216000 | 2700 | |
34272644 | jslijin | D | Jan. 18, 2018, 10:06 a.m. | OK | GNU C++14 | TESTS | 92 | 109 | 7475200 | 2700 | |
34354327 | abc473848880 | D | Jan. 20, 2018, 1:32 p.m. | OK | GNU C++14 | TESTS | 92 | 109 | 8704000 | 2700 | |
33445101 | Gromah | D | Dec. 20, 2017, 4:51 a.m. | OK | GNU C++14 | TESTS | 92 | 109 | 9216000 | 2700 | |
33443578 | consecutivelimit | D | Dec. 20, 2017, 2:52 a.m. | OK | GNU C++14 | TESTS | 92 | 109 | 9216000 | 2700 | |
33462289 | ZaakDov | D | Dec. 20, 2017, 5:17 p.m. | OK | GNU C++14 | TESTS | 92 | 109 | 9318400 | 2700 | |
33443221 | WesternBoy | D | Dec. 20, 2017, 2:21 a.m. | OK | GNU C++14 | TESTS | 92 | 109 | 9523200 | 2700 | |
34100585 | LiChenKoh | D | Jan. 12, 2018, 7:10 a.m. | OK | GNU C++14 | TESTS | 92 | 109 | 9625600 | 2700 | |
52586867 | Trisolaris | D | April 11, 2019, 1:09 a.m. | OK | GNU C++17 | TESTS | 92 | 62 | 6656000 | 2700 | |
44443747 | orzcyand1317 | D | Oct. 17, 2018, 1:08 p.m. | OK | GNU C++17 | TESTS | 92 | 62 | 6656000 | 2700 | |
44064759 | zjp_shadow | D | Oct. 10, 2018, 8:32 a.m. | OK | GNU C++17 | TESTS | 92 | 124 | 5529600 | 2700 | |
56426044 | Atreus | D | July 2, 2019, 9:40 a.m. | OK | GNU C++17 | TESTS | 92 | 139 | 8396800 | 2700 | |
44414632 | NiceBaseballCoder | D | Oct. 16, 2018, 6:24 p.m. | OK | GNU C++17 | TESTS | 92 | 139 | 8806400 | 2700 | |
63625510 | Rose_max | D | Oct. 28, 2019, 3:22 a.m. | OK | GNU C++17 | TESTS | 92 | 140 | 6656000 | 2700 | |
50516074 | Shayan.P | D | Feb. 26, 2019, 6:30 a.m. | OK | GNU C++17 | TESTS | 92 | 140 | 9216000 | 2700 | |
69791496 | Its_Gumball | D | Jan. 29, 2020, 6:38 p.m. | OK | GNU C++17 | TESTS | 92 | 140 | 15769600 | 2700 | |
67486062 | Arpa | D | Dec. 23, 2019, 5:29 p.m. | OK | GNU C++17 | TESTS | 92 | 140 | 19046400 | 2700 | |
45097528 | Zhang_RQ | D | Oct. 30, 2018, 12:29 p.m. | OK | GNU C++17 | TESTS | 92 | 140 | 28262400 | 2700 | |
33434439 | uwi | D | Dec. 19, 2017, 5:27 p.m. | OK | Java 8 | TESTS | 92 | 202 | 25702400 | 2700 | |
33465068 | mmaxio | D | Dec. 20, 2017, 7:43 p.m. | OK | Java 8 | TESTS | 92 | 217 | 23449600 | 2700 | |
33436690 | Lewin | D | Dec. 19, 2017, 7:02 p.m. | OK | Java 8 | TESTS | 92 | 374 | 55500800 | 2700 | |
34176503 | iamavalon | D | Jan. 14, 2018, 1:47 p.m. | OK | Java 8 | TESTS | 92 | 483 | 59596800 | 2700 | |
33896301 | tri | D | Jan. 4, 2018, 5:04 a.m. | OK | Java 8 | TESTS | 92 | 514 | 63590400 | 2700 | |
58684812 | alanM | D | Aug. 12, 2019, 9:36 p.m. | OK | MS C++ 2017 | TESTS | 92 | 982 | 20582400 | 2700 |
Back to search problems