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 |
---|---|---|---|---|---|---|
985 | Educational Codeforces Round 44 (Rated for Div. 2) | FINISHED | False | 7200 | 204909299 | May 21, 2018, 2:45 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 3680 ) | E | Pencils and Boxes | PROGRAMMING | binary search data structures dp greedy two pointers | 2000 |
B'Mishka received a gift of multicolored pencils for his birthday! Unfortunately he lives in a monochrome world, where everything is of the same color and only saturation differs. This pack can be represented as a sequence a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an of n integer numbers -- saturation of the color of each pencil. Now Mishka wants to put all the mess in the pack in order. He has an infinite number of empty boxes to do this. He would like to fill some boxes in such a way that: Help Mishka to determine if it 's possible to distribute all the pencils into boxes. Print "YES" if there exists such a distribution. Otherwise print "NO". The first line contains three integer numbers n, k and d (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x895 xc2 xb7105, 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89d xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- the number of pencils, minimal size of any non-empty box and maximal difference in saturation between any pair of pencils in the same box, respectively. The second line contains n integer numbers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- saturation of color of each pencil. Print "YES" if it 's possible to distribute all the pencils into boxes and satisfy all the conditions. Otherwise print "NO". In the first example it is possible to distribute pencils into 2 boxes with 3 pencils in each with any distribution. And you also can put all the pencils into the same box, difference of any pair in it won 't exceed 10. In the second example you can split pencils of saturations [4, xe2 x80 x895, xe2 x80 x893, xe2 x80 x894] into 2 boxes of size 2 and put the remaining ones into another box. '... |
Educational Codeforces Round 44 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
38611991 | rr_ | E | May 25, 2018, 2:35 p.m. | OK | D | TESTS | 90 | 312 | 41676800 | 2000 | |
38597614 | rr_ | E | May 24, 2018, 10:46 p.m. | OK | D | TESTS | 90 | 405 | 28774400 | 2000 | |
38596998 | rr_ | E | May 24, 2018, 9:32 p.m. | OK | D | TESTS | 90 | 421 | 28672000 | 2000 | |
38555379 | forlfs | E | May 23, 2018, 8:16 a.m. | OK | GNU C | TESTS | 90 | 202 | 6041600 | 2000 | |
38631678 | luogu_bot4 | E | May 26, 2018, 11:08 a.m. | OK | GNU C++ | TESTS | 90 | 62 | 5836800 | 2000 | |
38631665 | AutumnKite | E | May 26, 2018, 11:06 a.m. | OK | GNU C++ | TESTS | 90 | 62 | 5836800 | 2000 | |
39951127 | ILLENIUM | E | July 4, 2018, 10:21 a.m. | OK | GNU C++ | TESTS | 90 | 62 | 6041600 | 2000 | |
39635146 | menjiantong | E | June 25, 2018, 1:19 a.m. | OK | GNU C++ | TESTS | 90 | 62 | 6041600 | 2000 | |
39819316 | Scut82 | E | July 1, 2018, 11:04 a.m. | OK | GNU C++ | TESTS | 90 | 62 | 10035200 | 2000 | |
38507798 | qkoqhh | E | May 21, 2018, 4:29 p.m. | OK | GNU C++ | TESTS | 90 | 77 | 3993600 | 2000 | |
38522044 | ws_fqk | E | May 22, 2018, 2:50 a.m. | OK | GNU C++ | TESTS | 90 | 77 | 6041600 | 2000 | |
39817830 | Scut82 | E | July 1, 2018, 9:51 a.m. | OK | GNU C++ | TESTS | 90 | 78 | 3993600 | 2000 | |
38507014 | orzwwd | E | May 21, 2018, 4:25 p.m. | OK | GNU C++ | TESTS | 90 | 78 | 3993600 | 2000 | |
39822870 | Scut82 | E | July 1, 2018, 1:47 p.m. | OK | GNU C++ | TESTS | 90 | 78 | 4096000 | 2000 | |
51796690 | rainboy | E | March 24, 2019, 3:35 p.m. | OK | GNU C11 | TESTS | 90 | 171 | 3993600 | 2000 | |
61593439 | vjudge4 | E | Oct. 1, 2019, 7:52 a.m. | OK | GNU C++11 | TESTS | 90 | 62 | 2969600 | 2000 | |
38521246 | emoairx | E | May 22, 2018, 1:43 a.m. | OK | GNU C++11 | TESTS | 90 | 62 | 4505600 | 2000 | |
69596582 | Rainbow_sjy | E | Jan. 27, 2020, 5:10 a.m. | OK | GNU C++11 | TESTS | 90 | 62 | 4710400 | 2000 | |
57466973 | Kylin_ | E | July 21, 2019, 4 p.m. | OK | GNU C++11 | TESTS | 90 | 62 | 5836800 | 2000 | |
38520107 | yukuai26 | E | May 21, 2018, 11:55 p.m. | OK | GNU C++11 | TESTS | 90 | 62 | 6041600 | 2000 | |
38535224 | Hzyuer | E | May 22, 2018, 12:30 p.m. | OK | GNU C++11 | TESTS | 90 | 62 | 6041600 | 2000 | |
53296072 | vjudge1 | E | April 25, 2019, 5:38 p.m. | OK | GNU C++11 | TESTS | 90 | 62 | 6246400 | 2000 | |
51107341 | vjudge3 | E | March 10, 2019, 12:35 a.m. | OK | GNU C++11 | TESTS | 90 | 62 | 6246400 | 2000 | |
61595740 | vjudge5 | E | Oct. 1, 2019, 8:45 a.m. | OK | GNU C++11 | TESTS | 90 | 62 | 6246400 | 2000 | |
61610051 | luogu_bot2 | E | Oct. 1, 2019, 1:51 p.m. | OK | GNU C++11 | TESTS | 90 | 62 | 7065600 | 2000 | |
38591842 | Linkus | E | May 24, 2018, 4:14 p.m. | OK | GNU C++14 | TESTS | 90 | 77 | 5017600 | 2000 | |
38507313 | huas_teble | E | May 21, 2018, 4:26 p.m. | OK | GNU C++14 | TESTS | 90 | 78 | 8499200 | 2000 | |
38991947 | wp32pw | E | June 6, 2018, 10:45 a.m. | OK | GNU C++14 | TESTS | 90 | 139 | 3686400 | 2000 | |
38507065 | cscscs | E | May 21, 2018, 4:25 p.m. | OK | GNU C++14 | TESTS | 90 | 139 | 4096000 | 2000 | |
38562449 | Madeline | E | May 23, 2018, 12:53 p.m. | OK | GNU C++14 | TESTS | 90 | 140 | 3993600 | 2000 | |
38524012 | cscscs | E | May 22, 2018, 5:03 a.m. | OK | GNU C++14 | TESTS | 90 | 140 | 4096000 | 2000 | |
38536015 | ielenik | E | May 22, 2018, 12:57 p.m. | OK | GNU C++14 | TESTS | 90 | 140 | 6348800 | 2000 | |
38514409 | temp212 | E | May 21, 2018, 5:42 p.m. | OK | GNU C++14 | TESTS | 90 | 140 | 7987200 | 2000 | |
38510061 | jugol | E | May 21, 2018, 4:40 p.m. | OK | GNU C++14 | TESTS | 90 | 140 | 7987200 | 2000 | |
49207366 | vjudge5 | E | Jan. 30, 2019, 2:19 p.m. | OK | GNU C++14 | TESTS | 90 | 155 | 2560000 | 2000 | |
61579487 | vjudge4 | E | Oct. 1, 2019, 12:24 a.m. | OK | GNU C++17 | TESTS | 90 | 62 | 5529600 | 2000 | |
38574918 | q234rty | E | May 24, 2018, 2:11 a.m. | OK | GNU C++17 | TESTS | 90 | 77 | 14028800 | 2000 | |
38710559 | akaring | E | May 29, 2018, 6:13 a.m. | OK | GNU C++17 | TESTS | 90 | 140 | 3993600 | 2000 | |
38627474 | 5438722 | E | May 26, 2018, 7:46 a.m. | OK | GNU C++17 | TESTS | 90 | 140 | 4505600 | 2000 | |
39076656 | 0442A403 | E | June 9, 2018, 6:53 p.m. | OK | GNU C++17 | TESTS | 90 | 155 | 3993600 | 2000 | |
38516587 | qrfkickit | E | May 21, 2018, 7:06 p.m. | OK | GNU C++17 | TESTS | 90 | 156 | 5939200 | 2000 | |
38528445 | qrfkickit | E | May 22, 2018, 8:26 a.m. | OK | GNU C++17 | TESTS | 90 | 156 | 6246400 | 2000 | |
62038638 | iamneit | E | Oct. 7, 2019, 5:03 a.m. | OK | GNU C++17 | TESTS | 90 | 171 | 2560000 | 2000 | |
61609690 | vjudge3 | E | Oct. 1, 2019, 1:44 p.m. | OK | GNU C++17 | TESTS | 90 | 171 | 3993600 | 2000 | |
69399125 | enabl3d | E | Jan. 23, 2020, 7:41 a.m. | OK | GNU C++17 | TESTS | 90 | 171 | 3993600 | 2000 | |
38521873 | stczhc | E | May 22, 2018, 2:38 a.m. | OK | Haskell | TESTS | 90 | 1528 | 63180800 | 2000 | |
38539169 | aman28rwt | E | May 22, 2018, 2:47 p.m. | OK | Java 8 | TESTS | 90 | 155 | 0 | 2000 | |
38531668 | aman28rwt | E | May 22, 2018, 10:32 a.m. | OK | Java 8 | TESTS | 90 | 186 | 0 | 2000 | |
41661630 | BaZ_ | E | Aug. 16, 2018, 6:31 p.m. | OK | Java 8 | TESTS | 90 | 186 | 0 | 2000 | |
39257236 | resendiz | E | June 15, 2018, 4:39 a.m. | OK | Java 8 | TESTS | 90 | 202 | 0 | 2000 | |
38531637 | aman28rwt | E | May 22, 2018, 10:31 a.m. | OK | Java 8 | TESTS | 90 | 202 | 0 | 2000 | |
38557789 | Dexter420 | E | May 23, 2018, 9:57 a.m. | OK | Java 8 | TESTS | 90 | 233 | 0 | 2000 | |
38537054 | Golmol | E | May 22, 2018, 1:32 p.m. | OK | Java 8 | TESTS | 90 | 249 | 0 | 2000 | |
38515760 | Jeel_Vaishnav | E | May 21, 2018, 6:26 p.m. | OK | Java 8 | TESTS | 90 | 249 | 0 | 2000 | |
38571536 | umang._.panchal | E | May 23, 2018, 8:01 p.m. | OK | Java 8 | TESTS | 90 | 249 | 819200 | 2000 | |
46855301 | wadissimo | E | Dec. 10, 2018, 2:29 p.m. | OK | Java 8 | TESTS | 90 | 265 | 34713600 | 2000 | |
38523730 | og.kostya | E | May 22, 2018, 4:46 a.m. | OK | Mono C# | TESTS | 90 | 155 | 3481600 | 2000 | |
38538277 | wleung_bvg | E | May 22, 2018, 2:15 p.m. | OK | Mono C# | TESTS | 90 | 265 | 211148800 | 2000 | |
61714809 | vjudge4 | E | Oct. 2, 2019, 12:17 p.m. | OK | MS C++ | TESTS | 90 | 124 | 3993600 | 2000 | |
38626245 | AnniVivid | E | May 26, 2018, 7:02 a.m. | OK | MS C++ | TESTS | 90 | 140 | 3993600 | 2000 | |
57835203 | vjudge2 | E | July 27, 2019, 7:19 a.m. | OK | MS C++ | TESTS | 90 | 140 | 4505600 | 2000 | |
52154173 | vjudge2 | E | April 1, 2019, 12:48 p.m. | OK | MS C++ | TESTS | 90 | 155 | 4505600 | 2000 | |
57627794 | vjudge5 | E | July 24, 2019, 7:41 a.m. | OK | MS C++ | TESTS | 90 | 155 | 6041600 | 2000 | |
61694501 | vjudge4 | E | Oct. 2, 2019, 6:37 a.m. | OK | MS C++ | TESTS | 90 | 155 | 6041600 | 2000 | |
38567278 | MenOfPassion | E | May 23, 2018, 4:07 p.m. | OK | MS C++ | TESTS | 90 | 156 | 3993600 | 2000 | |
57623495 | vjudge4 | E | July 24, 2019, 6:04 a.m. | OK | MS C++ | TESTS | 90 | 156 | 4505600 | 2000 | |
61726206 | vjudge5 | E | Oct. 2, 2019, 3:32 p.m. | OK | MS C++ | TESTS | 90 | 171 | 6041600 | 2000 | |
57836333 | vjudge5 | E | July 27, 2019, 7:41 a.m. | OK | MS C++ | TESTS | 90 | 171 | 6553600 | 2000 | |
57626459 | vjudge3 | E | July 24, 2019, 7:12 a.m. | OK | MS C++ 2017 | TESTS | 90 | 234 | 6041600 | 2000 | |
57829187 | vjudge1 | E | July 27, 2019, 5:20 a.m. | OK | MS C++ 2017 | TESTS | 90 | 249 | 6041600 | 2000 | |
61728053 | vjudge3 | E | Oct. 2, 2019, 4 p.m. | OK | MS C++ 2017 | TESTS | 90 | 483 | 2560000 | 2000 | |
39883151 | secondwtq | E | July 3, 2018, 4:04 a.m. | OK | Ocaml | TESTS | 90 | 623 | 11366400 | 2000 | |
39032136 | stas_sl | E | June 7, 2018, 9:52 p.m. | OK | PyPy 3 | TESTS | 90 | 654 | 54374400 | 2000 | |
39032089 | stas_sl | E | June 7, 2018, 9:48 p.m. | OK | PyPy 3 | TESTS | 90 | 654 | 54476800 | 2000 | |
39032175 | stas_sl | E | June 7, 2018, 9:55 p.m. | OK | PyPy 3 | TESTS | 90 | 670 | 54374400 | 2000 | |
57783729 | artifexbm | E | July 26, 2019, 6:58 a.m. | OK | PyPy 3 | TESTS | 90 | 920 | 46796800 | 2000 | |
38525311 | Ali_Pi | E | May 22, 2018, 6:20 a.m. | OK | Python 2 | TESTS | 90 | 1294 | 27136000 | 2000 | |
38710948 | orailly | E | May 29, 2018, 6:34 a.m. | OK | Python 3 | TESTS | 90 | 530 | 35225600 | 2000 | |
38608352 | Korrah | E | May 25, 2018, 12:10 p.m. | OK | Python 3 | TESTS | 90 | 561 | 35532800 | 2000 | |
38610683 | Korrah | E | May 25, 2018, 1:37 p.m. | OK | Python 3 | TESTS | 90 | 1294 | 35532800 | 2000 | |
38610334 | Korrah | E | May 25, 2018, 1:24 p.m. | OK | Python 3 | TESTS | 90 | 1356 | 35225600 | 2000 | |
38590192 | MartiBook | E | May 24, 2018, 2:58 p.m. | OK | Python 3 | TESTS | 90 | 1388 | 36761600 | 2000 | |
38745385 | tchizh | E | May 29, 2018, 5:01 p.m. | OK | Python 3 | TESTS | 90 | 1450 | 35123200 | 2000 | |
38588895 | MartiBook | E | May 24, 2018, 2:05 p.m. | OK | Python 3 | TESTS | 90 | 1528 | 36147200 | 2000 | |
38519316 | pyrus | E | May 21, 2018, 10:20 p.m. | OK | Python 3 | TESTS | 90 | 1621 | 35532800 | 2000 | |
39259717 | CountZero | E | June 15, 2018, 7:11 a.m. | OK | Rust | TESTS | 90 | 93 | 13107200 | 2000 | |
38963910 | FalseMirror | E | June 5, 2018, 8:46 a.m. | OK | Rust | TESTS | 90 | 342 | 10956800 | 2000 | |
38963704 | FalseMirror | E | June 5, 2018, 8:38 a.m. | OK | Rust | TESTS | 90 | 343 | 10956800 | 2000 |
Back to search problems