Codeforces Round 834 (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
1759 Codeforces Round 834 (Div. 3) FINISHED False 8100 68397863 Nov. 18, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4606 ) G Restore the Permutation PROGRAMMING binary search data structures greedy math

B'A sequence of n numbers is called permutation if it contains all numbers from 1 to n exactly once. For example, the sequences [ 3, 1, 4, 2 ], [ 1 ] and [ 2,1 ] are permutations, but [ 1,2,1 ], [ 0,1 ] and [ 1,3,4 ] -- are not. For a permutation p of even length n you can make an array b of length frac{n}{2} such that: For example, if p = [ 2, 4, 3, 1, 5, 6 ], then: For a given array b , find the lexicographically minimal permutation p such that you can make the given array b from it. If b = [ 4,3,6 ], then the lexicographically minimal permutation from which it can be made is p = [ 1,4,2,3,5,6 ], since: A permutation x_1, x_2, ... , x_n is lexicographically smaller than a permutation y_1, y_2 ... , y_n if and only if there exists such i ( 1 <= i <= n ) that x_1=y_1, x_2=y_2, ... , x_{i-1}=y_{i-1} and x_i<y_i . The first line of input data contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains one even integer n ( 2 <= n <= 2 cdot 10^5 ). The second line of each test case contains exactly frac{n}{2} integers b_i ( 1 <= b_i <= n ) -- elements of array b . It is guaranteed that the sum of n values over all test cases does not exceed 2 cdot 10^5 . For each test case, print on a separate line: The first test case is parsed in the problem statement. '...

Tutorials

