Codeforces Round 1084 (Div. 3)

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
2200 Codeforces Round 1084 (Div. 3) FINISHED False 8100 4202723 Feb. 27, 2026, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 11267 ) D Portal PROGRAMMING greedy sortings

You are given a permutation(^{\text{∗}}) (p) of length (n). There are also two portals located at positions (x) and (y) ((x \lt y)). A portal at position (i) is initially located between the (i)-th and ((i+1))-th elements of the array. Specifically, if (i=0), then the portal is located before the first element of the array, and if (i=n), then the portal is located after the last element. You may perform either of the following two operations as many times as you like: Remove the element to the immediate left of one portal and insert it to the immediate right of the other portal. Remove the element to the immediate right of one portal and insert it to the immediate left of the other portal. Let (\mathbf{\color{red}{\mathcal{O}}}) denote a portal. For example, if (p) is (3,\mathbf{\color{red}{\mathcal{O}}},2,4,\mathbf{\color{red}{\mathcal{O}}},1): Using operation (1) on the left and right portals respectively results in the arrays (\mathbf{\color{red}{\mathcal{O}}},2,4,\mathbf{\color{red}{\mathcal{O}}},3,1) and (3,\mathbf{\color{red}{\mathcal{O}}},4,2,\mathbf{\color{red}{\mathcal{O}}},1). Using operation (2) on the left and right portals respectively results in the arrays (3,\mathbf{\color{red}{\mathcal{O}}},4,2,\mathbf{\color{red}{\mathcal{O}}},1) and (3,1,\mathbf{\color{red}{\mathcal{O}}},2,4,\mathbf{\color{red}{\mathcal{O}}}). Find the lexicographically(^{\text{†}}) smallest permutation you can obtain using these operations. Note that portals do not affect the lexicographical comparison of permutations. (^{\text{∗}})A permutation of length (n) is an array of length (n) containing each integer from (1) to (n) exactly once. (^{\text{†}})A permutation (a) is lexicographically smaller than permutation (b) if there exists an index (i) such that (a_j = b_j) for all indices (1 \leq j \lt i) and (a_i \lt b_i). The first lin

Tutorials

