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 |
---|---|---|---|---|---|---|
1693 | Codeforces Round 800 (Div. 1) | FINISHED | False | 7200 | 81876263 | June 16, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 437 ) | E | Outermost Maximums | PROGRAMMING | data structures greedy | 3400 |
B'Yeri has an array of n + 2 non-negative integers : a_0, a_1, ..., a_n, a_{n + 1} . We know that a_0 = a_{n + 1} = 0 . She wants to make all the elements of a equal to zero in the minimum number of operations. In one operation she can do one of the following: Help her find the minimum number of operations needed to make all elements of a equal to zero. The first line contains a single integer n ( 1 <= n <= 2 cdot 10^5 ). The second line contains n integers a_1, a_2, ldots, a_n ( 0 <= a_i <= n ). Print a single integer -- the minimum number of operations needed to make all elements of a equal to zero. In the first sample, you get langle 1, underline{1}, 2, 4, 0, 2 rangle by performing the first operation and langle 1, 4, 2, underline{2}, 0, 2 rangle by performing the second operation. One way to achieve our goal is shown below. (The underlines show the last change.) langle 1, 4, 2, 4, 0, 2 rangle to langle 1, 4, 2, underline{2}, 0, 2 rangle to langle 1, underline{1}, 2, 2, 0, 2 rangle to langle 1, 1, 2, 2, 0, underline{0} rangle to langle 1, 1, 2, underline{0}, 0, 0 rangle to langle 1, 1, underline{0}, 0, 0, 0 rangle to langle underline{0}, 1, 0, 0, 0, 0 rangle to langle 0, underline{0}, 0, 0, 0, 0 rangle In the third sample each element is already equal to zero so no operations are needed. '... |
Codeforces Round #800 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
160877602 | rainboy | E | June 16, 2022, 4:16 p.m. | OK | GNU C11 | TESTS | 42 | 156 | 15052800 | 3400 | |
160920975 | djq_cpp | E | June 17, 2022, 5 a.m. | OK | GNU C++14 | TESTS | 42 | 93 | 7372800 | 3400 | |
160921016 | djq_cpp | E | June 17, 2022, 5 a.m. | OK | GNU C++14 | TESTS | 42 | 109 | 7372800 | 3400 | |
160869009 | FutureGadgetLaboratory | E | June 16, 2022, 3:54 p.m. | OK | GNU C++14 | TESTS | 42 | 311 | 38707200 | 3400 | |
160873611 | heno239 | E | June 16, 2022, 4:06 p.m. | OK | GNU C++17 | TESTS | 42 | 343 | 19251200 | 3400 | |
160871522 | gisp_zjz | E | June 16, 2022, 4 p.m. | OK | GNU C++17 | TESTS | 42 | 389 | 113254400 | 3400 | |
160864775 | Radewoosh | E | June 16, 2022, 3:45 p.m. | OK | GNU C++17 | TESTS | 42 | 1107 | 41574400 | 3400 | |
160863343 | Merkurev | E | June 16, 2022, 3:42 p.m. | OK | GNU C++17 (64) | TESTS | 42 | 327 | 29388800 | 3400 | |
160869365 | QAQAutoMaton | E | June 16, 2022, 3:55 p.m. | OK | GNU C++17 (64) | TESTS | 42 | 342 | 169369600 | 3400 | |
160881848 | Noam13 | E | June 16, 2022, 4:26 p.m. | OK | GNU C++17 (64) | TESTS | 42 | 623 | 156364800 | 3400 | |
160904721 | errorgorn | E | June 16, 2022, 8:28 p.m. | OK | GNU C++17 (64) | TESTS | 42 | 982 | 37478400 | 3400 | |
160890042 | ecnerwala | E | June 16, 2022, 5:13 p.m. | OK | GNU C++20 (64) | TESTS | 42 | 78 | 8908800 | 3400 | |
160889370 | ecnerwala | E | June 16, 2022, 5:08 p.m. | OK | GNU C++20 (64) | TESTS | 42 | 78 | 9728000 | 3400 | |
160888570 | ecnerwala | E | June 16, 2022, 5:04 p.m. | OK | GNU C++20 (64) | TESTS | 42 | 78 | 9728000 | 3400 | |
160897208 | Dhruv_Singh_Jadon | E | June 16, 2022, 6:22 p.m. | OK | GNU C++20 (64) | TESTS | 42 | 78 | 9728000 | 3400 | |
160889537 | ecnerwala | E | June 16, 2022, 5:09 p.m. | OK | GNU C++20 (64) | TESTS | 42 | 93 | 10444800 | 3400 | |
160916281 | sky123 | E | June 17, 2022, 3:22 a.m. | OK | GNU C++20 (64) | TESTS | 42 | 93 | 10444800 | 3400 | |
160893451 | jiangly | E | June 16, 2022, 5:42 p.m. | OK | GNU C++20 (64) | TESTS | 42 | 93 | 11264000 | 3400 | |
160883190 | maroonrk | E | June 16, 2022, 4:29 p.m. | OK | GNU C++20 (64) | TESTS | 42 | 155 | 24883200 | 3400 | |
160876701 | ko_osaga | E | June 16, 2022, 4:13 p.m. | OK | GNU C++20 (64) | TESTS | 42 | 218 | 10956800 | 3400 | |
160914800 | Vercingetorix | E | June 17, 2022, 2:46 a.m. | OK | GNU C++20 (64) | TESTS | 42 | 249 | 12083200 | 3400 |
Back to search problems