Question:
import java.util.*;import java.io.*;import java.math.*;
public class Main{
	//Don't have to see. start------------------------------------------
	static class InputIterator{
		ArrayList<String> inputLine = new ArrayList<String>(1024);
		int index = 0; int max;
		InputIterator(){
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			while(true){
				String read;
				try{
					read = br.readLine();
				}catch(IOException e){
					read = null;
				}
				if(read != null){
					inputLine.add(read);
				}else{
					break;
				}
			}
			max = inputLine.size();
		}
		boolean hasNext(){return (index < max);}
		String next(){
			if(hasNext()){
				String returnStr = inputLine.get(index);
				index++;
				return returnStr;
			}else{
				throw new IndexOutOfBoundsException("There is no more input");
			}
		}
	}

	static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.
	static PrintWriter out = new PrintWriter(System.out);
	static void flush(){out.flush();}
	static void myout(Object t){out.println(t);}
	static void myerr(Object t){System.err.print("debug:");System.err.println(t);}
	static String next(){return ii.next();}
	static int nextInt(){return Integer.parseInt(next());}
	static long nextLong(){return Long.parseLong(next());}
	static ArrayList<String> nextStrArray(){return myHanSpSplit(next());}
	static ArrayList<String> myHanSpSplit(String str){return new ArrayList<String>(Arrays.asList(str.split(" ")));}
	static ArrayList<String> nextCharArray(){return mySingleSplit(next());}
	static ArrayList<String> mySingleSplit(String str){return new ArrayList<String>(Arrays.asList(str.split("")));}
	static ArrayList<Integer> nextIntArray(){
		ArrayList<Integer> ret = new ArrayList<Integer>();
		ArrayList<String> input = nextStrArray();
		for(int i = 0; i < input.size(); i++){
			ret.add(Integer.parseInt(input.get(i)));
		}
		return ret;
	}
	static ArrayList<Long> nextLongArray(){
		ArrayList<Long> ret = new ArrayList<Long>();
		ArrayList<String> input = nextStrArray();
		for(int i = 0; i < input.size(); i++){
			ret.add(Long.parseLong(input.get(i)));
		}
		return ret;
	}
	static String kaigyoToStr(String[] list){return String.join("\n",list);}
	static String kaigyoToStr(ArrayList<String> list){return String.join("\n",list);}
	static String hanSpToStr(String[] list){return String.join(" ",list);}
	static String hanSpToStr(ArrayList<String> list){return String.join(" ",list);}
	public static void main(String[] args){
		Runtime rt = Runtime.getRuntime();
		long mae = System.currentTimeMillis();
		solve();
		flush();
		long ato = System.currentTimeMillis();
		myerr("time : " + (ato - mae) + "ms");
		myerr("memory : " + ((rt.totalMemory() - rt.freeMemory()) / 1024) + "KB");
	}
	//Don't have to see. end------------------------------------------
	static void solve(){//Here is the main function
		int N = nextInt();
		ArrayList<String> list = nextCharArray();
		HashMap<String, TreeSet<Integer>> map = new HashMap<String, TreeSet<Integer>>();
		ArrayList<String> alpha = mySingleSplit("abcdefghijklmnopqrstuvwxyz");
		for(int i = 0; i < alpha.size(); i++){
			map.put(alpha.get(i), new TreeSet());
		}
		for(int i = 0; i < N; i++){
			TreeSet<Integer> tmp = map.get(list.get(i));
			tmp.add(i + 1);
			map.put(list.get(i), tmp);
		}
		int Q = nextInt();
		for(int i = 0; i < Q; i++){
			ArrayList<String> tmp = nextStrArray();
			if(tmp.get(0).equals("1")){
				int changeIndex = Integer.parseInt(tmp.get(1));
				for(int j = 0; j < alpha.size(); j++){
					TreeSet set = map.get(alpha.get(j));
					if(set.contains(changeIndex)){
						set.remove(changeIndex);
						map.put(alpha.get(j), set);
						break;
					}
				}
				TreeSet set = map.get(tmp.get(2));
				set.add(changeIndex);
				map.put(tmp.get(2), set);
			}else{
				int L = Integer.parseInt(tmp.get(1));
				int R = Integer.parseInt(tmp.get(2));
				int count = 0;
				for(int j = 0; j < alpha.size(); j++){
					TreeSet set = map.get(alpha.get(j));
					Object high = set.lower(R);
					Object low = set.higher(L);
					if(set.contains(R) || set.contains(L)){
						count++;
					}else if(low != null && high != null){
						if((int)low <= (int)high){
							count++;
						}
					}
				}
				myout(count);
			}
		}
	}
	//Method addition frame start

	//Method addition frame end
}

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


Question:
import java.util.*; import java.io.*; import java.math.*;
public class Main{
	//Don't have to see. start------------------------------------------
	static class InputIterator{
		ArrayList<String> inputLine = new ArrayList<String>(1024);
		int index = 0; int max; String read;
		InputIterator(){
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			try{
				while((read = br.readLine()) != null){
					inputLine.add(read);
				}
			}catch(IOException e){}
			max = inputLine.size();
		}
		boolean hasNext(){return (index < max);}
		String next(){
			if(hasNext()){
				return inputLine.get(index++);
			}else{
				throw new IndexOutOfBoundsException("There is no more input");
			}
		}
	}
	static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();
	static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.
	static PrintWriter out = new PrintWriter(System.out);
	static void flush(){out.flush();}
	static void myout(Object t){out.println(t);}
	static void myerr(Object t){System.err.print("debug:");System.err.println(t);}
	static String next(){return ii.next();}
	static boolean hasNext(){return ii.hasNext();}
	static int nextInt(){return Integer.parseInt(next());}
	static long nextLong(){return Long.parseLong(next());}
	static double nextDouble(){return Double.parseDouble(next());}
	static ArrayList<String> nextStrArray(){return myconv(next(), 8);}
	static ArrayList<String> nextCharArray(){return myconv(next(), 0);}
	static ArrayList<Integer> nextIntArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Integer.parseInt(input.get(i)));
		}
		return ret;
	}
	static ArrayList<Long> nextLongArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Long.parseLong(input.get(i)));
		}
		return ret;
	}
	static String myconv(Object list, int no){//only join
		String joinString = CONVSTR.get(no);
		if(list instanceof String[]){
			return String.join(joinString, (String[])list);
		}else if(list instanceof ArrayList){
			return String.join(joinString, (ArrayList)list);
		}else{
			throw new ClassCastException("Don't join");
		}
	}
	static ArrayList<String> myconv(String str, int no){//only split
		String splitString = CONVSTR.get(no);
		return new ArrayList<String>(Arrays.asList(str.split(splitString)));
	}
	public static void main(String[] args){
		CONVSTR.put(8, " "); CONVSTR.put(9, "\n"); CONVSTR.put(0, "");
		solve();flush();
	}
	//Don't have to see. end------------------------------------------
	static void solve(){//Here is the main function
		ArrayList<String> one = nextStrArray();
		String S = one.get(0);
		String T = one.get(1);
		ArrayList<Integer> two = nextIntArray();
		int A = two.get(0);
		int B = two.get(1);
		String U = next();
		if(S.equals(U)){
			A--;
		}else{
			B--;
		}
		myout(A + " " + B);
	}
	//Method addition frame start

	//Method addition frame end
}

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


Question:
import java.util.*; import java.io.*; import java.math.*;
public class Main{
	//Don't have to see. start------------------------------------------
	static class InputIterator{
		ArrayList<String> inputLine = new ArrayList<String>(1024);
		int index = 0; int max; String read;
		InputIterator(){
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			try{
				while((read = br.readLine()) != null){
					inputLine.add(read);
				}
			}catch(IOException e){}
			max = inputLine.size();
		}
		boolean hasNext(){return (index < max);}
		String next(){
			if(hasNext()){
				return inputLine.get(index++);
			}else{
				throw new IndexOutOfBoundsException("There is no more input");
			}
		}
	}
	static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();
	static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.
	static PrintWriter out = new PrintWriter(System.out);
	static void flush(){out.flush();}
	static void myout(Object t){out.println(t);}
	static void myerr(Object t){System.err.print("debug:");System.err.println(t);}
	static String next(){return ii.next();}
	static boolean hasNext(){return ii.hasNext();}
	static int nextInt(){return Integer.parseInt(next());}
	static long nextLong(){return Long.parseLong(next());}
	static double nextDouble(){return Double.parseDouble(next());}
	static ArrayList<String> nextStrArray(){return myconv(next(), 8);}
	static ArrayList<String> nextCharArray(){return myconv(next(), 0);}
	static ArrayList<Integer> nextIntArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Integer.parseInt(input.get(i)));
		}
		return ret;
	}
	static ArrayList<Long> nextLongArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Long.parseLong(input.get(i)));
		}
		return ret;
	}
	static String myconv(Object list, int no){//only join
		String joinString = CONVSTR.get(no);
		if(list instanceof String[]){
			return String.join(joinString, (String[])list);
		}else if(list instanceof ArrayList){
			return String.join(joinString, (ArrayList)list);
		}else{
			throw new ClassCastException("Don't join");
		}
	}
	static ArrayList<String> myconv(String str, int no){//only split
		String splitString = CONVSTR.get(no);
		return new ArrayList<String>(Arrays.asList(str.split(splitString)));
	}
	public static void main(String[] args){
		CONVSTR.put(8, " "); CONVSTR.put(9, "\n"); CONVSTR.put(0, "");
		solve();flush();
	}
	//Don't have to see. end------------------------------------------
	static void solve(){//Here is the main function
		ArrayList<Integer> one = nextIntArray();
		int N = one.get(0);
		int K = one.get(1);
		long output = 0;
		ArrayList<Integer> list = nextIntArray();
		Collections.sort(list, Comparator.reverseOrder());
		for(int i = K; i < N; i++){
			output += list.get(i);
		}
		myout(output);
	}
	//Method addition frame start

	//Method addition frame end
}

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


