cf/mirror

Vertical Paths

CF
1675D1300· pupil2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
6
5
3 1 3 3 1
4
1 1 4 1
7
1 1 2 3 4 5 6
1
1
6
4 4 4 4 1 2
4
2 2 2 2
Output
3
3
3 1 5
1
2
1
4
 
2
2
1 2
2
4 3
 
1
7
1 2 3 4 5 6 7
 
1
1
1
 
3
3
4 1 5
2
2 6
1
3
 
3
2
2 1
1
3
1
4
1675D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…