Codeforces Global Round 20

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
1672 Codeforces Global Round 20 FINISHED False 10800 81100499 April 23, 2022, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 174 ) I PermutationForces PROGRAMMING data structures greedy 3000

B'You have a permutation p of integers from 1 to n . You have a strength of s and will perform the following operation some times: It can be shown that no matter what i you have chosen, p will be a permutation of integers from 1 to |p| after all operations. You want to be able to transform p into the empty permutation. Find the minimum strength s that will allow you to do so. The first line of input contains a single integer n ( 1 <= q n <= q 5 cdot 10^5 ) -- the length of the permutation p . The second line of input conatains n integers p_1, p_2, ldots, p_n ( 1 <= q p_i <= q n ) -- the elements of the permutation p . It is guaranteed that all elements in p are distinct. Print the minimum strength s required. In the first test case, the minimum s required is 1 . Here is how we can transform p into the empty permutation with s=1 : It can be shown that with s=0 , it is impossible to transform p into the empty permutation. '...

Tutorials

Global Round 20 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
154801208 djq_cpp I April 24, 2022, 2:09 a.m. OK GNU C++14 TESTS 33 2355 96768000 3000
154787573 ahmedhany_123 I April 23, 2022, 8:26 p.m. OK GNU C++17 TESTS 33 3290 292761600 3000
154831581 bradvij I April 24, 2022, 9:21 a.m. OK GNU C++17 TESTS 33 3307 292761600 3000
154903636 Kubic I April 25, 2022, 4:40 a.m. OK GNU C++17 (64) TESTS 33 1294 87142400 3000
154865060 rainboy I April 24, 2022, 2:57 p.m. OK GNU C++17 (64) TESTS 33 1512 26931200 3000
154777803 errorgorn I April 23, 2022, 6:05 p.m. OK GNU C++17 (64) TESTS 33 1746 65843200 3000
154779244 ecnerwala I April 23, 2022, 6:22 p.m. OK GNU C++17 (64) TESTS 33 1747 64102400 3000
154841400 maroonrk I April 24, 2022, 11:14 a.m. OK GNU C++20 (64) TESTS 33 1669 97894400 3000
154779185 ksun48 I April 23, 2022, 6:21 p.m. OK GNU C++20 (64) TESTS 33 2199 86323200 3000
154899479 mohamed202116370 I April 25, 2022, 3:05 a.m. OK GNU C++20 (64) TESTS 33 2917 212377600 3000
154784385 Gemas I April 23, 2022, 7:34 p.m. OK GNU C++20 (64) TESTS 33 3088 212377600 3000
154775588 mohamedelsadek I April 23, 2022, 5:44 p.m. OK GNU C++20 (64) TESTS 33 3088 212377600 3000

remove filters

Back to search problems