Educational Codeforces Round 106 (Rated for 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
1499 Educational Codeforces Round 106 (Rated for Div. 2) FINISHED False 7200 115744199 March 18, 2021, 2:50 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1517 ) E Chaotic Merge PROGRAMMING combinatorics dp

B"You are given two strings x and y , both consist only of lowercase Latin letters. Let |s| be the length of string s . Let's call a sequence a a merging sequence if it consists of exactly |x| zeros and exactly |y| ones in some order. A merge z is produced from a sequence a by the following rules: Two merging sequences a and b are different if there is some position i such that a_i neq b_i . Let's call a string z chaotic if for all i from 2 to |z| z_{i-1} neq z_i . Let s[l,r] for some 1 <= l <= r <= |s| be a substring of consecutive letters of s , starting from position l and ending at position r inclusive. Let f(l_1, r_1, l_2, r_2) be the number of different merging sequences of x[l_1,r_1] and y[l_2,r_2] that produce chaotic merges. Note that only non-empty substrings of x and y are considered. Calculate sum limits_{1 <= l_1 <= r_1 <= |x| 1 <= l_2 <= r_2 <= |y|} f(l_1, r_1, l_2, r_2) . Output the answer modulo 998 ,244 ,353 . The first line contains a string x ( 1 <= |x| <= 1000 ). The second line contains a string y ( 1 <= |y| <= 1000 ). Both strings consist only of lowercase Latin letters. Print a single integer -- the sum of f(l_1, r_1, l_2, r_2) over 1 <= l_1 <= r_1 <= |x| and 1 <= l_2 <= r_2 <= |y| modulo 998 ,244 ,353 . In the first example there are: Thus, the answer is 6 cdot 2 + 3 cdot 1 + 4 cdot 1 + 2 cdot 2 + 2 cdot 0 + 1 cdot 1 = 24 . "...

Tutorials

Educational Codeforces Round 106 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
110395359 rainboy E March 18, 2021, 6:27 p.m. OK GNU C11 TESTS 15 31 8089600
110406035 DataStructures E March 18, 2021, 10:58 p.m. OK GNU C++11 TESTS 15 31 8089600
110378876 hangyesheng E March 18, 2021, 4:31 p.m. OK GNU C++11 TESTS 15 31 8089600
110396192 saurabh_prince E March 18, 2021, 6:39 p.m. OK GNU C++11 TESTS 15 31 8089600
110412918 Scarlet_Hypoc E March 19, 2021, 3:39 a.m. OK GNU C++11 TESTS 15 31 8192000
110380726 IAKWF E March 18, 2021, 4:36 p.m. OK GNU C++11 TESTS 15 31 8396800
110378012 LeafSeek E March 18, 2021, 4:28 p.m. OK GNU C++11 TESTS 15 31 16179200
110383307 thecold E March 18, 2021, 4:43 p.m. OK GNU C++11 TESTS 15 46 7884800
110391474 pikminn E March 18, 2021, 5:34 p.m. OK GNU C++11 TESTS 15 46 8089600
110378056 lcyxds E March 18, 2021, 4:29 p.m. OK GNU C++11 TESTS 15 46 8192000
110392488 YoungK E March 18, 2021, 5:48 p.m. OK GNU C++11 TESTS 15 46 8192000
110389520 aditi062519 E March 18, 2021, 5:13 p.m. OK GNU C++14 TESTS 15 31 7987200
110388912 squaredog E March 18, 2021, 5:08 p.m. OK GNU C++14 TESTS 15 31 8089600
110383819 ankit_1107 E March 18, 2021, 4:45 p.m. OK GNU C++14 TESTS 15 62 16076800
110406510 NOOBxCODER E March 18, 2021, 11:26 p.m. OK GNU C++14 TESTS 15 62 16179200
110378261 saharshluthra E March 18, 2021, 4:29 p.m. OK GNU C++14 TESTS 15 62 32768000
110384913 PlanarG E March 18, 2021, 4:47 p.m. OK GNU C++14 TESTS 15 62 64512000
110409551 cvpioi2018 E March 19, 2021, 1:57 a.m. OK GNU C++14 TESTS 15 77 16076800
110414851 BY_KUTBILIM E March 19, 2021, 4:28 a.m. OK GNU C++14 TESTS 15 77 16384000
110398019 EJOI_Gold E March 18, 2021, 7:09 p.m. OK GNU C++14 TESTS 15 77 24166400
110387826 Ruki.cf E March 18, 2021, 5 p.m. OK GNU C++14 TESTS 15 78 16076800
110381970 lovelyz E March 18, 2021, 4:40 p.m. OK GNU C++17 TESTS 15 31 8089600
110402027 moo. E March 18, 2021, 8:32 p.m. OK GNU C++17 TESTS 15 31 8089600
110387035 alimq E March 18, 2021, 4:55 p.m. OK GNU C++17 TESTS 15 31 8089600
110399627 Muh E March 18, 2021, 7:40 p.m. OK GNU C++17 TESTS 15 31 8294400
110379950 __fishingprince__ E March 18, 2021, 4:34 p.m. OK GNU C++17 TESTS 15 31 40140800
110396070 TheGood E March 18, 2021, 6:37 p.m. OK GNU C++17 TESTS 15 46 8089600
110406143 peti1234 E March 18, 2021, 11:06 p.m. OK GNU C++17 TESTS 15 46 16076800
110382335 DenOMINATOR E March 18, 2021, 4:41 p.m. OK GNU C++17 TESTS 15 46 16179200
110406947 NRolly E March 18, 2021, 11:49 p.m. OK GNU C++17 TESTS 15 46 16281600
110383543 magnified E March 18, 2021, 4:44 p.m. OK GNU C++17 TESTS 15 46 16384000
110387876 nor E March 18, 2021, 5:01 p.m. OK GNU C++17 (64) TESTS 15 31 7987200
110413258 cheissmart E March 19, 2021, 3:50 a.m. OK GNU C++17 (64) TESTS 15 31 8089600
110392229 birka0 E March 18, 2021, 5:44 p.m. OK GNU C++17 (64) TESTS 15 31 8089600
110379346 burnoutag E March 18, 2021, 4:32 p.m. OK GNU C++17 (64) TESTS 15 31 8089600
110403794 wassim.omais E March 18, 2021, 9:21 p.m. OK GNU C++17 (64) TESTS 15 31 12288000
110392094 mariand E March 18, 2021, 5:42 p.m. OK GNU C++17 (64) TESTS 15 31 16076800
110388556 Kotoblepass E March 18, 2021, 5:06 p.m. OK GNU C++17 (64) TESTS 15 31 16076800
110392985 Kotoblepass E March 18, 2021, 5:54 p.m. OK GNU C++17 (64) TESTS 15 31 16076800
110409332 Forever_Pursuit E March 19, 2021, 1:49 a.m. OK GNU C++17 (64) TESTS 15 31 16179200
110386031 cheems_garmg E March 18, 2021, 4:49 p.m. OK GNU C++17 (64) TESTS 15 31 16281600
110391687 LNB E March 18, 2021, 5:37 p.m. OK Java 11 TESTS 15 655 40448000
110380383 SPD_9X2 E March 18, 2021, 4:35 p.m. OK PyPy 3 TESTS 15 920 55193600
110387173 hiratai E March 18, 2021, 4:56 p.m. OK Rust TESTS 15 155 16998400
110391222 toomer E March 18, 2021, 5:31 p.m. OK Rust TESTS 15 592 133324800

remove filters

Back to search problems