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 |
---|---|---|---|---|---|---|
979 | Codeforces Round 482 (Div. 2) | FINISHED | False | 7200 | 211217124 | May 14, 2018, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 6483 ) | C | Kuro and Walking Route | PROGRAMMING | dfs and similar trees | 1600 |
B"Kuro is living in a country called Uberland, consisting of n towns, numbered from 1 to n , and n - 1 bidirectional roads connecting these towns. It is possible to reach each town from any other. Each road connects two towns a and b . Kuro loves walking and he is planning to take a walking marathon, in which he will choose a pair of towns (u, v) ( u neq v ) and walk from u using the shortest path to v (note that (u, v) is considered to be different from (v, u) ). Oddly, there are 2 special towns in Uberland named Flowrisa (denoted with the index x ) and Beetopia (denoted with the index y ). Flowrisa is a town where there are many strong-scent flowers, and Beetopia is another town where many bees live. In particular, Kuro will avoid any pair of towns (u, v) if on the path from u to v , he reaches Beetopia after he reached Flowrisa, since the bees will be attracted with the flower smell on Kuro xe2 x80 x99s body and sting him. Kuro wants to know how many pair of city (u, v) he can take as his route. Since he xe2 x80 x99s not really bright, he asked you to help him with this problem. The first line contains three integers n , x and y ( 1 <= q n <= q 3 cdot 10^5 , 1 <= q x, y <= q n , x ne y ) - the number of towns, index of the town Flowrisa and index of the town Beetopia, respectively. n - 1 lines follow, each line contains two integers a and b ( 1 <= q a, b <= q n , a ne b ), describes a road connecting two towns a and b . It is guaranteed that from each town, we can reach every other town in the city using the given roads. That is, the given map of towns and roads is a tree. A single integer resembles the number of pair of towns (u, v) that Kuro can use as his walking route. On the first example, Kuro can choose these pairs: Kuro can't choose pair (1, 3) since his walking route would be 1 "... |
Codeforces Round #482 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
38239898 | ruban | C | May 14, 2018, 4:13 p.m. | OK | Delphi | TESTS | 71 | 296 | 263065600 | 1600 | |
38246001 | AHTOH._. | C | May 14, 2018, 6:16 p.m. | OK | FPC | TESTS | 71 | 202 | 19148800 | 1600 | |
38253295 | forlfs | C | May 15, 2018, 1:42 a.m. | OK | GNU C | TESTS | 71 | 155 | 24985600 | 1600 | |
39187636 | C1ariS | C | June 12, 2018, 10:08 a.m. | OK | GNU C | TESTS | 71 | 171 | 16998400 | 1600 | |
39187516 | C1ariS | C | June 12, 2018, 10:03 a.m. | OK | GNU C | TESTS | 71 | 171 | 16998400 | 1600 | |
38242593 | sitara_lives | C | May 14, 2018, 4:29 p.m. | OK | GNU C | TESTS | 71 | 217 | 29491200 | 1600 | |
40932208 | ReaLNero1 | C | July 30, 2018, 1:39 a.m. | OK | GNU C++ | TESTS | 71 | 77 | 11161600 | 1600 | |
38233287 | TianCaiJieJieZhenKeAi | C | May 14, 2018, 3:35 p.m. | OK | GNU C++ | TESTS | 71 | 77 | 14643200 | 1600 | |
38239139 | _CZH | C | May 14, 2018, 4:08 p.m. | OK | GNU C++ | TESTS | 71 | 78 | 21299200 | 1600 | |
38267525 | lujiaju | C | May 15, 2018, 12:36 p.m. | OK | GNU C++ | TESTS | 71 | 78 | 23552000 | 1600 | |
38449051 | Yi.Daozhiling | C | May 20, 2018, 6:13 a.m. | OK | GNU C++ | TESTS | 71 | 93 | 9523200 | 1600 | |
38645427 | vjudge5 | C | May 27, 2018, 1:49 a.m. | OK | GNU C++ | TESTS | 71 | 93 | 14233600 | 1600 | |
38525155 | Dedicatus545 | C | May 22, 2018, 6:14 a.m. | OK | GNU C++ | TESTS | 71 | 93 | 35225600 | 1600 | |
38258404 | Worldwide_D | C | May 15, 2018, 6:29 a.m. | OK | GNU C++ | TESTS | 71 | 108 | 18329600 | 1600 | |
38773098 | yekehe | C | May 30, 2018, 12:38 p.m. | OK | GNU C++ | TESTS | 71 | 109 | 16486400 | 1600 | |
38254720 | Michael_Li | C | May 15, 2018, 3:12 a.m. | OK | GNU C++ | TESTS | 71 | 109 | 18329600 | 1600 | |
38233437 | sansen | C | May 14, 2018, 3:36 p.m. | OK | GNU C11 | TESTS | 71 | 218 | 17920000 | 1600 | |
52138641 | _Limuloo | C | April 1, 2019, 5:20 a.m. | OK | GNU C++11 | TESTS | 71 | 62 | 22630400 | 1600 | |
38423214 | flora715 | C | May 19, 2018, 8:22 a.m. | OK | GNU C++11 | TESTS | 71 | 77 | 14233600 | 1600 | |
38253736 | Popola | C | May 15, 2018, 2:12 a.m. | OK | GNU C++11 | TESTS | 71 | 77 | 17715200 | 1600 | |
41757036 | luogu_bot1 | C | Aug. 18, 2018, 12:35 p.m. | OK | GNU C++11 | TESTS | 71 | 77 | 22630400 | 1600 | |
41757020 | fks20011206 | C | Aug. 18, 2018, 12:35 p.m. | OK | GNU C++11 | TESTS | 71 | 77 | 22630400 | 1600 | |
38237234 | karin0 | C | May 14, 2018, 3:57 p.m. | OK | GNU C++11 | TESTS | 71 | 77 | 23347200 | 1600 | |
62118073 | Frame233 | C | Oct. 8, 2019, 1:53 p.m. | OK | GNU C++11 | TESTS | 71 | 78 | 13619200 | 1600 | |
38645422 | Kogoro | C | May 27, 2018, 1:48 a.m. | OK | GNU C++11 | TESTS | 71 | 78 | 14233600 | 1600 | |
38232603 | zhenGG | C | May 14, 2018, 3:32 p.m. | OK | GNU C++11 | TESTS | 71 | 78 | 17408000 | 1600 | |
38252953 | Kananix | C | May 15, 2018, 1:16 a.m. | OK | GNU C++11 | TESTS | 71 | 93 | 38809600 | 1600 | |
48536738 | coderforlife | C | Jan. 18, 2019, 2:38 p.m. | OK | GNU C++14 | TESTS | 71 | 140 | 20070400 | 1600 | |
38232766 | lionadis | C | May 14, 2018, 3:32 p.m. | OK | GNU C++14 | TESTS | 71 | 140 | 23142400 | 1600 | |
38265727 | yangshuang | C | May 15, 2018, 11:28 a.m. | OK | GNU C++14 | TESTS | 71 | 171 | 16896000 | 1600 | |
38234516 | Linkus | C | May 14, 2018, 3:41 p.m. | OK | GNU C++14 | TESTS | 71 | 171 | 21504000 | 1600 | |
39786456 | Deerly | C | June 30, 2018, 2:59 a.m. | OK | GNU C++14 | TESTS | 71 | 186 | 11059200 | 1600 | |
38343210 | mingzzc | C | May 17, 2018, 9:11 a.m. | OK | GNU C++14 | TESTS | 71 | 186 | 18636800 | 1600 | |
38247478 | LiHior_ | C | May 14, 2018, 6:54 p.m. | OK | GNU C++14 | TESTS | 71 | 186 | 31334400 | 1600 | |
66653659 | _HossamYehia_ | C | Dec. 11, 2019, 8:43 p.m. | OK | GNU C++14 | TESTS | 71 | 187 | 13312000 | 1600 | |
38314982 | zhouhebin | C | May 16, 2018, 9:07 a.m. | OK | GNU C++14 | TESTS | 71 | 187 | 15462400 | 1600 | |
38602967 | _FSMM | C | May 25, 2018, 7:34 a.m. | OK | GNU C++14 | TESTS | 71 | 187 | 20172800 | 1600 | |
40590938 | vjudge1 | C | July 20, 2018, 11:07 p.m. | OK | GNU C++17 | TESTS | 71 | 92 | 21913600 | 1600 | |
59228414 | interestingLSY | C | Aug. 21, 2019, 2:33 p.m. | OK | GNU C++17 | TESTS | 71 | 124 | 24883200 | 1600 | |
38586871 | fengshu | C | May 24, 2018, 12:48 p.m. | OK | GNU C++17 | TESTS | 71 | 140 | 58060800 | 1600 | |
60335774 | Karasu | C | Sept. 10, 2019, 8:28 a.m. | OK | GNU C++17 | TESTS | 71 | 186 | 11059200 | 1600 | |
48358309 | lyh1999 | C | Jan. 13, 2019, 5:34 p.m. | OK | GNU C++17 | TESTS | 71 | 202 | 16281600 | 1600 | |
38789183 | bunny130 | C | May 31, 2018, 3:44 a.m. | OK | GNU C++17 | TESTS | 71 | 202 | 18636800 | 1600 | |
38776370 | bunny130 | C | May 30, 2018, 2:23 p.m. | OK | GNU C++17 | TESTS | 71 | 202 | 18636800 | 1600 | |
38792504 | bunny130 | C | May 31, 2018, 6:50 a.m. | OK | GNU C++17 | TESTS | 71 | 202 | 20582400 | 1600 | |
46778083 | dtl8 | C | Dec. 8, 2018, 10:14 p.m. | OK | GNU C++17 | TESTS | 71 | 202 | 23040000 | 1600 | |
38253437 | luonaerduo | C | May 15, 2018, 1:51 a.m. | OK | GNU C++17 | TESTS | 71 | 202 | 25088000 | 1600 | |
69281720 | synapse | C | Jan. 22, 2020, 6:16 a.m. | OK | Go | TESTS | 71 | 452 | 25088000 | 1600 | |
38306139 | guangfnian | C | May 16, 2018, 2:11 a.m. | OK | Go | TESTS | 71 | 561 | 53452800 | 1600 | |
69217424 | zhanyi_xiaolu | C | Jan. 21, 2020, 2:09 a.m. | OK | Java 11 | TESTS | 71 | 779 | 61747200 | 1600 | |
38262876 | In_The_Name_Of_Love | C | May 15, 2018, 9:33 a.m. | OK | Java 8 | TESTS | 71 | 248 | 32972800 | 1600 | |
40410081 | prashanth_rebala | C | July 16, 2018, 12:01 p.m. | OK | Java 8 | TESTS | 71 | 264 | 9932800 | 1600 | |
43115703 | chandan5284 | C | Sept. 20, 2018, 1:40 p.m. | OK | Java 8 | TESTS | 71 | 264 | 25190400 | 1600 | |
40410172 | prashanth_rebala | C | July 16, 2018, 12:04 p.m. | OK | Java 8 | TESTS | 71 | 280 | 10035200 | 1600 | |
46858226 | wadissimo | C | Dec. 10, 2018, 4:10 p.m. | OK | Java 8 | TESTS | 71 | 280 | 22016000 | 1600 | |
46713939 | kusomushi | C | Dec. 7, 2018, 9:59 a.m. | OK | Java 8 | TESTS | 71 | 327 | 16384000 | 1600 | |
38578167 | donli | C | May 24, 2018, 6:23 a.m. | OK | Java 8 | TESTS | 71 | 342 | 17203200 | 1600 | |
40913422 | prabhat236218 | C | July 29, 2018, 10:14 a.m. | OK | Java 8 | TESTS | 71 | 467 | 111820800 | 1600 | |
38339559 | bluesky111 | C | May 17, 2018, 6:13 a.m. | OK | Java 8 | TESTS | 71 | 498 | 38809600 | 1600 | |
38233277 | unicorn20141 | C | May 14, 2018, 3:35 p.m. | OK | Java 8 | TESTS | 71 | 498 | 66048000 | 1600 | |
39726095 | romanovma | C | June 27, 2018, 7:24 p.m. | OK | JavaScript | TESTS | 71 | 1107 | 94617600 | 1600 | |
38627746 | 0442A403 | C | May 26, 2018, 7:57 a.m. | OK | Kotlin | TESTS | 71 | 779 | 132096000 | 1600 | |
59651043 | og.kostya | C | Aug. 29, 2019, 8:13 a.m. | OK | Mono C# | TESTS | 71 | 265 | 55705600 | 1600 | |
38246090 | fr0st | C | May 14, 2018, 6:18 p.m. | OK | Mono C# | TESTS | 71 | 608 | 72601600 | 1600 | |
38392153 | QuantumKnight | C | May 18, 2018, 7:01 a.m. | OK | Mono C# | TESTS | 71 | 686 | 31539200 | 1600 | |
38400743 | Anastasiya_Andreevna | C | May 18, 2018, 12:14 p.m. | OK | Mono C# | TESTS | 71 | 810 | 32870400 | 1600 | |
38232876 | waItz7I9 | C | May 14, 2018, 3:33 p.m. | OK | MS C++ | TESTS | 71 | 155 | 17100800 | 1600 | |
39410292 | j4357j | C | June 19, 2018, 12:18 p.m. | OK | MS C++ | TESTS | 71 | 155 | 18022400 | 1600 | |
39410230 | j4357j | C | June 19, 2018, 12:16 p.m. | OK | MS C++ | TESTS | 71 | 171 | 18022400 | 1600 | |
49937104 | vjudge5 | C | Feb. 15, 2019, 7:48 a.m. | OK | MS C++ | TESTS | 71 | 218 | 15667200 | 1600 | |
40603569 | Aboodi99 | C | July 21, 2018, 9:58 a.m. | OK | MS C++ | TESTS | 71 | 233 | 16076800 | 1600 | |
38597946 | olpetOdessaONU | C | May 24, 2018, 11:29 p.m. | OK | MS C++ | TESTS | 71 | 233 | 17510400 | 1600 | |
40362889 | vjudge4 | C | July 15, 2018, 3:08 a.m. | OK | MS C++ | TESTS | 71 | 234 | 14438400 | 1600 | |
40362888 | vjudge5 | C | July 15, 2018, 3:08 a.m. | OK | MS C++ | TESTS | 71 | 234 | 14438400 | 1600 | |
51757382 | vjudge3 | C | March 23, 2019, 12:10 p.m. | OK | MS C++ | TESTS | 71 | 234 | 16076800 | 1600 | |
38717215 | vjudge1 | C | May 29, 2018, 11:38 a.m. | OK | MS C++ | TESTS | 71 | 249 | 13824000 | 1600 | |
63684726 | a01275036 | C | Oct. 28, 2019, 9:49 p.m. | OK | MS C++ 2017 | TESTS | 71 | 280 | 15052800 | 1600 | |
39541618 | mayakin | C | June 23, 2018, 12:40 p.m. | OK | PHP | TESTS | 71 | 1684 | 247500800 | 1600 | |
38250623 | wolffd | C | May 14, 2018, 9:30 p.m. | OK | PyPy 2 | TESTS | 71 | 1092 | 32768000 | 1600 | |
38309784 | WyattWismer | C | May 16, 2018, 5:44 a.m. | OK | PyPy 2 | TESTS | 71 | 1544 | 91136000 | 1600 | |
49483058 | bhelkey | C | Feb. 5, 2019, 1:50 a.m. | OK | Python 2 | TESTS | 71 | 1419 | 47001600 | 1600 | |
38240599 | mihir_94 | C | May 14, 2018, 4:17 p.m. | OK | Python 2 | TESTS | 71 | 1481 | 42598400 | 1600 | |
39041079 | cocofsu | C | June 8, 2018, 9:15 a.m. | OK | Python 2 | TESTS | 71 | 1778 | 41164800 | 1600 | |
38332556 | fromexptolog | C | May 16, 2018, 8:39 p.m. | OK | Python 2 | TESTS | 71 | 1887 | 65024000 | 1600 | |
49886458 | HaaaToka | C | Feb. 13, 2019, 9:51 p.m. | OK | Python 3 | TESTS | 71 | 1388 | 37068800 | 1600 | |
49678868 | FadeoN | C | Feb. 9, 2019, 10:11 p.m. | OK | Python 3 | TESTS | 71 | 1606 | 42803200 | 1600 | |
49867207 | skyberg | C | Feb. 13, 2019, 12:28 p.m. | OK | Python 3 | TESTS | 71 | 1902 | 72908800 | 1600 | |
38237067 | Leonardone | C | May 14, 2018, 3:56 p.m. | OK | Rust | TESTS | 71 | 187 | 24473600 | 1600 |
Back to search problems