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 |
|---|---|---|---|---|---|---|
| 2129 | Codeforces Round 1040 (Div. 1) | FINISHED | False | 10800 | 22519484 | July 31, 2025, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 129 ) | F1 | Top-K Tracker (Easy Version) | PROGRAMMING | interactive |
This is an interactive problem. This is the easy version of the problem. The only difference is that (n \le 845) in this version. You can make hacks only if all versions of the problem are solved. There is a hidden permutation (p), which is a permutation of (\{1,2,\ldots,n\}). Let (pos_i) denote the position of the value (i) in (p), i.e., (pos_{p_i} = i). To find this permutation, you can ask four types of queries: "(1\ m\ i_1\ i_2\ \ldots\ i_m)" ((1 \leq m \leq n), (i_1,\ i_2,\ \ldots,\ i_m) must be distinct). Let (k = \min(60, m)). The jury will return the top (k) largest number(s) in (p_{i_1}, p_{i_2}, \ldots, p_{i_m}) in increasing order. "(2\ m\ i_1\ i_2\ \ldots\ i_m)" ((1 \leq m \leq n), (i_1,\ i_2,\ \ldots,\ i_m) must be distinct). Let (k = \min(60, m)). The jury will return the top (k) largest number(s) in (pos_{i_1}, pos_{i_2}, \ldots, pos_{i_m}) in increasing order. "(3\ m\ i_1\ i_2\ ...\ i_m)" ((1 \leq m \leq n), (i_1,\ i_2,\ ...,\ i_m) must be distinct). Let (k = \min(300, m)). The jury will return the top (k) largest number(s) in (p_{i_1}, p_{i_2}, ..., p_{i_m}) in increasing order. "(4\ m\ i_1\ i_2\ \ldots\ i_m)" ((1 \leq m \leq n), (i_1,\ i_2,\ \ldots,\ i_m) must be distinct). Let (k = \min(300, m)). The jury will return the top (k) largest number(s) in (pos_{i_1}, pos_{i_2}, \ldots, pos_{i_m}) in increasing order. Let (c_i) be the usage count of queries of type (i) ((1 \le i \le 4)). Your query count must satisfy the following constraints: (c_1+c_2+c_3+c_4 \le 30.) (c_3+c_4 \le 1.) Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 40)). The description of the test cases follows. The first line of each test case contains one integer (n) ((2 \le n \le 845)). At this moment, the permutation (p) is chosen. The interacto |
| Codeforces Round 1040 (Div. 1, Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 331866596 | re-wa-tl-ok | F1 | July 31, 2025, 8:19 p.m. | OK | C++20 (GCC 13-64) | TESTS | 32 | 140 | 102400 | ||
| 331892790 | qiuzx | F1 | Aug. 1, 2025, 3:20 a.m. | OK | C++20 (GCC 13-64) | TESTS | 32 | 233 | 102400 | ||
| 331855152 | cn449 | F1 | July 31, 2025, 5:33 p.m. | OK | C++20 (GCC 13-64) | TESTS | 32 | 1171 | 102400 | ||
| 331890703 | adam01 | F1 | Aug. 1, 2025, 2:56 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 32 | 155 | 204800 | ||
| 331844921 | ksun48 | F1 | July 31, 2025, 5:06 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 32 | 171 | 102400 | ||
| 331830279 | Kevin114514 | F1 | July 31, 2025, 4:29 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 32 | 171 | 102400 | ||
| 331824405 | jiangly | F1 | July 31, 2025, 4:16 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 32 | 171 | 102400 | ||
| 331842629 | ecnerwala | F1 | July 31, 2025, 5 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 32 | 186 | 102400 | ||
| 331784978 | ainta | F1 | July 31, 2025, 3:12 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 32 | 233 | 204800 | ||
| 331851835 | dyppp | F1 | July 31, 2025, 5:25 p.m. | OK | PyPy 3-64 | TESTS | 32 | 452 | 10547200 |
Back to search problems