Codeforces Round 621 (Div. 1 + 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
1307 Codeforces Round 621 (Div. 1 + Div. 2) FINISHED False 8100 155399111 Feb. 17, 2020, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 15035 ) A Cow and Haybales PROGRAMMING greedy implementation 800

B'The USA Construction Operation (USACO) recently ordered Farmer John to arrange a row of n haybale piles on the farm. The i -th pile contains a_i haybales. However, Farmer John has just left for vacation, leaving Bessie all on her own. Every day, Bessie the naughty cow can choose to move one haybale in any pile to an adjacent pile. Formally, in one day she can choose any two indices i and j ( 1 <= i, j <= n ) such that |i-j|=1 and a_i>0 and apply a_i = a_i - 1 , a_j = a_j + 1 . She may also decide to not do anything on some days because she is lazy. Bessie wants to maximize the number of haybales in pile 1 (i.e. to maximize a_1 ), and she only has d days to do so before Farmer John returns. Help her find the maximum number of haybales that may be in pile 1 if she acts optimally! The input consists of multiple test cases. The first line contains an integer t ( 1 <= t <= 100 ) -- the number of test cases. Next 2t lines contain a description of test cases -- two lines per test case. The first line of each test case contains integers n and d ( 1 <= n,d <= 100 ) -- the number of haybale piles and the number of days, respectively. The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 0 <= a_i <= 100 ) -- the number of haybales in each pile. For each test case, output one integer: the maximum number of haybales that may be in pile 1 after d days if Bessie acts optimally. In the first test case of the sample, this is one possible way Bessie can end up with 3 haybales in pile 1 : In the second test case of the sample, Bessie can do nothing on the first day and move a haybale from pile 2 to pile 1 on the second day. '...

Tutorials

