For this Question: There are X seats in the assembly. To form a government, an alliance should win </b> more than (X/2) (rounded down, for example, if there are 231 seats to win will require  231/2 = 115 seats) </b> seats. 

There are three alliances formed for the election:
NDA => BJP + LJP
UPA => Congress + Shiv sena
Left => RJD + JDU + SP

Given the number of seats won by each party, find out if it is possible for any alliance to form the government. If it is possible, then print the name of the alliance that can form the government. 

NOTE: it is possible that some seats are won by Independent candidates who don't belong to any party.First line will contains X, total number of seats.
Next line will contain 7 integers denoting the number of seats won by BJP, LJP, Congress, Shiv sena, RJD, JDU and SP respectively. 

<b>Constraints</b>
1 &le; X &le; 10<sup>18</sup>
sum of seats won by all party &le; XOutput "No government" if impossible, to form a government by any alliance.
If possible, print the alliance's name, i. e NDA, UPA, or Left.Input:
13
2 1 1 0 4 3 0

Output:
Left

Explanation:
NDA => BJP + LJP = 2 + 1 => 3
UPA => Congress + Shiv sena = 1 + 0 => 1
Left => RJD + JDU + SP => 4 + 3 + 0 => 7
1 seat is won by an independent candidate.

To form a government, an alliance needs more than (13/2) = 6 seats. The left alliance has 7 seats.


Input:
20
4 3 1 1 1 3 2

Output:
No government 

Explanation:
NDA => BJP + LJP = 4 + 3 => 7
UPA => Congress + Shiv sena = 1 + 1 => 2
Left => RJD + JDU + SP => 1 + 3 + 2 => 6
5 seats are won by independent candidates.

To form a government, an alliance needs more than (20/2) = 10 seats, i.e., at least 11 seats. 
No alliance has that many seats., I have written this Solution Code: import java.io.*;
import java.util.*;



public class Main {
     
   
    public static void main(String[] args) {
        
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        
        Long x=Long.parseLong(in.next());
        
        Long b=Long.parseLong(in.next());
        Long l=Long.parseLong(in.next());
        
        Long c=Long.parseLong(in.next());
        Long s=Long.parseLong(in.next());
        
        Long r=Long.parseLong(in.next());
        Long j=Long.parseLong(in.next());
        Long sp=Long.parseLong(in.next());
        
        long y=b+l+c+s+r+j+sp;
        
        x=x/2 + 1;
        
        if((b+l) >= x){
            out.print("NDA");
        }
        else if((c+s) >= x){
            out.print("UPA");
        }
        else if((r+j+sp) >= x){
            out.print("Left");
        }
        else{
            out.print("No government");
        }
        
        out.close();
        
    }

    
    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;
        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void println(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

        public void println(int i) {
            writer.println(i);
        }

    }
}
, In this Programming Language: Java, Now tell me if this Code is compilable or not?