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
( 184 ) F Minimum Segments PROGRAMMING constructive algorithms

B'You had a sequence a_1, a_2, ldots, a_n consisting of integers from 1 to n , not necessarily distinct. For some unknown reason, you decided to calculate the following characteristic of the sequence: Each test consist of multiple test cases. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The description of test cases follows. The first line of each test case contains a single integer n ( 1 <= n <= 2 cdot 10^5 ) -- the length of the lost sequence a . The second line of each test case contains n integers r_1, r_2, ldots, r_n ( i <= r_i <= n+1 ) -- the characteristic of the lost sequence a . It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, output the following: In the first test case, the sequence a = [1, 2, 1] is suitable. The integers 1 and 2 appear on the subsegments [1, 2] and [2, 3] . In the second test case, it can be proved that there is no suitable sequence a . '...

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
229293399 Um_nik F Oct. 22, 2023, 1:50 p.m. OK GNU C++17 TESTS 16 108 7987200
229369273 zh0ukangyang F Oct. 23, 2023, 4:57 a.m. OK GNU C++17 TESTS 16 124 17305600
229278730 Crystally F Oct. 22, 2023, 12:50 p.m. OK GNU C++17 (64) TESTS 16 78 3174400
229365023 dXqwq F Oct. 23, 2023, 3:44 a.m. OK GNU C++17 (64) TESTS 16 124 7987200
229337643 ecnerwala F Oct. 22, 2023, 7:46 p.m. OK GNU C++20 (64) TESTS 16 46 9625600
229268085 jiangly F Oct. 22, 2023, 12:33 p.m. OK GNU C++20 (64) TESTS 16 62 7065600
229351911 chappy1 F Oct. 22, 2023, 10:23 p.m. OK GNU C++20 (64) TESTS 16 62 9625600
229337387 ecnerwala F Oct. 22, 2023, 7:43 p.m. OK GNU C++20 (64) TESTS 16 62 9625600
229322706 ushkdn F Oct. 22, 2023, 5:23 p.m. OK GNU C++20 (64) TESTS 16 92 21401600
229310087 Benq F Oct. 22, 2023, 3:36 p.m. OK GNU C++20 (64) TESTS 16 93 12083200
229284035 maroonrk F Oct. 22, 2023, 12:58 p.m. OK GNU C++20 (64) TESTS 16 108 21401600
229279061 ecnerwala F Oct. 22, 2023, 12:51 p.m. OK GNU C++20 (64) TESTS 16 124 13004800
229370352 aiwl F Oct. 23, 2023, 5:12 a.m. OK GNU C++20 (64) TESTS 16 140 20787200
229267071 cnnfls_csy F Oct. 22, 2023, 12:31 p.m. OK GNU C++20 (64) TESTS 16 156 8704000

remove filters

Back to search problems