Codeforces Round 777 (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
1647 Codeforces Round 777 (Div. 2) FINISHED False 7200 90170663 March 11, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1007 ) E Madoka and the Sixth-graders PROGRAMMING dfs and similar greedy trees

B"After the most stunning success with the fifth-graders, Madoka has been trusted with teaching the sixth-graders. There's n single-place desks in her classroom. At the very beginning Madoka decided that the student number b_i ( 1 <= b_i <= n ) will sit at the desk number i . Also there's an infinite line of students with numbers n + 1, n + 2, n + 3, ldots waiting at the door with the hope of being able to learn something from the Madoka herself. Pay attention that each student has his unique number. After each lesson, the following happens in sequence. Note that in the end there is exactly one student at each desk again. It is guaranteed that the numbers p are such that at least one student is removed after each lesson. Check out the explanation to the first example for a better understanding. After several (possibly, zero) lessons the desk i is occupied by student a_i . Given the values a_1, a_2, ldots, a_n and p_1, p_2, ldots, p_n , find the lexicographically smallest suitable initial seating permutation b_1, b_2, ldots, b_n . The permutation is an array of n different integers from 1 up to n in any order. For example, [2,3,1,5,4] is a permutation, but [1,2,2] is not ( 2 occurs twice). [1,3,4] is not a permutation either ( n=3 but there's 4 in the array). For two different permutations a and b of the same length, a is lexicographically less than b if in the first position where a and b differ, the permutation a has a smaller element than the corresponding element in b . The first line of input data contains an integer n ( 2 <= n <= 10^5 ) -- a number of desks in the classroom. The second line contains n integers p_1, p_2, ldots, p_n ( 1 <= q p_i <= q n ) -- desks where the students move. It is guaranteed that p has at least two equal elements. The third "...

Tutorials

