Codeforces Round 782 (Div. 2)

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
1659 Codeforces Round 782 (Div. 2) FINISHED False 8100 87060263 April 17, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 11061 ) C Line Empire PROGRAMMING dp greedy implementation math

B'You are an ambitious king who wants to be the Emperor of The Reals. But to do that, you must first become Emperor of The Integers. Consider a number axis. The capital of your empire is initially at 0 . There are n unconquered kingdoms at positions 0<x_1<x_2< ldots<x_n . You want to conquer all other kingdoms. There are two actions available to you: Note that you cannot place the capital at a point without a kingdom. In other words, at any point, your capital can only be at 0 or one of x_1,x_2, ldots,x_n . Also note that conquering a kingdom does not change the position of your capital. Find the minimum total cost to conquer all kingdoms. Your capital can be anywhere at the end. The first line contains a single integer t ( 1 <= t <= 1000 ) -- the number of test cases. The description of each test case follows. The first line of each test case contains 3 integers n , a , and b ( 1 <= q n <= q 2 cdot 10^5 ; 1 <= q a,b <= q 10^5 ). The second line of each test case contains n integers x_1, x_2, ldots, x_n ( 1 <= q x_1 < x_2 < ldots < x_n <= q 10^8 ). The sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, output a single integer -- the minimum cost to conquer all kingdoms. Here is an optimal sequence of moves for the second test case: The total cost is 3+6+12+24+3+48+75=171 . You cannot get a lower cost than this. '...

Tutorials

