Codeforces Round 1053 (Div. 1)

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.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 592 ) E2 Hidden Single (Version 2) PROGRAMMING divide and conquer interactive math probabilities

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 (925) 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 20)). The description of the test cases follows. The first line of each test case contains a single integer (n) ((n = 300)) — the maximum value in the hidden array (a_1, a_2, \ldots, a_{2n-1}). There are exactly (50) tests in this problem (including the example). The example has (t = 1), and all the other tests have (t = 20). 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 (925) 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 answer is no, and (-1) if you made an invalid query. You should exit immediately if y

Tutorials

Editorial of Codeforces Round 1053 (Div. 1, Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
340278359 NanguX E2 Sept. 25, 2025, 2:52 a.m. OK C++17 (GCC 7-32) TESTS 50 546 102400
340291719 zac2010 E2 Sept. 25, 2025, 5:30 a.m. OK C++17 (GCC 7-32) TESTS 50 562 102400
340186420 potato167 E2 Sept. 24, 2025, 1:12 p.m. OK C++17 (GCC 7-32) TESTS 50 577 0
340291809 zac2010 E2 Sept. 25, 2025, 5:31 a.m. OK C++17 (GCC 7-32) TESTS 50 593 102400
340295289 cjr2010 E2 Sept. 25, 2025, 5:56 a.m. OK C++17 (GCC 7-32) TESTS 50 671 0
340279280 masonpop E2 Sept. 25, 2025, 3:08 a.m. OK C++17 (GCC 7-32) TESTS 50 780 102400
340274434 _l_l_ E2 Sept. 25, 2025, 1:51 a.m. OK C++17 (GCC 7-32) TESTS 50 796 102400
340194377 HaramuraNodoka E2 Sept. 24, 2025, 1:39 p.m. OK C++17 (GCC 7-32) TESTS 50 828 0
340184866 Sai_t E2 Sept. 24, 2025, 1:07 p.m. OK C++17 (GCC 7-32) TESTS 50 905 307200
340269708 xvchongyv E2 Sept. 25, 2025, 12:49 a.m. OK C++17 (GCC 7-32) TESTS 50 921 102400
340201619 Amoo_Safar E2 Sept. 24, 2025, 2:07 p.m. OK C++20 (GCC 13-64) TESTS 50 437 102400
340207727 PEIMUDA E2 Sept. 24, 2025, 2:32 p.m. OK C++20 (GCC 13-64) TESTS 50 468 0
340204016 adam01 E2 Sept. 24, 2025, 2:18 p.m. OK C++20 (GCC 13-64) TESTS 50 484 102400
340245114 Igorjan94 E2 Sept. 24, 2025, 6:32 p.m. OK C++20 (GCC 13-64) TESTS 50 499 102400
340216481 GOTKAKO E2 Sept. 24, 2025, 3:41 p.m. OK C++20 (GCC 13-64) TESTS 50 499 102400
340227204 siganai E2 Sept. 24, 2025, 5:01 p.m. OK C++20 (GCC 13-64) TESTS 50 500 204800
340242188 anmichi E2 Sept. 24, 2025, 6:14 p.m. OK C++20 (GCC 13-64) TESTS 50 514 204800
340236730 VitalyKo E2 Sept. 24, 2025, 5:35 p.m. OK C++20 (GCC 13-64) TESTS 50 515 0
340222061 Abdullo-Shamsiev E2 Sept. 24, 2025, 4:23 p.m. OK C++20 (GCC 13-64) TESTS 50 515 102400
340201905 Mapakaka E2 Sept. 24, 2025, 2:08 p.m. OK C++20 (GCC 13-64) TESTS 50 515 102400
340209357 wxy2010 E2 Sept. 24, 2025, 2:38 p.m. OK C++23 (GCC 14-64, msys2) TESTS 50 421 102400
340233308 vedantkohad E2 Sept. 24, 2025, 5:13 p.m. OK C++23 (GCC 14-64, msys2) TESTS 50 437 102400
340276032 deltarune E2 Sept. 25, 2025, 2:12 a.m. OK C++23 (GCC 14-64, msys2) TESTS 50 452 0
340198272 TBWW E2 Sept. 24, 2025, 1:53 p.m. OK C++23 (GCC 14-64, msys2) TESTS 50 468 0
340279390 ecnerwala E2 Sept. 25, 2025, 3:09 a.m. OK C++23 (GCC 14-64, msys2) TESTS 50 468 102400
340197528 ksun48 E2 Sept. 24, 2025, 1:51 p.m. OK C++23 (GCC 14-64, msys2) TESTS 50 468 102400
340285658 Wansur E2 Sept. 25, 2025, 4:25 a.m. OK C++23 (GCC 14-64, msys2) TESTS 50 468 8089600
340267066 Boboge E2 Sept. 24, 2025, 11:57 p.m. OK C++23 (GCC 14-64, msys2) TESTS 50 499 102400
340236132 ibrm E2 Sept. 24, 2025, 5:31 p.m. OK C++23 (GCC 14-64, msys2) TESTS 50 499 102400
340224759 shinchankosen E2 Sept. 24, 2025, 4:43 p.m. OK C++23 (GCC 14-64, msys2) TESTS 50 499 102400
340198186 arvindf232 E2 Sept. 24, 2025, 1:53 p.m. OK Kotlin 2.2 TESTS 50 1390 1843200
340257586 twosquares E2 Sept. 24, 2025, 8:26 p.m. OK PyPy 3-64 TESTS 50 1062 10342400
340197246 __baozii__ E2 Sept. 24, 2025, 1:49 p.m. OK PyPy 3-64 TESTS 50 1140 11059200
340196827 toam E2 Sept. 24, 2025, 1:48 p.m. OK PyPy 3-64 TESTS 50 1186 10854400
340202994 bribritt E2 Sept. 24, 2025, 2:14 p.m. OK PyPy 3-64 TESTS 50 1359 11468800
340237211 VitalyKo E2 Sept. 24, 2025, 5:39 p.m. OK PyPy 3-64 TESTS 50 1405 10752000

remove filters

Back to search problems