For this Question: You are given a grid having N*M elements. Find the index of the row (1-base indexing) which has the maximum sum of elements.
Note: if more than two rows have the same sum of elements, then return the smallest index.The first line of the input contains two integers N and M.
The next N lines each contain M space separated integers.

<b>Constraints:</b>
1 <= N, M <= 10<sup>3</sup>
1 <= A<sub>i, j</sub> <= 10<sup>9Print the index of the row (1-base indexing) which has the maximum sum of elements.Sample Input:
4 3
3 4 2
5 1 7
2 8 1
2 3 3
Sample Output:
2
<b>Explaination:</b>
Row number 2 has sum = 5 + 1 + 7 = 13 which is the maximum among all rows., I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
     static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(
                new InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() { return Integer.parseInt(next()); }

        long nextLong() { return Long.parseLong(next()); }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try {
                if(st.hasMoreTokens()){
                    str = st.nextToken("\n");
                }
                else{
                    str = br.readLine();
                }
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
    public static void main (String[] args) {

      FastReader sc=new FastReader();
      int n=sc.nextInt();
      int m=sc.nextInt();
        int arr[][]=new int[n][m];
        for(int i=0; i<n; i++)
        {
            for(int j=0; j<m; j++)
            {
                arr[i][j]= sc.nextInt();
            }
        }
       long maxsum=0;
        int index=0;
        for(int i=0; i<n; i++)
        {
            long sum=0;
            for(int j=0; j<m; j++)
            {
              sum += arr[i][j];
            }
            if(sum > maxsum)
            {
                maxsum=sum;
                index=i+1;
            }
        }
        System.out.print(index);
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?