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 |
|---|---|---|---|---|---|---|
| 2150 | Codeforces Round 1053 (Div. 1) | FINISHED | False | 11700 | 17691923 | Sept. 24, 2025, 11:35 a.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 201 ) | F | Cycle Closing | PROGRAMMING | constructive algorithms graphs trees |
You are given an undirected, connected graph (G) with (n) nodes and (m) edges. The graph does not contain self loops nor multiple edges. In one operation, you do the following, in order: choose a positive integer (k) ((1 \le k \le n)); choose an integer (s) ((0 \le s \le \frac{n \cdot (n - 1)}{2})); print (s) simple paths of length (k-1) ((v_{i,1} \leftrightarrow v_{i,2} \leftrightarrow \ldots \leftrightarrow v_{i,k})); for each (i = 1) to (s), add an edge ((v_{i,1}, v_{i,k})) to the graph. Note that an edge added by some operation can only be used by future operations, because the edges are added at the end of printing all simple paths. Make (G) complete in at most (2) operations. Specifically, (G) must contain every edge ((u, v)) with (u < v) exactly once. Note: You are provided with the input files for the first (10) tests of this problem, along with (2) checkers (one in C++, one in Python) to verify your output. The checkers assume you follow the input and output formats of the problem. You can download the zip file from the Contest Materials section. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 10^3)). The description of the test cases follows. The first line of each test case contains two integers (n) and (m) ((3 \leq n \leq 200), (n - 1\leq m \leq n(n-1)/2)) — the number of nodes and edges in (G), respectively. Each of the next (m) lines contains two integers (u_i), (v_i) ((1 \leq u_i, v_i \leq n), (u_i \neq v_i)), representing the edge ((u_i, v_i)). The graph is connected and does not contain self loops nor multiple edges. It is guaranteed that the sum of (n^2) does not exceed (4 \cdot 10^4) over all testcases. For each test case, print the following. In the first line, print the number of operations (op) ((0 \le op \le 2)) you want to perfor |
| Editorial of Codeforces Round 1053 (Div. 1, Div. 2) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 340274222 | sunkaihuan | F | Sept. 25, 2025, 1:47 a.m. | OK | C++17 (GCC 7-32) | TESTS | 60 | 265 | 21504000 | ||
| 340203082 | potato167 | F | Sept. 24, 2025, 2:14 p.m. | OK | C++17 (GCC 7-32) | TESTS | 60 | 281 | 10240000 | ||
| 340224705 | A.K.E.E. | F | Sept. 24, 2025, 4:43 p.m. | OK | C++17 (GCC 7-32) | TESTS | 60 | 311 | 7372800 | ||
| 340218656 | lotusblume | F | Sept. 24, 2025, 3:57 p.m. | OK | C++17 (GCC 7-32) | TESTS | 60 | 343 | 6041600 | ||
| 340201930 | scli_kws | F | Sept. 24, 2025, 2:08 p.m. | OK | C++17 (GCC 7-32) | TESTS | 60 | 343 | 33382400 | ||
| 340275203 | wutongchun | F | Sept. 25, 2025, 2:01 a.m. | OK | C++17 (GCC 7-32) | TESTS | 60 | 390 | 5632000 | ||
| 340206028 | p6pou | F | Sept. 24, 2025, 2:26 p.m. | OK | C++17 (GCC 7-32) | TESTS | 60 | 390 | 6348800 | ||
| 340259138 | maxplus | F | Sept. 24, 2025, 8:50 p.m. | OK | C++20 (GCC 13-64) | TESTS | 60 | 187 | 8806400 | ||
| 340189091 | FelixMP | F | Sept. 24, 2025, 1:20 p.m. | OK | C++20 (GCC 13-64) | TESTS | 60 | 217 | 6553600 | ||
| 340258466 | maxplus | F | Sept. 24, 2025, 8:39 p.m. | OK | C++20 (GCC 13-64) | TESTS | 60 | 218 | 16691200 | ||
| 340258751 | maxplus | F | Sept. 24, 2025, 8:44 p.m. | OK | C++20 (GCC 13-64) | TESTS | 60 | 233 | 512000 | ||
| 340199596 | VivaciousAubergine | F | Sept. 24, 2025, 1:58 p.m. | OK | C++20 (GCC 13-64) | TESTS | 60 | 233 | 8089600 | ||
| 340222103 | Abdullo-Shamsiev | F | Sept. 24, 2025, 4:23 p.m. | OK | C++20 (GCC 13-64) | TESTS | 60 | 233 | 15360000 | ||
| 340258142 | maxplus | F | Sept. 24, 2025, 8:34 p.m. | OK | C++20 (GCC 13-64) | TESTS | 60 | 234 | 10649600 | ||
| 340268842 | Geothermal | F | Sept. 25, 2025, 12:33 a.m. | OK | C++20 (GCC 13-64) | TESTS | 60 | 249 | 31846400 | ||
| 340238774 | 244mhq | F | Sept. 24, 2025, 5:50 p.m. | OK | C++20 (GCC 13-64) | TESTS | 60 | 265 | 6860800 | ||
| 340209852 | pigstd | F | Sept. 24, 2025, 2:40 p.m. | OK | C++20 (GCC 13-64) | TESTS | 60 | 311 | 24166400 | ||
| 340255184 | tfg | F | Sept. 24, 2025, 7:55 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 60 | 187 | 8499200 | ||
| 340190086 | ecnerwala | F | Sept. 24, 2025, 1:24 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 60 | 202 | 102400 | ||
| 340180925 | ksun48 | F | Sept. 24, 2025, 12:54 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 60 | 202 | 15564800 | ||
| 340200812 | jiangly | F | Sept. 24, 2025, 2:03 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 60 | 234 | 6451200 | ||
| 340230874 | vedantkohad | F | Sept. 24, 2025, 5:13 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 60 | 234 | 16691200 | ||
| 340187700 | oleh1421 | F | Sept. 24, 2025, 1:16 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 60 | 296 | 6348800 | ||
| 340220893 | Petr | F | Sept. 24, 2025, 4:14 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 60 | 311 | 10547200 | ||
| 340210237 | Nachia | F | Sept. 24, 2025, 2:41 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 60 | 312 | 67788800 | ||
| 340211944 | noimi | F | Sept. 24, 2025, 2:47 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 60 | 342 | 6348800 | ||
| 340249716 | antontrygubO_o | F | Sept. 24, 2025, 7:06 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 60 | 389 | 24166400 | ||
| 340207221 | Gassa | F | Sept. 24, 2025, 2:30 p.m. | OK | D | TESTS | 60 | 999 | 21606400 |
Back to search problems