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 |
|---|---|---|---|---|---|---|
| 2109 | Codeforces Round 1025 (Div. 2) | FINISHED | False | 8100 | 28913123 | May 17, 2025, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 5560 ) | D | D/D/D | PROGRAMMING | dfs and similar graphs greedy shortest paths |
Of course, a problem with the letter D is sponsored by Declan Akaba. You are given a simple, connected, undirected graph with (n) vertices and (m) edges. The graph contains no self-loops or multiple edges. You are also given a multiset (A) consisting of (\ell) elements: () A = \{A_1, A_2, \ldots, A_\ell\} () Starting from vertex (1), you may perform the following move any number of times, as long as the multiset (A) is not empty: Select an element (k \in A) and remove it from the multiset . You must remove exactly one occurrence of (k) from (A). Traverse any walk(^{\text{∗}}) of exactly (k) edges to reach some vertex (possibly the same one you started from). For each (i) ((1 \le i \le n)), determine whether there exists a sequence of such moves that starts at vertex (1) and ends at vertex (i), using the original multiset (A). Note that the check for each vertex (i) is independent — you restart from vertex (1) and use the original multiset (A) for each case. (^{\text{∗}})A walk of length (k) is a sequence of vertices (v_0, v_1, \ldots, v_{k - 1}, v_k) such that each consecutive pair of vertices ((v_i, v_{i + 1})) is connected by an edge in the graph. The sequence may include repeated vertices. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 10^4)). The description of the test cases follows. The first line of each test case contains three integers (n), (m), and (\ell) ((2 \leq n \leq 2 \cdot 10^5), (n-1 \leq m \leq 4 \cdot 10^5), (1 \leq \ell \leq 2 \cdot 10^5)) — the number of vertices, the number of edges, and the size of the multiset, respectively. The second line of each test case contains (\ell) integers (A_1, A_2, \ldots, A_{\ell}) ((1 \leq A_i \leq 10^4)) — the elements of the multiset. Each of the following (m) lines contains two integers (u) |
| Codeforces Round 1025 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 320180575 | goodluck2025 | D | May 18, 2025, 4:42 a.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 296 | 13721600 | ||
| 320164800 | chinnu0312 | D | May 18, 2025, 1:13 a.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 311 | 10752000 | ||
| 320163873 | antguz | D | May 18, 2025, 12:46 a.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 327 | 13926400 | ||
| 320183691 | _ryuko | D | May 18, 2025, 5:19 a.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 328 | 11161600 | ||
| 320178260 | you-jin-plus | D | May 18, 2025, 4:07 a.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 342 | 10137600 | ||
| 320180667 | renegade1050 | D | May 18, 2025, 4:43 a.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 343 | 11059200 | ||
| 320133687 | Meiosis | D | May 17, 2025, 4:49 p.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 343 | 11059200 | ||
| 320128609 | pranprocodes | D | May 17, 2025, 4:40 p.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 343 | 11059200 | ||
| 320147908 | mohit_dua | D | May 17, 2025, 7:15 p.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 343 | 12595200 | ||
| 320165747 | BedwarKing | D | May 18, 2025, 1:34 a.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 343 | 28057600 | ||
| 320149915 | noya2 | D | May 17, 2025, 7:37 p.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 249 | 22630400 | ||
| 320154446 | kaiboy | D | May 17, 2025, 8:36 p.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 264 | 13209600 | ||
| 320180860 | clashgamer1050 | D | May 18, 2025, 4:46 a.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 280 | 15360000 | ||
| 320180120 | muling1437 | D | May 18, 2025, 4:36 a.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 280 | 70553600 | ||
| 320130834 | hotcocoa | D | May 17, 2025, 4:44 p.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 281 | 12902400 | ||
| 320141013 | fsj-o | D | May 17, 2025, 6:18 p.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 296 | 21606400 | ||
| 320161162 | rubbish | D | May 17, 2025, 11:11 p.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 296 | 26316800 | ||
| 320184608 | lregion | D | May 18, 2025, 5:29 a.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 311 | 15360000 | ||
| 320184452 | lregion | D | May 18, 2025, 5:28 a.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 311 | 15360000 | ||
| 320152765 | itsraajjjuuuu | D | May 17, 2025, 8:13 p.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 311 | 15360000 | ||
| 320131028 | Erik365 | D | May 17, 2025, 4:45 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 233 | 10444800 | ||
| 320130399 | bezime | D | May 17, 2025, 4:44 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 281 | 24678400 | ||
| 320167959 | cankjaca | D | May 18, 2025, 2:20 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 296 | 15462400 | ||
| 320153833 | anteknne2 | D | May 17, 2025, 8:27 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 296 | 15462400 | ||
| 320183736 | 0xBADBAD | D | May 18, 2025, 5:20 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 296 | 15872000 | ||
| 320165164 | hhhhyf | D | May 18, 2025, 1:21 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 296 | 17305600 | ||
| 320158940 | thedyingkai_ | D | May 17, 2025, 10:04 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 311 | 16281600 | ||
| 320154568 | xor_cat | D | May 17, 2025, 8:38 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 311 | 18636800 | ||
| 320147808 | MohammadMx | D | May 17, 2025, 7:13 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 312 | 14848000 | ||
| 320150292 | Arsh_Chand | D | May 17, 2025, 7:41 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 312 | 15462400 | ||
| 320160601 | iamalizaidi | D | May 17, 2025, 10:53 p.m. | OK | Java 21 | TESTS | 30 | 1202 | 62771200 | ||
| 320161649 | wddd | D | May 17, 2025, 11:27 p.m. | OK | Java 21 | TESTS | 30 | 1234 | 69529600 | ||
| 320146981 | sad_truant | D | May 17, 2025, 7:05 p.m. | OK | Java 21 | TESTS | 30 | 1358 | 63897600 | ||
| 320147419 | kasiru_69 | D | May 17, 2025, 7:10 p.m. | OK | Java 8 | TESTS | 30 | 1499 | 69427200 | ||
| 320182498 | shank_555 | D | May 18, 2025, 5:06 a.m. | OK | PyPy 3-64 | TESTS | 30 | 749 | 73011200 | ||
| 320141952 | sushmanth.dampur8780 | D | May 17, 2025, 6:23 p.m. | OK | PyPy 3-64 | TESTS | 30 | 1233 | 87347200 | ||
| 320131834 | Taymyr | D | May 17, 2025, 4:46 p.m. | OK | PyPy 3-64 | TESTS | 30 | 1233 | 91136000 | ||
| 320133923 | yiren429 | D | May 17, 2025, 4:49 p.m. | OK | PyPy 3-64 | TESTS | 30 | 1296 | 55500800 | ||
| 320140799 | x3mka | D | May 17, 2025, 6:17 p.m. | OK | PyPy 3-64 | TESTS | 30 | 1374 | 95948800 | ||
| 320147586 | Vespasian_1 | D | May 17, 2025, 7:11 p.m. | OK | PyPy 3-64 | TESTS | 30 | 1468 | 66969600 | ||
| 320162944 | DeadMan69 | D | May 18, 2025, 12:12 a.m. | OK | PyPy 3-64 | TESTS | 30 | 1483 | 133529600 | ||
| 320150954 | grecil | D | May 17, 2025, 7:49 p.m. | OK | PyPy 3-64 | TESTS | 30 | 1499 | 81920000 | ||
| 320153873 | grecil | D | May 17, 2025, 8:28 p.m. | OK | PyPy 3-64 | TESTS | 30 | 1577 | 84377600 | ||
| 320168736 | ishmeal | D | May 18, 2025, 2:32 a.m. | OK | PyPy 3-64 | TESTS | 30 | 1624 | 86937600 | ||
| 320180489 | Mayank_jindal | D | May 18, 2025, 4:41 a.m. | OK | Python 3 | TESTS | 30 | 1765 | 69017600 | ||
| 320144630 | SnowballSH | D | May 17, 2025, 6:42 p.m. | OK | Rust 2021 | TESTS | 30 | 296 | 27443200 | ||
| 320149467 | 123gjweq2 | D | May 17, 2025, 7:31 p.m. | OK | Rust 2021 | TESTS | 30 | 937 | 66150400 |
Back to search problems