Codeforces Round 908 (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
1894 Codeforces Round 908 (Div. 2) FINISHED False 7200 37812263 Nov. 7, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 19246 ) A Secret Sport PROGRAMMING implementation

B"Let's consider a game in which two players, A and B, participate. This game is characterized by two positive integers, X and Y . The game consists of sets, and each set consists of plays. In each play, exactly one of the players, either A or B, wins. A set ends exactly when one of the players reaches X wins in the plays of that set. This player is declared the winner of the set. The players play sets until one of them reaches Y wins in the sets. After that, the game ends, and this player is declared the winner of the entire game. You have just watched a game but didn't notice who was declared the winner. You remember that during the game, n plays were played, and you know which player won each play. However, you do not know the values of X and Y . Based on the available information, determine who won the entire game -- A or B. If there is not enough information to determine the winner, you should also report it. Each test contains multiple test cases. The first line contains a single integer t (1 <= q t <= q 10^4) - the number of test cases. The description of the test cases follows. The first line of each test case contains an integer n (1 <= q n <= q 20) - the number of plays played during the game. The second line of each test case contains a string s of length n , consisting of characters texttt{A} and texttt{B} . If s_i = texttt{A} , it means that player A won the i -th play. If s_i = texttt{B} , it means that player B won the i -th play. It is guaranteed that the given sequence of plays corresponds to at least one valid game scenario, for some values of X and Y . For each test case, output: In the first test case, the game could have been played with parameters X = 3 , Y = 1 . The game consisted of 1 set, in which player A won, as they won the first 3 plays. In this scenario, player A is the winner. The game"...

Tutorials

