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 |
---|---|---|---|---|---|---|
1415 | Technocup 2021 - Elimination Round 2 | FINISHED | False | 7200 | 125189699 | Nov. 29, 2020, 7:05 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 2742 ) | E | New Game Plus! | PROGRAMMING | constructive algorithms greedy math |
B"Wabbit is playing a game with n bosses numbered from 1 to n . The bosses can be fought in any order. Each boss needs to be defeated exactly once. There is a parameter called boss bonus which is initially 0 . When the i -th boss is defeated, the current boss bonus is added to Wabbit's score, and then the value of the boss bonus increases by the point increment c_i . Note that c_i can be negative, which means that other bosses now give fewer points. However, Wabbit has found a glitch in the game. At any point in time, he can reset the playthrough and start a New Game Plus playthrough. This will set the current boss bonus to 0 , while all defeated bosses remain defeated. The current score is also saved and does not reset to zero after this operation. This glitch can be used at most k times. He can reset after defeating any number of bosses (including before or after defeating all of them), and he also can reset the game several times in a row without defeating any boss. Help Wabbit determine the maximum score he can obtain if he has to defeat all n bosses. The first line of input contains two spaced integers n and k ( 1 <= q n <= q 5 cdot 10^5 , 0 <= q k <= q 5 cdot 10^5 ), representing the number of bosses and the number of resets allowed. The next line of input contains n spaced integers c_1,c_2, ldots,c_n ( -10^6 <= q c_i <= q 10^6 ), the point increments of the n bosses. Output a single integer, the maximum score Wabbit can obtain by defeating all n bosses (this value may be negative). In the first test case, no resets are allowed. An optimal sequence of fights would be Thus the answer for the first test case is 0+1+2=3 . In the second test case, it can be shown that one possible optimal sequence of fights is Hence the answer for the second test case is 0+5+4+2+0=11 . "... |
Editorial of Codeforces Round 687 (Technocup 2021 — Elimitation Round 2) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
99953592 | GSHgsh | E | Nov. 30, 2020, 5:04 a.m. | OK | GNU C++11 | TESTS | 90 | 124 | 8294400 | ||
99903943 | syfakioi | E | Nov. 29, 2020, 12:48 p.m. | OK | GNU C++11 | TESTS | 90 | 171 | 10342400 | ||
99936858 | yadavsa | E | Nov. 29, 2020, 8:31 p.m. | OK | GNU C++14 | TESTS | 90 | 202 | 3993600 | ||
99879205 | _-- | E | Nov. 29, 2020, 8:37 a.m. | OK | GNU C++14 | TESTS | 90 | 218 | 10342400 | ||
99858510 | Kirill22 | E | Nov. 29, 2020, 7:39 a.m. | OK | GNU C++14 | TESTS | 90 | 233 | 3993600 | ||
99896544 | h4rdlyfunc710n4l | E | Nov. 29, 2020, 11:09 a.m. | OK | GNU C++14 | TESTS | 90 | 780 | 3993600 | ||
99901742 | Mr.Terranor | E | Nov. 29, 2020, 12:20 p.m. | OK | GNU C++17 | TESTS | 90 | 186 | 6348800 | ||
99878175 | ne4eHbKa | E | Nov. 29, 2020, 8:34 a.m. | OK | GNU C++17 | TESTS | 90 | 202 | 2048000 | ||
99948483 | yhn540671670 | E | Nov. 30, 2020, 2:45 a.m. | OK | GNU C++17 | TESTS | 90 | 202 | 5222400 | ||
99948054 | mTvTm | E | Nov. 30, 2020, 2:28 a.m. | OK | GNU C++17 | TESTS | 90 | 202 | 10342400 | ||
99890315 | IIeJlMeHb | E | Nov. 29, 2020, 10:01 a.m. | OK | GNU C++17 | TESTS | 90 | 202 | 13312000 | ||
99948178 | kym2006 | E | Nov. 30, 2020, 2:33 a.m. | OK | GNU C++17 | TESTS | 90 | 202 | 16076800 | ||
99906001 | two_sides | E | Nov. 29, 2020, 1:13 p.m. | OK | GNU C++17 | TESTS | 90 | 217 | 8396800 | ||
99932979 | topovik | E | Nov. 29, 2020, 6:52 p.m. | OK | GNU C++17 | TESTS | 90 | 218 | 7987200 | ||
99928323 | sanyam2248 | E | Nov. 29, 2020, 5:23 p.m. | OK | GNU C++17 | TESTS | 90 | 218 | 8396800 | ||
99920811 | Kabir_Ivan_5V | E | Nov. 29, 2020, 3:20 p.m. | OK | GNU C++17 | TESTS | 90 | 218 | 10342400 | ||
99920632 | vjudge3 | E | Nov. 29, 2020, 3:17 p.m. | OK | GNU C++17 (64) | TESTS | 90 | 93 | 20582400 | ||
99890915 | -lwl- | E | Nov. 29, 2020, 10:07 a.m. | OK | GNU C++17 (64) | TESTS | 90 | 140 | 7987200 | ||
99923900 | kaizen_ | E | Nov. 29, 2020, 4:06 p.m. | OK | GNU C++17 (64) | TESTS | 90 | 155 | 7987200 | ||
99946932 | generic_placeholder_name | E | Nov. 30, 2020, 1:44 a.m. | OK | GNU C++17 (64) | TESTS | 90 | 155 | 11366400 | ||
99956158 | L_I_Erq34 | E | Nov. 30, 2020, 6:03 a.m. | OK | GNU C++17 (64) | TESTS | 90 | 155 | 11468800 | ||
99918988 | Petr1Furious | E | Nov. 29, 2020, 2:56 p.m. | OK | GNU C++17 (64) | TESTS | 90 | 155 | 20070400 | ||
99889822 | Qwerty1232 | E | Nov. 29, 2020, 9:57 a.m. | OK | GNU C++17 (64) | TESTS | 90 | 155 | 20377600 | ||
99889161 | Qwerty1232 | E | Nov. 29, 2020, 9:53 a.m. | OK | GNU C++17 (64) | TESTS | 90 | 155 | 20377600 | ||
99889220 | egneeS | E | Nov. 29, 2020, 9:54 a.m. | OK | GNU C++17 (64) | TESTS | 90 | 156 | 10035200 | ||
99929096 | 74TrAkToR | E | Nov. 29, 2020, 5:38 p.m. | OK | GNU C++17 (64) | TESTS | 90 | 156 | 31948800 | ||
99920955 | kp_863 | E | Nov. 29, 2020, 3:21 p.m. | OK | Java 11 | TESTS | 90 | 670 | 29286400 | ||
99949293 | Java | E | Nov. 30, 2020, 3:16 a.m. | OK | Java 8 | TESTS | 90 | 467 | 21401600 | ||
99935016 | Megalitum | E | Nov. 29, 2020, 7:40 p.m. | OK | MS C++ 2017 | TESTS | 90 | 498 | 6041600 | ||
99897756 | Qwerty1232 | E | Nov. 29, 2020, 11:23 a.m. | OK | MS C++ 2017 | TESTS | 90 | 514 | 45056000 |
Back to search problems