Codeforces Round 784 (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
1669 Codeforces Round 784 (Div. 4) FINISHED False 7200 81271499 April 21, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 22476 ) D Colorful Stamp PROGRAMMING implementation 1100

B'A row of n cells is given, all initially white. Using a stamp, you can stamp any two neighboring cells such that one becomes red and the other becomes blue. A stamp can be rotated, i.e. it can be used in both ways: as color{blue}{ texttt{B}} color{red}{ texttt{R}} and as color{red}{ texttt{R}} color{blue}{ texttt{B}} . During use, the stamp must completely fit on the given n cells (it cannot be partially outside the cells). The stamp can be applied multiple times to the same cell. Each usage of the stamp recolors both cells that are under the stamp. For example, one possible sequence of stamps to make the picture color{blue}{ texttt{B}} color{red}{ texttt{R}} color{blue}{ texttt{B}} color{blue}{ texttt{B}} texttt{W} could be texttt{WWWWW} to texttt{WW} color{brown}{ underline{ color{red}{ texttt{R}} color{blue}{ texttt{B}}}} texttt{W} to color{brown}{ underline{ color{blue}{ texttt{B}} color{red}{ texttt{R}}}} color{red}{ texttt{R}} color{blue}{ texttt{B}} texttt{W} to color{blue}{ texttt{B}} color{brown}{ underline{ color{red}{ texttt{R}} color{blue}{ texttt{B}}}} color{blue}{ texttt{B}} texttt{W} . Here texttt{W} , color{red}{ texttt{R}} , and color{blue}{ texttt{B}} represent a white, red, or blue cell, respectively, and the cells that the stamp is used on are marked with an underline. Given a final picture, is it possible to make it using the stamp zero or more times? The first line contains an integer t ( 1 <= q t <= q 10^4 ) -- the number of test cases. The first line of each test case contains an integer n ( 1 <= q n <= q 10^5 ) -- the length of the picture. The second line of each test case contains a string s -- the picture you need to make. It is guaranteed that the length of s is n and that s only consists of the characters texttt{W} , texttt{R} , and texttt{B} , representing a white, red, or blue cell, respectively.'...

Tutorials

