Atto Round 1 (Codeforces Round 1041, Div. 1 + Div. 2)

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
2127 Atto Round 1 (Codeforces Round 1041, Div. 1 + Div. 2) FINISHED False 10800 21828323 Aug. 7, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 99 ) G1 Inter Active (Easy Version) PROGRAMMING binary search constructive algorithms interactive interactive

This is the easy version of the problem. The difference between the versions is that in this version, you can make at most (15\cdot n) queries. You can hack only if you solved all versions of this problem. Ali loved Bahamin's gift (from problem E) so much that he illegally traveled from Qazvin to Liverpool to have the gift signed by football players. Now Interpol is searching for him, but they've offered a deal: solve a problem, and he can stay in Liverpool. But since he's currently at the stadium, he can't solve it — so he asked you to do it. This is an interactive problem. There is a hidden permutation(^{\text{∗}}) (p) of length (n\ge 4), where (p_i \neq i) for each (1 \leq i \leq n). Initially, you should give the jury a positive integer (k\le n), which will be constant through future queries. Then you need to find permutation (p) using some queries. In each query, you give a permutation (q_1, q_2, \ldots, q_n) to the jury. In response, you will receive the number of pairs ((i, j)) such that all of the following conditions hold: (i \lt j); (p_{q_i} = q_j); (i \neq k). ((k) is the constant you have given to the jury) You are given (n), and you need to find the permutation (p) in at most (15\cdot n) queries. (^{\text{∗}})A permutation of length (n) is an array consisting of (n) distinct integers from (1) to (n) in arbitrary order. For example, (2,3,1,5,4) is a permutation, but (1,2,2) is not a permutation ((2) appears twice in the array), and (1,3,4) is also not a permutation ((n=3) but there is (4) in the array). Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 500)). The description of the test cases follows. The only line of each test case contains a single integer (n) ((4 \leq n \leq 100)) — the length of (p). It is guaranteed that the sum of (n^2) over a

Tutorials

Atto Round 1 (Codeforces Round 1041, Div. 1 + Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
332946080 qiuzx G1 Aug. 8, 2025, 3:17 a.m. OK C++20 (GCC 13-64) TESTS 100 109 102400
332931863 EJIC_B_KEDAX G1 Aug. 7, 2025, 10:50 p.m. OK C++20 (GCC 13-64) TESTS 100 124 102400
332925942 AlefHeKaaf G1 Aug. 7, 2025, 8:34 p.m. OK C++20 (GCC 13-64) TESTS 100 124 102400
332905936 tourist G1 Aug. 7, 2025, 5:32 p.m. OK C++20 (GCC 13-64) TESTS 100 124 102400
332913177 Radewoosh G1 Aug. 7, 2025, 6:30 p.m. OK C++20 (GCC 13-64) TESTS 100 156 4096000
332906555 turmax G1 Aug. 7, 2025, 5:33 p.m. OK C++20 (GCC 13-64) TESTS 100 249 102400
332907190 maspy G1 Aug. 7, 2025, 5:34 p.m. OK C++23 (GCC 14-64, msys2) TESTS 100 108 102400
332953120 Dominater069 G1 Aug. 8, 2025, 4:47 a.m. OK C++23 (GCC 14-64, msys2) TESTS 100 124 102400
332933019 A_G G1 Aug. 7, 2025, 11:32 p.m. OK C++23 (GCC 14-64, msys2) TESTS 100 124 102400
332928074 ckuhn222 G1 Aug. 7, 2025, 9:11 p.m. OK C++23 (GCC 14-64, msys2) TESTS 100 124 102400
332899859 jiangly G1 Aug. 7, 2025, 5:18 p.m. OK C++23 (GCC 14-64, msys2) TESTS 100 124 102400
332956766 Dominater069 G1 Aug. 8, 2025, 5:30 a.m. OK C++23 (GCC 14-64, msys2) TESTS 100 140 102400
332926711 eminem16 G1 Aug. 7, 2025, 8:47 p.m. OK C++23 (GCC 14-64, msys2) TESTS 100 140 102400
332922830 iitamansharma G1 Aug. 7, 2025, 7:54 p.m. OK C++23 (GCC 14-64, msys2) TESTS 100 140 102400
332919859 Mahammad_12 G1 Aug. 7, 2025, 7:22 p.m. OK C++23 (GCC 14-64, msys2) TESTS 100 218 102400
332915571 Petr G1 Aug. 7, 2025, 6:45 p.m. OK C++23 (GCC 14-64, msys2) TESTS 100 218 102400
332917286 rainboy G1 Aug. 7, 2025, 6:59 p.m. OK GNU C11 TESTS 100 421 8396800
332902889 __baozii__ G1 Aug. 7, 2025, 5:25 p.m. OK PyPy 3-64 TESTS 100 500 9011200

remove filters

Back to search problems