Codeforces Global Round 23

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
1746 Codeforces Global Round 23 FINISHED False 8100 71421863 Oct. 15, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 402 ) E2 Joking (Hard Version) PROGRAMMING dp interactive

B'The only difference between this problem and the hard version is the maximum number of questions. This is an interactive problem. There is a hidden integer 1 <= x <= n which you have to find. In order to find it you can ask at most mathbf{53} questions. In each question you can choose a non-empty integer set S and ask if x belongs to S or not, after each question, if x belongs to S , you 'll receive "YES", otherwise "NO". But the problem is that not all answers are necessarily true (some of them are joking), it 's just guaranteed that for each two consecutive questions, at least one of them is answered correctly. Additionally to the questions, you can make at most 2 guesses for the answer x . Each time you make a guess, if you guess x correctly, you receive ":)" and your program should terminate, otherwise you 'll receive ":(". As a part of the joking, we will not fix the value of x in the beginning. Instead, it can change throughout the interaction as long as all the previous responses are valid as described above. Note that your answer guesses are always answered correctly. If you ask a question before and after a guess, at least one of these two questions is answered correctly, as normal. The only line of the input contains a single integer n ( 1 <= n <= 10^5 ), the maximum possible value of x . For each question, if you want to ask about a set S , first print the character '? ', then print the size of S and then print the elements of S one by one. Each element should be an integer between 1 and n , the elements must be distinct. After each question, read a string "YES" or "NO", as explained in the statement. You can make at most 53 such questions. If you want to guess for x , first print the character '! ' and then print your guess. After each guess, read ":)" or ":(". If you guess x correctly, the answer is ":)" and your program '...

Tutorials

Codeforces Global Round 23 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
176427208 hos.lyric E2 Oct. 16, 2022, 5:17 a.m. OK D TESTS 54 124 4198400
176427509 ABhavyaSri E2 Oct. 16, 2022, 5:19 a.m. OK D TESTS 54 156 4198400

remove filters

Back to search problems