Codeforces Round 908 (Div. 1, Div, 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
231864543 bluemegane A Nov. 7, 2023, 10:26 p.m. OK C# 8 TESTS 4 170 1024000
231855101 2021331001 A Nov. 7, 2023, 8:14 p.m. OK Clang++17 Diagnostics TESTS 4 108 0
231833297 akshun_07 A Nov. 7, 2023, 5:49 p.m. OK Clang++17 Diagnostics TESTS 4 202 2150400
231848674 Ducky263 A Nov. 7, 2023, 7:33 p.m. OK Clang++20 Diagnostics TESTS 4 155 0
231838635 RedWine356 A Nov. 7, 2023, 6:35 p.m. OK Clang++20 Diagnostics TESTS 4 217 0
231872383 shiqi798. A Nov. 8, 2023, 1:44 a.m. OK GNU C11 TESTS 4 31 0
231888858 2100031772 A Nov. 8, 2023, 5:53 a.m. OK GNU C11 TESTS 4 46 0
231828211 apkabiraj A Nov. 7, 2023, 5:14 p.m. OK GNU C11 TESTS 4 46 0
231854471 maniii97 A Nov. 7, 2023, 8:06 p.m. OK GNU C11 TESTS 4 46 0
231868982 vjudge4 A Nov. 8, 2023, 12:29 a.m. OK GNU C11 TESTS 4 46 0
231871106 Arsud A Nov. 8, 2023, 1:15 a.m. OK GNU C11 TESTS 4 46 0
231883596 Imran01x A Nov. 8, 2023, 4:41 a.m. OK GNU C11 TESTS 4 46 0
231884719 mehul_agarwal A Nov. 8, 2023, 4:58 a.m. OK GNU C11 TESTS 4 46 0
231824180 Shuvro07 A Nov. 7, 2023, 4:56 p.m. OK GNU C11 TESTS 4 46 0
231828180 iffatul_anon A Nov. 7, 2023, 5:14 p.m. OK GNU C11 TESTS 4 46 0
231883035 iliyian A Nov. 8, 2023, 4:31 a.m. OK GNU C++14 TESTS 4 0 0
231860137 marzia7hossain2021 A Nov. 7, 2023, 9 p.m. OK GNU C++14 TESTS 4 0 0
231866291 charmyy A Nov. 7, 2023, 11:12 p.m. OK GNU C++14 TESTS 4 0 0
231868605 ljyyyds5 A Nov. 8, 2023, 12:20 a.m. OK GNU C++14 TESTS 4 0 0
231815925 Brankonymous A Nov. 7, 2023, 4:27 p.m. OK GNU C++14 TESTS 4 0 1024000
231875556 XUYAO1123 A Nov. 8, 2023, 2:38 a.m. OK GNU C++14 TESTS 4 15 0
231888573 Iamryan7 A Nov. 8, 2023, 5:50 a.m. OK GNU C++14 TESTS 4 15 0
231881932 param_1 A Nov. 8, 2023, 4:15 a.m. OK GNU C++14 TESTS 4 15 0
231878930 bb_16 A Nov. 8, 2023, 3:31 a.m. OK GNU C++14 TESTS 4 15 0
231876741 xybq A Nov. 8, 2023, 2:59 a.m. OK GNU C++14 TESTS 4 15 0
231886816 Ariful_Islam. A Nov. 8, 2023, 5:27 a.m. OK GNU C++17 TESTS 4 0 0
231885480 aditya.aryan.ug20 A Nov. 8, 2023, 5:08 a.m. OK GNU C++17 TESTS 4 0 0
231885361 JanuaryZJY A Nov. 8, 2023, 5:07 a.m. OK GNU C++17 TESTS 4 0 0
231874560 ZiFeii A Nov. 8, 2023, 2:22 a.m. OK GNU C++17 TESTS 4 0 0
231871410 iagozag A Nov. 8, 2023, 1:20 a.m. OK GNU C++17 TESTS 4 0 0
231867416 QuiqueLuna A Nov. 7, 2023, 11:47 p.m. OK GNU C++17 TESTS 4 0 0
231866443 BallonDor A Nov. 7, 2023, 11:16 p.m. OK GNU C++17 TESTS 4 0 0
231864239 Ragnar_10 A Nov. 7, 2023, 10:18 p.m. OK GNU C++17 TESTS 4 0 0
231847679 rb003 A Nov. 7, 2023, 7:32 p.m. OK GNU C++17 TESTS 4 0 0
231835679 Suiiinaldo A Nov. 7, 2023, 6:09 p.m. OK GNU C++17 TESTS 4 0 0
231833300 aryans_20 A Nov. 7, 2023, 5:49 p.m. OK GNU C++17 (64) TESTS 4 0 0
231886215 xuweihao1000 A Nov. 8, 2023, 5:19 a.m. OK GNU C++17 (64) TESTS 4 0 0
231862392 12742147 A Nov. 7, 2023, 9:37 p.m. OK GNU C++17 (64) TESTS 4 15 0
231889117 importlogic A Nov. 8, 2023, 5:56 a.m. OK GNU C++17 (64) TESTS 4 15 0
231884637 zhaopipichishi A Nov. 8, 2023, 4:57 a.m. OK GNU C++17 (64) TESTS 4 15 0
231881336 imsuck12 A Nov. 8, 2023, 4:07 a.m. OK GNU C++17 (64) TESTS 4 15 0
231870592 wuyin331 A Nov. 8, 2023, 1:04 a.m. OK GNU C++17 (64) TESTS 4 15 0
231869826 Once_I_Liked_AGirl A Nov. 8, 2023, 12:48 a.m. OK GNU C++17 (64) TESTS 4 15 0
231868921 BODH A Nov. 8, 2023, 12:28 a.m. OK GNU C++17 (64) TESTS 4 15 0
231864918 Omar_Mahfouz A Nov. 7, 2023, 10:35 p.m. OK GNU C++17 (64) TESTS 4 15 0
231884347 gzdxcodefish A Nov. 8, 2023, 4:53 a.m. OK GNU C++20 (64) TESTS 4 0 0
231885018 insane_22 A Nov. 8, 2023, 5:02 a.m. OK GNU C++20 (64) TESTS 4 0 0
231885311 ForTomorrow A Nov. 8, 2023, 5:06 a.m. OK GNU C++20 (64) TESTS 4 0 0
231885337 5720226849 A Nov. 8, 2023, 5:07 a.m. OK GNU C++20 (64) TESTS 4 0 0
231885653 yskm A Nov. 8, 2023, 5:11 a.m. OK GNU C++20 (64) TESTS 4 0 0
231886176 curtain-cpp A Nov. 8, 2023, 5:18 a.m. OK GNU C++20 (64) TESTS 4 0 0
231886392 Anchar_Champu A Nov. 8, 2023, 5:21 a.m. OK GNU C++20 (64) TESTS 4 0 0
231887764 ForTomorrow A Nov. 8, 2023, 5:40 a.m. OK GNU C++20 (64) TESTS 4 0 0
231889145 BuddhaBarFans A Nov. 8, 2023, 5:56 a.m. OK GNU C++20 (64) TESTS 4 0 0
231889409 Pratyu111 A Nov. 8, 2023, 6 a.m. OK GNU C++20 (64) TESTS 4 0 0
231834051 BurnerAce A Nov. 7, 2023, 5:55 p.m. OK Java 11 TESTS 4 155 0
231825078 rajkothari634 A Nov. 7, 2023, 4:59 p.m. OK Java 11 TESTS 4 155 0
231888875 doggycool A Nov. 8, 2023, 5:53 a.m. OK Java 11 TESTS 4 171 0
231884331 vijender_8601 A Nov. 8, 2023, 4:52 a.m. OK Java 11 TESTS 4 171 0
231830231 TCchen A Nov. 7, 2023, 5:26 p.m. OK Java 11 TESTS 4 202 0
231888181 nk_Navin A Nov. 8, 2023, 5:45 a.m. OK Java 11 TESTS 4 249 0
231801846 flappyCoder A Nov. 7, 2023, 4:21 p.m. OK Java 11 TESTS 4 264 0
231848940 DessertRommet A Nov. 7, 2023, 7:36 p.m. OK Java 11 TESTS 4 280 102400
231829523 goldener A Nov. 7, 2023, 5:22 p.m. OK Java 11 TESTS 4 295 102400
231882324 coadingcat A Nov. 8, 2023, 4:21 a.m. OK Java 11 TESTS 4 296 102400
231875990 prateeksama2003 A Nov. 8, 2023, 2:46 a.m. OK Java 17 TESTS 4 155 819200
231886854 Prime369 A Nov. 8, 2023, 5:28 a.m. OK Java 17 TESTS 4 155 921600
231834562 anitya A Nov. 7, 2023, 5:59 p.m. OK Java 17 TESTS 4 233 614400
231825568 Manas421321 A Nov. 7, 2023, 5:01 p.m. OK Java 17 TESTS 4 233 614400
231816171 Suludardan A Nov. 7, 2023, 4:28 p.m. OK Java 17 TESTS 4 233 921600
231790169 Manas421321 A Nov. 7, 2023, 4:15 p.m. OK Java 17 TESTS 4 233 921600
231885551 productivity.345 A Nov. 8, 2023, 5:09 a.m. OK Java 17 TESTS 4 233 1228800
231876790 vamshikrish1303 A Nov. 8, 2023, 3 a.m. OK Java 17 TESTS 4 233 1331200
231788303 Vivek1705 A Nov. 7, 2023, 4:10 p.m. OK Java 17 TESTS 4 249 921600
231843197 Arbaaz_ali_265 A Nov. 7, 2023, 7:01 p.m. OK Java 17 TESTS 4 249 1024000
231880270 vikasseervi357 A Nov. 8, 2023, 3:53 a.m. OK Java 21 TESTS 4 218 716800
231870811 Ligh0x74 A Nov. 8, 2023, 1:08 a.m. OK Java 21 TESTS 4 233 0
231827023 Akash_Sardar A Nov. 7, 2023, 5:08 p.m. OK Java 21 TESTS 4 280 409600
231831047 darshanjan-entrepreneur A Nov. 7, 2023, 5:32 p.m. OK Java 21 TESTS 4 296 204800
231869811 Kev1nYu A Nov. 8, 2023, 12:47 a.m. OK Java 21 TESTS 4 311 614400
231785421 Aayush_pandey12 A Nov. 7, 2023, 4:01 p.m. OK Java 21 TESTS 4 311 1024000
231786594 Akshay_gande A Nov. 7, 2023, 4:05 p.m. OK Java 21 TESTS 4 327 819200
231825025 shruthi_01 A Nov. 7, 2023, 4:59 p.m. OK Java 21 TESTS 4 343 1433600
231786172 vansh22559 A Nov. 7, 2023, 4:04 p.m. OK Java 21 TESTS 4 373 409600
231817230 sahithi_ A Nov. 7, 2023, 4:30 p.m. OK Java 21 TESTS 4 389 819200
231872559 Udayf A Nov. 8, 2023, 1:47 a.m. OK Java 8 TESTS 4 93 0
231879724 yvbf A Nov. 8, 2023, 3:45 a.m. OK Java 8 TESTS 4 108 0
231834559 Akarsh2810 A Nov. 7, 2023, 5:59 p.m. OK Java 8 TESTS 4 139 0
231848682 Akarsh2810 A Nov. 7, 2023, 7:33 p.m. OK Java 8 TESTS 4 140 0
231839335 Sumitsingh7 A Nov. 7, 2023, 6:43 p.m. OK Java 8 TESTS 4 186 6451200
231829933 jitu7033 A Nov. 7, 2023, 5:24 p.m. OK Java 8 TESTS 4 187 0
231785606 aniket27 A Nov. 7, 2023, 4:02 p.m. OK Java 8 TESTS 4 202 0
231850914 momenoo A Nov. 7, 2023, 8:01 p.m. OK Java 8 TESTS 4 218 0
231835847 priyaroy3370 A Nov. 7, 2023, 6:11 p.m. OK Java 8 TESTS 4 218 0
231864161 seyjs A Nov. 7, 2023, 10:16 p.m. OK Java 8 TESTS 4 234 0
231818485 cheeems A Nov. 7, 2023, 4:33 p.m. OK MS C++ 2017 TESTS 4 31 0
231808890 PolarisJing A Nov. 7, 2023, 4:25 p.m. OK MS C++ 2017 TESTS 4 31 0
231884471 Ravitosh A Nov. 8, 2023, 4:55 a.m. OK MS C++ 2017 TESTS 4 46 0
231875392 WXL. A Nov. 8, 2023, 2:35 a.m. OK MS C++ 2017 TESTS 4 46 0
231873902 Jasharaj A Nov. 8, 2023, 2:12 a.m. OK MS C++ 2017 TESTS 4 46 0
231868390 ElBarbados A Nov. 8, 2023, 12:15 a.m. OK MS C++ 2017 TESTS 4 46 0
231801617 MarcusFlint41 A Nov. 7, 2023, 4:20 p.m. OK MS C++ 2017 TESTS 4 46 0
231801565 Lu_Kai A Nov. 7, 2023, 4:20 p.m. OK MS C++ 2017 TESTS 4 46 0
231789305 VitaliiV A Nov. 7, 2023, 4:12 p.m. OK MS C++ 2017 TESTS 4 46 0
231835282 BidyloSI_tgiek A Nov. 7, 2023, 6:05 p.m. OK MS C++ 2017 TESTS 4 62 0
231870751 chinesedfan A Nov. 8, 2023, 1:07 a.m. OK Node.js TESTS 4 62 5427200
231864796 DRDIV A Nov. 7, 2023, 10:32 p.m. OK PyPy 3 TESTS 4 108 3072000
231858906 0xROoT A Nov. 7, 2023, 8:42 p.m. OK PyPy 3 TESTS 4 109 3072000
231886089 AnirudhBharatiya A Nov. 8, 2023, 5:17 a.m. OK PyPy 3 TESTS 4 311 6348800
231878660 MShah2003 A Nov. 8, 2023, 3:27 a.m. OK PyPy 3 TESTS 4 342 6348800
231829840 jvatsal0709 A Nov. 7, 2023, 5:24 p.m. OK PyPy 3 TESTS 4 343 6348800
231791155 Bluefog99 A Nov. 7, 2023, 4:18 p.m. OK PyPy 3 TESTS 4 358 6348800
231834532 Ali_2630 A Nov. 7, 2023, 5:59 p.m. OK PyPy 3 TESTS 4 358 7987200
231884056 maoxiang A Nov. 8, 2023, 4:48 a.m. OK PyPy 3 TESTS 4 358 9011200
231827325 hxu10 A Nov. 7, 2023, 5:09 p.m. OK PyPy 3 TESTS 4 810 9523200
231844248 detective...dots A Nov. 7, 2023, 7:14 p.m. OK PyPy 3-64 TESTS 4 62 3481600
231845670 detective...dots A Nov. 7, 2023, 7:22 p.m. OK PyPy 3-64 TESTS 4 62 5632000
231844265 detective...dots A Nov. 7, 2023, 7:15 p.m. OK PyPy 3-64 TESTS 4 62 6553600
231839048 zouyu9631 A Nov. 7, 2023, 6:40 p.m. OK PyPy 3-64 TESTS 4 77 4198400
231871591 brightest66 A Nov. 8, 2023, 1:24 a.m. OK PyPy 3-64 TESTS 4 77 5939200
231870994 Wynona A Nov. 8, 2023, 1:12 a.m. OK PyPy 3-64 TESTS 4 77 6144000
231880631 MdAbedin A Nov. 8, 2023, 3:59 a.m. OK PyPy 3-64 TESTS 4 77 6246400
231879111 amoeba1 A Nov. 8, 2023, 3:35 a.m. OK PyPy 3-64 TESTS 4 77 6758400
231861258 devAhmeed A Nov. 7, 2023, 9:19 p.m. OK PyPy 3-64 TESTS 4 77 6758400
231844057 detective...dots A Nov. 7, 2023, 7:12 p.m. OK PyPy 3-64 TESTS 4 77 6758400
231803792 Shanks_2000 A Nov. 7, 2023, 4:23 p.m. OK Python 2 TESTS 4 109 512000
231875907 venuprogrammer01 A Nov. 8, 2023, 2:44 a.m. OK Python 3 TESTS 4 31 1740800
231827417 yy174 A Nov. 7, 2023, 5:10 p.m. OK Python 3 TESTS 4 46 0
231827563 yy174 A Nov. 7, 2023, 5:11 p.m. OK Python 3 TESTS 4 46 204800
231826722 yy174 A Nov. 7, 2023, 5:06 p.m. OK Python 3 TESTS 4 46 204800
231827332 yy174 A Nov. 7, 2023, 5:09 p.m. OK Python 3 TESTS 4 61 0
231868048 bkifhr10 A Nov. 8, 2023, 12:06 a.m. OK Python 3 TESTS 4 77 0
231836521 Luxy A Nov. 7, 2023, 6:17 p.m. OK Python 3 TESTS 4 77 0
231830641 dinyeah A Nov. 7, 2023, 5:29 p.m. OK Python 3 TESTS 4 77 0
231788587 huy_fan A Nov. 7, 2023, 4:10 p.m. OK Python 3 TESTS 4 77 1945600
231878658 msachinjames A Nov. 8, 2023, 3:27 a.m. OK Python 3 TESTS 4 92 0
231788866 NotSpaceBoy A Nov. 7, 2023, 4:11 p.m. OK Rust 2021 TESTS 4 77 0
231784845 ReZero___ A Nov. 7, 2023, 4 p.m. OK Rust 2021 TESTS 4 108 0

remove filters

Back to search problems