Question:
import java.util.*; import java.io.*; import java.math.*;
public class Main{
	//Don't have to see. start------------------------------------------
	static class InputIterator{
		ArrayList<String> inputLine = new ArrayList<String>(1024);
		int index = 0; int max; String read;
		InputIterator(){
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			try{
				while((read = br.readLine()) != null){
					inputLine.add(read);
				}
			}catch(IOException e){}
			max = inputLine.size();
		}
		boolean hasNext(){return (index < max);}
		String next(){
			if(hasNext()){
				return inputLine.get(index++);
			}else{
				throw new IndexOutOfBoundsException("There is no more input");
			}
		}
	}
	static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();
	static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.
	static PrintWriter out = new PrintWriter(System.out);
	static void flush(){out.flush();}
	static void myout(Object t){out.println(t);}
	static void myerr(Object t){System.err.print("debug:");System.err.println(t);}
	static String next(){return ii.next();}
	static boolean hasNext(){return ii.hasNext();}
	static int nextInt(){return Integer.parseInt(next());}
	static long nextLong(){return Long.parseLong(next());}
	static double nextDouble(){return Double.parseDouble(next());}
	static ArrayList<String> nextStrArray(){return myconv(next(), 8);}
	static ArrayList<String> nextCharArray(){return myconv(next(), 0);}
	static ArrayList<Integer> nextIntArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Integer.parseInt(input.get(i)));
		}
		return ret;
	}
	static ArrayList<Long> nextLongArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Long.parseLong(input.get(i)));
		}
		return ret;
	}
	static String myconv(Object list, int no){//only join
		String joinString = CONVSTR.get(no);
		if(list instanceof String[]){
			return String.join(joinString, (String[])list);
		}else if(list instanceof ArrayList){
			return String.join(joinString, (ArrayList)list);
		}else{
			throw new ClassCastException("Don't join");
		}
	}
	static ArrayList<String> myconv(String str, int no){//only split
		String splitString = CONVSTR.get(no);
		return new ArrayList<String>(Arrays.asList(str.split(splitString)));
	}
	public static void main(String[] args){
		CONVSTR.put(8, " "); CONVSTR.put(9, "\n"); CONVSTR.put(0, "");
		solve();flush();
	}
	//Don't have to see. end------------------------------------------
	static void solve(){//Here is the main function
		ArrayList<Integer> one = nextIntArray();
		int N = one.get(0);
		int K = one.get(1);
		long output = 0;
		ArrayList<Integer> list = nextIntArray();
		Collections.sort(list, Comparator.reverseOrder());
		for(int i = K; i < N; i++){
			output += list.get(i);
		}
		myout(output);
	}
	//Method addition frame start

	//Method addition frame end
}

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


Question:
import java.util.*; import java.io.*; import java.math.*;
public class Main{
	//Don't have to see. start------------------------------------------
	static class InputIterator{
		ArrayList<String> inputLine = new ArrayList<String>(1024);
		int index = 0; int max; String read;
		InputIterator(){
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			try{
				while((read = br.readLine()) != null){
					inputLine.add(read);
				}
			}catch(IOException e){}
			max = inputLine.size();
		}
		boolean hasNext(){return (index < max);}
		String next(){
			if(hasNext()){
				return inputLine.get(index++);
			}else{
				throw new IndexOutOfBoundsException("There is no more input");
			}
		}
	}
	static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();
	static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.
	static PrintWriter out = new PrintWriter(System.out);
	static void flush(){out.flush();}
	static void myout(Object t){out.println(t);}
	static void myerr(Object t){System.err.print("debug:");System.err.println(t);}
	static String next(){return ii.next();}
	static boolean hasNext(){return ii.hasNext();}
	static int nextInt(){return Integer.parseInt(next());}
	static long nextLong(){return Long.parseLong(next());}
	static double nextDouble(){return Double.parseDouble(next());}
	static ArrayList<String> nextStrArray(){return myconv(next(), 8);}
	static ArrayList<String> nextCharArray(){return myconv(next(), 0);}
	static ArrayList<Integer> nextIntArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Integer.parseInt(input.get(i)));
		}
		return ret;
	}
	static ArrayList<Long> nextLongArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Long.parseLong(input.get(i)));
		}
		return ret;
	}
	static String myconv(Object list, int no){//only join
		String joinString = CONVSTR.get(no);
		if(list instanceof String[]){
			return String.join(joinString, (String[])list);
		}else if(list instanceof ArrayList){
			return String.join(joinString, (ArrayList)list);
		}else{
			throw new ClassCastException("Don't join");
		}
	}
	static ArrayList<String> myconv(String str, int no){//only split
		String splitString = CONVSTR.get(no);
		return new ArrayList<String>(Arrays.asList(str.split(splitString)));
	}
	public static void main(String[] args){
		CONVSTR.put(8, " "); CONVSTR.put(9, "\n"); CONVSTR.put(0, "");

		solve();flush();

	}
	//Don't have to see. end------------------------------------------
	static void solve(){//Here is the main function
		int N = nextInt();
		int[][] list = new int[10][10];
		for(int i = 1; i <= N; i++){
			int tmp = i;
			while(tmp >= 10){
				tmp /= 10;
			}
			list[i % 10][tmp]++;
		}
		long output = 0;
		for(int i = 1; i <= 9; i++){
			for(int j = 1; j <= 9; j++){
				output += list[i][j] * list[j][i];
			}
		}
		myout(output);
	}
	//Method addition frame start

	//Method addition frame end
}

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


Question:
import java.util.*;
public class Main {
	public static void myout(Object text){//standard output
		System.out.println(text);
	}
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		//String tmp = sc.next();
		//int tmp = sc.nextInt();
		//Long tmp = sc.nextLong();
      Long output = new Long(0);
      int N = sc.nextInt();
      int M = sc.nextInt();
      PriorityQueue<Integer> pq = new PriorityQueue<Integer>(Comparator.reverseOrder());
      int i;
      for(i = 0; i < N; i++){
        pq.add(sc.nextInt());
      }
      for(i = 0; i < M; i++){
        int max = pq.poll();
        pq.add(max / 2);
      }
      for(i = 0; i < N; i++){
        output += pq.poll();
      }
      myout(output);
	}
}

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


Question:
import java.util.*; import java.io.*; import java.math.*;
public class Main{
	//Don't have to see. start------------------------------------------
	static class InputIterator{
		ArrayList<String> inputLine = new ArrayList<String>(1024);
		int index = 0; int max; String read;
		InputIterator(){
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			try{
				while((read = br.readLine()) != null){
					inputLine.add(read);
				}
			}catch(IOException e){}
			max = inputLine.size();
		}
		boolean hasNext(){return (index < max);}
		String next(){
			if(hasNext()){
				return inputLine.get(index++);
			}else{
				throw new IndexOutOfBoundsException("There is no more input");
			}
		}
	}
	static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();
	static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.
	static PrintWriter out = new PrintWriter(System.out);
	static void flush(){out.flush();}
	static void myout(Object t){out.println(t);}
	static void myerr(Object t){System.err.print("debug:");System.err.println(t);}
	static String next(){return ii.next();}
	static boolean hasNext(){return ii.hasNext();}
	static int nextInt(){return Integer.parseInt(next());}
	static long nextLong(){return Long.parseLong(next());}
	static double nextDouble(){return Double.parseDouble(next());}
	static ArrayList<String> nextStrArray(){return myconv(next(), 8);}
	static ArrayList<String> nextCharArray(){return myconv(next(), 0);}
	static ArrayList<Integer> nextIntArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Integer.parseInt(input.get(i)));
		}
		return ret;
	}
	static ArrayList<Long> nextLongArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Long.parseLong(input.get(i)));
		}
		return ret;
	}
	static String myconv(Object list, int no){//only join
		String joinString = CONVSTR.get(no);
		if(list instanceof String[]){
			return String.join(joinString, (String[])list);
		}else if(list instanceof ArrayList){
			return String.join(joinString, (ArrayList)list);
		}else{
			throw new ClassCastException("Don't join");
		}
	}
	static ArrayList<String> myconv(String str, int no){//only split
		String splitString = CONVSTR.get(no);
		return new ArrayList<String>(Arrays.asList(str.split(splitString)));
	}
	public static void main(String[] args){
		CONVSTR.put(8, " "); CONVSTR.put(9, "\n"); CONVSTR.put(0, "");
		solve();flush();
	}
	//Don't have to see. end------------------------------------------
	static void solve(){//Here is the main function
		  int N = nextInt();
		  ArrayList<Integer> list = nextIntArray();
		  int[] newlist = new int[N];
		  newlist[0] = list.get(0);
		  for(int i = 1; i < N; i++){
		    newlist[i - 1] = Math.min(newlist[i - 1], list.get(i - 1));
		    newlist[i] = list.get(i - 1);
		  }
		  int output = 0;
		  for(int i = 0; i < N; i++){
		    output += newlist[i];
		  }
		  myout(output);
	}
	//Method addition frame start

	//Method addition frame end
}

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


Question:
import java.util.*; import java.io.*; import java.math.*;
public class Main{
	//Don't have to see. start------------------------------------------
	static class InputIterator{
		ArrayList<String> inputLine = new ArrayList<String>(1024);
		int index = 0; int max; String read;
		InputIterator(){
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			try{
				while((read = br.readLine()) != null){
					inputLine.add(read);
				}
			}catch(IOException e){}
			max = inputLine.size();
		}
		boolean hasNext(){return (index < max);}
		String next(){
			if(hasNext()){
				return inputLine.get(index++);
			}else{
				throw new IndexOutOfBoundsException("There is no more input");
			}
		}
	}
	static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();
	static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.
	static PrintWriter out = new PrintWriter(System.out);
	static void flush(){out.flush();}
	static void myout(Object t){out.println(t);}
	static void myerr(Object t){System.err.print("debug:");System.err.println(t);}
	static String next(){return ii.next();}
	static boolean hasNext(){return ii.hasNext();}
	static int nextInt(){return Integer.parseInt(next());}
	static long nextLong(){return Long.parseLong(next());}
	static double nextDouble(){return Double.parseDouble(next());}
	static ArrayList<String> nextStrArray(){return myconv(next(), 8);}
	static ArrayList<String> nextCharArray(){return myconv(next(), 0);}
	static ArrayList<Integer> nextIntArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Integer.parseInt(input.get(i)));
		}
		return ret;
	}
	static ArrayList<Long> nextLongArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Long.parseLong(input.get(i)));
		}
		return ret;
	}
	static String myconv(Object list, int no){//only join
		String joinString = CONVSTR.get(no);
		if(list instanceof String[]){
			return String.join(joinString, (String[])list);
		}else if(list instanceof ArrayList){
			return String.join(joinString, (ArrayList)list);
		}else{
			throw new ClassCastException("Don't join");
		}
	}
	static ArrayList<String> myconv(String str, int no){//only split
		String splitString = CONVSTR.get(no);
		return new ArrayList<String>(Arrays.asList(str.split(splitString)));
	}
	public static void main(String[] args){
		CONVSTR.put(8, " "); CONVSTR.put(9, "\n"); CONVSTR.put(0, "");
		solve();flush();
	}
	//Don't have to see. end------------------------------------------
	static void solve(){//Here is the main function
		  int N = nextInt();
		  ArrayList<Integer> list = nextIntArray();
		  int count = 0;
		  for(int i = 1; i < N - 1; i++){
		    if((list.get(i - 1) < list.get(i) && list.get(i) < list.get(i + 1)) || (list.get(i - 1) > list.get(i) && list.get(i) > list.get(i + 1))){
		      count++;
		    }
		  }
		  myout(count);
	}
	//Method addition frame start

	//Method addition frame end
}

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


