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 |
|---|---|---|---|---|---|---|
| 2132 | Codeforces Round 1043 (Div. 3) | FINISHED | False | 8100 | 20618723 | Aug. 21, 2025, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 2734 ) | F | Rada and the Chamomile Valley | PROGRAMMING | dfs and similar graphs shortest paths |
Yesterday, Rada found a portal that can transport her to the Chamomile Valley and back. Rada's happiness knew no bounds, but it didn't last long — she suddenly realized that she didn't know where and when any of the Smeshariki would be. The Chamomile Valley consists of (n) houses and (m) lanes connecting the houses. The lanes are numbered from (1) to (m). You can walk along the lanes in both directions. It is known that from any house, you can reach any other house via the lanes, and there is no lane connecting a house to itself. Moreover, any two houses are connected by at most one lane. Rada knows that the Smeshariki walk every day from house number (1) to house number (n), but she doesn't know which specific lanes they will take. Rada will be in the Chamomile Valley on each of the next (q) days. On the (k)-th day, she will be at house number (c_k). Since Rada does not know which specific lanes the Smeshariki will take, she is only interested in those lanes that they will definitely use. To ensure she does not miss any of them, she wants to know the index of the nearest such lane on each day. Rada is too busy strolling through the Chamomile Valley, so she asks you to help her determine the required lane indices. The distance from house (c) to the lane connecting houses (a) and (b) is defined as the minimum of (\rho(a, c)) and (\rho(b, c)), where (\rho(a, b)) is the minimum number of lanes needed to reach house number (b) starting from house number (a). The first line of the input contains an integer (t) ((1 \leq t \leq 10^4)) — the number of test cases. The description of each test case follows. The first line contains two integers (n) and (m) ((1 \leq n \leq 2 \cdot 10^5), (n-1 \leq m \leq \min(\frac{n \cdot (n-1)}{2}, 2 \cdot 10^5))) — the number of houses and lanes, respectively. The next (m) lines contain two integers (u \neq v) ($$$1 \leq u, v \leq n$ |
| Codeforces Round 1043 (Div. 3) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 335190222 | _Equinox | F | Aug. 23, 2025, 3:49 p.m. | OK | C# 13 | TESTS | 20 | 937 | 28262400 | ||
| 335189592 | _Equinox | F | Aug. 23, 2025, 3:44 p.m. | OK | C# 13 | TESTS | 20 | 968 | 28569600 | ||
| 335178128 | hgzx | F | Aug. 23, 2025, 2:09 p.m. | OK | C++17 (GCC 7-32) | TESTS | 20 | 218 | 12083200 | ||
| 335057988 | dkdk | F | Aug. 22, 2025, 3:47 p.m. | OK | C++17 (GCC 7-32) | TESTS | 20 | 234 | 22118400 | ||
| 335033690 | HPXXZYY | F | Aug. 22, 2025, 12:43 p.m. | OK | C++17 (GCC 7-32) | TESTS | 20 | 249 | 21811200 | ||
| 335021787 | 1414783020 | F | Aug. 22, 2025, 10:57 a.m. | OK | C++17 (GCC 7-32) | TESTS | 20 | 249 | 25190400 | ||
| 335023417 | 1414783020 | F | Aug. 22, 2025, 11:13 a.m. | OK | C++17 (GCC 7-32) | TESTS | 20 | 250 | 22528000 | ||
| 335177404 | hgzx | F | Aug. 23, 2025, 2:04 p.m. | OK | C++17 (GCC 7-32) | TESTS | 20 | 265 | 15667200 | ||
| 335231260 | wwwytz | F | Aug. 24, 2025, 1:29 a.m. | OK | C++17 (GCC 7-32) | TESTS | 20 | 296 | 23756800 | ||
| 335115782 | xuan_never | F | Aug. 23, 2025, 5:58 a.m. | OK | C++17 (GCC 7-32) | TESTS | 20 | 311 | 20889600 | ||
| 335096410 | Az3ar | F | Aug. 23, 2025, 12:11 a.m. | OK | C++17 (GCC 7-32) | TESTS | 20 | 311 | 21504000 | ||
| 335144416 | lakkshyag | F | Aug. 23, 2025, 9:52 a.m. | OK | C++17 (GCC 7-32) | TESTS | 20 | 312 | 26214400 | ||
| 335020032 | hotcocoa | F | Aug. 22, 2025, 10:40 a.m. | OK | C++20 (GCC 13-64) | TESTS | 20 | 202 | 35840000 | ||
| 335157734 | zhouxiuoa | F | Aug. 23, 2025, 11:33 a.m. | OK | C++20 (GCC 13-64) | TESTS | 20 | 203 | 29081600 | ||
| 335099834 | enze_qwq | F | Aug. 23, 2025, 1:48 a.m. | OK | C++20 (GCC 13-64) | TESTS | 20 | 218 | 33996800 | ||
| 335146287 | AAAAAZBX | F | Aug. 23, 2025, 10:05 a.m. | OK | C++20 (GCC 13-64) | TESTS | 20 | 233 | 35430400 | ||
| 335099771 | enze_qwq | F | Aug. 23, 2025, 1:46 a.m. | OK | C++20 (GCC 13-64) | TESTS | 20 | 234 | 33894400 | ||
| 335136417 | Beneficial_deposit | F | Aug. 23, 2025, 8:52 a.m. | OK | C++20 (GCC 13-64) | TESTS | 20 | 265 | 55603200 | ||
| 335090127 | fazliddin2001 | F | Aug. 22, 2025, 9:14 p.m. | OK | C++20 (GCC 13-64) | TESTS | 20 | 296 | 41267200 | ||
| 335214278 | evolto | F | Aug. 23, 2025, 7:08 p.m. | OK | C++20 (GCC 13-64) | TESTS | 20 | 296 | 41779200 | ||
| 335028669 | Ra_ist | F | Aug. 22, 2025, 12:01 p.m. | OK | C++20 (GCC 13-64) | TESTS | 20 | 296 | 44851200 | ||
| 335112750 | Devdom | F | Aug. 23, 2025, 5:26 a.m. | OK | C++20 (GCC 13-64) | TESTS | 20 | 311 | 38502400 | ||
| 335206580 | Zhangwuji | F | Aug. 23, 2025, 6:01 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 20 | 202 | 31027200 | ||
| 335087514 | yuyc | F | Aug. 22, 2025, 8:32 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 20 | 233 | 39116800 | ||
| 335156697 | CeHang | F | Aug. 23, 2025, 11:25 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 20 | 234 | 48537600 | ||
| 335156891 | CeHang | F | Aug. 23, 2025, 11:27 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 20 | 249 | 45363200 | ||
| 335095627 | M-Sa3dy | F | Aug. 22, 2025, 11:44 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 20 | 281 | 48025600 | ||
| 335102832 | huanqizhen | F | Aug. 23, 2025, 2:59 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 20 | 281 | 49152000 | ||
| 335125331 | Dr_Zhang | F | Aug. 23, 2025, 7:27 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 20 | 296 | 32665600 | ||
| 335076899 | aedmhsn2006 | F | Aug. 22, 2025, 6:23 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 20 | 296 | 41062400 | ||
| 335076543 | aedmhsn2006 | F | Aug. 22, 2025, 6:20 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 20 | 296 | 41676800 | ||
| 335101349 | MagicalGirl | F | Aug. 23, 2025, 2:24 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 20 | 296 | 47308800 | ||
| 335076048 | shivansh_123 | F | Aug. 22, 2025, 6:16 p.m. | OK | Java 21 | TESTS | 20 | 796 | 96256000 | ||
| 335226641 | UdayRajVadeghar | F | Aug. 23, 2025, 10:29 p.m. | OK | Java 21 | TESTS | 20 | 843 | 110796800 | ||
| 335081432 | vineetiwari | F | Aug. 22, 2025, 7:13 p.m. | OK | Java 21 | TESTS | 20 | 983 | 71577600 | ||
| 335104364 | wenbozh | F | Aug. 23, 2025, 3:24 a.m. | OK | Java 21 | TESTS | 20 | 1171 | 193740800 | ||
| 335185407 | InfinityX | F | Aug. 23, 2025, 3:08 p.m. | OK | Java 21 | TESTS | 20 | 1421 | 154009600 | ||
| 335131365 | digvijoy1700 | F | Aug. 23, 2025, 8:16 a.m. | OK | Java 8 | TESTS | 20 | 968 | 105164800 | ||
| 335142733 | IcyGirl | F | Aug. 23, 2025, 9:39 a.m. | OK | PyPy 3-64 | TESTS | 20 | 1030 | 94822400 | ||
| 335215461 | evolto | F | Aug. 23, 2025, 7:21 p.m. | OK | PyPy 3-64 | TESTS | 20 | 1031 | 113254400 | ||
| 335027199 | gardengnome | F | Aug. 22, 2025, 11:49 a.m. | OK | PyPy 3-64 | TESTS | 20 | 1046 | 99328000 | ||
| 335027618 | gardengnome | F | Aug. 22, 2025, 11:53 a.m. | OK | PyPy 3-64 | TESTS | 20 | 1078 | 99430400 | ||
| 335026727 | gardengnome | F | Aug. 22, 2025, 11:44 a.m. | OK | PyPy 3-64 | TESTS | 20 | 1108 | 124928000 | ||
| 335085299 | titia | F | Aug. 22, 2025, 8:01 p.m. | OK | PyPy 3-64 | TESTS | 20 | 1156 | 141824000 | ||
| 335030253 | DeadMan69 | F | Aug. 22, 2025, 12:15 p.m. | OK | PyPy 3-64 | TESTS | 20 | 1858 | 236032000 | ||
| 335055853 | Polynomu | F | Aug. 22, 2025, 3:29 p.m. | OK | PyPy 3-64 | TESTS | 20 | 1968 | 170905600 | ||
| 335036882 | Akshar_7 | F | Aug. 22, 2025, 1:10 p.m. | OK | PyPy 3-64 | TESTS | 20 | 1968 | 429670400 | ||
| 335020687 | denilb | F | Aug. 22, 2025, 10:46 a.m. | OK | PyPy 3-64 | TESTS | 20 | 2249 | 139980800 | ||
| 335029890 | QuadD4rv1n7 | F | Aug. 22, 2025, 12:11 p.m. | OK | Python 3 | TESTS | 20 | 2453 | 206848000 |
Back to search problems