Codeforces Round 758 (Div.1 + 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
1608 Codeforces Round 758 (Div.1 + Div. 2) FINISHED False 7200 92606099 Dec. 11, 2021, 10:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1400 ) D Dominoes PROGRAMMING combinatorics fft graphs math

B"You are given n dominoes. Each domino has a left and a right cell. Each cell can be colored either black or white. Some cells are already colored, while some aren't yet. The coloring is said to be valid if and only if it is possible to rearrange the dominoes in some order such that for each 1 <= i <= n the color of the right cell of the i -th domino is different from the color of the left cell of the ((i bmod n)+1) -st domino. Note that you can't rotate the dominoes, so the left cell always remains the left cell, and the right cell always remains the right cell. Count the number of valid ways to color the yet uncolored cells of dominoes. Two ways are considered different if there is a cell that is colored white in one way and black in the other. In particular, colorings BW WB and WB BW different (and both invalid). As this number can be very big, output it modulo 998 ,244 ,353 . The first line of the input contains a single integer n ( 1 <= n <= 10^5 ) -- the number of dominoes. The next n lines describe dominoes. Each line contains two characters which represent the left and the right cell. Character B means that the corresponding cell is black, character W means that the corresponding cell is white, and ? means that the cell is yet to be colored. Print a single integer -- the answer to the problem. In the first test case, there is only one domino, and we need the color of its right cell to be different from the color of its left cell. There is only one way to achieve this. In the second test case, there are only 2 such colorings: BB WW and WB WB. "...

Tutorials

