cf/mirror

Shortest Increasing Path

CF
2147A800· newbie1s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
10
1 2
5 6
4 2
1 1
2 1
3 3
5 1
5 4
752 18572
95152 2322
Output
2
2
3
-1
-1
-1
-1
-1
2
3
2147A.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)