cf/mirror

Processing Queries

CF
644B1700· expert5s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
5 1
2 9
4 8
10 9
15 2
19 1
Output
11 19 -1 21 22
Sample 2of 2
Input
4 1
2 8
4 8
10 9
15 2
Output
10 18 27 -1
644B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)