Codeforces Round 922 (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
1918 Codeforces Round 922 (Div. 2) FINISHED False 7800 30554663 Jan. 30, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 489 ) G Permutation of Given PROGRAMMING brute force constructive algorithms

B'You were given only one number, n . It didn 't seem interesting to you, so you wondered if it 's possible to come up with an array of length n consisting of non-zero integers, such that if each element of the array is replaced by the sum of its neighbors (the elements on the ends are replaced by their only neighbors), you obtain a permutation of the numbers in the original array. Each test case contains only one number, n ( 2 <= q n <= q 10^6 ). If a solution exists, output "YES" (without quotes), followed by an array a ( -10^9 <= q a_i <= q 10^9, a_i neq 0 ) that satisfies the condition of the problem. If there are multiple possible answers, output any of them. If there is no suitable array, output "NO" (without quotes). The words "YES" and "NO" can be output in any case, for example, "YES", "Yes", "yEs", and so on. In the first test, the array [ 1, 2, -2, -1 ] is suitable, because if each element is replaced by the sum of its neighbors, the resulting array is [ 2, -1, 1, -2 ], which is a permutation of the original array. In the second test, it can be shown that there is no solution. '...

Tutorials

Codeforces Round #922 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
244167261 CriticalSpy G Jan. 30, 2024, 7:44 p.m. OK GNU C++17 TESTS 201 46 1024000
244197542 hht2005 G Jan. 31, 2024, 3:55 a.m. OK GNU C++17 TESTS 201 124 3993600
244198026 rocky180304 G Jan. 31, 2024, 4:01 a.m. OK GNU C++17 TESTS 201 155 12697600
244171798 3rdSS G Jan. 30, 2024, 8:30 p.m. OK GNU C++17 TESTS 201 156 7884800
244178559 liympanda G Jan. 30, 2024, 10:05 p.m. OK GNU C++17 TESTS 201 156 12595200
244172268 Md._Nahid_Ullah_Joy G Jan. 30, 2024, 8:35 p.m. OK GNU C++17 TESTS 201 187 3993600
244205381 Tima3 G Jan. 31, 2024, 5:19 a.m. OK GNU C++17 TESTS 201 187 12288000
244189802 liujg G Jan. 31, 2024, 2:08 a.m. OK GNU C++17 TESTS 201 202 0
244195783 stoDiwanulorz G Jan. 31, 2024, 3:31 a.m. OK GNU C++17 TESTS 201 358 12083200
244185052 chappy1 G Jan. 31, 2024, 12:38 a.m. OK GNU C++17 (64) TESTS 201 46 8294400
244184998 ImmortaLimit G Jan. 31, 2024, 12:37 a.m. OK GNU C++17 (64) TESTS 201 46 16793600
244200092 _wrpwrp G Jan. 31, 2024, 4:30 a.m. OK GNU C++17 (64) TESTS 201 93 0
244197292 huanixel G Jan. 31, 2024, 3:52 a.m. OK GNU C++17 (64) TESTS 201 109 3993600
244193241 Duck_sajin G Jan. 31, 2024, 2:58 a.m. OK GNU C++17 (64) TESTS 201 109 7987200
244203143 AC-Automation G Jan. 31, 2024, 4:55 a.m. OK GNU C++17 (64) TESTS 201 124 7987200
244184932 Crystally G Jan. 31, 2024, 12:36 a.m. OK GNU C++17 (64) TESTS 201 124 19558400
244200748 pp_orange G Jan. 31, 2024, 4:38 a.m. OK GNU C++17 (64) TESTS 201 139 3993600
244154704 Rubikun G Jan. 30, 2024, 6:19 p.m. OK GNU C++17 (64) TESTS 201 140 11571200
244158174 rainboy G Jan. 30, 2024, 6:36 p.m. OK GNU C++17 (64) TESTS 201 280 13926400
244191120 Sin_Watt G Jan. 31, 2024, 2:27 a.m. OK GNU C++20 (64) TESTS 201 46 0
244189965 xiaozengX G Jan. 31, 2024, 2:10 a.m. OK GNU C++20 (64) TESTS 201 46 0
244155676 sss G Jan. 30, 2024, 6:23 p.m. OK GNU C++20 (64) TESTS 201 46 0
244195827 innocentkitten G Jan. 31, 2024, 3:31 a.m. OK GNU C++20 (64) TESTS 201 77 0
244200389 Retired_Isaunoya G Jan. 31, 2024, 4:33 a.m. OK GNU C++20 (64) TESTS 201 78 0
244174878 SharpEdged G Jan. 30, 2024, 9:08 p.m. OK GNU C++20 (64) TESTS 201 78 0
244174475 opPO G Jan. 30, 2024, 9:02 p.m. OK GNU C++20 (64) TESTS 201 78 0
244208676 propane G Jan. 31, 2024, 5:50 a.m. OK GNU C++20 (64) TESTS 201 78 11571200
244156846 ttamx G Jan. 30, 2024, 6:28 p.m. OK GNU C++20 (64) TESTS 201 92 11571200
244158077 magnus.hegdahl G Jan. 30, 2024, 6:35 p.m. OK GNU C++20 (64) TESTS 201 93 3993600
244140796 JaredGoff G Jan. 30, 2024, 4:34 p.m. OK Kotlin 1.9 TESTS 201 405 21401600
244208811 huangxw G Jan. 31, 2024, 5:51 a.m. OK PyPy 3-64 TESTS 201 280 143667200
244187051 Little_Sheep_Yawn G Jan. 31, 2024, 1:18 a.m. OK PyPy 3-64 TESTS 201 343 78643200
244135792 Eunha G Jan. 30, 2024, 4:21 p.m. OK PyPy 3-64 TESTS 201 763 27033600

remove filters

Back to search problems