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 |
|---|---|---|---|---|---|---|
| 2164 | Codeforces Global Round 30 (Div. 1 + Div. 2) | FINISHED | False | 10800 | 13965923 | Nov. 6, 2025, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 202 ) | G | Pointless Machine | PROGRAMMING | interactive |
This is an interactive problem. Madeline is playing with a pointless machine. The pointless machine has a hidden tree of size (n), and Madeline has to find the edges of the tree by asking the machine. In a query, Madeline will give the machine a permutation (p) of (1,2,\ldots,n), and the machine will return a sequence (q_1, q_2, \ldots, q_n), where (q_i) is the number of edges of the induced subgraph formed by the vertices (\{p_1,p_2,\ldots,p_i\}). Here, an induced subgraph of a graph (G(V,E)) formed by a subset of vertices (V' \subseteq V), is a graph consisting of vertices from this subset and all edges between vertices from subset that are present in original graph (G). However, the machine works slowly, so Madeline can only get the results at once after all queries are completed. The memory of this machine is not very large either, so Madeline can only ask (31) times. She doesn't know how to solve it, so she invited you to help her. Note that the interactor is non-adaptive . That is, tree is fixed in advance and doesn't change with your queries. 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 only line of each test case contains a single integer (n) ((3\le n\le 5\cdot 10^4)) — the size of the tree. It is guaranteed that the sum of (n) over all test cases does not exceed (5\cdot 10^4). The interaction begins by reading the integer (n). Then, output a single integer (k) ((1 \leq k \leq 31)) — the number of queries. To ask a query, output a line in the following format: (p_{i,1}\,p_{i,2}\,\ldots\,p_{i,n}) ((1 \leq p_{i,j} \leq n), the (p_{i,j}) are distinct for each (i)) — a query described above. Once you've asked all (k) queries, read (k) lines of (n) integers (q_{i,j}) — the responses to the queries as described above. When you know |
| Codeforces Global Round 30 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 347829231 | xvchongyv | G | Nov. 7, 2025, 5:42 a.m. | OK | C++17 (GCC 7-32) | TESTS | 34 | 1734 | 10035200 | ||
| 347782146 | wthdouwant | G | Nov. 6, 2025, 6:29 p.m. | OK | C++17 (GCC 7-32) | TESTS | 34 | 1890 | 30617600 | ||
| 347765188 | tourist | G | Nov. 6, 2025, 4:57 p.m. | OK | C++20 (GCC 13-64) | TESTS | 34 | 687 | 12800000 | ||
| 347828061 | ORzyzRO | G | Nov. 7, 2025, 5:27 a.m. | OK | C++20 (GCC 13-64) | TESTS | 34 | 999 | 38092800 | ||
| 347804718 | zltzlt | G | Nov. 6, 2025, 11:29 p.m. | OK | C++20 (GCC 13-64) | TESTS | 34 | 1343 | 14643200 | ||
| 347765820 | strapple | G | Nov. 6, 2025, 4:59 p.m. | OK | C++20 (GCC 13-64) | TESTS | 34 | 1358 | 21708800 | ||
| 347781603 | KroosTheKeenGlint | G | Nov. 6, 2025, 6:26 p.m. | OK | C++20 (GCC 13-64) | TESTS | 34 | 1453 | 55910400 | ||
| 347812277 | xujindong | G | Nov. 7, 2025, 2:07 a.m. | OK | C++20 (GCC 13-64) | TESTS | 34 | 1811 | 19251200 | ||
| 347770009 | StarSilk | G | Nov. 6, 2025, 5:12 p.m. | OK | C++20 (GCC 13-64) | TESTS | 34 | 1905 | 25702400 | ||
| 347764516 | Otomachi_Una | G | Nov. 6, 2025, 4:55 p.m. | OK | C++20 (GCC 13-64) | TESTS | 34 | 1905 | 26316800 | ||
| 347785215 | turmax | G | Nov. 6, 2025, 6:54 p.m. | OK | C++20 (GCC 13-64) | TESTS | 34 | 2780 | 56729600 | ||
| 347782800 | turmax | G | Nov. 6, 2025, 6:34 p.m. | OK | C++20 (GCC 13-64) | TESTS | 34 | 2811 | 56729600 | ||
| 347798825 | hungchi17 | G | Nov. 6, 2025, 9:24 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 34 | 468 | 10035200 | ||
| 347783113 | Nachia | G | Nov. 6, 2025, 6:36 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 34 | 624 | 40652800 | ||
| 347768498 | ksun48 | G | Nov. 6, 2025, 5:07 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 34 | 702 | 17100800 | ||
| 347803413 | Adam_GS | G | Nov. 6, 2025, 10:56 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 34 | 859 | 20275200 | ||
| 347799089 | rainboy | G | Nov. 6, 2025, 9:28 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 34 | 1265 | 12800000 | ||
| 347817688 | XY_Eleven | G | Nov. 7, 2025, 3:11 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 34 | 1312 | 18739200 | ||
| 347772606 | hos.lyric | G | Nov. 6, 2025, 5:20 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 34 | 1343 | 12595200 | ||
| 347769207 | VivaciousAubergine | G | Nov. 6, 2025, 5:09 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 34 | 1858 | 43315200 | ||
| 347781832 | maspy | G | Nov. 6, 2025, 6:27 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 34 | 2046 | 21504000 | ||
| 347782133 | turmax | G | Nov. 6, 2025, 6:29 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 34 | 2999 | 56832000 |
Back to search problems