Codeforces Round 601 (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
1255 Codeforces Round 601 (Div. 2) FINISHED False 7200 157649099 Nov. 19, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 17252 ) A Changing Volume PROGRAMMING math 800

B"Bob watches TV every day. He always sets the volume of his TV to b . However, today he is angry to find out someone has changed the volume to a . Of course, Bob has a remote control that can change the volume. There are six buttons ( -5, -2, -1, +1, +2, +5 ) on the control, which in one press can either increase or decrease the current volume by 1 , 2 , or 5 . The volume can be arbitrarily large, but can never be negative. In other words, Bob cannot press the button if it causes the volume to be lower than 0 . As Bob is so angry, he wants to change the volume to b using as few button presses as possible. However, he forgets how to do such simple calculations, so he asks you for help. Write a program that given a and b , finds the minimum number of presses to change the TV volume from a to b . Each test contains multiple test cases. The first line contains the number of test cases T ( 1 <= T <= 1 ,000 ). Then the descriptions of the test cases follow. Each test case consists of one line containing two integers a and b ( 0 <= a, b <= 10^{9} ) -- the current volume and Bob's desired volume, respectively. For each test case, output a single integer -- the minimum number of presses to change the TV volume from a to b . If Bob does not need to change the volume (i.e. a=b ), then print 0 . In the first example, Bob can press the -2 button twice to reach 0 . Note that Bob can not press -5 when the volume is 4 since it will make the volume negative. In the second example, one of the optimal ways for Bob is to press the +5 twice, then press -1 once. In the last example, Bob can press the +5 once, then press +1 . "...

Tutorials

