Codeforces Round 803 (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
1698 Codeforces Round 803 (Div. 2) FINISHED False 8100 80839463 June 28, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 9823 ) D Fixed Point Guessing PROGRAMMING binary search constructive algorithms interactive

B'This is an interactive problem. Initially, there is an array a = [1, 2, ldots, n] , where n is an odd positive integer. The jury has selected frac{n-1}{2} disjoint pairs of elements, and then the elements in those pairs are swapped. For example, if a=[1,2,3,4,5] , and the pairs 1 <= ftrightarrow 4 and 3 <= ftrightarrow 5 are swapped, then the resulting array is [4, 2, 5, 1, 3] . As a result of these swaps, exactly one element will not change position. You need to find this element. To do this, you can ask several queries. In each query, you can pick two integers l and r ( 1 <= q l <= q r <= q n ). In return, you will be given the elements of the subarray [a_l, a_{l + 1}, ... , a_r] sorted in increasing order. Find the element which did not change position. You can make at most mathbf{15} queries. The array a is fixed before the interaction and does not change after your queries. Recall that an array b is a subarray of the array a if b can be obtained from a by deletion of several (possibly, zero or all) elements from the beginning and several (possibly, zero or all) elements from the end. Each test contains multiple test cases. The first line contains an integer t ( 1 <= q t <= q 500 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains an integer n ( 3 <= q n < 10^4 ; n is odd) -- the length of the array a . After reading the first line of each test case, you should begin the interaction. It is guaranteed that the sum of n over all test cases does not exceed 10^4 . For each test case, begin the interaction by reading the integer n . To make a query, output " texttt{?} ;l ;r " ( 1 <= q l <= q r <= q n ) without quotes. Afterwards, you should read in r-l+1 integers -- the integers a_l, a_{l + 1}, ... , a_r , in increasing '...

Tutorials

