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 |
1297
|
Kotlin Heroes: Episode 3 |
FINISHED |
False |
9000 |
154542311 |
Feb. 27, 2020, 1:35 p.m. |
Problems
B"You are given a string s of lowercase Latin letters. It is required to paint each letter of the string in one of two colors (red or blue) so that if you write all the red letters from left to right and write all the blue letters from left to right, then the lexicographically maximum of the two written strings is lexicographically minimal. For each index, in the string s you can choose either of two colors. Formally, we write out: Your task is to paint the string such that max(r, b) is minimal. Small reminder: the empty string is the lexicographically smallest string. The first line contains an integer t ( 1 <= t <= 100 ) -- the number of test cases in the test. Next, the test cases are given, one per line. Each test case is a non-empty string s of length between 2 to 100 characters, inclusive, which consists of lowercase Latin letters. Print t lines, the i -th of them should contain the answer to the i -th test case of the input. Print a string of length n , where n is the length of the given string s : the j -th character of the string should be either 'R'or 'B' depending on the color of the j -th character in the answer (painted in red or blue). If there are several possible answers, print any of them. "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
72069379 |
krijgertje |
H |
Feb. 29, 2020, 12:17 a.m. |
OK |
Kotlin |
TESTS |
115 |
140 |
0 |
|
|
72151783 |
tommykw |
H |
March 1, 2020, 10:04 a.m. |
OK |
Kotlin |
TESTS |
115 |
155 |
0 |
|
|
72049367 |
cjtoribio |
H |
Feb. 28, 2020, 4:26 p.m. |
OK |
Kotlin |
TESTS |
115 |
187 |
1126400 |
|
|
71981312 |
tourist |
H |
Feb. 27, 2020, 2:34 p.m. |
OK |
Kotlin |
TESTS |
115 |
233 |
1228800 |
|
|
72134624 |
Spheniscine |
H |
March 1, 2020, 5:58 a.m. |
OK |
Kotlin |
TESTS |
115 |
326 |
204800 |
|
|
71991025 |
knightL |
H |
Feb. 27, 2020, 4:39 p.m. |
OK |
Kotlin |
TESTS |
115 |
342 |
204800 |
|
|
72006815 |
darnley |
H |
Feb. 27, 2020, 11:26 p.m. |
OK |
Kotlin |
TESTS |
115 |
358 |
1433600 |
|
|
72129110 |
Spheniscine |
H |
March 1, 2020, 2:46 a.m. |
OK |
Kotlin |
TESTS |
115 |
374 |
1126400 |
|
|
71988096 |
darnley |
H |
Feb. 27, 2020, 4:02 p.m. |
OK |
Kotlin |
TESTS |
115 |
390 |
512000 |
|
|
72005891 |
darnley |
H |
Feb. 27, 2020, 10:42 p.m. |
OK |
Kotlin |
TESTS |
115 |
420 |
614400 |
|
|
remove filters
Back to search problems