Codeforces Round 846 (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
1780 Codeforces Round 846 (Div. 2) FINISHED False 7200 62609063 Jan. 25, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5101 ) D Bit Guessing Game PROGRAMMING binary search bitmasks interactive

B'This is an interactive problem. Kira has a hidden positive integer n , and Hayato needs to guess it. Initially, Kira gives Hayato the value mathrm{cnt} -- the number of unit bits in the binary notation of n . To guess n , Hayato can only do operations of one kind: choose an integer x and subtract it from n . Note that after each operation, the number n changes. Kira doesn 't like bad requests, so if Hayato tries to subtract a number x greater than n , he will lose to Kira. After each operation, Kira gives Hayato the updated value mathrm{cnt} -- the number of unit bits in the binary notation of the updated value of n . Kira doesn 't have much patience, so Hayato must guess the original value of n after no more than 30 operations. Since Hayato is in elementary school, he asks for your help. Write a program that guesses the number n . Kira is an honest person, so he chooses the initial number n before all operations and does not change it afterward. The input data contains several test cases. The first line contains one integer t ( 1 <= t <= 500 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains the number mathrm{cnt} -- the initial number of unit bits in the binary notation n . The hidden integer n satisfies the following constraint: 1 <= n <= 10^9 . To guess n , you can perform the operation at most 30 times. To do that, print a line with the following format: "- x" ( 1 <= x <= 10^9 ). After this operation, the number x is subtracted from n , and therefore n is changed. If the number x is greater than the current value of n , then the request is considered invalid. After the operation read a line containing a single non-negative integer mathrm{cnt} -- the number of unit bits in the binary notation of the current n '...

Tutorials

