Codeforces Round 821 (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
1733 Codeforces Round 821 (Div. 2) FINISHED False 7200 68225099 Sept. 19, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 19840 ) B Rule of League PROGRAMMING constructive algorithms math

B"There is a badminton championship in which n players take part. The players are numbered from 1 to n . The championship proceeds as follows: player 1 and player 2 play a game, then the winner and player 3 play a game, and then the winner and player 4 play a game, and so on. So, n-1 games are played, and the winner of the last game becomes the champion. There are no draws in the games. You want to find out the result of championship. Currently, you only know the following information: Given n , x , and y , find out if there is a result that matches this information. The first line contains one integer t ( 1 <= t <= 10^5 ) -- the number of test cases. The only line of each test case contains three integers n , x , y ( 2 <= n <= 10^5 , 0 <= x, y < n ). It is guaranteed that the sum of n over all test cases doesn't exceed 2 cdot 10^5 . Print the answer for each test case, one per line. If there is no result that matches the given information about n , x , y , print -1 . Otherwise, print n-1 space separated integers, where the i -th integer is the player number of the winner of the i -th game. If there are multiple valid results, print any. In the first test case, player 1 and player 4 won x times, player 2 and player 3 won y times. In the second, third, and fifth test cases, no valid result exists. "...

Tutorials

Codeforces Round #821 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
172749998 RGodz B Sept. 19, 2022, 6:04 p.m. OK Clang++17 Diagnostics TESTS 8 1544 0
172785719 JoesSR B Sept. 20, 2022, 5:06 a.m. OK GNU C++14 TESTS 8 31 0
172785037 luoZH111 B Sept. 20, 2022, 4:56 a.m. OK GNU C++14 TESTS 8 31 0
172784689 luoZH111 B Sept. 20, 2022, 4:51 a.m. OK GNU C++14 TESTS 8 31 0
172774352 jzcrq B Sept. 20, 2022, 1:36 a.m. OK GNU C++14 TESTS 8 31 0
172787314 QQH B Sept. 20, 2022, 5:28 a.m. OK GNU C++14 TESTS 8 46 0
172784738 LinkZelda B Sept. 20, 2022, 4:51 a.m. OK GNU C++14 TESTS 8 46 0
172783138 yohuang B Sept. 20, 2022, 4:25 a.m. OK GNU C++14 TESTS 8 46 0
172781666 _DarkHorse_ B Sept. 20, 2022, 3:57 a.m. OK GNU C++14 TESTS 8 46 0
172770963 Icedpiggy B Sept. 20, 2022, 12:24 a.m. OK GNU C++14 TESTS 8 46 0
172770162 zlsim B Sept. 20, 2022, 12:01 a.m. OK GNU C++14 TESTS 8 46 0
172772886 lj_2021 B Sept. 20, 2022, 1:07 a.m. OK GNU C++17 TESTS 8 31 0
172744584 1459007298 B Sept. 19, 2022, 5:22 p.m. OK GNU C++17 TESTS 8 31 7987200
172783953 IliyaV2 B Sept. 20, 2022, 4:38 a.m. OK GNU C++17 TESTS 8 46 0
172782922 shubham1_1 B Sept. 20, 2022, 4:22 a.m. OK GNU C++17 TESTS 8 46 0
172781512 fryezsh B Sept. 20, 2022, 3:55 a.m. OK GNU C++17 TESTS 8 46 0
172779177 12313b B Sept. 20, 2022, 3:13 a.m. OK GNU C++17 TESTS 8 46 0
172777963 W_34 B Sept. 20, 2022, 2:50 a.m. OK GNU C++17 TESTS 8 46 0
172777684 Gorrion_ B Sept. 20, 2022, 2:44 a.m. OK GNU C++17 TESTS 8 46 0
172776975 microne_mzx B Sept. 20, 2022, 2:31 a.m. OK GNU C++17 TESTS 8 46 0
172774853 s39202972 B Sept. 20, 2022, 1:47 a.m. OK GNU C++17 TESTS 8 46 0
172756058 opPO B Sept. 19, 2022, 7:06 p.m. OK GNU C++17 (64) TESTS 8 30 0
172777484 Einstein1234 B Sept. 20, 2022, 2:40 a.m. OK GNU C++17 (64) TESTS 8 30 819200
172789625 Ricarpy_ B Sept. 20, 2022, 6 a.m. OK GNU C++17 (64) TESTS 8 31 0
172786957 KokiYmgch B Sept. 20, 2022, 5:24 a.m. OK GNU C++17 (64) TESTS 8 31 0
172783048 Fury B Sept. 20, 2022, 4:24 a.m. OK GNU C++17 (64) TESTS 8 31 0
172782211 FUNctio_naL B Sept. 20, 2022, 4:09 a.m. OK GNU C++17 (64) TESTS 8 31 0
172780923 Amanmaurya_2012 B Sept. 20, 2022, 3:43 a.m. OK GNU C++17 (64) TESTS 8 31 0
172775999 quangviet B Sept. 20, 2022, 2:11 a.m. OK GNU C++17 (64) TESTS 8 31 0
172775958 LowLightK B Sept. 20, 2022, 2:10 a.m. OK GNU C++17 (64) TESTS 8 31 0
172741347 Abdel-AzizMostafa B Sept. 19, 2022, 5:04 p.m. OK GNU C++17 (64) TESTS 8 31 0

remove filters

Back to search problems