Codeforces Round 905 (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
1887 Codeforces Round 905 (Div. 1) FINISHED False 7200 39207263 Oct. 22, 2023, 11:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1834 ) C Minimum Array PROGRAMMING constructive algorithms data structures two pointers

B'Given an array a of length n consisting of integers. Then the following operation is sequentially applied to it q times: Let b_j be the array a obtained after applying the first j operations ( 0 <= j <= q ). Note that b_0 is the array a before applying any operations. You need to find the lexicographically minimum ^{ dagger} array among all arrays b_j . ^{ dagger} An array x is lexicographically smaller than array y if there is an index i such that x_i < y_i , and x_j = y_j for all j < i . In other words, for the first index i where the arrays differ, x_i < y_i . Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 5 cdot 10^5 ) -- 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 <= 5 cdot 10^5 ) -- the length of array a . The second line of each test case contains n integers a_1, a_2, ldots, a_n ( -10^9 <= a_i <= 10^9 ) -- the elements of array a . The third line of each test case contains a single integer q ( 0 <= q <= 5 cdot 10^5 ) -- the number of operations on the array. In each of the next q lines, there are three integers l_j , r_j , and x_j (1 <= l_j <= r_j <= n, -10^9 <= x_j <= 10^9) -- the description of each operation. The operations are given in the order they are applied. It is guaranteed that the sum of n over all test cases and the sum of q over all test cases do not exceed 5 cdot 10^5 . For each test case, output the lexicographically minimum array among all arrays b_j . In the first test case: Thus, the lexicographically minimum array is b_2 . In the second test case, the lexicographically minimum array is b_0 . '...

Tutorials

Codeforces Round #905 (Div. 1, Div. 2, Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
229255503 crazy_sea C Oct. 22, 2023, 12:13 p.m. OK GNU C++14 TESTS 39 561 44851200
229263603 qzr_ C Oct. 22, 2023, 12:26 p.m. OK GNU C++14 TESTS 39 732 18329600
229261787 busamate C Oct. 22, 2023, 12:23 p.m. OK GNU C++14 TESTS 39 1014 95129600
229257109 yeminghan C Oct. 22, 2023, 12:16 p.m. OK GNU C++14 TESTS 39 1076 32972800
229269090 cxaphoenix C Oct. 22, 2023, 12:35 p.m. OK GNU C++14 TESTS 39 1122 31027200
229261893 -2x9_21- C Oct. 22, 2023, 12:23 p.m. OK GNU C++14 TESTS 39 1122 71884800
229256119 AlternatingCurrent C Oct. 22, 2023, 12:14 p.m. OK GNU C++14 TESTS 39 1153 24780800
229278523 0wuming0 C Oct. 22, 2023, 12:50 p.m. OK GNU C++14 TESTS 39 1154 55910400
229250755 zltzlt C Oct. 22, 2023, 12:06 p.m. OK GNU C++14 TESTS 39 1185 88166400
229267450 using233 C Oct. 22, 2023, 12:32 p.m. OK GNU C++14 TESTS 39 1294 13414400
229249268 paul2008 C Oct. 22, 2023, 12:03 p.m. OK GNU C++17 TESTS 39 888 101990400
229269687 Natsuzora C Oct. 22, 2023, 12:36 p.m. OK GNU C++17 TESTS 39 904 77926400
229272876 EasyRed29 C Oct. 22, 2023, 12:41 p.m. OK GNU C++17 TESTS 39 967 18329600
229355853 le0n C Oct. 23, 2023, 12:26 a.m. OK GNU C++17 TESTS 39 982 39936000
229249466 fengqiyuka C Oct. 22, 2023, 12:04 p.m. OK GNU C++17 TESTS 39 1013 32768000
229275187 Onjo C Oct. 22, 2023, 12:45 p.m. OK GNU C++17 TESTS 39 1029 30720000
229225395 Um_nik C Oct. 22, 2023, 11:30 a.m. OK GNU C++17 TESTS 39 1107 33177600
229246963 Roundgod C Oct. 22, 2023, noon OK GNU C++17 TESTS 39 1122 28774400
229359356 LittleXi C Oct. 23, 2023, 1:55 a.m. OK GNU C++17 TESTS 40 1122 37376000
229241236 Yellow_Submarine01 C Oct. 22, 2023, 11:51 a.m. OK GNU C++17 TESTS 39 1122 54988800
229311813 Chrisedyong C Oct. 22, 2023, 3:50 p.m. OK GNU C++17 (64) TESTS 39 530 19456000
229261021 chenxiaoyan C Oct. 22, 2023, 12:22 p.m. OK GNU C++17 (64) TESTS 39 764 32460800
229311820 hydro-bot3 C Oct. 22, 2023, 3:50 p.m. OK GNU C++17 (64) TESTS 39 764 38809600
229364449 zacharychao C Oct. 23, 2023, 3:34 a.m. OK GNU C++17 (64) TESTS 40 764 58572800
229239869 Sana C Oct. 22, 2023, 11:49 a.m. OK GNU C++17 (64) TESTS 39 810 76492800
229233129 Pointy C Oct. 22, 2023, 11:40 a.m. OK GNU C++17 (64) TESTS 39 826 81408000
229246300 kdh9949 C Oct. 22, 2023, 11:59 a.m. OK GNU C++17 (64) TESTS 39 841 57344000
229304277 ssjie C Oct. 22, 2023, 2:51 p.m. OK GNU C++17 (64) TESTS 39 935 54476800
229244398 tengrist C Oct. 22, 2023, 11:56 a.m. OK GNU C++17 (64) TESTS 39 935 73728000
229302144 ethening C Oct. 22, 2023, 2:37 p.m. OK GNU C++17 (64) TESTS 39 966 46592000
229360269 neal C Oct. 23, 2023, 2:14 a.m. OK GNU C++20 (64) TESTS 40 202 12288000
229360199 neal C Oct. 23, 2023, 2:12 a.m. OK GNU C++20 (64) TESTS 40 436 12288000
229279790 Feynn C Oct. 22, 2023, 12:52 p.m. OK GNU C++20 (64) TESTS 39 436 169881600
229360147 neal C Oct. 23, 2023, 2:11 a.m. OK GNU C++20 (64) TESTS 40 451 15462400
229310730 trainerherp C Oct. 22, 2023, 3:42 p.m. OK GNU C++20 (64) TESTS 39 451 19456000
229360012 neal C Oct. 23, 2023, 2:08 a.m. OK GNU C++20 (64) TESTS 40 545 10035200
229358721 neal C Oct. 23, 2023, 1:42 a.m. OK GNU C++20 (64) TESTS 40 546 10035200
229368990 chinerist C Oct. 23, 2023, 4:53 a.m. OK GNU C++20 (64) TESTS 40 576 20582400
229246617 244mhq C Oct. 22, 2023, 11:59 a.m. OK GNU C++20 (64) TESTS 39 576 24064000
229286611 QwertyPi C Oct. 22, 2023, 1:01 p.m. OK GNU C++20 (64) TESTS 39 577 30208000
229300461 Tlatoani C Oct. 22, 2023, 2:26 p.m. OK Kotlin 1.6 TESTS 39 2667 188211200
229261036 FastFreeTask C Oct. 22, 2023, 12:22 p.m. OK Kotlin 1.6 TESTS 39 2932 80998400
229246713 sansen C Oct. 22, 2023, 11:59 a.m. OK Rust 2021 TESTS 39 1185 129536000

remove filters

Back to search problems