Increasing Windows
An array $A$ of length $N$ is said to be good with respective to a parameter $K$ if the following condition holds: - The array $B$ of length $N - K + 1$ defined by $B_i = \max(A_i, A_{i + 1}, A_{i + 2}, \ldots, A_{i + K - 1})$ is strictly increasing. --- Given $2$ integers $N$ and $K$, count how many arrays $A$ follow the conditions: - $|A| = N$ - $1 \le A_i \le N$ - $A$ is good with respect t
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