Question:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main
{
	static int MOD = (int) 1e9 + 7;

	static class FenwickTree
	{
		// bit[1] ~ bit[n]
		long[] bit;   // = new long[n+1];

		public FenwickTree(int n)
		{
			bit = new long[n+1];
		}

		// bit[1] + ... + bit[r]
		long sum(int r)
		{
			long s = 0;
			for( int i=r; i>0; i-=(i & -i) )
			{
				s += bit[i];
			}
			return s;
		}

		void add(int idx, int x)
		{
			for( int i=idx; i<bit.length; i+=(i & -i) )
			{
				bit[i] += x;
			}
		}
	}

	static class UnionFind
	{
		int[] par;
		int[] n_nodes;
		int max = 1;

		public UnionFind(int n)
		{
			par = new int[n];
			n_nodes = new int[n];
			for( int i=0; i<n; i++ )
			{
				par[i] = i;
				n_nodes[i] = 1;
			}
		}

		int root(int x)
		{
			if( par[x] == x ) return x;
			return par[x] = root(par[x]);
		}

		void unite(int x, int y)
		{
			int rx = root(x);
			int ry = root(y);
			if( rx == ry ) return;
			par[rx] = ry;
			n_nodes[ry] += n_nodes[rx];
			max = Math.max(max, n_nodes[ry]);
		}

		boolean same(int x, int y)
		{
			int rx = root(x);
			int ry = root(y);
			return rx == ry;
		}
	}

	static class Calc
	{
		static int gcd(int a, int b)
		{
			if( a == 0 )
			{
				return b;
			}
			return gcd(b%a, a);
		}

		static int ceilInt(int a, int b)
		{
			return (a%b==0 ? a/b : a/b+1);
		}

		static long power(long x, int n)
		{
			if( n == 0 )
			{
				return 1;
			}

			if( n % 2 == 0 )
			{
				long X = (x * x) % MOD;
				return power(X, n/2);
			}
			else
			{
				return (x * power(x, n-1)) % MOD;
			}
		}
	}

	static class MyScanner
	{
		private BufferedReader in;
		private StringTokenizer st;

		public MyScanner(InputStream stream)
		{
			in = new BufferedReader(new InputStreamReader(stream));
		}

		public String next()
		{
			while( st == null || !st.hasMoreTokens() )
			{
				try
				{
					String rl = in.readLine();
					if( rl == null )
					{
						return null;
					}
					st = new StringTokenizer(rl);
				}
				catch( IOException e )
				{
					return null;
				}
			}
			return st.nextToken();
		}

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

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

	static interface Solver
	{
		public void solve(int testNumber, MyScanner in, PrintWriter out);
	}

	static class F implements Solver
	{
		public void solve(int testNumber, MyScanner in, PrintWriter out)
		{
		}
	}

	static class E implements Solver
	{
		public void solve(int testNumber, MyScanner in, PrintWriter out)
		{
		}
	}

	static class D implements Solver
	{
		public void solve(int testNumber, MyScanner in, PrintWriter out)
		{
		}
	}

	static class C implements Solver
	{
		public void solve(int testNumber, MyScanner in, PrintWriter out)
		{
			int n = in.nextInt();
			long ans = 0;
			for( int i=1; i<n; i++ )
			{
				int sub = n - i;
				int sqrt = (int) Math.sqrt((double) sub);
				for( int k=1; k<=sqrt; k++ )
				{
					if( sub % k == 0 )
					{
						ans += 2;
					}
				}
				if( sqrt * sqrt == sub )
				{
					ans--;
				}
			}
			out.println(ans);
		}
	}

	static class B implements Solver
	{
		public void solve(int testNumber, MyScanner in, PrintWriter out)
		{
			int n = in.nextInt();
			int cnt = 0;
			String judge = "No";
			for( int i=0; i<n; i++ )
			{
				int a = in.nextInt();
				int b = in.nextInt();
				if( a == b )
				{
					cnt++;
					if( cnt == 3 )
					{
						judge = "Yes";
					}
				}
				else
				{
					cnt = 0;
				}
			}
			out.println(judge);
		}
	}

	static class A implements Solver
	{
		public void solve(int testNumber, MyScanner in, PrintWriter out)
		{
			String s = in.next();
			if( s.endsWith("s") )
			{
				s += "es";
			}
			else
			{
				s += "s";
			}
			out.println(s);
		}
	}

	public static void main(String[] args)
	{
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		MyScanner in = new MyScanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		Solver solver = new C();
		solver.solve(1, in, out);
		out.close();
	}
}

Choices:
- No abnormally found
- Time Limit Exceeded
- Compile Error
- Runtime Error


Question:
codeforces
atcoder

Choices:
- No abnormally found
- Compile Error
- Internal error
- Time Limit Exceeded


Question:
import java.util.Scanner;
public class Main {
	static void swap(int[] a,int idx1 , int idx2) {
		int t = a[idx1];	a[idx1]= a[idx2];	a[idx2] = t;
	}
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		int K = stdIn.nextInt();
		int[] H = new int[N];
		for(int i= 0; i<N ; i++) {
			H[i] = stdIn.nextInt();
		}
		for(int i=0 ; i<N-1 ; i++) {
			for(int j= N-1 ; j>i ; j--) {
				if(H[j-1]>H[j]) {
					swap(H, j-1 , j);
				}
			}
		}
		long sum = 0;
		for(int i= N-1-K ; i>=0 ; i--) {
			sum += H[i];
		}
		System.out.println(sum);
	}
}

Choices:
- Time Limit Exceeded
- Internal error
- Memory Limit Exceeded
- Runtime Error


Question:
import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		long[] x = new long[N];
		long[] y = new long[N];
		for(int i =  0; i < N; i++){
			x[i] = sc.nextLong();
			y[i] = sc.nextLong();
		}

		long max = 0;
		for(int i = 0; i < N-1; i++){
			for(int j = i+1; j < N; j++){
				long dis = Math.abs(x[i]-x[j]) + Math.abs(y[i]-y[j]);
				max = Math.max(max, dis);
			}
		}
		System.out.println(max);
	}
}

Choices:
- Memory Limit Exceeded
- No abnormally found
- Compile Error
- Time Limit Exceeded


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	int N=sc.nextInt();

      	if(N%2=0){
         System.out.print(N/2);
      }else{
         System.out.print((N/2)+1);
      }
   }
}

Choices:
- Compile Error
- Internal error
- Runtime Error
- Memory Limit Exceeded


Question:
import java.util.Scanner;

public class MyClass {
    public static void main(String args[]) {
      Scanner in = new Scanner(System.in);
      int n = in.nextInt(), m = in.nextInt();
      int ans = (n*n-n+m*m-m)/2;
      System.out.println(ans);
    }
}

Choices:
- Memory Limit Exceeded
- No abnormally found
- Time Limit Exceeded
- Compile Error


Question:
import java.util.*;
import java.io.*;
import java.text.*;
public class Main{
    //SOLUTION BEGIN
    void pre() throws Exception{}
    void solve(int TC) throws Exception{
        int h = ni(), w = ni();
        TreeSet<Integer>[] row = new TreeSet[h], col = new TreeSet[w];
        for(int i = 0; i< h; i++){
            row[i] = new TreeSet<>();
            row[i].add(-1);
            row[i].add(w);
        }
        for(int i = 0; i< w; i++){
            col[i] = new TreeSet<>();
            col[i].add(-1);
            col[i].add(h);
        }

        for(int i = 0; i< h; i++){
            String s = n();
            for(int j = 0; j< w; j++){
                if(s.charAt(j)=='#'){
                    row[i].add(j);
                    col[j].add(i);
                }
            }
        }
        int ans = 0;
        for(int i = 0; i< h; i++)
            for(int j = 0; j< w; j++){
                if(row[i].contains(j))continue;
                ans = Math.max(ans, row[i].ceiling(j)-row[i].floor(j)+col[j].ceiling(i)-col[j].floor(i)-3);
            }
        pn(ans);
    }
    //SOLUTION END
    void hold(boolean b)throws Exception{if(!b)throw new Exception("Hold right there, Sparky!");}
    long mod = (long)1000000007, IINF = (long)1e18;
    final int INF = (int)1e9, MX = (int)2e5+5;
    DecimalFormat df = new DecimalFormat("0.00000000000");
    double PI = 3.141592653589793238462643383279502884197169399, eps = 1e-8;
    static boolean multipleTC = false, memory = false;
    FastReader in;PrintWriter out;
    void run() throws Exception{
        in = new FastReader();
        out = new PrintWriter(System.out);
        //Solution Credits: Taranpreet Singh
        int T = (multipleTC)?ni():1;
        pre();for(int t = 1; t<= T; t++)solve(t);
        out.flush();
        out.close();
    }
    public static void main(String[] args) throws Exception{
        if(memory)new Thread(null, new Runnable() {public void run(){try{new Main().run();}catch(Exception e){e.printStackTrace();}}}, "1", 1 << 28).start();
        else new Main().run();
    }
    long gcd(long a, long b){return (b==0)?a:gcd(b,a%b);}
    int gcd(int a, int b){return (b==0)?a:gcd(b,a%b);}
    int bit(long n){return (n==0)?0:(1+bit(n&(n-1)));}
    void p(Object o){out.print(o);}
    void pn(Object o){out.println(o);}
    void pni(Object o){out.println(o);out.flush();}
    String n()throws Exception{return in.next();}
    String nln()throws Exception{return in.nextLine();}
    int ni()throws Exception{return Integer.parseInt(in.next());}
    long nl()throws Exception{return Long.parseLong(in.next());}
    double nd()throws Exception{return Double.parseDouble(in.next());}

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

        public FastReader(String s) throws Exception{
            br = new BufferedReader(new FileReader(s));
        }

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

        String nextLine() throws Exception{
            String str = "";
            try{
                str = br.readLine();
            }catch (IOException e){
                throw new Exception(e.toString());
            }
            return str;
        }
    }
}

Choices:
- Internal error
- Time Limit Exceeded
- Runtime Error
- Compile Error


Question:
import java.util.*;
import java.io.*;
import java.text.*;

