← All problemsSign in

Odd Sum Partition

CodeChefRating 3426Open on judge ↗

You are given a string $A$ of length $N$, consisting of zeroes and ones. You want to partition it into blocks consisting of consecutive indices such that each block has an odd sum and has length at most $m$. For each $m$ from $1$ to $N$, find the minimum number of blocks required, or report that it is impossible. ###Input - The first line contains an integer $T$, the number of test cases. Ea

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start