Make All
You are given an integer $N$. Construct an array $A$ of length $20$ with $1 \le A_i \le 10^8$ such that the following condition holds: - For each $i = 1, 2, \ldots, N$, it is possible to find a subset of $A$ of size **at most** $10$, such that the sum of elements is exactly $i$. There are only $2$ tests, the sample with $N = 20$ and the hidden test with $N = 50000$. ### Input - The first and o
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