Educational Codeforces Round 69 (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
1197 Educational Codeforces Round 69 (Rated for Div. 2) FINISHED False 7200 168017099 July 22, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 261 ) F Coloring Game PROGRAMMING dp games matrices 2500

B"Alice and Bob want to play a game. They have n colored paper strips; the i -th strip is divided into a_i cells numbered from 1 to a_i . Each cell can have one of 3 colors. In the beginning of the game, Alice and Bob put n chips, the i -th chip is put in the a_i -th cell of the i -th strip. Then they take turns, Alice is first. Each player during their turn has to choose one chip and move it 1 , 2 or 3 cells backwards (i. xe2 x80 x89e. if the current cell is x , then the chip can be moved to the cell x - 1 , x - 2 or x - 3 ). There are two restrictions: the chip cannot leave the borders of the strip (for example, if the current cell is 3 , then you can't move the chip 3 cells backwards); and some moves may be prohibited because of color of the current cell (a matrix f with size 3 x 3 is given, where f_{i, j} = 1 if it is possible to move the chip j cells backwards from the cell which has color i , or f_{i, j} = 0 if such move is prohibited). The player who cannot make a move loses the game. Initially some cells may be uncolored. Bob can color all uncolored cells as he wants (but he cannot leave any cell uncolored). Let's call a coloring good if Bob can win the game no matter how Alice acts, if the cells are colored according to this coloring. Two colorings are different if at least one cell is colored in different colors in these two colorings. Bob wants you to calculate the number of good colorings. Can you do it for him? Since the answer can be really large, you have to print it modulo 998244353 . The first line contains one integer n -- the number of paper strips ( 1 <= n <= 1000 ). The second line contains n integers a_1 , a_2 , ..., a_n ( 1 <= a_i <= 10^9 ), where a_i is the number of cells in the i -th strip. The third line contains one integer m ( 1 <= "...

Tutorials

E

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
57554689 rainboy F July 22, 2019, 7:03 p.m. OK GNU C11 TESTS 36 1232 614400 2500
58361383 kamiyoru F Aug. 6, 2019, 12:51 a.m. OK GNU C++11 TESTS 36 265 921600 2500
58361469 kamiyoru F Aug. 6, 2019, 12:55 a.m. OK GNU C++11 TESTS 36 280 921600 2500
57548241 Jellou F July 22, 2019, 4:41 p.m. OK GNU C++11 TESTS 36 373 1228800 2500
60326166 luhong F Sept. 10, 2019, 1:41 a.m. OK GNU C++11 TESTS 36 530 614400 2500
57625958 idxcalcal F July 24, 2019, 7:02 a.m. OK GNU C++11 TESTS 36 546 1024000 2500
57632836 luogu_bot5 F July 24, 2019, 9:24 a.m. OK GNU C++11 TESTS 36 561 1024000 2500
58136891 perchema F Aug. 1, 2019, 4:29 p.m. OK GNU C++11 TESTS 36 639 614400 2500
59256015 WZYYN F Aug. 22, 2019, 6:40 a.m. OK GNU C++11 TESTS 36 748 614400 2500
58339144 ymz F Aug. 5, 2019, 12:36 p.m. OK GNU C++11 TESTS 36 780 614400 2500
57566999 mmmod_lqs F July 23, 2019, 3:21 a.m. OK GNU C++11 TESTS 36 795 614400 2500
57554215 jainnish98 F July 22, 2019, 6:51 p.m. OK GNU C++14 TESTS 36 374 1433600 2500
57581907 beginend F July 23, 2019, 9:09 a.m. OK GNU C++14 TESTS 36 483 819200 2500
57586174 TadijaSebez F July 23, 2019, 10:43 a.m. OK GNU C++14 TESTS 36 483 1433600 2500
57574444 ataekOnOrigin F July 23, 2019, 6:31 a.m. OK GNU C++14 TESTS 36 499 12902400 2500
68118982 Reyna F Jan. 3, 2020, 12:34 p.m. OK GNU C++14 TESTS 36 763 819200 2500
57580772 atoiz F July 23, 2019, 8:47 a.m. OK GNU C++14 TESTS 36 764 819200 2500
57707417 MathAlex F July 24, 2019, 8:55 p.m. OK GNU C++14 TESTS 36 764 1126400 2500
57549488 tmwilliamlin168 F July 22, 2019, 4:58 p.m. OK GNU C++14 TESTS 36 780 1024000 2500
57621184 atoiz F July 24, 2019, 4:47 a.m. OK GNU C++14 TESTS 36 780 1024000 2500
57548121 tmwilliamlin168 F July 22, 2019, 4:40 p.m. OK GNU C++14 TESTS 36 795 1228800 2500
58256362 jiangly F Aug. 4, 2019, 10:14 a.m. OK GNU C++17 TESTS 36 280 1024000 2500
57596008 Maksim1744 F July 23, 2019, 1:57 p.m. OK GNU C++17 TESTS 36 342 1536000 2500
57895891 kartik_tiwari F July 28, 2019, 1:33 p.m. OK GNU C++17 TESTS 36 373 1433600 2500
58211290 cjnwq F Aug. 3, 2019, 8:55 a.m. OK GNU C++17 TESTS 36 436 1433600 2500
58541530 zhushaoben F Aug. 10, 2019, 2:25 p.m. OK GNU C++17 TESTS 36 467 1331200 2500
57550228 ei133333 F July 22, 2019, 5:11 p.m. OK GNU C++17 TESTS 36 529 819200 2500
58370577 heno239 F Aug. 6, 2019, 6:24 a.m. OK GNU C++17 TESTS 36 702 1126400 2500
57613902 Medeowex F July 23, 2019, 11:35 p.m. OK GNU C++17 TESTS 36 732 819200 2500
61111891 algorithmIndex2 F Sept. 23, 2019, 11:34 a.m. OK GNU C++17 TESTS 36 733 819200 2500
61111640 algorithmIndex3 F Sept. 23, 2019, 11:29 a.m. OK GNU C++17 TESTS 36 733 819200 2500
57613777 kirigiri F July 23, 2019, 11:25 p.m. OK Haskell TESTS 36 1965 1228800 2500
59922519 ankurdua15 F Sept. 3, 2019, 12:42 a.m. OK Java 8 TESTS 36 951 0 2500
59922513 ankurdua15 F Sept. 3, 2019, 12:41 a.m. OK Java 8 TESTS 36 951 512000 2500
57552306 Dukkha F July 22, 2019, 6:01 p.m. OK Java 8 TESTS 36 2417 0 2500
68487222 sansen F Jan. 10, 2020, 10:15 a.m. OK Rust TESTS 36 811 1228800 2500
57714019 kobae964 F July 25, 2019, 1:48 a.m. OK Rust TESTS 36 1232 1638400 2500

remove filters

Back to search problems