Codeforces Round 738 (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
1559 Codeforces Round 738 (Div. 2) FINISHED False 8100 108314711 Aug. 15, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 22805 ) B Mocha and Red and Blue PROGRAMMING dp greedy 900

B'As their story unravels, a timeless tale is told once again... Shirahime, a friend of Mocha 's, is keen on playing the music game Arcaea and sharing Mocha interesting puzzles to solve. This day, Shirahime comes up with a new simple puzzle and wants Mocha to solve them. However, these puzzles are too easy for Mocha to solve, so she wants you to solve them and tell her the answers. The puzzles are described as follow. There are n squares arranged in a row, and each of them can be painted either red or blue. Among these squares, some of them have been painted already, and the others are blank. You can decide which color to paint on each blank square. Some pairs of adjacent squares may have the same color, which is imperfect. We define the imperfectness as the number of pairs of adjacent squares that share the same color. For example, the imperfectness of "BRRRBBR" is 3 , with "BB" occurred once and "RR" occurred twice. Your goal is to minimize the imperfectness and print out the colors of the squares after painting. Each test contains multiple test cases. The first line contains a single integer t ( 1 <= t <= 100 ) -- the number of test cases. Each test case consists of two lines. The first line of each test case contains an integer n ( 1 <= q n <= q 100 ) -- the length of the squares row. The second line of each test case contains a string s with length n , containing characters 'B ', 'R ' and '? '. Here 'B ' stands for a blue square, 'R ' for a red square, and '? ' for a blank square. For each test case, print a line with a string only containing 'B ' and 'R ', the colors of the squares after painting, which imperfectness is minimized. If there are multiple solutions, print any of them. In the first test case, if the squares are painted "BRRBRBR", the imperfectness is 1 (since squares 2 and 3 have the same color), which is the minimum possible imperfectness. '...

Tutorials

