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 |
---|---|---|---|---|---|---|
1972 | Codeforces Round 942 (Div. 2) | FINISHED | False | 9000 | 22692263 | April 30, 2024, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 22492 ) | B | Coin Games | PROGRAMMING | games | 900 |
B'There are n coins on the table forming a circle, and each coin is either facing up or facing down. Alice and Bob take turns to play the following game, and Alice goes first. In each operation, the player chooses a facing-up coin, removes the coin, and flips the two coins that are adjacent to it. If (before the operation) there are only two coins left, then one will be removed and the other won 't be flipped (as it would be flipped twice). If (before the operation) there is only one coin left, no coins will be flipped. If (before the operation) there are no facing-up coins, the player loses. Decide who will win the game if they both play optimally. It can be proved that the game will end in a finite number of operations, and one of them will win. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 100 ). The description of the test cases follows. The first line of each test case contains only one positive integer n ( 1 <= q n <= q 100 ), representing the number of the coins. A string s of length n follows on the second line of each test case, containing only "U" and "D", representing that each coin is facing up or facing down. For each test case, print "YES" if Alice will win the game, and "NO" otherwise. You can output the answer in any case (upper or lower). For example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as positive responses. In the first test case, the game may go as follows. It can be proved that Bob will always lose if they both play optimally. '... |
Tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
261570202 | antoha.kluev | B | May 18, 2024, 6:32 p.m. | OK | C# 10 | TESTS | 11 | 77 | 0 | 900 | |
260176792 | Omarkik | B | May 9, 2024, 8:36 p.m. | OK | C# 10 | TESTS | 11 | 77 | 0 | 900 | |
261566243 | antoha.kluev | B | May 18, 2024, 5:50 p.m. | OK | C# 10 | TESTS | 11 | 78 | 0 | 900 | |
260709114 | kenanak | B | May 12, 2024, 7:46 p.m. | OK | C# 10 | TESTS | 11 | 92 | 0 | 900 | |
260710067 | Bazedy | B | May 12, 2024, 7:59 p.m. | OK | C# 10 | TESTS | 11 | 93 | 0 | 900 | |
261643704 | Mark0_2 | B | May 19, 2024, 11:22 a.m. | OK | C# 10 | TESTS | 11 | 108 | 0 | 900 | |
261058930 | Xomemo7 | B | May 15, 2024, 1:13 p.m. | OK | C# 10 | TESTS | 11 | 108 | 409600 | 900 | |
261704264 | KevinTorres01 | B | May 19, 2024, 9:29 p.m. | OK | C# 10 | TESTS | 11 | 108 | 3276800 | 900 | |
260632382 | letmecookthis12344321 | B | May 12, 2024, 8:18 a.m. | OK | C# 10 | TESTS | 11 | 124 | 0 | 900 | |
262011066 | Lucasxjh | B | May 21, 2024, 11:58 a.m. | OK | C++14 (GCC 6-32) | TESTS | 11 | 31 | 0 | 900 | |
263506143 | Lalisa27 | B | May 31, 2024, 1:39 p.m. | OK | C++14 (GCC 6-32) | TESTS | 11 | 46 | 0 | 900 | |
263639036 | smitr5097 | B | June 1, 2024, 1:59 p.m. | OK | C++14 (GCC 6-32) | TESTS | 11 | 46 | 0 | 900 | |
263610020 | Bajarang_03 | B | June 1, 2024, 10 a.m. | OK | C++14 (GCC 6-32) | TESTS | 11 | 46 | 0 | 900 | |
263602432 | ngominhkhoa2006 | B | June 1, 2024, 8:57 a.m. | OK | C++14 (GCC 6-32) | TESTS | 11 | 46 | 0 | 900 | |
263538878 | Neel_Patel05 | B | May 31, 2024, 6:21 p.m. | OK | C++14 (GCC 6-32) | TESTS | 11 | 46 | 0 | 900 | |
263533113 | kanika_262 | B | May 31, 2024, 5:29 p.m. | OK | C++14 (GCC 6-32) | TESTS | 11 | 46 | 0 | 900 | |
263527598 | nyesha18_ | B | May 31, 2024, 4:40 p.m. | OK | C++14 (GCC 6-32) | TESTS | 11 | 46 | 0 | 900 | |
263511570 | varun_sri_teja | B | May 31, 2024, 2:23 p.m. | OK | C++14 (GCC 6-32) | TESTS | 11 | 46 | 0 | 900 | |
263457210 | ranu47243 | B | May 31, 2024, 10:23 a.m. | OK | C++14 (GCC 6-32) | TESTS | 11 | 46 | 0 | 900 | |
262458210 | vivekshandilya373 | B | May 25, 2024, 4:44 a.m. | OK | C++17 (GCC 7-32) | TESTS | 11 | 31 | 0 | 900 | |
263313554 | Udita_M | B | May 30, 2024, 3:17 p.m. | OK | C++17 (GCC 7-32) | TESTS | 11 | 31 | 0 | 900 | |
262864874 | Artem123456 | B | May 27, 2024, 10:34 a.m. | OK | C++17 (GCC 7-32) | TESTS | 11 | 31 | 0 | 900 | |
262458151 | vikashshandilya373 | B | May 25, 2024, 4:44 a.m. | OK | C++17 (GCC 7-32) | TESTS | 11 | 31 | 0 | 900 | |
262303761 | sriganeshr2001 | B | May 23, 2024, 6:57 p.m. | OK | C++17 (GCC 7-32) | TESTS | 11 | 31 | 0 | 900 | |
261267642 | ltd.sword | B | May 17, 2024, 2:45 a.m. | OK | C++17 (GCC 7-32) | TESTS | 11 | 31 | 0 | 900 | |
261025017 | soupnazi | B | May 15, 2024, 8:42 a.m. | OK | C++17 (GCC 7-32) | TESTS | 11 | 31 | 0 | 900 | |
260942082 | newnewnewpompom | B | May 14, 2024, 2:37 p.m. | OK | C++17 (GCC 7-32) | TESTS | 11 | 31 | 0 | 900 | |
260714762 | heitor | B | May 12, 2024, 9:12 p.m. | OK | C++17 (GCC 7-32) | TESTS | 11 | 31 | 0 | 900 | |
260439645 | J_Nadia | B | May 10, 2024, 6:14 p.m. | OK | C++17 (GCC 7-32) | TESTS | 11 | 31 | 0 | 900 | |
261226565 | lone_wolf25 | B | May 16, 2024, 4:28 p.m. | OK | C++20 (GCC 13-64) | TESTS | 11 | 31 | 0 | 900 | |
261138381 | vjudge.8 | B | May 16, 2024, 4:08 a.m. | OK | C++20 (GCC 13-64) | TESTS | 11 | 31 | 0 | 900 | |
260784419 | ErodeesFleurs | B | May 13, 2024, 11:03 a.m. | OK | C++20 (GCC 13-64) | TESTS | 11 | 31 | 0 | 900 | |
260633526 | Vanshika_01 | B | May 12, 2024, 8:27 a.m. | OK | C++20 (GCC 13-64) | TESTS | 11 | 31 | 0 | 900 | |
260598097 | chauhanrudra0510 | B | May 12, 2024, 2:08 a.m. | OK | C++20 (GCC 13-64) | TESTS | 11 | 31 | 0 | 900 | |
260597793 | Satyam_Atal_605 | B | May 12, 2024, 2:01 a.m. | OK | C++20 (GCC 13-64) | TESTS | 11 | 31 | 0 | 900 | |
261155601 | COMBAT_s | B | May 16, 2024, 7:06 a.m. | OK | C++20 (GCC 13-64) | TESTS | 11 | 31 | 1638400 | 900 | |
263686476 | cosenza | B | June 1, 2024, 11:37 p.m. | OK | C++20 (GCC 13-64) | TESTS | 11 | 46 | 0 | 900 | |
263694010 | codedemon_69 | B | June 2, 2024, 3:05 a.m. | OK | C++20 (GCC 13-64) | TESTS | 11 | 46 | 0 | 900 | |
263693759 | dedop | B | June 2, 2024, 2:59 a.m. | OK | C++20 (GCC 13-64) | TESTS | 11 | 46 | 0 | 900 | |
263174242 | abdoannpk | B | May 29, 2024, 6 p.m. | OK | C# 8 | TESTS | 11 | 109 | 0 | 900 | |
262078060 | akhila_2004 | B | May 22, 2024, 2:43 a.m. | OK | GNU C11 | TESTS | 11 | 31 | 0 | 900 | |
261934472 | Gutaicast | B | May 20, 2024, 8:25 p.m. | OK | GNU C11 | TESTS | 11 | 31 | 0 | 900 | |
262339628 | Arko_Basu | B | May 24, 2024, 5:57 a.m. | OK | GNU C11 | TESTS | 11 | 31 | 102400 | 900 | |
262100674 | rajkesharwani14428o | B | May 22, 2024, 6:47 a.m. | OK | GNU C11 | TESTS | 11 | 31 | 102400 | 900 | |
261594077 | Lumos_220914 | B | May 19, 2024, 3:22 a.m. | OK | GNU C11 | TESTS | 11 | 31 | 102400 | 900 | |
261274651 | VarunS_2005 | B | May 17, 2024, 4:40 a.m. | OK | GNU C11 | TESTS | 11 | 31 | 102400 | 900 | |
261034372 | khadija10 | B | May 15, 2024, 9:51 a.m. | OK | GNU C11 | TESTS | 11 | 31 | 102400 | 900 | |
260514302 | Aditya_8989 | B | May 11, 2024, 8:42 a.m. | OK | GNU C11 | TESTS | 11 | 31 | 102400 | 900 | |
260461671 | Dzyuba_Ivan_Alekceevich | B | May 10, 2024, 10:21 p.m. | OK | GNU C11 | TESTS | 11 | 31 | 102400 | 900 | |
263230885 | Mr.Bangs | B | May 30, 2024, 11:34 a.m. | OK | GNU C11 | TESTS | 11 | 46 | 0 | 900 | |
261235500 | Ghostfreak_077 | B | May 16, 2024, 5:41 p.m. | OK | Go | TESTS | 11 | 61 | 0 | 900 | |
260990821 | Young | B | May 15, 2024, 1:05 a.m. | OK | Go | TESTS | 11 | 61 | 102400 | 900 | |
262830192 | sushilm2011 | B | May 27, 2024, 5:31 a.m. | OK | Go | TESTS | 11 | 61 | 102400 | 900 | |
260190082 | utsu_boy | B | May 10, 2024, 1:08 a.m. | OK | Go | TESTS | 11 | 61 | 102400 | 900 | |
261154752 | balanallamilli | B | May 16, 2024, 6:58 a.m. | OK | Go | TESTS | 11 | 62 | 0 | 900 | |
262700686 | nguyenquocthao00 | B | May 26, 2024, 12:05 p.m. | OK | Go | TESTS | 11 | 62 | 0 | 900 | |
260973683 | PepRe | B | May 14, 2024, 6:53 p.m. | OK | Go | TESTS | 11 | 62 | 0 | 900 | |
260922493 | manchik | B | May 14, 2024, 12:07 p.m. | OK | Go | TESTS | 11 | 62 | 102400 | 900 | |
262039624 | october_rain | B | May 21, 2024, 3:13 p.m. | OK | Haskell | TESTS | 11 | 77 | 0 | 900 | |
261094994 | eule1927 | B | May 15, 2024, 6:46 p.m. | OK | Java 21 | TESTS | 11 | 202 | 102400 | 900 | |
260845957 | csdain | B | May 13, 2024, 6:48 p.m. | OK | Java 21 | TESTS | 11 | 218 | 409600 | 900 | |
260701186 | Kshitiz_san | B | May 12, 2024, 6:09 p.m. | OK | Java 21 | TESTS | 11 | 218 | 512000 | 900 | |
261632297 | federicog1 | B | May 19, 2024, 9:33 a.m. | OK | Java 21 | TESTS | 11 | 233 | 102400 | 900 | |
261926427 | code_verse | B | May 20, 2024, 6:54 p.m. | OK | Java 21 | TESTS | 11 | 233 | 819200 | 900 | |
261084254 | anikettripathi19012005 | B | May 15, 2024, 4:55 p.m. | OK | Java 21 | TESTS | 11 | 249 | 409600 | 900 | |
261032649 | Akshansh2407 | B | May 15, 2024, 9:35 a.m. | OK | Java 21 | TESTS | 11 | 249 | 512000 | 900 | |
261342374 | shikhar_est59 | B | May 17, 2024, 2:17 p.m. | OK | Java 21 | TESTS | 11 | 249 | 819200 | 900 | |
261542688 | 2200032823cseh | B | May 18, 2024, 2:26 p.m. | OK | Java 21 | TESTS | 11 | 249 | 921600 | 900 | |
261026585 | Flick__ | B | May 15, 2024, 8:56 a.m. | OK | Java 21 | TESTS | 11 | 249 | 921600 | 900 | |
260931842 | harsh_1806 | B | May 14, 2024, 1:14 p.m. | OK | Java 8 | TESTS | 11 | 124 | 0 | 900 | |
260814122 | devil_the_coder | B | May 13, 2024, 2:36 p.m. | OK | Java 8 | TESTS | 11 | 124 | 0 | 900 | |
260566050 | suyash.211.sn | B | May 11, 2024, 5:16 p.m. | OK | Java 8 | TESTS | 11 | 139 | 0 | 900 | |
262861562 | tittiesboy99 | B | May 27, 2024, 10:04 a.m. | OK | Java 8 | TESTS | 11 | 140 | 0 | 900 | |
261438978 | Shivanshway07 | B | May 17, 2024, 10:38 p.m. | OK | Java 8 | TESTS | 11 | 140 | 0 | 900 | |
261429772 | arpitachauhan4182 | B | May 17, 2024, 7:47 p.m. | OK | Java 8 | TESTS | 11 | 140 | 0 | 900 | |
260892356 | yvbf | B | May 14, 2024, 7:40 a.m. | OK | Java 8 | TESTS | 11 | 140 | 0 | 900 | |
260875987 | Krish_singh.10 | B | May 14, 2024, 4:29 a.m. | OK | Java 8 | TESTS | 11 | 140 | 0 | 900 | |
260607269 | jatin000000 | B | May 12, 2024, 4:36 a.m. | OK | Java 8 | TESTS | 11 | 140 | 0 | 900 | |
260437014 | Ovetsar_ilish | B | May 10, 2024, 5:55 p.m. | OK | Java 8 | TESTS | 11 | 140 | 0 | 900 | |
260948034 | lordic_mah | B | May 14, 2024, 3:27 p.m. | OK | JavaScript | TESTS | 11 | 77 | 102400 | 900 | |
261224813 | Mostafa_A_kader | B | May 16, 2024, 4:15 p.m. | OK | Kotlin 1.7 | TESTS | 11 | 312 | 5529600 | 900 | |
261269098 | A_23 | B | May 17, 2024, 3:11 a.m. | OK | Kotlin 1.9 | TESTS | 11 | 140 | 0 | 900 | |
260956170 | wz.wahffle | B | May 14, 2024, 4:34 p.m. | OK | Kotlin 1.9 | TESTS | 11 | 171 | 0 | 900 | |
261997026 | maet98 | B | May 21, 2024, 10:19 a.m. | OK | Kotlin 1.9 | TESTS | 11 | 186 | 0 | 900 | |
261202983 | universe6626 | B | May 16, 2024, 1:27 p.m. | OK | Node.js | TESTS | 11 | 93 | 0 | 900 | |
261202606 | OddBlackPianoGismoIdea | B | May 16, 2024, 1:25 p.m. | OK | Node.js | TESTS | 11 | 93 | 0 | 900 | |
261248433 | codemyway | B | May 16, 2024, 7:53 p.m. | OK | PyPy 3 | TESTS | 11 | 77 | 0 | 900 | |
261732673 | sohamthorat.1234567 | B | May 20, 2024, 6:55 a.m. | OK | PyPy 3 | TESTS | 11 | 93 | 0 | 900 | |
260876752 | error_7 | B | May 14, 2024, 4:41 a.m. | OK | PyPy 3 | TESTS | 11 | 93 | 0 | 900 | |
260732993 | abilanger | B | May 13, 2024, 4:31 a.m. | OK | PyPy 3 | TESTS | 11 | 93 | 0 | 900 | |
262622574 | batchunikhil | B | May 25, 2024, 8:18 p.m. | OK | PyPy 3 | TESTS | 11 | 93 | 102400 | 900 | |
261248249 | codemyway | B | May 16, 2024, 7:51 p.m. | OK | PyPy 3 | TESTS | 11 | 93 | 102400 | 900 | |
260220711 | Ankitha_7 | B | May 10, 2024, 7:54 a.m. | OK | PyPy 3 | TESTS | 11 | 93 | 102400 | 900 | |
260513776 | ashqeela56 | B | May 11, 2024, 8:38 a.m. | OK | PyPy 3 | TESTS | 11 | 93 | 1331200 | 900 | |
260259220 | codophilia | B | May 10, 2024, 1:59 p.m. | OK | PyPy 3 | TESTS | 11 | 93 | 1536000 | 900 | |
261376649 | gaju_01 | B | May 17, 2024, 3:25 p.m. | OK | PyPy 3 | TESTS | 11 | 108 | 102400 | 900 | |
262947325 | TwindT | B | May 28, 2024, 2:28 a.m. | OK | PyPy 3-64 | TESTS | 11 | 62 | 0 | 900 | |
261699203 | alejandromedinarojas05 | B | May 19, 2024, 8:05 p.m. | OK | PyPy 3-64 | TESTS | 11 | 62 | 0 | 900 | |
263012982 | ishan_luhani | B | May 28, 2024, 12:52 p.m. | OK | PyPy 3-64 | TESTS | 11 | 77 | 0 | 900 | |
262654081 | Shivamk21 | B | May 26, 2024, 5:49 a.m. | OK | PyPy 3-64 | TESTS | 11 | 77 | 0 | 900 | |
262382630 | vvoenkov | B | May 24, 2024, 12:15 p.m. | OK | PyPy 3-64 | TESTS | 11 | 77 | 0 | 900 | |
262349527 | Surya__1234 | B | May 24, 2024, 7:36 a.m. | OK | PyPy 3-64 | TESTS | 11 | 77 | 0 | 900 | |
262301476 | vibs2101 | B | May 23, 2024, 6:31 p.m. | OK | PyPy 3-64 | TESTS | 11 | 77 | 0 | 900 | |
262102141 | goutomdipto794 | B | May 22, 2024, 6:59 a.m. | OK | PyPy 3-64 | TESTS | 11 | 77 | 0 | 900 | |
262042789 | user0481 | B | May 21, 2024, 3:38 p.m. | OK | PyPy 3-64 | TESTS | 11 | 77 | 0 | 900 | |
261721390 | Zakirya_Zaib27 | B | May 20, 2024, 4:36 a.m. | OK | PyPy 3-64 | TESTS | 11 | 77 | 0 | 900 | |
260883414 | Rachana0918 | B | May 14, 2024, 6:09 a.m. | OK | Python 3 | TESTS | 11 | 61 | 0 | 900 | |
263693997 | Jenish.V | B | June 2, 2024, 3:05 a.m. | OK | Python 3 | TESTS | 11 | 62 | 0 | 900 | |
263614906 | AcidMango | B | June 1, 2024, 10:42 a.m. | OK | Python 3 | TESTS | 11 | 62 | 0 | 900 | |
263578479 | Haider-Sultan | B | June 1, 2024, 5:31 a.m. | OK | Python 3 | TESTS | 11 | 62 | 0 | 900 | |
263574834 | vatsaltrivedi509 | B | June 1, 2024, 4:48 a.m. | OK | Python 3 | TESTS | 11 | 62 | 0 | 900 | |
263169561 | akashpotturi | B | May 29, 2024, 4:51 p.m. | OK | Python 3 | TESTS | 11 | 62 | 0 | 900 | |
262989487 | mohiddhinshaik79 | B | May 28, 2024, 9:38 a.m. | OK | Python 3 | TESTS | 11 | 62 | 0 | 900 | |
262980844 | prethika_777 | B | May 28, 2024, 8:24 a.m. | OK | Python 3 | TESTS | 11 | 62 | 0 | 900 | |
262821129 | klu2100031976 | B | May 27, 2024, 4:12 a.m. | OK | Python 3 | TESTS | 11 | 62 | 0 | 900 | |
262701492 | Rohit_Radhakrishnan | B | May 26, 2024, 12:11 p.m. | OK | Python 3 | TESTS | 11 | 62 | 0 | 900 | |
260862744 | PlaceOrientedProgrammer | B | May 13, 2024, 11:56 p.m. | OK | Rust 2021 | TESTS | 11 | 46 | 0 | 900 | |
260647326 | Chalaghoram | B | May 12, 2024, 10:26 a.m. | OK | Rust 2021 | TESTS | 11 | 46 | 0 | 900 | |
261153935 | nibheta | B | May 16, 2024, 6:50 a.m. | OK | Scala | TESTS | 11 | 483 | 0 | 900 |
Back to search problems