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.
Problems
B'Consider a road consisting of several rows. Each row is divided into several rectangular tiles, and all tiles in the same row are equal. The first row contains exactly one rectangular tile. Look at the picture below which shows how the tiles are arranged. The road is constructed as follows: You start from the only tile in the first row and want to reach the last row (any tile of it). From your current tile, you can move to any tile in the next row which touches your current tile. Calculate the number of different paths from the first row to the last row. Since it can be large, print it modulo 998244353 . The first line contains one integer n ( 1 <= n <= 1000 ). Then n lines follow. The i -th of them contains two integers a_i and b_i ( 1 <= a_i, b_i <= 10^5 ; |a_i - b_i| <= 5 ). Additional constraint on the input: the sequence of a_i and b_i never results in a row with non-positive number of tiles. Print one integer -- the number of paths from the first row to the last row, taken modulo 998244353 . '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
104374290 |
Suiseiseki |
G |
Jan. 15, 2021, 3:03 a.m. |
OK |
GNU C++11 |
TESTS |
137 |
3587 |
1945600 |
|
|
104341001 |
FluffyT |
G |
Jan. 14, 2021, 4:25 p.m. |
OK |
GNU C++11 |
TESTS |
137 |
3603 |
6041600 |
|
|
104353976 |
prabowo |
G |
Jan. 14, 2021, 5:24 p.m. |
OK |
GNU C++11 |
TESTS |
137 |
3728 |
16998400 |
|
|
104348930 |
SlowDecay |
G |
Jan. 14, 2021, 4:37 p.m. |
OK |
GNU C++14 |
TESTS |
137 |
3993 |
5836800 |
|
|
104352513 |
Alpha_Q |
G |
Jan. 14, 2021, 5:07 p.m. |
OK |
GNU C++17 |
TESTS |
137 |
2090 |
19660800 |
|
|
104349212 |
BigBag |
G |
Jan. 14, 2021, 4:39 p.m. |
OK |
GNU C++17 |
TESTS |
137 |
2152 |
18841600 |
|
|
104347297 |
RUSH_D_CAT |
G |
Jan. 14, 2021, 4:33 p.m. |
OK |
GNU C++17 |
TESTS |
137 |
2261 |
5734400 |
|
|
104344342 |
cuiaoxiang |
G |
Jan. 14, 2021, 4:28 p.m. |
OK |
GNU C++17 |
TESTS |
137 |
2745 |
2764800 |
|
|
104377542 |
Ishtar |
G |
Jan. 15, 2021, 4:33 a.m. |
OK |
GNU C++17 |
TESTS |
137 |
3244 |
16896000 |
|
|
104361314 |
mardagio11 |
G |
Jan. 14, 2021, 7:19 p.m. |
OK |
GNU C++17 |
TESTS |
137 |
3619 |
2662400 |
|
|
104346655 |
Lawali |
G |
Jan. 14, 2021, 4:31 p.m. |
OK |
GNU C++17 |
TESTS |
137 |
3619 |
2662400 |
|
|
104376606 |
zh0ukangyang |
G |
Jan. 15, 2021, 4:09 a.m. |
OK |
GNU C++17 |
TESTS |
137 |
3727 |
7270400 |
|
|
104370591 |
orzdevinwang |
G |
Jan. 15, 2021, 12:34 a.m. |
OK |
GNU C++17 |
TESTS |
137 |
3727 |
7270400 |
|
|
104359364 |
expert_to_be |
G |
Jan. 14, 2021, 6:43 p.m. |
OK |
GNU C++17 (64) |
TESTS |
137 |
561 |
2969600 |
|
|
104352224 |
heno239 |
G |
Jan. 14, 2021, 5:04 p.m. |
OK |
GNU C++17 (64) |
TESTS |
137 |
576 |
6144000 |
|
|
104352185 |
minato |
G |
Jan. 14, 2021, 5:04 p.m. |
OK |
GNU C++17 (64) |
TESTS |
137 |
577 |
2969600 |
|
|
104352718 |
deepspacewaifu |
G |
Jan. 14, 2021, 5:10 p.m. |
OK |
GNU C++17 (64) |
TESTS |
137 |
608 |
2662400 |
|
|
104341790 |
nuip |
G |
Jan. 14, 2021, 4:25 p.m. |
OK |
GNU C++17 (64) |
TESTS |
137 |
654 |
14131200 |
|
|
104376096 |
haruki_K |
G |
Jan. 15, 2021, 3:55 a.m. |
OK |
GNU C++17 (64) |
TESTS |
137 |
670 |
6860800 |
|
|
104359146 |
stevenkplus |
G |
Jan. 14, 2021, 6:39 p.m. |
OK |
GNU C++17 (64) |
TESTS |
137 |
717 |
2867200 |
|
|
104346480 |
BigBag |
G |
Jan. 14, 2021, 4:31 p.m. |
OK |
GNU C++17 (64) |
TESTS |
137 |
810 |
2560000 |
|
|
104348798 |
BigBag |
G |
Jan. 14, 2021, 4:37 p.m. |
OK |
GNU C++17 (64) |
TESTS |
137 |
826 |
19148800 |
|
|
104372042 |
Geothermal |
G |
Jan. 15, 2021, 1:43 a.m. |
OK |
GNU C++17 (64) |
TESTS |
137 |
1216 |
5836800 |
|
|
104351066 |
uwi |
G |
Jan. 14, 2021, 4:53 p.m. |
OK |
Java 11 |
TESTS |
137 |
3915 |
0 |
|
|
remove filters
Back to search problems