Non-Divisor Array
You are given an integer $N$. Your task is to find the **minimum** integer $C$ such that there exists an array $A$ of size $N$ satisfying: - $1\le A_i \le C$; - For distinct indices $x$ and $y$ where $x$ **divides** $y; \ A_x \neq A_y$. You need to print the minimum value of $C$ as well as the array $A$. In case multiple arrays exist, you may print any one. ### Input - The first line of input
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