Codeforces Round #803 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
162188746 szzz- D June 29, 2022, 1:49 a.m. OK C# 10 TESTS 11 61 614400
162188572 szzz- D June 29, 2022, 1:47 a.m. OK C# 10 TESTS 11 62 614400
162164495 bobby12345 D June 28, 2022, 6:11 p.m. OK Clang++17 Diagnostics TESTS 11 124 102400
162170577 ruban D June 28, 2022, 7:11 p.m. OK Delphi TESTS 11 30 45977600
162159170 rainboy D June 28, 2022, 5:34 p.m. OK GNU C11 TESTS 11 31 0
162199292 monuchauhan212223 D June 29, 2022, 4:48 a.m. OK GNU C++14 TESTS 11 15 0
162196021 bobgil D June 29, 2022, 3:57 a.m. OK GNU C++14 TESTS 11 15 0
162195722 dlglg D June 29, 2022, 3:52 a.m. OK GNU C++14 TESTS 11 15 0
162195292 shashank_mangal D June 29, 2022, 3:44 a.m. OK GNU C++14 TESTS 11 15 0
162195136 xiaxiakeji D June 29, 2022, 3:41 a.m. OK GNU C++14 TESTS 11 15 0
162192381 NanZaaa D June 29, 2022, 2:55 a.m. OK GNU C++14 TESTS 11 15 0
162192033 A_fei D June 29, 2022, 2:48 a.m. OK GNU C++14 TESTS 11 15 0
162188592 Je3ter D June 29, 2022, 1:47 a.m. OK GNU C++14 TESTS 11 15 0
162201605 addycoder0110 D June 29, 2022, 5:22 a.m. OK GNU C++14 TESTS 11 15 0
162199870 cbdsopa D June 29, 2022, 4:57 a.m. OK GNU C++14 TESTS 11 15 0
162170242 sz_02 D June 28, 2022, 7:06 p.m. OK GNU C++17 TESTS 11 0 0
162175292 DarkEnergy D June 28, 2022, 8:18 p.m. OK GNU C++17 TESTS 11 0 0
162202963 bravo.jr D June 29, 2022, 5:41 a.m. OK GNU C++17 TESTS 11 15 0
162203015 lniiwuw_y D June 29, 2022, 5:42 a.m. OK GNU C++17 TESTS 11 15 0
162202242 Saransh6772 D June 29, 2022, 5:31 a.m. OK GNU C++17 TESTS 11 15 0
162202131 sahiljaveri D June 29, 2022, 5:29 a.m. OK GNU C++17 TESTS 11 15 0
162201985 Dhruvil_Kakadiya D June 29, 2022, 5:27 a.m. OK GNU C++17 TESTS 11 15 0
162201931 LostPrince D June 29, 2022, 5:27 a.m. OK GNU C++17 TESTS 11 15 0
162201467 bansalpranav D June 29, 2022, 5:20 a.m. OK GNU C++17 TESTS 11 15 0
162201366 pronoob_02 D June 29, 2022, 5:19 a.m. OK GNU C++17 TESTS 11 15 0
162201017 GudeGude D June 29, 2022, 5:14 a.m. OK GNU C++17 (64) TESTS 11 15 0
162196406 Scano D June 29, 2022, 4:03 a.m. OK GNU C++17 (64) TESTS 11 15 0
162192234 Einstein1234 D June 29, 2022, 2:52 a.m. OK GNU C++17 (64) TESTS 11 15 0
162190315 RetsaZC19 D June 29, 2022, 2:16 a.m. OK GNU C++17 (64) TESTS 11 15 0
162183790 Havoc_01 D June 28, 2022, 11:51 p.m. OK GNU C++17 (64) TESTS 11 15 0
162182729 Rick_GT D June 28, 2022, 11:17 p.m. OK GNU C++17 (64) TESTS 11 15 0
162181401 akwa_blue D June 28, 2022, 10:35 p.m. OK GNU C++17 (64) TESTS 11 15 0
162179650 os-moussao D June 28, 2022, 9:44 p.m. OK GNU C++17 (64) TESTS 11 15 0
162179305 urBCI D June 28, 2022, 9:36 p.m. OK GNU C++17 (64) TESTS 11 15 0
162203949 kumarnimit0316 D June 29, 2022, 5:54 a.m. OK GNU C++17 (64) TESTS 11 15 0
162157776 figurativelyofc D June 28, 2022, 5:26 p.m. OK GNU C++20 (64) TESTS 11 0 102400
162199464 AshutoshGangwar D June 29, 2022, 4:51 a.m. OK GNU C++20 (64) TESTS 11 0 102400
162204465 __Harsh__ D June 29, 2022, 6 a.m. OK GNU C++20 (64) TESTS 11 15 0
162204337 Casio991ms D June 29, 2022, 5:59 a.m. OK GNU C++20 (64) TESTS 11 15 0
162203535 blank_monster D June 29, 2022, 5:48 a.m. OK GNU C++20 (64) TESTS 11 15 0
162201461 Bruce12138 D June 29, 2022, 5:20 a.m. OK GNU C++20 (64) TESTS 11 15 0
162199986 khanhvinh9 D June 29, 2022, 4:59 a.m. OK GNU C++20 (64) TESTS 11 15 0
162199315 AshutoshGangwar D June 29, 2022, 4:49 a.m. OK GNU C++20 (64) TESTS 11 15 0
162197111 harsh_malik D June 29, 2022, 4:14 a.m. OK GNU C++20 (64) TESTS 11 15 0
162204608 __Harsh__ D June 29, 2022, 6:02 a.m. OK GNU C++20 (64) TESTS 11 15 0
162185625 koqo D June 29, 2022, 12:43 a.m. OK Go TESTS 11 30 102400
162192449 satyaa_78 D June 29, 2022, 2:56 a.m. OK Java 11 TESTS 11 265 0
162203548 ArchitSharma D June 29, 2022, 5:49 a.m. OK Java 11 TESTS 11 311 0
162196514 dhruvil_01 D June 29, 2022, 4:05 a.m. OK Java 11 TESTS 11 311 0
162176014 amanpatel23 D June 28, 2022, 8:30 p.m. OK Java 11 TESTS 11 311 0
162168667 revolio D June 28, 2022, 6:49 p.m. OK Java 11 TESTS 11 311 0
162165133 OhLee D June 28, 2022, 6:16 p.m. OK Java 11 TESTS 11 311 204800
162197635 gurkaran_s D June 29, 2022, 4:22 a.m. OK Java 11 TESTS 11 327 0
162179451 saksham19270 D June 28, 2022, 9:39 p.m. OK Java 11 TESTS 11 327 0
162165726 goyalronak3 D June 28, 2022, 6:21 p.m. OK Java 11 TESTS 11 327 0
162200137 prac_123 D June 29, 2022, 5:01 a.m. OK Java 11 TESTS 11 343 204800
162166764 vipulm7 D June 28, 2022, 6:30 p.m. OK Java 8 TESTS 11 186 0
162158641 NoobAk D June 28, 2022, 5:31 p.m. OK Java 8 TESTS 11 186 0
162156396 EndlessVoid D June 28, 2022, 5:19 p.m. OK Java 8 TESTS 11 186 0
162161477 aryaman_571 D June 28, 2022, 5:49 p.m. OK Java 8 TESTS 11 187 0
162199116 tanishq044 D June 29, 2022, 4:45 a.m. OK Java 8 TESTS 11 217 0
162176781 leonlian D June 28, 2022, 8:43 p.m. OK Java 8 TESTS 11 233 0
162163821 fatant D June 28, 2022, 6:06 p.m. OK MS C++ 2017 TESTS 11 15 307200
162200303 conqueror_of_titia D June 29, 2022, 5:04 a.m. OK PyPy 3 TESTS 11 155 4403200
162163654 shivam_751 D June 28, 2022, 6:05 p.m. OK PyPy 3 TESTS 11 202 5324800
162160119 hash1023 D June 28, 2022, 5:40 p.m. OK PyPy 3 TESTS 11 265 5222400
162163083 namans777 D June 28, 2022, 6 p.m. OK PyPy 3 TESTS 11 296 6553600
162169064 pavanfknkarthik D June 28, 2022, 6:53 p.m. OK PyPy 3 TESTS 11 327 7987200
162158425 shehebe D June 28, 2022, 5:30 p.m. OK PyPy 3 TESTS 11 343 8601600
162157982 anishde85 D June 28, 2022, 5:27 p.m. OK PyPy 3 TESTS 11 358 12697600
162171197 MistaAsh D June 28, 2022, 7:20 p.m. OK PyPy 3-64 TESTS 11 202 3481600
162164957 Yusif D June 28, 2022, 6:15 p.m. OK PyPy 3-64 TESTS 11 233 3072000
162154122 roee D June 28, 2022, 4:49 p.m. OK PyPy 3-64 TESTS 11 264 3276800
162191732 poornaTheja D June 29, 2022, 2:43 a.m. OK PyPy 3-64 TESTS 11 264 3379200
162158836 PMiguelez D June 28, 2022, 5:32 p.m. OK PyPy 3-64 TESTS 11 264 3993600
162175708 Istarchick D June 28, 2022, 8:25 p.m. OK PyPy 3-64 TESTS 11 280 2764800
162180778 _icy_ D June 28, 2022, 10:17 p.m. OK PyPy 3-64 TESTS 11 280 3072000
162169174 ronitsingh D June 28, 2022, 6:54 p.m. OK PyPy 3-64 TESTS 11 280 3481600
162177269 Perseus2811 D June 28, 2022, 8:52 p.m. OK PyPy 3-64 TESTS 11 280 4198400
162194057 dalgu D June 29, 2022, 3:24 a.m. OK PyPy 3-64 TESTS 11 296 3584000
162201593 kumar_devesh D June 29, 2022, 5:22 a.m. OK Python 3 TESTS 11 77 0
162201290 kumar_devesh D June 29, 2022, 5:18 a.m. OK Python 3 TESTS 11 77 0
162158783 aditya3369 D June 28, 2022, 5:32 p.m. OK Python 3 TESTS 11 77 0
162189318 prathamnagaria D June 29, 2022, 1:59 a.m. OK Python 3 TESTS 11 78 0
162158715 mihir111p D June 28, 2022, 5:31 p.m. OK Python 3 TESTS 11 93 0
162157329 williamcz D June 28, 2022, 5:24 p.m. OK Python 3 TESTS 11 93 0
162196869 temper_1122 D June 29, 2022, 4:10 a.m. OK Python 3 TESTS 11 109 0
162178070 r-tron18 D June 28, 2022, 9:08 p.m. OK Python 3 TESTS 11 109 0
162174391 RedSpica D June 28, 2022, 8:04 p.m. OK Python 3 TESTS 11 109 716800
162203480 michaleproff D June 29, 2022, 5:48 a.m. OK Python 3 TESTS 11 124 0
162162183 Akash_123 D June 28, 2022, 5:54 p.m. OK Rust 2021 TESTS 11 46 204800

remove filters

Back to search problems