Codeforces Round 715 (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
1509 Codeforces Round 715 (Div. 2) FINISHED False 8100 118769111 April 16, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 21862 ) B TMT Document PROGRAMMING greedy

B"The student council has a shared document file. Every day, some members of the student council write the sequence TMT (short for Towa Maji Tenshi) in it. However, one day, the members somehow entered the sequence into the document at the same time, creating a jumbled mess. Therefore, it is Suguru Doujima's task to figure out whether the document has malfunctioned. Specifically, he is given a string of length n whose characters are all either T or M, and he wants to figure out if it is possible to partition it into some number of disjoint subsequences, all of which are equal to TMT. That is, each character of the string should belong to exactly one of the subsequences. A string a is a subsequence of a string b if a can be obtained from b by deletion of several (possibly, zero) characters. The first line contains an integer t ( 1 <= t <= 5000 ) -- the number of test cases. The first line of each test case contains an integer n ( 3 <= n < 10^5 ), the number of characters in the string entered in the document. It is guaranteed that n is divisible by 3 . The second line of each test case contains a string of length n consisting of only the characters T and M. It is guaranteed that the sum of n over all test cases does not exceed 10^5 . For each test case, print a single line containing YES if the described partition exists, and a single line containing NO otherwise. In the first test case, the string itself is already a sequence equal to TMT. In the third test case, we may partition the string into the subsequences TMTMTT. Both the bolded and the non-bolded subsequences are equal to TMT. "...

Tutorials