Codeforces Round #777 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
149363302 ZZJJQQ E March 12, 2022, 12:12 a.m. OK GNU C++14 TESTS 18 93 31436800
149365838 final_trump E March 12, 2022, 1:39 a.m. OK GNU C++14 TESTS 18 124 19558400
149329504 kasparovian E March 11, 2022, 5:02 p.m. OK GNU C++14 TESTS 18 124 21196800
149315928 eecs E March 11, 2022, 4:13 p.m. OK GNU C++14 TESTS 18 140 18636800
149333121 tteesstt E March 11, 2022, 5:17 p.m. OK GNU C++14 TESTS 18 140 21401600
149366524 1443356159 E March 12, 2022, 1:56 a.m. OK GNU C++14 TESTS 18 140 29081600
149377261 Duy_e E March 12, 2022, 4:57 a.m. OK GNU C++14 TESTS 18 140 34816000
149320038 Genius_dream E March 11, 2022, 4:25 p.m. OK GNU C++14 TESTS 18 155 13824000
149318605 Unlicensed_Rider_Mr.Um E March 11, 2022, 4:21 p.m. OK GNU C++14 TESTS 18 186 17408000
149328657 SOSCHINA E March 11, 2022, 4:56 p.m. OK GNU C++14 TESTS 18 186 17920000
149313844 TeaPot E March 11, 2022, 4:07 p.m. OK GNU C++17 TESTS 18 108 6860800
149336316 aaaaki E March 11, 2022, 5:30 p.m. OK GNU C++17 TESTS 18 108 7577600
149351257 forgothandle E March 11, 2022, 7:25 p.m. OK GNU C++17 TESTS 18 108 16588800
149323749 JhonnyZaz E March 11, 2022, 4:34 p.m. OK GNU C++17 TESTS 18 109 7987200
149315761 SJZhang E March 11, 2022, 4:13 p.m. OK GNU C++17 TESTS 18 109 8704000
149345220 GretaM E March 11, 2022, 6:21 p.m. OK GNU C++17 TESTS 18 109 14643200
149363107 HEXU123 E March 12, 2022, 12:05 a.m. OK GNU C++17 TESTS 18 124 16281600
149353353 Luca E March 11, 2022, 7:51 p.m. OK GNU C++17 TESTS 18 124 18841600
149348035 patou E March 11, 2022, 6:48 p.m. OK GNU C++17 TESTS 18 124 20889600
149333265 Yugi.Hacker E March 11, 2022, 5:18 p.m. OK GNU C++17 TESTS 18 124 21401600
149362028 kal013 E March 11, 2022, 10:57 p.m. OK GNU C++17 (64) TESTS 18 77 6860800
149336328 gs13031 E March 11, 2022, 5:30 p.m. OK GNU C++17 (64) TESTS 18 78 6860800
149366155 lightseba E March 12, 2022, 1:47 a.m. OK GNU C++17 (64) TESTS 18 78 10752000
149314157 I.Gleb E March 11, 2022, 4:08 p.m. OK GNU C++17 (64) TESTS 18 93 10649600
149364907 fxhd E March 12, 2022, 1:12 a.m. OK GNU C++17 (64) TESTS 18 93 11366400
149358008 Mob_Psycho E March 11, 2022, 9:10 p.m. OK GNU C++17 (64) TESTS 18 93 14540800
149321763 kotatsugame E March 11, 2022, 4:29 p.m. OK GNU C++17 (64) TESTS 18 108 8192000
149367202 __NamelessOIer__ E March 12, 2022, 2:11 a.m. OK GNU C++17 (64) TESTS 18 109 10342400
149328177 Merlininice E March 11, 2022, 4:54 p.m. OK GNU C++17 (64) TESTS 18 109 12492800
149329671 Merlininice E March 11, 2022, 5:03 p.m. OK GNU C++17 (64) TESTS 18 124 12492800
149356122 risujiroh E March 11, 2022, 8:34 p.m. OK GNU C++20 (64) TESTS 18 46 5734400
149353380 A_G E March 11, 2022, 7:51 p.m. OK GNU C++20 (64) TESTS 18 93 16076800
149364393 miepu E March 12, 2022, 12:53 a.m. OK GNU C++20 (64) TESTS 18 109 35328000
149319821 SILA_edr E March 11, 2022, 4:24 p.m. OK GNU C++20 (64) TESTS 18 124 20480000
149315394 Howarli E March 11, 2022, 4:12 p.m. OK GNU C++20 (64) TESTS 18 124 39936000
149335446 dcclyde E March 11, 2022, 5:23 p.m. OK GNU C++20 (64) TESTS 18 140 7782400
149328738 prvocislo E March 11, 2022, 4:57 p.m. OK GNU C++20 (64) TESTS 18 155 23347200
149365847 Alan233 E March 12, 2022, 1:39 a.m. OK GNU C++20 (64) TESTS 18 155 35635200
149342084 cho89163 E March 11, 2022, 5:53 p.m. OK GNU C++20 (64) TESTS 18 156 17612800
149367508 generic_placeholder_name E March 12, 2022, 2:17 a.m. OK GNU C++20 (64) TESTS 18 156 18534400
149318645 taran_1407 E March 11, 2022, 4:21 p.m. OK Java 11 TESTS 18 452 13312000
149341877 AndreySiunov E March 11, 2022, 5:52 p.m. OK Java 8 TESTS 18 452 59392000
149329798 lowking E March 11, 2022, 5:03 p.m. OK PyPy 3 TESTS 18 452 35020800
149351833 codicon E March 11, 2022, 7:31 p.m. OK PyPy 3 TESTS 18 467 35942400
149374044 NKUCristiano E March 12, 2022, 4:07 a.m. OK PyPy 3-64 TESTS 18 607 83148800
149374938 NKUCristiano E March 12, 2022, 4:21 a.m. OK PyPy 3-64 TESTS 18 607 83251200
149343841 Jimanbanashi E March 11, 2022, 6:09 p.m. OK Python 2 TESTS 18 795 15155200

remove filters

Back to search problems