Codeforces Round 476 (Div. 2) [Thanks, Telegram!]

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
965 Codeforces Round 476 (Div. 2) [Thanks, Telegram!] FINISHED False 7200 212847924 April 25, 2018, 5:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2125 ) C Greedy Arkady PROGRAMMING math 1900

B" k people want to split n candies between them. Each candy should be given to exactly one of them or be thrown away. The people are numbered from 1 to k , and Arkady is the first of them. To split the candies, Arkady will choose an integer x and then give the first x candies to himself, the next x candies to the second person, the next x candies to the third person and so on in a cycle. The leftover (the remainder that is not divisible by x ) will be thrown away. Arkady can't choose x greater than M as it is considered greedy. Also, he can't choose such a small x that some person will receive candies more than D times, as it is considered a slow splitting. Please find what is the maximum number of candies Arkady can receive by choosing some valid x . The only line contains four integers n , k , M and D ( 2 <= n <= 10^{18} , 2 <= k <= n , 1 <= M <= n , 1 <= D <= min{(n, 1000)} , M cdot D cdot k ge n ) -- the number of candies, the number of people, the maximum number of candies given to a person at once, the maximum number of times a person can receive candies. Print a single integer -- the maximum possible number of candies Arkady can give to himself. Note that it is always possible to choose some valid x . In the first example Arkady should choose x = 4 . He will give 4 candies to himself, 4 candies to the second person, 4 candies to the third person, then 4 candies to the fourth person and then again 4 candies to himself. No person is given candies more than 2 times, and Arkady receives 8 candies in total. Note that if Arkady chooses x = 5 , he will receive only 5 candies, and if he chooses x = 3 , he will receive only 3 + 3 = 6 candies as well as the second person, the third and the fourth persons will receive 3 candies, and 2 ca"...

Tutorials

