Staircases
1598E2100· master2s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
2 2 81 11 11 12 21 11 22 11 1
Output
510525310
Sample 2of 3
Input
3 4 101 41 22 31 22 33 21 33 41 33 1
Output
49352429493931232927
Sample 3of 3
Input
1000 1000 2239 634239 634
Output
13326325081333333000
58%
1598E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…