class AtCoder_AGC01_A{
    //SOLUTION BEGIN
    //Into the Hardware Mode
    void pre() throws Exception{}
    void solve(int TC) throws Exception{
        int N = ni();
        int[] A = new int[N*2];
        for(int i = 0; i< N*2; i++)A[i] = ni();
        int ans = 0;
        Arrays.sort(A);
        for(int i = 0; i< 2*N; i+= 2)ans += A[i];
        pn(ans);
    }
    //SOLUTION END
    void hold(boolean b)throws Exception{if(!b)throw new Exception("Hold right there, Sparky!");}
    void exit(boolean b){if(!b)System.exit(0);}
    static void dbg(Object... o){System.err.println(Arrays.deepToString(o));}
    final long IINF = (long)1e17;
    final int INF = (int)1e9+2;
    DecimalFormat df = new DecimalFormat("0.00000000000");
    double PI = 3.141592653589793238462643383279502884197169399, eps = 1e-8;
    static boolean multipleTC = false, memory = true, fileIO = false;
    FastReader in;PrintWriter out;
    void run() throws Exception{
        long ct = System.currentTimeMillis();
        if (fileIO) {
            in = new FastReader("");
            out = new PrintWriter("");
        } else {
            in = new FastReader();
            out = new PrintWriter(System.out);
        }
        //Solution Credits: Taranpreet Singh
        int T = multipleTC? ni():1;
        pre();
        for (int t = 1; t <= T; t++) solve(t);
        out.flush();
        out.close();
        System.err.println(System.currentTimeMillis() - ct);
    }
    public static void main(String[] args) throws Exception{
        if(memory)new Thread(null, new Runnable() {public void run(){try{new AtCoder_AGC01_A().run();}catch(Exception e){e.printStackTrace();}}}, "1", 1 << 28).start();
        else new AtCoder_AGC01_A().run();
    }
    int[][] make(int n, int e, int[] from, int[] to, boolean f){
        int[][] g = new int[n][];int[]cnt = new int[n];
        for(int i = 0; i< e; i++){
            cnt[from[i]]++;
            if(f)cnt[to[i]]++;
        }
        for(int i = 0; i< n; i++)g[i] = new int[cnt[i]];
        for(int i = 0; i< e; i++){
            g[from[i]][--cnt[from[i]]] = to[i];
            if(f)g[to[i]][--cnt[to[i]]] = from[i];
        }
        return g;
    }
    int[][][] makeS(int n, int e, int[] from, int[] to, boolean f){
        int[][][] g = new int[n][][];int[]cnt = new int[n];
        for(int i = 0; i< e; i++){
            cnt[from[i]]++;
            if(f)cnt[to[i]]++;
        }
        for(int i = 0; i< n; i++)g[i] = new int[cnt[i]][];
        for(int i = 0; i< e; i++){
            g[from[i]][--cnt[from[i]]] = new int[]{to[i], i, 0};
            if(f)g[to[i]][--cnt[to[i]]] = new int[]{from[i], i, 1};
        }
        return g;
    }
    int find(int[] set, int u){return set[u] = (set[u] == u?u:find(set, set[u]));}
    int digit(long s){int ans = 0;while(s>0){s/=10;ans++;}return ans;}
    long gcd(long a, long b){return (b==0)?a:gcd(b,a%b);}
    int gcd(int a, int b){return (b==0)?a:gcd(b,a%b);}
    int bit(long n){return (n==0)?0:(1+bit(n&(n-1)));}
    void p(Object... o){for(Object oo:o)out.print(oo+" ");}
    void pn(Object... o){for(Object oo:o)out.print(oo+" ");out.println();}
    void pni(Object... o){for(Object oo:o)out.print(oo+" ");out.println();out.flush();}
    String n()throws Exception{return in.next();}
    String nln()throws Exception{return in.nextLine();}
    int ni()throws Exception{return Integer.parseInt(in.next());}
    long nl()throws Exception{return Long.parseLong(in.next());}
    double nd()throws Exception{return Double.parseDouble(in.next());}

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

        public FastReader(String s) throws Exception{
            br = new BufferedReader(new FileReader(s));
        }

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

        String nextLine() throws Exception{
            String str;
            try{
                str = br.readLine();
            }catch (IOException e){
                throw new Exception(e.toString());
            }
            return str;
        }
    }
}

Choices:
- No abnormally found
- Runtime Error
- Compile Error
- Internal error


Question:
import java.util.*;
import java.io.*;
import java.text.*;

class AtCoder_AGC01_C{
    //SOLUTION BEGIN
    //Into the Hardware Mode
    void pre() throws Exception{}
    void solve(int TC) throws Exception{
        int N = ni(), K = ni();
        int[] from = new int[N-1], to = new int[N-1];
        for(int i = 0; i< N-1; i++){
            from[i] = ni()-1;
            to[i] = ni()-1;
        }
        int[][] g = make(N, N-1, from, to, true);
        int[][] DP = new int[N][];
        dfs(DP, g, new int[N], 0,-1, K);
        int ans = 0;
        for(int x:DP[0])ans = Math.max(ans, x);
        pn(N-ans);
    }
    void dfs(int[][] DP, int[][] g, int[] dep, int u, int p, int K){

        for(int v:g[u])if(v != p){
            dfs(DP, g, dep, v, u, K);
            dep[u] = Math.max(dep[u], 1+dep[v]);
        }
        int[] dp = new int[1];
        dp[0] = 1;
        int maxD = 0;
        for(int v:g[u]){
            if(v == p)continue;
            maxD = Math.max(maxD, 1+dep[v]);
            int[] ndp = new int[1+maxD];
            for(int d1 = 0; d1 < dp.length; d1++){
                for(int d2 = 0; d2 < DP[v].length && d1+d2 <= K; d2++){
                    ndp[Math.max(d1, 1+d2)] += DP[v][d2];
                }
            }
            dp = ndp;
        }
        DP[u] = dp;
    }
    //SOLUTION END
    void hold(boolean b)throws Exception{if(!b)throw new Exception("Hold right there, Sparky!");}
    void exit(boolean b){if(!b)System.exit(0);}
    static void dbg(Object... o){System.err.println(Arrays.deepToString(o));}
    final long IINF = (long)1e17;
    final int INF = (int)1e9+2;
    DecimalFormat df = new DecimalFormat("0.00000000000");
    double PI = 3.141592653589793238462643383279502884197169399, eps = 1e-8;
    static boolean multipleTC = false, memory = true, fileIO = false;
    FastReader in;PrintWriter out;
    void run() throws Exception{
        long ct = System.currentTimeMillis();
        if (fileIO) {
            in = new FastReader("");
            out = new PrintWriter("");
        } else {
            in = new FastReader();
            out = new PrintWriter(System.out);
        }
        //Solution Credits: Taranpreet Singh
        int T = multipleTC? ni():1;
        pre();
        for (int t = 1; t <= T; t++) solve(t);
        out.flush();
        out.close();
        System.err.println(System.currentTimeMillis() - ct);
    }
    public static void main(String[] args) throws Exception{
        if(memory)new Thread(null, new Runnable() {public void run(){try{new Main().run();}catch(Exception e){e.printStackTrace();}}}, "1", 1 << 28).start();
        else new Main().run();
    }
    int[][] make(int n, int e, int[] from, int[] to, boolean f){
        int[][] g = new int[n][];int[]cnt = new int[n];
        for(int i = 0; i< e; i++){
            cnt[from[i]]++;
            if(f)cnt[to[i]]++;
        }
        for(int i = 0; i< n; i++)g[i] = new int[cnt[i]];
        for(int i = 0; i< e; i++){
            g[from[i]][--cnt[from[i]]] = to[i];
            if(f)g[to[i]][--cnt[to[i]]] = from[i];
        }
        return g;
    }
    int[][][] makeS(int n, int e, int[] from, int[] to, boolean f){
        int[][][] g = new int[n][][];int[]cnt = new int[n];
        for(int i = 0; i< e; i++){
            cnt[from[i]]++;
            if(f)cnt[to[i]]++;
        }
        for(int i = 0; i< n; i++)g[i] = new int[cnt[i]][];
        for(int i = 0; i< e; i++){
            g[from[i]][--cnt[from[i]]] = new int[]{to[i], i, 0};
            if(f)g[to[i]][--cnt[to[i]]] = new int[]{from[i], i, 1};
        }
        return g;
    }
    int find(int[] set, int u){return set[u] = (set[u] == u?u:find(set, set[u]));}
    int digit(long s){int ans = 0;while(s>0){s/=10;ans++;}return ans;}
    long gcd(long a, long b){return (b==0)?a:gcd(b,a%b);}
    int gcd(int a, int b){return (b==0)?a:gcd(b,a%b);}
    int bit(long n){return (n==0)?0:(1+bit(n&(n-1)));}
    void p(Object... o){for(Object oo:o)out.print(oo+" ");}
    void pn(Object... o){for(Object oo:o)out.print(oo+" ");out.println();}
    void pni(Object... o){for(Object oo:o)out.print(oo+" ");out.println();out.flush();}
    String n()throws Exception{return in.next();}
    String nln()throws Exception{return in.nextLine();}
    int ni()throws Exception{return Integer.parseInt(in.next());}
    long nl()throws Exception{return Long.parseLong(in.next());}
    double nd()throws Exception{return Double.parseDouble(in.next());}

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

        public FastReader(String s) throws Exception{
            br = new BufferedReader(new FileReader(s));
        }

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

        String nextLine() throws Exception{
            String str;
            try{
                str = br.readLine();
            }catch (IOException e){
                throw new Exception(e.toString());
            }
            return str;
        }
    }
}

Choices:
- Internal error
- Compile Error
- No abnormally found
- Time Limit Exceeded


Question:
import java.util.*;
import java.io.*;
import java.text.*;

class AtCoder_AGC01_C{
    //SOLUTION BEGIN
    //Into the Hardware Mode
    void pre() throws Exception{}
    void solve(int TC) throws Exception{
        int N = ni(), K = ni();
        int[] from = new int[N-1], to = new int[N-1];
        for(int i = 0; i< N-1; i++){
            from[i] = ni()-1;
            to[i] = ni()-1;
        }
        int[][] g = make(N, N-1, from, to, true);
        int[][] DP = new int[N][];
        dfs(DP, g, new int[N], 0,-1, K);
        int ans = 0;
        for(int x:DP[0])ans = Math.max(ans, x);
        pn(N-ans);
    }
    void dfs(int[][] DP, int[][] g, int[] dep, int u, int p, int K){

        for(int v:g[u])if(v != p){
            dfs(DP, g, dep, v, u, K);
            dep[u] = Math.max(dep[u], 1+dep[v]);
        }
        int[] dp = new int[1];
        dp[0] = 1;
        int maxD = 0;
        for(int v:g[u]){
            if(v == p)continue;
            maxD = Math.max(maxD, 1+dep[v]);
            int[] ndp = new int[1+maxD];
            for(int d1 = 0; d1 < dp.length; d1++){
                for(int d2 = 0; d2 < DP[v].length && d1+d2 <= K; d2++){
                    ndp[Math.max(d1, 1+d2)] += DP[v][d2];
                }
            }
            dp = ndp;
        }
        DP[u] = dp;
    }
    //SOLUTION END
    void hold(boolean b)throws Exception{if(!b)throw new Exception("Hold right there, Sparky!");}
    void exit(boolean b){if(!b)System.exit(0);}
    static void dbg(Object... o){System.err.println(Arrays.deepToString(o));}
    final long IINF = (long)1e17;
    final int INF = (int)1e9+2;
    DecimalFormat df = new DecimalFormat("0.00000000000");
    double PI = 3.141592653589793238462643383279502884197169399, eps = 1e-8;
    static boolean multipleTC = false, memory = true, fileIO = false;
    FastReader in;PrintWriter out;
    void run() throws Exception{
        long ct = System.currentTimeMillis();
        if (fileIO) {
            in = new FastReader("");
            out = new PrintWriter("");
        } else {
            in = new FastReader();
            out = new PrintWriter(System.out);
        }
        //Solution Credits: Taranpreet Singh
        int T = multipleTC? ni():1;
        pre();
        for (int t = 1; t <= T; t++) solve(t);
        out.flush();
        out.close();
        System.err.println(System.currentTimeMillis() - ct);
    }
    public static void main(String[] args) throws Exception{
        if(memory)new Thread(null, new Runnable() {public void run(){try{new AtCoder_AGC01_C().run();}catch(Exception e){e.printStackTrace();}}}, "1", 1 << 28).start();
        else new AtCoder_AGC01_C().run();
    }
    int[][] make(int n, int e, int[] from, int[] to, boolean f){
        int[][] g = new int[n][];int[]cnt = new int[n];
        for(int i = 0; i< e; i++){
            cnt[from[i]]++;
            if(f)cnt[to[i]]++;
        }
        for(int i = 0; i< n; i++)g[i] = new int[cnt[i]];
        for(int i = 0; i< e; i++){
            g[from[i]][--cnt[from[i]]] = to[i];
            if(f)g[to[i]][--cnt[to[i]]] = from[i];
        }
        return g;
    }
    int[][][] makeS(int n, int e, int[] from, int[] to, boolean f){
        int[][][] g = new int[n][][];int[]cnt = new int[n];
        for(int i = 0; i< e; i++){
            cnt[from[i]]++;
            if(f)cnt[to[i]]++;
        }
        for(int i = 0; i< n; i++)g[i] = new int[cnt[i]][];
        for(int i = 0; i< e; i++){
            g[from[i]][--cnt[from[i]]] = new int[]{to[i], i, 0};
            if(f)g[to[i]][--cnt[to[i]]] = new int[]{from[i], i, 1};
        }
        return g;
    }
    int find(int[] set, int u){return set[u] = (set[u] == u?u:find(set, set[u]));}
    int digit(long s){int ans = 0;while(s>0){s/=10;ans++;}return ans;}
    long gcd(long a, long b){return (b==0)?a:gcd(b,a%b);}
    int gcd(int a, int b){return (b==0)?a:gcd(b,a%b);}
    int bit(long n){return (n==0)?0:(1+bit(n&(n-1)));}
    void p(Object... o){for(Object oo:o)out.print(oo+" ");}
    void pn(Object... o){for(Object oo:o)out.print(oo+" ");out.println();}
    void pni(Object... o){for(Object oo:o)out.print(oo+" ");out.println();out.flush();}
    String n()throws Exception{return in.next();}
    String nln()throws Exception{return in.nextLine();}
    int ni()throws Exception{return Integer.parseInt(in.next());}
    long nl()throws Exception{return Long.parseLong(in.next());}
    double nd()throws Exception{return Double.parseDouble(in.next());}

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

