Codeforces Round 739 (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
1560 Codeforces Round 739 (Div. 3) FINISHED False 8100 102525899 Aug. 18, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 18274 ) D Make a Power of Two PROGRAMMING greedy math strings 1300

B"You are given an integer n . In 1 move, you can do one of the following actions: The actions may be performed in any order any number of times. Note that if, after deleting some digit from a number, it will contain leading zeroes, they will not be deleted. E.g. if you delete from the number 301 the digit 3 , the result is the number 01 (not 1 ). You need to perform the minimum number of actions to make the number any power of 2 (i.e. there's an integer k ( k ge 0 ) such that the resulting number is equal to 2^k ). The resulting number must not have leading zeroes. E.g. consider n=1052 . The answer is equal to 2 . First, let's add to the right one digit 4 (the result will be 10524 ). Then let's erase the digit 5 , so the result will be 1024 which is a power of 2 . E.g. consider n=8888 . The answer is equal to 3 . Let's erase any of the digits 8 three times. The result will be 8 which is a power of 2 . The first line contains one integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Then t test cases follow. Each test case consists of one line containing one integer n ( 1 <= n <= 10^9 ). For each test case, output in a separate line one integer m -- the minimum number of moves to transform the number into any power of 2 . The answer for the first test case was considered above. The answer for the second test case was considered above. In the third test case, it's enough to add to the right the digit 4 -- the number 6 will turn into 64 . In the fourth test case, let's add to the right the digit 8 and then erase 7 and 5 -- the taken number will turn into 8 . The numbers of the fifth and the sixth test cases are already powers of two so there's no need to make any move. In the seventh test case, you can delete first of all the digit 3 (the result is $"...

Tutorials

