Educational Codeforces Round 107 (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
1511 Educational Codeforces Round 107 (Rated for Div. 2) FINISHED False 7200 119114711 April 12, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2635 ) E Colorings and Dominoes PROGRAMMING combinatorics dp math

B'You have a large rectangular board which is divided into n x m cells (the board has n rows and m columns). Each cell is either white or black. You paint each white cell either red or blue. Obviously, the number of different ways to paint them is 2^w , where w is the number of white cells. After painting the white cells of the board, you want to place the maximum number of dominoes on it, according to the following rules: Let the value of the board be the maximum number of dominoes you can place. Calculate the sum of values of the board over all 2^w possible ways to paint it. Since it can be huge, print it modulo 998 ,244 ,353 . The first line contains two integers n and m ( 1 <= n, m <= 3 cdot 10^5 ; nm <= 3 cdot 10^5 ) -- the number of rows and columns, respectively. Then n lines follow, each line contains a string of m characters. The j -th character in the i -th string is * if the j -th cell in the i -th row is black; otherwise, that character is o. Print one integer -- the sum of values of the board over all 2^w possible ways to paint it, taken modulo 998 ,244 ,353 . '...

Tutorials

89634

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
112876546 sakapon E April 12, 2021, 8:58 p.m. OK .NET Core C# TESTS 56 264 23539712

remove filters

Back to search problems