        public FastReader(String s) throws Exception{
            br = new BufferedReader(new FileReader(s));
        }

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

        String nextLine() throws Exception{
            String str;
            try{
                str = br.readLine();
            }catch (IOException e){
                throw new Exception(e.toString());
            }
            return str;
        }
    }
}

Choices:
- Time Limit Exceeded
- Runtime Error
- Compile Error
- Internal error


Question:
import java.util.*;
import java.io.*;
import java.text.*;

class AtCoder_AGC01_D{
    //SOLUTION BEGIN
    //Into the Hardware Mode
    void pre() throws Exception{}
    void solve(int TC) throws Exception{
        int N = ni(), M = ni();
        int[] A = new int[M];
        for(int i = 0; i< M; i++)
            A[i] = ni();
        for(int i = 1; i+1 < M; i++){
            if(A[i]%2 == 1){
                if(A[0]%2 == 0){
                    int tmp = A[0];
                    A[0] = A[i];
                    A[i] = tmp;
                }else if(A[M-1]%2 == 0){
                    int tmp = A[M-1];
                    A[M-1] = A[i];
                    A[i] = tmp;
                }else{
                    pn("Impossible");
                    return;
                }
            }
        }
        if(M == 1){
            if(N == 1){
                pn(A[0]);
                pn(1);
                pn(A[0]);
            }else{
                pn(A[0]);
                pn(2);
                pn(A[0]-1, 1);
            }
            return;
        }
        ArrayList<Integer> list = new ArrayList<>();
        for(int i = 0; i< M; i++){
            if(i == 0)list.add(A[i]+1);
            else if(i+1 == M){if(A[i]>1)list.add(A[i]-1);}
            else list.add(A[i]);
        }
        for(int i:A)p(i);pn();
        pn(list.size());
        for(int i:list)p(i);pn();
    }
    //SOLUTION END
    void hold(boolean b)throws Exception{if(!b)throw new Exception("Hold right there, Sparky!");}
    void exit(boolean b){if(!b)System.exit(0);}
    static void dbg(Object... o){System.err.println(Arrays.deepToString(o));}
    final long IINF = (long)1e17;
    final int INF = (int)1e9+2;
    DecimalFormat df = new DecimalFormat("0.00000000000");
    double PI = 3.141592653589793238462643383279502884197169399, eps = 1e-8;
    static boolean multipleTC = false, memory = true, fileIO = false;
    FastReader in;PrintWriter out;
    void run() throws Exception{
        long ct = System.currentTimeMillis();
        if (fileIO) {
            in = new FastReader("");
            out = new PrintWriter("");
        } else {
            in = new FastReader();
            out = new PrintWriter(System.out);
        }
        //Solution Credits: Taranpreet Singh
        int T = multipleTC? ni():1;
        pre();
        for (int t = 1; t <= T; t++) solve(t);
        out.flush();
        out.close();
        System.err.println(System.currentTimeMillis() - ct);
    }
    public static void main(String[] args) throws Exception{
        if(memory)new Thread(null, new Runnable() {public void run(){try{new AtCoder_AGC01_D().run();}catch(Exception e){e.printStackTrace();}}}, "1", 1 << 28).start();
        else new AtCoder_AGC01_D().run();
    }
    int[][] make(int n, int e, int[] from, int[] to, boolean f){
        int[][] g = new int[n][];int[]cnt = new int[n];
        for(int i = 0; i< e; i++){
            cnt[from[i]]++;
            if(f)cnt[to[i]]++;
        }
        for(int i = 0; i< n; i++)g[i] = new int[cnt[i]];
        for(int i = 0; i< e; i++){
            g[from[i]][--cnt[from[i]]] = to[i];
            if(f)g[to[i]][--cnt[to[i]]] = from[i];
        }
        return g;
    }
    int[][][] makeS(int n, int e, int[] from, int[] to, boolean f){
        int[][][] g = new int[n][][];int[]cnt = new int[n];
        for(int i = 0; i< e; i++){
            cnt[from[i]]++;
            if(f)cnt[to[i]]++;
        }
        for(int i = 0; i< n; i++)g[i] = new int[cnt[i]][];
        for(int i = 0; i< e; i++){
            g[from[i]][--cnt[from[i]]] = new int[]{to[i], i, 0};
            if(f)g[to[i]][--cnt[to[i]]] = new int[]{from[i], i, 1};
        }
        return g;
    }
    int find(int[] set, int u){return set[u] = (set[u] == u?u:find(set, set[u]));}
    int digit(long s){int ans = 0;while(s>0){s/=10;ans++;}return ans;}
    long gcd(long a, long b){return (b==0)?a:gcd(b,a%b);}
    int gcd(int a, int b){return (b==0)?a:gcd(b,a%b);}
    int bit(long n){return (n==0)?0:(1+bit(n&(n-1)));}
    void p(Object... o){for(Object oo:o)out.print(oo+" ");}
    void pn(Object... o){for(Object oo:o)out.print(oo+" ");out.println();}
    void pni(Object... o){for(Object oo:o)out.print(oo+" ");out.println();out.flush();}
    String n()throws Exception{return in.next();}
    String nln()throws Exception{return in.nextLine();}
    int ni()throws Exception{return Integer.parseInt(in.next());}
    long nl()throws Exception{return Long.parseLong(in.next());}
    double nd()throws Exception{return Double.parseDouble(in.next());}

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

        public FastReader(String s) throws Exception{
            br = new BufferedReader(new FileReader(s));
        }

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

        String nextLine() throws Exception{
            String str;
            try{
                str = br.readLine();
            }catch (IOException e){
                throw new Exception(e.toString());
            }
            return str;
        }
    }
}

Choices:
- No abnormally found
- Compile Error
- Time Limit Exceeded
- Internal error


Question:
import java.io.*;

class Main
{
    public static void main(String args[])throws Exception
    {
        BufferedReader bu=new BufferedReader(new InputStreamReader(System.in));
        String s[]=bu.readLine().split(" ");
        int a=Integer.parseInt(s[0]),b=Integer.parseInt(s[1]),c=Integer.parseInt(s[2]),d=Integer.parseInt(s[3]);
        int t=0;
        while(a>0 && c>0)
        {
            if(t==1) {a-=d; t=0;}
            else {t=1; c-=b;}
        }
        if(a>0) System.out.print("Yes");
        else System.out.print("No");
    }
}

Choices:
- Time Limit Exceeded
- Runtime Error
- No abnormally found
- Internal error


Question:
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int M = scanner.nextInt();
        int[] num = new int[N + 1];

        for (int i = 0 ; i < M ; i++) {
            int si = scanner.nextInt();
            int ci = scanner.nextInt();

            if (N > 1 && si == 1 && ci == 0) {
                System.out.println(-1);
                return;
            }
            if (num[si] != 0 && num[si] != ci) {
                System.out.println(-1);
                return;
            }
            num[si] = ci;
        }
        if (N > 1 && num[1] == 0) num[1] = 1;

        int ans = 0;
        int digit = 1;
        for (int i = N ; i > 0 ; i--) {
            ans += num[i] * digit;
            digit *= 10;
        }

        System.out.println(ans);
    }
}

Choices:
- Memory Limit Exceeded
- Internal error
- No abnormally found
- Runtime Error


Question:
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = Integer.parseInt(sc.next());
        int B = Integer.parseInt(sc.next());

      	if (A > B) {
          System.out.println(A * 2 - 1);
        else if (A == B) {
          System.out.println(A * 2);
        } else {
          System.out.println(B * 2 - 1);
        }
    }
}

Choices:
- Internal error
- Memory Limit Exceeded
- Compile Error
- No abnormally found


Question:
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();

        long aMin = Long.MAX_VALUE, aMax = Long.MIN_VALUE;
        long bMin = Long.MAX_VALUE, bMax = Long.MIN_VALUE;
        for(int n=0; n<N; n++){
            long x = sc.nextLong();
            long y = sc.nextLong();

            long a = x-y, b = x+y;
            System.err.printf("(%d,%d) -> [%d,%d]\n", x,y, a,b);
            aMin = Math.min(aMin, a);
            aMax = Math.max(aMax, a);
            bMin = Math.min(bMin, b);
            bMax = Math.max(bMax, b);
        }

        System.out.println(Math.max(aMax-aMin, bMax-bMin));
    }
}

Choices:
- Internal error
- Runtime Error
- Time Limit Exceeded
- Memory Limit Exceeded


Question:
import java.util.*;
import java.io.*;

