Codeforces Round 703 (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
1486 Codeforces Round 703 (Div. 2) FINISHED False 8100 123607463 Feb. 18, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8782 ) C2 Guessing the Greatest (hard version) PROGRAMMING binary search interactive

B'The only difference between the easy and the hard version is the limit to the number of queries. This is an interactive problem. There is an array a of n different numbers. In one query you can ask the position of the second maximum element in a subsegment a[l..r] . Find the position of the maximum element in the array in no more than 20 queries. A subsegment a[l..r] is all the elements a_l, a_{l + 1}, ..., a_r . After asking this subsegment you will be given the position of the second maximum from this subsegment in the whole array. The first line contains a single integer n (2 <= q n <= q 10^5) -- the number of elements in the array. You can ask queries by printing "? l r " (1 <= q l < r <= q n) . The answer is the index of the second maximum of all elements a_l, a_{l + 1}, ..., a_r . Array a is fixed beforehand and can 't be changed in time of interaction. You can output the answer by printing "! p ", where p is the index of the maximum element in the array. You can ask no more than 20 queries. Printing the answer doesn 't count as a query. After printing a query do not forget to output end of line and flush the output. Otherwise, you will get Idleness limit exceeded. To do this, use: Hacks To make a hack, use the following test format. In the first line output a single integer n (2 <= q n <= q 10^5) . In the second line output a permutation of n integers 1 to n . The position of n in the permutation is the position of the maximum In the sample suppose a is [5, 1, 4, 2, 3] . So after asking the [1..5] subsegment 4 is second to max value, and it 's position is 3 . After asking the [4..5] subsegment 2 is second to max value and it 's position in the whole array is 4 . Note that there are other arrays a that would produce the same interaction, and the answer for them might be different. Example outp'...

Tutorials

