Problem Statement
Given a binary matrix representing cinema seats (0=Empty, 1=Occupied), find the length of the longest consecutive sequence of empty seats (0s) in any single row.
DEMO-C-32 โข Programming in C
Given a binary matrix representing cinema seats (0=Empty, 1=Occupied), find the length of the longest consecutive sequence of empty seats (0s) in any single row.
Input: Dimensions N M followed by the matrix elements.
Output: The formatted result as specified.
Submit runs every public testcase in this browser. Results and code never leave this device.
6 8 1 1 0 0 0 0 0 1 1 0 1 1 0 1 1 0 0 1 0 1 0 0 0 0 0 1 1 1 1 0 0 1 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 1
5
7 3 0 1 1 0 1 0 1 1 0 0 0 0 1 0 1 0 1 0 1 1 1
3
5 8 1 1 1 1 1 1 1 0 0 1 0 1 0 1 1 1 0 0 0 0 1 1 1 1 1 1 0 1 0 1 0 0 1 1 0 0 1 1 1 0
4
8 5 0 1 0 1 0 1 1 1 0 1 0 0 0 0 1 0 1 0 0 1 1 0 0 1 1 1 0 0 0 0 1 0 1 0 1 1 1 0 1 1
4
C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.
/workspace/question