cf/mirror

Lucky Chains

CF
1766D1600· expert4s512 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
4
5 15
13 37
8 9
10009 20000
Output
0
1
-1
79
1766D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)