Codeforces Round 843 (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
1775 Codeforces Round 843 (Div. 2) FINISHED False 9000 58473899 Jan. 10, 2023, 11:15 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3238 ) E The Human Equation PROGRAMMING data structures dp ds greedy

B'Petya and his friend, the robot Petya++, went to BFDMONCON, where the costume contest is taking place today. While walking through the festival, they came across a scientific stand named after Professor Oak and Golfball, where they were asked to solve an interesting problem. Given a sequence of numbers a_1, a_2, ... , a_n you can perform several operations on this sequence. Each operation should look as follows. You choose some subsequence ^ dagger . Then you call all the numbers at odd positions in this subsequence northern, and all the numbers at even positions in this subsequence southern. In this case, only the position of the number in the subsequence is taken into account, not in the original sequence. For example, consider the sequence 1, 4, 2, 8, 5, 7, 3, 6, 9 and its subsequence (shown in bold) 1, mathbf{4}, mathbf{2}, 8, mathbf{5}, 7, 3, mathbf{6}, 9 . Then the numbers 4 and 5 are northern, and the numbers 2 and 6 are southern. After that, you can do one of the following: Thus, from the sequence 1, mathbf{4}, mathbf{2}, 8, mathbf{5}, 7, 3, mathbf{6}, 9 , if you choose the subsequence shown in bold, you can get either 1, mathbf{5}, mathbf{1}, 8, mathbf{6}, 7, 3, mathbf{5}, 9 or 1, mathbf{3}, mathbf{3}, 8, mathbf{4}, 7, 3, mathbf{7}, 9 . Then the operation ends. Note also that all operations are independent, i. e. the numbers are no longer called northern or southern when one operation ends. It is necessary to turn all the numbers of the sequence into zeros using the operations described above. Since there is very little time left before the costume contest, the friends want to know, what is the minimum number of operations required for this. The friends were unable to solve this problem, so can you help them? ^ dagger A sequence c is a subsequence of a sequence d if c can be obtained from d by the deletion of several (possibly, zero or al'...

Tutorials

