Maximum Number Of 1's Row

easy
Given a boolean 2D array, where each row is sorted. Find the row with the maximum number of 1s.

Input Format

Input is managed for you

Output Format

Output is managed for you

Constraints

 1 <= n, m <= 40
0 <= mat[][] <= 1

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
4 3
0 1 1
0 0 1
1 1 1
0 0 1
Output
2
Previous
First Bad Version
Next
Largest Number

Related Questions