cf/mirror

DBFS Order (Easy Version)

CF
2237I13500· legendary gm2s1024 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
10
4
?0?
2 2 3
0
1 4
0
6
?????
5 2 3 4 5 6
0
0
0
0
0
12
?????0?000?
1 11
2 8 3
3 9 12 6
0
1 4
0
1 10
0
1 5
0
2 2 7
0
2
?
1 2
0
5
????
1 2
1 3
1 4
1 5
0
5
0000
4 2 3 4 5
0
0
0
0
3
??
2 2 3
0
0
5
????
2 2 3
2 4 5
0
0
0
7
??????
2 2 3
2 4 5
2 6 7
0
0
0
0
8
??0?0??
3 2 3 4
2 5 6
1 7
0
0
1 8
0
0
Output
3
27
75
1
1
1
2
7
30
26
2237I1.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…