Codeforces Round 898 (Div. 4)

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
1873 Codeforces Round 898 (Div. 4) FINISHED False 9000 36516299 Sept. 21, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 13565 ) G ABBC or BACB PROGRAMMING greedy

B'You are given a string s made up of characters texttt{A} and texttt{B} . Initially you have no coins. You can perform two types of operations: ^ dagger A substring of length 2 is a sequence of two adjacent characters of a string. The input consists of multiple test cases. The first line of the input contains a single integer t ( 1 <= q t <= q 1000 ) -- the number of test cases. The only line of each test case contains the string s ( 1 <= q |s| <= q 2 cdot 10^5 ). All characters of s are either texttt{A} or texttt{B} . The sum of the lengths of s over all test cases does not exceed 2 cdot 10^5 . For each test case, output a single integer -- the maximum number of coins you can obtain. In the first test case you can perform the following operations to get 2 coins: color{red}{ texttt{AB}} texttt{BA} to texttt{BC} color{red}{ texttt{BA}} to texttt{BCCB} In the second test case you can perform the following operation to get 1 coin: color{red}{ texttt{AB}} texttt{A} to texttt{BCA} In the third test case you can perform the following operations to get 3 coins: color{red}{ texttt{BA}} texttt{ABA} to texttt{CBA} color{red}{ texttt{BA}} to texttt{C} color{red}{ texttt{BA}} texttt{CB} to texttt{CCBCB} '...

Tutorials

