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 |
|---|---|---|---|---|---|---|
| 2011 | Kotlin Heroes: Episode 11 | FINISHED | False | 9000 | 48698723 | Sept. 30, 2024, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 182 ) | E | Rock-Paper-Scissors Bot | PROGRAMMING | *special greedy strings |
Rock-Paper-Scissors is a game for two players. It is played in rounds. During each round, every player chooses one of three moves: Rock, Paper, or Scissors. Depending on the chosen moves, the following happens: if one player chooses Rock and the other player chooses Paper, the player who chooses Paper wins and gets a point; if one player chooses Scissors and the other player chooses Paper, the player who chooses Scissors wins and gets a point; if one player chooses Scissors and the other player chooses Rock, the player who chooses Rock wins and gets a point; and if both players choose the same move, nobody wins and nobody gets a point. Monocarp decided to play against a bot. During the game, Monocarp noticed that the bot's behavior is very predictable: in the first round, it chooses Rock; in every round except the first, it chooses the move that beats the opponent's move in the previous round (for example, if in the previous round its opponent played Scissors, then the bot chooses Rock now). Monocarp has a favorite string (s), consisting of the characters R , P , and/or S . Monocarp decided to play a series of rounds against the bot. However, he wants both of the following conditions to be met: the final score is in favor of Monocarp (i. e., the number of rounds he won is strictly greater than the number of rounds the bot won); the string (s) appears as a contiguous substring in the sequence of the bot's moves (where R denotes Rock, P denotes Paper, and S denotes Scissors). Help Monocarp and calculate the minimum number of rounds he needs to play against the bot to satisfy both of the aforementioned conditions. The first line contains a single integer (t) ((1 \le t \le 10^4)) — the number of test cases. The only line of each test case contains a string (s) ((1 \le |s| \le 2 \cdot 10^5)), consisting of the characters R , P , and/or S . Additional constraint on the input: the sum of the lengths of the strings (s) over all test cas |
| Kotlin Heroes 11 — Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 283782508 | ttamx | E | Sept. 30, 2024, 3:17 p.m. | OK | Kotlin 1.7 | TESTS | 24 | 296 | 8601600 | ||
| 283787421 | nguyenhoangminh318 | E | Sept. 30, 2024, 3:47 p.m. | OK | Kotlin 1.7 | TESTS | 24 | 343 | 4096000 | ||
| 283784642 | andreyDagger | E | Sept. 30, 2024, 3:29 p.m. | OK | Kotlin 1.7 | TESTS | 24 | 343 | 4505600 | ||
| 283784046 | Yae-Miko | E | Sept. 30, 2024, 3:26 p.m. | OK | Kotlin 1.7 | TESTS | 24 | 343 | 6246400 | ||
| 283785377 | Ra16bit | E | Sept. 30, 2024, 3:34 p.m. | OK | Kotlin 1.7 | TESTS | 24 | 358 | 5836800 | ||
| 283795298 | kinshuk_12 | E | Sept. 30, 2024, 4:35 p.m. | OK | Kotlin 1.7 | TESTS | 24 | 358 | 10854400 | ||
| 283820251 | doctorstrange111 | E | Sept. 30, 2024, 7:43 p.m. | OK | Kotlin 1.7 | TESTS | 24 | 359 | 5836800 | ||
| 283804595 | noushil004 | E | Sept. 30, 2024, 5:35 p.m. | OK | Kotlin 1.7 | TESTS | 24 | 359 | 5836800 | ||
| 283782609 | Nikitosh | E | Sept. 30, 2024, 3:17 p.m. | OK | Kotlin 1.7 | TESTS | 24 | 359 | 6860800 | ||
| 283789552 | 21cs01033 | E | Sept. 30, 2024, 3:59 p.m. | OK | Kotlin 1.7 | TESTS | 24 | 359 | 11264000 | ||
| 283789294 | RuchitJagodara | E | Sept. 30, 2024, 3:57 p.m. | OK | Kotlin 1.9 | TESTS | 24 | 171 | 0 | ||
| 283787403 | binminh01 | E | Sept. 30, 2024, 3:46 p.m. | OK | Kotlin 1.9 | TESTS | 24 | 171 | 0 | ||
| 283789901 | guperman | E | Sept. 30, 2024, 4:01 p.m. | OK | Kotlin 1.9 | TESTS | 24 | 186 | 0 | ||
| 283789703 | maomao90 | E | Sept. 30, 2024, 4 p.m. | OK | Kotlin 1.9 | TESTS | 24 | 186 | 0 | ||
| 283788434 | kmyiu | E | Sept. 30, 2024, 3:53 p.m. | OK | Kotlin 1.9 | TESTS | 24 | 186 | 0 | ||
| 283791488 | zornlemma | E | Sept. 30, 2024, 4:11 p.m. | OK | Kotlin 1.9 | TESTS | 24 | 187 | 0 | ||
| 283789839 | joylintp | E | Sept. 30, 2024, 4:01 p.m. | OK | Kotlin 1.9 | TESTS | 24 | 187 | 0 | ||
| 283789729 | Muhammad-Saram | E | Sept. 30, 2024, 4 p.m. | OK | Kotlin 1.9 | TESTS | 24 | 187 | 0 | ||
| 283789702 | tenagazaru | E | Sept. 30, 2024, 4 p.m. | OK | Kotlin 1.9 | TESTS | 24 | 187 | 0 | ||
| 283788209 | sahasrad | E | Sept. 30, 2024, 3:52 p.m. | OK | Kotlin 1.9 | TESTS | 24 | 187 | 0 |
Back to search problems