Codeforces Round 930 (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
1936 Codeforces Round 930 (Div. 1) FINISHED False 7200 22605899 Feb. 29, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7509 ) A Bitwise Operation Wizard PROGRAMMING bitmasks constructive algorithms greedy interactive math

B'This is an interactive problem. There is a secret sequence p_0, p_1, ldots, p_{n-1} , which is a permutation of {0,1, ldots,n-1 } . You need to find any two indices i and j such that p_i oplus p_j is maximized, where oplus denotes the bitwise XOR operation. To do this, you can ask queries. Each query has the following form: you pick arbitrary indices a , b , c , and d ( 0 <= a,b,c,d < n ). Next, the jury calculates x = (p_a mid p_b) and y = (p_c mid p_d) , where | denotes the bitwise OR operation. Finally, you receive the result of comparison between x and y . In other words, you are told if x < y , x > y , or x = y . Please find any two indices i and j ( 0 <= i,j < n ) such that p_i oplus p_j is maximum among all such pairs, using at most 3n queries. If there are multiple pairs of indices satisfying the condition, you may output any one of them. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 10^3 ). The description of the test cases follows. The first line of each test case contains one integer n ( 2 <= n <= 10^4 ). At this moment, the permutation p_0, p_1, ldots, p_{n-1} is chosen. The interactor in this task is not adaptive. In other words, the sequence p is fixed in every test case and does not change during the interaction. To ask a query, you need to pick four indices a , b , c , and d ( 0 <= a,b,c,d < n ) and print the line of the following form: After that, you receive: You can make at most 3n queries of this form. Next, if your program has found a pair of indices i and j ( 0 <= i, j < n ) such that p_i oplus p_j is maximized, print the line of the following form: Note that this line is not considered a query and is not taken into account when counting the number of'...

Tutorials

