Secret Tree
**This is an interactive task** You are given a positive integer $N$. There is a tree with $N$ nodes numbered from $1$ to $N$ which is hidden from you. You can ask queries of the following format: $?$ $k$ $a_1$ $a_2$ $a_3$ $\dots a_k$ where: - $3 \leq k \leq N$ - $1 \leq a_i \leq N$ - $a_i \neq a_j$ for all $1 \le i \lt j \le k$ The judge will return $1$ if {$a_1, a_2, a_3, \dots, a_k$
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