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 |
---|---|---|---|---|---|---|
1453 | Codeforces Round 688 (Div. 2) | FINISHED | False | 8100 | 130179263 | Dec. 4, 2020, 1:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 2076 ) | E | Dog Snacks | PROGRAMMING | binary search dfs and similar dp greedy trees |
B"Gildong is playing with his dog, Badugi. They're at a park that has n intersections and n-1 bidirectional roads, each 1 meter in length and connecting two intersections with each other. The intersections are numbered from 1 to n , and for every a and b ( 1 <= a, b <= n ), it is possible to get to the b -th intersection from the a -th intersection using some set of roads. Gildong has put one snack at every intersection of the park. Now Gildong will give Badugi a mission to eat all of the snacks. Badugi starts at the 1 -st intersection, and he will move by the following rules: Unfortunately, Gildong doesn't know the value of k . So, he wants you to find the minimum value of k that makes it possible for Badugi to complete his mission, if Badugi moves optimally. Each test contains one or more test cases. The first line contains the number of test cases t ( 1 <= t <= 10^4 ). The first line of each test case contains one integer n ( 2 <= n <= 2 cdot 10^5 ) -- the number of intersections of the park. The next n-1 lines contain two integers u and v ( 1 <= u,v <= n , u ne v ) each, which means there is a road between intersection u and v . All roads are bidirectional and distinct. It is guaranteed that: For each test case, print one integer -- the minimum possible value of k such that Badugi can complete the mission. In the first case, Badugi can complete his mission with k=2 by moving as follows: In the second case, the only possible sequence of moves he can make is 1 xe2 x80 x93 2 xe2 x80 x93 3 xe2 x80 x93 4 xe2 x80 x93 1 . Since the distance between the 4 -th intersection and the 1 -st intersection is 3 , k needs to be at least 3 for Badugi to complete his mission. In the third case, Badugi can make his moves as follows: 1 xe2 x80 x93 5 xe2 x80 x93 6 xe2 x80 x93 7 xe2 x80 x93 8 xe2 x80 x93 2$$"... |
Codeforces Round #688 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
100393311 | Gassa | E | Dec. 4, 2020, 5:04 p.m. | OK | D | TESTS | 35 | 265 | 28876800 | ||
100383821 | rainboy | E | Dec. 4, 2020, 3:11 p.m. | OK | GNU C11 | TESTS | 35 | 139 | 18534400 | ||
100375241 | hangyesheng | E | Dec. 4, 2020, 2:30 p.m. | OK | GNU C++11 | TESTS | 35 | 46 | 13619200 | ||
100390025 | acccccccc | E | Dec. 4, 2020, 4:18 p.m. | OK | GNU C++11 | TESTS | 35 | 61 | 19968000 | ||
100415916 | Contna | E | Dec. 5, 2020, 4:50 a.m. | OK | GNU C++11 | TESTS | 35 | 61 | 22425600 | ||
100388075 | acccccccc | E | Dec. 4, 2020, 3:54 p.m. | OK | GNU C++11 | TESTS | 35 | 62 | 19968000 | ||
100409577 | liangziqi | E | Dec. 5, 2020, 1:23 a.m. | OK | GNU C++11 | TESTS | 35 | 77 | 18432000 | ||
100409234 | comld | E | Dec. 5, 2020, 1:07 a.m. | OK | GNU C++11 | TESTS | 35 | 77 | 19660800 | ||
100409396 | I_Love_Sakurajima_Mai | E | Dec. 5, 2020, 1:15 a.m. | OK | GNU C++11 | TESTS | 35 | 78 | 24064000 | ||
100380940 | 275307894a | E | Dec. 4, 2020, 2:57 p.m. | OK | GNU C++11 | TESTS | 35 | 93 | 9216000 | ||
100382225 | fishcathu. | E | Dec. 4, 2020, 3:03 p.m. | OK | GNU C++11 | TESTS | 35 | 93 | 16793600 | ||
100409348 | I_Love_Sakurajima_Mai | E | Dec. 5, 2020, 1:13 a.m. | OK | GNU C++11 | TESTS | 35 | 93 | 24064000 | ||
100408424 | cksberry | E | Dec. 5, 2020, 12:17 a.m. | OK | GNU C++14 | TESTS | 35 | 140 | 38195200 | ||
100389302 | ilovemymind | E | Dec. 4, 2020, 4:09 p.m. | OK | GNU C++14 | TESTS | 35 | 155 | 18636800 | ||
100371509 | linxi99 | E | Dec. 4, 2020, 2:11 p.m. | OK | GNU C++14 | TESTS | 35 | 155 | 21606400 | ||
100409151 | ShirohaIsMyWife | E | Dec. 5, 2020, 1:03 a.m. | OK | GNU C++14 | TESTS | 35 | 156 | 24985600 | ||
100375877 | bestpizzaz | E | Dec. 4, 2020, 2:33 p.m. | OK | GNU C++14 | TESTS | 35 | 171 | 18432000 | ||
100417060 | purinliang | E | Dec. 5, 2020, 5:17 a.m. | OK | GNU C++14 | TESTS | 35 | 171 | 20172800 | ||
100416644 | rishit3234 | E | Dec. 5, 2020, 5:08 a.m. | OK | GNU C++14 | TESTS | 35 | 171 | 31436800 | ||
100411727 | Persephone | E | Dec. 5, 2020, 2:48 a.m. | OK | GNU C++14 | TESTS | 35 | 171 | 43417600 | ||
100398935 | czhang2718 | E | Dec. 4, 2020, 6:41 p.m. | OK | GNU C++14 | TESTS | 35 | 186 | 19353600 | ||
100404606 | maverick16 | E | Dec. 4, 2020, 8:54 p.m. | OK | GNU C++14 | TESTS | 35 | 186 | 21811200 | ||
100373058 | LayCurse | E | Dec. 4, 2020, 2:19 p.m. | OK | GNU C++17 | TESTS | 35 | 93 | 100659200 | ||
100417426 | Elo | E | Dec. 5, 2020, 5:23 a.m. | OK | GNU C++17 | TESTS | 35 | 140 | 20172800 | ||
100391357 | Elo | E | Dec. 4, 2020, 4:35 p.m. | OK | GNU C++17 | TESTS | 35 | 140 | 23347200 | ||
100387933 | int_mian | E | Dec. 4, 2020, 3:53 p.m. | OK | GNU C++17 | TESTS | 35 | 155 | 13619200 | ||
100389454 | JHSN | E | Dec. 4, 2020, 4:11 p.m. | OK | GNU C++17 | TESTS | 35 | 155 | 19251200 | ||
100372645 | Edwardnewgate | E | Dec. 4, 2020, 2:17 p.m. | OK | GNU C++17 | TESTS | 35 | 155 | 20172800 | ||
100417439 | _Backl1ght | E | Dec. 5, 2020, 5:24 a.m. | OK | GNU C++17 | TESTS | 35 | 155 | 26828800 | ||
100394755 | syawl-1017 | E | Dec. 4, 2020, 5:26 p.m. | OK | GNU C++17 | TESTS | 35 | 155 | 32256000 | ||
100390498 | ZzQf | E | Dec. 4, 2020, 4:24 p.m. | OK | GNU C++17 | TESTS | 35 | 155 | 35430400 | ||
100380191 | fnoi11awyfeng | E | Dec. 4, 2020, 2:54 p.m. | OK | GNU C++17 | TESTS | 35 | 155 | 44851200 | ||
100388159 | Anus1373 | E | Dec. 4, 2020, 3:55 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 155 | 31232000 | ||
100390235 | ssyze | E | Dec. 4, 2020, 4:20 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 156 | 31232000 | ||
100370113 | natsugiri | E | Dec. 4, 2020, 2:04 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 171 | 13926400 | ||
100389118 | june_waves | E | Dec. 4, 2020, 4:08 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 171 | 27238400 | ||
100395032 | Farhan132 | E | Dec. 4, 2020, 5:31 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 171 | 30822400 | ||
100377544 | Bakry_ | E | Dec. 4, 2020, 2:41 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 171 | 35225600 | ||
100419293 | Thallium_is_Vegetable | E | Dec. 5, 2020, 5:50 a.m. | OK | GNU C++17 (64) | TESTS | 35 | 171 | 40038400 | ||
100400109 | FireBird23 | E | Dec. 4, 2020, 7:05 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 171 | 40038400 | ||
100396464 | PauloMiranda98 | E | Dec. 4, 2020, 5:56 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 171 | 40038400 | ||
100389202 | 12tqian | E | Dec. 4, 2020, 4:08 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 171 | 40038400 | ||
100380214 | sresth_21 | E | Dec. 4, 2020, 2:54 p.m. | OK | Java 11 | TESTS | 35 | 576 | 104755200 | ||
100406717 | skittles1412 | E | Dec. 4, 2020, 10:30 p.m. | OK | Java 11 | TESTS | 35 | 607 | 79667200 | ||
100419534 | blackBird | E | Dec. 5, 2020, 5:53 a.m. | OK | Java 11 | TESTS | 35 | 608 | 60518400 | ||
100406405 | mphillotry | E | Dec. 4, 2020, 10:15 p.m. | OK | Java 11 | TESTS | 35 | 624 | 61337600 | ||
100384716 | Apfeloxid | E | Dec. 4, 2020, 3:14 p.m. | OK | Java 11 | TESTS | 35 | 624 | 74956800 | ||
100419385 | blackBird | E | Dec. 5, 2020, 5:51 a.m. | OK | Java 11 | TESTS | 35 | 638 | 60518400 | ||
100386307 | tien-nam | E | Dec. 4, 2020, 3:19 p.m. | OK | Java 11 | TESTS | 35 | 1466 | 63590400 | ||
100385598 | procrastinate7 | E | Dec. 4, 2020, 3:17 p.m. | OK | Java 8 | TESTS | 35 | 529 | 61440000 | ||
100373601 | polyakoff | E | Dec. 4, 2020, 2:22 p.m. | OK | Java 8 | TESTS | 35 | 576 | 58982400 | ||
100408069 | martins | E | Dec. 4, 2020, 11:54 p.m. | OK | Java 8 | TESTS | 35 | 608 | 61849600 | ||
100381507 | robinz62 | E | Dec. 4, 2020, 3 p.m. | OK | Java 8 | TESTS | 35 | 748 | 118886400 | ||
100392748 | djm03178 | E | Dec. 4, 2020, 4:56 p.m. | OK | Java 8 | TESTS | 35 | 857 | 143155200 | ||
100380881 | zhongzh13 | E | Dec. 4, 2020, 2:57 p.m. | OK | Java 8 | TESTS | 35 | 1216 | 102912000 | ||
100401720 | YahiaSherif | E | Dec. 4, 2020, 7:37 p.m. | OK | Java 8 | TESTS | 35 | 2869 | 174899200 | ||
100401613 | YahiaSherif | E | Dec. 4, 2020, 7:35 p.m. | OK | Java 8 | TESTS | 35 | 2978 | 177049600 | ||
100388960 | YahiaSherif | E | Dec. 4, 2020, 4:06 p.m. | OK | Java 8 | TESTS | 35 | 2979 | 182067200 | ||
100376534 | Tlatoani | E | Dec. 4, 2020, 2:36 p.m. | OK | Kotlin | TESTS | 35 | 1013 | 133939200 | ||
100380436 | LeoPro | E | Dec. 4, 2020, 2:55 p.m. | OK | Kotlin | TESTS | 35 | 1170 | 139980800 | ||
100375373 | pichulia | E | Dec. 4, 2020, 2:30 p.m. | OK | MS C++ 2017 | TESTS | 35 | 264 | 19968000 | ||
100385752 | tang0404 | E | Dec. 4, 2020, 3:18 p.m. | OK | MS C++ 2017 | TESTS | 35 | 264 | 20172800 | ||
100389500 | PrideBlack | E | Dec. 4, 2020, 4:12 p.m. | OK | MS C++ 2017 | TESTS | 35 | 607 | 13619200 | ||
100379077 | mban259 | E | Dec. 4, 2020, 2:49 p.m. | OK | .NET Core C# | TESTS | 35 | 514 | 77107200 | ||
100373940 | azukun | E | Dec. 4, 2020, 2:24 p.m. | OK | .NET Core C# | TESTS | 35 | 1294 | 47923200 | ||
100385834 | TheVan | E | Dec. 4, 2020, 3:18 p.m. | OK | PyPy 3 | TESTS | 35 | 623 | 38604800 | ||
100381827 | lowking | E | Dec. 4, 2020, 3:02 p.m. | OK | PyPy 3 | TESTS | 35 | 717 | 26214400 | ||
100398283 | sh1194 | E | Dec. 4, 2020, 6:30 p.m. | OK | Python 3 | TESTS | 35 | 1435 | 40550400 | ||
100398143 | sh1194 | E | Dec. 4, 2020, 6:27 p.m. | OK | Python 3 | TESTS | 35 | 1435 | 40550400 | ||
100397987 | sh1194 | E | Dec. 4, 2020, 6:24 p.m. | OK | Python 3 | TESTS | 35 | 1450 | 41062400 | ||
100397895 | sh1194 | E | Dec. 4, 2020, 6:22 p.m. | OK | Python 3 | TESTS | 35 | 1606 | 43827200 | ||
100398053 | sh1194 | E | Dec. 4, 2020, 6:25 p.m. | OK | Python 3 | TESTS | 35 | 1638 | 41369600 | ||
100390740 | sansen | E | Dec. 4, 2020, 4:27 p.m. | OK | Rust | TESTS | 35 | 109 | 13619200 | ||
100371655 | sansen | E | Dec. 4, 2020, 2:12 p.m. | OK | Rust | TESTS | 35 | 202 | 13824000 | ||
100405283 | optozorax | E | Dec. 4, 2020, 9:19 p.m. | OK | Rust | TESTS | 35 | 249 | 57651200 | ||
100372868 | ngtkana | E | Dec. 4, 2020, 2:18 p.m. | OK | Rust | TESTS | 35 | 701 | 28569600 |
Back to search problems