Codeforces Round 782 (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
1659 Codeforces Round 782 (Div. 2) FINISHED False 8100 87060263 April 17, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 20024 ) A Red Versus Blue PROGRAMMING constructive algorithms greedy implementation math

B'Team Red and Team Blue competed in a competitive FPS. Their match was streamed around the world. They played a series of n matches. In the end, it turned out Team Red won r times and Team Blue won b times. Team Blue was less skilled than Team Red, so b was strictly less than r . You missed the stream since you overslept, but you think that the match must have been neck and neck since so many people watched it. So you imagine a string of length n where the i -th character denotes who won the i -th match -- it is R if Team Red won or B if Team Blue won. You imagine the string was such that the maximum number of times a team won in a row was as small as possible. For example, in the series of matches RBBRRRB, Team Red won 3 times in a row, which is the maximum. You must find a string satisfying the above conditions. If there are multiple answers, print any. The first line contains a single integer t ( 1 <= t <= 1000 ) -- the number of test cases. Each test case has a single line containing three integers n , r , and b ( 3 <= q n <= q 100 ; 1 <= q b < r <= q n , r+b=n ). For each test case, output a single line containing a string satisfying the given conditions. If there are multiple answers, print any. The first test case of the first example gives the optimal answer for the example in the statement. The maximum number of times a team wins in a row in RBRBRBR is 1 . We cannot minimize it any further. The answer for the second test case of the second example is RRBRBRBRBR. The maximum number of times a team wins in a row is 2 , given by RR at the beginning. We cannot minimize the answer any further. '...

Tutorials

