Codeforces Round 807 (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
1705 Codeforces Round 807 (Div. 2) FINISHED False 8100 73931099 July 15, 2022, 1:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2106 ) E Mark and Professor Koro PROGRAMMING binary search bitmasks combinatorics data structures greedy

B'After watching a certain anime before going to sleep, Mark dreams of standing in an old classroom with a blackboard that has a sequence of n positive integers a_1, a_2, ... ,a_n on it. Then, professor Koro comes in. He can perform the following operation: Professor Koro then asks Mark the question, "what is the maximum possible number that could appear on the board after some operations?" Mark quickly solves this question, but he is still slower than professor Koro. Thus, professor Koro decides to give Mark additional challenges. He will update the initial sequence of integers q times. Each time, he will choose positive integers k and l , then change a_k to l . After each update, he will ask Mark the same question again. Help Mark answer these questions faster than Professor Koro! Note that the updates are persistent. Changes made to the sequence a will apply when processing future updates. The first line of the input contains two integers n and q ( 2 <= q n <= q 2 cdot 10^5 , 1 <= q q <= q 2 cdot 10^5 ) -- the length of the sequence a and the number of updates, respectively. The second line contains n integers a_1,a_2, ... ,a_n ( 1 <= q a_i <= q 2 cdot 10^5 ) Then, q lines follow, each consisting of two integers k and l ( 1 <= q k <= q n , 1 <= q l <= q 2 cdot 10^5 ), telling to update a_k to l . Print q lines. The i -th line should consist of a single integer -- the answer after the i -th update. In the first example test, the program must proceed through 4 updates. The sequence after the first update is [2,3,2,4,5] . One sequence of operations that achieves the number 6 the following. Then, in the second update, the array is changed to [2,3,2,4,3] . This time, Mark cannot achieve 6 . However, one sequence that Mark can use to achieve 5 is shown below. In the third update, the array is c'...

Tutorials

