Codeforces Round 1083 (Div. 2)

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
2205 Codeforces Round 1083 (Div. 2) FINISHED False 9000 4289123 Feb. 26, 2026, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 615 ) F Simons and Reconstructing His Roads PROGRAMMING constructive algorithms data structures dsu graphs meet-in-the-middle

There are (n \times m) crossroads in the city, named crossroad ((1, 1), (1, 2),\ldots, (n, m)). The first number represents the row, and the second represents the column. There exists and only exists streets between ((i,j)) and ((i+1,j)) or between ((i,j)) and ((i,j+1)). The street between ((i, j)) and ((i + 1, j)) has a weight of (w_{i,j}), and the street between ((i, j)) and ((i, j + 1)) has a weight of (v_{i,j}). Simons wants some streets reconstructed. Due to some accidents, some of the streets cannot be reconstructed, while others are optional to be reconstructed. For each crossroad, if the number of reconstructed streets adjacent to it is even , Simons calls the crossroad elegant . If all the crossroads are elegant , Simons calls the reconstruction nice . The beauty of a reconstruction is calculated as follows: At first, the beauty is (0). For each row (i) from (1) to (n - 1), let the columns of the streets reconstructed be (c_1 \lt c_2 \lt c_3 \lt \cdots), add (w_{i, c_1} - w_{i, c_2} + w_{i, c_3} - w_{i, c_4}+\cdots) to the beauty . Similarly, for each column (j) from (1) to (m - 1), let the rows of the streets reconstructed be (r_1 \lt r_2 \lt r_3 \lt \cdots), add (v_{r_1, j} - v_{r_2, j} + v_{r_3, j} - v_{r_4, j}+\cdots) to the beauty . In other words, if a street is an odd-indexed one reconstructed in its row or column, add its weight to the beauty ; else subtract it from the beauty . For example, consider the streets and crossroads below without any streets that cannot be reconstructed: We can have a nice reconstruction as follows: The beauty of the reconstruction is (3+4+2-(-9)-(-2)+9+1-(-1)-(-3)-(-4)=38). Help Simons find the maximum beauty among all the nice reconstructions. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 5\cdot 10^4)). The description of the test cases follows. Th

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
364529689 -firefly- F Feb. 26, 2026, 4:09 p.m. OK C# 13 TESTS 27 328 28672000
364535643 darkmatter_druid F Feb. 26, 2026, 4:35 p.m. OK C++17 (GCC 7-32) TESTS 27 93 9932800
364547670 Lemansky F Feb. 26, 2026, 6:07 p.m. OK C++17 (GCC 7-32) TESTS 27 218 17715200
364539354 RockyYue F Feb. 26, 2026, 4:51 p.m. OK C++17 (GCC 7-32) TESTS 27 218 20582400
364524219 Keshav8368 F Feb. 26, 2026, 3:49 p.m. OK C++17 (GCC 7-32) TESTS 27 218 22937600
364540246 JashCodes F Feb. 26, 2026, 4:55 p.m. OK C++17 (GCC 7-32) TESTS 27 234 8908800
364551491 Ste F Feb. 26, 2026, 6:44 p.m. OK C++17 (GCC 7-32) TESTS 27 234 15769600
364541843 ShubhamYadav-27 F Feb. 26, 2026, 5:02 p.m. OK C++17 (GCC 7-32) TESTS 27 234 16896000
364537832 Min_27 F Feb. 26, 2026, 4:44 p.m. OK C++17 (GCC 7-32) TESTS 27 234 20480000
364528935 _annhien_ruby22 F Feb. 26, 2026, 4:06 p.m. OK C++17 (GCC 7-32) TESTS 27 234 28979200
364541370 sieun_k F Feb. 26, 2026, 5 p.m. OK C++17 (GCC 7-32) TESTS 27 250 14028800
364536039 rishab.acharjee12345 F Feb. 26, 2026, 4:36 p.m. OK C++20 (GCC 13-64) TESTS 27 78 25395200
364540727 Kobe_Bryant_Laoda F Feb. 26, 2026, 4:57 p.m. OK C++20 (GCC 13-64) TESTS 27 93 21504000
364579352 415411 F Feb. 27, 2026, 2:46 a.m. OK C++20 (GCC 13-64) TESTS 27 171 6451200
364532192 westilldonttrustyou F Feb. 26, 2026, 4:19 p.m. OK C++20 (GCC 13-64) TESTS 27 171 12083200
364578395 t6stks F Feb. 27, 2026, 2:28 a.m. OK C++20 (GCC 13-64) TESTS 27 171 16076800
364535341 shanyikai F Feb. 26, 2026, 4:33 p.m. OK C++20 (GCC 13-64) TESTS 27 187 4096000
364535280 415411 F Feb. 26, 2026, 4:33 p.m. OK C++20 (GCC 13-64) TESTS 27 187 6451200
364589584 rev_retah F Feb. 27, 2026, 5:45 a.m. OK C++20 (GCC 13-64) TESTS 27 187 29184000
364537471 MahinurRahman165 F Feb. 26, 2026, 4:43 p.m. OK C++20 (GCC 13-64) TESTS 27 187 31436800
364531525 Acheronlt F Feb. 26, 2026, 4:17 p.m. OK C++20 (GCC 13-64) TESTS 27 187 33382400
364530827 makeit422 F Feb. 26, 2026, 4:13 p.m. OK C++23 (GCC 14-64, msys2) TESTS 27 78 9932800
364531543 To_retto F Feb. 26, 2026, 4:17 p.m. OK C++23 (GCC 14-64, msys2) TESTS 27 93 10035200
364571914 XtremeXSPC F Feb. 26, 2026, 11:52 p.m. OK C++23 (GCC 14-64, msys2) TESTS 27 109 32563200
364536206 carboxylBase F Feb. 26, 2026, 4:37 p.m. OK C++23 (GCC 14-64, msys2) TESTS 27 171 1126400
364578113 ali2005_syr F Feb. 27, 2026, 2:23 a.m. OK C++23 (GCC 14-64, msys2) TESTS 27 171 19456000
364550712 Left0807 F Feb. 26, 2026, 6:35 p.m. OK C++23 (GCC 14-64, msys2) TESTS 27 171 24064000
364526560 kishanreddy1230 F Feb. 26, 2026, 3:57 p.m. OK C++23 (GCC 14-64, msys2) TESTS 27 187 5836800
364536198 Q-Aurora F Feb. 26, 2026, 4:37 p.m. OK C++23 (GCC 14-64, msys2) TESTS 27 187 5939200
364576789 wuv F Feb. 27, 2026, 1:55 a.m. OK C++23 (GCC 14-64, msys2) TESTS 27 187 6553600
364575915 oohyees F Feb. 27, 2026, 1:35 a.m. OK C++23 (GCC 14-64, msys2) TESTS 27 187 16179200
364539424 SaraZeynalzada F Feb. 26, 2026, 4:51 p.m. OK GNU C11 TESTS 27 406 27545600
364533391 Preetham_22 F Feb. 26, 2026, 4:24 p.m. OK Java 21 TESTS 27 296 11878400
364535818 MaxBuzz F Feb. 26, 2026, 4:35 p.m. OK Java 21 TESTS 27 468 9113600
364538916 codebuzz0001 F Feb. 26, 2026, 4:49 p.m. OK Java 21 TESTS 27 468 17100800
364540057 khnuray F Feb. 26, 2026, 4:54 p.m. OK Java 21 TESTS 27 468 53043200
364534374 atulupa12345 F Feb. 26, 2026, 4:29 p.m. OK Java 21 TESTS 27 546 35430400
364541073 jdltc F Feb. 26, 2026, 4:59 p.m. OK Java 21 TESTS 27 593 53657600
364529317 Praveen_Dhankhar F Feb. 26, 2026, 4:07 p.m. OK Java 21 TESTS 27 609 37273600
364533411 Vivek_Shahi F Feb. 26, 2026, 4:24 p.m. OK Java 8 TESTS 27 375 41267200
364581916 Ayush6386 F Feb. 27, 2026, 3:31 a.m. OK Kotlin 2.2 TESTS 27 171 30105600
364537863 ctrlaltdefeat__ F Feb. 26, 2026, 4:45 p.m. OK Node.js TESTS 27 546 114380800
364529230 ThVtKiDaRsEnE F Feb. 26, 2026, 4:07 p.m. OK Node.js TESTS 27 734 103424000
364537667 mattiasj F Feb. 26, 2026, 4:44 p.m. OK PyPy 3-64 TESTS 27 437 87142400
364548530 NaughtyIndia F Feb. 26, 2026, 6:15 p.m. OK PyPy 3-64 TESTS 27 484 106393600
364536380 hrhuynguyen F Feb. 26, 2026, 4:38 p.m. OK PyPy 3-64 TESTS 27 500 68812800
364539898 Ergodic137 F Feb. 26, 2026, 4:54 p.m. OK PyPy 3-64 TESTS 27 531 69734400
364537283 x3x3 F Feb. 26, 2026, 4:42 p.m. OK PyPy 3-64 TESTS 27 531 99635200
364541062 rhddnjswodnjs F Feb. 26, 2026, 4:59 p.m. OK PyPy 3-64 TESTS 27 546 61235200
364540226 kdy8128 F Feb. 26, 2026, 4:55 p.m. OK PyPy 3-64 TESTS 27 562 62156800
364541918 daolam F Feb. 26, 2026, 5:02 p.m. OK PyPy 3-64 TESTS 27 593 74137600
364528018 Msgnh F Feb. 26, 2026, 4:02 p.m. OK PyPy 3-64 TESTS 27 593 140288000
364522734 tealab F Feb. 26, 2026, 3:45 p.m. OK PyPy 3-64 TESTS 27 656 128819200
364549155 tour1st_ F Feb. 26, 2026, 6:20 p.m. OK Python 3 TESTS 27 1000 180224000
364585466 hassugameryt F Feb. 27, 2026, 4:41 a.m. OK Python 3 TESTS 27 1046 90931200
364531621 Nikrien F Feb. 26, 2026, 4:17 p.m. OK Python 3 TESTS 27 1109 136601600
364523173 nagpalyatharth99 F Feb. 26, 2026, 3:46 p.m. OK Python 3 TESTS 27 1171 152371200
364534548 DanielAnker F Feb. 26, 2026, 4:29 p.m. OK Rust 2024 TESTS 27 640 87756800
364530651 ymy202602 F Feb. 26, 2026, 4:13 p.m. OK Scala TESTS 27 687 10444800

remove filters

Back to search problems