Codeforces Round #782 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
153945051 Pendem A April 17, 2022, 6:29 p.m. OK Clang++17 Diagnostics TESTS 12 46 0
153926111 quochuong2006 A April 17, 2022, 3:59 p.m. OK FPC TESTS 12 30 1331200
153934996 1435730 A April 17, 2022, 4:35 p.m. OK GNU C11 TESTS 12 15 0
153930899 tejava A April 17, 2022, 4:18 p.m. OK GNU C11 TESTS 12 15 0
153925129 0taku A April 17, 2022, 3:56 p.m. OK GNU C11 TESTS 12 31 0
153970806 Sempr A April 18, 2022, 5:39 a.m. OK GNU C11 TESTS 12 31 0
153959450 hnust_liuyuxin9 A April 18, 2022, 12:49 a.m. OK GNU C11 TESTS 12 187 0
153934184 rootc_jc A April 17, 2022, 4:31 p.m. OK GNU C11 TESTS 12 358 0
153946709 Swastik03 A April 17, 2022, 6:59 p.m. OK GNU C11 TESTS 12 373 0
153930780 hnust_suru A April 17, 2022, 4:17 p.m. OK GNU C11 TESTS 12 374 0
153947177 Mhkhancou A April 17, 2022, 7:08 p.m. OK GNU C11 TESTS 12 374 0
153928171 hnust_jiangjianbo A April 17, 2022, 4:07 p.m. OK GNU C11 TESTS 12 374 0
153971677 tyang A April 18, 2022, 5:57 a.m. OK GNU C++14 TESTS 12 15 0
153969839 The_Hawk_returns A April 18, 2022, 5:20 a.m. OK GNU C++14 TESTS 12 15 0
153970197 ydmyyyds A April 18, 2022, 5:27 a.m. OK GNU C++14 TESTS 12 15 0
153971881 gauravgk A April 18, 2022, 6:01 a.m. OK GNU C++14 TESTS 12 15 0
153969715 chandler1837 A April 18, 2022, 5:17 a.m. OK GNU C++14 TESTS 12 15 0
153970597 Leonador A April 18, 2022, 5:36 a.m. OK GNU C++14 TESTS 12 15 0
153970685 ethane991 A April 18, 2022, 5:37 a.m. OK GNU C++14 TESTS 12 15 0
153970961 CDUT_LYJ A April 18, 2022, 5:43 a.m. OK GNU C++14 TESTS 12 15 0
153971168 mananparihar03 A April 18, 2022, 5:47 a.m. OK GNU C++14 TESTS 12 15 0
153971190 vansh_69420 A April 18, 2022, 5:48 a.m. OK GNU C++14 TESTS 12 15 0
153963696 Arshadshahoriar A April 18, 2022, 3:05 a.m. OK GNU C++17 TESTS 12 0 0
153955589 YamanAbdullah A April 17, 2022, 10:27 p.m. OK GNU C++17 TESTS 12 0 0
153933276 nitinsh35 A April 17, 2022, 4:28 p.m. OK GNU C++17 TESTS 12 0 0
153924064 prajjwal333 A April 17, 2022, 3:52 p.m. OK GNU C++17 TESTS 12 0 0
153926286 Armita.Alimardani A April 17, 2022, 4 p.m. OK GNU C++17 TESTS 12 0 102400
153964280 mostafasazid A April 18, 2022, 3:22 a.m. OK GNU C++17 TESTS 12 0 102400
153940364 viwreck A April 17, 2022, 5:23 p.m. OK GNU C++17 TESTS 12 0 102400
153938368 FrankS A April 17, 2022, 4:49 p.m. OK GNU C++17 TESTS 12 0 204800
153971925 Mr.Variable A April 18, 2022, 6:02 a.m. OK GNU C++17 TESTS 12 15 0
153971772 akashatgml88 A April 18, 2022, 5:59 a.m. OK GNU C++17 TESTS 12 15 0
153926354 thomasyu A April 17, 2022, 4 p.m. OK GNU C++17 (64) TESTS 12 0 0
153971132 MisbahUddinTareQ A April 18, 2022, 5:47 a.m. OK GNU C++17 (64) TESTS 12 15 0
153971194 MisbahUddinTareQ A April 18, 2022, 5:48 a.m. OK GNU C++17 (64) TESTS 12 15 0
153970894 asawa.harsh A April 18, 2022, 5:41 a.m. OK GNU C++17 (64) TESTS 12 15 0
153970841 Divyansh26 A April 18, 2022, 5:40 a.m. OK GNU C++17 (64) TESTS 12 15 0
153970067 SaeedSabbagh A April 18, 2022, 5:24 a.m. OK GNU C++17 (64) TESTS 12 15 0
153969149 julianferres A April 18, 2022, 5:07 a.m. OK GNU C++17 (64) TESTS 12 15 0
153968423 cjtodl A April 18, 2022, 4:53 a.m. OK GNU C++17 (64) TESTS 12 15 0
153968132 one_day A April 18, 2022, 4:48 a.m. OK GNU C++17 (64) TESTS 12 15 0
153968091 isheoran A April 18, 2022, 4:47 a.m. OK GNU C++17 (64) TESTS 12 15 0
153930030 hghgh A April 17, 2022, 4:14 p.m. OK GNU C++20 (64) TESTS 12 0 0
153940536 alive A April 17, 2022, 5:25 p.m. OK GNU C++20 (64) TESTS 12 0 0
153940928 ScorpioDagger A April 17, 2022, 5:29 p.m. OK GNU C++20 (64) TESTS 12 0 0
153942883 YENGOYAN A April 17, 2022, 5:54 p.m. OK GNU C++20 (64) TESTS 12 0 0
153949524 code0rdie A April 17, 2022, 7:56 p.m. OK GNU C++20 (64) TESTS 12 0 0
153959385 hansj A April 18, 2022, 12:46 a.m. OK GNU C++20 (64) TESTS 12 0 0
153959911 Lavine A April 18, 2022, 1:08 a.m. OK GNU C++20 (64) TESTS 12 0 0
153967366 anonymous_3301 A April 18, 2022, 4:35 a.m. OK GNU C++20 (64) TESTS 12 0 0
153968507 not_Rangan A April 18, 2022, 4:54 a.m. OK GNU C++20 (64) TESTS 12 0 0
153971835 Harsha221B A April 18, 2022, 6 a.m. OK GNU C++20 (64) TESTS 12 0 0
153934960 not_good_enough_yet A April 17, 2022, 4:35 p.m. OK Go TESTS 12 15 409600
153924141 koqo A April 17, 2022, 3:52 p.m. OK Go TESTS 12 30 307200
153955214 Mrinall A April 17, 2022, 10:14 p.m. OK Java 11 TESTS 12 156 0
153944727 Spidey2182 A April 17, 2022, 6:24 p.m. OK Java 11 TESTS 12 156 0
153964701 MindSlayer A April 18, 2022, 3:32 a.m. OK Java 11 TESTS 12 171 0
153944814 MrBruh420 A April 17, 2022, 6:25 p.m. OK Java 11 TESTS 12 171 0
153943358 _ryan18_ A April 17, 2022, 6:02 p.m. OK Java 11 TESTS 12 171 0
153941324 yudi23 A April 17, 2022, 5:34 p.m. OK Java 11 TESTS 12 171 0
153940538 MatthewRaker A April 17, 2022, 5:25 p.m. OK Java 11 TESTS 12 171 0
153945937 Saell A April 17, 2022, 6:46 p.m. OK Java 11 TESTS 12 171 102400
153941589 mbfeci A April 17, 2022, 5:37 p.m. OK Java 11 TESTS 12 186 0
153969472 aamir_1102 A April 18, 2022, 5:13 a.m. OK Java 11 TESTS 12 187 0
153957332 abdoad941 A April 17, 2022, 11:30 p.m. OK Java 8 TESTS 12 93 0
153954561 NerfThis A April 17, 2022, 9:53 p.m. OK Java 8 TESTS 12 93 0
153943660 VishuTomar A April 17, 2022, 6:06 p.m. OK Java 8 TESTS 12 93 0
153962537 Abdallah_Ragab00 A April 18, 2022, 2:34 a.m. OK Java 8 TESTS 12 108 0
153947019 KhadijaBadrawy A April 17, 2022, 7:05 p.m. OK Java 8 TESTS 12 108 0
153940591 Calolith A April 17, 2022, 5:25 p.m. OK Java 8 TESTS 12 108 0
153940264 MagentaCobra A April 17, 2022, 5:22 p.m. OK Java 8 TESTS 12 108 0
153964415 amit_roy A April 18, 2022, 3:25 a.m. OK Java 8 TESTS 12 109 0
153960245 ss804 A April 18, 2022, 1:20 a.m. OK Java 8 TESTS 12 109 0
153952789 sachintbaghel A April 17, 2022, 9:07 p.m. OK Java 8 TESTS 12 109 0
153933827 PeredurOmega A April 17, 2022, 4:30 p.m. OK Kotlin 1.4 TESTS 12 109 0
153928587 Sarievo A April 17, 2022, 4:09 p.m. OK Kotlin 1.4 TESTS 12 124 0
153926538 meinego A April 17, 2022, 4:01 p.m. OK Kotlin 1.4 TESTS 12 140 0
153931775 rkmelody A April 17, 2022, 4:21 p.m. OK Kotlin 1.5 TESTS 12 233 0
153968960 Abdelrahmanmagdi A April 18, 2022, 5:03 a.m. OK MS C++ 2017 TESTS 12 15 0
153959669 Markstiff A April 18, 2022, 12:58 a.m. OK MS C++ 2017 TESTS 12 15 0
153959559 typeryougishiki A April 18, 2022, 12:53 a.m. OK MS C++ 2017 TESTS 12 15 0
153942934 andrey_s A April 17, 2022, 5:55 p.m. OK MS C++ 2017 TESTS 12 15 0
153941017 deyilhou A April 17, 2022, 5:30 p.m. OK MS C++ 2017 TESTS 12 15 0
153940581 _Rimjhim_36 A April 17, 2022, 5:25 p.m. OK MS C++ 2017 TESTS 12 15 0
153937723 Anonymous0617 A April 17, 2022, 4:47 p.m. OK MS C++ 2017 TESTS 12 15 0
153931083 jqingly A April 17, 2022, 4:18 p.m. OK MS C++ 2017 TESTS 12 15 0
153929650 kotprogrammist A April 17, 2022, 4:13 p.m. OK MS C++ 2017 TESTS 12 15 0
153927989 DmtrPpl A April 17, 2022, 4:06 p.m. OK MS C++ 2017 TESTS 12 15 0
153940438 sksshivam007 A April 17, 2022, 5:24 p.m. OK PyPy 2 TESTS 12 139 8294400
153942029 hitarthk_9 A April 17, 2022, 5:43 p.m. OK PyPy 2 TESTS 12 171 2252800
153941065 1_2_3_4_5_9 A April 17, 2022, 5:31 p.m. OK PyPy 2 TESTS 12 186 2764800
153944177 kals A April 17, 2022, 6:14 p.m. OK PyPy 3 TESTS 12 93 1945600
153933750 randomlurker A April 17, 2022, 4:30 p.m. OK PyPy 3 TESTS 12 108 2048000
153968728 abhijeet.panihar.cse20 A April 18, 2022, 4:58 a.m. OK PyPy 3 TESTS 12 124 2764800
153945161 random__person A April 17, 2022, 6:31 p.m. OK PyPy 3 TESTS 12 124 3993600
153937033 curious600171 A April 17, 2022, 4:44 p.m. OK PyPy 3 TESTS 12 140 4710400
153929490 seraph14 A April 17, 2022, 4:12 p.m. OK PyPy 3 TESTS 12 140 5222400
153960341 carpenter_bee A April 18, 2022, 1:24 a.m. OK PyPy 3 TESTS 12 155 3276800
153934926 aijdwr127 A April 17, 2022, 4:34 p.m. OK PyPy 3 TESTS 12 155 3379200
153936292 Naren_1234 A April 17, 2022, 4:41 p.m. OK PyPy 3 TESTS 12 155 3584000
153925019 akshat11 A April 17, 2022, 3:55 p.m. OK PyPy 3 TESTS 12 155 3584000
153946947 unknownSolver A April 17, 2022, 7:04 p.m. OK PyPy 3-64 TESTS 12 77 2457600
153926120 orsikus A April 17, 2022, 3:59 p.m. OK PyPy 3-64 TESTS 12 77 2457600
153945261 mayank35 A April 17, 2022, 6:33 p.m. OK PyPy 3-64 TESTS 12 77 4505600
153956197 bsheep014 A April 17, 2022, 10:48 p.m. OK PyPy 3-64 TESTS 12 92 3788800
153967841 raushnn A April 18, 2022, 4:43 a.m. OK PyPy 3-64 TESTS 12 92 4915200
153970032 Code_Breaker101 A April 18, 2022, 5:24 a.m. OK PyPy 3-64 TESTS 12 93 3686400
153962246 sp_Piyush A April 18, 2022, 2:24 a.m. OK PyPy 3-64 TESTS 12 93 4812800
153944670 majay1638 A April 17, 2022, 6:23 p.m. OK PyPy 3-64 TESTS 12 93 4915200
153935252 sp_Piyush A April 17, 2022, 4:36 p.m. OK PyPy 3-64 TESTS 12 93 4915200
153959658 sjNxksbzj A April 18, 2022, 12:58 a.m. OK PyPy 3-64 TESTS 12 93 5120000
153952263 Rainmaker2627 A April 17, 2022, 8:54 p.m. OK Python 3 TESTS 12 31 0
153970871 eugalt A April 18, 2022, 5:41 a.m. OK Python 3 TESTS 12 46 0
153961705 __declspec A April 18, 2022, 2:07 a.m. OK Python 3 TESTS 12 46 0
153952053 Rainmaker2627 A April 17, 2022, 8:50 p.m. OK Python 3 TESTS 12 46 0
153950639 nkcrg060497 A April 17, 2022, 8:20 p.m. OK Python 3 TESTS 12 46 0
153948576 eugalt A April 17, 2022, 7:37 p.m. OK Python 3 TESTS 12 46 0
153948291 eugalt A April 17, 2022, 7:31 p.m. OK Python 3 TESTS 12 46 0
153946886 Quvonchbek_Umurzoqov A April 17, 2022, 7:02 p.m. OK Python 3 TESTS 12 46 0
153941606 eugalt A April 17, 2022, 5:37 p.m. OK Python 3 TESTS 12 46 0
153937513 purple_haze1 A April 17, 2022, 4:46 p.m. OK Python 3 TESTS 12 46 0
153933527 SathemBite A April 17, 2022, 4:29 p.m. OK Rust 2021 TESTS 12 15 0
153928401 RustyInCP A April 17, 2022, 4:08 p.m. OK Rust 2021 TESTS 12 15 0
153971479 Spheniscine A April 18, 2022, 5:53 a.m. OK Rust 2021 TESTS 12 15 102400

remove filters

Back to search problems