Problem 3495 · Hard

Minimum Operations to Make Array Elements Zero

Each query describes an array of the consecutive integers from l to r, and an operation picks two elements and floor-divides both by 4. Find the fewest operations that bring each array to all zeros, and return the total across queries.

Open the interactive visualisation