Codeforces Round 724 (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
1536 Codeforces Round 724 (Div. 2) FINISHED False 7200 114276263 June 6, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 14517 ) C Diluc and Kaeya PROGRAMMING dp hashing number theory 1500

B"The tycoon of a winery empire in Mondstadt, unmatched in every possible way. A thinker in the Knights of Favonius with an exotic appearance. This time, the brothers are dealing with a strange piece of wood marked with their names. This plank of wood can be represented as a string of n characters. Each character is either a 'D' or a 'K'. You want to make some number of cuts (possibly 0 ) on this string, partitioning it into several contiguous pieces, each with length at least 1 . Both brothers act with dignity, so they want to split the wood as evenly as possible. They want to know the maximum number of pieces you can split the wood into such that the ratios of the number of occurrences of 'D' to the number of occurrences of 'K' in each chunk are the same. Kaeya, the curious thinker, is interested in the solution for multiple scenarios. He wants to know the answer for every prefix of the given string. Help him to solve this problem! For a string we define a ratio as a:b where 'D' appears in it a times, and 'K' appears b times. Note that a or b can equal 0 , but not both. Ratios a:b and c:d are considered equal if and only if a cdot d = b cdot c . For example, for the string 'DDD' the ratio will be 3:0 , for 'DKD' -- 2:1 , for 'DKK' -- 1:2 , and for 'KKKKDD' -- 2:4 . Note that the ratios of the latter two strings are equal to each other, but they are not equal to the ratios of the first two strings. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 1000 ). Description of the test cases follows. The first line of each test case contains an integer n ( 1 <= q n <= q 5 cdot 10^5 ) -- the length of the wood. The second line of each test case contains a string s of length n . Every character of s will be either 'D' or 'K'. It is guaranteed that the sum of n over all test ca"...

Tutorials