109254

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
181550726 LostTemple G Nov. 19, 2022, 2:01 a.m. OK C# 10 TESTS 32 218 20480000
181529518 FatalityNT G Nov. 18, 2022, 6:40 p.m. OK C# 8 TESTS 26 452 35430400
181512011 Error_Yuan G Nov. 18, 2022, 4:46 p.m. OK GNU C++14 TESTS 26 62 2457600
181519856 imitate20021 G Nov. 18, 2022, 5:16 p.m. OK GNU C++14 TESTS 26 62 7372800
181552181 Shuai. G Nov. 19, 2022, 2:32 a.m. OK GNU C++14 TESTS 32 93 5632000
181552138 Shuai. G Nov. 19, 2022, 2:31 a.m. OK GNU C++14 TESTS 32 93 5632000
181552114 Shuai. G Nov. 19, 2022, 2:30 a.m. OK GNU C++14 TESTS 32 93 5632000
181512227 donkey9 G Nov. 18, 2022, 4:46 p.m. OK GNU C++14 TESTS 26 93 5836800
181529528 China_Wmq G Nov. 18, 2022, 6:41 p.m. OK GNU C++14 TESTS 26 93 5939200
181512365 Krito. G Nov. 18, 2022, 4:46 p.m. OK GNU C++14 TESTS 26 93 8192000
181510678 F_it G Nov. 18, 2022, 4:43 p.m. OK GNU C++14 TESTS 26 108 8704000
181544306 zzuqy G Nov. 18, 2022, 10:29 p.m. OK GNU C++14 TESTS 32 109 5632000
181554158 hututu-7 G Nov. 19, 2022, 3:11 a.m. OK GNU C++17 TESTS 32 62 5324800
181552400 xiaojj G Nov. 19, 2022, 2:37 a.m. OK GNU C++17 TESTS 32 77 2150400
181511645 Deaga G Nov. 18, 2022, 4:45 p.m. OK GNU C++17 TESTS 26 77 2969600
181520078 xjzw G Nov. 18, 2022, 5:18 p.m. OK GNU C++17 TESTS 26 77 4608000
181528835 Dianana G Nov. 18, 2022, 6:33 p.m. OK GNU C++17 TESTS 26 77 7782400
181523090 yl6273500 G Nov. 18, 2022, 5:39 p.m. OK GNU C++17 TESTS 26 78 2150400
181520354 SecondSon G Nov. 18, 2022, 5:19 p.m. OK GNU C++17 TESTS 26 78 3686400
181521488 lddlinan G Nov. 18, 2022, 5:27 p.m. OK GNU C++17 TESTS 26 78 3891200
181516857 Alihan_8 G Nov. 18, 2022, 5 p.m. OK GNU C++17 TESTS 26 78 4300800
181516485 zhanggengchen G Nov. 18, 2022, 4:58 p.m. OK GNU C++17 TESTS 26 78 5324800
181549666 ta4p G Nov. 19, 2022, 1:36 a.m. OK GNU C++17 (64) TESTS 32 61 2560000
181518451 nsuPiece G Nov. 18, 2022, 5:09 p.m. OK GNU C++17 (64) TESTS 26 61 2969600
181520653 qingy__owo G Nov. 18, 2022, 5:21 p.m. OK GNU C++17 (64) TESTS 26 61 4300800
181518292 zwh_zzz G Nov. 18, 2022, 5:08 p.m. OK GNU C++17 (64) TESTS 26 61 7475200
181547664 gqf123 G Nov. 19, 2022, 12:34 a.m. OK GNU C++17 (64) TESTS 32 62 2150400
181518264 joker_x G Nov. 18, 2022, 5:08 p.m. OK GNU C++17 (64) TESTS 26 62 2662400
181515212 PineapplesOnPizza G Nov. 18, 2022, 4:53 p.m. OK GNU C++17 (64) TESTS 26 62 3584000
181522027 qingy__owo G Nov. 18, 2022, 5:30 p.m. OK GNU C++17 (64) TESTS 26 62 4300800
181555500 ingingin G Nov. 19, 2022, 3:36 a.m. OK GNU C++17 (64) TESTS 32 62 5939200
181511525 zero096 G Nov. 18, 2022, 4:44 p.m. OK GNU C++17 (64) TESTS 26 77 6963200
181558863 BambooWind G Nov. 19, 2022, 4:34 a.m. OK GNU C++20 (64) TESTS 32 46 2150400
181553384 kwm_t G Nov. 19, 2022, 2:55 a.m. OK GNU C++20 (64) TESTS 32 46 2150400
181551335 fishcathu. G Nov. 19, 2022, 2:14 a.m. OK GNU C++20 (64) TESTS 32 46 2150400
181520912 cosenza G Nov. 18, 2022, 5:23 p.m. OK GNU C++20 (64) TESTS 26 46 2150400
181518473 dmenezes G Nov. 18, 2022, 5:09 p.m. OK GNU C++20 (64) TESTS 26 46 2560000
181518456 Kidding_M G Nov. 18, 2022, 5:09 p.m. OK GNU C++20 (64) TESTS 26 46 2560000
181557210 130229nbnb G Nov. 19, 2022, 4:06 a.m. OK GNU C++20 (64) TESTS 32 46 2969600
181517810 KenIsGenius G Nov. 18, 2022, 5:05 p.m. OK GNU C++20 (64) TESTS 26 46 4300800
181531666 jieunie G Nov. 18, 2022, 7:05 p.m. OK GNU C++20 (64) TESTS 26 46 4812800
181532381 CLT G Nov. 18, 2022, 7:13 p.m. OK GNU C++20 (64) TESTS 26 46 6553600
181558108 ChenHuaXin G Nov. 19, 2022, 4:21 a.m. OK Java 11 TESTS 32 374 10752000
181520850 ketangupta12 G Nov. 18, 2022, 5:22 p.m. OK Java 11 TESTS 26 405 26112000
181561373 __Serendipity G Nov. 19, 2022, 5:11 a.m. OK Java 11 TESTS 32 452 6451200
181561152 the_unseen G Nov. 19, 2022, 5:08 a.m. OK Java 11 TESTS 32 561 15769600
181522270 merlin_ G Nov. 18, 2022, 5:32 p.m. OK Java 17 TESTS 26 311 4710400
181520507 ketangupta12 G Nov. 18, 2022, 5:20 p.m. OK Java 17 TESTS 26 358 23961600
181515954 Neothehero G Nov. 18, 2022, 4:56 p.m. OK Java 17 TESTS 26 389 3584000
181535188 _tb G Nov. 18, 2022, 7:43 p.m. OK Java 17 TESTS 26 405 12083200
181552791 frey4 G Nov. 19, 2022, 2:44 a.m. OK Java 8 TESTS 32 218 409600
181517354 youtsuha G Nov. 18, 2022, 5:03 p.m. OK Java 8 TESTS 26 233 0
181518922 Mohamed308 G Nov. 18, 2022, 5:11 p.m. OK Java 8 TESTS 26 296 6451200
181511250 Java_Programmer G Nov. 18, 2022, 4:44 p.m. OK Java 8 TESTS 26 311 20992000
181526979 vaibhav_1710 G Nov. 18, 2022, 6:14 p.m. OK Java 8 TESTS 26 342 15769600
181539906 Ahmad_Hoseiny G Nov. 18, 2022, 8:52 p.m. OK Java 8 TESTS 32 343 1024000
181524085 kirill146 G Nov. 18, 2022, 5:47 p.m. OK MS C++ 2017 TESTS 26 295 8806400
181538274 hxu10 G Nov. 18, 2022, 8:25 p.m. OK PyPy 3 TESTS 32 342 18739200
181551235 hkwu6013 G Nov. 19, 2022, 2:11 a.m. OK PyPy 3-64 TESTS 32 233 19148800
181518022 sangram03 G Nov. 18, 2022, 5:06 p.m. OK PyPy 3-64 TESTS 26 233 24064000
181551618 beethoven97 G Nov. 19, 2022, 2:20 a.m. OK PyPy 3-64 TESTS 32 327 16179200
181551313 beethoven97 G Nov. 19, 2022, 2:13 a.m. OK PyPy 3-64 TESTS 32 343 16179200
181545971 biglunchdude G Nov. 18, 2022, 11:25 p.m. OK PyPy 3-64 TESTS 32 343 24780800
181545796 biglunchdude G Nov. 18, 2022, 11:18 p.m. OK PyPy 3-64 TESTS 32 405 27648000
181558779 Ayushman_123 G Nov. 19, 2022, 4:33 a.m. OK PyPy 3-64 TESTS 32 451 30105600
181546052 biglunchdude G Nov. 18, 2022, 11:29 p.m. OK PyPy 3-64 TESTS 32 452 24576000
181520058 aayush_chhabra G Nov. 18, 2022, 5:18 p.m. OK PyPy 3-64 TESTS 26 452 30822400
181516044 redheadphone G Nov. 18, 2022, 4:56 p.m. OK PyPy 3-64 TESTS 26 514 30208000
181522026 TheStrongest G Nov. 18, 2022, 5:30 p.m. OK Python 3 TESTS 26 872 19251200
181513483 happy_zig_user G Nov. 18, 2022, 4:48 p.m. OK Python 3 TESTS 26 904 19251200
181553002 souzajack15 G Nov. 19, 2022, 2:48 a.m. OK Python 3 TESTS 32 998 19251200
181517092 robostac G Nov. 18, 2022, 5:02 p.m. OK Rust 2021 TESTS 26 62 15667200
181518595 avnyu G Nov. 18, 2022, 5:09 p.m. OK Rust 2021 TESTS 26 124 16588800
181511491 ArchUser84 G Nov. 18, 2022, 4:44 p.m. OK Rust 2021 TESTS 26 140 18022400

remove filters

Back to search problems