Codeforces Round 814 (Div. 1)

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
1718 Codeforces Round 814 (Div. 1) FINISHED False 7200 76519463 Aug. 16, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5400 ) A2 Burenka and Traditions (hard version) PROGRAMMING data structures dp greedy math two pointers

B'This is the hard version of this problem. The difference between easy and hard versions is only the constraints on a_i and on n . You can make hacks only if both versions of the problem are solved. Burenka is the crown princess of Buryatia, and soon she will become the n -th queen of the country. There is an ancient tradition in Buryatia -- before the coronation, the ruler must show their strength to the inhabitants. To determine the strength of the n -th ruler, the inhabitants of the country give them an array of a of exactly n numbers, after which the ruler must turn all the elements of the array into zeros in the shortest time. The ruler can do the following two-step operation any number of times: Help Burenka calculate how much time she will need. The first line contains a single integer t (1 <= t <= 500) -- the number of test cases. The description of the test cases follows. The first line of each test case contains a single integer n (1 <= n <= 10^5) - the size of the array The second line of each test case contains n integers a_1, a_2, cdots , a_n (0 <= a_i < 2^{30}) -- elements of the array. It is guaranteed that the sum of n in all tests does not exceed 10^5 . For each test case, output a single number -- the minimum time that Burenka will need. In the first test case, Burenka can choose segment l = 1 , r = 4 , and x=5 . so it will fill the array with zeros in 2 seconds. In the second test case, Burenka first selects segment l = 1 , r = 2 , and x = 1 , after which a = [0, 2, 2] , and then the segment l = 2 , r = 3 , and x=2 , which fills the array with zeros. In total, Burenka will spend 2 seconds. '...

Tutorials

