B. DJ Nicholas
time limit per test
4 seconds
memory limit per test
960 megabytes
input
standard input
output
standard output
Example
Input
4 10 4
+ 7 2 6
+ 2 8 10
+ 9 1 4
? 4 9
Output
1 2 1 1