Codeforces Round 515 (Div. 3)

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
1066 Codeforces Round 515 (Div. 3) FINISHED False 7200 198170723 Oct. 12, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5577 ) D Boxes Packing PROGRAMMING binary search implementation 1700

B'Maksim has n objects and m boxes, each box has size exactly k . Objects are numbered from 1 to n in order from left to right, the size of the i -th object is a_i . Maksim wants to pack his objects into the boxes and he will pack objects by the following algorithm: he takes one of the empty boxes he has, goes from left to right through the objects, and if the i -th object fits in the current box (the remaining size of the box is greater than or equal to a_i ), he puts it in the box, and the remaining size of the box decreases by a_i . Otherwise he takes the new empty box and continues the process above. If he has no empty boxes and there is at least one object not in some box then Maksim cannot pack the chosen set of objects. Maksim wants to know the maximum number of objects he can pack by the algorithm above. To reach this target, he will throw out the leftmost object from the set until the remaining set of objects can be packed in boxes he has. Your task is to say the maximum number of objects Maksim can pack in boxes he has. Each time when Maksim tries to pack the objects into the boxes, he will make empty all the boxes he has before do it (and the relative order of the remaining set of objects will not change). The first line of the input contains three integers n , m , k ( 1 <= n, m <= 2 cdot 10^5 , 1 <= k <= 10^9 ) -- the number of objects, the number of boxes and the size of each box. The second line of the input contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= k ), where a_i is the size of the i -th object. Print the maximum number of objects Maksim can pack using the algorithm described in the problem statement. In the first example Maksim can pack only 4 objects. Firstly, he tries to pack all the 5 objects. Distribution of objects will be [5], [2, 1] . Maxim cannot pack the next object in the second box and he h'...

Tutorials