Question:
import java.util.*; import java.io.*; import java.math.*;
public class Main{
	//Don't have to see. start------------------------------------------
	static class InputIterator{
		ArrayList<String> inputLine = new ArrayList<String>(1024);
		int index = 0; int max; String read;
		InputIterator(){
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			try{
				while((read = br.readLine()) != null){
					inputLine.add(read);
				}
			}catch(IOException e){}
			max = inputLine.size();
		}
		boolean hasNext(){return (index < max);}
		String next(){
			if(hasNext()){
				return inputLine.get(index++);
			}else{
				throw new IndexOutOfBoundsException("There is no more input");
			}
		}
	}
	static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();
	static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.
	static PrintWriter out = new PrintWriter(System.out);
	static void flush(){out.flush();}
	static void myout(Object t){out.println(t);}
	static void myerr(Object t){System.err.print("debug:");System.err.println(t);}
	static String next(){return ii.next();}
	static boolean hasNext(){return ii.hasNext();}
	static int nextInt(){return Integer.parseInt(next());}
	static long nextLong(){return Long.parseLong(next());}
	static double nextDouble(){return Double.parseDouble(next());}
	static ArrayList<String> nextStrArray(){return myconv(next(), 8);}
	static ArrayList<String> nextCharArray(){return myconv(next(), 0);}
	static ArrayList<Integer> nextIntArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Integer.parseInt(input.get(i)));
		}
		return ret;
	}
	static ArrayList<Long> nextLongArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Long.parseLong(input.get(i)));
		}
		return ret;
	}
	static String myconv(Object list, int no){//only join
		String joinString = CONVSTR.get(no);
		if(list instanceof String[]){
			return String.join(joinString, (String[])list);
		}else if(list instanceof ArrayList){
			return String.join(joinString, (ArrayList)list);
		}else{
			throw new ClassCastException("Don't join");
		}
	}
	static ArrayList<String> myconv(String str, int no){//only split
		String splitString = CONVSTR.get(no);
		return new ArrayList<String>(Arrays.asList(str.split(splitString)));
	}
	public static void main(String[] args){
		CONVSTR.put(8, " "); CONVSTR.put(9, "\n"); CONVSTR.put(0, "");
		solve();flush();
	}
	//Don't have to see. end------------------------------------------
	static void solve(){//Here is the main function
      int N = nextInt();
      Node[] list = new Node[N];
      for(int i = 0; i < N; i++){
        ArrayList<Integer> tmp = nextIntArray();
        list[i] = new Node(tmp.get(0), tmp.get(1));
      }
      Arrays.sort(list, new originComparator());
      int sum = 0;
      for(int i = 0; i < N; i++){
        if(sum + list[i].A <= list[i].B){
          sum += list[i].A;
        }else{
          myout("No");
          return;
        }
      }
      myout("Yes");
	}
	//Method addition frame start

static class Node{
  int A;
  int B;
  Node(int a, int b){
  	A = a;
    B = b;
  }
}

static class originComparator implements Comparator<Node>{
  public int compare(Node mae, Node ato){
    return mae.B - ato.B;
  }
}

	//Method addition frame end
}

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


Question:
import java.util.*; import java.io.*; import java.math.*;
public class Main{
	static void solve(){//Here is the main function
		int N = nextInt();
		int mod = 1000000007;
		int[] dp = new int[200005];
		dp[0] = 1;
		int mae = 0;
		for(int i = 0; i < N; i++){
			int C = nextInt();
			if(C == mae){
				continue;
			}
			dp[C] = (int)(((long)dp[C] + dp[mae]) % mod);
			mae = C;
		}
		myout(dp[mae]);
	}
	//Method addition frame start

	//Method addition frame end

	//Don't have to see. start------------------------------------------
	static class InputIterator{
		ArrayList<String> inputLine = new ArrayList<String>(1024);
		int index = 0; int max; String read;
		InputIterator(){
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			try{
				while((read = br.readLine()) != null){
					inputLine.add(read);
				}
			}catch(IOException e){}
			max = inputLine.size();
		}
		boolean hasNext(){return (index < max);}
		String next(){
			if(hasNext()){
				return inputLine.get(index++);
			}else{
				throw new IndexOutOfBoundsException("There is no more input");
			}
		}
	}
	static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();
	static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.
	static PrintWriter out = new PrintWriter(System.out);
	static void flush(){out.flush();}
	static void myout(Object t){out.println(t);}
	static void myerr(Object t){System.err.print("debug:");System.err.println(t);}
	static String next(){return ii.next();}
	static boolean hasNext(){return ii.hasNext();}
	static int nextInt(){return Integer.parseInt(next());}
	static long nextLong(){return Long.parseLong(next());}
	static double nextDouble(){return Double.parseDouble(next());}
	static ArrayList<String> nextStrArray(){return myconv(next(), 8);}
	static ArrayList<String> nextCharArray(){return myconv(next(), 0);}
	static ArrayList<Integer> nextIntArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Integer.parseInt(input.get(i)));
		}
		return ret;
	}
	static ArrayList<Long> nextLongArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Long.parseLong(input.get(i)));
		}
		return ret;
	}
	@SuppressWarnings("unchecked")
	static String myconv(Object list, int no){//only join
		String joinString = CONVSTR.get(no);
		if(list instanceof String[]){
			return String.join(joinString, (String[])list);
		}else if(list instanceof ArrayList){
			return String.join(joinString, (ArrayList)list);
		}else{
			throw new ClassCastException("Don't join");
		}
	}
	static ArrayList<String> myconv(String str, int no){//only split
		String splitString = CONVSTR.get(no);
		return new ArrayList<String>(Arrays.asList(str.split(splitString)));
	}
	public static void main(String[] args){
		CONVSTR.put(8, " "); CONVSTR.put(9, "\n"); CONVSTR.put(0, "");
		solve();flush();
	}
	//Don't have to see. end------------------------------------------
}

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


Question:
import java.util.*; import java.io.*; import java.math.*;
public class Main{
	static void solve(){//Here is the main function
		int N = nextInt();
		int mod = 1000000007;
		int[] dp = new int[200005];
		dp[0] = 1;
		int mae = 0;
		for(int i = 0; i < N; i++){
			int C = nextInt();
			if(C == mae){
				continue;
			}
			dp[C] = (int)(((long)dp[C] + dp[mae]) % mod);
			mae = C;
		}
		myout(dp[mae]);
	}
	//Method addition frame start

	//Method addition frame end

	//Don't have to see. start------------------------------------------
	static class InputIterator{
		ArrayList<String> inputLine = new ArrayList<String>(1024);
		int index = 0; int max; String read;
		InputIterator(){
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			try{
				while((read = br.readLine()) != null){
					inputLine.add(read);
				}
			}catch(IOException e){}
			max = inputLine.size();
		}
		boolean hasNext(){return (index < max);}
		String next(){
			if(hasNext()){
				return inputLine.get(index++);
			}else{
				throw new IndexOutOfBoundsException("There is no more input");
			}
		}
	}
	static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();
	static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.
	static PrintWriter out = new PrintWriter(System.out);
	static void flush(){out.flush();}
	static void myout(Object t){out.println(t);}
	static void myerr(Object t){System.err.print("debug:");System.err.println(t);}
	static String next(){return ii.next();}
	static boolean hasNext(){return ii.hasNext();}
	static int nextInt(){return Integer.parseInt(next());}
	static long nextLong(){return Long.parseLong(next());}
	static double nextDouble(){return Double.parseDouble(next());}
	static ArrayList<String> nextStrArray(){return myconv(next(), 8);}
	static ArrayList<String> nextCharArray(){return myconv(next(), 0);}
	static ArrayList<Integer> nextIntArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Integer.parseInt(input.get(i)));
		}
		return ret;
	}
	static ArrayList<Long> nextLongArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Long.parseLong(input.get(i)));
		}
		return ret;
	}
	@SuppressWarnings("unchecked")
	static String myconv(Object list, int no){//only join
		String joinString = CONVSTR.get(no);
		if(list instanceof String[]){
			return String.join(joinString, (String[])list);
		}else if(list instanceof ArrayList){
			return String.join(joinString, (ArrayList)list);
		}else{
			throw new ClassCastException("Don't join");
		}
	}
	static ArrayList<String> myconv(String str, int no){//only split
		String splitString = CONVSTR.get(no);
		return new ArrayList<String>(Arrays.asList(str.split(splitString)));
	}
	public static void main(String[] args){
		CONVSTR.put(8, " "); CONVSTR.put(9, "\n"); CONVSTR.put(0, "");
		solve();flush();
	}
	//Don't have to see. end------------------------------------------
}

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


Question:
import java.util.*; import java.io.*; import java.math.*;
public class Main{
	static void solve(){//Here is the main function
		int N = nextInt();
		int mod = 1000000007;
		int[] dp = new int[200005];
		dp[0] = 1;
		int mae = 0;
		for(int i = 0; i < N; i++){
			int C = nextInt();
			if(C == mae){
				continue;
			}
			dp[C] = (int)(((long)dp[C] + dp[mae]) % mod);
			mae = C;
		}
		myout(dp[mae]);
	}
	//Method addition frame start

	//Method addition frame end

