tiles: 'B' is a black tile and 'W' is a white one. One operation repaints any white tile black.
What is the minimum number of operations needed so that the path contains run black tiles in a row somewhere?tiles="BWBBWWB", run=4 → 1
The stretch "BWBB" has one white tile; repaint it and you have four black tiles in a row.
tiles="WWBW", run=1 → 0
There is already a black tile, so nothing needs repainting.
tiles="WWW", run=3 → 3
tiles is 'W' or 'B'tiles="BWBBWWB", run=4
1
Run checks the first 3 tests in your browser. Submit checks all 104 tests on the server, hidden ones included.