Tutorial (en)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
126260869 ruban B Aug. 18, 2021, 11:39 a.m. OK Delphi TESTS 49 31 19660800 900
126784774 aline.ly B Aug. 23, 2021, 6:23 p.m. OK GNU C11 TESTS 49 30 3686400 900
126233412 bnurgeldiyev514 B Aug. 18, 2021, 6 a.m. OK GNU C11 TESTS 49 30 3686400 900
126158827 ngoxuanbach B Aug. 17, 2021, 8:40 a.m. OK GNU C11 TESTS 49 30 3686400 900
126180912 BugLeave B Aug. 17, 2021, 1:12 p.m. OK GNU C11 TESTS 49 30 3686400 900
126198438 SpamBot B Aug. 17, 2021, 4:37 p.m. OK GNU C11 TESTS 49 30 3686400 900
126203009 shashwat_nayak B Aug. 17, 2021, 5:42 p.m. OK GNU C11 TESTS 49 30 3686400 900
126658314 Iizshit B Aug. 22, 2021, 1:05 a.m. OK GNU C11 TESTS 49 31 3686400 900
126457890 some_canines B Aug. 19, 2021, 2:50 p.m. OK GNU C11 TESTS 49 31 3686400 900
126603011 H_a_c_kcode_gaurav B Aug. 21, 2021, 8:42 a.m. OK GNU C11 TESTS 49 31 3686400 900
126826162 TTTRY B Aug. 24, 2021, 9:50 a.m. OK GNU C11 TESTS 49 31 3686400 900
126405077 juancarlostapiab.1 B Aug. 19, 2021, 4:37 a.m. OK GNU C++14 TESTS 49 15 3686400 900
126626325 davidnh1997 B Aug. 21, 2021, 1:45 p.m. OK GNU C++14 TESTS 49 15 3788800 900
126569169 ATML_2102 B Aug. 20, 2021, 7:38 p.m. OK GNU C++14 TESTS 49 15 3891200 900
126196825 Shruti_001 B Aug. 17, 2021, 4:16 p.m. OK GNU C++14 TESTS 49 15 3891200 900
126613044 The_GM B Aug. 21, 2021, 10:42 a.m. OK GNU C++14 TESTS 49 15 3891200 900
126700692 HomuraCN B Aug. 22, 2021, 3:25 p.m. OK GNU C++14 TESTS 49 30 3686400 900
126211185 Rishikesh_1729 B Aug. 17, 2021, 8:04 p.m. OK GNU C++14 TESTS 49 30 3686400 900
126454647 Zyad_Mohamed B Aug. 19, 2021, 2:20 p.m. OK GNU C++14 TESTS 49 30 3686400 900
126811652 LJFan B Aug. 24, 2021, 6:40 a.m. OK GNU C++14 TESTS 49 30 3686400 900
126842203 qinqizhou B Aug. 24, 2021, 1:26 p.m. OK GNU C++14 TESTS 49 30 3686400 900
126157202 vjudge5 B Aug. 17, 2021, 8:19 a.m. OK GNU C++17 TESTS 49 15 3686400 900
126257291 202001095 B Aug. 18, 2021, 10:57 a.m. OK GNU C++17 TESTS 49 15 3788800 900
126925295 devanshikhatsuriya18 B Aug. 25, 2021, 2:13 a.m. OK GNU C++17 TESTS 49 15 3891200 900
126190840 jeetsavsani117 B Aug. 17, 2021, 3:01 p.m. OK GNU C++17 TESTS 49 15 3891200 900
126832035 boldcounselor B Aug. 24, 2021, 11:14 a.m. OK GNU C++17 TESTS 49 15 3891200 900
126686743 murattyldrm7 B Aug. 22, 2021, 11:51 a.m. OK GNU C++17 TESTS 49 15 3891200 900
126457883 ultranoob_coder B Aug. 19, 2021, 2:50 p.m. OK GNU C++17 TESTS 49 15 3891200 900
126377876 Deadly_Smile B Aug. 18, 2021, 6:27 p.m. OK GNU C++17 TESTS 49 15 3891200 900
126273278 pranshubansal15 B Aug. 18, 2021, 2 p.m. OK GNU C++17 TESTS 49 15 3891200 900
126243484 _ishita_29 B Aug. 18, 2021, 8:05 a.m. OK GNU C++17 TESTS 49 15 3891200 900
126170232 one_second B Aug. 17, 2021, 11:08 a.m. OK GNU C++17 (64) TESTS 49 15 4300800 900
126740894 Yarra_Naga_Prasanna B Aug. 23, 2021, 8:13 a.m. OK GNU C++17 (64) TESTS 49 15 4300800 900
126645104 vecxtor B Aug. 21, 2021, 6:04 p.m. OK GNU C++17 (64) TESTS 49 30 4198400 900
126523496 sprudra5001 B Aug. 20, 2021, 9:49 a.m. OK GNU C++17 (64) TESTS 49 30 4300800 900
126579446 anideahe B Aug. 21, 2021, 1:45 a.m. OK GNU C++17 (64) TESTS 49 30 4300800 900
126608492 Ayush_Sawlani B Aug. 21, 2021, 9:44 a.m. OK GNU C++17 (64) TESTS 49 30 4300800 900
126569178 skewbekkebweks B Aug. 20, 2021, 7:38 p.m. OK GNU C++17 (64) TESTS 49 30 4300800 900
126749875 Taha_Firoz B Aug. 23, 2021, 10:25 a.m. OK GNU C++17 (64) TESTS 49 30 4300800 900
126773359 VijayReddy22 B Aug. 23, 2021, 3:41 p.m. OK GNU C++17 (64) TESTS 49 30 4300800 900
126631946 enjoying_loser_life B Aug. 21, 2021, 2:58 p.m. OK GNU C++17 (64) TESTS 49 30 4300800 900
126773919 dagnaf B Aug. 23, 2021, 3:47 p.m. OK Go TESTS 49 46 10649600 900
126465430 gealbermorales B Aug. 19, 2021, 4:04 p.m. OK Go TESTS 49 46 10649600 900
126941384 kiril.minkov B Aug. 25, 2021, 6:40 a.m. OK Go TESTS 49 46 11673600 900
126207996 codelegend B Aug. 17, 2021, 7:01 p.m. OK Haskell TESTS 49 31 11673600 900
126496199 17821147 B Aug. 20, 2021, 3:03 a.m. OK Java 11 TESTS 49 171 23756800 900
126440380 Vatsal53 B Aug. 19, 2021, 11:55 a.m. OK Java 11 TESTS 49 171 23756800 900
126213744 adarsh_goku B Aug. 17, 2021, 9:23 p.m. OK Java 11 TESTS 49 171 23756800 900
126995321 Aman_dixit B Aug. 25, 2021, 6:24 p.m. OK Java 11 TESTS 49 171 23756800 900
126558277 Vijender8831 B Aug. 20, 2021, 4:50 p.m. OK Java 11 TESTS 49 171 23756800 900
126649913 iamavalon B Aug. 21, 2021, 7:33 p.m. OK Java 11 TESTS 49 171 24268800 900
126465985 unfixedbug B Aug. 19, 2021, 4:09 p.m. OK Java 11 TESTS 49 186 23756800 900
126249977 ClaudeHunt B Aug. 18, 2021, 9:21 a.m. OK Java 11 TESTS 49 186 23756800 900
126204121 virendra_12 B Aug. 17, 2021, 5:57 p.m. OK Java 11 TESTS 49 186 23756800 900
126181000 ypa B Aug. 17, 2021, 1:13 p.m. OK Java 11 TESTS 49 186 23961600 900
126225248 thedesalizes B Aug. 18, 2021, 3:35 a.m. OK Java 8 TESTS 49 109 20377600 900
126444096 Dewansh_25 B Aug. 19, 2021, 12:34 p.m. OK Java 8 TESTS 49 109 20480000 900
126426438 dogranmol B Aug. 19, 2021, 9:17 a.m. OK Java 8 TESTS 49 109 20480000 900
126471088 tarun_sm B Aug. 19, 2021, 5:08 p.m. OK Java 8 TESTS 49 124 20275200 900
126212051 sourav2999 B Aug. 17, 2021, 8:32 p.m. OK Java 8 TESTS 49 124 20377600 900
126152589 rsingh3_be18 B Aug. 17, 2021, 7:28 a.m. OK Java 8 TESTS 49 124 20377600 900
126211172 O_E B Aug. 17, 2021, 8:04 p.m. OK Java 8 TESTS 49 124 20377600 900
127002954 bubnov B Aug. 25, 2021, 9:08 p.m. OK Java 8 TESTS 49 124 20377600 900
126480272 kelvinc1024 B Aug. 19, 2021, 7:13 p.m. OK Java 8 TESTS 49 124 20377600 900
126230438 ved20 B Aug. 18, 2021, 5:13 a.m. OK Java 8 TESTS 49 124 20377600 900
126244110 Spheniscine B Aug. 18, 2021, 8:12 a.m. OK Kotlin TESTS 49 124 20480000 900
126607404 catcatcute B Aug. 21, 2021, 9:33 a.m. OK Kotlin TESTS 49 140 20889600 900
126485837 arvindf232 B Aug. 19, 2021, 9:07 p.m. OK Kotlin TESTS 49 140 21708800 900
126609066 catcatcute B Aug. 21, 2021, 9:51 a.m. OK Kotlin TESTS 49 155 22732800 900
126474902 EgorShibaev B Aug. 19, 2021, 5:55 p.m. OK Kotlin TESTS 49 156 21708800 900
126204497 wbars B Aug. 17, 2021, 6:03 p.m. OK Kotlin TESTS 49 171 23449600 900
126219672 vjudge3 B Aug. 18, 2021, 1:23 a.m. OK MS C++ 2017 TESTS 49 30 3788800 900
126157989 vjudge5 B Aug. 17, 2021, 8:28 a.m. OK MS C++ 2017 TESTS 49 31 3686400 900
126156464 bkifhr6 B Aug. 17, 2021, 8:10 a.m. OK MS C++ 2017 TESTS 49 31 3686400 900
126686088 venom48427 B Aug. 22, 2021, 11:40 a.m. OK MS C++ 2017 TESTS 49 31 3788800 900
127001490 idk_lol2001 B Aug. 25, 2021, 8:27 p.m. OK MS C++ 2017 TESTS 49 31 3788800 900
126781081 nghialuu B Aug. 23, 2021, 5:26 p.m. OK MS C++ 2017 TESTS 49 31 3788800 900
126764037 spicy_apricot B Aug. 23, 2021, 1:51 p.m. OK MS C++ 2017 TESTS 49 31 3788800 900
126697571 TheRomulus B Aug. 22, 2021, 2:58 p.m. OK MS C++ 2017 TESTS 49 31 3788800 900
126667837 echr B Aug. 22, 2021, 6:09 a.m. OK MS C++ 2017 TESTS 49 31 3788800 900
126624414 abacaba_ B Aug. 21, 2021, 1:20 p.m. OK MS C++ 2017 TESTS 49 31 3788800 900
126982133 robot2212 B Aug. 25, 2021, 3:21 p.m. OK .NET Core C# TESTS 49 93 11673600 900
126195244 Dnk4315 B Aug. 17, 2021, 3:55 p.m. OK .NET Core C# TESTS 49 108 11468800 900
126982281 robot2212 B Aug. 25, 2021, 3:23 p.m. OK .NET Core C# TESTS 49 108 11571200 900
126827099 feeder B Aug. 24, 2021, 10:03 a.m. OK Node.js TESTS 49 78 12390400 900
126159851 feelme B Aug. 17, 2021, 8:53 a.m. OK PyPy 3 TESTS 49 109 21504000 900
126253750 Yagya_Deep_Agrawal1 B Aug. 18, 2021, 10:14 a.m. OK PyPy 3 TESTS 49 109 21708800 900
126262333 IceKnight1093 B Aug. 18, 2021, 11:56 a.m. OK PyPy 3 TESTS 49 109 21708800 900
126547749 hsh8086 B Aug. 20, 2021, 2:51 p.m. OK PyPy 3 TESTS 49 109 21811200 900
126446257 Kakashi16 B Aug. 19, 2021, 12:57 p.m. OK PyPy 3 TESTS 49 109 21811200 900
126182874 tflave B Aug. 17, 2021, 1:33 p.m. OK PyPy 3 TESTS 49 109 22016000 900
126937135 SSCoding123 B Aug. 25, 2021, 5:43 a.m. OK PyPy 3 TESTS 49 124 21504000 900
126508088 priyanshughadai14 B Aug. 20, 2021, 6:41 a.m. OK PyPy 3 TESTS 49 124 21504000 900
126388237 rm360179 B Aug. 18, 2021, 9:40 p.m. OK PyPy 3 TESTS 49 124 21606400 900
126800228 Mark_Stark1 B Aug. 24, 2021, 3:12 a.m. OK PyPy 3 TESTS 49 124 21606400 900
126982691 MrTrushka B Aug. 25, 2021, 3:29 p.m. OK Python 3 TESTS 49 62 6963200 900
126831961 ucantfindme B Aug. 24, 2021, 11:12 a.m. OK Python 3 TESTS 49 62 6963200 900
126617359 sermir2003 B Aug. 21, 2021, 11:41 a.m. OK Python 3 TESTS 49 62 6963200 900
126606928 vijayaram B Aug. 21, 2021, 9:28 a.m. OK Python 3 TESTS 49 62 6963200 900
126551161 phuhuule B Aug. 20, 2021, 3:27 p.m. OK Python 3 TESTS 49 62 6963200 900
126248840 fourteenflames B Aug. 18, 2021, 9:07 a.m. OK Python 3 TESTS 49 62 6963200 900
126228590 vaibhavsharma145 B Aug. 18, 2021, 4:42 a.m. OK Python 3 TESTS 49 62 6963200 900
126162798 sart-king B Aug. 17, 2021, 9:31 a.m. OK Python 3 TESTS 49 62 6963200 900
126982757 MrTrushka B Aug. 25, 2021, 3:29 p.m. OK Python 3 TESTS 49 77 6963200 900
126977049 MrTrushka B Aug. 25, 2021, 2:24 p.m. OK Python 3 TESTS 49 77 6963200 900
126194293 sasha.kudasov04 B Aug. 17, 2021, 3:43 p.m. OK Rust TESTS 49 31 3788800 900
126699819 avoid B Aug. 22, 2021, 3:12 p.m. OK Rust TESTS 49 31 3788800 900
126167762 LukaTchumburidze B Aug. 17, 2021, 10:36 a.m. OK Rust TESTS 49 31 3788800 900

remove filters

Back to search problems