Codeforces Round 622 (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
1313 Codeforces Round 622 (Div. 2) FINISHED False 7200 154731263 Feb. 23, 2020, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6623 ) C2 Skyscrapers (hard version) PROGRAMMING data structures dp greedy 1900

B'This is a harder version of the problem. In this version n <= 500 ,000 The outskirts of the capital are being actively built up in Berland. The company "Kernel Panic" manages the construction of a residential complex of skyscrapers in New Berlskva. All skyscrapers are built along the highway. It is known that the company has already bought n plots along the highway and is preparing to build n skyscrapers, one skyscraper per plot. Architects must consider several requirements when planning a skyscraper. Firstly, since the land on each plot has different properties, each skyscraper has a limit on the largest number of floors it can have. Secondly, according to the design code of the city, it is unacceptable for a skyscraper to simultaneously have higher skyscrapers both to the left and to the right of it. Formally, let 's number the plots from 1 to n . Then if the skyscraper on the i -th plot has a_i floors, it must hold that a_i is at most m_i ( 1 <= a_i <= m_i ). Also there mustn 't be integers j and k such that j < i < k and a_j > a_i < a_k . Plots j and k are not required to be adjacent to i . The company wants the total number of floors in the built skyscrapers to be as large as possible. Help it to choose the number of floors for each skyscraper in an optimal way, i.e. in such a way that all requirements are fulfilled, and among all such construction plans choose any plan with the maximum possible total number of floors. The first line contains a single integer n ( 1 <= q n <= q 500 ,000 ) -- the number of plots. The second line contains the integers m_1, m_2, ldots, m_n ( 1 <= q m_i <= q 10^9 ) -- the limit on the number of floors for every possible number of floors for a skyscraper on each plot. Print n integers a_i -- the number of floors in the plan for each skyscraper, such that all requirements are met, and the t'...

