cf/mirror

Books Queries

CF
1066C1400· specialist2s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
8
L 1
R 2
R 3
? 2
L 4
? 1
L 5
? 1
Output
1
1
2
Sample 2of 2
Input
10
L 100
R 100000
R 123
L 101
? 123
L 10
R 115
? 100
R 110
? 115
Output
0
2
1
1066C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)