Codeforces Round #724 — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
118672267 ssvb C June 6, 2021, 10:54 p.m. OK D TESTS 30 467 104038400 1500
118655964 ruban C June 6, 2021, 5:25 p.m. OK Delphi TESTS 30 623 131379200 1500
118654121 ruban C June 6, 2021, 5:15 p.m. OK FPC TESTS 30 1777 133120000 1500
118673795 kkkzstg C June 7, 2021, 12:31 a.m. OK GNU C++11 TESTS 30 171 6041600 1500
118667956 Baraa_Armoush C June 6, 2021, 8:13 p.m. OK GNU C++11 TESTS 30 234 20787200 1500
118650057 33DAI C June 6, 2021, 4:28 p.m. OK GNU C++11 TESTS 30 249 7168000 1500
118677986 yonghu369 C June 7, 2021, 2:52 a.m. OK GNU C++11 TESTS 30 249 20275200 1500
118674132 rui_er C June 7, 2021, 12:49 a.m. OK GNU C++11 TESTS 30 249 20275200 1500
118683061 hrs_Fe_fw C June 7, 2021, 4:35 a.m. OK GNU C++11 TESTS 30 249 22323200 1500
118649574 hammerL C June 6, 2021, 4:27 p.m. OK GNU C++11 TESTS 30 264 20275200 1500
118673923 henry-tb C June 7, 2021, 12:38 a.m. OK GNU C++11 TESTS 30 265 24268800 1500
118671489 yspm C June 6, 2021, 10:11 p.m. OK GNU C++11 TESTS 30 265 24780800 1500
118651576 WananJSY C June 6, 2021, 4:33 p.m. OK GNU C++11 TESTS 30 265 29798400 1500
118645979 akahir C June 6, 2021, 4:16 p.m. OK GNU C++14 TESTS 30 109 7065600 1500
118649466 usernameson C June 6, 2021, 4:27 p.m. OK GNU C++14 TESTS 30 124 7065600 1500
118672393 shreyanshshikhar2910 C June 6, 2021, 11:02 p.m. OK GNU C++14 TESTS 30 156 13107200 1500
118651302 rr7 C June 6, 2021, 4:32 p.m. OK GNU C++14 TESTS 30 171 13004800 1500
118656088 phuthuynhochienthan C June 6, 2021, 5:26 p.m. OK GNU C++14 TESTS 30 202 6041600 1500
118651480 Max_Calincu C June 6, 2021, 4:32 p.m. OK GNU C++14 TESTS 30 202 9113600 1500
118659419 aniket008 C June 6, 2021, 5:56 p.m. OK GNU C++14 TESTS 30 202 17100800 1500
118680564 Triansh C June 7, 2021, 3:49 a.m. OK GNU C++14 TESTS 30 218 22528000 1500
118670388 SuperJ6 C June 6, 2021, 9:24 p.m. OK GNU C++14 TESTS 30 233 19968000 1500
118660960 MrPotatoHead C June 6, 2021, 6:15 p.m. OK GNU C++14 TESTS 30 233 20480000 1500
118671655 mj729 C June 6, 2021, 10:20 p.m. OK GNU C++17 TESTS 30 109 39116800 1500
118650876 btk10x C June 6, 2021, 4:31 p.m. OK GNU C++17 TESTS 30 124 7065600 1500
118650816 _sharp_shooter C June 6, 2021, 4:31 p.m. OK GNU C++17 TESTS 30 124 7987200 1500
118650247 bharani_kumar C June 6, 2021, 4:29 p.m. OK GNU C++17 TESTS 30 139 17920000 1500
118678991 MJ_220117 C June 7, 2021, 3:14 a.m. OK GNU C++17 TESTS 30 155 13004800 1500
118676209 Adaptive_Route C June 7, 2021, 2:09 a.m. OK GNU C++17 TESTS 30 156 25088000 1500
118655358 windy7926778 C June 6, 2021, 5:21 p.m. OK GNU C++17 TESTS 30 171 6451200 1500
118676964 fxhd C June 7, 2021, 2:29 a.m. OK GNU C++17 TESTS 30 171 12390400 1500
118649746 _makhan_ C June 6, 2021, 4:27 p.m. OK GNU C++17 TESTS 30 171 13004800 1500
118649355 Parthbansal C June 6, 2021, 4:26 p.m. OK GNU C++17 TESTS 30 171 13004800 1500
118664969 burak C June 6, 2021, 7:10 p.m. OK GNU C++17 (64) TESTS 30 109 9625600 1500
118683145 Raeee C June 7, 2021, 4:37 a.m. OK GNU C++17 (64) TESTS 30 124 7065600 1500
118672206 Test_Try001 C June 6, 2021, 10:50 p.m. OK GNU C++17 (64) TESTS 30 124 13004800 1500
118658302 LayCurse C June 6, 2021, 5:45 p.m. OK GNU C++17 (64) TESTS 30 124 18227200 1500
118678784 Adaptive_Route C June 7, 2021, 3:10 a.m. OK GNU C++17 (64) TESTS 30 187 25088000 1500
118654628 code_hardik C June 6, 2021, 5:18 p.m. OK GNU C++17 (64) TESTS 30 202 10035200 1500
118681977 _K1ng_ C June 7, 2021, 4:16 a.m. OK GNU C++17 (64) TESTS 30 202 32256000 1500
118656080 despair_101 C June 6, 2021, 5:26 p.m. OK GNU C++17 (64) TESTS 30 202 40140800 1500
118651932 ch_hui C June 6, 2021, 4:33 p.m. OK GNU C++17 (64) TESTS 30 218 10240000 1500
118666970 nikolayfedoroff C June 6, 2021, 7:50 p.m. OK GNU C++17 (64) TESTS 30 218 32256000 1500
118669076 Cment__Mixer C June 6, 2021, 8:43 p.m. OK Haskell TESTS 30 1684 55808000 1500
118667539 Ste C June 6, 2021, 8:04 p.m. OK Java 11 TESTS 30 499 27648000 1500
118684383 aayushdhakad C June 7, 2021, 4:57 a.m. OK Java 11 TESTS 30 530 27136000 1500
118673349 Asgar C June 7, 2021, 12:05 a.m. OK Java 11 TESTS 30 545 0 1500
118664987 amit_chas C June 6, 2021, 7:10 p.m. OK Java 11 TESTS 30 561 27136000 1500
118646070 Nicolas125841 C June 6, 2021, 4:16 p.m. OK Java 11 TESTS 30 561 27238400 1500
118663052 Apass.Jack C June 6, 2021, 6:38 p.m. OK Java 11 TESTS 30 577 39936000 1500
118666482 ak_ankit C June 6, 2021, 7:39 p.m. OK Java 11 TESTS 30 608 36147200 1500
118647113 ytripathi891 C June 6, 2021, 4:19 p.m. OK Java 11 TESTS 30 623 40960000 1500
118659027 CrinklyGolem C June 6, 2021, 5:52 p.m. OK Java 11 TESTS 30 654 24985600 1500
118653907 MubtasimShahriar C June 6, 2021, 5:15 p.m. OK Java 11 TESTS 30 670 66662400 1500
118676975 aggarwalanshul01 C June 7, 2021, 2:29 a.m. OK Java 8 TESTS 30 389 17612800 1500
118679508 dyxdxy C June 7, 2021, 3:26 a.m. OK Java 8 TESTS 30 483 43212800 1500
118672734 invincible777 C June 6, 2021, 11:24 p.m. OK Java 8 TESTS 30 499 31129600 1500
118651825 Viu C June 6, 2021, 4:33 p.m. OK Java 8 TESTS 30 514 31129600 1500
118686875 tryfg C June 7, 2021, 5:36 a.m. OK Java 8 TESTS 30 560 38502400 1500
118650296 naman5811 C June 6, 2021, 4:29 p.m. OK Java 8 TESTS 30 623 43520000 1500
118688430 tryfg C June 7, 2021, 5:56 a.m. OK Java 8 TESTS 30 638 35635200 1500
118671605 nickmikemurderer C June 6, 2021, 10:18 p.m. OK Java 8 TESTS 30 654 69529600 1500
118675443 pribic C June 7, 2021, 1:43 a.m. OK Java 8 TESTS 30 670 34304000 1500
118668156 smahajan54842 C June 6, 2021, 8:17 p.m. OK Java 8 TESTS 30 701 28979200 1500
118680907 pallav12 C June 7, 2021, 3:55 a.m. OK Kotlin TESTS 30 841 51814400 1500
118656190 lionvs132 C June 6, 2021, 5:27 p.m. OK Mono C# TESTS 30 327 39628800 1500
118656125 suVrik C June 6, 2021, 5:26 p.m. OK MS C++ 2017 TESTS 30 529 24268800 1500
118652332 khedia C June 6, 2021, 4:34 p.m. OK MS C++ 2017 TESTS 30 576 34201600 1500
118679835 markgeek C June 7, 2021, 3:33 a.m. OK .NET Core C# TESTS 30 1512 42291200 1500
118647379 Darooha C June 6, 2021, 4:20 p.m. OK Ocaml TESTS 30 546 22630400 1500
118654325 cs_tree C June 6, 2021, 5:16 p.m. OK PyPy 2 TESTS 30 623 50790400 1500
118660734 NaAm_ME_kYa_raKhA_hAi C June 6, 2021, 6:12 p.m. OK PyPy 2 TESTS 30 717 60313600 1500
118679757 edusanketdk C June 7, 2021, 3:31 a.m. OK PyPy 3 TESTS 30 561 48230400 1500
118674520 h8191 C June 7, 2021, 1:09 a.m. OK PyPy 3 TESTS 30 561 58470400 1500
118681813 Half_coder C June 7, 2021, 4:12 a.m. OK PyPy 3 TESTS 30 624 61030400 1500
118649903 yashwant_singh C June 6, 2021, 4:28 p.m. OK PyPy 3 TESTS 30 624 67584000 1500
118687787 emil18 C June 7, 2021, 5:48 a.m. OK PyPy 3 TESTS 30 639 50892800 1500
118648661 Terryobeyes C June 6, 2021, 4:24 p.m. OK PyPy 3 TESTS 30 655 67891200 1500
118650175 justinz2018 C June 6, 2021, 4:29 p.m. OK PyPy 3 TESTS 30 670 75673600 1500
118646479 xxxdu69 C June 6, 2021, 4:18 p.m. OK PyPy 3 TESTS 30 670 85196800 1500
118648051 kalin_bhaiya C June 6, 2021, 4:22 p.m. OK PyPy 3 TESTS 30 686 57753600 1500
118656614 rushi_30 C June 6, 2021, 5:30 p.m. OK PyPy 3 TESTS 30 686 76185600 1500
118654222 mohantyabhijit074 C June 6, 2021, 5:16 p.m. OK Python 3 TESTS 30 998 27955200 1500
118651130 sal_man_soori C June 6, 2021, 4:31 p.m. OK Python 3 TESTS 30 1091 27443200 1500
118678050 shiviDON C June 7, 2021, 2:53 a.m. OK Python 3 TESTS 30 1263 45977600 1500
118663481 puffc0rn C June 6, 2021, 6:45 p.m. OK Python 3 TESTS 30 1278 42086400 1500
118683793 sh1194 C June 7, 2021, 4:47 a.m. OK Python 3 TESTS 30 1294 45977600 1500
118651578 shreyashnahar0 C June 6, 2021, 4:33 p.m. OK Python 3 TESTS 30 1310 28262400 1500
118665282 tayyrov C June 6, 2021, 7:16 p.m. OK Python 3 TESTS 30 1326 50176000 1500
118665416 tayyrov C June 6, 2021, 7:19 p.m. OK Python 3 TESTS 30 1372 50688000 1500
118680606 hogrider C June 7, 2021, 3:49 a.m. OK Python 3 TESTS 30 1622 45977600 1500
118685701 Shubh18 C June 7, 2021, 5:18 a.m. OK Python 3 TESTS 30 1622 53760000 1500
118683129 revanthbhamidipati C June 7, 2021, 4:36 a.m. OK Python 3 + libs TESTS 30 951 0 1500
118666335 pakshi_141199 C June 6, 2021, 7:36 p.m. OK Python 3 + libs TESTS 30 982 0 1500
118646624 ixrs C June 6, 2021, 4:18 p.m. OK Rust TESTS 30 265 21401600 1500
118648532 GraphTheory C June 6, 2021, 4:24 p.m. OK Rust TESTS 30 1060 23859200 1500

remove filters

Back to search problems