Codeforces Round #715 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
113265115 PAG B April 16, 2021, 6:18 p.m. OK FPC TESTS 8 31 1126400
113294425 noobdecoder B April 17, 2021, 5:22 a.m. OK GNU C11 TESTS 8 31 102400
113290290 Sravanth_IIITS B April 17, 2021, 4:10 a.m. OK GNU C11 TESTS 8 31 102400
113288286 bananasarenotfruits B April 17, 2021, 3:31 a.m. OK GNU C11 TESTS 8 31 102400
113251633 hritikritesh B April 16, 2021, 4:37 p.m. OK GNU C11 TESTS 8 46 102400
113264164 childofcuriosity B April 16, 2021, 6:07 p.m. OK GNU C++11 TESTS 8 15 0
113251035 hnust_hh B April 16, 2021, 4:35 p.m. OK GNU C++11 TESTS 8 15 102400
113283015 zhuzhu111 B April 17, 2021, 1:11 a.m. OK GNU C++11 TESTS 8 15 102400
113293535 ZeesangPie B April 17, 2021, 5:09 a.m. OK GNU C++11 TESTS 8 15 102400
113296310 _Emcikem_ B April 17, 2021, 5:47 a.m. OK GNU C++11 TESTS 8 15 204800
113288839 Hp_Coder B April 17, 2021, 3:42 a.m. OK GNU C++11 TESTS 8 15 204800
113279477 Complexity_Cutter B April 16, 2021, 10:55 p.m. OK GNU C++11 TESTS 8 15 204800
113271096 dumb_dot B April 16, 2021, 7:47 p.m. OK GNU C++11 TESTS 8 15 204800
113265834 ankit7011 B April 16, 2021, 6:27 p.m. OK GNU C++11 TESTS 8 15 204800
113295247 AbdurRahman_040 B April 17, 2021, 5:34 a.m. OK GNU C++11 TESTS 8 15 204800
113292918 ms_stranger B April 17, 2021, 4:58 a.m. OK GNU C++14 TESTS 8 15 307200
113296317 nishikanth B April 17, 2021, 5:47 a.m. OK GNU C++14 TESTS 8 15 307200
113293675 dmdivyansh_113 B April 17, 2021, 5:11 a.m. OK GNU C++14 TESTS 8 15 307200
113293329 aviralXuchiha B April 17, 2021, 5:06 a.m. OK GNU C++14 TESTS 8 15 307200
113292083 i_kn0w_nothing B April 17, 2021, 4:44 a.m. OK GNU C++14 TESTS 8 15 307200
113291843 hrishabh_ B April 17, 2021, 4:39 a.m. OK GNU C++14 TESTS 8 15 307200
113291614 ObLIV_ion B April 17, 2021, 4:35 a.m. OK GNU C++14 TESTS 8 15 307200
113291127 SHK84 B April 17, 2021, 4:27 a.m. OK GNU C++14 TESTS 8 15 307200
113288666 anim2k19 B April 17, 2021, 3:39 a.m. OK GNU C++14 TESTS 8 15 307200
113286839 somebody2308 B April 17, 2021, 3:01 a.m. OK GNU C++14 TESTS 8 15 307200
113282717 greatheygaen B April 17, 2021, 1 a.m. OK GNU C++17 TESTS 8 15 102400
113265515 michaelmauricengn B April 16, 2021, 6:23 p.m. OK GNU C++17 TESTS 8 15 102400
113264663 skmonir B April 16, 2021, 6:13 p.m. OK GNU C++17 TESTS 8 15 102400
113262667 Beatitudo B April 16, 2021, 5:51 p.m. OK GNU C++17 TESTS 8 15 102400
113249884 _nTpL0c2i_ B April 16, 2021, 4:32 p.m. OK GNU C++17 TESTS 8 15 102400
113295038 chinaN0.1 B April 17, 2021, 5:31 a.m. OK GNU C++17 TESTS 8 15 102400
113296980 CodeForChef B April 17, 2021, 5:55 a.m. OK GNU C++17 TESTS 8 15 307200
113296548 parth_16 B April 17, 2021, 5:50 a.m. OK GNU C++17 TESTS 8 15 307200
113295349 Abhijeetofficial B April 17, 2021, 5:35 a.m. OK GNU C++17 TESTS 8 15 307200
113297272 sana_ B April 17, 2021, 5:59 a.m. OK GNU C++17 TESTS 8 15 307200
113249965 PandemicP B April 16, 2021, 4:32 p.m. OK GNU C++17 (64) TESTS 8 15 102400
113282820 feelin_dejavu B April 17, 2021, 1:03 a.m. OK GNU C++17 (64) TESTS 8 15 102400
113266424 fahimcp495 B April 16, 2021, 6:35 p.m. OK GNU C++17 (64) TESTS 8 15 204800
113290530 golden.duck B April 17, 2021, 4:15 a.m. OK GNU C++17 (64) TESTS 8 15 307200
113286513 MehulJ21 B April 17, 2021, 2:54 a.m. OK GNU C++17 (64) TESTS 8 15 307200
113283553 chitrung1 B April 17, 2021, 1:31 a.m. OK GNU C++17 (64) TESTS 8 15 307200
113296315 rum3r B April 17, 2021, 5:47 a.m. OK GNU C++17 (64) TESTS 8 15 307200
113275081 anurag_2025 B April 16, 2021, 8:53 p.m. OK GNU C++17 (64) TESTS 8 15 307200
113266251 aur_sab_badhiya B April 16, 2021, 6:33 p.m. OK GNU C++17 (64) TESTS 8 15 307200
113283002 Murabito-B B April 17, 2021, 1:10 a.m. OK GNU C++17 (64) TESTS 8 15 307200
113274651 jaynils B April 16, 2021, 8:44 p.m. OK Java 11 TESTS 8 171 0
113296143 _3019_ B April 17, 2021, 5:45 a.m. OK Java 11 TESTS 8 171 0
113293452 pikachu_pika_pika B April 17, 2021, 5:08 a.m. OK Java 11 TESTS 8 171 0
113288025 _Body B April 17, 2021, 3:26 a.m. OK Java 11 TESTS 8 171 0
113280484 kareem3id B April 16, 2021, 11:33 p.m. OK Java 11 TESTS 8 171 0
113270870 Andwerp B April 16, 2021, 7:43 p.m. OK Java 11 TESTS 8 171 0
113266898 anubhav44044 B April 16, 2021, 6:42 p.m. OK Java 11 TESTS 8 171 0
113262317 coder0687 B April 16, 2021, 5:47 p.m. OK Java 11 TESTS 8 171 0
113261424 coder0687 B April 16, 2021, 5:39 p.m. OK Java 11 TESTS 8 171 0
113258754 thesupremeone B April 16, 2021, 5:18 p.m. OK Java 11 TESTS 8 171 0
113258004 gssakash B April 16, 2021, 5:13 p.m. OK Java 8 TESTS 8 93 0
113259851 akshay_3110 B April 16, 2021, 5:25 p.m. OK Java 8 TESTS 8 108 0
113261548 fetetriste B April 16, 2021, 5:40 p.m. OK Java 8 TESTS 8 109 0
113290907 Extends B April 17, 2021, 4:23 a.m. OK Java 8 TESTS 8 109 0
113279394 TheSawan B April 16, 2021, 10:52 p.m. OK Java 8 TESTS 8 109 0
113277072 RonWonWon B April 16, 2021, 9:40 p.m. OK Java 8 TESTS 8 109 0
113265230 PRIYANSH_TOMAR B April 16, 2021, 6:19 p.m. OK Java 8 TESTS 8 109 0
113268298 VishuTomar B April 16, 2021, 7:04 p.m. OK Java 8 TESTS 8 109 0
113253379 imprefect B April 16, 2021, 4:42 p.m. OK Java 8 TESTS 8 109 0
113294207 gssakash B April 17, 2021, 5:19 a.m. OK Java 8 TESTS 8 124 0
113260097 areniis B April 16, 2021, 5:27 p.m. OK Kotlin TESTS 8 155 0
113285132 pallav12 B April 17, 2021, 2:20 a.m. OK Kotlin TESTS 8 171 1126400
113284738 wangyilin_caibi B April 17, 2021, 2:09 a.m. OK MS C++ 2017 TESTS 8 15 204800
113296249 Dbody B April 17, 2021, 5:46 a.m. OK MS C++ 2017 TESTS 8 30 102400
113283609 NagiKAMIOKA B April 17, 2021, 1:33 a.m. OK MS C++ 2017 TESTS 8 30 204800
113282191 XieJiaXuan B April 17, 2021, 12:40 a.m. OK MS C++ 2017 TESTS 8 30 307200
113287089 Bulysky B April 17, 2021, 3:06 a.m. OK MS C++ 2017 TESTS 8 30 2764800
113296347 Dbody B April 17, 2021, 5:48 a.m. OK MS C++ 2017 TESTS 8 31 102400
113296320 Dbody B April 17, 2021, 5:47 a.m. OK MS C++ 2017 TESTS 8 31 102400
113269373 aleksikangas B April 16, 2021, 7:20 p.m. OK MS C++ 2017 TESTS 8 31 204800
113294840 Vitazzz B April 17, 2021, 5:28 a.m. OK MS C++ 2017 TESTS 8 31 921600
113293962 Dbody B April 17, 2021, 5:15 a.m. OK MS C++ 2017 TESTS 8 46 102400
113261636 kimpro1010 B April 16, 2021, 5:41 p.m. OK .NET Core C# TESTS 8 77 1024000
113284515 mban259 B April 17, 2021, 2:02 a.m. OK .NET Core C# TESTS 8 93 716800
113286564 chrisfcoder B April 17, 2021, 2:55 a.m. OK .NET Core C# TESTS 8 93 1945600
113292625 watarimaycry2 B April 17, 2021, 4:53 a.m. OK Node.js TESTS 8 77 4403200
113260548 henrychenOutlook B April 16, 2021, 5:31 p.m. OK Node.js TESTS 8 124 5222400
113291745 MadinaN B April 17, 2021, 4:37 a.m. OK PHP TESTS 8 61 5836800
113249644 VarAmu B April 16, 2021, 4:31 p.m. OK PyPy 3 TESTS 8 139 3174400
113274354 nogirosta B April 16, 2021, 8:39 p.m. OK PyPy 3 TESTS 8 140 4608000
113258061 akshitm16 B April 16, 2021, 5:13 p.m. OK PyPy 3 TESTS 8 155 4915200
113296537 evoxtorm B April 17, 2021, 5:50 a.m. OK PyPy 3 TESTS 8 155 5734400
113293200 not_tehlka B April 17, 2021, 5:04 a.m. OK PyPy 3 TESTS 8 170 5017600
113279222 quantik B April 16, 2021, 10:47 p.m. OK PyPy 3 TESTS 8 171 7168000
113292764 ___Neo___ B April 17, 2021, 4:55 a.m. OK PyPy 3 TESTS 8 171 7475200
113274712 stopthecount B April 16, 2021, 8:46 p.m. OK PyPy 3 TESTS 8 186 4915200
113264007 complexroots B April 16, 2021, 6:05 p.m. OK PyPy 3 TESTS 8 202 6963200
113289209 SPD_9X2 B April 17, 2021, 3:49 a.m. OK PyPy 3 TESTS 8 202 7475200
113293855 Hitik B April 17, 2021, 5:14 a.m. OK Python 2 TESTS 8 109 1740800
113258142 Genius3435 B April 16, 2021, 5:14 p.m. OK Python 3 TESTS 8 92 307200
113255266 b20328 B April 16, 2021, 4:47 p.m. OK Python 3 TESTS 8 93 204800
113259304 Programmers_Hive B April 16, 2021, 5:21 p.m. OK Python 3 TESTS 8 93 307200
113269826 eugalt B April 16, 2021, 7:26 p.m. OK Python 3 TESTS 8 93 307200
113258970 3rr0r404 B April 16, 2021, 5:19 p.m. OK Python 3 TESTS 8 93 307200
113269656 eugalt B April 16, 2021, 7:24 p.m. OK Python 3 TESTS 8 93 409600
113294803 madaraloveshashirama B April 17, 2021, 5:28 a.m. OK Python 3 TESTS 8 93 614400
113267775 crapcode B April 16, 2021, 6:55 p.m. OK Python 3 TESTS 8 93 921600
113263904 VioletVal B April 16, 2021, 6:04 p.m. OK Python 3 TESTS 8 108 0
113286384 ritesh_43 B April 17, 2021, 2:51 a.m. OK Python 3 TESTS 8 108 204800
113260603 ssvb B April 16, 2021, 5:31 p.m. OK Ruby 3 TESTS 8 311 8908800

remove filters

Back to search problems