Editorial of Codeforces Round #758 (Div.1 + Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
138764110 Gassa D Dec. 11, 2021, 11:50 a.m. OK D TESTS 50 171 6144000
138761182 Sigma-Sagittarius D Dec. 11, 2021, 11:41 a.m. OK FPC TESTS 50 140 31334400
138778622 YtTheBot D Dec. 11, 2021, 1:21 p.m. OK GNU C11 TESTS 50 31 3174400
138773318 yao11617 D Dec. 11, 2021, 12:34 p.m. OK GNU C++14 TESTS 50 31 0
138762463 buko D Dec. 11, 2021, 11:45 a.m. OK GNU C++14 TESTS 50 31 0
138784044 Atziluth D Dec. 11, 2021, 2:09 p.m. OK GNU C++14 TESTS 50 31 0
138822655 yaotianqi D Dec. 12, 2021, 2:21 a.m. OK GNU C++14 TESTS 50 31 204800
138777810 wbs200 D Dec. 11, 2021, 1:13 p.m. OK GNU C++14 TESTS 50 31 1638400
138777567 cyh_toby D Dec. 11, 2021, 1:11 p.m. OK GNU C++14 TESTS 50 31 2457600
138829844 sanweishikong D Dec. 12, 2021, 5:46 a.m. OK GNU C++14 TESTS 50 31 2457600
138819301 Acfboy D Dec. 11, 2021, 11:52 p.m. OK GNU C++14 TESTS 50 31 3174400
138822728 ivi. D Dec. 12, 2021, 2:24 a.m. OK GNU C++14 TESTS 50 31 3174400
138764194 Ruffian D Dec. 11, 2021, 11:50 a.m. OK GNU C++14 TESTS 50 31 3584000
138776962 schtomi97 D Dec. 11, 2021, 1:05 p.m. OK GNU C++17 TESTS 50 30 0
138806981 pretender D Dec. 11, 2021, 6:46 p.m. OK GNU C++17 TESTS 50 31 0
138811898 beemax D Dec. 11, 2021, 8:11 p.m. OK GNU C++17 TESTS 50 31 0
138796753 sevenzplus D Dec. 11, 2021, 4:30 p.m. OK GNU C++17 TESTS 50 31 819200
138789126 _October D Dec. 11, 2021, 3:01 p.m. OK GNU C++17 TESTS 50 31 1638400
138775221 acseekerwrj D Dec. 11, 2021, 12:50 p.m. OK GNU C++17 TESTS 50 31 1638400
138772863 D.A_TAU D Dec. 11, 2021, 12:30 p.m. OK GNU C++17 TESTS 50 31 1638400
138772489 miagkov D Dec. 11, 2021, 12:28 p.m. OK GNU C++17 TESTS 50 31 1638400
138824230 Linrenmeng D Dec. 12, 2021, 3:19 a.m. OK GNU C++17 TESTS 50 31 1638400
138769705 marvenlee D Dec. 11, 2021, 12:04 p.m. OK GNU C++17 TESTS 50 31 2457600
138764316 LayCurse D Dec. 11, 2021, 11:50 a.m. OK GNU C++17 (64) TESTS 50 30 100044800
138823256 AlephZero01 D Dec. 12, 2021, 2:45 a.m. OK GNU C++17 (64) TESTS 50 31 0
138806169 qwerE D Dec. 11, 2021, 6:35 p.m. OK GNU C++17 (64) TESTS 50 31 0
138785708 Lucina D Dec. 11, 2021, 2:25 p.m. OK GNU C++17 (64) TESTS 50 31 0
138790485 DmitryLzr D Dec. 11, 2021, 3:16 p.m. OK GNU C++17 (64) TESTS 50 31 819200
138769038 nunu03 D Dec. 11, 2021, 12:02 p.m. OK GNU C++17 (64) TESTS 50 31 1638400
138773757 yspm D Dec. 11, 2021, 12:37 p.m. OK GNU C++17 (64) TESTS 50 31 1945600
138821702 fxhd D Dec. 12, 2021, 1:43 a.m. OK GNU C++17 (64) TESTS 50 31 2457600
138781660 skip2004 D Dec. 11, 2021, 1:48 p.m. OK GNU C++17 (64) TESTS 50 31 3993600
138795549 nohaxjustsoflo D Dec. 11, 2021, 4:15 p.m. OK GNU C++17 (64) TESTS 50 31 3993600
138825662 tiagoshibata D Dec. 12, 2021, 4:04 a.m. OK GNU C++20 (64) TESTS 50 15 0
138771080 czhang2718 D Dec. 11, 2021, 12:20 p.m. OK GNU C++20 (64) TESTS 50 15 1638400
138795033 _Cade_ D Dec. 11, 2021, 4:10 p.m. OK GNU C++20 (64) TESTS 50 15 1638400
138774703 Mikasa D Dec. 11, 2021, 12:45 p.m. OK GNU C++20 (64) TESTS 50 15 2457600
138790929 p3rfect D Dec. 11, 2021, 3:22 p.m. OK GNU C++20 (64) TESTS 50 30 1638400
138772550 dl720125 D Dec. 11, 2021, 12:28 p.m. OK GNU C++20 (64) TESTS 50 30 1638400
138782041 Meul D Dec. 11, 2021, 1:51 p.m. OK GNU C++20 (64) TESTS 50 30 3174400
138820147 werus23 D Dec. 12, 2021, 12:35 a.m. OK GNU C++20 (64) TESTS 50 30 3174400
138773707 generic_placeholder_name D Dec. 11, 2021, 12:37 p.m. OK GNU C++20 (64) TESTS 50 31 819200
138814524 couplefire D Dec. 11, 2021, 9:03 p.m. OK GNU C++20 (64) TESTS 50 31 819200
138798818 PetrNguyen D Dec. 11, 2021, 4:57 p.m. OK Java 11 TESTS 50 218 3481600
138798501 KayDeeEn D Dec. 11, 2021, 4:53 p.m. OK Java 11 TESTS 50 358 3481600
138779468 YahiaSherif D Dec. 11, 2021, 1:30 p.m. OK Java 8 TESTS 50 140 0
138766979 P___ D Dec. 11, 2021, 11:57 a.m. OK MS C++ 2017 TESTS 50 46 819200
138768634 grey D Dec. 11, 2021, 12:01 p.m. OK MS C++ 2017 TESTS 50 61 5017600
138773463 OlavBakken D Dec. 11, 2021, 12:35 p.m. OK PyPy 2 TESTS 50 935 102400000
138794553 temprunner D Dec. 11, 2021, 4:05 p.m. OK PyPy 3 TESTS 50 170 8704000
138794641 jaglike_makkar D Dec. 11, 2021, 4:06 p.m. OK PyPy 3-64 TESTS 50 280 6860800
138762864 titia D Dec. 11, 2021, 11:46 a.m. OK PyPy 3-64 TESTS 50 358 16998400
138824025 conqueror_of_tourist D Dec. 12, 2021, 3:12 a.m. OK PyPy 3-64 TESTS 50 920 50483200
138786527 OLOGY D Dec. 11, 2021, 2:33 p.m. OK Python 2 TESTS 50 482 16793600
138786941 OLOGY D Dec. 11, 2021, 2:37 p.m. OK Python 2 TESTS 50 499 16793600

remove filters

Back to search problems