public class Main {
    static long f(long min, long max){
        if(min>max) return f(max,min);
        if(min+10<max){
            long ans = 0;
            for(long x=min; x<=max; x++) ans ^= x;
            return ans;
        }

        long ans = 0;
        if((min&1) != 0){
            ans ^= min;
            min++;
        }
        if((max&1) == 0){
            ans ^= max;
            max--;
        }

        long pair = (max-min+1)/2;
        if(pair%2 != 0) ans ^= 1L;

        return ans;
    }
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        long min = sc.nextLong();
        long max = sc.nextLong();
        System.out.println(f(min, max));
    }
}

Choices:
- Internal error
- Runtime Error
- Time Limit Exceeded
- Memory Limit Exceeded


Question:
import java.util.*;
import java.io.*;

/*
   AtCoder contest code
   coder : yoichidon
 */

class Counter<T> extends HashMap<T,Integer>{
    public Counter(){
        super();
    }
    public Integer get(Object elm){
        return getOrDefault(elm,0);
    }
    public void add(T elm, int amount){
        if(!this.containsKey(elm)) put(elm, amount);
        else replace(elm, get(elm)+amount);
    }
    public void addOne(T elm){
        add(elm, 1);
    }
    public void remove(T elm, int amount){
        replace(elm, Math.max(get(elm)-amount, 0));
    }
    public void removeOne(T elm){
        remove(elm, 1);
    }
}

public class Main {
    public static void main(String[] args) {
        //whenever Tak hold, Aok can hold and end the game.
        //Therefore, Tak's best strategy is "Always move"!

        Scanner sc = new Scanner(System.in);
        int H = sc.nextInt();
        int W = sc.nextInt();
        int N = sc.nextInt();
        LinkedList<Integer>[] block = new LinkedList[H];
        for(int h=0; h<H; h++){
            block[h] = new LinkedList<>();
            block[h].add(W);
        }
        for(int n=0; n<N; n++) {
            int x = sc.nextInt()-1;
            int y = sc.nextInt()-1;
            block[y].add(x);
        }
        for(int h=0; h<H; h++) Collections.sort(block[h]);

        int ans = 1000000;
        int curX = 0;
        for(int h=0; h<H; h++){
            if(block[h].contains(curX+1)){
                ans = Math.min(ans, curX+1);
                break;
            }
            curX++;
            while(block[h].peek()<curX) block[h].poll();

            ans = Math.min(ans, block[h].peek());

            while(h<H-1 && block[h+1].contains(curX)) curX++;
            if(curX >= block[h].peek()) break;
        }

        System.out.println(ans);

    }
}

Choices:
- Memory Limit Exceeded
- Compile Error
- Runtime Error
- Time Limit Exceeded


Question:
import java.util.*;
import java.io.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int A = sc.nextInt();
        int B = sc.nextInt();

        System.out.printn((A-B)%2==0 ? "Alice" : "Borys");
    }
}

Choices:
- Memory Limit Exceeded
- Runtime Error
- Compile Error
- Internal error


Question:
import java.util.*;
import java.io.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int A = sc.nextInt();
        int B = sc.nextInt();

        System.out.printn((A-B)%2==0 ? "Alice" : "Borys")
    }
}

Choices:
- No abnormally found
- Runtime Error
- Internal error
- Compile Error


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
        if(s.charAt(s.length-1)=='s'){s+="es";}
        else{s+="s";}
		System.out.println(s);
	}
}

Choices:
- No abnormally found
- Internal error
- Memory Limit Exceeded
- Compile Error


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
        String t = sc.next();
        int ans = t.length();
        for(int i=0;i<=a-t.length();i++){int count = t.length();
                                         for(int j=0;j<t.length();j++){if(s.charAt(i+j)==t.charAt(j)){count--;}
                                                                      }
                            ans=Math.min(ans,count);
                                        }

		System.out.println(ans);
	}
}

Choices:
- Runtime Error
- Internal error
- Compile Error
- No abnormally found


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		String b = sc.next();
        String s = s.substring(0,1)+s.substring(2,4);
        int c = Integer.parseInt(s);
        long d = a*c;
		System.out.println(d/100);
	}
}

Choices:
- No abnormally found
- Compile Error
- Internal error
- Memory Limit Exceeded


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		String b = sc.next();
        String s = s.substring(0,1)+s.substring(2,4);
        int c = String.valueOf(s);
        long d = a*c;
		System.out.println(d/100);
	}
}

Choices:
- Compile Error
- No abnormally found
- Internal error
- Time Limit Exceeded


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		String b = sc.next();
        String s = s.substring(0,1)+s.substring(2,4);
        int c = String.ValueOf(s);
        long d = a*c;
		System.out.println(d/100);
	}
}

Choices:
- Internal error
- No abnormally found
- Time Limit Exceeded
- Compile Error


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		String b = sc.next();
        String s = s.substring(0,1)+s.substring(2,4);
        int c = (int)s;
        long d = a*c;
		System.out.println(d/100);
	}
}

Choices:
- Runtime Error
- No abnormally found
- Compile Error
- Internal error


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int [] min = new int [n];
        int [] max = new int [n];
        for(int i=0;i<n;i++){min[i] = sc.nextInt();
                             max[i] = sc.nextInt();
                            }
	    Arrays.sort(min);
        Arrays.sort(max);
        if(n%2==0){System.out.println(max[n/2-1]+max[n/2]-min[n/2-1]-min[n/2]+1);}
        else{System.out.println(max[n/2]-min[n/2]+1);}
	}
}

Choices:
- Runtime Error
- Compile Error
- Time Limit Exceeded
- No abnormally found


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int [] min = new int [n];
        int [] max = new int [n];
        for(int i=0;i<a;i++){min[i] = sc.nextInt();
                             max[i] = sc.nextInt();
                            }
	    Arrays.sort(min);
        Arrays.sort(max);
        if(n%2==0){System.out.println(max[n/2-1]+max[n/2]-min[n/2-1]-min[n/2]+1);}
        else{System.out.println(max[n/2]-min[n/2]+1);}
	}
}

Choices:
- Time Limit Exceeded
- Compile Error
- Internal error
- Runtime Error


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int [] min = new int [a];
        int [] max = new int [a];
        for(int i=0;i<a;i++){min[i] = sc.nextInt();
                             max[i] = sc.nextInt();
                            }
	    Arrays.sort(min);
        Arrays.sort(max);
        if(n%2==0){System.out.println(max[n/2-1]+max[n/2]-min[n/2-1]-min[n/2]+1);}
        else{System.out.println(max[n/2]-min[n/2]+1);}
	}
}

Choices:
- Compile Error
- Time Limit Exceeded
- Runtime Error
- Memory Limit Exceeded


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int [] min = new int [a];
        int [] max = new int [a];
        for(int i=0;i<a;i++){min[i] = sc.nextInt();
                             max[i] = sc.nextInt();
                            }
	    Arrays.sort(min);
        Arrays.sort(max);
        if(n%2==0){System.out.println(max[n/2-1]+max[n/2]-min[n/2-1]-min[n/2]+1)}
        else{System.out.println(max[n/2]-min[n/2]+1)}
	}
}

Choices:
- Memory Limit Exceeded
- No abnormally found
- Compile Error
- Runtime Error


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		String s = sc.next();
        if(s.charAt(2)==s.charAt(3) && s.charAt(4)==s.charAt(5){System.out.println("Yes");}
		else{System.out.println("No");}
	}
}

Choices:
- Internal error
- Compile Error
- Runtime Error
- No abnormally found


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		long [] in = new long [a];
        long [] in2 = new long [a];
        long b = 0;
        long c;
        for(int i=0;i<a;i++){in[i] = sc.nextLong();
                             in2[in[i]-1]++;
                            }
        for(int i=0;i<a;i++){b+=in2[i]*(in2[i]-1)/2;
                            }
        for(int i=0;i<a;i++){c = in2[in[i]-1];
                             System.out.println(b-c+1);
                            }
	}
}

Choices:
- Runtime Error
- Time Limit Exceeded
- Memory Limit Exceeded
- Compile Error


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		long [] in = new long [a];
        long [] in2 = new long [a];
        long b = 0;
        long c;
        for(int i=0;i<a;i++){in[i] = sc.nextlong();
                             in2[in[i]-1]++;
                            }
        for(int i=0;i<a;i++){b+=in2[i]*(in2[i]-1)/2;
                            }
        for(int i=0;i<a;i++){c = in2[in[i]-1];
                             System.out.println(b-c+1);
                            }
	}
}

Choices:
- Compile Error
- Memory Limit Exceeded
- No abnormally found
- Internal error


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		long [] in = new long [a];
        long [] in2 = new long [a];
        long b = 0;
      　long c;
        for(int i=0;i<a;i++){in[i] = sc.nextlong();
                             in2[in[i]-1]++;
                            }
        for(int i=0;i<a;i++){b+=in2[i]*(in2[i]-1)/2;
                            }
        for(int i=0;i<a;i++){c = in2[in[i]-1];
                             System.out.println(b-c+1);
                            }
	}
}

Choices:
- Time Limit Exceeded
- Compile Error
- Runtime Error
- Memory Limit Exceeded


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int b = sc.nextInt();
		Long c = "-1";
        for(int i=1;i<=10000;i++){if((i*108)/100==a && (i*110)/100==b){c=i;break;}}
		System.out.println(c);
	}
}

Choices:
- Compile Error
- Memory Limit Exceeded
- No abnormally found
- Internal error


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int b = sc.nextInt();
		double [] in = new double [a];
        for(int i=0;i<a;i++){
                             in[i] = (1+sc.nextInt())/2;
                            }
		double [] in2 = new double [a-b+1];
        for(int i=0;i<a-b+1;i++){if(i=0){for(int j=0;j<b;j++){in2[i]+=in[j];}
                                        }else{in2[i]=in2[i-1]+in[b+i-1]-in[i-1];
                                             }
                                }
        Arrays.sort(in2);
		System.out.println(in2[a-b]);
	}
}

Choices:
- No abnormally found
- Time Limit Exceeded
- Runtime Error
- Compile Error


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int b = sc.nextLong();
		Long [] in = new Long [a];
        for(int i=0;i<a;i++){in[i] = sc.nextLong();
                            }
        Arrays.sort(in);
		Long c = in[0]-in[0];
        for(int i=0;i<a-b;i++){c+=in[i];}
		System.out.println(c);
	}
}

Choices:
- Runtime Error
- Compile Error
- Internal error
- No abnormally found


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Long a = sc.nextLong();
        Long b = sc.nextLong();
		Long [] in = new Long [a];
        for(int i=0;i<a;i++){in[i] = sc.nextLong();
                            }
        Arrays.sort(in);
		Long c = a-a;
        for(Long i=0;i<a-b;i++){c+=in[i];}
		System.out.println(c);
	}
}

Choices:
- Internal error
- Compile Error
- Time Limit Exceeded
- No abnormally found


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Long a = sc.nextLong();
        Long b = sc.nextLong();
		Long [] in = new Long [a];
        for(int i=0;i<a;i++){in[i] = sc.nextInt();
                            }
        Arrays.sort(in);
		Long c = a-a;
        for(int i=0;i<a-b;i++){c+=in[i];}
		System.out.println(c);
	}
}