	//Don't have to see. start------------------------------------------
	static class InputIterator{
		ArrayList<String> inputLine = new ArrayList<String>(1024);
		int index = 0; int max; String read;
		InputIterator(){
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			try{
				while((read = br.readLine()) != null){
					inputLine.add(read);
				}
			}catch(IOException e){}
			max = inputLine.size();
		}
		boolean hasNext(){return (index < max);}
		String next(){
			if(hasNext()){
				return inputLine.get(index++);
			}else{
				throw new IndexOutOfBoundsException("There is no more input");
			}
		}
	}
	static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();
	static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.
	static PrintWriter out = new PrintWriter(System.out);
	static void flush(){out.flush();}
	static void myout(Object t){out.println(t);}
	static void myerr(Object t){System.err.print("debug:");System.err.println(t);}
	static String next(){return ii.next();}
	static boolean hasNext(){return ii.hasNext();}
	static int nextInt(){return Integer.parseInt(next());}
	static long nextLong(){return Long.parseLong(next());}
	static double nextDouble(){return Double.parseDouble(next());}
	static ArrayList<String> nextStrArray(){return myconv(next(), 8);}
	static ArrayList<String> nextCharArray(){return myconv(next(), 0);}
	static ArrayList<Integer> nextIntArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Integer.parseInt(input.get(i)));
		}
		return ret;
	}
	static ArrayList<Long> nextLongArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Long.parseLong(input.get(i)));
		}
		return ret;
	}
	@SuppressWarnings("unchecked")
	static String myconv(Object list, int no){//only join
		String joinString = CONVSTR.get(no);
		if(list instanceof String[]){
			return String.join(joinString, (String[])list);
		}else if(list instanceof ArrayList){
			return String.join(joinString, (ArrayList)list);
		}else{
			throw new ClassCastException("Don't join");
		}
	}
	static ArrayList<String> myconv(String str, int no){//only split
		String splitString = CONVSTR.get(no);
		return new ArrayList<String>(Arrays.asList(str.split(splitString)));
	}
	public static void main(String[] args){
		CONVSTR.put(8, " "); CONVSTR.put(9, "\n"); CONVSTR.put(0, "");
		solve();flush();
	}
	//Don't have to see. end------------------------------------------
}

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


Question:
import java.util.*; import java.io.*; import java.math.*;
public class Main{
	//Don't have to see. start------------------------------------------
	static class InputIterator{
		ArrayList<String> inputLine = new ArrayList<String>(1024);
		int index = 0; int max; String read;
		InputIterator(){
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			try{
				while((read = br.readLine()) != null){
					inputLine.add(read);
				}
			}catch(IOException e){}
			max = inputLine.size();
		}
		boolean hasNext(){return (index < max);}
		String next(){
			if(hasNext()){
				return inputLine.get(index++);
			}else{
				throw new IndexOutOfBoundsException("There is no more input");
			}
		}
	}
	static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();
	static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.
	static PrintWriter out = new PrintWriter(System.out);
	static void flush(){out.flush();}
	static void myout(Object t){out.println(t);}
	static void myerr(Object t){System.err.print("debug:");System.err.println(t);}
	static String next(){return ii.next();}
	static boolean hasNext(){return ii.hasNext();}
	static int nextInt(){return Integer.parseInt(next());}
	static long nextLong(){return Long.parseLong(next());}
	static double nextDouble(){return Double.parseDouble(next());}
	static ArrayList<String> nextStrArray(){return myconv(next(), 8);}
	static ArrayList<String> nextCharArray(){return myconv(next(), 0);}
	static ArrayList<Integer> nextIntArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Integer.parseInt(input.get(i)));
		}
		return ret;
	}
	static ArrayList<Long> nextLongArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Long.parseLong(input.get(i)));
		}
		return ret;
	}
	static String myconv(Object list, int no){//only join
		String joinString = CONVSTR.get(no);
		if(list instanceof String[]){
			return String.join(joinString, (String[])list);
		}else if(list instanceof ArrayList){
			return String.join(joinString, (ArrayList)list);
		}else{
			throw new ClassCastException("Don't join");
		}
	}
	static ArrayList<String> myconv(String str, int no){//only split
		String splitString = CONVSTR.get(no);
		return new ArrayList<String>(Arrays.asList(str.split(splitString)));
	}
	public static void main(String[] args){
		CONVSTR.put(8, " "); CONVSTR.put(9, "\n"); CONVSTR.put(0, "");
		solve();flush();
	}
	//Don't have to see. end------------------------------------------
	static void solve(){//Here is the main function
		ArrayList<Integer> one = nextIntArray();
		int N = one.get(0);
		int T = one.get(1);
		TreeSet<Integer> set = new TreeSet<Integer>();
		for(int i = 0; i < N; i++){
			ArrayList<Integer> tmp = nextIntArray();
			if(tmp.get(1) <= T){
				set.add(tmp.get(0));
			}
		}
		if(set.size() != 0){
			myout(set.first());
		}else{
			myout("TLE");
		}

	}
	//Method addition frame start

	//Method addition frame end
}

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


Question:
import java.util.*; import java.io.*; import java.math.*;
public class Main{
	//Don't have to see. start------------------------------------------
	static class InputIterator{
		ArrayList<String> inputLine = new ArrayList<String>(1024);
		int index = 0; int max; String read;
		InputIterator(){
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			try{
				while((read = br.readLine()) != null){
					inputLine.add(read);
				}
			}catch(IOException e){}
			max = inputLine.size();
		}
		boolean hasNext(){return (index < max);}
		String next(){
			if(hasNext()){
				return inputLine.get(index++);
			}else{
				throw new IndexOutOfBoundsException("There is no more input");
			}
		}
	}
	static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();
	static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.
	static PrintWriter out = new PrintWriter(System.out);
	static void flush(){out.flush();}
	static void myout(Object t){out.println(t);}
	static void myerr(Object t){System.err.print("debug:");System.err.println(t);}
	static String next(){return ii.next();}
	static boolean hasNext(){return ii.hasNext();}
	static int nextInt(){return Integer.parseInt(next());}
	static long nextLong(){return Long.parseLong(next());}
	static double nextDouble(){return Double.parseDouble(next());}
	static ArrayList<String> nextStrArray(){return myconv(next(), 8);}
	static ArrayList<String> nextCharArray(){return myconv(next(), 0);}
	static ArrayList<Integer> nextIntArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Integer.parseInt(input.get(i)));
		}
		return ret;
	}
	static ArrayList<Long> nextLongArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Long.parseLong(input.get(i)));
		}
		return ret;
	}
	static String myconv(Object list, int no){//only join
		String joinString = CONVSTR.get(no);
		if(list instanceof String[]){
			return String.join(joinString, (String[])list);
		}else if(list instanceof ArrayList){
			return String.join(joinString, (ArrayList)list);
		}else{
			throw new ClassCastException("Don't join");
		}
	}
	static ArrayList<String> myconv(String str, int no){//only split
		String splitString = CONVSTR.get(no);
		return new ArrayList<String>(Arrays.asList(str.split(splitString)));
	}
	public static void main(String[] args){
		CONVSTR.put(8, " "); CONVSTR.put(9, "\n"); CONVSTR.put(0, "");
		solve();flush();
	}
	//Don't have to see. end------------------------------------------
	static void solve(){//Here is the main function
      int N = nextInt();
      int output = 0;
      for(int i = 1; i <= N; i += 2){
        ArrayList<Long> list = getDivisorList(i);
        if(list.size() == 8){
          output++;
        }
      }
      myout(output);
	}
	//Method addition frame start

public static ArrayList<Long> getDivisorList(long val){
        ArrayList<Long> list = new ArrayList<Long>(1024);
        for(long i = 1; i * i <= val; i++){
                if(val % i == 0){
                        list.add(i);
                        if(i * i != val){
                                list.add(val / i);
                        }
                }
        }
        Collections.sort(list);
        return list;
}

	//Method addition frame end
}

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


Question:
import java.util.*; import java.io.*; import java.math.*;
public class Main{
	//Don't have to see. start------------------------------------------
	static class InputIterator{
		ArrayList<String> inputLine = new ArrayList<String>(1024);
		int index = 0; int max; String read;
		InputIterator(){
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			try{
				while((read = br.readLine()) != null){
					inputLine.add(read);
				}
			}catch(IOException e){}
			max = inputLine.size();
		}
		boolean hasNext(){return (index < max);}
		String next(){
			if(hasNext()){
				return inputLine.get(index++);
			}else{
				throw new IndexOutOfBoundsException("There is no more input");
			}
		}
	}
	static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();
	static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.
	static PrintWriter out = new PrintWriter(System.out);
	static void flush(){out.flush();}
	static void myout(Object t){out.println(t);}
	static void myerr(Object t){System.err.print("debug:");System.err.println(t);}
	static String next(){return ii.next();}
	static boolean hasNext(){return ii.hasNext();}
	static int nextInt(){return Integer.parseInt(next());}
	static long nextLong(){return Long.parseLong(next());}
	static double nextDouble(){return Double.parseDouble(next());}
	static ArrayList<String> nextStrArray(){return myconv(next(), 8);}
	static ArrayList<String> nextCharArray(){return myconv(next(), 0);}
	static ArrayList<Integer> nextIntArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Integer.parseInt(input.get(i)));
		}
		return ret;
	}
	static ArrayList<Long> nextLongArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Long.parseLong(input.get(i)));
		}
		return ret;
	}
	static String myconv(Object list, int no){//only join
		String joinString = CONVSTR.get(no);
		if(list instanceof String[]){
			return String.join(joinString, (String[])list);
		}else if(list instanceof ArrayList){
			return String.join(joinString, (ArrayList)list);
		}else{
			throw new ClassCastException("Don't join");
		}
	}
	static ArrayList<String> myconv(String str, int no){//only split
		String splitString = CONVSTR.get(no);
		return new ArrayList<String>(Arrays.asList(str.split(splitString)));
	}
	public static void main(String[] args){
		CONVSTR.put(8, " "); CONVSTR.put(9, "\n"); CONVSTR.put(0, "");
		solve();flush();
	}
	//Don't have to see. end------------------------------------------
	static void solve(){//Here is the main function
	ArrayList<String> list = nextCharArray();
	String[] ch = "abcdefghijklmnopqrstuvwxyz".split("");
	if(list.size() != 26){
		for(int i = 0; i < 26; i++){
			if(list.indexOf(ch[i]) == -1){
				list.add(ch[i]);
				break;
			}
		}
	}else{
		ArrayList<String> tmpList = new ArrayList<String>();
		while(list.size() > 0){
			tmpList.add(list.get(list.size() - 1));
          	list.remove(list.size() - 1);
			Collections.sort(tmpList);
			boolean isOK = false;
			for(int i = 0; i < tmpList.size(); i++){
              	if(list.size() == 0){
                  break;
                }
				if(list.get(list.size() - 1).compareTo(tmpList.get(i)) < 1){
                  	list.remove(list.size() - 1);
					list.add(tmpList.get(i));
					isOK = true;
					break;
				}
			}
			if(isOK){
				break;
			}
		}
	}
	if(list.size() == 0){
		myout(-1);
	}else{
		myout(myconv(list,0));
	}
	}
	//Method addition frame start

	//Method addition frame end
}

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


