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 |
|---|---|---|---|---|---|---|
| ( 1012 ) | E1 | Hidden Single (Version 1) | PROGRAMMING | divide and conquer interactive math probabilities sortings |
The two versions have different constraints on (t), (n), and the maximum number of queries, and solving one of the two versions does not necessarily solve the other. You may want to read both versions. Hacks are disabled in both versions. This is an interactive problem. There is a hidden array (a_1, a_2, \ldots, a_{2n-1}) containing all the numbers from (1) to (n), and all of them appear twice except one (which only appears once). You can ask queries in the following format, where (S) is a subset of (\{1, 2, \ldots, 2n-1\}) and (x) is an integer in (1, n): (ask(S, x)): does there exist (i \in S) such that (a_i = x)? Find the number appearing exactly once, using at most (4n + 2 \lceil \log_2 n \rceil) queries. You don't need to find its position. Note that the interactor is not adaptive, which means that the hidden array does not depend on the queries you make. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 4000)). The description of the test cases follows. The first line of each test case contains a single integer (n) ((1 \le n \le 300)) — the maximum value in the hidden array (a_1, a_2, \ldots, a_{2n-1}). It is guaranteed that the sum of (n^2) over all test cases does not exceed (4 \cdot 10^5). There are exactly (80) tests in this problem (including the example). For each test case, first read a single integer (n). If the integer you read is (-1), it means that the answer to the previous test case was wrong, and you should exit immediately. You may ask up to (4n + 2 \lceil \log_2 n \rceil) queries in each test case. To ask a query, print a line in the format (? x |S| S_1 S_2 ... S_|S|) with (1 \leq x \leq n), (1 \leq S_1, S_2, \ldots, S_{|S|} \leq 2n-1), and all the (S_i) distinct. As a response to the query, you will get (1) if the answer is yes, (0) if the |
| 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 340192690 | HaramuraNodoka | E1 | Sept. 24, 2025, 1:33 p.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 765 | 102400 | ||
| 340185891 | potato167 | E1 | Sept. 24, 2025, 1:10 p.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 780 | 102400 | ||
| 340269728 | xvchongyv | E1 | Sept. 25, 2025, 12:50 a.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 781 | 102400 | ||
| 340244696 | AA-2007 | E1 | Sept. 24, 2025, 6:29 p.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 781 | 102400 | ||
| 340202144 | lnw143 | E1 | Sept. 24, 2025, 2:09 p.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 812 | 307200 | ||
| 340242383 | AA-2007 | E1 | Sept. 24, 2025, 6:15 p.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 827 | 102400 | ||
| 340265759 | zac2010 | E1 | Sept. 24, 2025, 11:26 p.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 827 | 307200 | ||
| 340275421 | _l_l_ | E1 | Sept. 25, 2025, 2:04 a.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 828 | 102400 | ||
| 340242528 | AA-2007 | E1 | Sept. 24, 2025, 6:16 p.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 828 | 102400 | ||
| 340227203 | leukocyte | E1 | Sept. 24, 2025, 5:01 p.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 843 | 102400 | ||
| 340210687 | Nextby | E1 | Sept. 24, 2025, 2:43 p.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 562 | 102400 | ||
| 340219627 | juju054 | E1 | Sept. 24, 2025, 4:04 p.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 593 | 102400 | ||
| 340263112 | jackson.souza | E1 | Sept. 24, 2025, 10:07 p.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 624 | 102400 | ||
| 340194947 | Revived_xryjr233 | E1 | Sept. 24, 2025, 1:41 p.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 640 | 102400 | ||
| 340272486 | juju054 | E1 | Sept. 25, 2025, 1:25 a.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 655 | 102400 | ||
| 340263581 | jackson.souza | E1 | Sept. 24, 2025, 10:20 p.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 655 | 102400 | ||
| 340272330 | lucky_clover_ | E1 | Sept. 25, 2025, 1:23 a.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 687 | 102400 | ||
| 340208929 | maxplus | E1 | Sept. 24, 2025, 2:37 p.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 687 | 102400 | ||
| 340273031 | juju054 | E1 | Sept. 25, 2025, 1:32 a.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 702 | 0 | ||
| 340187548 | sevlll777 | E1 | Sept. 24, 2025, 1:15 p.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 702 | 102400 | ||
| 340212360 | Senku | E1 | Sept. 24, 2025, 2:48 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 625 | 0 | ||
| 340212857 | Proof_by_QED | E1 | Sept. 24, 2025, 2:49 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 671 | 0 | ||
| 340198158 | TBWW | E1 | Sept. 24, 2025, 1:53 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 671 | 0 | ||
| 340197662 | ksun48 | E1 | Sept. 24, 2025, 1:51 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 686 | 102400 | ||
| 340235467 | exgcd | E1 | Sept. 24, 2025, 5:27 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 734 | 102400 | ||
| 340233339 | vedantkohad | E1 | Sept. 24, 2025, 5:14 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 749 | 102400 | ||
| 340187302 | noimi | E1 | Sept. 24, 2025, 1:14 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 765 | 0 | ||
| 340273215 | Benq | E1 | Sept. 25, 2025, 1:33 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 765 | 102400 | ||
| 340188834 | maroonrk | E1 | Sept. 24, 2025, 1:20 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 765 | 102400 | ||
| 340246323 | NickMish | E1 | Sept. 24, 2025, 6:39 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 780 | 0 | ||
| 340196320 | arvindf232 | E1 | Sept. 24, 2025, 1:46 p.m. | OK | Kotlin 2.2 | TESTS | 80 | 1343 | 1740800 | ||
| 340196220 | toam | E1 | Sept. 24, 2025, 1:46 p.m. | OK | PyPy 3-64 | TESTS | 80 | 2359 | 9728000 | ||
| 340202949 | bribritt | E1 | Sept. 24, 2025, 2:14 p.m. | OK | PyPy 3-64 | TESTS | 80 | 2483 | 9216000 | ||
| 340236428 | VitalyKo | E1 | Sept. 24, 2025, 5:33 p.m. | OK | PyPy 3-64 | TESTS | 80 | 2702 | 10342400 | ||
| 340194597 | hirayuu_cf | E1 | Sept. 24, 2025, 1:40 p.m. | OK | PyPy 3-64 | TESTS | 80 | 2718 | 9625600 | ||
| 340257053 | golomb | E1 | Sept. 24, 2025, 8:19 p.m. | OK | PyPy 3-64 | TESTS | 80 | 3203 | 11264000 | ||
| 340186353 | __baozii__ | E1 | Sept. 24, 2025, 1:11 p.m. | OK | PyPy 3-64 | TESTS | 80 | 3406 | 11059200 |
Back to search problems