Codeforces Round 732 (Div. 1)

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
1545 Codeforces Round 732 (Div. 1) FINISHED False 9000 111254063 July 11, 2021, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 14112 ) A AquaMoon and Strange Sort PROGRAMMING sortings 1500

B'AquaMoon has n friends. They stand in a row from left to right, and the i -th friend from the left wears a T-shirt with a number a_i written on it. Each friend has a direction (left or right). In the beginning, the direction of each friend is right. AquaMoon can make some operations on friends. On each operation, AquaMoon can choose two adjacent friends and swap their positions. After each operation, the direction of both chosen friends will also be flipped: left to right and vice versa. AquaMoon hopes that after some operations, the numbers written on the T-shirt of n friends in the row, read from left to right, become non-decreasing. Also she wants, that all friends will have a direction of right at the end. Please find if it is possible. The input consists of multiple test cases. The first line contains a single integer t ( 1 <= q t <= q 50 ) -- the number of test cases. The first line of each test case contains a single integer n ( 1 <= q n <= q 10^5 ) -- the number of Aquamoon 's friends. The second line contains n integers a_1, a_2, ... , a_n ( 1 <= q a_i <= q 10^5 ) -- the numbers, written on the T-shirts. It is guaranteed that the sum of n for all test cases does not exceed 10^5 . For each test case, if there exists a possible sequence of operations, print "YES" (without quotes); otherwise, print "NO" (without quotes). You can print each letter in any case (upper or lower). The possible list of operations in the first test case: '...

Tutorials

