Codeforces Round 855 (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
1800 Codeforces Round 855 (Div. 3) FINISHED False 8100 59498663 March 2, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 23343 ) C2 Powering the Hero (hard version) PROGRAMMING data structures greedy

B"This is a hard version of the problem. It differs from the easy one only by constraints on n and t . There is a deck of n cards, each of which is characterized by its power. There are two types of cards: You can do the following with the deck: Your task is to use such actions to gather an army with the maximum possible total power. The first line of input data contains single integer t ( 1 <= t <= 10^4 ) -- the number of test cases in the test. The first line of each test case contains one integer n ( 1 <= n <= 2 cdot 10^5 ) -- the number of cards in the deck. The second line of each test case contains n integers s_1, s_2, ... , s_n ( 0 <= s_i <= 10^9 ) -- card powers in top-down order. It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . Output t numbers, each of which is the answer to the corresponding test case -- the maximum possible total power of the army that can be achieved. In the first sample, you can take bonuses 1 and 2 . Both hero cards will receive 3 power. If you take all the bonuses, one of them will remain unused. In the second sample, the hero's card on top of the deck cannot be powered up, and the rest can be powered up with 2 and 3 bonuses and get 6 total power. In the fourth sample, you can take bonuses 1 , 2 , 3 , 5 and skip the bonus 6 , then the hero 4 will be enhanced with a bonus 3 by 5 , and the hero 7 with a bonus 5 by 4 . 4+5=9 . "...

Tutorials

