2020-2021 ICPC, NERC, Southern and Volga Russian Regional Contest (Online Mirror, ICPC Rules)

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
1468 2020-2021 ICPC, NERC, Southern and Volga Russian Regional Contest (Online Mirror, ICPC Rules) FINISHED False 18000 128456711 Dec. 25, 2020, 11:35 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4491 ) J Road Reform PROGRAMMING ds graphs greedy

B'There are n cities and m bidirectional roads in Berland. The i -th road connects the cities x_i and y_i , and has the speed limit s_i . The road network allows everyone to get from any city to any other city. The Berland Transport Ministry is planning a road reform. First of all, maintaining all m roads is too costly, so m - (n - 1) roads will be demolished in such a way that the remaining (n - 1) roads still allow to get to any city from any other city. Formally, the remaining roads should represent an undirected tree. Secondly, the speed limits on the remaining roads might be changed. The changes will be done sequentially, each change is either increasing the speed limit on some road by 1 , or decreasing it by 1 . Since changing the speed limit requires a lot of work, the Ministry wants to minimize the number of changes. The goal of the Ministry is to have a road network of (n - 1) roads with the maximum speed limit over all roads equal to exactly k . They assigned you the task of calculating the minimum number of speed limit changes they have to perform so the road network meets their requirements. For example, suppose the initial map of Berland looks like that, and k = 7 : Then one of the optimal courses of action is to demolish the roads 1 xe2 x80 x93 4 and 3 xe2 x80 x93 4 , and then decrease the speed limit on the road 2 xe2 x80 x93 3 by 1 , so the resulting road network looks like that: The first line contains one integer t ( 1 <= t <= 1000 ) -- the number of test cases. The first line of each test case contains three integers n , m and k ( 2 <= n <= 2 cdot 10^5 ; n - 1 <= m <= min(2 cdot 10^5, frac{n(n-1)}{2}) ; 1 <= k <= 10^9 ) -- the number of cities, the number of roads and the required maximum speed limit, respectively. Then m lines follow. The i -th line contains three integers x_i , '...

Tutorials