Codeforces Round 1084 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
364788265 tej11 D Feb. 28, 2026, 5:35 a.m. OK C# 13 TESTS 4 109 27750400
364755780 pranshujhaji D Feb. 27, 2026, 7:59 p.m. OK C++17 (GCC 7-32) TESTS 4 46 0
364741111 Mlayni D Feb. 27, 2026, 5:41 p.m. OK C++17 (GCC 7-32) TESTS 4 46 0
364732591 casualuse1045 D Feb. 27, 2026, 4:48 p.m. OK C++17 (GCC 7-32) TESTS 4 46 0
364729138 nikalla D Feb. 27, 2026, 4:40 p.m. OK C++17 (GCC 7-32) TESTS 4 46 0
364724926 anshkaushik478 D Feb. 27, 2026, 4:30 p.m. OK C++17 (GCC 7-32) TESTS 4 46 0
364725604 aman1020 D Feb. 27, 2026, 4:31 p.m. OK C++17 (GCC 7-32) TESTS 4 46 102400
364776967 chenjinkun D Feb. 28, 2026, 2:23 a.m. OK C++17 (GCC 7-32) TESTS 4 62 0
364757267 Coder2086 D Feb. 27, 2026, 8:12 p.m. OK C++17 (GCC 7-32) TESTS 4 62 0
364754916 singhal.adi D Feb. 27, 2026, 7:50 p.m. OK C++17 (GCC 7-32) TESTS 4 62 0
364748243 prayag2 D Feb. 27, 2026, 6:48 p.m. OK C++17 (GCC 7-32) TESTS 4 62 0
364766116 sakshammishra112 D Feb. 27, 2026, 10:05 p.m. OK C++20 (GCC 13-64) TESTS 4 46 0
364744957 nishkarsh D Feb. 27, 2026, 6:16 p.m. OK C++20 (GCC 13-64) TESTS 4 46 0
364737856 CutSandstone D Feb. 27, 2026, 5:15 p.m. OK C++20 (GCC 13-64) TESTS 4 46 0
364736447 levi__k D Feb. 27, 2026, 5:06 p.m. OK C++20 (GCC 13-64) TESTS 4 46 0
364731981 whyy D Feb. 27, 2026, 4:47 p.m. OK C++20 (GCC 13-64) TESTS 4 46 0
364725902 masdav D Feb. 27, 2026, 4:32 p.m. OK C++20 (GCC 13-64) TESTS 4 46 0
364725070 LoneSpirit D Feb. 27, 2026, 4:30 p.m. OK C++20 (GCC 13-64) TESTS 4 46 0
364726865 anishawasthi16 D Feb. 27, 2026, 4:35 p.m. OK C++20 (GCC 13-64) TESTS 4 46 102400
364726708 Ovi_404 D Feb. 27, 2026, 4:34 p.m. OK C++20 (GCC 13-64) TESTS 4 46 102400
364724063 dhruv87lodhi D Feb. 27, 2026, 4:28 p.m. OK C++20 (GCC 13-64) TESTS 4 46 102400
364732133 Koo__ D Feb. 27, 2026, 4:47 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 31 409600
364733519 xiaowang52421 D Feb. 27, 2026, 4:49 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 31 819200
364787328 Smallplane D Feb. 28, 2026, 5:24 a.m. OK C++23 (GCC 14-64, msys2) TESTS 4 31 6144000
364778180 spinning888 D Feb. 28, 2026, 2:47 a.m. OK C++23 (GCC 14-64, msys2) TESTS 4 46 0
364769266 rasoulist D Feb. 27, 2026, 11:12 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 46 0
364741464 YousaB_ D Feb. 27, 2026, 5:45 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 46 0
364739171 _KAKASHI D Feb. 27, 2026, 5:25 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 46 0
364734689 srivarshith D Feb. 27, 2026, 4:55 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 46 0
364732203 luca.traian.barbulescu D Feb. 27, 2026, 4:47 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 46 0
364729631 prawat2 D Feb. 27, 2026, 4:41 p.m. OK C++23 (GCC 14-64, msys2) TESTS 4 46 0
364750694 NenadDapic D Feb. 27, 2026, 7:12 p.m. OK FPC TESTS 4 125 1740800
364763216 zerojanuary D Feb. 27, 2026, 9:23 p.m. OK GNU C11 TESTS 4 78 819200
364731604 K-Squared D Feb. 27, 2026, 4:46 p.m. OK GNU C11 TESTS 4 843 1638400
364732953 Praket_Thakur D Feb. 27, 2026, 4:49 p.m. OK GNU C11 TESTS 4 875 1638400
364722486 LittleGopher D Feb. 27, 2026, 4:24 p.m. OK Go TESTS 4 125 9728000
364728949 treasuryonly D Feb. 27, 2026, 4:40 p.m. OK Haskell TESTS 4 171 24883200
364730051 kumarravi16082 D Feb. 27, 2026, 4:42 p.m. OK Java 21 TESTS 4 218 0
364728111 codewithshek D Feb. 27, 2026, 4:38 p.m. OK Java 21 TESTS 4 218 102400
364746126 akr2803 D Feb. 27, 2026, 6:27 p.m. OK Java 21 TESTS 4 218 204800
364726523 MayurRaonang D Feb. 27, 2026, 4:34 p.m. OK Java 21 TESTS 4 218 1024000
364727046 young_carl79 D Feb. 27, 2026, 4:35 p.m. OK Java 21 TESTS 4 234 0
364724946 Mahesh_goyal_1 D Feb. 27, 2026, 4:30 p.m. OK Java 21 TESTS 4 234 102400
364722697 sparshgupta78970 D Feb. 27, 2026, 4:25 p.m. OK Java 21 TESTS 4 250 0
364727492 prathamesh_lakhapati D Feb. 27, 2026, 4:36 p.m. OK Java 21 TESTS 4 250 921600
364781188 NpHardcore_05 D Feb. 28, 2026, 3:45 a.m. OK Java 21 TESTS 4 250 4710400
364727205 THEarchitect D Feb. 27, 2026, 4:35 p.m. OK Java 21 TESTS 4 265 204800
364727344 marcus.franklin.j12 D Feb. 27, 2026, 4:36 p.m. OK Java 8 TESTS 4 140 8396800
364724599 kevin_0911 D Feb. 27, 2026, 4:29 p.m. OK Java 8 TESTS 4 281 3481600
364732185 K_Keerthana D Feb. 27, 2026, 4:47 p.m. OK Java 8 TESTS 4 468 0
364723762 Ishan1509 D Feb. 27, 2026, 4:27 p.m. OK Java 8 TESTS 4 484 0
364727852 rushi1105 D Feb. 27, 2026, 4:37 p.m. OK Java 8 TESTS 4 640 0
364740285 gabiluciu D Feb. 27, 2026, 5:34 p.m. OK Node.js TESTS 4 281 43212800
364725538 kumoRin D Feb. 27, 2026, 4:31 p.m. OK Node.js TESTS 4 296 60313600
364765482 WbxOne D Feb. 27, 2026, 9:54 p.m. OK Node.js TESTS 4 328 40755200
364734688 z1san D Feb. 27, 2026, 4:55 p.m. OK PyPy 3 TESTS 4 343 18432000
364727098 Ardmore D Feb. 27, 2026, 4:35 p.m. OK PyPy 3 TESTS 4 375 23040000
364747693 tejaswin_b D Feb. 27, 2026, 6:42 p.m. OK PyPy 3 TESTS 4 453 20582400
364778904 DoryperPevin D Feb. 28, 2026, 3:02 a.m. OK PyPy 3 TESTS 4 515 17408000
364769750 Mildog D Feb. 27, 2026, 11:23 p.m. OK PyPy 3 TESTS 4 515 18534400
364727737 janexyz D Feb. 27, 2026, 4:37 p.m. OK PyPy 3 TESTS 4 562 17715200
364772949 gardengnome D Feb. 28, 2026, 12:48 a.m. OK PyPy 3-64 TESTS 4 156 27852800
364750865 shukir D Feb. 27, 2026, 7:13 p.m. OK PyPy 3-64 TESTS 4 156 28876800
364741387 Only365 D Feb. 27, 2026, 5:44 p.m. OK PyPy 3-64 TESTS 4 187 22016000
364723833 rockcoach D Feb. 27, 2026, 4:27 p.m. OK PyPy 3-64 TESTS 4 203 27238400
364781508 know_pain D Feb. 28, 2026, 3:51 a.m. OK PyPy 3-64 TESTS 4 203 29388800
364732091 Suzal_Bhookle D Feb. 27, 2026, 4:47 p.m. OK PyPy 3-64 TESTS 4 218 22118400
364745480 Will_Xu D Feb. 27, 2026, 6:21 p.m. OK PyPy 3-64 TESTS 4 218 22835200
364737350 beutelm D Feb. 27, 2026, 5:12 p.m. OK PyPy 3-64 TESTS 4 218 24166400
364741136 brrond D Feb. 27, 2026, 5:42 p.m. OK PyPy 3-64 TESTS 4 218 27238400
364722789 gennadygupta D Feb. 27, 2026, 4:25 p.m. OK PyPy 3-64 TESTS 4 218 30617600
364726724 girisaiavinash07 D Feb. 27, 2026, 4:34 p.m. OK Python 3 TESTS 4 125 39219200
364735054 santo_07 D Feb. 27, 2026, 4:57 p.m. OK Python 3 TESTS 4 218 26112000
364739039 oedfio D Feb. 27, 2026, 5:24 p.m. OK Python 3 TESTS 4 281 23449600
364760355 sanjanapatel238 D Feb. 27, 2026, 8:47 p.m. OK Python 3 TESTS 4 296 21196800
364722624 WickedCipher D Feb. 27, 2026, 4:24 p.m. OK Python 3 TESTS 4 296 23449600
364723348 sagargp D Feb. 27, 2026, 4:26 p.m. OK Python 3 TESTS 4 296 23961600
364731988 ACherviakov2 D Feb. 27, 2026, 4:47 p.m. OK Python 3 TESTS 4 296 24371200
364724653 Venom2410 D Feb. 27, 2026, 4:29 p.m. OK Python 3 TESTS 4 312 23552000
364730457 VishrutGrover D Feb. 27, 2026, 4:43 p.m. OK Python 3 TESTS 4 312 23961600
364725183 Yuriy256 D Feb. 27, 2026, 4:31 p.m. OK Python 3 TESTS 4 328 21913600
364726913 hachiko2026 D Feb. 27, 2026, 4:35 p.m. OK Ruby 3 TESTS 4 281 39628800
364740006 pohzipohzi D Feb. 27, 2026, 5:32 p.m. OK Rust 2024 TESTS 4 62 307200
364739220 f0rsworN D Feb. 27, 2026, 5:25 p.m. OK Rust 2024 TESTS 4 78 11776000
364782875 0x81 D Feb. 28, 2026, 4:15 a.m. OK Rust 2024 TESTS 4 93 6656000
364770411 s5kxlqb86ue7vh4 D Feb. 27, 2026, 11:39 p.m. OK Rust 2024 TESTS 4 109 8192000

remove filters

Back to search problems