Array Partition
You are given an array $A$ of $N$ integers, and an integer $X$. For each $K$ in the range $[1, N]$, determine the number of ways to partition the array into **exactly** $K$ non-empty subarrays such that the maxima of each of the subarrays are **at least** $X$. The number of ways can be large, so output it modulo $998244353$. **Note:** The input and output are large, so use fast input-output meth
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