Codeforces Round #843 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
188816265 Wizard_of_Orz E Jan. 10, 2023, 11:43 p.m. OK Clang++17 Diagnostics TESTS 33 155 819200
188828150 marcOS E Jan. 11, 2023, 3:57 a.m. OK GNU C++14 TESTS 33 62 0
188831487 Mahjong_Triple E Jan. 11, 2023, 4:49 a.m. OK GNU C++14 TESTS 33 62 819200
188826918 sizihan E Jan. 11, 2023, 3:38 a.m. OK GNU C++14 TESTS 33 62 819200
188826069 zzh2007 E Jan. 11, 2023, 3:25 a.m. OK GNU C++14 TESTS 33 62 819200
188814207 omeganot E Jan. 10, 2023, 10:34 p.m. OK GNU C++14 TESTS 33 62 819200
188814568 dengziyue E Jan. 10, 2023, 10:46 p.m. OK GNU C++14 TESTS 33 62 1536000
188815912 __Shiki__ E Jan. 10, 2023, 11:31 p.m. OK GNU C++14 TESTS 33 62 1638400
188815829 Hovery E Jan. 10, 2023, 11:28 p.m. OK GNU C++14 TESTS 33 62 1638400
188806326 davis_kb E Jan. 10, 2023, 7:48 p.m. OK GNU C++14 TESTS 33 62 2457600
188824890 YeahPotato E Jan. 11, 2023, 3:05 a.m. OK GNU C++14 TESTS 33 77 0
188812351 Kripton2005 E Jan. 10, 2023, 9:42 p.m. OK GNU C++17 TESTS 33 62 0
188792471 cp_first E Jan. 10, 2023, 5:30 p.m. OK GNU C++17 TESTS 33 62 0
188784855 NanZaaa E Jan. 10, 2023, 4:32 p.m. OK GNU C++17 TESTS 33 62 0
188800057 DeThanh E Jan. 10, 2023, 6:34 p.m. OK GNU C++17 TESTS 33 62 1536000
188819327 Stupid_Piece E Jan. 11, 2023, 1:11 a.m. OK GNU C++17 TESTS 33 62 1638400
188827475 Amigomust E Jan. 11, 2023, 3:47 a.m. OK GNU C++17 TESTS 33 62 2457600
188801243 regain0001 E Jan. 10, 2023, 6:46 p.m. OK GNU C++17 TESTS 33 62 60928000
188828672 ymmm_ E Jan. 11, 2023, 4:06 a.m. OK GNU C++17 TESTS 33 77 0
188800271 badlad E Jan. 10, 2023, 6:36 p.m. OK GNU C++17 TESTS 33 77 0
188798693 Yousef_Sameh E Jan. 10, 2023, 6:21 p.m. OK GNU C++17 TESTS 33 77 0
188821004 Iridescent2020 E Jan. 11, 2023, 1:54 a.m. OK GNU C++17 (64) TESTS 33 15 8396800
188822363 Iridescent2020 E Jan. 11, 2023, 2:20 a.m. OK GNU C++17 (64) TESTS 33 31 8396800
188777836 bashkort E Jan. 10, 2023, 3:42 p.m. OK GNU C++17 (64) TESTS 33 46 0
188832478 CIXTEEN E Jan. 11, 2023, 5:04 a.m. OK GNU C++17 (64) TESTS 33 46 1638400
188821434 Hytidel E Jan. 11, 2023, 2:03 a.m. OK GNU C++17 (64) TESTS 33 46 1638400
188812807 mattagar6 E Jan. 10, 2023, 9:54 p.m. OK GNU C++17 (64) TESTS 33 46 1638400
188805932 MadaraUchiha. E Jan. 10, 2023, 7:42 p.m. OK GNU C++17 (64) TESTS 33 46 1638400
188797964 dufresne_1949 E Jan. 10, 2023, 6:16 p.m. OK GNU C++17 (64) TESTS 33 46 1638400
188791651 Sy_03 E Jan. 10, 2023, 5:24 p.m. OK GNU C++17 (64) TESTS 33 46 1638400
188782103 Once_I_Liked_AGirl E Jan. 10, 2023, 4:12 p.m. OK GNU C++17 (64) TESTS 33 46 1638400
188830224 EricKong E Jan. 11, 2023, 4:30 a.m. OK GNU C++20 (64) TESTS 33 15 2457600
188772275 pecksniff E Jan. 10, 2023, 3:06 p.m. OK GNU C++20 (64) TESTS 33 31 0
188803626 Haven_ E Jan. 10, 2023, 7:13 p.m. OK GNU C++20 (64) TESTS 33 31 1024000
188827925 yukito8069 E Jan. 11, 2023, 3:53 a.m. OK GNU C++20 (64) TESTS 33 31 1638400
188825761 blx E Jan. 11, 2023, 3:20 a.m. OK GNU C++20 (64) TESTS 33 31 5836800
188836643 MuhammadHassan E Jan. 11, 2023, 5:55 a.m. OK GNU C++20 (64) TESTS 33 46 0
188832099 wujiawei111 E Jan. 11, 2023, 4:58 a.m. OK GNU C++20 (64) TESTS 33 46 0
188829671 K-423 E Jan. 11, 2023, 4:21 a.m. OK GNU C++20 (64) TESTS 33 46 0
188828342 _Gawd_ E Jan. 11, 2023, 4 a.m. OK GNU C++20 (64) TESTS 33 46 0
188828206 _Gawd_ E Jan. 11, 2023, 3:58 a.m. OK GNU C++20 (64) TESTS 33 46 0
188824599 sreesh_56 E Jan. 11, 2023, 3 a.m. OK Haskell TESTS 33 186 29388800
188816568 1091857051 E Jan. 10, 2023, 11:54 p.m. OK Java 8 TESTS 33 186 0
188804042 anishde85 E Jan. 10, 2023, 7:18 p.m. OK PyPy 3 TESTS 33 530 27340800
188773019 CinaDor E Jan. 10, 2023, 3:11 p.m. OK PyPy 3-64 TESTS 33 140 30105600
188794070 USYDLDH E Jan. 10, 2023, 5:44 p.m. OK PyPy 3-64 TESTS 33 140 31334400
188787766 Aravind E Jan. 10, 2023, 4:53 p.m. OK PyPy 3-64 TESTS 33 155 21913600
188795892 horrlod E Jan. 10, 2023, 5:59 p.m. OK PyPy 3-64 TESTS 33 155 27238400
188822413 zjcccc E Jan. 11, 2023, 2:21 a.m. OK PyPy 3-64 TESTS 33 155 27443200
188823583 Vanthoci E Jan. 11, 2023, 2:41 a.m. OK PyPy 3-64 TESTS 33 265 19660800
188812771 sushmanth.dampur8780 E Jan. 10, 2023, 9:53 p.m. OK PyPy 3-64 TESTS 33 280 42905600
188795318 Python_frog E Jan. 10, 2023, 5:55 p.m. OK Python 3 TESTS 33 249 16486400
188782634 a2bailey E Jan. 10, 2023, 4:16 p.m. OK Python 3 TESTS 33 264 15872000
188771985 square1001 E Jan. 10, 2023, 3:05 p.m. OK Python 3 TESTS 33 280 16486400
188823001 chromate00 E Jan. 11, 2023, 2:31 a.m. OK Ruby 3 TESTS 33 530 26009600
188780372 robostac E Jan. 10, 2023, 4 p.m. OK Rust 2021 TESTS 33 31 7884800

remove filters

Back to search problems