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. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 104 ) | G2 | Inter Active (Hard Version) | PROGRAMMING | binary search bitmasks constructive algorithms graphs implementation interactive math probabilities |
This is the hard version of the problem. The difference between the versions is that in this version, you can make at most (10\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 (10\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 |
| Atto Round 1 (Codeforces Round 1041, 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 332918725 | tourist | G2 | Aug. 7, 2025, 7:11 p.m. | OK | C++20 (GCC 13-64) | TESTS | 100 | 140 | 102400 | ||
| 332931844 | EJIC_B_KEDAX | G2 | Aug. 7, 2025, 10:49 p.m. | OK | C++20 (GCC 13-64) | TESTS | 100 | 171 | 102400 | ||
| 332918772 | vedantkohad | G2 | Aug. 7, 2025, 7:12 p.m. | OK | C++20 (GCC 13-64) | TESTS | 100 | 421 | 102400 | ||
| 332934433 | zhongjunwei | G2 | Aug. 8, 2025, 12:14 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 100 | 108 | 102400 | ||
| 332922700 | iitamansharma | G2 | Aug. 7, 2025, 7:53 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 100 | 124 | 102400 | ||
| 332899962 | jiangly | G2 | Aug. 7, 2025, 5:18 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 100 | 156 | 102400 | ||
| 332919934 | Mahammad_12 | G2 | Aug. 7, 2025, 7:23 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 100 | 358 | 102400 | ||
| 332903267 | ksun48 | G2 | Aug. 7, 2025, 5:26 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 100 | 405 | 102400 | ||
| 332916470 | rainboy | G2 | Aug. 7, 2025, 6:52 p.m. | OK | GNU C11 | TESTS | 100 | 468 | 8396800 | ||
| 332907057 | conqueror_of_tourist | G2 | Aug. 7, 2025, 5:34 p.m. | OK | PyPy 3-64 | TESTS | 100 | 952 | 10649600 |
Back to search problems