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. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 12720 ) | C1 | Guessing the Greatest (easy 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 40 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}, ldots, 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 40 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 o'... |
Codeforces Round #703 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
107909112 | lytingOvO | C1 | Feb. 19, 2021, 5:50 a.m. | OK | GNU C++11 | TESTS | 29 | 15 | 0 | ||
107909106 | detaomega | C1 | Feb. 19, 2021, 5:50 a.m. | OK | GNU C++11 | TESTS | 29 | 15 | 0 | ||
107907274 | qiuzx | C1 | Feb. 19, 2021, 5:29 a.m. | OK | GNU C++11 | TESTS | 29 | 15 | 0 | ||
107907062 | shelter | C1 | Feb. 19, 2021, 5:26 a.m. | OK | GNU C++11 | TESTS | 29 | 15 | 0 | ||
107906474 | innova | C1 | Feb. 19, 2021, 5:19 a.m. | OK | GNU C++11 | TESTS | 29 | 15 | 0 | ||
107905978 | CCPSDCGK | C1 | Feb. 19, 2021, 5:12 a.m. | OK | GNU C++11 | TESTS | 29 | 15 | 0 | ||
107905670 | Lazy_to_think | C1 | Feb. 19, 2021, 5:08 a.m. | OK | GNU C++11 | TESTS | 29 | 15 | 0 | ||
107904873 | WeiPengbao | C1 | Feb. 19, 2021, 4:58 a.m. | OK | GNU C++11 | TESTS | 29 | 15 | 0 | ||
107903421 | Yu_Hongsen | C1 | Feb. 19, 2021, 4:38 a.m. | OK | GNU C++11 | TESTS | 29 | 15 | 0 | ||
107901914 | hanyaqi010924 | C1 | Feb. 19, 2021, 4:17 a.m. | OK | GNU C++11 | TESTS | 29 | 15 | 0 | ||
107888384 | ....... | C1 | Feb. 18, 2021, 9:57 p.m. | OK | GNU C++14 | TESTS | 29 | 15 | 0 | ||
107884178 | ankitsinha221 | C1 | Feb. 18, 2021, 8:16 p.m. | OK | GNU C++14 | TESTS | 29 | 15 | 0 | ||
107882486 | tiendung2306 | C1 | Feb. 18, 2021, 7:47 p.m. | OK | GNU C++14 | TESTS | 29 | 15 | 0 | ||
107881912 | jm_28 | C1 | Feb. 18, 2021, 7:39 p.m. | OK | GNU C++14 | TESTS | 29 | 15 | 0 | ||
107878372 | bhavya_06 | C1 | Feb. 18, 2021, 6:52 p.m. | OK | GNU C++14 | TESTS | 29 | 15 | 0 | ||
107876374 | saurabh_129 | C1 | Feb. 18, 2021, 6:30 p.m. | OK | GNU C++14 | TESTS | 29 | 15 | 0 | ||
107874013 | wxyzabcd0123hjklmno | C1 | Feb. 18, 2021, 6:09 p.m. | OK | GNU C++14 | TESTS | 29 | 15 | 0 | ||
107873900 | naeeem | C1 | Feb. 18, 2021, 6:08 p.m. | OK | GNU C++14 | TESTS | 29 | 15 | 0 | ||
107873839 | abu96 | C1 | Feb. 18, 2021, 6:08 p.m. | OK | GNU C++14 | TESTS | 29 | 15 | 0 | ||
107871681 | virtual_ninja | C1 | Feb. 18, 2021, 5:52 p.m. | OK | GNU C++14 | TESTS | 29 | 15 | 0 | ||
107904181 | 324165877 | C1 | Feb. 19, 2021, 4:48 a.m. | OK | GNU C++17 | TESTS | 29 | 15 | 0 | ||
107904064 | tommyjiang | C1 | Feb. 19, 2021, 4:47 a.m. | OK | GNU C++17 | TESTS | 29 | 15 | 0 | ||
107903123 | Vishal_Thirwani | C1 | Feb. 19, 2021, 4:34 a.m. | OK | GNU C++17 | TESTS | 29 | 15 | 0 | ||
107901933 | vedant3620 | C1 | Feb. 19, 2021, 4:17 a.m. | OK | GNU C++17 | TESTS | 29 | 15 | 0 | ||
107899390 | ashraful9194 | C1 | Feb. 19, 2021, 3:34 a.m. | OK | GNU C++17 | TESTS | 29 | 15 | 0 | ||
107895289 | SQ333 | C1 | Feb. 19, 2021, 2:09 a.m. | OK | GNU C++17 | TESTS | 29 | 15 | 0 | ||
107893600 | jaime | C1 | Feb. 19, 2021, 1:22 a.m. | OK | GNU C++17 | TESTS | 29 | 15 | 0 | ||
107891520 | RiarioRovere | C1 | Feb. 18, 2021, 11:59 p.m. | OK | GNU C++17 | TESTS | 29 | 15 | 0 | ||
107883357 | faraz16iqbal | C1 | Feb. 18, 2021, 8:01 p.m. | OK | GNU C++17 | TESTS | 29 | 15 | 0 | ||
107880413 | mananghetia | C1 | Feb. 18, 2021, 7:18 p.m. | OK | GNU C++17 | TESTS | 29 | 15 | 0 | ||
107906172 | Abhishek_Chaturvedi | C1 | Feb. 19, 2021, 5:15 a.m. | OK | GNU C++17 (64) | TESTS | 29 | 15 | 0 | ||
107902424 | keertan | C1 | Feb. 19, 2021, 4:25 a.m. | OK | GNU C++17 (64) | TESTS | 29 | 15 | 0 | ||
107884208 | vonat1us | C1 | Feb. 18, 2021, 8:16 p.m. | OK | GNU C++17 (64) | TESTS | 29 | 15 | 0 | ||
107883630 | Anish1712 | C1 | Feb. 18, 2021, 8:06 p.m. | OK | GNU C++17 (64) | TESTS | 29 | 15 | 0 | ||
107880438 | vishisht_2 | C1 | Feb. 18, 2021, 7:18 p.m. | OK | GNU C++17 (64) | TESTS | 29 | 15 | 0 | ||
107878211 | alif_cse_ju | C1 | Feb. 18, 2021, 6:51 p.m. | OK | GNU C++17 (64) | TESTS | 29 | 15 | 0 | ||
107876155 | twoslowaf | C1 | Feb. 18, 2021, 6:28 p.m. | OK | GNU C++17 (64) | TESTS | 29 | 15 | 0 | ||
107873392 | emorgan5289 | C1 | Feb. 18, 2021, 6:04 p.m. | OK | GNU C++17 (64) | TESTS | 29 | 15 | 0 | ||
107872815 | verigo | C1 | Feb. 18, 2021, 6 p.m. | OK | GNU C++17 (64) | TESTS | 29 | 15 | 0 | ||
107869420 | NoPoint | C1 | Feb. 18, 2021, 5:42 p.m. | OK | GNU C++17 (64) | TESTS | 29 | 15 | 0 | ||
107875445 | pohzipohzi | C1 | Feb. 18, 2021, 6:22 p.m. | OK | Go | TESTS | 29 | 46 | 0 | ||
107889188 | adarsh_goku | C1 | Feb. 18, 2021, 10:25 p.m. | OK | Java 11 | TESTS | 29 | 202 | 0 | ||
107888785 | BlueBirdie | C1 | Feb. 18, 2021, 10:11 p.m. | OK | Java 11 | TESTS | 29 | 202 | 0 | ||
107888784 | adarsh_goku | C1 | Feb. 18, 2021, 10:11 p.m. | OK | Java 11 | TESTS | 29 | 202 | 0 | ||
107906362 | sumit_1002 | C1 | Feb. 19, 2021, 5:17 a.m. | OK | Java 11 | TESTS | 29 | 217 | 0 | ||
107903588 | namitnayan | C1 | Feb. 19, 2021, 4:40 a.m. | OK | Java 11 | TESTS | 29 | 217 | 0 | ||
107909394 | saurabh_kl | C1 | Feb. 19, 2021, 5:53 a.m. | OK | Java 11 | TESTS | 29 | 218 | 0 | ||
107907902 | saurabh_kl | C1 | Feb. 19, 2021, 5:36 a.m. | OK | Java 11 | TESTS | 29 | 218 | 0 | ||
107902153 | blackBird | C1 | Feb. 19, 2021, 4:21 a.m. | OK | Java 11 | TESTS | 29 | 218 | 0 | ||
107899071 | ytripathi891 | C1 | Feb. 19, 2021, 3:28 a.m. | OK | Java 11 | TESTS | 29 | 218 | 0 | ||
107896405 | thesupremeone | C1 | Feb. 19, 2021, 2:36 a.m. | OK | Java 11 | TESTS | 29 | 218 | 0 | ||
107908289 | rw6 | C1 | Feb. 19, 2021, 5:41 a.m. | OK | Java 8 | TESTS | 29 | 109 | 0 | ||
107907259 | Charigardash | C1 | Feb. 19, 2021, 5:29 a.m. | OK | Java 8 | TESTS | 29 | 109 | 0 | ||
107890573 | twoBit | C1 | Feb. 18, 2021, 11:17 p.m. | OK | Java 8 | TESTS | 29 | 109 | 0 | ||
107886041 | kareem3id | C1 | Feb. 18, 2021, 8:54 p.m. | OK | Java 8 | TESTS | 29 | 109 | 0 | ||
107879788 | Dstoical | C1 | Feb. 18, 2021, 7:09 p.m. | OK | Java 8 | TESTS | 29 | 109 | 0 | ||
107875021 | OmarFouad | C1 | Feb. 18, 2021, 6:17 p.m. | OK | Java 8 | TESTS | 29 | 109 | 0 | ||
107874638 | OmarFouad | C1 | Feb. 18, 2021, 6:14 p.m. | OK | Java 8 | TESTS | 29 | 109 | 0 | ||
107873417 | akshaygupta26 | C1 | Feb. 18, 2021, 6:04 p.m. | OK | Java 8 | TESTS | 29 | 109 | 0 | ||
107872804 | dante1 | C1 | Feb. 18, 2021, 6 p.m. | OK | Java 8 | TESTS | 29 | 109 | 0 | ||
107881609 | liuy0523 | C1 | Feb. 18, 2021, 7:34 p.m. | OK | Java 8 | TESTS | 29 | 124 | 0 | ||
107888445 | koper | C1 | Feb. 18, 2021, 9:59 p.m. | OK | Kotlin | TESTS | 29 | 124 | 0 | ||
107888412 | koper | C1 | Feb. 18, 2021, 9:58 p.m. | OK | Kotlin | TESTS | 29 | 124 | 0 | ||
107875566 | stopthecount | C1 | Feb. 18, 2021, 6:23 p.m. | OK | Kotlin | TESTS | 29 | 124 | 0 | ||
107874619 | DMN | C1 | Feb. 18, 2021, 6:14 p.m. | OK | Mono C# | TESTS | 29 | 62 | 202547200 | ||
107905490 | HcSoap | C1 | Feb. 19, 2021, 5:06 a.m. | OK | MS C++ | TESTS | 29 | 31 | 3993600 | ||
107869508 | valyanarezka | C1 | Feb. 18, 2021, 5:42 p.m. | OK | MS C++ 2017 | TESTS | 29 | 30 | 0 | ||
107880189 | gaserashraf | C1 | Feb. 18, 2021, 7:15 p.m. | OK | MS C++ 2017 | TESTS | 29 | 31 | 0 | ||
107891127 | wjli | C1 | Feb. 18, 2021, 11:39 p.m. | OK | MS C++ 2017 | TESTS | 29 | 31 | 0 | ||
107882775 | AmalSN | C1 | Feb. 18, 2021, 7:51 p.m. | OK | MS C++ 2017 | TESTS | 29 | 31 | 0 | ||
107881041 | shehebe | C1 | Feb. 18, 2021, 7:27 p.m. | OK | PyPy 2 | TESTS | 29 | 77 | 1228800 | ||
107889010 | lebron87 | C1 | Feb. 18, 2021, 10:19 p.m. | OK | PyPy 2 | TESTS | 29 | 186 | 8499200 | ||
107884041 | lebron87 | C1 | Feb. 18, 2021, 8:14 p.m. | OK | PyPy 2 | TESTS | 29 | 187 | 8601600 | ||
107907208 | vashusharma180707 | C1 | Feb. 19, 2021, 5:28 a.m. | OK | PyPy 3 | TESTS | 29 | 93 | 0 | ||
107903502 | majay1638 | C1 | Feb. 19, 2021, 4:39 a.m. | OK | PyPy 3 | TESTS | 29 | 93 | 0 | ||
107903061 | rivnam | C1 | Feb. 19, 2021, 4:33 a.m. | OK | PyPy 3 | TESTS | 29 | 93 | 0 | ||
107901023 | akshitm16 | C1 | Feb. 19, 2021, 4:02 a.m. | OK | PyPy 3 | TESTS | 29 | 93 | 0 | ||
107898023 | srijan.sarkar | C1 | Feb. 19, 2021, 3:10 a.m. | OK | PyPy 3 | TESTS | 29 | 93 | 0 | ||
107896790 | Ilsa | C1 | Feb. 19, 2021, 2:46 a.m. | OK | PyPy 3 | TESTS | 29 | 93 | 0 | ||
107896662 | Akilaksha | C1 | Feb. 19, 2021, 2:42 a.m. | OK | PyPy 3 | TESTS | 29 | 93 | 0 | ||
107890930 | myotra | C1 | Feb. 18, 2021, 11:31 p.m. | OK | PyPy 3 | TESTS | 29 | 93 | 0 | ||
107887842 | StillMortal | C1 | Feb. 18, 2021, 9:42 p.m. | OK | PyPy 3 | TESTS | 29 | 93 | 0 | ||
107887129 | StillMortal | C1 | Feb. 18, 2021, 9:21 p.m. | OK | PyPy 3 | TESTS | 29 | 93 | 0 | ||
107908149 | RedSpica | C1 | Feb. 19, 2021, 5:39 a.m. | OK | Python 3 | TESTS | 29 | 62 | 307200 | ||
107907713 | RedSpica | C1 | Feb. 19, 2021, 5:34 a.m. | OK | Python 3 | TESTS | 29 | 62 | 307200 | ||
107906513 | RedSpica | C1 | Feb. 19, 2021, 5:19 a.m. | OK | Python 3 | TESTS | 29 | 62 | 307200 | ||
107906218 | vtiptop | C1 | Feb. 19, 2021, 5:15 a.m. | OK | Python 3 | TESTS | 29 | 62 | 307200 | ||
107906053 | vtiptop | C1 | Feb. 19, 2021, 5:13 a.m. | OK | Python 3 | TESTS | 29 | 62 | 307200 | ||
107902054 | sh1194 | C1 | Feb. 19, 2021, 4:19 a.m. | OK | Python 3 | TESTS | 29 | 62 | 307200 | ||
107887830 | no_cry | C1 | Feb. 18, 2021, 9:41 p.m. | OK | Python 3 | TESTS | 29 | 62 | 307200 | ||
107886296 | manthans11 | C1 | Feb. 18, 2021, 9 p.m. | OK | Python 3 | TESTS | 29 | 62 | 307200 | ||
107882269 | rpfl | C1 | Feb. 18, 2021, 7:44 p.m. | OK | Python 3 | TESTS | 29 | 62 | 307200 | ||
107871396 | nsharc4 | C1 | Feb. 18, 2021, 5:50 p.m. | OK | Python 3 | TESTS | 29 | 62 | 307200 |
Back to search problems