Question:
import java.util.*; import java.io.*; import java.math.*;
public class Main{
	//Don't have to see. start------------------------------------------
	static class InputIterator{
		ArrayList<String> inputLine = new ArrayList<String>(1024);
		int index = 0; int max; String read;
		InputIterator(){
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			try{
				while((read = br.readLine()) != null){
					inputLine.add(read);
				}
			}catch(IOException e){}
			max = inputLine.size();
		}
		boolean hasNext(){return (index < max);}
		String next(){
			if(hasNext()){
				return inputLine.get(index++);
			}else{
				throw new IndexOutOfBoundsException("There is no more input");
			}
		}
	}
	static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();
	static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.
	static PrintWriter out = new PrintWriter(System.out);
	static void flush(){out.flush();}
	static void myout(Object t){out.println(t);}
	static void myerr(Object t){System.err.print("debug:");System.err.println(t);}
	static String next(){return ii.next();}
	static boolean hasNext(){return ii.hasNext();}
	static int nextInt(){return Integer.parseInt(next());}
	static long nextLong(){return Long.parseLong(next());}
	static double nextDouble(){return Double.parseDouble(next());}
	static ArrayList<String> nextStrArray(){return myconv(next(), 8);}
	static ArrayList<String> nextCharArray(){return myconv(next(), 0);}
	static ArrayList<Integer> nextIntArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Integer.parseInt(input.get(i)));
		}
		return ret;
	}
	static ArrayList<Long> nextLongArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Long.parseLong(input.get(i)));
		}
		return ret;
	}
	static String myconv(Object list, int no){//only join
		String joinString = CONVSTR.get(no);
		if(list instanceof String[]){
			return String.join(joinString, (String[])list);
		}else if(list instanceof ArrayList){
			return String.join(joinString, (ArrayList)list);
		}else{
			throw new ClassCastException("Don't join");
		}
	}
	static ArrayList<String> myconv(String str, int no){//only split
		String splitString = CONVSTR.get(no);
		return new ArrayList<String>(Arrays.asList(str.split(splitString)));
	}
	public static void main(String[] args){
		CONVSTR.put(8, " "); CONVSTR.put(9, "\n"); CONVSTR.put(0, "");
		solve();flush();
	}
	//Don't have to see. end------------------------------------------
	static void solve(){//Here is the main function
  ArrayList<Long> one = nextLongArray();
  long ai = one.get(0);
  long ao = one.get(1);
  long at = one.get(2);
  long aj = one.get(3);
  long al = one.get(4);
  long as = one.get(5);
  long az = one.get(6);
  long output1 = (ai / 2) * 2 + (aj / 2) * 2 + (al / 2) * 2;
  long output2;
  if(ai >= 1 && aj >= 1 && al >= 1){
    output2= ((ai - 1) / 2) * 2 + ((aj - 1) / 2) * 2 + ((al - 1) / 2) * 2 + 3;
  }else{
    output2 = 0;
  }
  myout(Math.max(output1, output2) + ao);
	}
	//Method addition frame start

	//Method addition frame end
}

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


Question:
import java.io.File;
import java.io.IOException;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.List;
import java.util.Scanner;
import java.util.Map.Entry;

public class Main {

	//MOD、階乗・MODの逆元・階乗の逆元のテーブル
	static int MAX_FAC = 510000;
	static int MOD = 1000000007;
	static long[] fac = new long[MAX_FAC];
	static long[] finv = new long[MAX_FAC];
	static long[] inv = new long[MAX_FAC];

	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner in = new Scanner(file);

		Scanner in = new Scanner(System.in);

		long N = in.nextLong();
		long M = in.nextLong();
		long ans = 1;

		//初期化
		initComb();

		long m = M;
		for (int i = 2; i * i <= m; i++) {
			if (m % i == 0) {
				int count = 0;
				while (m % i == 0) {
					m /= i;
					count++;
				}
				//System.out.println(i + " ^ " + count);
				//N-1+count C count
				ans = (ans * comb((int)N-1+count, count)) % MOD;
			}
		}
		if(m > 1){
			//System.out.println(n + " ^ " + 1);
			ans = (ans * N) % MOD;
		}

		System.out.println(ans);
	}

	//テーブルの初期化
	public static void initComb(){
		fac[0] = finv[0] = inv[0] = fac[1] = finv[1] = inv[1] = 1;
		for (int i = 2; i < MAX_FAC; ++i) {
			fac[i] = fac[i - 1] * i % MOD;
			inv[i] = MOD - (MOD / i) * inv[(int) (MOD % i)] % MOD;
			finv[i] = finv[i - 1] * inv[i] % MOD;
		}
	}

	//nCk % MOD
	public static long comb(int n, int k){
		return fac[n] * finv[k] % MOD * finv[n - k] % MOD;
	}
}

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


Question:
import java.io.File;
import java.io.IOException;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int X = sc.nextInt();
		int[] xp = new int[N+1];
		for(int i = 0; i < N; i++) xp[i] = sc.nextInt();
		xp[N] = X;

		Arrays.sort(xp);
		//for(int i : xp) System.out.println(i);
		int[] dist = new int[N];
		for(int i = 0; i < N; i++) dist[i] = xp[i+1] - xp[i];
		int distMax = dist[N-1];

		int ans = 1;
		/*
		for(int i = 2; i <= distMax; i++){
			boolean tf = true;
			for(int j = 0; j < N; j++){
				if(dist[j] % i != 0){
					tf = false;
					break;
				}
			}
			if(tf) ans = i;
		}
		*/

		for(int i = distMax;i >= 2; i--){
			boolean tf = true;
			for(int j = 0; j < N; j++){
				if(dist[j] % i != 0){
					tf = false;
					break;
				}
			}
			if(tf){
				ans = i;
				break;
			}
		}

		System.out.println(ans);
	}
}

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


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

public class Main {

	public static void main(String[] args) throws IOException {
		FastScanner sc = new FastScanner(System.in);

		int N = sc.nextInt();
		int M = sc.nextInt();
		int Q = sc.nextInt();

		int[][] table = new int[N+1][N+1];
		for(int i = 0; i < M; i++){
			int L = sc.nextInt();
			int R = sc.nextInt();
			table[L][R]++;
		}

		int[][] sum = new int[N+1][N+1];
		for(int i = 1; i <= N; i++){
			for(int j = 1; j <= N; j++){
				sum[i][j] = table[i][j] + sum[i-1][j] + sum[i][j-1] - sum[i-1][j-1];
			}
		}

		for(int i = 0; i < Q; i++){
			int p = sc.nextInt();
			int q = sc.nextInt();
			int ans = sum[q][q] - sum[p-1][q] - sum[q][p-1] + sum[p-1][p-1];
			System.out.println(ans);
		}

	}//end main

}//end Main

class FastScanner {
    private InputStream in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    public FastScanner(InputStream in) {
		this.in = in;
	}
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    private int readByte() {
    	if (hasNextByte()) return buffer[ptr++];
    	else return -1;
    }
    private static boolean isPrintableChar(int c){
    	return 33 <= c && c <= 126;
    }
    public boolean hasNext() {
    	while(hasNextByte() && !isPrintableChar(buffer[ptr]))
    		ptr++; return hasNextByte();
    }
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while(true){
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            }else if(b == -1 || !isPrintableChar(b)){
                return minus ? -n : n;
            }else{
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
        return (int) nl;
    }
    public double nextDouble() {
    	return Double.parseDouble(next());
    }
}

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


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

public class Main {
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner in = new Scanner(file);

		Scanner in = new Scanner(System.in);

		int N = in.nextInt();
		int M = in.nextInt();
		ArrayList<int[]> ab = new ArrayList<int[]>();
		for(int i = 0; i < M; i++){
			int[] edge = {in.nextInt(), in.nextInt()};
			ab.add(edge);
		}

		ab.sort((a1,a2)->a1[1]-a2[1]);

		/*
		for(int i = 0; i < M; i++){
			int[] edge = ab.get(i);
			int a = edge[0];
			int b = edge[1];
			System.out.println(a + " " + b);
		}
		*/

		int ans = 0;
		int preVisitedIndex = 0;

		for(int i = 0; i < M; i++){
			int[] edge = ab.get(i);
			int a = edge[0];
			int b = edge[1];

			if(preVisitedIndex >= a && preVisitedIndex < b)
				continue;

			preVisitedIndex = b - 1;
			ans++;
		}

		System.out.println(ans);
	}
}

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


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

public class Main {
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner in = new Scanner(file);

		Scanner in = new Scanner(System.in);

		int N = in.nextInt();
		int M = in.nextInt();
		ArrayList<int[]> ab = new ArrayList<int[]>();
		for(int i = 0; i < M; i++){
			int[] edge = {in.nextInt(), in.nextInt()};
			ab.add(edge);
		}

		ab.sort((a1,a2)->a1[1]-a2[1]);

		/*
		for(int i = 0; i < M; i++){
			int[] edge = ab.get(i);
			int a = edge[0];
			int b = edge[1];
			System.out.println(a + " " + b);
		}
		*/

		int ans = 0;
		int preVisitedIndex = 0;

		for(int i = 0; i < M; i++){
			int[] edge = ab.get(i);
			int a = edge[0];
			int b = edge[1];

			if(preVisitedIndex >= a && preVisitedIndex < b)
				continue;

			preVisitedIndex = b - 1;
			ans++;
		}

		System.out.println(ans);
	}
}

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


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

public class Main {
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner in = new Scanner(file);

		Scanner in = new Scanner(System.in);

		int N = in.nextInt();
		int M = in.nextInt();
		ArrayList<int[]> ab = new ArrayList<int[]>();
		for(int i = 0; i < M; i++){
			int[] edge = {in.nextInt(), in.nextInt()};
			ab.add(edge);
		}

		ab.sort((a1,a2)->a1[1]-a2[1]);

		/*
		for(int i = 0; i < M; i++){
			int[] edge = ab.get(i);
			int a = edge[0];
			int b = edge[1];
			System.out.println(a + " " + b);
		}
		*/

		int ans = 0;
		int preVisitedIndex = 0;

		for(int i = 0; i < M; i++){
			int[] edge = ab.get(i);
			int a = edge[0];
			int b = edge[1];

			if(preVisitedIndex >= a && preVisitedIndex < b)
				continue;

			preVisitedIndex = b - 1;
			ans++;
		}

		System.out.println(ans);
	}
}

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


Question:
import java.io.File;
import java.io.IOException;
import java.util.*;
import java.util.Map.Entry;

public class Main{