Codeforces Round #814 (Div. 1, Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
168555803 mban259 A2 Aug. 16, 2022, 3:20 p.m. OK C# 10 TESTS 35 202 13209600
168534033 Gassa A2 Aug. 16, 2022, 2:53 p.m. OK D TESTS 33 46 6144000
168557039 chro4896 A2 Aug. 16, 2022, 3:21 p.m. OK GNU C11 TESTS 35 46 2048000
168551278 __sleep A2 Aug. 16, 2022, 3:14 p.m. OK GNU C++14 TESTS 33 31 512000
168548180 Winterfrost A2 Aug. 16, 2022, 3:10 p.m. OK GNU C++14 TESTS 33 31 2662400
168538738 SeiunSky A2 Aug. 16, 2022, 2:59 p.m. OK GNU C++14 TESTS 33 31 8294400
168535140 quanshr A2 Aug. 16, 2022, 2:55 p.m. OK GNU C++14 TESTS 33 46 512000
168528373 basic_string A2 Aug. 16, 2022, 2:49 p.m. OK GNU C++14 TESTS 33 46 512000
168525600 jrscy A2 Aug. 16, 2022, 2:46 p.m. OK GNU C++14 TESTS 33 46 512000
168534939 zoxl A2 Aug. 16, 2022, 2:54 p.m. OK GNU C++14 TESTS 33 46 512000
168526451 DeepinC A2 Aug. 16, 2022, 2:47 p.m. OK GNU C++14 TESTS 33 46 614400
168524892 JoesSR A2 Aug. 16, 2022, 2:45 p.m. OK GNU C++14 TESTS 33 46 921600
168537755 ahgus89 A2 Aug. 16, 2022, 2:57 p.m. OK GNU C++14 TESTS 33 46 921600
168541642 Bobocan A2 Aug. 16, 2022, 3:02 p.m. OK GNU C++17 TESTS 33 31 716800
168595690 iaNTU A2 Aug. 16, 2022, 4:26 p.m. OK GNU C++17 TESTS 35 31 4710400
168566714 kk19212 A2 Aug. 16, 2022, 3:36 p.m. OK GNU C++17 TESTS 35 31 6041600
168646718 Sutaner A2 Aug. 17, 2022, 4:01 a.m. OK GNU C++17 TESTS 36 31 6963200
168522506 Lily A2 Aug. 16, 2022, 2:43 p.m. OK GNU C++17 TESTS 33 46 102400
168537243 UnstoppableChillMachine A2 Aug. 16, 2022, 2:57 p.m. OK GNU C++17 TESTS 33 46 102400
168541795 YeongTree A2 Aug. 16, 2022, 3:02 p.m. OK GNU C++17 TESTS 33 46 512000
168541377 shivangtiwari A2 Aug. 16, 2022, 3:02 p.m. OK GNU C++17 TESTS 33 46 512000
168536542 mehrzad_minaei A2 Aug. 16, 2022, 2:56 p.m. OK GNU C++17 TESTS 33 46 512000
168548295 trek_walker A2 Aug. 16, 2022, 3:10 p.m. OK GNU C++17 TESTS 33 46 512000
168534602 huangxiaohua A2 Aug. 16, 2022, 2:54 p.m. OK GNU C++17 (64) TESTS 33 31 0
168543265 panyaoyu1999 A2 Aug. 16, 2022, 3:04 p.m. OK GNU C++17 (64) TESTS 33 31 0
168545483 AwIDoK A2 Aug. 16, 2022, 3:06 p.m. OK GNU C++17 (64) TESTS 33 31 409600
168536077 m_99 A2 Aug. 16, 2022, 2:56 p.m. OK GNU C++17 (64) TESTS 33 31 409600
168534380 Kude A2 Aug. 16, 2022, 2:54 p.m. OK GNU C++17 (64) TESTS 33 31 409600
168533392 Sana A2 Aug. 16, 2022, 2:53 p.m. OK GNU C++17 (64) TESTS 33 31 409600
168531061 BlackAnt A2 Aug. 16, 2022, 2:52 p.m. OK GNU C++17 (64) TESTS 33 31 409600
168527691 Xellos A2 Aug. 16, 2022, 2:48 p.m. OK GNU C++17 (64) TESTS 33 31 409600
168521669 noimi A2 Aug. 16, 2022, 2:42 p.m. OK GNU C++17 (64) TESTS 33 31 409600
168544727 yanx A2 Aug. 16, 2022, 3:06 p.m. OK GNU C++17 (64) TESTS 33 31 409600
168529215 jeroenodb A2 Aug. 16, 2022, 2:50 p.m. OK GNU C++20 (64) TESTS 33 30 409600
168545481 no_power A2 Aug. 16, 2022, 3:06 p.m. OK GNU C++20 (64) TESTS 33 31 0
168534931 Ethan_Rao A2 Aug. 16, 2022, 2:54 p.m. OK GNU C++20 (64) TESTS 33 31 0
168551648 InternetPerson10 A2 Aug. 16, 2022, 3:14 p.m. OK GNU C++20 (64) TESTS 33 31 409600
168546910 Jackylkk2003 A2 Aug. 16, 2022, 3:08 p.m. OK GNU C++20 (64) TESTS 33 31 409600
168545197 maxplus A2 Aug. 16, 2022, 3:06 p.m. OK GNU C++20 (64) TESTS 33 31 409600
168542886 rt3 A2 Aug. 16, 2022, 3:03 p.m. OK GNU C++20 (64) TESTS 33 31 409600
168539343 null_awe A2 Aug. 16, 2022, 2:59 p.m. OK GNU C++20 (64) TESTS 33 31 409600
168538340 forgothandle A2 Aug. 16, 2022, 2:58 p.m. OK GNU C++20 (64) TESTS 33 31 409600
168538106 ak-group A2 Aug. 16, 2022, 2:58 p.m. OK GNU C++20 (64) TESTS 33 31 409600
168533205 knightL A2 Aug. 16, 2022, 2:53 p.m. OK Java 11 TESTS 33 280 2252800
168552457 jack.t.y.wu A2 Aug. 16, 2022, 3:15 p.m. OK Java 17 TESTS 35 327 512000
168545215 z_zhaojun A2 Aug. 16, 2022, 3:06 p.m. OK Java 8 TESTS 33 124 0
168599084 DarLam A2 Aug. 16, 2022, 4:32 p.m. OK Java 8 TESTS 35 171 409600
168591040 MagentaCobra A2 Aug. 16, 2022, 4:18 p.m. OK Java 8 TESTS 35 311 11878400
168554677 Hakiobo A2 Aug. 16, 2022, 3:18 p.m. OK Kotlin 1.4 TESTS 35 202 1126400
168525743 arvindf232 A2 Aug. 16, 2022, 2:46 p.m. OK Kotlin 1.6 TESTS 33 249 614400
168535668 Tlatoani A2 Aug. 16, 2022, 2:55 p.m. OK Kotlin 1.6 TESTS 33 264 0
168527094 KroosTheKeenGlint A2 Aug. 16, 2022, 2:48 p.m. OK MS C++ 2017 TESTS 33 46 0
168543170 LXl491214 A2 Aug. 16, 2022, 3:04 p.m. OK MS C++ 2017 TESTS 33 140 2457600
168563961 lddlinan A2 Aug. 16, 2022, 3:31 p.m. OK PyPy 2 TESTS 35 248 145100800
168542801 misorin A2 Aug. 16, 2022, 3:03 p.m. OK PyPy 3 TESTS 33 249 17100800
168535431 asdsasd A2 Aug. 16, 2022, 2:55 p.m. OK PyPy 3-64 TESTS 33 93 16793600
168636451 hkwu6013 A2 Aug. 17, 2022, 1:17 a.m. OK PyPy 3-64 TESTS 35 108 17203200
168536491 shotoyoo A2 Aug. 16, 2022, 2:56 p.m. OK PyPy 3-64 TESTS 33 109 14540800
168542341 duck702702 A2 Aug. 16, 2022, 3:03 p.m. OK PyPy 3-64 TESTS 33 124 16486400
168527130 conqueror_of_tourist A2 Aug. 16, 2022, 2:48 p.m. OK PyPy 3-64 TESTS 33 124 18227200
168580448 chinerist A2 Aug. 16, 2022, 3:58 p.m. OK PyPy 3-64 TESTS 35 124 20070400
168538524 xxh1999 A2 Aug. 16, 2022, 2:58 p.m. OK PyPy 3-64 TESTS 33 140 19148800
168577029 siganai A2 Aug. 16, 2022, 3:52 p.m. OK PyPy 3-64 TESTS 35 140 20787200
168574743 shobonvip A2 Aug. 16, 2022, 3:49 p.m. OK PyPy 3-64 TESTS 35 171 24780800
168545904 Jimanbanashi A2 Aug. 16, 2022, 3:07 p.m. OK Python 2 TESTS 33 109 5734400
168598175 savsmail A2 Aug. 16, 2022, 4:30 p.m. OK Python 3 TESTS 35 202 14540800
168526682 Egor A2 Aug. 16, 2022, 2:47 p.m. OK Rust 2021 TESTS 33 31 819200
168530630 Niklassanden A2 Aug. 16, 2022, 2:51 p.m. OK Rust 2021 TESTS 33 31 3993600
168569815 sansen A2 Aug. 16, 2022, 3:41 p.m. OK Rust 2021 TESTS 35 31 4198400
168557835 LittleCyan A2 Aug. 16, 2022, 3:23 p.m. OK Rust 2021 TESTS 35 31 7270400
168534036 qwerty787788 A2 Aug. 16, 2022, 2:53 p.m. OK Rust 2021 TESTS 33 46 2457600

remove filters

Back to search problems