Codeforces Global Round 24

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
1764 Codeforces Global Round 24 FINISHED False 9000 67794863 Nov. 26, 2022, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 478 ) G3 Doremy's Perfect DS Class (Hard Version) PROGRAMMING binary search interactive

B'The only difference between this problem and the other two versions is the maximum number of queries. In this version, you are allowed to ask at most mathbf{20} queries. You can make hacks only if all versions of the problem are solved. This is an interactive problem. "Everybody! Doremy 's Perfect Data Structure Class is about to start! Come and do your best if you want to have as much IQ as me!" In today 's Data Structure class, Doremy is teaching everyone a powerful data structure -- Doremy tree! Now she gives you a quiz to prove that you are paying attention in class. Given an array a of length m , Doremy tree supports the query Q(l,r,k) , where 1 <= q l <= q r <= q m and 1 <= q k <= q m , which returns the number of distinct integers in the array <= ft[ lfloor frac{a_l}{k} rfloor, lfloor frac{a_{l+1}}{k} rfloor, ldots, lfloor frac{a_r}{k} rfloor right] . Doremy has a secret permutation p of integers from 1 to n . You can make queries, in one query, you give 3 integers l,r,k ( 1 <= q l <= q r <= q n , 1 <= q k <= q n ) and receive the value of Q(l,r,k) for the array p . Can you find the index y ( 1 <= q y <= q n ) such that p_y=1 in at most mathbf{20} queries? Note that the permutation p is fixed before any queries are made. You begin the interaction by reading an integer n ( 3 <= n <= 1024 ) in the first line -- the length of the permutation. To make a query, you should output To give the answer, you should output After printing a query or the answer, do not forget to output the end of line and flush the output. Otherwise, you will get Idleness limit exceeded. To do this, use: Hacks Format The first line of the hack contains an integer n ( 3 <= n <= 1024 ) -- the length of the permutation. The second line of the hack contains n distinct integers p_1,p_2, ldots,p_n ( 1 <= p_i <= n ) xe2'...

Tutorials

Codeforces Global Round 24 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
182696328 rainboy G3 Nov. 26, 2022, 4:20 p.m. OK GNU C11 TESTS 66 15 0
182740932 m1979823301m G3 Nov. 27, 2022, 5:13 a.m. OK GNU C++14 TESTS 66 15 0
182702027 tomerun G3 Nov. 26, 2022, 5:02 p.m. OK GNU C++14 TESTS 66 15 204800
182683473 chuochuo G3 Nov. 26, 2022, 3:22 p.m. OK GNU C++14 TESTS 66 15 307200
182703827 loser2k3 G3 Nov. 26, 2022, 5:15 p.m. OK GNU C++17 TESTS 66 15 0
182698167 ugly2333 G3 Nov. 26, 2022, 4:28 p.m. OK GNU C++17 TESTS 66 15 0
182692089 fivedemands G3 Nov. 26, 2022, 3:59 p.m. OK GNU C++17 TESTS 66 15 0
182706463 dmenezes G3 Nov. 26, 2022, 5:38 p.m. OK GNU C++17 TESTS 66 15 0
182710010 Agreb G3 Nov. 26, 2022, 6:11 p.m. OK GNU C++17 TESTS 66 15 102400
182738247 yuto1115 G3 Nov. 27, 2022, 4:16 a.m. OK GNU C++17 TESTS 66 15 307200
182719248 ta4p G3 Nov. 26, 2022, 8:11 p.m. OK GNU C++17 TESTS 66 15 409600
182696727 GoRed G3 Nov. 26, 2022, 4:22 p.m. OK GNU C++17 TESTS 66 31 7987200
182719849 Benq G3 Nov. 26, 2022, 8:21 p.m. OK GNU C++17 (64) TESTS 66 15 0
182709901 neal G3 Nov. 26, 2022, 6:10 p.m. OK GNU C++17 (64) TESTS 66 15 0
182731946 353cerega G3 Nov. 27, 2022, 1:14 a.m. OK GNU C++17 (64) TESTS 66 30 307200
182699127 TLEwpdus G3 Nov. 26, 2022, 4:32 p.m. OK GNU C++17 (64) TESTS 66 31 0
182703307 QAQAutoMaton G3 Nov. 26, 2022, 5:10 p.m. OK GNU C++17 (64) TESTS 66 31 5017600
182739872 crescent_yhw G3 Nov. 27, 2022, 4:53 a.m. OK GNU C++20 (64) TESTS 66 15 0
182736624 dragonslayerintraining G3 Nov. 27, 2022, 3:37 a.m. OK GNU C++20 (64) TESTS 66 15 0
182701935 jiangly G3 Nov. 26, 2022, 5:02 p.m. OK GNU C++20 (64) TESTS 66 15 0
182734370 njwrz G3 Nov. 27, 2022, 2:32 a.m. OK GNU C++20 (64) TESTS 66 15 0
182741998 liaopengfei G3 Nov. 27, 2022, 5:31 a.m. OK GNU C++20 (64) TESTS 66 15 0
182733535 dreamoon_love_AA G3 Nov. 27, 2022, 2:08 a.m. OK GNU C++20 (64) TESTS 66 15 4198400
182733945 JovanB G3 Nov. 27, 2022, 2:19 a.m. OK GNU C++20 (64) TESTS 66 15 4300800
182694298 turmax G3 Nov. 26, 2022, 4:10 p.m. OK GNU C++20 (64) TESTS 66 31 0
182696835 Maksim1744 G3 Nov. 26, 2022, 4:22 p.m. OK GNU C++20 (64) TESTS 66 31 0
182699636 gyh20 G3 Nov. 26, 2022, 4:34 p.m. OK GNU C++20 (64) TESTS 66 31 16076800
182696902 Tlatoani G3 Nov. 26, 2022, 4:23 p.m. OK Kotlin 1.6 TESTS 66 248 0

remove filters

Back to search problems