Codeforces Round 855 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
195745377 mban259 C2 March 3, 2023, 1:22 a.m. OK C# 10 TESTS 19 93 17817600
195730982 absa1am C2 March 2, 2023, 8:26 p.m. OK C# 10 TESTS 9 124 16588800
195748571 bluemegane C2 March 3, 2023, 2:34 a.m. OK C# 8 TESTS 19 140 25292800
195747698 Awesome3.14 C2 March 3, 2023, 2:15 a.m. OK D TESTS 19 93 13619200
195741867 1435730 C2 March 3, 2023, midnight OK GNU C11 TESTS 11 78 819200
195711390 siam_ami C2 March 2, 2023, 5:34 p.m. OK GNU C++14 TESTS 9 46 1638400
195719014 hack41 C2 March 2, 2023, 6:30 p.m. OK GNU C++14 TESTS 9 46 1843200
195713218 abhiyodaya2002 C2 March 2, 2023, 5:47 p.m. OK GNU C++14 TESTS 9 46 3174400
195730465 jerseyguy C2 March 2, 2023, 8:19 p.m. OK GNU C++14 TESTS 9 46 3174400
195761673 kunalbabbar2843 C2 March 3, 2023, 5:51 a.m. OK GNU C++14 TESTS 19 61 2457600
195718406 datti C2 March 2, 2023, 6:25 p.m. OK GNU C++14 TESTS 9 61 3174400
195720069 Lunularia C2 March 2, 2023, 6:38 p.m. OK GNU C++14 TESTS 9 61 3174400
195756856 Mr_White_ C2 March 3, 2023, 4:53 a.m. OK GNU C++14 TESTS 19 62 1638400
195756159 pindersingh C2 March 3, 2023, 4:44 a.m. OK GNU C++14 TESTS 19 62 1638400
195761368 chy12321 C2 March 3, 2023, 5:47 a.m. OK GNU C++14 TESTS 19 62 1638400
195721538 tamyte C2 March 2, 2023, 6:51 p.m. OK GNU C++17 TESTS 9 46 1126400
195711234 nvr_give_up C2 March 2, 2023, 5:33 p.m. OK GNU C++17 TESTS 9 46 1126400
195734296 PookiePoo C2 March 2, 2023, 9:12 p.m. OK GNU C++17 TESTS 9 46 1126400
195720374 mehedi-hasan-shakil C2 March 2, 2023, 6:40 p.m. OK GNU C++17 TESTS 9 46 1638400
195719386 arin_nigam C2 March 2, 2023, 6:33 p.m. OK GNU C++17 TESTS 9 46 1638400
195720946 20arnav C2 March 2, 2023, 6:45 p.m. OK GNU C++17 TESTS 9 46 1638400
195712153 manik_2021336 C2 March 2, 2023, 5:40 p.m. OK GNU C++17 TESTS 9 46 1843200
195709518 7oSkaaa C2 March 2, 2023, 5:23 p.m. OK GNU C++17 TESTS 9 46 1843200
195713526 Marckess C2 March 2, 2023, 5:49 p.m. OK GNU C++17 TESTS 9 46 1843200
195740818 LennartF22 C2 March 2, 2023, 11:32 p.m. OK GNU C++17 TESTS 11 46 2457600
195715123 Sakib62 C2 March 2, 2023, 6:01 p.m. OK GNU C++17 (64) TESTS 9 31 1126400
195737342 nitigyajoshi0901 C2 March 2, 2023, 10:12 p.m. OK GNU C++17 (64) TESTS 11 31 2150400
195716230 joao.breno.ro17 C2 March 2, 2023, 6:09 p.m. OK GNU C++17 (64) TESTS 9 46 1126400
195731457 ankancool C2 March 2, 2023, 8:32 p.m. OK GNU C++17 (64) TESTS 9 46 2048000
195730534 Agamenon C2 March 2, 2023, 8:20 p.m. OK GNU C++17 (64) TESTS 9 46 2048000
195726377 khanayaan7 C2 March 2, 2023, 7:36 p.m. OK GNU C++17 (64) TESTS 9 46 2969600
195738873 Xylenox C2 March 2, 2023, 10:45 p.m. OK GNU C++17 (64) TESTS 11 46 2969600
195744932 s7win99 C2 March 3, 2023, 1:12 a.m. OK GNU C++17 (64) TESTS 19 46 4198400
195754148 kayumov_muhammad C2 March 3, 2023, 4:14 a.m. OK GNU C++17 (64) TESTS 19 46 4198400
195752852 JustA7 C2 March 3, 2023, 3:50 a.m. OK GNU C++17 (64) TESTS 19 46 5017600
195709597 _SilenzioBruno_ C2 March 2, 2023, 5:23 p.m. OK GNU C++20 (64) TESTS 9 31 1126400
195712378 mcuadros C2 March 2, 2023, 5:41 p.m. OK GNU C++20 (64) TESTS 9 31 1126400
195735498 Amr.Khaled C2 March 2, 2023, 9:34 p.m. OK GNU C++20 (64) TESTS 9 31 1126400
195732398 AnasMaged C2 March 2, 2023, 8:44 p.m. OK GNU C++20 (64) TESTS 9 31 1126400
195726516 kolomig0r C2 March 2, 2023, 7:37 p.m. OK GNU C++20 (64) TESTS 9 31 1126400
195718324 JustJie C2 March 2, 2023, 6:24 p.m. OK GNU C++20 (64) TESTS 9 31 1126400
195714456 Derinkuyu C2 March 2, 2023, 5:56 p.m. OK GNU C++20 (64) TESTS 9 31 1126400
195710682 IshtiyakSezar C2 March 2, 2023, 5:30 p.m. OK GNU C++20 (64) TESTS 9 31 1126400
195709896 fxfxxxfxx C2 March 2, 2023, 5:25 p.m. OK GNU C++20 (64) TESTS 9 31 1126400
195734811 Aalaa_Moustafa C2 March 2, 2023, 9:21 p.m. OK GNU C++20 (64) TESTS 9 31 1843200
195744685 lordvidex C2 March 3, 2023, 1:07 a.m. OK Go TESTS 19 62 11878400
195730618 Hinnawi24 C2 March 2, 2023, 8:21 p.m. OK Java 11 TESTS 9 233 512000
195729389 pakkapapad C2 March 2, 2023, 8:07 p.m. OK Java 11 TESTS 9 249 0
195758031 __Serendipity C2 March 3, 2023, 5:07 a.m. OK Java 11 TESTS 19 249 921600
195725461 dzhi C2 March 2, 2023, 7:26 p.m. OK Java 11 TESTS 9 265 512000
195731489 gurkaran0209 C2 March 2, 2023, 8:32 p.m. OK Java 11 TESTS 9 452 0
195718585 ilasiawo C2 March 2, 2023, 6:26 p.m. OK Java 11 TESTS 9 468 0
195725267 Pranav3926 C2 March 2, 2023, 7:24 p.m. OK Java 11 TESTS 9 468 0
195730589 Srishti2002 C2 March 2, 2023, 8:21 p.m. OK Java 11 TESTS 9 483 0
195724844 Pranav3926 C2 March 2, 2023, 7:20 p.m. OK Java 11 TESTS 9 530 0
195733387 ahmedtawfik C2 March 2, 2023, 8:58 p.m. OK Java 17 TESTS 9 280 2252800
195720346 Black-Heart C2 March 2, 2023, 6:40 p.m. OK Java 17 TESTS 9 296 819200
195762139 gaurav_22 C2 March 3, 2023, 5:56 a.m. OK Java 17 TESTS 19 327 22835200
195747602 Mustela_Erminea C2 March 3, 2023, 2:13 a.m. OK Java 17 TESTS 19 498 6656000
195725488 notreallysure C2 March 2, 2023, 7:27 p.m. OK Java 17 TESTS 9 499 614400
195725223 Adar8604 C2 March 2, 2023, 7:24 p.m. OK Java 17 TESTS 9 499 5120000
195724011 sandeep_1507 C2 March 2, 2023, 7:12 p.m. OK Java 17 TESTS 9 546 614400
195750225 Abhilash81 C2 March 3, 2023, 3:03 a.m. OK Java 17 TESTS 19 546 1024000
195761826 goalboy C2 March 3, 2023, 5:52 a.m. OK Java 17 TESTS 19 561 921600
195719766 OsmanGoni C2 March 2, 2023, 6:36 p.m. OK Java 17 TESTS 9 561 921600
195719865 CodeNoob124 C2 March 2, 2023, 6:36 p.m. OK Java 8 TESTS 9 155 2764800
195710978 khan1121 C2 March 2, 2023, 5:32 p.m. OK Java 8 TESTS 9 187 2764800
195723835 Sylvester_ C2 March 2, 2023, 7:11 p.m. OK Java 8 TESTS 9 202 2764800
195723916 SooNoob C2 March 2, 2023, 7:12 p.m. OK Java 8 TESTS 9 202 2969600
195747867 cyclingle C2 March 3, 2023, 2:20 a.m. OK Java 8 TESTS 19 202 9932800
195710678 crudeCode C2 March 2, 2023, 5:30 p.m. OK Java 8 TESTS 9 202 13824000
195711717 toufique_husein C2 March 2, 2023, 5:37 p.m. OK Java 8 TESTS 9 374 0
195762417 Eunoiay C2 March 3, 2023, 5:59 a.m. OK Java 8 TESTS 19 405 0
195758337 aniket27 C2 March 3, 2023, 5:11 a.m. OK Java 8 TESTS 19 436 0
195752096 Priyanka1551 C2 March 3, 2023, 3:37 a.m. OK Java 8 TESTS 19 436 0
195737151 Kay0 C2 March 2, 2023, 10:08 p.m. OK Kotlin 1.6 TESTS 11 358 17203200
195719446 Galina_Basalova C2 March 2, 2023, 6:33 p.m. OK MS C++ 2017 TESTS 9 156 1433600
195758817 Yuki1536 C2 March 3, 2023, 5:17 a.m. OK MS C++ 2017 TESTS 19 218 4915200
195758552 Yuki1536 C2 March 3, 2023, 5:14 a.m. OK MS C++ 2017 TESTS 19 233 4915200
195725343 153floppa C2 March 2, 2023, 7:25 p.m. OK MS C++ 2017 TESTS 9 326 10956800
195748072 park6 C2 March 3, 2023, 2:24 a.m. OK PyPy 3 TESTS 19 374 159744000
195752156 IWantToBeNutellaSomeday C2 March 3, 2023, 3:38 a.m. OK PyPy 3 TESTS 19 561 19148800
195732444 ankitesh C2 March 2, 2023, 8:45 p.m. OK PyPy 3 TESTS 9 623 18124800
195754130 Youarenotgood C2 March 3, 2023, 4:14 a.m. OK PyPy 3-64 TESTS 19 155 30208000
195727047 smilence C2 March 2, 2023, 7:43 p.m. OK PyPy 3-64 TESTS 9 171 24166400
195726819 smilence C2 March 2, 2023, 7:40 p.m. OK PyPy 3-64 TESTS 9 171 24576000
195752329 The_MazeRunner C2 March 3, 2023, 3:41 a.m. OK PyPy 3-64 TESTS 19 171 35225600
195735839 voicon C2 March 2, 2023, 9:40 p.m. OK PyPy 3-64 TESTS 11 186 27852800
195746809 summertony717 C2 March 3, 2023, 1:54 a.m. OK PyPy 3-64 TESTS 19 202 25292800
195739722 crapcode C2 March 2, 2023, 11:04 p.m. OK PyPy 3-64 TESTS 11 202 27852800
195733706 FlakeLCR C2 March 2, 2023, 9:03 p.m. OK PyPy 3-64 TESTS 9 202 28979200
195735818 gardengnome C2 March 2, 2023, 9:40 p.m. OK PyPy 3-64 TESTS 11 217 28160000
195749573 InariInDream C2 March 3, 2023, 2:52 a.m. OK PyPy 3-64 TESTS 19 233 29388800
195760443 Lullabaly C2 March 3, 2023, 5:37 a.m. OK Python 3 TESTS 19 171 15667200
195720959 Rockey C2 March 2, 2023, 6:45 p.m. OK Python 3 TESTS 9 202 12492800
195723707 MasterKali C2 March 2, 2023, 7:10 p.m. OK Python 3 TESTS 9 202 14131200
195727935 Miryz C2 March 2, 2023, 7:51 p.m. OK Python 3 TESTS 9 217 12492800
195719820 Ismail03 C2 March 2, 2023, 6:36 p.m. OK Python 3 TESTS 9 217 14131200
195754557 Marquis03 C2 March 3, 2023, 4:20 a.m. OK Python 3 TESTS 19 217 15667200
195749503 arkinazi C2 March 3, 2023, 2:51 a.m. OK Python 3 TESTS 19 218 16486400
195726738 Miryz C2 March 2, 2023, 7:39 p.m. OK Python 3 TESTS 9 233 12492800
195726867 ganamopief C2 March 2, 2023, 7:41 p.m. OK Python 3 TESTS 9 233 14131200
195748387 sasivardhan3952 C2 March 3, 2023, 2:30 a.m. OK Python 3 TESTS 19 233 16486400
195721260 kenenisa C2 March 2, 2023, 6:48 p.m. OK Rust 2021 TESTS 9 108 8396800

remove filters

Back to search problems