111841

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
190555102 NYYYa D Jan. 25, 2023, 4:01 p.m. OK C# 10 TESTS 11 171 1126400
190577260 _Shivom_ D Jan. 25, 2023, 5:59 p.m. OK Clang++20 Diagnostics TESTS 11 374 0
190554022 ruban D Jan. 25, 2023, 3:58 p.m. OK Delphi TESTS 11 124 218214400
190594827 NenadDapic D Jan. 25, 2023, 9:24 p.m. OK FPC TESTS 11 93 0
190575243 NenadDapic D Jan. 25, 2023, 5:46 p.m. OK FPC TESTS 11 93 0
190556385 rainboy D Jan. 25, 2023, 4:05 p.m. OK GNU C11 TESTS 11 124 0
190609790 Leasier D Jan. 26, 2023, 4:18 a.m. OK GNU C11 TESTS 11 124 0
190594225 13_Riishiii_10 D Jan. 25, 2023, 9:13 p.m. OK GNU C++14 TESTS 11 62 3993600
190593283 kira98k D Jan. 25, 2023, 8:55 p.m. OK GNU C++14 TESTS 11 77 0
190558269 Duy_e D Jan. 25, 2023, 4:10 p.m. OK GNU C++14 TESTS 11 77 0
190552635 thanh33311 D Jan. 25, 2023, 3:55 p.m. OK GNU C++14 TESTS 11 77 0
190598056 Andwerp D Jan. 25, 2023, 10:41 p.m. OK GNU C++14 TESTS 11 77 0
190607447 DitaMirika D Jan. 26, 2023, 3:27 a.m. OK GNU C++14 TESTS 11 77 0
190604537 yindujuxi123 D Jan. 26, 2023, 2:14 a.m. OK GNU C++14 TESTS 11 92 0
190572176 Manjunath0408 D Jan. 25, 2023, 5:27 p.m. OK GNU C++14 TESTS 11 92 0
190611926 zuytong D Jan. 26, 2023, 4:54 a.m. OK GNU C++14 TESTS 11 93 0
190609585 extreme1228 D Jan. 26, 2023, 4:14 a.m. OK GNU C++14 TESTS 11 93 0
190558455 ack D Jan. 25, 2023, 4:11 p.m. OK GNU C++17 TESTS 11 62 0
190609474 qhk1024 D Jan. 26, 2023, 4:12 a.m. OK GNU C++17 TESTS 11 77 0
190615870 ishanmardani D Jan. 26, 2023, 5:55 a.m. OK GNU C++17 TESTS 11 77 0
190612421 EX-Stella D Jan. 26, 2023, 5:03 a.m. OK GNU C++17 TESTS 11 77 0
190603190 287029 D Jan. 26, 2023, 1:35 a.m. OK GNU C++17 TESTS 11 77 0
190601561 chahar_manjeet_0610 D Jan. 26, 2023, 12:38 a.m. OK GNU C++17 TESTS 11 77 0
190592262 puneet_73 D Jan. 25, 2023, 8:40 p.m. OK GNU C++17 TESTS 11 77 0
190573480 WildWeasel D Jan. 25, 2023, 5:35 p.m. OK GNU C++17 TESTS 11 77 0
190554709 Aniket2909 D Jan. 25, 2023, 4 p.m. OK GNU C++17 TESTS 11 77 0
190552370 Cookie197-2 D Jan. 25, 2023, 3:54 p.m. OK GNU C++17 TESTS 11 77 0
190564042 gqf123 D Jan. 25, 2023, 4:29 p.m. OK GNU C++17 (64) TESTS 11 77 0
190569479 _Sheepsheep D Jan. 25, 2023, 5:11 p.m. OK GNU C++17 (64) TESTS 11 77 0
190610917 atharva1583 D Jan. 26, 2023, 4:38 a.m. OK GNU C++17 (64) TESTS 11 77 0
190558791 thirdcook D Jan. 25, 2023, 4:12 p.m. OK GNU C++17 (64) TESTS 11 77 80998400
190599098 enslaved D Jan. 25, 2023, 11:11 p.m. OK GNU C++17 (64) TESTS 11 92 0
190569565 _Sheepsheep D Jan. 25, 2023, 5:12 p.m. OK GNU C++17 (64) TESTS 11 92 0
190604038 FUNctio_naL D Jan. 26, 2023, 2:01 a.m. OK GNU C++17 (64) TESTS 11 92 0
190613451 shouxhy D Jan. 26, 2023, 5:19 a.m. OK GNU C++17 (64) TESTS 11 92 0
190609026 Jack404 D Jan. 26, 2023, 4:03 a.m. OK GNU C++17 (64) TESTS 11 93 0
190607444 TrendBattles D Jan. 26, 2023, 3:27 a.m. OK GNU C++17 (64) TESTS 11 93 0
190597775 _abhay_og D Jan. 25, 2023, 10:33 p.m. OK GNU C++20 (64) TESTS 11 31 0
190564092 saurav_kalsoor D Jan. 25, 2023, 4:29 p.m. OK GNU C++20 (64) TESTS 11 46 0
190560768 Max_Calincu D Jan. 25, 2023, 4:18 p.m. OK GNU C++20 (64) TESTS 11 62 0
190607187 iamttm D Jan. 26, 2023, 3:20 a.m. OK GNU C++20 (64) TESTS 11 77 0
190600329 _Gawd_ D Jan. 25, 2023, 11:52 p.m. OK GNU C++20 (64) TESTS 11 77 0
190615482 King_Grogu D Jan. 26, 2023, 5:49 a.m. OK GNU C++20 (64) TESTS 11 77 0
190595077 nakshatraexe D Jan. 25, 2023, 9:29 p.m. OK GNU C++20 (64) TESTS 11 77 0
190595067 neutral D Jan. 25, 2023, 9:29 p.m. OK GNU C++20 (64) TESTS 11 77 0
190599122 UpDownUpDown D Jan. 25, 2023, 11:12 p.m. OK GNU C++20 (64) TESTS 11 77 0
190610391 pseong D Jan. 26, 2023, 4:28 a.m. OK GNU C++20 (64) TESTS 11 77 0
190558728 goudezhao D Jan. 25, 2023, 4:12 p.m. OK Java 11 TESTS 11 561 0
190585549 sad_truant D Jan. 25, 2023, 7:12 p.m. OK Java 11 TESTS 11 639 0
190565046 raktcharita2000 D Jan. 25, 2023, 4:32 p.m. OK Java 11 TESTS 11 655 0
190569082 Lior D Jan. 25, 2023, 5:09 p.m. OK Java 11 TESTS 11 670 0
190614843 __Serendipity D Jan. 26, 2023, 5:40 a.m. OK Java 11 TESTS 11 701 0
190571534 Vimal_cse D Jan. 25, 2023, 5:23 p.m. OK Java 11 TESTS 11 717 0
190571143 dzhi D Jan. 25, 2023, 5:21 p.m. OK Java 11 TESTS 11 779 0
190551895 Yuki_B D Jan. 25, 2023, 3:53 p.m. OK Java 11 TESTS 11 779 0
190616015 Dinesh_Pandiyan D Jan. 26, 2023, 5:57 a.m. OK Java 11 TESTS 11 858 0
190612505 brianush1 D Jan. 26, 2023, 5:04 a.m. OK Java 11 TESTS 11 858 0
190596022 pc_invader D Jan. 25, 2023, 9:49 p.m. OK Java 17 TESTS 11 467 409600
190561174 yyr2233 D Jan. 25, 2023, 4:19 p.m. OK Java 17 TESTS 11 623 512000
190576149 Alex_by D Jan. 25, 2023, 5:52 p.m. OK Java 17 TESTS 11 639 819200
190605218 kkz666 D Jan. 26, 2023, 2:32 a.m. OK Java 17 TESTS 11 732 819200
190604217 swarup_312 D Jan. 26, 2023, 2:05 a.m. OK Java 8 TESTS 11 342 0
190558237 megaspazz D Jan. 25, 2023, 4:10 p.m. OK Java 8 TESTS 11 482 0
190552473 UniversalAdmin D Jan. 25, 2023, 3:54 p.m. OK Java 8 TESTS 11 514 0
190608148 HMETAO D Jan. 26, 2023, 3:44 a.m. OK Java 8 TESTS 11 576 0
190557101 cc4414 D Jan. 25, 2023, 4:07 p.m. OK Java 8 TESTS 11 592 0
190561698 AlanDiakov D Jan. 25, 2023, 4:21 p.m. OK Java 8 TESTS 11 608 0
190555875 invincible777 D Jan. 25, 2023, 4:04 p.m. OK Java 8 TESTS 11 608 0
190606729 lpychemistry D Jan. 26, 2023, 3:09 a.m. OK Java 8 TESTS 11 623 0
190549577 IanISam D Jan. 25, 2023, 3:47 p.m. OK Java 8 TESTS 11 623 0
190555134 Swapniltri D Jan. 25, 2023, 4:02 p.m. OK Java 8 TESTS 11 624 0
190563161 maxK99 D Jan. 25, 2023, 4:26 p.m. OK MS C++ 2017 TESTS 11 124 0
190558024 oshamashama D Jan. 25, 2023, 4:10 p.m. OK PyPy 3 TESTS 11 576 6246400
190553717 Joshc D Jan. 25, 2023, 3:58 p.m. OK PyPy 3 TESTS 11 608 5120000
190553587 olliep D Jan. 25, 2023, 3:57 p.m. OK PyPy 3 TESTS 11 639 6963200
190557544 zacker-22 D Jan. 25, 2023, 4:08 p.m. OK PyPy 3 TESTS 11 701 9932800
190549479 SPD_9X2 D Jan. 25, 2023, 3:47 p.m. OK PyPy 3 TESTS 11 733 9113600
190606246 InariInDream D Jan. 26, 2023, 2:57 a.m. OK PyPy 3-64 TESTS 11 343 8192000
190579391 ossau_guildo D Jan. 25, 2023, 6:15 p.m. OK PyPy 3-64 TESTS 11 390 7577600
190606301 InariInDream D Jan. 26, 2023, 2:59 a.m. OK PyPy 3-64 TESTS 11 404 7782400
190590494 hkwu6013 D Jan. 25, 2023, 8:14 p.m. OK PyPy 3-64 TESTS 11 404 9625600
190547299 sushmanth.dampur8780 D Jan. 25, 2023, 3:43 p.m. OK PyPy 3-64 TESTS 11 420 5324800
190614947 newbrn D Jan. 26, 2023, 5:42 a.m. OK PyPy 3-64 TESTS 11 420 6348800
190592742 hvbird D Jan. 25, 2023, 8:47 p.m. OK PyPy 3-64 TESTS 11 420 7475200
190614078 valentk777 D Jan. 26, 2023, 5:29 a.m. OK PyPy 3-64 TESTS 11 421 8089600
190548322 Sort D Jan. 25, 2023, 3:45 p.m. OK PyPy 3-64 TESTS 11 436 5734400
190559572 beethoven97 D Jan. 25, 2023, 4:14 p.m. OK PyPy 3-64 TESTS 11 452 5939200
190598799 Andy_Huo D Jan. 25, 2023, 11:02 p.m. OK Python 3 TESTS 11 405 204800
190595433 el_tunel D Jan. 25, 2023, 9:36 p.m. OK Python 3 TESTS 11 405 204800
190610837 kunal2k86 D Jan. 26, 2023, 4:36 a.m. OK Python 3 TESTS 11 420 204800
190557431 Korneli D Jan. 25, 2023, 4:08 p.m. OK Python 3 TESTS 11 561 204800
190552612 D4nnyLee D Jan. 25, 2023, 3:55 p.m. OK Rust 2021 TESTS 11 124 0
190611424 D4nnyLee D Jan. 26, 2023, 4:46 a.m. OK Rust 2021 TESTS 11 186 0
190573045 liut D Jan. 25, 2023, 5:32 p.m. OK Rust 2021 TESTS 11 202 0
190552019 pohzipohzi D Jan. 25, 2023, 3:53 p.m. OK Rust 2021 TESTS 11 234 0

remove filters

Back to search problems