Guess the Array

아직 제출이 없습니다시간 제한2초메모리 제한512 MB

문제

This is an interactive problem. Your program will interact with the jury program using standard input and output.

Alice and Bob have decided to play a game called "Guess the Array". The rules of the game are very simple: Alice has an array of nn integers, and Bob has to guess this array by making no more than nn queries about the sums on the segments.

In one move Bob can make one of two types of queries to Alice:

  1. "? l r" to find out the sum of numbers on the segment of the array from the ll-th to the rr-th element inclusive;
  2. "!" to tell Alice that he is ready to give the answer. After this query Alice expects nn integers from Bob: the initial array.

For each first type query, Alice tells Bob the sum of the numbers in the requested segment. But to make it harder to guess, after each query Alice makes one segment blocked. In further queries, Bob cannot ask for the sum of the numbers on the blocked segments.

Help Bob guess Alice's array by making no more than nn first type queries.