| Almaty Code Cup 2024 |
|---|
| Finished |
This is an interactive problem.
You are given a sorted array $$$a$$$ of length $$$n$$$ in non-decreasing order. Array elements do not exceed $$$n$$$. You only know the length of the array. Using no more than $$$2 \cdot n$$$ queries, you need to guess the entire array. Queries can be made of the following type: «? i x», where $$$1 \leq i \leq n$$$ and $$$x$$$ is an integer. The jury will respond as follows:
After you determine the array, you must output it as follows: «! $$$a_1$$$ $$$a_2$$$ ... $$$a_n$$$», where $$$a_1, a_2, \ldots, a_n$$$ are the elements of the array that you guessed.
The only line of input contains a single integer $$$n$$$ $$$(1 \leq n \leq 3000)$$$ - the size of the array.
Output your answer in the format «! $$$a_1$$$ $$$a_2$$$ ... $$$a_n$$$».
3 = > > = =
? 1 1 ? 1 2 ? 2 3 ? 2 2 ? 3 3 ! 1 2 3
| Name |
|---|


