(Challenge) Chef and Palindromes
Chef loves palindromes! Chef loves them so much he can see palindromes anywhere! Even in this problem. Chef has N sequences of white cells. For each i (1 ≤ i ≤ N), the i-th sequence is formed by li cells; Chef has to paint exactly bi of these cells black. After painting those cells, Chef writes down the lengths of all white blocks (maximum contiguous subsequences of white cells) from left to rig
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