Codeforces Round #621 (Div. 1 + Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
71336455 zzxzxzzxz A Feb. 17, 2020, 7:17 p.m. OK Clang++17 Diagnostics TESTS 21 62 0 800
71393980 udaysonubakka123 A Feb. 18, 2020, 5:17 p.m. OK Clang++17 Diagnostics TESTS 21 62 0 800
71393963 Angel_zou A Feb. 18, 2020, 5:16 p.m. OK Clang++17 Diagnostics TESTS 21 77 0 800
71396213 ftiasch A Feb. 18, 2020, 5:54 p.m. OK D TESTS 21 31 0 800
71426632 OtherPhantasy A Feb. 19, 2020, 9:27 a.m. OK FPC TESTS 21 30 204800 800
71313245 touristnct A Feb. 17, 2020, 4:39 p.m. OK FPC TESTS 21 31 102400 800
71611981 rahat1803098 A Feb. 22, 2020, 12:44 p.m. OK GNU C11 TESTS 21 30 0 800
71314525 mainul3195 A Feb. 17, 2020, 4:43 p.m. OK GNU C11 TESTS 21 30 0 800
71312625 rakesh_roy_plabon A Feb. 17, 2020, 4:37 p.m. OK GNU C11 TESTS 21 30 0 800
71349665 Frozen13 A Feb. 18, 2020, 3:02 a.m. OK GNU C11 TESTS 21 30 0 800
71308805 xraccon A Feb. 17, 2020, 4:25 p.m. OK GNU C11 TESTS 21 30 0 800
71461694 Super_Bug A Feb. 19, 2020, 8:39 p.m. OK GNU C11 TESTS 21 30 0 800
71633899 gdsoumya A Feb. 22, 2020, 8:54 p.m. OK GNU C11 TESTS 21 31 0 800
71577149 enesezgin A Feb. 21, 2020, 9:57 p.m. OK GNU C11 TESTS 21 31 0 800
71601231 rubber_duckieOwOwO A Feb. 22, 2020, 9:20 a.m. OK GNU C11 TESTS 21 31 0 800
71639569 alpha_zero_01 A Feb. 23, 2020, 2:03 a.m. OK GNU C11 TESTS 21 31 0 800
71306267 xingjianggangdan A Feb. 17, 2020, 4:17 p.m. OK GNU C++11 TESTS 21 15 0 800
71409376 Yi_ A Feb. 19, 2020, 1:39 a.m. OK GNU C++11 TESTS 21 15 0 800
71617344 Col_lin A Feb. 22, 2020, 2:29 p.m. OK GNU C++11 TESTS 21 15 0 800
71611160 luogu_bot5 A Feb. 22, 2020, 12:27 p.m. OK GNU C++11 TESTS 21 30 0 800
71580108 C20193515_LYX A Feb. 22, 2020, 12:38 a.m. OK GNU C++11 TESTS 21 30 0 800
71524598 Another_CraZYali A Feb. 21, 2020, 3:04 a.m. OK GNU C++11 TESTS 21 30 0 800
71472776 LJb00131 A Feb. 20, 2020, 4:57 a.m. OK GNU C++11 TESTS 21 30 0 800
71469365 CoolBANGstone A Feb. 20, 2020, 2:45 a.m. OK GNU C++11 TESTS 21 30 0 800
71466437 AloneKnight A Feb. 20, 2020, 12:20 a.m. OK GNU C++11 TESTS 21 30 0 800
71421116 rures A Feb. 19, 2020, 7:35 a.m. OK GNU C++11 TESTS 21 30 0 800
71470669 Priyanshu_kr A Feb. 20, 2020, 3:40 a.m. OK GNU C++14 TESTS 21 15 0 800
71489739 Virtue666 A Feb. 20, 2020, 11:36 a.m. OK GNU C++14 TESTS 21 15 0 800
71494219 MrGary A Feb. 20, 2020, 12:58 p.m. OK GNU C++14 TESTS 21 15 0 800
71504978 grg124 A Feb. 20, 2020, 4:05 p.m. OK GNU C++14 TESTS 21 15 0 800
71516031 obeliks A Feb. 20, 2020, 8:11 p.m. OK GNU C++14 TESTS 21 15 0 800
71540817 aloomya A Feb. 21, 2020, 9:32 a.m. OK GNU C++14 TESTS 21 15 0 800
71546334 dtc03012 A Feb. 21, 2020, 11:31 a.m. OK GNU C++14 TESTS 21 15 0 800
71555980 __LSB__ A Feb. 21, 2020, 2:26 p.m. OK GNU C++14 TESTS 21 15 0 800
71621209 aramun_haesulla A Feb. 22, 2020, 3:52 p.m. OK GNU C++14 TESTS 21 15 0 800
71640777 SushiNinja A Feb. 23, 2020, 3:19 a.m. OK GNU C++14 TESTS 21 15 0 800
71639791 ZUST-18ZZL A Feb. 23, 2020, 2:19 a.m. OK GNU C++17 TESTS 21 15 0 800
71607955 DystoriaX A Feb. 22, 2020, 11:23 a.m. OK GNU C++17 TESTS 21 15 0 800
71605357 ikar A Feb. 22, 2020, 10:32 a.m. OK GNU C++17 TESTS 21 15 0 800
71586389 damianlips A Feb. 22, 2020, 4:43 a.m. OK GNU C++17 TESTS 21 15 0 800
71583860 rhythm_1703083 A Feb. 22, 2020, 3:24 a.m. OK GNU C++17 TESTS 21 15 0 800
71580213 Starlight_Glimmer A Feb. 22, 2020, 12:46 a.m. OK GNU C++17 TESTS 21 15 0 800
71552951 bugbuster_ A Feb. 21, 2020, 1:34 p.m. OK GNU C++17 TESTS 21 15 0 800
71546254 jeelrb30 A Feb. 21, 2020, 11:29 a.m. OK GNU C++17 TESTS 21 15 0 800
71538449 namnguyennn.89 A Feb. 21, 2020, 8:45 a.m. OK GNU C++17 TESTS 21 15 0 800
71530443 bintay A Feb. 21, 2020, 6:08 a.m. OK GNU C++17 TESTS 21 15 0 800
71401164 fc-lib-xyz A Feb. 18, 2020, 7:35 p.m. OK Go TESTS 21 31 0 800
71385899 toterpinguin A Feb. 18, 2020, 2:52 p.m. OK Go TESTS 21 31 0 800
71380811 wang.senyuan A Feb. 18, 2020, 1:35 p.m. OK Go TESTS 21 31 0 800
71307797 ontake A Feb. 17, 2020, 4:22 p.m. OK Go TESTS 21 46 0 800
71351327 wzazzy A Feb. 18, 2020, 4:01 a.m. OK Go TESTS 21 109 0 800
71501161 tuan_bitch A Feb. 20, 2020, 2:52 p.m. OK Go TESTS 21 124 0 800
71627642 pennyIsLove A Feb. 22, 2020, 6:08 p.m. OK Java 11 TESTS 21 171 0 800
71564404 ZeyadKhattab A Feb. 21, 2020, 4:51 p.m. OK Java 11 TESTS 21 171 0 800
71459932 zekigurbuz A Feb. 19, 2020, 7:48 p.m. OK Java 11 TESTS 21 171 0 800
71438926 Clowyy A Feb. 19, 2020, 1:15 p.m. OK Java 11 TESTS 21 171 0 800
71335143 abhi123valani A Feb. 17, 2020, 7:01 p.m. OK Java 11 TESTS 21 171 0 800
71505134 yamen.haddad A Feb. 20, 2020, 4:08 p.m. OK Java 11 TESTS 21 186 0 800
71462100 HochanFS A Feb. 19, 2020, 8:51 p.m. OK Java 11 TESTS 21 186 0 800
71455166 dash2199 A Feb. 19, 2020, 6 p.m. OK Java 11 TESTS 21 186 0 800
71426930 Anonymous A Feb. 19, 2020, 9:33 a.m. OK Java 11 TESTS 21 186 0 800
71383420 pixel7367 A Feb. 18, 2020, 2:14 p.m. OK Java 11 TESTS 21 186 0 800
71454103 prem_cse A Feb. 19, 2020, 5:39 p.m. OK Java 8 TESTS 21 108 0 800
71394493 shashwat07 A Feb. 18, 2020, 5:25 p.m. OK Java 8 TESTS 21 108 0 800
71523753 luchy0120 A Feb. 21, 2020, 2:27 a.m. OK Java 8 TESTS 21 109 0 800
71512180 sunnycarlos A Feb. 20, 2020, 6:27 p.m. OK Java 8 TESTS 21 109 0 800
71469218 XsLel A Feb. 20, 2020, 2:39 a.m. OK Java 8 TESTS 21 109 0 800
71431826 Kavi.Prajapati A Feb. 19, 2020, 11:10 a.m. OK Java 8 TESTS 21 109 0 800
71419197 Shokersss A Feb. 19, 2020, 6:51 a.m. OK Java 8 TESTS 21 109 0 800
71393615 shubhampandey18 A Feb. 18, 2020, 5:10 p.m. OK Java 8 TESTS 21 109 0 800
71390439 mattjzhou A Feb. 18, 2020, 4:13 p.m. OK Java 8 TESTS 21 109 0 800
71383694 shindeshubham923 A Feb. 18, 2020, 2:18 p.m. OK Java 8 TESTS 21 109 0 800
71366805 pseudonimoX A Feb. 18, 2020, 9:32 a.m. OK JavaScript TESTS 21 31 204800 800
71540304 pseudonimoX A Feb. 21, 2020, 9:22 a.m. OK JavaScript TESTS 21 31 204800 800
71339499 pseudonimoX A Feb. 17, 2020, 8:07 p.m. OK JavaScript TESTS 21 31 204800 800
71304668 watarimaycry2 A Feb. 17, 2020, 4:13 p.m. OK JavaScript TESTS 21 31 512000 800
71339648 pseudonimoX A Feb. 17, 2020, 8:11 p.m. OK JavaScript TESTS 21 46 204800 800
71349480 NguyenHungCuong A Feb. 18, 2020, 2:55 a.m. OK JavaScript TESTS 21 46 512000 800
71378854 Spheniscine A Feb. 18, 2020, 1:09 p.m. OK Kotlin TESTS 21 109 0 800
71637776 Leviathan7 A Feb. 22, 2020, 11:57 p.m. OK Kotlin TESTS 21 155 0 800
71459454 Black_Fregat A Feb. 19, 2020, 7:37 p.m. OK Kotlin TESTS 21 155 204800 800
71433976 Dimaty09 A Feb. 19, 2020, 11:50 a.m. OK Kotlin TESTS 21 155 204800 800
71369502 T49E2 A Feb. 18, 2020, 10:27 a.m. OK Kotlin TESTS 21 155 204800 800
71470017 KanhuKeNanu A Feb. 20, 2020, 3:13 a.m. OK Kotlin TESTS 21 171 204800 800
71317802 KaylenTP A Feb. 17, 2020, 4:55 p.m. OK Kotlin TESTS 21 187 204800 800
71313798 V.Gladin A Feb. 17, 2020, 4:41 p.m. OK Mono C# TESTS 21 46 512000 800
71314631 Ruban_Denic A Feb. 17, 2020, 4:43 p.m. OK Mono C# TESTS 21 61 512000 800
71611035 AsadulloProgrammist A Feb. 22, 2020, 12:24 p.m. OK Mono C# TESTS 21 61 512000 800
71567932 m1_k3 A Feb. 21, 2020, 5:58 p.m. OK Mono C# TESTS 21 62 0 800
71340810 gtadj.roni A Feb. 17, 2020, 8:38 p.m. OK Mono C# TESTS 21 62 409600 800
71324531 kaminoikari A Feb. 17, 2020, 5:22 p.m. OK Mono C# TESTS 21 62 409600 800
71336657 TRR A Feb. 17, 2020, 7:19 p.m. OK Mono C# TESTS 21 62 409600 800
71302879 igormaslov123 A Feb. 17, 2020, 4:08 p.m. OK Mono C# TESTS 21 62 4198400 800
71368705 Bobcat A Feb. 18, 2020, 10:10 a.m. OK Mono C# TESTS 21 62 4198400 800
71313358 geronimo00 A Feb. 17, 2020, 4:39 p.m. OK Mono C# TESTS 21 77 4198400 800
71422620 Stanley_Shao A Feb. 19, 2020, 8:06 a.m. OK MS C++ TESTS 21 30 0 800
71555246 vjudge1 A Feb. 21, 2020, 2:13 p.m. OK MS C++ TESTS 21 31 0 800
71551742 vjudge4 A Feb. 21, 2020, 1:14 p.m. OK MS C++ TESTS 21 31 0 800
71550695 vjudge2 A Feb. 21, 2020, 12:55 p.m. OK MS C++ TESTS 21 31 0 800
71549874 vjudge2 A Feb. 21, 2020, 12:40 p.m. OK MS C++ TESTS 21 31 0 800
71549651 vjudge5 A Feb. 21, 2020, 12:36 p.m. OK MS C++ TESTS 21 31 0 800
71548905 vjudge2 A Feb. 21, 2020, 12:22 p.m. OK MS C++ TESTS 21 31 0 800
71546661 vjudge4 A Feb. 21, 2020, 11:38 a.m. OK MS C++ TESTS 21 31 0 800
71613885 vjudge3 A Feb. 22, 2020, 1:23 p.m. OK MS C++ TESTS 21 31 0 800
71553706 vjudge3 A Feb. 21, 2020, 1:47 p.m. OK MS C++ TESTS 21 31 0 800
71323113 sriphani345v A Feb. 17, 2020, 5:16 p.m. OK MS C++ 2017 TESTS 21 30 0 800
71308371 Imnisarg A Feb. 17, 2020, 4:24 p.m. OK MS C++ 2017 TESTS 21 30 409600 800
71490240 TheLiang A Feb. 20, 2020, 11:46 a.m. OK MS C++ 2017 TESTS 21 31 0 800
71617809 cyalue A Feb. 22, 2020, 2:38 p.m. OK MS C++ 2017 TESTS 21 31 0 800
71601620 Killrad A Feb. 22, 2020, 9:27 a.m. OK MS C++ 2017 TESTS 21 31 0 800
71566012 Tangerine A Feb. 21, 2020, 5:19 p.m. OK MS C++ 2017 TESTS 21 31 0 800
71541433 vjudge1 A Feb. 21, 2020, 9:44 a.m. OK MS C++ 2017 TESTS 21 31 0 800
71491504 We2Am A Feb. 20, 2020, 12:12 p.m. OK MS C++ 2017 TESTS 21 31 0 800
71485663 kaist_yechan A Feb. 20, 2020, 10 a.m. OK MS C++ 2017 TESTS 21 31 0 800
71451415 Boryan07 A Feb. 19, 2020, 4:51 p.m. OK MS C++ 2017 TESTS 21 31 0 800
71465171 pasthec A Feb. 19, 2020, 10:57 p.m. OK Ocaml TESTS 21 30 204800 800
71420291 mayakin A Feb. 19, 2020, 7:16 a.m. OK PHP TESTS 21 46 409600 800
71324950 erbolat0311 A Feb. 17, 2020, 5:24 p.m. OK PHP TESTS 21 46 409600 800
71352634 abhigupta4 A Feb. 18, 2020, 4:43 a.m. OK PyPy 2 TESTS 21 186 1228800 800
71375433 hritik3878 A Feb. 18, 2020, 12:19 p.m. OK PyPy 2 TESTS 21 202 2252800 800
71380141 answertalker920 A Feb. 18, 2020, 1:27 p.m. OK PyPy 3 TESTS 21 140 1536000 800
71357063 Enigmaster A Feb. 18, 2020, 6:23 a.m. OK PyPy 3 TESTS 21 140 1843200 800
71465368 m.ni A Feb. 19, 2020, 11:10 p.m. OK PyPy 3 TESTS 21 140 2662400 800
71516078 PaNika A Feb. 20, 2020, 8:12 p.m. OK PyPy 3 TESTS 21 155 1433600 800
71454929 GTrigger A Feb. 19, 2020, 5:55 p.m. OK PyPy 3 TESTS 21 155 1433600 800
71445893 vaisnav A Feb. 19, 2020, 3:11 p.m. OK PyPy 3 TESTS 21 155 1433600 800
71356646 vishwesh18 A Feb. 18, 2020, 6:14 a.m. OK PyPy 3 TESTS 21 155 1433600 800
71313135 Myao A Feb. 17, 2020, 4:39 p.m. OK PyPy 3 TESTS 21 155 1433600 800
71481120 alechuang98 A Feb. 20, 2020, 8:26 a.m. OK PyPy 3 TESTS 21 155 1536000 800
71473970 Gaurav_Patel A Feb. 20, 2020, 5:32 a.m. OK PyPy 3 TESTS 21 155 1536000 800
71547140 paruby A Feb. 21, 2020, 11:48 a.m. OK Python 2 TESTS 21 187 0 800
71384329 elistark A Feb. 18, 2020, 2:27 p.m. OK Python 2 TESTS 21 187 0 800
71637974 Mike10 A Feb. 23, 2020, 12:10 a.m. OK Python 2 TESTS 21 202 102400 800
71319123 mshingote A Feb. 17, 2020, 5 p.m. OK Python 2 TESTS 21 249 102400 800
71423092 shivani.18bcs1026 A Feb. 19, 2020, 8:15 a.m. OK Python 3 TESTS 21 108 0 800
71337903 toxzi A Feb. 17, 2020, 7:38 p.m. OK Python 3 TESTS 21 108 0 800
71557078 coder_92 A Feb. 21, 2020, 2:46 p.m. OK Python 3 TESTS 21 108 307200 800
71434603 agresivebdfighter A Feb. 19, 2020, 12:02 p.m. OK Python 3 TESTS 21 108 307200 800
71622422 InsomniA3278 A Feb. 22, 2020, 4:17 p.m. OK Python 3 TESTS 21 109 0 800
71614792 mike881207 A Feb. 22, 2020, 1:40 p.m. OK Python 3 TESTS 21 109 0 800
71555621 kfirko A Feb. 21, 2020, 2:20 p.m. OK Python 3 TESTS 21 109 0 800
71532960 rraj78502 A Feb. 21, 2020, 6:59 a.m. OK Python 3 TESTS 21 109 0 800
71499619 I_Love_Nhi_Nguyen A Feb. 20, 2020, 2:26 p.m. OK Python 3 TESTS 21 109 0 800
71483334 iu_refat_ict A Feb. 20, 2020, 9:14 a.m. OK Python 3 TESTS 21 109 0 800
71509686 Lvl999Noob A Feb. 20, 2020, 5:38 p.m. OK Rust TESTS 21 31 102400 800
71386843 toterpinguin A Feb. 18, 2020, 3:07 p.m. OK Rust TESTS 21 31 102400 800
71305694 BadDuck A Feb. 17, 2020, 4:16 p.m. OK Scala TESTS 21 514 0 800

remove filters

Back to search problems