Codeforces Round #782 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
153931211 ruban C April 17, 2022, 4:19 p.m. OK Delphi TESTS 49 77 9728000
153959969 Clock_Paradox C April 18, 2022, 1:09 a.m. OK FPC TESTS 49 889 4915200
153929240 rainboy C April 17, 2022, 4:11 p.m. OK GNU C11 TESTS 49 61 819200
153934776 YOK C April 17, 2022, 4:34 p.m. OK GNU C11 TESTS 49 61 3174400
153943167 keutoi C April 17, 2022, 5:59 p.m. OK GNU C11 TESTS 49 61 3993600
153927978 mucamaca C April 17, 2022, 4:06 p.m. OK GNU C11 TESTS 49 62 16076800
153924119 AstralLing C April 17, 2022, 3:52 p.m. OK GNU C++14 TESTS 49 31 6963200
153955474 forest C April 17, 2022, 10:23 p.m. OK GNU C++14 TESTS 49 62 0
153936581 malchik_v_balenciaga C April 17, 2022, 4:42 p.m. OK GNU C++14 TESTS 49 62 819200
153931504 BlackPanther112358 C April 17, 2022, 4:20 p.m. OK GNU C++14 TESTS 49 62 819200
153929022 Kkskr C April 17, 2022, 4:10 p.m. OK GNU C++14 TESTS 49 62 819200
153927046 wqy2022 C April 17, 2022, 4:03 p.m. OK GNU C++14 TESTS 49 62 819200
153940880 Cu_OH_2 C April 17, 2022, 5:29 p.m. OK GNU C++14 TESTS 49 62 819200
153965078 kitsunehivern C April 18, 2022, 3:42 a.m. OK GNU C++14 TESTS 49 62 819200
153967197 complacent C April 18, 2022, 4:32 a.m. OK GNU C++14 TESTS 49 62 819200
153937008 Civilized_animal C April 17, 2022, 4:44 p.m. OK GNU C++14 TESTS 49 62 1024000
153929745 UpvoteMonogon C April 17, 2022, 4:13 p.m. OK GNU C++17 TESTS 49 30 6963200
153926612 zhaming C April 17, 2022, 4:01 p.m. OK GNU C++17 TESTS 49 46 1536000
153927370 lrb666 C April 17, 2022, 4:04 p.m. OK GNU C++17 TESTS 49 46 6451200
153936048 windy7926778 C April 17, 2022, 4:40 p.m. OK GNU C++17 TESTS 49 61 1536000
153945816 lrnfreek C April 17, 2022, 6:43 p.m. OK GNU C++17 TESTS 49 62 0
153946554 yazan_istatiyeh C April 17, 2022, 6:57 p.m. OK GNU C++17 TESTS 49 62 0
153957312 lkh3happy C April 17, 2022, 11:29 p.m. OK GNU C++17 TESTS 49 62 0
153960434 Leonardo_su C April 18, 2022, 1:27 a.m. OK GNU C++17 TESTS 49 62 819200
153968554 wifiiii C April 18, 2022, 4:55 a.m. OK GNU C++17 TESTS 49 62 819200
153963318 JIl_05 C April 18, 2022, 2:55 a.m. OK GNU C++17 TESTS 49 62 819200
153934618 ganapati_biswas C April 17, 2022, 4:33 p.m. OK GNU C++17 (64) TESTS 49 46 819200
153926023 shadow_noxx C April 17, 2022, 3:59 p.m. OK GNU C++17 (64) TESTS 49 46 819200
153954571 xprezzzboi C April 17, 2022, 9:53 p.m. OK GNU C++17 (64) TESTS 49 46 819200
153927526 prachi237 C April 17, 2022, 4:05 p.m. OK GNU C++17 (64) TESTS 49 46 1024000
153964272 bunny1024 C April 18, 2022, 3:21 a.m. OK GNU C++17 (64) TESTS 49 46 1638400
153969248 urBCI C April 18, 2022, 5:09 a.m. OK GNU C++17 (64) TESTS 49 46 1638400
153965205 NinjaSenpai C April 18, 2022, 3:46 a.m. OK GNU C++17 (64) TESTS 49 46 1638400
153961238 Ray_Striker C April 18, 2022, 1:52 a.m. OK GNU C++17 (64) TESTS 49 46 1638400
153961156 Havoc_01 C April 18, 2022, 1:50 a.m. OK GNU C++17 (64) TESTS 49 46 1638400
153958252 gqf123 C April 18, 2022, 12:03 a.m. OK GNU C++17 (64) TESTS 49 46 1638400
153941438 ladno1 C April 17, 2022, 5:35 p.m. OK GNU C++20 (64) TESTS 49 31 0
153964834 YENGOYAN C April 18, 2022, 3:35 a.m. OK GNU C++20 (64) TESTS 49 31 819200
153961943 Ag.akhand29Dec C April 18, 2022, 2:15 a.m. OK GNU C++20 (64) TESTS 49 31 1638400
153961669 zanj0 C April 18, 2022, 2:06 a.m. OK GNU C++20 (64) TESTS 49 31 1638400
153943650 AniketDalal C April 17, 2022, 6:06 p.m. OK GNU C++20 (64) TESTS 49 31 1638400
153968071 liuxi7086 C April 18, 2022, 4:47 a.m. OK GNU C++20 (64) TESTS 49 31 1638400
153935140 kaush_orz C April 17, 2022, 4:35 p.m. OK GNU C++20 (64) TESTS 49 31 1638400
153969025 Chrosew-Liu C April 18, 2022, 5:04 a.m. OK GNU C++20 (64) TESTS 49 31 1638400
153940328 osource C April 17, 2022, 5:23 p.m. OK GNU C++20 (64) TESTS 49 31 1638400
153965933 yp0701201125 C April 18, 2022, 4:06 a.m. OK GNU C++20 (64) TESTS 49 31 1638400
153929556 not_good_enough_yet C April 17, 2022, 4:12 p.m. OK Go TESTS 49 155 3788800
153962056 koqo C April 18, 2022, 2:19 a.m. OK Go TESTS 49 156 3686400
153932369 LXL C April 17, 2022, 4:24 p.m. OK Go TESTS 49 171 3686400
153928154 kwangg C April 17, 2022, 4:07 p.m. OK Go TESTS 49 186 3686400
153949060 Amir_Coderest C April 17, 2022, 7:47 p.m. OK Java 11 TESTS 49 218 0
153945410 mayank.singh19 C April 17, 2022, 6:36 p.m. OK Java 11 TESTS 49 233 0
153940672 smlj C April 17, 2022, 5:26 p.m. OK Java 11 TESTS 49 233 0
153924310 mbfeci C April 17, 2022, 3:53 p.m. OK Java 11 TESTS 49 233 0
153965990 __Serendipity C April 18, 2022, 4:07 a.m. OK Java 11 TESTS 49 233 0
153960151 LongWalk C April 18, 2022, 1:17 a.m. OK Java 11 TESTS 49 233 0
153955698 MatthewRaker C April 17, 2022, 10:31 p.m. OK Java 11 TESTS 49 233 0
153928090 __Serendipity C April 17, 2022, 4:07 p.m. OK Java 11 TESTS 49 234 0
153968102 cdevadhar C April 18, 2022, 4:47 a.m. OK Java 11 TESTS 49 249 0
153955332 SAMAD_ C April 17, 2022, 10:18 p.m. OK Java 11 TESTS 49 249 0
153949449 ND_ C April 17, 2022, 7:55 p.m. OK Java 8 TESTS 49 109 0
153963027 ss804 C April 18, 2022, 2:47 a.m. OK Java 8 TESTS 49 124 0
153962242 chinmaya21 C April 18, 2022, 2:24 a.m. OK Java 8 TESTS 49 124 0
153953075 _spiralJava_ C April 17, 2022, 9:13 p.m. OK Java 8 TESTS 49 124 0
153932278 Yehia8 C April 17, 2022, 4:23 p.m. OK Java 8 TESTS 49 155 1843200
153936934 ziduoyi C April 17, 2022, 4:43 p.m. OK Java 8 TESTS 49 155 1945600
153952790 Daly105 C April 17, 2022, 9:07 p.m. OK Java 8 TESTS 49 155 2764800
153940221 MagentaCobra C April 17, 2022, 5:22 p.m. OK Java 8 TESTS 49 155 2764800
153930488 gssakash C April 17, 2022, 4:16 p.m. OK Java 8 TESTS 49 155 2969600
153933667 Eslam_Ahmed C April 17, 2022, 4:29 p.m. OK Java 8 TESTS 49 155 5427200
153936561 meinego C April 17, 2022, 4:42 p.m. OK Kotlin 1.4 TESTS 49 171 4403200
153936568 qsqnk C April 17, 2022, 4:42 p.m. OK Kotlin 1.4 TESTS 49 327 17920000
153948530 ktropin C April 17, 2022, 7:36 p.m. OK Mono C# TESTS 49 140 25907200
153931894 dogoeswoof C April 17, 2022, 4:22 p.m. OK MS C++ 2017 TESTS 49 171 2457600
153930078 dan.kormilin C April 17, 2022, 4:14 p.m. OK MS C++ 2017 TESTS 49 171 3174400
153938032 andrey_s C April 17, 2022, 4:48 p.m. OK MS C++ 2017 TESTS 49 187 1638400
153932264 De_nis C April 17, 2022, 4:23 p.m. OK MS C++ 2017 TESTS 49 187 1638400
153937256 kibastian C April 17, 2022, 4:45 p.m. OK MS C++ 2017 TESTS 49 187 11264000
153933240 MaksimLogic C April 17, 2022, 4:27 p.m. OK MS C++ 2017 TESTS 49 202 819200
153936598 incuiio C April 17, 2022, 4:42 p.m. OK MS C++ 2017 TESTS 49 218 1638400
153934409 DmtrPpl C April 17, 2022, 4:32 p.m. OK MS C++ 2017 TESTS 49 218 1638400
153962686 LuckyInaba14 C April 18, 2022, 2:38 a.m. OK MS C++ 2017 TESTS 49 234 3174400
153930205 saratcsss C April 17, 2022, 4:15 p.m. OK .NET Core C# TESTS 49 140 16998400
153936447 XYShaoKang C April 17, 2022, 4:41 p.m. OK Node.js TESTS 49 124 14643200
153928247 toxahak C April 17, 2022, 4:07 p.m. OK Node.js TESTS 49 280 25600000
153941156 1_2_3_4_5_9 C April 17, 2022, 5:32 p.m. OK PyPy 2 TESTS 49 187 14950400
153968770 abhijeet.panihar.cse20 C April 18, 2022, 4:59 a.m. OK PyPy 3 TESTS 49 218 18841600
153938268 tahuruzzoha C April 17, 2022, 4:48 p.m. OK PyPy 3 TESTS 49 248 17408000
153971465 del-user-774348 C April 18, 2022, 5:53 a.m. OK PyPy 3 TESTS 49 280 17612800
153945187 random__person C April 17, 2022, 6:31 p.m. OK PyPy 3 TESTS 49 295 24268800
153940164 ____Neo____ C April 17, 2022, 5:22 p.m. OK PyPy 3 TESTS 49 296 38092800
153955664 AbnerShen C April 17, 2022, 10:30 p.m. OK PyPy 3 TESTS 49 311 20070400
153932378 wizardrabbit C April 17, 2022, 4:24 p.m. OK PyPy 3 TESTS 49 343 15974400
153927753 Sovi_11 C April 17, 2022, 4:05 p.m. OK PyPy 3 TESTS 49 404 17203200
153928100 Greyhound C April 17, 2022, 4:07 p.m. OK PyPy 3 TESTS 49 405 19558400
153925769 _deva_ C April 17, 2022, 3:58 p.m. OK PyPy 3 TESTS 49 421 31232000
153930391 hritik3878 C April 17, 2022, 4:16 p.m. OK PyPy 3-64 TESTS 49 124 28364800
153949677 ossau_guildo C April 17, 2022, 8 p.m. OK PyPy 3-64 TESTS 49 124 32665600
153927794 beethoven97 C April 17, 2022, 4:06 p.m. OK PyPy 3-64 TESTS 49 140 24678400
153930936 sakshatmali C April 17, 2022, 4:18 p.m. OK PyPy 3-64 TESTS 49 140 24780800
153928930 Allless C April 17, 2022, 4:10 p.m. OK PyPy 3-64 TESTS 49 140 25395200
153964448 Nemisis2.O C April 18, 2022, 3:26 a.m. OK PyPy 3-64 TESTS 49 140 28364800
153965884 Mustela_Erminea C April 18, 2022, 4:04 a.m. OK PyPy 3-64 TESTS 49 233 28364800
153926730 wolfram_ C April 17, 2022, 4:01 p.m. OK PyPy 3-64 TESTS 49 264 28364800
153935627 unknownSolver C April 17, 2022, 4:38 p.m. OK PyPy 3-64 TESTS 49 280 27750400
153944059 hvbird C April 17, 2022, 6:12 p.m. OK PyPy 3-64 TESTS 49 280 28979200
153928625 mfeds C April 17, 2022, 4:09 p.m. OK Python 3 TESTS 49 295 15360000
153938142 samriddhjn C April 17, 2022, 4:48 p.m. OK Python 3 TESTS 49 296 14848000
153933586 wKai000 C April 17, 2022, 4:29 p.m. OK Python 3 TESTS 49 312 15769600
153934950 LGDDK C April 17, 2022, 4:34 p.m. OK Python 3 TESTS 49 326 15360000
153935945 Tanguyvans C April 17, 2022, 4:39 p.m. OK Python 3 TESTS 49 342 14848000
153937016 Orixin C April 17, 2022, 4:44 p.m. OK Python 3 TESTS 49 343 14950400
153963021 i_emerge16 C April 18, 2022, 2:47 a.m. OK Python 3 TESTS 49 358 14950400
153962814 i_emerge16 C April 18, 2022, 2:42 a.m. OK Python 3 TESTS 49 358 14950400
153931917 REDVED C April 17, 2022, 4:22 p.m. OK Python 3 TESTS 49 358 15769600
153927239 koder_786 C April 17, 2022, 4:03 p.m. OK Python 3 TESTS 49 389 14950400
153936201 RustyInCP C April 17, 2022, 4:40 p.m. OK Rust 2021 TESTS 49 31 4812800
153931185 Bisspector C April 17, 2022, 4:19 p.m. OK Rust 2021 TESTS 49 46 6553600
153931010 bqn C April 17, 2022, 4:18 p.m. OK Rust 2021 TESTS 49 46 7884800

remove filters

Back to search problems