Codeforces Round 719 (Div. 3)

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
1520 Codeforces Round 719 (Div. 3) FINISHED False 7200 117041063 May 5, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 12347 ) F1 Guess the K-th Zero (Easy version) PROGRAMMING binary search interactive

B"This is an interactive problem. This is an easy version of the problem. The difference from the hard version is that in the easy version t=1 and the number of queries is limited to 20 . Polycarp is playing a computer game. In this game, an array consisting of zeros and ones is hidden. Polycarp wins if he guesses the position of the k -th zero from the left t times. Polycarp can make no more than 20 requests of the following type: In this (easy version) of the problem, this paragraph doesn't really make sense since t=1 always. To make the game more interesting, each guessed zero turns into one and the game continues on the changed array. More formally, if the position of the k -th zero was x , then after Polycarp guesses this position, the x -th element of the array will be replaced from 0 to 1 . Of course, this feature affects something only for t>1 . Help Polycarp win the game. First, your program must read two integers n and t ( 1 <= n <= 2 cdot 10^5 , t=1 ). Then t lines follow, each of which contains one integer k ( 1 <= k <= n ). It is guaranteed that at the moment of the request the array contains at least k zeros. In order to get the next value of k , you must output the answer for the current value of k . After that, you can make no more than 20 requests. Use the following format to output the answer (it is not a request, it doesn't count in 20 ): Positions in the array are numbered from left to right from 1 to n inclusive. After printing t answers, your program should exit immediately. In this task, the interactor is not adaptive. This means that within the same test, the hidden array and the queries do not change. In case of an incorrect query, -1 will be displayed. When this value is received, your program must immediately exit normally (for example, by calling exit(0)), otherwise, the testing "...

Tutorials

Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
115380272 k_saluja F1 May 6, 2021, 5:24 a.m. OK GNU C++11 TESTS 23 15 3891200
115379858 CODE_LOVER4655 F1 May 6, 2021, 5:19 a.m. OK GNU C++11 TESTS 23 15 3891200
115371679 -Cometary- F1 May 6, 2021, 3:24 a.m. OK GNU C++11 TESTS 23 15 3891200
115370651 CCoolGuang F1 May 6, 2021, 3:08 a.m. OK GNU C++11 TESTS 23 15 3891200
115369128 pushpush111 F1 May 6, 2021, 2:40 a.m. OK GNU C++11 TESTS 23 15 3891200
115363516 mitulitu12 F1 May 6, 2021, 12:09 a.m. OK GNU C++11 TESTS 23 15 3891200
115356555 angesh F1 May 5, 2021, 8:58 p.m. OK GNU C++11 TESTS 23 15 3891200
115353582 TLEAKS F1 May 5, 2021, 8:07 p.m. OK GNU C++11 TESTS 23 15 3891200
115345658 Jejee__ F1 May 5, 2021, 6:29 p.m. OK GNU C++11 TESTS 23 15 3891200
115379014 zzdrws F1 May 6, 2021, 5:10 a.m. OK GNU C++11 TESTS 23 15 5529600
115379094 Saketd3769 F1 May 6, 2021, 5:11 a.m. OK GNU C++14 TESTS 23 15 3788800
115378763 thanos_ashu F1 May 6, 2021, 5:07 a.m. OK GNU C++14 TESTS 23 15 3788800
115370856 dmdivyansh_113 F1 May 6, 2021, 3:11 a.m. OK GNU C++14 TESTS 23 15 3788800
115347477 alexashu F1 May 5, 2021, 6:48 p.m. OK GNU C++14 TESTS 23 15 3788800
115347167 arghakole F1 May 5, 2021, 6:45 p.m. OK GNU C++14 TESTS 23 15 3788800
115344849 Mehedi_Hassan F1 May 5, 2021, 6:22 p.m. OK GNU C++14 TESTS 23 15 3788800
115344123 C-3PO F1 May 5, 2021, 6:16 p.m. OK GNU C++14 TESTS 23 15 3788800
115352657 pulkit080 F1 May 5, 2021, 7:54 p.m. OK GNU C++14 TESTS 23 15 4505600
115383621 CapTa1nnn F1 May 6, 2021, 5:59 a.m. OK GNU C++14 TESTS 23 30 3686400
115372160 ankur_singh_777 F1 May 6, 2021, 3:32 a.m. OK GNU C++14 TESTS 23 30 3686400

remove filters

Back to search problems