Codeforces Round 567 (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
1181 Codeforces Round 567 (Div. 2) FINISHED False 7200 171145499 June 16, 2019, 9:35 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 13691 ) A Chunga-Changa PROGRAMMING greedy math 1000

B'Soon after the Chunga-Changa island was discovered, it started to acquire some forms of civilization and even market economy. A new currency arose, colloquially called "chizhik". One has to pay in chizhiks to buy a coconut now. Sasha and Masha are about to buy some coconuts which are sold at price z chizhiks per coconut. Sasha has x chizhiks, Masha has y chizhiks. Each girl will buy as many coconuts as she can using only her money. This way each girl will buy an integer non-negative number of coconuts. The girls discussed their plans and found that the total number of coconuts they buy can increase (or decrease) if one of them gives several chizhiks to the other girl. The chizhiks can 't be split in parts, so the girls can only exchange with integer number of chizhiks. Consider the following example. Suppose Sasha has 5 chizhiks, Masha has 4 chizhiks, and the price for one coconut be 3 chizhiks. If the girls don 't exchange with chizhiks, they will buy 1 + 1 = 2 coconuts. However, if, for example, Masha gives Sasha one chizhik, then Sasha will have 6 chizhiks, Masha will have 3 chizhiks, and the girls will buy 2 + 1 = 3 coconuts. It is not that easy to live on the island now, so Sasha and Mash want to exchange with chizhiks in such a way that they will buy the maximum possible number of coconuts. Nobody wants to have a debt, so among all possible ways to buy the maximum possible number of coconuts find such a way that minimizes the number of chizhiks one girl gives to the other (it is not important who will be the person giving the chizhiks). The first line contains three integers x , y and z ( 0 <= x, y <= 10^{18} , 1 <= z <= 10^{18} ) -- the number of chizhics Sasha has, the number of chizhics Masha has and the price of a coconut. Print two integers: the maximum possible number of coconuts the girls can buy and the minimum number of chizhiks one girl has to give t'...

Tutorials

