Codeforces Round 518 (Div. 2) [Thanks, Mail.Ru!]

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
1068 Codeforces Round 518 (Div. 2) [Thanks, Mail.Ru!] FINISHED False 7200 191424299 Oct. 24, 2018, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6851 ) A Birthday PROGRAMMING math 1300

B'Ivan is collecting coins. There are only N different collectible coins, Ivan has K of them. He will be celebrating his birthday soon, so all his M freinds decided to gift him coins. They all agreed to three terms: But his friends don 't know which coins have Ivan already got in his collection. They don 't want to spend money so they want to buy minimum quantity of coins, that satisfy all terms, irrespective of the Ivan 's collection. Help them to find this minimum number of coins or define it 's not possible to meet all the terms. The only line of input contains 4 integers N , M , K , L ( 1 <= K <= N <= 10^{18} ; 1 <= M, , , L <= 10^{18} ) -- quantity of different coins, number of Ivan 's friends, size of Ivan 's collection and quantity of coins, that must be new in Ivan 's collection. Print one number -- minimal number of coins one friend can gift to satisfy all the conditions. If it is impossible to satisfy all three conditions print "-1" (without quotes). In the first test, one coin from each friend is enough, as he will be presented with 15 different coins and 13 of them will definitely be new. In the second test, Ivan has 11 friends, but there are only 10 different coins. So all friends can 't present him different coins. '...

Tutorials

