Codeforces Round 585 (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
1215 Codeforces Round 585 (Div. 2) FINISHED False 7200 168895487 Sept. 15, 2019, 10:35 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 11639 ) A Yellow Cards PROGRAMMING greedy implementation math 1000

B"The final match of the Berland Football Cup has been held recently. The referee has shown n yellow cards throughout the match. At the beginning of the match there were a_1 players in the first team and a_2 players in the second team. The rules of sending players off the game are a bit different in Berland football. If a player from the first team receives k_1 yellow cards throughout the match, he can no longer participate in the match -- he's sent off. And if a player from the second team receives k_2 yellow cards, he's sent off. After a player leaves the match, he can no longer receive any yellow cards. Each of n yellow cards was shown to exactly one player. Even if all players from one team (or even from both teams) leave the match, the game still continues. The referee has lost his records on who has received each yellow card. Help him to determine the minimum and the maximum number of players that could have been thrown out of the game. The first line contains one integer a_1 (1 <= a_1 <= 1 ,000) -- the number of players in the first team. The second line contains one integer a_2 (1 <= a_2 <= 1 ,000) -- the number of players in the second team. The third line contains one integer k_1 (1 <= k_1 <= 1 ,000) -- the maximum number of yellow cards a player from the first team can receive (after receiving that many yellow cards, he leaves the game). The fourth line contains one integer k_2 (1 <= k_2 <= 1 ,000) -- the maximum number of yellow cards a player from the second team can receive (after receiving that many yellow cards, he leaves the game). The fifth line contains one integer n (1 <= n <= a_1 cdot k_1 + a_2 cdot k_2) -- the number of yellow cards that have been shown during the match. Print two integers -- the minimum and the maximum number of players that could have been thrown out of the game. In the first example it could be possible "...

Tutorials

