cf/mirror

Count Paths

CF
1923E2000· candidate master2s512 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
4
3
1 2 1
1 2
2 3
5
2 1 2 1 2
1 2
1 3
3 4
4 5
5
1 2 3 4 5
1 2
1 3
3 4
4 5
4
2 2 2 2
3 1
3 2
3 4
Output
1
3
0
3
1923E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…