D-Function
Dr.D is tired of making up stories, so here is the formal description of this problem : You are given a set $S = \{S_1, S_2, \ldots, S_K\}$, an integer $X$ and a sequence $A_1, A_2, \ldots, A_M$. Let's define an infinite sequence $W_1, W_2, \ldots$: for each valid $i$, $W_i = A_{((i-1) \% M) + 1}$. Then, let's define a function $F(i)$ for any non-negative integer $i$ in the following way: - $F(0)
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