Editorial of Codeforces Round #567 (based on All-Russian olympiad in the name of Keldysh)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
55679002 Aman2000 A June 17, 2019, 12:02 p.m. OK Clang++17 Diagnostics TESTS 39 46 0 1000
55708455 denkora A June 18, 2019, 8:57 a.m. OK Clang++17 Diagnostics TESTS 39 46 0 1000
59433039 binarycode A Aug. 25, 2019, 7:20 a.m. OK Clang++17 Diagnostics TESTS 39 46 0 1000
55714443 champion812r A June 18, 2019, 11:58 a.m. OK Clang++17 Diagnostics TESTS 39 46 0 1000
57468375 Iftekhar_Fahim_CoU12ICT9 A July 21, 2019, 4:44 p.m. OK Clang++17 Diagnostics TESTS 39 46 0 1000
57565842 asdfghjklqqq A July 23, 2019, 2:56 a.m. OK Clang++17 Diagnostics TESTS 39 46 0 1000
55645338 jiangly A June 16, 2019, 12:06 p.m. OK Clang++17 Diagnostics TESTS 39 46 0 1000
65347144 vjudge1 A Nov. 19, 2019, 12:59 p.m. OK Clang++17 Diagnostics TESTS 39 61 0 1000
55630090 A_IGOR A June 16, 2019, 10:17 a.m. OK Delphi TESTS 39 31 0 1000
55655364 ruban A June 16, 2019, 4:57 p.m. OK Delphi TESTS 39 31 0 1000
55677132 mengqqQQ A June 17, 2019, 11:03 a.m. OK FPC TESTS 39 15 0 1000
55688381 Zeatea A June 17, 2019, 4:42 p.m. OK FPC TESTS 39 30 0 1000
55748651 lepojevic10 A June 19, 2019, 11:29 a.m. OK FPC TESTS 39 31 0 1000
55709571 ld_minh4354 A June 18, 2019, 9:35 a.m. OK FPC TESTS 39 31 0 1000
56141722 bin9638 A June 27, 2019, 3:47 a.m. OK FPC TESTS 39 31 102400 1000
55669638 HQT2003 A June 17, 2019, 6:43 a.m. OK FPC TESTS 39 46 0 1000
55632990 ArinaRaguzina A June 16, 2019, 10:31 a.m. OK FPC TESTS 39 46 0 1000
57749735 minhquaningenious A July 25, 2019, 2:22 p.m. OK FPC TESTS 39 46 102400 1000
58328430 joychanda A Aug. 5, 2019, 8:33 a.m. OK GNU C11 TESTS 39 15 0 1000
58331351 tawhid26 A Aug. 5, 2019, 9:30 a.m. OK GNU C11 TESTS 39 15 0 1000
61108287 Shinchu_728 A Sept. 23, 2019, 10:12 a.m. OK GNU C11 TESTS 39 15 0 1000
58329581 Nirjharchowdhury A Aug. 5, 2019, 8:55 a.m. OK GNU C11 TESTS 39 15 0 1000
55631153 ldw2614 A June 16, 2019, 10:22 a.m. OK GNU C11 TESTS 39 30 0 1000
55635002 rupa329 A June 16, 2019, 10:42 a.m. OK GNU C11 TESTS 39 30 0 1000
55639270 shashi772 A June 16, 2019, 11:07 a.m. OK GNU C11 TESTS 39 30 0 1000
55657030 sansen A June 16, 2019, 5:57 p.m. OK GNU C11 TESTS 39 30 0 1000
55773167 ullash0398 A June 19, 2019, 3:38 p.m. OK GNU C11 TESTS 39 30 0 1000
57967534 Tasmia_786 A July 30, 2019, 3:38 a.m. OK GNU C11 TESTS 39 30 0 1000
55848927 Jun_Naruse A June 21, 2019, 1:33 a.m. OK GNU C++11 TESTS 39 15 0 1000
55856536 lobs666 A June 21, 2019, 7:16 a.m. OK GNU C++11 TESTS 39 15 0 1000
57357800 vjudge5 A July 20, 2019, 6:51 a.m. OK GNU C++11 TESTS 39 30 0 1000
57792525 MrSKJ A July 26, 2019, 10:03 a.m. OK GNU C++11 TESTS 39 30 0 1000
58140942 MeMe_Bana_Dunga A Aug. 1, 2019, 6:07 p.m. OK GNU C++11 TESTS 39 30 0 1000
56673061 cyg_Alex_codegician A July 7, 2019, 2:04 p.m. OK GNU C++11 TESTS 39 30 0 1000
67632564 RTasfia A Dec. 26, 2019, 5 a.m. OK GNU C++11 TESTS 39 30 0 1000
68685667 vjudge4 A Jan. 13, 2020, 3:09 a.m. OK GNU C++11 TESTS 39 30 0 1000
59356546 ronakgoti_123 A Aug. 23, 2019, 1:44 p.m. OK GNU C++11 TESTS 39 30 0 1000
56740111 Vennela_Reddy A July 9, 2019, 7:18 a.m. OK GNU C++11 TESTS 39 30 0 1000
65347605 vjudge3 A Nov. 19, 2019, 1:08 p.m. OK GNU C++14 TESTS 39 15 0 1000
68146598 aa0809 A Jan. 4, 2020, 4:47 a.m. OK GNU C++14 TESTS 39 15 0 1000
67257386 Gankutsuou A Dec. 19, 2019, 11:53 p.m. OK GNU C++14 TESTS 39 15 0 1000
66934754 jaydeep19 A Dec. 15, 2019, 8:10 a.m. OK GNU C++14 TESTS 39 15 0 1000
62316927 ritwik0706 sid001 dnagaria A Oct. 10, 2019, 3:34 p.m. OK GNU C++14 TESTS 39 15 0 1000
61084806 vjudge5 A Sept. 22, 2019, 5:54 p.m. OK GNU C++14 TESTS 39 15 0 1000
59799142 the_traveler_ A Aug. 31, 2019, 9:36 a.m. OK GNU C++14 TESTS 39 15 0 1000
58988388 rfpermen A Aug. 18, 2019, 8:09 a.m. OK GNU C++14 TESTS 39 15 0 1000
58986417 amremaish A Aug. 18, 2019, 7:17 a.m. OK GNU C++14 TESTS 39 15 0 1000
58812195 San007 A Aug. 14, 2019, 11:15 a.m. OK GNU C++14 TESTS 39 15 0 1000
61410187 porhunov26 A Sept. 28, 2019, 8:26 a.m. OK GNU C++17 TESTS 39 15 0 1000
62879966 panditjii A Oct. 18, 2019, 4:31 p.m. OK GNU C++17 TESTS 39 15 0 1000
63643846 CodeSherlock A Oct. 28, 2019, 8:58 a.m. OK GNU C++17 TESTS 39 15 0 1000
64422657 tourist_palestine A Nov. 6, 2019, 6:13 p.m. OK GNU C++17 TESTS 39 15 0 1000
65343101 vjudge3 A Nov. 19, 2019, 11:40 a.m. OK GNU C++17 TESTS 39 15 0 1000
66615867 zodgin A Dec. 11, 2019, 3:47 a.m. OK GNU C++17 TESTS 39 15 0 1000
67042474 ankit_reigns999 A Dec. 16, 2019, 7:59 p.m. OK GNU C++17 TESTS 39 15 0 1000
67501762 vjudge1 A Dec. 24, 2019, 5:07 a.m. OK GNU C++17 TESTS 39 15 0 1000
67654424 vjudge4 A Dec. 26, 2019, 1:23 p.m. OK GNU C++17 TESTS 39 15 0 1000
69386244 vjudge1 A Jan. 22, 2020, 10:51 p.m. OK GNU C++17 TESTS 39 15 0 1000
60461187 sighduck A Sept. 12, 2019, 8:43 p.m. OK Go TESTS 39 31 0 1000
57786418 TangentDay A July 26, 2019, 7:58 a.m. OK Go TESTS 39 31 0 1000
55648992 mikolaychuknn A June 16, 2019, 1:36 p.m. OK Go TESTS 39 31 0 1000
56075909 crap_coder A June 26, 2019, 12:49 p.m. OK Go TESTS 39 46 0 1000
57718093 bamzy A July 25, 2019, 3:46 a.m. OK Haskell TESTS 39 46 102400 1000
69206076 warrioramrit A Jan. 20, 2020, 6:03 p.m. OK Java 11 TESTS 39 218 0 1000
56553299 pavelex A July 5, 2019, 11:03 a.m. OK Java 8 TESTS 39 108 0 1000
55717842 wanTedGuY A June 18, 2019, 1:39 p.m. OK Java 8 TESTS 39 108 0 1000
55648587 Sleeperino A June 16, 2019, 1:26 p.m. OK Java 8 TESTS 39 108 0 1000
55645765 beroul A June 16, 2019, 12:14 p.m. OK Java 8 TESTS 39 108 0 1000
68634739 Mahakarma A Jan. 12, 2020, 5:16 a.m. OK Java 8 TESTS 39 109 0 1000
67243914 Kavi.Prajapati A Dec. 19, 2019, 4:50 p.m. OK Java 8 TESTS 39 109 0 1000
66647346 adzi A Dec. 11, 2019, 5:19 p.m. OK Java 8 TESTS 39 109 0 1000
60185340 zekigurbuz A Sept. 6, 2019, 6:11 p.m. OK Java 8 TESTS 39 109 0 1000
58871846 ISSAM_LAKOUAM A Aug. 15, 2019, 3:48 p.m. OK Java 8 TESTS 39 109 0 1000
58318504 vvenkai A Aug. 5, 2019, 4:28 a.m. OK Java 8 TESTS 39 109 0 1000
56500512 I.A.K.O.V A July 4, 2019, 6:05 a.m. OK Kotlin TESTS 39 124 0 1000
56500157 I.A.K.O.V A July 4, 2019, 5:55 a.m. OK Kotlin TESTS 39 124 0 1000
56012522 wbars A June 24, 2019, 6:54 p.m. OK Kotlin TESTS 39 140 0 1000
55985255 mendel_vv A June 24, 2019, 2:43 a.m. OK Kotlin TESTS 39 140 614400 1000
55965110 Spheniscine A June 23, 2019, 11:39 a.m. OK Kotlin TESTS 39 155 614400 1000
55633953 fredboy A June 16, 2019, 10:36 a.m. OK Kotlin TESTS 39 155 614400 1000
55632985 butoff A June 16, 2019, 10:31 a.m. OK Kotlin TESTS 39 155 614400 1000
55713545 Antonioplay A June 18, 2019, 11:32 a.m. OK Kotlin TESTS 39 155 819200 1000
55630359 MDikkii A June 16, 2019, 10:18 a.m. OK Kotlin TESTS 39 156 614400 1000
55658647 djincs A June 16, 2019, 7:04 p.m. OK Mono C# TESTS 39 46 0 1000
55658087 djincs A June 16, 2019, 6:39 p.m. OK Mono C# TESTS 39 46 0 1000
55649023 TRR A June 16, 2019, 1:37 p.m. OK Mono C# TESTS 39 46 0 1000
55643660 Ruban_Denic A June 16, 2019, 11:33 a.m. OK Mono C# TESTS 39 46 0 1000
55629275 BNIS A June 16, 2019, 10:13 a.m. OK Mono C# TESTS 39 46 0 1000
55722895 JoelleSh A June 18, 2019, 4:13 p.m. OK Mono C# TESTS 39 61 0 1000
55639613 _DKS_ A June 16, 2019, 11:09 a.m. OK Mono C# TESTS 39 61 0 1000
55651226 jose31309 A June 16, 2019, 2:40 p.m. OK Mono C# TESTS 39 61 0 1000
55693281 ablewhite A June 17, 2019, 7:31 p.m. OK Mono C# TESTS 39 61 3584000 1000
55714016 maxkh A June 18, 2019, 11:46 a.m. OK Mono C# TESTS 39 62 0 1000
61082043 vjudge4 A Sept. 22, 2019, 4:45 p.m. OK MS C++ TESTS 39 30 0 1000
66484081 vjudge1 A Dec. 8, 2019, 5:15 a.m. OK MS C++ TESTS 39 30 0 1000
68638477 lilier A Jan. 12, 2020, 6:43 a.m. OK MS C++ TESTS 39 31 0 1000
67494644 vjudge3 A Dec. 23, 2019, 9:33 p.m. OK MS C++ TESTS 39 31 0 1000
66484825 vjudge4 A Dec. 8, 2019, 5:46 a.m. OK MS C++ TESTS 39 31 0 1000
66484712 vjudge3 A Dec. 8, 2019, 5:42 a.m. OK MS C++ TESTS 39 31 0 1000
66483705 vjudge5 A Dec. 8, 2019, 4:59 a.m. OK MS C++ TESTS 39 31 0 1000
68864563 vjudge3 A Jan. 15, 2020, 1:09 p.m. OK MS C++ TESTS 39 31 0 1000
68867997 Vainglory A Jan. 15, 2020, 2:11 p.m. OK MS C++ TESTS 39 31 0 1000
69283127 hychychyc A Jan. 22, 2020, 6:54 a.m. OK MS C++ TESTS 39 31 0 1000
57984347 bharath. A July 30, 2019, 10:45 a.m. OK MS C++ 2017 TESTS 39 30 0 1000
57486500 LaiWT A July 22, 2019, 5:33 a.m. OK MS C++ 2017 TESTS 39 30 0 1000
66483463 vjudge4 A Dec. 8, 2019, 4:47 a.m. OK MS C++ 2017 TESTS 39 30 307200 1000
68673583 FumeiYaziwa A Jan. 12, 2020, 5:40 p.m. OK MS C++ 2017 TESTS 39 31 0 1000
65348970 vjudge4 A Nov. 19, 2019, 1:35 p.m. OK MS C++ 2017 TESTS 39 31 0 1000
66484308 vjudge3 A Dec. 8, 2019, 5:25 a.m. OK MS C++ 2017 TESTS 39 31 0 1000
67613384 vjudge4 A Dec. 25, 2019, 4:14 p.m. OK MS C++ 2017 TESTS 39 31 0 1000
63378868 hosein_bidaki A Oct. 25, 2019, 11:52 a.m. OK MS C++ 2017 TESTS 39 31 0 1000
62772102 tejalnaik A Oct. 17, 2019, 10:37 a.m. OK MS C++ 2017 TESTS 39 31 0 1000
61712174 coder_pikachu A Oct. 2, 2019, 11:41 a.m. OK MS C++ 2017 TESTS 39 31 0 1000
55682128 f2p A June 17, 2019, 1:36 p.m. OK PascalABC.NET TESTS 39 187 0 1000
56061298 Gimber A June 26, 2019, 5:37 a.m. OK PascalABC.NET TESTS 39 187 0 1000
55684751 vippee A June 17, 2019, 2:53 p.m. OK PascalABC.NET TESTS 39 187 0 1000
57607606 romanporsh A July 23, 2019, 6:42 p.m. OK PascalABC.NET TESTS 39 311 307200 1000
63912435 codeforceunit A Oct. 31, 2019, 8:48 a.m. OK PascalABC.NET TESTS 39 327 102400 1000
56004650 lostamok A June 24, 2019, 2:51 p.m. OK PHP TESTS 39 31 512000 1000
56004530 lostamok A June 24, 2019, 2:46 p.m. OK PHP TESTS 39 31 512000 1000
55652503 mayakin A June 16, 2019, 3:18 p.m. OK PHP TESTS 39 46 0 1000
56712429 OverloadedCode A July 8, 2019, 1:13 p.m. OK PyPy 2 TESTS 39 124 0 1000
56224920 Saurabh66 A June 28, 2019, 11:43 a.m. OK PyPy 2 TESTS 39 124 0 1000
55649544 fortmax120 A June 16, 2019, 1:53 p.m. OK PyPy 2 TESTS 39 124 0 1000
58388994 raj1307 A Aug. 6, 2019, 1:03 p.m. OK PyPy 2 TESTS 39 124 307200 1000
55679073 shehebe A June 17, 2019, 12:03 p.m. OK PyPy 2 TESTS 39 140 1228800 1000
56635182 atarw A July 6, 2019, 6:59 p.m. OK PyPy 2 TESTS 39 233 7782400 1000
55735381 bertrandovide A June 19, 2019, 3:21 a.m. OK PyPy 2 TESTS 39 249 1228800 1000
56237817 gatsko A June 28, 2019, 5:02 p.m. OK PyPy 2 TESTS 39 249 7782400 1000
55680317 pranaymalhan A June 17, 2019, 12:42 p.m. OK PyPy 3 TESTS 39 124 0 1000
55701114 junior08 A June 18, 2019, 4:15 a.m. OK PyPy 3 TESTS 39 124 0 1000
56271183 ahManoTravei A June 29, 2019, 12:10 p.m. OK PyPy 3 TESTS 39 139 0 1000
55804945 Vovkaez A June 19, 2019, 9:24 p.m. OK PyPy 3 TESTS 39 139 0 1000
55750788 duck24 A June 19, 2019, 12:38 p.m. OK PyPy 3 TESTS 39 139 0 1000
55630707 LinusTorvaldsFan A June 16, 2019, 10:19 a.m. OK PyPy 3 TESTS 39 139 0 1000
58523344 Darren96 A Aug. 10, 2019, 6 a.m. OK PyPy 3 TESTS 39 139 0 1000
56812569 tanu38 A July 10, 2019, 5:06 p.m. OK PyPy 3 TESTS 39 139 0 1000
68667439 anishde85 A Jan. 12, 2020, 3:38 p.m. OK PyPy 3 TESTS 39 140 0 1000
66679671 mihir_yadav A Dec. 12, 2019, 12:38 p.m. OK PyPy 3 TESTS 39 140 0 1000
55688314 padfoot_prongs A June 17, 2019, 4:40 p.m. OK Python 2 TESTS 39 171 0 1000
55652960 kpiiitb A June 16, 2019, 3:32 p.m. OK Python 2 TESTS 39 171 0 1000
60447683 uncle_c A Sept. 12, 2019, 2:44 p.m. OK Python 2 TESTS 39 186 0 1000
55674345 ComptineDunAutreEte A June 17, 2019, 9:34 a.m. OK Python 2 TESTS 39 186 0 1000
55649096 kaif_7 A June 16, 2019, 1:40 p.m. OK Python 2 TESTS 39 186 0 1000
55701520 brown_goblin A June 18, 2019, 4:39 a.m. OK Python 2 TESTS 39 187 0 1000
58374636 -Morass- A Aug. 6, 2019, 7:51 a.m. OK Python 2 TESTS 39 187 409600 1000
55631925 Claustrophobic_Penguin A June 16, 2019, 10:26 a.m. OK Python 2 TESTS 39 202 0 1000
55835560 Madhur1906 A June 20, 2019, 3:09 p.m. OK Python 2 TESTS 39 202 0 1000
55726080 manjeet1999 A June 18, 2019, 5:48 p.m. OK Python 2 TESTS 39 234 0 1000
58109963 Shubhu_20 A Aug. 1, 2019, 6:39 a.m. OK Python 3 TESTS 39 108 0 1000
55727563 p_ritu A June 18, 2019, 6:39 p.m. OK Python 3 TESTS 39 108 0 1000
55713103 bsr11272 A June 18, 2019, 11:18 a.m. OK Python 3 TESTS 39 108 0 1000
68633268 karan_chawla A Jan. 12, 2020, 4:25 a.m. OK Python 3 TESTS 39 109 0 1000
66873956 vjudge2 A Dec. 14, 2019, 2:24 p.m. OK Python 3 TESTS 39 109 0 1000
64275447 TeaSpill A Nov. 4, 2019, 9:05 p.m. OK Python 3 TESTS 39 109 0 1000
65546338 wiz_cs A Nov. 22, 2019, 5:16 p.m. OK Python 3 TESTS 39 109 0 1000
69160963 Coder_95 A Jan. 19, 2020, 11:35 p.m. OK Python 3 TESTS 39 109 0 1000
68986612 cs1g A Jan. 17, 2020, 12:43 p.m. OK Python 3 TESTS 39 109 0 1000
68655895 Munchy_1 dazlersan1 vaisnav A Jan. 12, 2020, 12:13 p.m. OK Python 3 TESTS 39 109 0 1000
56826044 orailly A July 11, 2019, 4:21 a.m. OK Ruby TESTS 39 61 102400 1000
58842846 philiplambok A Aug. 15, 2019, 3:05 a.m. OK Ruby TESTS 39 62 0 1000
55668188 n1992 A June 17, 2019, 5:47 a.m. OK Ruby TESTS 39 62 0 1000
58809309 eusebius-marcel A Aug. 14, 2019, 10:08 a.m. OK Ruby TESTS 39 77 0 1000
63080421 koikotya A Oct. 21, 2019, 2:56 p.m. OK Ruby TESTS 39 93 0 1000
55678456 andreyrmg A June 17, 2019, 11:47 a.m. OK Rust TESTS 39 31 0 1000
55704766 clrcldy A June 18, 2019, 6:58 a.m. OK Rust TESTS 39 46 0 1000

remove filters

Back to search problems