Choices:
- No abnormally found
- Compile Error
- Runtime Error
- Memory Limit Exceeded


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int b = 0;
        int c,d;
        for(int i=1;i<=a;i++){if(i<10){c=i;}else{if(i<100){c=i/10;}
                                                else{if(i<1000){c=i/100;}
                                                    else{if(i<10000){c=i/1000;}
                                                        else{if(i<100000){c=i/10000;}
                                                            else{c=i/100000;}}}}}
         for(int j=i;j<=a;j++){if(j<10){d=j;}else{if(j<100){d=j/10;}
                                                else{if(j<1000){d=j/100;}
                                                    else{if(j<10000){d=j/1000;}
                                                        else{if(j<100000){d=j/10000;}
                                                            else{d=j/100000;}}}}}
           if(j%10==c && i%10==d){if(j==i){b++;}else{b+=2;}}
         }
        }
		System.out.println(b);
	}
}

Choices:
- Compile Error
- Time Limit Exceeded
- Runtime Error
- Internal error


Question:
import java.util.*;

public class Main {
    public static Long gcd(Long x,Long y){
        if(x < y) return gcd(y, x);
        if(y == 0) return x;
        return gcd(y, x % y);
    }
    public static Long lcm(Long x,Long y){
        return x*y/gcd(x,y);
    }
    public static Long df1(int x){
        if(x==0) return x+1;
        return 5*df1(x-1);
    }
    public static Long df2(Long x){
        return x/df1(1) + x/df1(2) + x/df1(3) + x/df1(4) + x/df1(5) + x/df1(6);
    }
    public static Long df3(Long x){
        return x/df1(7) + x/df1(8) + x/df1(9) + x/df1(10) + x/df1(11) + x/df1(12);
    }
    public static Long df4(Long x){
        return x/df1(13) + x/df1(14) + x/df1(15) + x/df1(16) + x/df1(17) + x/df1(18);
    }
    public static Long df5(Long x){
        if((x+1)%2==0) return (x+1)%2;
        return df2(x/2)+df3(x/2)+df4(x/2);
    }
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Long a = sc.nextLong();
        Long b = df5(a);
		System.out.println(b);
	}
}

Choices:
- Runtime Error
- Compile Error
- Internal error
- Memory Limit Exceeded


Question:
import java.util.*;

public class Main {
    public static Long gcd(Long x,Long y){
        if(x < y) return gcd(y, x);
        if(y == 0) return x;
        return gcd(y, x % y);
    }
    public static Long lcm(Long x,Long y){
        return x*y/gcd(x,y);
    }
    public static Long df1(Long x){
        if(x==0) return x+1;
        return 5*df1(x-1);
    }
    public static Long df2(Long x){
        return x/df1(1) + x/df1(2) + x/df1(3) + x/df1(4) + x/df1(5) + x/df1(6);
    }
    public static Long df3(Long x){
        return x/df1(7) + x/df1(8) + x/df1(9) + x/df1(10) + x/df1(11) + x/df1(12);
    }
    public static Long df4(Long x){
        return x/df1(13) + x/df1(14) + x/df1(15) + x/df1(16) + x/df1(17) + x/df1(18);
    }
    public static Long df5(Long x){
        if((x+1)%2==0) return (x+1)%2;
        return df2(x/2)+df3(x/2)+df4(x/2);
    }
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Long a = sc.nextLong();
        Long b = df5(a);
		System.out.println(b);
	}
}

Choices:
- Internal error
- Compile Error
- No abnormally found
- Time Limit Exceeded


Question:
import java.util.*;

public class Main {
    public static Long gcd(Long x,Long y){
        if(x < y) return gcd(y, x);
        if(y == 0) return x;
        return gcd(y, x % y);
    }
    public static Long lcm(Long x,Long y){
        return x*y/gcd(x,y);
    }
    public static Long df1(Long x){
        return x/5 + x/25 + x/125 + x/625 + x/3125 + x/15625;
    }
    public static Long df2(Long x){
        return x/78125 + x/390625 + x/1953125 + x/9765625 + x/48828125 + x/244140625;
    }
    public static Long df3(Long x){
        return x/1220703125 + x/6103515625 + x/30517578125 + x/152587890625 + x/762939453125 + x/3814697265625;
    }
    public static Long df4(Long x){
        if((x+1)%2==0) return (x+1)%2;
        return df1(x/2)+df2(x/2)+df3(x/2);
    }
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		Long a = sc.nextLong();
        Long b = df4(a);
		System.out.println(b);
	}
}

Choices:
- Compile Error
- Memory Limit Exceeded
- Runtime Error
- Time Limit Exceeded


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
        if(s.equals("SUN")){System.out.println(7);}
        if(s.equals("MON")){System.out.println(6);}
        if(s.equals("TUE")){System.out.println(5);}
      　if(s.equals("WED")){System.out.println(4);}
      　if(s.equals("THU")){System.out.println(3);}
      　if(s.equals("FRI")){System.out.println(2);}
      　if(s.equals("SAT")){System.out.println(1);}
	}
}

Choices:
- Compile Error
- No abnormally found
- Runtime Error
- Memory Limit Exceeded


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        String str = sc.next();
        String s = "Yes";
        for(int i=0;i<str.length();i++){
          if((i%2==0 && s.charAt(i)== 'L') || (i%2==1 && s.charAt(i)=='R')){s = "No";break;}
                            }
		System.out.println(s);
	}
}

Choices:
- No abnormally found
- Time Limit Exceeded
- Internal error
- Runtime Error


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        String str = sc.next();
        String s = "Yes";
        for(int i=0;i<a;i++){
          if((i%2==0 && s.charAt(i)== 'L') || (i%2==1 && s.charAt(i)=='R')){s = "No";break;}
                            }
		System.out.println(s);
	}
}

Choices:
- Time Limit Exceeded
- Internal error
- No abnormally found
- Compile Error


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
        int m = sc.nextInt();
		long [] a = new long [n];
        for(int i=0;i<n;i++){
                             a[i] = sc.nextLong();
                            }
        while(m>0){Arrays.sort(a);long max = a[n-1];
                  for(int i=n-1;i<=0;i--){if(a[i]>max/2){a[i]/=2;m--;if(m==0){break;}
                                                        }else{break;}
                                         }
                  }
        long ans = 0;
        for(int i=0;i<n;i++){ans+=a[i];
                            }
		System.out.println(ans);
	}
}

Choices:
- No abnormally found
- Compile Error
- Runtime Error
- Internal error


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int ans = 0;
        int [] b = new String [a+1];
        b[0]=100000;
        b[a]=100000;
        for(int i=1;i<a;i++){
                             b[i] = sc.nextInt();
                            }
        for(int i=0;i<a;i++){ans+=Math.min(b[i],b[i+1]);
                            }
		System.out.println(ans);
	}
}

Choices:
- No abnormally found
- Runtime Error
- Memory Limit Exceeded
- Compile Error


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
        long [] a = new int [n+1];
        long [] b = new int [n];
        long ans = 0;
		for(int i=0;i<n+1;i++){a[i] = sc.nextLong();
                              }
        for(int i=0;i<n;i++){b[i] = sc.nextLong();
                            }
        for(int i=0;i<n;i++){long c = Math.min(a[i],b[i]);ans+=c;a[i]-=c;b[i]-=c;
                            long d = Math.min(a[i+1],b[i]);ans+=d;a[i+1]-=d;b[i]-=d;
                            }
		System.out.println(ans);
	}
}

Choices:
- Runtime Error
- Memory Limit Exceeded
- Internal error
- Compile Error


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
        String t = "No";
        if(s.charAt(0)==s.charAt(1))
        {if(s.charAt(2)==s.charAt(3) && s.charAt(0)!=s.charAt(2){t = "Yes";}}
		 if(s.charAt(0)==s.charAt(2))
        {if(s.charAt(1)==s.charAt(3) && s.charAt(0)!=s.charAt(1){t = "Yes";}}
         if(s.charAt(0)==s.charAt(3))
        {if(s.charAt(1)==s.charAt(2) && s.charAt(0)!=s.charAt(1){t = "Yes";}}
            System.out.println(t);
	}
}

Choices:
- Compile Error
- No abnormally found
- Internal error
- Runtime Error


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
        String t = "Good";
        for(int i=0;i<3;i++){if(s.charAt(i)==s.charAt(i-1)){t="Bad";break;
                                                 }
                            }
		System.out.println(t);
	}
}

Choices:
- Runtime Error
- Memory Limit Exceeded
- Internal error
- Time Limit Exceeded


Question:
import java.util.*;
import java.util.Arrays;
import java.util.Comparator;
class Data{
    private int a;
    private int b;
    public Data(int a, int b) {
        this.a = a;
        this.b = b;
    }
    public int getA() {
        return a;
    }
    public int getB() {
        return b;
    }
}
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int [] in = new int [a];
        int [] in2 = new int [a];
        int t = 0;
        for(int i=0;i<a;i++){
                             in[i] = sc.nextLong();
                             in2[i] = sc.nextLong()-in[i];
                            }
        Data [] d = new Data [a];
         for(int i=0;i<a;i++){d[i] = new Data(in[i],in2[i]);
                             }
        Arrays.sort(d, new Comparator<Data>() {
            public int compare(Data d1, Data d2) {
                return d1.getB() - d2.getB();
            }
        });
		String s = "Yes";
        for(int i=0;i<a;i++){if(d[i].getB()<t){s="No";break;
                                         }
                             else{t+=d[i].getA();}
                            }
		System.out.println(s);
	}
}

Choices:
- No abnormally found
- Time Limit Exceeded
- Memory Limit Exceeded
- Compile Error


Question:
import java.util.*;
import java.util.Arrays;
import java.util.Comparator;
class Data{
    private long a;
    private long b;
    public Data(long a, long b) {
        this.a = a;
        this.b = b;
    }
    public long getA() {
        return a;
    }
    public long getB() {
        return b;
    }
}
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		long [] in = new long [a];
        long [] in2 = new long [a];
        long t = 0;
        for(int i=0;i<a;i++){
                             in[i] = sc.nextLong();
                             in2[i] = sc.nextLong()-in[i];
                            }
        Data [] d = new Data [a];
         for(int i=0;i<a;i++){d[i] = new Data(in[i],in2[i]);
                             }
        Arrays.sort(d, new Comparator<Data>() {
            public long compare(Data d1, Data d2) {
                return d1.getB() - d2.getB();
            }
        });
		String s = "Yes";
        for(int i=0;i<a;i++){if(d[i].getB()<t){s="No";break;
                                         }
                             else{t+=d[i].getA();}
                            }
		System.out.println(s);
	}
}

Choices:
- Memory Limit Exceeded
- Time Limit Exceeded
- Compile Error
- Runtime Error


Question:
import java.util.Arrays;
import java.util.Comparator;
class Data{
    private long a;
    private long b;
    public Data(long a, long b) {
        this.a = a;
        this.b = b;
    }
    public long getA() {
        return a;
    }
    public long getB() {
        return b;
    }
}
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		long [] in = new long [a];
        long [] in2 = new long [a];
        long t = 0;
        for(int i=0;i<a;i++){
                             in[i] = sc.nextLong();
                             in2[i] = sc.nextLong()-in[i];
                            }
        Data [] d = new Data [a];
         for(int i=0;i<a;i++){d[i] = new Data(in[i],in2[i]);
                             }
        Arrays.sort(d, new Comparator<Data>() {
            public long compare(Data d1, Data d2) {
                return d1.getB() - d2.getB();
            }
        });
		String s = "Yes";
        for(int i=0;i<a;i++){if(in2[i]<t){s="No";break;
                                         }
                             else{t+=in2[i];}
                            }
		System.out.println(s);
	}
}

