Codeforces Round 780 (Div. 3)

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
1660 Codeforces Round 780 (Div. 3) FINISHED False 8100 88442663 March 31, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7431 ) F1 Promising String (easy version) PROGRAMMING brute force implementation math strings

B'This is the easy version of Problem F. The only difference between the easy version and the hard version is the constraints. We will call a non-empty string balanced if it contains the same number of plus and minus signs. For example: strings "+--+" and "++-+--" are balanced, and strings "+--", "--" and "" are not balanced. We will call a string promising if the string can be made balanced by several (possibly zero) uses of the following operation: In particular, every balanced string is promising. However, the converse is not true: not every promising string is balanced. For example, the string "-+---" is promising, because you can replace two adjacent minuses with plus and get a balanced string "-++-", or get another balanced string "-+-+". How many non-empty substrings of the given string s are promising? Each non-empty promising substring must be counted in the answer as many times as it occurs in string s . Recall that a substring is a sequence of consecutive characters of the string. For example, for string "+-+" its substring are: "+-", "-+", "+", "+-+" (the string is a substring of itself) and some others. But the following strings are not its substring: "--", "++", "-++". The first line of the input contains an integer t ( 1 <= t <= 500 ) --the number of test cases in the test. Then the descriptions of test cases follow. Each test case of input data consists of two lines. The first line consists of the number n ( 1 <= n <= 3000 ): the length of s . The second line of the test case contains the string s of length n , consisting only of characters "+" and "-". It is guaranteed that the sum of values n over all test cases does not exceed 3000 . For each test case, print a single number: the number of the promising non-empty substrings of string s . Each non-empty promising substring must be counted in the answer as many times as it occurs in string s . The following are the pro'...

Tutorials

