For this Question: Given a positive integer <b>N</b> and <b>Q</b> queries. For every query, you will be given <b>start</b> and <b>end</b> point and a positive integer <b>K</b> which is going to be added to the numbers in the range(from start to end) as per query. Once you are done with all the queries, you need to print the maximum number obtained after updation.

Note:-Initially the array is-<b> 1,2,3,....N </b>First line of input contains number of testcases T. For each testcase, first line contains N and Q( number of queries). Q lines after this will contain three integers  each line has start, end and K, where start is the starting index of the range, end is the ending index of the range and K is the value to add with the elements in the range.

<b>Note:</b> Array is 1-based index

<b>Constraints:</b>
1 <= T <= 100
1 <= N, K <= 10^5
1 <= Q <= 10^5
1 <= start <= end <= N
Sum of N, Q for every test case is less than or equal to 10^5For each testcase, you need to print the maximum.Input:
1
5 3
1 2 5
2 5 10
3 4 5

Output:
19

Explanation:
Testcase 1: After the queries, we have elements added in the given ranges, so updated numbers from 1 to 5 will be as 6, 17, 18, 19, 15. Thus maximum after updation comes as19., I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
    public static void abc(int[] a,int s,int e,int k)
    {
        for(int i=s;i<e;i++)
            a[i]+=k;
    }
	public static void main (String[] args) throws IOException
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        int t=Integer.parseInt(br.readLine());
        for(int z=0;z<t;z++)
        {
            String[] s=br.readLine().split(" ");
            int n=Integer.parseInt(s[0]);
            int q=Integer.parseInt(s[1]);
            int[] arr=new int[n];
            for(int i=0;i<n;i++)
                arr[i]=i+1;
            for(int i=0;i<q;i++)
            {
                String[] ss=br.readLine().split(" ");
                int st=Integer.parseInt(ss[0]);
                int en=Integer.parseInt(ss[1]);
                int k=Integer.parseInt(ss[2]);
                abc(arr,st-1,en,k);
            }
            int max=-9999999;
            for(int i=0;i<n;i++)
            {
                if(arr[i]>max)
                    max=arr[i];
            }

            System.out.println(max);
        }
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?