Good Bye 2020

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
1466 Good Bye 2020 FINISHED False 10800 127927463 Dec. 30, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 202 ) I The Riddle of the Sphinx PROGRAMMING binary search data structures data structures interactive

B"This is an interactive problem. This problem doesn't support hacks. Sphinx's duty is to guard the city of Thebes by making sure that no unworthy traveler crosses its gates. Only the ones who answer her riddle timely and correctly (or get an acc for short) are allowed to pass. As of those who fail, no one heard of them ever again... So you don't have a choice but to solve the riddle. Sphinx has an array a_1, a_2, ldots, a_n of nonnegative integers strictly smaller than 2^b and asked you to find the maximum value among its elements. Of course, she will not show you the array, but she will give you n and b . As it is impossible to answer this riddle blindly, you can ask her some questions. For given i, y , she'll answer you whether a_i is bigger than y . As sphinxes are not very patient, you can ask at most 3 cdot (n + b) such questions. Although cunning, sphinxes are honest. Even though the array can change between your queries, answers to the previously asked questions will remain valid. The first line contains two integers n and b ( 1 <= q n, b <= q 200 ). The remaining parts of the input will be given throughout the interaction process. In each round your program must output a single line with an integer i ( 0 <= q i <= q n ) and a binary string of length exactly b denoting the binary representation of y (most significant bit first). If i > 0 , this line encodes the question: Is a_i bigger than y ?. There should be at most 3 cdot (n+b) such lines; after each of them, the interactor will print yes or no in a single line. If i = 0 , this is the last round of interaction, after which your program should terminate, and y should be the maximal value among the elements of Sphinx's array. Note that this round does not count to the query limit. Note that the interactor is adaptive. After printing a query, do not forget to output the end of the l"...

Tutorials

Good Bye 2020 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
102869153 clyring I Dec. 30, 2020, 9:35 p.m. OK GNU C++14 TESTS 284 93 204800
102873880 _h_ I Dec. 31, 2020, 12:42 a.m. OK GNU C++17 TESTS 284 46 204800
102884163 akshara.guvvala I Dec. 31, 2020, 5:40 a.m. OK GNU C++17 TESTS 284 61 204800
102848956 mnbvmar I Dec. 30, 2020, 5:01 p.m. OK GNU C++17 TESTS 284 62 409600
102881447 zscoder I Dec. 31, 2020, 4:50 a.m. OK GNU C++17 TESTS 284 77 409600
102866656 thanhan I Dec. 30, 2020, 8:36 p.m. OK GNU C++17 TESTS 284 77 512000
102864989 Kabir_Ivan_5V I Dec. 30, 2020, 8:10 p.m. OK GNU C++17 TESTS 284 77 512000
102869833 ecnerwala I Dec. 30, 2020, 9:56 p.m. OK GNU C++17 (64) TESTS 284 46 0
102868071 ecnerwala I Dec. 30, 2020, 9:08 p.m. OK GNU C++17 (64) TESTS 284 46 0
102867376 ecnerwala I Dec. 30, 2020, 8:51 p.m. OK GNU C++17 (64) TESTS 284 46 0
102850395 scott_wu I Dec. 30, 2020, 5:06 p.m. OK GNU C++17 (64) TESTS 284 46 102400
102883410 combatwombat I Dec. 31, 2020, 5:27 a.m. OK GNU C++17 (64) TESTS 284 62 0
102869877 ecnerwala I Dec. 30, 2020, 9:57 p.m. OK GNU C++17 (64) TESTS 284 62 0
102867508 ecnerwala I Dec. 30, 2020, 8:55 p.m. OK GNU C++17 (64) TESTS 284 62 0
102868445 ainta I Dec. 30, 2020, 9:18 p.m. OK GNU C++17 (64) TESTS 284 77 17203200
102862354 Benq I Dec. 30, 2020, 7:37 p.m. OK GNU C++17 (64) TESTS 284 93 102400
102856176 qwerty787788 I Dec. 30, 2020, 5:26 p.m. OK Java 11 TESTS 284 327 0
102866828 ksun48 I Dec. 30, 2020, 8:40 p.m. OK PyPy 3 TESTS 284 810 12185600
102863928 conqueror_of_tourist I Dec. 30, 2020, 7:56 p.m. OK PyPy 3 TESTS 284 811 12185600
102869460 ksun48 I Dec. 30, 2020, 9:44 p.m. OK PyPy 3 TESTS 284 857 11980800
102880146 sh1194 I Dec. 31, 2020, 4:20 a.m. OK Python 3 TESTS 284 280 409600
102880286 sh1194 I Dec. 31, 2020, 4:24 a.m. OK Python 3 TESTS 284 295 409600

remove filters

Back to search problems