Codeforces Round #807 (Div 2.) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
164401683 Tdyx E July 16, 2022, 6 a.m. OK C# 8 TESTS 30 1122 30617600
164393244 Chen_ri_kang E July 16, 2022, 4:22 a.m. OK GNU C++14 TESTS 30 358 8806400
164348713 aymanriadsolh E July 15, 2022, 5:04 p.m. OK GNU C++14 TESTS 30 358 11776000
164379641 Kano1224 E July 16, 2022, 1:16 a.m. OK GNU C++14 TESTS 30 390 16793600
164379659 Tyyyyyy E July 16, 2022, 1:16 a.m. OK GNU C++14 TESTS 30 405 13824000
164388404 wildfire032 E July 16, 2022, 3:19 a.m. OK GNU C++14 TESTS 30 405 16793600
164380410 wzc_IOI_czw E July 16, 2022, 1:30 a.m. OK GNU C++14 TESTS 30 405 20889600
164388714 acacaction E July 16, 2022, 3:22 a.m. OK GNU C++14 TESTS 30 405 27238400
164383760 lqhsmash E July 16, 2022, 2:21 a.m. OK GNU C++14 TESTS 30 451 18534400
164398620 lzbzs E July 16, 2022, 5:29 a.m. OK GNU C++14 TESTS 30 452 78643200
164401559 i209M E July 16, 2022, 5:59 a.m. OK GNU C++14 TESTS 30 467 28876800
164338777 Bobocan E July 15, 2022, 3:48 p.m. OK GNU C++17 TESTS 30 202 3993600
164394664 MakiseChris E July 16, 2022, 4:40 a.m. OK GNU C++17 TESTS 30 249 3481600
164372844 AlexanderL E July 15, 2022, 10:32 p.m. OK GNU C++17 TESTS 30 296 3481600
164368290 Bobocan E July 15, 2022, 8:53 p.m. OK GNU C++17 TESTS 30 312 14131200
164400298 T500 E July 16, 2022, 5:46 a.m. OK GNU C++17 TESTS 30 327 4915200
164364893 cocodev0113 E July 15, 2022, 8 p.m. OK GNU C++17 TESTS 30 327 9523200
164366563 stark2002 E July 15, 2022, 8:25 p.m. OK GNU C++17 TESTS 30 342 2662400
164368187 Jesuscristo E July 15, 2022, 8:51 p.m. OK GNU C++17 TESTS 30 342 12288000
164382658 liuxiangbin E July 16, 2022, 2:05 a.m. OK GNU C++17 TESTS 30 343 3584000
164344113 SadSadBlueMann E July 15, 2022, 4:32 p.m. OK GNU C++17 TESTS 30 343 3993600
164351314 LiZnB E July 15, 2022, 5:28 p.m. OK GNU C++17 (64) TESTS 30 249 9523200
164397014 zwuis E July 16, 2022, 5:11 a.m. OK GNU C++17 (64) TESTS 30 280 5017600
164386483 ZzQf E July 16, 2022, 2:57 a.m. OK GNU C++17 (64) TESTS 30 280 16076800
164353341 LiZnB E July 15, 2022, 5:48 p.m. OK GNU C++17 (64) TESTS 30 312 9523200
164350948 wyyxhjth E July 15, 2022, 5:25 p.m. OK GNU C++17 (64) TESTS 30 327 3276800
164376359 gqf123 E July 15, 2022, 11:59 p.m. OK GNU C++17 (64) TESTS 30 327 4915200
164345333 xxafhixx E July 15, 2022, 4:39 p.m. OK GNU C++17 (64) TESTS 30 327 39219200
164378016 tomato_potato E July 16, 2022, 12:44 a.m. OK GNU C++17 (64) TESTS 30 342 8704000
164378641 gqf123 E July 16, 2022, 12:57 a.m. OK GNU C++17 (64) TESTS 30 343 29696000
164357052 Krzychuo E July 15, 2022, 6:24 p.m. OK GNU C++17 (64) TESTS 30 358 7065600
164400586 modulus E July 16, 2022, 5:49 a.m. OK GNU C++20 (64) TESTS 30 202 3174400
164400229 modulus E July 16, 2022, 5:46 a.m. OK GNU C++20 (64) TESTS 30 202 7065600
164400759 modulus E July 16, 2022, 5:51 a.m. OK GNU C++20 (64) TESTS 30 218 3174400
164370663 Jesuscristo E July 15, 2022, 9:40 p.m. OK GNU C++20 (64) TESTS 30 249 13312000
164350397 Griseo E July 15, 2022, 5:20 p.m. OK GNU C++20 (64) TESTS 30 265 4096000
164400179 modulus E July 16, 2022, 5:45 a.m. OK GNU C++20 (64) TESTS 30 280 6860800
164389821 bachbeo2007 E July 16, 2022, 3:35 a.m. OK GNU C++20 (64) TESTS 30 280 7987200
164355339 MiaomiaoZi E July 15, 2022, 6:07 p.m. OK GNU C++20 (64) TESTS 30 280 36352000
164358866 OptimalKnight E July 15, 2022, 6:43 p.m. OK GNU C++20 (64) TESTS 30 296 14540800
164358777 OptimalKnight E July 15, 2022, 6:42 p.m. OK GNU C++20 (64) TESTS 30 296 14540800
164391480 Omar_Mohammad E July 16, 2022, 3:56 a.m. OK Java 11 TESTS 30 592 5017600
164366253 dzhi E July 15, 2022, 8:20 p.m. OK Java 11 TESTS 30 670 11776000
164339083 Dukkha E July 15, 2022, 3:49 p.m. OK Java 11 TESTS 30 857 0
164390734 Omar_Mohammad E July 16, 2022, 3:47 a.m. OK Java 11 TESTS 30 1465 5017600
164390631 Omar_Mohammad E July 16, 2022, 3:46 a.m. OK Java 11 TESTS 30 1513 5017600
164349504 freehandle E July 15, 2022, 5:11 p.m. OK Java 17 TESTS 30 716 5324800
164373657 Mamimi E July 15, 2022, 10:36 p.m. OK Java 17 TESTS 30 1450 614400
164358983 misorin E July 15, 2022, 6:44 p.m. OK PyPy 3 TESTS 30 1247 33792000
164370643 Thallium54 E July 15, 2022, 9:39 p.m. OK Rust 2021 TESTS 30 358 24780800
164370069 Thallium54 E July 15, 2022, 9:27 p.m. OK Rust 2021 TESTS 30 358 38502400
164369724 LittleFall E July 15, 2022, 9:20 p.m. OK Rust 2021 TESTS 30 389 14848000
164347330 bjin E July 15, 2022, 4:53 p.m. OK Rust 2021 TESTS 30 499 22528000
164352369 bjin E July 15, 2022, 5:39 p.m. OK Rust 2021 TESTS 30 514 22528000
164361804 bjin E July 15, 2022, 7:19 p.m. OK Rust 2021 TESTS 30 561 22528000
164342257 robostac E July 15, 2022, 4:23 p.m. OK Rust 2021 TESTS 30 967 6348800
164367655 Thallium54 E July 15, 2022, 8:43 p.m. OK Rust 2021 TESTS 30 1544 38502400
164345727 Thallium54 E July 15, 2022, 4:41 p.m. OK Rust 2021 TESTS 30 1637 38502400

remove filters

Back to search problems