Codeforces Round 779 (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
1658 Codeforces Round 779 (Div. 2) FINISHED False 7200 88874663 March 27, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 20437 ) A Marin and Photoshoot PROGRAMMING constructive algorithms math

B"Today, Marin is at a cosplay exhibition and is preparing for a group photoshoot! For the group picture, the cosplayers form a horizontal line. A group picture is considered beautiful if for every contiguous segment of at least 2 cosplayers, the number of males does not exceed the number of females (obviously). Currently, the line has n cosplayers which can be described by a binary string s . The i -th cosplayer is male if s_i = 0 and female if s_i = 1 . To ensure that the line is beautiful, you can invite some additional cosplayers (possibly zero) to join the line at any position. You can't remove any cosplayer from the line. Marin wants to know the minimum number of cosplayers you need to invite so that the group picture of all the cosplayers is beautiful. She can't do this on her own, so she's asking you for help. Can you help her? The first line contains a single integer t ( 1 <= q t <= q 10^3 ) -- the number of test cases. The first line of each test case contains a positive integer n ( 1 <= q n <= q 100 ) -- the number of cosplayers in the initial line. The second line of each test case contains a binary string s of length n -- describing the cosplayers already in line. Each character of the string is either 0 describing a male, or 1 describing a female. Note that there is no limit on the sum of n . For each test case, print the minimum number of cosplayers you need to invite so that the group picture of all the cosplayers is beautiful. In the first test case, for each pair of adjacent cosplayers, you can invite two female cosplayers to stand in between them. Then, 000 rightarrow 0110110 . In the third test case, you can invite one female cosplayer to stand next to the second cosplayer. Then, 010 rightarrow 0110 . "...

Tutorials