Codeforces Round #585 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
60679096 ruban A Sept. 16, 2019, 1:25 p.m. OK Delphi TESTS 44 31 0 1000
61410248 luogu_bot4 A Sept. 28, 2019, 8:27 a.m. OK FPC TESTS 44 31 0 1000
60611524 dblark A Sept. 15, 2019, 10:47 a.m. OK FPC TESTS 44 31 0 1000
60645372 SangTin A Sept. 15, 2019, 4:55 p.m. OK FPC TESTS 44 31 0 1000
60965624 chinaxjh A Sept. 21, 2019, 6:55 a.m. OK FPC TESTS 44 31 0 1000
60676285 Just_Matvey A Sept. 16, 2019, 12:31 p.m. OK FPC TESTS 44 31 0 1000
60676753 Just_Matvey A Sept. 16, 2019, 12:40 p.m. OK FPC TESTS 44 31 0 1000
60965589 chinaxjh A Sept. 21, 2019, 6:54 a.m. OK FPC TESTS 44 31 0 1000
60660262 dblark A Sept. 16, 2019, 4:10 a.m. OK FPC TESTS 44 31 0 1000
60623786 zyenz123 A Sept. 15, 2019, 11:38 a.m. OK FPC TESTS 44 31 102400 1000
61473691 luogu_bot3 A Sept. 29, 2019, 1:07 p.m. OK FPC TESTS 44 31 102400 1000
66814669 shubh101220001 A Dec. 14, 2019, 5:06 a.m. OK GNU C11 TESTS 44 31 0 1000
66949863 wrong_verdict A Dec. 15, 2019, 9:48 a.m. OK GNU C11 TESTS 44 31 0 1000
67571605 vjudge5 A Dec. 24, 2019, 10:14 p.m. OK GNU C11 TESTS 44 31 0 1000
67611832 vjudge3 A Dec. 25, 2019, 3:40 p.m. OK GNU C11 TESTS 44 31 0 1000
67668846 n0.0b A Dec. 26, 2019, 7:09 p.m. OK GNU C11 TESTS 44 31 0 1000
68153058 yigezhe A Jan. 4, 2020, 7:44 a.m. OK GNU C11 TESTS 44 31 0 1000
68493214 vjudge5 A Jan. 10, 2020, 12:27 p.m. OK GNU C11 TESTS 44 31 0 1000
68747319 vjudge2 A Jan. 14, 2020, 5:16 a.m. OK GNU C11 TESTS 44 31 0 1000
69084085 vjudge4 A Jan. 19, 2020, 7:37 a.m. OK GNU C11 TESTS 44 31 0 1000
69635878 radlid A Jan. 27, 2020, 6:33 p.m. OK GNU C11 TESTS 44 31 0 1000
60711357 ranjitsinghrathore007 A Sept. 17, 2019, 8:30 a.m. OK GNU C++11 TESTS 44 30 0 1000
60749709 Kgarg A Sept. 18, 2019, 5:22 a.m. OK GNU C++11 TESTS 44 30 0 1000
60777554 isakib A Sept. 18, 2019, 2:59 p.m. OK GNU C++11 TESTS 44 30 0 1000
60778218 AAA66 A Sept. 18, 2019, 3:14 p.m. OK GNU C++11 TESTS 44 30 0 1000
60820402 tmyklebu A Sept. 18, 2019, 11:33 p.m. OK GNU C++11 TESTS 44 30 0 1000
60836132 XiaoTaoTao A Sept. 19, 2019, 9:04 a.m. OK GNU C++11 TESTS 44 30 0 1000
61213908 vjudge2 A Sept. 24, 2019, 12:14 p.m. OK GNU C++11 TESTS 44 30 0 1000
61452156 legend_life A Sept. 29, 2019, 3:54 a.m. OK GNU C++11 TESTS 44 30 0 1000
61898283 xingxi A Oct. 5, 2019, 7:53 a.m. OK GNU C++11 TESTS 44 30 0 1000
69009321 sunchuangyu A Jan. 18, 2020, 2:32 a.m. OK GNU C++11 TESTS 44 30 0 1000
62080242 PromoTar A Oct. 7, 2019, 8:19 p.m. OK GNU C++14 TESTS 44 15 0 1000
67423870 Spanta A Dec. 22, 2019, 12:43 p.m. OK GNU C++14 TESTS 44 15 0 1000
66500747 ysav A Dec. 8, 2019, 12:26 p.m. OK GNU C++14 TESTS 44 15 0 1000
66393985 time_14_07 A Dec. 6, 2019, 10:06 a.m. OK GNU C++14 TESTS 44 15 0 1000
63964506 mohneesh A Nov. 1, 2019, 6:39 a.m. OK GNU C++14 TESTS 44 15 0 1000
63428543 Saruar_Chy A Oct. 26, 2019, 8:30 a.m. OK GNU C++14 TESTS 44 15 0 1000
63283942 tichnas A Oct. 24, 2019, 9:39 a.m. OK GNU C++14 TESTS 44 15 0 1000
62658749 d_dark_horse A Oct. 16, 2019, 4:06 a.m. OK GNU C++14 TESTS 44 15 0 1000
62393177 Kallaf A Oct. 12, 2019, 3:51 a.m. OK GNU C++14 TESTS 44 15 0 1000
62030485 Lilies-Lit A Oct. 7, 2019, 12:01 a.m. OK GNU C++14 TESTS 44 15 0 1000
61394637 SkyWT A Sept. 28, 2019, 1:08 a.m. OK GNU C++17 TESTS 44 15 0 1000
62662801 spiyush118 A Oct. 16, 2019, 6:28 a.m. OK GNU C++17 TESTS 44 15 0 1000
62751845 fuzem A Oct. 17, 2019, 1:55 a.m. OK GNU C++17 TESTS 44 15 0 1000
64483449 Rafid_Shad A Nov. 7, 2019, 4:47 p.m. OK GNU C++17 TESTS 44 15 0 1000
65264905 not_sman A Nov. 17, 2019, 4:33 p.m. OK GNU C++17 TESTS 44 15 0 1000
66366069 taki_3 A Dec. 5, 2019, 7:28 p.m. OK GNU C++17 TESTS 44 15 0 1000
66649345 sonij1807 A Dec. 11, 2019, 6:16 p.m. OK GNU C++17 TESTS 44 15 0 1000
66979235 vjudge4 A Dec. 15, 2019, 3:46 p.m. OK GNU C++17 TESTS 44 15 0 1000
67700087 DinnerHunt A Dec. 27, 2019, 2:15 p.m. OK GNU C++17 TESTS 44 15 0 1000
68402153 happy_ A Jan. 8, 2020, 1:33 p.m. OK GNU C++17 TESTS 44 15 0 1000
61870129 DMOVE A Oct. 4, 2019, 5:52 p.m. OK Go TESTS 44 31 0 1000
60620095 naito A Sept. 15, 2019, 11:19 a.m. OK Go TESTS 44 46 0 1000
60618758 maxim.goltcov.97 A Sept. 15, 2019, 11:13 a.m. OK Go TESTS 44 46 0 1000
60616004 suryanshv23 A Sept. 15, 2019, 11:01 a.m. OK Go TESTS 44 46 0 1000
60613848 serhiimazurok A Sept. 15, 2019, 10:54 a.m. OK Go TESTS 44 46 0 1000
60698580 IslamOmar A Sept. 16, 2019, 9:23 p.m. OK Haskell TESTS 44 46 102400 1000
65707713 machhra A Nov. 25, 2019, 1:10 p.m. OK Java 11 TESTS 44 187 0 1000
64888258 potatmen A Nov. 14, 2019, 1:49 p.m. OK Java 11 TESTS 44 187 0 1000
68323971 warrioramrit A Jan. 6, 2020, 4:05 p.m. OK Java 11 TESTS 44 202 0 1000
61371937 IslamTalipovTop A Sept. 27, 2019, 3:18 p.m. OK Java 8 TESTS 44 108 0 1000
66529975 adzi A Dec. 9, 2019, 7:17 a.m. OK Java 8 TESTS 44 109 0 1000
64620864 optimaniax A Nov. 10, 2019, 6:49 a.m. OK Java 8 TESTS 44 109 0 1000
63951621 mbfeci A Oct. 31, 2019, 9:44 p.m. OK Java 8 TESTS 44 109 0 1000
62968175 Nirav412000 A Oct. 20, 2019, 5:47 a.m. OK Java 8 TESTS 44 109 0 1000
62968111 Rushi5032 A Oct. 20, 2019, 5:45 a.m. OK Java 8 TESTS 44 109 0 1000
62844900 wretar A Oct. 18, 2019, 5:06 a.m. OK Java 8 TESTS 44 109 0 1000
62682158 adhaulya A Oct. 16, 2019, 1:09 p.m. OK Java 8 TESTS 44 109 0 1000
62027369 icpc_loser A Oct. 6, 2019, 8:59 p.m. OK Java 8 TESTS 44 109 0 1000
61292840 meracle2309 A Sept. 25, 2019, 10:01 p.m. OK Java 8 TESTS 44 109 0 1000
60662461 sjx233 A Sept. 16, 2019, 5:54 a.m. OK JavaScript TESTS 44 31 0 1000
60612928 sjx233 A Sept. 15, 2019, 10:51 a.m. OK JavaScript TESTS 44 31 0 1000
60624230 mongolrgata A Sept. 15, 2019, 11:40 a.m. OK JavaScript TESTS 44 31 204800 1000
60935791 IspanetsFS A Sept. 20, 2019, 3:16 p.m. OK Kotlin TESTS 44 109 0 1000
60686855 Alexander_Karpovich A Sept. 16, 2019, 3:46 p.m. OK Kotlin TESTS 44 124 0 1000
60663789 Spheniscine A Sept. 16, 2019, 6:44 a.m. OK Kotlin TESTS 44 124 0 1000
60654398 Black_Fregat A Sept. 15, 2019, 9:38 p.m. OK Kotlin TESTS 44 139 0 1000
60614515 enslinmike A Sept. 15, 2019, 10:56 a.m. OK Kotlin TESTS 44 140 0 1000
60642034 Vesbat A Sept. 15, 2019, 3:45 p.m. OK Kotlin TESTS 44 140 0 1000
60632318 javsjj A Sept. 15, 2019, 12:26 p.m. OK Kotlin TESTS 44 140 0 1000
60614391 Ahmadjon A Sept. 15, 2019, 10:55 a.m. OK Kotlin TESTS 44 140 0 1000
60613734 Bobko A Sept. 15, 2019, 10:53 a.m. OK Kotlin TESTS 44 140 0 1000
60611100 Denzed A Sept. 15, 2019, 10:45 a.m. OK Kotlin TESTS 44 155 0 1000
60699234 Sakhi_Java A Sept. 16, 2019, 10:02 p.m. OK Mono C# TESTS 44 46 0 1000
60671987 nadilk A Sept. 16, 2019, 11:05 a.m. OK Mono C# TESTS 44 46 0 1000
60654720 hloya A Sept. 15, 2019, 9:57 p.m. OK Mono C# TESTS 44 46 0 1000
60654167 EL_HACKER_32 A Sept. 15, 2019, 9:23 p.m. OK Mono C# TESTS 44 46 0 1000
60732615 Ruban_Denic A Sept. 17, 2019, 4:15 p.m. OK Mono C# TESTS 44 46 0 1000
62526370 nastya1199 A Oct. 13, 2019, 5:31 p.m. OK Mono C# TESTS 44 46 0 1000
60632114 znznznzmzn A Sept. 15, 2019, 12:25 p.m. OK Mono C# TESTS 44 61 0 1000
60627327 ansergeyg A Sept. 15, 2019, 11:57 a.m. OK Mono C# TESTS 44 61 0 1000
63387893 Tan42 A Oct. 25, 2019, 2:18 p.m. OK Mono C# TESTS 44 61 0 1000
61119017 Salatik231166 A Sept. 23, 2019, 1:49 p.m. OK Mono C# TESTS 44 61 0 1000
64496930 vjudge3 A Nov. 8, 2019, 12:46 a.m. OK MS C++ TESTS 44 30 0 1000
67134758 vjudge2 A Dec. 18, 2019, 3:21 a.m. OK MS C++ TESTS 44 31 0 1000
69093355 DM1 A Jan. 19, 2020, 11:03 a.m. OK MS C++ TESTS 44 31 0 1000
68711840 vjudge3 A Jan. 13, 2020, 1:13 p.m. OK MS C++ TESTS 44 31 0 1000
67950062 vjudge1 A Dec. 30, 2019, 7:15 a.m. OK MS C++ TESTS 44 31 0 1000
67313835 vjudge2 A Dec. 21, 2019, 4:52 a.m. OK MS C++ TESTS 44 31 0 1000
67277937 vjudge1 A Dec. 20, 2019, 10:56 a.m. OK MS C++ TESTS 44 31 0 1000
67186045 vjudge5 A Dec. 19, 2019, 4:43 a.m. OK MS C++ TESTS 44 31 0 1000
66728822 vjudge1 A Dec. 12, 2019, 4:50 p.m. OK MS C++ TESTS 44 31 0 1000
66502768 vjudge1 A Dec. 8, 2019, 1:11 p.m. OK MS C++ TESTS 44 31 0 1000
60729523 Kustov_Ya_S A Sept. 17, 2019, 3:09 p.m. OK MS C++ 2017 TESTS 44 30 0 1000
63089197 kurs A Oct. 21, 2019, 5:43 p.m. OK MS C++ 2017 TESTS 44 31 0 1000
65590156 vjudge5 A Nov. 23, 2019, 1:50 p.m. OK MS C++ 2017 TESTS 44 31 0 1000
65550790 moyakkauntda A Nov. 22, 2019, 6:51 p.m. OK MS C++ 2017 TESTS 44 31 0 1000
65471257 MRamanauskas A Nov. 21, 2019, 8:28 a.m. OK MS C++ 2017 TESTS 44 31 0 1000
65034510 vjudge2 A Nov. 15, 2019, 11:09 a.m. OK MS C++ 2017 TESTS 44 31 0 1000
64859137 egrtz A Nov. 14, 2019, 1:52 a.m. OK MS C++ 2017 TESTS 44 31 0 1000
63303797 vjudge2 A Oct. 24, 2019, 3:01 p.m. OK MS C++ 2017 TESTS 44 31 0 1000
63020762 vjudge4 A Oct. 20, 2019, 2:28 p.m. OK MS C++ 2017 TESTS 44 31 0 1000
62940816 pmitkov A Oct. 19, 2019, 3:32 p.m. OK MS C++ 2017 TESTS 44 31 0 1000
60631417 Artem11111 A Sept. 15, 2019, 12:21 p.m. OK PascalABC.NET TESTS 44 217 0 1000
61182484 mayakin A Sept. 23, 2019, 8:25 p.m. OK PHP TESTS 44 46 409600 1000
60735628 aleksandr.vysotckii A Sept. 17, 2019, 5:22 p.m. OK PHP TESTS 44 46 409600 1000
60620606 hritik3878 A Sept. 15, 2019, 11:22 a.m. OK PyPy 2 TESTS 44 124 0 1000
60616992 anshuman16423 A Sept. 15, 2019, 11:05 a.m. OK PyPy 2 TESTS 44 124 0 1000
60612462 sakito A Sept. 15, 2019, 10:49 a.m. OK PyPy 2 TESTS 44 124 0 1000
60611438 akifpatel A Sept. 15, 2019, 10:46 a.m. OK PyPy 2 TESTS 44 139 0 1000
66637393 yumtam A Dec. 11, 2019, 1:27 p.m. OK PyPy 2 TESTS 44 139 0 1000
60611915 zdbtxdy A Sept. 15, 2019, 10:48 a.m. OK PyPy 2 TESTS 44 140 0 1000
60610904 Mukundan314 A Sept. 15, 2019, 10:45 a.m. OK PyPy 2 TESTS 44 140 0 1000
60610113 wanderer163 A Sept. 15, 2019, 10:42 a.m. OK PyPy 2 TESTS 44 140 102400 1000
60617031 Yocho A Sept. 15, 2019, 11:05 a.m. OK PyPy 2 TESTS 44 155 0 1000
60746520 RobotD A Sept. 18, 2019, 2:10 a.m. OK PyPy 2 TESTS 44 170 0 1000
60652655 Rulikkk A Sept. 15, 2019, 8:17 p.m. OK PyPy 3 TESTS 44 124 0 1000
60766859 zahra.kh A Sept. 18, 2019, 11:17 a.m. OK PyPy 3 TESTS 44 139 0 1000
60646240 vyom_goel A Sept. 15, 2019, 5:15 p.m. OK PyPy 3 TESTS 44 139 0 1000
60641750 Yordan_Iliev A Sept. 15, 2019, 3:39 p.m. OK PyPy 3 TESTS 44 139 0 1000
60621311 alphatron99 A Sept. 15, 2019, 11:25 a.m. OK PyPy 3 TESTS 44 139 0 1000
68770925 phlk A Jan. 14, 2020, 11:50 a.m. OK PyPy 3 TESTS 44 140 0 1000
68375412 WA-----Me-----AC A Jan. 7, 2020, 7:35 p.m. OK PyPy 3 TESTS 44 140 0 1000
65209764 vjudge5 A Nov. 16, 2019, 5:43 p.m. OK PyPy 3 TESTS 44 140 0 1000
62927634 Kamsamewar A Oct. 19, 2019, 11:47 a.m. OK PyPy 3 TESTS 44 140 0 1000
62767063 sandro1999 A Oct. 17, 2019, 9 a.m. OK PyPy 3 TESTS 44 140 0 1000
60665971 groupbuilder A Sept. 16, 2019, 8:04 a.m. OK Python 2 TESTS 44 171 0 1000
60680399 ritece A Sept. 16, 2019, 1:45 p.m. OK Python 2 TESTS 44 187 0 1000
60617497 elistark A Sept. 15, 2019, 11:07 a.m. OK Python 2 TESTS 44 202 0 1000
60609813 psaini A Sept. 15, 2019, 10:41 a.m. OK Python 2 TESTS 44 202 0 1000
60609611 nwi A Sept. 15, 2019, 10:40 a.m. OK Python 2 TESTS 44 202 0 1000
60617762 pein_7 A Sept. 15, 2019, 11:09 a.m. OK Python 2 TESTS 44 202 102400 1000
60709635 19n1900011773 A Sept. 17, 2019, 7:30 a.m. OK Python 3 TESTS 44 108 0 1000
69158141 navidnouri1992 A Jan. 19, 2020, 8:44 p.m. OK Python 3 TESTS 44 108 512000 1000
68062154 nealzane A Jan. 2, 2020, 5:08 a.m. OK Python 3 TESTS 44 109 0 1000
62940540 yogesh.yogendra A Oct. 19, 2019, 3:26 p.m. OK Python 3 TESTS 44 109 0 1000
62463210 kit84 A Oct. 13, 2019, 8:59 a.m. OK Python 3 TESTS 44 109 0 1000
62260703 mohi07 A Oct. 10, 2019, 12:08 p.m. OK Python 3 TESTS 44 109 0 1000
61769480 rached13 A Oct. 3, 2019, 9:41 a.m. OK Python 3 TESTS 44 109 0 1000
61315393 pranjal290 A Sept. 26, 2019, 10:53 a.m. OK Python 3 TESTS 44 109 0 1000
61289234 FomaMD A Sept. 25, 2019, 7:47 p.m. OK Python 3 TESTS 44 109 0 1000
61072668 Arhimason A Sept. 22, 2019, 1:15 p.m. OK Python 3 TESTS 44 109 0 1000
60610801 super_hook_girl_lover A Sept. 15, 2019, 10:44 a.m. OK Ruby TESTS 44 62 102400 1000
60610333 koikotya A Sept. 15, 2019, 10:43 a.m. OK Ruby TESTS 44 77 102400 1000
60617281 REVU A Sept. 15, 2019, 11:07 a.m. OK Ruby TESTS 44 78 102400 1000
60625475 aravk33 A Sept. 15, 2019, 11:47 a.m. OK Rust TESTS 44 31 0 1000
60613805 manta1130 A Sept. 15, 2019, 10:54 a.m. OK Rust TESTS 44 31 0 1000
60610580 sansen A Sept. 15, 2019, 10:44 a.m. OK Rust TESTS 44 46 0 1000
60610338 yudedako A Sept. 15, 2019, 10:43 a.m. OK Scala TESTS 44 514 0 1000

remove filters

Back to search problems