Tutorial (PDF)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
102311203 qwqdeco Juanzhang yijan J Dec. 25, 2020, 12:43 p.m. OK GNU C++11 TESTS 99 62 3379200
102322394 C20192413 Lucky_Glass J Dec. 25, 2020, 2:13 p.m. OK GNU C++11 TESTS 99 62 6451200
102309316 cbio AzusaCat hs-black J Dec. 25, 2020, 12:29 p.m. OK GNU C++11 TESTS 99 77 48947200
102312421 _blackjack_ yyqchemic hzy9819 J Dec. 25, 2020, 12:52 p.m. OK GNU C++11 TESTS 99 78 3174400
102312991 i_m_a J Dec. 25, 2020, 12:57 p.m. OK GNU C++11 TESTS 99 93 3072000
102312988 xzx34 zlt1117 Yukikaze_ J Dec. 25, 2020, 12:57 p.m. OK GNU C++11 TESTS 99 93 6451200
102317359 KGX2020 jzqjzq get_r_ight J Dec. 25, 2020, 1:32 p.m. OK GNU C++11 TESTS 99 93 6451200
102307358 RealMikeDuke jzp chr_ J Dec. 25, 2020, 12:14 p.m. OK GNU C++11 TESTS 99 93 11264000
102309238 BigBag J Dec. 25, 2020, 12:28 p.m. OK GNU C++11 TESTS 99 109 3174400
102310911 FisherKing tianxiawoyou tianbu J Dec. 25, 2020, 12:41 p.m. OK GNU C++11 TESTS 99 109 5632000
102366017 zwu2019015083 J Dec. 26, 2020, 5:09 a.m. OK GNU C++14 TESTS 99 140 3174400
102311640 seastar105 semteo04 shiftpsh J Dec. 25, 2020, 12:46 p.m. OK GNU C++14 TESTS 99 140 11980800
102330388 Drice J Dec. 25, 2020, 3:19 p.m. OK GNU C++14 TESTS 99 155 3174400
102315045 AkaiLemon J Dec. 25, 2020, 1:13 p.m. OK GNU C++14 TESTS 99 155 4812800
102318461 Nero J Dec. 25, 2020, 1:41 p.m. OK GNU C++14 TESTS 99 155 5529600
102360242 AC_wisher J Dec. 26, 2020, 1:51 a.m. OK GNU C++14 TESTS 99 156 3174400
102319615 lvlouhss J Dec. 25, 2020, 1:51 p.m. OK GNU C++14 TESTS 99 156 3174400
102323260 SiDdharth_Joy Imtiaz_Riton ash_98 J Dec. 25, 2020, 2:20 p.m. OK GNU C++14 TESTS 99 156 6553600
102319560 iceys parallal hyta4982 J Dec. 25, 2020, 1:50 p.m. OK GNU C++14 TESTS 99 156 7987200
102310570 lavenderwithbluish AquaMoon J Dec. 25, 2020, 12:38 p.m. OK GNU C++14 TESTS 99 156 7987200
102310039 ppc_qjd Mitsukasa_Ayase dysyn1314 J Dec. 25, 2020, 12:34 p.m. OK GNU C++17 TESTS 99 78 8192000
102322531 Hyperbolic J Dec. 25, 2020, 2:14 p.m. OK GNU C++17 TESTS 99 155 3174400
102313394 Halo_Scar Lgq_3de5 Dyswan J Dec. 25, 2020, 1 p.m. OK GNU C++17 TESTS 99 155 3993600
102311914 iaNTU J Dec. 25, 2020, 12:48 p.m. OK GNU C++17 TESTS 99 156 3174400
102332615 PhanTrinh chemthan J Dec. 25, 2020, 3:38 p.m. OK GNU C++17 TESTS 99 156 3993600
102309709 top34051 RobeZH J Dec. 25, 2020, 12:32 p.m. OK GNU C++17 TESTS 99 156 5529600
102333814 iShibly sakib_muhit J Dec. 25, 2020, 3:49 p.m. OK GNU C++17 TESTS 99 156 5734400
102303747 Gankutsuou WhiteChocolate ali.zine J Dec. 25, 2020, 11:49 a.m. OK GNU C++17 TESTS 99 156 5939200
102311079 jesuswr J Dec. 25, 2020, 12:42 p.m. OK GNU C++17 TESTS 99 156 9830400
102332395 violen liuyang123579 PolarBearrr J Dec. 25, 2020, 3:36 p.m. OK GNU C++17 TESTS 99 156 17612800
102325592 ainta J Dec. 25, 2020, 2:38 p.m. OK GNU C++17 (64) TESTS 99 78 28467200
102313845 natsugiri J Dec. 25, 2020, 1:04 p.m. OK GNU C++17 (64) TESTS 99 124 3993600
102366041 Crz-Willis J Dec. 26, 2020, 5:10 a.m. OK GNU C++17 (64) TESTS 99 140 3174400
102359682 Danielzyc J Dec. 26, 2020, 1:26 a.m. OK GNU C++17 (64) TESTS 99 140 3174400
102336532 alif_cse_ju J Dec. 25, 2020, 4:19 p.m. OK GNU C++17 (64) TESTS 99 140 3174400
102336058 alif_cse_ju J Dec. 25, 2020, 4:14 p.m. OK GNU C++17 (64) TESTS 99 140 3174400
102318042 Maripium J Dec. 25, 2020, 1:37 p.m. OK GNU C++17 (64) TESTS 99 140 3174400
102319949 universe- J Dec. 25, 2020, 1:53 p.m. OK GNU C++17 (64) TESTS 99 140 3276800
102309862 pachico riantkb mtsd J Dec. 25, 2020, 12:33 p.m. OK GNU C++17 (64) TESTS 99 140 3276800
102308347 tourist J Dec. 25, 2020, 12:22 p.m. OK GNU C++17 (64) TESTS 99 140 3276800
102311939 insert_cool_handle J Dec. 25, 2020, 12:49 p.m. OK Java 11 TESTS 99 343 5529600
102323230 chris_11 J Dec. 25, 2020, 2:20 p.m. OK Java 11 TESTS 99 592 28876800
102326992 sf14t J Dec. 25, 2020, 2:49 p.m. OK Java 11 TESTS 99 779 73216000
102319839 codingalways souradeep.99 its_aks_ulure J Dec. 25, 2020, 1:52 p.m. OK Java 11 TESTS 99 1387 145408000
102315566 vkjha1010 shubham0898 Naman_123 J Dec. 25, 2020, 1:17 p.m. OK Java 8 TESTS 99 249 5427200
102356415 hruif J Dec. 25, 2020, 10:49 p.m. OK MS C++ 2017 TESTS 99 608 10649600
102351394 Gravekper J Dec. 25, 2020, 8:18 p.m. OK MS C++ 2017 TESTS 99 701 14643200
102332237 DaddyCool__69 Satwik_Tiwari J Dec. 25, 2020, 3:34 p.m. OK PyPy 3 TESTS 99 1060 40550400
102320807 SPD_9X2 J Dec. 25, 2020, 2 p.m. OK PyPy 3 TESTS 99 1419 28160000
102354186 silvertint J Dec. 25, 2020, 9:24 p.m. OK PyPy 3 TESTS 99 1794 43827200
102317666 karthikeya619 alphatron99 Kishen19 J Dec. 25, 2020, 1:34 p.m. OK PyPy 3 TESTS 99 1934 43520000
102351966 sh1194 J Dec. 25, 2020, 8:28 p.m. OK Python 3 TESTS 99 1247 23449600
102352113 sh1194 J Dec. 25, 2020, 8:32 p.m. OK Python 3 TESTS 99 1341 23449600
102352052 sh1194 J Dec. 25, 2020, 8:30 p.m. OK Python 3 TESTS 99 1357 24268800
102352313 sh1194 J Dec. 25, 2020, 8:36 p.m. OK Python 3 TESTS 99 1372 23859200
102360467 SYX J Dec. 26, 2020, 1:59 a.m. OK Python 3 TESTS 99 1934 46694400
102310284 sansen J Dec. 25, 2020, 12:36 p.m. OK Rust TESTS 99 109 15769600
102293842 J Dec. 25, 2020, 9:38 a.m. OK Unknown TESTS 0 0 0
102293753 J Dec. 25, 2020, 9:38 a.m. OK Unknown TESTS 0 0 0
102293644 J Dec. 25, 2020, 9:38 a.m. OK Unknown TESTS 0 0 0
102293583 J Dec. 25, 2020, 9:38 a.m. OK Unknown TESTS 0 0 0
102293491 J Dec. 25, 2020, 9:38 a.m. OK Unknown TESTS 0 0 0

remove filters

Back to search problems