Choices:
- No abnormally found
- Memory Limit Exceeded
- Time Limit Exceeded
- Compile Error


Question:
import java.util.*;
import java.util.Arrays;
import java.util.Comparator;
class Data{
    private long a;
    private long b;
    public Data(long a, long b) {
        this.a = a;
        this.b = b;
    }
    public long getA() {
        return a;
    }
    public long getB() {
        return b;
    }
}
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		long [] in = new long [a];
        long [] in2 = new long [a];
        long t = 0;
        for(int i=0;i<a;i++){
                             in[i] = sc.nextLong();
                             in2[i] = sc.nextLong()-in[i];
                            }
        Data [] d = new Data [a];
         for(int i=0;i<a;i++){d[i] = new Data(in[i],in2[i]);
                             }
        Arrays.sort(d, new Comparator<Data>() {
            public long compare(Data d1, Data d2) {
                return d1.getB() - d2.getB();
            }
        });
		String s = "Yes";
        for(int i=0;i<a;i++){if(in2[i]<t){s="No";break;
                                         }
                             else{t+=in2[i];}
                            }
		System.out.println(s);
	}
}

Choices:
- Compile Error
- No abnormally found
- Internal error
- Memory Limit Exceeded


Question:
import java.util.*;]
import java.util.Arrays;
import java.util.Comparator;
class Data{
    private long a;
    private long b;
    public Data(long a, long b) {
        this.a = a;
        this.b = b;
    }
    public long getA() {
        return a;
    }
    public long getB() {
        return b;
    }
}
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		long [] in = new long [a];
        long [] in2 = new long [a];
        long t = 0;
        for(int i=0;i<a;i++){
                             in[i] = sc.nextLong();
                             in2[i] = sc.nextLong()-in[i];
                            }
        Data [] d = new Data [a];
         for(int i=0;i<a;i++){d[i] = new Data(in[i],in2[i]);
                             }
        Arrays.sort(d, new Comparator<Data>() {
            public long compare(Data d1, Data d2) {
                return d1.getB() - d2.getB();
            }
        });
		String s = "Yes";
        for(int i=0;i<a;i++){if(in2[i]<t){s="No";break;
                                         }
                             else{t+=in2[i];}
                            }
		System.out.println(s);
	}
}

Choices:
- Runtime Error
- Internal error
- Compile Error
- No abnormally found


Question:
 import java.util.*;
class Data{
    private long a;
    private long b;
    public Data(long a, long b) {
        this.a = a;
        this.b = b;
    }
    public long getA() {
        return a;
    }
    public long getB() {
        return b;
    }
}
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		long [] in = new long [a];
        long [] in2 = new long [a];
        long t = 0;
        for(int i=0;i<a;i++){
                             in[i] = sc.nextLong();
                             in2[i] = sc.nextLong()-in[i];
                            }
        Data [] d = new Data [a];
         for(int i=0;i<a;i++){d[i] = new Data(in[i],in2[i]);
                             }
        Arrays.sort(d, new Comparator<Data>() {
            public long compare(Data d1, Data d2) {
                return d1.getB() - d2.getB();
            }
        });
		String s = "Yes";
        for(int i=0;i<a;i++){if(in2[i]<t){s="No";break;
                                         }
                             else{t+=in2[i];}
                            }
		System.out.println(s);
	}
}

Choices:
- No abnormally found
- Memory Limit Exceeded
- Time Limit Exceeded
- Compile Error


Question:
 import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		long [] in = new long [a];
        long [] in2 = new long [a];
        long t = 0;
        for(int i=0;i<a;i++){
                             in[i] = sc.nextLong();
                             in2[i] = sc.nextLong()-in[i];
                            }
        Data [] d = new Data [a];
         for(int i=0;i<a;i++){d[i] = new Data(in[i],in2[i]);
                             }
        Arrays.sort(d, new Comparator<Data>() {
            public long compare(Data d1, Data d2) {
                return d1.getB() - d2.getB();
            }
        });
		String s = "Yes";
        for(int i=0;i<a;i++){if(in2[i]<t){s="No";break;
                                         }
                             else{t+=in2[i];}
                            }
		System.out.println(s);
	}
}
class Data{
    private long a;
    private long b;
    public Data(long a, long b) {
        this.a = a;
        this.b = b;
    }
    public long getA() {
        return a;
    }
    public long getB() {
        return b;
    }
}

Choices:
- Time Limit Exceeded
- Compile Error
- Memory Limit Exceeded
- No abnormally found


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int w = sc.nextInt();
        int h = sc.nextInt();
		int x = sc.nextInt();
        int y = sc.nextInt();
        double ans1 = w*h/2.0;
        int ans2 = 0;
        if(x*2==w && y*2==h){ans++;}
		System.out.println(ans1 + " " + ans2);
	}
}

Choices:
- Compile Error
- Internal error
- Time Limit Exceeded
- Runtime Error


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();
        int e = sc.nextInt();
        int ans = a+b+c+d+e;
        int A =10-a%10;if(A==10){A==0;}
        int B =10-b%10;if(B==10){B==0;}
        int C =10-c%10;if(C==10){C==0;}
        int D =10-d%10;if(D==10){D==0;}
        int E =10-e%10;if(E==10){E==0;}
        ans+=A+B+C+D+E;
        ans-=Math.max(A,Math.max(b,Math.max(c,Math.max(d,e))));
		System.out.println(ans);
  }
}

Choices:
- Runtime Error
- Compile Error
- Time Limit Exceeded
- Internal error


Question:
import java.util.*;
import java.util.Arrays;
import java.util.Comparator;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
		int m = sc.nextInt();
        Data [] d = new Data [n];
        for(int i=0;i<n;i++){int A = sc.nextInt();
                             int B = sc.nextInt();
                             d[i] = new Data(A,B);
                            }
        Arrays.sort(d, new Comparator<Data>() {
            public int compare(Data d1, Data d2) {
                return d1.getA() - d2.getA();
            }
        });
        long ans = 0;
        int count = 0;
        int point = 0;
        while(count<m){ans+=d[point].getA();
                       count++;
                       if(count==d[point].getB()){point++;count=0;}
                      }
        System.out.println(ans);
	}
}
class Data{
    private int a;
    private int b;
    public Data(int a, int b) {
        this.a = a;
        this.b = b;
    }
    public int getA() {
        return a;
    }
    public int getB() {
        return b;
    }
}

Choices:
- Runtime Error
- Time Limit Exceeded
- Compile Error
- Memory Limit Exceeded


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int a = sc.nextInt();
      int b = sc.nextInt();
      int k = sc.nextInt();
      int count = 0;
      int ans = 0;
      While(count<k){ans++;if(a%ans==0 &&b%ans==0){count++;}
                    }
	  System.out.println(ans);
  }
}

Choices:
- No abnormally found
- Compile Error
- Runtime Error
- Time Limit Exceeded


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int e = sc.nextInt();
		int [] x1 = new int [a];
        int [] y1 = new int [a];
        int [] x2 = new int [e];
        int [] y2 = new int [e];
        int [] ans = new int [a];

        for(int i=0;i<a;i++){x1[i] = sc.nextInt();
                             y1[i] = sc.nextInt();
                             ans[i] = 1;
                             }
        for(int i=0;i<e;i++){x2[e] = sc.nextInt();
                             y2[e] = sc.nextInt();
                            }
        for(int i=0;i<a;i++){int b = 0; Long c = Long.MAX_VALUE;
        for(int j=0;j<e;j++){Long d = c-c;
                             d+=Math.abs(x1[i]-x2[j]);
                             d+=Math.abs(y1[i]-y2[j]);
                             if(d<c){b=j;c=d;}
                             if(j==a-1){ans[i]+=b;}
                            }
                            }
        for(int i=0;i<a;i++){System.out.println(ans[i]);}
	}
}

Choices:
- Time Limit Exceeded
- Compile Error
- No abnormally found
- Runtime Error


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int [] x1 = new int [a];
        int [] y1 = new int [a];
        int [] x2 = new int [a];
        int [] y2 = new int [a];
        int [] ans = new int [a];

        for(int i=0;i<a;i++){x1[i] = sc.nextInt();
                             y1[i] = sc.nextInt();
                            }
        for(int i=0;i<a;i++){x2[i] = sc.nextInt();
                            y2[i] = sc.nextInt();
                           }
        for(int i=0;i<a;i++){int b = 0; Long c = Long.MAX_VALUE;
        for(int j=0;j<a;j++){Long d = c-c;
                             d+=Math.abs(x1[i]-x2[j]);
                             d+=Math.abs(y1[i]-y2[j]);
                             if(d<c){b=j;c=d;}
                             if(j==a-1){ans[i]+=b+1;}
                            }
                            }
        for(int i=0;i<a;i++){System.out.println(ans[i]);}
	}
}

Choices:
- Runtime Error
- Internal error
- Compile Error
- Time Limit Exceeded


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int [] x1 = new int [a];
        int [] y1 = new int [a];
        int [] x2 = new int [a];
        int [] y2 = new int [a];
        int [] ans = new int [a];

        for(int i=0;i<a;i++){x1[i] = sc.nextInt();
                             y1[i] = sc.nextInt();
                             x2[i] = sc.nextInt();
                             y2[i] = sc.nextInt();
                            }

        for(int i=0;i<a;i++){int b = 0; Long c = Long.MAX_VALUE;
        for(int j=0;j<a;j++){Long d = c-c;
                             d+=Math.abs(x1[i]-x2[j]);
                             d+=Math.abs(y1[i]-y2[j]);
                             if(d<c){b=j;c=d;}
                             if(j==a-1){ans[i]+=b+1;}
                            }
                            }
        for(int i=0;i<a;i++){System.out.println(ans[i]);}
	}
}

Choices:
- Internal error
- Compile Error
- Memory Limit Exceeded
- Runtime Error


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int [] x1 = new int [a];
        int [] y1 = new int [a];
        int [] x2 = new int [a];
        int [] y2 = new int [a];
        int [] ans = new int [a];

        for(int i=0;i<a;i++){x1[i] = sc.nextInt();
                             y1[i] = sc.nextInt();
                             x2[i] = sc.nextInt();
                             y2[i] = sc.nextInt();
                            }

        for(int i=0;i<a;i++){int b = 0; int c = Long.MAX_VALUE;
        for(int j=0;j<a;j++){Long d = c-c;
                             d+=Math.abs(x1[i]-x2[j]);
                             d+=Math.abs(y1[i]-y2[j]);
                             if(d<c){b=j;c=d;}
                             if(j==a-1){ans[i]+=b+1;}
                            }
                            }
        for(int i=0;i<a;i++){System.out.println(ans[i]);}
	}
}

