Codeforces Round 647 (Div. 2) - Thanks, Algo Muse!

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
1362 Codeforces Round 647 (Div. 2) - Thanks, Algo Muse! FINISHED False 9000 140541899 June 4, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 24466 ) A Johnny and Ancient Computer PROGRAMMING implementation 1000

B"Johnny has recently found an ancient, broken computer. The machine has only one register, which allows one to put in there one variable. Then in one operation, you can shift its bits left or right by at most three positions. The right shift is forbidden if it cuts off some ones. So, in fact, in one operation, you can multiply or divide your number by 2 , 4 or 8 , and division is only allowed if the number is divisible by the chosen divisor. Formally, if the register contains a positive integer x , in one operation it can be replaced by one of the following: For example, if x = 6 , in one operation it can be replaced by 12 , 24 , 48 or 3 . Value 6 isn't divisible by 4 or 8 , so there're only four variants of replacement. Now Johnny wonders how many operations he needs to perform if he puts a in the register and wants to get b at the end. The input consists of multiple test cases. The first line contains an integer t ( 1 <= q t <= q 1000 ) -- the number of test cases. The following t lines contain a description of test cases. The first and only line in each test case contains integers a and b ( 1 <= q a, b <= q 10^{18} ) -- the initial and target value of the variable, respectively. Output t lines, each line should contain one integer denoting the minimum number of operations Johnny needs to perform. If Johnny cannot get b at the end, then write -1 . In the first test case, Johnny can reach 5 from 10 by using the shift to the right by one (i.e. divide by 2 ). In the second test case, Johnny can reach 44 from 11 by using the shift to the left by two (i.e. multiply by 4 ). In the third test case, it is impossible for Johnny to reach 21 from 17 . In the fourth test case, initial and target values are equal, so Johnny has to do 0 operations. In the fifth test case, Johnny can reach $"...

Tutorials