E

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
44835276 ZJNU_5taiwei A Oct. 25, 2018, 10:35 a.m. OK Clang++17 Diagnostics TESTS 91 46 0 1300
54734931 hasan18103137 A May 28, 2019, 4:12 a.m. OK Clang++17 Diagnostics TESTS 91 46 0 1300
44825500 ZJNU_5taiwei A Oct. 25, 2018, 5:42 a.m. OK Clang++17 Diagnostics TESTS 91 46 307200 1300
45537805 rakibul98 A Nov. 10, 2018, 5:07 p.m. OK Clang++17 Diagnostics TESTS 91 46 307200 1300
44834658 ZJNU_5taiwei A Oct. 25, 2018, 10:15 a.m. OK Clang++17 Diagnostics TESTS 91 46 307200 1300
44961907 AshutoshAnshul A Oct. 27, 2018, 4:56 p.m. OK Clang++17 Diagnostics TESTS 91 46 307200 1300
44855061 qianjhin A Oct. 25, 2018, 3 p.m. OK Clang++17 Diagnostics TESTS 91 62 0 1300
44816999 Denor A Oct. 24, 2018, 10:04 p.m. OK Delphi TESTS 91 46 204800 1300
44793208 TShT A Oct. 24, 2018, 5:12 p.m. OK FPC TESTS 91 31 0 1300
44841005 cbl_nhathuy A Oct. 25, 2018, 12:46 p.m. OK FPC TESTS 91 46 0 1300
54472507 joychanda A May 22, 2019, 6:24 a.m. OK GNU C11 TESTS 91 31 0 1300
54473445 smmurshed_manik A May 22, 2019, 6:59 a.m. OK GNU C11 TESTS 91 31 0 1300
60407786 smmurshedmanik A Sept. 11, 2019, 7:31 p.m. OK GNU C11 TESTS 91 31 0 1300
62904124 luogu_bot4 A Oct. 19, 2019, 5:17 a.m. OK GNU C11 TESTS 91 31 0 1300
63255767 vjudge3 A Oct. 23, 2019, 6:07 p.m. OK GNU C11 TESTS 91 31 0 1300
63256192 luogu_bot3 A Oct. 23, 2019, 6:16 p.m. OK GNU C11 TESTS 91 31 0 1300
65795195 Hiddenboy99 A Nov. 27, 2019, 3:53 a.m. OK GNU C11 TESTS 91 31 0 1300
65998388 Razvan2000f A Nov. 29, 2019, 6:16 p.m. OK GNU C11 TESTS 91 31 0 1300
54442033 Nirjharchowdhury A May 21, 2019, 9:11 a.m. OK GNU C11 TESTS 91 31 0 1300
54459646 Chayon27 A May 21, 2019, 5:53 p.m. OK GNU C11 TESTS 91 31 0 1300
44828932 NoUsed A Oct. 25, 2018, 7:37 a.m. OK GNU C++11 TESTS 91 30 0 1300
68104303 Oblack A Jan. 3, 2020, 6:04 a.m. OK GNU C++11 TESTS 91 31 0 1300
68104330 Oblack A Jan. 3, 2020, 6:05 a.m. OK GNU C++11 TESTS 91 31 0 1300
68104352 Oblack A Jan. 3, 2020, 6:06 a.m. OK GNU C++11 TESTS 91 31 0 1300
68109168 anik_1507103 A Jan. 3, 2020, 8:46 a.m. OK GNU C++11 TESTS 91 31 0 1300
68129888 Cris99 A Jan. 3, 2020, 4:36 p.m. OK GNU C++11 TESTS 91 31 0 1300
68705738 danielcm583 A Jan. 13, 2020, 11:13 a.m. OK GNU C++11 TESTS 91 31 0 1300
68765084 neerav1515 A Jan. 14, 2020, 9:36 a.m. OK GNU C++11 TESTS 91 31 0 1300
66784024 luogu_bot4 A Dec. 13, 2019, 1:01 p.m. OK GNU C++11 TESTS 91 31 0 1300
67148740 luogu_bot3 A Dec. 18, 2019, 9:54 a.m. OK GNU C++11 TESTS 91 31 0 1300
44957785 we_dont_talk_anymore A Oct. 27, 2018, 3:06 p.m. OK GNU C++14 TESTS 91 15 0 1300
44832504 nweeks A Oct. 25, 2018, 9:10 a.m. OK GNU C++14 TESTS 91 15 0 1300
49902540 rfpermen A Feb. 14, 2019, 10:09 a.m. OK GNU C++14 TESTS 91 30 0 1300
69943763 zytxdy A Feb. 1, 2020, 6:58 a.m. OK GNU C++14 TESTS 91 30 0 1300
68077401 Ankit003 A Jan. 2, 2020, 1:06 p.m. OK GNU C++14 TESTS 91 30 0 1300
57264010 jakedavis A July 18, 2019, 6:27 a.m. OK GNU C++14 TESTS 91 30 0 1300
53476089 vel_satis A April 28, 2019, 3:38 p.m. OK GNU C++14 TESTS 91 30 0 1300
50569185 nanobyte A Feb. 27, 2019, 2:32 p.m. OK GNU C++14 TESTS 91 30 0 1300
49920972 1998prajjwal A Feb. 14, 2019, 6:50 p.m. OK GNU C++14 TESTS 91 30 0 1300
48947083 dynamo123 A Jan. 25, 2019, 7:48 p.m. OK GNU C++14 TESTS 91 30 0 1300
44829017 whatever12 A Oct. 25, 2018, 7:40 a.m. OK GNU C++17 TESTS 91 15 307200 1300
45702853 vjudge3 A Nov. 14, 2018, 9:41 a.m. OK GNU C++17 TESTS 91 15 307200 1300
47338843 code_kika A Dec. 21, 2018, 4:22 p.m. OK GNU C++17 TESTS 91 30 0 1300
47501921 Galaxy_Nova A Dec. 25, 2018, 6:32 p.m. OK GNU C++17 TESTS 91 30 0 1300
46122142 1101_snaho A Nov. 23, 2018, 4:50 p.m. OK GNU C++17 TESTS 91 30 0 1300
47723886 im0qianqian A Dec. 30, 2018, 1:06 p.m. OK GNU C++17 TESTS 91 30 0 1300
51794126 shadowlj A March 24, 2019, 2:14 p.m. OK GNU C++17 TESTS 91 30 0 1300
54813110 thienlongtpct A May 29, 2019, 6:03 p.m. OK GNU C++17 TESTS 91 30 0 1300
46783207 Arnab1999 A Dec. 9, 2018, 4:27 a.m. OK GNU C++17 TESTS 91 30 0 1300
47323860 abdul135 A Dec. 21, 2018, 9:16 a.m. OK GNU C++17 TESTS 91 30 0 1300
44930342 davidguandev A Oct. 27, 2018, 12:37 a.m. OK Go TESTS 91 31 0 1300
44823754 naveen439 A Oct. 25, 2018, 4:30 a.m. OK Go TESTS 91 31 0 1300
68312770 Vatsal53 A Jan. 6, 2020, 11:59 a.m. OK Java 11 TESTS 91 187 0 1300
45964360 svilen A Nov. 19, 2018, 1:09 p.m. OK Java 8 TESTS 91 109 0 1300
55861834 tapopadma A June 21, 2019, 9:57 a.m. OK Java 8 TESTS 91 109 0 1300
46945868 I_love_Harpae A Dec. 12, 2018, 7:58 p.m. OK Java 8 TESTS 91 109 0 1300
46105785 MJA A Nov. 23, 2018, 9:05 a.m. OK Java 8 TESTS 91 109 0 1300
46040622 BiIIy A Nov. 21, 2018, 7:26 p.m. OK Java 8 TESTS 91 109 0 1300
45691699 Tardimgg A Nov. 13, 2018, 8:58 p.m. OK Java 8 TESTS 91 109 0 1300
45583586 apurvaj A Nov. 12, 2018, 6:39 a.m. OK Java 8 TESTS 91 109 0 1300
45392034 zabaldo A Nov. 6, 2018, 10:36 p.m. OK Java 8 TESTS 91 109 0 1300
45271272 MylnikovNikolay A Nov. 4, 2018, 8:38 a.m. OK Java 8 TESTS 91 109 0 1300
45037717 sooraj10 A Oct. 29, 2018, 8:39 a.m. OK Java 8 TESTS 91 109 0 1300
44793533 mihau A Oct. 24, 2018, 5:13 p.m. OK Kotlin TESTS 91 140 0 1300
54742734 Heltion A May 28, 2019, 8:52 a.m. OK Kotlin TESTS 91 140 102400 1300
45260269 at_cacao_jp A Nov. 4, 2018, 12:49 a.m. OK Kotlin TESTS 91 140 102400 1300
44835925 raynald A Oct. 25, 2018, 10:52 a.m. OK Kotlin TESTS 91 140 102400 1300
44938476 mayumi A Oct. 27, 2018, 6:41 a.m. OK Mono C# TESTS 91 46 0 1300
56062163 og.kostya A June 26, 2019, 6:06 a.m. OK Mono C# TESTS 91 46 0 1300
44787305 pwian A Oct. 24, 2018, 4:56 p.m. OK Mono C# TESTS 91 46 0 1300
44794179 danilprokat A Oct. 24, 2018, 5:16 p.m. OK Mono C# TESTS 91 61 0 1300
45088073 antony-10 A Oct. 30, 2018, 8:23 a.m. OK Mono C# TESTS 91 61 0 1300
51974844 nemars A March 29, 2019, 1:56 p.m. OK Mono C# TESTS 91 61 0 1300
44796682 ticker A Oct. 24, 2018, 5:24 p.m. OK Mono C# TESTS 91 62 0 1300
60397049 ansergeyg A Sept. 11, 2019, 3:19 p.m. OK Mono C# TESTS 91 62 0 1300
44901003 greenkirill A Oct. 26, 2018, 9:06 a.m. OK Mono C# TESTS 91 62 102400 1300
45245733 azukun A Nov. 3, 2018, 1:51 p.m. OK Mono C# TESTS 91 62 1638400 1300
62917041 vjudge1 A Oct. 19, 2019, 8:57 a.m. OK MS C++ TESTS 91 31 0 1300
62917815 vjudge5 A Oct. 19, 2019, 9:09 a.m. OK MS C++ TESTS 91 31 0 1300
62917937 vjudge2 A Oct. 19, 2019, 9:11 a.m. OK MS C++ TESTS 91 31 0 1300
62972073 vjudge3 A Oct. 20, 2019, 7:16 a.m. OK MS C++ TESTS 91 31 0 1300
62976704 vjudge1 A Oct. 20, 2019, 8:51 a.m. OK MS C++ TESTS 91 31 0 1300
62900002 vjudge3 A Oct. 19, 2019, 3:36 a.m. OK MS C++ TESTS 91 31 0 1300
62900106 vjudge4 A Oct. 19, 2019, 3:40 a.m. OK MS C++ TESTS 91 31 0 1300
62900245 vjudge1 A Oct. 19, 2019, 3:45 a.m. OK MS C++ TESTS 91 31 0 1300
62912856 vjudge3 A Oct. 19, 2019, 7:50 a.m. OK MS C++ TESTS 91 31 0 1300
62912772 lcjWA A Oct. 19, 2019, 7:49 a.m. OK MS C++ TESTS 91 31 0 1300
62920735 vjudge1 A Oct. 19, 2019, 9:55 a.m. OK MS C++ 2017 TESTS 91 31 0 1300
60021179 Mad112233 A Sept. 4, 2019, 1:08 p.m. OK MS C++ 2017 TESTS 91 31 0 1300
59823329 Spiritum A Aug. 31, 2019, 6:16 p.m. OK MS C++ 2017 TESTS 91 31 0 1300
59655723 vjudge2 A Aug. 29, 2019, 10:16 a.m. OK MS C++ 2017 TESTS 91 31 0 1300
56978314 beemax A July 13, 2019, 1 p.m. OK MS C++ 2017 TESTS 91 31 0 1300
50733690 petko_mitkov A March 3, 2019, 11:58 a.m. OK MS C++ 2017 TESTS 91 31 0 1300
62230514 alex_oprst A Oct. 9, 2019, 8:27 p.m. OK MS C++ 2017 TESTS 91 46 0 1300
44815696 sk0 A Oct. 24, 2018, 9:16 p.m. OK Ocaml TESTS 91 31 0 1300
45914408 rinatisk A Nov. 18, 2018, 1:18 p.m. OK PascalABC.NET TESTS 91 46 0 1300
44981774 silvestrov2002 A Oct. 28, 2018, 9:01 a.m. OK PascalABC.NET TESTS 91 46 0 1300
44938709 LL2018 A Oct. 27, 2018, 6:46 a.m. OK PascalABC.NET TESTS 91 46 0 1300
44845574 cube-R A Oct. 25, 2018, 2:21 p.m. OK PascalABC.NET TESTS 91 46 0 1300
44830807 stalst A Oct. 25, 2018, 8:23 a.m. OK PascalABC.NET TESTS 91 62 0 1300
44809018 Pa_Darochek A Oct. 24, 2018, 6:23 p.m. OK PascalABC.NET TESTS 91 62 102400 1300
44798059 gmusya A Oct. 24, 2018, 5:30 p.m. OK PascalABC.NET TESTS 91 62 102400 1300
45651304 vjudge4 A Nov. 13, 2018, 1:42 a.m. OK PyPy 2 TESTS 91 124 0 1300
45119166 wangkan2001 A Oct. 31, 2018, 2:04 a.m. OK PyPy 2 TESTS 91 124 0 1300
44825880 noob77777 A Oct. 25, 2018, 5:57 a.m. OK PyPy 2 TESTS 91 124 0 1300
44823104 anshuman16423 A Oct. 25, 2018, 4:03 a.m. OK PyPy 2 TESTS 91 124 0 1300
44803013 PBatch A Oct. 24, 2018, 5:52 p.m. OK PyPy 2 TESTS 91 124 0 1300
44789792 YESMAths A Oct. 24, 2018, 5:02 p.m. OK PyPy 2 TESTS 91 124 0 1300
44788877 frederika A Oct. 24, 2018, 5 p.m. OK PyPy 2 TESTS 91 124 0 1300
44827208 a11b11c11 A Oct. 25, 2018, 6:45 a.m. OK PyPy 2 TESTS 91 140 0 1300
44942641 c1729 A Oct. 27, 2018, 8:36 a.m. OK PyPy 2 TESTS 91 202 8806400 1300
44882557 elzaralian A Oct. 25, 2018, 7:51 p.m. OK PyPy 3 TESTS 91 124 0 1300
44953987 cgfs10000 A Oct. 27, 2018, 1:23 p.m. OK PyPy 3 TESTS 91 124 0 1300
44821071 ZzaZi A Oct. 25, 2018, 2:24 a.m. OK PyPy 3 TESTS 91 124 0 1300
53016098 syzymon A April 19, 2019, 2:14 p.m. OK PyPy 3 TESTS 91 139 0 1300
44831033 yanpekkinen A Oct. 25, 2018, 8:28 a.m. OK PyPy 3 TESTS 91 139 0 1300
44820964 hillhost A Oct. 25, 2018, 2:19 a.m. OK PyPy 3 TESTS 91 139 0 1300
44802820 SarveshDubey A Oct. 24, 2018, 5:51 p.m. OK PyPy 3 TESTS 91 139 0 1300
69552970 Munchy_1 dazlersan1 A Jan. 26, 2020, 7:22 a.m. OK PyPy 3 TESTS 91 140 0 1300
65217517 k0ndr A Nov. 16, 2019, 7:11 p.m. OK PyPy 3 TESTS 91 140 0 1300
54585136 Aidos A May 25, 2019, 6:34 a.m. OK PyPy 3 TESTS 91 140 0 1300
45651505 vjudge2 A Nov. 13, 2018, 1:54 a.m. OK Python 2 TESTS 91 171 0 1300
45307610 nealzane A Nov. 4, 2018, 11:17 p.m. OK Python 2 TESTS 91 171 0 1300
45305149 claramm A Nov. 4, 2018, 8:46 p.m. OK Python 2 TESTS 91 171 0 1300
45282993 abhishekm71 A Nov. 4, 2018, 2:50 p.m. OK Python 2 TESTS 91 171 0 1300
44966839 SoSooding A Oct. 27, 2018, 7:48 p.m. OK Python 2 TESTS 91 171 0 1300
44843423 angoncal A Oct. 25, 2018, 1:36 p.m. OK Python 2 TESTS 91 171 0 1300
44837157 viserys A Oct. 25, 2018, 11:23 a.m. OK Python 2 TESTS 91 171 0 1300
44823135 headshooter A Oct. 25, 2018, 4:04 a.m. OK Python 2 TESTS 91 171 0 1300
44819374 samchen123 A Oct. 25, 2018, 12:33 a.m. OK Python 2 TESTS 91 171 0 1300
44805283 Trunks A Oct. 24, 2018, 6:03 p.m. OK Python 2 TESTS 91 171 0 1300
59334748 SamuelLH A Aug. 23, 2019, 3:52 a.m. OK Python 3 TESTS 91 109 0 1300
55599889 lIn_nIl A June 15, 2019, 5:32 p.m. OK Python 3 TESTS 91 109 0 1300
52039063 ravi_joe A March 30, 2019, 5:42 p.m. OK Python 3 TESTS 91 109 0 1300
50933052 toysheeyeyraku A March 7, 2019, 2:49 p.m. OK Python 3 TESTS 91 109 0 1300
49872324 s19b2_subbotin A Feb. 13, 2019, 2:21 p.m. OK Python 3 TESTS 91 109 0 1300
49402517 insane_n00b A Feb. 3, 2019, 3:28 p.m. OK Python 3 TESTS 91 109 0 1300
48528956 navneet.h A Jan. 18, 2019, 10:37 a.m. OK Python 3 TESTS 91 109 0 1300
48277637 nosok_dikobraza A Jan. 12, 2019, 6:33 a.m. OK Python 3 TESTS 91 109 0 1300
45878019 Wojakors A Nov. 17, 2018, 12:47 p.m. OK Python 3 TESTS 91 109 0 1300
45667818 wangzpeng A Nov. 13, 2018, 8:43 a.m. OK Python 3 TESTS 91 109 0 1300
45277288 cielavenir A Nov. 4, 2018, 11:48 a.m. OK Ruby TESTS 91 62 0 1300
44796818 Kmar A Oct. 24, 2018, 5:25 p.m. OK Ruby TESTS 91 77 0 1300
44815924 hogeover30 A Oct. 24, 2018, 9:23 p.m. OK Ruby TESTS 91 77 204800 1300
64653894 ten- A Nov. 10, 2019, 6:29 p.m. OK Rust TESTS 91 31 204800 1300
64610734 ten- A Nov. 10, 2019, 1:17 a.m. OK Rust TESTS 91 31 204800 1300
64497633 ten- A Nov. 8, 2019, 1:29 a.m. OK Rust TESTS 91 46 102400 1300
46426790 hot_yoghurt A Dec. 1, 2018, 1:23 a.m. OK Scala TESTS 91 405 0 1300

remove filters

Back to search problems