Choices:
- Compile Error
- Internal error
- No abnormally found
- Runtime Error


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int [] x1 = new int [a];
        int [] y1 = new int [a];
        int [] x2 = new int [a];
        int [] y2 = new int [a];
        int [] ans = new int [a];

        for(int i=0;i<a;i++){x1[i] = sc.nextInt();
                             y1[i] = sc.nextInt();
                            }
        for(int i=0;i<a;i++){x2[i] = sc.nextInt();
                             y2[i] = sc.nextInt();
                            }
        int b,c;
        Long d;
        for(int i=0;i<a;i++){b = 0; c = 1000000000;
        for(int j=0;j<a;j++){d = 0;
                             d+=Math.abs(x1[i]-x2[j]);
                             d+=Math.abs(y1[i]-y2[j]);
                             if(d<c){b=j;c=d;}
                             if(j==a-1){ans[i]+=b+1;}
                            }
                            }
        for(int i=0;i<a;i++){System.out.println(ans[i]);}
	}
}

Choices:
- Runtime Error
- No abnormally found
- Time Limit Exceeded
- Compile Error


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int [] x1 = new int [a];
        int [] y1 = new int [a];
        int [] x2 = new int [a];
        int [] y2 = new int [a];
        int [] ans = new int [a];

        for(int i=0;i<a;i++){x1[i] = sc.nextInt();
                             y1[i] = sc.nextInt();
                            }
        for(int i=0;i<a;i++){x2[i] = sc.nextInt();
                             y2[i] = sc.nextInt();
                            }
        int b,c,d;
        for(int i=0;i<a;i++){b = 0; c = 1000000000;
        for(int j=0;j<a;j++){d = 0;
                             d+=Math.abs(x1[i]-x2[j]);
                             d+=Math.abs(y1[i]-y2[j]);
                             if(d<c){b=j;c=d;}
                             if(j==a-1){ans[i]+=b+1;}
                            }
                            }
        for(int i=0;i<a;i++){System.out.println(ans[i]);}
	}
}

Choices:
- No abnormally found
- Internal error
- Runtime Error
- Compile Error


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int [] x1 = new int [a];
        int [] y1 = new int [a];
        int [] x2 = new int [a];
        int [] y2 = new int [a];
        int [] ans = new int [a];

        for(int i=0;i<a;i++){x1[i] = sc.nextInt();
                             y1[i] = sc.nextInt();
                             x2[i] = sc.nextInt();
                             y2[i] = sc.nextInt();
                            }

        for(int i=0;i<a;i++){int b = 0; int c = 1000000000;
        for(int j=0;j<a;j++){int d = 0;
                             d+=Math.abs(x1[i]-x2[j]);
                             d+=Math.abs(y1[i]-y2[j]);
                             if(d<c){b=j;c=d;}
                             if(j==a-1){ans[i]+=b+1;}
                            }
                            }
        for(int i=0;i<a;i++){System.out.println(ans[i]);}
	}
}

Choices:
- Runtime Error
- Compile Error
- Internal error
- Time Limit Exceeded


Question:
import java.util.*;
public class Main {
    public static long gcd(long x,long y){
        if(x < y) return gcd(y, x);
        if(y == 0) return x;
        return gcd(y, x % y);
    }
    public static long lcm(long x,long y){
        return x*y/gcd(x,y);
    }
    public static long fac(long x){
        if(x==0) return 1;
        return x*fac(x-1);
    }
    public static long per(long x,long y){
        return fac(x)/fac(x-y);
    }
    public static long com(long x,long y){
        return per(x,y)/fac(y);
    }
    public static long com2(long x,long y){
        if(y==0 || y==x) return 1;
        if(x < y) return 0;
        return com2(x-1,y-1)+com2(x-1,y);
    }
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
		long [] in = new long [a];
        long [] [] pascal = new long [51][51];
        for(int i=0;i<=50;i++){
        for(int j=0;j<=i;j++){if(j==0 || j==i){pascal[i][j]=1;}
                             else{pascal[i][j]=pascal[i-1][j-1]+pascal[i-1][j];}
                             }
        }
        double d = 0;
        for(int i=0;i<a;i++){
                             in[i] = sc.nextLong();
                            }
		Arrays.sort(in);
        long e = 0;
        long f = 0;
        long g = 0;
        for(int i=0;i<b;i++){d+=in[a-i-1];
                            }
        d/=b;
        for(int i=0;i<a;i++){if(in[i]==in[a-b]){f++;if(i>=a-b){g++;}}
                            }

        if(d==in[a-1]){for(int i=b;i<=c;i++){e+=pascal[f][i];}}
        else{e=pascal[f][g];}
		System.out.println(d);
        System.out.println(e);
	}
}

Choices:
- No abnormally found
- Internal error
- Compile Error
- Memory Limit Exceeded


Question:
import java.util.*;
public class Main {
    public static long com2(long x,long y){
        if(y==0 || y==x) return 1;
        if(x < y) return 0;
        return com2(x-1,y-1)+com2(x-1,y);
    }
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
		long [] in = new long [a];
        double d = 0;
        for(int i=0;i<a;i++){
                             in[i] = sc.nextLong();
                            }
		Arrays.sort(in);
        long e = 0;
        long f = 0;
        long g = 0;
        for(int i=0;i<b;i++){d+=in[a-i-1];
                            }
        d/=b;
        for(int i=0;i<a;i++){if(in[i]==in[a-b]){f++;if(i>=a-b){g++;}}
                            }

        if(d==in[a-1]){for(int i=b;i<=c;i++){e+=com2(f,i);}}
        else{e=com2(f,g);}
		System.out.println(d);
        System.out.println(e);
	}
}

Choices:
- Time Limit Exceeded
- No abnormally found
- Internal error
- Runtime Error


Question:
import java.util.*;
public class Main {
    public static long com2(long x,long y){
        if(y==0 || y==x) return 1;
        if(x < y) return 0;
        return com2(x-1,y-1)+com2(x-1,y);
    }
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
		long [] in = new long [a];
        double d = 0;
        for(int i=0;i<a;i++){
                             in[i] = sc.nextLong();
                            }
		Arrays.sort(in);
        long e = 0;
        long f = 0;
        long g = 0;
        long k;
        for(int i=0;i<b;i++){d+=in[a-i-1];
                            }
        d/=b;
        for(int i=0;i<a;i++){if(in[i]==in[a-b]){f++;if(i>=a-b){g++;}}
                            }

        if(d==in[a-1]){for(int i=c;i>=b;i--){k=com2(f,i);e+=k;}}
        else{e=com2(f,g);}
		System.out.println(d);
        System.out.println(e);
	}
}

Choices:
- Time Limit Exceeded
- Memory Limit Exceeded
- Internal error
- No abnormally found


Question:
import java.util.*;
public class Main {
    public static long gcd(long x,long y){
        if(x < y) return gcd(y, x);
        if(y == 0) return x;
        return gcd(y, x % y);
    }
    public static long lcm(long x,long y){
        return x*y/gcd(x,y);
    }
    public static long fac(long x){
        if(x==0) return 1;
        return x*fac(x-1);
    }
    public static long per(long x,long y){
        return fac(x)/fac(x-y);
    }
    public static long com(long x,long y){
        return per(x,y)/fac(y);
    }
    public static long com2(long x,long y){
        if(y==0 || y==x) return 1;
        if(x < y) return 0;
        return com2(x-1,y-1)+com2(x-1,y);
    }
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
		long [] in = new long [a];
        double d = 0;
        for(int i=0;i<a;i++){
                             in[i] = sc.nextLong();
                            }
		Arrays.sort(in);
        long e = 0;
        long f = 0;
        long g = 0;
        long k;
        for(int i=0;i<b;i++){d+=in[a-i-1];
                            }
        d/=b;
        for(int i=0;i<a;i++){if(in[i]==in[a-b]){f++;if(i>=a-b){g++;}}
                            }

        if(d==in[a-1]){for(int i=b;i<=c;i++){k=com2(f,i);e+=k;}}
        else{e=com2(f,g);}
		System.out.println(d);
        System.out.println(e);
	}
}

Choices:
- Runtime Error
- Compile Error
- Time Limit Exceeded
- Internal error


Question:
import java.util.*;
public class Main {
    public static long gcd(long x,long y){
        if(x < y) return gcd(y, x);
        if(y == 0) return x;
        return gcd(y, x % y);
    }
    public static long lcm(long x,long y){
        return x*y/gcd(x,y);
    }
    public static long fac(long x){
        if(x==0) return 1;
        return x*fac(x-1);
    }
    public static long per(long x,long y){
        return fac(x)/fac(x-y);
    }
    public static long com(long x,long y){
        return per(x,y)/fac(y);
    }
    public static long com2(long x,long y){
        if(y==0 || y==x) return 1;
        if(x < y) return 0;
        return com2(x-1,y-1)+com2(x-1,y);
    }
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
		long [] in = new long [a];
        double d = 0;
        for(int i=0;i<a;i++){
                             in[i] = sc.nextLong();
                            }
		Arrays.sort(in);
        long e = 0;
        long f = 0;
        long g = 0;
        long k;
        for(int i=0;i<h;i++){d+=in[a-i-1];
                            }
        d/=b;
        for(int i=0;i<a;i++){if(in[i]==in[a-b]){f++;if(i>=a-b){g++;}}
                            }

        if(d==in[a-1]){for(int i=b;i<=c;i++){k=com2(f,i);e+=k;}}
        else{e=com2(f,g);}
		System.out.println(d);
        System.out.println(e);
	}
}

Choices:
- Runtime Error
- Memory Limit Exceeded
- Compile Error
- No abnormally found


Question:
import java.util.*;
public class Main {
    public static long gcd(long x,long y){
        if(x < y) return gcd(y, x);
        if(y == 0) return x;
        return gcd(y, x % y);
    }
    public static long lcm(long x,long y){
        return x*y/gcd(x,y);
    }
    public static long fac(long x){
        if(x==0) return 1;
        return x*fac(x-1);
    }
    public static long per(long x,long y){
        return fac(x)/fac(x-y);
    }
    public static long com(long x,long y){
        return per(x,y)/fac(y);
    }
    public static long com2(long x,long y){
        if(y==0 || y==x) return 1;
        if(x < y) return 0;
        return com2(x-1,y-1)+com2(x-1,y);
    }
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
		long [] in = new long [a];
        double d = 0;
        for(int i=0;i<a;i++){
                             in[i] = sc.nextLong();
                            }
		Arrays.sort(in);
        long e = 0;
        long f = 0;
        long g = 0;
        long k;
        for(int i=0;i<h;i++){d+=in[a-i-1];
                            }
        d/=b;
        for(int i=0;i<a;i++){if(in[i]==in[a-b]){f++;if(i>=a-b){g++;}}
                            }

        if(d==in[a-1]){for(int i=h;i<=c;i++){k=com2(f,i);e+=k;}}
        else{e=com2(f,g);}
		System.out.println(d);
        System.out.println(e);
	}
}

Choices:
- Internal error
- Runtime Error
- Memory Limit Exceeded
- Compile Error


Question:
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		System.out.println(s.substring(0,5) + " " + s.substring(6,13)+ " " +s.substring(14,19);)
	}
}

Choices:
- Memory Limit Exceeded
- No abnormally found
- Compile Error
- Internal error