Codeforces Round #703 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
107904518 coreproject.yaking C2 Feb. 19, 2021, 4:53 a.m. OK Clang++17 Diagnostics TESTS 29 46 0
107909340 GhostLX C2 Feb. 19, 2021, 5:52 a.m. OK GNU C++11 TESTS 29 15 0
107909092 detaomega C2 Feb. 19, 2021, 5:50 a.m. OK GNU C++11 TESTS 29 15 0
107908215 raywang4 C2 Feb. 19, 2021, 5:40 a.m. OK GNU C++11 TESTS 29 15 0
107907539 mof C2 Feb. 19, 2021, 5:32 a.m. OK GNU C++11 TESTS 29 15 0
107903833 TechieAnuj C2 Feb. 19, 2021, 4:44 a.m. OK GNU C++11 TESTS 29 15 0
107903559 wuruzhao C2 Feb. 19, 2021, 4:40 a.m. OK GNU C++11 TESTS 29 15 0
107898871 golder_ C2 Feb. 19, 2021, 3:25 a.m. OK GNU C++11 TESTS 29 15 0
107898431 sharad4730 C2 Feb. 19, 2021, 3:17 a.m. OK GNU C++11 TESTS 29 15 0
107897965 Phoenix_ZH C2 Feb. 19, 2021, 3:09 a.m. OK GNU C++11 TESTS 29 15 0
107897873 zech C2 Feb. 19, 2021, 3:07 a.m. OK GNU C++11 TESTS 29 15 0
107894395 Yang_Lin C2 Feb. 19, 2021, 1:45 a.m. OK GNU C++14 TESTS 29 15 0
107878048 InaMinaDika C2 Feb. 18, 2021, 6:49 p.m. OK GNU C++14 TESTS 29 15 0
107877360 Khaled_Mahmoud C2 Feb. 18, 2021, 6:42 p.m. OK GNU C++14 TESTS 29 15 0
107909503 paswan001 C2 Feb. 19, 2021, 5:54 a.m. OK GNU C++14 TESTS 29 30 0
107908799 _sparky C2 Feb. 19, 2021, 5:46 a.m. OK GNU C++14 TESTS 29 30 0
107908518 RedAnt C2 Feb. 19, 2021, 5:43 a.m. OK GNU C++14 TESTS 29 30 0
107906032 lukasdeimos C2 Feb. 19, 2021, 5:13 a.m. OK GNU C++14 TESTS 29 30 0
107900122 baby_dragon C2 Feb. 19, 2021, 3:46 a.m. OK GNU C++14 TESTS 29 30 0
107886404 rynnndl C2 Feb. 18, 2021, 9:03 p.m. OK GNU C++14 TESTS 29 30 0
107886071 caidd C2 Feb. 18, 2021, 8:55 p.m. OK GNU C++14 TESTS 29 30 0
107902078 YinChuanSheng C2 Feb. 19, 2021, 4:20 a.m. OK GNU C++17 TESTS 29 15 0
107899027 Harshit_076 C2 Feb. 19, 2021, 3:27 a.m. OK GNU C++17 TESTS 29 15 0
107891523 RiarioRovere C2 Feb. 18, 2021, 11:59 p.m. OK GNU C++17 TESTS 29 15 0
107887788 GoodFella C2 Feb. 18, 2021, 9:40 p.m. OK GNU C++17 TESTS 29 15 0
107887210 sasha4 C2 Feb. 18, 2021, 9:24 p.m. OK GNU C++17 TESTS 29 15 0
107886411 tlin C2 Feb. 18, 2021, 9:03 p.m. OK GNU C++17 TESTS 29 15 0
107881536 deepanshuthakur4010 C2 Feb. 18, 2021, 7:33 p.m. OK GNU C++17 TESTS 29 15 0
107881215 rspr C2 Feb. 18, 2021, 7:29 p.m. OK GNU C++17 TESTS 29 15 0
107876055 vamp-coder C2 Feb. 18, 2021, 6:27 p.m. OK GNU C++17 TESTS 29 15 0
107873187 ItsEZ C2 Feb. 18, 2021, 6:02 p.m. OK GNU C++17 TESTS 29 15 0
107907176 M-Manas-s C2 Feb. 19, 2021, 5:28 a.m. OK GNU C++17 (64) TESTS 29 15 0
107907064 Arceus03 C2 Feb. 19, 2021, 5:26 a.m. OK GNU C++17 (64) TESTS 29 15 0
107903336 HANHbanthanTHANG C2 Feb. 19, 2021, 4:37 a.m. OK GNU C++17 (64) TESTS 29 15 0
107902364 tanimania C2 Feb. 19, 2021, 4:24 a.m. OK GNU C++17 (64) TESTS 29 15 0
107900013 Jo3kerR C2 Feb. 19, 2021, 3:45 a.m. OK GNU C++17 (64) TESTS 29 15 0
107890596 Falcon__ C2 Feb. 18, 2021, 11:18 p.m. OK GNU C++17 (64) TESTS 29 15 0
107885589 fake_id_of_a_newbie C2 Feb. 18, 2021, 8:44 p.m. OK GNU C++17 (64) TESTS 29 15 0
107885543 Anish1712 C2 Feb. 18, 2021, 8:43 p.m. OK GNU C++17 (64) TESTS 29 15 0
107885128 Somebody C2 Feb. 18, 2021, 8:34 p.m. OK GNU C++17 (64) TESTS 29 15 0
107882658 pz1971 C2 Feb. 18, 2021, 7:50 p.m. OK GNU C++17 (64) TESTS 29 15 0
107875280 pohzipohzi C2 Feb. 18, 2021, 6:20 p.m. OK Go TESTS 29 31 0
107896386 0x3F C2 Feb. 19, 2021, 2:36 a.m. OK Go TESTS 29 46 0
107875366 pohzipohzi C2 Feb. 18, 2021, 6:21 p.m. OK Go TESTS 29 46 0
107902263 blackBird C2 Feb. 19, 2021, 4:22 a.m. OK Java 11 TESTS 29 202 0
107888791 BlueBirdie C2 Feb. 18, 2021, 10:11 p.m. OK Java 11 TESTS 29 202 0
107879238 guru1603 C2 Feb. 18, 2021, 7:02 p.m. OK Java 11 TESTS 29 202 0
107892834 atishay127 C2 Feb. 19, 2021, 12:56 a.m. OK Java 11 TESTS 29 218 0
107881731 Ste C2 Feb. 18, 2021, 7:35 p.m. OK Java 11 TESTS 29 218 0
107905338 sf14t C2 Feb. 19, 2021, 5:04 a.m. OK Java 11 TESTS 29 233 0
107869917 Restricted C2 Feb. 18, 2021, 5:43 p.m. OK Java 11 TESTS 29 233 0
107908861 BiggEr. C2 Feb. 19, 2021, 5:47 a.m. OK Java 11 TESTS 29 233 102400
107873361 ritesharma C2 Feb. 18, 2021, 6:04 p.m. OK Java 11 TESTS 29 233 102400
107903688 namitnayan C2 Feb. 19, 2021, 4:42 a.m. OK Java 11 TESTS 29 234 0
107884762 liuy0523 C2 Feb. 18, 2021, 8:27 p.m. OK Java 8 TESTS 29 109 0
107882316 MubtasimShahriar C2 Feb. 18, 2021, 7:44 p.m. OK Java 8 TESTS 29 109 0
107906176 pramit1998 C2 Feb. 19, 2021, 5:15 a.m. OK Java 8 TESTS 29 124 0
107896410 Jetman C2 Feb. 19, 2021, 2:36 a.m. OK Java 8 TESTS 29 124 0
107890581 twoBit C2 Feb. 18, 2021, 11:17 p.m. OK Java 8 TESTS 29 124 0
107886031 kareem3id C2 Feb. 18, 2021, 8:54 p.m. OK Java 8 TESTS 29 124 0
107885275 liuy0523 C2 Feb. 18, 2021, 8:37 p.m. OK Java 8 TESTS 29 124 0
107884908 liuy0523 C2 Feb. 18, 2021, 8:30 p.m. OK Java 8 TESTS 29 124 0
107874942 AayushICS C2 Feb. 18, 2021, 6:17 p.m. OK Java 8 TESTS 29 124 0
107872896 dante1 C2 Feb. 18, 2021, 6 p.m. OK Java 8 TESTS 29 124 0
107887086 koper C2 Feb. 18, 2021, 9:20 p.m. OK Kotlin TESTS 29 124 0
107887012 PavelChadnov C2 Feb. 18, 2021, 9:18 p.m. OK Kotlin TESTS 29 124 0
107875641 stopthecount C2 Feb. 18, 2021, 6:23 p.m. OK Kotlin TESTS 29 124 0
107905510 HcSoap C2 Feb. 19, 2021, 5:06 a.m. OK MS C++ TESTS 29 31 3993600
107905744 jonitox C2 Feb. 19, 2021, 5:09 a.m. OK MS C++ 2017 TESTS 29 31 0
107905617 jonitox C2 Feb. 19, 2021, 5:08 a.m. OK MS C++ 2017 TESTS 29 31 0
107899450 ch_hui C2 Feb. 19, 2021, 3:35 a.m. OK MS C++ 2017 TESTS 29 31 0
107898024 Cube219 C2 Feb. 19, 2021, 3:10 a.m. OK MS C++ 2017 TESTS 29 31 0
107882794 AmalSN C2 Feb. 18, 2021, 7:52 p.m. OK MS C++ 2017 TESTS 29 31 0
107872916 teoretik C2 Feb. 18, 2021, 6 p.m. OK MS C++ 2017 TESTS 29 31 0
107897889 qwqhr C2 Feb. 19, 2021, 3:07 a.m. OK MS C++ 2017 TESTS 29 46 0
107891119 wjli C2 Feb. 18, 2021, 11:39 p.m. OK MS C++ 2017 TESTS 29 46 0
107880996 shehebe C2 Feb. 18, 2021, 7:26 p.m. OK PyPy 2 TESTS 29 93 1228800
107905136 g_anes_h C2 Feb. 19, 2021, 5:02 a.m. OK PyPy 3 TESTS 29 93 0
107900953 srijan.sarkar C2 Feb. 19, 2021, 4:01 a.m. OK PyPy 3 TESTS 29 93 0
107897859 cutekibry C2 Feb. 19, 2021, 3:07 a.m. OK PyPy 3 TESTS 29 93 0
107892941 mesaliason C2 Feb. 19, 2021, 1 a.m. OK PyPy 3 TESTS 29 93 0
107890934 myotra C2 Feb. 18, 2021, 11:31 p.m. OK PyPy 3 TESTS 29 93 0
107885509 damirych C2 Feb. 18, 2021, 8:43 p.m. OK PyPy 3 TESTS 29 93 0
107882411 Vosatorp C2 Feb. 18, 2021, 7:46 p.m. OK PyPy 3 TESTS 29 93 0
107882073 Vosatorp C2 Feb. 18, 2021, 7:41 p.m. OK PyPy 3 TESTS 29 93 0
107878331 hritik3878 C2 Feb. 18, 2021, 6:52 p.m. OK PyPy 3 TESTS 29 93 0
107872810 uttharapally.chandra C2 Feb. 18, 2021, 6 p.m. OK PyPy 3 TESTS 29 93 0
107873814 nwi C2 Feb. 18, 2021, 6:07 p.m. OK Python 2 TESTS 29 93 0
107902148 sh1194 C2 Feb. 19, 2021, 4:21 a.m. OK Python 3 TESTS 29 77 307200
107895032 dsnav C2 Feb. 19, 2021, 2:02 a.m. OK Python 3 TESTS 29 77 307200
107886394 ellunia C2 Feb. 18, 2021, 9:02 p.m. OK Python 3 TESTS 29 77 307200
107882285 rpfl C2 Feb. 18, 2021, 7:44 p.m. OK Python 3 TESTS 29 77 307200
107876397 khanter_ C2 Feb. 18, 2021, 6:31 p.m. OK Python 3 TESTS 29 77 307200
107906658 checkingagain C2 Feb. 19, 2021, 5:21 a.m. OK Python 3 TESTS 29 77 409600
107876900 apilat C2 Feb. 18, 2021, 6:36 p.m. OK Rust TESTS 29 31 0

remove filters

Back to search problems