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 |
---|---|---|---|---|---|---|
1190 | Codeforces Round 573 (Div. 1) | FINISHED | False | 7200 | 174237863 | July 12, 2019, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 2047 ) | C | Tokitsukaze and Duel | PROGRAMMING | brute force games greedy | 2400 |
B'"Duel!" Betting on the lovely princess Claris, the duel between Tokitsukaze and Quailty has started. There are n cards in a row. Each card has two sides, one of which has color. At first, some of these cards are with color sides facing up and others are with color sides facing down. Then they take turns flipping cards, in which Tokitsukaze moves first. In each move, one should choose exactly k consecutive cards and flip them to the same side, which means to make their color sides all face up or all face down. If all the color sides of these n cards face the same direction after one 's move, the one who takes this move will win. Princess Claris wants to know who will win the game if Tokitsukaze and Quailty are so clever that they won 't make mistakes. The first line contains two integers n and k ( 1 <= k <= n <= 10^5 ). The second line contains a single string of length n that only consists of 0 and 1 , representing the situation of these n cards, where the color side of the i -th card faces up if the i -th character is 1 , or otherwise, it faces down and the i -th character is 0 . Print "once again" (without quotes) if the total number of their moves can exceed 10^9 , which is considered a draw. In other cases, print "tokitsukaze" (without quotes) if Tokitsukaze will win, or "quailty" (without quotes) if Quailty will win. Note that the output characters are case-sensitive, and any wrong spelling would be rejected. In the first example, no matter how Tokitsukaze moves, there would be three cards with color sides facing the same direction after her move, and Quailty can flip the last card to this direction and win. In the second example, no matter how Tokitsukaze moves, Quailty can choose the same card and flip back to the initial situation, which can allow the game to end in a draw. In the third example, Tokitsukaze can win by flipping the leftmost five cards up or flipp'... |
E |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
56911564 | iica | C | July 12, 2019, 3:23 p.m. | OK | D | TESTS | 60 | 31 | 4300800 | 2400 | |
60477795 | llbra9z | C | Sept. 13, 2019, 9:05 a.m. | OK | Delphi | TESTS | 61 | 46 | 1228800 | 2400 | |
57188595 | tyf0530 | C | July 17, 2019, 9:35 a.m. | OK | GNU C++11 | TESTS | 61 | 31 | 0 | 2400 | |
64318468 | 2016wudi | C | Nov. 5, 2019, 2:50 p.m. | OK | GNU C++11 | TESTS | 61 | 31 | 102400 | 2400 | |
58796589 | ShafinKhadem | C | Aug. 14, 2019, 5:23 a.m. | OK | GNU C++11 | TESTS | 61 | 31 | 102400 | 2400 | |
57822950 | AloneKnight | C | July 27, 2019, 1:01 a.m. | OK | GNU C++11 | TESTS | 61 | 31 | 102400 | 2400 | |
57353406 | qsqx | C | July 20, 2019, 5:04 a.m. | OK | GNU C++11 | TESTS | 61 | 31 | 102400 | 2400 | |
57351123 | _LT_zyc | C | July 20, 2019, 3:37 a.m. | OK | GNU C++11 | TESTS | 61 | 31 | 102400 | 2400 | |
57319168 | ryuIo | C | July 19, 2019, 9:18 a.m. | OK | GNU C++11 | TESTS | 61 | 31 | 102400 | 2400 | |
59618513 | yasugongshang | C | Aug. 28, 2019, 1:30 p.m. | OK | GNU C++11 | TESTS | 61 | 31 | 102400 | 2400 | |
68976185 | luogu_bot3 | C | Jan. 17, 2020, 8:54 a.m. | OK | GNU C++11 | TESTS | 61 | 31 | 102400 | 2400 | |
68976056 | vjudge2 | C | Jan. 17, 2020, 8:52 a.m. | OK | GNU C++11 | TESTS | 61 | 31 | 102400 | 2400 | |
56928942 | kingofnumbers | C | July 12, 2019, 4:13 p.m. | OK | GNU C++14 | TESTS | 60 | 30 | 307200 | 2400 | |
59522871 | hungt1 | C | Aug. 26, 2019, 12:29 p.m. | OK | GNU C++14 | TESTS | 61 | 30 | 512000 | 2400 | |
57011869 | tick | C | July 14, 2019, 9:42 a.m. | OK | GNU C++14 | TESTS | 61 | 30 | 921600 | 2400 | |
57114510 | 860579 | C | July 15, 2019, 7:11 p.m. | OK | GNU C++14 | TESTS | 61 | 30 | 1126400 | 2400 | |
56918437 | kimjihoon | C | July 12, 2019, 3:41 p.m. | OK | GNU C++14 | TESTS | 60 | 30 | 1126400 | 2400 | |
57011394 | Zoli9 | C | July 14, 2019, 9:27 a.m. | OK | GNU C++14 | TESTS | 61 | 31 | 0 | 2400 | |
69646599 | wucstdio | C | Jan. 28, 2020, 1:50 a.m. | OK | GNU C++14 | TESTS | 61 | 31 | 102400 | 2400 | |
65753310 | zer0.h6ck | C | Nov. 26, 2019, 1:57 p.m. | OK | GNU C++14 | TESTS | 61 | 31 | 102400 | 2400 | |
59697824 | Scut82 | C | Aug. 30, 2019, 9:19 a.m. | OK | GNU C++14 | TESTS | 61 | 31 | 102400 | 2400 | |
59696319 | Scut82 | C | Aug. 30, 2019, 8:44 a.m. | OK | GNU C++14 | TESTS | 61 | 31 | 102400 | 2400 | |
57198184 | Lucina | C | July 17, 2019, 12:54 p.m. | OK | GNU C++17 | TESTS | 61 | 30 | 102400 | 2400 | |
57001142 | dafeng | C | July 14, 2019, 3:41 a.m. | OK | GNU C++17 | TESTS | 61 | 30 | 1740800 | 2400 | |
56949994 | Trote_w | C | July 13, 2019, 1:41 a.m. | OK | GNU C++17 | TESTS | 60 | 30 | 2048000 | 2400 | |
64861950 | Growth | C | Nov. 14, 2019, 3:45 a.m. | OK | GNU C++17 | TESTS | 61 | 30 | 5120000 | 2400 | |
57203417 | ivan100sic | C | July 17, 2019, 2:32 p.m. | OK | GNU C++17 | TESTS | 61 | 30 | 67686400 | 2400 | |
56976254 | Elegia | C | July 13, 2019, 12:20 p.m. | OK | GNU C++17 | TESTS | 60 | 31 | 102400 | 2400 | |
63151330 | user202729_ | C | Oct. 22, 2019, 3:11 p.m. | OK | GNU C++17 | TESTS | 61 | 31 | 102400 | 2400 | |
58253903 | codeblockser | C | Aug. 4, 2019, 9:06 a.m. | OK | GNU C++17 | TESTS | 61 | 31 | 102400 | 2400 | |
56942090 | RCG | C | July 12, 2019, 7:40 p.m. | OK | GNU C++17 | TESTS | 60 | 31 | 102400 | 2400 | |
56928853 | Goorkiewicz | C | July 12, 2019, 4:13 p.m. | OK | GNU C++17 | TESTS | 60 | 31 | 102400 | 2400 | |
57252093 | Daario | C | July 18, 2019, 12:06 a.m. | OK | Go | TESTS | 61 | 31 | 0 | 2400 | |
57014590 | Nutella3000 | C | July 14, 2019, 11:01 a.m. | OK | Java 8 | TESTS | 61 | 109 | 0 | 2400 | |
57320474 | ZeyadKhattab | C | July 19, 2019, 9:47 a.m. | OK | Java 8 | TESTS | 61 | 124 | 0 | 2400 | |
61706139 | vjudge4 | C | Oct. 2, 2019, 10:07 a.m. | OK | Java 8 | TESTS | 61 | 139 | 0 | 2400 | |
56980517 | kuailezhish | C | July 13, 2019, 1:44 p.m. | OK | Java 8 | TESTS | 61 | 139 | 0 | 2400 | |
61709885 | holeguma | C | Oct. 2, 2019, 11:11 a.m. | OK | Java 8 | TESTS | 61 | 140 | 0 | 2400 | |
56981038 | kuailezhish | C | July 13, 2019, 1:54 p.m. | OK | Java 8 | TESTS | 61 | 140 | 0 | 2400 | |
56918219 | tanzaku | C | July 12, 2019, 3:40 p.m. | OK | Java 8 | TESTS | 60 | 140 | 0 | 2400 | |
56943840 | fetetriste | C | July 12, 2019, 8:36 p.m. | OK | Java 8 | TESTS | 60 | 155 | 0 | 2400 | |
56924985 | AkshajK | C | July 12, 2019, 4:01 p.m. | OK | Java 8 | TESTS | 60 | 170 | 0 | 2400 | |
57772435 | 7dan | C | July 26, 2019, 1:38 a.m. | OK | Java 8 | TESTS | 61 | 171 | 0 | 2400 | |
56934377 | ymatsux | C | July 12, 2019, 4:29 p.m. | OK | Kotlin | TESTS | 60 | 218 | 307200 | 2400 | |
56970637 | eki | C | July 13, 2019, 10:06 a.m. | OK | Mono C# | TESTS | 60 | 78 | 4812800 | 2400 | |
56999697 | vjudge5 | C | July 14, 2019, 2:36 a.m. | OK | MS C++ | TESTS | 61 | 31 | 512000 | 2400 | |
68920792 | vjudge2 | C | Jan. 16, 2020, 9:22 a.m. | OK | MS C++ | TESTS | 61 | 31 | 512000 | 2400 | |
68845422 | vjudge5 | C | Jan. 15, 2020, 7:15 a.m. | OK | MS C++ | TESTS | 61 | 31 | 2048000 | 2400 | |
56931277 | Milanin | C | July 12, 2019, 4:20 p.m. | OK | MS C++ 2017 | TESTS | 60 | 31 | 921600 | 2400 | |
57080408 | nik1998 | C | July 15, 2019, 7:02 a.m. | OK | MS C++ 2017 | TESTS | 61 | 31 | 1843200 | 2400 | |
60454778 | siwei | C | Sept. 12, 2019, 5:28 p.m. | OK | MS C++ 2017 | TESTS | 61 | 46 | 1536000 | 2400 | |
56981629 | JuanFernandez | C | July 13, 2019, 2:08 p.m. | OK | PyPy 2 | TESTS | 61 | 155 | 1024000 | 2400 | |
56941590 | pajenegod | C | July 12, 2019, 7:30 p.m. | OK | PyPy 2 | TESTS | 60 | 187 | 921600 | 2400 | |
56915662 | drd93 | C | July 12, 2019, 3:34 p.m. | OK | PyPy 2 | TESTS | 60 | 296 | 7270400 | 2400 | |
60505053 | beginner1010 | C | Sept. 13, 2019, 8:54 p.m. | OK | PyPy 3 | TESTS | 61 | 171 | 5529600 | 2400 | |
56929372 | titia | C | July 12, 2019, 4:14 p.m. | OK | PyPy 3 | TESTS | 60 | 311 | 8601600 | 2400 | |
57424521 | Helli.code | C | July 20, 2019, 7:41 p.m. | OK | Python 2 | TESTS | 61 | 218 | 3379200 | 2400 | |
69648512 | vjudge2 | C | Jan. 28, 2020, 3:33 a.m. | OK | Python 3 | TESTS | 61 | 296 | 4403200 | 2400 | |
56926163 | EbTech | C | July 12, 2019, 4:04 p.m. | OK | Rust | TESTS | 60 | 108 | 11673600 | 2400 |
Back to search problems