Codeforces Round 865 (Div. 1)

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
1815 Codeforces Round 865 (Div. 1) FINISHED False 8100 56214862 April 9, 2023, 2:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 353 ) E Bosco and Particle PROGRAMMING dp math number theory strings 3100

B'Bosco is studying the behaviour of particles. He decided to investigate on the peculiar behaviour of the so-called "four-one-two" particle. He does the following: There is a line of length n+1 , where the topmost point is position 0 and bottommost is position n+1 . The particle is initially (at time t=0 ) at position 0 and heading downwards. The particle moves at the speed of 1 unit per second. There are n oscillators at positions 1,2, ldots,n . Each oscillator can be described by a binary string. The initial state of each oscillator is the first character of its binary string. When the particle hits with an oscillator, the particle reverses its direction if its current state is texttt{1} and continues to move at the same direction if its current state is texttt{0} , and that oscillator moves on to the next state (the next state of the last state is defined as the first state). Additionally, the particle always reverses its direction when it is at position 0 or n+1 at time t > 0 . Bosco would like to know the cycle length of the movement of particle. The cycle length is defined as the minimum value of c such that for any time t ge 0 , the position of the particle at time t is same as the position of the particle at time t+c . It can be proved that such value c always exists. As he realises the answer might be too large, he asks you to output your answer modulo 998244353 . The first line contains an integer n ( 1 <= n <= 10^6 ) -- the number of oscillators. The i -th of the next n line contains a binary string s_i ( 1 <= <= ft|s_i right| <= 10^6 ) -- the binary string, that contains only characters texttt{0} and texttt{1} , describing the oscillator at position i . It is guaranteed that the sum of all |s_i| does not exceed 10^6 . Output a single integer integer -- the cycle length of the move'...

Tutorials

Editorial of Codeforces Round #865

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
201581463 rainboy E April 9, 2023, 7:47 p.m. OK GNU C11 TESTS 128 234 45363200 3100
201606788 ztcakioi E April 10, 2023, 2:54 a.m. OK GNU C++14 TESTS 128 93 7168000 3100
201605368 MakaPakka E April 10, 2023, 2:29 a.m. OK GNU C++14 TESTS 128 140 76800000 3100
201601224 chen_03 E April 10, 2023, 1 a.m. OK GNU C++14 TESTS 128 171 74444800 3100
201608495 njwrz E April 10, 2023, 3:24 a.m. OK GNU C++14 TESTS 128 701 169472000 3100
201613817 Hritik12 E April 10, 2023, 4:49 a.m. OK GNU C++14 TESTS 128 717 169472000 3100
201578046 UNIXBAS E April 9, 2023, 7:10 p.m. OK GNU C++17 TESTS 128 78 25190400 3100
201569325 tute7627 E April 9, 2023, 5:55 p.m. OK GNU C++17 TESTS 128 139 32460800 3100
201568119 BehruzbekRahimboyev E April 9, 2023, 5:47 p.m. OK GNU C++17 TESTS 128 280 32153600 3100
201578151 TadijaSebez E April 9, 2023, 7:11 p.m. OK GNU C++17 TESTS 128 529 13209600 3100
201557247 potato167 E April 9, 2023, 4:46 p.m. OK GNU C++17 TESTS 128 1684 197734400 3100
201607600 q-w-q-w-q E April 10, 2023, 3:08 a.m. OK GNU C++17 (64) TESTS 128 31 22016000 3100
201602003 Kubic E April 10, 2023, 1:17 a.m. OK GNU C++17 (64) TESTS 128 46 13004800 3100
201602039 Kubic E April 10, 2023, 1:18 a.m. OK GNU C++17 (64) TESTS 128 46 13004800 3100
201556101 duality E April 9, 2023, 4:43 p.m. OK GNU C++17 (64) TESTS 128 186 100147200 3100
201556139 LJC00118 E April 9, 2023, 4:43 p.m. OK GNU C++17 (64) TESTS 128 1310 161996800 3100
201575265 Benq E April 9, 2023, 6:43 p.m. OK GNU C++20 (64) TESTS 128 15 7475200 3100
201578368 Kapt E April 9, 2023, 7:14 p.m. OK GNU C++20 (64) TESTS 128 15 7884800 3100
201598750 Marckess E April 10, 2023, 12:11 a.m. OK GNU C++20 (64) TESTS 128 46 21811200 3100
201572290 noimi E April 9, 2023, 6:18 p.m. OK GNU C++20 (64) TESTS 128 46 28262400 3100
201546853 A_G E April 9, 2023, 4:19 p.m. OK GNU C++20 (64) TESTS 128 62 25804800 3100
201546492 maspy E April 9, 2023, 4:18 p.m. OK GNU C++20 (64) TESTS 128 77 22016000 3100
201551207 maroonrk E April 9, 2023, 4:31 p.m. OK GNU C++20 (64) TESTS 128 77 72499200 3100
201555003 18Michael E April 9, 2023, 4:40 p.m. OK GNU C++20 (64) TESTS 128 93 49049600 3100
201570815 dl720125 E April 9, 2023, 6:06 p.m. OK GNU C++20 (64) TESTS 128 93 66969600 3100
201528832 jiangly E April 9, 2023, 3:44 p.m. OK GNU C++20 (64) TESTS 128 140 32051200 3100

remove filters

Back to search problems