Codeforces Round 930 (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
248915862 Gassa A Feb. 29, 2024, 2:52 p.m. OK D TESTS 17 295 2150400
248922864 hos.lyric A Feb. 29, 2024, 3:03 p.m. OK D TESTS 17 327 1945600
249009003 HexShift A March 1, 2024, 12:25 a.m. OK GNU C++17 TESTS 17 140 102400
248919714 MCPlayer542 A Feb. 29, 2024, 2:58 p.m. OK GNU C++17 TESTS 17 155 0
248924397 kookeudas A Feb. 29, 2024, 3:06 p.m. OK GNU C++17 TESTS 17 155 102400
248923935 franfill A Feb. 29, 2024, 3:05 p.m. OK GNU C++17 TESTS 17 155 102400
248912351 plast A Feb. 29, 2024, 2:47 p.m. OK GNU C++17 TESTS 17 155 102400
248967520 sg0071729 A Feb. 29, 2024, 4:26 p.m. OK GNU C++17 TESTS 17 171 0
248967007 KamishirasawaKeine A Feb. 29, 2024, 4:25 p.m. OK GNU C++17 TESTS 17 171 0
248927137 Cubyte A Feb. 29, 2024, 3:10 p.m. OK GNU C++17 TESTS 17 171 0
248911364 gauss2718281 A Feb. 29, 2024, 2:46 p.m. OK GNU C++17 TESTS 17 171 0
249016328 chandu1479 A March 1, 2024, 2:42 a.m. OK GNU C++17 TESTS 17 171 102400
249019885 AC-Automation A March 1, 2024, 3:37 a.m. OK GNU C++17 (64) TESTS 17 140 0
249027406 Superposition A March 1, 2024, 5:08 a.m. OK GNU C++17 (64) TESTS 17 155 0
248922213 -is-this-fft- A Feb. 29, 2024, 3:02 p.m. OK GNU C++17 (64) TESTS 17 155 0
248913615 stepanov.aa A Feb. 29, 2024, 2:49 p.m. OK GNU C++17 (64) TESTS 17 155 0
248914958 t98slider A Feb. 29, 2024, 2:51 p.m. OK GNU C++17 (64) TESTS 17 155 102400
249025140 JML A March 1, 2024, 4:44 a.m. OK GNU C++17 (64) TESTS 17 171 0
249015794 MrPython A March 1, 2024, 2:34 a.m. OK GNU C++17 (64) TESTS 17 171 0
249003772 TsukikoTsutsukakushi A Feb. 29, 2024, 10:29 p.m. OK GNU C++17 (64) TESTS 17 171 0
248970933 aaaaawa A Feb. 29, 2024, 4:32 p.m. OK GNU C++17 (64) TESTS 17 171 0
248963991 Xellos A Feb. 29, 2024, 4:19 p.m. OK GNU C++17 (64) TESTS 17 171 0
249023256 kilkuwu A March 1, 2024, 4:20 a.m. OK GNU C++20 (64) TESTS 17 140 0
248920083 umbral A Feb. 29, 2024, 2:59 p.m. OK GNU C++20 (64) TESTS 17 140 0
248915609 installb A Feb. 29, 2024, 2:52 p.m. OK GNU C++20 (64) TESTS 17 140 0
249028723 trilasha_14 A March 1, 2024, 5:21 a.m. OK GNU C++20 (64) TESTS 17 155 0
249028499 874641984 A March 1, 2024, 5:18 a.m. OK GNU C++20 (64) TESTS 17 155 0
249027435 coxie A March 1, 2024, 5:09 a.m. OK GNU C++20 (64) TESTS 17 155 0
249018206 blitztage A March 1, 2024, 3:13 a.m. OK GNU C++20 (64) TESTS 17 155 0
249014919 Sakuya_maid A March 1, 2024, 2:20 a.m. OK GNU C++20 (64) TESTS 17 155 0
249009926 AiHAn A March 1, 2024, 12:45 a.m. OK GNU C++20 (64) TESTS 17 155 0
249008259 Ayalla A March 1, 2024, 12:07 a.m. OK GNU C++20 (64) TESTS 17 155 0
248925281 profchi A Feb. 29, 2024, 3:07 p.m. OK Java 21 TESTS 17 1122 819200
248926087 FierteDeCeylan A Feb. 29, 2024, 3:09 p.m. OK Java 21 TESTS 17 1122 1024000
248939223 cc4414 A Feb. 29, 2024, 3:32 p.m. OK Java 8 TESTS 17 842 0
248915787 arvindf232 A Feb. 29, 2024, 2:52 p.m. OK Kotlin 1.9 TESTS 17 436 0
248910459 6ziv A Feb. 29, 2024, 2:45 p.m. OK MS C++ 2017 TESTS 17 249 0
248923782 -_TIMOFEY_- A Feb. 29, 2024, 3:05 p.m. OK MS C++ 2017 TESTS 17 311 0
248985263 ErikUs A Feb. 29, 2024, 7:01 p.m. OK PyPy 3 TESTS 17 1091 9932800
248919660 zacker-22 A Feb. 29, 2024, 2:58 p.m. OK PyPy 3 TESTS 17 1138 10444800
248925812 misorin A Feb. 29, 2024, 3:08 p.m. OK PyPy 3-64 TESTS 17 374 4710400
248918674 alxwen711 A Feb. 29, 2024, 2:56 p.m. OK PyPy 3-64 TESTS 17 670 8908800
249029280 tahuruzzoha A March 1, 2024, 5:26 a.m. OK PyPy 3-64 TESTS 17 685 9625600
248915529 Shirotsume A Feb. 29, 2024, 2:52 p.m. OK PyPy 3-64 TESTS 17 686 10240000
249013390 Little_Sheep_Yawn A March 1, 2024, 1:53 a.m. OK PyPy 3-64 TESTS 17 701 11673600
248915396 Beacon A Feb. 29, 2024, 2:52 p.m. OK PyPy 3-64 TESTS 17 733 10137600
249028190 yuki_keshiki A March 1, 2024, 5:15 a.m. OK PyPy 3-64 TESTS 17 748 9830400
248924409 yupooh A Feb. 29, 2024, 3:06 p.m. OK PyPy 3-64 TESTS 17 748 9830400
248946920 teekaytai A Feb. 29, 2024, 3:46 p.m. OK PyPy 3-64 TESTS 17 748 10137600
248969435 chinerist A Feb. 29, 2024, 4:30 p.m. OK PyPy 3-64 TESTS 17 764 9728000
249021607 OLOGY A March 1, 2024, 3:59 a.m. OK Python 2 TESTS 17 265 204800
249022456 OLOGY A March 1, 2024, 4:11 a.m. OK Python 2 TESTS 17 280 204800
249023085 OLOGY A March 1, 2024, 4:18 a.m. OK Python 2 TESTS 17 312 0
249022418 OLOGY A March 1, 2024, 4:10 a.m. OK Python 2 TESTS 17 327 204800
248918222 Jimanbanashi A Feb. 29, 2024, 2:56 p.m. OK Python 2 TESTS 17 343 0
248915956 shade34 A Feb. 29, 2024, 2:52 p.m. OK Python 3 TESTS 17 608 102400
248913013 Egor A Feb. 29, 2024, 2:48 p.m. OK Rust 2021 TESTS 17 296 0
248923982 andrey.m A Feb. 29, 2024, 3:05 p.m. OK Rust 2021 TESTS 17 358 0

remove filters

Back to search problems