Codeforces Round #601 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
66054147 algon_320 A Nov. 30, 2019, 6:50 p.m. OK Clang++17 Diagnostics TESTS 5 46 0 800
65402952 tranminhprvt01 A Nov. 20, 2019, 12:30 a.m. OK FPC TESTS 5 15 0 800
66744969 yrickman A Dec. 13, 2019, 1:08 a.m. OK FPC TESTS 5 15 0 800
65689710 Windy_VN A Nov. 25, 2019, 3:48 a.m. OK FPC TESTS 5 15 0 800
65397506 asma23 A Nov. 19, 2019, 7:48 p.m. OK FPC TESTS 5 15 0 800
65430993 bobr6 A Nov. 20, 2019, 12:04 p.m. OK FPC TESTS 5 15 102400 800
65697786 AronDarkovich A Nov. 25, 2019, 9:13 a.m. OK FPC TESTS 5 15 204800 800
66499058 Arcors A Dec. 8, 2019, 11:46 a.m. OK FPC TESTS 5 30 0 800
67068495 panden A Dec. 17, 2019, 11:57 a.m. OK FPC TESTS 5 30 0 800
67201191 OG150702 A Dec. 19, 2019, 10:58 a.m. OK FPC TESTS 5 31 0 800
67061348 duydec1 A Dec. 17, 2019, 9:13 a.m. OK FPC TESTS 5 31 0 800
67049607 cdtu_py A Dec. 17, 2019, 2:52 a.m. OK GNU C11 TESTS 5 15 0 800
68610387 RakibRahman A Jan. 11, 2020, 3:29 p.m. OK GNU C11 TESTS 5 15 0 800
68028346 Israt_Jahan_Nahin A Jan. 1, 2020, 7:33 a.m. OK GNU C11 TESTS 5 15 0 800
67315445 tgv2002 A Dec. 21, 2019, 5:45 a.m. OK GNU C11 TESTS 5 15 0 800
67171888 fenofista A Dec. 18, 2019, 5:37 p.m. OK GNU C11 TESTS 5 15 0 800
68980237 simbaa A Jan. 17, 2020, 10:25 a.m. OK GNU C11 TESTS 5 15 0 800
67010576 arie1218 A Dec. 16, 2019, 9:42 a.m. OK GNU C11 TESTS 5 15 0 800
66596344 mXaim A Dec. 10, 2019, 2:49 p.m. OK GNU C11 TESTS 5 15 0 800
66451061 shubh101220001 A Dec. 7, 2019, 11:29 a.m. OK GNU C11 TESTS 5 15 0 800
69394105 imtiaj.zero A Jan. 23, 2020, 5:23 a.m. OK GNU C11 TESTS 5 15 0 800
67845901 Zapdos A Dec. 28, 2019, 9:35 p.m. OK GNU C++11 TESTS 5 15 0 800
68006490 Naseem17 A Dec. 31, 2019, 1:27 p.m. OK GNU C++11 TESTS 5 15 0 800
68214287 Dope_StaR A Jan. 4, 2020, 9:28 p.m. OK GNU C++11 TESTS 5 15 0 800
68590078 vjudge5 A Jan. 11, 2020, 12:24 p.m. OK GNU C++11 TESTS 5 15 0 800
69200721 dragon_eye A Jan. 20, 2020, 4:26 p.m. OK GNU C++11 TESTS 5 15 0 800
69301138 anderson1208 A Jan. 22, 2020, 1:50 p.m. OK GNU C++11 TESTS 5 15 0 800
69506162 21_din_me_paisa_double A Jan. 25, 2020, 8:42 a.m. OK GNU C++11 TESTS 5 15 0 800
69509093 000what A Jan. 25, 2020, 9:50 a.m. OK GNU C++11 TESTS 5 15 0 800
69557378 luogu_bot2 A Jan. 26, 2020, 9:20 a.m. OK GNU C++11 TESTS 5 15 0 800
69936780 vjudge3 A Feb. 1, 2020, 4:16 a.m. OK GNU C++11 TESTS 5 15 0 800
69942831 Umang002 A Feb. 1, 2020, 6:41 a.m. OK GNU C++14 TESTS 5 15 0 800
69857338 Amitraj A Jan. 30, 2020, 5:23 p.m. OK GNU C++14 TESTS 5 15 0 800
69649648 RH.RASEL A Jan. 28, 2020, 4:21 a.m. OK GNU C++14 TESTS 5 15 0 800
69647458 firiexp A Jan. 28, 2020, 2:39 a.m. OK GNU C++14 TESTS 5 15 0 800
69592299 polanwind A Jan. 27, 2020, 1:23 a.m. OK GNU C++14 TESTS 5 15 0 800
69552752 selia A Jan. 26, 2020, 7:16 a.m. OK GNU C++14 TESTS 5 15 0 800
69293474 pranu1300 A Jan. 22, 2020, 11:16 a.m. OK GNU C++14 TESTS 5 15 0 800
69289687 SINayem_1703163 A Jan. 22, 2020, 9:42 a.m. OK GNU C++14 TESTS 5 15 0 800
69259448 bustthemall A Jan. 21, 2020, 4:37 p.m. OK GNU C++14 TESTS 5 15 0 800
69242130 Alche_mist A Jan. 21, 2020, 11:45 a.m. OK GNU C++14 TESTS 5 15 0 800
65371438 pavement A Nov. 19, 2019, 3:31 p.m. OK GNU C++17 TESTS 5 0 0 800
69939304 vjudge1 A Feb. 1, 2020, 5:32 a.m. OK GNU C++17 TESTS 5 15 0 800
69939306 vjudge4 A Feb. 1, 2020, 5:32 a.m. OK GNU C++17 TESTS 5 15 0 800
69937823 9957 A Feb. 1, 2020, 4:54 a.m. OK GNU C++17 TESTS 5 15 0 800
69937580 vjudge5 A Feb. 1, 2020, 4:46 a.m. OK GNU C++17 TESTS 5 15 0 800
69937342 vjudge3 A Feb. 1, 2020, 4:34 a.m. OK GNU C++17 TESTS 5 15 0 800
69937127 vjudge5 A Feb. 1, 2020, 4:26 a.m. OK GNU C++17 TESTS 5 15 0 800
69937115 keke250 A Feb. 1, 2020, 4:26 a.m. OK GNU C++17 TESTS 5 15 0 800
69936985 vjudge4 A Feb. 1, 2020, 4:22 a.m. OK GNU C++17 TESTS 5 15 0 800
69881275 BrokenDreACM A Jan. 31, 2020, 6:26 a.m. OK GNU C++17 TESTS 5 15 0 800
65690305 vector9x A Nov. 25, 2019, 4:18 a.m. OK Go TESTS 5 15 0 800
65414864 synapse A Nov. 20, 2019, 6:24 a.m. OK Go TESTS 5 15 0 800
65414642 synapse A Nov. 20, 2019, 6:18 a.m. OK Go TESTS 5 31 0 800
65402496 stumble A Nov. 19, 2019, 11:59 p.m. OK Go TESTS 5 31 0 800
68347739 sakenism A Jan. 7, 2020, 8:13 a.m. OK Go TESTS 5 93 0 800
65375394 sayeed_1999 A Nov. 19, 2019, 3:46 p.m. OK Go TESTS 5 93 0 800
66518008 Laurens A Dec. 8, 2019, 8:05 p.m. OK Haskell TESTS 5 31 0 800
65608055 pilusx A Nov. 23, 2019, 10:17 p.m. OK Haskell TESTS 5 31 102400 800
65763168 LogXx A Nov. 26, 2019, 4:43 p.m. OK Haskell TESTS 5 46 102400 800
65393077 XOR-star A Nov. 19, 2019, 6:03 p.m. OK Haskell TESTS 5 46 102400 800
65597034 Tlatoani A Nov. 23, 2019, 4:19 p.m. OK Java 11 TESTS 5 155 0 800
65402854 Garett A Nov. 20, 2019, 12:23 a.m. OK Java 11 TESTS 5 171 0 800
65496838 Ellie_K A Nov. 21, 2019, 4:57 p.m. OK Java 11 TESTS 5 186 0 800
65414528 enricogi A Nov. 20, 2019, 6:15 a.m. OK Java 11 TESTS 5 186 0 800
65394587 serafimkoo A Nov. 19, 2019, 6:34 p.m. OK Java 11 TESTS 5 186 0 800
65366931 CSA-cyber A Nov. 19, 2019, 3:16 p.m. OK Java 11 TESTS 5 186 0 800
65443542 machhra A Nov. 20, 2019, 3:07 p.m. OK Java 11 TESTS 5 187 0 800
68352867 warrioramrit A Jan. 7, 2020, 10:43 a.m. OK Java 11 TESTS 5 202 0 800
67590161 cribabby A Dec. 25, 2019, 9:22 a.m. OK Java 11 TESTS 5 202 0 800
66455206 satya_p54 A Dec. 7, 2019, 12:54 p.m. OK Java 11 TESTS 5 202 0 800
66648976 StayAwayFromBitches A Dec. 11, 2019, 6:05 p.m. OK Java 8 TESTS 5 92 0 800
67169453 Mann_27__ A Dec. 18, 2019, 4:45 p.m. OK Java 8 TESTS 5 108 0 800
66622510 In_The_Name_Of_Love A Dec. 11, 2019, 7:34 a.m. OK Java 8 TESTS 5 108 0 800
66539695 sumit.kumar A Dec. 9, 2019, 11:01 a.m. OK Java 8 TESTS 5 108 0 800
66526333 insane_28 A Dec. 9, 2019, 5:05 a.m. OK Java 8 TESTS 5 108 0 800
66004772 ikagotso A Nov. 29, 2019, 8:51 p.m. OK Java 8 TESTS 5 108 0 800
65684359 ZMaaraki A Nov. 24, 2019, 9:33 p.m. OK Java 8 TESTS 5 108 0 800
65514099 T_Nady A Nov. 22, 2019, 5:57 a.m. OK Java 8 TESTS 5 108 0 800
65497202 dexter_1205 A Nov. 21, 2019, 5:06 p.m. OK Java 8 TESTS 5 108 0 800
65496374 T_Nady A Nov. 21, 2019, 4:45 p.m. OK Java 8 TESTS 5 108 0 800
69067831 vjudge3 A Jan. 18, 2020, 7:33 p.m. OK JavaScript TESTS 5 31 1228800 800
65424221 I__D__ A Nov. 20, 2019, 10:09 a.m. OK JavaScript TESTS 5 31 1228800 800
68901271 Sparrow A Jan. 16, 2020, 6:03 a.m. OK JavaScript TESTS 5 31 1536000 800
65382805 S7sRuss A Nov. 19, 2019, 4:14 p.m. OK JavaScript TESTS 5 31 1638400 800
65369882 zheng_wei_ming A Nov. 19, 2019, 3:26 p.m. OK JavaScript TESTS 5 46 1433600 800
68149242 I.A.K.O.V A Jan. 4, 2020, 6:10 a.m. OK Kotlin TESTS 5 109 0 800
65403740 Spheniscine A Nov. 20, 2019, 1:23 a.m. OK Kotlin TESTS 5 124 0 800
65393014 roaim A Nov. 19, 2019, 6:02 p.m. OK Kotlin TESTS 5 155 0 800
65531393 yudedako A Nov. 22, 2019, 12:34 p.m. OK Kotlin TESTS 5 155 204800 800
66892962 agent-10 A Dec. 14, 2019, 10:03 p.m. OK Kotlin TESTS 5 155 204800 800
65371683 Tenzo A Nov. 19, 2019, 3:32 p.m. OK Kotlin TESTS 5 171 0 800
65397013 Black_Fregat A Nov. 19, 2019, 7:33 p.m. OK Kotlin TESTS 5 171 204800 800
69927636 m1_k3 A Jan. 31, 2020, 9:17 p.m. OK Mono C# TESTS 5 46 0 800
65655118 GusztavSzmolik A Nov. 24, 2019, 10:10 a.m. OK Mono C# TESTS 5 46 204800 800
65374189 Taj025 A Nov. 19, 2019, 3:41 p.m. OK Mono C# TESTS 5 46 204800 800
65446291 Anish1712 A Nov. 20, 2019, 4:08 p.m. OK Mono C# TESTS 5 46 204800 800
66040099 vedroboev A Nov. 30, 2019, 1:13 p.m. OK Mono C# TESTS 5 46 204800 800
68363059 75number A Jan. 7, 2020, 2:51 p.m. OK Mono C# TESTS 5 46 6758400 800
65449540 Dock290 A Nov. 20, 2019, 5:29 p.m. OK Mono C# TESTS 5 61 204800 800
65367927 balibalo756 A Nov. 19, 2019, 3:20 p.m. OK Mono C# TESTS 5 61 204800 800
65370341 ramnaidusaragadam A Nov. 19, 2019, 3:28 p.m. OK Mono C# TESTS 5 62 204800 800
65495378 nastya1199 A Nov. 21, 2019, 4:21 p.m. OK Mono C# TESTS 5 62 204800 800
68311622 vjudge2 A Jan. 6, 2020, 11:27 a.m. OK MS C++ TESTS 5 15 0 800
68311060 vjudge5 A Jan. 6, 2020, 11:12 a.m. OK MS C++ TESTS 5 15 0 800
68154591 ontree A Jan. 4, 2020, 8:26 a.m. OK MS C++ TESTS 5 15 0 800
66411241 vjudge4 A Dec. 6, 2019, 3:24 p.m. OK MS C++ TESTS 5 15 0 800
66404102 vjudge2 A Dec. 6, 2019, 1:10 p.m. OK MS C++ TESTS 5 15 0 800
66228063 vjudge5 A Dec. 3, 2019, 1:22 p.m. OK MS C++ TESTS 5 15 0 800
66226393 vjudge3 A Dec. 3, 2019, 12:46 p.m. OK MS C++ TESTS 5 15 0 800
68911975 vjudge2 A Jan. 16, 2020, 7:49 a.m. OK MS C++ TESTS 5 15 0 800
68312089 vjudge5 A Jan. 6, 2020, 11:38 a.m. OK MS C++ TESTS 5 15 0 800
68311766 vjudge2 A Jan. 6, 2020, 11:30 a.m. OK MS C++ TESTS 5 15 0 800
67303747 MOKASSAB A Dec. 20, 2019, 7:58 p.m. OK MS C++ 2017 TESTS 5 15 0 800
67689914 ahmed__shrif A Dec. 27, 2019, 10:38 a.m. OK MS C++ 2017 TESTS 5 15 0 800
67623288 Sameh88 A Dec. 25, 2019, 7:58 p.m. OK MS C++ 2017 TESTS 5 15 0 800
67607984 IPRIT A Dec. 25, 2019, 2:18 p.m. OK MS C++ 2017 TESTS 5 15 0 800
66643217 XlolypopX A Dec. 11, 2019, 3:35 p.m. OK MS C++ 2017 TESTS 5 15 0 800
66590089 Mad112233 A Dec. 10, 2019, 12:41 p.m. OK MS C++ 2017 TESTS 5 15 0 800
66404826 vjudge5 A Dec. 6, 2019, 1:22 p.m. OK MS C++ 2017 TESTS 5 15 0 800
66403538 vjudge3 A Dec. 6, 2019, 1 p.m. OK MS C++ 2017 TESTS 5 15 0 800
66395179 Tangerine A Dec. 6, 2019, 10:31 a.m. OK MS C++ 2017 TESTS 5 15 0 800
66226481 vjudge1 A Dec. 3, 2019, 12:48 p.m. OK MS C++ 2017 TESTS 5 15 0 800
65883284 fc-lib-xyz A Nov. 27, 2019, 8:17 p.m. OK Node.js TESTS 5 156 1228800 800
65370542 katikalasuresh A Nov. 19, 2019, 3:28 p.m. OK Node.js TESTS 5 186 3379200 800
65425923 mm944 A Nov. 20, 2019, 10:41 a.m. OK PascalABC.NET TESTS 5 187 0 800
65434762 S.A.O_3 A Nov. 20, 2019, 1:04 p.m. OK PascalABC.NET TESTS 5 296 0 800
65501998 mNT A Nov. 21, 2019, 7:29 p.m. OK PascalABC.NET TESTS 5 311 0 800
65916291 belka1307 A Nov. 28, 2019, 2:42 p.m. OK PascalABC.NET TESTS 5 311 0 800
65733214 DooM228 A Nov. 26, 2019, 6:22 a.m. OK PascalABC.NET TESTS 5 311 0 800
66103991 MaksimFedoseev A Dec. 1, 2019, 8:41 a.m. OK PascalABC.NET TESTS 5 312 204800 800
65468355 Petyaue8 A Nov. 21, 2019, 7:14 a.m. OK PascalABC.NET TESTS 5 327 0 800
65394224 TimSunduk A Nov. 19, 2019, 6:26 p.m. OK PascalABC.NET TESTS 5 342 0 800
68468239 Nidavellir A Jan. 9, 2020, 10:18 p.m. OK PascalABC.NET TESTS 5 358 102400 800
65469027 MAKARonin A Nov. 21, 2019, 7:34 a.m. OK PHP TESTS 5 31 0 800
65452020 igorqs A Nov. 20, 2019, 6:30 p.m. OK PHP TESTS 5 31 0 800
66153014 juned.ipe A Dec. 1, 2019, 8:06 p.m. OK PHP TESTS 5 31 0 800
66452579 mayakin A Dec. 7, 2019, 12:01 p.m. OK PHP TESTS 5 46 0 800
65469699 SoSooding A Nov. 21, 2019, 7:51 a.m. OK PyPy 2 TESTS 5 155 307200 800
65413489 aaa_bbb_ccc A Nov. 20, 2019, 5:41 a.m. OK PyPy 2 TESTS 5 155 409600 800
65396122 hritik3878 A Nov. 19, 2019, 7:10 p.m. OK PyPy 2 TESTS 5 171 409600 800
65539083 yumtam A Nov. 22, 2019, 3:21 p.m. OK PyPy 2 TESTS 5 187 204800 800
65494683 long240808 A Nov. 21, 2019, 4:05 p.m. OK PyPy 3 TESTS 5 140 2048000 800
65649131 ElectricR A Nov. 24, 2019, 9:38 a.m. OK PyPy 3 TESTS 5 155 102400 800
68769588 pranaymalhan A Jan. 14, 2020, 11:21 a.m. OK PyPy 3 TESTS 5 155 1536000 800
65595752 ng24_7 A Nov. 23, 2019, 3:48 p.m. OK PyPy 3 TESTS 5 155 1536000 800
65440896 pranaymalhan1 A Nov. 20, 2019, 2:18 p.m. OK PyPy 3 TESTS 5 155 1536000 800
68128947 sureshsinghspd A Jan. 3, 2020, 4:16 p.m. OK PyPy 3 TESTS 5 155 1740800 800
65744810 germainegeorge A Nov. 26, 2019, 11:48 a.m. OK PyPy 3 TESTS 5 155 1945600 800
68115103 mitribunskiy A Jan. 3, 2020, 11:08 a.m. OK PyPy 3 TESTS 5 156 1740800 800
66917717 poslashwnEr A Dec. 15, 2019, 6:08 a.m. OK PyPy 3 TESTS 5 170 1740800 800
68134397 deadguy A Jan. 3, 2020, 6:14 p.m. OK PyPy 3 TESTS 5 170 1945600 800
69295233 bsr011 A Jan. 22, 2020, 11:57 a.m. OK Python 2 TESTS 5 155 0 800
65723889 GTrigger A Nov. 25, 2019, 8:55 p.m. OK Python 2 TESTS 5 171 0 800
65413467 phoenix28 A Nov. 20, 2019, 5:41 a.m. OK Python 2 TESTS 5 171 0 800
65372199 elistark A Nov. 19, 2019, 3:34 p.m. OK Python 2 TESTS 5 171 0 800
65523839 shubhankarsharma00 A Nov. 22, 2019, 9:30 a.m. OK Python 2 TESTS 5 186 0 800
65931353 chevoBallack A Nov. 28, 2019, 9:18 p.m. OK Python 2 TESTS 5 187 0 800
65368225 Mike10 A Nov. 19, 2019, 3:21 p.m. OK Python 2 TESTS 5 202 0 800
65928722 atarw A Nov. 28, 2019, 7:39 p.m. OK Python 2 TESTS 5 264 5324800 800
69700795 nunnun A Jan. 29, 2020, 12:08 a.m. OK Python 3 TESTS 5 93 0 800
65439729 EvgEvd A Nov. 20, 2019, 1:58 p.m. OK Python 3 TESTS 5 93 0 800
66795646 MehulJ A Dec. 13, 2019, 4:58 p.m. OK Python 3 TESTS 5 93 204800 800
68378867 mike.shvets A Jan. 7, 2020, 10:07 p.m. OK Python 3 TESTS 5 93 307200 800
66628968 Umangsonika A Dec. 11, 2019, 10:23 a.m. OK Python 3 TESTS 5 93 307200 800
65421448 gagangaur A Nov. 20, 2019, 9:05 a.m. OK Python 3 TESTS 5 93 307200 800
69158309 waa A Jan. 19, 2020, 8:51 p.m. OK Python 3 TESTS 5 108 0 800
68991498 soloveve66 A Jan. 17, 2020, 3:24 p.m. OK Python 3 TESTS 5 108 0 800
68004172 dlh A Dec. 31, 2019, 12:21 p.m. OK Python 3 TESTS 5 108 0 800
67661997 abhishen A Dec. 26, 2019, 4:14 p.m. OK Python 3 TESTS 5 108 0 800
66160497 fshuto A Dec. 2, 2019, 4 a.m. OK Ruby TESTS 5 61 0 800
65583285 manta1130 A Nov. 23, 2019, 11:39 a.m. OK Rust TESTS 5 46 0 800

remove filters

Back to search problems