Codeforces Round #779 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
151194150 Liutaiji A March 28, 2022, 1:09 a.m. OK Clang++17 Diagnostics TESTS 20 77 3174400
151203915 abdur52 A March 28, 2022, 5:01 a.m. OK GNU C11 TESTS 20 15 0
151176916 Kaneki95 A March 27, 2022, 6:25 p.m. OK GNU C11 TESTS 20 15 0
151177369 sayemsub15 A March 27, 2022, 6:31 p.m. OK GNU C11 TESTS 20 15 0
151159298 Tyrus A March 27, 2022, 4:20 p.m. OK GNU C11 TESTS 20 30 0
151164628 Shahrear_Al_Sakib A March 27, 2022, 4:31 p.m. OK GNU C11 TESTS 20 30 0
151174508 cprakash A March 27, 2022, 5:57 p.m. OK GNU C11 TESTS 20 31 0
151193647 give5 A March 28, 2022, 12:53 a.m. OK GNU C11 TESTS 20 31 0
151176893 loki_7 A March 27, 2022, 6:25 p.m. OK GNU C11 TESTS 20 31 0
151201430 mojun A March 28, 2022, 4:15 a.m. OK GNU C11 TESTS 20 31 0
151205801 Tanvirrafi A March 28, 2022, 5:32 a.m. OK GNU C++14 TESTS 20 15 0
151207485 Fantasyli A March 28, 2022, 5:59 a.m. OK GNU C++14 TESTS 20 15 0
151207445 Invisible_Shadow A March 28, 2022, 5:58 a.m. OK GNU C++14 TESTS 20 15 0
151207436 anurag0007 A March 28, 2022, 5:58 a.m. OK GNU C++14 TESTS 20 15 0
151207162 pseudofive A March 28, 2022, 5:54 a.m. OK GNU C++14 TESTS 20 15 0
151206769 EyadBT A March 28, 2022, 5:48 a.m. OK GNU C++14 TESTS 20 15 0
151205956 akashkumarsen4 A March 28, 2022, 5:34 a.m. OK GNU C++14 TESTS 20 15 0
151205448 ghanchi_laxman0709 A March 28, 2022, 5:26 a.m. OK GNU C++14 TESTS 20 15 0
151205305 ghanchi_laxman0709 A March 28, 2022, 5:24 a.m. OK GNU C++14 TESTS 20 15 0
151204755 _lhz_ A March 28, 2022, 5:15 a.m. OK GNU C++14 TESTS 20 15 0
151193708 Whitharm A March 28, 2022, 12:55 a.m. OK GNU C++17 TESTS 20 0 0
151207542 Shejuti_Binte_Feroz A March 28, 2022, 6 a.m. OK GNU C++17 TESTS 20 15 0
151207496 nitin.pathania.min20 A March 28, 2022, 5:59 a.m. OK GNU C++17 TESTS 20 15 0
151206799 Mistri_ A March 28, 2022, 5:48 a.m. OK GNU C++17 TESTS 20 15 0
151206660 avinashvarpeti1 A March 28, 2022, 5:46 a.m. OK GNU C++17 TESTS 20 15 0
151206632 tarponTMR A March 28, 2022, 5:46 a.m. OK GNU C++17 TESTS 20 15 0
151207560 FCSW A March 28, 2022, 6 a.m. OK GNU C++17 TESTS 20 15 0
151207264 monsieuradieux A March 28, 2022, 5:55 a.m. OK GNU C++17 TESTS 20 15 0
151207196 shreyas_171 A March 28, 2022, 5:54 a.m. OK GNU C++17 TESTS 20 15 0
151207062 uewbv A March 28, 2022, 5:52 a.m. OK GNU C++17 TESTS 20 15 0
151203980 sweetpotato2 A March 28, 2022, 5:02 a.m. OK GNU C++17 (64) TESTS 20 15 0
151201998 EDkinGG A March 28, 2022, 4:26 a.m. OK GNU C++17 (64) TESTS 20 15 0
151201401 InariInDream A March 28, 2022, 4:14 a.m. OK GNU C++17 (64) TESTS 20 15 0
151201083 garv_89 A March 28, 2022, 4:07 a.m. OK GNU C++17 (64) TESTS 20 15 0
151200575 Amank2854 A March 28, 2022, 3:57 a.m. OK GNU C++17 (64) TESTS 20 15 0
151199615 ashwAni234 A March 28, 2022, 3:36 a.m. OK GNU C++17 (64) TESTS 20 15 0
151207462 GreyHatRR17 A March 28, 2022, 5:58 a.m. OK GNU C++17 (64) TESTS 20 15 0
151206240 Bekh A March 28, 2022, 5:39 a.m. OK GNU C++17 (64) TESTS 20 15 0
151205978 Bhagavath A March 28, 2022, 5:35 a.m. OK GNU C++17 (64) TESTS 20 15 0
151205207 covered A March 28, 2022, 5:23 a.m. OK GNU C++17 (64) TESTS 20 15 0
151197157 rahuljaiswal a_d_i_t_y_a A March 28, 2022, 2:37 a.m. OK GNU C++20 (64) TESTS 20 0 0
151193432 TimeWarp101 A March 28, 2022, 12:47 a.m. OK GNU C++20 (64) TESTS 20 0 0
151168786 spookywooky A March 27, 2022, 5:04 p.m. OK GNU C++20 (64) TESTS 20 0 0
151205094 harman_69 A March 28, 2022, 5:21 a.m. OK GNU C++20 (64) TESTS 20 15 0
151205093 neha_001 A March 28, 2022, 5:21 a.m. OK GNU C++20 (64) TESTS 20 15 0
151205077 SADIQ_insD A March 28, 2022, 5:21 a.m. OK GNU C++20 (64) TESTS 20 15 0
151206156 LZVSDY A March 28, 2022, 5:38 a.m. OK GNU C++20 (64) TESTS 20 15 0
151206531 omarsalem33 A March 28, 2022, 5:44 a.m. OK GNU C++20 (64) TESTS 20 15 0
151206859 Namit A March 28, 2022, 5:49 a.m. OK GNU C++20 (64) TESTS 20 15 0
151207023 Grandmaster_gang A March 28, 2022, 5:52 a.m. OK GNU C++20 (64) TESTS 20 15 0
151200346 quanjun A March 28, 2022, 3:52 a.m. OK Go TESTS 20 327 1228800
151189033 Relief A March 27, 2022, 10:14 p.m. OK Java 11 TESTS 20 156 0
151178108 mahmoud_hosam A March 27, 2022, 6:41 p.m. OK Java 11 TESTS 20 156 0
151196744 albertkang A March 28, 2022, 2:26 a.m. OK Java 11 TESTS 20 171 0
151200709 Satyaa A March 28, 2022, 4 a.m. OK Java 11 TESTS 20 171 0
151197580 akashkumarkly A March 28, 2022, 2:47 a.m. OK Java 11 TESTS 20 171 0
151176889 _ryan18_ A March 27, 2022, 6:25 p.m. OK Java 11 TESTS 20 171 0
151173405 rerererere A March 27, 2022, 5:44 p.m. OK Java 11 TESTS 20 171 0
151170415 garg_lucifer A March 27, 2022, 5:16 p.m. OK Java 11 TESTS 20 171 0
151169779 SaberXpro A March 27, 2022, 5:11 p.m. OK Java 11 TESTS 20 171 0
151207594 souvik2000 A March 28, 2022, 6:01 a.m. OK Java 11 TESTS 20 187 0
151186375 Diaa12360 A March 27, 2022, 9:02 p.m. OK Java 8 TESTS 20 93 0
151168351 ninjamayank A March 27, 2022, 5:01 p.m. OK Java 8 TESTS 20 108 0
151171517 RR2000 A March 27, 2022, 5:25 p.m. OK Java 8 TESTS 20 108 0
151195522 ShivamMehta A March 28, 2022, 1:52 a.m. OK Java 8 TESTS 20 108 5734400
151174293 sky9313 A March 27, 2022, 5:55 p.m. OK Java 8 TESTS 20 109 0
151205454 P_Key26dec A March 28, 2022, 5:27 a.m. OK Java 8 TESTS 20 109 17817600
151176102 _Eyepatch A March 27, 2022, 6:15 p.m. OK Java 8 TESTS 20 124 0
151198253 realcoco A March 28, 2022, 3:04 a.m. OK Java 8 TESTS 20 124 0
151192680 ssingh0271 A March 28, 2022, 12:23 a.m. OK Java 8 TESTS 20 124 0
151205003 mayank61 A March 28, 2022, 5:19 a.m. OK Java 8 TESTS 20 124 0
151170432 F.O.X. A March 27, 2022, 5:16 p.m. OK MS C++ 2017 TESTS 20 15 0
151168837 karim.elsa3d100 A March 27, 2022, 5:04 p.m. OK MS C++ 2017 TESTS 20 15 0
151190987 vmffotltka A March 27, 2022, 11:21 p.m. OK MS C++ 2017 TESTS 20 15 0
151184369 Gadi A March 27, 2022, 8:21 p.m. OK MS C++ 2017 TESTS 20 15 0
151170328 ZW22 A March 27, 2022, 5:15 p.m. OK MS C++ 2017 TESTS 20 15 0
151205544 capability_Wu A March 28, 2022, 5:28 a.m. OK MS C++ 2017 TESTS 20 15 0
151200299 Rishikant24 A March 28, 2022, 3:51 a.m. OK MS C++ 2017 TESTS 20 15 0
151185577 Touristinya A March 27, 2022, 8:44 p.m. OK MS C++ 2017 TESTS 20 30 0
151165945 kazacccc A March 27, 2022, 4:33 p.m. OK MS C++ 2017 TESTS 20 30 102400
151205485 Mysticode A March 28, 2022, 5:27 a.m. OK MS C++ 2017 TESTS 20 31 0
151195135 Olasiliksizci A March 28, 2022, 1:40 a.m. OK .NET Core C# TESTS 20 77 204800
151177653 ansergeyg A March 27, 2022, 6:35 p.m. OK .NET Core C# TESTS 20 77 409600
151175793 suraj A March 27, 2022, 6:12 p.m. OK .NET Core C# TESTS 20 77 3276800
151174076 Repsaj21o A March 27, 2022, 5:53 p.m. OK .NET Core C# TESTS 20 78 204800
151164979 enggandiys A March 27, 2022, 4:32 p.m. OK .NET Core C# TESTS 20 109 204800
151171395 1_2_3_4_5_9 A March 27, 2022, 5:24 p.m. OK PyPy 2 TESTS 20 109 1740800
151196365 rutz12 A March 28, 2022, 2:16 a.m. OK PyPy 3 TESTS 20 108 3276800
151174549 dogydevstorage A March 27, 2022, 5:58 p.m. OK PyPy 3 TESTS 20 109 2764800
151178109 crapcode A March 27, 2022, 6:41 p.m. OK PyPy 3 TESTS 20 140 4710400
151177548 crapcode A March 27, 2022, 6:33 p.m. OK PyPy 3 TESTS 20 155 4505600
151204111 500068183 A March 28, 2022, 5:05 a.m. OK PyPy 3 TESTS 20 155 6144000
151182436 legend.ary_as A March 27, 2022, 7:45 p.m. OK PyPy 3 TESTS 20 171 3993600
151171773 akshat11 A March 27, 2022, 5:28 p.m. OK PyPy 3 TESTS 20 171 5324800
151177644 theorist153 A March 27, 2022, 6:34 p.m. OK PyPy 3 TESTS 20 171 5836800
151207437 Anton_Vdovin A March 28, 2022, 5:58 a.m. OK PyPy 3 TESTS 20 186 6144000
151159820 Dre_Russ A March 27, 2022, 4:21 p.m. OK PyPy 3 TESTS 20 187 5324800
151175956 epoweripi A March 27, 2022, 6:14 p.m. OK PyPy 3-64 TESTS 20 78 4300800
151183898 radoan.sharkar.richi A March 27, 2022, 8:12 p.m. OK PyPy 3-64 TESTS 20 92 5120000
151170969 Vix3n A March 27, 2022, 5:20 p.m. OK PyPy 3-64 TESTS 20 93 5120000
151201356 dvaravind A March 28, 2022, 4:13 a.m. OK PyPy 3-64 TESTS 20 93 5427200
151203768 MistaAsh A March 28, 2022, 4:58 a.m. OK PyPy 3-64 TESTS 20 109 3276800
151176562 nitish420 A March 27, 2022, 6:20 p.m. OK PyPy 3-64 TESTS 20 109 4505600
151192675 majay1638 A March 28, 2022, 12:23 a.m. OK PyPy 3-64 TESTS 20 109 5120000
151202888 sakshatmali A March 28, 2022, 4:42 a.m. OK PyPy 3-64 TESTS 20 109 5939200
151177179 beethoven97 A March 27, 2022, 6:28 p.m. OK PyPy 3-64 TESTS 20 124 5017600
151203675 YashNandwana A March 28, 2022, 4:57 a.m. OK PyPy 3-64 TESTS 20 124 6246400
151181863 eugalt A March 27, 2022, 7:36 p.m. OK Python 3 TESTS 20 61 0
151170043 Rainmaker2627 A March 27, 2022, 5:13 p.m. OK Python 3 TESTS 20 61 0
151182646 fredy10 A March 27, 2022, 7:49 p.m. OK Python 3 TESTS 20 62 0
151170559 Ecola A March 27, 2022, 5:17 p.m. OK Python 3 TESTS 20 62 0
151201533 Programmer76846 A March 28, 2022, 4:17 a.m. OK Python 3 TESTS 20 77 0
151193342 Ice_Bear521 A March 28, 2022, 12:44 a.m. OK Python 3 TESTS 20 77 0
151171262 sp_Piyush A March 27, 2022, 5:23 p.m. OK Python 3 TESTS 20 77 0
151169565 deepanker A March 27, 2022, 5:09 p.m. OK Python 3 TESTS 20 77 102400
151197117 harshk_52 A March 28, 2022, 2:36 a.m. OK Python 3 TESTS 20 78 0
151182575 jr638091 A March 27, 2022, 7:48 p.m. OK Python 3 TESTS 20 78 0
151205881 Spheniscine A March 28, 2022, 5:33 a.m. OK Rust 2021 TESTS 20 15 204800
151199058 HCISY A March 28, 2022, 3:23 a.m. OK Rust 2021 TESTS 20 30 0
151198933 HCISY A March 28, 2022, 3:21 a.m. OK Rust 2021 TESTS 20 31 0
151176805 Hyrulia A March 27, 2022, 6:23 p.m. OK Rust 2021 TESTS 20 31 102400

remove filters

Back to search problems