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 |
|---|---|---|---|---|---|---|
| 2172 | 2025 ICPC Asia Taichung Regional Contest (Unrated, Online Mirror, ICPC Rules, Preferably Teams) | FINISHED | False | 18000 | 13147823 | Nov. 16, 2025, 1:50 a.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 297 ) | H | Shuffling Cards with Problem Solver 68! | PROGRAMMING | string suffix structures |
Aru loves playing card games (Poker, Texas hold 'em, Balatro, etc.) and she has perfected the art of shuffling cards, especially the riffle shuffle. She is playing with Mutsuki now, and it's her turn to shuffle the cards! However, Mutsuki knows that Aru is too perfect with her shuffling game. In fact, given a deck with an even number of cards, Aru always performs a perfect riffle: she cuts the deck evenly and interleaves the two halves. Formally, if the deck is represented by a string (s) of length (n), where (s_i) is the (i)-th card from the top, one riffle produces the deck ()s^\prime = s_1 + s_{n/2 + 1} + s_2 + s_{n/2 + 2} + \ldots + s_{n/2} + s_{n}.() Mutsuki also knows that when handed a deck of cards, Aru will riffle it exactly (t) times. Mutsuki currently holds a deck of (2^k) cards, represented by a string (d). Before giving the deck to Aru, Mutsuki can choose to cut the deck, by moving some number of cards from the top to the bottom of the deck. Formally, she can choose any (m) from (0) to (2^k - 1), and produce the deck ()d^\prime = d_{m + 1} + d_{m + 2} + \ldots + d_{2^k} + d_1 + d_2 + \ldots + d_m.() Among all (2^k) possible cuts, Mutsuki wants to choose the one that results in the lexicographically smallest deck after Aru riffles it (t) times. Can you figure this out for her? The first line contains two integers (k) and (t), representing the size parameter of the deck, and the number of times Aru will riffle the deck, respectively. The second line contains a string (d) of (2^k) lowercase characters, representing the original deck of cards that Mutsuki has. (1 \le k \le 18) (0 \le t \le 10^9) Print a string in one line, representing the lexicographically smallest deck of cards that Mutsuki can produce, by first cutting the deck and letting Aru riffle it (t) times. |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 349363372 | VaHiX | H | Nov. 17, 2025, 2:27 a.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 546 | 307200 | ||
| 349208219 | hikari0102 Hackerzoe navyduck2 | H | Nov. 16, 2025, 5:19 a.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 562 | 307200 | ||
| 349255922 | thunopro atkubo benben181 | H | Nov. 16, 2025, 12:20 p.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 609 | 3481600 | ||
| 349210588 | azberjibiou | H | Nov. 16, 2025, 5:46 a.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 874 | 5836800 | ||
| 349261234 | asdasdqwer vishld snokes | H | Nov. 16, 2025, 1:07 p.m. | OK | C++17 (GCC 7-32) | TESTS | 80 | 1999 | 33587200 | ||
| 349212981 | hmuhmuhmuhmu codekhonggioi kilkuwu | H | Nov. 16, 2025, 6:09 a.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 359 | 2457600 | ||
| 349210991 | TKT_YI HoyHoyCharhang | H | Nov. 16, 2025, 5:50 a.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 546 | 38707200 | ||
| 349197891 | Grisses ddxrS su_da | H | Nov. 16, 2025, 3:11 a.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 561 | 12902400 | ||
| 349211158 | ppprobie Caylex Cx114514 | H | Nov. 16, 2025, 5:52 a.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 640 | 5324800 | ||
| 349209730 | HuaJun limanjun feeder1 | H | Nov. 16, 2025, 5:37 a.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 640 | 6860800 | ||
| 349373715 | swishy321 | H | Nov. 17, 2025, 4:47 a.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 640 | 32665600 | ||
| 349201270 | Killer250104 TheMiraiTraveller0711 Miraclehehe | H | Nov. 16, 2025, 3:50 a.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 655 | 4300800 | ||
| 349258039 | CSQ31 | H | Nov. 16, 2025, 12:37 p.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 656 | 4608000 | ||
| 349206959 | johnny8337 mo_onrabbit2 as_dfsdf | H | Nov. 16, 2025, 5:05 a.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 765 | 20275200 | ||
| 349269579 | limanjun | H | Nov. 16, 2025, 2:27 p.m. | OK | C++20 (GCC 13-64) | TESTS | 80 | 843 | 14848000 | ||
| 349202438 | khoianh cowcowwy BonnieCaledonia | H | Nov. 16, 2025, 4:03 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 186 | 7168000 | ||
| 349206774 | tfg paIao | H | Nov. 16, 2025, 5:02 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 187 | 4710400 | ||
| 349202655 | qwerasdfzxcl imeimi Numbering | H | Nov. 16, 2025, 4:06 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 202 | 4812800 | ||
| 349229982 | shinchankosen | H | Nov. 16, 2025, 8:49 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 202 | 45772800 | ||
| 349196793 | madtreap | H | Nov. 16, 2025, 2:57 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 234 | 5734400 | ||
| 349222341 | hungchi17 | H | Nov. 16, 2025, 7:34 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 249 | 7168000 | ||
| 349357173 | qwerasdfzxcl | H | Nov. 17, 2025, 12:41 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 311 | 5120000 | ||
| 349217903 | 415411 | H | Nov. 16, 2025, 6:53 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 421 | 26521600 | ||
| 349217689 | 415411 | H | Nov. 16, 2025, 6:51 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 452 | 65024000 | ||
| 349339871 | PsychoPinkQ | H | Nov. 16, 2025, 7:02 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 80 | 515 | 51404800 | ||
| 349210260 | mahin503 | H | Nov. 16, 2025, 5:42 a.m. | OK | PyPy 3-64 | TESTS | 80 | 702 | 66252800 | ||
| 349363561 | VaHiX | H | Nov. 17, 2025, 2:30 a.m. | OK | PyPy 3-64 | TESTS | 80 | 718 | 66252800 |
Back to search problems