Codeforces Round 902 (Div. 1, based on COMPFEST 15 - Final Round)

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
1876 Codeforces Round 902 (Div. 1, based on COMPFEST 15 - Final Round) FINISHED False 9000 40424063 Oct. 8, 2023, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2384 ) C Autosynthesis PROGRAMMING 2-sat constructive algorithms dfs and similar dp flows graphs trees

B'Chaneka writes down an array a of n positive integer elements. Initially, all elements are not circled. In one operation, Chaneka can circle an element. It is possible to circle the same element more than once. After doing all operations, Chaneka makes a sequence r consisting of all uncircled elements of a following the order of their indices. Chaneka also makes another sequence p such that its length is equal to the number of operations performed and p_i is the index of the element that is circled in the i -th operation. Chaneka wants to do several operations such that sequence r is equal to sequence p . Help her achieve this, or report if it is impossible! Note that if there are multiple solutions, you can print any of them. The first line contains a single integer n ( 1 <= q n <= q 2 cdot10^5 ) -- the size of array a . The second line contains n integers a_1,a_2,a_3, ldots,a_n ( 1 <= q a_i <= q n ). A single line containing -1 if it is impossible. Otherwise, the output consists of two lines. The first line contains an integer z representing the number of operations performed. The second line contains z integers, the i -th integer represents the index of the element circled in the i -th operation. If there are multiple solutions, you can print any of them. In the first example, doing the operations like the example output gives the following results: Therefore, r=p . In the second example, it is impossible. '...

Tutorials

