Mysterious Sequence
**This is an interactive problem.** Joshua is hiding a sequence $A_1, A_2, \ldots, A_N$, where $N$ is even. He wants to play a game with you. Your goal is to guess the sequence. First, Joshua tells you $A_1$ and $A_N$. Then, you should ask him queries. In each query, you choose four integers $L_1$, $R_1$, $L_2$ and $R_2$ such that $1 \le L_1 \lt R_1 \le N$ and $1 \le L_2 \lt R_2 \le N$, and
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start