	public static void main(String[] args) throws IOException{
		//File file = new File("input.txt");
		//Scanner in = new Scanner(file);
		Scanner in = new Scanner(System.in);

		int N = in.nextInt();
		long[] An = new long[N];
		for(int i = 0; i < N; i++) An[i] = in.nextLong() - (i + 1);

		Arrays.sort(An);
		long b = An[N / 2];
		long sum = 0;
		for(int i = 0; i < N; i++) sum += Math.abs(An[i] - b);
		System.out.println(sum);
	}
}

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


Question:
import java.io.File;
import java.io.IOException;
import java.util.*;
import java.util.Map.Entry;

public class Main{

	public static void main(String[] args) throws IOException{
		//File file = new File("input.txt");
		//Scanner in = new Scanner(file);
		Scanner in = new Scanner(System.in);

		int N = in.nextInt();
		long[] An = new long[N];
		for(int i = 0; i < N; i++) An[i] = in.nextLong() - (i + 1);

		Arrays.sort(An);
		long b = An[N / 2];
		long sum = 0;
		for(int i = 0; i < N; i++) sum += Math.abs(An[i] - b);
		System.out.println(sum);
	}
}

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


Question:
import java.io.File;
import java.io.IOException;
import java.util.*;
import java.util.Map.Entry;

public class Main{

	public static void main(String[] args) throws IOException{
		//File file = new File("input.txt");
		//Scanner in = new Scanner(file);
		Scanner in = new Scanner(System.in);

		int N = in.nextInt();
		long[] An = new long[N];
		for(int i = 0; i < N; i++) An[i] = in.nextLong() - (i + 1);

		Arrays.sort(An);
		long b = An[N / 2];
		long sum = 0;
		for(int i = 0; i < N; i++) sum += Math.abs(An[i] - b);
		System.out.println(sum);
	}
}

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


Question:
import java.io.File;
import java.io.IOException;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Deque;
import java.util.Scanner;

/*
 * メモ
 * Scanner:nextは空白か改行までの単語
 * String[][] c = new String[h][w];
 * TemplateMain,"template_input.txt"
 * 0.5 == 1.0/2
 * Integer.valueOf(char)はダメ、(String)
 */

public class Main {

	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		String S = sc.next();

		int num = 0;

		for(int i = 0; i < 4; i++){
			if(S.charAt(i) == '+') num++;
			else num--;
		}

		System.out.println(num);
	}
}

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


Question:
import java.util.*;
import java.io.*;
import static java.lang.Math.*;

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

		// 入力
		int n = sc.nextInt();
		int k = sc.nextInt();
		int[][] s = new int[k][2];
		for(int i = 0; i < k; i++){
		    s[i][0] = sc.nextInt();
		    s[i][1] = sc.nextInt();
		}

		// 計算
		long result = 0;
		int MOD = 998244353;
		int[] dp = new int[n+1];
		dp[1] = 1;
		int[] sum = new int[n+1];
		sum[1] = 1;
		for(int i = 2; i <= n; i++){
		    for(int j = 0; j < k; j++){
		        int l = i - s[j][1];
		        int r = i - s[j][0];
		        if(r < 1) continue;
		        l = max(1, l);
		        dp[i] += (sum[r] - sum[l-1] + MOD)%MOD;
		        dp[i] %= MOD;
		    }
		    sum[i] = (sum[i-1] + dp[i])%MOD;
		}
		//System.out.println(Arrays.toString(dp));
		result = dp[n];

		// 出力
		System.out.println(result);

	}

	public static class Scanner {
		private BufferedReader br; private StringTokenizer tok;
		public Scanner(InputStream is) throws IOException { br = new BufferedReader(new InputStreamReader(is));}
		private void getLine() throws IOException { while(!hasNext()) tok = new StringTokenizer(br.readLine());}
		private boolean hasNext() { return tok != null && tok.hasMoreTokens();}
		public String next() throws IOException { getLine(); return tok.nextToken();}
		public int nextInt() throws IOException { return Integer.parseInt(next());}
		public long nextLong() throws IOException { return Long.parseLong(next());}
		public double nextDouble() throws IOException { return Double.parseDouble(next());}
	}

}

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


Question:
import java.util.*;
import static java.lang.Math.*;
import java.math.BigInteger;

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

		// 入力
		int n = sc.nextInt();
		StringBuilder sbP = new StringBuilder();
		StringBuilder sbQ = new StringBuilder();
		for(int i = 0; i < n; i++){
		    sbP.append(sc.nextInt());
		}
		for(int i = 0; i < n; i++){
		    sbQ.append(sc.nextInt());
		}
		String p = sbP.toString();
		String q = sbQ.toString();

		// 計算
		int result = 0;
		StringBuilder sb = new StringBuilder();
		for(int i = 0; i < n; i++){
		    sb.append(i+1);
		}
		String s = sb.toString();
		//System.out.println(s);
		Permutation perm = new Permutation(s);
		int a = perm.list.indexOf(p) + 1;
		int b = perm.list.indexOf(q) + 1;
		result = abs(a - b);

		//System.out.println(perm.list);

		// 出力
		System.out.println(result);
	}
}

class Permutation {
    int n;
    String s;
    ArrayList<String> list;

    public Permutation(String s){
        this.n = s.length();
        this.s = s;

        boolean[] used = new boolean[n];
        ArrayList<String> list = new ArrayList<String>();
        dfs("", used, list);
        this.list = list;
    }

    private void dfs(String s, boolean[] used, ArrayList<String> list){
        if(s.length() == used.length){
            list.add(s);
            return;
        }
        for(int i = 0; i < used.length; i++){
            if(used[i]) continue;
            used[i] = true;
            dfs(s + this.s.charAt(i), used, list);
            used[i] = false;
        }
    }
}

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


Question:
import java.util.*;
import static java.lang.Math.*;
import java.math.BigInteger;

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

		// 入力
		int n = sc.nextInt();
		int m = sc.nextInt();
		ArrayList<Integer>[] list = new ArrayList[3*n+1];
		for(int i = 1; i <= 3*n; i++){
		    list[i] = new ArrayList<Integer>();
		}
		for(int i = 0; i < m; i++){
		    int from = sc.nextInt();
		    int to = sc.nextInt();
		    list[from].add(to + n);
		    list[from + n].add(to + 2*n);
		    list[from + 2*n].add(to);
		}
		int s = sc.nextInt();
		int t = sc.nextInt();

		// 計算
		int result = -1;
		ArrayDeque<Integer> ad = new ArrayDeque<Integer>();
		int[] visited = new int[3*n+1];
		Arrays.fill(visited, Integer.MAX_VALUE);
		ad.add(s);
		visited[s] = 0;
		while(!ad.isEmpty()){
		    Integer now = ad.poll();
		    for(Integer i : list[now]){
		        int before = visited[i];
		        visited[i] = min(visited[i], visited[now]+1);
		        if(before != visited[i]) ad.add(i);
		        if(i == t) break;
		    }
		}
		if(visited[t] != Integer.MAX_VALUE) result = visited[t]/3;

		// 出力
		System.out.println(result);

	}
}

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


Question:
import java.util.*;
import static java.lang.Math.*;
import java.math.BigInteger;

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

		// 入力
		int n = sc.nextInt();
		int m = sc.nextInt();
		ArrayList<Integer>[] list = new ArrayList[3*n+1];
		for(int i = 1; i <= 3*n; i++){
		    list[i] = new ArrayList<Integer>();
		}
		for(int i = 0; i < m; i++){
		    int from = sc.nextInt();
		    int to = sc.nextInt();
		    list[from].add(to + n);
		    list[from + n].add(to + 2*n);
		    list[from + 2*n].add(to);
		}
		int s = sc.nextInt();
		int t = sc.nextInt();

		// 計算
		int result = -1;
		ArrayDeque<Integer> ad = new ArrayDeque<Integer>();
		int[] visited = new int[3*n+1];
		Arrays.fill(visited, Integer.MAX_VALUE);
		ad.add(s);
		visited[s] = 0;
		while(!ad.isEmpty()){
		    Integer now = ad.poll();
		    for(Integer i : list[now]){
		        int before = visited[i];
		        visited[i] = min(visited[i], visited[now]+1);
		        if(before != visited[i]) ad.add(i);
		        if(i == t) break;
		    }
		}
		if(visited[t] != Integer.MAX_VALUE) result = visited[t]/3;

		// 出力
		System.out.println(result);

	}
}

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


Question:
import java.util.*;
import static java.lang.Math.*;
import java.math.BigInteger;

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

		// 入力
		int n = sc.nextInt();
		int m = sc.nextInt();
		int q = sc.nextInt();
		int[][] table = new int[n+1][n+1];
		for(int i = 0; i < m; i++){
		    int x = sc.nextInt();
		    int y = sc.nextInt();
		    table[x][y]++;
		}
		int[][] query = new int[q][2];
		for(int i = 0; i < q; i++){
		    query[i][0] = sc.nextInt();
		    query[i][1] = sc.nextInt();
		}

		// 計算
		int[][] sumTable = new int[n+1][n+1];
		for(int i = 1; i <= n; i++){
		    for(int j = 1; j <= n; j++){
		        sumTable[i][j] = sumTable[i][j-1] + sumTable[i-1][j] - sumTable[i-1][j-1] + table[i][j];
		    }
		}
		int result = 0;
		for(int i = 0; i < q; i++){
		    int x = query[i][0];
		    int y = query[i][1];
		    result = sumTable[y][y] - sumTable[y][x-1] - sumTable[x-1][y] + sumTable[x-1][x-1];
		    System.out.println(result);
		}
	}
}

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


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

public class Main {
	static FastReader in = new FastReader();

	public static void main(String[] args)
	{
		String s = in.nextLine();
		solve(s);
	}

	static void solve(String ss)
	{
		String [] s = ss.split("");
		int largest = -1;
		int curr = 0;
		for(int i = 0; i < s.length; i++)
		{
			if(s[i].equals("R"))
				curr++;
			else
			{
				largest = Math.max(largest, curr);
				curr = 0;
			}
		}
		largest = Math.max(largest, curr);
		System.out.println(largest);
	}

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

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

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

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

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

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

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}
}

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


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

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int T = sc.nextInt();
		int[] c = new int[N];
		int[] t = new int[N];
		int p = 1100;
		for(int i = 0; i < N; i++){
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
		}
		for(int i = 0; i < N; i++){
			if((t[i] <= T) && (c[i] < p)){
					p = c[i];
				}
			}
		if(p == 1100){
			System.out.println("TLE");
		}else{
			System.out.println(p);
		}
	}
}

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


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

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int T = sc.nextInt();
		int[] c = new int[N];
		int[] t = new int[N];
		int p = 1100;
		for(int i = 0; i < N; i++){
			c[i] = sc.nextInt();
			t[i] = sc.nextInt();
		}
		for(int i = 0; i < N; i++){
			if((t[i] <= T) && (c[i] < p)){
					p = c[i];
				}
			}
		if(p == 1100){
			System.out.println("TLE");
		}else{
			System.out.println(p);
		}
	}
}

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


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

