Codeforces Round 721 (Div. 2)

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
1527 Codeforces Round 721 (Div. 2) FINISHED False 7200 115831511 May 20, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 27071 ) B1 Palindrome Game (easy version) PROGRAMMING dp games 1200

B'The only difference between the easy and hard versions is that the given string s in the easy version is initially a palindrome, this condition is not always true for the hard version. A palindrome is a string that reads the same left to right and right to left. For example, "101101" is a palindrome, while "0101" is not. Alice and Bob are playing a game on a string s (which is initially a palindrome in this version) of length n consisting of the characters '0 ' and '1 '. Both players take alternate turns with Alice going first. In each turn, the player can perform one of the following operations: Reversing a string means reordering its letters from the last to the first. For example, "01001" becomes "10010" after reversing. The game ends when every character of string becomes '1 '. The player who spends minimum dollars till this point wins the game and it is a draw if both spend equal dollars. If both players play optimally, output whether Alice wins, Bob wins, or if it is a draw. The first line contains a single integer t ( 1 <= t <= 10^3 ). Then t test cases follow. The first line of each test case contains a single integer n ( 1 <= n <= 10^3 ). The second line of each test case contains the string s of length n , consisting of the characters '0 ' and '1 '. It is guaranteed that the string s is a palindrome and contains at least one '0 '. Note that there is no limit on the sum of n over test cases. For each test case print a single word in a new line: In the first test case of the example, '...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
116862158 Jexy B1 May 20, 2021, 9:59 p.m. OK GNU C11 TESTS 34 31 0 1200
116848366 hritikritesh B1 May 20, 2021, 5:56 p.m. OK GNU C11 TESTS 34 31 0 1200
116854895 kingslayer1107 B1 May 20, 2021, 7:14 p.m. OK GNU C11 TESTS 34 31 0 1200
116862724 StoAdoVroAvic B1 May 20, 2021, 10:21 p.m. OK GNU C11 TESTS 34 31 0 1200
116852757 mihirg42 B1 May 20, 2021, 6:42 p.m. OK GNU C11 TESTS 34 156 0 1200
116865914 final_trump LegendaryYYQ Lappland_Texas B1 May 21, 2021, 12:48 a.m. OK GNU C++11 TESTS 34 15 0 1200
116871869 YummyJay B1 May 21, 2021, 3:18 a.m. OK GNU C++11 TESTS 34 15 0 1200
116873458 trick_trick B1 May 21, 2021, 3:44 a.m. OK GNU C++11 TESTS 34 30 0 1200
116867044 final_trump LegendaryYYQ Lappland_Texas B1 May 21, 2021, 1:27 a.m. OK GNU C++11 TESTS 34 30 0 1200
116863176 zzlltt B1 May 20, 2021, 10:42 p.m. OK GNU C++11 TESTS 34 30 0 1200
116862057 zzlltt B1 May 20, 2021, 9:56 p.m. OK GNU C++11 TESTS 34 30 0 1200
116857484 Deepak_sangeetham B1 May 20, 2021, 7:59 p.m. OK GNU C++11 TESTS 34 30 0 1200
116853304 epiphany_21 B1 May 20, 2021, 6:50 p.m. OK GNU C++11 TESTS 34 30 0 1200
116875855 I_do_not_know B1 May 21, 2021, 4:22 a.m. OK GNU C++11 TESTS 34 30 0 1200
116874174 golder_ B1 May 21, 2021, 3:55 a.m. OK GNU C++11 TESTS 34 30 0 1200
116873687 adityarajiv B1 May 21, 2021, 3:47 a.m. OK GNU C++14 TESTS 34 15 204800 1200
116875926 shivani_0712 B1 May 21, 2021, 4:23 a.m. OK GNU C++14 TESTS 34 30 0 1200
116868340 yennnn B1 May 21, 2021, 2:07 a.m. OK GNU C++14 TESTS 34 30 204800 1200
116863398 namangpt2312 B1 May 20, 2021, 10:51 p.m. OK GNU C++14 TESTS 34 30 204800 1200
116861241 naman0137 B1 May 20, 2021, 9:29 p.m. OK GNU C++14 TESTS 34 30 204800 1200
116854770 ....... B1 May 20, 2021, 7:12 p.m. OK GNU C++14 TESTS 34 30 204800 1200
116875098 VFX B1 May 21, 2021, 4:09 a.m. OK GNU C++14 TESTS 34 30 204800 1200
116873537 Sahu_49 B1 May 21, 2021, 3:45 a.m. OK GNU C++14 TESTS 34 30 204800 1200
116882337 reckon77 B1 May 21, 2021, 5:50 a.m. OK GNU C++14 TESTS 34 30 204800 1200
116879675 Elias_Obeid B1 May 21, 2021, 5:16 a.m. OK GNU C++14 TESTS 34 30 204800 1200
116839429 xianman007 B1 May 20, 2021, 4:31 p.m. OK GNU C++17 TESTS 34 15 0 1200
116873310 Nonunou B1 May 21, 2021, 3:41 a.m. OK GNU C++17 TESTS 34 15 204800 1200
116876795 producer B1 May 21, 2021, 4:36 a.m. OK GNU C++17 TESTS 34 15 614400 1200
116849852 bhawesh7 B1 May 20, 2021, 6:09 p.m. OK GNU C++17 TESTS 34 30 0 1200
116877036 Aanandan_T_Ma B1 May 21, 2021, 4:39 a.m. OK GNU C++17 TESTS 34 30 0 1200
116873766 CQTshadow B1 May 21, 2021, 3:48 a.m. OK GNU C++17 TESTS 34 30 0 1200
116870461 Nuist_vida B1 May 21, 2021, 2:51 a.m. OK GNU C++17 TESTS 34 30 0 1200
116867683 TimmyChiang B1 May 21, 2021, 1:49 a.m. OK GNU C++17 TESTS 34 30 0 1200
116867071 rheallyc B1 May 21, 2021, 1:27 a.m. OK GNU C++17 TESTS 34 30 0 1200
116852905 ayush_0811 B1 May 20, 2021, 6:45 p.m. OK GNU C++17 TESTS 34 30 0 1200
116869149 tanishq_code_c B1 May 21, 2021, 2:24 a.m. OK GNU C++17 (64) TESTS 34 15 102400 1200
116849466 carrot B1 May 20, 2021, 6:05 p.m. OK GNU C++17 (64) TESTS 34 15 102400 1200
116841658 qscfthmko147 B1 May 20, 2021, 4:33 p.m. OK GNU C++17 (64) TESTS 34 30 0 1200
116852908 Saeed_247 B1 May 20, 2021, 6:45 p.m. OK GNU C++17 (64) TESTS 34 30 0 1200
116846801 CodeChamp_SS B1 May 20, 2021, 5:44 p.m. OK GNU C++17 (64) TESTS 34 30 0 1200
116860661 lucid_dreamer B1 May 20, 2021, 9:11 p.m. OK GNU C++17 (64) TESTS 34 30 0 1200
116861584 mahi2309 B1 May 20, 2021, 9:39 p.m. OK GNU C++17 (64) TESTS 34 30 0 1200
116866852 DQ9911 B1 May 21, 2021, 1:21 a.m. OK GNU C++17 (64) TESTS 34 30 102400 1200
116882176 Avash_Mitra B1 May 21, 2021, 5:48 a.m. OK GNU C++17 (64) TESTS 34 30 102400 1200
116865411 bkifhr6 B1 May 21, 2021, 12:27 a.m. OK GNU C++17 (64) TESTS 34 30 102400 1200
116849447 thiebt B1 May 20, 2021, 6:05 p.m. OK Go TESTS 34 31 102400 1200
116881224 0x3F B1 May 21, 2021, 5:36 a.m. OK Go TESTS 34 46 0 1200
116874068 0x3F B1 May 21, 2021, 3:53 a.m. OK Go TESTS 34 62 102400 1200
116860714 MubtasimShahriar B1 May 20, 2021, 9:13 p.m. OK Java 11 TESTS 34 187 0 1200
116881771 not_fun B1 May 21, 2021, 5:43 a.m. OK Java 11 TESTS 34 187 0 1200
116875826 ypa B1 May 21, 2021, 4:21 a.m. OK Java 11 TESTS 34 187 0 1200
116871941 ypa B1 May 21, 2021, 3:19 a.m. OK Java 11 TESTS 34 187 0 1200
116866789 _Body B1 May 21, 2021, 1:19 a.m. OK Java 11 TESTS 34 187 0 1200
116863642 pradjay299 B1 May 20, 2021, 11:05 p.m. OK Java 11 TESTS 34 187 0 1200
116858787 adarsh_goku B1 May 20, 2021, 8:25 p.m. OK Java 11 TESTS 34 187 0 1200
116847644 pdk.abhishek B1 May 20, 2021, 5:50 p.m. OK Java 11 TESTS 34 187 0 1200
116845998 goyalronak3 B1 May 20, 2021, 5:38 p.m. OK Java 11 TESTS 34 187 0 1200
116881936 Log_ZOOM B1 May 21, 2021, 5:45 a.m. OK Java 11 TESTS 34 202 0 1200
116874034 Pranay2516 B1 May 21, 2021, 3:53 a.m. OK Java 8 TESTS 34 109 0 1200
116872527 _robindhankhar B1 May 21, 2021, 3:28 a.m. OK Java 8 TESTS 34 124 0 1200
116852888 Gupta-OP B1 May 20, 2021, 6:44 p.m. OK Java 8 TESTS 34 124 0 1200
116851974 dynamo_001 B1 May 20, 2021, 6:32 p.m. OK Java 8 TESTS 34 124 0 1200
116848664 PRIYANSH_TOMAR B1 May 20, 2021, 5:58 p.m. OK Java 8 TESTS 34 124 0 1200
116846737 DarkAster B1 May 20, 2021, 5:43 p.m. OK Java 8 TESTS 34 124 0 1200
116846016 Abdallah_Ragab00 B1 May 20, 2021, 5:38 p.m. OK Java 8 TESTS 34 124 0 1200
116845391 Columbus B1 May 20, 2021, 5:35 p.m. OK Java 8 TESTS 34 124 0 1200
116845352 tarun_sm B1 May 20, 2021, 5:35 p.m. OK Java 8 TESTS 34 124 0 1200
116881725 avneet_081 B1 May 21, 2021, 5:42 a.m. OK Java 8 TESTS 34 124 0 1200
116877435 codersanjeev B1 May 21, 2021, 4:44 a.m. OK Kotlin TESTS 34 140 0 1200
116881170 xoolwater B1 May 21, 2021, 5:36 a.m. OK Kotlin TESTS 34 156 0 1200
116877615 pallav12 B1 May 21, 2021, 4:46 a.m. OK Kotlin TESTS 34 171 0 1200
116842621 PLA_Nh B1 May 20, 2021, 4:34 p.m. OK MS C++ 2017 TESTS 34 31 0 1200
116878814 ZeroBlast B1 May 21, 2021, 5:04 a.m. OK MS C++ 2017 TESTS 34 31 0 1200
116859812 samarth9421 B1 May 20, 2021, 8:49 p.m. OK MS C++ 2017 TESTS 34 31 0 1200
116852690 UnHingedFrog B1 May 20, 2021, 6:42 p.m. OK MS C++ 2017 TESTS 34 31 0 1200
116839763 cosinechicken B1 May 20, 2021, 4:31 p.m. OK MS C++ 2017 TESTS 34 31 1126400 1200
116872026 Cx330_L B1 May 21, 2021, 3:20 a.m. OK MS C++ 2017 TESTS 34 46 0 1200
116845929 PLA_Nh B1 May 20, 2021, 5:38 p.m. OK MS C++ 2017 TESTS 34 46 0 1200
116877503 ravinem1 B1 May 21, 2021, 4:45 a.m. OK .NET Core C# TESTS 34 93 2764800 1200
116857019 henrychenOutlook B1 May 20, 2021, 7:50 p.m. OK Node.js TESTS 34 109 5734400 1200
116873489 rishabnahar2025 B1 May 21, 2021, 3:44 a.m. OK PyPy 2 TESTS 34 233 14131200 1200
116858778 lebron87 B1 May 20, 2021, 8:25 p.m. OK PyPy 2 TESTS 34 280 11264000 1200
116871963 kirito18086 B1 May 21, 2021, 3:19 a.m. OK PyPy 3 TESTS 34 124 3584000 1200
116882097 uttharapally.chandra B1 May 21, 2021, 5:47 a.m. OK PyPy 3 TESTS 34 124 4198400 1200
116855402 akshitm16 B1 May 20, 2021, 7:23 p.m. OK PyPy 3 TESTS 34 155 3993600 1200
116847759 6-_-9 B1 May 20, 2021, 5:50 p.m. OK PyPy 3 TESTS 34 155 4300800 1200
116851778 FireBird23 B1 May 20, 2021, 6:30 p.m. OK PyPy 3 TESTS 34 171 5939200 1200
116875719 piSquared B1 May 21, 2021, 4:19 a.m. OK PyPy 3 TESTS 34 186 4096000 1200
116839879 VarAmu B1 May 20, 2021, 4:31 p.m. OK PyPy 3 TESTS 34 186 6041600 1200
116855625 akshitm16 B1 May 20, 2021, 7:27 p.m. OK PyPy 3 TESTS 34 187 3891200 1200
116851135 Melmetal B1 May 20, 2021, 6:23 p.m. OK PyPy 3 TESTS 34 187 4403200 1200
116879630 jainil4801 B1 May 21, 2021, 5:15 a.m. OK PyPy 3 TESTS 34 187 5120000 1200
116862920 boogeymanJW B1 May 20, 2021, 10:31 p.m. OK Python 2 TESTS 34 93 307200 1200
116881004 nicknamekishan B1 May 21, 2021, 5:34 a.m. OK Python 3 TESTS 34 62 102400 1200
116850772 praneethvasa B1 May 20, 2021, 6:19 p.m. OK Python 3 TESTS 34 62 409600 1200
116879698 Gauranshu B1 May 21, 2021, 5:16 a.m. OK Python 3 TESTS 34 62 1536000 1200
116882673 Vas07 B1 May 21, 2021, 5:54 a.m. OK Python 3 TESTS 34 77 0 1200
116882123 pranjal_1234 B1 May 21, 2021, 5:47 a.m. OK Python 3 TESTS 34 77 0 1200
116880248 Madara_Uzumaki B1 May 21, 2021, 5:24 a.m. OK Python 3 TESTS 34 77 0 1200
116879317 NeoCipher B1 May 21, 2021, 5:11 a.m. OK Python 3 TESTS 34 77 0 1200
116878913 EdgeShot B1 May 21, 2021, 5:05 a.m. OK Python 3 TESTS 34 77 0 1200
116859956 harsh.yadav1 B1 May 20, 2021, 8:52 p.m. OK Python 3 TESTS 34 77 0 1200
116849890 acewiz B1 May 20, 2021, 6:10 p.m. OK Python 3 TESTS 34 77 0 1200
116852146 gustavofadel B1 May 20, 2021, 6:35 p.m. OK Python 3 + libs TESTS 34 78 0 1200
116849924 SgnJp B1 May 20, 2021, 6:10 p.m. OK Python 3 + libs TESTS 34 93 0 1200
116859728 MrMopi5000 B1 May 20, 2021, 8:47 p.m. OK Ruby 3 TESTS 34 311 2048000 1200
116844775 Hillmouse B1 May 20, 2021, 5:33 p.m. OK Rust TESTS 34 31 102400 1200
116860344 p00f B1 May 20, 2021, 9:04 p.m. OK Rust TESTS 34 46 0 1200

remove filters

Back to search problems