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 |
---|---|---|---|---|---|---|
940 | Codeforces Round 466 (Div. 2) | FINISHED | False | 7200 | 212358299 | Feb. 24, 2018, 9:35 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 3779 ) | E | Cashback | PROGRAMMING | data structures dp greedy math | 2000 |
B'Since you are the best Wraith King, Nizhniy Magazin xc2 xabMir xc2 xbb at the centre of Vinnytsia is offering you a discount. You are given an array a of length n and an integer c. The value of some array b of length k is the sum of its elements except for the smallest. For example, the value of the array [3, xe2 x80 x891, xe2 x80 x896, xe2 x80 x895, xe2 x80 x892] with c xe2 x80 x89= xe2 x80 x892 is 3 xe2 x80 x89+ xe2 x80 x896 xe2 x80 x89+ xe2 x80 x895 xe2 x80 x89= xe2 x80 x8914. Among all possible partitions of a into contiguous subarrays output the smallest possible sum of the values of these subarrays. The first line contains integers n and c (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89c xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100 xe2 x80 x89000). The second line contains n integers ai (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- elements of a. Output a single integer -- the smallest possible sum of values of these subarrays of some partition of a. In the first example any partition yields 6 as the sum. In the second example one of the optimal partitions is [1, xe2 x80 x891], xe2 x80 x89[10, xe2 x80 x8910, xe2 x80 x8910, xe2 x80 x8910, xe2 x80 x8910, xe2 x80 x8910, xe2 x80 x899, xe2 x80 x8910, xe2 x80 x8910, xe2 x80 x8910] with the values 2 and 90 respectively. In the third example one of the optimal partitions is [2, xe2 x80 x893], xe2 x80 x89[6, xe2 x80 x894, xe2 x80 x895, xe2 x80 x897], xe2 x80 x89[1] with the values 3, 13 and 1 respectively. In the fourth example one of the optimal partitions is [1], xe2 x80 x89[3, xe2 x80 x894, xe2 x80 x895, xe2 x80 x895, xe2 x80 x893, xe2 x80 x894], xe2 x80 x89[1] with the values 1, 21 and 1 respectively. '... |
[Editorial] Codeforces Round #466 (Div. 2) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
35677233 | Lyrancel | E | Feb. 25, 2018, 11:37 a.m. | OK | GNU C++ | TESTS | 56 | 15 | 4505600 | 2000 | |
35642421 | functionendless | E | Feb. 24, 2018, 11:32 a.m. | OK | GNU C++ | TESTS | 56 | 15 | 5324800 | 2000 | |
35677557 | sweet_love | E | Feb. 25, 2018, 11:46 a.m. | OK | GNU C++ | TESTS | 56 | 15 | 6041600 | 2000 | |
35637693 | lqz | E | Feb. 24, 2018, 10:55 a.m. | OK | GNU C++ | TESTS | 56 | 15 | 26112000 | 2000 | |
35641567 | Coding__Farmer | E | Feb. 24, 2018, 11:26 a.m. | OK | GNU C++ | TESTS | 56 | 15 | 34099200 | 2000 | |
35889422 | prayerhgq | E | March 3, 2018, 2:39 p.m. | OK | GNU C++ | TESTS | 56 | 30 | 3788800 | 2000 | |
35667672 | EnjoyCallen | E | Feb. 25, 2018, 4:16 a.m. | OK | GNU C++ | TESTS | 56 | 30 | 4915200 | 2000 | |
35993934 | Samle | E | March 6, 2018, 1:56 p.m. | OK | GNU C++ | TESTS | 56 | 30 | 5632000 | 2000 | |
35647655 | qkoqhh | E | Feb. 24, 2018, 2:05 p.m. | OK | GNU C++ | TESTS | 56 | 30 | 7782400 | 2000 | |
35786631 | HN-001 | E | Feb. 28, 2018, 1:50 p.m. | OK | GNU C++ | TESTS | 56 | 30 | 17100800 | 2000 | |
35656378 | wang9897 | E | Feb. 24, 2018, 6:06 p.m. | OK | GNU C++11 | TESTS | 56 | 15 | 5324800 | 2000 | |
35643335 | zhouyuheng | E | Feb. 24, 2018, 12:25 p.m. | OK | GNU C++11 | TESTS | 56 | 15 | 25292800 | 2000 | |
63062177 | maxc3721 | E | Oct. 21, 2019, 9:09 a.m. | OK | GNU C++11 | TESTS | 56 | 30 | 3072000 | 2000 | |
35742096 | yancouto | E | Feb. 26, 2018, 6:39 p.m. | OK | GNU C++11 | TESTS | 56 | 30 | 7577600 | 2000 | |
35648121 | vjudge1 | E | Feb. 24, 2018, 2:17 p.m. | OK | GNU C++11 | TESTS | 56 | 30 | 12185600 | 2000 | |
56250733 | Frame233 | E | June 29, 2019, 2:53 a.m. | OK | GNU C++11 | TESTS | 56 | 31 | 1433600 | 2000 | |
56250721 | Frame233 | E | June 29, 2019, 2:52 a.m. | OK | GNU C++11 | TESTS | 56 | 31 | 1433600 | 2000 | |
63760309 | asuldb | E | Oct. 30, 2019, 3:14 a.m. | OK | GNU C++11 | TESTS | 56 | 31 | 1638400 | 2000 | |
49316926 | 07_2018 | E | Feb. 1, 2019, 10:16 a.m. | OK | GNU C++11 | TESTS | 56 | 31 | 1638400 | 2000 | |
63993411 | luogu_bot3 | E | Nov. 1, 2019, 1:50 p.m. | OK | GNU C++11 | TESTS | 56 | 31 | 2048000 | 2000 | |
35654330 | Jaihk662 | E | Feb. 24, 2018, 5:07 p.m. | OK | GNU C++14 | TESTS | 56 | 31 | 3481600 | 2000 | |
35742272 | shanin | E | Feb. 26, 2018, 6:46 p.m. | OK | GNU C++14 | TESTS | 56 | 31 | 3686400 | 2000 | |
35643220 | lwqqq | E | Feb. 24, 2018, 12:23 p.m. | OK | GNU C++14 | TESTS | 56 | 31 | 3993600 | 2000 | |
35924411 | krijgertje | E | March 4, 2018, 1:38 p.m. | OK | GNU C++14 | TESTS | 56 | 31 | 4300800 | 2000 | |
35738404 | TadijaSebez | E | Feb. 26, 2018, 4:25 p.m. | OK | GNU C++14 | TESTS | 56 | 31 | 4403200 | 2000 | |
60486815 | Jeffrey | E | Sept. 13, 2019, 12:56 p.m. | OK | GNU C++14 | TESTS | 56 | 46 | 2048000 | 2000 | |
58816489 | xuzihao | E | Aug. 14, 2019, 12:40 p.m. | OK | GNU C++14 | TESTS | 56 | 46 | 2457600 | 2000 | |
55661009 | osmanorhan | E | June 16, 2019, 9:03 p.m. | OK | GNU C++14 | TESTS | 56 | 46 | 2457600 | 2000 | |
39236581 | justBruteForce | E | June 14, 2018, 8:46 a.m. | OK | GNU C++14 | TESTS | 56 | 46 | 2662400 | 2000 | |
49311185 | vjudge4 | E | Feb. 1, 2019, 8:01 a.m. | OK | GNU C++14 | TESTS | 56 | 46 | 2764800 | 2000 | |
36088900 | rhs0266 | E | March 9, 2018, 6:39 a.m. | OK | GNU C++17 | TESTS | 56 | 31 | 3993600 | 2000 | |
35666239 | atomzeno | E | Feb. 25, 2018, 2:25 a.m. | OK | GNU C++17 | TESTS | 56 | 31 | 4710400 | 2000 | |
66502794 | the_hyp0cr1t3 | E | Dec. 8, 2019, 1:12 p.m. | OK | GNU C++17 | TESTS | 56 | 46 | 1126400 | 2000 | |
38707261 | Benq | E | May 29, 2018, 1:52 a.m. | OK | GNU C++17 | TESTS | 56 | 46 | 1126400 | 2000 | |
69296469 | sash0 | E | Jan. 22, 2020, 12:23 p.m. | OK | GNU C++17 | TESTS | 56 | 46 | 1536000 | 2000 | |
40896509 | Narut | E | July 28, 2018, 8:18 p.m. | OK | GNU C++17 | TESTS | 56 | 46 | 1536000 | 2000 | |
60434005 | anctartica | E | Sept. 12, 2019, 10:14 a.m. | OK | GNU C++17 | TESTS | 56 | 46 | 1945600 | 2000 | |
58365572 | 2005lz | E | Aug. 6, 2019, 3:35 a.m. | OK | GNU C++17 | TESTS | 56 | 46 | 2355200 | 2000 | |
60815779 | LeiviniaBirdway | E | Sept. 18, 2019, 8:12 p.m. | OK | GNU C++17 | TESTS | 56 | 46 | 3072000 | 2000 | |
61900812 | vjudge2 | E | Oct. 5, 2019, 8:31 a.m. | OK | GNU C++17 | TESTS | 56 | 46 | 3686400 | 2000 | |
66209895 | its_aks_ulure | E | Dec. 3, 2019, 6:06 a.m. | OK | Java 11 | TESTS | 56 | 218 | 0 | 2000 | |
66558080 | jakejase2 | E | Dec. 9, 2019, 5:41 p.m. | OK | Java 8 | TESTS | 56 | 140 | 0 | 2000 | |
36061514 | dalt | E | March 8, 2018, 5:36 a.m. | OK | Java 8 | TESTS | 56 | 140 | 20684800 | 2000 | |
49552913 | wadissimo | E | Feb. 7, 2019, 7:29 a.m. | OK | Java 8 | TESTS | 56 | 155 | 0 | 2000 | |
35657022 | Taran_1407 | E | Feb. 24, 2018, 6:28 p.m. | OK | Java 8 | TESTS | 56 | 155 | 24985600 | 2000 | |
36894035 | donli | E | April 3, 2018, 6:06 a.m. | OK | Java 8 | TESTS | 56 | 156 | 20889600 | 2000 | |
35676552 | apurvaj | E | Feb. 25, 2018, 11:13 a.m. | OK | Java 8 | TESTS | 56 | 170 | 20684800 | 2000 | |
36893992 | donli | E | April 3, 2018, 6:03 a.m. | OK | Java 8 | TESTS | 56 | 170 | 20889600 | 2000 | |
42256370 | MaxHeap | E | Aug. 29, 2018, 9:39 p.m. | OK | Java 8 | TESTS | 56 | 171 | 5529600 | 2000 | |
35760815 | parth_15 | E | Feb. 27, 2018, 12:03 p.m. | OK | Java 8 | TESTS | 56 | 171 | 20684800 | 2000 | |
36314840 | sungodavi | E | March 16, 2018, 1:55 a.m. | OK | Java 8 | TESTS | 56 | 171 | 20787200 | 2000 | |
35769264 | vikaskushwaha9oct | E | Feb. 27, 2018, 4:36 p.m. | OK | Kotlin | TESTS | 56 | 374 | 29593600 | 2000 | |
38552687 | og.kostya | E | May 23, 2018, 6:14 a.m. | OK | Mono C# | TESTS | 56 | 78 | 3276800 | 2000 | |
41594599 | Mickey-snow | E | Aug. 14, 2018, 4:07 p.m. | OK | Mono C# | TESTS | 56 | 93 | 15155200 | 2000 | |
35826450 | Archery2000 | E | March 2, 2018, 6:06 a.m. | OK | MS C# | TESTS | 56 | 780 | 34816000 | 2000 | |
35826600 | Archery2000 | E | March 2, 2018, 6:13 a.m. | OK | MS C# | TESTS | 56 | 795 | 34713600 | 2000 | |
62557279 | vjudge5 | E | Oct. 14, 2019, 10:59 a.m. | OK | MS C++ | TESTS | 56 | 62 | 2867200 | 2000 | |
35917676 | Nightmare_n | E | March 4, 2018, 11:13 a.m. | OK | MS C++ | TESTS | 56 | 62 | 6451200 | 2000 | |
35686270 | vjudge4 | E | Feb. 25, 2018, 3:56 p.m. | OK | MS C++ | TESTS | 56 | 62 | 6860800 | 2000 | |
35643652 | MenOfPassion | E | Feb. 24, 2018, 12:32 p.m. | OK | MS C++ | TESTS | 56 | 62 | 7270400 | 2000 | |
57915523 | vjudge3 | E | July 29, 2019, 12:56 a.m. | OK | MS C++ | TESTS | 56 | 62 | 13209600 | 2000 | |
36432681 | vjudge2 | E | March 20, 2018, 12:39 p.m. | OK | MS C++ | TESTS | 56 | 77 | 21196800 | 2000 | |
38414249 | vjudge2 | E | May 19, 2018, 2 a.m. | OK | MS C++ | TESTS | 56 | 78 | 23244800 | 2000 | |
35765949 | gerind | E | Feb. 27, 2018, 2:41 p.m. | OK | MS C++ | TESTS | 56 | 93 | 5939200 | 2000 | |
35683463 | SingleZombie | E | Feb. 25, 2018, 2:36 p.m. | OK | MS C++ | TESTS | 56 | 124 | 7680000 | 2000 | |
48675523 | vjudge2 | E | Jan. 21, 2019, 11:19 a.m. | OK | MS C++ | TESTS | 56 | 139 | 6451200 | 2000 | |
61836933 | vjudge2 | E | Oct. 4, 2019, 8:19 a.m. | OK | MS C++ 2017 | TESTS | 56 | 93 | 6451200 | 2000 | |
59891986 | lokolo | E | Sept. 2, 2019, 10:46 a.m. | OK | MS C++ 2017 | TESTS | 56 | 140 | 5632000 | 2000 | |
37265271 | Savit_Gupta | E | April 13, 2018, 5:35 a.m. | OK | PyPy 2 | TESTS | 56 | 249 | 38400000 | 2000 | |
38979524 | Ali_Pi | E | June 5, 2018, 9:38 p.m. | OK | Python 2 | TESTS | 56 | 468 | 12390400 | 2000 | |
35865893 | culring | E | March 3, 2018, 1:18 a.m. | OK | Python 3 | TESTS | 56 | 373 | 18022400 | 2000 | |
35865915 | culring | E | March 3, 2018, 1:19 a.m. | OK | Python 3 | TESTS | 56 | 374 | 18022400 | 2000 | |
35650481 | jiangshibiao | E | Feb. 24, 2018, 3:22 p.m. | OK | Python 3 | TESTS | 56 | 405 | 17305600 | 2000 | |
39432345 | yugle7 | E | June 20, 2018, 10 a.m. | OK | Python 3 | TESTS | 56 | 420 | 13619200 | 2000 | |
35783089 | s_p | E | Feb. 28, 2018, 11:52 a.m. | OK | Python 3 | TESTS | 56 | 436 | 18432000 | 2000 | |
37289335 | liskovets.borets | E | April 13, 2018, 3:13 p.m. | OK | Python 3 | TESTS | 56 | 452 | 20172800 | 2000 | |
35924560 | Hillmouse | E | March 4, 2018, 1:44 p.m. | OK | Rust | TESTS | 56 | 46 | 4915200 | 2000 | |
40232423 | vain0 | E | July 12, 2018, 12:49 p.m. | OK | Rust | TESTS | 56 | 62 | 5529600 | 2000 | |
36300270 | FalseMirror | E | March 15, 2018, 12:55 p.m. | OK | Rust | TESTS | 56 | 77 | 4608000 | 2000 | |
35641042 | ASoboll | E | Feb. 24, 2018, 11:22 a.m. | OK | Scala | TESTS | 56 | 748 | 47820800 | 2000 | |
36040920 | nik-in-au | E | March 7, 2018, 11:02 a.m. | OK | Scala | TESTS | 56 | 920 | 57139200 | 2000 |
Back to search problems