cf/mirror

The 67th Iteration of "Counting is Fun"

CF
2218G1800· expert2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
7
4 3
0 1 2 0
8 4
0 1 2 3 1 2 0 1
9 5
1 0 1 3 4 3 2 1 0
15 14
3 0 1 2 3 4 5 6 7 8 9 10 11 12 13
5 5
4 3 0 1 2
5 2
0 1 1 1 0
3 2
0 1 1
Output
2
0
1920
138007136
8
0
0
2218G.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)