102101

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
154856127 newbie_314 D April 24, 2022, 1:26 p.m. OK Clang++17 Diagnostics TESTS 11 155 12595200 1100
154643743 Arima_Kun D April 23, 2022, 10:12 a.m. OK Clang++17 Diagnostics TESTS 11 155 174387200 1100
154667679 GTrigger D April 23, 2022, 12:52 p.m. OK GNU C11 TESTS 11 15 102400 1100
154809561 cloned D April 24, 2022, 5:06 a.m. OK GNU C11 TESTS 11 46 102400 1100
154500049 XiaoWhy D April 22, 2022, 1:04 p.m. OK GNU C11 TESTS 11 46 102400 1100
154617110 ZJC123 D April 23, 2022, 4:58 a.m. OK GNU C11 TESTS 11 46 102400 1100
154627883 imraan_02 D April 23, 2022, 7:10 a.m. OK GNU C++14 TESTS 11 0 307200 1100
154583472 RED_MONK D April 22, 2022, 5:33 p.m. OK GNU C++14 TESTS 11 0 307200 1100
154607614 3AGWA_79 D April 23, 2022, 1:29 a.m. OK GNU C++14 TESTS 11 15 0 1100
154635982 WiredStar D April 23, 2022, 8:48 a.m. OK GNU C++14 TESTS 11 15 102400 1100
154620510 TakeMe D April 23, 2022, 5:49 a.m. OK GNU C++14 TESTS 11 15 102400 1100
154613518 POYE D April 23, 2022, 3:49 a.m. OK GNU C++14 TESTS 11 15 102400 1100
154810276 POYE D April 24, 2022, 5:16 a.m. OK GNU C++14 TESTS 11 15 102400 1100
154742590 rcrs4 D April 23, 2022, 3:25 p.m. OK GNU C++14 TESTS 11 15 102400 1100
154645807 diandian2020 D April 23, 2022, 10:34 a.m. OK GNU C++14 TESTS 11 15 102400 1100
154854391 Lotuses D April 24, 2022, 1:08 p.m. OK GNU C++14 TESTS 11 15 102400 1100
154888808 vish_wa D April 24, 2022, 8:35 p.m. OK GNU C++17 TESTS 11 0 307200 1100
154735827 SIGABoRT D April 23, 2022, 3:08 p.m. OK GNU C++17 TESTS 11 0 307200 1100
154732147 Ma7moud_Desouky D April 23, 2022, 2:59 p.m. OK GNU C++17 TESTS 11 0 307200 1100
154760121 ari_haran01 D April 23, 2022, 4:21 p.m. OK GNU C++17 TESTS 11 15 0 1100
154506837 KAUSTUBH152003 D April 22, 2022, 2:16 p.m. OK GNU C++17 TESTS 11 15 102400 1100
154497686 qingmuhe D April 22, 2022, 12:40 p.m. OK GNU C++17 TESTS 11 15 102400 1100
154868456 PineapplesOnPizza D April 24, 2022, 3:35 p.m. OK GNU C++17 TESTS 11 15 102400 1100
154812682 zhengdudu D April 24, 2022, 5:48 a.m. OK GNU C++17 TESTS 11 15 102400 1100
154794207 Leonardo_Toral D April 23, 2022, 10:40 p.m. OK GNU C++17 TESTS 11 15 102400 1100
154606851 harvey_wzy D April 23, 2022, 1:09 a.m. OK GNU C++17 TESTS 11 15 102400 1100
154581335 124Kk D April 22, 2022, 5:09 p.m. OK GNU C++17 (64) TESTS 11 0 307200 1100
154646032 Dio707 D April 23, 2022, 10:37 a.m. OK GNU C++17 (64) TESTS 11 0 307200 1100
154501362 beso90 D April 22, 2022, 1:18 p.m. OK GNU C++17 (64) TESTS 11 15 102400 1100
154503325 wws_666 D April 22, 2022, 1:39 p.m. OK GNU C++17 (64) TESTS 11 15 102400 1100
154583701 OMG_wc D April 22, 2022, 5:35 p.m. OK GNU C++17 (64) TESTS 11 15 102400 1100
154751256 vjudge1 D April 23, 2022, 3:51 p.m. OK GNU C++17 (64) TESTS 11 15 204800 1100
154751148 Fuko_Ibuki D April 23, 2022, 3:50 p.m. OK GNU C++17 (64) TESTS 11 15 204800 1100
154904548 Kh_Munis D April 25, 2022, 4:58 a.m. OK GNU C++17 (64) TESTS 11 15 307200 1100
154902732 Peal_Mazumder D April 25, 2022, 4:19 a.m. OK GNU C++17 (64) TESTS 11 15 307200 1100
154879504 JumanAlhayajneh D April 24, 2022, 5:51 p.m. OK GNU C++17 (64) TESTS 11 15 307200 1100
154876030 divyo.argha D April 24, 2022, 5 p.m. OK GNU C++20 (64) TESTS 11 0 204800 1100
154506973 Mohamed_Gemmy D April 22, 2022, 2:18 p.m. OK GNU C++20 (64) TESTS 11 0 307200 1100
154494978 suraj10 D April 22, 2022, 12:14 p.m. OK GNU C++20 (64) TESTS 11 0 307200 1100
154791691 body-nasser D April 23, 2022, 9:41 p.m. OK GNU C++20 (64) TESTS 11 0 307200 1100
154635782 xalwa D April 23, 2022, 8:46 a.m. OK GNU C++20 (64) TESTS 11 0 307200 1100
154551379 StoryTeller_97 D April 22, 2022, 3:34 p.m. OK GNU C++20 (64) TESTS 11 0 307200 1100
154507526 taki06 D April 22, 2022, 2:24 p.m. OK GNU C++20 (64) TESTS 11 0 307200 1100
154603945 IAlsoHateMyself D April 22, 2022, 11:32 p.m. OK GNU C++20 (64) TESTS 11 0 409600 1100
154581060 AndrewCA D April 22, 2022, 5:06 p.m. OK GNU C++20 (64) TESTS 11 0 512000 1100
154506318 BOOBA D April 22, 2022, 2:10 p.m. OK GNU C++20 (64) TESTS 11 0 614400 1100
154619212 Tharun0102 D April 23, 2022, 5:30 a.m. OK Java 11 TESTS 11 155 0 1100
154637330 iamsoumik D April 23, 2022, 9:03 a.m. OK Java 11 TESTS 11 171 0 1100
154649582 Kubernetes D April 23, 2022, 11:17 a.m. OK Java 11 TESTS 11 171 0 1100
154497038 yadatisaiviswas3 D April 22, 2022, 12:34 p.m. OK Java 11 TESTS 11 171 0 1100
154504514 dhruvil8804 D April 22, 2022, 1:50 p.m. OK Java 11 TESTS 11 186 0 1100
154501294 SanskarxRawat D April 22, 2022, 1:17 p.m. OK Java 11 TESTS 11 186 204800 1100
154623324 sf14t D April 23, 2022, 6:21 a.m. OK Java 11 TESTS 11 187 0 1100
154506774 immortalfox D April 22, 2022, 2:16 p.m. OK Java 11 TESTS 11 187 0 1100
154807402 LoudSilence D April 24, 2022, 4:26 a.m. OK Java 11 TESTS 11 217 204800 1100
154632814 mayank.singh19 D April 23, 2022, 8:11 a.m. OK Java 11 TESTS 11 218 0 1100
154755966 DEMO23 D April 23, 2022, 4:06 p.m. OK Java 8 TESTS 11 93 0 1100
154626279 ND_ D April 23, 2022, 6:53 a.m. OK Java 8 TESTS 11 93 0 1100
154651277 Hivilsm D April 23, 2022, 11:35 a.m. OK Java 8 TESTS 11 108 0 1100
154592765 FirePegasus D April 22, 2022, 7:41 p.m. OK Java 8 TESTS 11 108 0 1100
154646893 ak_ankit D April 23, 2022, 10:46 a.m. OK Java 8 TESTS 11 124 0 1100
154613336 Zicode D April 23, 2022, 3:45 a.m. OK Java 8 TESTS 11 124 0 1100
154686819 AbdelrahmanFathy D April 23, 2022, 1:21 p.m. OK Java 8 TESTS 11 124 37990400 1100
154678280 Belal_Abouraya D April 23, 2022, 1:11 p.m. OK Java 8 TESTS 11 140 0 1100
154503286 BhargavModha D April 22, 2022, 1:38 p.m. OK Java 8 TESTS 11 140 0 1100
154807545 parth3743 D April 24, 2022, 4:28 a.m. OK Java 8 TESTS 11 202 0 1100
154838300 ssb9 D April 24, 2022, 10:41 a.m. OK Kotlin 1.4 TESTS 11 202 204800 1100
154872145 wbars D April 24, 2022, 4:06 p.m. OK Kotlin 1.5 TESTS 11 342 512000 1100
154495084 paparwinthai D April 22, 2022, 12:15 p.m. OK Kotlin 1.6 TESTS 11 295 0 1100
154640220 Katharsis13 D April 23, 2022, 9:32 a.m. OK MS C++ 2017 TESTS 11 15 102400 1100
154612178 RealStarlight D April 23, 2022, 3:20 a.m. OK MS C++ 2017 TESTS 11 15 819200 1100
154855314 vaibhav-zemo D April 24, 2022, 1:18 p.m. OK MS C++ 2017 TESTS 11 46 307200 1100
154777307 anna_2005 D April 23, 2022, 6 p.m. OK MS C++ 2017 TESTS 11 46 307200 1100
154494823 mikasamikoto D April 22, 2022, 12:12 p.m. OK MS C++ 2017 TESTS 11 46 307200 1100
154728748 SmilingBraniac D April 23, 2022, 2:52 p.m. OK MS C++ 2017 TESTS 11 46 409600 1100
154788505 acorn11 D April 23, 2022, 8:42 p.m. OK PyPy 2 TESTS 11 248 5529600 1100
154623404 FilipFilipinski D April 23, 2022, 6:22 a.m. OK PyPy 3 TESTS 11 296 6041600 1100
154586035 FilipFilipinski D April 22, 2022, 6:04 p.m. OK PyPy 3 TESTS 11 311 6041600 1100
154537635 Anadi D April 22, 2022, 3:10 p.m. OK PyPy 3 TESTS 11 311 6041600 1100
154587035 Yash983 D April 22, 2022, 6:17 p.m. OK PyPy 3 TESTS 11 327 6246400 1100
154810295 pra_27 D April 24, 2022, 5:16 a.m. OK PyPy 3 TESTS 11 327 6246400 1100
154505917 Wolfram05 D April 22, 2022, 2:06 p.m. OK PyPy 3 TESTS 11 327 6246400 1100
154890885 tayyibaalazad D April 24, 2022, 9:14 p.m. OK PyPy 3 TESTS 11 327 6758400 1100
154628333 swapnilsingh421 D April 23, 2022, 7:16 a.m. OK PyPy 3 TESTS 11 342 8089600 1100
154496867 Yogesh_13 D April 22, 2022, 12:33 p.m. OK PyPy 3 TESTS 11 358 8089600 1100
154496353 Yogesh_13 D April 22, 2022, 12:28 p.m. OK PyPy 3 TESTS 11 358 8908800 1100
154778024 MashaM D April 23, 2022, 6:08 p.m. OK PyPy 3-64 TESTS 11 124 8294400 1100
154646537 De-Bug D April 23, 2022, 10:42 a.m. OK PyPy 3-64 TESTS 11 124 10240000 1100
154602033 MistaAsh D April 22, 2022, 10:30 p.m. OK PyPy 3-64 TESTS 11 140 10444800 1100
154501893 nitish420 D April 22, 2022, 1:24 p.m. OK PyPy 3-64 TESTS 11 155 10240000 1100
154608167 EDCTY D April 23, 2022, 1:42 a.m. OK PyPy 3-64 TESTS 11 156 10444800 1100
154782740 pmarecki D April 23, 2022, 7:11 p.m. OK PyPy 3-64 TESTS 11 171 10547200 1100
154654819 HannibalLectar D April 23, 2022, 12:17 p.m. OK PyPy 3-64 TESTS 11 187 11161600 1100
154623527 FilipFilipinski D April 23, 2022, 6:23 a.m. OK PyPy 3-64 TESTS 11 296 9420800 1100
154596174 I.AM.THE.WILL D April 22, 2022, 8:33 p.m. OK PyPy 3-64 TESTS 11 296 9932800 1100
154884221 Jadshaker D April 24, 2022, 7:09 p.m. OK PyPy 3-64 TESTS 11 296 10137600 1100
154527977 bigbardia2.0 D April 22, 2022, 2:57 p.m. OK Python 3 TESTS 11 77 307200 1100
154644317 axe98 D April 23, 2022, 10:18 a.m. OK Python 3 TESTS 11 77 512000 1100
154503876 andyandy D April 22, 2022, 1:44 p.m. OK Python 3 TESTS 11 77 512000 1100
154647586 _stylebender_ D April 23, 2022, 10:54 a.m. OK Python 3 TESTS 11 109 307200 1100
154503323 KolyanRobocope D April 22, 2022, 1:39 p.m. OK Python 3 TESTS 11 109 307200 1100
154499053 sheng0908 D April 22, 2022, 12:53 p.m. OK Python 3 TESTS 11 109 307200 1100
154494058 steven_kid D April 22, 2022, 12:04 p.m. OK Python 3 TESTS 11 109 307200 1100
154868042 Maireks D April 24, 2022, 3:30 p.m. OK Python 3 TESTS 11 124 204800 1100
154686848 tanishq2507 D April 23, 2022, 1:21 p.m. OK Python 3 TESTS 11 124 204800 1100
154642454 error0000 D April 23, 2022, 9:56 a.m. OK Python 3 TESTS 11 124 204800 1100
154592953 DeadFox D April 22, 2022, 7:44 p.m. OK Rust 2021 TESTS 11 15 409600 1100
154854569 mocobeta D April 24, 2022, 1:10 p.m. OK Rust 2021 TESTS 11 15 3379200 1100

remove filters

Back to search problems