62419

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
44303016 cpy D Oct. 14, 2018, 10:52 a.m. OK D TESTS 25 108 4300800 1700
44258510 ruban D Oct. 13, 2018, 1:23 p.m. OK Delphi TESTS 25 93 3072000 1700
44761327 njsfdxfszx59 D Oct. 24, 2018, 7:20 a.m. OK FPC TESTS 25 77 819200 1700
44831080 vdanh7277 D Oct. 25, 2018, 8:29 a.m. OK FPC TESTS 25 77 819200 1700
44691042 vjudge5 D Oct. 22, 2018, 12:02 p.m. OK FPC TESTS 25 77 1638400 1700
44691013 luogu_bot4 D Oct. 22, 2018, 12:02 p.m. OK FPC TESTS 25 78 1638400 1700
44733352 vjudge5 D Oct. 23, 2018, 11:43 a.m. OK GNU C11 TESTS 25 46 819200 1700
44353372 pma D Oct. 15, 2018, 11:17 a.m. OK GNU C11 TESTS 25 61 819200 1700
44908845 vjudge4 D Oct. 26, 2018, 12:38 p.m. OK GNU C11 TESTS 25 61 3174400 1700
50580311 vjudge2 D Feb. 27, 2019, 8:50 p.m. OK GNU C11 TESTS 25 62 819200 1700
44451384 Majka D Oct. 17, 2018, 4:03 p.m. OK GNU C11 TESTS 25 62 819200 1700
50412715 vjudge2 D Feb. 24, 2019, 4:13 a.m. OK GNU C11 TESTS 25 62 819200 1700
45119671 luogu_bot3 D Oct. 31, 2018, 2:50 a.m. OK GNU C++11 TESTS 25 31 614400 1700
45119661 xiezichen D Oct. 31, 2018, 2:49 a.m. OK GNU C++11 TESTS 25 31 614400 1700
45990816 Dilute D Nov. 20, 2018, 9:42 a.m. OK GNU C++11 TESTS 25 31 819200 1700
45097101 luogu_bot4 D Oct. 30, 2018, 12:19 p.m. OK GNU C++11 TESTS 25 31 819200 1700
54832134 MosharrafOshy D May 30, 2019, 9:20 a.m. OK GNU C++11 TESTS 25 31 819200 1700
48476030 luogu_bot4 D Jan. 17, 2019, 2:36 a.m. OK GNU C++11 TESTS 25 31 819200 1700
63826251 bezel D Oct. 30, 2019, 1:29 p.m. OK GNU C++11 TESTS 25 31 819200 1700
68482606 luogu_bot5 D Jan. 10, 2020, 8:23 a.m. OK GNU C++11 TESTS 25 31 819200 1700
57771392 luogu_bot4 D July 26, 2019, 1:03 a.m. OK GNU C++11 TESTS 25 31 819200 1700
56622806 LittleBaby D July 6, 2019, 12:33 p.m. OK GNU C++11 TESTS 25 31 819200 1700
45280623 VisJiao D Nov. 4, 2018, 1:31 p.m. OK GNU C++14 TESTS 25 31 2457600 1700
46373961 wleung_bvg D Nov. 29, 2018, 5:29 p.m. OK GNU C++14 TESTS 25 46 819200 1700
46373902 wleung_bvg D Nov. 29, 2018, 5:26 p.m. OK GNU C++14 TESTS 25 46 819200 1700
44825574 Darling.87 D Oct. 25, 2018, 5:45 a.m. OK GNU C++14 TESTS 25 46 819200 1700
44435101 yangshuang D Oct. 17, 2018, 9:34 a.m. OK GNU C++14 TESTS 25 46 819200 1700
44219247 johnson D Oct. 12, 2018, 4:48 p.m. OK GNU C++14 TESTS 25 46 1638400 1700
44475934 vjudge4 D Oct. 18, 2018, 8:57 a.m. OK GNU C++14 TESTS 25 61 819200 1700
44826143 Darling.87 D Oct. 25, 2018, 6:07 a.m. OK GNU C++14 TESTS 25 61 819200 1700
44826116 Darling.87 D Oct. 25, 2018, 6:06 a.m. OK GNU C++14 TESTS 25 61 819200 1700
44464953 201831990439 D Oct. 18, 2018, 12:48 a.m. OK GNU C++14 TESTS 25 61 819200 1700
44689461 vjudge2 D Oct. 22, 2018, 11:23 a.m. OK GNU C++17 TESTS 25 46 1126400 1700
44260571 nxnn D Oct. 13, 2018, 2:18 p.m. OK GNU C++17 TESTS 25 61 819200 1700
44262148 tingpei D Oct. 13, 2018, 2:55 p.m. OK GNU C++17 TESTS 25 61 819200 1700
45099515 vjudge4 D Oct. 30, 2018, 1:18 p.m. OK GNU C++17 TESTS 25 61 819200 1700
68434443 vjudge5 D Jan. 9, 2020, 8:22 a.m. OK GNU C++17 TESTS 25 61 819200 1700
68348163 vjudge1 D Jan. 7, 2020, 8:25 a.m. OK GNU C++17 TESTS 25 62 819200 1700
69426453 FelixArg D Jan. 23, 2020, 3:57 p.m. OK GNU C++17 TESTS 25 62 819200 1700
67349558 greenblade D Dec. 21, 2019, 11:59 a.m. OK GNU C++17 TESTS 25 62 819200 1700
65223686 mosta7il D Nov. 16, 2019, 11:13 p.m. OK GNU C++17 TESTS 25 62 819200 1700
69946743 Rahul_cpp D Feb. 1, 2020, 7:48 a.m. OK GNU C++17 TESTS 25 62 819200 1700
45556967 ADJA D Nov. 11, 2018, 9:09 a.m. OK Go TESTS 25 202 819200 1700
44251522 Marii D Oct. 13, 2018, 10:43 a.m. OK Go TESTS 25 202 5222400 1700
44383734 fredbr D Oct. 16, 2018, 4:52 a.m. OK Haskell TESTS 25 811 82124800 1700
44383606 fredbr D Oct. 16, 2018, 4:47 a.m. OK Haskell TESTS 25 811 82124800 1700
54710464 gaidash D May 27, 2019, 9:52 a.m. OK Java 8 TESTS 25 124 0 1700
67068740 bluesky111 D Dec. 17, 2019, 12:02 p.m. OK Java 8 TESTS 25 124 0 1700
51221388 rishz D March 12, 2019, 12:35 p.m. OK Java 8 TESTS 25 124 0 1700
45963810 megaspazz D Nov. 19, 2018, 12:55 p.m. OK Java 8 TESTS 25 124 0 1700
44836813 israa.ezzat D Oct. 25, 2018, 11:15 a.m. OK Java 8 TESTS 25 124 0 1700
44533536 Srinivasa_Ramanujan D Oct. 19, 2018, 7:45 a.m. OK Java 8 TESTS 25 124 0 1700
44230972 cotyeyddca1 D Oct. 13, 2018, midnight OK Java 8 TESTS 25 124 0 1700
44217098 ankurverma1994 D Oct. 12, 2018, 4:32 p.m. OK Java 8 TESTS 25 124 0 1700
44341391 BaZ_ D Oct. 15, 2018, 3:48 a.m. OK Java 8 TESTS 25 139 0 1700
44533234 Srinivasa_Ramanujan D Oct. 19, 2018, 7:36 a.m. OK Java 8 TESTS 25 139 0 1700
44896680 witchu D Oct. 26, 2018, 6:58 a.m. OK Mono C# TESTS 25 109 19763200 1700
44257653 azukun D Oct. 13, 2018, 1:01 p.m. OK Mono C# TESTS 25 109 25497600 1700
68840762 mban259 D Jan. 15, 2020, 5:42 a.m. OK Mono C# TESTS 25 124 19763200 1700
44228791 Coder_D D Oct. 12, 2018, 9:21 p.m. OK Mono C# TESTS 25 124 26214400 1700
44244996 eki D Oct. 13, 2018, 8:19 a.m. OK Mono C# TESTS 25 155 19763200 1700
44219650 kuuso D Oct. 12, 2018, 4:53 p.m. OK Mono C# TESTS 25 156 45056000 1700
44333152 omikad D Oct. 14, 2018, 7:30 p.m. OK Mono C# TESTS 25 826 132505600 1700
51092810 vjudge4 D March 9, 2019, 3:01 p.m. OK MS C++ TESTS 25 46 819200 1700
68407622 vjudge4 D Jan. 8, 2020, 3:37 p.m. OK MS C++ TESTS 25 46 819200 1700
52270751 vjudge1 D April 3, 2019, 1:03 p.m. OK MS C++ TESTS 25 46 819200 1700
45121444 vjudge4 D Oct. 31, 2018, 4:56 a.m. OK MS C++ TESTS 25 46 819200 1700
49768028 vjudge2 D Feb. 11, 2019, 12:32 p.m. OK MS C++ TESTS 25 46 3993600 1700
44254908 cuk123 D Oct. 13, 2018, 11:58 a.m. OK MS C++ TESTS 25 61 819200 1700
44473208 vjudge1 D Oct. 18, 2018, 7:26 a.m. OK MS C++ TESTS 25 61 819200 1700
44255749 cuk123 D Oct. 13, 2018, 12:16 p.m. OK MS C++ TESTS 25 61 819200 1700
45996830 vjudge5 D Nov. 20, 2018, 12:43 p.m. OK MS C++ TESTS 25 61 819200 1700
44703057 scorpiowf D Oct. 22, 2018, 3:35 p.m. OK MS C++ TESTS 25 61 819200 1700
55233421 hwangganzi D June 7, 2019, 7:02 a.m. OK MS C++ 2017 TESTS 25 77 1638400 1700
56975082 2462478392 D July 13, 2019, 11:55 a.m. OK MS C++ 2017 TESTS 25 78 2457600 1700
50782174 work_hard. D March 4, 2019, 11:53 a.m. OK MS C++ 2017 TESTS 25 93 819200 1700
69522955 vjudge5 D Jan. 25, 2020, 1:58 p.m. OK MS C++ 2017 TESTS 25 93 4300800 1700
69164523 vjudge4 D Jan. 20, 2020, 2:47 a.m. OK MS C++ 2017 TESTS 25 124 79974400 1700
58042755 YaMi506 D July 30, 2019, 8:36 p.m. OK MS C++ 2017 TESTS 25 202 819200 1700
54334375 2018qwer D May 18, 2019, 7:25 a.m. OK MS C++ 2017 TESTS 25 202 819200 1700
54086170 ldm0magician D May 14, 2019, 7:31 a.m. OK MS C++ 2017 TESTS 25 202 819200 1700
69163292 vjudge1 D Jan. 20, 2020, 1:58 a.m. OK MS C++ 2017 TESTS 25 202 1024000 1700
58366429 yorky D Aug. 6, 2019, 4:14 a.m. OK MS C++ 2017 TESTS 25 202 1638400 1700
55679682 Damir221 D June 17, 2019, 12:23 p.m. OK PascalABC.NET TESTS 25 389 0 1700
58830769 AndrewZzz24 D Aug. 14, 2019, 5:49 p.m. OK PascalABC.NET TESTS 25 514 102400 1700
52134359 mm944 D April 1, 2019, 12:40 a.m. OK PascalABC.NET TESTS 25 530 1638400 1700
44223819 Onesh0t D Oct. 12, 2018, 6:27 p.m. OK PyPy 2 TESTS 25 155 11776000 1700
44219393 SoSooding D Oct. 12, 2018, 4:50 p.m. OK PyPy 2 TESTS 25 186 13107200 1700
50662577 c1729 D March 2, 2019, 1:03 a.m. OK PyPy 2 TESTS 25 218 14028800 1700
44232586 pa.n.ik D Oct. 13, 2018, 1:47 a.m. OK PyPy 2 TESTS 25 342 22835200 1700
44424507 Yans D Oct. 17, 2018, 3:02 a.m. OK PyPy 3 TESTS 25 265 18124800 1700
44245228 tranphuminhbkhn D Oct. 13, 2018, 8:24 a.m. OK PyPy 3 TESTS 25 280 18124800 1700
45456635 omarnvidia D Nov. 8, 2018, 7:42 p.m. OK PyPy 3 TESTS 25 280 18124800 1700
44254741 Axyzv D Oct. 13, 2018, 11:55 a.m. OK PyPy 3 TESTS 25 280 21196800 1700
45272230 ulyabelyaeva D Nov. 4, 2018, 9:04 a.m. OK PyPy 3 TESTS 25 295 18022400 1700
49650116 zhaoy1ping D Feb. 9, 2019, 7:09 a.m. OK PyPy 3 TESTS 25 296 18124800 1700
45551233 kinte D Nov. 11, 2018, 5:30 a.m. OK PyPy 3 TESTS 25 296 18124800 1700
44890587 bergus D Oct. 26, 2018, 3 a.m. OK PyPy 3 TESTS 25 296 18124800 1700
44220213 karpik D Oct. 12, 2018, 5:02 p.m. OK PyPy 3 TESTS 25 296 18124800 1700
45234110 Firepaw D Nov. 3, 2018, 8:28 a.m. OK PyPy 3 TESTS 25 296 18227200 1700
44276883 EoinDavey D Oct. 13, 2018, 10:46 p.m. OK Python 2 TESTS 25 343 11161600 1700
44252660 ManasG D Oct. 13, 2018, 11:07 a.m. OK Python 2 TESTS 25 452 13721600 1700
44223063 shehebe D Oct. 12, 2018, 6:06 p.m. OK Python 2 TESTS 25 577 10956800 1700
44450674 Himanshuteli D Oct. 17, 2018, 3:44 p.m. OK Python 2 TESTS 25 966 10956800 1700
44217147 raven_47 D Oct. 12, 2018, 4:32 p.m. OK Python 2 TESTS 25 998 10854400 1700
44222383 r57shell D Oct. 12, 2018, 5:49 p.m. OK Python 3 TESTS 25 218 16076800 1700
44398435 ankitp544 D Oct. 16, 2018, 11:53 a.m. OK Python 3 TESTS 25 233 15462400 1700
44273541 the_white_devil D Oct. 13, 2018, 7:43 p.m. OK Python 3 TESTS 25 233 15667200 1700
44283860 DASmirnov D Oct. 14, 2018, 6:25 a.m. OK Python 3 TESTS 25 233 16076800 1700
44398793 ankitp544 D Oct. 16, 2018, 12:01 p.m. OK Python 3 TESTS 25 249 15462400 1700
44218707 iandioch D Oct. 12, 2018, 4:42 p.m. OK Python 3 TESTS 25 249 16076800 1700
45191962 wangzpeng D Nov. 2, 2018, 3:20 a.m. OK Python 3 TESTS 25 264 15462400 1700
44613688 freemax D Oct. 20, 2018, 10:07 p.m. OK Python 3 TESTS 25 264 15462400 1700
45105977 Amoo_Hashem_Mehraban D Oct. 30, 2018, 4:10 p.m. OK Python 3 TESTS 25 264 16076800 1700
44220862 overlordin777 D Oct. 12, 2018, 5:13 p.m. OK Python 3 TESTS 25 264 16076800 1700
44227196 clupasq D Oct. 12, 2018, 8:17 p.m. OK Ruby TESTS 25 265 33587200 1700
44228289 koikotya D Oct. 12, 2018, 8:59 p.m. OK Ruby TESTS 25 280 32768000 1700

remove filters

Back to search problems