Codeforces Round #647 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
83208578 vjudge4 A June 9, 2020, 10:20 a.m. OK Clang++17 Diagnostics TESTS 19 61 0 1000
83243037 naveenreddynavuluri A June 9, 2020, 5:28 p.m. OK Clang++17 Diagnostics TESTS 19 62 0 1000
83210883 neo999 A June 9, 2020, 10:51 a.m. OK Clang++17 Diagnostics TESTS 19 62 0 1000
82591954 ijk13 A June 5, 2020, 3:52 a.m. OK Clang++17 Diagnostics TESTS 19 77 0 1000
82583246 Gassa A June 4, 2020, 11:58 p.m. OK D TESTS 19 31 0 1000
82583138 Gassa A June 4, 2020, 11:54 p.m. OK D TESTS 19 31 0 1000
82582877 Gassa A June 4, 2020, 11:42 p.m. OK D TESTS 19 31 0 1000
82583114 Gassa A June 4, 2020, 11:53 p.m. OK D TESTS 19 31 0 1000
82583166 Gassa A June 4, 2020, 11:55 p.m. OK D TESTS 19 31 0 1000
82583012 Gassa A June 4, 2020, 11:48 p.m. OK D TESTS 19 31 0 1000
82762977 escapecho A June 7, 2020, 8:33 a.m. OK FPC TESTS 19 31 0 1000
82692662 sona_sharavan A June 6, 2020, 9:45 a.m. OK GNU C11 TESTS 19 15 204800 1000
82600853 omi_farhan75 A June 5, 2020, 6:13 a.m. OK GNU C11 TESTS 19 30 0 1000
82624774 zhengfuzhe123 A June 5, 2020, 11:14 a.m. OK GNU C11 TESTS 19 30 0 1000
82694369 ayush.18je0201 A June 6, 2020, 10:12 a.m. OK GNU C11 TESTS 19 30 0 1000
82590521 Beku.sh A June 5, 2020, 3:24 a.m. OK GNU C11 TESTS 19 30 0 1000
82548622 akash456 A June 4, 2020, 4:27 p.m. OK GNU C11 TESTS 19 30 0 1000
82583235 Muinuddin A June 4, 2020, 11:58 p.m. OK GNU C11 TESTS 19 30 0 1000
82754300 Amin.s A June 7, 2020, 6:18 a.m. OK GNU C11 TESTS 19 30 204800 1000
83546036 pratyushranjan A June 12, 2020, 3:42 p.m. OK GNU C11 TESTS 19 31 0 1000
83466821 ceamin_cste A June 11, 2020, 5:12 p.m. OK GNU C11 TESTS 19 31 0 1000
82610411 psycho437 A June 5, 2020, 8:09 a.m. OK GNU C++11 TESTS 19 15 0 1000
83571949 IIUCAKASH A June 13, 2020, 2:33 a.m. OK GNU C++11 TESTS 19 15 0 1000
82637520 Nyse A June 5, 2020, 2:12 p.m. OK GNU C++11 TESTS 19 15 0 1000
82680101 ezboy A June 6, 2020, 6:33 a.m. OK GNU C++11 TESTS 19 15 0 1000
82680784 orzorz_moeDzW A June 6, 2020, 6:44 a.m. OK GNU C++11 TESTS 19 15 0 1000
82682347 zhangyuxing A June 6, 2020, 7:07 a.m. OK GNU C++11 TESTS 19 15 0 1000
82683399 cugel A June 6, 2020, 7:22 a.m. OK GNU C++11 TESTS 19 15 0 1000
83197617 pb00 A June 9, 2020, 7:54 a.m. OK GNU C++11 TESTS 19 15 0 1000
83232127 vjudge2 A June 9, 2020, 3:13 p.m. OK GNU C++11 TESTS 19 15 0 1000
83370143 The__Tanvin A June 11, 2020, 10:11 a.m. OK GNU C++11 TESTS 19 15 0 1000
83366309 quyf A June 11, 2020, 9:20 a.m. OK GNU C++14 TESTS 19 30 0 1000
83334637 fscc A June 10, 2020, 8:42 p.m. OK GNU C++14 TESTS 19 30 0 1000
83191474 shereenfathy A June 9, 2020, 6:30 a.m. OK GNU C++14 TESTS 19 30 0 1000
82956183 1412neerujjain A June 8, 2020, 5:05 a.m. OK GNU C++14 TESTS 19 30 0 1000
82770789 black.mamba__ A June 7, 2020, 10:34 a.m. OK GNU C++14 TESTS 19 30 0 1000
82769288 helewrer3 A June 7, 2020, 10:11 a.m. OK GNU C++14 TESTS 19 30 0 1000
82766238 pranav456 A June 7, 2020, 9:24 a.m. OK GNU C++14 TESTS 19 30 0 1000
82761754 Sizzlk A June 7, 2020, 8:13 a.m. OK GNU C++14 TESTS 19 30 0 1000
82756583 ganamahc A June 7, 2020, 6:54 a.m. OK GNU C++14 TESTS 19 30 0 1000
82738070 hritik69 A June 6, 2020, 9:16 p.m. OK GNU C++14 TESTS 19 30 0 1000
82599537 nitin_98 A June 5, 2020, 5:57 a.m. OK GNU C++17 TESTS 19 15 0 1000
82605943 manavsinha03 A June 5, 2020, 7:15 a.m. OK GNU C++17 TESTS 19 15 0 1000
82900861 agural A June 8, 2020, 3:01 a.m. OK GNU C++17 TESTS 19 30 0 1000
83334937 b06b01073 A June 10, 2020, 8:50 p.m. OK GNU C++17 TESTS 19 30 0 1000
83264677 Aom2608 A June 10, 2020, 3:32 a.m. OK GNU C++17 TESTS 19 30 0 1000
83222060 coding_dumb A June 9, 2020, 1:19 p.m. OK GNU C++17 TESTS 19 30 0 1000
83212346 Aniket1110 A June 9, 2020, 11:10 a.m. OK GNU C++17 TESTS 19 30 0 1000
83171053 stardust88 A June 8, 2020, 8:40 p.m. OK GNU C++17 TESTS 19 30 0 1000
82873762 xswzaq44321 A June 7, 2020, 4:55 p.m. OK GNU C++17 TESTS 19 30 0 1000
82754277 Chgtaxihe A June 7, 2020, 6:18 a.m. OK GNU C++17 TESTS 19 30 0 1000
82560646 null0124 A June 4, 2020, 5 p.m. OK GNU C++17 (64) TESTS 19 15 0 1000
82564746 Prateek A June 4, 2020, 6:11 p.m. OK GNU C++17 (64) TESTS 19 15 0 1000
82574582 Lite_Clique A June 4, 2020, 7:45 p.m. OK GNU C++17 (64) TESTS 19 15 0 1000
82577977 lightseba A June 4, 2020, 8:52 p.m. OK GNU C++17 (64) TESTS 19 15 0 1000
82591342 dobby28 A June 5, 2020, 3:40 a.m. OK GNU C++17 (64) TESTS 19 15 0 1000
82598910 kb_1024bytes A June 5, 2020, 5:47 a.m. OK GNU C++17 (64) TESTS 19 15 0 1000
82615112 john__wick A June 5, 2020, 9:05 a.m. OK GNU C++17 (64) TESTS 19 15 0 1000
82680321 sayanmedya A June 6, 2020, 6:37 a.m. OK GNU C++17 (64) TESTS 19 15 0 1000
82755220 ak532 A June 7, 2020, 6:32 a.m. OK GNU C++17 (64) TESTS 19 15 0 1000
82755291 ak532 A June 7, 2020, 6:33 a.m. OK GNU C++17 (64) TESTS 19 15 0 1000
82665336 Thallium_is_Vegetable A June 5, 2020, 11:23 p.m. OK Go TESTS 19 46 0 1000
82582534 BugLeave A June 4, 2020, 11:28 p.m. OK Go TESTS 19 46 102400 1000
82574508 maguroguma A June 4, 2020, 7:44 p.m. OK Go TESTS 19 46 102400 1000
82715690 NGUYEN_THANH_LOI A June 6, 2020, 3:03 p.m. OK Go TESTS 19 124 0 1000
82648923 SeongMenJeon A June 5, 2020, 4:43 p.m. OK Go TESTS 19 124 0 1000
82715568 NGUYEN_THANH_LOI A June 6, 2020, 3:01 p.m. OK Go TESTS 19 139 102400 1000
82667160 MiltonEiji A June 6, 2020, 12:59 a.m. OK Haskell TESTS 19 30 102400 1000
82648678 Laurens A June 5, 2020, 4:39 p.m. OK Haskell TESTS 19 31 102400 1000
82585908 Andrey_R A June 5, 2020, 1:28 a.m. OK Haskell TESTS 19 31 102400 1000
83105560 ClaudeHunt A June 8, 2020, 6:31 a.m. OK Java 11 TESTS 19 171 0 1000
82875088 devesh08 A June 7, 2020, 5:54 p.m. OK Java 11 TESTS 19 171 0 1000
82647893 learner_321 A June 5, 2020, 4:27 p.m. OK Java 11 TESTS 19 171 0 1000
82599791 yb1717 A June 5, 2020, 6 a.m. OK Java 11 TESTS 19 171 0 1000
82596279 mahendrabishnoi2 A June 5, 2020, 5:08 a.m. OK Java 11 TESTS 19 171 0 1000
82584340 anhpp A June 5, 2020, 12:40 a.m. OK Java 11 TESTS 19 171 0 1000
82600632 nickleoden299 A June 5, 2020, 6:10 a.m. OK Java 11 TESTS 19 186 0 1000
82767404 abhi123valani A June 7, 2020, 9:42 a.m. OK Java 11 TESTS 19 186 0 1000
82730962 -Tommy- A June 6, 2020, 6:36 p.m. OK Java 11 TESTS 19 186 0 1000
82691700 Stul19 A June 6, 2020, 9:30 a.m. OK Java 11 TESTS 19 186 0 1000
82900516 AnandOza A June 8, 2020, 2:53 a.m. OK Java 8 TESTS 19 108 0 1000
82695094 sanskriti0512 A June 6, 2020, 10:23 a.m. OK Java 8 TESTS 19 108 0 1000
82578445 manish_98 A June 4, 2020, 9:03 p.m. OK Java 8 TESTS 19 108 0 1000
83087974 PalAditya A June 8, 2020, 6:12 a.m. OK Java 8 TESTS 19 109 0 1000
83167483 Nirav412000 A June 8, 2020, 7:19 p.m. OK Java 8 TESTS 19 109 0 1000
83258477 kareem3id A June 9, 2020, 11:54 p.m. OK Java 8 TESTS 19 109 0 1000
83275100 ineffablekenobi A June 10, 2020, 6:50 a.m. OK Java 8 TESTS 19 109 0 1000
82649929 kunalkatiyar9 A June 5, 2020, 4:57 p.m. OK Java 8 TESTS 19 109 0 1000
82668229 bluesky111 A June 6, 2020, 1:50 a.m. OK Java 8 TESTS 19 109 0 1000
82681158 litesam A June 6, 2020, 6:50 a.m. OK Java 8 TESTS 19 109 0 1000
82593254 Spheniscine A June 5, 2020, 4:15 a.m. OK Kotlin TESTS 19 109 0 1000
82568371 Hakiobo A June 4, 2020, 6:33 p.m. OK Kotlin TESTS 19 140 0 1000
82571449 v4_adi A June 4, 2020, 7:03 p.m. OK Kotlin TESTS 19 171 0 1000
83312468 wuchaojie925 A June 10, 2020, 3:11 p.m. OK Kotlin TESTS 19 171 0 1000
82716673 vrublack A June 6, 2020, 3:15 p.m. OK Kotlin TESTS 19 186 102400 1000
82683198 Dimon2305 A June 6, 2020, 7:19 a.m. OK Mono C# TESTS 19 61 307200 1000
82638717 mayumi A June 5, 2020, 2:27 p.m. OK Mono C# TESTS 19 62 307200 1000
82597247 TRR A June 5, 2020, 5:23 a.m. OK Mono C# TESTS 19 77 307200 1000
83294849 BowieD A June 10, 2020, 11:31 a.m. OK Mono C# TESTS 19 77 307200 1000
82906037 Zetta-byte A June 8, 2020, 4:38 a.m. OK Mono C# TESTS 19 77 512000 1000
82626067 nadilk A June 5, 2020, 11:31 a.m. OK Mono C# TESTS 19 77 4198400 1000
82971532 Alllast0r A June 8, 2020, 5:07 a.m. OK Mono C# TESTS 19 77 4710400 1000
82769625 GusztavSzmolik A June 7, 2020, 10:15 a.m. OK Mono C# TESTS 19 78 307200 1000
82596205 anish.1922 A June 5, 2020, 5:06 a.m. OK Mono C# TESTS 19 78 307200 1000
82576342 ansergeyg A June 4, 2020, 8:16 p.m. OK Mono C# TESTS 19 92 614400 1000
82573225 zaid_qassas1 A June 4, 2020, 7:25 p.m. OK MS C++ TESTS 19 46 0 1000
82729250 Baybart A June 6, 2020, 6:08 p.m. OK MS C++ 2017 TESTS 19 31 0 1000
83308535 pulokjk A June 10, 2020, 2:33 p.m. OK MS C++ 2017 TESTS 19 31 0 1000
83287729 Artem0107 A June 10, 2020, 9:49 a.m. OK MS C++ 2017 TESTS 19 31 0 1000
83145729 tivan__ A June 8, 2020, 2:43 p.m. OK MS C++ 2017 TESTS 19 31 0 1000
82720668 Mavyark A June 6, 2020, 4:04 p.m. OK MS C++ 2017 TESTS 19 31 0 1000
82698078 Kasumigaoka A June 6, 2020, 11:07 a.m. OK MS C++ 2017 TESTS 19 31 0 1000
82665495 icecap360 A June 5, 2020, 11:32 p.m. OK MS C++ 2017 TESTS 19 31 0 1000
82660759 Jackcao A June 5, 2020, 8:28 p.m. OK MS C++ 2017 TESTS 19 31 0 1000
82660740 Jackcao A June 5, 2020, 8:27 p.m. OK MS C++ 2017 TESTS 19 31 0 1000
82636005 AmirV2 A June 5, 2020, 1:53 p.m. OK MS C++ 2017 TESTS 19 31 0 1000
83180045 nitrousoxide A June 9, 2020, 2:34 a.m. OK PascalABC.NET TESTS 19 296 307200 1000
82552918 kotprogrammist A June 4, 2020, 4:39 p.m. OK PascalABC.NET TESTS 19 358 102400 1000
82620451 kit.shiron A June 5, 2020, 10:15 a.m. OK PyPy 2 TESTS 19 140 307200 1000
82578596 raj1307 A June 4, 2020, 9:07 p.m. OK PyPy 2 TESTS 19 155 1638400 1000
82660913 beethoven97 A June 5, 2020, 8:32 p.m. OK PyPy 2 TESTS 19 171 1433600 1000
82585588 wolffd A June 5, 2020, 1:19 a.m. OK PyPy 2 TESTS 19 187 3072000 1000
82590998 anshuman16423 A June 5, 2020, 3:34 a.m. OK PyPy 2 TESTS 19 249 9216000 1000
82570368 bravotango A June 4, 2020, 6:51 p.m. OK PyPy 3 TESTS 19 155 1740800 1000
82577238 aadish A June 4, 2020, 8:35 p.m. OK PyPy 3 TESTS 19 155 1945600 1000
82568638 srkvrm A June 4, 2020, 6:35 p.m. OK PyPy 3 TESTS 19 155 1945600 1000
82566426 ishmumkhan1234 A June 4, 2020, 6:19 p.m. OK PyPy 3 TESTS 19 155 1945600 1000
82606161 ng24_7 A June 5, 2020, 7:18 a.m. OK PyPy 3 TESTS 19 155 2048000 1000
82590098 unknown_2433 A June 5, 2020, 3:16 a.m. OK PyPy 3 TESTS 19 155 2560000 1000
82604938 Rajdeep2k A June 5, 2020, 7:02 a.m. OK PyPy 3 TESTS 19 170 3174400 1000
82564729 alex_code A June 4, 2020, 6:10 p.m. OK PyPy 3 TESTS 19 170 3891200 1000
82631486 nikitaqqqq A June 5, 2020, 12:49 p.m. OK PyPy 3 TESTS 19 171 2048000 1000
82574922 vishwesh20 A June 4, 2020, 7:51 p.m. OK PyPy 3 TESTS 19 171 2048000 1000
82649288 mokshasood06 A June 5, 2020, 4:48 p.m. OK Python 2 TESTS 19 171 0 1000
82816492 cdy1122 A June 7, 2020, 3:11 p.m. OK Python 2 TESTS 19 186 0 1000
82660081 barlaabhi A June 5, 2020, 8:08 p.m. OK Python 2 TESTS 19 187 0 1000
82624170 crapplet A June 5, 2020, 11:06 a.m. OK Python 2 TESTS 19 187 0 1000
82561453 bertrandovide A June 4, 2020, 5:02 p.m. OK Python 2 TESTS 19 187 102400 1000
82610237 coderbd A June 5, 2020, 8:07 a.m. OK Python 2 TESTS 19 311 0 1000
82670953 N220shri A June 6, 2020, 3:23 a.m. OK Python 3 TESTS 19 108 0 1000
82662834 Rakmom A June 5, 2020, 9:32 p.m. OK Python 3 TESTS 19 108 0 1000
83194487 subhajitdas A June 9, 2020, 7:11 a.m. OK Python 3 TESTS 19 108 307200 1000
82661951 Karim_Nabil A June 5, 2020, 9:03 p.m. OK Python 3 TESTS 19 108 307200 1000
82575337 Gen_Gen_ A June 4, 2020, 7:58 p.m. OK Python 3 TESTS 19 108 307200 1000
82574151 username_taken A June 4, 2020, 7:38 p.m. OK Python 3 TESTS 19 108 307200 1000
82564893 L01c A June 4, 2020, 6:11 p.m. OK Python 3 TESTS 19 108 307200 1000
83381375 orailly A June 11, 2020, 12:44 p.m. OK Python 3 TESTS 19 109 0 1000
82747490 pyaari_pinky A June 7, 2020, 3:54 a.m. OK Python 3 TESTS 19 109 0 1000
82736598 i-Gagan A June 6, 2020, 8:33 p.m. OK Python 3 TESTS 19 109 0 1000
83216920 sarah.mathew98 A June 9, 2020, 12:09 p.m. OK Ruby TESTS 19 62 0 1000
82581943 mario10king A June 4, 2020, 10:59 p.m. OK Ruby TESTS 19 62 102400 1000
82562961 mario10king A June 4, 2020, 5:04 p.m. OK Ruby TESTS 19 77 102400 1000
82572211 sofinms A June 4, 2020, 7:12 p.m. OK Ruby TESTS 19 78 102400 1000
83146468 myduomilia A June 8, 2020, 2:50 p.m. OK Rust TESTS 19 31 0 1000
82890676 sidky A June 7, 2020, 9:24 p.m. OK Rust TESTS 19 31 0 1000
82555842 rustafarian A June 4, 2020, 4:48 p.m. OK Rust TESTS 19 31 0 1000
83506616 t-uchida A June 12, 2020, 7:13 a.m. OK Rust TESTS 19 46 0 1000
82746863 shadaj A June 7, 2020, 3:35 a.m. OK Rust TESTS 19 46 0 1000
82657983 pandrei A June 5, 2020, 7:18 p.m. OK Rust TESTS 19 46 0 1000

remove filters

Back to search problems