Codeforces Round #732 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
122076522 Gassa A July 11, 2021, 2:11 p.m. OK D TESTS 97 93 8908800 1500
122076282 18Michael A July 11, 2021, 2:10 p.m. OK GNU C++11 TESTS 97 31 4710400 1500
122077106 KaiSuoShuTong A July 11, 2021, 2:12 p.m. OK GNU C++11 TESTS 97 31 4710400 1500
122154828 xiaoziyao A July 11, 2021, 11:44 p.m. OK GNU C++11 TESTS 97 31 4915200 1500
122138438 Lidox1145143344 A July 11, 2021, 6:18 p.m. OK GNU C++11 TESTS 97 31 5120000 1500
122078595 unputdownable A July 11, 2021, 2:15 p.m. OK GNU C++11 TESTS 97 31 5120000 1500
122171374 unputdownable A July 12, 2021, 5:26 a.m. OK GNU C++11 TESTS 97 31 5120000 1500
122165836 moyujiang A July 12, 2021, 3:53 a.m. OK GNU C++11 TESTS 97 31 5120000 1500
122163303 xgzc A July 12, 2021, 3:08 a.m. OK GNU C++11 TESTS 97 31 5120000 1500
122154880 xgzc A July 11, 2021, 11:46 p.m. OK GNU C++11 TESTS 97 31 5120000 1500
122076319 msuwakow A July 11, 2021, 2:11 p.m. OK GNU C++11 TESTS 97 31 5222400 1500
122161093 mokshith002 A July 12, 2021, 2:29 a.m. OK GNU C++14 TESTS 97 46 4505600 1500
122075854 ugly2333 A July 11, 2021, 2:09 p.m. OK GNU C++14 TESTS 97 46 4608000 1500
122079305 Sohsoh84 A July 11, 2021, 2:16 p.m. OK GNU C++14 TESTS 97 46 4710400 1500
122077054 In_Max A July 11, 2021, 2:12 p.m. OK GNU C++14 TESTS 97 46 4915200 1500
122091633 bitoy A July 11, 2021, 2:38 p.m. OK GNU C++14 TESTS 97 46 4915200 1500
122084909 AlternatingCurrent A July 11, 2021, 2:26 p.m. OK GNU C++14 TESTS 97 46 4915200 1500
122169227 8e7 A July 12, 2021, 4:53 a.m. OK GNU C++14 TESTS 97 46 4915200 1500
122169142 SuperJ6 A July 12, 2021, 4:52 a.m. OK GNU C++14 TESTS 97 46 4915200 1500
122155055 18380120126 A July 11, 2021, 11:53 p.m. OK GNU C++14 TESTS 97 46 4915200 1500
122122605 _HossamYehia_ A July 11, 2021, 4:04 p.m. OK GNU C++14 TESTS 97 46 4915200 1500
122075736 iaNTU A July 11, 2021, 2:08 p.m. OK GNU C++17 TESTS 97 31 5017600 1500
122078770 tapir1729 A July 11, 2021, 2:15 p.m. OK GNU C++17 TESTS 97 46 4096000 1500
122078018 AmirrzwM A July 11, 2021, 2:14 p.m. OK GNU C++17 TESTS 97 46 4505600 1500
122117318 Yuri123581321 A July 11, 2021, 3:45 p.m. OK GNU C++17 TESTS 97 46 4505600 1500
122084275 gs21114 A July 11, 2021, 2:25 p.m. OK GNU C++17 TESTS 97 46 4505600 1500
122170386 ooaa A July 12, 2021, 5:13 a.m. OK GNU C++17 TESTS 97 46 4505600 1500
122078692 Parliament A July 11, 2021, 2:15 p.m. OK GNU C++17 TESTS 97 46 4710400 1500
122140803 flashmt A July 11, 2021, 6:52 p.m. OK GNU C++17 TESTS 97 46 4710400 1500
122089106 Drice A July 11, 2021, 2:34 p.m. OK GNU C++17 TESTS 97 46 4915200 1500
122134957 yan_qiu_ynlchrz A July 11, 2021, 5:40 p.m. OK GNU C++17 TESTS 97 46 4915200 1500
122075962 fastfurioustransform A July 11, 2021, 2:09 p.m. OK GNU C++17 (64) TESTS 97 31 5222400 1500
122075909 risujiroh A July 11, 2021, 2:09 p.m. OK GNU C++17 (64) TESTS 97 31 5632000 1500
122075652 ainta A July 11, 2021, 2:07 p.m. OK GNU C++17 (64) TESTS 97 31 5734400 1500
122076192 yosupo A July 11, 2021, 2:10 p.m. OK GNU C++17 (64) TESTS 97 31 6041600 1500
122164468 yz6205 A July 12, 2021, 3:28 a.m. OK GNU C++17 (64) TESTS 97 31 6656000 1500
122076623 Lemonade255 A July 11, 2021, 2:11 p.m. OK GNU C++17 (64) TESTS 97 31 7475200 1500
122081388 CartesianTree A July 11, 2021, 2:20 p.m. OK GNU C++17 (64) TESTS 97 31 7987200 1500
122076270 LayCurse A July 11, 2021, 2:10 p.m. OK GNU C++17 (64) TESTS 97 31 103833600 1500
122075936 ecnerwala A July 11, 2021, 2:09 p.m. OK GNU C++17 (64) TESTS 97 46 4710400 1500
122141315 ScarletS A July 11, 2021, 7:01 p.m. OK GNU C++17 (64) TESTS 97 46 5120000 1500
122076513 clyring A July 11, 2021, 2:11 p.m. OK Haskell TESTS 97 156 21094400 1500
122157098 codelegend A July 12, 2021, 1 a.m. OK Haskell TESTS 97 685 56832000 1500
122075722 uwi A July 11, 2021, 2:08 p.m. OK Java 11 TESTS 97 218 24064000 1500
122138844 spiraljava A July 11, 2021, 6:23 p.m. OK Java 11 TESTS 97 234 24780800 1500
122080600 2020akadaver A July 11, 2021, 2:18 p.m. OK Java 11 TESTS 97 249 23859200 1500
122108543 cirno3153 A July 11, 2021, 3:17 p.m. OK Java 11 TESTS 97 249 23961600 1500
122079540 martins A July 11, 2021, 2:16 p.m. OK Java 11 TESTS 97 638 30310400 1500
122077690 iakovlev.zakhar A July 11, 2021, 2:13 p.m. OK Java 8 TESTS 97 156 20787200 1500
122119800 hu_tao A July 11, 2021, 3:53 p.m. OK Java 8 TESTS 97 171 21401600 1500
122089786 DarLam A July 11, 2021, 2:35 p.m. OK Java 8 TESTS 97 171 21504000 1500
122154647 hu_tao A July 11, 2021, 11:37 p.m. OK Java 8 TESTS 97 186 21299200 1500
122138246 FlameFire A July 11, 2021, 6:15 p.m. OK Java 8 TESTS 97 639 24064000 1500
122086922 Hakiobo A July 11, 2021, 2:30 p.m. OK Kotlin TESTS 97 171 22835200 1500
122076809 Tlatoani A July 11, 2021, 2:12 p.m. OK Kotlin TESTS 97 264 26726400 1500
122082956 knightL A July 11, 2021, 2:23 p.m. OK Kotlin TESTS 97 311 26624000 1500
122079701 vpike A July 11, 2021, 2:17 p.m. OK MS C++ 2017 TESTS 97 93 4505600 1500
122128523 Friska A July 11, 2021, 4:27 p.m. OK MS C++ 2017 TESTS 97 93 4915200 1500
122080466 kirill146 A July 11, 2021, 2:18 p.m. OK MS C++ 2017 TESTS 97 140 7372800 1500
122085289 Catmoonlight A July 11, 2021, 2:27 p.m. OK MS C++ 2017 TESTS 97 140 8601600 1500
122079589 terry_u16 A July 11, 2021, 2:17 p.m. OK .NET Core C# TESTS 97 124 14540800 1500
122075858 Yupiteru A July 11, 2021, 2:09 p.m. OK .NET Core C# TESTS 97 155 20377600 1500
122135598 PiKa_PiKaa_chuuu A July 11, 2021, 5:45 p.m. OK PyPy 3 TESTS 97 156 29388800 1500
122075730 hir35 A July 11, 2021, 2:08 p.m. OK PyPy 3 TESTS 97 171 30515200 1500
122136117 STommydx A July 11, 2021, 5:50 p.m. OK PyPy 3 TESTS 97 171 31129600 1500
122135883 STommydx A July 11, 2021, 5:48 p.m. OK PyPy 3 TESTS 97 186 31027200 1500
122136393 STommydx A July 11, 2021, 5:53 p.m. OK PyPy 3 TESTS 97 187 31027200 1500
122137372 STommydx A July 11, 2021, 6:05 p.m. OK PyPy 3 TESTS 97 187 31129600 1500
122075888 SPD_9X2 A July 11, 2021, 2:09 p.m. OK PyPy 3 TESTS 97 187 31641600 1500
122135756 STommydx A July 11, 2021, 5:47 p.m. OK PyPy 3 TESTS 97 187 35020800 1500
122095695 musdolph A July 11, 2021, 2:46 p.m. OK PyPy 3 TESTS 97 202 31334400 1500
122075851 VTifand A July 11, 2021, 2:09 p.m. OK PyPy 3 TESTS 97 202 33075200 1500
122142168 Akhand... A July 11, 2021, 7:17 p.m. OK Python 3 TESTS 97 217 14131200 1500
122143643 belkka A July 11, 2021, 7:45 p.m. OK Python 3 TESTS 97 280 21196800 1500
122088298 nagiss A July 11, 2021, 2:32 p.m. OK Python 3 TESTS 97 342 19865600 1500
122093100 cottoncotton A July 11, 2021, 2:41 p.m. OK Rust TESTS 97 31 4915200 1500
122075789 sansen A July 11, 2021, 2:09 p.m. OK Rust TESTS 97 46 6451200 1500

remove filters

Back to search problems