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 |
1958
|
Kotlin Heroes: Episode 10 |
FINISHED |
False |
9000 |
21569063 |
May 13, 2024, 2:35 p.m. |
Problems
B"There is a staircase consisting of n steps. Each step is either intact, or broken. For each broken step, an integer a_i is given denoting the difficulty of repairing it. Every day, you can either: You want to repair all broken steps of the staircase, and you want to do it in the minimum possible number of days. What is the minimum total effort it will take to repair all broken steps in the minimum number of days? The first line contains one integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Each test case consists of two lines: Additional constraint on the input: the sum of values of n does not exceed 3 cdot 10^5 . For each test case, print one integer -- the minimum possible total effort it will take to repair all broken steps in the minimum number of days. In the first test case, you don't have to do anything. In the second test case, you can repair the 3 -rd and the 4 -th step during the first day, and the 2 -nd step during the second day. The total effort will be 2 cdot (15 + 8) + 13 = 59 . In the third test case, you can repair the 4 -th step during the first day, and two first steps during the second day. The total effort will be 8 + 2 cdot (13 + 15) = 64 . "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
260826859 |
sid9406 |
D |
May 13, 2024, 4 p.m. |
OK |
Kotlin 1.7 |
TESTS |
14 |
328 |
12390400 |
|
1600 |
260829888 |
amustafali |
D |
May 13, 2024, 4:22 p.m. |
OK |
Kotlin 1.7 |
TESTS |
14 |
468 |
48640000 |
|
1600 |
260922905 |
Sumitsingh7 |
D |
May 14, 2024, 12:10 p.m. |
OK |
Kotlin 1.7 |
TESTS |
14 |
514 |
71680000 |
|
1600 |
260816814 |
pashka |
D |
May 13, 2024, 2:51 p.m. |
OK |
Kotlin 1.7 |
TESTS |
14 |
515 |
81510400 |
|
1600 |
260818270 |
nguyenhoangminh318 |
D |
May 13, 2024, 2:59 p.m. |
OK |
Kotlin 1.7 |
TESTS |
14 |
530 |
49049600 |
|
1600 |
260824388 |
abusaeed2433 |
D |
May 13, 2024, 3:42 p.m. |
OK |
Kotlin 1.7 |
TESTS |
14 |
530 |
58777600 |
|
1600 |
260819035 |
MagentaCobra |
D |
May 13, 2024, 3:04 p.m. |
OK |
Kotlin 1.7 |
TESTS |
14 |
531 |
73830400 |
|
1600 |
260816179 |
Yu_212 |
D |
May 13, 2024, 2:47 p.m. |
OK |
Kotlin 1.7 |
TESTS |
14 |
546 |
70963200 |
|
1600 |
260816941 |
Fortin |
D |
May 13, 2024, 2:51 p.m. |
OK |
Kotlin 1.7 |
TESTS |
14 |
592 |
84172800 |
|
1600 |
260819339 |
tarbaytas |
D |
May 13, 2024, 3:06 p.m. |
OK |
Kotlin 1.7 |
TESTS |
14 |
608 |
77312000 |
|
1600 |
260818592 |
AHappyPotato |
D |
May 13, 2024, 3:01 p.m. |
OK |
Kotlin 1.9 |
TESTS |
14 |
186 |
0 |
|
1600 |
260817013 |
knightL |
D |
May 13, 2024, 2:52 p.m. |
OK |
Kotlin 1.9 |
TESTS |
14 |
187 |
0 |
|
1600 |
260819603 |
AkaiLemon |
D |
May 13, 2024, 3:07 p.m. |
OK |
Kotlin 1.9 |
TESTS |
14 |
187 |
102400 |
|
1600 |
260821362 |
_Fake4Fun |
D |
May 13, 2024, 3:20 p.m. |
OK |
Kotlin 1.9 |
TESTS |
14 |
202 |
0 |
|
1600 |
260828698 |
ramil.agger |
D |
May 13, 2024, 4:13 p.m. |
OK |
Kotlin 1.9 |
TESTS |
14 |
218 |
13926400 |
|
1600 |
260819160 |
cjtoribio |
D |
May 13, 2024, 3:05 p.m. |
OK |
Kotlin 1.9 |
TESTS |
14 |
234 |
0 |
|
1600 |
260817119 |
thenymphsofdelphi |
D |
May 13, 2024, 2:52 p.m. |
OK |
Kotlin 1.9 |
TESTS |
14 |
234 |
0 |
|
1600 |
260815411 |
arvindf232 |
D |
May 13, 2024, 2:43 p.m. |
OK |
Kotlin 1.9 |
TESTS |
14 |
249 |
1228800 |
|
1600 |
260823454 |
jvmusin |
D |
May 13, 2024, 3:35 p.m. |
OK |
Kotlin 1.9 |
TESTS |
14 |
249 |
13926400 |
|
1600 |
260817458 |
errorgorn |
D |
May 13, 2024, 2:54 p.m. |
OK |
Kotlin 1.9 |
TESTS |
14 |
249 |
14131200 |
|
1600 |
remove filters
Back to search problems