Analysis of Codeforces Round #476 (Div. 2) [Thanks, Telegram!]

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
38310212 admire.japan C May 16, 2018, 6 a.m. OK D TESTS 25 30 4403200 1900
41565816 TShT C Aug. 13, 2018, 5:22 p.m. OK FPC TESTS 25 31 0 1900
37619135 _pepperoni C April 25, 2018, 8:47 p.m. OK GNU C TESTS 25 31 3379200 1900
39069563 vjudge3 C June 9, 2018, 12:43 p.m. OK GNU C++ TESTS 25 15 0 1900
39025457 vjudge1 C June 7, 2018, 3:17 p.m. OK GNU C++ TESTS 25 15 0 1900
39019377 vjudge2 C June 7, 2018, 12:03 p.m. OK GNU C++ TESTS 25 15 0 1900
39017690 vjudge4 C June 7, 2018, 11:29 a.m. OK GNU C++ TESTS 25 15 0 1900
38453325 fxt C May 20, 2018, 8:57 a.m. OK GNU C++ TESTS 25 15 0 1900
39213516 vjudge5 C June 13, 2018, 10:47 a.m. OK GNU C++ TESTS 25 15 0 1900
38347536 ILLENIUM C May 17, 2018, 11:56 a.m. OK GNU C++ TESTS 25 15 0 1900
39872809 Scut82 C July 2, 2018, 3:40 p.m. OK GNU C++ TESTS 25 15 0 1900
39035450 vjudge4 C June 8, 2018, 3:52 a.m. OK GNU C++ TESTS 25 15 102400 1900
40571009 vjudge4 C July 20, 2018, 8:08 a.m. OK GNU C++ TESTS 25 15 102400 1900
48093048 aneesh2312 C Jan. 8, 2019, 2:58 p.m. OK GNU C11 TESTS 25 31 0 1900
39495514 ol1v3r C June 21, 2018, 5:15 p.m. OK GNU C++11 TESTS 25 15 0 1900
39033607 winter2121 C June 8, 2018, 12:54 a.m. OK GNU C++11 TESTS 25 15 0 1900
38609663 SheepRanger C May 25, 2018, 1 p.m. OK GNU C++11 TESTS 25 15 0 1900
38472954 jakestrj C May 21, 2018, 2:44 a.m. OK GNU C++11 TESTS 25 15 0 1900
38624582 ChandlerH C May 26, 2018, 6:04 a.m. OK GNU C++11 TESTS 25 15 0 1900
40849628 Miladus C July 27, 2018, 1:54 p.m. OK GNU C++11 TESTS 25 15 0 1900
39542412 EndRay C June 23, 2018, 1:18 p.m. OK GNU C++11 TESTS 25 15 0 1900
37736579 GUANZEYING C April 30, 2018, 1:46 a.m. OK GNU C++11 TESTS 25 15 3379200 1900
37824941 yao11617 C May 1, 2018, 8:03 p.m. OK GNU C++11 TESTS 25 15 3379200 1900
37632155 chenyeyuan C April 26, 2018, 10:42 a.m. OK GNU C++11 TESTS 25 15 3379200 1900
43627641 iloveUtaha C Oct. 1, 2018, 1:29 a.m. OK GNU C++14 TESTS 25 15 0 1900
67414847 codingkshatriya C Dec. 22, 2019, 9:32 a.m. OK GNU C++14 TESTS 25 15 0 1900
53003578 3015218054 C April 19, 2019, 8:26 a.m. OK GNU C++14 TESTS 25 15 0 1900
52954277 hank55663 C April 18, 2019, 1:09 p.m. OK GNU C++14 TESTS 25 15 0 1900
50700703 Ekaterina_Saenko C March 2, 2019, 9:10 p.m. OK GNU C++14 TESTS 25 15 0 1900
49619234 sfialok98 C Feb. 8, 2019, 8:19 a.m. OK GNU C++14 TESTS 25 15 0 1900
48589777 CodigoL C Jan. 20, 2019, 12:25 a.m. OK GNU C++14 TESTS 25 15 0 1900
45695000 ShadowGhostH C Nov. 14, 2018, 2 a.m. OK GNU C++14 TESTS 25 15 0 1900
44983760 asr23106 C Oct. 28, 2018, 9:47 a.m. OK GNU C++14 TESTS 25 15 0 1900
43904276 Ahmed__mohamed C Oct. 6, 2018, 1:31 p.m. OK GNU C++14 TESTS 25 15 0 1900
57320944 Mcccree C July 19, 2019, 9:58 a.m. OK GNU C++17 TESTS 25 15 0 1900
56595459 pranavn10 C July 5, 2019, 7:11 p.m. OK GNU C++17 TESTS 25 15 0 1900
56486449 Vergara C July 3, 2019, 6:36 p.m. OK GNU C++17 TESTS 25 15 0 1900
56183121 hardikdua C June 28, 2019, 2:09 a.m. OK GNU C++17 TESTS 25 15 0 1900
54220933 quake0 C May 16, 2019, 3:17 a.m. OK GNU C++17 TESTS 25 15 0 1900
51933124 ZeroAmbition C March 28, 2019, 11:22 a.m. OK GNU C++17 TESTS 25 15 0 1900
51436030 dr22 C March 18, 2019, 6:27 a.m. OK GNU C++17 TESTS 25 15 0 1900
40112771 HuiBing C July 9, 2018, 12:45 p.m. OK GNU C++17 TESTS 25 15 0 1900
39353635 vlad107 C June 18, 2018, 10:41 a.m. OK GNU C++17 TESTS 25 15 0 1900
60289289 UWPLP C Sept. 9, 2019, 5:56 a.m. OK GNU C++17 TESTS 25 15 0 1900
40099711 bhamrick C July 9, 2018, 3:43 a.m. OK Haskell TESTS 25 15 0 1900
44281832 apurvaj C Oct. 14, 2018, 5:18 a.m. OK Java 8 TESTS 25 109 0 1900
51966442 mikkk C March 29, 2019, 10:13 a.m. OK Java 8 TESTS 25 124 0 1900
42549107 PolaMawaad C Sept. 6, 2018, 10:59 a.m. OK Java 8 TESTS 25 124 0 1900
39438554 Eku187 C June 20, 2018, 2:28 p.m. OK Java 8 TESTS 25 124 0 1900
39291524 sooraj10 C June 16, 2018, 4:01 p.m. OK Java 8 TESTS 25 124 0 1900
39006664 MizuhashiParsee C June 7, 2018, 1:30 a.m. OK Java 8 TESTS 25 124 0 1900
38441906 frenzykryger C May 19, 2018, 8:10 p.m. OK Java 8 TESTS 25 124 0 1900
37683115 mDziewanowski C April 28, 2018, 11 a.m. OK Java 8 TESTS 25 124 20684800 1900
38076797 unicorn20141 C May 9, 2018, 4:14 p.m. OK Java 8 TESTS 25 124 20684800 1900
37849438 xoszm C May 2, 2018, 9:01 p.m. OK Java 8 TESTS 25 124 20684800 1900
37629327 ucrop C April 26, 2018, 8:58 a.m. OK Mono C# TESTS 25 31 8089600 1900
37611500 lionvs13 C April 25, 2018, 6:35 p.m. OK Mono C# TESTS 25 62 11776000 1900
37633341 camypaper C April 26, 2018, 11:20 a.m. OK Mono C# TESTS 25 155 11161600 1900
39043435 vjudge1 C June 8, 2018, 10:55 a.m. OK MS C++ TESTS 25 15 0 1900
42546919 vjudge1 C Sept. 6, 2018, 9:36 a.m. OK MS C++ TESTS 25 15 0 1900
39023245 vjudge2 C June 7, 2018, 1:45 p.m. OK MS C++ TESTS 25 15 0 1900
37864149 NotNow C May 3, 2018, 1:43 p.m. OK MS C++ TESTS 25 15 3481600 1900
37643261 nadeemoy C April 26, 2018, 4:49 p.m. OK MS C++ TESTS 25 15 3481600 1900
38853893 scorpiowf C June 1, 2018, 4:04 p.m. OK MS C++ TESTS 25 15 3481600 1900
37866299 MenOfPassion C May 3, 2018, 3:20 p.m. OK MS C++ TESTS 25 15 3481600 1900
45448461 vjudge4 C Nov. 8, 2018, 2:36 p.m. OK MS C++ TESTS 25 30 0 1900
37745241 lkitrossky C April 30, 2018, 9:52 a.m. OK MS C++ TESTS 25 30 3481600 1900
37650704 nomiku99 C April 27, 2018, 3:58 a.m. OK MS C++ TESTS 25 30 3686400 1900
61836603 vjudge4 C Oct. 4, 2019, 8:13 a.m. OK MS C++ 2017 TESTS 25 31 0 1900
37614621 swetank C April 25, 2018, 7:11 p.m. OK PyPy 2 TESTS 25 93 22835200 1900
37644425 Deemo C April 26, 2018, 5:55 p.m. OK PyPy 2 TESTS 25 93 22835200 1900
38929646 Onesh0t C June 3, 2018, 8:02 p.m. OK PyPy 2 TESTS 25 93 22937600 1900
37649499 paquechee C April 27, 2018, 2:01 a.m. OK PyPy 2 TESTS 25 156 22835200 1900
37639363 Einstrasse C April 26, 2018, 2:14 p.m. OK PyPy 2 TESTS 25 171 22835200 1900
37668392 devansh612 C April 27, 2018, 5:30 p.m. OK PyPy 2 TESTS 25 202 31539200 1900
37900110 neverwin C May 5, 2018, 8:23 a.m. OK PyPy 3 TESTS 25 93 21401600 1900
37656208 rareone0602 C April 27, 2018, 9:50 a.m. OK PyPy 3 TESTS 25 93 21401600 1900
37625435 YESMAths C April 26, 2018, 5:56 a.m. OK PyPy 3 TESTS 25 93 21401600 1900
37620012 kwangg C April 25, 2018, 9:29 p.m. OK PyPy 3 TESTS 25 93 21401600 1900
37618198 Fischer C April 25, 2018, 8:12 p.m. OK PyPy 3 TESTS 25 93 21401600 1900
37629379 Azurey C April 26, 2018, 9 a.m. OK PyPy 3 TESTS 25 108 21401600 1900
37649583 Systa C April 27, 2018, 2:11 a.m. OK PyPy 3 TESTS 25 108 21401600 1900
37661362 aayush9 C April 27, 2018, 12:54 p.m. OK PyPy 3 TESTS 25 109 21401600 1900
37618439 LordVoldebug C April 25, 2018, 8:19 p.m. OK PyPy 3 TESTS 25 109 21401600 1900
37618278 Naoki_M C April 25, 2018, 8:14 p.m. OK PyPy 3 TESTS 25 109 21401600 1900
37847553 Temirulan C May 2, 2018, 6:34 p.m. OK Python 2 TESTS 25 93 6041600 1900
37738605 251 C April 30, 2018, 3:47 a.m. OK Python 2 TESTS 25 93 6041600 1900
37618106 Froz C April 25, 2018, 8:09 p.m. OK Python 2 TESTS 25 93 6041600 1900
37653172 _shafiul C April 27, 2018, 7:09 a.m. OK Python 2 TESTS 25 93 6144000 1900
37646961 mrz C April 26, 2018, 8:54 p.m. OK Python 2 TESTS 25 93 6144000 1900
37725927 Wizmann C April 29, 2018, 3:26 p.m. OK Python 2 TESTS 25 108 6041600 1900
37677376 thisistheoriginaldevika C April 28, 2018, 6:16 a.m. OK Python 2 TESTS 25 108 6041600 1900
37642818 doctor_d C April 26, 2018, 4:26 p.m. OK Python 2 TESTS 25 108 6041600 1900
37640812 bilau_de_campina C April 26, 2018, 3:02 p.m. OK Python 2 TESTS 25 108 6041600 1900
37634244 yaoshimax C April 26, 2018, 11:52 a.m. OK Python 2 TESTS 25 108 6041600 1900
39053053 chinababka C June 8, 2018, 6:43 p.m. OK Python 3 TESTS 25 77 0 1900
38445990 licong0558 C May 20, 2018, 2:55 a.m. OK Python 3 TESTS 25 77 0 1900
37844064 dmkozyrev C May 2, 2018, 3:25 p.m. OK Python 3 TESTS 25 77 7065600 1900
37746501 Stand C April 30, 2018, 11:10 a.m. OK Python 3 TESTS 25 77 7065600 1900
37627189 shehebe C April 26, 2018, 7:31 a.m. OK Python 3 TESTS 25 77 7065600 1900
37626347 vertrue C April 26, 2018, 6:50 a.m. OK Python 3 TESTS 25 77 7065600 1900
37619768 englishkir C April 25, 2018, 9:15 p.m. OK Python 3 TESTS 25 77 7065600 1900
37617801 doddy_dodorio C April 25, 2018, 8:02 p.m. OK Python 3 TESTS 25 77 7065600 1900
39131291 vikrambishnoi C June 10, 2018, 8:20 p.m. OK Python 3 TESTS 25 78 0 1900
38071981 RgxWarer C May 9, 2018, 1:01 p.m. OK Python 3 TESTS 25 78 7065600 1900
54803681 betrue12 C May 29, 2019, 1:04 p.m. OK Ruby TESTS 25 61 0 1900
37633445 tubo28 C April 26, 2018, 11:23 a.m. OK Ruby TESTS 25 124 6451200 1900
37676789 ale C April 28, 2018, 5:35 a.m. OK Scala TESTS 25 467 30924800 1900

remove filters

Back to search problems