public class Main{
    final static String alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".toLowerCase();//.toCharArray();
    static class FastReader{
        BufferedReader br,br1;
        StringTokenizer st;
        public FastReader(){br = new BufferedReader(new InputStreamReader(System.in));}
        public FastReader(String fileName) throws FileNotFoundException{br = new BufferedReader(new FileReader(fileName));}
        String next(){while (st == null || !st.hasMoreElements()){try{st = new StringTokenizer(br.readLine());}catch (IOException  e){e.printStackTrace();}}return st.nextToken();}
        int nextInt(){return Integer.parseInt(next());}
        long nextLong(){return Long.parseLong(next());}
        double nextDouble(){return Double.parseDouble(next());}
        char[][] readCharArray(int n,int m) {
        	String str;
        	char[][] arr = new char[n][m];
        	for(int i=0;i<n;i++) {
        		str=nextLine();
        		for(int j=0;j<n;j++) {
        			arr[i][j]=str.charAt(j);
        		}
        	}
        	return arr;
        }
        char[][] readCharArray(int n){
        	return readCharArray(n,n);
        }
        int[] readArray(int n){int[] a=new int[n];for (int i=0; i<n; i++) a[i]=nextInt();return a;}
        long[] readLongArray(int n){long[] a=new long[n];for (int i=0; i<n; i++) a[i]=nextLong();return a;}
        String nextLine(){String str = "";try{str = br.readLine();}catch (IOException e){e.printStackTrace();}return str;}
    }
    static int getGcd(int n1,int n2){
        while(n1 != n2){
            if(n1 > n2) n1 -= n2;
            else n2 -= n1;
        }
        return n1;
    }
    static boolean isSorted(int[] arr, int n){
        for(int i=1;i<n;i++){
            if(arr[i]<arr[i-1]) return false;
        }
        return true;
    }
    static boolean isPrime(long n){
        if(n==2) return true;
        else if(n%2==0) return false;
        for(int i=3;i<=n/2;i+=2){
            if(n%i==0) return false;
        }
        return true;
    }
    static boolean isPrime(int n){
        if(n==2) return true;
        else if(n%2==0) return false;
        for(int i=3;i<=n/2;i+=2){
            if(n%i==0) return false;
        }
        return true;
    }
    static void printArray(int[] arr){
        for(int x:arr){
            System.out.print(x+" ");
        }
        System.out.println();
    }
    static long Fact(int n){
        //int mod = (int)1e9+7;
        long result = 1;
        for (int i = 1; i <= n; i++) result = (result*i);
        //for (int i = 1; i <= n; i++) result = (result*i)%mod;
        return result;
    }
    static final Random random=new Random();
    static void ruffleSort(int[] a) {
        int n=a.length;//shuffle, then sort
        for (int i=0; i<n; i++) {
            int oi=random.nextInt(n), temp=a[oi];
            a[oi]=a[i]; a[i]=temp;
        }
        Arrays.sort(a);
    }
    static int maxDigit(int n) {
    	int ret=n%10;
    	while(n/10!=0) {
    		ret = Math.max(ret, n%10);
    		n/=10;
    	}ret = Math.max(ret, n%10);
    	return ret;
    }
    public static void main(String[] args) throws NumberFormatException, IOException {
    	//long time = System.currentTimeMillis();
    	FastReader s = new FastReader();
        PrintWriter out = new PrintWriter(System.out);
        int n=s.nextInt();
        int mod = (int)1e9+7;
        int[] a = new int[n];
        long sum=0;
        for(int i=0;i<n;i++) {
        	a[i]=s.nextInt();
        	sum+=a[i];
        	sum%=mod;
        }
        long ans=0;
        for(int i=0;i<n;i++) {
        	sum-=a[i];
        	if(sum<a[i]) sum+=mod;
        	ans+=(a[i]*sum);
        	ans%=mod;
        }
        out.println(ans);
        out.close();
        //System.err.println(System.currentTimeMillis()-time);
    }
}

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


Question:
import java.io.*;
import java.util.*;
public class Main{
    static class FastReader{
        BufferedReader br;
        StringTokenizer st;
        public FastReader(){br = new BufferedReader(new InputStreamReader(System.in));}
        String next(){while (st == null || !st.hasMoreElements()){try{st = new StringTokenizer(br.readLine());}catch (IOException  e){e.printStackTrace();}}return st.nextToken();}
        int nextInt(){return Integer.parseInt(next());}
        long nextLong(){return Long.parseLong(next());}
        double nextDouble(){return Double.parseDouble(next());}
        int[] readArray(int n){int[] a=new int[n];for (int i=0; i<n; i++) a[i]=nextInt();return a;}
        long[] readLongArray(int n){long[] a=new long[n];for (int i=0; i<n; i++) a[i]=nextLong();return a;}
        String nextLine(){String str = "";try{str = br.readLine();}catch (IOException e){e.printStackTrace();}return str;}
    }
    static int getGcd(int n1,int n2){
        while(n1 != n2){
            if(n1 > n2) n1 -= n2;
            else n2 -= n1;
        }
        return n1;
    }
    static boolean isSorted(int[] arr, int n){
        for(int i=1;i<n;i++){
            if(arr[i]<arr[i-1]) return false;
        }
        return true;
    }
    static boolean isPrime(long n){
        if(n==2) return true;
        else if(n%2==0) return false;
        for(int i=3;i<=n/2;i+=2){
            if(n%i==0) return false;
        }
        return true;
    }
    static boolean isPrime(int n){
        if(n==2) return true;
        else if(n%2==0) return false;
        for(int i=3;i<=n/2;i+=2){
            if(n%i==0) return false;
        }
        return true;
    }
    static void printArray(int[] arr){
        for(int x:arr){
            System.out.print(x+" ");
        }
        //System.out.println();
    }
    public static void main(String[] args) throws NumberFormatException, IOException {
        FastReader s=new FastReader();
        int t = s.nextInt();
        double d=s.nextInt();
//        int n;
//        String str;
//        while(t-- > 0){
//
//        }
        d=Math.pow(d,2);
        int count=0;
        int x,y;
        while(t-- > 0){
            x=s.nextInt();y=s.nextInt();
            if(((Math.pow(x,2))+(Math.pow(y,2)))<=d) count++;
        }
        System.out.println(count);
    }
}

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


Question:
import java.io.*;

class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        int[] NMC = new int[3];
        int cont = 0;
        for (String s:str.split(" ")){
            NMC[cont] = Integer.parseInt(s);
            cont++;
        }
        str = br.readLine();
        int[] B =new int[NMC[1]];
        cont = 0;
        for (String s:str.split(" ")){
            B[cont] = Integer.parseInt(s);
            cont++;
        }
        int res;
        int ans = 0;
        for (int i=0;i<NMC[0];i++){
            str = br.readLine();
            res = 0;
            cont = 0;
            for (String s:str.split(" ")){
                res += Integer.parseInt(s) * B[cont];
                cont++;
            }
            res += NMC[2];
            if (res>0){
                ans++;
            }
        }
        System.out.println(ans);
    }
}

Choices:
- Runtime Error
- No abnormally found
- Memory Limit Exceeded
- 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();

    if (a<1200) {
      System.out.println("ABC");
    } else if (a<2800) {
      System.out.println("ARC");
    } else {
      System.out.println("AGC");
    }
  }
}

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


Question:
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.NoSuchElementException;
import java.util.PriorityQueue;

public class Main {

    static int n;
    // static Node[] map;
    static boolean[] still;
    static int[] glen;
    static int[][] gnext;

    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        n = sc.nextInt();
        // map = new Node[n * n + 1];
        // int[] p = new int[n*n];
        still = new boolean[n*n + 1];
        glen = new int[n * n + 1];
        gnext = new int[n*n+1][4];
        Arrays.fill(still, true);

        for (int i = 1; i <= n*n; i++) {
            int len = (i-1) / n;
            len = Math.min(len, (i%n) - 1);
            len = Math.min(len, n - (i - 1) / n - 1);
            len = Math.min(len, n - (i % n));
            if(i % n == 0) len = 0;
            glen[i] = len;
            // map[i] = new Node(i);

            // up
            if(i <= n){
                // map[i].addNext(0);
                gnext[i][0] = -1;
            }else{
                // map[i].addNext(i - n);
                gnext[i][0] = i-n;
            }

            // left
            if(i % n == 1){
                // map[i].addNext(0);
                gnext[i][1] = -1;
            }else{
                // map[i].addNext(i - 1);
                gnext[i][1] = i-1;
            }

            // down
            if(i > n*n - n){
                // map[i].addNext(0);
                gnext[i][2] = -1;
            }else{
                // map[i].addNext(i + n);
                gnext[i][2] = i+n;
            }

            // right
            if(i % n == 0){
                // map[i].addNext(0);
                gnext[i][3] = -1;
            }else{
                // map[i].addNext(i + 1);
                gnext[i][3] = i+1;
            }
        }

        long ans = 0;
        for (int i = 0; i < n * n; i++) {
            int p = sc.nextInt();
            int mlen = glen[p];
            still[p] = false;
            ans += mlen;
            updateLen(p, mlen);
        }