94009

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
126639190 Anhng.194 D Aug. 21, 2021, 4:31 p.m. OK FPC TESTS 25 218 3584000 1300
126723883 yycyyc D Aug. 23, 2021, 2:49 a.m. OK GNU C11 TESTS 25 78 3686400 1300
126790785 TTTRY D Aug. 23, 2021, 8:38 p.m. OK GNU C11 TESTS 25 109 3686400 1300
126564630 Cu1 D Aug. 20, 2021, 6:17 p.m. OK GNU C++14 TESTS 25 30 3788800 1300
126657315 Chameleon216 D Aug. 22, 2021, 12:14 a.m. OK GNU C++14 TESTS 25 31 3788800 1300
126560192 Yzx898900 D Aug. 20, 2021, 5:16 p.m. OK GNU C++14 TESTS 25 31 3788800 1300
126555651 sasha4 D Aug. 20, 2021, 4:17 p.m. OK GNU C++14 TESTS 25 31 3788800 1300
126920692 william950615 D Aug. 24, 2021, 11:32 p.m. OK GNU C++14 TESTS 25 31 3788800 1300
126819209 LJFan D Aug. 24, 2021, 8:13 a.m. OK GNU C++14 TESTS 25 31 3788800 1300
126783619 MonthlyMango D Aug. 23, 2021, 6:04 p.m. OK GNU C++14 TESTS 25 31 3788800 1300
126697299 Tom66 D Aug. 22, 2021, 2:53 p.m. OK GNU C++14 TESTS 25 46 3686400 1300
126697305 bkifhr6 D Aug. 22, 2021, 2:54 p.m. OK GNU C++14 TESTS 25 46 3686400 1300
126952517 tcm D Aug. 25, 2021, 8:52 a.m. OK GNU C++14 TESTS 25 46 3788800 1300
126720765 joelgun14 D Aug. 23, 2021, 12:58 a.m. OK GNU C++17 TESTS 25 30 3788800 1300
126547269 Tasfiq_Mahmud D Aug. 20, 2021, 2:46 p.m. OK GNU C++17 TESTS 25 31 3686400 1300
126622532 VinTsl D Aug. 21, 2021, 12:55 p.m. OK GNU C++17 TESTS 25 31 3686400 1300
126992916 KrK D Aug. 25, 2021, 5:45 p.m. OK GNU C++17 TESTS 25 31 3788800 1300
126829525 -_-INV4D3R-_- D Aug. 24, 2021, 10:38 a.m. OK GNU C++17 TESTS 25 31 3788800 1300
126786298 .rem D Aug. 23, 2021, 6:50 p.m. OK GNU C++17 TESTS 25 31 3788800 1300
126768245 fslse D Aug. 23, 2021, 2:42 p.m. OK GNU C++17 TESTS 25 31 3788800 1300
126764971 ulrich6 D Aug. 23, 2021, 2:04 p.m. OK GNU C++17 TESTS 25 31 3788800 1300
126758098 Hyperi0N D Aug. 23, 2021, 12:33 p.m. OK GNU C++17 TESTS 25 31 3788800 1300
126951129 m195578 D Aug. 25, 2021, 8:35 a.m. OK GNU C++17 TESTS 25 31 3788800 1300
126788753 Foundnt_Alice D Aug. 23, 2021, 7:41 p.m. OK GNU C++17 (64) TESTS 25 30 4300800 1300
126820065 TsaiisaT D Aug. 24, 2021, 8:25 a.m. OK GNU C++17 (64) TESTS 25 31 4300800 1300
126751192 kyon2326 D Aug. 23, 2021, 10:47 a.m. OK GNU C++17 (64) TESTS 25 31 4300800 1300
126597076 CK1ne D Aug. 21, 2021, 7:32 a.m. OK GNU C++17 (64) TESTS 25 31 4300800 1300
126595419 Axire D Aug. 21, 2021, 7:12 a.m. OK GNU C++17 (64) TESTS 25 31 4300800 1300
126587272 rohitkumar0510 D Aug. 21, 2021, 5:04 a.m. OK GNU C++17 (64) TESTS 25 31 4300800 1300
126822458 Beas D Aug. 24, 2021, 8:58 a.m. OK GNU C++17 (64) TESTS 25 46 4300800 1300
126794358 smigwump D Aug. 23, 2021, 11:17 p.m. OK GNU C++17 (64) TESTS 25 46 4300800 1300
126933427 Ayu0809 D Aug. 25, 2021, 4:48 a.m. OK GNU C++17 (64) TESTS 25 46 4300800 1300
126877382 RedDragon D Aug. 24, 2021, 3:42 p.m. OK GNU C++17 (64) TESTS 25 46 4300800 1300
126839960 SnacksTime D Aug. 24, 2021, 12:59 p.m. OK Go TESTS 25 78 10649600 1300
126936948 Gin_Sian D Aug. 25, 2021, 5:40 a.m. OK Go TESTS 25 109 15257600 1300
126938312 Gin_Sian D Aug. 25, 2021, 5:59 a.m. OK Go TESTS 25 109 15257600 1300
126929947 Gin_Sian D Aug. 25, 2021, 3:45 a.m. OK Go TESTS 25 109 15257600 1300
126938235 Gin_Sian D Aug. 25, 2021, 5:58 a.m. OK Go TESTS 25 124 15257600 1300
126607918 kamesh.joshi D Aug. 21, 2021, 9:38 a.m. OK Java 11 TESTS 25 218 23756800 1300
126610467 shayar1801 D Aug. 21, 2021, 10:09 a.m. OK Java 11 TESTS 25 233 23961600 1300
126608100 _merlin_ D Aug. 21, 2021, 9:40 a.m. OK Java 11 TESTS 25 233 23961600 1300
126637297 virendra_12 D Aug. 21, 2021, 4:06 p.m. OK Java 11 TESTS 25 249 23756800 1300
126804386 nobrain3898 D Aug. 24, 2021, 4:52 a.m. OK Java 11 TESTS 25 249 23961600 1300
126608586 ritesharma D Aug. 21, 2021, 9:45 a.m. OK Java 11 TESTS 25 312 24064000 1300
126568491 pili D Aug. 20, 2021, 7:23 p.m. OK Java 11 TESTS 25 327 23859200 1300
126747129 YaduAhuja D Aug. 23, 2021, 9:41 a.m. OK Java 11 TESTS 25 327 23859200 1300
126827047 puneetgarg2601 D Aug. 24, 2021, 10:02 a.m. OK Java 11 TESTS 25 327 24473600 1300
126828759 hakr_2104 D Aug. 24, 2021, 10:28 a.m. OK Java 11 TESTS 25 327 24985600 1300
126692750 dexter_1205 D Aug. 22, 2021, 1:42 p.m. OK Java 8 TESTS 25 140 20480000 1300
126644432 sg55 D Aug. 21, 2021, 5:53 p.m. OK Java 8 TESTS 25 155 21196800 1300
126809336 18ucc039 D Aug. 24, 2021, 6:08 a.m. OK Java 8 TESTS 25 156 20684800 1300
126556056 Yuxiang D Aug. 20, 2021, 4:22 p.m. OK Java 8 TESTS 25 171 20480000 1300
126554385 Yuxiang D Aug. 20, 2021, 4:03 p.m. OK Java 8 TESTS 25 202 20480000 1300
126751206 ACCgirl D Aug. 23, 2021, 10:47 a.m. OK Java 8 TESTS 25 233 20480000 1300
126842422 gouravkrosx D Aug. 24, 2021, 1:29 p.m. OK Java 8 TESTS 25 249 21299200 1300
126839885 rajgupta77540 D Aug. 24, 2021, 12:58 p.m. OK Java 8 TESTS 25 264 21196800 1300
126564346 ankitgautam4u D Aug. 20, 2021, 6:13 p.m. OK Java 8 TESTS 25 264 21299200 1300
126639734 swapnilganguly1234 D Aug. 21, 2021, 4:39 p.m. OK Java 8 TESTS 25 265 20684800 1300
126965447 catcatcute D Aug. 25, 2021, 11:52 a.m. OK Kotlin TESTS 25 171 20889600 1300
126966072 catcatcute D Aug. 25, 2021, noon OK Kotlin TESTS 25 187 20889600 1300
126546763 amanpatel23 D Aug. 20, 2021, 2:40 p.m. OK Kotlin TESTS 25 202 22425600 1300
126782312 daniilzimin4 D Aug. 23, 2021, 5:44 p.m. OK Kotlin TESTS 25 264 23244800 1300
126833729 Bororo D Aug. 24, 2021, 11:38 a.m. OK Kotlin TESTS 25 452 21299200 1300
126940738 soccoder D Aug. 25, 2021, 6:31 a.m. OK MS C++ 2017 TESTS 25 46 3686400 1300
126556663 WangYiYu D Aug. 20, 2021, 4:29 p.m. OK MS C++ 2017 TESTS 25 46 3788800 1300
126638099 Rev93 D Aug. 21, 2021, 4:16 p.m. OK MS C++ 2017 TESTS 25 46 3788800 1300
126689337 the-fly0618 D Aug. 22, 2021, 12:39 p.m. OK MS C++ 2017 TESTS 25 61 27750400 1300
126821063 2019112325 D Aug. 24, 2021, 8:39 a.m. OK MS C++ 2017 TESTS 25 78 3788800 1300
126669006 shuitishashou D Aug. 22, 2021, 6:32 a.m. OK MS C++ 2017 TESTS 25 78 3788800 1300
126712449 LOL_I_AM_SERZH D Aug. 22, 2021, 7:18 p.m. OK MS C++ 2017 TESTS 25 93 3788800 1300
126818808 2019112325 D Aug. 24, 2021, 8:08 a.m. OK MS C++ 2017 TESTS 25 93 3788800 1300
126818364 2019112325 D Aug. 24, 2021, 8:02 a.m. OK MS C++ 2017 TESTS 25 93 3788800 1300
126552683 Cyniriya D Aug. 20, 2021, 3:43 p.m. OK MS C++ 2017 TESTS 25 93 3788800 1300
126734498 tabibi D Aug. 23, 2021, 6:42 a.m. OK .NET Core C# TESTS 25 234 14438400 1300
126792182 coden00b2021 D Aug. 23, 2021, 9:23 p.m. OK PyPy 2 TESTS 25 857 29388800 1300
126545520 FahimSifnatul D Aug. 20, 2021, 2:26 p.m. OK PyPy 3 TESTS 25 186 24268800 1300
126835504 brogrammer_24 D Aug. 24, 2021, noon OK PyPy 3 TESTS 25 248 24883200 1300
126546783 eugalt D Aug. 20, 2021, 2:40 p.m. OK PyPy 3 TESTS 25 295 27443200 1300
126695534 Noble_Mushtak D Aug. 22, 2021, 2:25 p.m. OK PyPy 3 TESTS 25 296 26419200 1300
126547449 eugalt D Aug. 20, 2021, 2:48 p.m. OK PyPy 3 TESTS 25 296 27443200 1300
126664997 NightCrawler07 D Aug. 22, 2021, 4:57 a.m. OK PyPy 3 TESTS 25 311 24166400 1300
126829054 DoSPi D Aug. 24, 2021, 10:31 a.m. OK PyPy 3 TESTS 25 327 25190400 1300
126741803 y_sharanya_02 D Aug. 23, 2021, 8:25 a.m. OK PyPy 3 TESTS 25 327 26112000 1300
126591176 eugalt D Aug. 21, 2021, 6:12 a.m. OK PyPy 3 TESTS 25 327 26112000 1300
126650786 Harshit_Garg D Aug. 21, 2021, 7:53 p.m. OK PyPy 3 TESTS 25 327 26214400 1300
126841653 mraboosk D Aug. 24, 2021, 1:20 p.m. OK Python 3 TESTS 25 717 6963200 1300
126988735 abisheka1441 D Aug. 25, 2021, 4:41 p.m. OK Python 3 TESTS 25 763 6963200 1300
126732638 techsharif D Aug. 23, 2021, 6:12 a.m. OK Python 3 TESTS 25 951 7577600 1300
126917005 Sarthack D Aug. 24, 2021, 8:53 p.m. OK Python 3 TESTS 25 982 7270400 1300
126733085 techsharif D Aug. 23, 2021, 6:20 a.m. OK Python 3 TESTS 25 998 6963200 1300
126982963 lxk D Aug. 25, 2021, 3:32 p.m. OK Rust TESTS 25 46 3788800 1300
126835262 amit.codename13 D Aug. 24, 2021, 11:57 a.m. OK Rust TESTS 25 46 3788800 1300
126782400 DMCoder D Aug. 23, 2021, 5:46 p.m. OK Rust TESTS 25 124 3788800 1300
126657251 Eulim D Aug. 22, 2021, 12:10 a.m. OK Rust TESTS 25 218 4096000 1300
126579466 SorKierkegaard D Aug. 21, 2021, 1:46 a.m. OK Rust TESTS 25 233 4096000 1300
126755398 manta1130 D Aug. 23, 2021, 11:51 a.m. OK Rust TESTS 25 483 3788800 1300
126964578 GeoffreyY D Aug. 25, 2021, 11:39 a.m. OK Rust TESTS 25 498 3788800 1300

remove filters

Back to search problems