Codeforces Round #780 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
151597837 myholiday F1 March 31, 2022, 6:06 p.m. OK GNU C11 TESTS 51 31 0
151598763 myholiday F1 March 31, 2022, 6:16 p.m. OK GNU C11 TESTS 51 31 0
151620833 BingLengJiu F1 April 1, 2022, 3 a.m. OK GNU C++14 TESTS 53 15 0
151615990 Maystern F1 April 1, 2022, 12:43 a.m. OK GNU C++14 TESTS 53 15 0
151615243 yukai F1 April 1, 2022, 12:15 a.m. OK GNU C++14 TESTS 53 15 0
151629062 Adp_Ycc F1 April 1, 2022, 5:29 a.m. OK GNU C++14 TESTS 53 15 0
151604181 Uzumaki_TheLoser F1 March 31, 2022, 7:25 p.m. OK GNU C++14 TESTS 51 15 0
151603284 yegurlamahesh2 F1 March 31, 2022, 7:13 p.m. OK GNU C++14 TESTS 51 15 0
151625747 Sand_Tripper F1 April 1, 2022, 4:40 a.m. OK GNU C++14 TESTS 53 15 0
151625671 white.eye F1 April 1, 2022, 4:39 a.m. OK GNU C++14 TESTS 53 15 0
151631241 DhavalSharma F1 April 1, 2022, 5:58 a.m. OK GNU C++14 TESTS 53 15 0
151626958 sandofan F1 April 1, 2022, 4:58 a.m. OK GNU C++14 TESTS 53 15 0
151628509 Caculate F1 April 1, 2022, 5:21 a.m. OK GNU C++17 TESTS 53 15 0
151627199 zen_itsu F1 April 1, 2022, 5:01 a.m. OK GNU C++17 TESTS 53 15 0
151627190 subobo F1 April 1, 2022, 5:01 a.m. OK GNU C++17 TESTS 53 15 0
151627081 Dog_food_is_me F1 April 1, 2022, 4:59 a.m. OK GNU C++17 TESTS 53 15 0
151626662 jukhega_nahi F1 April 1, 2022, 4:53 a.m. OK GNU C++17 TESTS 53 15 0
151625867 gq789 F1 April 1, 2022, 4:42 a.m. OK GNU C++17 TESTS 53 15 0
151625118 blueluelue161 F1 April 1, 2022, 4:31 a.m. OK GNU C++17 TESTS 53 15 0
151620872 suryansh12 F1 April 1, 2022, 3:01 a.m. OK GNU C++17 TESTS 53 15 0
151630717 agarwal_keshav F1 April 1, 2022, 5:51 a.m. OK GNU C++17 TESTS 53 15 0
151629437 qiluzongyuxing F1 April 1, 2022, 5:34 a.m. OK GNU C++17 TESTS 53 15 0
151607557 sdfsdfsfdasdfasdfsadf F1 March 31, 2022, 8:18 p.m. OK GNU C++17 (64) TESTS 51 15 0
151625692 clam123 F1 April 1, 2022, 4:39 a.m. OK GNU C++17 (64) TESTS 53 15 0
151619611 Messywind F1 April 1, 2022, 2:32 a.m. OK GNU C++17 (64) TESTS 53 15 0
151616433 EotUL8d7 F1 April 1, 2022, 12:57 a.m. OK GNU C++17 (64) TESTS 53 15 0
151615998 vk1cd314 F1 April 1, 2022, 12:43 a.m. OK GNU C++17 (64) TESTS 53 15 0
151611323 dufresne_1949 F1 March 31, 2022, 9:40 p.m. OK GNU C++17 (64) TESTS 53 15 0
151608501 MoNir_ F1 March 31, 2022, 8:35 p.m. OK GNU C++17 (64) TESTS 51 15 0
151607632 AkshitDh F1 March 31, 2022, 8:19 p.m. OK GNU C++17 (64) TESTS 51 15 0
151596385 Ray_Striker F1 March 31, 2022, 5:49 p.m. OK GNU C++17 (64) TESTS 51 15 0
151594562 SaadHussein F1 March 31, 2022, 5:30 p.m. OK GNU C++17 (64) TESTS 51 15 0
151626832 _vjudge8 F1 April 1, 2022, 4:56 a.m. OK GNU C++20 (64) TESTS 53 0 5017600
151627873 Arun_Labana F1 April 1, 2022, 5:11 a.m. OK GNU C++20 (64) TESTS 53 15 0
151627103 Alfeh F1 April 1, 2022, 5 a.m. OK GNU C++20 (64) TESTS 53 15 0
151626476 hasan2006 F1 April 1, 2022, 4:51 a.m. OK GNU C++20 (64) TESTS 53 15 0
151626077 Mustafiz F1 April 1, 2022, 4:45 a.m. OK GNU C++20 (64) TESTS 53 15 0
151624153 hiragana F1 April 1, 2022, 4:12 a.m. OK GNU C++20 (64) TESTS 53 15 0
151622633 bryan0514 F1 April 1, 2022, 3:41 a.m. OK GNU C++20 (64) TESTS 53 15 0
151622397 vedant_1 F1 April 1, 2022, 3:36 a.m. OK GNU C++20 (64) TESTS 53 15 0
151631309 Theo830 F1 April 1, 2022, 5:59 a.m. OK GNU C++20 (64) TESTS 53 15 0
151627931 sourav_patwal F1 April 1, 2022, 5:12 a.m. OK GNU C++20 (64) TESTS 53 15 0
151616626 2enzero F1 April 1, 2022, 1:04 a.m. OK Java 11 TESTS 53 186 0
151592869 dzhi F1 March 31, 2022, 5:14 p.m. OK Java 11 TESTS 51 187 0
151602940 SAMAD_ F1 March 31, 2022, 7:08 p.m. OK Java 11 TESTS 51 202 0
151622963 yogii_123 F1 April 1, 2022, 3:48 a.m. OK Java 11 TESTS 53 202 0
151590730 Dukkha F1 March 31, 2022, 4:58 p.m. OK Java 11 TESTS 51 202 0
151586141 temp98 F1 March 31, 2022, 4:43 p.m. OK Java 11 TESTS 51 202 0
151585089 MasterBruce F1 March 31, 2022, 4:41 p.m. OK Java 11 TESTS 51 202 0
151609509 Haresa F1 March 31, 2022, 8:56 p.m. OK Java 11 TESTS 53 218 0
151603712 LongWalk F1 March 31, 2022, 7:19 p.m. OK Java 11 TESTS 51 218 0
151602001 eshan18.09 F1 March 31, 2022, 6:55 p.m. OK Java 11 TESTS 51 218 0
151591628 Atuer F1 March 31, 2022, 5:05 p.m. OK Java 8 TESTS 51 109 0
151616519 DWSHR F1 April 1, 2022, 1 a.m. OK Java 8 TESTS 53 124 0
151611748 tanishq044 F1 March 31, 2022, 9:51 p.m. OK Java 8 TESTS 53 124 0
151592615 DWSHR F1 March 31, 2022, 5:12 p.m. OK Java 8 TESTS 51 124 0
151590404 gzy1 F1 March 31, 2022, 4:56 p.m. OK Java 8 TESTS 51 124 0
151588469 chinmaya21 F1 March 31, 2022, 4:48 p.m. OK Java 8 TESTS 51 124 0
151586994 ptk_3705 F1 March 31, 2022, 4:45 p.m. OK Java 8 TESTS 51 124 0
151607187 kartikpapney F1 March 31, 2022, 8:12 p.m. OK Java 8 TESTS 51 140 0
151619961 Eslam_Ahmed F1 April 1, 2022, 2:39 a.m. OK Java 8 TESTS 53 452 0
151616716 hanel1164 F1 April 1, 2022, 1:07 a.m. OK Kotlin 1.4 TESTS 53 124 0
151586669 xjcl F1 March 31, 2022, 4:45 p.m. OK Kotlin 1.5 TESTS 51 436 0
151622640 zzl030916 F1 April 1, 2022, 3:41 a.m. OK MS C++ 2017 TESTS 53 31 0
151584574 Flyheck F1 March 31, 2022, 4:40 p.m. OK MS C++ 2017 TESTS 51 608 1536000
151606098 acorn11 F1 March 31, 2022, 7:54 p.m. OK PyPy 2 TESTS 51 109 1228800
151604634 sushmanth.dampur8780 F1 March 31, 2022, 7:32 p.m. OK PyPy 3 TESTS 51 93 2252800
151598955 Believer_Ayush F1 March 31, 2022, 6:18 p.m. OK PyPy 3 TESTS 51 124 2252800
151603933 grawlixes F1 March 31, 2022, 7:22 p.m. OK PyPy 3 TESTS 51 124 3276800
151591690 legend.ary_as F1 March 31, 2022, 5:05 p.m. OK PyPy 3 TESTS 51 155 3584000
151623354 mnkqc F1 April 1, 2022, 3:57 a.m. OK PyPy 3 TESTS 53 155 3686400
151622673 ishmumkhan1234 F1 April 1, 2022, 3:42 a.m. OK PyPy 3 TESTS 53 171 4710400
151587477 REDVED F1 March 31, 2022, 4:46 p.m. OK PyPy 3 TESTS 51 264 6553600
151592928 huangxw F1 March 31, 2022, 5:15 p.m. OK PyPy 3 TESTS 51 265 9728000
151624501 sangram03 F1 April 1, 2022, 4:19 a.m. OK PyPy 3 TESTS 53 342 6144000
151598041 Believer_Ayush F1 March 31, 2022, 6:08 p.m. OK PyPy 3 TESTS 51 873 4710400
151605020 unknownSolver F1 March 31, 2022, 7:38 p.m. OK PyPy 3-64 TESTS 51 93 4096000
151591580 190330228 F1 March 31, 2022, 5:04 p.m. OK PyPy 3-64 TESTS 51 93 4300800
151600062 skp_r F1 March 31, 2022, 6:31 p.m. OK PyPy 3-64 TESTS 51 109 3174400
151602554 Skillful_Wanderer F1 March 31, 2022, 7:03 p.m. OK PyPy 3-64 TESTS 51 109 5632000
151619759 dingovina F1 April 1, 2022, 2:35 a.m. OK PyPy 3-64 TESTS 53 109 7884800
151596149 Mashin_larner F1 March 31, 2022, 5:47 p.m. OK PyPy 3-64 TESTS 51 124 5939200
151623190 mnkqc F1 April 1, 2022, 3:53 a.m. OK PyPy 3-64 TESTS 53 124 6041600
151623147 mnkp F1 April 1, 2022, 3:53 a.m. OK PyPy 3-64 TESTS 53 124 6041600
151589901 Infinidrix F1 March 31, 2022, 4:53 p.m. OK PyPy 3-64 TESTS 51 124 6246400
151591699 Het_Fadia F1 March 31, 2022, 5:05 p.m. OK PyPy 3-64 TESTS 51 124 6963200
151595274 surojit008 F1 March 31, 2022, 5:37 p.m. OK Python 3 TESTS 51 2074 716800
151592157 NS3081992 F1 March 31, 2022, 5:09 p.m. OK Python 3 TESTS 51 2137 0
151603487 MDSPro F1 March 31, 2022, 7:15 p.m. OK Python 3 TESTS 51 2152 0
151627211 Spheniscine F1 April 1, 2022, 5:01 a.m. OK Rust 2021 TESTS 53 15 204800

remove filters

Back to search problems