Professional Documents
Culture Documents
Problem - 1659A - Codeforces
Problem - 1659A - Codeforces
|
riteshnub | Logout
You have +385! Wow!
HOME TOP CATALOG CONTESTS GYM PROBLEMSET GROUPS RATING EDU API CALENDAR HELP
00:00:06
You must find a string satisfying the above conditions. If there are multiple answers, print any. → Clone Contest to Mashup
Input You can clone this contest to a mashup.
The first line contains a single integer t (1 ≤ t ≤ 1000) — the number of test cases.
Clone Contest
Each test case has a single line containing three integers n, r , and b (3 ≤ n ≤ 100 ;
1 ≤ b < r ≤ n , r + b = n).
→ Submit?
Output
For each test case, output a single line containing a string satisfying the given conditions. If
Language: GNU G++17 7.3.0
there are multiple answers, print any.
Choose
Choose File No file chosen
Examples file:
3
7 4 3
6 5 1
19 13 6
→ Problem tags
6
Announcement (en)
3 2 1
10 6 4 Tutorial (en)
11 6 5
10 9 1
10 8 2
11 9 2
output Copy
RBR
RRBRBRBRBR
RBRBRBRBRBR
RRRRRBRRRR
RRRBRRRBRR
RRRBRRRBRRR
https://codeforces.com/problemset/problem/1659/A 1/2
4/2/24, 9:01 AM Problem - 1659A - Codeforces
Note
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.
Supported by
https://codeforces.com/problemset/problem/1659/A 2/2