Codeforces Round #902 (Div. 1, Div. 2, based on COMPFEST 15 — Final Round) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
227182473 mban259 C Oct. 8, 2023, 11:24 a.m. OK C# 10 TESTS 57 264 49766400
227158589 KumaTachiRen C Oct. 8, 2023, 10:18 a.m. OK C# 8 TESTS 57 186 16588800
227256935 tgehr C Oct. 8, 2023, 10:22 p.m. OK D TESTS 58 217 16076800
227257092 tgehr C Oct. 8, 2023, 10:27 p.m. OK D TESTS 58 218 13721600
227255710 tgehr C Oct. 8, 2023, 9:49 p.m. OK D TESTS 58 233 31334400
227255589 tgehr C Oct. 8, 2023, 9:47 p.m. OK D TESTS 58 265 45363200
227255647 tgehr C Oct. 8, 2023, 9:48 p.m. OK D TESTS 58 280 45363200
227149650 chro4896 C Oct. 8, 2023, 10:02 a.m. OK GNU C11 TESTS 57 935 7168000
227158736 A_Pikachu C Oct. 8, 2023, 10:18 a.m. OK GNU C++14 TESTS 57 31 15462400
227168280 ImmortaLimit C Oct. 8, 2023, 10:43 a.m. OK GNU C++14 TESTS 57 46 28876800
227151835 jiangtaizhe001 C Oct. 8, 2023, 10:07 a.m. OK GNU C++14 TESTS 57 78 6348800
227180441 MCPlayer542 C Oct. 8, 2023, 11:18 a.m. OK GNU C++14 TESTS 57 93 3072000
227260257 oier_lyb C Oct. 9, 2023, 12:11 a.m. OK GNU C++14 TESTS 58 93 3174400
227235721 omeganot C Oct. 8, 2023, 5:51 p.m. OK GNU C++14 TESTS 58 93 3481600
227261488 S-longod C Oct. 9, 2023, 12:46 a.m. OK GNU C++14 TESTS 58 93 3481600
227184446 Leasier C Oct. 8, 2023, 11:29 a.m. OK GNU C++14 TESTS 57 93 3686400
227140350 zhangjianjuncd C Oct. 8, 2023, 9:44 a.m. OK GNU C++14 TESTS 57 93 4198400
227192800 yamia C Oct. 8, 2023, 12:40 p.m. OK GNU C++14 TESTS 57 93 4198400
227165650 pmt2018 C Oct. 8, 2023, 10:35 a.m. OK GNU C++17 TESTS 57 78 10342400
227172464 AlexanderL C Oct. 8, 2023, 10:55 a.m. OK GNU C++17 TESTS 57 93 3481600
227157356 yutabi C Oct. 8, 2023, 10:15 a.m. OK GNU C++17 TESTS 57 93 4198400
227170444 serotonin C Oct. 8, 2023, 10:49 a.m. OK GNU C++17 TESTS 57 93 5222400
227143274 Rewenix C Oct. 8, 2023, 9:49 a.m. OK GNU C++17 TESTS 57 93 5324800
227161635 ahoraSoyPeor C Oct. 8, 2023, 10:25 a.m. OK GNU C++17 TESTS 57 93 5836800
227177083 ms_crystal_ship C Oct. 8, 2023, 11:08 a.m. OK GNU C++17 TESTS 57 93 10240000
227265962 applese C Oct. 9, 2023, 2:35 a.m. OK GNU C++17 TESTS 58 93 13824000
227186218 Twilight_Shimmer C Oct. 8, 2023, 11:33 a.m. OK GNU C++17 TESTS 57 93 14950400
227139370 Roundgod C Oct. 8, 2023, 9:42 a.m. OK GNU C++17 TESTS 57 108 4198400
227135530 QAQAutoMaton C Oct. 8, 2023, 9:35 a.m. OK GNU C++17 (64) TESTS 57 31 8192000
227266507 ftt2333 C Oct. 9, 2023, 2:46 a.m. OK GNU C++17 (64) TESTS 58 62 4812800
227174037 GoogleBot C Oct. 8, 2023, 10:59 a.m. OK GNU C++17 (64) TESTS 57 62 5324800
227260036 enslaved C Oct. 9, 2023, 12:04 a.m. OK GNU C++17 (64) TESTS 58 62 5427200
227138707 lambert0704 C Oct. 8, 2023, 9:41 a.m. OK GNU C++17 (64) TESTS 57 77 3174400
227166766 forpeace C Oct. 8, 2023, 10:38 a.m. OK GNU C++17 (64) TESTS 57 77 3379200
227146233 2077nirundong C Oct. 8, 2023, 9:55 a.m. OK GNU C++17 (64) TESTS 57 77 4505600
227134666 JCY_ C Oct. 8, 2023, 9:34 a.m. OK GNU C++17 (64) TESTS 57 77 4710400
227153681 udon1206 C Oct. 8, 2023, 10:11 a.m. OK GNU C++17 (64) TESTS 57 77 5222400
227253396 Sana C Oct. 8, 2023, 9:04 p.m. OK GNU C++17 (64) TESTS 58 77 5324800
227159566 Sakuyalove C Oct. 8, 2023, 10:20 a.m. OK GNU C++20 (64) TESTS 57 31 8499200
227176616 c1120231020 C Oct. 8, 2023, 11:07 a.m. OK GNU C++20 (64) TESTS 57 31 13004800
227146310 shiomusubi496 C Oct. 8, 2023, 9:55 a.m. OK GNU C++20 (64) TESTS 57 46 4403200
227135885 CharlieV C Oct. 8, 2023, 9:36 a.m. OK GNU C++20 (64) TESTS 57 46 6041600
227167953 DanTheMan_ C Oct. 8, 2023, 10:41 a.m. OK GNU C++20 (64) TESTS 57 61 3379200
227150110 LuCpp C Oct. 8, 2023, 10:03 a.m. OK GNU C++20 (64) TESTS 57 61 4505600
227142913 Everule C Oct. 8, 2023, 9:48 a.m. OK GNU C++20 (64) TESTS 57 61 5222400
227239508 flashmt C Oct. 8, 2023, 6:23 p.m. OK GNU C++20 (64) TESTS 58 61 5324800
227237132 18o3 C Oct. 8, 2023, 6:03 p.m. OK GNU C++20 (64) TESTS 58 61 5324800
227220821 XDEv11 C Oct. 8, 2023, 3:50 p.m. OK GNU C++20 (64) TESTS 58 61 5324800
227184465 profchi C Oct. 8, 2023, 11:29 a.m. OK Java 11 TESTS 57 530 164659200
227271938 safarisoul C Oct. 9, 2023, 4:31 a.m. OK Java 8 TESTS 58 187 4198400
227272367 safarisoul C Oct. 9, 2023, 4:36 a.m. OK Java 8 TESTS 58 202 4300800
227156967 Tlatoani C Oct. 8, 2023, 10:14 a.m. OK Kotlin 1.6 TESTS 57 748 67993600
227267924 YMSeah C Oct. 9, 2023, 3:15 a.m. OK PyPy 3 TESTS 58 296 23552000
227147241 toam C Oct. 8, 2023, 9:57 a.m. OK PyPy 3-64 TESTS 57 202 34611200
227138373 chinerist C Oct. 8, 2023, 9:40 a.m. OK PyPy 3-64 TESTS 57 233 34304000
227142564 alexwice C Oct. 8, 2023, 9:48 a.m. OK PyPy 3-64 TESTS 57 233 34918400
227156618 dyppp C Oct. 8, 2023, 10:14 a.m. OK PyPy 3-64 TESTS 57 733 56729600
227172521 Jimanbanashi C Oct. 8, 2023, 10:55 a.m. OK Python 2 TESTS 57 342 15257600
227169626 shade34 C Oct. 8, 2023, 10:46 a.m. OK Python 3 TESTS 57 405 47411200
227165039 sansen C Oct. 8, 2023, 10:34 a.m. OK Rust 2021 TESTS 57 46 13209600
227142377 qwerty787788 C Oct. 8, 2023, 9:47 a.m. OK Rust 2021 TESTS 57 62 8908800
227137990 Egor C Oct. 8, 2023, 9:39 a.m. OK Rust 2021 TESTS 57 62 9523200

remove filters

Back to search problems