Question:
import java.io.*;
import java.util.*;

class Solver {
  final int h, w, n;
  final int[][] xys;

  Solver(int h, int w, int n, int[][] xys) {
    this.h = h;
    this.w = w;
    this.n = n;
    this.xys = xys;
  }

  public int solve() {
    int[] xToMinY = new int[w + 1];
    Arrays.fill(xToMinY, Integer.MAX_VALUE);
    for (int[] xy : xys) {
      int x = xy[0];
      int y = xy[1];
      xToMinY[x] = Math.min(xToMinY[x], y);
    }

    int yMax = 1;
    for (int x = 1; x < w; x++) {
      if (xToMinY[x + 1] <= yMax) {
        return x;
      }
      if (xToMinY[x + 1] > yMax + 1) {
        yMax++;
      }
    }
    return w;
  }
}

public class Main {
  private static void execute(ContestReader reader, PrintWriter out) {
    int h = reader.nextInt();
    int w = reader.nextInt();
    int n = reader.nextInt();
    int[][] xys = reader.nextInt(n, 2);
    out.println(new Solver(h, w, n, xys).solve());
  }

  public static void main(String[] args) {
    ContestReader reader = new ContestReader(System.in);
    PrintWriter out = new PrintWriter(System.out);
    execute(reader, out);
    out.flush();
  }
}

class ContestReader {
  private BufferedReader reader;
  private StringTokenizer tokenizer;

  ContestReader(InputStream in) {
    reader = new BufferedReader(new InputStreamReader(in));
  }

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

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

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

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

  public String[] next(int n) {
    String[] array = new String[n];
    for (int i = 0; i < n; i++) {
      array[i] = next();
    }
    return array;
  }

  public int[] nextInt(int n) {
    int[] array = new int[n];
    for (int i = 0; i < n; i++) {
      array[i] = nextInt();
    }
    return array;
  }

  public long[] nextLong(int n) {
    long[] array = new long[n];
    for (int i = 0; i < n; i++) {
      array[i] = nextLong();
    }
    return array;
  }

  public double[] nextDouble(int n) {
    double[] array = new double[n];
    for (int i = 0; i < n; i++) {
      array[i] = nextDouble();
    }
    return array;
  }

  public char[] nextCharArray() {
    return next().toCharArray();
  }

  public int[][] nextInt(int n, int m) {
    int[][] matrix = new int[n][m];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        matrix[i][j] = nextInt();
      }
    }
    return matrix;
  }

  public long[][] nextLong(int n, int m) {
    long[][] matrix = new long[n][m];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        matrix[i][j] = nextLong();
      }
    }
    return matrix;
  }

  public double[][] nextDouble(int n, int m) {
    double[][] matrix = new double[n][m];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        matrix[i][j] = nextDouble();
      }
    }
    return matrix;
  }

  public char[][] nextCharArray(int n) {
    char[][] matrix = new char[n][];
    for (int i = 0; i < n; i++) {
      matrix[i] = next().toCharArray();
    }
    return matrix;
  }
}

Choices:
- Time Limit Exceeded
- Compile Error
- Runtime Error
- Memory Limit Exceeded


Question:
import java.io.*;
import java.util.*;

class Solver {
  final int n;
  final long[] ss;
  List<Long> primes;

  Solver(int n, long[] ss) {
    this.n = n;
    this.ss = ss;
  }

  private boolean isPrime(long v) {
    for (long p : primes) {
      if (v % p == 0) {
        return false;
      }
      if (p * p > v) {
        return true;
      }
    }
    return true;
  }

  private long normalize(long v) {
    for (long p : primes) {
      long p3 = p * p * p;
      while (v % p3 == 0) {
        v /= p3;
      }
      if (p3 > v) {
        return v;
      }
    }
    return v;
  }

  private long calculateOppositve(long v) {
    long opposite = 1;
    for (long p : primes) {
      long p2 = p * p;
      if (v % p2 == 0) {
        opposite *= p;
        v /= p2;
      }
      if (v < p2) {
        break;
      }
    }
    opposite *= v;
    opposite *= v;
    return opposite;
  }

  public int solve() {
    primes = new ArrayList<>();
    for (long i = 2; i < 100_000; i++) {
      if (isPrime(i)) {
        primes.add(i);
      }
    }

    Map<Long, Integer> counters = new HashMap<>();
    for (long s : ss) {
      long normS = normalize(s);
      counters.put(normS, counters.getOrDefault(normS, 0) + 1);
    }

    int answer = 0;
    for (Map.Entry<Long, Integer> entry : counters.entrySet()) {
      long s1 = entry.getKey();
      long c1 = entry.getValue();
      if (s1 == 1) {
        answer++;
        continue;
      }
      long s2 = calculateOppositve(s1);
      long c2 = counters.getOrDefault(s2, 0);
      if (c2 == 0) {
        answer += c1;
      } else if (s1 < s2) {
        answer += Math.max(c1, c2);
      }
    }

    return answer;
  }
}

public class Main {
  private static void execute(ContestReader reader, PrintWriter out) {
    int n = reader.nextInt();
    long[] ss = reader.nextLong(n);
    out.println(new Solver(n, ss).solve());
  }

  public static void main(String[] args) {
    ContestReader reader = new ContestReader(System.in);
    PrintWriter out = new PrintWriter(System.out);
    execute(reader, out);
    out.flush();
  }
}

class ContestReader {
  private BufferedReader reader;
  private StringTokenizer tokenizer;

  ContestReader(InputStream in) {
    reader = new BufferedReader(new InputStreamReader(in));
  }

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

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

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

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

  public String[] next(int n) {
    String[] array = new String[n];
    for (int i = 0; i < n; i++) {
      array[i] = next();
    }
    return array;
  }

  public int[] nextInt(int n) {
    int[] array = new int[n];
    for (int i = 0; i < n; i++) {
      array[i] = nextInt();
    }
    return array;
  }

  public long[] nextLong(int n) {
    long[] array = new long[n];
    for (int i = 0; i < n; i++) {
      array[i] = nextLong();
    }
    return array;
  }

  public double[] nextDouble(int n) {
    double[] array = new double[n];
    for (int i = 0; i < n; i++) {
      array[i] = nextDouble();
    }
    return array;
  }

  public char[] nextCharArray() {
    return next().toCharArray();
  }

  public int[][] nextInt(int n, int m) {
    int[][] matrix = new int[n][m];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        matrix[i][j] = nextInt();
      }
    }
    return matrix;
  }

  public long[][] nextLong(int n, int m) {
    long[][] matrix = new long[n][m];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        matrix[i][j] = nextLong();
      }
    }
    return matrix;
  }

  public double[][] nextDouble(int n, int m) {
    double[][] matrix = new double[n][m];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        matrix[i][j] = nextDouble();
      }
    }
    return matrix;
  }

  public char[][] nextCharArray(int n) {
    char[][] matrix = new char[n][];
    for (int i = 0; i < n; i++) {
      matrix[i] = next().toCharArray();
    }
    return matrix;
  }
}

Choices:
- Memory Limit Exceeded
- Time Limit Exceeded
- Runtime Error
- Compile Error


Question:
import java.io.*;
import java.util.*;

class Solver {
  final int n;
  final long[] ss;
  List<Long> primes;

  Solver(int n, long[] ss) {
    this.n = n;
    this.ss = ss;
  }

  private boolean isPrime(long v) {
    for (long p : primes) {
      if (v % p == 0) {
        return false;
      }
      if (p * p > v) {
        return true;
      }
    }
    return true;
  }

  private long normalize(long v) {
    for (long p : primes) {
      long p3 = p * p * p;
      while (v % p3 == 0) {
        v /= p3;
      }
      if (p3 > v) {
        return v;
      }
    }
    return v;
  }

  private long calculateOppositve(long v) {
    long opposite = 1;
    for (long p : primes) {
      if (v % p != 0) {
        if (v > 100_000 && v < p * p) {
          return Long.MAX_VALUE;
        }
        continue;
      }
      v /= p;
      if (v % p != 0) {
        opposite *= p;
        opposite *= p;
      } else {
        v /= p;
        opposite *= p;
      }

    }
    opposite *= v;
    opposite *= v;
    return opposite;
  }

  public int solve() {
    primes = new ArrayList<>();
    for (long i = 2; i < 100_000; i++) {
      if (isPrime(i)) {
        primes.add(i);
      }
    }

    Map<Long, Integer> counters = new HashMap<>();
    for (long s : ss) {
      long normS = normalize(s);
      counters.put(normS, counters.getOrDefault(normS, 0) + 1);
    }

    int answer = 0;
    for (Map.Entry<Long, Integer> entry : counters.entrySet()) {
      long s1 = entry.getKey();
      long c1 = entry.getValue();
      if (s1 == 1) {
        answer++;
        continue;
      }
      long s2 = calculateOppositve(s1);
      long c2 = counters.getOrDefault(s2, 0);
      if (c2 == 0) {
        answer += c1;
      } else if (s1 < s2) {
        answer += Math.max(c1, c2);
      }
    }

    return answer;
  }
}

public class Main {
  private static void execute(ContestReader reader, PrintWriter out) {
    int n = reader.nextInt();
    long[] ss = reader.nextLong(n);
    out.println(new Solver(n, ss).solve());
  }

  public static void main(String[] args) {
    ContestReader reader = new ContestReader(System.in);
    PrintWriter out = new PrintWriter(System.out);
    execute(reader, out);
    out.flush();
  }
}

class ContestReader {
  private BufferedReader reader;
  private StringTokenizer tokenizer;

  ContestReader(InputStream in) {
    reader = new BufferedReader(new InputStreamReader(in));
  }

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

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

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

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

  public String[] next(int n) {
    String[] array = new String[n];
    for (int i = 0; i < n; i++) {
      array[i] = next();
    }
    return array;
  }

  public int[] nextInt(int n) {
    int[] array = new int[n];
    for (int i = 0; i < n; i++) {
      array[i] = nextInt();
    }
    return array;
  }

  public long[] nextLong(int n) {
    long[] array = new long[n];
    for (int i = 0; i < n; i++) {
      array[i] = nextLong();
    }
    return array;
  }

  public double[] nextDouble(int n) {
    double[] array = new double[n];
    for (int i = 0; i < n; i++) {
      array[i] = nextDouble();
    }
    return array;
  }

  public char[] nextCharArray() {
    return next().toCharArray();
  }

  public int[][] nextInt(int n, int m) {
    int[][] matrix = new int[n][m];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        matrix[i][j] = nextInt();
      }
    }
    return matrix;
  }

  public long[][] nextLong(int n, int m) {
    long[][] matrix = new long[n][m];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        matrix[i][j] = nextLong();
      }
    }
    return matrix;
  }

  public double[][] nextDouble(int n, int m) {
    double[][] matrix = new double[n][m];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        matrix[i][j] = nextDouble();
      }
    }
    return matrix;
  }

  public char[][] nextCharArray(int n) {
    char[][] matrix = new char[n][];
    for (int i = 0; i < n; i++) {
      matrix[i] = next().toCharArray();
    }
    return matrix;
  }
}

Choices:
- Internal error
- Runtime Error
- No abnormally found
- Time Limit Exceeded