        System.out.println(ans);
    }

    static void updateLen(int p, int len){
        for(int i = 0; i < 4; i++){
            int mnext = gnext[p][i];
            if(mnext < 0) continue;
            if(glen[mnext] > len){
                glen[mnext] = len;
            // if(map[mnext].len > len){
            //     map[mnext].len = len;
                if(still[mnext]){
                    updateLen(mnext, len+1);
                }else{
                    updateLen(mnext, len);
                }
            }
        }
    }

    private static class FastScanner {
        private final InputStream in = System.in;
        private final byte[] buffer = new byte[1024];
        private int ptr = 0;
        private int buflen = 0;

        private boolean hasNextByte() {
            if (ptr < buflen) {
                return true;
            } else {
                ptr = 0;
                try {
                    buflen = in.read(buffer);
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (buflen <= 0) {
                    return false;
                }
            }
            return true;
        }

        private int readByte() {
            if (hasNextByte())
                return buffer[ptr++];
            else
                return -1;
        }

        private static boolean isPrintableChar(int c) {
            return 33 <= c && c <= 126;
        }

        public boolean hasNext() {
            while (hasNextByte() && !isPrintableChar(buffer[ptr]))
                ptr++;
            return hasNextByte();
        }

        public String next() {
            if (!hasNext())
                throw new NoSuchElementException();
            StringBuilder sb = new StringBuilder();
            int b = readByte();
            while (isPrintableChar(b)) {
                sb.appendCodePoint(b);
                b = readByte();
            }
            return sb.toString();
        }

        public long nextLong() {
            if (!hasNext())
                throw new NoSuchElementException();
            long n = 0;
            boolean minus = false;
            int b = readByte();
            if (b == '-') {
                minus = true;
                b = readByte();
            }
            if (b < '0' || '9' < b) {
                throw new NumberFormatException();
            }
            while (true) {
                if ('0' <= b && b <= '9') {
                    n *= 10;
                    n += b - '0';
                } else if (b == -1 || !isPrintableChar(b)) {
                    return minus ? -n : n;
                } else {
                    throw new NumberFormatException();
                }
                b = readByte();
            }
        }

        public int nextInt() {
            long nl = nextLong();
            if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
                throw new NumberFormatException();
            return (int) nl;
        }

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

}

class Node{
    int id;
    // int len;
    ArrayList<Integer> next;

    public Node(int id){
        this.id = id;
        // this.len = len;
        next = new ArrayList<Integer>();
    }

    public void addNext(int next){
        this.next.add(next);
    }
}

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


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

public class Main {
    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        long w = sc.nextLong();
        long h = sc.nextLong();
        long x = sc.nextLong();
        long y = sc.nextLong();

        double area = (double)w*(double)h/2.0;

        if((double)x == (double)w / 2 && (double)y == (double)h / 2){
            System.out.println(area + " " + 1);
        }else{
            System.out.println(area + " " + 0);
        }
    }

    private static class FastScanner {
        private final InputStream in = System.in;
        private final byte[] buffer = new byte[1024];
        private int ptr = 0;
        private int buflen = 0;
        private boolean hasNextByte() {
            if (ptr < buflen) {
                return true;
            }else{
                ptr = 0;
                try {
                    buflen = in.read(buffer);
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (buflen <= 0) {
                    return false;
                }
            }
            return true;
        }
        private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
        private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
        public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
        public String next() {
            if (!hasNext()) throw new NoSuchElementException();
            StringBuilder sb = new StringBuilder();
            int b = readByte();
            while(isPrintableChar(b)) {
                sb.appendCodePoint(b);
                b = readByte();
            }
            return sb.toString();
        }
        public long nextLong() {
            if (!hasNext()) throw new NoSuchElementException();
            long n = 0;
            boolean minus = false;
            int b = readByte();
            if (b == '-') {
                minus = true;
                b = readByte();
            }
            if (b < '0' || '9' < b) {
                throw new NumberFormatException();
            }
            while(true){
                if ('0' <= b && b <= '9') {
                    n *= 10;
                    n += b - '0';
                }else if(b == -1 || !isPrintableChar(b)){
                    return minus ? -n : n;
                }else{
                    throw new NumberFormatException();
                }
                b = readByte();
            }
        }
        public int nextInt() {
            long nl = nextLong();
            if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
            return (int) nl;
        }
        public double nextDouble() { return Double.parseDouble(next());}
    }
}

Choices:
- Memory Limit Exceeded
- Compile Error
- No abnormally found
- 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();
        long b = sc.nextLong();
        long c = sc.nextLong();
        long k = sc.nextLong();
        sc.close();

        if(k % 2 == 0){
            System.out.println(a-b);
        }else{
            System.out.println(b-a);
        }
    }
}

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


Question:
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        for(int i=0; i<n; i++){
            a[i] = sc.nextInt();
        }
        sc.close();

        long ans = 1;
        int pos = 0;    //pos: 1 zero: 0, neg: -1
        for(int i=1; i<n; i++){
            if(pos == 0){
                if(a[i] - a[i-1] < 0){
                    pos = -1;
                }else if(a[i] - a[i-1] > 0){
                    pos = 1;
                }
            }else if(pos == 1){
                if(a[i] - a[i-1] < 0){
                    ans++;
                    pos = 0;
                }
            }else if(pos == -1){
                if(a[i] - a[i-1] > 0){
                    ans++;
                    pos = 0;
                }
            }
        }
        System.out.println(ans);
    }
}

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


Question:
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long[] a = new long[n];
		long[] b = new long[n];
		for(int i=0; i<n; i++){
			a[i] = sc.nextLong();
			b[i] = sc.nextLong();
		}
		sc.close();

		long num = 0;

		for(int i=n-1; i>=0; i--){
			long m = b[i] - (a[i] + num + b[i]) % b[i];
			if(m != b[i]){
				num += b[i] - (a[i] + num + b[i]) % b[i];
			}
		}
		System.out.println(num);
	}

}

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


Question:
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        long[] a = new long[n];
        for(int i=0; i<n; i++){
            a[i] = sc.nextLong();
        }

        long ans1 = 0;
        long ans2 = 0;

        long max = -1000000000000000L;
        long max2 = -1000000000000000L;
        long min = 1000000000000000L;
        int posmax = 0;
        int posmin = 0;
        long l1 = 0;
        long s1 = 0;
        for(int j=0; j<k; j++){
            if(a[j] > 0) l1 += a[j];
            if(a[j] < 0)  s1 += a[j];
        }
        if(s1 > max){
            max = s1;
            posmax = 0;
        }
        if( l1 < min){
            min = l1;
            posmin = 0;
        }
        for(int i=1; i<n+1-k; i++){
            long l = l1;
            if(a[i-1] > 0) l -= a[i-1];
            if(a[i-1+k] > 0) l += a[i-1+k];
            long s = s1;
            if(a[i-1]< 0) s -= a[i-1];
            if(a[i-1+k] < 0) s += a[i-1+k];
            if(s > max){
                max = s;
                posmax = i;
            }
            if( l < min){
                min = l;
                posmin = i;
            }
            l1 = l;
            s1 = s;
        }

        for(int i=0; i<n; i++){
            if((i < posmin || i > posmin + k-1) && a[i] > 0){
                ans1 += a[i];
            }
        }

        ans2 += max;
        for(int i=0; i<n; i++){
            if(a[i] > 0){
                ans2 += a[i];
            }
        }

        System.out.println(Long.max(ans1, ans2));
    }
}

Choices:
- Memory Limit Exceeded
- No abnormally found
- Runtime 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[] a = new int[n];
        int[] pos = new int[n];
        for(int i=0; i<n; i++){
            int tmp = sc.nextInt();
            a[i] = tmp;
            pos[tmp-1] = i;
        }

        TreeSet<Integer> ts = new TreeSet<Integer>();
        long ans = 0;

        for(int i=0; i<n; i++){
            int h, l;
            if(ts.higher(pos[i]) == null){
                h = n;
            }else{
                h = ts.higher(pos[i]);
            }
            if(ts.lower(pos[i]) == null){
                l = -1;
            }else{
                l = ts.lower(pos[i]);
            }

            ans += (long)(pos[i] - l) * (long)(h - pos[i]) * (long)(i+1);

            ts.add(pos[i]);
        }

        System.out.println(ans);
    }

}

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


Question:
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		sc.close();

		if(a>0){
			System.out.println("Positive");
		}else{
			if(b>=0){
				System.out.println("Zero");
			}else{
				if((b-a) % 2 == 0){
					System.out.println("Negative");
				}else{
					System.out.println("Positive");
				}
			}
		}

	}

}

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


Question:
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		sc.close();

		if(a>0){
			System.out.println("Positive");
		}else{
			if(b>=0){
				System.out.println("Zero");
			}else{
				if((b-a) % 2 == 0){
					System.out.println("Negative");
				}else{
					System.out.println("Positive");
				}
			}
		}

	}

}

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


Question:
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		long x = sc.nextLong();
		if(2*x < n){
			x = n-x;
		}
		long ans = 0;
		long m;
		while(x != 0){
			if(2*x < n){
				x = n-x;
			}
			m = n-x;
			ans += (x-x%m) * 3;
			n = m + x%m;
			x = n-m;
		}

		System.out.println(ans);
	}

}

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


Question:
import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    String s = scan.next();
    if (s.equals("RRR")){
      System.out.println(3);
    }else if (s.equals("RRS")){
      System.out.println(2);
    }else if (s.equals("SRR")){
      System.out.println(2);
    }else if (s.equals("RSR")){
      System.out.println(1);
    }else if (s.equals("RSS")){
      System.out.println(1);
    }else if (s.equals("SRS")){
      System.out.println(1);
    }else if (s.equals("SSR")){
      System.out.println(1);
    }else{
      System.out.println(0);
    }
  }
}

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


Question:
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n;
		long d;
		n = scan.nextInt();
		d = scan.nextLong();
		int ans = 0;
		for (int i = 0; i < n; i++) {
			long x,y;
			x = scan.nextLong();
			y = scan.nextLong();
			if (x*x+y*y <= d*d) {
				ans++;
			}
		}
		System.out.println(ans);
	}
}

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


Question:
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n;
		long d;
		n = scan.nextInt();
		d = scan.nextLong();
		int ans = 0;
		for (int i = 0; i < n; i++) {
			long x,y;
			x = scan.nextLong();
			y = scan.nextLong();
			if (x*x+y*y <= d*d) {
				ans++;
			}
		}
		System.out.println(ans);
	}
}

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


Question:
import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    int m = scan.nextInt();
    int ans = 0;
    for (int i = 0; i < m; i++){
      ans = ans + scan.nextInt();
    }
    if (ans <=n){
      System.out.println(n - ans);
    }else{
      System.out.println(-1);
    }
  }
}

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


Question:
import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    long ans = 0;
    for (int i = 1; i <= n; i++){
      if (i%3==0 || i%5 == 0){
        continue;
      }else{
        ans = ans + i;
      }
    }
    System.out.println(ans);
  }
}

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


Question:
import java.util.Arrays;
import java.util.Scanner;
public class Main {
	static int A,B,C;
	//static String ans;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		A=sc.nextInt();
		B=sc.nextInt();

		C=sc.nextInt();
		int a[]=new int[101];
		for(int i=1;i<=100;i++) {
			if(A%i==0&&B%i==0)a[i]=i;
		}
		Arrays.sort(a);
		System.out.println(a[101-C]);
	}
}

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