120634

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
224552614 bluemegane G Sept. 22, 2023, 3:44 a.m. OK C# 8 TESTS 9 140 4403200
224547187 ruban G Sept. 22, 2023, 2:19 a.m. OK FPC TESTS 9 30 10137600
224543604 vantuantrinh112008 G Sept. 22, 2023, 1:17 a.m. OK FPC TESTS 9 30 17408000
224537919 NenadDapic G Sept. 21, 2023, 11 p.m. OK FPC TESTS 9 46 1126400
224521024 aastik231205 G Sept. 21, 2023, 6:45 p.m. OK GNU C11 TESTS 9 30 0
224558186 ahmedafeef G Sept. 22, 2023, 4:55 a.m. OK GNU C11 TESTS 9 31 0
224536564 ikura355 G Sept. 21, 2023, 10:26 p.m. OK GNU C++14 TESTS 9 15 204800
224548984 Zzzyz G Sept. 22, 2023, 2:49 a.m. OK GNU C++14 TESTS 9 15 512000
224544104 bu_fan3 G Sept. 22, 2023, 1:28 a.m. OK GNU C++14 TESTS 9 15 512000
224543994 omeganot G Sept. 22, 2023, 1:26 a.m. OK GNU C++14 TESTS 9 15 512000
224530179 canuplsstfu G Sept. 21, 2023, 8:27 p.m. OK GNU C++14 TESTS 9 15 512000
224524701 vivkostov G Sept. 21, 2023, 7:23 p.m. OK GNU C++14 TESTS 9 15 512000
224515715 Lorenzooo G Sept. 21, 2023, 6:02 p.m. OK GNU C++14 TESTS 9 15 512000
224550871 lamduybao03 G Sept. 22, 2023, 3:18 a.m. OK GNU C++14 TESTS 9 15 512000
224561134 YJDDB G Sept. 22, 2023, 5:30 a.m. OK GNU C++14 TESTS 9 15 512000
224522518 dushki G Sept. 21, 2023, 7 p.m. OK GNU C++14 TESTS 9 15 1331200
224549453 Richard10001011000 G Sept. 22, 2023, 2:56 a.m. OK GNU C++17 TESTS 9 15 204800
224561494 Gagapoopoo G Sept. 22, 2023, 5:34 a.m. OK GNU C++17 TESTS 9 15 512000
224561231 DaniDiazTech G Sept. 22, 2023, 5:31 a.m. OK GNU C++17 TESTS 9 15 512000
224560124 Harry_47 G Sept. 22, 2023, 5:19 a.m. OK GNU C++17 TESTS 9 15 512000
224562616 rutvik_1234 G Sept. 22, 2023, 5:46 a.m. OK GNU C++17 TESTS 9 15 512000
224558669 kollikiran_123 G Sept. 22, 2023, 5:01 a.m. OK GNU C++17 TESTS 9 15 512000
224558640 Maanas23 G Sept. 22, 2023, 5:01 a.m. OK GNU C++17 TESTS 9 15 512000
224557314 rahulv2001 G Sept. 22, 2023, 4:44 a.m. OK GNU C++17 TESTS 9 15 512000
224558892 guesshere G Sept. 22, 2023, 5:04 a.m. OK GNU C++17 TESTS 9 15 512000
224561915 1e-9 G Sept. 22, 2023, 5:38 a.m. OK GNU C++17 TESTS 9 15 512000
224554371 y_combinator G Sept. 22, 2023, 4:02 a.m. OK GNU C++17 (64) TESTS 9 0 512000
224536117 mhmuhim G Sept. 21, 2023, 10:15 p.m. OK GNU C++17 (64) TESTS 9 0 512000
224561489 Njaso G Sept. 22, 2023, 5:34 a.m. OK GNU C++17 (64) TESTS 9 0 4505600
224524732 SakiBee G Sept. 21, 2023, 7:23 p.m. OK GNU C++17 (64) TESTS 9 15 512000
224535845 Dr.Alfred G Sept. 21, 2023, 10:08 p.m. OK GNU C++17 (64) TESTS 9 15 512000
224529144 felipefreitag G Sept. 21, 2023, 8:14 p.m. OK GNU C++17 (64) TESTS 9 15 512000
224544034 RohitRKS G Sept. 22, 2023, 1:26 a.m. OK GNU C++17 (64) TESTS 9 15 512000
224527418 Abdo_Hany G Sept. 21, 2023, 7:54 p.m. OK GNU C++17 (64) TESTS 9 15 512000
224552775 lhardt G Sept. 22, 2023, 3:46 a.m. OK GNU C++17 (64) TESTS 9 15 512000
224528549 ashuashutosh2211 G Sept. 21, 2023, 8:06 p.m. OK GNU C++17 (64) TESTS 9 15 512000
224549714 AAsAH G Sept. 22, 2023, 3 a.m. OK GNU C++20 (64) TESTS 9 0 512000
224548587 yttx G Sept. 22, 2023, 2:43 a.m. OK GNU C++20 (64) TESTS 9 0 512000
224558123 __Lonny G Sept. 22, 2023, 4:55 a.m. OK GNU C++20 (64) TESTS 9 0 512000
224562991 Docute G Sept. 22, 2023, 5:50 a.m. OK GNU C++20 (64) TESTS 9 0 512000
224561087 chan1021 G Sept. 22, 2023, 5:30 a.m. OK GNU C++20 (64) TESTS 9 0 512000
224560917 roycf123 G Sept. 22, 2023, 5:28 a.m. OK GNU C++20 (64) TESTS 9 0 512000
224560709 KushagraVedRiti_2127 G Sept. 22, 2023, 5:26 a.m. OK GNU C++20 (64) TESTS 9 0 512000
224557576 AmateurCode G Sept. 22, 2023, 4:48 a.m. OK GNU C++20 (64) TESTS 9 0 512000
224552855 GJ.Ro G Sept. 22, 2023, 3:47 a.m. OK GNU C++20 (64) TESTS 9 0 512000
224552166 aminjon__ G Sept. 22, 2023, 3:37 a.m. OK GNU C++20 (64) TESTS 9 0 512000
224562877 aishwarykesarwani G Sept. 22, 2023, 5:48 a.m. OK Java 11 TESTS 9 186 0
224520307 polsage G Sept. 21, 2023, 6:39 p.m. OK Java 11 TESTS 9 187 0
224532528 dark_rays G Sept. 21, 2023, 9:02 p.m. OK Java 11 TESTS 9 202 0
224529990 JordanPoole G Sept. 21, 2023, 8:25 p.m. OK Java 11 TESTS 9 202 0
224526124 kasiru_69 G Sept. 21, 2023, 7:40 p.m. OK Java 11 TESTS 9 202 0
224517766 kushwaha_vi G Sept. 21, 2023, 6:18 p.m. OK Java 11 TESTS 9 202 14950400
224560885 Biubiu0919 G Sept. 22, 2023, 5:28 a.m. OK Java 17 TESTS 9 202 204800
224528224 maurya.rahul682 G Sept. 21, 2023, 8:03 p.m. OK Java 17 TESTS 9 202 409600
224548487 G8L18M G Sept. 22, 2023, 2:41 a.m. OK Java 17 TESTS 9 202 614400
224515686 dzhi G Sept. 21, 2023, 6:02 p.m. OK Java 17 TESTS 9 217 614400
224524084 dzhi G Sept. 21, 2023, 7:16 p.m. OK Java 17 TESTS 9 217 716800
224550901 fightingxjz G Sept. 22, 2023, 3:18 a.m. OK Java 17 TESTS 9 218 307200
224522445 AyushVardhan G Sept. 21, 2023, 6:59 p.m. OK Java 17 TESTS 9 218 921600
224552014 vikash_45 G Sept. 22, 2023, 3:35 a.m. OK Java 17 TESTS 9 233 409600
224541202 hualuoQAQ G Sept. 22, 2023, 12:29 a.m. OK Java 17 TESTS 9 234 409600
224557461 ikun111 G Sept. 22, 2023, 4:46 a.m. OK Java 17 TESTS 9 249 409600
224558388 is-this-alt G Sept. 22, 2023, 4:58 a.m. OK Java 21 TESTS 9 280 18841600
224558332 is-this-alt G Sept. 22, 2023, 4:57 a.m. OK Java 21 TESTS 9 296 18944000
224558905 is-this-alt G Sept. 22, 2023, 5:04 a.m. OK Java 21 TESTS 9 327 18739200
224539603 Safawt G Sept. 21, 2023, 11:48 p.m. OK Java 8 TESTS 9 93 0
224557479 pribic G Sept. 22, 2023, 4:46 a.m. OK Java 8 TESTS 9 108 0
224545111 Zhanzhe_Lee G Sept. 22, 2023, 1:45 a.m. OK Java 8 TESTS 9 109 0
224523318 vijay_panwar12 G Sept. 21, 2023, 7:08 p.m. OK Java 8 TESTS 9 109 0
224520472 Yousef_Badr G Sept. 21, 2023, 6:40 p.m. OK Java 8 TESTS 9 109 0
224521329 Sumitsingh7 G Sept. 21, 2023, 6:48 p.m. OK Java 8 TESTS 9 124 5836800
224552732 Sri_ram_Prasad_01 G Sept. 22, 2023, 3:45 a.m. OK Java 8 TESTS 9 140 0
224525919 arutsudar G Sept. 21, 2023, 7:37 p.m. OK Java 8 TESTS 9 186 0
224558767 is-this-alt G Sept. 22, 2023, 5:02 a.m. OK Kotlin 1.7 TESTS 9 530 57753600
224560856 saichandra004 G Sept. 22, 2023, 5:27 a.m. OK Node.js TESTS 9 93 4608000
224561071 saichandra004 G Sept. 22, 2023, 5:30 a.m. OK Node.js TESTS 9 93 4710400
224550926 pulkitkumarmathur1 G Sept. 22, 2023, 3:19 a.m. OK PHP TESTS 9 498 11059200
224551747 Yergali G Sept. 22, 2023, 3:31 a.m. OK PyPy 3 TESTS 9 124 4710400
224518135 momenelmesady4803 G Sept. 21, 2023, 6:21 p.m. OK PyPy 3 TESTS 9 124 5017600
224547188 YMSeah G Sept. 22, 2023, 2:19 a.m. OK PyPy 3 TESTS 9 140 4710400
224543675 yyytf__ G Sept. 22, 2023, 1:19 a.m. OK PyPy 3 TESTS 9 140 6246400
224527689 DRDIV G Sept. 21, 2023, 7:57 p.m. OK PyPy 3 TESTS 9 155 5734400
224517636 sleepingonee G Sept. 21, 2023, 6:17 p.m. OK PyPy 3-64 TESTS 9 77 4403200
224548382 flexr G Sept. 22, 2023, 2:39 a.m. OK PyPy 3-64 TESTS 9 93 3584000
224528975 gardengnome G Sept. 21, 2023, 8:12 p.m. OK PyPy 3-64 TESTS 9 93 5836800
224558478 Mohamed_Hamed G Sept. 22, 2023, 4:59 a.m. OK PyPy 3-64 TESTS 9 93 6860800
224535017 enova G Sept. 21, 2023, 9:49 p.m. OK PyPy 3-64 TESTS 9 93 6860800
224525031 stand_by G Sept. 21, 2023, 7:26 p.m. OK PyPy 3-64 TESTS 9 93 7270400
224562222 bruher G Sept. 22, 2023, 5:42 a.m. OK PyPy 3-64 TESTS 9 93 7782400
224563798 HaonnoaH G Sept. 22, 2023, 5:58 a.m. OK PyPy 3-64 TESTS 9 93 10035200
224538775 Keval_78 G Sept. 21, 2023, 11:24 p.m. OK PyPy 3-64 TESTS 9 93 135577600
224545583 wangzai G Sept. 22, 2023, 1:54 a.m. OK PyPy 3-64 TESTS 9 109 5427200
224550289 Wynona G Sept. 22, 2023, 3:09 a.m. OK Python 3 TESTS 9 31 4096000
224519064 YIVI G Sept. 21, 2023, 6:29 p.m. OK Python 3 TESTS 9 46 4096000
224562034 mdshadesh G Sept. 22, 2023, 5:40 a.m. OK Python 3 TESTS 9 62 2355200
224558463 mh__mh G Sept. 22, 2023, 4:59 a.m. OK Python 3 TESTS 9 77 2355200
224546871 VioletVal G Sept. 22, 2023, 2:14 a.m. OK Python 3 TESTS 9 78 2457600

remove filters

Back to search problems