cf1228b专题

cf1228B B. Filling the Grid

Suppose there is a ℎ×? grid consisting of empty or full cells. Let’s make some definitions: ?? is the number of consecutive full cells connected to the left side in the ?-th row (1≤?≤ℎ). In particula