Tutorials

Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
71749334 vjudge2 C2 Feb. 24, 2020, 7:27 a.m. OK FPC TESTS 52 1637 10035200 1900
71857820 YOK C2 Feb. 25, 2020, 12:48 p.m. OK GNU C11 TESTS 52 2323 216473600 1900
71657182 pufanyi C2 Feb. 23, 2020, 9:18 a.m. OK GNU C++11 TESTS 52 77 14233600 1900
71902282 pufanyi C2 Feb. 26, 2020, 8:26 a.m. OK GNU C++11 TESTS 52 78 14233600 1900
71679854 chenyewei_1234 C2 Feb. 23, 2020, 10:43 a.m. OK GNU C++11 TESTS 52 78 16076800 1900
71678431 ljr1234 C2 Feb. 23, 2020, 10:37 a.m. OK GNU C++11 TESTS 52 92 16076800 1900
71697790 Sweetlemon C2 Feb. 23, 2020, 2:40 p.m. OK GNU C++11 TESTS 52 108 17817600 1900
71889627 Karry5307 C2 Feb. 26, 2020, 1:07 a.m. OK GNU C++11 TESTS 52 108 24064000 1900
71670225 crashed C2 Feb. 23, 2020, 10:05 a.m. OK GNU C++11 TESTS 52 109 13824000 1900
71748769 shuashuawan C2 Feb. 24, 2020, 7:13 a.m. OK GNU C++11 TESTS 52 109 14028800 1900
71914395 hkxadpall C2 Feb. 26, 2020, 12:48 p.m. OK GNU C++11 TESTS 52 109 28672000 1900
71691860 yuzhechuan C2 Feb. 23, 2020, 12:51 p.m. OK GNU C++11 TESTS 52 124 16281600 1900
71664928 KbMu C2 Feb. 23, 2020, 9:46 a.m. OK GNU C++14 TESTS 52 156 26009600 1900
71759687 sungjune222 C2 Feb. 24, 2020, 11:25 a.m. OK GNU C++14 TESTS 52 233 8089600 1900
71741031 pilipalapengpengca C2 Feb. 24, 2020, 3:22 a.m. OK GNU C++14 TESTS 52 233 12083200 1900
71660945 mateusz C2 Feb. 23, 2020, 9:31 a.m. OK GNU C++14 TESTS 52 233 12390400 1900
71963853 wangxy C2 Feb. 27, 2020, 9:55 a.m. OK GNU C++14 TESTS 52 233 14028800 1900
71739560 Ravanla C2 Feb. 24, 2020, 2:22 a.m. OK GNU C++14 TESTS 52 233 14336000 1900
71738744 tenglong C2 Feb. 24, 2020, 1:39 a.m. OK GNU C++14 TESTS 52 233 16076800 1900
71661092 scli_weapon C2 Feb. 23, 2020, 9:32 a.m. OK GNU C++14 TESTS 52 233 16076800 1900
71954050 supriyanta C2 Feb. 27, 2020, 6:25 a.m. OK GNU C++14 TESTS 52 233 16384000 1900
71654920 wucstdio C2 Feb. 23, 2020, 9:11 a.m. OK GNU C++14 TESTS 52 233 18022400 1900
71673127 Alphagocc C2 Feb. 23, 2020, 10:16 a.m. OK GNU C++17 TESTS 52 108 18534400 1900
71668726 Lgq_3de5 C2 Feb. 23, 2020, 10 a.m. OK GNU C++17 TESTS 52 233 12083200 1900
71749316 ftiasch C2 Feb. 24, 2020, 7:27 a.m. OK GNU C++17 TESTS 52 233 12083200 1900
71736725 0d1n C2 Feb. 23, 2020, 11:43 p.m. OK GNU C++17 TESTS 52 233 13209600 1900
71905817 CondorG C2 Feb. 26, 2020, 9:57 a.m. OK GNU C++17 TESTS 52 233 14028800 1900
71732452 ANAMiya.wanted C2 Feb. 23, 2020, 8:38 p.m. OK GNU C++17 TESTS 52 233 14028800 1900
71674901 YANGRUZHAO C2 Feb. 23, 2020, 10:23 a.m. OK GNU C++17 TESTS 52 233 14643200 1900
71700421 ANAMiya.wanted C2 Feb. 23, 2020, 3:29 p.m. OK GNU C++17 TESTS 52 233 14643200 1900
71739007 cxy004 C2 Feb. 24, 2020, 1:53 a.m. OK GNU C++17 TESTS 52 234 12083200 1900
71696748 Top_xiao C2 Feb. 23, 2020, 2:20 p.m. OK GNU C++17 TESTS 52 234 12390400 1900
71692230 Jughead C2 Feb. 23, 2020, 12:56 p.m. OK Go TESTS 52 312 18329600 1900
71678308 synapse C2 Feb. 23, 2020, 10:36 a.m. OK Go TESTS 52 529 21299200 1900
71684920 u1s1reallycai C2 Feb. 23, 2020, 11:02 a.m. OK Go TESTS 52 530 26112000 1900
71693531 synapse C2 Feb. 23, 2020, 1:20 p.m. OK Go TESTS 52 530 36147200 1900
71671363 ZeyadKhattab C2 Feb. 23, 2020, 10:09 a.m. OK Java 11 TESTS 52 732 39731200 1900
71689415 TheSawan C2 Feb. 23, 2020, 12:09 p.m. OK Java 11 TESTS 52 1512 86118400 1900
71675144 lightseba C2 Feb. 23, 2020, 10:23 a.m. OK Java 11 TESTS 52 2526 141926400 1900
71811423 xty123 C2 Feb. 24, 2020, 4:53 p.m. OK Java 11 TESTS 52 2760 40755200 1900
71829162 for_njxz2 C2 Feb. 25, 2020, 1:28 a.m. OK Java 11 TESTS 52 2761 40755200 1900
71739898 cwise C2 Feb. 24, 2020, 2:39 a.m. OK Java 8 TESTS 52 217 50278400 1900
71667572 nikolay.v.mikhaylov C2 Feb. 23, 2020, 9:55 a.m. OK Java 8 TESTS 52 327 68300800 1900
71859862 _apurv_ C2 Feb. 25, 2020, 1:18 p.m. OK Java 8 TESTS 52 373 49356800 1900
71683661 procrastinate7 C2 Feb. 23, 2020, 10:58 a.m. OK Java 8 TESTS 52 451 38912000 1900
71681133 saurabhs1206 C2 Feb. 23, 2020, 10:48 a.m. OK Java 8 TESTS 52 467 45158400 1900
71737249 bluesky111 C2 Feb. 24, 2020, 12:14 a.m. OK Java 8 TESTS 52 499 38502400 1900
71751477 In_The_Name_Of_Love C2 Feb. 24, 2020, 8:21 a.m. OK Java 8 TESTS 52 530 17203200 1900
71680884 brainfxxk C2 Feb. 23, 2020, 10:47 a.m. OK Java 8 TESTS 52 530 49459200 1900
71664110 BaZ_ C2 Feb. 23, 2020, 9:43 a.m. OK Java 8 TESTS 52 545 16793600 1900
71749471 KharYusuf C2 Feb. 24, 2020, 7:30 a.m. OK Java 8 TESTS 52 560 59289600 1900
71830463 Spheniscine C2 Feb. 25, 2020, 2:27 a.m. OK Kotlin TESTS 52 483 59904000 1900
71686892 SlavaG C2 Feb. 23, 2020, 11:34 a.m. OK Kotlin TESTS 52 732 69939200 1900
71670191 fatwizard2020 C2 Feb. 23, 2020, 10:05 a.m. OK Kotlin TESTS 52 1107 57446400 1900
71920574 seirion C2 Feb. 26, 2020, 2:39 p.m. OK Kotlin TESTS 52 1669 115712000 1900
71921054 seirion C2 Feb. 26, 2020, 2:48 p.m. OK Kotlin TESTS 52 1700 115814400 1900
71680691 sergmel C2 Feb. 23, 2020, 10:46 a.m. OK Mono C# TESTS 52 483 71987200 1900
71672012 riantkb C2 Feb. 23, 2020, 10:12 a.m. OK Mono C# TESTS 52 514 68505600 1900
71697338 tarattata1 C2 Feb. 23, 2020, 2:31 p.m. OK MS C++ TESTS 52 312 21913600 1900
71666303 songhaoran C2 Feb. 23, 2020, 9:51 a.m. OK MS C++ TESTS 52 374 50073600 1900
71669889 CrashMaster C2 Feb. 23, 2020, 10:04 a.m. OK MS C++ 2017 TESTS 52 327 15667200 1900
71741563 wjsrptmd C2 Feb. 24, 2020, 3:41 a.m. OK MS C++ 2017 TESTS 52 327 16076800 1900
71677129 anylonger C2 Feb. 23, 2020, 10:31 a.m. OK MS C++ 2017 TESTS 52 327 16076800 1900
71765960 LeeLdler C2 Feb. 24, 2020, 1:31 p.m. OK MS C++ 2017 TESTS 52 327 20070400 1900
71670226 pichulia C2 Feb. 23, 2020, 10:05 a.m. OK MS C++ 2017 TESTS 52 342 32051200 1900
71754621 bleafumb C2 Feb. 24, 2020, 9:30 a.m. OK MS C++ 2017 TESTS 52 358 72089600 1900
71738768 paradoxhzy C2 Feb. 24, 2020, 1:40 a.m. OK MS C++ 2017 TESTS 52 498 27136000 1900
71677811 vpike C2 Feb. 23, 2020, 10:34 a.m. OK MS C++ 2017 TESTS 52 608 27545600 1900
71831998 nonstopfor C2 Feb. 25, 2020, 3:28 a.m. OK MS C++ 2017 TESTS 52 764 19660800 1900
71833134 suun C2 Feb. 25, 2020, 4:08 a.m. OK MS C++ 2017 TESTS 52 764 23654400 1900
71699792 Pisces0311 C2 Feb. 23, 2020, 3:18 p.m. OK PyPy 3 TESTS 52 780 88985600 1900
71689422 tamato C2 Feb. 23, 2020, 12:09 p.m. OK PyPy 3 TESTS 52 1045 101171200 1900
71735946 codehi9020 C2 Feb. 23, 2020, 10:55 p.m. OK PyPy 3 TESTS 52 1279 132300800 1900
71697984 cho12 C2 Feb. 23, 2020, 2:44 p.m. OK PyPy 3 TESTS 52 1294 97996800 1900
71700363 Pisces0311 C2 Feb. 23, 2020, 3:28 p.m. OK PyPy 3 TESTS 52 1325 98816000 1900
71891904 a0976531005 C2 Feb. 26, 2020, 2:57 a.m. OK PyPy 3 TESTS 52 1357 92467200 1900
71738332 BarryFam C2 Feb. 24, 2020, 1:17 a.m. OK PyPy 3 TESTS 52 1357 105574400 1900
71676035 mudit C2 Feb. 23, 2020, 10:27 a.m. OK PyPy 3 TESTS 52 1465 124108800 1900
71686901 FireBird23 C2 Feb. 23, 2020, 11:34 a.m. OK PyPy 3 TESTS 52 1481 105164800 1900
71700310 nehan_der_thal C2 Feb. 23, 2020, 3:27 p.m. OK PyPy 3 TESTS 52 1482 131584000 1900
71699834 lsc36 C2 Feb. 23, 2020, 3:19 p.m. OK Python 3 TESTS 52 2418 94412800 1900
71756812 _nobody_ C2 Feb. 24, 2020, 10:18 a.m. OK Python 3 TESTS 52 2776 83353600 1900
71662447 Aphanasiy C2 Feb. 23, 2020, 9:37 a.m. OK Python 3 TESTS 52 2838 73318400 1900
71672867 sansen C2 Feb. 23, 2020, 10:15 a.m. OK Rust TESTS 52 218 45158400 1900
71758882 sansen C2 Feb. 24, 2020, 11:06 a.m. OK Rust TESTS 52 280 86220800 1900
71681684 terraformer C2 Feb. 23, 2020, 10:50 a.m. OK Rust TESTS 52 451 98918400 1900
71689163 togatoga C2 Feb. 23, 2020, 12:04 p.m. OK Rust TESTS 52 483 24883200 1900

remove filters

Back to search problems