node_ids
listlengths
4
1.4k
edge_index
listlengths
1
2.22k
text
listlengths
4
1.4k
source
stringlengths
14
427k
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 42, 2, 13, 17, 30, 4, 18, 13, 13, 0, 13, 4, 18, 13, 41, 13, 4, 18, 4, 18, 13, 17, 17, 41, 13, 4, 18, 4, 18, 13, 17, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 18, 13, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 40, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 128, 14 ], [ 128, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 17, 21 ], [ 21, 22 ], [ 21, 23 ], [ 17, 24 ], [ 24, 25 ], [ 24, 26 ], [ 17, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 17, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 32, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 37, 40 ], [ 36, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 44, 45 ], [ 17, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 50, 53 ], [ 48, 54 ], [ 17, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 59, 62 ], [ 57, 63 ], [ 17, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 67, 68 ], [ 66, 69 ], [ 69, 70 ], [ 69, 71 ], [ 17, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 75, 76 ], [ 74, 77 ], [ 77, 78 ], [ 77, 79 ], [ 17, 80 ], [ 80, 81 ], [ 80, 82 ], [ 17, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 83, 88 ], [ 88, 89 ], [ 88, 90 ], [ 83, 91 ], [ 91, 92 ], [ 92, 93 ], [ 83, 94 ], [ 95, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 99, 100 ], [ 98, 101 ], [ 101, 102 ], [ 101, 103 ], [ 17, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 104, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 109, 114 ], [ 114, 115 ], [ 104, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 117, 122 ], [ 122, 123 ], [ 122, 124 ], [ 15, 125 ], [ 125, 126 ], [ 0, 127 ], [ 127, 128 ], [ 127, 129 ] ]
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class Main {\n\n public static void main(String[] args) throws Exception {\n\n InputStreamReader is = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(is);\n\n List<String> mylist = new ArrayList<>();\n\n // 標準入力からの値を変数strinputに代入\n String strinput = reader.readLine();\n\n while (strinput != null) {\n\n mylist.add(strinput);\n strinput = reader.readLine();\n\n }\n\n String arr01[] = mylist.get(0).split(\" \");\n String arr02[] = mylist.get(1).split(\" \");\n int n = Integer.valueOf(arr01[0]);\n int m = Integer.valueOf(arr01[1]);\n\n int mysum = 0;\n for (int i = 0; i < m; i++) {\n mysum += Integer.valueOf(arr02[i]);\n\n }\n\n if (mysum > n) {\n System.out.println(-1);\n } else {\n System.out.println(n - mysum);\n }\n }\n\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.List;", "List", "java.util", "public class Main {\n\n public static void main(String[] args) throws Exception {\n\n InputStreamReader is = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(is);\n\n List<String> mylist = new ArrayList<>();\n\n // 標準入力からの値を変数strinputに代入\n String strinput = reader.readLine();\n\n while (strinput != null) {\n\n mylist.add(strinput);\n strinput = reader.readLine();\n\n }\n\n String arr01[] = mylist.get(0).split(\" \");\n String arr02[] = mylist.get(1).split(\" \");\n int n = Integer.valueOf(arr01[0]);\n int m = Integer.valueOf(arr01[1]);\n\n int mysum = 0;\n for (int i = 0; i < m; i++) {\n mysum += Integer.valueOf(arr02[i]);\n\n }\n\n if (mysum > n) {\n System.out.println(-1);\n } else {\n System.out.println(n - mysum);\n }\n }\n\n}", "Main", "public static void main(String[] args) throws Exception {\n\n InputStreamReader is = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(is);\n\n List<String> mylist = new ArrayList<>();\n\n // 標準入力からの値を変数strinputに代入\n String strinput = reader.readLine();\n\n while (strinput != null) {\n\n mylist.add(strinput);\n strinput = reader.readLine();\n\n }\n\n String arr01[] = mylist.get(0).split(\" \");\n String arr02[] = mylist.get(1).split(\" \");\n int n = Integer.valueOf(arr01[0]);\n int m = Integer.valueOf(arr01[1]);\n\n int mysum = 0;\n for (int i = 0; i < m; i++) {\n mysum += Integer.valueOf(arr02[i]);\n\n }\n\n if (mysum > n) {\n System.out.println(-1);\n } else {\n System.out.println(n - mysum);\n }\n }", "main", "{\n\n InputStreamReader is = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(is);\n\n List<String> mylist = new ArrayList<>();\n\n // 標準入力からの値を変数strinputに代入\n String strinput = reader.readLine();\n\n while (strinput != null) {\n\n mylist.add(strinput);\n strinput = reader.readLine();\n\n }\n\n String arr01[] = mylist.get(0).split(\" \");\n String arr02[] = mylist.get(1).split(\" \");\n int n = Integer.valueOf(arr01[0]);\n int m = Integer.valueOf(arr01[1]);\n\n int mysum = 0;\n for (int i = 0; i < m; i++) {\n mysum += Integer.valueOf(arr02[i]);\n\n }\n\n if (mysum > n) {\n System.out.println(-1);\n } else {\n System.out.println(n - mysum);\n }\n }", "InputStreamReader is = new InputStreamReader(System.in);", "is", "new InputStreamReader(System.in)", "BufferedReader reader = new BufferedReader(is);", "reader", "new BufferedReader(is)", "List<String> mylist = new ArrayList<>();", "mylist", "new ArrayList<>()", "String strinput = reader.readLine();", "strinput", "reader.readLine()", "reader.readLine", "reader", "while (strinput != null) {\n\n mylist.add(strinput);\n strinput = reader.readLine();\n\n }", "strinput != null", "strinput", "null", "{\n\n mylist.add(strinput);\n strinput = reader.readLine();\n\n }", "mylist.add(strinput)", "mylist.add", "mylist", "strinput", "strinput = reader.readLine()", "strinput", "reader.readLine()", "reader.readLine", "reader", "String arr01[] = mylist.get(0).split(\" \");", "arr01", "mylist.get(0).split(\" \")", "mylist.get(0).split", "mylist.get(0)", "mylist.get", "mylist", "0", "\" \"", "String arr02[] = mylist.get(1).split(\" \");", "arr02", "mylist.get(1).split(\" \")", "mylist.get(1).split", "mylist.get(1)", "mylist.get", "mylist", "1", "\" \"", "int n = Integer.valueOf(arr01[0]);", "n", "Integer.valueOf(arr01[0])", "Integer.valueOf", "Integer", "arr01[0]", "arr01", "0", "int m = Integer.valueOf(arr01[1]);", "m", "Integer.valueOf(arr01[1])", "Integer.valueOf", "Integer", "arr01[1]", "arr01", "1", "int mysum = 0;", "mysum", "0", "for (int i = 0; i < m; i++) {\n mysum += Integer.valueOf(arr02[i]);\n\n }", "int i = 0;", "int i = 0;", "i", "0", "i < m", "i", "m", "i++", "i++", "i", "{\n mysum += Integer.valueOf(arr02[i]);\n\n }", "{\n mysum += Integer.valueOf(arr02[i]);\n\n }", "mysum += Integer.valueOf(arr02[i])", "mysum", "Integer.valueOf(arr02[i])", "Integer.valueOf", "Integer", "arr02[i]", "arr02", "i", "if (mysum > n) {\n System.out.println(-1);\n } else {\n System.out.println(n - mysum);\n }", "mysum > n", "mysum", "n", "{\n System.out.println(-1);\n }", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "{\n System.out.println(n - mysum);\n }", "System.out.println(n - mysum)", "System.out.println", "System.out", "System", "System.out", "n - mysum", "n", "mysum", "String[] args", "args", "public class Main {\n\n public static void main(String[] args) throws Exception {\n\n InputStreamReader is = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(is);\n\n List<String> mylist = new ArrayList<>();\n\n // 標準入力からの値を変数strinputに代入\n String strinput = reader.readLine();\n\n while (strinput != null) {\n\n mylist.add(strinput);\n strinput = reader.readLine();\n\n }\n\n String arr01[] = mylist.get(0).split(\" \");\n String arr02[] = mylist.get(1).split(\" \");\n int n = Integer.valueOf(arr01[0]);\n int m = Integer.valueOf(arr01[1]);\n\n int mysum = 0;\n for (int i = 0; i < m; i++) {\n mysum += Integer.valueOf(arr02[i]);\n\n }\n\n if (mysum > n) {\n System.out.println(-1);\n } else {\n System.out.println(n - mysum);\n }\n }\n\n}", "public class Main {\n\n public static void main(String[] args) throws Exception {\n\n InputStreamReader is = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(is);\n\n List<String> mylist = new ArrayList<>();\n\n // 標準入力からの値を変数strinputに代入\n String strinput = reader.readLine();\n\n while (strinput != null) {\n\n mylist.add(strinput);\n strinput = reader.readLine();\n\n }\n\n String arr01[] = mylist.get(0).split(\" \");\n String arr02[] = mylist.get(1).split(\" \");\n int n = Integer.valueOf(arr01[0]);\n int m = Integer.valueOf(arr01[1]);\n\n int mysum = 0;\n for (int i = 0; i < m; i++) {\n mysum += Integer.valueOf(arr02[i]);\n\n }\n\n if (mysum > n) {\n System.out.println(-1);\n } else {\n System.out.println(n - mysum);\n }\n }\n\n}", "Main" ]
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; public class Main { public static void main(String[] args) throws Exception { InputStreamReader is = new InputStreamReader(System.in); BufferedReader reader = new BufferedReader(is); List<String> mylist = new ArrayList<>(); // 標準入力からの値を変数strinputに代入 String strinput = reader.readLine(); while (strinput != null) { mylist.add(strinput); strinput = reader.readLine(); } String arr01[] = mylist.get(0).split(" "); String arr02[] = mylist.get(1).split(" "); int n = Integer.valueOf(arr01[0]); int m = Integer.valueOf(arr01[1]); int mysum = 0; for (int i = 0; i < m; i++) { mysum += Integer.valueOf(arr02[i]); } if (mysum > n) { System.out.println(-1); } else { System.out.println(n - mysum); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 17, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 77, 5 ], [ 77, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 8, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 48, 53 ], [ 43, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 54, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 59, 64 ], [ 54, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 71, 72 ], [ 71, 73 ], [ 6, 74 ], [ 74, 75 ], [ 0, 76 ], [ 76, 77 ], [ 76, 78 ] ]
[ "import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n \n int N = sc.nextInt();\n int M = sc.nextInt();\n \n int sumA = 0;\n \n for(int i=0; i<M; i++){\n sumA += sc.nextInt();\n }\n \n if(sumA > N){\n System.out.print(\"-1\");\n }else if(sumA == N){\n System.out.print(\"0\");\n }else{\n System.out.print(N - sumA);\n }\n \n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n \n int N = sc.nextInt();\n int M = sc.nextInt();\n \n int sumA = 0;\n \n for(int i=0; i<M; i++){\n sumA += sc.nextInt();\n }\n \n if(sumA > N){\n System.out.print(\"-1\");\n }else if(sumA == N){\n System.out.print(\"0\");\n }else{\n System.out.print(N - sumA);\n }\n \n }\n}", "Main", "public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n \n int N = sc.nextInt();\n int M = sc.nextInt();\n \n int sumA = 0;\n \n for(int i=0; i<M; i++){\n sumA += sc.nextInt();\n }\n \n if(sumA > N){\n System.out.print(\"-1\");\n }else if(sumA == N){\n System.out.print(\"0\");\n }else{\n System.out.print(N - sumA);\n }\n \n }", "main", "{\n \n Scanner sc = new Scanner(System.in);\n \n int N = sc.nextInt();\n int M = sc.nextInt();\n \n int sumA = 0;\n \n for(int i=0; i<M; i++){\n sumA += sc.nextInt();\n }\n \n if(sumA > N){\n System.out.print(\"-1\");\n }else if(sumA == N){\n System.out.print(\"0\");\n }else{\n System.out.print(N - sumA);\n }\n \n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int M = sc.nextInt();", "M", "sc.nextInt()", "sc.nextInt", "sc", "int sumA = 0;", "sumA", "0", "for(int i=0; i<M; i++){\n sumA += sc.nextInt();\n }", "int i=0;", "int i=0;", "i", "0", "i<M", "i", "M", "i++", "i++", "i", "{\n sumA += sc.nextInt();\n }", "{\n sumA += sc.nextInt();\n }", "sumA += sc.nextInt()", "sumA", "sc.nextInt()", "sc.nextInt", "sc", "if(sumA > N){\n System.out.print(\"-1\");\n }else if(sumA == N){\n System.out.print(\"0\");\n }else{\n System.out.print(N - sumA);\n }", "sumA > N", "sumA", "N", "{\n System.out.print(\"-1\");\n }", "System.out.print(\"-1\")", "System.out.print", "System.out", "System", "System.out", "\"-1\"", "if(sumA == N){\n System.out.print(\"0\");\n }else{\n System.out.print(N - sumA);\n }", "sumA == N", "sumA", "N", "{\n System.out.print(\"0\");\n }", "System.out.print(\"0\")", "System.out.print", "System.out", "System", "System.out", "\"0\"", "{\n System.out.print(N - sumA);\n }", "System.out.print(N - sumA)", "System.out.print", "System.out", "System", "System.out", "N - sumA", "N", "sumA", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n \n int N = sc.nextInt();\n int M = sc.nextInt();\n \n int sumA = 0;\n \n for(int i=0; i<M; i++){\n sumA += sc.nextInt();\n }\n \n if(sumA > N){\n System.out.print(\"-1\");\n }else if(sumA == N){\n System.out.print(\"0\");\n }else{\n System.out.print(N - sumA);\n }\n \n }\n}", "public class Main{\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n \n int N = sc.nextInt();\n int M = sc.nextInt();\n \n int sumA = 0;\n \n for(int i=0; i<M; i++){\n sumA += sc.nextInt();\n }\n \n if(sumA > N){\n System.out.print(\"-1\");\n }else if(sumA == N){\n System.out.print(\"0\");\n }else{\n System.out.print(N - sumA);\n }\n \n }\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int M = sc.nextInt(); int sumA = 0; for(int i=0; i<M; i++){ sumA += sc.nextInt(); } if(sumA > N){ System.out.print("-1"); }else if(sumA == N){ System.out.print("0"); }else{ System.out.print(N - sumA); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 4, 18, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 40, 17, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 14, 17 ], [ 17, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 22, 25 ], [ 25, 26 ], [ 26, 27 ], [ 8, 28 ], [ 28, 29 ], [ 28, 30 ], [ 8, 31 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 31, 36 ], [ 36, 37 ], [ 36, 38 ], [ 31, 39 ], [ 39, 40 ], [ 40, 41 ], [ 31, 42 ], [ 43, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 47, 48 ], [ 46, 49 ], [ 49, 50 ], [ 50, 51 ], [ 8, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 52, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 62, 63 ], [ 62, 64 ], [ 52, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 71, 72 ], [ 6, 73 ], [ 73, 74 ] ]
[ "import java.util.*;\n\nclass Main{\n public static void main(String args[]){\n Scanner S = new Scanner(System.in);\n int N = Integer.parseInt(S.next());\n int M = Integer.parseInt(S.next());\n int total = 0;\n for(int i=0;i<M;i++){\n total += Integer.parseInt(S.next());\n }\n\n if(N >= total){\n System.out.println(N-total);\n } else {\n System.out.println(-1);\n }\n\n }\n}", "import java.util.*;", "util.*", "java", "class Main{\n public static void main(String args[]){\n Scanner S = new Scanner(System.in);\n int N = Integer.parseInt(S.next());\n int M = Integer.parseInt(S.next());\n int total = 0;\n for(int i=0;i<M;i++){\n total += Integer.parseInt(S.next());\n }\n\n if(N >= total){\n System.out.println(N-total);\n } else {\n System.out.println(-1);\n }\n\n }\n}", "Main", "public static void main(String args[]){\n Scanner S = new Scanner(System.in);\n int N = Integer.parseInt(S.next());\n int M = Integer.parseInt(S.next());\n int total = 0;\n for(int i=0;i<M;i++){\n total += Integer.parseInt(S.next());\n }\n\n if(N >= total){\n System.out.println(N-total);\n } else {\n System.out.println(-1);\n }\n\n }", "main", "{\n Scanner S = new Scanner(System.in);\n int N = Integer.parseInt(S.next());\n int M = Integer.parseInt(S.next());\n int total = 0;\n for(int i=0;i<M;i++){\n total += Integer.parseInt(S.next());\n }\n\n if(N >= total){\n System.out.println(N-total);\n } else {\n System.out.println(-1);\n }\n\n }", "Scanner S = new Scanner(System.in);", "S", "new Scanner(System.in)", "int N = Integer.parseInt(S.next());", "N", "Integer.parseInt(S.next())", "Integer.parseInt", "Integer", "S.next()", "S.next", "S", "int M = Integer.parseInt(S.next());", "M", "Integer.parseInt(S.next())", "Integer.parseInt", "Integer", "S.next()", "S.next", "S", "int total = 0;", "total", "0", "for(int i=0;i<M;i++){\n total += Integer.parseInt(S.next());\n }", "int i=0;", "int i=0;", "i", "0", "i<M", "i", "M", "i++", "i++", "i", "{\n total += Integer.parseInt(S.next());\n }", "{\n total += Integer.parseInt(S.next());\n }", "total += Integer.parseInt(S.next())", "total", "Integer.parseInt(S.next())", "Integer.parseInt", "Integer", "S.next()", "S.next", "S", "if(N >= total){\n System.out.println(N-total);\n } else {\n System.out.println(-1);\n }", "N >= total", "N", "total", "{\n System.out.println(N-total);\n }", "System.out.println(N-total)", "System.out.println", "System.out", "System", "System.out", "N-total", "N", "total", "{\n System.out.println(-1);\n }", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "String args[]", "args" ]
import java.util.*; class Main{ public static void main(String args[]){ Scanner S = new Scanner(System.in); int N = Integer.parseInt(S.next()); int M = Integer.parseInt(S.next()); int total = 0; for(int i=0;i<M;i++){ total += Integer.parseInt(S.next()); } if(N >= total){ System.out.println(N-total); } else { System.out.println(-1); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 40, 17, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 8, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 48, 53 ], [ 53, 54 ], [ 53, 55 ], [ 43, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 62, 63 ], [ 6, 64 ], [ 64, 65 ] ]
[ "import java.util.Scanner;\n\nclass Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int total_holiday = sc.nextInt();\n int total_homework = sc.nextInt();\n int total = 0;\n \n for(int i = 0;i < total_homework;i++){\n total += sc.nextInt();\n }\n if(total_holiday >= total){\n System.out.println(total_holiday-total);\n }else{\n System.out.println(-1);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int total_holiday = sc.nextInt();\n int total_homework = sc.nextInt();\n int total = 0;\n \n for(int i = 0;i < total_homework;i++){\n total += sc.nextInt();\n }\n if(total_holiday >= total){\n System.out.println(total_holiday-total);\n }else{\n System.out.println(-1);\n }\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int total_holiday = sc.nextInt();\n int total_homework = sc.nextInt();\n int total = 0;\n \n for(int i = 0;i < total_homework;i++){\n total += sc.nextInt();\n }\n if(total_holiday >= total){\n System.out.println(total_holiday-total);\n }else{\n System.out.println(-1);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int total_holiday = sc.nextInt();\n int total_homework = sc.nextInt();\n int total = 0;\n \n for(int i = 0;i < total_homework;i++){\n total += sc.nextInt();\n }\n if(total_holiday >= total){\n System.out.println(total_holiday-total);\n }else{\n System.out.println(-1);\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int total_holiday = sc.nextInt();", "total_holiday", "sc.nextInt()", "sc.nextInt", "sc", "int total_homework = sc.nextInt();", "total_homework", "sc.nextInt()", "sc.nextInt", "sc", "int total = 0;", "total", "0", "for(int i = 0;i < total_homework;i++){\n total += sc.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < total_homework", "i", "total_homework", "i++", "i++", "i", "{\n total += sc.nextInt();\n }", "{\n total += sc.nextInt();\n }", "total += sc.nextInt()", "total", "sc.nextInt()", "sc.nextInt", "sc", "if(total_holiday >= total){\n System.out.println(total_holiday-total);\n }else{\n System.out.println(-1);\n }", "total_holiday >= total", "total_holiday", "total", "{\n System.out.println(total_holiday-total);\n }", "System.out.println(total_holiday-total)", "System.out.println", "System.out", "System", "System.out", "total_holiday-total", "total_holiday", "total", "{\n System.out.println(-1);\n }", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "String[] args", "args" ]
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int total_holiday = sc.nextInt(); int total_homework = sc.nextInt(); int total = 0; for(int i = 0;i < total_homework;i++){ total += sc.nextInt(); } if(total_holiday >= total){ System.out.println(total_holiday-total); }else{ System.out.println(-1); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 0, 13, 13, 41, 13, 2, 13, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 40, 17, 30, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 76, 5 ], [ 76, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 25, 27 ], [ 8, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 28, 33 ], [ 33, 34 ], [ 33, 35 ], [ 28, 36 ], [ 36, 37 ], [ 37, 38 ], [ 28, 39 ], [ 40, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 44, 45 ], [ 40, 46 ], [ 46, 47 ], [ 46, 48 ], [ 8, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 51, 53 ], [ 8, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 54, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 59, 64 ], [ 64, 65 ], [ 54, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 67, 72 ], [ 6, 73 ], [ 73, 74 ], [ 0, 75 ], [ 75, 76 ], [ 75, 77 ] ]
[ "import java.util.*;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tint A =0;\n\t\tint nextA =0;\n\t\tfor(int i=0; i<M ;i++) {\n\t\t\tnextA=sc.nextInt();\n\t\t\tA += nextA;\n\t\t}\n int r = N-A;\n if(r<0) {\n \tSystem.out.println(-1);\n }\n else {\n \tSystem.out.println(r);\n }\n\n\t}\n\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tint A =0;\n\t\tint nextA =0;\n\t\tfor(int i=0; i<M ;i++) {\n\t\t\tnextA=sc.nextInt();\n\t\t\tA += nextA;\n\t\t}\n int r = N-A;\n if(r<0) {\n \tSystem.out.println(-1);\n }\n else {\n \tSystem.out.println(r);\n }\n\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tint A =0;\n\t\tint nextA =0;\n\t\tfor(int i=0; i<M ;i++) {\n\t\t\tnextA=sc.nextInt();\n\t\t\tA += nextA;\n\t\t}\n int r = N-A;\n if(r<0) {\n \tSystem.out.println(-1);\n }\n else {\n \tSystem.out.println(r);\n }\n\n\t}", "main", "{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tint A =0;\n\t\tint nextA =0;\n\t\tfor(int i=0; i<M ;i++) {\n\t\t\tnextA=sc.nextInt();\n\t\t\tA += nextA;\n\t\t}\n int r = N-A;\n if(r<0) {\n \tSystem.out.println(-1);\n }\n else {\n \tSystem.out.println(r);\n }\n\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int M = sc.nextInt();", "M", "sc.nextInt()", "sc.nextInt", "sc", "int A =0;", "A", "0", "int nextA =0;", "nextA", "0", "for(int i=0; i<M ;i++) {\n\t\t\tnextA=sc.nextInt();\n\t\t\tA += nextA;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<M", "i", "M", "i++", "i++", "i", "{\n\t\t\tnextA=sc.nextInt();\n\t\t\tA += nextA;\n\t\t}", "{\n\t\t\tnextA=sc.nextInt();\n\t\t\tA += nextA;\n\t\t}", "nextA=sc.nextInt()", "nextA", "sc.nextInt()", "sc.nextInt", "sc", "A += nextA", "A", "nextA", "int r = N-A;", "r", "N-A", "N", "A", "if(r<0) {\n \tSystem.out.println(-1);\n }\n else {\n \tSystem.out.println(r);\n }", "r<0", "r", "0", "{\n \tSystem.out.println(-1);\n }", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "{\n \tSystem.out.println(r);\n }", "System.out.println(r)", "System.out.println", "System.out", "System", "System.out", "r", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tint A =0;\n\t\tint nextA =0;\n\t\tfor(int i=0; i<M ;i++) {\n\t\t\tnextA=sc.nextInt();\n\t\t\tA += nextA;\n\t\t}\n int r = N-A;\n if(r<0) {\n \tSystem.out.println(-1);\n }\n else {\n \tSystem.out.println(r);\n }\n\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tint A =0;\n\t\tint nextA =0;\n\t\tfor(int i=0; i<M ;i++) {\n\t\t\tnextA=sc.nextInt();\n\t\t\tA += nextA;\n\t\t}\n int r = N-A;\n if(r<0) {\n \tSystem.out.println(-1);\n }\n else {\n \tSystem.out.println(r);\n }\n\n\t}\n\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int M = sc.nextInt(); int A =0; int nextA =0; for(int i=0; i<M ;i++) { nextA=sc.nextInt(); A += nextA; } int r = N-A; if(r<0) { System.out.println(-1); } else { System.out.println(r); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 2, 13, 13, 17, 30, 4, 18, 18, 13, 13, 40, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 11, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 11, 25 ], [ 25, 26 ], [ 25, 27 ], [ 11, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 28, 33 ], [ 33, 34 ], [ 33, 35 ], [ 28, 36 ], [ 36, 37 ], [ 37, 38 ], [ 28, 39 ], [ 40, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 44, 45 ], [ 11, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 47, 51 ], [ 46, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 53, 58 ], [ 58, 59 ], [ 46, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 61, 66 ], [ 66, 67 ], [ 66, 68 ], [ 9, 69 ], [ 69, 70 ] ]
[ "import java.util.Scanner;\nimport java.lang.Math;\nclass Main {\n public static void main(String args[]) {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int m = scan.nextInt();\n int sum = 0;\n for(int i = 0; i < m; i++){\n sum += scan.nextInt();\n \n }\n if(n-sum < 0){\n System.out.println(-1);\n }else{\n System.out.println(n-sum);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "import java.lang.Math;", "Math", "java.lang", "class Main {\n public static void main(String args[]) {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int m = scan.nextInt();\n int sum = 0;\n for(int i = 0; i < m; i++){\n sum += scan.nextInt();\n \n }\n if(n-sum < 0){\n System.out.println(-1);\n }else{\n System.out.println(n-sum);\n }\n }\n}", "Main", "public static void main(String args[]) {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int m = scan.nextInt();\n int sum = 0;\n for(int i = 0; i < m; i++){\n sum += scan.nextInt();\n \n }\n if(n-sum < 0){\n System.out.println(-1);\n }else{\n System.out.println(n-sum);\n }\n }", "main", "{\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int m = scan.nextInt();\n int sum = 0;\n for(int i = 0; i < m; i++){\n sum += scan.nextInt();\n \n }\n if(n-sum < 0){\n System.out.println(-1);\n }else{\n System.out.println(n-sum);\n }\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int n = scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "int m = scan.nextInt();", "m", "scan.nextInt()", "scan.nextInt", "scan", "int sum = 0;", "sum", "0", "for(int i = 0; i < m; i++){\n sum += scan.nextInt();\n \n }", "int i = 0;", "int i = 0;", "i", "0", "i < m", "i", "m", "i++", "i++", "i", "{\n sum += scan.nextInt();\n \n }", "{\n sum += scan.nextInt();\n \n }", "sum += scan.nextInt()", "sum", "scan.nextInt()", "scan.nextInt", "scan", "if(n-sum < 0){\n System.out.println(-1);\n }else{\n System.out.println(n-sum);\n }", "n-sum < 0", "n-sum", "n", "sum", "0", "{\n System.out.println(-1);\n }", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "{\n System.out.println(n-sum);\n }", "System.out.println(n-sum)", "System.out.println", "System.out", "System", "System.out", "n-sum", "n", "sum", "String args[]", "args" ]
import java.util.Scanner; import java.lang.Math; class Main { public static void main(String args[]) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int m = scan.nextInt(); int sum = 0; for(int i = 0; i < m; i++){ sum += scan.nextInt(); } if(n-sum < 0){ System.out.println(-1); }else{ System.out.println(n-sum); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 18, 13, 13, 41, 13, 18, 13, 13, 41, 13, 20, 41, 13, 20, 41, 13, 20, 4, 18, 13, 17, 13, 13, 4, 18, 13, 23, 13, 6, 13, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 4, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 18, 13, 13, 14, 2, 13, 13, 30, 4, 18, 13, 40, 17, 30, 4, 18, 13, 2, 13, 13, 23, 13, 23, 13, 23, 13, 6, 13, 41, 13, 41, 13, 20, 17, 41, 13, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 40, 17, 30, 37, 20, 14, 2, 13, 13, 30, 0, 13, 17, 38, 5, 13, 30, 37, 20, 30, 0, 13, 4, 18, 13, 13, 14, 2, 13, 17, 30, 29, 40, 17, 29, 18, 13, 40, 13, 12, 13, 30, 41, 13, 4, 13, 42, 4, 13, 13, 30, 0, 13, 4, 13, 41, 13, 17, 14, 2, 13, 17, 30, 0, 13, 40, 17, 0, 13, 4, 13, 41, 13, 17, 42, 40, 4, 13, 13, 30, 14, 2, 2, 13, 17, 2, 13, 17, 30, 37, 20, 0, 13, 17, 0, 13, 2, 13, 17, 0, 13, 4, 13, 29, 2, 13, 13, 12, 13, 30, 14, 2, 13, 17, 30, 29, 4, 18, 13, 13, 29, 4, 13, 13, 23, 13, 12, 13, 30, 29, 2, 2, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 2, 13, 17, 2, 13, 40, 17, 23, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 6, 13, 12, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 19, 20 ], [ 19, 21 ], [ 0, 22 ], [ 340, 23 ], [ 340, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 29, 31 ], [ 26, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 34, 36 ], [ 26, 37 ], [ 37, 38 ], [ 37, 39 ], [ 26, 40 ], [ 40, 41 ], [ 40, 42 ], [ 26, 43 ], [ 43, 44 ], [ 43, 45 ], [ 26, 46 ], [ 46, 47 ], [ 47, 48 ], [ 46, 49 ], [ 46, 50 ], [ 46, 51 ], [ 26, 52 ], [ 52, 53 ], [ 53, 54 ], [ 24, 55 ], [ 55, 56 ], [ 340, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 65, 66 ], [ 61, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 70, 71 ], [ 61, 72 ], [ 72, 73 ], [ 72, 74 ], [ 61, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 78, 79 ], [ 77, 80 ], [ 61, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 81, 86 ], [ 86, 87 ], [ 86, 88 ], [ 81, 89 ], [ 89, 90 ], [ 90, 91 ], [ 81, 92 ], [ 93, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 96, 98 ], [ 61, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 99, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 104, 107 ], [ 107, 108 ], [ 99, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 110, 113 ], [ 113, 114 ], [ 113, 115 ], [ 59, 116 ], [ 116, 117 ], [ 59, 118 ], [ 118, 119 ], [ 59, 120 ], [ 120, 121 ], [ 340, 122 ], [ 122, 123 ], [ 122, 124 ], [ 124, 125 ], [ 122, 126 ], [ 126, 127 ], [ 126, 128 ], [ 122, 130 ], [ 130, 131 ], [ 122, 132 ], [ 132, 133 ], [ 122, 134 ], [ 134, 135 ], [ 122, 136 ], [ 136, 137 ], [ 136, 138 ], [ 138, 139 ], [ 139, 140 ], [ 140, 141 ], [ 140, 142 ], [ 139, 143 ], [ 136, 144 ], [ 144, 145 ], [ 122, 146 ], [ 146, 147 ], [ 146, 148 ], [ 148, 149 ], [ 149, 150 ], [ 150, 151 ], [ 150, 152 ], [ 152, 153 ], [ 149, 154 ], [ 154, 155 ], [ 155, 156 ], [ 148, 157 ], [ 157, 158 ], [ 158, 159 ], [ 158, 160 ], [ 157, 161 ], [ 161, 162 ], [ 162, 163 ], [ 162, 164 ], [ 161, 165 ], [ 165, 166 ], [ 166, 167 ], [ 166, 168 ], [ 168, 169 ], [ 169, 170 ], [ 165, 171 ], [ 171, 172 ], [ 172, 173 ], [ 172, 174 ], [ 174, 175 ], [ 175, 176 ], [ 174, 177 ], [ 161, 178 ], [ 178, 179 ], [ 179, 180 ], [ 179, 181 ], [ 178, 182 ], [ 182, 183 ], [ 183, 184 ], [ 184, 185 ], [ 148, 186 ], [ 186, 187 ], [ 187, 188 ], [ 187, 189 ], [ 189, 190 ], [ 122, 191 ], [ 191, 192 ], [ 191, 193 ], [ 193, 194 ], [ 194, 195 ], [ 194, 196 ], [ 196, 197 ], [ 193, 198 ], [ 198, 199 ], [ 199, 200 ], [ 199, 201 ], [ 198, 202 ], [ 202, 203 ], [ 203, 204 ], [ 203, 205 ], [ 205, 206 ], [ 193, 207 ], [ 207, 208 ], [ 207, 209 ], [ 193, 210 ], [ 210, 211 ], [ 211, 212 ], [ 211, 213 ], [ 210, 214 ], [ 214, 215 ], [ 215, 216 ], [ 215, 217 ], [ 217, 218 ], [ 214, 219 ], [ 219, 220 ], [ 219, 221 ], [ 221, 222 ], [ 193, 223 ], [ 223, 224 ], [ 223, 225 ], [ 193, 226 ], [ 226, 227 ], [ 227, 228 ], [ 228, 229 ], [ 228, 230 ], [ 226, 231 ], [ 231, 232 ], [ 232, 233 ], [ 233, 234 ], [ 234, 235 ], [ 234, 236 ], [ 233, 237 ], [ 237, 238 ], [ 237, 239 ], [ 232, 240 ], [ 240, 241 ], [ 241, 242 ], [ 231, 243 ], [ 243, 244 ], [ 243, 245 ], [ 231, 246 ], [ 246, 247 ], [ 246, 248 ], [ 248, 249 ], [ 248, 250 ], [ 231, 251 ], [ 251, 252 ], [ 251, 253 ], [ 253, 254 ], [ 193, 255 ], [ 255, 256 ], [ 256, 257 ], [ 256, 258 ], [ 122, 259 ], [ 259, 260 ], [ 259, 261 ], [ 261, 262 ], [ 262, 263 ], [ 263, 264 ], [ 263, 265 ], [ 262, 266 ], [ 266, 267 ], [ 267, 268 ], [ 268, 269 ], [ 269, 270 ], [ 268, 271 ], [ 261, 272 ], [ 272, 273 ], [ 273, 274 ], [ 273, 275 ], [ 259, 276 ], [ 276, 277 ], [ 122, 278 ], [ 278, 279 ], [ 278, 280 ], [ 280, 281 ], [ 281, 282 ], [ 285, 283 ], [ 295, 284 ], [ 292, 285 ], [ 285, 286 ], [ 286, 287 ], [ 286, 288 ], [ 285, 289 ], [ 289, 290 ], [ 289, 291 ], [ 292, 292 ], [ 292, 293 ], [ 292, 294 ], [ 295, 295 ], [ 295, 296 ], [ 295, 297 ], [ 285, 298 ], [ 298, 299 ], [ 298, 300 ], [ 300, 301 ], [ 278, 302 ], [ 302, 303 ], [ 122, 304 ], [ 304, 305 ], [ 304, 306 ], [ 306, 307 ], [ 307, 308 ], [ 307, 309 ], [ 306, 311 ], [ 311, 312 ], [ 312, 313 ], [ 313, 314 ], [ 313, 315 ], [ 311, 316 ], [ 316, 317 ], [ 316, 318 ], [ 311, 319 ], [ 319, 320 ], [ 320, 321 ], [ 311, 322 ], [ 322, 323 ], [ 323, 324 ], [ 324, 325 ], [ 324, 326 ], [ 323, 327 ], [ 327, 328 ], [ 306, 329 ], [ 329, 330 ], [ 304, 331 ], [ 331, 332 ], [ 122, 333 ], [ 333, 334 ], [ 333, 335 ], [ 335, 336 ], [ 335, 337 ], [ 337, 338 ], [ 0, 339 ], [ 339, 340 ], [ 339, 341 ] ]
[ "import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.InputMismatchException;\nimport java.io.IOException;\nimport java.io.InputStream;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n */\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BHomework solver = new BHomework();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BHomework {\n public void solve(int testNumber, FastReader s, PrintWriter out) {\n int n = s.nextInt();\n int m = s.nextInt();\n int sum = 0;\n int[] arr = s.nextIntArray(m);\n\n for (int i = 0; i < m; i++) {\n sum += arr[i];\n }\n\n if (sum > n) {\n out.println(-1);\n } else {\n out.println(n - sum);\n }\n }\n\n }\n\n static class FastReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private FastReader.SpaceCharFilter filter;\n\n public FastReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public int[] nextIntArray(int n) {\n int[] array = new int[n];\n for (int i = 0; i < n; ++i) array[i] = nextInt();\n return array;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n}\n", "import java.io.OutputStream;", "OutputStream", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "import java.io.PrintWriter;", "PrintWriter", "java.io", "import java.util.InputMismatchException;", "InputMismatchException", "java.util", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BHomework solver = new BHomework();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BHomework {\n public void solve(int testNumber, FastReader s, PrintWriter out) {\n int n = s.nextInt();\n int m = s.nextInt();\n int sum = 0;\n int[] arr = s.nextIntArray(m);\n\n for (int i = 0; i < m; i++) {\n sum += arr[i];\n }\n\n if (sum > n) {\n out.println(-1);\n } else {\n out.println(n - sum);\n }\n }\n\n }\n\n static class FastReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private FastReader.SpaceCharFilter filter;\n\n public FastReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public int[] nextIntArray(int n) {\n int[] array = new int[n];\n for (int i = 0; i < n; ++i) array[i] = nextInt();\n return array;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n}", "Main", "public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BHomework solver = new BHomework();\n solver.solve(1, in, out);\n out.close();\n }", "main", "{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BHomework solver = new BHomework();\n solver.solve(1, in, out);\n out.close();\n }", "InputStream inputStream = System.in;", "inputStream", "System.in", "System", "System.in", "OutputStream outputStream = System.out;", "outputStream", "System.out", "System", "System.out", "FastReader in = new FastReader(inputStream);", "in", "new FastReader(inputStream)", "PrintWriter out = new PrintWriter(outputStream);", "out", "new PrintWriter(outputStream)", "BHomework solver = new BHomework();", "solver", "new BHomework()", "solver.solve(1, in, out)", "solver.solve", "solver", "1", "in", "out", "out.close()", "out.close", "out", "String[] args", "args", "static class BHomework {\n public void solve(int testNumber, FastReader s, PrintWriter out) {\n int n = s.nextInt();\n int m = s.nextInt();\n int sum = 0;\n int[] arr = s.nextIntArray(m);\n\n for (int i = 0; i < m; i++) {\n sum += arr[i];\n }\n\n if (sum > n) {\n out.println(-1);\n } else {\n out.println(n - sum);\n }\n }\n\n }", "BHomework", "public void solve(int testNumber, FastReader s, PrintWriter out) {\n int n = s.nextInt();\n int m = s.nextInt();\n int sum = 0;\n int[] arr = s.nextIntArray(m);\n\n for (int i = 0; i < m; i++) {\n sum += arr[i];\n }\n\n if (sum > n) {\n out.println(-1);\n } else {\n out.println(n - sum);\n }\n }", "solve", "{\n int n = s.nextInt();\n int m = s.nextInt();\n int sum = 0;\n int[] arr = s.nextIntArray(m);\n\n for (int i = 0; i < m; i++) {\n sum += arr[i];\n }\n\n if (sum > n) {\n out.println(-1);\n } else {\n out.println(n - sum);\n }\n }", "int n = s.nextInt();", "n", "s.nextInt()", "s.nextInt", "s", "int m = s.nextInt();", "m", "s.nextInt()", "s.nextInt", "s", "int sum = 0;", "sum", "0", "int[] arr = s.nextIntArray(m);", "arr", "s.nextIntArray(m)", "s.nextIntArray", "s", "m", "for (int i = 0; i < m; i++) {\n sum += arr[i];\n }", "int i = 0;", "int i = 0;", "i", "0", "i < m", "i", "m", "i++", "i++", "i", "{\n sum += arr[i];\n }", "{\n sum += arr[i];\n }", "sum += arr[i]", "sum", "arr[i]", "arr", "i", "if (sum > n) {\n out.println(-1);\n } else {\n out.println(n - sum);\n }", "sum > n", "sum", "n", "{\n out.println(-1);\n }", "out.println(-1)", "out.println", "out", "-1", "1", "{\n out.println(n - sum);\n }", "out.println(n - sum)", "out.println", "out", "n - sum", "n", "sum", "int testNumber", "testNumber", "FastReader s", "s", "PrintWriter out", "out", "static class FastReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private FastReader.SpaceCharFilter filter;\n\n public FastReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public int[] nextIntArray(int n) {\n int[] array = new int[n];\n for (int i = 0; i < n; ++i) array[i] = nextInt();\n return array;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }", "FastReader", "private InputStream stream;", "stream", "private byte[] buf = new byte[1024];", "buf", "new byte[1024]", "1024", "private int curChar;", "curChar", "private int numChars;", "numChars", "private FastReader.SpaceCharFilter filter;", "filter", "public FastReader(InputStream stream) {\n this.stream = stream;\n }", "FastReader", "{\n this.stream = stream;\n }", "this.stream = stream", "this.stream", "this", "this.stream", "stream", "InputStream stream", "stream", "public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }", "read", "{\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }", "if (numChars == -1) {\n throw new InputMismatchException();\n }", "numChars == -1", "numChars", "-1", "1", "{\n throw new InputMismatchException();\n }", "throw new InputMismatchException();", "new InputMismatchException()", "if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }", "curChar >= numChars", "curChar", "numChars", "{\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }", "curChar = 0", "curChar", "0", "try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }", "catch (IOException e) {\n throw new InputMismatchException();\n }", "IOException e", "{\n throw new InputMismatchException();\n }", "throw new InputMismatchException();", "new InputMismatchException()", "{\n numChars = stream.read(buf);\n }", "numChars = stream.read(buf)", "numChars", "stream.read(buf)", "stream.read", "stream", "buf", "if (numChars <= 0) {\n return -1;\n }", "numChars <= 0", "numChars", "0", "{\n return -1;\n }", "return -1;", "-1", "1", "return buf[curChar++];", "buf[curChar++]", "buf", "curChar++", "curChar", "public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }", "nextInt", "{\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }", "int c = read();", "c", "read()", "read", "while (isSpaceChar(c)) {\n c = read();\n }", "isSpaceChar(c)", "isSpaceChar", "c", "{\n c = read();\n }", "c = read()", "c", "read()", "read", "int sgn = 1;", "sgn", "1", "if (c == '-') {\n sgn = -1;\n c = read();\n }", "c == '-'", "c", "'-'", "{\n sgn = -1;\n c = read();\n }", "sgn = -1", "sgn", "-1", "1", "c = read()", "c", "read()", "read", "int res = 0;", "res", "0", "do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));", "!isSpaceChar(c)", "isSpaceChar(c)", "isSpaceChar", "c", "{\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n }", "if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }", "c < '0' || c > '9'", "c < '0'", "c", "'0'", "c > '9'", "c", "'9'", "{\n throw new InputMismatchException();\n }", "throw new InputMismatchException();", "new InputMismatchException()", "res *= 10", "res", "10", "res += c - '0'", "res", "c - '0'", "c", "'0'", "c = read()", "c", "read()", "read", "return res * sgn;", "res * sgn", "res", "sgn", "public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }", "isSpaceChar", "{\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }", "if (filter != null) {\n return filter.isSpaceChar(c);\n }", "filter != null", "filter", "null", "{\n return filter.isSpaceChar(c);\n }", "return filter.isSpaceChar(c);", "filter.isSpaceChar(c)", "filter.isSpaceChar", "filter", "c", "return isWhitespace(c);", "isWhitespace(c)", "isWhitespace", "c", "int c", "c", "public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }", "isWhitespace", "{\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }", "return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;", "c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1", "c == '\\t'", "c == '\\r'", "c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1", "c == ' '", "c", "' '", "c == '\\n'", "c", "'\\n'", "c == '\\r'", "c", "'\\r'", "c == '\\t'", "c", "'\\t'", "c == -1", "c", "-1", "1", "int c", "c", "public int[] nextIntArray(int n) {\n int[] array = new int[n];\n for (int i = 0; i < n; ++i) array[i] = nextInt();\n return array;\n }", "nextIntArray", "{\n int[] array = new int[n];\n for (int i = 0; i < n; ++i) array[i] = nextInt();\n return array;\n }", "int[] array = new int[n];", "array", "new int[n]", "n", "for (int i = 0; i < n; ++i) array[i] = nextInt();", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "++i", "++i", "i", "array[i] = nextInt();", "array[i] = nextInt()", "array[i]", "array", "i", "nextInt()", "nextInt", "return array;", "array", "int n", "n", "public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }", "SpaceCharFilter", "public boolean isSpaceChar(int ch);", "isSpaceChar", "int ch", "ch", "public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BHomework solver = new BHomework();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BHomework {\n public void solve(int testNumber, FastReader s, PrintWriter out) {\n int n = s.nextInt();\n int m = s.nextInt();\n int sum = 0;\n int[] arr = s.nextIntArray(m);\n\n for (int i = 0; i < m; i++) {\n sum += arr[i];\n }\n\n if (sum > n) {\n out.println(-1);\n } else {\n out.println(n - sum);\n }\n }\n\n }\n\n static class FastReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private FastReader.SpaceCharFilter filter;\n\n public FastReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public int[] nextIntArray(int n) {\n int[] array = new int[n];\n for (int i = 0; i < n; ++i) array[i] = nextInt();\n return array;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n}", "public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BHomework solver = new BHomework();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BHomework {\n public void solve(int testNumber, FastReader s, PrintWriter out) {\n int n = s.nextInt();\n int m = s.nextInt();\n int sum = 0;\n int[] arr = s.nextIntArray(m);\n\n for (int i = 0; i < m; i++) {\n sum += arr[i];\n }\n\n if (sum > n) {\n out.println(-1);\n } else {\n out.println(n - sum);\n }\n }\n\n }\n\n static class FastReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private FastReader.SpaceCharFilter filter;\n\n public FastReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public int[] nextIntArray(int n) {\n int[] array = new int[n];\n for (int i = 0; i < n; ++i) array[i] = nextInt();\n return array;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n}", "Main" ]
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.InputMismatchException; import java.io.IOException; import java.io.InputStream; /** * Built using CHelper plug-in * Actual solution is at the top */ public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; FastReader in = new FastReader(inputStream); PrintWriter out = new PrintWriter(outputStream); BHomework solver = new BHomework(); solver.solve(1, in, out); out.close(); } static class BHomework { public void solve(int testNumber, FastReader s, PrintWriter out) { int n = s.nextInt(); int m = s.nextInt(); int sum = 0; int[] arr = s.nextIntArray(m); for (int i = 0; i < m; i++) { sum += arr[i]; } if (sum > n) { out.println(-1); } else { out.println(n - sum); } } } static class FastReader { private InputStream stream; private byte[] buf = new byte[1024]; private int curChar; private int numChars; private FastReader.SpaceCharFilter filter; public FastReader(InputStream stream) { this.stream = stream; } public int read() { if (numChars == -1) { throw new InputMismatchException(); } if (curChar >= numChars) { curChar = 0; try { numChars = stream.read(buf); } catch (IOException e) { throw new InputMismatchException(); } if (numChars <= 0) { return -1; } } return buf[curChar++]; } public int nextInt() { int c = read(); while (isSpaceChar(c)) { c = read(); } int sgn = 1; if (c == '-') { sgn = -1; c = read(); } int res = 0; do { if (c < '0' || c > '9') { throw new InputMismatchException(); } res *= 10; res += c - '0'; c = read(); } while (!isSpaceChar(c)); return res * sgn; } public boolean isSpaceChar(int c) { if (filter != null) { return filter.isSpaceChar(c); } return isWhitespace(c); } public static boolean isWhitespace(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; } public int[] nextIntArray(int n) { int[] array = new int[n]; for (int i = 0; i < n; ++i) array[i] = nextInt(); return array; } public interface SpaceCharFilter { public boolean isSpaceChar(int ch); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 13, 13, 4, 18, 18, 13, 13, 40, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 66, 5 ], [ 66, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 8, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 47, 52 ], [ 52, 53 ], [ 43, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 55, 60 ], [ 60, 61 ], [ 60, 62 ], [ 6, 63 ], [ 63, 64 ], [ 0, 65 ], [ 65, 66 ], [ 65, 67 ] ]
[ "import java .util.*;\n\npublic class Main {\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tint N = sc.nextInt();\n\tint M = sc.nextInt();\n\tint useDays = 0;\n\tfor (int i=0; i<M; i++) {\n\t useDays += sc.nextInt();\n\t}\n\tif (useDays > N) System.out.print(-1);\n\telse { System.out.print(N-useDays); }\n }\n}", "import java .util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tint N = sc.nextInt();\n\tint M = sc.nextInt();\n\tint useDays = 0;\n\tfor (int i=0; i<M; i++) {\n\t useDays += sc.nextInt();\n\t}\n\tif (useDays > N) System.out.print(-1);\n\telse { System.out.print(N-useDays); }\n }\n}", "Main", "public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tint N = sc.nextInt();\n\tint M = sc.nextInt();\n\tint useDays = 0;\n\tfor (int i=0; i<M; i++) {\n\t useDays += sc.nextInt();\n\t}\n\tif (useDays > N) System.out.print(-1);\n\telse { System.out.print(N-useDays); }\n }", "main", "{\n\tScanner sc = new Scanner(System.in);\n\tint N = sc.nextInt();\n\tint M = sc.nextInt();\n\tint useDays = 0;\n\tfor (int i=0; i<M; i++) {\n\t useDays += sc.nextInt();\n\t}\n\tif (useDays > N) System.out.print(-1);\n\telse { System.out.print(N-useDays); }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int M = sc.nextInt();", "M", "sc.nextInt()", "sc.nextInt", "sc", "int useDays = 0;", "useDays", "0", "for (int i=0; i<M; i++) {\n\t useDays += sc.nextInt();\n\t}", "int i=0;", "int i=0;", "i", "0", "i<M", "i", "M", "i++", "i++", "i", "{\n\t useDays += sc.nextInt();\n\t}", "{\n\t useDays += sc.nextInt();\n\t}", "useDays += sc.nextInt()", "useDays", "sc.nextInt()", "sc.nextInt", "sc", "if (useDays > N) System.out.print(-1);\n\telse { System.out.print(N-useDays); }", "useDays > N", "useDays", "N", "System.out.print(-1)", "System.out.print", "System.out", "System", "System.out", "-1", "1", "{ System.out.print(N-useDays); }", "System.out.print(N-useDays)", "System.out.print", "System.out", "System", "System.out", "N-useDays", "N", "useDays", "String[] args", "args", "public class Main {\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tint N = sc.nextInt();\n\tint M = sc.nextInt();\n\tint useDays = 0;\n\tfor (int i=0; i<M; i++) {\n\t useDays += sc.nextInt();\n\t}\n\tif (useDays > N) System.out.print(-1);\n\telse { System.out.print(N-useDays); }\n }\n}", "public class Main {\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tint N = sc.nextInt();\n\tint M = sc.nextInt();\n\tint useDays = 0;\n\tfor (int i=0; i<M; i++) {\n\t useDays += sc.nextInt();\n\t}\n\tif (useDays > N) System.out.print(-1);\n\telse { System.out.print(N-useDays); }\n }\n}", "Main" ]
import java .util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int M = sc.nextInt(); int useDays = 0; for (int i=0; i<M; i++) { useDays += sc.nextInt(); } if (useDays > N) System.out.print(-1); else { System.out.print(N-useDays); } } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 18, 13, 13, 14, 2, 13, 13, 30, 29, 40, 17, 30, 29, 2, 13, 13, 12, 13, 30, 41, 13, 20, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 18, 13, 13, 4, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 99, 5 ], [ 99, 6 ], [ 6, 7 ], [ 99, 8 ], [ 8, 9 ], [ 99, 10 ], [ 10, 11 ], [ 99, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 19, 20 ], [ 20, 21 ], [ 20, 22 ], [ 18, 23 ], [ 23, 24 ], [ 23, 25 ], [ 18, 26 ], [ 26, 27 ], [ 27, 28 ], [ 18, 29 ], [ 30, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 33, 35 ], [ 14, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 36, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 36, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 99, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 51, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 58, 59 ], [ 51, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 51, 65 ], [ 65, 66 ], [ 65, 67 ], [ 51, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 69, 74 ], [ 74, 75 ], [ 74, 76 ], [ 69, 77 ], [ 77, 78 ], [ 78, 79 ], [ 69, 80 ], [ 81, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 82, 86 ], [ 86, 87 ], [ 87, 88 ], [ 51, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 89, 94 ], [ 94, 95 ], [ 49, 96 ], [ 96, 97 ], [ 0, 98 ], [ 98, 99 ], [ 98, 100 ] ]
[ "import java.util.Scanner;\npublic class Main {\n\tstatic int N;\n\tstatic int M;\n\tstatic int[] A;\n\tpublic static int calc() {\n\t\tint ans=0;\n\t\tfor(int i=0;i<M;i++) {\n\t\t\tans+=A[i];\n\t\t}\n\t\tif(ans>N) {\n\t\t\treturn -1;\n\t\t}\n\t\telse {\n\t\t\treturn N-ans;\n\t\t}\n\t}\n\tpublic static void main(String args[]) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tN=sc.nextInt();\n\t\tM=sc.nextInt();\n\t\tA=new int[M];\n\t\tfor(int i=0;i<M;i++) {\n\t\t\tA[i]=sc.nextInt();\n\t\t}\n\t\tSystem.out.println(calc());\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tstatic int N;\n\tstatic int M;\n\tstatic int[] A;\n\tpublic static int calc() {\n\t\tint ans=0;\n\t\tfor(int i=0;i<M;i++) {\n\t\t\tans+=A[i];\n\t\t}\n\t\tif(ans>N) {\n\t\t\treturn -1;\n\t\t}\n\t\telse {\n\t\t\treturn N-ans;\n\t\t}\n\t}\n\tpublic static void main(String args[]) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tN=sc.nextInt();\n\t\tM=sc.nextInt();\n\t\tA=new int[M];\n\t\tfor(int i=0;i<M;i++) {\n\t\t\tA[i]=sc.nextInt();\n\t\t}\n\t\tSystem.out.println(calc());\n\t}\n}", "Main", "static int N;", "N", "static int M;", "M", "static int[] A;", "A", "public static int calc() {\n\t\tint ans=0;\n\t\tfor(int i=0;i<M;i++) {\n\t\t\tans+=A[i];\n\t\t}\n\t\tif(ans>N) {\n\t\t\treturn -1;\n\t\t}\n\t\telse {\n\t\t\treturn N-ans;\n\t\t}\n\t}", "calc", "{\n\t\tint ans=0;\n\t\tfor(int i=0;i<M;i++) {\n\t\t\tans+=A[i];\n\t\t}\n\t\tif(ans>N) {\n\t\t\treturn -1;\n\t\t}\n\t\telse {\n\t\t\treturn N-ans;\n\t\t}\n\t}", "int ans=0;", "ans", "0", "for(int i=0;i<M;i++) {\n\t\t\tans+=A[i];\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<M", "i", "M", "i++", "i++", "i", "{\n\t\t\tans+=A[i];\n\t\t}", "{\n\t\t\tans+=A[i];\n\t\t}", "ans+=A[i]", "ans", "A[i]", "A", "i", "if(ans>N) {\n\t\t\treturn -1;\n\t\t}\n\t\telse {\n\t\t\treturn N-ans;\n\t\t}", "ans>N", "ans", "N", "{\n\t\t\treturn -1;\n\t\t}", "return -1;", "-1", "1", "{\n\t\t\treturn N-ans;\n\t\t}", "return N-ans;", "N-ans", "N", "ans", "public static void main(String args[]) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tN=sc.nextInt();\n\t\tM=sc.nextInt();\n\t\tA=new int[M];\n\t\tfor(int i=0;i<M;i++) {\n\t\t\tA[i]=sc.nextInt();\n\t\t}\n\t\tSystem.out.println(calc());\n\t}", "main", "{\n\t\tScanner sc=new Scanner(System.in);\n\t\tN=sc.nextInt();\n\t\tM=sc.nextInt();\n\t\tA=new int[M];\n\t\tfor(int i=0;i<M;i++) {\n\t\t\tA[i]=sc.nextInt();\n\t\t}\n\t\tSystem.out.println(calc());\n\t}", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "N=sc.nextInt()", "N", "sc.nextInt()", "sc.nextInt", "sc", "M=sc.nextInt()", "M", "sc.nextInt()", "sc.nextInt", "sc", "A=new int[M]", "A", "new int[M]", "M", "for(int i=0;i<M;i++) {\n\t\t\tA[i]=sc.nextInt();\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<M", "i", "M", "i++", "i++", "i", "{\n\t\t\tA[i]=sc.nextInt();\n\t\t}", "{\n\t\t\tA[i]=sc.nextInt();\n\t\t}", "A[i]=sc.nextInt()", "A[i]", "A", "i", "sc.nextInt()", "sc.nextInt", "sc", "System.out.println(calc())", "System.out.println", "System.out", "System", "System.out", "calc()", "calc", "String args[]", "args", "public class Main {\n\tstatic int N;\n\tstatic int M;\n\tstatic int[] A;\n\tpublic static int calc() {\n\t\tint ans=0;\n\t\tfor(int i=0;i<M;i++) {\n\t\t\tans+=A[i];\n\t\t}\n\t\tif(ans>N) {\n\t\t\treturn -1;\n\t\t}\n\t\telse {\n\t\t\treturn N-ans;\n\t\t}\n\t}\n\tpublic static void main(String args[]) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tN=sc.nextInt();\n\t\tM=sc.nextInt();\n\t\tA=new int[M];\n\t\tfor(int i=0;i<M;i++) {\n\t\t\tA[i]=sc.nextInt();\n\t\t}\n\t\tSystem.out.println(calc());\n\t}\n}", "public class Main {\n\tstatic int N;\n\tstatic int M;\n\tstatic int[] A;\n\tpublic static int calc() {\n\t\tint ans=0;\n\t\tfor(int i=0;i<M;i++) {\n\t\t\tans+=A[i];\n\t\t}\n\t\tif(ans>N) {\n\t\t\treturn -1;\n\t\t}\n\t\telse {\n\t\t\treturn N-ans;\n\t\t}\n\t}\n\tpublic static void main(String args[]) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tN=sc.nextInt();\n\t\tM=sc.nextInt();\n\t\tA=new int[M];\n\t\tfor(int i=0;i<M;i++) {\n\t\t\tA[i]=sc.nextInt();\n\t\t}\n\t\tSystem.out.println(calc());\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { static int N; static int M; static int[] A; public static int calc() { int ans=0; for(int i=0;i<M;i++) { ans+=A[i]; } if(ans>N) { return -1; } else { return N-ans; } } public static void main(String args[]) { Scanner sc=new Scanner(System.in); N=sc.nextInt(); M=sc.nextInt(); A=new int[M]; for(int i=0;i<M;i++) { A[i]=sc.nextInt(); } System.out.println(calc()); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 2, 13, 4, 18, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 40, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 69, 5 ], [ 69, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 8, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 45, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 45, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 59, 64 ], [ 64, 65 ], [ 6, 66 ], [ 66, 67 ], [ 0, 68 ], [ 68, 69 ], [ 68, 70 ] ]
[ "import java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int m = scan.nextInt();\n int ans = 0;\n for (int i = 0; i < m; i++){\n ans = ans + scan.nextInt();\n }\n if (ans <=n){\n System.out.println(n - ans);\n }else{\n System.out.println(-1);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int m = scan.nextInt();\n int ans = 0;\n for (int i = 0; i < m; i++){\n ans = ans + scan.nextInt();\n }\n if (ans <=n){\n System.out.println(n - ans);\n }else{\n System.out.println(-1);\n }\n }\n}", "Main", "public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int m = scan.nextInt();\n int ans = 0;\n for (int i = 0; i < m; i++){\n ans = ans + scan.nextInt();\n }\n if (ans <=n){\n System.out.println(n - ans);\n }else{\n System.out.println(-1);\n }\n }", "main", "{\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int m = scan.nextInt();\n int ans = 0;\n for (int i = 0; i < m; i++){\n ans = ans + scan.nextInt();\n }\n if (ans <=n){\n System.out.println(n - ans);\n }else{\n System.out.println(-1);\n }\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int n = scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "int m = scan.nextInt();", "m", "scan.nextInt()", "scan.nextInt", "scan", "int ans = 0;", "ans", "0", "for (int i = 0; i < m; i++){\n ans = ans + scan.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < m", "i", "m", "i++", "i++", "i", "{\n ans = ans + scan.nextInt();\n }", "{\n ans = ans + scan.nextInt();\n }", "ans = ans + scan.nextInt()", "ans", "ans + scan.nextInt()", "ans", "scan.nextInt()", "scan.nextInt", "scan", "if (ans <=n){\n System.out.println(n - ans);\n }else{\n System.out.println(-1);\n }", "ans <=n", "ans", "n", "{\n System.out.println(n - ans);\n }", "System.out.println(n - ans)", "System.out.println", "System.out", "System", "System.out", "n - ans", "n", "ans", "{\n System.out.println(-1);\n }", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int m = scan.nextInt();\n int ans = 0;\n for (int i = 0; i < m; i++){\n ans = ans + scan.nextInt();\n }\n if (ans <=n){\n System.out.println(n - ans);\n }else{\n System.out.println(-1);\n }\n }\n}", "public class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int m = scan.nextInt();\n int ans = 0;\n for (int i = 0; i < m; i++){\n ans = ans + scan.nextInt();\n }\n if (ans <=n){\n System.out.println(n - ans);\n }else{\n System.out.println(-1);\n }\n }\n}", "Main" ]
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); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 4, 13, 41, 13, 18, 13, 17, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 18, 13, 17, 41, 13, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 18, 13, 13, 0, 13, 2, 13, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 17, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 42, 4, 18, 13, 30, 4, 18, 13, 4, 18, 13, 29, 4, 18, 13, 20, 4, 18, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 130, 5 ], [ 130, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 8, 13 ], [ 13, 14 ], [ 13, 15 ], [ 15, 16 ], [ 15, 17 ], [ 8, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 20, 23 ], [ 8, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 26, 29 ], [ 29, 30 ], [ 29, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 34, 37 ], [ 37, 38 ], [ 37, 39 ], [ 8, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 42, 44 ], [ 8, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 49 ], [ 47, 50 ], [ 8, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 51, 56 ], [ 56, 57 ], [ 56, 58 ], [ 51, 59 ], [ 59, 60 ], [ 60, 61 ], [ 51, 62 ], [ 63, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 67, 68 ], [ 66, 69 ], [ 69, 70 ], [ 69, 71 ], [ 63, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 74, 76 ], [ 8, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 77, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 82, 87 ], [ 77, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 88, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 93, 98 ], [ 6, 99 ], [ 99, 100 ], [ 130, 101 ], [ 101, 102 ], [ 101, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 103, 107 ], [ 107, 108 ], [ 107, 109 ], [ 103, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 110, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 115, 118 ], [ 118, 119 ], [ 119, 120 ], [ 103, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 122, 125 ], [ 126, 127 ], [ 127, 128 ], [ 0, 129 ], [ 129, 130 ], [ 129, 131 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n String[] lines = getStdin();\n String line = lines[0];\n String[] a = line.split(\" \");\n int term = Integer.parseInt(a[0]);\n int num = Integer.parseInt(a[1]);\n\n String line1 = lines[1];\n String[] b = line1.split(\" \");\n //int cost = Integer.parseInt(b[i]);\n\n for (int i = 0; i < num; i++){\n int cost = Integer.parseInt(b[i]);\n term = term - cost;\n }\n if (term < 0){\n System.out.println(\"-1\");\n } else if (term >= 0){\n System.out.println(term);\n }\n\n\n\n\n }\n \n private static String[] getStdin() {\n Scanner scanner = new Scanner(System.in);\n ArrayList<String> lines = new ArrayList<>();\n while (scanner.hasNext()) {\n lines.add(scanner.nextLine());\n }\n return lines.toArray(new String[lines.size()]);\n }\n \n}", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args) throws Exception {\n String[] lines = getStdin();\n String line = lines[0];\n String[] a = line.split(\" \");\n int term = Integer.parseInt(a[0]);\n int num = Integer.parseInt(a[1]);\n\n String line1 = lines[1];\n String[] b = line1.split(\" \");\n //int cost = Integer.parseInt(b[i]);\n\n for (int i = 0; i < num; i++){\n int cost = Integer.parseInt(b[i]);\n term = term - cost;\n }\n if (term < 0){\n System.out.println(\"-1\");\n } else if (term >= 0){\n System.out.println(term);\n }\n\n\n\n\n }\n \n private static String[] getStdin() {\n Scanner scanner = new Scanner(System.in);\n ArrayList<String> lines = new ArrayList<>();\n while (scanner.hasNext()) {\n lines.add(scanner.nextLine());\n }\n return lines.toArray(new String[lines.size()]);\n }\n \n}", "Main", "public static void main(String[] args) throws Exception {\n String[] lines = getStdin();\n String line = lines[0];\n String[] a = line.split(\" \");\n int term = Integer.parseInt(a[0]);\n int num = Integer.parseInt(a[1]);\n\n String line1 = lines[1];\n String[] b = line1.split(\" \");\n //int cost = Integer.parseInt(b[i]);\n\n for (int i = 0; i < num; i++){\n int cost = Integer.parseInt(b[i]);\n term = term - cost;\n }\n if (term < 0){\n System.out.println(\"-1\");\n } else if (term >= 0){\n System.out.println(term);\n }\n\n\n\n\n }", "main", "{\n String[] lines = getStdin();\n String line = lines[0];\n String[] a = line.split(\" \");\n int term = Integer.parseInt(a[0]);\n int num = Integer.parseInt(a[1]);\n\n String line1 = lines[1];\n String[] b = line1.split(\" \");\n //int cost = Integer.parseInt(b[i]);\n\n for (int i = 0; i < num; i++){\n int cost = Integer.parseInt(b[i]);\n term = term - cost;\n }\n if (term < 0){\n System.out.println(\"-1\");\n } else if (term >= 0){\n System.out.println(term);\n }\n\n\n\n\n }", "String[] lines = getStdin();", "lines", "getStdin()", "getStdin", "String line = lines[0];", "line", "lines[0]", "lines", "0", "String[] a = line.split(\" \");", "a", "line.split(\" \")", "line.split", "line", "\" \"", "int term = Integer.parseInt(a[0]);", "term", "Integer.parseInt(a[0])", "Integer.parseInt", "Integer", "a[0]", "a", "0", "int num = Integer.parseInt(a[1]);", "num", "Integer.parseInt(a[1])", "Integer.parseInt", "Integer", "a[1]", "a", "1", "String line1 = lines[1];", "line1", "lines[1]", "lines", "1", "String[] b = line1.split(\" \");", "b", "line1.split(\" \")", "line1.split", "line1", "\" \"", "for (int i = 0; i < num; i++){\n int cost = Integer.parseInt(b[i]);\n term = term - cost;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < num", "i", "num", "i++", "i++", "i", "{\n int cost = Integer.parseInt(b[i]);\n term = term - cost;\n }", "{\n int cost = Integer.parseInt(b[i]);\n term = term - cost;\n }", "int cost = Integer.parseInt(b[i]);", "cost", "Integer.parseInt(b[i])", "Integer.parseInt", "Integer", "b[i]", "b", "i", "term = term - cost", "term", "term - cost", "term", "cost", "if (term < 0){\n System.out.println(\"-1\");\n } else if (term >= 0){\n System.out.println(term);\n }", "term < 0", "term", "0", "{\n System.out.println(\"-1\");\n }", "System.out.println(\"-1\")", "System.out.println", "System.out", "System", "System.out", "\"-1\"", "if (term >= 0){\n System.out.println(term);\n }", "term >= 0", "term", "0", "{\n System.out.println(term);\n }", "System.out.println(term)", "System.out.println", "System.out", "System", "System.out", "term", "String[] args", "args", "private static String[] getStdin() {\n Scanner scanner = new Scanner(System.in);\n ArrayList<String> lines = new ArrayList<>();\n while (scanner.hasNext()) {\n lines.add(scanner.nextLine());\n }\n return lines.toArray(new String[lines.size()]);\n }", "getStdin", "{\n Scanner scanner = new Scanner(System.in);\n ArrayList<String> lines = new ArrayList<>();\n while (scanner.hasNext()) {\n lines.add(scanner.nextLine());\n }\n return lines.toArray(new String[lines.size()]);\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "ArrayList<String> lines = new ArrayList<>();", "lines", "new ArrayList<>()", "while (scanner.hasNext()) {\n lines.add(scanner.nextLine());\n }", "scanner.hasNext()", "scanner.hasNext", "scanner", "{\n lines.add(scanner.nextLine());\n }", "lines.add(scanner.nextLine())", "lines.add", "lines", "scanner.nextLine()", "scanner.nextLine", "scanner", "return lines.toArray(new String[lines.size()]);", "lines.toArray(new String[lines.size()])", "lines.toArray", "lines", "new String[lines.size()]", "lines.size()", "lines.size", "lines", "public class Main {\n public static void main(String[] args) throws Exception {\n String[] lines = getStdin();\n String line = lines[0];\n String[] a = line.split(\" \");\n int term = Integer.parseInt(a[0]);\n int num = Integer.parseInt(a[1]);\n\n String line1 = lines[1];\n String[] b = line1.split(\" \");\n //int cost = Integer.parseInt(b[i]);\n\n for (int i = 0; i < num; i++){\n int cost = Integer.parseInt(b[i]);\n term = term - cost;\n }\n if (term < 0){\n System.out.println(\"-1\");\n } else if (term >= 0){\n System.out.println(term);\n }\n\n\n\n\n }\n \n private static String[] getStdin() {\n Scanner scanner = new Scanner(System.in);\n ArrayList<String> lines = new ArrayList<>();\n while (scanner.hasNext()) {\n lines.add(scanner.nextLine());\n }\n return lines.toArray(new String[lines.size()]);\n }\n \n}", "public class Main {\n public static void main(String[] args) throws Exception {\n String[] lines = getStdin();\n String line = lines[0];\n String[] a = line.split(\" \");\n int term = Integer.parseInt(a[0]);\n int num = Integer.parseInt(a[1]);\n\n String line1 = lines[1];\n String[] b = line1.split(\" \");\n //int cost = Integer.parseInt(b[i]);\n\n for (int i = 0; i < num; i++){\n int cost = Integer.parseInt(b[i]);\n term = term - cost;\n }\n if (term < 0){\n System.out.println(\"-1\");\n } else if (term >= 0){\n System.out.println(term);\n }\n\n\n\n\n }\n \n private static String[] getStdin() {\n Scanner scanner = new Scanner(System.in);\n ArrayList<String> lines = new ArrayList<>();\n while (scanner.hasNext()) {\n lines.add(scanner.nextLine());\n }\n return lines.toArray(new String[lines.size()]);\n }\n \n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) throws Exception { String[] lines = getStdin(); String line = lines[0]; String[] a = line.split(" "); int term = Integer.parseInt(a[0]); int num = Integer.parseInt(a[1]); String line1 = lines[1]; String[] b = line1.split(" "); //int cost = Integer.parseInt(b[i]); for (int i = 0; i < num; i++){ int cost = Integer.parseInt(b[i]); term = term - cost; } if (term < 0){ System.out.println("-1"); } else if (term >= 0){ System.out.println(term); } } private static String[] getStdin() { Scanner scanner = new Scanner(System.in); ArrayList<String> lines = new ArrayList<>(); while (scanner.hasNext()) { lines.add(scanner.nextLine()); } return lines.toArray(new String[lines.size()]); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 17, 41, 13, 4, 18, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 2, 13, 13, 40, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 87, 8 ], [ 87, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 19, 20 ], [ 20, 21 ], [ 17, 22 ], [ 11, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 25, 28 ], [ 28, 29 ], [ 28, 30 ], [ 11, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 34, 35 ], [ 33, 36 ], [ 36, 37 ], [ 36, 38 ], [ 11, 39 ], [ 39, 40 ], [ 39, 41 ], [ 11, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 44, 49 ], [ 11, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 50, 58 ], [ 58, 59 ], [ 59, 60 ], [ 50, 61 ], [ 62, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 66, 67 ], [ 65, 68 ], [ 68, 69 ], [ 68, 70 ], [ 11, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 71, 76 ], [ 76, 77 ], [ 77, 78 ], [ 76, 79 ], [ 79, 80 ], [ 79, 81 ], [ 76, 82 ], [ 82, 83 ], [ 9, 84 ], [ 84, 85 ], [ 0, 86 ], [ 86, 87 ], [ 86, 88 ] ]
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] head = br.readLine().split(\" \");\n int n = Integer.parseInt(head[0]);\n int m = Integer.parseInt(head[1]);\n int sum = 0;\n String[] line = br.readLine().split(\" \");\n for (int i = 0; i < m; i++) {\n sum += Integer.parseInt(line[i]);\n }\n System.out.println(Math.max(n - sum, -1));\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "public class Main {\n\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] head = br.readLine().split(\" \");\n int n = Integer.parseInt(head[0]);\n int m = Integer.parseInt(head[1]);\n int sum = 0;\n String[] line = br.readLine().split(\" \");\n for (int i = 0; i < m; i++) {\n sum += Integer.parseInt(line[i]);\n }\n System.out.println(Math.max(n - sum, -1));\n }\n}", "Main", "public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] head = br.readLine().split(\" \");\n int n = Integer.parseInt(head[0]);\n int m = Integer.parseInt(head[1]);\n int sum = 0;\n String[] line = br.readLine().split(\" \");\n for (int i = 0; i < m; i++) {\n sum += Integer.parseInt(line[i]);\n }\n System.out.println(Math.max(n - sum, -1));\n }", "main", "{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] head = br.readLine().split(\" \");\n int n = Integer.parseInt(head[0]);\n int m = Integer.parseInt(head[1]);\n int sum = 0;\n String[] line = br.readLine().split(\" \");\n for (int i = 0; i < m; i++) {\n sum += Integer.parseInt(line[i]);\n }\n System.out.println(Math.max(n - sum, -1));\n }", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "String[] head = br.readLine().split(\" \");", "head", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "int n = Integer.parseInt(head[0]);", "n", "Integer.parseInt(head[0])", "Integer.parseInt", "Integer", "head[0]", "head", "0", "int m = Integer.parseInt(head[1]);", "m", "Integer.parseInt(head[1])", "Integer.parseInt", "Integer", "head[1]", "head", "1", "int sum = 0;", "sum", "0", "String[] line = br.readLine().split(\" \");", "line", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "for (int i = 0; i < m; i++) {\n sum += Integer.parseInt(line[i]);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < m", "i", "m", "i++", "i++", "i", "{\n sum += Integer.parseInt(line[i]);\n }", "{\n sum += Integer.parseInt(line[i]);\n }", "sum += Integer.parseInt(line[i])", "sum", "Integer.parseInt(line[i])", "Integer.parseInt", "Integer", "line[i]", "line", "i", "System.out.println(Math.max(n - sum, -1))", "System.out.println", "System.out", "System", "System.out", "Math.max(n - sum, -1)", "Math.max", "Math", "n - sum", "n", "sum", "-1", "1", "String[] args", "args", "public class Main {\n\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] head = br.readLine().split(\" \");\n int n = Integer.parseInt(head[0]);\n int m = Integer.parseInt(head[1]);\n int sum = 0;\n String[] line = br.readLine().split(\" \");\n for (int i = 0; i < m; i++) {\n sum += Integer.parseInt(line[i]);\n }\n System.out.println(Math.max(n - sum, -1));\n }\n}", "public class Main {\n\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] head = br.readLine().split(\" \");\n int n = Integer.parseInt(head[0]);\n int m = Integer.parseInt(head[1]);\n int sum = 0;\n String[] line = br.readLine().split(\" \");\n for (int i = 0; i < m; i++) {\n sum += Integer.parseInt(line[i]);\n }\n System.out.println(Math.max(n - sum, -1));\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] head = br.readLine().split(" "); int n = Integer.parseInt(head[0]); int m = Integer.parseInt(head[1]); int sum = 0; String[] line = br.readLine().split(" "); for (int i = 0; i < m; i++) { sum += Integer.parseInt(line[i]); } System.out.println(Math.max(n - sum, -1)); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 0, 13, 2, 13, 13, 0, 13, 13, 14, 2, 13, 17, 30, 0, 13, 40, 17, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 69, 5 ], [ 69, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 37, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 45, 47 ], [ 37, 48 ], [ 48, 49 ], [ 48, 50 ], [ 8, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 51, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 8, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 60, 65 ], [ 6, 66 ], [ 66, 67 ], [ 0, 68 ], [ 68, 69 ], [ 68, 70 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\tint a = input.nextInt();\n\t\tint b = input.nextInt();\n\t\tint d = 0;\n\n\t\tfor (int i = 0; i < b; i++) {\n\t\t\tint c = input.nextInt();\n\t\t\td = a - c;\n\t\t\ta = d;\n\t\t}\n\n\t\tif (d < 0) {\n\t\t\td = -1;\n\t\t}\n\t\tSystem.out.println(d);\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\tint a = input.nextInt();\n\t\tint b = input.nextInt();\n\t\tint d = 0;\n\n\t\tfor (int i = 0; i < b; i++) {\n\t\t\tint c = input.nextInt();\n\t\t\td = a - c;\n\t\t\ta = d;\n\t\t}\n\n\t\tif (d < 0) {\n\t\t\td = -1;\n\t\t}\n\t\tSystem.out.println(d);\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\tint a = input.nextInt();\n\t\tint b = input.nextInt();\n\t\tint d = 0;\n\n\t\tfor (int i = 0; i < b; i++) {\n\t\t\tint c = input.nextInt();\n\t\t\td = a - c;\n\t\t\ta = d;\n\t\t}\n\n\t\tif (d < 0) {\n\t\t\td = -1;\n\t\t}\n\t\tSystem.out.println(d);\n\t}", "main", "{\n\t\tScanner input = new Scanner(System.in);\n\t\tint a = input.nextInt();\n\t\tint b = input.nextInt();\n\t\tint d = 0;\n\n\t\tfor (int i = 0; i < b; i++) {\n\t\t\tint c = input.nextInt();\n\t\t\td = a - c;\n\t\t\ta = d;\n\t\t}\n\n\t\tif (d < 0) {\n\t\t\td = -1;\n\t\t}\n\t\tSystem.out.println(d);\n\t}", "Scanner input = new Scanner(System.in);", "input", "new Scanner(System.in)", "int a = input.nextInt();", "a", "input.nextInt()", "input.nextInt", "input", "int b = input.nextInt();", "b", "input.nextInt()", "input.nextInt", "input", "int d = 0;", "d", "0", "for (int i = 0; i < b; i++) {\n\t\t\tint c = input.nextInt();\n\t\t\td = a - c;\n\t\t\ta = d;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < b", "i", "b", "i++", "i++", "i", "{\n\t\t\tint c = input.nextInt();\n\t\t\td = a - c;\n\t\t\ta = d;\n\t\t}", "{\n\t\t\tint c = input.nextInt();\n\t\t\td = a - c;\n\t\t\ta = d;\n\t\t}", "int c = input.nextInt();", "c", "input.nextInt()", "input.nextInt", "input", "d = a - c", "d", "a - c", "a", "c", "a = d", "a", "d", "if (d < 0) {\n\t\t\td = -1;\n\t\t}", "d < 0", "d", "0", "{\n\t\t\td = -1;\n\t\t}", "d = -1", "d", "-1", "1", "System.out.println(d)", "System.out.println", "System.out", "System", "System.out", "d", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\tint a = input.nextInt();\n\t\tint b = input.nextInt();\n\t\tint d = 0;\n\n\t\tfor (int i = 0; i < b; i++) {\n\t\t\tint c = input.nextInt();\n\t\t\td = a - c;\n\t\t\ta = d;\n\t\t}\n\n\t\tif (d < 0) {\n\t\t\td = -1;\n\t\t}\n\t\tSystem.out.println(d);\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\tint a = input.nextInt();\n\t\tint b = input.nextInt();\n\t\tint d = 0;\n\n\t\tfor (int i = 0; i < b; i++) {\n\t\t\tint c = input.nextInt();\n\t\t\td = a - c;\n\t\t\ta = d;\n\t\t}\n\n\t\tif (d < 0) {\n\t\t\td = -1;\n\t\t}\n\t\tSystem.out.println(d);\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); int a = input.nextInt(); int b = input.nextInt(); int d = 0; for (int i = 0; i < b; i++) { int c = input.nextInt(); d = a - c; a = d; } if (d < 0) { d = -1; } System.out.println(d); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 2, 13, 4, 18, 13, 14, 2, 13, 17, 0, 13, 40, 17, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 59, 5 ], [ 59, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 22, 27 ], [ 27, 28 ], [ 27, 29 ], [ 22, 30 ], [ 30, 31 ], [ 31, 32 ], [ 22, 33 ], [ 34, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 8, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 42, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 8, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 6, 56 ], [ 56, 57 ], [ 0, 58 ], [ 58, 59 ], [ 58, 60 ] ]
[ "import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int M = scanner.nextInt();\n for(int i = 0;i < M;i++){\n N = N - scanner.nextInt();\n }\n if(N < 0) N = -1;\n System.out.println(N);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int M = scanner.nextInt();\n for(int i = 0;i < M;i++){\n N = N - scanner.nextInt();\n }\n if(N < 0) N = -1;\n System.out.println(N);\n }\n}", "Main", "public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int M = scanner.nextInt();\n for(int i = 0;i < M;i++){\n N = N - scanner.nextInt();\n }\n if(N < 0) N = -1;\n System.out.println(N);\n }", "main", "{\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int M = scanner.nextInt();\n for(int i = 0;i < M;i++){\n N = N - scanner.nextInt();\n }\n if(N < 0) N = -1;\n System.out.println(N);\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int N = scanner.nextInt();", "N", "scanner.nextInt()", "scanner.nextInt", "scanner", "int M = scanner.nextInt();", "M", "scanner.nextInt()", "scanner.nextInt", "scanner", "for(int i = 0;i < M;i++){\n N = N - scanner.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < M", "i", "M", "i++", "i++", "i", "{\n N = N - scanner.nextInt();\n }", "{\n N = N - scanner.nextInt();\n }", "N = N - scanner.nextInt()", "N", "N - scanner.nextInt()", "N", "scanner.nextInt()", "scanner.nextInt", "scanner", "if(N < 0) N = -1;", "N < 0", "N", "0", "N = -1", "N", "-1", "1", "System.out.println(N)", "System.out.println", "System.out", "System", "System.out", "N", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int M = scanner.nextInt();\n for(int i = 0;i < M;i++){\n N = N - scanner.nextInt();\n }\n if(N < 0) N = -1;\n System.out.println(N);\n }\n}", "public class Main{\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int M = scanner.nextInt();\n for(int i = 0;i < M;i++){\n N = N - scanner.nextInt();\n }\n if(N < 0) N = -1;\n System.out.println(N);\n }\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner scanner = new Scanner(System.in); int N = scanner.nextInt(); int M = scanner.nextInt(); for(int i = 0;i < M;i++){ N = N - scanner.nextInt(); } if(N < 0) N = -1; System.out.println(N); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 41, 13, 2, 13, 13, 14, 2, 13, 17, 30, 0, 13, 40, 17, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 72, 11 ], [ 72, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 14, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 14, 28 ], [ 28, 29 ], [ 28, 30 ], [ 14, 31 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 31, 36 ], [ 36, 37 ], [ 36, 38 ], [ 31, 39 ], [ 39, 40 ], [ 40, 41 ], [ 31, 42 ], [ 43, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 47, 48 ], [ 14, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 51, 53 ], [ 14, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 54, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 14, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 12, 69 ], [ 69, 70 ], [ 0, 71 ], [ 71, 72 ], [ 71, 73 ] ]
[ "import java.util.*;\nimport java.lang.*;\nimport java.io.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int m = sc.nextInt();\n int sum_days = 0;\n for (int i = 0; i<m;i++){\n sum_days += sc.nextInt();\n }\n int res = n - sum_days; \n if(res<0){\n res = -1;\n }\n System.out.println(res);\n }\n}", "import java.util.*;", "util.*", "java", "import java.lang.*;", "lang.*", "java", "import java.io.*;", "io.*", "java", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int m = sc.nextInt();\n int sum_days = 0;\n for (int i = 0; i<m;i++){\n sum_days += sc.nextInt();\n }\n int res = n - sum_days; \n if(res<0){\n res = -1;\n }\n System.out.println(res);\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int m = sc.nextInt();\n int sum_days = 0;\n for (int i = 0; i<m;i++){\n sum_days += sc.nextInt();\n }\n int res = n - sum_days; \n if(res<0){\n res = -1;\n }\n System.out.println(res);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int m = sc.nextInt();\n int sum_days = 0;\n for (int i = 0; i<m;i++){\n sum_days += sc.nextInt();\n }\n int res = n - sum_days; \n if(res<0){\n res = -1;\n }\n System.out.println(res);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int m = sc.nextInt();", "m", "sc.nextInt()", "sc.nextInt", "sc", "int sum_days = 0;", "sum_days", "0", "for (int i = 0; i<m;i++){\n sum_days += sc.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i<m", "i", "m", "i++", "i++", "i", "{\n sum_days += sc.nextInt();\n }", "{\n sum_days += sc.nextInt();\n }", "sum_days += sc.nextInt()", "sum_days", "sc.nextInt()", "sc.nextInt", "sc", "int res = n - sum_days;", "res", "n - sum_days", "n", "sum_days", "if(res<0){\n res = -1;\n }", "res<0", "res", "0", "{\n res = -1;\n }", "res = -1", "res", "-1", "1", "System.out.println(res)", "System.out.println", "System.out", "System", "System.out", "res", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int m = sc.nextInt();\n int sum_days = 0;\n for (int i = 0; i<m;i++){\n sum_days += sc.nextInt();\n }\n int res = n - sum_days; \n if(res<0){\n res = -1;\n }\n System.out.println(res);\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int m = sc.nextInt();\n int sum_days = 0;\n for (int i = 0; i<m;i++){\n sum_days += sc.nextInt();\n }\n int res = n - sum_days; \n if(res<0){\n res = -1;\n }\n System.out.println(res);\n }\n}", "Main" ]
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 m = sc.nextInt(); int sum_days = 0; for (int i = 0; i<m;i++){ sum_days += sc.nextInt(); } int res = n - sum_days; if(res<0){ res = -1; } System.out.println(res); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 20, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 41, 13, 17, 42, 2, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 13, 40, 13, 4, 18, 18, 13, 13, 8, 2, 13, 17, 13, 40, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 59, 5 ], [ 59, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 8, 11 ], [ 11, 12 ], [ 8, 13 ], [ 13, 14 ], [ 13, 15 ], [ 8, 16 ], [ 16, 17 ], [ 16, 18 ], [ 18, 19 ], [ 19, 20 ], [ 8, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 8, 26 ], [ 26, 27 ], [ 26, 28 ], [ 8, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 29, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 33, 39 ], [ 39, 40 ], [ 39, 41 ], [ 33, 42 ], [ 42, 43 ], [ 8, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 44, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 49, 53 ], [ 49, 54 ], [ 54, 55 ], [ 6, 56 ], [ 56, 57 ], [ 0, 58 ], [ 58, 59 ], [ 58, 60 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n int N, M;\n Scanner sc = new Scanner(System.in);\n N = sc.nextInt();\n M = sc.nextInt();\n int temp = 0;\n while (M > 0)\n {\n temp = sc.nextInt();\n N -= temp;\n M--;\n }\n System.out.println(N >=0 ? N : -1);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n int N, M;\n Scanner sc = new Scanner(System.in);\n N = sc.nextInt();\n M = sc.nextInt();\n int temp = 0;\n while (M > 0)\n {\n temp = sc.nextInt();\n N -= temp;\n M--;\n }\n System.out.println(N >=0 ? N : -1);\n }\n}", "Main", "public static void main(String[] args) {\n int N, M;\n Scanner sc = new Scanner(System.in);\n N = sc.nextInt();\n M = sc.nextInt();\n int temp = 0;\n while (M > 0)\n {\n temp = sc.nextInt();\n N -= temp;\n M--;\n }\n System.out.println(N >=0 ? N : -1);\n }", "main", "{\n int N, M;\n Scanner sc = new Scanner(System.in);\n N = sc.nextInt();\n M = sc.nextInt();\n int temp = 0;\n while (M > 0)\n {\n temp = sc.nextInt();\n N -= temp;\n M--;\n }\n System.out.println(N >=0 ? N : -1);\n }", "int N", "N", "M;", "M", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "N = sc.nextInt()", "N", "sc.nextInt()", "sc.nextInt", "sc", "M = sc.nextInt()", "M", "sc.nextInt()", "sc.nextInt", "sc", "int temp = 0;", "temp", "0", "while (M > 0)\n {\n temp = sc.nextInt();\n N -= temp;\n M--;\n }", "M > 0", "M", "0", "{\n temp = sc.nextInt();\n N -= temp;\n M--;\n }", "temp = sc.nextInt()", "temp", "sc.nextInt()", "sc.nextInt", "sc", "N -= temp", "N", "temp", "M--", "M", "System.out.println(N >=0 ? N : -1)", "System.out.println", "System.out", "System", "System.out", "N >=0 ? N : -1", "N >=0", "N", "0", "N", "-1", "1", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n int N, M;\n Scanner sc = new Scanner(System.in);\n N = sc.nextInt();\n M = sc.nextInt();\n int temp = 0;\n while (M > 0)\n {\n temp = sc.nextInt();\n N -= temp;\n M--;\n }\n System.out.println(N >=0 ? N : -1);\n }\n}", "public class Main {\n public static void main(String[] args) {\n int N, M;\n Scanner sc = new Scanner(System.in);\n N = sc.nextInt();\n M = sc.nextInt();\n int temp = 0;\n while (M > 0)\n {\n temp = sc.nextInt();\n N -= temp;\n M--;\n }\n System.out.println(N >=0 ? N : -1);\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { int N, M; Scanner sc = new Scanner(System.in); N = sc.nextInt(); M = sc.nextInt(); int temp = 0; while (M > 0) { temp = sc.nextInt(); N -= temp; M--; } System.out.println(N >=0 ? N : -1); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 20, 41, 13, 17, 42, 2, 40, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 41, 13, 17, 28, 13, 13, 30, 0, 13, 13, 14, 2, 13, 13, 4, 18, 13, 40, 17, 4, 18, 13, 2, 13, 13, 4, 18, 13, 23, 13, 6, 13, 41, 13, 41, 13, 20, 17, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 40, 17, 37, 20, 14, 2, 13, 13, 30, 0, 13, 17, 38, 5, 13, 30, 37, 20, 30, 0, 13, 4, 18, 13, 13, 14, 2, 13, 17, 29, 40, 17, 29, 18, 13, 40, 13, 12, 13, 30, 41, 13, 4, 13, 42, 4, 13, 13, 30, 0, 13, 4, 13, 41, 13, 17, 14, 2, 13, 17, 30, 0, 13, 40, 17, 0, 13, 4, 13, 41, 13, 17, 42, 40, 4, 13, 13, 30, 0, 13, 17, 0, 13, 2, 13, 17, 0, 13, 4, 13, 29, 2, 13, 13, 12, 13, 30, 41, 13, 4, 13, 42, 4, 13, 13, 30, 0, 13, 4, 13, 41, 13, 17, 14, 2, 13, 17, 30, 0, 13, 40, 17, 0, 13, 4, 13, 41, 13, 17, 42, 40, 4, 13, 13, 30, 0, 13, 17, 0, 13, 2, 13, 17, 0, 13, 4, 13, 29, 2, 13, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 12, 13, 30, 11, 1, 41, 13, 17, 41, 13, 18, 13, 13, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 2, 4, 18, 13, 2, 13, 13, 13, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 29, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 4, 13, 42, 4, 13, 13, 30, 0, 13, 4, 13, 41, 13, 20, 42, 40, 4, 13, 13, 30, 4, 18, 13, 13, 0, 13, 4, 13, 29, 4, 18, 13, 12, 13, 30, 41, 13, 4, 13, 42, 4, 13, 13, 0, 13, 4, 13, 41, 13, 20, 42, 40, 4, 13, 13, 30, 4, 18, 13, 13, 0, 13, 4, 13, 29, 4, 18, 13, 12, 13, 30, 29, 2, 2, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 2, 13, 17, 2, 13, 40, 17, 23, 13, 12, 13, 30, 29, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 40, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 457, 8 ], [ 457, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 11, 18 ], [ 18, 19 ], [ 18, 20 ], [ 11, 21 ], [ 21, 22 ], [ 21, 23 ], [ 11, 24 ], [ 24, 25 ], [ 25, 26 ], [ 26, 27 ], [ 25, 28 ], [ 24, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 33, 34 ], [ 29, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 29, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 42, 45 ], [ 29, 46 ], [ 46, 47 ], [ 46, 48 ], [ 29, 49 ], [ 49, 50 ], [ 49, 51 ], [ 49, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 29, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 56, 60 ], [ 60, 61 ], [ 61, 62 ], [ 60, 63 ], [ 63, 64 ], [ 56, 65 ], [ 65, 66 ], [ 66, 67 ], [ 65, 68 ], [ 68, 69 ], [ 68, 70 ], [ 11, 71 ], [ 71, 72 ], [ 72, 73 ], [ 9, 74 ], [ 74, 75 ], [ 457, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 76, 80 ], [ 80, 81 ], [ 80, 82 ], [ 76, 84 ], [ 84, 85 ], [ 76, 86 ], [ 86, 87 ], [ 76, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 91, 95 ], [ 88, 96 ], [ 96, 97 ], [ 76, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 101, 106 ], [ 106, 107 ], [ 100, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 108, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 112, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 119, 120 ], [ 120, 121 ], [ 116, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 125, 126 ], [ 126, 127 ], [ 125, 128 ], [ 112, 129 ], [ 129, 130 ], [ 130, 131 ], [ 130, 132 ], [ 129, 133 ], [ 133, 134 ], [ 134, 135 ], [ 100, 136 ], [ 136, 137 ], [ 137, 138 ], [ 137, 139 ], [ 139, 140 ], [ 76, 141 ], [ 141, 142 ], [ 141, 143 ], [ 143, 144 ], [ 144, 145 ], [ 144, 146 ], [ 146, 147 ], [ 143, 148 ], [ 148, 149 ], [ 149, 150 ], [ 149, 151 ], [ 148, 152 ], [ 152, 153 ], [ 153, 154 ], [ 153, 155 ], [ 155, 156 ], [ 143, 157 ], [ 157, 158 ], [ 157, 159 ], [ 143, 160 ], [ 160, 161 ], [ 161, 162 ], [ 161, 163 ], [ 160, 164 ], [ 164, 165 ], [ 165, 166 ], [ 165, 167 ], [ 167, 168 ], [ 164, 169 ], [ 169, 170 ], [ 169, 171 ], [ 171, 172 ], [ 143, 173 ], [ 173, 174 ], [ 173, 175 ], [ 143, 176 ], [ 176, 177 ], [ 177, 178 ], [ 178, 179 ], [ 178, 180 ], [ 176, 181 ], [ 181, 182 ], [ 182, 183 ], [ 182, 184 ], [ 181, 185 ], [ 185, 186 ], [ 185, 187 ], [ 187, 188 ], [ 187, 189 ], [ 181, 190 ], [ 190, 191 ], [ 190, 192 ], [ 192, 193 ], [ 143, 194 ], [ 194, 195 ], [ 195, 196 ], [ 195, 197 ], [ 76, 198 ], [ 198, 199 ], [ 198, 200 ], [ 200, 201 ], [ 201, 202 ], [ 201, 203 ], [ 203, 204 ], [ 200, 205 ], [ 205, 206 ], [ 206, 207 ], [ 206, 208 ], [ 205, 209 ], [ 209, 210 ], [ 210, 211 ], [ 210, 212 ], [ 212, 213 ], [ 200, 214 ], [ 214, 215 ], [ 214, 216 ], [ 200, 217 ], [ 217, 218 ], [ 218, 219 ], [ 218, 220 ], [ 217, 221 ], [ 221, 222 ], [ 222, 223 ], [ 222, 224 ], [ 224, 225 ], [ 221, 226 ], [ 226, 227 ], [ 226, 228 ], [ 228, 229 ], [ 200, 230 ], [ 230, 231 ], [ 230, 232 ], [ 200, 233 ], [ 233, 234 ], [ 234, 235 ], [ 235, 236 ], [ 235, 237 ], [ 233, 238 ], [ 238, 239 ], [ 239, 240 ], [ 239, 241 ], [ 238, 242 ], [ 242, 243 ], [ 242, 244 ], [ 244, 245 ], [ 244, 246 ], [ 238, 247 ], [ 247, 248 ], [ 247, 249 ], [ 249, 250 ], [ 200, 251 ], [ 251, 252 ], [ 252, 253 ], [ 252, 254 ], [ 76, 255 ], [ 255, 256 ], [ 255, 257 ], [ 257, 258 ], [ 258, 259 ], [ 258, 260 ], [ 257, 262 ], [ 262, 263 ], [ 263, 264 ], [ 264, 265 ], [ 264, 266 ], [ 262, 267 ], [ 267, 268 ], [ 267, 269 ], [ 262, 270 ], [ 270, 271 ], [ 271, 272 ], [ 262, 273 ], [ 274, 274 ], [ 274, 275 ], [ 275, 276 ], [ 276, 277 ], [ 276, 278 ], [ 275, 279 ], [ 279, 280 ], [ 257, 281 ], [ 281, 282 ], [ 255, 283 ], [ 283, 284 ], [ 76, 285 ], [ 285, 286 ], [ 285, 287 ], [ 287, 288 ], [ 288, 289 ], [ 289, 290 ], [ 290, 291 ], [ 290, 292 ], [ 289, 293 ], [ 293, 294 ], [ 293, 295 ], [ 295, 296 ], [ 295, 297 ], [ 288, 298 ], [ 298, 299 ], [ 298, 300 ], [ 288, 301 ], [ 301, 302 ], [ 302, 303 ], [ 288, 304 ], [ 305, 305 ], [ 305, 306 ], [ 306, 307 ], [ 306, 308 ], [ 308, 309 ], [ 309, 310 ], [ 310, 311 ], [ 309, 312 ], [ 312, 313 ], [ 312, 314 ], [ 308, 315 ], [ 305, 316 ], [ 316, 317 ], [ 316, 318 ], [ 318, 319 ], [ 318, 320 ], [ 305, 321 ], [ 321, 322 ], [ 322, 323 ], [ 322, 324 ], [ 321, 325 ], [ 325, 326 ], [ 325, 327 ], [ 305, 328 ], [ 328, 329 ], [ 329, 330 ], [ 329, 331 ], [ 328, 332 ], [ 287, 333 ], [ 333, 334 ], [ 285, 335 ], [ 335, 336 ], [ 285, 337 ], [ 337, 338 ], [ 76, 339 ], [ 339, 340 ], [ 339, 341 ], [ 341, 342 ], [ 342, 343 ], [ 342, 344 ], [ 344, 345 ], [ 341, 346 ], [ 346, 347 ], [ 347, 348 ], [ 347, 349 ], [ 346, 350 ], [ 350, 351 ], [ 351, 352 ], [ 351, 353 ], [ 353, 354 ], [ 341, 355 ], [ 355, 356 ], [ 355, 357 ], [ 341, 358 ], [ 358, 359 ], [ 359, 360 ], [ 360, 361 ], [ 360, 362 ], [ 358, 363 ], [ 363, 364 ], [ 364, 365 ], [ 365, 366 ], [ 364, 367 ], [ 363, 368 ], [ 368, 369 ], [ 368, 370 ], [ 370, 371 ], [ 341, 372 ], [ 372, 373 ], [ 373, 374 ], [ 374, 375 ], [ 76, 376 ], [ 376, 377 ], [ 376, 378 ], [ 378, 379 ], [ 379, 380 ], [ 379, 381 ], [ 381, 382 ], [ 378, 383 ], [ 383, 384 ], [ 384, 385 ], [ 384, 386 ], [ 383, 387 ], [ 387, 388 ], [ 387, 389 ], [ 389, 390 ], [ 378, 391 ], [ 391, 392 ], [ 391, 393 ], [ 378, 394 ], [ 394, 395 ], [ 395, 396 ], [ 396, 397 ], [ 396, 398 ], [ 394, 399 ], [ 399, 400 ], [ 400, 401 ], [ 401, 402 ], [ 400, 403 ], [ 399, 404 ], [ 404, 405 ], [ 404, 406 ], [ 406, 407 ], [ 378, 408 ], [ 408, 409 ], [ 409, 410 ], [ 410, 411 ], [ 76, 412 ], [ 412, 413 ], [ 412, 414 ], [ 414, 415 ], [ 415, 416 ], [ 419, 417 ], [ 429, 418 ], [ 426, 419 ], [ 419, 420 ], [ 420, 421 ], [ 420, 422 ], [ 419, 423 ], [ 423, 424 ], [ 423, 425 ], [ 426, 426 ], [ 426, 427 ], [ 426, 428 ], [ 429, 429 ], [ 429, 430 ], [ 429, 431 ], [ 419, 432 ], [ 432, 433 ], [ 432, 434 ], [ 434, 435 ], [ 412, 436 ], [ 436, 437 ], [ 76, 438 ], [ 438, 439 ], [ 438, 440 ], [ 440, 441 ], [ 441, 442 ], [ 443, 443 ], [ 443, 444 ], [ 444, 445 ], [ 444, 446 ], [ 443, 447 ], [ 447, 448 ], [ 447, 449 ], [ 443, 450 ], [ 450, 451 ], [ 450, 452 ], [ 452, 453 ], [ 438, 454 ], [ 454, 455 ], [ 0, 456 ], [ 456, 457 ], [ 456, 458 ] ]
[ "import java.io.*;\nimport java.util.*;\npublic class Main {\n\n public static void main(String[] args) {\n InputReader sc = new InputReader(System.in);\n PrintWriter pw = new PrintWriter(System.out);\n Random gen = new Random();\n int test = 1;//sc.nextInt();\n while(test-->0) {\n\n int n = sc.nextInt();\n int m = sc.nextInt();\n int [] ar = sc.nextIntArray(m);\n long sum = 0;\n for(int i : ar)\n sum+=i;\n\n if(sum>n)\n pw.println(-1);\n else\n pw.println(n-sum);\n\n }\n pw.close();\n\n }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n static class InputReader {\n\n private final InputStream stream;\n private final byte[] buf = new byte[8192];\n private int curChar, snumChars;\n\n public InputReader(InputStream st) {\n this.stream = st;\n }\n\n public int read() {\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long nextLong() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public int[] nextIntArray(int n) {\n int [] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n public static int[] shuffle(int[] a, Random gen)\n { for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }\n\n\n public String readString() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String nextLine() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndOfLine(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n }\n\n}", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "public class Main {\n\n public static void main(String[] args) {\n InputReader sc = new InputReader(System.in);\n PrintWriter pw = new PrintWriter(System.out);\n Random gen = new Random();\n int test = 1;//sc.nextInt();\n while(test-->0) {\n\n int n = sc.nextInt();\n int m = sc.nextInt();\n int [] ar = sc.nextIntArray(m);\n long sum = 0;\n for(int i : ar)\n sum+=i;\n\n if(sum>n)\n pw.println(-1);\n else\n pw.println(n-sum);\n\n }\n pw.close();\n\n }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n static class InputReader {\n\n private final InputStream stream;\n private final byte[] buf = new byte[8192];\n private int curChar, snumChars;\n\n public InputReader(InputStream st) {\n this.stream = st;\n }\n\n public int read() {\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long nextLong() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public int[] nextIntArray(int n) {\n int [] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n public static int[] shuffle(int[] a, Random gen)\n { for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }\n\n\n public String readString() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String nextLine() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndOfLine(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n }\n\n}", "Main", "public static void main(String[] args) {\n InputReader sc = new InputReader(System.in);\n PrintWriter pw = new PrintWriter(System.out);\n Random gen = new Random();\n int test = 1;//sc.nextInt();\n while(test-->0) {\n\n int n = sc.nextInt();\n int m = sc.nextInt();\n int [] ar = sc.nextIntArray(m);\n long sum = 0;\n for(int i : ar)\n sum+=i;\n\n if(sum>n)\n pw.println(-1);\n else\n pw.println(n-sum);\n\n }\n pw.close();\n\n }", "main", "{\n InputReader sc = new InputReader(System.in);\n PrintWriter pw = new PrintWriter(System.out);\n Random gen = new Random();\n int test = 1;//sc.nextInt();\n while(test-->0) {\n\n int n = sc.nextInt();\n int m = sc.nextInt();\n int [] ar = sc.nextIntArray(m);\n long sum = 0;\n for(int i : ar)\n sum+=i;\n\n if(sum>n)\n pw.println(-1);\n else\n pw.println(n-sum);\n\n }\n pw.close();\n\n }", "InputReader sc = new InputReader(System.in);", "sc", "new InputReader(System.in)", "PrintWriter pw = new PrintWriter(System.out);", "pw", "new PrintWriter(System.out)", "Random gen = new Random();", "gen", "new Random()", "int test = 1;", "test", "1", "while(test-->0) {\n\n int n = sc.nextInt();\n int m = sc.nextInt();\n int [] ar = sc.nextIntArray(m);\n long sum = 0;\n for(int i : ar)\n sum+=i;\n\n if(sum>n)\n pw.println(-1);\n else\n pw.println(n-sum);\n\n }", "test-->0", "test--", "test", "0", "{\n\n int n = sc.nextInt();\n int m = sc.nextInt();\n int [] ar = sc.nextIntArray(m);\n long sum = 0;\n for(int i : ar)\n sum+=i;\n\n if(sum>n)\n pw.println(-1);\n else\n pw.println(n-sum);\n\n }", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int m = sc.nextInt();", "m", "sc.nextInt()", "sc.nextInt", "sc", "int [] ar = sc.nextIntArray(m);", "ar", "sc.nextIntArray(m)", "sc.nextIntArray", "sc", "m", "long sum = 0;", "sum", "0", "for(int i : ar)\n sum+=i;", "int i", "ar", "sum+=i;", "sum+=i", "sum", "i", "if(sum>n)\n pw.println(-1);\n else\n pw.println(n-sum);", "sum>n", "sum", "n", "pw.println(-1)", "pw.println", "pw", "-1", "1", "pw.println(n-sum)", "pw.println", "pw", "n-sum", "n", "sum", "pw.close()", "pw.close", "pw", "String[] args", "args", "static class InputReader {\n\n private final InputStream stream;\n private final byte[] buf = new byte[8192];\n private int curChar, snumChars;\n\n public InputReader(InputStream st) {\n this.stream = st;\n }\n\n public int read() {\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long nextLong() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public int[] nextIntArray(int n) {\n int [] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n public static int[] shuffle(int[] a, Random gen)\n { for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }\n\n\n public String readString() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String nextLine() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndOfLine(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n }", "InputReader", "private final InputStream stream;", "stream", "private final byte[] buf = new byte[8192];", "buf", "new byte[8192]", "8192", "private int curChar", "curChar", "snumChars;", "snumChars", "public InputReader(InputStream st) {\n this.stream = st;\n }", "InputReader", "{\n this.stream = st;\n }", "this.stream = st", "this.stream", "this", "this.stream", "st", "InputStream st", "st", "public int read() {\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }", "read", "{\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }", "if (snumChars == -1)\n throw new InputMismatchException();", "snumChars == -1", "snumChars", "-1", "1", "throw new InputMismatchException();", "new InputMismatchException()", "if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }", "curChar >= snumChars", "curChar", "snumChars", "{\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }", "curChar = 0", "curChar", "0", "try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }", "catch (IOException e) {\n throw new InputMismatchException();\n }", "IOException e", "{\n throw new InputMismatchException();\n }", "throw new InputMismatchException();", "new InputMismatchException()", "{\n snumChars = stream.read(buf);\n }", "snumChars = stream.read(buf)", "snumChars", "stream.read(buf)", "stream.read", "stream", "buf", "if (snumChars <= 0)\n return -1;", "snumChars <= 0", "snumChars", "0", "return -1;", "-1", "1", "return buf[curChar++];", "buf[curChar++]", "buf", "curChar++", "curChar", "public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }", "nextInt", "{\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }", "int c = read();", "c", "read()", "read", "while (isSpaceChar(c)) {\n c = read();\n }", "isSpaceChar(c)", "isSpaceChar", "c", "{\n c = read();\n }", "c = read()", "c", "read()", "read", "int sgn = 1;", "sgn", "1", "if (c == '-') {\n sgn = -1;\n c = read();\n }", "c == '-'", "c", "'-'", "{\n sgn = -1;\n c = read();\n }", "sgn = -1", "sgn", "-1", "1", "c = read()", "c", "read()", "read", "int res = 0;", "res", "0", "do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));", "!isSpaceChar(c)", "isSpaceChar(c)", "isSpaceChar", "c", "{\n res *= 10;\n res += c - '0';\n c = read();\n }", "res *= 10", "res", "10", "res += c - '0'", "res", "c - '0'", "c", "'0'", "c = read()", "c", "read()", "read", "return res * sgn;", "res * sgn", "res", "sgn", "public long nextLong() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }", "nextLong", "{\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }", "int c = read();", "c", "read()", "read", "while (isSpaceChar(c)) {\n c = read();\n }", "isSpaceChar(c)", "isSpaceChar", "c", "{\n c = read();\n }", "c = read()", "c", "read()", "read", "int sgn = 1;", "sgn", "1", "if (c == '-') {\n sgn = -1;\n c = read();\n }", "c == '-'", "c", "'-'", "{\n sgn = -1;\n c = read();\n }", "sgn = -1", "sgn", "-1", "1", "c = read()", "c", "read()", "read", "long res = 0;", "res", "0", "do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));", "!isSpaceChar(c)", "isSpaceChar(c)", "isSpaceChar", "c", "{\n res *= 10;\n res += c - '0';\n c = read();\n }", "res *= 10", "res", "10", "res += c - '0'", "res", "c - '0'", "c", "'0'", "c = read()", "c", "read()", "read", "return res * sgn;", "res * sgn", "res", "sgn", "public int[] nextIntArray(int n) {\n int [] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }", "nextIntArray", "{\n int [] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }", "int [] a = new int[n];", "a", "new int[n]", "n", "for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n a[i] = nextInt();\n }", "{\n a[i] = nextInt();\n }", "a[i] = nextInt()", "a[i]", "a", "i", "nextInt()", "nextInt", "return a;", "a", "int n", "n", "public static int[] shuffle(int[] a, Random gen)\n { for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }", "shuffle", "{ for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }", "for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }", "int i = 0, n = a.length;", "int i = 0", "i", "0", "n = a.length;", "n", "a.length", "a", "a.length", "i < n", "i", "n", "i++", "i++", "i", "{ int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }", "{ int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }", "int ind = gen.nextInt(n-i)+i;", "ind", "gen.nextInt(n-i)+i", "gen.nextInt(n-i)", "gen.nextInt", "gen", "n-i", "n", "i", "i", "int d = a[i];", "d", "a[i]", "a", "i", "a[i] = a[ind]", "a[i]", "a", "i", "a[ind]", "a", "ind", "a[ind] = d", "a[ind]", "a", "ind", "d", "return a;", "a", "int[] a", "a", "Random gen", "gen", "public String readString() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }", "readString", "{\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }", "int c = read();", "c", "read()", "read", "while (isSpaceChar(c)) {\n c = read();\n }", "isSpaceChar(c)", "isSpaceChar", "c", "{\n c = read();\n }", "c = read()", "c", "read()", "read", "StringBuilder res = new StringBuilder();", "res", "new StringBuilder()", "do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));", "!isSpaceChar(c)", "isSpaceChar(c)", "isSpaceChar", "c", "{\n res.appendCodePoint(c);\n c = read();\n }", "res.appendCodePoint(c)", "res.appendCodePoint", "res", "c", "c = read()", "c", "read()", "read", "return res.toString();", "res.toString()", "res.toString", "res", "public String nextLine() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndOfLine(c));\n return res.toString();\n }", "nextLine", "{\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndOfLine(c));\n return res.toString();\n }", "int c = read();", "c", "read()", "read", "while (isSpaceChar(c))\n c = read();", "isSpaceChar(c)", "isSpaceChar", "c", "c = read()", "c", "read()", "read", "StringBuilder res = new StringBuilder();", "res", "new StringBuilder()", "do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndOfLine(c));", "!isEndOfLine(c)", "isEndOfLine(c)", "isEndOfLine", "c", "{\n res.appendCodePoint(c);\n c = read();\n }", "res.appendCodePoint(c)", "res.appendCodePoint", "res", "c", "c = read()", "c", "read()", "read", "return res.toString();", "res.toString()", "res.toString", "res", "public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }", "isSpaceChar", "{\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }", "return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;", "c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1", "c == '\\t'", "c == '\\r'", "c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1", "c == ' '", "c", "' '", "c == '\\n'", "c", "'\\n'", "c == '\\r'", "c", "'\\r'", "c == '\\t'", "c", "'\\t'", "c == -1", "c", "-1", "1", "int c", "c", "private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }", "isEndOfLine", "{\n return c == '\\n' || c == '\\r' || c == -1;\n }", "return c == '\\n' || c == '\\r' || c == -1;", "c == '\\n' || c == '\\r' || c == -1", "c == '\\n' || c == '\\r' || c == -1", "c == '\\n'", "c", "'\\n'", "c == '\\r'", "c", "'\\r'", "c == -1", "c", "-1", "1", "int c", "c", "public class Main {\n\n public static void main(String[] args) {\n InputReader sc = new InputReader(System.in);\n PrintWriter pw = new PrintWriter(System.out);\n Random gen = new Random();\n int test = 1;//sc.nextInt();\n while(test-->0) {\n\n int n = sc.nextInt();\n int m = sc.nextInt();\n int [] ar = sc.nextIntArray(m);\n long sum = 0;\n for(int i : ar)\n sum+=i;\n\n if(sum>n)\n pw.println(-1);\n else\n pw.println(n-sum);\n\n }\n pw.close();\n\n }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n static class InputReader {\n\n private final InputStream stream;\n private final byte[] buf = new byte[8192];\n private int curChar, snumChars;\n\n public InputReader(InputStream st) {\n this.stream = st;\n }\n\n public int read() {\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long nextLong() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public int[] nextIntArray(int n) {\n int [] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n public static int[] shuffle(int[] a, Random gen)\n { for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }\n\n\n public String readString() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String nextLine() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndOfLine(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n }\n\n}", "public class Main {\n\n public static void main(String[] args) {\n InputReader sc = new InputReader(System.in);\n PrintWriter pw = new PrintWriter(System.out);\n Random gen = new Random();\n int test = 1;//sc.nextInt();\n while(test-->0) {\n\n int n = sc.nextInt();\n int m = sc.nextInt();\n int [] ar = sc.nextIntArray(m);\n long sum = 0;\n for(int i : ar)\n sum+=i;\n\n if(sum>n)\n pw.println(-1);\n else\n pw.println(n-sum);\n\n }\n pw.close();\n\n }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n static class InputReader {\n\n private final InputStream stream;\n private final byte[] buf = new byte[8192];\n private int curChar, snumChars;\n\n public InputReader(InputStream st) {\n this.stream = st;\n }\n\n public int read() {\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long nextLong() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public int[] nextIntArray(int n) {\n int [] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n public static int[] shuffle(int[] a, Random gen)\n { for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }\n\n\n public String readString() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String nextLine() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndOfLine(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n }\n\n}", "Main" ]
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) { InputReader sc = new InputReader(System.in); PrintWriter pw = new PrintWriter(System.out); Random gen = new Random(); int test = 1;//sc.nextInt(); while(test-->0) { int n = sc.nextInt(); int m = sc.nextInt(); int [] ar = sc.nextIntArray(m); long sum = 0; for(int i : ar) sum+=i; if(sum>n) pw.println(-1); else pw.println(n-sum); } pw.close(); } static class InputReader { private final InputStream stream; private final byte[] buf = new byte[8192]; private int curChar, snumChars; public InputReader(InputStream st) { this.stream = st; } public int read() { if (snumChars == -1) throw new InputMismatchException(); if (curChar >= snumChars) { curChar = 0; try { snumChars = stream.read(buf); } catch (IOException e) { throw new InputMismatchException(); } if (snumChars <= 0) return -1; } return buf[curChar++]; } public int nextInt() { int c = read(); while (isSpaceChar(c)) { c = read(); } int sgn = 1; if (c == '-') { sgn = -1; c = read(); } int res = 0; do { res *= 10; res += c - '0'; c = read(); } while (!isSpaceChar(c)); return res * sgn; } public long nextLong() { int c = read(); while (isSpaceChar(c)) { c = read(); } int sgn = 1; if (c == '-') { sgn = -1; c = read(); } long res = 0; do { res *= 10; res += c - '0'; c = read(); } while (!isSpaceChar(c)); return res * sgn; } public int[] nextIntArray(int n) { int [] a = new int[n]; for (int i = 0; i < n; i++) { a[i] = nextInt(); } return a; } public static int[] shuffle(int[] a, Random gen) { for(int i = 0, n = a.length;i < n;i++) { int ind = gen.nextInt(n-i)+i; int d = a[i]; a[i] = a[ind]; a[ind] = d; } return a; } public String readString() { int c = read(); while (isSpaceChar(c)) { c = read(); } StringBuilder res = new StringBuilder(); do { res.appendCodePoint(c); c = read(); } while (!isSpaceChar(c)); return res.toString(); } public String nextLine() { int c = read(); while (isSpaceChar(c)) c = read(); StringBuilder res = new StringBuilder(); do { res.appendCodePoint(c); c = read(); } while (!isEndOfLine(c)); return res.toString(); } public boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; } private boolean isEndOfLine(int c) { return c == '\n' || c == '\r' || c == -1; } } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 4, 18, 20, 23, 13, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 13, 17, 0, 13, 40, 17, 4, 18, 18, 13, 13, 13, 4, 18, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 66, 5 ], [ 66, 6 ], [ 6, 7 ], [ 6, 8 ], [ 66, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 13, 14 ], [ 9, 15 ], [ 15, 16 ], [ 66, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 19, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 19, 30 ], [ 30, 31 ], [ 31, 32 ], [ 32, 33 ], [ 32, 34 ], [ 30, 35 ], [ 35, 36 ], [ 35, 37 ], [ 30, 38 ], [ 38, 39 ], [ 39, 40 ], [ 30, 41 ], [ 42, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 46, 47 ], [ 19, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 48, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 19, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 56, 61 ], [ 19, 62 ], [ 62, 63 ], [ 63, 64 ], [ 0, 65 ], [ 65, 66 ], [ 65, 67 ] ]
[ "import java.util.*;\n\npublic class Main {\n Scanner sc = new Scanner(System.in);\n public static void main(String[] args){\n new Main().run();\n }\n\n private void run(){\n int N = sc.nextInt();\n int M = sc.nextInt();\n\n for(int i = 0; i < M; i++){\n N -= sc.nextInt();\n }\n\n if(N < 0)N = -1;\n\n System.out.println(N);\n sc.close();\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n Scanner sc = new Scanner(System.in);\n public static void main(String[] args){\n new Main().run();\n }\n\n private void run(){\n int N = sc.nextInt();\n int M = sc.nextInt();\n\n for(int i = 0; i < M; i++){\n N -= sc.nextInt();\n }\n\n if(N < 0)N = -1;\n\n System.out.println(N);\n sc.close();\n }\n}", "Main", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "public static void main(String[] args){\n new Main().run();\n }", "main", "{\n new Main().run();\n }", "new Main().run()", "new Main().run", "new Main()", "String[] args", "args", "private void run(){\n int N = sc.nextInt();\n int M = sc.nextInt();\n\n for(int i = 0; i < M; i++){\n N -= sc.nextInt();\n }\n\n if(N < 0)N = -1;\n\n System.out.println(N);\n sc.close();\n }", "run", "{\n int N = sc.nextInt();\n int M = sc.nextInt();\n\n for(int i = 0; i < M; i++){\n N -= sc.nextInt();\n }\n\n if(N < 0)N = -1;\n\n System.out.println(N);\n sc.close();\n }", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int M = sc.nextInt();", "M", "sc.nextInt()", "sc.nextInt", "sc", "for(int i = 0; i < M; i++){\n N -= sc.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < M", "i", "M", "i++", "i++", "i", "{\n N -= sc.nextInt();\n }", "{\n N -= sc.nextInt();\n }", "N -= sc.nextInt()", "N", "sc.nextInt()", "sc.nextInt", "sc", "if(N < 0)N = -1;", "N < 0", "N", "0", "N = -1", "N", "-1", "1", "System.out.println(N)", "System.out.println", "System.out", "System", "System.out", "N", "sc.close()", "sc.close", "sc", "public class Main {\n Scanner sc = new Scanner(System.in);\n public static void main(String[] args){\n new Main().run();\n }\n\n private void run(){\n int N = sc.nextInt();\n int M = sc.nextInt();\n\n for(int i = 0; i < M; i++){\n N -= sc.nextInt();\n }\n\n if(N < 0)N = -1;\n\n System.out.println(N);\n sc.close();\n }\n}", "public class Main {\n Scanner sc = new Scanner(System.in);\n public static void main(String[] args){\n new Main().run();\n }\n\n private void run(){\n int N = sc.nextInt();\n int M = sc.nextInt();\n\n for(int i = 0; i < M; i++){\n N -= sc.nextInt();\n }\n\n if(N < 0)N = -1;\n\n System.out.println(N);\n sc.close();\n }\n}", "Main" ]
import java.util.*; public class Main { Scanner sc = new Scanner(System.in); public static void main(String[] args){ new Main().run(); } private void run(){ int N = sc.nextInt(); int M = sc.nextInt(); for(int i = 0; i < M; i++){ N -= sc.nextInt(); } if(N < 0)N = -1; System.out.println(N); sc.close(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 13, 18, 13, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 17, 30, 4, 18, 18, 13, 13, 13, 4, 18, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 26, 31 ], [ 31, 32 ], [ 31, 33 ], [ 26, 34 ], [ 34, 35 ], [ 35, 36 ], [ 26, 37 ], [ 38, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 39, 43 ], [ 43, 44 ], [ 44, 45 ], [ 8, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 53, 55 ], [ 46, 56 ], [ 56, 57 ], [ 57, 58 ], [ 46, 59 ], [ 60, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 63, 65 ], [ 8, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 66, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 71, 76 ], [ 66, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 78, 83 ], [ 8, 84 ], [ 84, 85 ], [ 85, 86 ], [ 6, 87 ], [ 87, 88 ] ]
[ "import java.util.*;\n\nclass Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int days = sc.nextInt();\n int works = sc.nextInt();\n\n int[] workList = new int[works];\n\n for (int i = 0; i < works; i++) {\n workList[i] = sc.nextInt();\n }\n\n for (int i = 0; i < workList.length; i++) {\n days -= workList[i];\n }\n\n if (days < 0) {\n System.out.println(\"-1\");\n } else {\n System.out.println(days);\n }\n\n sc.close();\n\n }\n\n}", "import java.util.*;", "util.*", "java", "class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int days = sc.nextInt();\n int works = sc.nextInt();\n\n int[] workList = new int[works];\n\n for (int i = 0; i < works; i++) {\n workList[i] = sc.nextInt();\n }\n\n for (int i = 0; i < workList.length; i++) {\n days -= workList[i];\n }\n\n if (days < 0) {\n System.out.println(\"-1\");\n } else {\n System.out.println(days);\n }\n\n sc.close();\n\n }\n\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int days = sc.nextInt();\n int works = sc.nextInt();\n\n int[] workList = new int[works];\n\n for (int i = 0; i < works; i++) {\n workList[i] = sc.nextInt();\n }\n\n for (int i = 0; i < workList.length; i++) {\n days -= workList[i];\n }\n\n if (days < 0) {\n System.out.println(\"-1\");\n } else {\n System.out.println(days);\n }\n\n sc.close();\n\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n\n int days = sc.nextInt();\n int works = sc.nextInt();\n\n int[] workList = new int[works];\n\n for (int i = 0; i < works; i++) {\n workList[i] = sc.nextInt();\n }\n\n for (int i = 0; i < workList.length; i++) {\n days -= workList[i];\n }\n\n if (days < 0) {\n System.out.println(\"-1\");\n } else {\n System.out.println(days);\n }\n\n sc.close();\n\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int days = sc.nextInt();", "days", "sc.nextInt()", "sc.nextInt", "sc", "int works = sc.nextInt();", "works", "sc.nextInt()", "sc.nextInt", "sc", "int[] workList = new int[works];", "workList", "new int[works]", "works", "for (int i = 0; i < works; i++) {\n workList[i] = sc.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < works", "i", "works", "i++", "i++", "i", "{\n workList[i] = sc.nextInt();\n }", "{\n workList[i] = sc.nextInt();\n }", "workList[i] = sc.nextInt()", "workList[i]", "workList", "i", "sc.nextInt()", "sc.nextInt", "sc", "for (int i = 0; i < workList.length; i++) {\n days -= workList[i];\n }", "int i = 0;", "int i = 0;", "i", "0", "i < workList.length", "i", "workList.length", "workList", "workList.length", "i++", "i++", "i", "{\n days -= workList[i];\n }", "{\n days -= workList[i];\n }", "days -= workList[i]", "days", "workList[i]", "workList", "i", "if (days < 0) {\n System.out.println(\"-1\");\n } else {\n System.out.println(days);\n }", "days < 0", "days", "0", "{\n System.out.println(\"-1\");\n }", "System.out.println(\"-1\")", "System.out.println", "System.out", "System", "System.out", "\"-1\"", "{\n System.out.println(days);\n }", "System.out.println(days)", "System.out.println", "System.out", "System", "System.out", "days", "sc.close()", "sc.close", "sc", "String[] args", "args" ]
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int days = sc.nextInt(); int works = sc.nextInt(); int[] workList = new int[works]; for (int i = 0; i < works; i++) { workList[i] = sc.nextInt(); } for (int i = 0; i < workList.length; i++) { days -= workList[i]; } if (days < 0) { System.out.println("-1"); } else { System.out.println(days); } sc.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 4, 13, 18, 13, 13, 18, 13, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 0, 13, 18, 13, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 40, 17, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 98, 11 ], [ 98, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 17, 19 ], [ 15, 20 ], [ 20, 21 ], [ 20, 22 ], [ 12, 23 ], [ 23, 24 ], [ 98, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 27, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 34, 35 ], [ 33, 36 ], [ 36, 37 ], [ 37, 38 ], [ 27, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 42, 43 ], [ 41, 44 ], [ 44, 45 ], [ 45, 46 ], [ 27, 47 ], [ 47, 48 ], [ 47, 49 ], [ 27, 51 ], [ 51, 52 ], [ 51, 53 ], [ 27, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 54, 59 ], [ 59, 60 ], [ 59, 61 ], [ 54, 62 ], [ 62, 63 ], [ 63, 64 ], [ 54, 65 ], [ 66, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 67, 71 ], [ 71, 72 ], [ 72, 73 ], [ 71, 74 ], [ 74, 75 ], [ 75, 76 ], [ 66, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 79, 81 ], [ 27, 82 ], [ 82, 83 ], [ 83, 84 ], [ 82, 85 ], [ 85, 86 ], [ 86, 87 ], [ 85, 88 ], [ 88, 89 ], [ 88, 90 ], [ 85, 91 ], [ 91, 92 ], [ 25, 93 ], [ 93, 94 ], [ 25, 95 ], [ 95, 96 ], [ 0, 97 ], [ 97, 98 ], [ 97, 99 ] ]
[ "import java.io.InputStream;\nimport java.io.PrintStream;\nimport java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n resolve(System.in, System.out);\n }\n\n static void resolve(InputStream is, PrintStream pw) {\n Scanner sc = new Scanner(is);\n int n = Integer.parseInt(sc.next());\n int m = Integer.parseInt(sc.next());\n int a[] = new int[m];\n long sum = 0;\n for (int i = 0; i < m; i++) {\n a[i] = Integer.parseInt(sc.next());\n sum += a[i];\n }\n pw.println(\n Math.max(n - sum, -1)\n );\n }\n}", "import java.io.InputStream;", "InputStream", "java.io", "import java.io.PrintStream;", "PrintStream", "java.io", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n public static void main(String[] args) {\n resolve(System.in, System.out);\n }\n\n static void resolve(InputStream is, PrintStream pw) {\n Scanner sc = new Scanner(is);\n int n = Integer.parseInt(sc.next());\n int m = Integer.parseInt(sc.next());\n int a[] = new int[m];\n long sum = 0;\n for (int i = 0; i < m; i++) {\n a[i] = Integer.parseInt(sc.next());\n sum += a[i];\n }\n pw.println(\n Math.max(n - sum, -1)\n );\n }\n}", "Main", "public static void main(String[] args) {\n resolve(System.in, System.out);\n }", "main", "{\n resolve(System.in, System.out);\n }", "resolve(System.in, System.out)", "resolve", "System.in", "System", "System.in", "System.out", "System", "System.out", "String[] args", "args", "static void resolve(InputStream is, PrintStream pw) {\n Scanner sc = new Scanner(is);\n int n = Integer.parseInt(sc.next());\n int m = Integer.parseInt(sc.next());\n int a[] = new int[m];\n long sum = 0;\n for (int i = 0; i < m; i++) {\n a[i] = Integer.parseInt(sc.next());\n sum += a[i];\n }\n pw.println(\n Math.max(n - sum, -1)\n );\n }", "resolve", "{\n Scanner sc = new Scanner(is);\n int n = Integer.parseInt(sc.next());\n int m = Integer.parseInt(sc.next());\n int a[] = new int[m];\n long sum = 0;\n for (int i = 0; i < m; i++) {\n a[i] = Integer.parseInt(sc.next());\n sum += a[i];\n }\n pw.println(\n Math.max(n - sum, -1)\n );\n }", "Scanner sc = new Scanner(is);", "sc", "new Scanner(is)", "int n = Integer.parseInt(sc.next());", "n", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "int m = Integer.parseInt(sc.next());", "m", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "int a[] = new int[m];", "a", "new int[m]", "m", "long sum = 0;", "sum", "0", "for (int i = 0; i < m; i++) {\n a[i] = Integer.parseInt(sc.next());\n sum += a[i];\n }", "int i = 0;", "int i = 0;", "i", "0", "i < m", "i", "m", "i++", "i++", "i", "{\n a[i] = Integer.parseInt(sc.next());\n sum += a[i];\n }", "{\n a[i] = Integer.parseInt(sc.next());\n sum += a[i];\n }", "a[i] = Integer.parseInt(sc.next())", "a[i]", "a", "i", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "sum += a[i]", "sum", "a[i]", "a", "i", "pw.println(\n Math.max(n - sum, -1)\n )", "pw.println", "pw", "Math.max(n - sum, -1)", "Math.max", "Math", "n - sum", "n", "sum", "-1", "1", "InputStream is", "is", "PrintStream pw", "pw", "public class Main {\n\n public static void main(String[] args) {\n resolve(System.in, System.out);\n }\n\n static void resolve(InputStream is, PrintStream pw) {\n Scanner sc = new Scanner(is);\n int n = Integer.parseInt(sc.next());\n int m = Integer.parseInt(sc.next());\n int a[] = new int[m];\n long sum = 0;\n for (int i = 0; i < m; i++) {\n a[i] = Integer.parseInt(sc.next());\n sum += a[i];\n }\n pw.println(\n Math.max(n - sum, -1)\n );\n }\n}", "public class Main {\n\n public static void main(String[] args) {\n resolve(System.in, System.out);\n }\n\n static void resolve(InputStream is, PrintStream pw) {\n Scanner sc = new Scanner(is);\n int n = Integer.parseInt(sc.next());\n int m = Integer.parseInt(sc.next());\n int a[] = new int[m];\n long sum = 0;\n for (int i = 0; i < m; i++) {\n a[i] = Integer.parseInt(sc.next());\n sum += a[i];\n }\n pw.println(\n Math.max(n - sum, -1)\n );\n }\n}", "Main" ]
import java.io.InputStream; import java.io.PrintStream; import java.util.Scanner; public class Main { public static void main(String[] args) { resolve(System.in, System.out); } static void resolve(InputStream is, PrintStream pw) { Scanner sc = new Scanner(is); int n = Integer.parseInt(sc.next()); int m = Integer.parseInt(sc.next()); int a[] = new int[m]; long sum = 0; for (int i = 0; i < m; i++) { a[i] = Integer.parseInt(sc.next()); sum += a[i]; } pw.println( Math.max(n - sum, -1) ); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 4, 18, 18, 13, 13, 8, 2, 2, 13, 13, 17, 2, 13, 13, 40, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 62, 5 ], [ 62, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 8, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 43, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 49, 53 ], [ 48, 54 ], [ 54, 55 ], [ 54, 56 ], [ 48, 57 ], [ 57, 58 ], [ 6, 59 ], [ 59, 60 ], [ 0, 61 ], [ 61, 62 ], [ 61, 63 ] ]
[ "import java.util.*;\npublic class Main {\n\n public static void main(String[] args) {\n Scanner yomi = new Scanner(System.in);\n int n = yomi.nextInt();\n int m = yomi.nextInt();\n int a = 0;\n for (int i =0;i<m;i++){\n a += yomi.nextInt();\n }\n System.out.println(n-a>=0 ? n-a : -1);\n\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\n public static void main(String[] args) {\n Scanner yomi = new Scanner(System.in);\n int n = yomi.nextInt();\n int m = yomi.nextInt();\n int a = 0;\n for (int i =0;i<m;i++){\n a += yomi.nextInt();\n }\n System.out.println(n-a>=0 ? n-a : -1);\n\n }\n}", "Main", "public static void main(String[] args) {\n Scanner yomi = new Scanner(System.in);\n int n = yomi.nextInt();\n int m = yomi.nextInt();\n int a = 0;\n for (int i =0;i<m;i++){\n a += yomi.nextInt();\n }\n System.out.println(n-a>=0 ? n-a : -1);\n\n }", "main", "{\n Scanner yomi = new Scanner(System.in);\n int n = yomi.nextInt();\n int m = yomi.nextInt();\n int a = 0;\n for (int i =0;i<m;i++){\n a += yomi.nextInt();\n }\n System.out.println(n-a>=0 ? n-a : -1);\n\n }", "Scanner yomi = new Scanner(System.in);", "yomi", "new Scanner(System.in)", "int n = yomi.nextInt();", "n", "yomi.nextInt()", "yomi.nextInt", "yomi", "int m = yomi.nextInt();", "m", "yomi.nextInt()", "yomi.nextInt", "yomi", "int a = 0;", "a", "0", "for (int i =0;i<m;i++){\n a += yomi.nextInt();\n }", "int i =0;", "int i =0;", "i", "0", "i<m", "i", "m", "i++", "i++", "i", "{\n a += yomi.nextInt();\n }", "{\n a += yomi.nextInt();\n }", "a += yomi.nextInt()", "a", "yomi.nextInt()", "yomi.nextInt", "yomi", "System.out.println(n-a>=0 ? n-a : -1)", "System.out.println", "System.out", "System", "System.out", "n-a>=0 ? n-a : -1", "n-a>=0", "n-a", "n", "a", "0", "n-a", "n", "a", "-1", "1", "String[] args", "args", "public class Main {\n\n public static void main(String[] args) {\n Scanner yomi = new Scanner(System.in);\n int n = yomi.nextInt();\n int m = yomi.nextInt();\n int a = 0;\n for (int i =0;i<m;i++){\n a += yomi.nextInt();\n }\n System.out.println(n-a>=0 ? n-a : -1);\n\n }\n}", "public class Main {\n\n public static void main(String[] args) {\n Scanner yomi = new Scanner(System.in);\n int n = yomi.nextInt();\n int m = yomi.nextInt();\n int a = 0;\n for (int i =0;i<m;i++){\n a += yomi.nextInt();\n }\n System.out.println(n-a>=0 ? n-a : -1);\n\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner yomi = new Scanner(System.in); int n = yomi.nextInt(); int m = yomi.nextInt(); int a = 0; for (int i =0;i<m;i++){ a += yomi.nextInt(); } System.out.println(n-a>=0 ? n-a : -1); } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 4, 18, 18, 13, 13, 4, 13, 23, 13, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 0, 13, 18, 13, 13, 29, 8, 2, 13, 13, 2, 13, 13, 40, 17, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 77, 5 ], [ 77, 6 ], [ 6, 7 ], [ 6, 8 ], [ 77, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 13, 14 ], [ 14, 15 ], [ 14, 16 ], [ 12, 17 ], [ 17, 18 ], [ 9, 19 ], [ 19, 20 ], [ 77, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 23, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 23, 34 ], [ 34, 35 ], [ 34, 36 ], [ 23, 38 ], [ 38, 39 ], [ 38, 40 ], [ 23, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 41, 46 ], [ 46, 47 ], [ 46, 48 ], [ 41, 49 ], [ 49, 50 ], [ 50, 51 ], [ 41, 52 ], [ 53, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 54, 58 ], [ 58, 59 ], [ 59, 60 ], [ 53, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 63, 65 ], [ 23, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 67, 71 ], [ 71, 72 ], [ 71, 73 ], [ 67, 74 ], [ 74, 75 ], [ 0, 76 ], [ 76, 77 ], [ 76, 78 ] ]
[ "import java.util.Scanner;\npublic class Main{\n\tstatic Scanner scan = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\tSystem.out.println(answer());\n\t}\n\tpublic static int answer(){\n\t\tint n = scan.nextInt();\n\t\tint m = scan.nextInt();\n\t\tint[] arr= new int[m];\n\t\tint sum = 0;\n\t\tfor(int i = 0 ; i < m ; i++){\n\t\t\tarr[i] = scan.nextInt();\n\t\t\tsum += arr[i];\n\t\t}\n\t\treturn n >= sum ?n-sum:-1;\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n\tstatic Scanner scan = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\tSystem.out.println(answer());\n\t}\n\tpublic static int answer(){\n\t\tint n = scan.nextInt();\n\t\tint m = scan.nextInt();\n\t\tint[] arr= new int[m];\n\t\tint sum = 0;\n\t\tfor(int i = 0 ; i < m ; i++){\n\t\t\tarr[i] = scan.nextInt();\n\t\t\tsum += arr[i];\n\t\t}\n\t\treturn n >= sum ?n-sum:-1;\n\t}\n}", "Main", "static Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "public static void main(String[] args) {\n\t\tSystem.out.println(answer());\n\t}", "main", "{\n\t\tSystem.out.println(answer());\n\t}", "System.out.println(answer())", "System.out.println", "System.out", "System", "System.out", "answer()", "answer", "String[] args", "args", "public static int answer(){\n\t\tint n = scan.nextInt();\n\t\tint m = scan.nextInt();\n\t\tint[] arr= new int[m];\n\t\tint sum = 0;\n\t\tfor(int i = 0 ; i < m ; i++){\n\t\t\tarr[i] = scan.nextInt();\n\t\t\tsum += arr[i];\n\t\t}\n\t\treturn n >= sum ?n-sum:-1;\n\t}", "answer", "{\n\t\tint n = scan.nextInt();\n\t\tint m = scan.nextInt();\n\t\tint[] arr= new int[m];\n\t\tint sum = 0;\n\t\tfor(int i = 0 ; i < m ; i++){\n\t\t\tarr[i] = scan.nextInt();\n\t\t\tsum += arr[i];\n\t\t}\n\t\treturn n >= sum ?n-sum:-1;\n\t}", "int n = scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "int m = scan.nextInt();", "m", "scan.nextInt()", "scan.nextInt", "scan", "int[] arr= new int[m];", "arr", "new int[m]", "m", "int sum = 0;", "sum", "0", "for(int i = 0 ; i < m ; i++){\n\t\t\tarr[i] = scan.nextInt();\n\t\t\tsum += arr[i];\n\t\t}", "int i = 0 ;", "int i = 0 ;", "i", "0", "i < m", "i", "m", "i++", "i++", "i", "{\n\t\t\tarr[i] = scan.nextInt();\n\t\t\tsum += arr[i];\n\t\t}", "{\n\t\t\tarr[i] = scan.nextInt();\n\t\t\tsum += arr[i];\n\t\t}", "arr[i] = scan.nextInt()", "arr[i]", "arr", "i", "scan.nextInt()", "scan.nextInt", "scan", "sum += arr[i]", "sum", "arr[i]", "arr", "i", "return n >= sum ?n-sum:-1;", "n >= sum ?n-sum:-1", "n >= sum", "n", "sum", "n-sum", "n", "sum", "-1", "1", "public class Main{\n\tstatic Scanner scan = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\tSystem.out.println(answer());\n\t}\n\tpublic static int answer(){\n\t\tint n = scan.nextInt();\n\t\tint m = scan.nextInt();\n\t\tint[] arr= new int[m];\n\t\tint sum = 0;\n\t\tfor(int i = 0 ; i < m ; i++){\n\t\t\tarr[i] = scan.nextInt();\n\t\t\tsum += arr[i];\n\t\t}\n\t\treturn n >= sum ?n-sum:-1;\n\t}\n}", "public class Main{\n\tstatic Scanner scan = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\tSystem.out.println(answer());\n\t}\n\tpublic static int answer(){\n\t\tint n = scan.nextInt();\n\t\tint m = scan.nextInt();\n\t\tint[] arr= new int[m];\n\t\tint sum = 0;\n\t\tfor(int i = 0 ; i < m ; i++){\n\t\t\tarr[i] = scan.nextInt();\n\t\t\tsum += arr[i];\n\t\t}\n\t\treturn n >= sum ?n-sum:-1;\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main{ static Scanner scan = new Scanner(System.in); public static void main(String[] args) { System.out.println(answer()); } public static int answer(){ int n = scan.nextInt(); int m = scan.nextInt(); int[] arr= new int[m]; int sum = 0; for(int i = 0 ; i < m ; i++){ arr[i] = scan.nextInt(); sum += arr[i]; } return n >= sum ?n-sum:-1; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 2, 13, 18, 13, 13, 41, 13, 14, 2, 2, 13, 13, 17, 30, 0, 13, 2, 13, 13, 4, 18, 18, 13, 13, 13, 30, 4, 18, 18, 13, 13, 17, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 102, 5 ], [ 102, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 26 ], [ 26, 27 ], [ 26, 28 ], [ 8, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 29, 34 ], [ 34, 35 ], [ 34, 36 ], [ 29, 37 ], [ 37, 38 ], [ 38, 39 ], [ 29, 40 ], [ 41, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 42, 46 ], [ 46, 47 ], [ 47, 48 ], [ 8, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 49, 54 ], [ 54, 55 ], [ 54, 56 ], [ 49, 57 ], [ 57, 58 ], [ 58, 59 ], [ 49, 60 ], [ 61, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 66, 68 ], [ 8, 69 ], [ 69, 70 ], [ 8, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 72, 76 ], [ 71, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 80, 82 ], [ 77, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 83, 88 ], [ 71, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 90, 95 ], [ 8, 96 ], [ 96, 97 ], [ 97, 98 ], [ 6, 99 ], [ 99, 100 ], [ 0, 101 ], [ 101, 102 ], [ 101, 103 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tint vacation = scanner.nextInt();\n\t\tint homeworkNumber = scanner.nextInt();\n\t\tint[] daysSpentInHomework = new int[homeworkNumber];\n\t\tint studyDay = 0;\n\n\t\tfor (int i = 0; i < homeworkNumber; i++) {\n\t\t\tdaysSpentInHomework[i] = scanner.nextInt();\n\t\t}\n\n\t\tfor (int j = 0; j < homeworkNumber; j++) {\n\t\t\tstudyDay = studyDay + daysSpentInHomework[j];\n\t\t}\n\n\t\tint playable;\n\n\t\tif (vacation - studyDay >= 0) {\n\t\t\tplayable = vacation - studyDay;\n\t\t\tSystem.out.println(playable);\n\t\t} else {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}\n\n\t\tscanner.close();\n\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tint vacation = scanner.nextInt();\n\t\tint homeworkNumber = scanner.nextInt();\n\t\tint[] daysSpentInHomework = new int[homeworkNumber];\n\t\tint studyDay = 0;\n\n\t\tfor (int i = 0; i < homeworkNumber; i++) {\n\t\t\tdaysSpentInHomework[i] = scanner.nextInt();\n\t\t}\n\n\t\tfor (int j = 0; j < homeworkNumber; j++) {\n\t\t\tstudyDay = studyDay + daysSpentInHomework[j];\n\t\t}\n\n\t\tint playable;\n\n\t\tif (vacation - studyDay >= 0) {\n\t\t\tplayable = vacation - studyDay;\n\t\t\tSystem.out.println(playable);\n\t\t} else {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}\n\n\t\tscanner.close();\n\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tint vacation = scanner.nextInt();\n\t\tint homeworkNumber = scanner.nextInt();\n\t\tint[] daysSpentInHomework = new int[homeworkNumber];\n\t\tint studyDay = 0;\n\n\t\tfor (int i = 0; i < homeworkNumber; i++) {\n\t\t\tdaysSpentInHomework[i] = scanner.nextInt();\n\t\t}\n\n\t\tfor (int j = 0; j < homeworkNumber; j++) {\n\t\t\tstudyDay = studyDay + daysSpentInHomework[j];\n\t\t}\n\n\t\tint playable;\n\n\t\tif (vacation - studyDay >= 0) {\n\t\t\tplayable = vacation - studyDay;\n\t\t\tSystem.out.println(playable);\n\t\t} else {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}\n\n\t\tscanner.close();\n\n\t}", "main", "{\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tint vacation = scanner.nextInt();\n\t\tint homeworkNumber = scanner.nextInt();\n\t\tint[] daysSpentInHomework = new int[homeworkNumber];\n\t\tint studyDay = 0;\n\n\t\tfor (int i = 0; i < homeworkNumber; i++) {\n\t\t\tdaysSpentInHomework[i] = scanner.nextInt();\n\t\t}\n\n\t\tfor (int j = 0; j < homeworkNumber; j++) {\n\t\t\tstudyDay = studyDay + daysSpentInHomework[j];\n\t\t}\n\n\t\tint playable;\n\n\t\tif (vacation - studyDay >= 0) {\n\t\t\tplayable = vacation - studyDay;\n\t\t\tSystem.out.println(playable);\n\t\t} else {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}\n\n\t\tscanner.close();\n\n\t}", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int vacation = scanner.nextInt();", "vacation", "scanner.nextInt()", "scanner.nextInt", "scanner", "int homeworkNumber = scanner.nextInt();", "homeworkNumber", "scanner.nextInt()", "scanner.nextInt", "scanner", "int[] daysSpentInHomework = new int[homeworkNumber];", "daysSpentInHomework", "new int[homeworkNumber]", "homeworkNumber", "int studyDay = 0;", "studyDay", "0", "for (int i = 0; i < homeworkNumber; i++) {\n\t\t\tdaysSpentInHomework[i] = scanner.nextInt();\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < homeworkNumber", "i", "homeworkNumber", "i++", "i++", "i", "{\n\t\t\tdaysSpentInHomework[i] = scanner.nextInt();\n\t\t}", "{\n\t\t\tdaysSpentInHomework[i] = scanner.nextInt();\n\t\t}", "daysSpentInHomework[i] = scanner.nextInt()", "daysSpentInHomework[i]", "daysSpentInHomework", "i", "scanner.nextInt()", "scanner.nextInt", "scanner", "for (int j = 0; j < homeworkNumber; j++) {\n\t\t\tstudyDay = studyDay + daysSpentInHomework[j];\n\t\t}", "int j = 0;", "int j = 0;", "j", "0", "j < homeworkNumber", "j", "homeworkNumber", "j++", "j++", "j", "{\n\t\t\tstudyDay = studyDay + daysSpentInHomework[j];\n\t\t}", "{\n\t\t\tstudyDay = studyDay + daysSpentInHomework[j];\n\t\t}", "studyDay = studyDay + daysSpentInHomework[j]", "studyDay", "studyDay + daysSpentInHomework[j]", "studyDay", "daysSpentInHomework[j]", "daysSpentInHomework", "j", "int playable;", "playable", "if (vacation - studyDay >= 0) {\n\t\t\tplayable = vacation - studyDay;\n\t\t\tSystem.out.println(playable);\n\t\t} else {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}", "vacation - studyDay >= 0", "vacation - studyDay", "vacation", "studyDay", "0", "{\n\t\t\tplayable = vacation - studyDay;\n\t\t\tSystem.out.println(playable);\n\t\t}", "playable = vacation - studyDay", "playable", "vacation - studyDay", "vacation", "studyDay", "System.out.println(playable)", "System.out.println", "System.out", "System", "System.out", "playable", "{\n\t\t\tSystem.out.println(\"-1\");\n\t\t}", "System.out.println(\"-1\")", "System.out.println", "System.out", "System", "System.out", "\"-1\"", "scanner.close()", "scanner.close", "scanner", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tint vacation = scanner.nextInt();\n\t\tint homeworkNumber = scanner.nextInt();\n\t\tint[] daysSpentInHomework = new int[homeworkNumber];\n\t\tint studyDay = 0;\n\n\t\tfor (int i = 0; i < homeworkNumber; i++) {\n\t\t\tdaysSpentInHomework[i] = scanner.nextInt();\n\t\t}\n\n\t\tfor (int j = 0; j < homeworkNumber; j++) {\n\t\t\tstudyDay = studyDay + daysSpentInHomework[j];\n\t\t}\n\n\t\tint playable;\n\n\t\tif (vacation - studyDay >= 0) {\n\t\t\tplayable = vacation - studyDay;\n\t\t\tSystem.out.println(playable);\n\t\t} else {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}\n\n\t\tscanner.close();\n\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tint vacation = scanner.nextInt();\n\t\tint homeworkNumber = scanner.nextInt();\n\t\tint[] daysSpentInHomework = new int[homeworkNumber];\n\t\tint studyDay = 0;\n\n\t\tfor (int i = 0; i < homeworkNumber; i++) {\n\t\t\tdaysSpentInHomework[i] = scanner.nextInt();\n\t\t}\n\n\t\tfor (int j = 0; j < homeworkNumber; j++) {\n\t\t\tstudyDay = studyDay + daysSpentInHomework[j];\n\t\t}\n\n\t\tint playable;\n\n\t\tif (vacation - studyDay >= 0) {\n\t\t\tplayable = vacation - studyDay;\n\t\t\tSystem.out.println(playable);\n\t\t} else {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}\n\n\t\tscanner.close();\n\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int vacation = scanner.nextInt(); int homeworkNumber = scanner.nextInt(); int[] daysSpentInHomework = new int[homeworkNumber]; int studyDay = 0; for (int i = 0; i < homeworkNumber; i++) { daysSpentInHomework[i] = scanner.nextInt(); } for (int j = 0; j < homeworkNumber; j++) { studyDay = studyDay + daysSpentInHomework[j]; } int playable; if (vacation - studyDay >= 0) { playable = vacation - studyDay; System.out.println(playable); } else { System.out.println("-1"); } scanner.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 2, 13, 13, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 40, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 78, 14 ], [ 78, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 17, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 17, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 17, 31 ], [ 31, 32 ], [ 31, 33 ], [ 17, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 34, 39 ], [ 39, 40 ], [ 39, 41 ], [ 34, 42 ], [ 42, 43 ], [ 43, 44 ], [ 34, 45 ], [ 46, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 17, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 53, 57 ], [ 52, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 59, 64 ], [ 64, 65 ], [ 64, 66 ], [ 52, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 73, 74 ], [ 15, 75 ], [ 75, 76 ], [ 0, 77 ], [ 77, 78 ], [ 77, 79 ] ]
[ "//keshavs first usaco solve :)\n \nimport java.io.File;\nimport java.io.FileNotFoundException;\nimport java.io.PrintWriter;\nimport java.util.Scanner;\n \npublic class Main {\n \n\tpublic static void main(String[] args) throws FileNotFoundException {\n\t\t// TODO Auto-generated method stub\n \n\t\tScanner sc = new Scanner(System.in);\n\t\tint total = sc.nextInt();\n \tint as = sc.nextInt();\n \tint sum = 0;\n \tfor(int i = 0 ; i<as; i++) \n {\n sum+= sc.nextInt();\n }\n \tif(total-sum >= 0){\n System.out.println(total-sum); \n \n }\n \telse{\n System.out.println(-1); \n }\n\t}\n \n}", "import java.io.File;", "File", "java.io", "import java.io.FileNotFoundException;", "FileNotFoundException", "java.io", "import java.io.PrintWriter;", "PrintWriter", "java.io", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n \n\tpublic static void main(String[] args) throws FileNotFoundException {\n\t\t// TODO Auto-generated method stub\n \n\t\tScanner sc = new Scanner(System.in);\n\t\tint total = sc.nextInt();\n \tint as = sc.nextInt();\n \tint sum = 0;\n \tfor(int i = 0 ; i<as; i++) \n {\n sum+= sc.nextInt();\n }\n \tif(total-sum >= 0){\n System.out.println(total-sum); \n \n }\n \telse{\n System.out.println(-1); \n }\n\t}\n \n}", "Main", "public static void main(String[] args) throws FileNotFoundException {\n\t\t// TODO Auto-generated method stub\n \n\t\tScanner sc = new Scanner(System.in);\n\t\tint total = sc.nextInt();\n \tint as = sc.nextInt();\n \tint sum = 0;\n \tfor(int i = 0 ; i<as; i++) \n {\n sum+= sc.nextInt();\n }\n \tif(total-sum >= 0){\n System.out.println(total-sum); \n \n }\n \telse{\n System.out.println(-1); \n }\n\t}", "main", "{\n\t\t// TODO Auto-generated method stub\n \n\t\tScanner sc = new Scanner(System.in);\n\t\tint total = sc.nextInt();\n \tint as = sc.nextInt();\n \tint sum = 0;\n \tfor(int i = 0 ; i<as; i++) \n {\n sum+= sc.nextInt();\n }\n \tif(total-sum >= 0){\n System.out.println(total-sum); \n \n }\n \telse{\n System.out.println(-1); \n }\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int total = sc.nextInt();", "total", "sc.nextInt()", "sc.nextInt", "sc", "int as = sc.nextInt();", "as", "sc.nextInt()", "sc.nextInt", "sc", "int sum = 0;", "sum", "0", "for(int i = 0 ; i<as; i++) \n {\n sum+= sc.nextInt();\n }", "int i = 0 ;", "int i = 0 ;", "i", "0", "i<as", "i", "as", "i++", "i++", "i", "{\n sum+= sc.nextInt();\n }", "{\n sum+= sc.nextInt();\n }", "sum+= sc.nextInt()", "sum", "sc.nextInt()", "sc.nextInt", "sc", "if(total-sum >= 0){\n System.out.println(total-sum); \n \n }\n \telse{\n System.out.println(-1); \n }", "total-sum >= 0", "total-sum", "total", "sum", "0", "{\n System.out.println(total-sum); \n \n }", "System.out.println(total-sum)", "System.out.println", "System.out", "System", "System.out", "total-sum", "total", "sum", "{\n System.out.println(-1); \n }", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "String[] args", "args", "public class Main {\n \n\tpublic static void main(String[] args) throws FileNotFoundException {\n\t\t// TODO Auto-generated method stub\n \n\t\tScanner sc = new Scanner(System.in);\n\t\tint total = sc.nextInt();\n \tint as = sc.nextInt();\n \tint sum = 0;\n \tfor(int i = 0 ; i<as; i++) \n {\n sum+= sc.nextInt();\n }\n \tif(total-sum >= 0){\n System.out.println(total-sum); \n \n }\n \telse{\n System.out.println(-1); \n }\n\t}\n \n}", "public class Main {\n \n\tpublic static void main(String[] args) throws FileNotFoundException {\n\t\t// TODO Auto-generated method stub\n \n\t\tScanner sc = new Scanner(System.in);\n\t\tint total = sc.nextInt();\n \tint as = sc.nextInt();\n \tint sum = 0;\n \tfor(int i = 0 ; i<as; i++) \n {\n sum+= sc.nextInt();\n }\n \tif(total-sum >= 0){\n System.out.println(total-sum); \n \n }\n \telse{\n System.out.println(-1); \n }\n\t}\n \n}", "Main" ]
//keshavs first usaco solve :) import java.io.File; import java.io.FileNotFoundException; import java.io.PrintWriter; import java.util.Scanner; public class Main { public static void main(String[] args) throws FileNotFoundException { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); int total = sc.nextInt(); int as = sc.nextInt(); int sum = 0; for(int i = 0 ; i<as; i++) { sum+= sc.nextInt(); } if(total-sum >= 0){ System.out.println(total-sum); } else{ System.out.println(-1); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 13, 13, 30, 0, 13, 13, 30, 0, 13, 40, 17, 3, 4, 18, 18, 13, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 69, 5 ], [ 69, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 37, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 43, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 51, 56 ], [ 8, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 8, 63 ], [ 63, 64 ], [ 64, 65 ], [ 6, 66 ], [ 66, 67 ], [ 0, 68 ], [ 68, 69 ], [ 68, 70 ] ]
[ "\nimport java.util.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tint n = scanner.nextInt();\n\t\tint m = scanner.nextInt();\n\t\tint a =0;\n\t\tfor(int i=0 ; i<m ; i++) {\n\t\t\ta = scanner.nextInt();\n\t\t\tif(a <= n) {\n\t\t\t\tn -= a;\n\t\t\t}else {\n\t\t\t\tn = -1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(n);\n\n\t\tscanner.close();\n\n\n\n\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tint n = scanner.nextInt();\n\t\tint m = scanner.nextInt();\n\t\tint a =0;\n\t\tfor(int i=0 ; i<m ; i++) {\n\t\t\ta = scanner.nextInt();\n\t\t\tif(a <= n) {\n\t\t\t\tn -= a;\n\t\t\t}else {\n\t\t\t\tn = -1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(n);\n\n\t\tscanner.close();\n\n\n\n\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tint n = scanner.nextInt();\n\t\tint m = scanner.nextInt();\n\t\tint a =0;\n\t\tfor(int i=0 ; i<m ; i++) {\n\t\t\ta = scanner.nextInt();\n\t\t\tif(a <= n) {\n\t\t\t\tn -= a;\n\t\t\t}else {\n\t\t\t\tn = -1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(n);\n\n\t\tscanner.close();\n\n\n\n\n\t}", "main", "{\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tint n = scanner.nextInt();\n\t\tint m = scanner.nextInt();\n\t\tint a =0;\n\t\tfor(int i=0 ; i<m ; i++) {\n\t\t\ta = scanner.nextInt();\n\t\t\tif(a <= n) {\n\t\t\t\tn -= a;\n\t\t\t}else {\n\t\t\t\tn = -1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(n);\n\n\t\tscanner.close();\n\n\n\n\n\t}", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int n = scanner.nextInt();", "n", "scanner.nextInt()", "scanner.nextInt", "scanner", "int m = scanner.nextInt();", "m", "scanner.nextInt()", "scanner.nextInt", "scanner", "int a =0;", "a", "0", "for(int i=0 ; i<m ; i++) {\n\t\t\ta = scanner.nextInt();\n\t\t\tif(a <= n) {\n\t\t\t\tn -= a;\n\t\t\t}else {\n\t\t\t\tn = -1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "int i=0 ;", "int i=0 ;", "i", "0", "i<m", "i", "m", "i++", "i++", "i", "{\n\t\t\ta = scanner.nextInt();\n\t\t\tif(a <= n) {\n\t\t\t\tn -= a;\n\t\t\t}else {\n\t\t\t\tn = -1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "{\n\t\t\ta = scanner.nextInt();\n\t\t\tif(a <= n) {\n\t\t\t\tn -= a;\n\t\t\t}else {\n\t\t\t\tn = -1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "a = scanner.nextInt()", "a", "scanner.nextInt()", "scanner.nextInt", "scanner", "if(a <= n) {\n\t\t\t\tn -= a;\n\t\t\t}else {\n\t\t\t\tn = -1;\n\t\t\t\tbreak;\n\t\t\t}", "a <= n", "a", "n", "{\n\t\t\t\tn -= a;\n\t\t\t}", "n -= a", "n", "a", "{\n\t\t\t\tn = -1;\n\t\t\t\tbreak;\n\t\t\t}", "n = -1", "n", "-1", "1", "break;", "System.out.println(n)", "System.out.println", "System.out", "System", "System.out", "n", "scanner.close()", "scanner.close", "scanner", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tint n = scanner.nextInt();\n\t\tint m = scanner.nextInt();\n\t\tint a =0;\n\t\tfor(int i=0 ; i<m ; i++) {\n\t\t\ta = scanner.nextInt();\n\t\t\tif(a <= n) {\n\t\t\t\tn -= a;\n\t\t\t}else {\n\t\t\t\tn = -1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(n);\n\n\t\tscanner.close();\n\n\n\n\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tint n = scanner.nextInt();\n\t\tint m = scanner.nextInt();\n\t\tint a =0;\n\t\tfor(int i=0 ; i<m ; i++) {\n\t\t\ta = scanner.nextInt();\n\t\t\tif(a <= n) {\n\t\t\t\tn -= a;\n\t\t\t}else {\n\t\t\t\tn = -1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(n);\n\n\t\tscanner.close();\n\n\n\n\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int m = scanner.nextInt(); int a =0; for(int i=0 ; i<m ; i++) { a = scanner.nextInt(); if(a <= n) { n -= a; }else { n = -1; break; } } System.out.println(n); scanner.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 18, 13, 13, 0, 13, 18, 13, 13, 14, 2, 13, 13, 4, 18, 18, 13, 13, 2, 13, 13, 14, 2, 13, 13, 4, 18, 18, 13, 13, 40, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 111, 11 ], [ 111, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 23, 24 ], [ 20, 25 ], [ 14, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 28, 31 ], [ 31, 32 ], [ 31, 33 ], [ 14, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 36, 39 ], [ 39, 40 ], [ 39, 41 ], [ 14, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 44, 49 ], [ 14, 50 ], [ 50, 51 ], [ 50, 52 ], [ 14, 54 ], [ 54, 55 ], [ 54, 56 ], [ 14, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 62, 63 ], [ 62, 64 ], [ 57, 65 ], [ 65, 66 ], [ 66, 67 ], [ 57, 68 ], [ 69, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 70, 74 ], [ 74, 75 ], [ 75, 76 ], [ 74, 77 ], [ 77, 78 ], [ 77, 79 ], [ 69, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 82, 84 ], [ 14, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 85, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 89, 94 ], [ 94, 95 ], [ 94, 96 ], [ 85, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 97, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 101, 106 ], [ 106, 107 ], [ 12, 108 ], [ 108, 109 ], [ 0, 110 ], [ 110, 111 ], [ 110, 112 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\n\npublic class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n String[] s=reader.readLine().split(\" \");\n int n=Integer.parseInt(s[0]);\n int m=Integer.parseInt(s[1]);\n String[] s1=reader.readLine().split(\" \");\n int[] days=new int[m];\n int count=0;\n for (int i = 0; i <m ; i++) {\n days[i]=Integer.parseInt(s1[i]);\n count+=days[i];\n }\n if (count<=n)\n System.out.println(n-count);\n else if (count>n)\n System.out.println(-1);\n\n }\n\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n String[] s=reader.readLine().split(\" \");\n int n=Integer.parseInt(s[0]);\n int m=Integer.parseInt(s[1]);\n String[] s1=reader.readLine().split(\" \");\n int[] days=new int[m];\n int count=0;\n for (int i = 0; i <m ; i++) {\n days[i]=Integer.parseInt(s1[i]);\n count+=days[i];\n }\n if (count<=n)\n System.out.println(n-count);\n else if (count>n)\n System.out.println(-1);\n\n }\n\n}", "Main", "public static void main(String[] args) throws IOException {\n BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n String[] s=reader.readLine().split(\" \");\n int n=Integer.parseInt(s[0]);\n int m=Integer.parseInt(s[1]);\n String[] s1=reader.readLine().split(\" \");\n int[] days=new int[m];\n int count=0;\n for (int i = 0; i <m ; i++) {\n days[i]=Integer.parseInt(s1[i]);\n count+=days[i];\n }\n if (count<=n)\n System.out.println(n-count);\n else if (count>n)\n System.out.println(-1);\n\n }", "main", "{\n BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n String[] s=reader.readLine().split(\" \");\n int n=Integer.parseInt(s[0]);\n int m=Integer.parseInt(s[1]);\n String[] s1=reader.readLine().split(\" \");\n int[] days=new int[m];\n int count=0;\n for (int i = 0; i <m ; i++) {\n days[i]=Integer.parseInt(s1[i]);\n count+=days[i];\n }\n if (count<=n)\n System.out.println(n-count);\n else if (count>n)\n System.out.println(-1);\n\n }", "BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));", "reader", "new BufferedReader(new InputStreamReader(System.in))", "String[] s=reader.readLine().split(\" \");", "s", "reader.readLine().split(\" \")", "reader.readLine().split", "reader.readLine()", "reader.readLine", "reader", "\" \"", "int n=Integer.parseInt(s[0]);", "n", "Integer.parseInt(s[0])", "Integer.parseInt", "Integer", "s[0]", "s", "0", "int m=Integer.parseInt(s[1]);", "m", "Integer.parseInt(s[1])", "Integer.parseInt", "Integer", "s[1]", "s", "1", "String[] s1=reader.readLine().split(\" \");", "s1", "reader.readLine().split(\" \")", "reader.readLine().split", "reader.readLine()", "reader.readLine", "reader", "\" \"", "int[] days=new int[m];", "days", "new int[m]", "m", "int count=0;", "count", "0", "for (int i = 0; i <m ; i++) {\n days[i]=Integer.parseInt(s1[i]);\n count+=days[i];\n }", "int i = 0;", "int i = 0;", "i", "0", "i <m", "i", "m", "i++", "i++", "i", "{\n days[i]=Integer.parseInt(s1[i]);\n count+=days[i];\n }", "{\n days[i]=Integer.parseInt(s1[i]);\n count+=days[i];\n }", "days[i]=Integer.parseInt(s1[i])", "days[i]", "days", "i", "Integer.parseInt(s1[i])", "Integer.parseInt", "Integer", "s1[i]", "s1", "i", "count+=days[i]", "count", "days[i]", "days", "i", "if (count<=n)\n System.out.println(n-count);\n else if (count>n)\n System.out.println(-1);", "count<=n", "count", "n", "System.out.println(n-count)", "System.out.println", "System.out", "System", "System.out", "n-count", "n", "count", "if (count>n)\n System.out.println(-1);", "count>n", "count", "n", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "String[] args", "args", "public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n String[] s=reader.readLine().split(\" \");\n int n=Integer.parseInt(s[0]);\n int m=Integer.parseInt(s[1]);\n String[] s1=reader.readLine().split(\" \");\n int[] days=new int[m];\n int count=0;\n for (int i = 0; i <m ; i++) {\n days[i]=Integer.parseInt(s1[i]);\n count+=days[i];\n }\n if (count<=n)\n System.out.println(n-count);\n else if (count>n)\n System.out.println(-1);\n\n }\n\n}", "public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n String[] s=reader.readLine().split(\" \");\n int n=Integer.parseInt(s[0]);\n int m=Integer.parseInt(s[1]);\n String[] s1=reader.readLine().split(\" \");\n int[] days=new int[m];\n int count=0;\n for (int i = 0; i <m ; i++) {\n days[i]=Integer.parseInt(s1[i]);\n count+=days[i];\n }\n if (count<=n)\n System.out.println(n-count);\n else if (count>n)\n System.out.println(-1);\n\n }\n\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader=new BufferedReader(new InputStreamReader(System.in)); String[] s=reader.readLine().split(" "); int n=Integer.parseInt(s[0]); int m=Integer.parseInt(s[1]); String[] s1=reader.readLine().split(" "); int[] days=new int[m]; int count=0; for (int i = 0; i <m ; i++) { days[i]=Integer.parseInt(s1[i]); count+=days[i]; } if (count<=n) System.out.println(n-count); else if (count>n) System.out.println(-1); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 17, 41, 13, 17, 41, 13, 17, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 13, 4, 18, 13, 14, 2, 2, 13, 13, 17, 0, 13, 2, 13, 13, 0, 13, 40, 17, 4, 18, 18, 13, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 77, 5 ], [ 77, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], [ 14, 15 ], [ 14, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 8, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 8, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 31, 32 ], [ 8, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 49 ], [ 8, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 51, 55 ], [ 50, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 58, 60 ], [ 50, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 8, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 65, 70 ], [ 8, 71 ], [ 71, 72 ], [ 72, 73 ], [ 6, 74 ], [ 74, 75 ], [ 0, 76 ], [ 76, 77 ], [ 76, 78 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong n;\n\t\tint m = 0;\n\t\tlong ans = 0;\n\t\tlong sum = 0;\n\n\t\tn = sc.nextLong();\n\t\tm = sc.nextInt();\n\n\t\tfor (int i = 0; i < m; i++) \n\t\t\tsum += sc.nextInt();\n\t\t\n\n\t\tif (n - sum >= 0)\n\t\t\tans = n - sum;\n\t\telse\n\t\t\tans = -1;\n\t\tSystem.out.print(ans);\n\t\tsc.close();\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong n;\n\t\tint m = 0;\n\t\tlong ans = 0;\n\t\tlong sum = 0;\n\n\t\tn = sc.nextLong();\n\t\tm = sc.nextInt();\n\n\t\tfor (int i = 0; i < m; i++) \n\t\t\tsum += sc.nextInt();\n\t\t\n\n\t\tif (n - sum >= 0)\n\t\t\tans = n - sum;\n\t\telse\n\t\t\tans = -1;\n\t\tSystem.out.print(ans);\n\t\tsc.close();\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong n;\n\t\tint m = 0;\n\t\tlong ans = 0;\n\t\tlong sum = 0;\n\n\t\tn = sc.nextLong();\n\t\tm = sc.nextInt();\n\n\t\tfor (int i = 0; i < m; i++) \n\t\t\tsum += sc.nextInt();\n\t\t\n\n\t\tif (n - sum >= 0)\n\t\t\tans = n - sum;\n\t\telse\n\t\t\tans = -1;\n\t\tSystem.out.print(ans);\n\t\tsc.close();\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong n;\n\t\tint m = 0;\n\t\tlong ans = 0;\n\t\tlong sum = 0;\n\n\t\tn = sc.nextLong();\n\t\tm = sc.nextInt();\n\n\t\tfor (int i = 0; i < m; i++) \n\t\t\tsum += sc.nextInt();\n\t\t\n\n\t\tif (n - sum >= 0)\n\t\t\tans = n - sum;\n\t\telse\n\t\t\tans = -1;\n\t\tSystem.out.print(ans);\n\t\tsc.close();\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "long n;", "n", "int m = 0;", "m", "0", "long ans = 0;", "ans", "0", "long sum = 0;", "sum", "0", "n = sc.nextLong()", "n", "sc.nextLong()", "sc.nextLong", "sc", "m = sc.nextInt()", "m", "sc.nextInt()", "sc.nextInt", "sc", "for (int i = 0; i < m; i++) \n\t\t\tsum += sc.nextInt();", "int i = 0;", "int i = 0;", "i", "0", "i < m", "i", "m", "i++", "i++", "i", "sum += sc.nextInt();", "sum += sc.nextInt()", "sum", "sc.nextInt()", "sc.nextInt", "sc", "if (n - sum >= 0)\n\t\t\tans = n - sum;\n\t\telse\n\t\t\tans = -1;", "n - sum >= 0", "n - sum", "n", "sum", "0", "ans = n - sum", "ans", "n - sum", "n", "sum", "ans = -1", "ans", "-1", "1", "System.out.print(ans)", "System.out.print", "System.out", "System", "System.out", "ans", "sc.close()", "sc.close", "sc", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong n;\n\t\tint m = 0;\n\t\tlong ans = 0;\n\t\tlong sum = 0;\n\n\t\tn = sc.nextLong();\n\t\tm = sc.nextInt();\n\n\t\tfor (int i = 0; i < m; i++) \n\t\t\tsum += sc.nextInt();\n\t\t\n\n\t\tif (n - sum >= 0)\n\t\t\tans = n - sum;\n\t\telse\n\t\t\tans = -1;\n\t\tSystem.out.print(ans);\n\t\tsc.close();\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong n;\n\t\tint m = 0;\n\t\tlong ans = 0;\n\t\tlong sum = 0;\n\n\t\tn = sc.nextLong();\n\t\tm = sc.nextInt();\n\n\t\tfor (int i = 0; i < m; i++) \n\t\t\tsum += sc.nextInt();\n\t\t\n\n\t\tif (n - sum >= 0)\n\t\t\tans = n - sum;\n\t\telse\n\t\t\tans = -1;\n\t\tSystem.out.print(ans);\n\t\tsc.close();\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long n; int m = 0; long ans = 0; long sum = 0; n = sc.nextLong(); m = sc.nextInt(); for (int i = 0; i < m; i++) sum += sc.nextInt(); if (n - sum >= 0) ans = n - sum; else ans = -1; System.out.print(ans); sc.close(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 4, 18, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 8, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 48, 53 ], [ 43, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 55, 60 ], [ 60, 61 ], [ 60, 62 ], [ 8, 63 ], [ 63, 64 ], [ 64, 65 ], [ 6, 66 ], [ 66, 67 ] ]
[ "import java.util.Scanner;\n\nclass Main {\n\tpublic static void main(String[] $){\n\t\tScanner sc =new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint m = sc.nextInt();\n\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tsum += sc.nextInt();\n\t\t}\n\n\t\tif (n < sum) {\n\t\t\tSystem.out.println(\"-1\");\n\t\t} else {\n\t\t\tSystem.out.println(n - sum);\n\t\t}\n\n\t\tsc.close();\n\t}\n}\n", "import java.util.Scanner;", "Scanner", "java.util", "class Main {\n\tpublic static void main(String[] $){\n\t\tScanner sc =new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint m = sc.nextInt();\n\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tsum += sc.nextInt();\n\t\t}\n\n\t\tif (n < sum) {\n\t\t\tSystem.out.println(\"-1\");\n\t\t} else {\n\t\t\tSystem.out.println(n - sum);\n\t\t}\n\n\t\tsc.close();\n\t}\n}", "Main", "public static void main(String[] $){\n\t\tScanner sc =new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint m = sc.nextInt();\n\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tsum += sc.nextInt();\n\t\t}\n\n\t\tif (n < sum) {\n\t\t\tSystem.out.println(\"-1\");\n\t\t} else {\n\t\t\tSystem.out.println(n - sum);\n\t\t}\n\n\t\tsc.close();\n\t}", "main", "{\n\t\tScanner sc =new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint m = sc.nextInt();\n\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tsum += sc.nextInt();\n\t\t}\n\n\t\tif (n < sum) {\n\t\t\tSystem.out.println(\"-1\");\n\t\t} else {\n\t\t\tSystem.out.println(n - sum);\n\t\t}\n\n\t\tsc.close();\n\t}", "Scanner sc =new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int m = sc.nextInt();", "m", "sc.nextInt()", "sc.nextInt", "sc", "int sum = 0;", "sum", "0", "for (int i = 0; i < m; i++) {\n\t\t\tsum += sc.nextInt();\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < m", "i", "m", "i++", "i++", "i", "{\n\t\t\tsum += sc.nextInt();\n\t\t}", "{\n\t\t\tsum += sc.nextInt();\n\t\t}", "sum += sc.nextInt()", "sum", "sc.nextInt()", "sc.nextInt", "sc", "if (n < sum) {\n\t\t\tSystem.out.println(\"-1\");\n\t\t} else {\n\t\t\tSystem.out.println(n - sum);\n\t\t}", "n < sum", "n", "sum", "{\n\t\t\tSystem.out.println(\"-1\");\n\t\t}", "System.out.println(\"-1\")", "System.out.println", "System.out", "System", "System.out", "\"-1\"", "{\n\t\t\tSystem.out.println(n - sum);\n\t\t}", "System.out.println(n - sum)", "System.out.println", "System.out", "System", "System.out", "n - sum", "n", "sum", "sc.close()", "sc.close", "sc", "String[] $", "$" ]
import java.util.Scanner; class Main { public static void main(String[] $){ Scanner sc =new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int sum = 0; for (int i = 0; i < m; i++) { sum += sc.nextInt(); } if (n < sum) { System.out.println("-1"); } else { System.out.println(n - sum); } sc.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 0, 13, 20, 11, 1, 2, 13, 17, 1, 40, 13, 30, 0, 13, 4, 18, 13, 4, 18, 13, 4, 18, 18, 13, 13, 8, 2, 13, 13, 2, 13, 13, 40, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 80, 14 ], [ 80, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 17, 21 ], [ 21, 22 ], [ 21, 23 ], [ 17, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 26, 29 ], [ 29, 30 ], [ 30, 31 ], [ 17, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 34, 37 ], [ 37, 38 ], [ 38, 39 ], [ 17, 40 ], [ 40, 41 ], [ 40, 42 ], [ 17, 43 ], [ 43, 44 ], [ 43, 45 ], [ 17, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 52, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 58, 59 ], [ 57, 60 ], [ 60, 61 ], [ 61, 62 ], [ 17, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 68, 72 ], [ 72, 73 ], [ 72, 74 ], [ 68, 75 ], [ 75, 76 ], [ 15, 77 ], [ 77, 78 ], [ 0, 79 ], [ 79, 80 ], [ 79, 81 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\npublic class Main\n{\n\tpublic static void main(String[] Arguments) throws IOException \n\t{\n\t\tBufferedReader BR = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer ST = new StringTokenizer(BR.readLine());\n\t\tint N = Integer.parseInt(ST.nextToken()), M = Integer.parseInt(ST.nextToken()), homeworkDays = 0;\n\t\tST = new StringTokenizer(BR.readLine());\n\t\tfor (; M > 0; M--) homeworkDays += Integer.parseInt(ST.nextToken());\n\t\tSystem.out.println((homeworkDays <= N) ? N - homeworkDays : -1);\n\t}\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.StringTokenizer;", "StringTokenizer", "java.util", "public class Main\n{\n\tpublic static void main(String[] Arguments) throws IOException \n\t{\n\t\tBufferedReader BR = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer ST = new StringTokenizer(BR.readLine());\n\t\tint N = Integer.parseInt(ST.nextToken()), M = Integer.parseInt(ST.nextToken()), homeworkDays = 0;\n\t\tST = new StringTokenizer(BR.readLine());\n\t\tfor (; M > 0; M--) homeworkDays += Integer.parseInt(ST.nextToken());\n\t\tSystem.out.println((homeworkDays <= N) ? N - homeworkDays : -1);\n\t}\n}", "Main", "public static void main(String[] Arguments) throws IOException \n\t{\n\t\tBufferedReader BR = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer ST = new StringTokenizer(BR.readLine());\n\t\tint N = Integer.parseInt(ST.nextToken()), M = Integer.parseInt(ST.nextToken()), homeworkDays = 0;\n\t\tST = new StringTokenizer(BR.readLine());\n\t\tfor (; M > 0; M--) homeworkDays += Integer.parseInt(ST.nextToken());\n\t\tSystem.out.println((homeworkDays <= N) ? N - homeworkDays : -1);\n\t}", "main", "{\n\t\tBufferedReader BR = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer ST = new StringTokenizer(BR.readLine());\n\t\tint N = Integer.parseInt(ST.nextToken()), M = Integer.parseInt(ST.nextToken()), homeworkDays = 0;\n\t\tST = new StringTokenizer(BR.readLine());\n\t\tfor (; M > 0; M--) homeworkDays += Integer.parseInt(ST.nextToken());\n\t\tSystem.out.println((homeworkDays <= N) ? N - homeworkDays : -1);\n\t}", "BufferedReader BR = new BufferedReader(new InputStreamReader(System.in));", "BR", "new BufferedReader(new InputStreamReader(System.in))", "StringTokenizer ST = new StringTokenizer(BR.readLine());", "ST", "new StringTokenizer(BR.readLine())", "int N = Integer.parseInt(ST.nextToken())", "N", "Integer.parseInt(ST.nextToken())", "Integer.parseInt", "Integer", "ST.nextToken()", "ST.nextToken", "ST", "M = Integer.parseInt(ST.nextToken())", "M", "Integer.parseInt(ST.nextToken())", "Integer.parseInt", "Integer", "ST.nextToken()", "ST.nextToken", "ST", "homeworkDays = 0;", "homeworkDays", "0", "ST = new StringTokenizer(BR.readLine())", "ST", "new StringTokenizer(BR.readLine())", "for (; M > 0; M--) homeworkDays += Integer.parseInt(ST.nextToken());", ";", "M > 0", "M", "0", "M--", "M--", "M", "homeworkDays += Integer.parseInt(ST.nextToken());", "homeworkDays += Integer.parseInt(ST.nextToken())", "homeworkDays", "Integer.parseInt(ST.nextToken())", "Integer.parseInt", "Integer", "ST.nextToken()", "ST.nextToken", "ST", "System.out.println((homeworkDays <= N) ? N - homeworkDays : -1)", "System.out.println", "System.out", "System", "System.out", "(homeworkDays <= N) ? N - homeworkDays : -1", "(homeworkDays <= N)", "homeworkDays", "N", "N - homeworkDays", "N", "homeworkDays", "-1", "1", "String[] Arguments", "Arguments", "public class Main\n{\n\tpublic static void main(String[] Arguments) throws IOException \n\t{\n\t\tBufferedReader BR = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer ST = new StringTokenizer(BR.readLine());\n\t\tint N = Integer.parseInt(ST.nextToken()), M = Integer.parseInt(ST.nextToken()), homeworkDays = 0;\n\t\tST = new StringTokenizer(BR.readLine());\n\t\tfor (; M > 0; M--) homeworkDays += Integer.parseInt(ST.nextToken());\n\t\tSystem.out.println((homeworkDays <= N) ? N - homeworkDays : -1);\n\t}\n}", "public class Main\n{\n\tpublic static void main(String[] Arguments) throws IOException \n\t{\n\t\tBufferedReader BR = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer ST = new StringTokenizer(BR.readLine());\n\t\tint N = Integer.parseInt(ST.nextToken()), M = Integer.parseInt(ST.nextToken()), homeworkDays = 0;\n\t\tST = new StringTokenizer(BR.readLine());\n\t\tfor (; M > 0; M--) homeworkDays += Integer.parseInt(ST.nextToken());\n\t\tSystem.out.println((homeworkDays <= N) ? N - homeworkDays : -1);\n\t}\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { public static void main(String[] Arguments) throws IOException { BufferedReader BR = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer ST = new StringTokenizer(BR.readLine()); int N = Integer.parseInt(ST.nextToken()), M = Integer.parseInt(ST.nextToken()), homeworkDays = 0; ST = new StringTokenizer(BR.readLine()); for (; M > 0; M--) homeworkDays += Integer.parseInt(ST.nextToken()); System.out.println((homeworkDays <= N) ? N - homeworkDays : -1); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 0, 13, 18, 13, 13, 14, 2, 13, 17, 30, 9, 30, 3, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 40, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 85, 5 ], [ 85, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 26, 31 ], [ 31, 32 ], [ 31, 33 ], [ 26, 34 ], [ 34, 35 ], [ 35, 36 ], [ 26, 37 ], [ 38, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 39, 43 ], [ 43, 44 ], [ 44, 45 ], [ 38, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 48, 50 ], [ 38, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 51, 55 ], [ 55, 56 ], [ 51, 57 ], [ 57, 58 ], [ 8, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 59, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 64, 69 ], [ 59, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 70, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 75, 80 ], [ 80, 81 ], [ 6, 82 ], [ 82, 83 ], [ 0, 84 ], [ 84, 85 ], [ 84, 86 ] ]
[ "import java.util.Scanner;\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt(); //夏休み日数\n int M = sc.nextInt(); //宿題個数\n int[] A = new int[M]; //宿題遂行必要日数\n for(int i=0; i<M; i++) {\n A[i] = sc.nextInt();\n N-=A[i];\n if(N>=0) {\n continue;\n } else {\n break;\n }\n }\n if(N>=0) {\n System.out.println(N);\n } else if(N<0) {\n System.out.println(-1);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt(); //夏休み日数\n int M = sc.nextInt(); //宿題個数\n int[] A = new int[M]; //宿題遂行必要日数\n for(int i=0; i<M; i++) {\n A[i] = sc.nextInt();\n N-=A[i];\n if(N>=0) {\n continue;\n } else {\n break;\n }\n }\n if(N>=0) {\n System.out.println(N);\n } else if(N<0) {\n System.out.println(-1);\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt(); //夏休み日数\n int M = sc.nextInt(); //宿題個数\n int[] A = new int[M]; //宿題遂行必要日数\n for(int i=0; i<M; i++) {\n A[i] = sc.nextInt();\n N-=A[i];\n if(N>=0) {\n continue;\n } else {\n break;\n }\n }\n if(N>=0) {\n System.out.println(N);\n } else if(N<0) {\n System.out.println(-1);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt(); //夏休み日数\n int M = sc.nextInt(); //宿題個数\n int[] A = new int[M]; //宿題遂行必要日数\n for(int i=0; i<M; i++) {\n A[i] = sc.nextInt();\n N-=A[i];\n if(N>=0) {\n continue;\n } else {\n break;\n }\n }\n if(N>=0) {\n System.out.println(N);\n } else if(N<0) {\n System.out.println(-1);\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int M = sc.nextInt();", "M", "sc.nextInt()", "sc.nextInt", "sc", "int[] A = new int[M];", "A", "new int[M]", "M", "for(int i=0; i<M; i++) {\n A[i] = sc.nextInt();\n N-=A[i];\n if(N>=0) {\n continue;\n } else {\n break;\n }\n }", "int i=0;", "int i=0;", "i", "0", "i<M", "i", "M", "i++", "i++", "i", "{\n A[i] = sc.nextInt();\n N-=A[i];\n if(N>=0) {\n continue;\n } else {\n break;\n }\n }", "{\n A[i] = sc.nextInt();\n N-=A[i];\n if(N>=0) {\n continue;\n } else {\n break;\n }\n }", "A[i] = sc.nextInt()", "A[i]", "A", "i", "sc.nextInt()", "sc.nextInt", "sc", "N-=A[i]", "N", "A[i]", "A", "i", "if(N>=0) {\n continue;\n } else {\n break;\n }", "N>=0", "N", "0", "{\n continue;\n }", "continue;", "{\n break;\n }", "break;", "if(N>=0) {\n System.out.println(N);\n } else if(N<0) {\n System.out.println(-1);\n }", "N>=0", "N", "0", "{\n System.out.println(N);\n }", "System.out.println(N)", "System.out.println", "System.out", "System", "System.out", "N", "if(N<0) {\n System.out.println(-1);\n }", "N<0", "N", "0", "{\n System.out.println(-1);\n }", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt(); //夏休み日数\n int M = sc.nextInt(); //宿題個数\n int[] A = new int[M]; //宿題遂行必要日数\n for(int i=0; i<M; i++) {\n A[i] = sc.nextInt();\n N-=A[i];\n if(N>=0) {\n continue;\n } else {\n break;\n }\n }\n if(N>=0) {\n System.out.println(N);\n } else if(N<0) {\n System.out.println(-1);\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt(); //夏休み日数\n int M = sc.nextInt(); //宿題個数\n int[] A = new int[M]; //宿題遂行必要日数\n for(int i=0; i<M; i++) {\n A[i] = sc.nextInt();\n N-=A[i];\n if(N>=0) {\n continue;\n } else {\n break;\n }\n }\n if(N>=0) {\n System.out.println(N);\n } else if(N<0) {\n System.out.println(-1);\n }\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); //夏休み日数 int M = sc.nextInt(); //宿題個数 int[] A = new int[M]; //宿題遂行必要日数 for(int i=0; i<M; i++) { A[i] = sc.nextInt(); N-=A[i]; if(N>=0) { continue; } else { break; } } if(N>=0) { System.out.println(N); } else if(N<0) { System.out.println(-1); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 40, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 41, 13, 17, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 4, 18, 13, 29, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 167, 17 ], [ 167, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 20, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 20, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 20, 34 ], [ 34, 35 ], [ 34, 36 ], [ 20, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 37, 42 ], [ 42, 43 ], [ 42, 44 ], [ 37, 45 ], [ 45, 46 ], [ 46, 47 ], [ 37, 48 ], [ 49, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 53, 54 ], [ 20, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 55, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 60, 65 ], [ 65, 66 ], [ 55, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 73, 74 ], [ 73, 75 ], [ 18, 76 ], [ 76, 77 ], [ 167, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 78, 82 ], [ 82, 83 ], [ 78, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 78, 90 ], [ 90, 91 ], [ 90, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 94, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 93, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 103, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 92, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 78, 118 ], [ 118, 119 ], [ 118, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 122, 125 ], [ 125, 126 ], [ 78, 127 ], [ 127, 128 ], [ 127, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 131, 134 ], [ 134, 135 ], [ 78, 136 ], [ 136, 137 ], [ 136, 138 ], [ 138, 139 ], [ 139, 140 ], [ 140, 141 ], [ 141, 142 ], [ 140, 143 ], [ 143, 144 ], [ 78, 145 ], [ 145, 146 ], [ 145, 147 ], [ 147, 148 ], [ 148, 149 ], [ 148, 150 ], [ 147, 151 ], [ 151, 152 ], [ 152, 153 ], [ 152, 154 ], [ 154, 155 ], [ 155, 156 ], [ 156, 157 ], [ 151, 158 ], [ 158, 159 ], [ 159, 160 ], [ 159, 161 ], [ 161, 162 ], [ 162, 163 ], [ 147, 164 ], [ 164, 165 ], [ 0, 166 ], [ 166, 167 ], [ 166, 168 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.lang.reflect.Array;\nimport java.util.*;\n\npublic class Main {\n static class FastReader{\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader(){\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next(){\n while(st==null || !st.hasMoreElements()){\n try{\n st=new StringTokenizer(br.readLine());\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt(){\n return Integer.parseInt(next());\n }\n\n Long nextLong(){\n return Long.parseLong(next());\n }\n\n double nextDouble(){\n return Double.parseDouble(next());\n }\n String nextLine(){\n String str=\"\";\n try{\n str=br.readLine();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n return str;\n }\n }\n public static void main(String[] args) throws IOException {\n FastReader in = new FastReader();\n int n = in.nextInt();\n int m=in.nextInt();\n long sum=0;\n for(int i=0;i<m;i++){\n sum+=in.nextInt();\n }\n if(sum>n){\n System.out.println(-1);\n }else{\n System.out.println(n-sum);\n }\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.lang.reflect.Array;", "Array", "java.lang.reflect", "import java.util.*;", "util.*", "java", "public class Main {\n static class FastReader{\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader(){\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next(){\n while(st==null || !st.hasMoreElements()){\n try{\n st=new StringTokenizer(br.readLine());\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt(){\n return Integer.parseInt(next());\n }\n\n Long nextLong(){\n return Long.parseLong(next());\n }\n\n double nextDouble(){\n return Double.parseDouble(next());\n }\n String nextLine(){\n String str=\"\";\n try{\n str=br.readLine();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n return str;\n }\n }\n public static void main(String[] args) throws IOException {\n FastReader in = new FastReader();\n int n = in.nextInt();\n int m=in.nextInt();\n long sum=0;\n for(int i=0;i<m;i++){\n sum+=in.nextInt();\n }\n if(sum>n){\n System.out.println(-1);\n }else{\n System.out.println(n-sum);\n }\n }\n}", "Main", "public static void main(String[] args) throws IOException {\n FastReader in = new FastReader();\n int n = in.nextInt();\n int m=in.nextInt();\n long sum=0;\n for(int i=0;i<m;i++){\n sum+=in.nextInt();\n }\n if(sum>n){\n System.out.println(-1);\n }else{\n System.out.println(n-sum);\n }\n }", "main", "{\n FastReader in = new FastReader();\n int n = in.nextInt();\n int m=in.nextInt();\n long sum=0;\n for(int i=0;i<m;i++){\n sum+=in.nextInt();\n }\n if(sum>n){\n System.out.println(-1);\n }else{\n System.out.println(n-sum);\n }\n }", "FastReader in = new FastReader();", "in", "new FastReader()", "int n = in.nextInt();", "n", "in.nextInt()", "in.nextInt", "in", "int m=in.nextInt();", "m", "in.nextInt()", "in.nextInt", "in", "long sum=0;", "sum", "0", "for(int i=0;i<m;i++){\n sum+=in.nextInt();\n }", "int i=0;", "int i=0;", "i", "0", "i<m", "i", "m", "i++", "i++", "i", "{\n sum+=in.nextInt();\n }", "{\n sum+=in.nextInt();\n }", "sum+=in.nextInt()", "sum", "in.nextInt()", "in.nextInt", "in", "if(sum>n){\n System.out.println(-1);\n }else{\n System.out.println(n-sum);\n }", "sum>n", "sum", "n", "{\n System.out.println(-1);\n }", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "{\n System.out.println(n-sum);\n }", "System.out.println(n-sum)", "System.out.println", "System.out", "System", "System.out", "n-sum", "n", "sum", "String[] args", "args", "static class FastReader{\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader(){\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next(){\n while(st==null || !st.hasMoreElements()){\n try{\n st=new StringTokenizer(br.readLine());\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt(){\n return Integer.parseInt(next());\n }\n\n Long nextLong(){\n return Long.parseLong(next());\n }\n\n double nextDouble(){\n return Double.parseDouble(next());\n }\n String nextLine(){\n String str=\"\";\n try{\n str=br.readLine();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n return str;\n }\n }", "FastReader", "BufferedReader br;", "br", "StringTokenizer st;", "st", "public FastReader(){\n br = new BufferedReader(new InputStreamReader(System.in));\n }", "FastReader", "{\n br = new BufferedReader(new InputStreamReader(System.in));\n }", "br = new BufferedReader(new InputStreamReader(System.in))", "br", "new BufferedReader(new InputStreamReader(System.in))", "String next(){\n while(st==null || !st.hasMoreElements()){\n try{\n st=new StringTokenizer(br.readLine());\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "next", "{\n while(st==null || !st.hasMoreElements()){\n try{\n st=new StringTokenizer(br.readLine());\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "while(st==null || !st.hasMoreElements()){\n try{\n st=new StringTokenizer(br.readLine());\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }", "st==null || !st.hasMoreElements()", "st==null", "st", "null", "!st.hasMoreElements()", "st.hasMoreElements()", "st.hasMoreElements", "st", "{\n try{\n st=new StringTokenizer(br.readLine());\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }", "try{\n st=new StringTokenizer(br.readLine());\n }\n catch(IOException e){\n e.printStackTrace();\n }", "catch(IOException e){\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n st=new StringTokenizer(br.readLine());\n }", "st=new StringTokenizer(br.readLine())", "st", "new StringTokenizer(br.readLine())", "return st.nextToken();", "st.nextToken()", "st.nextToken", "st", "int nextInt(){\n return Integer.parseInt(next());\n }", "nextInt", "{\n return Integer.parseInt(next());\n }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "Long nextLong(){\n return Long.parseLong(next());\n }", "nextLong", "{\n return Long.parseLong(next());\n }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "double nextDouble(){\n return Double.parseDouble(next());\n }", "nextDouble", "{\n return Double.parseDouble(next());\n }", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "String nextLine(){\n String str=\"\";\n try{\n str=br.readLine();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n return str;\n }", "nextLine", "{\n String str=\"\";\n try{\n str=br.readLine();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n return str;\n }", "String str=\"\";", "str", "\"\"", "try{\n str=br.readLine();\n }\n catch(IOException e){\n e.printStackTrace();\n }", "catch(IOException e){\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n str=br.readLine();\n }", "str=br.readLine()", "str", "br.readLine()", "br.readLine", "br", "return str;", "str", "public class Main {\n static class FastReader{\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader(){\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next(){\n while(st==null || !st.hasMoreElements()){\n try{\n st=new StringTokenizer(br.readLine());\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt(){\n return Integer.parseInt(next());\n }\n\n Long nextLong(){\n return Long.parseLong(next());\n }\n\n double nextDouble(){\n return Double.parseDouble(next());\n }\n String nextLine(){\n String str=\"\";\n try{\n str=br.readLine();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n return str;\n }\n }\n public static void main(String[] args) throws IOException {\n FastReader in = new FastReader();\n int n = in.nextInt();\n int m=in.nextInt();\n long sum=0;\n for(int i=0;i<m;i++){\n sum+=in.nextInt();\n }\n if(sum>n){\n System.out.println(-1);\n }else{\n System.out.println(n-sum);\n }\n }\n}", "public class Main {\n static class FastReader{\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader(){\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next(){\n while(st==null || !st.hasMoreElements()){\n try{\n st=new StringTokenizer(br.readLine());\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt(){\n return Integer.parseInt(next());\n }\n\n Long nextLong(){\n return Long.parseLong(next());\n }\n\n double nextDouble(){\n return Double.parseDouble(next());\n }\n String nextLine(){\n String str=\"\";\n try{\n str=br.readLine();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n return str;\n }\n }\n public static void main(String[] args) throws IOException {\n FastReader in = new FastReader();\n int n = in.nextInt();\n int m=in.nextInt();\n long sum=0;\n for(int i=0;i<m;i++){\n sum+=in.nextInt();\n }\n if(sum>n){\n System.out.println(-1);\n }else{\n System.out.println(n-sum);\n }\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.lang.reflect.Array; 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()); } String nextLine(){ String str=""; try{ str=br.readLine(); } catch(IOException e){ e.printStackTrace(); } return str; } } public static void main(String[] args) throws IOException { FastReader in = new FastReader(); int n = in.nextInt(); int m=in.nextInt(); long sum=0; for(int i=0;i<m;i++){ sum+=in.nextInt(); } if(sum>n){ System.out.println(-1); }else{ System.out.println(n-sum); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 0, 13, 2, 13, 18, 13, 13, 14, 2, 2, 13, 13, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 40, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 82, 5 ], [ 82, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 25, 27 ], [ 8, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 29, 34 ], [ 34, 35 ], [ 34, 36 ], [ 29, 37 ], [ 37, 38 ], [ 38, 39 ], [ 29, 40 ], [ 41, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 42, 46 ], [ 46, 47 ], [ 47, 48 ], [ 41, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 53, 55 ], [ 8, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 57, 61 ], [ 56, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 68, 69 ], [ 68, 70 ], [ 56, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 72, 77 ], [ 77, 78 ], [ 6, 79 ], [ 79, 80 ], [ 0, 81 ], [ 81, 82 ], [ 81, 83 ] ]
[ "import java.util.Scanner;\n\npublic class Main\n{\n public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int M = sc.nextInt();\n int sum = 0;\n int arr[] = new int[M];\n for(int i=0;i<M;i++)\n {\n arr[i] = sc.nextInt();\n sum = sum+arr[i];\n }\n\n if(N-sum>=0)\n {System.out.print((N-sum));}\n else\n {System.out.print(-1);}\n\n\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main\n{\n public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int M = sc.nextInt();\n int sum = 0;\n int arr[] = new int[M];\n for(int i=0;i<M;i++)\n {\n arr[i] = sc.nextInt();\n sum = sum+arr[i];\n }\n\n if(N-sum>=0)\n {System.out.print((N-sum));}\n else\n {System.out.print(-1);}\n\n\n }\n}", "Main", "public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int M = sc.nextInt();\n int sum = 0;\n int arr[] = new int[M];\n for(int i=0;i<M;i++)\n {\n arr[i] = sc.nextInt();\n sum = sum+arr[i];\n }\n\n if(N-sum>=0)\n {System.out.print((N-sum));}\n else\n {System.out.print(-1);}\n\n\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int M = sc.nextInt();\n int sum = 0;\n int arr[] = new int[M];\n for(int i=0;i<M;i++)\n {\n arr[i] = sc.nextInt();\n sum = sum+arr[i];\n }\n\n if(N-sum>=0)\n {System.out.print((N-sum));}\n else\n {System.out.print(-1);}\n\n\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int M = sc.nextInt();", "M", "sc.nextInt()", "sc.nextInt", "sc", "int sum = 0;", "sum", "0", "int arr[] = new int[M];", "arr", "new int[M]", "M", "for(int i=0;i<M;i++)\n {\n arr[i] = sc.nextInt();\n sum = sum+arr[i];\n }", "int i=0;", "int i=0;", "i", "0", "i<M", "i", "M", "i++", "i++", "i", "{\n arr[i] = sc.nextInt();\n sum = sum+arr[i];\n }", "{\n arr[i] = sc.nextInt();\n sum = sum+arr[i];\n }", "arr[i] = sc.nextInt()", "arr[i]", "arr", "i", "sc.nextInt()", "sc.nextInt", "sc", "sum = sum+arr[i]", "sum", "sum+arr[i]", "sum", "arr[i]", "arr", "i", "if(N-sum>=0)\n {System.out.print((N-sum));}\n else\n {System.out.print(-1);}", "N-sum>=0", "N-sum", "N", "sum", "0", "{System.out.print((N-sum));}", "System.out.print((N-sum))", "System.out.print", "System.out", "System", "System.out", "(N-sum)", "N", "sum", "{System.out.print(-1);}", "System.out.print(-1)", "System.out.print", "System.out", "System", "System.out", "-1", "1", "String[] args", "args", "public class Main\n{\n public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int M = sc.nextInt();\n int sum = 0;\n int arr[] = new int[M];\n for(int i=0;i<M;i++)\n {\n arr[i] = sc.nextInt();\n sum = sum+arr[i];\n }\n\n if(N-sum>=0)\n {System.out.print((N-sum));}\n else\n {System.out.print(-1);}\n\n\n }\n}", "public class Main\n{\n public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int M = sc.nextInt();\n int sum = 0;\n int arr[] = new int[M];\n for(int i=0;i<M;i++)\n {\n arr[i] = sc.nextInt();\n sum = sum+arr[i];\n }\n\n if(N-sum>=0)\n {System.out.print((N-sum));}\n else\n {System.out.print(-1);}\n\n\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int M = sc.nextInt(); int sum = 0; int arr[] = new int[M]; for(int i=0;i<M;i++) { arr[i] = sc.nextInt(); sum = sum+arr[i]; } if(N-sum>=0) {System.out.print((N-sum));} else {System.out.print(-1);} } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 42, 2, 4, 18, 13, 17, 30, 4, 18, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 13, 0, 13, 4, 18, 13, 17, 0, 13, 4, 18, 13, 17, 41, 13, 2, 4, 18, 13, 17, 13, 14, 2, 4, 18, 13, 17, 13, 30, 4, 18, 18, 13, 13, 40, 17, 30, 4, 18, 18, 13, 13, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 11, 18 ], [ 18, 19 ], [ 19, 20 ], [ 20, 21 ], [ 21, 22 ], [ 19, 23 ], [ 18, 24 ], [ 24, 25 ], [ 25, 26 ], [ 26, 27 ], [ 25, 28 ], [ 28, 29 ], [ 29, 30 ], [ 11, 31 ], [ 31, 32 ], [ 31, 33 ], [ 11, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 34, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 42, 43 ], [ 34, 44 ], [ 44, 45 ], [ 45, 46 ], [ 34, 47 ], [ 48, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 52, 53 ], [ 51, 54 ], [ 11, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 58, 59 ], [ 57, 60 ], [ 11, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 64, 65 ], [ 63, 66 ], [ 11, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 70, 73 ], [ 69, 74 ], [ 11, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 77, 80 ], [ 76, 81 ], [ 75, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 83, 88 ], [ 88, 89 ], [ 75, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 91, 96 ], [ 9, 97 ], [ 97, 98 ] ]
[ "\nimport java.util. ArrayList;\nimport java.util.Scanner;\nclass Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n ArrayList<Integer> a = new ArrayList<>();\n while(sc.hasNext()== true ){\n a.add(sc.nextInt());\n }\n int sumo = 0;\n for (int i =0; i<a.size(); i++){\n sumo += a.get(i);\n }\n sumo -= a.get(0);\n sumo -= a.get(1);\n int ans = a.get(0) - sumo;\n if( a.get(0)< sumo){\n System.out.println(-1);\n }else{\n System.out.println(ans);\n }\n }\n}", "import java.util. ArrayList;", "ArrayList", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n ArrayList<Integer> a = new ArrayList<>();\n while(sc.hasNext()== true ){\n a.add(sc.nextInt());\n }\n int sumo = 0;\n for (int i =0; i<a.size(); i++){\n sumo += a.get(i);\n }\n sumo -= a.get(0);\n sumo -= a.get(1);\n int ans = a.get(0) - sumo;\n if( a.get(0)< sumo){\n System.out.println(-1);\n }else{\n System.out.println(ans);\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n ArrayList<Integer> a = new ArrayList<>();\n while(sc.hasNext()== true ){\n a.add(sc.nextInt());\n }\n int sumo = 0;\n for (int i =0; i<a.size(); i++){\n sumo += a.get(i);\n }\n sumo -= a.get(0);\n sumo -= a.get(1);\n int ans = a.get(0) - sumo;\n if( a.get(0)< sumo){\n System.out.println(-1);\n }else{\n System.out.println(ans);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n ArrayList<Integer> a = new ArrayList<>();\n while(sc.hasNext()== true ){\n a.add(sc.nextInt());\n }\n int sumo = 0;\n for (int i =0; i<a.size(); i++){\n sumo += a.get(i);\n }\n sumo -= a.get(0);\n sumo -= a.get(1);\n int ans = a.get(0) - sumo;\n if( a.get(0)< sumo){\n System.out.println(-1);\n }else{\n System.out.println(ans);\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "ArrayList<Integer> a = new ArrayList<>();", "a", "new ArrayList<>()", "while(sc.hasNext()== true ){\n a.add(sc.nextInt());\n }", "sc.hasNext()== true", "sc.hasNext()", "sc.hasNext", "sc", "true", "{\n a.add(sc.nextInt());\n }", "a.add(sc.nextInt())", "a.add", "a", "sc.nextInt()", "sc.nextInt", "sc", "int sumo = 0;", "sumo", "0", "for (int i =0; i<a.size(); i++){\n sumo += a.get(i);\n }", "int i =0;", "int i =0;", "i", "0", "i<a.size()", "i", "a.size()", "a.size", "a", "i++", "i++", "i", "{\n sumo += a.get(i);\n }", "{\n sumo += a.get(i);\n }", "sumo += a.get(i)", "sumo", "a.get(i)", "a.get", "a", "i", "sumo -= a.get(0)", "sumo", "a.get(0)", "a.get", "a", "0", "sumo -= a.get(1)", "sumo", "a.get(1)", "a.get", "a", "1", "int ans = a.get(0) - sumo;", "ans", "a.get(0) - sumo", "a.get(0)", "a.get", "a", "0", "sumo", "if( a.get(0)< sumo){\n System.out.println(-1);\n }else{\n System.out.println(ans);\n }", "a.get(0)< sumo", "a.get(0)", "a.get", "a", "0", "sumo", "{\n System.out.println(-1);\n }", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "{\n System.out.println(ans);\n }", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args" ]
import java.util. ArrayList; import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); ArrayList<Integer> a = new ArrayList<>(); while(sc.hasNext()== true ){ a.add(sc.nextInt()); } int sumo = 0; for (int i =0; i<a.size(); i++){ sumo += a.get(i); } sumo -= a.get(0); sumo -= a.get(1); int ans = a.get(0) - sumo; if( a.get(0)< sumo){ System.out.println(-1); }else{ System.out.println(ans); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 2, 13, 4, 18, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 40, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 69, 5 ], [ 69, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 8, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 45, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 45, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 59, 64 ], [ 64, 65 ], [ 6, 66 ], [ 66, 67 ], [ 0, 68 ], [ 68, 69 ], [ 68, 70 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n //コード\n \tScanner sc = new Scanner(System.in);\n \tint N = sc.nextInt();\n \tint M = sc.nextInt();\n\n \tint s = 0;\n\n \tfor(int i=0;i<M;i++) {\n \t\ts = s + sc.nextInt();\n \t}\n\n \tif(N>=s) {\n \t\tSystem.out.println(N-s);\n \t} else {\n \t\tSystem.out.println(-1);\n \t}\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n //コード\n \tScanner sc = new Scanner(System.in);\n \tint N = sc.nextInt();\n \tint M = sc.nextInt();\n\n \tint s = 0;\n\n \tfor(int i=0;i<M;i++) {\n \t\ts = s + sc.nextInt();\n \t}\n\n \tif(N>=s) {\n \t\tSystem.out.println(N-s);\n \t} else {\n \t\tSystem.out.println(-1);\n \t}\n }\n}", "Main", "public static void main(String[] args) {\n //コード\n \tScanner sc = new Scanner(System.in);\n \tint N = sc.nextInt();\n \tint M = sc.nextInt();\n\n \tint s = 0;\n\n \tfor(int i=0;i<M;i++) {\n \t\ts = s + sc.nextInt();\n \t}\n\n \tif(N>=s) {\n \t\tSystem.out.println(N-s);\n \t} else {\n \t\tSystem.out.println(-1);\n \t}\n }", "main", "{\n //コード\n \tScanner sc = new Scanner(System.in);\n \tint N = sc.nextInt();\n \tint M = sc.nextInt();\n\n \tint s = 0;\n\n \tfor(int i=0;i<M;i++) {\n \t\ts = s + sc.nextInt();\n \t}\n\n \tif(N>=s) {\n \t\tSystem.out.println(N-s);\n \t} else {\n \t\tSystem.out.println(-1);\n \t}\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int M = sc.nextInt();", "M", "sc.nextInt()", "sc.nextInt", "sc", "int s = 0;", "s", "0", "for(int i=0;i<M;i++) {\n \t\ts = s + sc.nextInt();\n \t}", "int i=0;", "int i=0;", "i", "0", "i<M", "i", "M", "i++", "i++", "i", "{\n \t\ts = s + sc.nextInt();\n \t}", "{\n \t\ts = s + sc.nextInt();\n \t}", "s = s + sc.nextInt()", "s", "s + sc.nextInt()", "s", "sc.nextInt()", "sc.nextInt", "sc", "if(N>=s) {\n \t\tSystem.out.println(N-s);\n \t} else {\n \t\tSystem.out.println(-1);\n \t}", "N>=s", "N", "s", "{\n \t\tSystem.out.println(N-s);\n \t}", "System.out.println(N-s)", "System.out.println", "System.out", "System", "System.out", "N-s", "N", "s", "{\n \t\tSystem.out.println(-1);\n \t}", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n //コード\n \tScanner sc = new Scanner(System.in);\n \tint N = sc.nextInt();\n \tint M = sc.nextInt();\n\n \tint s = 0;\n\n \tfor(int i=0;i<M;i++) {\n \t\ts = s + sc.nextInt();\n \t}\n\n \tif(N>=s) {\n \t\tSystem.out.println(N-s);\n \t} else {\n \t\tSystem.out.println(-1);\n \t}\n }\n}", "public class Main {\n public static void main(String[] args) {\n //コード\n \tScanner sc = new Scanner(System.in);\n \tint N = sc.nextInt();\n \tint M = sc.nextInt();\n\n \tint s = 0;\n\n \tfor(int i=0;i<M;i++) {\n \t\ts = s + sc.nextInt();\n \t}\n\n \tif(N>=s) {\n \t\tSystem.out.println(N-s);\n \t} else {\n \t\tSystem.out.println(-1);\n \t}\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { //コード Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int M = sc.nextInt(); int s = 0; for(int i=0;i<M;i++) { s = s + sc.nextInt(); } if(N>=s) { System.out.println(N-s); } else { System.out.println(-1); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 40, 17, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 81, 5 ], [ 81, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 26, 31 ], [ 31, 32 ], [ 31, 33 ], [ 26, 34 ], [ 34, 35 ], [ 35, 36 ], [ 26, 37 ], [ 38, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 39, 43 ], [ 43, 44 ], [ 44, 45 ], [ 8, 46 ], [ 46, 47 ], [ 46, 48 ], [ 8, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 49, 54 ], [ 54, 55 ], [ 54, 56 ], [ 49, 57 ], [ 57, 58 ], [ 58, 59 ], [ 49, 60 ], [ 61, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 64, 66 ], [ 8, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 67, 72 ], [ 72, 73 ], [ 73, 74 ], [ 72, 75 ], [ 75, 76 ], [ 72, 77 ], [ 6, 78 ], [ 78, 79 ], [ 0, 80 ], [ 80, 81 ], [ 80, 82 ] ]
[ "import java.util.*;\npublic class Main {\n public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n int N = input.nextInt();\n int M = input.nextInt();\n int[] A = new int[M];\n for (int i = 0; i < M; i++){\n A[i] = input.nextInt();\n }\n int ans = N;\n for (int i = 0; i < M; i++){\n ans -= A[i];\n }\n System.out.println(Math.max(-1,ans));\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n int N = input.nextInt();\n int M = input.nextInt();\n int[] A = new int[M];\n for (int i = 0; i < M; i++){\n A[i] = input.nextInt();\n }\n int ans = N;\n for (int i = 0; i < M; i++){\n ans -= A[i];\n }\n System.out.println(Math.max(-1,ans));\n }\n}", "Main", "public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n int N = input.nextInt();\n int M = input.nextInt();\n int[] A = new int[M];\n for (int i = 0; i < M; i++){\n A[i] = input.nextInt();\n }\n int ans = N;\n for (int i = 0; i < M; i++){\n ans -= A[i];\n }\n System.out.println(Math.max(-1,ans));\n }", "main", "{\n Scanner input = new Scanner(System.in);\n int N = input.nextInt();\n int M = input.nextInt();\n int[] A = new int[M];\n for (int i = 0; i < M; i++){\n A[i] = input.nextInt();\n }\n int ans = N;\n for (int i = 0; i < M; i++){\n ans -= A[i];\n }\n System.out.println(Math.max(-1,ans));\n }", "Scanner input = new Scanner(System.in);", "input", "new Scanner(System.in)", "int N = input.nextInt();", "N", "input.nextInt()", "input.nextInt", "input", "int M = input.nextInt();", "M", "input.nextInt()", "input.nextInt", "input", "int[] A = new int[M];", "A", "new int[M]", "M", "for (int i = 0; i < M; i++){\n A[i] = input.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < M", "i", "M", "i++", "i++", "i", "{\n A[i] = input.nextInt();\n }", "{\n A[i] = input.nextInt();\n }", "A[i] = input.nextInt()", "A[i]", "A", "i", "input.nextInt()", "input.nextInt", "input", "int ans = N;", "ans", "N", "for (int i = 0; i < M; i++){\n ans -= A[i];\n }", "int i = 0;", "int i = 0;", "i", "0", "i < M", "i", "M", "i++", "i++", "i", "{\n ans -= A[i];\n }", "{\n ans -= A[i];\n }", "ans -= A[i]", "ans", "A[i]", "A", "i", "System.out.println(Math.max(-1,ans))", "System.out.println", "System.out", "System", "System.out", "Math.max(-1,ans)", "Math.max", "Math", "-1", "1", "ans", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n int N = input.nextInt();\n int M = input.nextInt();\n int[] A = new int[M];\n for (int i = 0; i < M; i++){\n A[i] = input.nextInt();\n }\n int ans = N;\n for (int i = 0; i < M; i++){\n ans -= A[i];\n }\n System.out.println(Math.max(-1,ans));\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n int N = input.nextInt();\n int M = input.nextInt();\n int[] A = new int[M];\n for (int i = 0; i < M; i++){\n A[i] = input.nextInt();\n }\n int ans = N;\n for (int i = 0; i < M; i++){\n ans -= A[i];\n }\n System.out.println(Math.max(-1,ans));\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); int N = input.nextInt(); int M = input.nextInt(); int[] A = new int[M]; for (int i = 0; i < M; i++){ A[i] = input.nextInt(); } int ans = N; for (int i = 0; i < M; i++){ ans -= A[i]; } System.out.println(Math.max(-1,ans)); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 13, 4, 18, 13, 4, 18, 18, 13, 13, 4, 18, 13, 40, 17, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 58, 5 ], [ 58, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 8, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 42, 47 ], [ 47, 48 ], [ 48, 49 ], [ 47, 50 ], [ 50, 51 ], [ 47, 52 ], [ 52, 53 ], [ 52, 54 ], [ 6, 55 ], [ 55, 56 ], [ 0, 57 ], [ 57, 58 ], [ 57, 59 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int homeworks = sc.nextInt();\n int days = 0;\n for (int i = 0; i < homeworks; i++) days += sc.nextInt();\n System.out.println(Math.max(-1, n - days));\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int homeworks = sc.nextInt();\n int days = 0;\n for (int i = 0; i < homeworks; i++) days += sc.nextInt();\n System.out.println(Math.max(-1, n - days));\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int homeworks = sc.nextInt();\n int days = 0;\n for (int i = 0; i < homeworks; i++) days += sc.nextInt();\n System.out.println(Math.max(-1, n - days));\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int homeworks = sc.nextInt();\n int days = 0;\n for (int i = 0; i < homeworks; i++) days += sc.nextInt();\n System.out.println(Math.max(-1, n - days));\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int homeworks = sc.nextInt();", "homeworks", "sc.nextInt()", "sc.nextInt", "sc", "int days = 0;", "days", "0", "for (int i = 0; i < homeworks; i++) days += sc.nextInt();", "int i = 0;", "int i = 0;", "i", "0", "i < homeworks", "i", "homeworks", "i++", "i++", "i", "days += sc.nextInt();", "days += sc.nextInt()", "days", "sc.nextInt()", "sc.nextInt", "sc", "System.out.println(Math.max(-1, n - days))", "System.out.println", "System.out", "System", "System.out", "Math.max(-1, n - days)", "Math.max", "Math", "-1", "1", "n - days", "n", "days", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int homeworks = sc.nextInt();\n int days = 0;\n for (int i = 0; i < homeworks; i++) days += sc.nextInt();\n System.out.println(Math.max(-1, n - days));\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int homeworks = sc.nextInt();\n int days = 0;\n for (int i = 0; i < homeworks; i++) days += sc.nextInt();\n System.out.println(Math.max(-1, n - days));\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int homeworks = sc.nextInt(); int days = 0; for (int i = 0; i < homeworks; i++) days += sc.nextInt(); System.out.println(Math.max(-1, n - days)); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 18, 13, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 40, 17, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 26 ], [ 26, 27 ], [ 26, 28 ], [ 8, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 29, 34 ], [ 34, 35 ], [ 34, 36 ], [ 29, 37 ], [ 37, 38 ], [ 38, 39 ], [ 29, 40 ], [ 41, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 42, 46 ], [ 46, 47 ], [ 47, 48 ], [ 8, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 49, 54 ], [ 54, 55 ], [ 54, 56 ], [ 49, 57 ], [ 57, 58 ], [ 58, 59 ], [ 49, 60 ], [ 61, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 64, 66 ], [ 8, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 67, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 72, 77 ], [ 77, 78 ], [ 77, 79 ], [ 67, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 81, 86 ], [ 86, 87 ], [ 6, 88 ], [ 88, 89 ] ]
[ "import java.util.Scanner;\n\nclass Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int m = scan.nextInt();\n int a[] = new int[m];\n int sum = 0;\n for(int i = 0; i<m; i++){\n a[i] = scan.nextInt();\n }\n for(int i = 0; i<m; i++){\n sum += a[i];\n }\n if(sum <= n){\n System.out.println(n - sum);\n }else{\n System.out.println(-1);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int m = scan.nextInt();\n int a[] = new int[m];\n int sum = 0;\n for(int i = 0; i<m; i++){\n a[i] = scan.nextInt();\n }\n for(int i = 0; i<m; i++){\n sum += a[i];\n }\n if(sum <= n){\n System.out.println(n - sum);\n }else{\n System.out.println(-1);\n }\n }\n}", "Main", "public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int m = scan.nextInt();\n int a[] = new int[m];\n int sum = 0;\n for(int i = 0; i<m; i++){\n a[i] = scan.nextInt();\n }\n for(int i = 0; i<m; i++){\n sum += a[i];\n }\n if(sum <= n){\n System.out.println(n - sum);\n }else{\n System.out.println(-1);\n }\n }", "main", "{\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int m = scan.nextInt();\n int a[] = new int[m];\n int sum = 0;\n for(int i = 0; i<m; i++){\n a[i] = scan.nextInt();\n }\n for(int i = 0; i<m; i++){\n sum += a[i];\n }\n if(sum <= n){\n System.out.println(n - sum);\n }else{\n System.out.println(-1);\n }\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int n = scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "int m = scan.nextInt();", "m", "scan.nextInt()", "scan.nextInt", "scan", "int a[] = new int[m];", "a", "new int[m]", "m", "int sum = 0;", "sum", "0", "for(int i = 0; i<m; i++){\n a[i] = scan.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i<m", "i", "m", "i++", "i++", "i", "{\n a[i] = scan.nextInt();\n }", "{\n a[i] = scan.nextInt();\n }", "a[i] = scan.nextInt()", "a[i]", "a", "i", "scan.nextInt()", "scan.nextInt", "scan", "for(int i = 0; i<m; i++){\n sum += a[i];\n }", "int i = 0;", "int i = 0;", "i", "0", "i<m", "i", "m", "i++", "i++", "i", "{\n sum += a[i];\n }", "{\n sum += a[i];\n }", "sum += a[i]", "sum", "a[i]", "a", "i", "if(sum <= n){\n System.out.println(n - sum);\n }else{\n System.out.println(-1);\n }", "sum <= n", "sum", "n", "{\n System.out.println(n - sum);\n }", "System.out.println(n - sum)", "System.out.println", "System.out", "System", "System.out", "n - sum", "n", "sum", "{\n System.out.println(-1);\n }", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "String[] args", "args" ]
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int m = scan.nextInt(); int a[] = new int[m]; int sum = 0; for(int i = 0; i<m; i++){ a[i] = scan.nextInt(); } for(int i = 0; i<m; i++){ sum += a[i]; } if(sum <= n){ System.out.println(n - sum); }else{ System.out.println(-1); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 2, 13, 13, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 14, 2, 2, 13, 13, 17, 30, 4, 18, 18, 13, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 74, 5 ], [ 74, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 8, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 44, 48 ], [ 43, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 43, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 59, 63 ], [ 58, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 65, 70 ], [ 6, 71 ], [ 71, 72 ], [ 0, 73 ], [ 73, 74 ], [ 73, 75 ] ]
[ "import java.util.Scanner;\npublic class Main {\n public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n \n int N =sc.nextInt();\n int M =sc.nextInt();\n int a=0;\n \n for(int i=1;i<=M;i++){\n a +=sc.nextInt();\n }\n if(N-a >=0){\n System.out.println(N-a);\n }\n else if(N-a <0) {\n System.out.println(\"-1\");\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n \n int N =sc.nextInt();\n int M =sc.nextInt();\n int a=0;\n \n for(int i=1;i<=M;i++){\n a +=sc.nextInt();\n }\n if(N-a >=0){\n System.out.println(N-a);\n }\n else if(N-a <0) {\n System.out.println(\"-1\");\n }\n }\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n \n int N =sc.nextInt();\n int M =sc.nextInt();\n int a=0;\n \n for(int i=1;i<=M;i++){\n a +=sc.nextInt();\n }\n if(N-a >=0){\n System.out.println(N-a);\n }\n else if(N-a <0) {\n System.out.println(\"-1\");\n }\n }", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n \n int N =sc.nextInt();\n int M =sc.nextInt();\n int a=0;\n \n for(int i=1;i<=M;i++){\n a +=sc.nextInt();\n }\n if(N-a >=0){\n System.out.println(N-a);\n }\n else if(N-a <0) {\n System.out.println(\"-1\");\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int N =sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int M =sc.nextInt();", "M", "sc.nextInt()", "sc.nextInt", "sc", "int a=0;", "a", "0", "for(int i=1;i<=M;i++){\n a +=sc.nextInt();\n }", "int i=1;", "int i=1;", "i", "1", "i<=M", "i", "M", "i++", "i++", "i", "{\n a +=sc.nextInt();\n }", "{\n a +=sc.nextInt();\n }", "a +=sc.nextInt()", "a", "sc.nextInt()", "sc.nextInt", "sc", "if(N-a >=0){\n System.out.println(N-a);\n }\n else if(N-a <0) {\n System.out.println(\"-1\");\n }", "N-a >=0", "N-a", "N", "a", "0", "{\n System.out.println(N-a);\n }", "System.out.println(N-a)", "System.out.println", "System.out", "System", "System.out", "N-a", "N", "a", "if(N-a <0) {\n System.out.println(\"-1\");\n }", "N-a <0", "N-a", "N", "a", "0", "{\n System.out.println(\"-1\");\n }", "System.out.println(\"-1\")", "System.out.println", "System.out", "System", "System.out", "\"-1\"", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n \n int N =sc.nextInt();\n int M =sc.nextInt();\n int a=0;\n \n for(int i=1;i<=M;i++){\n a +=sc.nextInt();\n }\n if(N-a >=0){\n System.out.println(N-a);\n }\n else if(N-a <0) {\n System.out.println(\"-1\");\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n \n int N =sc.nextInt();\n int M =sc.nextInt();\n int a=0;\n \n for(int i=1;i<=M;i++){\n a +=sc.nextInt();\n }\n if(N-a >=0){\n System.out.println(N-a);\n }\n else if(N-a <0) {\n System.out.println(\"-1\");\n }\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N =sc.nextInt(); int M =sc.nextInt(); int a=0; for(int i=1;i<=M;i++){ a +=sc.nextInt(); } if(N-a >=0){ System.out.println(N-a); } else if(N-a <0) { System.out.println("-1"); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 0, 13, 18, 13, 13, 0, 13, 2, 13, 13, 14, 2, 13, 17, 0, 13, 40, 17, 4, 18, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 79, 5 ], [ 79, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 26 ], [ 26, 27 ], [ 26, 28 ], [ 8, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 29, 34 ], [ 34, 35 ], [ 34, 36 ], [ 29, 37 ], [ 37, 38 ], [ 38, 39 ], [ 29, 40 ], [ 41, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 42, 46 ], [ 46, 47 ], [ 47, 48 ], [ 41, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 51, 53 ], [ 8, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 56, 58 ], [ 8, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 59, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 8, 67 ], [ 67, 68 ], [ 68, 69 ], [ 8, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 70, 75 ], [ 6, 76 ], [ 76, 77 ], [ 0, 78 ], [ 78, 79 ], [ 78, 80 ] ]
[ "import java.util.*;\n\npublic class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt(), m = sc.nextInt();\n\t\tint work[] = new int[m];\n\t\tint ans = 0;\n\t\tfor(int i = 0; i < m; ++i){\n\t\t\twork[i] = sc.nextInt();\n\t\t\tans += work[i];\n\t\t}\n\t\tans = n - ans;\n\t\tif(ans < 0)ans = -1;\n\t\tsc.close();\n\t\tSystem.out.println(ans);\n\t}\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt(), m = sc.nextInt();\n\t\tint work[] = new int[m];\n\t\tint ans = 0;\n\t\tfor(int i = 0; i < m; ++i){\n\t\t\twork[i] = sc.nextInt();\n\t\t\tans += work[i];\n\t\t}\n\t\tans = n - ans;\n\t\tif(ans < 0)ans = -1;\n\t\tsc.close();\n\t\tSystem.out.println(ans);\n\t}\n}", "Main", "public static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt(), m = sc.nextInt();\n\t\tint work[] = new int[m];\n\t\tint ans = 0;\n\t\tfor(int i = 0; i < m; ++i){\n\t\t\twork[i] = sc.nextInt();\n\t\t\tans += work[i];\n\t\t}\n\t\tans = n - ans;\n\t\tif(ans < 0)ans = -1;\n\t\tsc.close();\n\t\tSystem.out.println(ans);\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt(), m = sc.nextInt();\n\t\tint work[] = new int[m];\n\t\tint ans = 0;\n\t\tfor(int i = 0; i < m; ++i){\n\t\t\twork[i] = sc.nextInt();\n\t\t\tans += work[i];\n\t\t}\n\t\tans = n - ans;\n\t\tif(ans < 0)ans = -1;\n\t\tsc.close();\n\t\tSystem.out.println(ans);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n = sc.nextInt()", "n", "sc.nextInt()", "sc.nextInt", "sc", "m = sc.nextInt();", "m", "sc.nextInt()", "sc.nextInt", "sc", "int work[] = new int[m];", "work", "new int[m]", "m", "int ans = 0;", "ans", "0", "for(int i = 0; i < m; ++i){\n\t\t\twork[i] = sc.nextInt();\n\t\t\tans += work[i];\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < m", "i", "m", "++i", "++i", "i", "{\n\t\t\twork[i] = sc.nextInt();\n\t\t\tans += work[i];\n\t\t}", "{\n\t\t\twork[i] = sc.nextInt();\n\t\t\tans += work[i];\n\t\t}", "work[i] = sc.nextInt()", "work[i]", "work", "i", "sc.nextInt()", "sc.nextInt", "sc", "ans += work[i]", "ans", "work[i]", "work", "i", "ans = n - ans", "ans", "n - ans", "n", "ans", "if(ans < 0)ans = -1;", "ans < 0", "ans", "0", "ans = -1", "ans", "-1", "1", "sc.close()", "sc.close", "sc", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String args[]", "args", "public class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt(), m = sc.nextInt();\n\t\tint work[] = new int[m];\n\t\tint ans = 0;\n\t\tfor(int i = 0; i < m; ++i){\n\t\t\twork[i] = sc.nextInt();\n\t\t\tans += work[i];\n\t\t}\n\t\tans = n - ans;\n\t\tif(ans < 0)ans = -1;\n\t\tsc.close();\n\t\tSystem.out.println(ans);\n\t}\n}", "public class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt(), m = sc.nextInt();\n\t\tint work[] = new int[m];\n\t\tint ans = 0;\n\t\tfor(int i = 0; i < m; ++i){\n\t\t\twork[i] = sc.nextInt();\n\t\t\tans += work[i];\n\t\t}\n\t\tans = n - ans;\n\t\tif(ans < 0)ans = -1;\n\t\tsc.close();\n\t\tSystem.out.println(ans);\n\t}\n}", "Main" ]
import java.util.*; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(), m = sc.nextInt(); int work[] = new int[m]; int ans = 0; for(int i = 0; i < m; ++i){ work[i] = sc.nextInt(); ans += work[i]; } ans = n - ans; if(ans < 0)ans = -1; sc.close(); System.out.println(ans); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 4, 18, 18, 13, 13, 4, 18, 13, 2, 13, 13, 40, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 59, 5 ], [ 59, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 8, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 43, 48 ], [ 48, 49 ], [ 49, 50 ], [ 48, 51 ], [ 51, 52 ], [ 51, 53 ], [ 48, 54 ], [ 54, 55 ], [ 6, 56 ], [ 56, 57 ], [ 0, 58 ], [ 58, 59 ], [ 58, 60 ] ]
[ "\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n int M = scanner.nextInt();\n\n int A = 0;\n for (int i = 0 ; i < M ; i++) {\n A += scanner.nextInt();\n }\n\n System.out.println(Math.max(N - A, -1));\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n int M = scanner.nextInt();\n\n int A = 0;\n for (int i = 0 ; i < M ; i++) {\n A += scanner.nextInt();\n }\n\n System.out.println(Math.max(N - A, -1));\n }\n}", "Main", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n int M = scanner.nextInt();\n\n int A = 0;\n for (int i = 0 ; i < M ; i++) {\n A += scanner.nextInt();\n }\n\n System.out.println(Math.max(N - A, -1));\n }", "main", "{\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n int M = scanner.nextInt();\n\n int A = 0;\n for (int i = 0 ; i < M ; i++) {\n A += scanner.nextInt();\n }\n\n System.out.println(Math.max(N - A, -1));\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int N = scanner.nextInt();", "N", "scanner.nextInt()", "scanner.nextInt", "scanner", "int M = scanner.nextInt();", "M", "scanner.nextInt()", "scanner.nextInt", "scanner", "int A = 0;", "A", "0", "for (int i = 0 ; i < M ; i++) {\n A += scanner.nextInt();\n }", "int i = 0 ;", "int i = 0 ;", "i", "0", "i < M", "i", "M", "i++", "i++", "i", "{\n A += scanner.nextInt();\n }", "{\n A += scanner.nextInt();\n }", "A += scanner.nextInt()", "A", "scanner.nextInt()", "scanner.nextInt", "scanner", "System.out.println(Math.max(N - A, -1))", "System.out.println", "System.out", "System", "System.out", "Math.max(N - A, -1)", "Math.max", "Math", "N - A", "N", "A", "-1", "1", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n int M = scanner.nextInt();\n\n int A = 0;\n for (int i = 0 ; i < M ; i++) {\n A += scanner.nextInt();\n }\n\n System.out.println(Math.max(N - A, -1));\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n int M = scanner.nextInt();\n\n int A = 0;\n for (int i = 0 ; i < M ; i++) {\n A += scanner.nextInt();\n }\n\n System.out.println(Math.max(N - A, -1));\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int N = scanner.nextInt(); int M = scanner.nextInt(); int A = 0; for (int i = 0 ; i < M ; i++) { A += scanner.nextInt(); } System.out.println(Math.max(N - A, -1)); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 18, 13, 17, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 18, 13, 13, 41, 13, 2, 4, 18, 13, 18, 13, 17, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 40, 17, 30, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 95, 5 ], [ 95, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 24, 27 ], [ 8, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 31, 32 ], [ 30, 33 ], [ 8, 34 ], [ 34, 35 ], [ 34, 36 ], [ 8, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 37, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 44, 47 ], [ 47, 48 ], [ 47, 49 ], [ 37, 50 ], [ 50, 51 ], [ 51, 52 ], [ 37, 53 ], [ 54, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 58, 59 ], [ 57, 60 ], [ 60, 61 ], [ 60, 62 ], [ 8, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 66, 69 ], [ 69, 70 ], [ 69, 71 ], [ 65, 72 ], [ 8, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 73, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 78, 83 ], [ 83, 84 ], [ 73, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 86, 91 ], [ 6, 92 ], [ 92, 93 ], [ 0, 94 ], [ 94, 95 ], [ 94, 96 ] ]
[ "import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n \tString num = sc.nextLine();\n\t\tString[] data = line.split(\" \");\n \tString[] num2 = num.split(\" \");\n \tInteger sum = 0;\n \tfor(int i = 0; i < Integer.parseInt(data[1]); i++){\n sum += Integer.parseInt(num2[i]);\n }\n\t\tInteger nokori = Integer.parseInt(data[0]) - sum;\n if(nokori < 0){\n System.out.println(-1);\n }else{\n System.out.println(nokori);\n }\n\t}\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n \tString num = sc.nextLine();\n\t\tString[] data = line.split(\" \");\n \tString[] num2 = num.split(\" \");\n \tInteger sum = 0;\n \tfor(int i = 0; i < Integer.parseInt(data[1]); i++){\n sum += Integer.parseInt(num2[i]);\n }\n\t\tInteger nokori = Integer.parseInt(data[0]) - sum;\n if(nokori < 0){\n System.out.println(-1);\n }else{\n System.out.println(nokori);\n }\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n \tString num = sc.nextLine();\n\t\tString[] data = line.split(\" \");\n \tString[] num2 = num.split(\" \");\n \tInteger sum = 0;\n \tfor(int i = 0; i < Integer.parseInt(data[1]); i++){\n sum += Integer.parseInt(num2[i]);\n }\n\t\tInteger nokori = Integer.parseInt(data[0]) - sum;\n if(nokori < 0){\n System.out.println(-1);\n }else{\n System.out.println(nokori);\n }\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n \tString num = sc.nextLine();\n\t\tString[] data = line.split(\" \");\n \tString[] num2 = num.split(\" \");\n \tInteger sum = 0;\n \tfor(int i = 0; i < Integer.parseInt(data[1]); i++){\n sum += Integer.parseInt(num2[i]);\n }\n\t\tInteger nokori = Integer.parseInt(data[0]) - sum;\n if(nokori < 0){\n System.out.println(-1);\n }else{\n System.out.println(nokori);\n }\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "String line = sc.nextLine();", "line", "sc.nextLine()", "sc.nextLine", "sc", "String num = sc.nextLine();", "num", "sc.nextLine()", "sc.nextLine", "sc", "String[] data = line.split(\" \");", "data", "line.split(\" \")", "line.split", "line", "\" \"", "String[] num2 = num.split(\" \");", "num2", "num.split(\" \")", "num.split", "num", "\" \"", "Integer sum = 0;", "sum", "0", "for(int i = 0; i < Integer.parseInt(data[1]); i++){\n sum += Integer.parseInt(num2[i]);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < Integer.parseInt(data[1])", "i", "Integer.parseInt(data[1])", "Integer.parseInt", "Integer", "data[1]", "data", "1", "i++", "i++", "i", "{\n sum += Integer.parseInt(num2[i]);\n }", "{\n sum += Integer.parseInt(num2[i]);\n }", "sum += Integer.parseInt(num2[i])", "sum", "Integer.parseInt(num2[i])", "Integer.parseInt", "Integer", "num2[i]", "num2", "i", "Integer nokori = Integer.parseInt(data[0]) - sum;", "nokori", "Integer.parseInt(data[0]) - sum", "Integer.parseInt(data[0])", "Integer.parseInt", "Integer", "data[0]", "data", "0", "sum", "if(nokori < 0){\n System.out.println(-1);\n }else{\n System.out.println(nokori);\n }", "nokori < 0", "nokori", "0", "{\n System.out.println(-1);\n }", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "{\n System.out.println(nokori);\n }", "System.out.println(nokori)", "System.out.println", "System.out", "System", "System.out", "nokori", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n \tString num = sc.nextLine();\n\t\tString[] data = line.split(\" \");\n \tString[] num2 = num.split(\" \");\n \tInteger sum = 0;\n \tfor(int i = 0; i < Integer.parseInt(data[1]); i++){\n sum += Integer.parseInt(num2[i]);\n }\n\t\tInteger nokori = Integer.parseInt(data[0]) - sum;\n if(nokori < 0){\n System.out.println(-1);\n }else{\n System.out.println(nokori);\n }\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n \tString num = sc.nextLine();\n\t\tString[] data = line.split(\" \");\n \tString[] num2 = num.split(\" \");\n \tInteger sum = 0;\n \tfor(int i = 0; i < Integer.parseInt(data[1]); i++){\n sum += Integer.parseInt(num2[i]);\n }\n\t\tInteger nokori = Integer.parseInt(data[0]) - sum;\n if(nokori < 0){\n System.out.println(-1);\n }else{\n System.out.println(nokori);\n }\n\t}\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String line = sc.nextLine(); String num = sc.nextLine(); String[] data = line.split(" "); String[] num2 = num.split(" "); Integer sum = 0; for(int i = 0; i < Integer.parseInt(data[1]); i++){ sum += Integer.parseInt(num2[i]); } Integer nokori = Integer.parseInt(data[0]) - sum; if(nokori < 0){ System.out.println(-1); }else{ System.out.println(nokori); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 42, 2, 40, 13, 17, 30, 41, 13, 4, 18, 13, 0, 13, 13, 14, 2, 13, 13, 4, 18, 18, 13, 13, 40, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 65, 8 ], [ 65, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 11, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 11, 25 ], [ 25, 26 ], [ 25, 27 ], [ 11, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 29, 32 ], [ 28, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 33, 39 ], [ 39, 40 ], [ 39, 41 ], [ 11, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 42, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 42, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 54, 59 ], [ 59, 60 ], [ 59, 61 ], [ 9, 62 ], [ 62, 63 ], [ 0, 64 ], [ 64, 65 ], [ 64, 66 ] ]
[ "import java.util.*;\nimport java.lang.*;\n\npublic class Main{\n\n public static void main(String args[]){\n \n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int m = sc.nextInt();\nint sum=0;\n while(m--!=0){\nint a = sc.nextInt();\nsum+=a;\n}\nif(sum>n) System.out.println(-1);\nelse {\nSystem.out.println(n-sum);\n}\n }\n\n}", "import java.util.*;", "util.*", "java", "import java.lang.*;", "lang.*", "java", "public class Main{\n\n public static void main(String args[]){\n \n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int m = sc.nextInt();\nint sum=0;\n while(m--!=0){\nint a = sc.nextInt();\nsum+=a;\n}\nif(sum>n) System.out.println(-1);\nelse {\nSystem.out.println(n-sum);\n}\n }\n\n}", "Main", "public static void main(String args[]){\n \n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int m = sc.nextInt();\nint sum=0;\n while(m--!=0){\nint a = sc.nextInt();\nsum+=a;\n}\nif(sum>n) System.out.println(-1);\nelse {\nSystem.out.println(n-sum);\n}\n }", "main", "{\n \n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int m = sc.nextInt();\nint sum=0;\n while(m--!=0){\nint a = sc.nextInt();\nsum+=a;\n}\nif(sum>n) System.out.println(-1);\nelse {\nSystem.out.println(n-sum);\n}\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int m = sc.nextInt();", "m", "sc.nextInt()", "sc.nextInt", "sc", "int sum=0;", "sum", "0", "while(m--!=0){\nint a = sc.nextInt();\nsum+=a;\n}", "m--!=0", "m--", "m", "0", "{\nint a = sc.nextInt();\nsum+=a;\n}", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "sum+=a", "sum", "a", "if(sum>n) System.out.println(-1);\nelse {\nSystem.out.println(n-sum);\n}", "sum>n", "sum", "n", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "{\nSystem.out.println(n-sum);\n}", "System.out.println(n-sum)", "System.out.println", "System.out", "System", "System.out", "n-sum", "n", "sum", "String args[]", "args", "public class Main{\n\n public static void main(String args[]){\n \n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int m = sc.nextInt();\nint sum=0;\n while(m--!=0){\nint a = sc.nextInt();\nsum+=a;\n}\nif(sum>n) System.out.println(-1);\nelse {\nSystem.out.println(n-sum);\n}\n }\n\n}", "public class Main{\n\n public static void main(String args[]){\n \n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int m = sc.nextInt();\nint sum=0;\n while(m--!=0){\nint a = sc.nextInt();\nsum+=a;\n}\nif(sum>n) System.out.println(-1);\nelse {\nSystem.out.println(n-sum);\n}\n }\n\n}", "Main" ]
import java.util.*; import java.lang.*; public class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int sum=0; while(m--!=0){ int a = sc.nextInt(); sum+=a; } if(sum>n) System.out.println(-1); else { System.out.println(n-sum); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 2, 13, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 76, 11 ], [ 76, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 14, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 14, 28 ], [ 28, 29 ], [ 28, 30 ], [ 14, 31 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 31, 36 ], [ 36, 37 ], [ 36, 38 ], [ 31, 39 ], [ 39, 40 ], [ 40, 41 ], [ 31, 42 ], [ 43, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 47, 48 ], [ 14, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 50, 54 ], [ 54, 55 ], [ 54, 56 ], [ 49, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 58, 63 ], [ 49, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 65, 70 ], [ 70, 71 ], [ 70, 72 ], [ 12, 73 ], [ 73, 74 ], [ 0, 75 ], [ 75, 76 ], [ 75, 77 ] ]
[ "/* package codechef; // don't place package name! */\n\nimport java.util.*;\nimport java.lang.*;\nimport java.io.*;\n\n/* Name of the class has to be \"Main\" only if the class is public. */\npublic class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tScanner input = new Scanner(System.in);\n\t\tint days = input.nextInt();\n\t\tint assignment = input.nextInt();\n\t\tint daysToComplete= 0;\n\t\tfor(int i = 0;i<assignment;i++){\n\t\t daysToComplete+=input.nextInt();\n\t\t}\n\t\tif(assignment>days || daysToComplete>days){\n\t\t System.out.println(\"-1\");\n\t\t}else {\n\t\t System.out.println(days- daysToComplete);\n\t\t}\n\t}\n}", "import java.util.*;", "util.*", "java", "import java.lang.*;", "lang.*", "java", "import java.io.*;", "io.*", "java", "public class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tScanner input = new Scanner(System.in);\n\t\tint days = input.nextInt();\n\t\tint assignment = input.nextInt();\n\t\tint daysToComplete= 0;\n\t\tfor(int i = 0;i<assignment;i++){\n\t\t daysToComplete+=input.nextInt();\n\t\t}\n\t\tif(assignment>days || daysToComplete>days){\n\t\t System.out.println(\"-1\");\n\t\t}else {\n\t\t System.out.println(days- daysToComplete);\n\t\t}\n\t}\n}", "Main", "public static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tScanner input = new Scanner(System.in);\n\t\tint days = input.nextInt();\n\t\tint assignment = input.nextInt();\n\t\tint daysToComplete= 0;\n\t\tfor(int i = 0;i<assignment;i++){\n\t\t daysToComplete+=input.nextInt();\n\t\t}\n\t\tif(assignment>days || daysToComplete>days){\n\t\t System.out.println(\"-1\");\n\t\t}else {\n\t\t System.out.println(days- daysToComplete);\n\t\t}\n\t}", "main", "{\n\t\tScanner input = new Scanner(System.in);\n\t\tint days = input.nextInt();\n\t\tint assignment = input.nextInt();\n\t\tint daysToComplete= 0;\n\t\tfor(int i = 0;i<assignment;i++){\n\t\t daysToComplete+=input.nextInt();\n\t\t}\n\t\tif(assignment>days || daysToComplete>days){\n\t\t System.out.println(\"-1\");\n\t\t}else {\n\t\t System.out.println(days- daysToComplete);\n\t\t}\n\t}", "Scanner input = new Scanner(System.in);", "input", "new Scanner(System.in)", "int days = input.nextInt();", "days", "input.nextInt()", "input.nextInt", "input", "int assignment = input.nextInt();", "assignment", "input.nextInt()", "input.nextInt", "input", "int daysToComplete= 0;", "daysToComplete", "0", "for(int i = 0;i<assignment;i++){\n\t\t daysToComplete+=input.nextInt();\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i<assignment", "i", "assignment", "i++", "i++", "i", "{\n\t\t daysToComplete+=input.nextInt();\n\t\t}", "{\n\t\t daysToComplete+=input.nextInt();\n\t\t}", "daysToComplete+=input.nextInt()", "daysToComplete", "input.nextInt()", "input.nextInt", "input", "if(assignment>days || daysToComplete>days){\n\t\t System.out.println(\"-1\");\n\t\t}else {\n\t\t System.out.println(days- daysToComplete);\n\t\t}", "assignment>days || daysToComplete>days", "assignment>days", "assignment", "days", "daysToComplete>days", "daysToComplete", "days", "{\n\t\t System.out.println(\"-1\");\n\t\t}", "System.out.println(\"-1\")", "System.out.println", "System.out", "System", "System.out", "\"-1\"", "{\n\t\t System.out.println(days- daysToComplete);\n\t\t}", "System.out.println(days- daysToComplete)", "System.out.println", "System.out", "System", "System.out", "days- daysToComplete", "days", "daysToComplete", "String[] args", "args", "public class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tScanner input = new Scanner(System.in);\n\t\tint days = input.nextInt();\n\t\tint assignment = input.nextInt();\n\t\tint daysToComplete= 0;\n\t\tfor(int i = 0;i<assignment;i++){\n\t\t daysToComplete+=input.nextInt();\n\t\t}\n\t\tif(assignment>days || daysToComplete>days){\n\t\t System.out.println(\"-1\");\n\t\t}else {\n\t\t System.out.println(days- daysToComplete);\n\t\t}\n\t}\n}", "public class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tScanner input = new Scanner(System.in);\n\t\tint days = input.nextInt();\n\t\tint assignment = input.nextInt();\n\t\tint daysToComplete= 0;\n\t\tfor(int i = 0;i<assignment;i++){\n\t\t daysToComplete+=input.nextInt();\n\t\t}\n\t\tif(assignment>days || daysToComplete>days){\n\t\t System.out.println(\"-1\");\n\t\t}else {\n\t\t System.out.println(days- daysToComplete);\n\t\t}\n\t}\n}", "Main" ]
/* package codechef; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; /* Name of the class has to be "Main" only if the class is public. */ public class Main { public static void main (String[] args) throws java.lang.Exception { Scanner input = new Scanner(System.in); int days = input.nextInt(); int assignment = input.nextInt(); int daysToComplete= 0; for(int i = 0;i<assignment;i++){ daysToComplete+=input.nextInt(); } if(assignment>days || daysToComplete>days){ System.out.println("-1"); }else { System.out.println(days- daysToComplete); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 40, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 67, 5 ], [ 67, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 8, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 48, 53 ], [ 53, 54 ], [ 53, 55 ], [ 43, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 62, 63 ], [ 6, 64 ], [ 64, 65 ], [ 0, 66 ], [ 66, 67 ], [ 66, 68 ] ]
[ "import java.util.Scanner;\n \npublic class Main {\n public static void main(String[] args){\n Scanner in = new Scanner(System.in);\n int day = in.nextInt();\n int number = in.nextInt();\n int sum = 0;\n for(int i = 0; i < number; i++){\n sum += in.nextInt();\n }\n if(sum<=day){\n System.out.print(day-sum);\n }\n else{\n System.out.print(-1);\n }\n }\n \n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args){\n Scanner in = new Scanner(System.in);\n int day = in.nextInt();\n int number = in.nextInt();\n int sum = 0;\n for(int i = 0; i < number; i++){\n sum += in.nextInt();\n }\n if(sum<=day){\n System.out.print(day-sum);\n }\n else{\n System.out.print(-1);\n }\n }\n \n}", "Main", "public static void main(String[] args){\n Scanner in = new Scanner(System.in);\n int day = in.nextInt();\n int number = in.nextInt();\n int sum = 0;\n for(int i = 0; i < number; i++){\n sum += in.nextInt();\n }\n if(sum<=day){\n System.out.print(day-sum);\n }\n else{\n System.out.print(-1);\n }\n }", "main", "{\n Scanner in = new Scanner(System.in);\n int day = in.nextInt();\n int number = in.nextInt();\n int sum = 0;\n for(int i = 0; i < number; i++){\n sum += in.nextInt();\n }\n if(sum<=day){\n System.out.print(day-sum);\n }\n else{\n System.out.print(-1);\n }\n }", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "int day = in.nextInt();", "day", "in.nextInt()", "in.nextInt", "in", "int number = in.nextInt();", "number", "in.nextInt()", "in.nextInt", "in", "int sum = 0;", "sum", "0", "for(int i = 0; i < number; i++){\n sum += in.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < number", "i", "number", "i++", "i++", "i", "{\n sum += in.nextInt();\n }", "{\n sum += in.nextInt();\n }", "sum += in.nextInt()", "sum", "in.nextInt()", "in.nextInt", "in", "if(sum<=day){\n System.out.print(day-sum);\n }\n else{\n System.out.print(-1);\n }", "sum<=day", "sum", "day", "{\n System.out.print(day-sum);\n }", "System.out.print(day-sum)", "System.out.print", "System.out", "System", "System.out", "day-sum", "day", "sum", "{\n System.out.print(-1);\n }", "System.out.print(-1)", "System.out.print", "System.out", "System", "System.out", "-1", "1", "String[] args", "args", "public class Main {\n public static void main(String[] args){\n Scanner in = new Scanner(System.in);\n int day = in.nextInt();\n int number = in.nextInt();\n int sum = 0;\n for(int i = 0; i < number; i++){\n sum += in.nextInt();\n }\n if(sum<=day){\n System.out.print(day-sum);\n }\n else{\n System.out.print(-1);\n }\n }\n \n}", "public class Main {\n public static void main(String[] args){\n Scanner in = new Scanner(System.in);\n int day = in.nextInt();\n int number = in.nextInt();\n int sum = 0;\n for(int i = 0; i < number; i++){\n sum += in.nextInt();\n }\n if(sum<=day){\n System.out.print(day-sum);\n }\n else{\n System.out.print(-1);\n }\n }\n \n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner in = new Scanner(System.in); int day = in.nextInt(); int number = in.nextInt(); int sum = 0; for(int i = 0; i < number; i++){ sum += in.nextInt(); } if(sum<=day){ System.out.print(day-sum); } else{ System.out.print(-1); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 17, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 41, 13, 20, 0, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 4, 18, 13, 42, 2, 40, 13, 17, 0, 13, 4, 18, 13, 4, 18, 18, 13, 13, 4, 18, 13, 2, 13, 13, 40, 17, 4, 18, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 23, 13, 12, 13, 30, 0, 13, 20, 23, 13, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 4, 13, 17, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 12, 13, 30, 29, 4, 18, 13, 12, 13, 30, 4, 18, 13, 17, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 254, 11 ], [ 254, 12 ], [ 12, 13 ], [ 254, 14 ], [ 14, 15 ], [ 254, 16 ], [ 16, 17 ], [ 254, 18 ], [ 18, 19 ], [ 254, 20 ], [ 20, 21 ], [ 20, 22 ], [ 254, 23 ], [ 23, 24 ], [ 254, 25 ], [ 25, 26 ], [ 254, 27 ], [ 27, 28 ], [ 254, 29 ], [ 29, 30 ], [ 254, 31 ], [ 31, 32 ], [ 254, 33 ], [ 33, 34 ], [ 254, 35 ], [ 35, 36 ], [ 254, 37 ], [ 37, 38 ], [ 254, 39 ], [ 39, 40 ], [ 254, 41 ], [ 41, 42 ], [ 254, 43 ], [ 43, 44 ], [ 254, 45 ], [ 45, 46 ], [ 254, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 49, 53 ], [ 53, 54 ], [ 53, 55 ], [ 49, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 59, 60 ], [ 49, 61 ], [ 61, 62 ], [ 61, 63 ], [ 49, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 67, 68 ], [ 49, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 70, 73 ], [ 69, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 49, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 79, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 87, 88 ], [ 87, 89 ], [ 84, 90 ], [ 90, 91 ], [ 49, 92 ], [ 92, 93 ], [ 93, 94 ], [ 47, 95 ], [ 95, 96 ], [ 254, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 97, 101 ], [ 101, 102 ], [ 97, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 103, 109 ], [ 109, 110 ], [ 97, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 111, 117 ], [ 117, 118 ], [ 97, 119 ], [ 119, 120 ], [ 119, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 123, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 122, 131 ], [ 131, 132 ], [ 131, 133 ], [ 121, 134 ], [ 134, 135 ], [ 135, 136 ], [ 136, 137 ], [ 97, 138 ], [ 138, 139 ], [ 138, 140 ], [ 140, 141 ], [ 141, 142 ], [ 142, 143 ], [ 143, 144 ], [ 97, 145 ], [ 145, 146 ], [ 145, 147 ], [ 147, 148 ], [ 148, 149 ], [ 149, 150 ], [ 150, 151 ], [ 149, 152 ], [ 152, 153 ], [ 97, 154 ], [ 154, 155 ], [ 154, 156 ], [ 156, 157 ], [ 157, 158 ], [ 158, 159 ], [ 159, 160 ], [ 158, 161 ], [ 161, 162 ], [ 97, 163 ], [ 163, 164 ], [ 163, 165 ], [ 165, 166 ], [ 166, 167 ], [ 167, 168 ], [ 168, 169 ], [ 169, 170 ], [ 167, 171 ], [ 97, 172 ], [ 172, 173 ], [ 172, 174 ], [ 174, 175 ], [ 175, 176 ], [ 176, 177 ], [ 177, 178 ], [ 176, 179 ], [ 179, 180 ], [ 97, 181 ], [ 181, 182 ], [ 181, 183 ], [ 183, 184 ], [ 184, 185 ], [ 184, 186 ], [ 183, 188 ], [ 188, 189 ], [ 189, 190 ], [ 190, 191 ], [ 190, 192 ], [ 188, 193 ], [ 193, 194 ], [ 193, 195 ], [ 188, 196 ], [ 196, 197 ], [ 197, 198 ], [ 188, 199 ], [ 199, 200 ], [ 200, 201 ], [ 201, 202 ], [ 201, 203 ], [ 200, 204 ], [ 204, 205 ], [ 183, 206 ], [ 206, 207 ], [ 181, 208 ], [ 208, 209 ], [ 97, 210 ], [ 210, 211 ], [ 210, 212 ], [ 212, 213 ], [ 213, 214 ], [ 213, 215 ], [ 212, 217 ], [ 217, 218 ], [ 218, 219 ], [ 219, 220 ], [ 219, 221 ], [ 217, 222 ], [ 222, 223 ], [ 222, 224 ], [ 217, 225 ], [ 225, 226 ], [ 226, 227 ], [ 217, 228 ], [ 228, 229 ], [ 229, 230 ], [ 230, 231 ], [ 230, 232 ], [ 229, 233 ], [ 233, 234 ], [ 212, 235 ], [ 235, 236 ], [ 210, 237 ], [ 237, 238 ], [ 97, 239 ], [ 239, 240 ], [ 239, 241 ], [ 241, 242 ], [ 242, 243 ], [ 243, 244 ], [ 244, 245 ], [ 97, 246 ], [ 246, 247 ], [ 246, 248 ], [ 248, 249 ], [ 249, 250 ], [ 250, 251 ], [ 249, 252 ], [ 0, 253 ], [ 253, 254 ], [ 253, 255 ] ]
[ "import java.io.*;\nimport java.math.BigInteger;\nimport java.util.*;\n\n\n\npublic class Main {\n\tstatic PrintWriter out;\n\tstatic StringBuilder sb;\n\tstatic int n, k;\n\tstatic long mod = 1000000007;\n\tstatic int[][] memo;\n\tstatic String s;\n\tstatic HashSet<Integer> nodes;\n\tstatic ArrayList<Integer>[] ad, tree;\n\tstatic boolean[] vis, taken;\n\tstatic int[] a;\n\tstatic TreeSet<Long> al;\n\tstatic long[] val;\n\tstatic ArrayList<String> aa;\n\tstatic char[] b;\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tout = new PrintWriter(System.out);\n\t\tint n=sc.nextInt();\n\t\tlong k=0;\n\t\tint m=sc.nextInt();\n\t\twhile(m-->0)\n\t\t\tk+=sc.nextInt();\n\t\tSystem.out.println(Math.max(n-k, -1));\n\t\tout.flush();\n\t}\n\n\tstatic class Scanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\n\t\tpublic Scanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}\n\n\t\tpublic Scanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}\n\n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n\n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tpublic char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}\n\n\t\tpublic Long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tpublic int[] nextArrInt(int n) throws IOException {\n\t\t\tint[] a = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextInt();\n\t\t\treturn a;\n\t\t}\n\n\t\tpublic long[] nextArrLong(int n) throws IOException {\n\t\t\tlong[] a = new long[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextLong();\n\t\t\treturn a;\n\t\t}\n\n\t\tpublic boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n\n\t\tpublic void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}\n\t}\n}", "import java.io.*;", "io.*", "java", "import java.math.BigInteger;", "BigInteger", "java.math", "import java.util.*;", "util.*", "java", "public class Main {\n\tstatic PrintWriter out;\n\tstatic StringBuilder sb;\n\tstatic int n, k;\n\tstatic long mod = 1000000007;\n\tstatic int[][] memo;\n\tstatic String s;\n\tstatic HashSet<Integer> nodes;\n\tstatic ArrayList<Integer>[] ad, tree;\n\tstatic boolean[] vis, taken;\n\tstatic int[] a;\n\tstatic TreeSet<Long> al;\n\tstatic long[] val;\n\tstatic ArrayList<String> aa;\n\tstatic char[] b;\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tout = new PrintWriter(System.out);\n\t\tint n=sc.nextInt();\n\t\tlong k=0;\n\t\tint m=sc.nextInt();\n\t\twhile(m-->0)\n\t\t\tk+=sc.nextInt();\n\t\tSystem.out.println(Math.max(n-k, -1));\n\t\tout.flush();\n\t}\n\n\tstatic class Scanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\n\t\tpublic Scanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}\n\n\t\tpublic Scanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}\n\n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n\n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tpublic char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}\n\n\t\tpublic Long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tpublic int[] nextArrInt(int n) throws IOException {\n\t\t\tint[] a = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextInt();\n\t\t\treturn a;\n\t\t}\n\n\t\tpublic long[] nextArrLong(int n) throws IOException {\n\t\t\tlong[] a = new long[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextLong();\n\t\t\treturn a;\n\t\t}\n\n\t\tpublic boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n\n\t\tpublic void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}\n\t}\n}", "Main", "static PrintWriter out;", "out", "static StringBuilder sb;", "sb", "static int n", "n", "k;", "k", "static long mod = 1000000007;", "mod", "1000000007", "static int[][] memo;", "memo", "static String s;", "s", "static HashSet<Integer> nodes;", "nodes", "static ArrayList<Integer>[] ad", "ad", "tree;", "tree", "static boolean[] vis", "vis", "taken;", "taken", "static int[] a;", "a", "static TreeSet<Long> al;", "al", "static long[] val;", "val", "static ArrayList<String> aa;", "aa", "static char[] b;", "b", "public static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tout = new PrintWriter(System.out);\n\t\tint n=sc.nextInt();\n\t\tlong k=0;\n\t\tint m=sc.nextInt();\n\t\twhile(m-->0)\n\t\t\tk+=sc.nextInt();\n\t\tSystem.out.println(Math.max(n-k, -1));\n\t\tout.flush();\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tout = new PrintWriter(System.out);\n\t\tint n=sc.nextInt();\n\t\tlong k=0;\n\t\tint m=sc.nextInt();\n\t\twhile(m-->0)\n\t\t\tk+=sc.nextInt();\n\t\tSystem.out.println(Math.max(n-k, -1));\n\t\tout.flush();\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "out = new PrintWriter(System.out)", "out", "new PrintWriter(System.out)", "int n=sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "long k=0;", "k", "0", "int m=sc.nextInt();", "m", "sc.nextInt()", "sc.nextInt", "sc", "while(m-->0)\n\t\t\tk+=sc.nextInt();", "m-->0", "m--", "m", "0", "k+=sc.nextInt()", "k", "sc.nextInt()", "sc.nextInt", "sc", "System.out.println(Math.max(n-k, -1))", "System.out.println", "System.out", "System", "System.out", "Math.max(n-k, -1)", "Math.max", "Math", "n-k", "n", "k", "-1", "1", "out.flush()", "out.flush", "out", "String[] args", "args", "static class Scanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\n\t\tpublic Scanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}\n\n\t\tpublic Scanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}\n\n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n\n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tpublic char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}\n\n\t\tpublic Long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tpublic int[] nextArrInt(int n) throws IOException {\n\t\t\tint[] a = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextInt();\n\t\t\treturn a;\n\t\t}\n\n\t\tpublic long[] nextArrLong(int n) throws IOException {\n\t\t\tlong[] a = new long[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextLong();\n\t\t\treturn a;\n\t\t}\n\n\t\tpublic boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n\n\t\tpublic void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}\n\t}", "Scanner", "StringTokenizer st;", "st", "BufferedReader br;", "br", "public Scanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}", "Scanner", "{\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}", "br = new BufferedReader(new InputStreamReader(system))", "br", "new BufferedReader(new InputStreamReader(system))", "InputStream system", "system", "public Scanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}", "Scanner", "{\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}", "br = new BufferedReader(new FileReader(file))", "br", "new BufferedReader(new FileReader(file))", "String file", "file", "public String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}", "next", "{\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}", "while (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());", "st == null || !st.hasMoreTokens()", "st == null", "st", "null", "!st.hasMoreTokens()", "st.hasMoreTokens()", "st.hasMoreTokens", "st", "st = new StringTokenizer(br.readLine())", "st", "new StringTokenizer(br.readLine())", "return st.nextToken();", "st.nextToken()", "st.nextToken", "st", "public String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}", "nextLine", "{\n\t\t\treturn br.readLine();\n\t\t}", "return br.readLine();", "br.readLine()", "br.readLine", "br", "public int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}", "nextInt", "{\n\t\t\treturn Integer.parseInt(next());\n\t\t}", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "public double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}", "nextDouble", "{\n\t\t\treturn Double.parseDouble(next());\n\t\t}", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "public char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}", "nextChar", "{\n\t\t\treturn next().charAt(0);\n\t\t}", "return next().charAt(0);", "next().charAt(0)", "next().charAt", "next()", "next", "0", "public Long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}", "nextLong", "{\n\t\t\treturn Long.parseLong(next());\n\t\t}", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "public int[] nextArrInt(int n) throws IOException {\n\t\t\tint[] a = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextInt();\n\t\t\treturn a;\n\t\t}", "nextArrInt", "{\n\t\t\tint[] a = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextInt();\n\t\t\treturn a;\n\t\t}", "int[] a = new int[n];", "a", "new int[n]", "n", "for (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextInt();", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "a[i] = nextInt();", "a[i] = nextInt()", "a[i]", "a", "i", "nextInt()", "nextInt", "return a;", "a", "int n", "n", "public long[] nextArrLong(int n) throws IOException {\n\t\t\tlong[] a = new long[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextLong();\n\t\t\treturn a;\n\t\t}", "nextArrLong", "{\n\t\t\tlong[] a = new long[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextLong();\n\t\t\treturn a;\n\t\t}", "long[] a = new long[n];", "a", "new long[n]", "n", "for (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextLong();", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "a[i] = nextLong();", "a[i] = nextLong()", "a[i]", "a", "i", "nextLong()", "nextLong", "return a;", "a", "int n", "n", "public boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}", "ready", "{\n\t\t\treturn br.ready();\n\t\t}", "return br.ready();", "br.ready()", "br.ready", "br", "public void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}", "waitForInput", "{\n\t\t\tThread.sleep(3000);\n\t\t}", "Thread.sleep(3000)", "Thread.sleep", "Thread", "3000", "public class Main {\n\tstatic PrintWriter out;\n\tstatic StringBuilder sb;\n\tstatic int n, k;\n\tstatic long mod = 1000000007;\n\tstatic int[][] memo;\n\tstatic String s;\n\tstatic HashSet<Integer> nodes;\n\tstatic ArrayList<Integer>[] ad, tree;\n\tstatic boolean[] vis, taken;\n\tstatic int[] a;\n\tstatic TreeSet<Long> al;\n\tstatic long[] val;\n\tstatic ArrayList<String> aa;\n\tstatic char[] b;\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tout = new PrintWriter(System.out);\n\t\tint n=sc.nextInt();\n\t\tlong k=0;\n\t\tint m=sc.nextInt();\n\t\twhile(m-->0)\n\t\t\tk+=sc.nextInt();\n\t\tSystem.out.println(Math.max(n-k, -1));\n\t\tout.flush();\n\t}\n\n\tstatic class Scanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\n\t\tpublic Scanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}\n\n\t\tpublic Scanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}\n\n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n\n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tpublic char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}\n\n\t\tpublic Long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tpublic int[] nextArrInt(int n) throws IOException {\n\t\t\tint[] a = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextInt();\n\t\t\treturn a;\n\t\t}\n\n\t\tpublic long[] nextArrLong(int n) throws IOException {\n\t\t\tlong[] a = new long[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextLong();\n\t\t\treturn a;\n\t\t}\n\n\t\tpublic boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n\n\t\tpublic void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}\n\t}\n}", "public class Main {\n\tstatic PrintWriter out;\n\tstatic StringBuilder sb;\n\tstatic int n, k;\n\tstatic long mod = 1000000007;\n\tstatic int[][] memo;\n\tstatic String s;\n\tstatic HashSet<Integer> nodes;\n\tstatic ArrayList<Integer>[] ad, tree;\n\tstatic boolean[] vis, taken;\n\tstatic int[] a;\n\tstatic TreeSet<Long> al;\n\tstatic long[] val;\n\tstatic ArrayList<String> aa;\n\tstatic char[] b;\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tout = new PrintWriter(System.out);\n\t\tint n=sc.nextInt();\n\t\tlong k=0;\n\t\tint m=sc.nextInt();\n\t\twhile(m-->0)\n\t\t\tk+=sc.nextInt();\n\t\tSystem.out.println(Math.max(n-k, -1));\n\t\tout.flush();\n\t}\n\n\tstatic class Scanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\n\t\tpublic Scanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}\n\n\t\tpublic Scanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}\n\n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n\n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tpublic char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}\n\n\t\tpublic Long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tpublic int[] nextArrInt(int n) throws IOException {\n\t\t\tint[] a = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextInt();\n\t\t\treturn a;\n\t\t}\n\n\t\tpublic long[] nextArrLong(int n) throws IOException {\n\t\t\tlong[] a = new long[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextLong();\n\t\t\treturn a;\n\t\t}\n\n\t\tpublic boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n\n\t\tpublic void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}\n\t}\n}", "Main" ]
import java.io.*; import java.math.BigInteger; import java.util.*; public class Main { static PrintWriter out; static StringBuilder sb; static int n, k; static long mod = 1000000007; static int[][] memo; static String s; static HashSet<Integer> nodes; static ArrayList<Integer>[] ad, tree; static boolean[] vis, taken; static int[] a; static TreeSet<Long> al; static long[] val; static ArrayList<String> aa; static char[] b; public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); out = new PrintWriter(System.out); int n=sc.nextInt(); long k=0; int m=sc.nextInt(); while(m-->0) k+=sc.nextInt(); System.out.println(Math.max(n-k, -1)); out.flush(); } static class Scanner { StringTokenizer st; BufferedReader br; public Scanner(InputStream system) { br = new BufferedReader(new InputStreamReader(system)); } public Scanner(String file) throws Exception { br = new BufferedReader(new FileReader(file)); } public String next() throws IOException { while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine()); return st.nextToken(); } public String nextLine() throws IOException { return br.readLine(); } public int nextInt() throws IOException { return Integer.parseInt(next()); } public double nextDouble() throws IOException { return Double.parseDouble(next()); } public char nextChar() throws IOException { return next().charAt(0); } public Long nextLong() throws IOException { return Long.parseLong(next()); } public int[] nextArrInt(int n) throws IOException { int[] a = new int[n]; for (int i = 0; i < n; i++) a[i] = nextInt(); return a; } public long[] nextArrLong(int n) throws IOException { long[] a = new long[n]; for (int i = 0; i < n; i++) a[i] = nextLong(); return a; } public boolean ready() throws IOException { return br.ready(); } public void waitForInput() throws InterruptedException { Thread.sleep(3000); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 41, 13, 40, 17, 14, 2, 2, 13, 13, 17, 30, 0, 13, 2, 13, 13, 4, 18, 18, 13, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 71, 5 ], [ 71, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 8, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 8, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 48, 52 ], [ 47, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 56, 58 ], [ 8, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 59, 64 ], [ 8, 65 ], [ 65, 66 ], [ 66, 67 ], [ 6, 68 ], [ 68, 69 ], [ 0, 70 ], [ 70, 71 ], [ 70, 72 ] ]
[ "import java.util.*;\n\npublic class Main {\npublic static void main(String[] args) {\n\t\t\n\t\tScanner keyboard = new Scanner(System.in); \n\t\t\n\t\tint X = keyboard.nextInt();\n\t\tint Y = keyboard.nextInt();\n\t\t\n\t\tint HW = 0;\n\t\t\n\t\tfor(int i=0; i<Y; i++) {\n\t\t\tHW += keyboard.nextInt();\n\t\t}\n\t\t\n\t\tint P = -1;\n\t\tif(X - HW >= 0) {\n\t\t\tP = X - HW;\n\t\t}\n\t\t\n\t\tSystem.out.println(P);\n\t\tkeyboard.close();\t\n\t}\n}", "import java.util.*;", "util.*", "java", "public class Main {\npublic static void main(String[] args) {\n\t\t\n\t\tScanner keyboard = new Scanner(System.in); \n\t\t\n\t\tint X = keyboard.nextInt();\n\t\tint Y = keyboard.nextInt();\n\t\t\n\t\tint HW = 0;\n\t\t\n\t\tfor(int i=0; i<Y; i++) {\n\t\t\tHW += keyboard.nextInt();\n\t\t}\n\t\t\n\t\tint P = -1;\n\t\tif(X - HW >= 0) {\n\t\t\tP = X - HW;\n\t\t}\n\t\t\n\t\tSystem.out.println(P);\n\t\tkeyboard.close();\t\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\t\n\t\tScanner keyboard = new Scanner(System.in); \n\t\t\n\t\tint X = keyboard.nextInt();\n\t\tint Y = keyboard.nextInt();\n\t\t\n\t\tint HW = 0;\n\t\t\n\t\tfor(int i=0; i<Y; i++) {\n\t\t\tHW += keyboard.nextInt();\n\t\t}\n\t\t\n\t\tint P = -1;\n\t\tif(X - HW >= 0) {\n\t\t\tP = X - HW;\n\t\t}\n\t\t\n\t\tSystem.out.println(P);\n\t\tkeyboard.close();\t\n\t}", "main", "{\n\t\t\n\t\tScanner keyboard = new Scanner(System.in); \n\t\t\n\t\tint X = keyboard.nextInt();\n\t\tint Y = keyboard.nextInt();\n\t\t\n\t\tint HW = 0;\n\t\t\n\t\tfor(int i=0; i<Y; i++) {\n\t\t\tHW += keyboard.nextInt();\n\t\t}\n\t\t\n\t\tint P = -1;\n\t\tif(X - HW >= 0) {\n\t\t\tP = X - HW;\n\t\t}\n\t\t\n\t\tSystem.out.println(P);\n\t\tkeyboard.close();\t\n\t}", "Scanner keyboard = new Scanner(System.in);", "keyboard", "new Scanner(System.in)", "int X = keyboard.nextInt();", "X", "keyboard.nextInt()", "keyboard.nextInt", "keyboard", "int Y = keyboard.nextInt();", "Y", "keyboard.nextInt()", "keyboard.nextInt", "keyboard", "int HW = 0;", "HW", "0", "for(int i=0; i<Y; i++) {\n\t\t\tHW += keyboard.nextInt();\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<Y", "i", "Y", "i++", "i++", "i", "{\n\t\t\tHW += keyboard.nextInt();\n\t\t}", "{\n\t\t\tHW += keyboard.nextInt();\n\t\t}", "HW += keyboard.nextInt()", "HW", "keyboard.nextInt()", "keyboard.nextInt", "keyboard", "int P = -1;", "P", "-1", "1", "if(X - HW >= 0) {\n\t\t\tP = X - HW;\n\t\t}", "X - HW >= 0", "X - HW", "X", "HW", "0", "{\n\t\t\tP = X - HW;\n\t\t}", "P = X - HW", "P", "X - HW", "X", "HW", "System.out.println(P)", "System.out.println", "System.out", "System", "System.out", "P", "keyboard.close()", "keyboard.close", "keyboard", "String[] args", "args", "public class Main {\npublic static void main(String[] args) {\n\t\t\n\t\tScanner keyboard = new Scanner(System.in); \n\t\t\n\t\tint X = keyboard.nextInt();\n\t\tint Y = keyboard.nextInt();\n\t\t\n\t\tint HW = 0;\n\t\t\n\t\tfor(int i=0; i<Y; i++) {\n\t\t\tHW += keyboard.nextInt();\n\t\t}\n\t\t\n\t\tint P = -1;\n\t\tif(X - HW >= 0) {\n\t\t\tP = X - HW;\n\t\t}\n\t\t\n\t\tSystem.out.println(P);\n\t\tkeyboard.close();\t\n\t}\n}", "public class Main {\npublic static void main(String[] args) {\n\t\t\n\t\tScanner keyboard = new Scanner(System.in); \n\t\t\n\t\tint X = keyboard.nextInt();\n\t\tint Y = keyboard.nextInt();\n\t\t\n\t\tint HW = 0;\n\t\t\n\t\tfor(int i=0; i<Y; i++) {\n\t\t\tHW += keyboard.nextInt();\n\t\t}\n\t\t\n\t\tint P = -1;\n\t\tif(X - HW >= 0) {\n\t\t\tP = X - HW;\n\t\t}\n\t\t\n\t\tSystem.out.println(P);\n\t\tkeyboard.close();\t\n\t}\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner keyboard = new Scanner(System.in); int X = keyboard.nextInt(); int Y = keyboard.nextInt(); int HW = 0; for(int i=0; i<Y; i++) { HW += keyboard.nextInt(); } int P = -1; if(X - HW >= 0) { P = X - HW; } System.out.println(P); keyboard.close(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 0, 13, 18, 13, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 40, 17, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 90, 5 ], [ 90, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 14, 17 ], [ 17, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 22, 25 ], [ 25, 26 ], [ 26, 27 ], [ 8, 28 ], [ 28, 29 ], [ 28, 30 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 35, 40 ], [ 40, 41 ], [ 40, 42 ], [ 35, 43 ], [ 43, 44 ], [ 44, 45 ], [ 35, 46 ], [ 47, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 48, 52 ], [ 52, 53 ], [ 53, 54 ], [ 52, 55 ], [ 55, 56 ], [ 56, 57 ], [ 47, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 60, 62 ], [ 8, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 63, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 73, 74 ], [ 73, 75 ], [ 63, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 77, 82 ], [ 82, 83 ], [ 8, 84 ], [ 84, 85 ], [ 85, 86 ], [ 6, 87 ], [ 87, 88 ], [ 0, 89 ], [ 89, 90 ], [ 89, 91 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(final String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int m = Integer.parseInt(sc.next());\n // String s = sc.next();\n int[] a = new int[n];\n int ans = 0;\n for (int i = 0; i < m; i++) {\n a[i] = Integer.parseInt(sc.next());\n ans += a[i];\n }\n\n if (n >= ans) {\n System.out.println(n - ans);\n } else {\n System.out.println(-1);\n }\n sc.close();\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(final String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int m = Integer.parseInt(sc.next());\n // String s = sc.next();\n int[] a = new int[n];\n int ans = 0;\n for (int i = 0; i < m; i++) {\n a[i] = Integer.parseInt(sc.next());\n ans += a[i];\n }\n\n if (n >= ans) {\n System.out.println(n - ans);\n } else {\n System.out.println(-1);\n }\n sc.close();\n }\n}", "Main", "public static void main(final String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int m = Integer.parseInt(sc.next());\n // String s = sc.next();\n int[] a = new int[n];\n int ans = 0;\n for (int i = 0; i < m; i++) {\n a[i] = Integer.parseInt(sc.next());\n ans += a[i];\n }\n\n if (n >= ans) {\n System.out.println(n - ans);\n } else {\n System.out.println(-1);\n }\n sc.close();\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int m = Integer.parseInt(sc.next());\n // String s = sc.next();\n int[] a = new int[n];\n int ans = 0;\n for (int i = 0; i < m; i++) {\n a[i] = Integer.parseInt(sc.next());\n ans += a[i];\n }\n\n if (n >= ans) {\n System.out.println(n - ans);\n } else {\n System.out.println(-1);\n }\n sc.close();\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n = Integer.parseInt(sc.next());", "n", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "int m = Integer.parseInt(sc.next());", "m", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "int[] a = new int[n];", "a", "new int[n]", "n", "int ans = 0;", "ans", "0", "for (int i = 0; i < m; i++) {\n a[i] = Integer.parseInt(sc.next());\n ans += a[i];\n }", "int i = 0;", "int i = 0;", "i", "0", "i < m", "i", "m", "i++", "i++", "i", "{\n a[i] = Integer.parseInt(sc.next());\n ans += a[i];\n }", "{\n a[i] = Integer.parseInt(sc.next());\n ans += a[i];\n }", "a[i] = Integer.parseInt(sc.next())", "a[i]", "a", "i", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "ans += a[i]", "ans", "a[i]", "a", "i", "if (n >= ans) {\n System.out.println(n - ans);\n } else {\n System.out.println(-1);\n }", "n >= ans", "n", "ans", "{\n System.out.println(n - ans);\n }", "System.out.println(n - ans)", "System.out.println", "System.out", "System", "System.out", "n - ans", "n", "ans", "{\n System.out.println(-1);\n }", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "sc.close()", "sc.close", "sc", "final String[] args", "args", "public class Main {\n public static void main(final String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int m = Integer.parseInt(sc.next());\n // String s = sc.next();\n int[] a = new int[n];\n int ans = 0;\n for (int i = 0; i < m; i++) {\n a[i] = Integer.parseInt(sc.next());\n ans += a[i];\n }\n\n if (n >= ans) {\n System.out.println(n - ans);\n } else {\n System.out.println(-1);\n }\n sc.close();\n }\n}", "public class Main {\n public static void main(final String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int m = Integer.parseInt(sc.next());\n // String s = sc.next();\n int[] a = new int[n];\n int ans = 0;\n for (int i = 0; i < m; i++) {\n a[i] = Integer.parseInt(sc.next());\n ans += a[i];\n }\n\n if (n >= ans) {\n System.out.println(n - ans);\n } else {\n System.out.println(-1);\n }\n sc.close();\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(final String[] args) { Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.next()); int m = Integer.parseInt(sc.next()); // String s = sc.next(); int[] a = new int[n]; int ans = 0; for (int i = 0; i < m; i++) { a[i] = Integer.parseInt(sc.next()); ans += a[i]; } if (n >= ans) { System.out.println(n - ans); } else { System.out.println(-1); } sc.close(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 0, 13, 2, 13, 13, 0, 13, 2, 13, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 30, 4, 18, 18, 13, 13, 40, 17, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 78, 5 ], [ 78, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 37, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 45, 47 ], [ 8, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 50, 52 ], [ 8, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 53, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 58, 63 ], [ 53, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 65, 70 ], [ 70, 71 ], [ 8, 72 ], [ 72, 73 ], [ 73, 74 ], [ 6, 75 ], [ 75, 76 ], [ 0, 77 ], [ 77, 78 ], [ 77, 79 ] ]
[ "import java.util.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc=new Scanner(System.in);\n\t\t\n\t\tint n=sc.nextInt();\t\t//夏休みの日数\n\t\tint m=sc.nextInt();\t\t//夏休みの宿題の数\n\t\tint count=0;\n\t\t\n\t\tfor(int i=0;i<m;i++) {\n\t\t\tint m1=sc.nextInt();\t//1番目の宿題\n\t\t\tcount=count+m1;\n\t\t}\n\t\t\n\t\tcount=n-count;\n\t\t\n\t\tif(count>=0) {\n\t\t\tSystem.out.println(count);\n\t\t}else {\n\t\t\tSystem.out.println(-1);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc=new Scanner(System.in);\n\t\t\n\t\tint n=sc.nextInt();\t\t//夏休みの日数\n\t\tint m=sc.nextInt();\t\t//夏休みの宿題の数\n\t\tint count=0;\n\t\t\n\t\tfor(int i=0;i<m;i++) {\n\t\t\tint m1=sc.nextInt();\t//1番目の宿題\n\t\t\tcount=count+m1;\n\t\t}\n\t\t\n\t\tcount=n-count;\n\t\t\n\t\tif(count>=0) {\n\t\t\tSystem.out.println(count);\n\t\t}else {\n\t\t\tSystem.out.println(-1);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc=new Scanner(System.in);\n\t\t\n\t\tint n=sc.nextInt();\t\t//夏休みの日数\n\t\tint m=sc.nextInt();\t\t//夏休みの宿題の数\n\t\tint count=0;\n\t\t\n\t\tfor(int i=0;i<m;i++) {\n\t\t\tint m1=sc.nextInt();\t//1番目の宿題\n\t\t\tcount=count+m1;\n\t\t}\n\t\t\n\t\tcount=n-count;\n\t\t\n\t\tif(count>=0) {\n\t\t\tSystem.out.println(count);\n\t\t}else {\n\t\t\tSystem.out.println(-1);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}", "main", "{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc=new Scanner(System.in);\n\t\t\n\t\tint n=sc.nextInt();\t\t//夏休みの日数\n\t\tint m=sc.nextInt();\t\t//夏休みの宿題の数\n\t\tint count=0;\n\t\t\n\t\tfor(int i=0;i<m;i++) {\n\t\t\tint m1=sc.nextInt();\t//1番目の宿題\n\t\t\tcount=count+m1;\n\t\t}\n\t\t\n\t\tcount=n-count;\n\t\t\n\t\tif(count>=0) {\n\t\t\tSystem.out.println(count);\n\t\t}else {\n\t\t\tSystem.out.println(-1);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n=sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int m=sc.nextInt();", "m", "sc.nextInt()", "sc.nextInt", "sc", "int count=0;", "count", "0", "for(int i=0;i<m;i++) {\n\t\t\tint m1=sc.nextInt();\t//1番目の宿題\n\t\t\tcount=count+m1;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<m", "i", "m", "i++", "i++", "i", "{\n\t\t\tint m1=sc.nextInt();\t//1番目の宿題\n\t\t\tcount=count+m1;\n\t\t}", "{\n\t\t\tint m1=sc.nextInt();\t//1番目の宿題\n\t\t\tcount=count+m1;\n\t\t}", "int m1=sc.nextInt();", "m1", "sc.nextInt()", "sc.nextInt", "sc", "count=count+m1", "count", "count+m1", "count", "m1", "count=n-count", "count", "n-count", "n", "count", "if(count>=0) {\n\t\t\tSystem.out.println(count);\n\t\t}else {\n\t\t\tSystem.out.println(-1);\n\t\t}", "count>=0", "count", "0", "{\n\t\t\tSystem.out.println(count);\n\t\t}", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "{\n\t\t\tSystem.out.println(-1);\n\t\t}", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "sc.close()", "sc.close", "sc", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc=new Scanner(System.in);\n\t\t\n\t\tint n=sc.nextInt();\t\t//夏休みの日数\n\t\tint m=sc.nextInt();\t\t//夏休みの宿題の数\n\t\tint count=0;\n\t\t\n\t\tfor(int i=0;i<m;i++) {\n\t\t\tint m1=sc.nextInt();\t//1番目の宿題\n\t\t\tcount=count+m1;\n\t\t}\n\t\t\n\t\tcount=n-count;\n\t\t\n\t\tif(count>=0) {\n\t\t\tSystem.out.println(count);\n\t\t}else {\n\t\t\tSystem.out.println(-1);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc=new Scanner(System.in);\n\t\t\n\t\tint n=sc.nextInt();\t\t//夏休みの日数\n\t\tint m=sc.nextInt();\t\t//夏休みの宿題の数\n\t\tint count=0;\n\t\t\n\t\tfor(int i=0;i<m;i++) {\n\t\t\tint m1=sc.nextInt();\t//1番目の宿題\n\t\t\tcount=count+m1;\n\t\t}\n\t\t\n\t\tcount=n-count;\n\t\t\n\t\tif(count>=0) {\n\t\t\tSystem.out.println(count);\n\t\t}else {\n\t\t\tSystem.out.println(-1);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); //夏休みの日数 int m=sc.nextInt(); //夏休みの宿題の数 int count=0; for(int i=0;i<m;i++) { int m1=sc.nextInt(); //1番目の宿題 count=count+m1; } count=n-count; if(count>=0) { System.out.println(count); }else { System.out.println(-1); } sc.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 0, 13, 2, 13, 18, 13, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 82, 8 ], [ 82, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 11, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 11, 25 ], [ 25, 26 ], [ 25, 27 ], [ 11, 29 ], [ 29, 30 ], [ 29, 31 ], [ 11, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 32, 37 ], [ 37, 38 ], [ 37, 39 ], [ 32, 40 ], [ 40, 41 ], [ 41, 42 ], [ 32, 43 ], [ 44, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 45, 49 ], [ 49, 50 ], [ 50, 51 ], [ 44, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 56, 58 ], [ 11, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 59, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 64, 69 ], [ 69, 70 ], [ 69, 71 ], [ 59, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 73, 78 ], [ 9, 79 ], [ 79, 80 ], [ 0, 81 ], [ 81, 82 ], [ 81, 83 ] ]
[ "import java.util.*;\nimport java.lang.Math;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint N = in.nextInt();\n\t\tint M = in.nextInt();\n\t\tint[] A = new int[M];\n\t\tint total = 0;\n\t\tfor (int i=0; i<M; i++) {\n\t\t\tA[i] = in.nextInt();\n\t\t\ttotal = total + A[i];\n\t\t}\n\t\t\n\t\tif (N >= total) {\n\t\t\tSystem.out.println(N - total);\n\t\t} else {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}\n\t\t\n\t}\n}", "import java.util.*;", "util.*", "java", "import java.lang.Math;", "Math", "java.lang", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint N = in.nextInt();\n\t\tint M = in.nextInt();\n\t\tint[] A = new int[M];\n\t\tint total = 0;\n\t\tfor (int i=0; i<M; i++) {\n\t\t\tA[i] = in.nextInt();\n\t\t\ttotal = total + A[i];\n\t\t}\n\t\t\n\t\tif (N >= total) {\n\t\t\tSystem.out.println(N - total);\n\t\t} else {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}\n\t\t\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint N = in.nextInt();\n\t\tint M = in.nextInt();\n\t\tint[] A = new int[M];\n\t\tint total = 0;\n\t\tfor (int i=0; i<M; i++) {\n\t\t\tA[i] = in.nextInt();\n\t\t\ttotal = total + A[i];\n\t\t}\n\t\t\n\t\tif (N >= total) {\n\t\t\tSystem.out.println(N - total);\n\t\t} else {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}\n\t\t\n\t}", "main", "{\n\t\tScanner in = new Scanner(System.in);\n\t\tint N = in.nextInt();\n\t\tint M = in.nextInt();\n\t\tint[] A = new int[M];\n\t\tint total = 0;\n\t\tfor (int i=0; i<M; i++) {\n\t\t\tA[i] = in.nextInt();\n\t\t\ttotal = total + A[i];\n\t\t}\n\t\t\n\t\tif (N >= total) {\n\t\t\tSystem.out.println(N - total);\n\t\t} else {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}\n\t\t\n\t}", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "int N = in.nextInt();", "N", "in.nextInt()", "in.nextInt", "in", "int M = in.nextInt();", "M", "in.nextInt()", "in.nextInt", "in", "int[] A = new int[M];", "A", "new int[M]", "M", "int total = 0;", "total", "0", "for (int i=0; i<M; i++) {\n\t\t\tA[i] = in.nextInt();\n\t\t\ttotal = total + A[i];\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<M", "i", "M", "i++", "i++", "i", "{\n\t\t\tA[i] = in.nextInt();\n\t\t\ttotal = total + A[i];\n\t\t}", "{\n\t\t\tA[i] = in.nextInt();\n\t\t\ttotal = total + A[i];\n\t\t}", "A[i] = in.nextInt()", "A[i]", "A", "i", "in.nextInt()", "in.nextInt", "in", "total = total + A[i]", "total", "total + A[i]", "total", "A[i]", "A", "i", "if (N >= total) {\n\t\t\tSystem.out.println(N - total);\n\t\t} else {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}", "N >= total", "N", "total", "{\n\t\t\tSystem.out.println(N - total);\n\t\t}", "System.out.println(N - total)", "System.out.println", "System.out", "System", "System.out", "N - total", "N", "total", "{\n\t\t\tSystem.out.println(\"-1\");\n\t\t}", "System.out.println(\"-1\")", "System.out.println", "System.out", "System", "System.out", "\"-1\"", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint N = in.nextInt();\n\t\tint M = in.nextInt();\n\t\tint[] A = new int[M];\n\t\tint total = 0;\n\t\tfor (int i=0; i<M; i++) {\n\t\t\tA[i] = in.nextInt();\n\t\t\ttotal = total + A[i];\n\t\t}\n\t\t\n\t\tif (N >= total) {\n\t\t\tSystem.out.println(N - total);\n\t\t} else {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}\n\t\t\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint N = in.nextInt();\n\t\tint M = in.nextInt();\n\t\tint[] A = new int[M];\n\t\tint total = 0;\n\t\tfor (int i=0; i<M; i++) {\n\t\t\tA[i] = in.nextInt();\n\t\t\ttotal = total + A[i];\n\t\t}\n\t\t\n\t\tif (N >= total) {\n\t\t\tSystem.out.println(N - total);\n\t\t} else {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}\n\t\t\n\t}\n}", "Main" ]
import java.util.*; import java.lang.Math; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int N = in.nextInt(); int M = in.nextInt(); int[] A = new int[M]; int total = 0; for (int i=0; i<M; i++) { A[i] = in.nextInt(); total = total + A[i]; } if (N >= total) { System.out.println(N - total); } else { System.out.println("-1"); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 28, 13, 13, 30, 0, 13, 13, 14, 2, 2, 13, 13, 17, 4, 18, 18, 13, 13, 40, 17, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 80, 5 ], [ 80, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 26 ], [ 26, 27 ], [ 26, 28 ], [ 8, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 29, 34 ], [ 34, 35 ], [ 34, 36 ], [ 29, 37 ], [ 37, 38 ], [ 38, 39 ], [ 29, 40 ], [ 41, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 42, 46 ], [ 46, 47 ], [ 47, 48 ], [ 8, 49 ], [ 49, 50 ], [ 49, 51 ], [ 49, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 8, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 57, 61 ], [ 56, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 62, 67 ], [ 67, 68 ], [ 56, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 69, 74 ], [ 74, 75 ], [ 74, 76 ], [ 6, 77 ], [ 77, 78 ], [ 0, 79 ], [ 79, 80 ], [ 79, 81 ] ]
[ "\nimport java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n\tScanner scanner = new Scanner(System.in);\n\n\tint a = scanner.nextInt();\n\tint b = scanner.nextInt();\n\n\tint[] A = new int[b];\n\n\tint sum = 0;\n\n\tfor(int i = 0; i < b ; i++){\n\t\tA[i] = scanner.nextInt();\n\t}\n\tfor(int c : A)\n\t\tsum += c;\n\n\tif(a - sum < 0)\n\t\tSystem.out.println(-1);\n\telse\n\t\tSystem.out.println(a - sum);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n public static void main(String[] args) {\n\tScanner scanner = new Scanner(System.in);\n\n\tint a = scanner.nextInt();\n\tint b = scanner.nextInt();\n\n\tint[] A = new int[b];\n\n\tint sum = 0;\n\n\tfor(int i = 0; i < b ; i++){\n\t\tA[i] = scanner.nextInt();\n\t}\n\tfor(int c : A)\n\t\tsum += c;\n\n\tif(a - sum < 0)\n\t\tSystem.out.println(-1);\n\telse\n\t\tSystem.out.println(a - sum);\n }\n}", "Main", "public static void main(String[] args) {\n\tScanner scanner = new Scanner(System.in);\n\n\tint a = scanner.nextInt();\n\tint b = scanner.nextInt();\n\n\tint[] A = new int[b];\n\n\tint sum = 0;\n\n\tfor(int i = 0; i < b ; i++){\n\t\tA[i] = scanner.nextInt();\n\t}\n\tfor(int c : A)\n\t\tsum += c;\n\n\tif(a - sum < 0)\n\t\tSystem.out.println(-1);\n\telse\n\t\tSystem.out.println(a - sum);\n }", "main", "{\n\tScanner scanner = new Scanner(System.in);\n\n\tint a = scanner.nextInt();\n\tint b = scanner.nextInt();\n\n\tint[] A = new int[b];\n\n\tint sum = 0;\n\n\tfor(int i = 0; i < b ; i++){\n\t\tA[i] = scanner.nextInt();\n\t}\n\tfor(int c : A)\n\t\tsum += c;\n\n\tif(a - sum < 0)\n\t\tSystem.out.println(-1);\n\telse\n\t\tSystem.out.println(a - sum);\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int a = scanner.nextInt();", "a", "scanner.nextInt()", "scanner.nextInt", "scanner", "int b = scanner.nextInt();", "b", "scanner.nextInt()", "scanner.nextInt", "scanner", "int[] A = new int[b];", "A", "new int[b]", "b", "int sum = 0;", "sum", "0", "for(int i = 0; i < b ; i++){\n\t\tA[i] = scanner.nextInt();\n\t}", "int i = 0;", "int i = 0;", "i", "0", "i < b", "i", "b", "i++", "i++", "i", "{\n\t\tA[i] = scanner.nextInt();\n\t}", "{\n\t\tA[i] = scanner.nextInt();\n\t}", "A[i] = scanner.nextInt()", "A[i]", "A", "i", "scanner.nextInt()", "scanner.nextInt", "scanner", "for(int c : A)\n\t\tsum += c;", "int c", "A", "sum += c;", "sum += c", "sum", "c", "if(a - sum < 0)\n\t\tSystem.out.println(-1);\n\telse\n\t\tSystem.out.println(a - sum);", "a - sum < 0", "a - sum", "a", "sum", "0", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "System.out.println(a - sum)", "System.out.println", "System.out", "System", "System.out", "a - sum", "a", "sum", "String[] args", "args", "public class Main {\n\n public static void main(String[] args) {\n\tScanner scanner = new Scanner(System.in);\n\n\tint a = scanner.nextInt();\n\tint b = scanner.nextInt();\n\n\tint[] A = new int[b];\n\n\tint sum = 0;\n\n\tfor(int i = 0; i < b ; i++){\n\t\tA[i] = scanner.nextInt();\n\t}\n\tfor(int c : A)\n\t\tsum += c;\n\n\tif(a - sum < 0)\n\t\tSystem.out.println(-1);\n\telse\n\t\tSystem.out.println(a - sum);\n }\n}", "public class Main {\n\n public static void main(String[] args) {\n\tScanner scanner = new Scanner(System.in);\n\n\tint a = scanner.nextInt();\n\tint b = scanner.nextInt();\n\n\tint[] A = new int[b];\n\n\tint sum = 0;\n\n\tfor(int i = 0; i < b ; i++){\n\t\tA[i] = scanner.nextInt();\n\t}\n\tfor(int c : A)\n\t\tsum += c;\n\n\tif(a - sum < 0)\n\t\tSystem.out.println(-1);\n\telse\n\t\tSystem.out.println(a - sum);\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int b = scanner.nextInt(); int[] A = new int[b]; int sum = 0; for(int i = 0; i < b ; i++){ A[i] = scanner.nextInt(); } for(int c : A) sum += c; if(a - sum < 0) System.out.println(-1); else System.out.println(a - sum); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 20, 4, 18, 13, 13, 13, 4, 18, 13, 4, 18, 13, 23, 13, 6, 13, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 13, 4, 18, 13, 4, 18, 13, 8, 2, 13, 13, 17, 2, 13, 13, 23, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 0, 13, 17, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 37, 20, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 41, 13, 17, 38, 5, 13, 30, 37, 20, 30, 0, 13, 4, 18, 13, 29, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 177, 11 ], [ 177, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 14, 21 ], [ 21, 22 ], [ 21, 23 ], [ 14, 24 ], [ 24, 25 ], [ 25, 26 ], [ 24, 27 ], [ 24, 28 ], [ 14, 29 ], [ 29, 30 ], [ 30, 31 ], [ 14, 32 ], [ 32, 33 ], [ 33, 34 ], [ 12, 35 ], [ 35, 36 ], [ 177, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 41, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 41, 52 ], [ 52, 53 ], [ 52, 54 ], [ 41, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 55, 60 ], [ 60, 61 ], [ 60, 62 ], [ 55, 63 ], [ 63, 64 ], [ 64, 65 ], [ 55, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 70, 71 ], [ 41, 72 ], [ 72, 73 ], [ 73, 74 ], [ 72, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 75, 79 ], [ 75, 80 ], [ 80, 81 ], [ 80, 82 ], [ 39, 83 ], [ 83, 84 ], [ 39, 85 ], [ 85, 86 ], [ 177, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 87, 91 ], [ 91, 92 ], [ 87, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 95, 99 ], [ 99, 100 ], [ 99, 101 ], [ 87, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 106, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 105, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 118, 119 ], [ 119, 120 ], [ 115, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 104, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 87, 129 ], [ 129, 130 ], [ 129, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 131, 135 ], [ 135, 136 ], [ 136, 137 ], [ 136, 138 ], [ 138, 139 ], [ 139, 140 ], [ 135, 141 ], [ 141, 142 ], [ 142, 143 ], [ 142, 144 ], [ 144, 145 ], [ 145, 146 ], [ 131, 147 ], [ 147, 148 ], [ 87, 149 ], [ 149, 150 ], [ 149, 151 ], [ 151, 152 ], [ 152, 153 ], [ 153, 154 ], [ 154, 155 ], [ 153, 156 ], [ 156, 157 ], [ 87, 158 ], [ 158, 159 ], [ 158, 160 ], [ 160, 161 ], [ 161, 162 ], [ 162, 163 ], [ 163, 164 ], [ 162, 165 ], [ 165, 166 ], [ 87, 167 ], [ 167, 168 ], [ 167, 169 ], [ 169, 170 ], [ 170, 171 ], [ 171, 172 ], [ 172, 173 ], [ 171, 174 ], [ 174, 175 ], [ 0, 176 ], [ 176, 177 ], [ 176, 178 ] ]
[ "import java.io.*;\nimport java.util.*;\nimport java.math.*;\n \npublic class Main{\n\tpublic static void main(String[] args) throws Exception {\n\tIO io = new IO();\n\tPrintWriter out = new PrintWriter(System.out);\n\tSolver sr = new Solver();\n\tsr.solve(io,out);\n\tout.flush();\n\tout.close();\n \t}\n\n\tstatic class Solver\n\t{\n\t void solve(IO io, PrintWriter out)\n\t {\n \tint n = io.nextInt();\n \tint m = io.nextInt();\n \tint sum=0;\n \tfor(int i=0 ; i<m ; i++)\n \tsum+=io.nextInt();\n out.println( sum>n ? \"-1\" : (n-sum));\n\t }\n \t\n\t}\n\t//Special thanks to Petr (on codeforces) who inspired me to implement IO class!\n\tstatic class IO\n\t{\n \tBufferedReader reader;\n StringTokenizer tokenizer;\n \tpublic IO() {\n reader = new BufferedReader(new InputStreamReader(System.in));\n tokenizer = null;\n }\n \n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n public String nextLine() {\n String s=\"\";\n try {\n s=reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n return s;\n }\n public int nextInt() {\n return Integer.parseInt(next());\n }\n \n public long nextLong() {\n return Long.parseLong(next());\n }\n \tdouble nextDouble()\n \t{\n \t\treturn Double.parseDouble(next());\n \t}\n\t}\n}", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "import java.math.*;", "math.*", "java", "public class Main{\n\tpublic static void main(String[] args) throws Exception {\n\tIO io = new IO();\n\tPrintWriter out = new PrintWriter(System.out);\n\tSolver sr = new Solver();\n\tsr.solve(io,out);\n\tout.flush();\n\tout.close();\n \t}\n\n\tstatic class Solver\n\t{\n\t void solve(IO io, PrintWriter out)\n\t {\n \tint n = io.nextInt();\n \tint m = io.nextInt();\n \tint sum=0;\n \tfor(int i=0 ; i<m ; i++)\n \tsum+=io.nextInt();\n out.println( sum>n ? \"-1\" : (n-sum));\n\t }\n \t\n\t}\n\t//Special thanks to Petr (on codeforces) who inspired me to implement IO class!\n\tstatic class IO\n\t{\n \tBufferedReader reader;\n StringTokenizer tokenizer;\n \tpublic IO() {\n reader = new BufferedReader(new InputStreamReader(System.in));\n tokenizer = null;\n }\n \n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n public String nextLine() {\n String s=\"\";\n try {\n s=reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n return s;\n }\n public int nextInt() {\n return Integer.parseInt(next());\n }\n \n public long nextLong() {\n return Long.parseLong(next());\n }\n \tdouble nextDouble()\n \t{\n \t\treturn Double.parseDouble(next());\n \t}\n\t}\n}", "Main", "public static void main(String[] args) throws Exception {\n\tIO io = new IO();\n\tPrintWriter out = new PrintWriter(System.out);\n\tSolver sr = new Solver();\n\tsr.solve(io,out);\n\tout.flush();\n\tout.close();\n \t}", "main", "{\n\tIO io = new IO();\n\tPrintWriter out = new PrintWriter(System.out);\n\tSolver sr = new Solver();\n\tsr.solve(io,out);\n\tout.flush();\n\tout.close();\n \t}", "IO io = new IO();", "io", "new IO()", "PrintWriter out = new PrintWriter(System.out);", "out", "new PrintWriter(System.out)", "Solver sr = new Solver();", "sr", "new Solver()", "sr.solve(io,out)", "sr.solve", "sr", "io", "out", "out.flush()", "out.flush", "out", "out.close()", "out.close", "out", "String[] args", "args", "static class Solver\n\t{\n\t void solve(IO io, PrintWriter out)\n\t {\n \tint n = io.nextInt();\n \tint m = io.nextInt();\n \tint sum=0;\n \tfor(int i=0 ; i<m ; i++)\n \tsum+=io.nextInt();\n out.println( sum>n ? \"-1\" : (n-sum));\n\t }\n \t\n\t}", "Solver", "void solve(IO io, PrintWriter out)\n\t {\n \tint n = io.nextInt();\n \tint m = io.nextInt();\n \tint sum=0;\n \tfor(int i=0 ; i<m ; i++)\n \tsum+=io.nextInt();\n out.println( sum>n ? \"-1\" : (n-sum));\n\t }", "solve", "{\n \tint n = io.nextInt();\n \tint m = io.nextInt();\n \tint sum=0;\n \tfor(int i=0 ; i<m ; i++)\n \tsum+=io.nextInt();\n out.println( sum>n ? \"-1\" : (n-sum));\n\t }", "int n = io.nextInt();", "n", "io.nextInt()", "io.nextInt", "io", "int m = io.nextInt();", "m", "io.nextInt()", "io.nextInt", "io", "int sum=0;", "sum", "0", "for(int i=0 ; i<m ; i++)\n \tsum+=io.nextInt();", "int i=0 ;", "int i=0 ;", "i", "0", "i<m", "i", "m", "i++", "i++", "i", "sum+=io.nextInt();", "sum+=io.nextInt()", "sum", "io.nextInt()", "io.nextInt", "io", "out.println( sum>n ? \"-1\" : (n-sum))", "out.println", "out", "sum>n ? \"-1\" : (n-sum)", "sum>n", "sum", "n", "\"-1\"", "(n-sum)", "n", "sum", "IO io", "io", "PrintWriter out", "out", "static class IO\n\t{\n \tBufferedReader reader;\n StringTokenizer tokenizer;\n \tpublic IO() {\n reader = new BufferedReader(new InputStreamReader(System.in));\n tokenizer = null;\n }\n \n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n public String nextLine() {\n String s=\"\";\n try {\n s=reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n return s;\n }\n public int nextInt() {\n return Integer.parseInt(next());\n }\n \n public long nextLong() {\n return Long.parseLong(next());\n }\n \tdouble nextDouble()\n \t{\n \t\treturn Double.parseDouble(next());\n \t}\n\t}", "IO", "BufferedReader reader;", "reader", "StringTokenizer tokenizer;", "tokenizer", "public IO() {\n reader = new BufferedReader(new InputStreamReader(System.in));\n tokenizer = null;\n }", "IO", "{\n reader = new BufferedReader(new InputStreamReader(System.in));\n tokenizer = null;\n }", "reader = new BufferedReader(new InputStreamReader(System.in))", "reader", "new BufferedReader(new InputStreamReader(System.in))", "tokenizer = null", "tokenizer", "null", "public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }", "next", "{\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }", "while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "tokenizer == null || !tokenizer.hasMoreTokens()", "tokenizer == null", "tokenizer", "null", "!tokenizer.hasMoreTokens()", "tokenizer.hasMoreTokens()", "tokenizer.hasMoreTokens", "tokenizer", "{\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }", "catch (IOException e) {\n throw new RuntimeException(e);\n }", "IOException e", "{\n throw new RuntimeException(e);\n }", "throw new RuntimeException(e);", "new RuntimeException(e)", "{\n tokenizer = new StringTokenizer(reader.readLine());\n }", "tokenizer = new StringTokenizer(reader.readLine())", "tokenizer", "new StringTokenizer(reader.readLine())", "return tokenizer.nextToken();", "tokenizer.nextToken()", "tokenizer.nextToken", "tokenizer", "public String nextLine() {\n String s=\"\";\n try {\n s=reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n return s;\n }", "nextLine", "{\n String s=\"\";\n try {\n s=reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n return s;\n }", "String s=\"\";", "s", "\"\"", "try {\n s=reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }", "catch (IOException e) {\n throw new RuntimeException(e);\n }", "IOException e", "{\n throw new RuntimeException(e);\n }", "throw new RuntimeException(e);", "new RuntimeException(e)", "{\n s=reader.readLine();\n }", "s=reader.readLine()", "s", "reader.readLine()", "reader.readLine", "reader", "return s;", "s", "public int nextInt() {\n return Integer.parseInt(next());\n }", "nextInt", "{\n return Integer.parseInt(next());\n }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "public long nextLong() {\n return Long.parseLong(next());\n }", "nextLong", "{\n return Long.parseLong(next());\n }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "double nextDouble()\n \t{\n \t\treturn Double.parseDouble(next());\n \t}", "nextDouble", "{\n \t\treturn Double.parseDouble(next());\n \t}", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "public class Main{\n\tpublic static void main(String[] args) throws Exception {\n\tIO io = new IO();\n\tPrintWriter out = new PrintWriter(System.out);\n\tSolver sr = new Solver();\n\tsr.solve(io,out);\n\tout.flush();\n\tout.close();\n \t}\n\n\tstatic class Solver\n\t{\n\t void solve(IO io, PrintWriter out)\n\t {\n \tint n = io.nextInt();\n \tint m = io.nextInt();\n \tint sum=0;\n \tfor(int i=0 ; i<m ; i++)\n \tsum+=io.nextInt();\n out.println( sum>n ? \"-1\" : (n-sum));\n\t }\n \t\n\t}\n\t//Special thanks to Petr (on codeforces) who inspired me to implement IO class!\n\tstatic class IO\n\t{\n \tBufferedReader reader;\n StringTokenizer tokenizer;\n \tpublic IO() {\n reader = new BufferedReader(new InputStreamReader(System.in));\n tokenizer = null;\n }\n \n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n public String nextLine() {\n String s=\"\";\n try {\n s=reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n return s;\n }\n public int nextInt() {\n return Integer.parseInt(next());\n }\n \n public long nextLong() {\n return Long.parseLong(next());\n }\n \tdouble nextDouble()\n \t{\n \t\treturn Double.parseDouble(next());\n \t}\n\t}\n}", "public class Main{\n\tpublic static void main(String[] args) throws Exception {\n\tIO io = new IO();\n\tPrintWriter out = new PrintWriter(System.out);\n\tSolver sr = new Solver();\n\tsr.solve(io,out);\n\tout.flush();\n\tout.close();\n \t}\n\n\tstatic class Solver\n\t{\n\t void solve(IO io, PrintWriter out)\n\t {\n \tint n = io.nextInt();\n \tint m = io.nextInt();\n \tint sum=0;\n \tfor(int i=0 ; i<m ; i++)\n \tsum+=io.nextInt();\n out.println( sum>n ? \"-1\" : (n-sum));\n\t }\n \t\n\t}\n\t//Special thanks to Petr (on codeforces) who inspired me to implement IO class!\n\tstatic class IO\n\t{\n \tBufferedReader reader;\n StringTokenizer tokenizer;\n \tpublic IO() {\n reader = new BufferedReader(new InputStreamReader(System.in));\n tokenizer = null;\n }\n \n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n public String nextLine() {\n String s=\"\";\n try {\n s=reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n return s;\n }\n public int nextInt() {\n return Integer.parseInt(next());\n }\n \n public long nextLong() {\n return Long.parseLong(next());\n }\n \tdouble nextDouble()\n \t{\n \t\treturn Double.parseDouble(next());\n \t}\n\t}\n}", "Main" ]
import java.io.*; import java.util.*; import java.math.*; public class Main{ public static void main(String[] args) throws Exception { IO io = new IO(); PrintWriter out = new PrintWriter(System.out); Solver sr = new Solver(); sr.solve(io,out); out.flush(); out.close(); } static class Solver { void solve(IO io, PrintWriter out) { int n = io.nextInt(); int m = io.nextInt(); int sum=0; for(int i=0 ; i<m ; i++) sum+=io.nextInt(); out.println( sum>n ? "-1" : (n-sum)); } } //Special thanks to Petr (on codeforces) who inspired me to implement IO class! static class IO { BufferedReader reader; StringTokenizer tokenizer; public IO() { reader = new BufferedReader(new InputStreamReader(System.in)); tokenizer = null; } public String next() { while (tokenizer == null || !tokenizer.hasMoreTokens()) { try { tokenizer = new StringTokenizer(reader.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return tokenizer.nextToken(); } public String nextLine() { String s=""; try { s=reader.readLine(); } catch (IOException e) { throw new RuntimeException(e); } return s; } public int nextInt() { return Integer.parseInt(next()); } public long nextLong() { return Long.parseLong(next()); } double nextDouble() { return Double.parseDouble(next()); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 41, 13, 2, 13, 13, 14, 2, 13, 17, 30, 0, 13, 40, 17, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 66, 5 ], [ 66, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 8, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 45, 47 ], [ 8, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 48, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 8, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 6, 63 ], [ 63, 64 ], [ 0, 65 ], [ 65, 66 ], [ 65, 67 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n int N = scan.nextInt();\n int M = scan.nextInt();\n\n int sum = 0;\n \n for (int i= 0; i < M; i++) {\n \tsum += scan.nextInt();\n }\n \n int holiday = N - sum;\n \n if (holiday < 0) {\n \tholiday = -1;\n }\n \n System.out.println(holiday);\n }\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n int N = scan.nextInt();\n int M = scan.nextInt();\n\n int sum = 0;\n \n for (int i= 0; i < M; i++) {\n \tsum += scan.nextInt();\n }\n \n int holiday = N - sum;\n \n if (holiday < 0) {\n \tholiday = -1;\n }\n \n System.out.println(holiday);\n }\n\n}", "Main", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n int N = scan.nextInt();\n int M = scan.nextInt();\n\n int sum = 0;\n \n for (int i= 0; i < M; i++) {\n \tsum += scan.nextInt();\n }\n \n int holiday = N - sum;\n \n if (holiday < 0) {\n \tholiday = -1;\n }\n \n System.out.println(holiday);\n }", "main", "{\n Scanner scan = new Scanner(System.in);\n\n int N = scan.nextInt();\n int M = scan.nextInt();\n\n int sum = 0;\n \n for (int i= 0; i < M; i++) {\n \tsum += scan.nextInt();\n }\n \n int holiday = N - sum;\n \n if (holiday < 0) {\n \tholiday = -1;\n }\n \n System.out.println(holiday);\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int N = scan.nextInt();", "N", "scan.nextInt()", "scan.nextInt", "scan", "int M = scan.nextInt();", "M", "scan.nextInt()", "scan.nextInt", "scan", "int sum = 0;", "sum", "0", "for (int i= 0; i < M; i++) {\n \tsum += scan.nextInt();\n }", "int i= 0;", "int i= 0;", "i", "0", "i < M", "i", "M", "i++", "i++", "i", "{\n \tsum += scan.nextInt();\n }", "{\n \tsum += scan.nextInt();\n }", "sum += scan.nextInt()", "sum", "scan.nextInt()", "scan.nextInt", "scan", "int holiday = N - sum;", "holiday", "N - sum", "N", "sum", "if (holiday < 0) {\n \tholiday = -1;\n }", "holiday < 0", "holiday", "0", "{\n \tholiday = -1;\n }", "holiday = -1", "holiday", "-1", "1", "System.out.println(holiday)", "System.out.println", "System.out", "System", "System.out", "holiday", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n int N = scan.nextInt();\n int M = scan.nextInt();\n\n int sum = 0;\n \n for (int i= 0; i < M; i++) {\n \tsum += scan.nextInt();\n }\n \n int holiday = N - sum;\n \n if (holiday < 0) {\n \tholiday = -1;\n }\n \n System.out.println(holiday);\n }\n\n}", "public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n int N = scan.nextInt();\n int M = scan.nextInt();\n\n int sum = 0;\n \n for (int i= 0; i < M; i++) {\n \tsum += scan.nextInt();\n }\n \n int holiday = N - sum;\n \n if (holiday < 0) {\n \tholiday = -1;\n }\n \n System.out.println(holiday);\n }\n\n}", "Main" ]
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 sum = 0; for (int i= 0; i < M; i++) { sum += scan.nextInt(); } int holiday = N - sum; if (holiday < 0) { holiday = -1; } System.out.println(holiday); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 0, 13, 2, 13, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 40, 17, 30, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 73, 5 ], [ 73, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 25, 27 ], [ 8, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 28, 33 ], [ 33, 34 ], [ 33, 35 ], [ 28, 36 ], [ 36, 37 ], [ 37, 38 ], [ 28, 39 ], [ 40, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 44, 45 ], [ 8, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 48, 50 ], [ 8, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 51, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 56, 61 ], [ 61, 62 ], [ 51, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 64, 69 ], [ 6, 70 ], [ 70, 71 ], [ 0, 72 ], [ 72, 73 ], [ 72, 74 ] ]
[ "import java.util.*;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 整数の入力(スペース改行関係なし)\n\t\tint n = sc.nextInt();\n\t\tint m = sc.nextInt();\n int syukudai = 0;\n \tint asobi = 0;\n \n for(int i = 0; i < m ; i++){\n \tsyukudai += sc.nextInt();\n \n }\n asobi = n - syukudai;\n\t\tif(asobi < 0){\n\t\t\t// 出力\n\t\t\tSystem.out.println(-1);\n\t\t}else{\n\t\t\tSystem.out.println(asobi);\n\t\t}\n\t\t\n\t}\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 整数の入力(スペース改行関係なし)\n\t\tint n = sc.nextInt();\n\t\tint m = sc.nextInt();\n int syukudai = 0;\n \tint asobi = 0;\n \n for(int i = 0; i < m ; i++){\n \tsyukudai += sc.nextInt();\n \n }\n asobi = n - syukudai;\n\t\tif(asobi < 0){\n\t\t\t// 出力\n\t\t\tSystem.out.println(-1);\n\t\t}else{\n\t\t\tSystem.out.println(asobi);\n\t\t}\n\t\t\n\t}\n}", "Main", "public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 整数の入力(スペース改行関係なし)\n\t\tint n = sc.nextInt();\n\t\tint m = sc.nextInt();\n int syukudai = 0;\n \tint asobi = 0;\n \n for(int i = 0; i < m ; i++){\n \tsyukudai += sc.nextInt();\n \n }\n asobi = n - syukudai;\n\t\tif(asobi < 0){\n\t\t\t// 出力\n\t\t\tSystem.out.println(-1);\n\t\t}else{\n\t\t\tSystem.out.println(asobi);\n\t\t}\n\t\t\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 整数の入力(スペース改行関係なし)\n\t\tint n = sc.nextInt();\n\t\tint m = sc.nextInt();\n int syukudai = 0;\n \tint asobi = 0;\n \n for(int i = 0; i < m ; i++){\n \tsyukudai += sc.nextInt();\n \n }\n asobi = n - syukudai;\n\t\tif(asobi < 0){\n\t\t\t// 出力\n\t\t\tSystem.out.println(-1);\n\t\t}else{\n\t\t\tSystem.out.println(asobi);\n\t\t}\n\t\t\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int m = sc.nextInt();", "m", "sc.nextInt()", "sc.nextInt", "sc", "int syukudai = 0;", "syukudai", "0", "int asobi = 0;", "asobi", "0", "for(int i = 0; i < m ; i++){\n \tsyukudai += sc.nextInt();\n \n }", "int i = 0;", "int i = 0;", "i", "0", "i < m", "i", "m", "i++", "i++", "i", "{\n \tsyukudai += sc.nextInt();\n \n }", "{\n \tsyukudai += sc.nextInt();\n \n }", "syukudai += sc.nextInt()", "syukudai", "sc.nextInt()", "sc.nextInt", "sc", "asobi = n - syukudai", "asobi", "n - syukudai", "n", "syukudai", "if(asobi < 0){\n\t\t\t// 出力\n\t\t\tSystem.out.println(-1);\n\t\t}else{\n\t\t\tSystem.out.println(asobi);\n\t\t}", "asobi < 0", "asobi", "0", "{\n\t\t\t// 出力\n\t\t\tSystem.out.println(-1);\n\t\t}", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "{\n\t\t\tSystem.out.println(asobi);\n\t\t}", "System.out.println(asobi)", "System.out.println", "System.out", "System", "System.out", "asobi", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 整数の入力(スペース改行関係なし)\n\t\tint n = sc.nextInt();\n\t\tint m = sc.nextInt();\n int syukudai = 0;\n \tint asobi = 0;\n \n for(int i = 0; i < m ; i++){\n \tsyukudai += sc.nextInt();\n \n }\n asobi = n - syukudai;\n\t\tif(asobi < 0){\n\t\t\t// 出力\n\t\t\tSystem.out.println(-1);\n\t\t}else{\n\t\t\tSystem.out.println(asobi);\n\t\t}\n\t\t\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 整数の入力(スペース改行関係なし)\n\t\tint n = sc.nextInt();\n\t\tint m = sc.nextInt();\n int syukudai = 0;\n \tint asobi = 0;\n \n for(int i = 0; i < m ; i++){\n \tsyukudai += sc.nextInt();\n \n }\n asobi = n - syukudai;\n\t\tif(asobi < 0){\n\t\t\t// 出力\n\t\t\tSystem.out.println(-1);\n\t\t}else{\n\t\t\tSystem.out.println(asobi);\n\t\t}\n\t\t\n\t}\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); // 整数の入力(スペース改行関係なし) int n = sc.nextInt(); int m = sc.nextInt(); int syukudai = 0; int asobi = 0; for(int i = 0; i < m ; i++){ syukudai += sc.nextInt(); } asobi = n - syukudai; if(asobi < 0){ // 出力 System.out.println(-1); }else{ System.out.println(asobi); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 41, 13, 20, 41, 13, 41, 13, 17, 41, 13, 39, 17, 40, 17, 17, 17, 41, 13, 39, 17, 17, 40, 17, 17, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 4, 18, 13, 8, 2, 2, 13, 13, 17, 2, 13, 13, 40, 17, 4, 18, 13, 23, 13, 12, 13, 30, 29, 2, 2, 13, 17, 17, 23, 13, 12, 13, 30, 41, 13, 13, 0, 13, 13, 0, 13, 13, 23, 13, 23, 13, 12, 13, 30, 4, 18, 13, 13, 4, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 2, 18, 13, 13, 18, 13, 13, 29, 17, 29, 17, 23, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 41, 13, 17, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 4, 18, 13, 29, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 254, 11 ], [ 254, 12 ], [ 12, 13 ], [ 12, 14 ], [ 254, 15 ], [ 15, 16 ], [ 15, 17 ], [ 254, 18 ], [ 18, 19 ], [ 254, 20 ], [ 20, 21 ], [ 20, 22 ], [ 254, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 25, 29 ], [ 25, 30 ], [ 254, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 33, 35 ], [ 33, 36 ], [ 36, 37 ], [ 33, 38 ], [ 254, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 41, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 41, 52 ], [ 52, 53 ], [ 52, 54 ], [ 41, 56 ], [ 56, 57 ], [ 56, 58 ], [ 41, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 59, 64 ], [ 64, 65 ], [ 64, 66 ], [ 59, 67 ], [ 67, 68 ], [ 68, 69 ], [ 59, 70 ], [ 71, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 75, 76 ], [ 41, 77 ], [ 77, 78 ], [ 78, 79 ], [ 77, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 81, 85 ], [ 80, 86 ], [ 86, 87 ], [ 86, 88 ], [ 80, 89 ], [ 89, 90 ], [ 41, 91 ], [ 91, 92 ], [ 92, 93 ], [ 39, 94 ], [ 94, 95 ], [ 254, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 100, 104 ], [ 96, 105 ], [ 105, 106 ], [ 254, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 109, 113 ], [ 113, 114 ], [ 113, 115 ], [ 109, 116 ], [ 116, 117 ], [ 116, 118 ], [ 107, 119 ], [ 119, 120 ], [ 107, 121 ], [ 121, 122 ], [ 254, 123 ], [ 123, 124 ], [ 123, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 126, 129 ], [ 125, 130 ], [ 130, 131 ], [ 131, 132 ], [ 130, 133 ], [ 125, 134 ], [ 134, 135 ], [ 135, 136 ], [ 136, 137 ], [ 136, 138 ], [ 134, 139 ], [ 139, 140 ], [ 139, 141 ], [ 141, 142 ], [ 141, 143 ], [ 134, 144 ], [ 144, 145 ], [ 145, 146 ], [ 134, 147 ], [ 148, 148 ], [ 148, 149 ], [ 149, 150 ], [ 150, 151 ], [ 151, 152 ], [ 151, 153 ], [ 150, 154 ], [ 154, 155 ], [ 154, 156 ], [ 149, 157 ], [ 157, 158 ], [ 125, 159 ], [ 159, 160 ], [ 123, 161 ], [ 161, 162 ], [ 123, 163 ], [ 163, 164 ], [ 254, 165 ], [ 165, 166 ], [ 165, 167 ], [ 167, 168 ], [ 165, 169 ], [ 169, 170 ], [ 165, 171 ], [ 171, 172 ], [ 171, 173 ], [ 173, 174 ], [ 174, 175 ], [ 174, 176 ], [ 165, 177 ], [ 177, 178 ], [ 177, 179 ], [ 179, 180 ], [ 180, 181 ], [ 181, 182 ], [ 182, 183 ], [ 182, 184 ], [ 181, 185 ], [ 185, 186 ], [ 186, 187 ], [ 187, 188 ], [ 180, 189 ], [ 189, 190 ], [ 190, 191 ], [ 191, 192 ], [ 191, 193 ], [ 193, 194 ], [ 194, 195 ], [ 195, 196 ], [ 190, 197 ], [ 197, 198 ], [ 198, 199 ], [ 198, 200 ], [ 179, 201 ], [ 201, 202 ], [ 202, 203 ], [ 203, 204 ], [ 165, 205 ], [ 205, 206 ], [ 205, 207 ], [ 207, 208 ], [ 208, 209 ], [ 209, 210 ], [ 210, 211 ], [ 209, 212 ], [ 212, 213 ], [ 165, 214 ], [ 214, 215 ], [ 214, 216 ], [ 216, 217 ], [ 217, 218 ], [ 218, 219 ], [ 219, 220 ], [ 218, 221 ], [ 221, 222 ], [ 165, 223 ], [ 223, 224 ], [ 223, 225 ], [ 225, 226 ], [ 226, 227 ], [ 227, 228 ], [ 228, 229 ], [ 227, 230 ], [ 230, 231 ], [ 165, 232 ], [ 232, 233 ], [ 232, 234 ], [ 234, 235 ], [ 235, 236 ], [ 235, 237 ], [ 234, 238 ], [ 238, 239 ], [ 239, 240 ], [ 239, 241 ], [ 241, 242 ], [ 242, 243 ], [ 243, 244 ], [ 238, 245 ], [ 245, 246 ], [ 246, 247 ], [ 246, 248 ], [ 248, 249 ], [ 249, 250 ], [ 234, 251 ], [ 251, 252 ], [ 0, 253 ], [ 253, 254 ], [ 253, 255 ] ]
[ "import java.io.*;\nimport java.math.*;\nimport java.util.*;\n\n\n\n\n\npublic class Main {\n\n static MyScanner in = new MyScanner();\n static PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));\n int N;\n static int max = 200001;\n static int [] dr = {1,-1,0,0};\n static int [] dc={0,0,-1,1};\n public static void main(String args[]) throws IOException {\n int N = in.nextInt();\n int M = in.nextInt();\n int [] arr= new int[N];\n int max = 0;\n for(int i=0;i<M;i++){\n max+=in.nextInt();\n }\n out.println(N-max>=0?N-max:-1);\n out.flush();\n }\n static boolean isEven(long a){\n return (a&1)==0;\n }\n static void swap (int a, int b){\n\n int temmp = b;\n b=a;\n a = temmp;\n }\n static boolean same(int [] arr,int [] temp){\n Arrays.sort(arr);\n Arrays.sort(temp);\n for(int i=0;i<arr.length;i++){\n if(temp[i]!=arr[i])\n return false;\n }\n return true;\n }\n\n \n \n\n\n public static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n \n public MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n \n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n \n int nextInt() {\n return Integer.parseInt(next());\n }\n \n long nextLong() {\n return Long.parseLong(next());\n }\n \n double nextDouble() {\n return Double.parseDouble(next());\n }\n \n String nextLine(){\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n \n }\n}", "import java.io.*;", "io.*", "java", "import java.math.*;", "math.*", "java", "import java.util.*;", "util.*", "java", "public class Main {\n\n static MyScanner in = new MyScanner();\n static PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));\n int N;\n static int max = 200001;\n static int [] dr = {1,-1,0,0};\n static int [] dc={0,0,-1,1};\n public static void main(String args[]) throws IOException {\n int N = in.nextInt();\n int M = in.nextInt();\n int [] arr= new int[N];\n int max = 0;\n for(int i=0;i<M;i++){\n max+=in.nextInt();\n }\n out.println(N-max>=0?N-max:-1);\n out.flush();\n }\n static boolean isEven(long a){\n return (a&1)==0;\n }\n static void swap (int a, int b){\n\n int temmp = b;\n b=a;\n a = temmp;\n }\n static boolean same(int [] arr,int [] temp){\n Arrays.sort(arr);\n Arrays.sort(temp);\n for(int i=0;i<arr.length;i++){\n if(temp[i]!=arr[i])\n return false;\n }\n return true;\n }\n\n \n \n\n\n public static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n \n public MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n \n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n \n int nextInt() {\n return Integer.parseInt(next());\n }\n \n long nextLong() {\n return Long.parseLong(next());\n }\n \n double nextDouble() {\n return Double.parseDouble(next());\n }\n \n String nextLine(){\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n \n }\n}", "Main", "static MyScanner in = new MyScanner();", "in", "new MyScanner()", "static PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));", "out", "new PrintWriter(new OutputStreamWriter(System.out))", "int N;", "N", "static int max = 200001;", "max", "200001", "static int [] dr = {1,-1,0,0};", "dr", "{1,-1,0,0}", "1", "-1", "1", "0", "0", "static int [] dc={0,0,-1,1};", "dc", "{0,0,-1,1}", "0", "0", "-1", "1", "1", "public static void main(String args[]) throws IOException {\n int N = in.nextInt();\n int M = in.nextInt();\n int [] arr= new int[N];\n int max = 0;\n for(int i=0;i<M;i++){\n max+=in.nextInt();\n }\n out.println(N-max>=0?N-max:-1);\n out.flush();\n }", "main", "{\n int N = in.nextInt();\n int M = in.nextInt();\n int [] arr= new int[N];\n int max = 0;\n for(int i=0;i<M;i++){\n max+=in.nextInt();\n }\n out.println(N-max>=0?N-max:-1);\n out.flush();\n }", "int N = in.nextInt();", "N", "in.nextInt()", "in.nextInt", "in", "int M = in.nextInt();", "M", "in.nextInt()", "in.nextInt", "in", "int [] arr= new int[N];", "arr", "new int[N]", "N", "int max = 0;", "max", "0", "for(int i=0;i<M;i++){\n max+=in.nextInt();\n }", "int i=0;", "int i=0;", "i", "0", "i<M", "i", "M", "i++", "i++", "i", "{\n max+=in.nextInt();\n }", "{\n max+=in.nextInt();\n }", "max+=in.nextInt()", "max", "in.nextInt()", "in.nextInt", "in", "out.println(N-max>=0?N-max:-1)", "out.println", "out", "N-max>=0?N-max:-1", "N-max>=0", "N-max", "N", "max", "0", "N-max", "N", "max", "-1", "1", "out.flush()", "out.flush", "out", "String args[]", "args", "static boolean isEven(long a){\n return (a&1)==0;\n }", "isEven", "{\n return (a&1)==0;\n }", "return (a&1)==0;", "(a&1)==0", "(a&1)", "a", "1", "0", "long a", "a", "static void swap (int a, int b){\n\n int temmp = b;\n b=a;\n a = temmp;\n }", "swap", "{\n\n int temmp = b;\n b=a;\n a = temmp;\n }", "int temmp = b;", "temmp", "b", "b=a", "b", "a", "a = temmp", "a", "temmp", "int a", "a", "int b", "b", "static boolean same(int [] arr,int [] temp){\n Arrays.sort(arr);\n Arrays.sort(temp);\n for(int i=0;i<arr.length;i++){\n if(temp[i]!=arr[i])\n return false;\n }\n return true;\n }", "same", "{\n Arrays.sort(arr);\n Arrays.sort(temp);\n for(int i=0;i<arr.length;i++){\n if(temp[i]!=arr[i])\n return false;\n }\n return true;\n }", "Arrays.sort(arr)", "Arrays.sort", "Arrays", "arr", "Arrays.sort(temp)", "Arrays.sort", "Arrays", "temp", "for(int i=0;i<arr.length;i++){\n if(temp[i]!=arr[i])\n return false;\n }", "int i=0;", "int i=0;", "i", "0", "i<arr.length", "i", "arr.length", "arr", "arr.length", "i++", "i++", "i", "{\n if(temp[i]!=arr[i])\n return false;\n }", "{\n if(temp[i]!=arr[i])\n return false;\n }", "if(temp[i]!=arr[i])\n return false;", "temp[i]!=arr[i]", "temp[i]", "temp", "i", "arr[i]", "arr", "i", "return false;", "false", "return true;", "true", "int [] arr", "arr", "int [] temp", "temp", "public static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n \n public MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n \n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n \n int nextInt() {\n return Integer.parseInt(next());\n }\n \n long nextLong() {\n return Long.parseLong(next());\n }\n \n double nextDouble() {\n return Double.parseDouble(next());\n }\n \n String nextLine(){\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n \n }", "MyScanner", "BufferedReader br;", "br", "StringTokenizer st;", "st", "public MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }", "MyScanner", "{\n br = new BufferedReader(new InputStreamReader(System.in));\n }", "br = new BufferedReader(new InputStreamReader(System.in))", "br", "new BufferedReader(new InputStreamReader(System.in))", "String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "next", "{\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "st == null || !st.hasMoreElements()", "st == null", "st", "null", "!st.hasMoreElements()", "st.hasMoreElements()", "st.hasMoreElements", "st", "{\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }", "catch (IOException e) {\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n st = new StringTokenizer(br.readLine());\n }", "st = new StringTokenizer(br.readLine())", "st", "new StringTokenizer(br.readLine())", "return st.nextToken();", "st.nextToken()", "st.nextToken", "st", "int nextInt() {\n return Integer.parseInt(next());\n }", "nextInt", "{\n return Integer.parseInt(next());\n }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "long nextLong() {\n return Long.parseLong(next());\n }", "nextLong", "{\n return Long.parseLong(next());\n }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "double nextDouble() {\n return Double.parseDouble(next());\n }", "nextDouble", "{\n return Double.parseDouble(next());\n }", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "String nextLine(){\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }", "nextLine", "{\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }", "String str = \"\";", "str", "\"\"", "try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }", "catch (IOException e) {\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n str = br.readLine();\n }", "str = br.readLine()", "str", "br.readLine()", "br.readLine", "br", "return str;", "str", "public class Main {\n\n static MyScanner in = new MyScanner();\n static PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));\n int N;\n static int max = 200001;\n static int [] dr = {1,-1,0,0};\n static int [] dc={0,0,-1,1};\n public static void main(String args[]) throws IOException {\n int N = in.nextInt();\n int M = in.nextInt();\n int [] arr= new int[N];\n int max = 0;\n for(int i=0;i<M;i++){\n max+=in.nextInt();\n }\n out.println(N-max>=0?N-max:-1);\n out.flush();\n }\n static boolean isEven(long a){\n return (a&1)==0;\n }\n static void swap (int a, int b){\n\n int temmp = b;\n b=a;\n a = temmp;\n }\n static boolean same(int [] arr,int [] temp){\n Arrays.sort(arr);\n Arrays.sort(temp);\n for(int i=0;i<arr.length;i++){\n if(temp[i]!=arr[i])\n return false;\n }\n return true;\n }\n\n \n \n\n\n public static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n \n public MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n \n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n \n int nextInt() {\n return Integer.parseInt(next());\n }\n \n long nextLong() {\n return Long.parseLong(next());\n }\n \n double nextDouble() {\n return Double.parseDouble(next());\n }\n \n String nextLine(){\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n \n }\n}", "public class Main {\n\n static MyScanner in = new MyScanner();\n static PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));\n int N;\n static int max = 200001;\n static int [] dr = {1,-1,0,0};\n static int [] dc={0,0,-1,1};\n public static void main(String args[]) throws IOException {\n int N = in.nextInt();\n int M = in.nextInt();\n int [] arr= new int[N];\n int max = 0;\n for(int i=0;i<M;i++){\n max+=in.nextInt();\n }\n out.println(N-max>=0?N-max:-1);\n out.flush();\n }\n static boolean isEven(long a){\n return (a&1)==0;\n }\n static void swap (int a, int b){\n\n int temmp = b;\n b=a;\n a = temmp;\n }\n static boolean same(int [] arr,int [] temp){\n Arrays.sort(arr);\n Arrays.sort(temp);\n for(int i=0;i<arr.length;i++){\n if(temp[i]!=arr[i])\n return false;\n }\n return true;\n }\n\n \n \n\n\n public static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n \n public MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n \n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n \n int nextInt() {\n return Integer.parseInt(next());\n }\n \n long nextLong() {\n return Long.parseLong(next());\n }\n \n double nextDouble() {\n return Double.parseDouble(next());\n }\n \n String nextLine(){\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n \n }\n}", "Main" ]
import java.io.*; import java.math.*; import java.util.*; public class Main { static MyScanner in = new MyScanner(); static PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out)); int N; static int max = 200001; static int [] dr = {1,-1,0,0}; static int [] dc={0,0,-1,1}; public static void main(String args[]) throws IOException { int N = in.nextInt(); int M = in.nextInt(); int [] arr= new int[N]; int max = 0; for(int i=0;i<M;i++){ max+=in.nextInt(); } out.println(N-max>=0?N-max:-1); out.flush(); } static boolean isEven(long a){ return (a&1)==0; } static void swap (int a, int b){ int temmp = b; b=a; a = temmp; } static boolean same(int [] arr,int [] temp){ Arrays.sort(arr); Arrays.sort(temp); for(int i=0;i<arr.length;i++){ if(temp[i]!=arr[i]) return false; } return true; } public static class MyScanner { BufferedReader br; StringTokenizer st; public MyScanner() { 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; } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 2, 13, 4, 18, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 30, 4, 18, 18, 13, 13, 17, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 66, 5 ], [ 66, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 22, 27 ], [ 27, 28 ], [ 27, 29 ], [ 22, 30 ], [ 30, 31 ], [ 31, 32 ], [ 22, 33 ], [ 34, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 8, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 42, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 47, 52 ], [ 42, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 54, 59 ], [ 8, 60 ], [ 60, 61 ], [ 61, 62 ], [ 6, 63 ], [ 63, 64 ], [ 0, 65 ], [ 65, 66 ], [ 65, 67 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint M = scan.nextInt();\n\n\t\tfor (int i = 0; i < M; i++) {\n\t\t\tN = N - scan.nextInt();\n\t\t}\n\n\t\tif (N >= 0) {\n\t\t\tSystem.out.println(N);\n\t\t} else {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}\n\t\tscan.close();\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint M = scan.nextInt();\n\n\t\tfor (int i = 0; i < M; i++) {\n\t\t\tN = N - scan.nextInt();\n\t\t}\n\n\t\tif (N >= 0) {\n\t\t\tSystem.out.println(N);\n\t\t} else {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}\n\t\tscan.close();\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint M = scan.nextInt();\n\n\t\tfor (int i = 0; i < M; i++) {\n\t\t\tN = N - scan.nextInt();\n\t\t}\n\n\t\tif (N >= 0) {\n\t\t\tSystem.out.println(N);\n\t\t} else {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}\n\t\tscan.close();\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint M = scan.nextInt();\n\n\t\tfor (int i = 0; i < M; i++) {\n\t\t\tN = N - scan.nextInt();\n\t\t}\n\n\t\tif (N >= 0) {\n\t\t\tSystem.out.println(N);\n\t\t} else {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}\n\t\tscan.close();\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int N = scan.nextInt();", "N", "scan.nextInt()", "scan.nextInt", "scan", "int M = scan.nextInt();", "M", "scan.nextInt()", "scan.nextInt", "scan", "for (int i = 0; i < M; i++) {\n\t\t\tN = N - scan.nextInt();\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < M", "i", "M", "i++", "i++", "i", "{\n\t\t\tN = N - scan.nextInt();\n\t\t}", "{\n\t\t\tN = N - scan.nextInt();\n\t\t}", "N = N - scan.nextInt()", "N", "N - scan.nextInt()", "N", "scan.nextInt()", "scan.nextInt", "scan", "if (N >= 0) {\n\t\t\tSystem.out.println(N);\n\t\t} else {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}", "N >= 0", "N", "0", "{\n\t\t\tSystem.out.println(N);\n\t\t}", "System.out.println(N)", "System.out.println", "System.out", "System", "System.out", "N", "{\n\t\t\tSystem.out.println(\"-1\");\n\t\t}", "System.out.println(\"-1\")", "System.out.println", "System.out", "System", "System.out", "\"-1\"", "scan.close()", "scan.close", "scan", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint M = scan.nextInt();\n\n\t\tfor (int i = 0; i < M; i++) {\n\t\t\tN = N - scan.nextInt();\n\t\t}\n\n\t\tif (N >= 0) {\n\t\t\tSystem.out.println(N);\n\t\t} else {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}\n\t\tscan.close();\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint M = scan.nextInt();\n\n\t\tfor (int i = 0; i < M; i++) {\n\t\t\tN = N - scan.nextInt();\n\t\t}\n\n\t\tif (N >= 0) {\n\t\t\tSystem.out.println(N);\n\t\t} else {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}\n\t\tscan.close();\n\t}\n}", "Main" ]
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(); for (int i = 0; i < M; i++) { N = N - scan.nextInt(); } if (N >= 0) { System.out.println(N); } else { System.out.println("-1"); } scan.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 41, 13, 4, 13, 41, 13, 4, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 40, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 0, 13, 20, 29, 4, 18, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 119, 8 ], [ 119, 9 ], [ 9, 10 ], [ 119, 11 ], [ 11, 12 ], [ 119, 13 ], [ 13, 14 ], [ 119, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 17, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 17, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 17, 29 ], [ 29, 30 ], [ 29, 31 ], [ 17, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 32, 37 ], [ 37, 38 ], [ 37, 39 ], [ 32, 40 ], [ 40, 41 ], [ 41, 42 ], [ 32, 43 ], [ 44, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 17, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 49, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 54, 59 ], [ 59, 60 ], [ 49, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 62, 67 ], [ 67, 68 ], [ 67, 69 ], [ 15, 70 ], [ 70, 71 ], [ 119, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 76, 79 ], [ 79, 80 ], [ 119, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 85, 88 ], [ 88, 89 ], [ 119, 90 ], [ 90, 91 ], [ 90, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 94, 97 ], [ 97, 98 ], [ 119, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 103, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 102, 111 ], [ 111, 112 ], [ 111, 113 ], [ 101, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 0, 118 ], [ 118, 119 ], [ 118, 120 ] ]
[ "import java.util.*; \nimport java.io.*;\n\npublic class Main {\n static StringTokenizer st;\n static BufferedReader br; \n static PrintWriter out;\n \n public static void main(String[] args) throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n\n int N = nextInt();\n int M = nextInt();\n \n long sum = 0;\n for (int i=1; i<=M; i++) { \n sum += nextInt();\n }\n\n if(N<sum){\n System.out.println(-1);\n }\n else{\n System.out.println(N-sum); \n }\n \n }\n \n \n public static int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n public static long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public static double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }\n\n static String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }\n}", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "public class Main {\n static StringTokenizer st;\n static BufferedReader br; \n static PrintWriter out;\n \n public static void main(String[] args) throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n\n int N = nextInt();\n int M = nextInt();\n \n long sum = 0;\n for (int i=1; i<=M; i++) { \n sum += nextInt();\n }\n\n if(N<sum){\n System.out.println(-1);\n }\n else{\n System.out.println(N-sum); \n }\n \n }\n \n \n public static int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n public static long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public static double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }\n\n static String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }\n}", "Main", "static StringTokenizer st;", "st", "static BufferedReader br;", "br", "static PrintWriter out;", "out", "public static void main(String[] args) throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n\n int N = nextInt();\n int M = nextInt();\n \n long sum = 0;\n for (int i=1; i<=M; i++) { \n sum += nextInt();\n }\n\n if(N<sum){\n System.out.println(-1);\n }\n else{\n System.out.println(N-sum); \n }\n \n }", "main", "{\n br = new BufferedReader(new InputStreamReader(System.in));\n\n int N = nextInt();\n int M = nextInt();\n \n long sum = 0;\n for (int i=1; i<=M; i++) { \n sum += nextInt();\n }\n\n if(N<sum){\n System.out.println(-1);\n }\n else{\n System.out.println(N-sum); \n }\n \n }", "br = new BufferedReader(new InputStreamReader(System.in))", "br", "new BufferedReader(new InputStreamReader(System.in))", "int N = nextInt();", "N", "nextInt()", "nextInt", "int M = nextInt();", "M", "nextInt()", "nextInt", "long sum = 0;", "sum", "0", "for (int i=1; i<=M; i++) { \n sum += nextInt();\n }", "int i=1;", "int i=1;", "i", "1", "i<=M", "i", "M", "i++", "i++", "i", "{ \n sum += nextInt();\n }", "{ \n sum += nextInt();\n }", "sum += nextInt()", "sum", "nextInt()", "nextInt", "if(N<sum){\n System.out.println(-1);\n }\n else{\n System.out.println(N-sum); \n }", "N<sum", "N", "sum", "{\n System.out.println(-1);\n }", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "{\n System.out.println(N-sum); \n }", "System.out.println(N-sum)", "System.out.println", "System.out", "System", "System.out", "N-sum", "N", "sum", "String[] args", "args", "public static int nextInt() throws IOException {\n return Integer.parseInt(next());\n }", "nextInt", "{\n return Integer.parseInt(next());\n }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "public static long nextLong() throws IOException {\n return Long.parseLong(next());\n }", "nextLong", "{\n return Long.parseLong(next());\n }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "public static double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }", "nextDouble", "{\n return Double.parseDouble(next());\n }", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "static String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }", "next", "{\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }", "while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());", "st == null || !st.hasMoreTokens()", "st == null", "st", "null", "!st.hasMoreTokens()", "st.hasMoreTokens()", "st.hasMoreTokens", "st", "st = new StringTokenizer(br.readLine().trim())", "st", "new StringTokenizer(br.readLine().trim())", "return st.nextToken();", "st.nextToken()", "st.nextToken", "st", "public class Main {\n static StringTokenizer st;\n static BufferedReader br; \n static PrintWriter out;\n \n public static void main(String[] args) throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n\n int N = nextInt();\n int M = nextInt();\n \n long sum = 0;\n for (int i=1; i<=M; i++) { \n sum += nextInt();\n }\n\n if(N<sum){\n System.out.println(-1);\n }\n else{\n System.out.println(N-sum); \n }\n \n }\n \n \n public static int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n public static long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public static double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }\n\n static String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }\n}", "public class Main {\n static StringTokenizer st;\n static BufferedReader br; \n static PrintWriter out;\n \n public static void main(String[] args) throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n\n int N = nextInt();\n int M = nextInt();\n \n long sum = 0;\n for (int i=1; i<=M; i++) { \n sum += nextInt();\n }\n\n if(N<sum){\n System.out.println(-1);\n }\n else{\n System.out.println(N-sum); \n }\n \n }\n \n \n public static int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n public static long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public static double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }\n\n static String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }\n}", "Main" ]
import java.util.*; import java.io.*; public class Main { static StringTokenizer st; static BufferedReader br; static PrintWriter out; public static void main(String[] args) throws IOException { br = new BufferedReader(new InputStreamReader(System.in)); int N = nextInt(); int M = nextInt(); long sum = 0; for (int i=1; i<=M; i++) { sum += nextInt(); } if(N<sum){ System.out.println(-1); } else{ System.out.println(N-sum); } } public static int nextInt() throws IOException { return Integer.parseInt(next()); } public static long nextLong() throws IOException { return Long.parseLong(next()); } public static double nextDouble() throws IOException { return Double.parseDouble(next()); } static String next() throws IOException { while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine().trim()); return st.nextToken(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 13, 2, 13, 18, 13, 13, 41, 13, 2, 13, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 30, 4, 18, 18, 13, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 97, 5 ], [ 97, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 26 ], [ 26, 27 ], [ 26, 28 ], [ 8, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 29, 34 ], [ 34, 35 ], [ 34, 36 ], [ 29, 37 ], [ 37, 38 ], [ 38, 39 ], [ 29, 40 ], [ 41, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 42, 46 ], [ 46, 47 ], [ 47, 48 ], [ 8, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 49, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 56, 58 ], [ 49, 59 ], [ 59, 60 ], [ 60, 61 ], [ 49, 62 ], [ 63, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 66, 68 ], [ 68, 69 ], [ 68, 70 ], [ 8, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 73, 75 ], [ 8, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 76, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 81, 86 ], [ 76, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 88, 93 ], [ 6, 94 ], [ 94, 95 ], [ 0, 96 ], [ 96, 97 ], [ 96, 98 ] ]
[ "import java.util.*;\npublic class Main{\n public static void main(String[]args){\n Scanner sc=new Scanner(System.in);\n int d=sc.nextInt();\n int as=sc.nextInt();\n int ar[]=new int[10000];\n int s=0;\n \n for(int i=0;i<as;i++){\n ar[i]=sc.nextInt();\n \n }\n for(int i=0;i<ar.length;i++){\n s=s+ar[i];\n }\n int f=d-s;\n if(f>=0){\n\n System.out.println(f);\n }\n else{System.out.println(\"-1\");}\n }\n}", "import java.util.*;", "util.*", "java", "public class Main{\n public static void main(String[]args){\n Scanner sc=new Scanner(System.in);\n int d=sc.nextInt();\n int as=sc.nextInt();\n int ar[]=new int[10000];\n int s=0;\n \n for(int i=0;i<as;i++){\n ar[i]=sc.nextInt();\n \n }\n for(int i=0;i<ar.length;i++){\n s=s+ar[i];\n }\n int f=d-s;\n if(f>=0){\n\n System.out.println(f);\n }\n else{System.out.println(\"-1\");}\n }\n}", "Main", "public static void main(String[]args){\n Scanner sc=new Scanner(System.in);\n int d=sc.nextInt();\n int as=sc.nextInt();\n int ar[]=new int[10000];\n int s=0;\n \n for(int i=0;i<as;i++){\n ar[i]=sc.nextInt();\n \n }\n for(int i=0;i<ar.length;i++){\n s=s+ar[i];\n }\n int f=d-s;\n if(f>=0){\n\n System.out.println(f);\n }\n else{System.out.println(\"-1\");}\n }", "main", "{\n Scanner sc=new Scanner(System.in);\n int d=sc.nextInt();\n int as=sc.nextInt();\n int ar[]=new int[10000];\n int s=0;\n \n for(int i=0;i<as;i++){\n ar[i]=sc.nextInt();\n \n }\n for(int i=0;i<ar.length;i++){\n s=s+ar[i];\n }\n int f=d-s;\n if(f>=0){\n\n System.out.println(f);\n }\n else{System.out.println(\"-1\");}\n }", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "int d=sc.nextInt();", "d", "sc.nextInt()", "sc.nextInt", "sc", "int as=sc.nextInt();", "as", "sc.nextInt()", "sc.nextInt", "sc", "int ar[]=new int[10000];", "ar", "new int[10000]", "10000", "int s=0;", "s", "0", "for(int i=0;i<as;i++){\n ar[i]=sc.nextInt();\n \n }", "int i=0;", "int i=0;", "i", "0", "i<as", "i", "as", "i++", "i++", "i", "{\n ar[i]=sc.nextInt();\n \n }", "{\n ar[i]=sc.nextInt();\n \n }", "ar[i]=sc.nextInt()", "ar[i]", "ar", "i", "sc.nextInt()", "sc.nextInt", "sc", "for(int i=0;i<ar.length;i++){\n s=s+ar[i];\n }", "int i=0;", "int i=0;", "i", "0", "i<ar.length", "i", "ar.length", "ar", "ar.length", "i++", "i++", "i", "{\n s=s+ar[i];\n }", "{\n s=s+ar[i];\n }", "s=s+ar[i]", "s", "s+ar[i]", "s", "ar[i]", "ar", "i", "int f=d-s;", "f", "d-s", "d", "s", "if(f>=0){\n\n System.out.println(f);\n }\n else{System.out.println(\"-1\");}", "f>=0", "f", "0", "{\n\n System.out.println(f);\n }", "System.out.println(f)", "System.out.println", "System.out", "System", "System.out", "f", "{System.out.println(\"-1\");}", "System.out.println(\"-1\")", "System.out.println", "System.out", "System", "System.out", "\"-1\"", "String[]args", "args", "public class Main{\n public static void main(String[]args){\n Scanner sc=new Scanner(System.in);\n int d=sc.nextInt();\n int as=sc.nextInt();\n int ar[]=new int[10000];\n int s=0;\n \n for(int i=0;i<as;i++){\n ar[i]=sc.nextInt();\n \n }\n for(int i=0;i<ar.length;i++){\n s=s+ar[i];\n }\n int f=d-s;\n if(f>=0){\n\n System.out.println(f);\n }\n else{System.out.println(\"-1\");}\n }\n}", "public class Main{\n public static void main(String[]args){\n Scanner sc=new Scanner(System.in);\n int d=sc.nextInt();\n int as=sc.nextInt();\n int ar[]=new int[10000];\n int s=0;\n \n for(int i=0;i<as;i++){\n ar[i]=sc.nextInt();\n \n }\n for(int i=0;i<ar.length;i++){\n s=s+ar[i];\n }\n int f=d-s;\n if(f>=0){\n\n System.out.println(f);\n }\n else{System.out.println(\"-1\");}\n }\n}", "Main" ]
import java.util.*; public class Main{ public static void main(String[]args){ Scanner sc=new Scanner(System.in); int d=sc.nextInt(); int as=sc.nextInt(); int ar[]=new int[10000]; int s=0; for(int i=0;i<as;i++){ ar[i]=sc.nextInt(); } for(int i=0;i<ar.length;i++){ s=s+ar[i]; } int f=d-s; if(f>=0){ System.out.println(f); } else{System.out.println("-1");} } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 0, 13, 18, 13, 13, 4, 18, 18, 13, 13, 8, 2, 13, 13, 17, 2, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 73, 5 ], [ 73, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 26 ], [ 26, 27 ], [ 26, 28 ], [ 8, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 29, 34 ], [ 34, 35 ], [ 34, 36 ], [ 29, 37 ], [ 37, 38 ], [ 38, 39 ], [ 29, 40 ], [ 41, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 42, 46 ], [ 46, 47 ], [ 47, 48 ], [ 41, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 51, 53 ], [ 8, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 54, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 59, 63 ], [ 59, 64 ], [ 64, 65 ], [ 64, 66 ], [ 8, 67 ], [ 67, 68 ], [ 68, 69 ], [ 6, 70 ], [ 70, 71 ], [ 0, 72 ], [ 72, 73 ], [ 72, 74 ] ]
[ "import java.util.Scanner;\n\n/**\n * B - Homework\n * 高橋君の夏休みは N 日間です。\n * 夏休みの宿題が M 個出されており、i 番目の宿題をやるには Ai 日間かかります。\n * 複数の宿題を同じ日にやることはできず、また、宿題をやる日には遊ぶことができません。\n * 夏休み中に全ての宿題を終わらせるとき、最大何日間遊ぶことができますか?\n * ただし、夏休み中に全ての宿題を終わらせることができないときは、かわりに -1 を出力してください。\n */\npublic class Main {\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner( System.in );\n // 夏休みの日数\n int n = sc.nextInt();\n // 夏休みの宿題数\n int m = sc.nextInt();\n // それぞれの宿題にかかる日数\n int[] a = new int[m];\n\n // 宿題にかかる総日数\n int result = 0;\n for( int i = 0; i < m; i++ ) {\n a[i] = sc.nextInt();\n result += a[i];\n }\n\n System.out.println( result > n ? \"-1\" : n - result );\n\n sc.close();\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner( System.in );\n // 夏休みの日数\n int n = sc.nextInt();\n // 夏休みの宿題数\n int m = sc.nextInt();\n // それぞれの宿題にかかる日数\n int[] a = new int[m];\n\n // 宿題にかかる総日数\n int result = 0;\n for( int i = 0; i < m; i++ ) {\n a[i] = sc.nextInt();\n result += a[i];\n }\n\n System.out.println( result > n ? \"-1\" : n - result );\n\n sc.close();\n }\n}", "Main", "public static void main(String[] args) {\n\n Scanner sc = new Scanner( System.in );\n // 夏休みの日数\n int n = sc.nextInt();\n // 夏休みの宿題数\n int m = sc.nextInt();\n // それぞれの宿題にかかる日数\n int[] a = new int[m];\n\n // 宿題にかかる総日数\n int result = 0;\n for( int i = 0; i < m; i++ ) {\n a[i] = sc.nextInt();\n result += a[i];\n }\n\n System.out.println( result > n ? \"-1\" : n - result );\n\n sc.close();\n }", "main", "{\n\n Scanner sc = new Scanner( System.in );\n // 夏休みの日数\n int n = sc.nextInt();\n // 夏休みの宿題数\n int m = sc.nextInt();\n // それぞれの宿題にかかる日数\n int[] a = new int[m];\n\n // 宿題にかかる総日数\n int result = 0;\n for( int i = 0; i < m; i++ ) {\n a[i] = sc.nextInt();\n result += a[i];\n }\n\n System.out.println( result > n ? \"-1\" : n - result );\n\n sc.close();\n }", "Scanner sc = new Scanner( System.in );", "sc", "new Scanner( System.in )", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int m = sc.nextInt();", "m", "sc.nextInt()", "sc.nextInt", "sc", "int[] a = new int[m];", "a", "new int[m]", "m", "int result = 0;", "result", "0", "for( int i = 0; i < m; i++ ) {\n a[i] = sc.nextInt();\n result += a[i];\n }", "int i = 0;", "int i = 0;", "i", "0", "i < m", "i", "m", "i++", "i++", "i", "{\n a[i] = sc.nextInt();\n result += a[i];\n }", "{\n a[i] = sc.nextInt();\n result += a[i];\n }", "a[i] = sc.nextInt()", "a[i]", "a", "i", "sc.nextInt()", "sc.nextInt", "sc", "result += a[i]", "result", "a[i]", "a", "i", "System.out.println( result > n ? \"-1\" : n - result )", "System.out.println", "System.out", "System", "System.out", "result > n ? \"-1\" : n - result", "result > n", "result", "n", "\"-1\"", "n - result", "n", "result", "sc.close()", "sc.close", "sc", "String[] args", "args", "public class Main {\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner( System.in );\n // 夏休みの日数\n int n = sc.nextInt();\n // 夏休みの宿題数\n int m = sc.nextInt();\n // それぞれの宿題にかかる日数\n int[] a = new int[m];\n\n // 宿題にかかる総日数\n int result = 0;\n for( int i = 0; i < m; i++ ) {\n a[i] = sc.nextInt();\n result += a[i];\n }\n\n System.out.println( result > n ? \"-1\" : n - result );\n\n sc.close();\n }\n}", "public class Main {\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner( System.in );\n // 夏休みの日数\n int n = sc.nextInt();\n // 夏休みの宿題数\n int m = sc.nextInt();\n // それぞれの宿題にかかる日数\n int[] a = new int[m];\n\n // 宿題にかかる総日数\n int result = 0;\n for( int i = 0; i < m; i++ ) {\n a[i] = sc.nextInt();\n result += a[i];\n }\n\n System.out.println( result > n ? \"-1\" : n - result );\n\n sc.close();\n }\n}", "Main" ]
import java.util.Scanner; /** * B - Homework * 高橋君の夏休みは N 日間です。 * 夏休みの宿題が M 個出されており、i 番目の宿題をやるには Ai 日間かかります。 * 複数の宿題を同じ日にやることはできず、また、宿題をやる日には遊ぶことができません。 * 夏休み中に全ての宿題を終わらせるとき、最大何日間遊ぶことができますか? * ただし、夏休み中に全ての宿題を終わらせることができないときは、かわりに -1 を出力してください。 */ public class Main { public static void main(String[] args) { Scanner sc = new Scanner( System.in ); // 夏休みの日数 int n = sc.nextInt(); // 夏休みの宿題数 int m = sc.nextInt(); // それぞれの宿題にかかる日数 int[] a = new int[m]; // 宿題にかかる総日数 int result = 0; for( int i = 0; i < m; i++ ) { a[i] = sc.nextInt(); result += a[i]; } System.out.println( result > n ? "-1" : n - result ); sc.close(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 4, 18, 18, 13, 13, 4, 18, 13, 13, 40, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 54, 5 ], [ 54, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 22, 27 ], [ 27, 28 ], [ 27, 29 ], [ 22, 30 ], [ 30, 31 ], [ 31, 32 ], [ 22, 33 ], [ 34, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 8, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 40, 45 ], [ 45, 46 ], [ 46, 47 ], [ 45, 48 ], [ 45, 49 ], [ 49, 50 ], [ 6, 51 ], [ 51, 52 ], [ 0, 53 ], [ 53, 54 ], [ 53, 55 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\n long totalTime=scan.nextLong();\n long n=scan.nextLong();\n for (long i = 0; i <n ; i++) {\n totalTime-=scan.nextLong();\n }\n System.out.println(Math.max(totalTime,-1));\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\n long totalTime=scan.nextLong();\n long n=scan.nextLong();\n for (long i = 0; i <n ; i++) {\n totalTime-=scan.nextLong();\n }\n System.out.println(Math.max(totalTime,-1));\n }\n}", "Main", "public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\n long totalTime=scan.nextLong();\n long n=scan.nextLong();\n for (long i = 0; i <n ; i++) {\n totalTime-=scan.nextLong();\n }\n System.out.println(Math.max(totalTime,-1));\n }", "main", "{\n Scanner scan=new Scanner(System.in);\n long totalTime=scan.nextLong();\n long n=scan.nextLong();\n for (long i = 0; i <n ; i++) {\n totalTime-=scan.nextLong();\n }\n System.out.println(Math.max(totalTime,-1));\n }", "Scanner scan=new Scanner(System.in);", "scan", "new Scanner(System.in)", "long totalTime=scan.nextLong();", "totalTime", "scan.nextLong()", "scan.nextLong", "scan", "long n=scan.nextLong();", "n", "scan.nextLong()", "scan.nextLong", "scan", "for (long i = 0; i <n ; i++) {\n totalTime-=scan.nextLong();\n }", "long i = 0;", "long i = 0;", "i", "0", "i <n", "i", "n", "i++", "i++", "i", "{\n totalTime-=scan.nextLong();\n }", "{\n totalTime-=scan.nextLong();\n }", "totalTime-=scan.nextLong()", "totalTime", "scan.nextLong()", "scan.nextLong", "scan", "System.out.println(Math.max(totalTime,-1))", "System.out.println", "System.out", "System", "System.out", "Math.max(totalTime,-1)", "Math.max", "Math", "totalTime", "-1", "1", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\n long totalTime=scan.nextLong();\n long n=scan.nextLong();\n for (long i = 0; i <n ; i++) {\n totalTime-=scan.nextLong();\n }\n System.out.println(Math.max(totalTime,-1));\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\n long totalTime=scan.nextLong();\n long n=scan.nextLong();\n for (long i = 0; i <n ; i++) {\n totalTime-=scan.nextLong();\n }\n System.out.println(Math.max(totalTime,-1));\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan=new Scanner(System.in); long totalTime=scan.nextLong(); long n=scan.nextLong(); for (long i = 0; i <n ; i++) { totalTime-=scan.nextLong(); } System.out.println(Math.max(totalTime,-1)); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 42, 2, 40, 13, 17, 30, 41, 13, 4, 18, 13, 0, 13, 13, 14, 2, 2, 13, 13, 17, 4, 18, 18, 13, 13, 2, 13, 13, 4, 18, 18, 13, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 62, 5 ], [ 62, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 26, 29 ], [ 25, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 34, 35 ], [ 30, 36 ], [ 36, 37 ], [ 36, 38 ], [ 8, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 40, 44 ], [ 39, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 45, 50 ], [ 50, 51 ], [ 50, 52 ], [ 39, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 53, 58 ], [ 6, 59 ], [ 59, 60 ], [ 0, 61 ], [ 61, 62 ], [ 61, 63 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n=scan.nextInt();\n\t\tint m=scan.nextInt();\n\t\tint cnt=0;\n\t\twhile(m-->0) {\n\t\t\tint a=scan.nextInt();\n\t\t\tcnt+=a;\n\t\t}\n\t\tif(n-cnt>=0) System.out.println(n-cnt);\n\t\telse System.out.println(\"-1\");\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n=scan.nextInt();\n\t\tint m=scan.nextInt();\n\t\tint cnt=0;\n\t\twhile(m-->0) {\n\t\t\tint a=scan.nextInt();\n\t\t\tcnt+=a;\n\t\t}\n\t\tif(n-cnt>=0) System.out.println(n-cnt);\n\t\telse System.out.println(\"-1\");\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n=scan.nextInt();\n\t\tint m=scan.nextInt();\n\t\tint cnt=0;\n\t\twhile(m-->0) {\n\t\t\tint a=scan.nextInt();\n\t\t\tcnt+=a;\n\t\t}\n\t\tif(n-cnt>=0) System.out.println(n-cnt);\n\t\telse System.out.println(\"-1\");\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n=scan.nextInt();\n\t\tint m=scan.nextInt();\n\t\tint cnt=0;\n\t\twhile(m-->0) {\n\t\t\tint a=scan.nextInt();\n\t\t\tcnt+=a;\n\t\t}\n\t\tif(n-cnt>=0) System.out.println(n-cnt);\n\t\telse System.out.println(\"-1\");\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int n=scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "int m=scan.nextInt();", "m", "scan.nextInt()", "scan.nextInt", "scan", "int cnt=0;", "cnt", "0", "while(m-->0) {\n\t\t\tint a=scan.nextInt();\n\t\t\tcnt+=a;\n\t\t}", "m-->0", "m--", "m", "0", "{\n\t\t\tint a=scan.nextInt();\n\t\t\tcnt+=a;\n\t\t}", "int a=scan.nextInt();", "a", "scan.nextInt()", "scan.nextInt", "scan", "cnt+=a", "cnt", "a", "if(n-cnt>=0) System.out.println(n-cnt);\n\t\telse System.out.println(\"-1\");", "n-cnt>=0", "n-cnt", "n", "cnt", "0", "System.out.println(n-cnt)", "System.out.println", "System.out", "System", "System.out", "n-cnt", "n", "cnt", "System.out.println(\"-1\")", "System.out.println", "System.out", "System", "System.out", "\"-1\"", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n=scan.nextInt();\n\t\tint m=scan.nextInt();\n\t\tint cnt=0;\n\t\twhile(m-->0) {\n\t\t\tint a=scan.nextInt();\n\t\t\tcnt+=a;\n\t\t}\n\t\tif(n-cnt>=0) System.out.println(n-cnt);\n\t\telse System.out.println(\"-1\");\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n=scan.nextInt();\n\t\tint m=scan.nextInt();\n\t\tint cnt=0;\n\t\twhile(m-->0) {\n\t\t\tint a=scan.nextInt();\n\t\t\tcnt+=a;\n\t\t}\n\t\tif(n-cnt>=0) System.out.println(n-cnt);\n\t\telse System.out.println(\"-1\");\n\t}\n\n}", "Main" ]
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 cnt=0; while(m-->0) { int a=scan.nextInt(); cnt+=a; } if(n-cnt>=0) System.out.println(n-cnt); else System.out.println("-1"); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 2, 13, 4, 18, 13, 18, 13, 13, 14, 2, 13, 17, 30, 0, 13, 40, 17, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 91, 11 ], [ 91, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 23, 24 ], [ 20, 25 ], [ 14, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 28, 31 ], [ 31, 32 ], [ 31, 33 ], [ 14, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 36, 39 ], [ 39, 40 ], [ 39, 41 ], [ 14, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 44, 49 ], [ 14, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 50, 58 ], [ 58, 59 ], [ 59, 60 ], [ 50, 61 ], [ 62, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 68, 69 ], [ 67, 70 ], [ 70, 71 ], [ 70, 72 ], [ 14, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 73, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 14, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 82, 87 ], [ 12, 88 ], [ 88, 89 ], [ 0, 90 ], [ 90, 91 ], [ 90, 92 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] str = br.readLine().split(\" \");\n int n = Integer.parseInt(str[0]);\n int m = Integer.parseInt(str[1]);\n String[] a = br.readLine().split(\" \");\n\n for (int i = 0; i < m; i++) {\n n = n - Integer.parseInt(a[i]);\n }\n\n if (n < 0) {\n n = -1;\n }\n System.out.println(n);\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] str = br.readLine().split(\" \");\n int n = Integer.parseInt(str[0]);\n int m = Integer.parseInt(str[1]);\n String[] a = br.readLine().split(\" \");\n\n for (int i = 0; i < m; i++) {\n n = n - Integer.parseInt(a[i]);\n }\n\n if (n < 0) {\n n = -1;\n }\n System.out.println(n);\n }\n}", "Main", "public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] str = br.readLine().split(\" \");\n int n = Integer.parseInt(str[0]);\n int m = Integer.parseInt(str[1]);\n String[] a = br.readLine().split(\" \");\n\n for (int i = 0; i < m; i++) {\n n = n - Integer.parseInt(a[i]);\n }\n\n if (n < 0) {\n n = -1;\n }\n System.out.println(n);\n }", "main", "{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] str = br.readLine().split(\" \");\n int n = Integer.parseInt(str[0]);\n int m = Integer.parseInt(str[1]);\n String[] a = br.readLine().split(\" \");\n\n for (int i = 0; i < m; i++) {\n n = n - Integer.parseInt(a[i]);\n }\n\n if (n < 0) {\n n = -1;\n }\n System.out.println(n);\n }", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "String[] str = br.readLine().split(\" \");", "str", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "int n = Integer.parseInt(str[0]);", "n", "Integer.parseInt(str[0])", "Integer.parseInt", "Integer", "str[0]", "str", "0", "int m = Integer.parseInt(str[1]);", "m", "Integer.parseInt(str[1])", "Integer.parseInt", "Integer", "str[1]", "str", "1", "String[] a = br.readLine().split(\" \");", "a", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "for (int i = 0; i < m; i++) {\n n = n - Integer.parseInt(a[i]);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < m", "i", "m", "i++", "i++", "i", "{\n n = n - Integer.parseInt(a[i]);\n }", "{\n n = n - Integer.parseInt(a[i]);\n }", "n = n - Integer.parseInt(a[i])", "n", "n - Integer.parseInt(a[i])", "n", "Integer.parseInt(a[i])", "Integer.parseInt", "Integer", "a[i]", "a", "i", "if (n < 0) {\n n = -1;\n }", "n < 0", "n", "0", "{\n n = -1;\n }", "n = -1", "n", "-1", "1", "System.out.println(n)", "System.out.println", "System.out", "System", "System.out", "n", "String[] args", "args", "public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] str = br.readLine().split(\" \");\n int n = Integer.parseInt(str[0]);\n int m = Integer.parseInt(str[1]);\n String[] a = br.readLine().split(\" \");\n\n for (int i = 0; i < m; i++) {\n n = n - Integer.parseInt(a[i]);\n }\n\n if (n < 0) {\n n = -1;\n }\n System.out.println(n);\n }\n}", "public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] str = br.readLine().split(\" \");\n int n = Integer.parseInt(str[0]);\n int m = Integer.parseInt(str[1]);\n String[] a = br.readLine().split(\" \");\n\n for (int i = 0; i < m; i++) {\n n = n - Integer.parseInt(a[i]);\n }\n\n if (n < 0) {\n n = -1;\n }\n System.out.println(n);\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] str = br.readLine().split(" "); int n = Integer.parseInt(str[0]); int m = Integer.parseInt(str[1]); String[] a = br.readLine().split(" "); for (int i = 0; i < m; i++) { n = n - Integer.parseInt(a[i]); } if (n < 0) { n = -1; } System.out.println(n); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 42, 4, 18, 13, 30, 0, 13, 4, 18, 13, 4, 18, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 40, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 62, 5 ], [ 62, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 25, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 33, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 8, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 38, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 43, 48 ], [ 48, 49 ], [ 48, 50 ], [ 38, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 52, 57 ], [ 57, 58 ], [ 6, 59 ], [ 59, 60 ], [ 0, 61 ], [ 61, 62 ], [ 61, 63 ] ]
[ "import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int m = sc.nextInt();\n int count = 0;\n while(sc.hasNext()){\n count += sc.nextInt();\n }\n sc.close();\n \n if(count <= n){\n System.out.println(n - count);\n }else{\n System.out.println(-1);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int m = sc.nextInt();\n int count = 0;\n while(sc.hasNext()){\n count += sc.nextInt();\n }\n sc.close();\n \n if(count <= n){\n System.out.println(n - count);\n }else{\n System.out.println(-1);\n }\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int m = sc.nextInt();\n int count = 0;\n while(sc.hasNext()){\n count += sc.nextInt();\n }\n sc.close();\n \n if(count <= n){\n System.out.println(n - count);\n }else{\n System.out.println(-1);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int m = sc.nextInt();\n int count = 0;\n while(sc.hasNext()){\n count += sc.nextInt();\n }\n sc.close();\n \n if(count <= n){\n System.out.println(n - count);\n }else{\n System.out.println(-1);\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int m = sc.nextInt();", "m", "sc.nextInt()", "sc.nextInt", "sc", "int count = 0;", "count", "0", "while(sc.hasNext()){\n count += sc.nextInt();\n }", "sc.hasNext()", "sc.hasNext", "sc", "{\n count += sc.nextInt();\n }", "count += sc.nextInt()", "count", "sc.nextInt()", "sc.nextInt", "sc", "sc.close()", "sc.close", "sc", "if(count <= n){\n System.out.println(n - count);\n }else{\n System.out.println(-1);\n }", "count <= n", "count", "n", "{\n System.out.println(n - count);\n }", "System.out.println(n - count)", "System.out.println", "System.out", "System", "System.out", "n - count", "n", "count", "{\n System.out.println(-1);\n }", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int m = sc.nextInt();\n int count = 0;\n while(sc.hasNext()){\n count += sc.nextInt();\n }\n sc.close();\n \n if(count <= n){\n System.out.println(n - count);\n }else{\n System.out.println(-1);\n }\n }\n}", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int m = sc.nextInt();\n int count = 0;\n while(sc.hasNext()){\n count += sc.nextInt();\n }\n sc.close();\n \n if(count <= n){\n System.out.println(n - count);\n }else{\n System.out.println(-1);\n }\n }\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int count = 0; while(sc.hasNext()){ count += sc.nextInt(); } sc.close(); if(count <= n){ System.out.println(n - count); }else{ System.out.println(-1); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 40, 17, 30, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 62, 5 ], [ 62, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 22, 27 ], [ 27, 28 ], [ 27, 29 ], [ 22, 30 ], [ 30, 31 ], [ 31, 32 ], [ 22, 33 ], [ 34, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 8, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 40, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 45, 50 ], [ 50, 51 ], [ 40, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 53, 58 ], [ 6, 59 ], [ 59, 60 ], [ 0, 61 ], [ 61, 62 ], [ 61, 63 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tint n = scanner.nextInt();\n\t\tint m = scanner.nextInt();\n\n\t\tfor(int i = 0; i < m; i++) {\n\t\t\tn -= scanner.nextInt();\n\t\t}\n\n\t\tif(n < 0) {\n\t\tSystem.out.print(-1);\n\t\t} else {\n\t\t\tSystem.out.print(n);\n\t\t}\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tint n = scanner.nextInt();\n\t\tint m = scanner.nextInt();\n\n\t\tfor(int i = 0; i < m; i++) {\n\t\t\tn -= scanner.nextInt();\n\t\t}\n\n\t\tif(n < 0) {\n\t\tSystem.out.print(-1);\n\t\t} else {\n\t\t\tSystem.out.print(n);\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tint n = scanner.nextInt();\n\t\tint m = scanner.nextInt();\n\n\t\tfor(int i = 0; i < m; i++) {\n\t\t\tn -= scanner.nextInt();\n\t\t}\n\n\t\tif(n < 0) {\n\t\tSystem.out.print(-1);\n\t\t} else {\n\t\t\tSystem.out.print(n);\n\t\t}\n\t}", "main", "{\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tint n = scanner.nextInt();\n\t\tint m = scanner.nextInt();\n\n\t\tfor(int i = 0; i < m; i++) {\n\t\t\tn -= scanner.nextInt();\n\t\t}\n\n\t\tif(n < 0) {\n\t\tSystem.out.print(-1);\n\t\t} else {\n\t\t\tSystem.out.print(n);\n\t\t}\n\t}", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int n = scanner.nextInt();", "n", "scanner.nextInt()", "scanner.nextInt", "scanner", "int m = scanner.nextInt();", "m", "scanner.nextInt()", "scanner.nextInt", "scanner", "for(int i = 0; i < m; i++) {\n\t\t\tn -= scanner.nextInt();\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < m", "i", "m", "i++", "i++", "i", "{\n\t\t\tn -= scanner.nextInt();\n\t\t}", "{\n\t\t\tn -= scanner.nextInt();\n\t\t}", "n -= scanner.nextInt()", "n", "scanner.nextInt()", "scanner.nextInt", "scanner", "if(n < 0) {\n\t\tSystem.out.print(-1);\n\t\t} else {\n\t\t\tSystem.out.print(n);\n\t\t}", "n < 0", "n", "0", "{\n\t\tSystem.out.print(-1);\n\t\t}", "System.out.print(-1)", "System.out.print", "System.out", "System", "System.out", "-1", "1", "{\n\t\t\tSystem.out.print(n);\n\t\t}", "System.out.print(n)", "System.out.print", "System.out", "System", "System.out", "n", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tint n = scanner.nextInt();\n\t\tint m = scanner.nextInt();\n\n\t\tfor(int i = 0; i < m; i++) {\n\t\t\tn -= scanner.nextInt();\n\t\t}\n\n\t\tif(n < 0) {\n\t\tSystem.out.print(-1);\n\t\t} else {\n\t\t\tSystem.out.print(n);\n\t\t}\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tint n = scanner.nextInt();\n\t\tint m = scanner.nextInt();\n\n\t\tfor(int i = 0; i < m; i++) {\n\t\t\tn -= scanner.nextInt();\n\t\t}\n\n\t\tif(n < 0) {\n\t\tSystem.out.print(-1);\n\t\t} else {\n\t\t\tSystem.out.print(n);\n\t\t}\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int m = scanner.nextInt(); for(int i = 0; i < m; i++) { n -= scanner.nextInt(); } if(n < 0) { System.out.print(-1); } else { System.out.print(n); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 2, 13, 4, 18, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 40, 17, 29, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 64, 5 ], [ 64, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 22, 27 ], [ 27, 28 ], [ 27, 29 ], [ 22, 30 ], [ 30, 31 ], [ 31, 32 ], [ 22, 33 ], [ 34, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 34, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 42, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 47, 52 ], [ 52, 53 ], [ 46, 54 ], [ 8, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 55, 60 ], [ 6, 61 ], [ 61, 62 ], [ 0, 63 ], [ 63, 64 ], [ 63, 65 ] ]
[ "import java.util.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint n = scanner.nextInt();\n\t\tint m = scanner.nextInt();\n\t\t\n\t\tfor(int i = 0;i<m;i++) {\n\t\t\tn = n - scanner.nextInt();\n\t\t\tif (n<0) {\n\t\t\t\tSystem.out.println(-1);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(n);\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint n = scanner.nextInt();\n\t\tint m = scanner.nextInt();\n\t\t\n\t\tfor(int i = 0;i<m;i++) {\n\t\t\tn = n - scanner.nextInt();\n\t\t\tif (n<0) {\n\t\t\t\tSystem.out.println(-1);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(n);\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint n = scanner.nextInt();\n\t\tint m = scanner.nextInt();\n\t\t\n\t\tfor(int i = 0;i<m;i++) {\n\t\t\tn = n - scanner.nextInt();\n\t\t\tif (n<0) {\n\t\t\t\tSystem.out.println(-1);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(n);\n\t}", "main", "{\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint n = scanner.nextInt();\n\t\tint m = scanner.nextInt();\n\t\t\n\t\tfor(int i = 0;i<m;i++) {\n\t\t\tn = n - scanner.nextInt();\n\t\t\tif (n<0) {\n\t\t\t\tSystem.out.println(-1);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(n);\n\t}", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int n = scanner.nextInt();", "n", "scanner.nextInt()", "scanner.nextInt", "scanner", "int m = scanner.nextInt();", "m", "scanner.nextInt()", "scanner.nextInt", "scanner", "for(int i = 0;i<m;i++) {\n\t\t\tn = n - scanner.nextInt();\n\t\t\tif (n<0) {\n\t\t\t\tSystem.out.println(-1);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i<m", "i", "m", "i++", "i++", "i", "{\n\t\t\tn = n - scanner.nextInt();\n\t\t\tif (n<0) {\n\t\t\t\tSystem.out.println(-1);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}", "{\n\t\t\tn = n - scanner.nextInt();\n\t\t\tif (n<0) {\n\t\t\t\tSystem.out.println(-1);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}", "n = n - scanner.nextInt()", "n", "n - scanner.nextInt()", "n", "scanner.nextInt()", "scanner.nextInt", "scanner", "if (n<0) {\n\t\t\t\tSystem.out.println(-1);\n\t\t\t\treturn;\n\t\t\t}", "n<0", "n", "0", "{\n\t\t\t\tSystem.out.println(-1);\n\t\t\t\treturn;\n\t\t\t}", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "return;", "System.out.println(n)", "System.out.println", "System.out", "System", "System.out", "n", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint n = scanner.nextInt();\n\t\tint m = scanner.nextInt();\n\t\t\n\t\tfor(int i = 0;i<m;i++) {\n\t\t\tn = n - scanner.nextInt();\n\t\t\tif (n<0) {\n\t\t\t\tSystem.out.println(-1);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(n);\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint n = scanner.nextInt();\n\t\tint m = scanner.nextInt();\n\t\t\n\t\tfor(int i = 0;i<m;i++) {\n\t\t\tn = n - scanner.nextInt();\n\t\t\tif (n<0) {\n\t\t\t\tSystem.out.println(-1);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(n);\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int m = scanner.nextInt(); for(int i = 0;i<m;i++) { n = n - scanner.nextInt(); if (n<0) { System.out.println(-1); return; } } System.out.println(n); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 41, 13, 20, 41, 13, 17, 12, 13, 30, 41, 13, 20, 41, 13, 17, 42, 2, 13, 17, 30, 4, 18, 13, 40, 13, 4, 18, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 0, 13, 17, 23, 13, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 37, 20, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 18, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 18, 13, 29, 13, 23, 13, 6, 13, 41, 13, 20, 41, 13, 17, 41, 13, 40, 17, 41, 13, 2, 17, 17, 41, 13, 17, 12, 13, 30, 29, 2, 2, 2, 2, 13, 13, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 29, 2, 2, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 29, 2, 2, 2, 2, 13, 13, 2, 13, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 29, 2, 2, 2, 13, 2, 13, 17, 2, 13, 17, 17, 23, 13, 12, 13, 30, 29, 2, 2, 13, 2, 13, 17, 17, 23, 13, 12, 13, 30, 41, 13, 17, 0, 13, 2, 13, 13, 42, 2, 13, 17, 30, 14, 2, 2, 13, 17, 17, 0, 13, 4, 13, 13, 13, 0, 13, 4, 13, 13, 13, 0, 13, 2, 13, 17, 29, 13, 23, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 41, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 0, 13, 13, 14, 2, 13, 13, 4, 18, 13, 40, 17, 4, 18, 13, 2, 13, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 404, 11 ], [ 404, 12 ], [ 12, 13 ], [ 12, 14 ], [ 404, 15 ], [ 15, 16 ], [ 15, 17 ], [ 404, 18 ], [ 18, 19 ], [ 18, 20 ], [ 404, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 23, 27 ], [ 27, 28 ], [ 27, 29 ], [ 23, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 30, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 34, 38 ], [ 38, 39 ], [ 23, 40 ], [ 40, 41 ], [ 41, 42 ], [ 21, 43 ], [ 43, 44 ], [ 404, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 45, 49 ], [ 49, 50 ], [ 45, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 53, 57 ], [ 57, 58 ], [ 57, 59 ], [ 51, 60 ], [ 60, 61 ], [ 45, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 66, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 65, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 75, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 64, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 45, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 93, 96 ], [ 96, 97 ], [ 45, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 45, 105 ], [ 105, 106 ], [ 105, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 109, 112 ], [ 112, 113 ], [ 45, 114 ], [ 114, 115 ], [ 114, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 118, 121 ], [ 121, 122 ], [ 45, 123 ], [ 123, 124 ], [ 123, 125 ], [ 125, 126 ], [ 126, 127 ], [ 126, 128 ], [ 125, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 130, 135 ], [ 135, 136 ], [ 135, 137 ], [ 130, 138 ], [ 138, 139 ], [ 139, 140 ], [ 130, 141 ], [ 141, 142 ], [ 142, 143 ], [ 143, 144 ], [ 143, 145 ], [ 142, 146 ], [ 146, 147 ], [ 147, 148 ], [ 125, 149 ], [ 149, 150 ], [ 123, 151 ], [ 151, 152 ], [ 45, 153 ], [ 153, 154 ], [ 153, 155 ], [ 155, 156 ], [ 156, 157 ], [ 156, 158 ], [ 155, 160 ], [ 160, 161 ], [ 161, 162 ], [ 162, 163 ], [ 162, 164 ], [ 160, 165 ], [ 165, 166 ], [ 165, 167 ], [ 160, 168 ], [ 168, 169 ], [ 169, 170 ], [ 160, 171 ], [ 171, 172 ], [ 172, 173 ], [ 173, 174 ], [ 173, 175 ], [ 172, 176 ], [ 176, 177 ], [ 177, 178 ], [ 155, 179 ], [ 179, 180 ], [ 153, 181 ], [ 181, 182 ], [ 404, 183 ], [ 183, 184 ], [ 183, 185 ], [ 185, 186 ], [ 185, 187 ], [ 183, 188 ], [ 188, 189 ], [ 188, 190 ], [ 183, 191 ], [ 191, 192 ], [ 191, 193 ], [ 193, 194 ], [ 183, 195 ], [ 195, 196 ], [ 195, 197 ], [ 197, 198 ], [ 197, 199 ], [ 183, 200 ], [ 200, 201 ], [ 200, 202 ], [ 183, 203 ], [ 203, 204 ], [ 203, 205 ], [ 205, 206 ], [ 206, 207 ], [ 207, 208 ], [ 208, 209 ], [ 209, 210 ], [ 210, 211 ], [ 210, 212 ], [ 209, 213 ], [ 208, 214 ], [ 207, 215 ], [ 203, 216 ], [ 216, 217 ], [ 203, 218 ], [ 218, 219 ], [ 183, 220 ], [ 220, 221 ], [ 220, 222 ], [ 222, 223 ], [ 223, 224 ], [ 224, 225 ], [ 225, 226 ], [ 225, 227 ], [ 224, 228 ], [ 220, 229 ], [ 229, 230 ], [ 220, 231 ], [ 231, 232 ], [ 183, 233 ], [ 233, 234 ], [ 233, 235 ], [ 235, 236 ], [ 236, 237 ], [ 237, 238 ], [ 238, 239 ], [ 239, 240 ], [ 240, 241 ], [ 240, 242 ], [ 239, 243 ], [ 243, 244 ], [ 243, 245 ], [ 238, 246 ], [ 237, 247 ], [ 233, 248 ], [ 248, 249 ], [ 233, 250 ], [ 250, 251 ], [ 183, 252 ], [ 252, 253 ], [ 252, 254 ], [ 254, 255 ], [ 255, 256 ], [ 256, 257 ], [ 257, 258 ], [ 258, 259 ], [ 258, 260 ], [ 260, 261 ], [ 260, 262 ], [ 257, 263 ], [ 263, 264 ], [ 263, 265 ], [ 256, 266 ], [ 252, 267 ], [ 267, 268 ], [ 183, 269 ], [ 269, 270 ], [ 269, 271 ], [ 271, 272 ], [ 272, 273 ], [ 273, 274 ], [ 274, 275 ], [ 274, 276 ], [ 276, 277 ], [ 276, 278 ], [ 273, 279 ], [ 269, 280 ], [ 280, 281 ], [ 183, 282 ], [ 282, 283 ], [ 282, 284 ], [ 284, 285 ], [ 285, 286 ], [ 285, 287 ], [ 284, 288 ], [ 288, 289 ], [ 288, 290 ], [ 290, 291 ], [ 290, 292 ], [ 284, 293 ], [ 293, 294 ], [ 294, 295 ], [ 294, 296 ], [ 293, 297 ], [ 297, 298 ], [ 298, 299 ], [ 299, 300 ], [ 300, 301 ], [ 300, 302 ], [ 299, 303 ], [ 298, 304 ], [ 304, 305 ], [ 304, 306 ], [ 306, 307 ], [ 306, 308 ], [ 306, 309 ], [ 297, 310 ], [ 310, 311 ], [ 310, 312 ], [ 312, 313 ], [ 312, 314 ], [ 312, 315 ], [ 297, 316 ], [ 316, 317 ], [ 316, 318 ], [ 318, 319 ], [ 318, 320 ], [ 284, 321 ], [ 321, 322 ], [ 282, 323 ], [ 323, 324 ], [ 282, 325 ], [ 325, 326 ], [ 183, 327 ], [ 327, 328 ], [ 327, 329 ], [ 329, 330 ], [ 330, 331 ], [ 331, 332 ], [ 331, 333 ], [ 330, 334 ], [ 334, 335 ], [ 329, 336 ], [ 336, 337 ], [ 337, 338 ], [ 337, 339 ], [ 337, 340 ], [ 340, 341 ], [ 340, 342 ], [ 327, 343 ], [ 343, 344 ], [ 327, 345 ], [ 345, 346 ], [ 183, 347 ], [ 347, 348 ], [ 347, 349 ], [ 349, 350 ], [ 350, 351 ], [ 349, 352 ], [ 352, 353 ], [ 349, 354 ], [ 354, 355 ], [ 354, 356 ], [ 356, 357 ], [ 357, 358 ], [ 349, 359 ], [ 359, 360 ], [ 359, 361 ], [ 361, 362 ], [ 362, 363 ], [ 349, 364 ], [ 364, 365 ], [ 364, 366 ], [ 349, 367 ], [ 367, 368 ], [ 368, 369 ], [ 369, 370 ], [ 369, 371 ], [ 367, 372 ], [ 372, 373 ], [ 372, 374 ], [ 367, 375 ], [ 375, 376 ], [ 376, 377 ], [ 367, 378 ], [ 379, 379 ], [ 379, 380 ], [ 380, 381 ], [ 380, 382 ], [ 382, 383 ], [ 383, 384 ], [ 379, 385 ], [ 385, 386 ], [ 385, 387 ], [ 349, 388 ], [ 388, 389 ], [ 389, 390 ], [ 389, 391 ], [ 388, 392 ], [ 392, 393 ], [ 393, 394 ], [ 392, 395 ], [ 395, 396 ], [ 388, 397 ], [ 397, 398 ], [ 398, 399 ], [ 397, 400 ], [ 400, 401 ], [ 400, 402 ], [ 0, 403 ], [ 403, 404 ], [ 403, 405 ] ]
[ "import java.io.*;\nimport java.text.*;\nimport java.util.*;\n\npublic class Main {\n\n static InputReader sc = new InputReader(System.in);\n static PrintWriter out = new PrintWriter(System.out);\n\n public static void main(String[] args) throws IOException {\n solver s = new solver();\n int t = 1;\n while (t > 0) {\n s.solve();\n t--;\n }\n out.close();\n }\n\n static class InputReader {\n\n public BufferedReader br;\n public StringTokenizer token;\n\n public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream), 32768);\n token = null;\n }\n\n public String sn() {\n while (token == null || !token.hasMoreTokens()) {\n try {\n token = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return token.nextToken();\n }\n\n public int ni() {\n return Integer.parseInt(sn());\n }\n\n public String snl() throws IOException {\n return br.readLine();\n }\n\n public long nlo() {\n return Long.parseLong(sn());\n }\n\n public double nd() {\n return Double.parseDouble(sn());\n }\n\n public int[] na(int n) {\n int a[] = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.ni();\n return a;\n }\n\n public long[] nal(int n) {\n long a[] = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.nlo();\n return a;\n }\n }\n\n static int inf = 5000013;\n\n static class solver {\n DecimalFormat df = new DecimalFormat(\"0.00000000000000000000\");\n long max = 1000000000000000l, min = -10000000000000000l;\n long mod = (long) 1e9 + 7;\n\n long pro(long a, long b) {\n return (a % mod * b % mod) % mod;\n }\n\n long add(long a, long b) {\n return (a + b) % mod;\n }\n\n long sub(long a, long b) {\n return ((a % mod - b % mod) + mod) % mod;\n }\n\n long ncr3(long n) {\n return (n * (n - 1) * (n - 2)) / 6l;\n }\n\n long ncr2(long n) {\n return n * (n - 1) / 2l;\n }\n\n long modPow(long x, long y) {\n long res = 1;\n x = x % mod;\n while (y > 0) {\n if (y % 2 != 0)\n res = pro(res, x);\n x = pro(x, x);\n y = y >> 1;\n }\n return res;\n }\n\n int gcd(int a, int b) {\n if (b == 0)\n return a;\n return gcd(b, a % b);\n }\n\n final int maxn = 1000005;\n\n void solve() {\n int n, m;\n n = sc.ni();\n m = sc.ni();\n long sum = 0;\n for (int i = 0; i < m; i++) {\n int a = sc.ni();\n sum += (long) a;\n }\n if (sum > n)\n out.println(-1);\n else\n out.println(n - sum);\n }\n }\n}", "import java.io.*;", "io.*", "java", "import java.text.*;", "text.*", "java", "import java.util.*;", "util.*", "java", "public class Main {\n\n static InputReader sc = new InputReader(System.in);\n static PrintWriter out = new PrintWriter(System.out);\n\n public static void main(String[] args) throws IOException {\n solver s = new solver();\n int t = 1;\n while (t > 0) {\n s.solve();\n t--;\n }\n out.close();\n }\n\n static class InputReader {\n\n public BufferedReader br;\n public StringTokenizer token;\n\n public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream), 32768);\n token = null;\n }\n\n public String sn() {\n while (token == null || !token.hasMoreTokens()) {\n try {\n token = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return token.nextToken();\n }\n\n public int ni() {\n return Integer.parseInt(sn());\n }\n\n public String snl() throws IOException {\n return br.readLine();\n }\n\n public long nlo() {\n return Long.parseLong(sn());\n }\n\n public double nd() {\n return Double.parseDouble(sn());\n }\n\n public int[] na(int n) {\n int a[] = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.ni();\n return a;\n }\n\n public long[] nal(int n) {\n long a[] = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.nlo();\n return a;\n }\n }\n\n static int inf = 5000013;\n\n static class solver {\n DecimalFormat df = new DecimalFormat(\"0.00000000000000000000\");\n long max = 1000000000000000l, min = -10000000000000000l;\n long mod = (long) 1e9 + 7;\n\n long pro(long a, long b) {\n return (a % mod * b % mod) % mod;\n }\n\n long add(long a, long b) {\n return (a + b) % mod;\n }\n\n long sub(long a, long b) {\n return ((a % mod - b % mod) + mod) % mod;\n }\n\n long ncr3(long n) {\n return (n * (n - 1) * (n - 2)) / 6l;\n }\n\n long ncr2(long n) {\n return n * (n - 1) / 2l;\n }\n\n long modPow(long x, long y) {\n long res = 1;\n x = x % mod;\n while (y > 0) {\n if (y % 2 != 0)\n res = pro(res, x);\n x = pro(x, x);\n y = y >> 1;\n }\n return res;\n }\n\n int gcd(int a, int b) {\n if (b == 0)\n return a;\n return gcd(b, a % b);\n }\n\n final int maxn = 1000005;\n\n void solve() {\n int n, m;\n n = sc.ni();\n m = sc.ni();\n long sum = 0;\n for (int i = 0; i < m; i++) {\n int a = sc.ni();\n sum += (long) a;\n }\n if (sum > n)\n out.println(-1);\n else\n out.println(n - sum);\n }\n }\n}", "Main", "static InputReader sc = new InputReader(System.in);", "sc", "new InputReader(System.in)", "static PrintWriter out = new PrintWriter(System.out);", "out", "new PrintWriter(System.out)", "static int inf = 5000013;", "inf", "5000013", "public static void main(String[] args) throws IOException {\n solver s = new solver();\n int t = 1;\n while (t > 0) {\n s.solve();\n t--;\n }\n out.close();\n }", "main", "{\n solver s = new solver();\n int t = 1;\n while (t > 0) {\n s.solve();\n t--;\n }\n out.close();\n }", "solver s = new solver();", "s", "new solver()", "int t = 1;", "t", "1", "while (t > 0) {\n s.solve();\n t--;\n }", "t > 0", "t", "0", "{\n s.solve();\n t--;\n }", "s.solve()", "s.solve", "s", "t--", "t", "out.close()", "out.close", "out", "String[] args", "args", "static class InputReader {\n\n public BufferedReader br;\n public StringTokenizer token;\n\n public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream), 32768);\n token = null;\n }\n\n public String sn() {\n while (token == null || !token.hasMoreTokens()) {\n try {\n token = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return token.nextToken();\n }\n\n public int ni() {\n return Integer.parseInt(sn());\n }\n\n public String snl() throws IOException {\n return br.readLine();\n }\n\n public long nlo() {\n return Long.parseLong(sn());\n }\n\n public double nd() {\n return Double.parseDouble(sn());\n }\n\n public int[] na(int n) {\n int a[] = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.ni();\n return a;\n }\n\n public long[] nal(int n) {\n long a[] = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.nlo();\n return a;\n }\n }", "InputReader", "public BufferedReader br;", "br", "public StringTokenizer token;", "token", "public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream), 32768);\n token = null;\n }", "InputReader", "{\n br = new BufferedReader(new InputStreamReader(stream), 32768);\n token = null;\n }", "br = new BufferedReader(new InputStreamReader(stream), 32768)", "br", "new BufferedReader(new InputStreamReader(stream), 32768)", "token = null", "token", "null", "InputStream stream", "stream", "public String sn() {\n while (token == null || !token.hasMoreTokens()) {\n try {\n token = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return token.nextToken();\n }", "sn", "{\n while (token == null || !token.hasMoreTokens()) {\n try {\n token = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return token.nextToken();\n }", "while (token == null || !token.hasMoreTokens()) {\n try {\n token = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "token == null || !token.hasMoreTokens()", "token == null", "token", "null", "!token.hasMoreTokens()", "token.hasMoreTokens()", "token.hasMoreTokens", "token", "{\n try {\n token = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "try {\n token = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }", "catch (IOException e) {\n throw new RuntimeException(e);\n }", "IOException e", "{\n throw new RuntimeException(e);\n }", "throw new RuntimeException(e);", "new RuntimeException(e)", "{\n token = new StringTokenizer(br.readLine());\n }", "token = new StringTokenizer(br.readLine())", "token", "new StringTokenizer(br.readLine())", "return token.nextToken();", "token.nextToken()", "token.nextToken", "token", "public int ni() {\n return Integer.parseInt(sn());\n }", "ni", "{\n return Integer.parseInt(sn());\n }", "return Integer.parseInt(sn());", "Integer.parseInt(sn())", "Integer.parseInt", "Integer", "sn()", "sn", "public String snl() throws IOException {\n return br.readLine();\n }", "snl", "{\n return br.readLine();\n }", "return br.readLine();", "br.readLine()", "br.readLine", "br", "public long nlo() {\n return Long.parseLong(sn());\n }", "nlo", "{\n return Long.parseLong(sn());\n }", "return Long.parseLong(sn());", "Long.parseLong(sn())", "Long.parseLong", "Long", "sn()", "sn", "public double nd() {\n return Double.parseDouble(sn());\n }", "nd", "{\n return Double.parseDouble(sn());\n }", "return Double.parseDouble(sn());", "Double.parseDouble(sn())", "Double.parseDouble", "Double", "sn()", "sn", "public int[] na(int n) {\n int a[] = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.ni();\n return a;\n }", "na", "{\n int a[] = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.ni();\n return a;\n }", "int a[] = new int[n];", "a", "new int[n]", "n", "for (int i = 0; i < n; i++)\n a[i] = sc.ni();", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "a[i] = sc.ni();", "a[i] = sc.ni()", "a[i]", "a", "i", "sc.ni()", "sc.ni", "sc", "return a;", "a", "int n", "n", "public long[] nal(int n) {\n long a[] = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.nlo();\n return a;\n }", "nal", "{\n long a[] = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.nlo();\n return a;\n }", "long a[] = new long[n];", "a", "new long[n]", "n", "for (int i = 0; i < n; i++)\n a[i] = sc.nlo();", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "a[i] = sc.nlo();", "a[i] = sc.nlo()", "a[i]", "a", "i", "sc.nlo()", "sc.nlo", "sc", "return a;", "a", "int n", "n", "static class solver {\n DecimalFormat df = new DecimalFormat(\"0.00000000000000000000\");\n long max = 1000000000000000l, min = -10000000000000000l;\n long mod = (long) 1e9 + 7;\n\n long pro(long a, long b) {\n return (a % mod * b % mod) % mod;\n }\n\n long add(long a, long b) {\n return (a + b) % mod;\n }\n\n long sub(long a, long b) {\n return ((a % mod - b % mod) + mod) % mod;\n }\n\n long ncr3(long n) {\n return (n * (n - 1) * (n - 2)) / 6l;\n }\n\n long ncr2(long n) {\n return n * (n - 1) / 2l;\n }\n\n long modPow(long x, long y) {\n long res = 1;\n x = x % mod;\n while (y > 0) {\n if (y % 2 != 0)\n res = pro(res, x);\n x = pro(x, x);\n y = y >> 1;\n }\n return res;\n }\n\n int gcd(int a, int b) {\n if (b == 0)\n return a;\n return gcd(b, a % b);\n }\n\n final int maxn = 1000005;\n\n void solve() {\n int n, m;\n n = sc.ni();\n m = sc.ni();\n long sum = 0;\n for (int i = 0; i < m; i++) {\n int a = sc.ni();\n sum += (long) a;\n }\n if (sum > n)\n out.println(-1);\n else\n out.println(n - sum);\n }\n }", "solver", "DecimalFormat df = new DecimalFormat(\"0.00000000000000000000\");", "df", "new DecimalFormat(\"0.00000000000000000000\")", "long max = 1000000000000000l", "max", "1000000000000000l", "min = -10000000000000000l;", "min", "-10000000000000000l", "10000000000000000l", "long mod = (long) 1e9 + 7;", "mod", "(long) 1e9 + 7", "(long) 1e9", "7", "final int maxn = 1000005;", "maxn", "1000005", "long pro(long a, long b) {\n return (a % mod * b % mod) % mod;\n }", "pro", "{\n return (a % mod * b % mod) % mod;\n }", "return (a % mod * b % mod) % mod;", "(a % mod * b % mod) % mod", "(a % mod * b % mod)", "a % mod * b", "a % mod", "a", "mod", "b", "mod", "mod", "long a", "a", "long b", "b", "long add(long a, long b) {\n return (a + b) % mod;\n }", "add", "{\n return (a + b) % mod;\n }", "return (a + b) % mod;", "(a + b) % mod", "(a + b)", "a", "b", "mod", "long a", "a", "long b", "b", "long sub(long a, long b) {\n return ((a % mod - b % mod) + mod) % mod;\n }", "sub", "{\n return ((a % mod - b % mod) + mod) % mod;\n }", "return ((a % mod - b % mod) + mod) % mod;", "((a % mod - b % mod) + mod) % mod", "((a % mod - b % mod) + mod)", "(a % mod - b % mod)", "a % mod", "a", "mod", "b % mod", "b", "mod", "mod", "mod", "long a", "a", "long b", "b", "long ncr3(long n) {\n return (n * (n - 1) * (n - 2)) / 6l;\n }", "ncr3", "{\n return (n * (n - 1) * (n - 2)) / 6l;\n }", "return (n * (n - 1) * (n - 2)) / 6l;", "(n * (n - 1) * (n - 2)) / 6l", "(n * (n - 1) * (n - 2))", "n * (n - 1) * (n - 2)", "n", "(n - 1)", "n", "1", "(n - 2)", "n", "2", "6l", "long n", "n", "long ncr2(long n) {\n return n * (n - 1) / 2l;\n }", "ncr2", "{\n return n * (n - 1) / 2l;\n }", "return n * (n - 1) / 2l;", "n * (n - 1) / 2l", "n * (n - 1)", "n", "(n - 1)", "n", "1", "2l", "long n", "n", "long modPow(long x, long y) {\n long res = 1;\n x = x % mod;\n while (y > 0) {\n if (y % 2 != 0)\n res = pro(res, x);\n x = pro(x, x);\n y = y >> 1;\n }\n return res;\n }", "modPow", "{\n long res = 1;\n x = x % mod;\n while (y > 0) {\n if (y % 2 != 0)\n res = pro(res, x);\n x = pro(x, x);\n y = y >> 1;\n }\n return res;\n }", "long res = 1;", "res", "1", "x = x % mod", "x", "x % mod", "x", "mod", "while (y > 0) {\n if (y % 2 != 0)\n res = pro(res, x);\n x = pro(x, x);\n y = y >> 1;\n }", "y > 0", "y", "0", "{\n if (y % 2 != 0)\n res = pro(res, x);\n x = pro(x, x);\n y = y >> 1;\n }", "if (y % 2 != 0)\n res = pro(res, x);", "y % 2 != 0", "y % 2", "y", "2", "0", "res = pro(res, x)", "res", "pro(res, x)", "pro", "res", "x", "x = pro(x, x)", "x", "pro(x, x)", "pro", "x", "x", "y = y >> 1", "y", "y >> 1", "y", "1", "return res;", "res", "long x", "x", "long y", "y", "int gcd(int a, int b) {\n if (b == 0)\n return a;\n return gcd(b, a % b);\n }", "gcd", "{\n if (b == 0)\n return a;\n return gcd(b, a % b);\n }", "if (b == 0)\n return a;", "b == 0", "b", "0", "return a;", "a", "return gcd(b, a % b);", "gcd(b, a % b)", "gcd", "b", "a % b", "a", "b", "int a", "a", "int b", "b", "void solve() {\n int n, m;\n n = sc.ni();\n m = sc.ni();\n long sum = 0;\n for (int i = 0; i < m; i++) {\n int a = sc.ni();\n sum += (long) a;\n }\n if (sum > n)\n out.println(-1);\n else\n out.println(n - sum);\n }", "solve", "{\n int n, m;\n n = sc.ni();\n m = sc.ni();\n long sum = 0;\n for (int i = 0; i < m; i++) {\n int a = sc.ni();\n sum += (long) a;\n }\n if (sum > n)\n out.println(-1);\n else\n out.println(n - sum);\n }", "int n", "n", "m;", "m", "n = sc.ni()", "n", "sc.ni()", "sc.ni", "sc", "m = sc.ni()", "m", "sc.ni()", "sc.ni", "sc", "long sum = 0;", "sum", "0", "for (int i = 0; i < m; i++) {\n int a = sc.ni();\n sum += (long) a;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < m", "i", "m", "i++", "i++", "i", "{\n int a = sc.ni();\n sum += (long) a;\n }", "{\n int a = sc.ni();\n sum += (long) a;\n }", "int a = sc.ni();", "a", "sc.ni()", "sc.ni", "sc", "sum += (long) a", "sum", "(long) a", "if (sum > n)\n out.println(-1);\n else\n out.println(n - sum);", "sum > n", "sum", "n", "out.println(-1)", "out.println", "out", "-1", "1", "out.println(n - sum)", "out.println", "out", "n - sum", "n", "sum", "public class Main {\n\n static InputReader sc = new InputReader(System.in);\n static PrintWriter out = new PrintWriter(System.out);\n\n public static void main(String[] args) throws IOException {\n solver s = new solver();\n int t = 1;\n while (t > 0) {\n s.solve();\n t--;\n }\n out.close();\n }\n\n static class InputReader {\n\n public BufferedReader br;\n public StringTokenizer token;\n\n public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream), 32768);\n token = null;\n }\n\n public String sn() {\n while (token == null || !token.hasMoreTokens()) {\n try {\n token = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return token.nextToken();\n }\n\n public int ni() {\n return Integer.parseInt(sn());\n }\n\n public String snl() throws IOException {\n return br.readLine();\n }\n\n public long nlo() {\n return Long.parseLong(sn());\n }\n\n public double nd() {\n return Double.parseDouble(sn());\n }\n\n public int[] na(int n) {\n int a[] = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.ni();\n return a;\n }\n\n public long[] nal(int n) {\n long a[] = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.nlo();\n return a;\n }\n }\n\n static int inf = 5000013;\n\n static class solver {\n DecimalFormat df = new DecimalFormat(\"0.00000000000000000000\");\n long max = 1000000000000000l, min = -10000000000000000l;\n long mod = (long) 1e9 + 7;\n\n long pro(long a, long b) {\n return (a % mod * b % mod) % mod;\n }\n\n long add(long a, long b) {\n return (a + b) % mod;\n }\n\n long sub(long a, long b) {\n return ((a % mod - b % mod) + mod) % mod;\n }\n\n long ncr3(long n) {\n return (n * (n - 1) * (n - 2)) / 6l;\n }\n\n long ncr2(long n) {\n return n * (n - 1) / 2l;\n }\n\n long modPow(long x, long y) {\n long res = 1;\n x = x % mod;\n while (y > 0) {\n if (y % 2 != 0)\n res = pro(res, x);\n x = pro(x, x);\n y = y >> 1;\n }\n return res;\n }\n\n int gcd(int a, int b) {\n if (b == 0)\n return a;\n return gcd(b, a % b);\n }\n\n final int maxn = 1000005;\n\n void solve() {\n int n, m;\n n = sc.ni();\n m = sc.ni();\n long sum = 0;\n for (int i = 0; i < m; i++) {\n int a = sc.ni();\n sum += (long) a;\n }\n if (sum > n)\n out.println(-1);\n else\n out.println(n - sum);\n }\n }\n}", "public class Main {\n\n static InputReader sc = new InputReader(System.in);\n static PrintWriter out = new PrintWriter(System.out);\n\n public static void main(String[] args) throws IOException {\n solver s = new solver();\n int t = 1;\n while (t > 0) {\n s.solve();\n t--;\n }\n out.close();\n }\n\n static class InputReader {\n\n public BufferedReader br;\n public StringTokenizer token;\n\n public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream), 32768);\n token = null;\n }\n\n public String sn() {\n while (token == null || !token.hasMoreTokens()) {\n try {\n token = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return token.nextToken();\n }\n\n public int ni() {\n return Integer.parseInt(sn());\n }\n\n public String snl() throws IOException {\n return br.readLine();\n }\n\n public long nlo() {\n return Long.parseLong(sn());\n }\n\n public double nd() {\n return Double.parseDouble(sn());\n }\n\n public int[] na(int n) {\n int a[] = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.ni();\n return a;\n }\n\n public long[] nal(int n) {\n long a[] = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.nlo();\n return a;\n }\n }\n\n static int inf = 5000013;\n\n static class solver {\n DecimalFormat df = new DecimalFormat(\"0.00000000000000000000\");\n long max = 1000000000000000l, min = -10000000000000000l;\n long mod = (long) 1e9 + 7;\n\n long pro(long a, long b) {\n return (a % mod * b % mod) % mod;\n }\n\n long add(long a, long b) {\n return (a + b) % mod;\n }\n\n long sub(long a, long b) {\n return ((a % mod - b % mod) + mod) % mod;\n }\n\n long ncr3(long n) {\n return (n * (n - 1) * (n - 2)) / 6l;\n }\n\n long ncr2(long n) {\n return n * (n - 1) / 2l;\n }\n\n long modPow(long x, long y) {\n long res = 1;\n x = x % mod;\n while (y > 0) {\n if (y % 2 != 0)\n res = pro(res, x);\n x = pro(x, x);\n y = y >> 1;\n }\n return res;\n }\n\n int gcd(int a, int b) {\n if (b == 0)\n return a;\n return gcd(b, a % b);\n }\n\n final int maxn = 1000005;\n\n void solve() {\n int n, m;\n n = sc.ni();\n m = sc.ni();\n long sum = 0;\n for (int i = 0; i < m; i++) {\n int a = sc.ni();\n sum += (long) a;\n }\n if (sum > n)\n out.println(-1);\n else\n out.println(n - sum);\n }\n }\n}", "Main" ]
import java.io.*; import java.text.*; import java.util.*; public class Main { static InputReader sc = new InputReader(System.in); static PrintWriter out = new PrintWriter(System.out); public static void main(String[] args) throws IOException { solver s = new solver(); int t = 1; while (t > 0) { s.solve(); t--; } out.close(); } static class InputReader { public BufferedReader br; public StringTokenizer token; public InputReader(InputStream stream) { br = new BufferedReader(new InputStreamReader(stream), 32768); token = null; } public String sn() { while (token == null || !token.hasMoreTokens()) { try { token = new StringTokenizer(br.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return token.nextToken(); } public int ni() { return Integer.parseInt(sn()); } public String snl() throws IOException { return br.readLine(); } public long nlo() { return Long.parseLong(sn()); } public double nd() { return Double.parseDouble(sn()); } public int[] na(int n) { int a[] = new int[n]; for (int i = 0; i < n; i++) a[i] = sc.ni(); return a; } public long[] nal(int n) { long a[] = new long[n]; for (int i = 0; i < n; i++) a[i] = sc.nlo(); return a; } } static int inf = 5000013; static class solver { DecimalFormat df = new DecimalFormat("0.00000000000000000000"); long max = 1000000000000000l, min = -10000000000000000l; long mod = (long) 1e9 + 7; long pro(long a, long b) { return (a % mod * b % mod) % mod; } long add(long a, long b) { return (a + b) % mod; } long sub(long a, long b) { return ((a % mod - b % mod) + mod) % mod; } long ncr3(long n) { return (n * (n - 1) * (n - 2)) / 6l; } long ncr2(long n) { return n * (n - 1) / 2l; } long modPow(long x, long y) { long res = 1; x = x % mod; while (y > 0) { if (y % 2 != 0) res = pro(res, x); x = pro(x, x); y = y >> 1; } return res; } int gcd(int a, int b) { if (b == 0) return a; return gcd(b, a % b); } final int maxn = 1000005; void solve() { int n, m; n = sc.ni(); m = sc.ni(); long sum = 0; for (int i = 0; i < m; i++) { int a = sc.ni(); sum += (long) a; } if (sum > n) out.println(-1); else out.println(n - sum); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 2, 13, 18, 13, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 40, 17, 29, 0, 13, 2, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 26, 31 ], [ 31, 32 ], [ 31, 33 ], [ 26, 34 ], [ 34, 35 ], [ 35, 36 ], [ 26, 37 ], [ 38, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 39, 43 ], [ 43, 44 ], [ 44, 45 ], [ 8, 46 ], [ 46, 47 ], [ 46, 48 ], [ 8, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 49, 54 ], [ 54, 55 ], [ 54, 56 ], [ 49, 57 ], [ 57, 58 ], [ 58, 59 ], [ 49, 60 ], [ 61, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 66, 68 ], [ 8, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 69, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 74, 79 ], [ 79, 80 ], [ 73, 81 ], [ 8, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 84, 86 ], [ 8, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 87, 92 ], [ 6, 93 ], [ 93, 94 ] ]
[ "\nimport java.util.*;\nclass Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int m = sc.nextInt();\n int a[] = new int[m];\n for(int i=0;i<m;i++){\n a[i] = sc.nextInt();\n }\n int sum = 0;\n for(int j=0;j<m;j++){\n sum = sum + a[j];\n }\n if(sum>n){\n System.out.println(-1);\n return;\n }\n n = n - sum;\n System.out.println(n);\n } \n}", "import java.util.*;", "util.*", "java", "class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int m = sc.nextInt();\n int a[] = new int[m];\n for(int i=0;i<m;i++){\n a[i] = sc.nextInt();\n }\n int sum = 0;\n for(int j=0;j<m;j++){\n sum = sum + a[j];\n }\n if(sum>n){\n System.out.println(-1);\n return;\n }\n n = n - sum;\n System.out.println(n);\n } \n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int m = sc.nextInt();\n int a[] = new int[m];\n for(int i=0;i<m;i++){\n a[i] = sc.nextInt();\n }\n int sum = 0;\n for(int j=0;j<m;j++){\n sum = sum + a[j];\n }\n if(sum>n){\n System.out.println(-1);\n return;\n }\n n = n - sum;\n System.out.println(n);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int m = sc.nextInt();\n int a[] = new int[m];\n for(int i=0;i<m;i++){\n a[i] = sc.nextInt();\n }\n int sum = 0;\n for(int j=0;j<m;j++){\n sum = sum + a[j];\n }\n if(sum>n){\n System.out.println(-1);\n return;\n }\n n = n - sum;\n System.out.println(n);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int m = sc.nextInt();", "m", "sc.nextInt()", "sc.nextInt", "sc", "int a[] = new int[m];", "a", "new int[m]", "m", "for(int i=0;i<m;i++){\n a[i] = sc.nextInt();\n }", "int i=0;", "int i=0;", "i", "0", "i<m", "i", "m", "i++", "i++", "i", "{\n a[i] = sc.nextInt();\n }", "{\n a[i] = sc.nextInt();\n }", "a[i] = sc.nextInt()", "a[i]", "a", "i", "sc.nextInt()", "sc.nextInt", "sc", "int sum = 0;", "sum", "0", "for(int j=0;j<m;j++){\n sum = sum + a[j];\n }", "int j=0;", "int j=0;", "j", "0", "j<m", "j", "m", "j++", "j++", "j", "{\n sum = sum + a[j];\n }", "{\n sum = sum + a[j];\n }", "sum = sum + a[j]", "sum", "sum + a[j]", "sum", "a[j]", "a", "j", "if(sum>n){\n System.out.println(-1);\n return;\n }", "sum>n", "sum", "n", "{\n System.out.println(-1);\n return;\n }", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "return;", "n = n - sum", "n", "n - sum", "n", "sum", "System.out.println(n)", "System.out.println", "System.out", "System", "System.out", "n", "String[] args", "args" ]
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int a[] = new int[m]; for(int i=0;i<m;i++){ a[i] = sc.nextInt(); } int sum = 0; for(int j=0;j<m;j++){ sum = sum + a[j]; } if(sum>n){ System.out.println(-1); return; } n = n - sum; System.out.println(n); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 0, 18, 13, 13, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 13, 2, 13, 18, 13, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 97, 5 ], [ 97, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 26, 31 ], [ 31, 32 ], [ 31, 33 ], [ 26, 34 ], [ 34, 35 ], [ 35, 36 ], [ 26, 37 ], [ 38, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 42, 43 ], [ 38, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 44, 48 ], [ 8, 49 ], [ 49, 50 ], [ 49, 51 ], [ 8, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 52, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 59, 61 ], [ 52, 62 ], [ 62, 63 ], [ 63, 64 ], [ 52, 65 ], [ 66, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 71, 73 ], [ 8, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 74, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 79, 84 ], [ 74, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 86, 91 ], [ 91, 92 ], [ 91, 93 ], [ 6, 94 ], [ 94, 95 ], [ 0, 96 ], [ 96, 97 ], [ 96, 98 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint N = scan.nextInt();\n\t\tint M = scan.nextInt();\n\n\t\tInteger[] aList = new Integer[M];\n\t\tfor (int i = 0; i < M; i++) {\n\t\t\tint a = scan.nextInt();\n\t\t\taList[i] = a;\n\t\t}\n\n\t\tint wDay = 0;\n\t\tfor (int i = 0; i < aList.length; i++) {\n\t\t\twDay = wDay + aList[i];\n\t\t}\n\n\t\tif (N < wDay) {\n\t\t\tSystem.out.println(\"-1\");\n\t\t} else {\n\t\t\tSystem.out.println(N - wDay);\n\t\t}\n\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint N = scan.nextInt();\n\t\tint M = scan.nextInt();\n\n\t\tInteger[] aList = new Integer[M];\n\t\tfor (int i = 0; i < M; i++) {\n\t\t\tint a = scan.nextInt();\n\t\t\taList[i] = a;\n\t\t}\n\n\t\tint wDay = 0;\n\t\tfor (int i = 0; i < aList.length; i++) {\n\t\t\twDay = wDay + aList[i];\n\t\t}\n\n\t\tif (N < wDay) {\n\t\t\tSystem.out.println(\"-1\");\n\t\t} else {\n\t\t\tSystem.out.println(N - wDay);\n\t\t}\n\n\t}\n}", "Main", "public static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint N = scan.nextInt();\n\t\tint M = scan.nextInt();\n\n\t\tInteger[] aList = new Integer[M];\n\t\tfor (int i = 0; i < M; i++) {\n\t\t\tint a = scan.nextInt();\n\t\t\taList[i] = a;\n\t\t}\n\n\t\tint wDay = 0;\n\t\tfor (int i = 0; i < aList.length; i++) {\n\t\t\twDay = wDay + aList[i];\n\t\t}\n\n\t\tif (N < wDay) {\n\t\t\tSystem.out.println(\"-1\");\n\t\t} else {\n\t\t\tSystem.out.println(N - wDay);\n\t\t}\n\n\t}", "main", "{\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint N = scan.nextInt();\n\t\tint M = scan.nextInt();\n\n\t\tInteger[] aList = new Integer[M];\n\t\tfor (int i = 0; i < M; i++) {\n\t\t\tint a = scan.nextInt();\n\t\t\taList[i] = a;\n\t\t}\n\n\t\tint wDay = 0;\n\t\tfor (int i = 0; i < aList.length; i++) {\n\t\t\twDay = wDay + aList[i];\n\t\t}\n\n\t\tif (N < wDay) {\n\t\t\tSystem.out.println(\"-1\");\n\t\t} else {\n\t\t\tSystem.out.println(N - wDay);\n\t\t}\n\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int N = scan.nextInt();", "N", "scan.nextInt()", "scan.nextInt", "scan", "int M = scan.nextInt();", "M", "scan.nextInt()", "scan.nextInt", "scan", "Integer[] aList = new Integer[M];", "aList", "new Integer[M]", "M", "for (int i = 0; i < M; i++) {\n\t\t\tint a = scan.nextInt();\n\t\t\taList[i] = a;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < M", "i", "M", "i++", "i++", "i", "{\n\t\t\tint a = scan.nextInt();\n\t\t\taList[i] = a;\n\t\t}", "{\n\t\t\tint a = scan.nextInt();\n\t\t\taList[i] = a;\n\t\t}", "int a = scan.nextInt();", "a", "scan.nextInt()", "scan.nextInt", "scan", "aList[i] = a", "aList[i]", "aList", "i", "a", "int wDay = 0;", "wDay", "0", "for (int i = 0; i < aList.length; i++) {\n\t\t\twDay = wDay + aList[i];\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < aList.length", "i", "aList.length", "aList", "aList.length", "i++", "i++", "i", "{\n\t\t\twDay = wDay + aList[i];\n\t\t}", "{\n\t\t\twDay = wDay + aList[i];\n\t\t}", "wDay = wDay + aList[i]", "wDay", "wDay + aList[i]", "wDay", "aList[i]", "aList", "i", "if (N < wDay) {\n\t\t\tSystem.out.println(\"-1\");\n\t\t} else {\n\t\t\tSystem.out.println(N - wDay);\n\t\t}", "N < wDay", "N", "wDay", "{\n\t\t\tSystem.out.println(\"-1\");\n\t\t}", "System.out.println(\"-1\")", "System.out.println", "System.out", "System", "System.out", "\"-1\"", "{\n\t\t\tSystem.out.println(N - wDay);\n\t\t}", "System.out.println(N - wDay)", "System.out.println", "System.out", "System", "System.out", "N - wDay", "N", "wDay", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint N = scan.nextInt();\n\t\tint M = scan.nextInt();\n\n\t\tInteger[] aList = new Integer[M];\n\t\tfor (int i = 0; i < M; i++) {\n\t\t\tint a = scan.nextInt();\n\t\t\taList[i] = a;\n\t\t}\n\n\t\tint wDay = 0;\n\t\tfor (int i = 0; i < aList.length; i++) {\n\t\t\twDay = wDay + aList[i];\n\t\t}\n\n\t\tif (N < wDay) {\n\t\t\tSystem.out.println(\"-1\");\n\t\t} else {\n\t\t\tSystem.out.println(N - wDay);\n\t\t}\n\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint N = scan.nextInt();\n\t\tint M = scan.nextInt();\n\n\t\tInteger[] aList = new Integer[M];\n\t\tfor (int i = 0; i < M; i++) {\n\t\t\tint a = scan.nextInt();\n\t\t\taList[i] = a;\n\t\t}\n\n\t\tint wDay = 0;\n\t\tfor (int i = 0; i < aList.length; i++) {\n\t\t\twDay = wDay + aList[i];\n\t\t}\n\n\t\tif (N < wDay) {\n\t\t\tSystem.out.println(\"-1\");\n\t\t} else {\n\t\t\tSystem.out.println(N - wDay);\n\t\t}\n\n\t}\n}", "Main" ]
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(); Integer[] aList = new Integer[M]; for (int i = 0; i < M; i++) { int a = scan.nextInt(); aList[i] = a; } int wDay = 0; for (int i = 0; i < aList.length; i++) { wDay = wDay + aList[i]; } if (N < wDay) { System.out.println("-1"); } else { System.out.println(N - wDay); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 41, 13, 0, 13, 2, 13, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 30, 4, 18, 18, 13, 13, 17, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 78, 5 ], [ 78, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 26 ], [ 26, 27 ], [ 26, 28 ], [ 8, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 29, 34 ], [ 34, 35 ], [ 34, 36 ], [ 29, 37 ], [ 37, 38 ], [ 38, 39 ], [ 29, 40 ], [ 41, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 8, 47 ], [ 47, 48 ], [ 8, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 51, 53 ], [ 8, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 54, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 59, 64 ], [ 54, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 8, 72 ], [ 72, 73 ], [ 73, 74 ], [ 6, 75 ], [ 75, 76 ], [ 0, 77 ], [ 77, 78 ], [ 77, 79 ] ]
[ "import java.util.Scanner;\n \npublic class Main {\n \n public static void main(String[] args) {\n \n Scanner scanner = new Scanner(System.in);\n \n int vacation = scanner.nextInt();\n int homeworkNumber = scanner.nextInt();\n int[] daysSpentInHomework = new int[homeworkNumber];\n int studyDay = 0;\n \n for (int i = 0; i < homeworkNumber; i++) {\n studyDay += scanner.nextInt();\n }\n \n int playable;\n \n playable = vacation - studyDay;\n \n if (playable >= 0) {\n \n System.out.println(playable);\n } else {\n System.out.println(\"-1\");\n }\n \n scanner.close();\n \n }\n \n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n \n public static void main(String[] args) {\n \n Scanner scanner = new Scanner(System.in);\n \n int vacation = scanner.nextInt();\n int homeworkNumber = scanner.nextInt();\n int[] daysSpentInHomework = new int[homeworkNumber];\n int studyDay = 0;\n \n for (int i = 0; i < homeworkNumber; i++) {\n studyDay += scanner.nextInt();\n }\n \n int playable;\n \n playable = vacation - studyDay;\n \n if (playable >= 0) {\n \n System.out.println(playable);\n } else {\n System.out.println(\"-1\");\n }\n \n scanner.close();\n \n }\n \n}", "Main", "public static void main(String[] args) {\n \n Scanner scanner = new Scanner(System.in);\n \n int vacation = scanner.nextInt();\n int homeworkNumber = scanner.nextInt();\n int[] daysSpentInHomework = new int[homeworkNumber];\n int studyDay = 0;\n \n for (int i = 0; i < homeworkNumber; i++) {\n studyDay += scanner.nextInt();\n }\n \n int playable;\n \n playable = vacation - studyDay;\n \n if (playable >= 0) {\n \n System.out.println(playable);\n } else {\n System.out.println(\"-1\");\n }\n \n scanner.close();\n \n }", "main", "{\n \n Scanner scanner = new Scanner(System.in);\n \n int vacation = scanner.nextInt();\n int homeworkNumber = scanner.nextInt();\n int[] daysSpentInHomework = new int[homeworkNumber];\n int studyDay = 0;\n \n for (int i = 0; i < homeworkNumber; i++) {\n studyDay += scanner.nextInt();\n }\n \n int playable;\n \n playable = vacation - studyDay;\n \n if (playable >= 0) {\n \n System.out.println(playable);\n } else {\n System.out.println(\"-1\");\n }\n \n scanner.close();\n \n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int vacation = scanner.nextInt();", "vacation", "scanner.nextInt()", "scanner.nextInt", "scanner", "int homeworkNumber = scanner.nextInt();", "homeworkNumber", "scanner.nextInt()", "scanner.nextInt", "scanner", "int[] daysSpentInHomework = new int[homeworkNumber];", "daysSpentInHomework", "new int[homeworkNumber]", "homeworkNumber", "int studyDay = 0;", "studyDay", "0", "for (int i = 0; i < homeworkNumber; i++) {\n studyDay += scanner.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < homeworkNumber", "i", "homeworkNumber", "i++", "i++", "i", "{\n studyDay += scanner.nextInt();\n }", "{\n studyDay += scanner.nextInt();\n }", "studyDay += scanner.nextInt()", "studyDay", "scanner.nextInt()", "scanner.nextInt", "scanner", "int playable;", "playable", "playable = vacation - studyDay", "playable", "vacation - studyDay", "vacation", "studyDay", "if (playable >= 0) {\n \n System.out.println(playable);\n } else {\n System.out.println(\"-1\");\n }", "playable >= 0", "playable", "0", "{\n \n System.out.println(playable);\n }", "System.out.println(playable)", "System.out.println", "System.out", "System", "System.out", "playable", "{\n System.out.println(\"-1\");\n }", "System.out.println(\"-1\")", "System.out.println", "System.out", "System", "System.out", "\"-1\"", "scanner.close()", "scanner.close", "scanner", "String[] args", "args", "public class Main {\n \n public static void main(String[] args) {\n \n Scanner scanner = new Scanner(System.in);\n \n int vacation = scanner.nextInt();\n int homeworkNumber = scanner.nextInt();\n int[] daysSpentInHomework = new int[homeworkNumber];\n int studyDay = 0;\n \n for (int i = 0; i < homeworkNumber; i++) {\n studyDay += scanner.nextInt();\n }\n \n int playable;\n \n playable = vacation - studyDay;\n \n if (playable >= 0) {\n \n System.out.println(playable);\n } else {\n System.out.println(\"-1\");\n }\n \n scanner.close();\n \n }\n \n}", "public class Main {\n \n public static void main(String[] args) {\n \n Scanner scanner = new Scanner(System.in);\n \n int vacation = scanner.nextInt();\n int homeworkNumber = scanner.nextInt();\n int[] daysSpentInHomework = new int[homeworkNumber];\n int studyDay = 0;\n \n for (int i = 0; i < homeworkNumber; i++) {\n studyDay += scanner.nextInt();\n }\n \n int playable;\n \n playable = vacation - studyDay;\n \n if (playable >= 0) {\n \n System.out.println(playable);\n } else {\n System.out.println(\"-1\");\n }\n \n scanner.close();\n \n }\n \n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int vacation = scanner.nextInt(); int homeworkNumber = scanner.nextInt(); int[] daysSpentInHomework = new int[homeworkNumber]; int studyDay = 0; for (int i = 0; i < homeworkNumber; i++) { studyDay += scanner.nextInt(); } int playable; playable = vacation - studyDay; if (playable >= 0) { System.out.println(playable); } else { System.out.println("-1"); } scanner.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 17, 42, 2, 40, 13, 17, 4, 13, 23, 13, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 0, 13, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 12, 13, 30, 29, 8, 2, 13, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 29, 8, 2, 13, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 29, 8, 2, 13, 17, 13, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 41, 13, 17, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 4, 18, 13, 29, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 15, 16 ], [ 15, 17 ], [ 13, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 20, 24 ], [ 24, 25 ], [ 25, 26 ], [ 26, 27 ], [ 25, 28 ], [ 24, 29 ], [ 29, 30 ], [ 18, 31 ], [ 31, 32 ], [ 13, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 39, 40 ], [ 35, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 44, 45 ], [ 35, 46 ], [ 46, 47 ], [ 35, 48 ], [ 48, 49 ], [ 48, 50 ], [ 35, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 51, 56 ], [ 56, 57 ], [ 56, 58 ], [ 51, 59 ], [ 59, 60 ], [ 60, 61 ], [ 51, 62 ], [ 63, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 67, 68 ], [ 63, 69 ], [ 69, 70 ], [ 69, 71 ], [ 35, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 72, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 77, 82 ], [ 72, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 84, 89 ], [ 89, 90 ], [ 89, 91 ], [ 13, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 96, 100 ], [ 96, 101 ], [ 92, 102 ], [ 102, 103 ], [ 92, 104 ], [ 104, 105 ], [ 13, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 110, 114 ], [ 110, 115 ], [ 106, 116 ], [ 116, 117 ], [ 106, 118 ], [ 118, 119 ], [ 13, 120 ], [ 120, 121 ], [ 120, 122 ], [ 122, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 124, 128 ], [ 124, 129 ], [ 129, 130 ], [ 129, 131 ], [ 129, 132 ], [ 132, 133 ], [ 132, 134 ], [ 120, 135 ], [ 135, 136 ], [ 120, 137 ], [ 137, 138 ], [ 13, 139 ], [ 139, 140 ], [ 139, 141 ], [ 141, 142 ], [ 139, 143 ], [ 143, 144 ], [ 139, 145 ], [ 145, 146 ], [ 145, 147 ], [ 147, 148 ], [ 148, 149 ], [ 148, 150 ], [ 139, 151 ], [ 151, 152 ], [ 151, 153 ], [ 153, 154 ], [ 154, 155 ], [ 155, 156 ], [ 156, 157 ], [ 156, 158 ], [ 155, 159 ], [ 159, 160 ], [ 160, 161 ], [ 161, 162 ], [ 154, 163 ], [ 163, 164 ], [ 164, 165 ], [ 165, 166 ], [ 165, 167 ], [ 167, 168 ], [ 168, 169 ], [ 169, 170 ], [ 164, 171 ], [ 171, 172 ], [ 172, 173 ], [ 172, 174 ], [ 153, 175 ], [ 175, 176 ], [ 176, 177 ], [ 177, 178 ], [ 139, 179 ], [ 179, 180 ], [ 179, 181 ], [ 181, 182 ], [ 182, 183 ], [ 183, 184 ], [ 184, 185 ], [ 183, 186 ], [ 186, 187 ], [ 139, 188 ], [ 188, 189 ], [ 188, 190 ], [ 190, 191 ], [ 191, 192 ], [ 192, 193 ], [ 193, 194 ], [ 192, 195 ], [ 195, 196 ], [ 139, 197 ], [ 197, 198 ], [ 197, 199 ], [ 199, 200 ], [ 200, 201 ], [ 201, 202 ], [ 202, 203 ], [ 201, 204 ], [ 204, 205 ], [ 139, 206 ], [ 206, 207 ], [ 206, 208 ], [ 208, 209 ], [ 209, 210 ], [ 209, 211 ], [ 208, 212 ], [ 212, 213 ], [ 213, 214 ], [ 213, 215 ], [ 215, 216 ], [ 216, 217 ], [ 217, 218 ], [ 212, 219 ], [ 219, 220 ], [ 220, 221 ], [ 220, 222 ], [ 222, 223 ], [ 223, 224 ], [ 208, 225 ], [ 225, 226 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\n/**\n *\n * @author Milo\n */\nclass Main {\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n \n public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n \n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n \n int nextInt() {\n return Integer.parseInt(next());\n }\n \n long nextLong() {\n return Long.parseLong(next());\n }\n \n double nextDouble() {\n return Double.parseDouble(next());\n }\n \n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n static FastReader in = new FastReader();\n public static void main(String[] args) {\n int t = 1; //in.nextInt();\n while (t-- > 0)\n solve();\n }\n \n public static void solve() {\n \n int N = in.nextInt();\n int M = in.nextInt();\n int t;\n long sum = 0;\n \n for(int i = 0; i < M; ++i){\n t = in.nextInt();\n sum += t;\n }\n if(sum > N){\n System.out.println(\"-1\");\n }else{\n System.out.println((N-sum));\n }\n }\n \n public static int max(int a, int b) {\n return a > b ? a : b;\n }\n \n public static int min(int a, int b) {\n return a < b ? a : b;\n }\n \n public static int gcd(int a, int b) {\n return b == 0 ? a : gcd(b, (a % b));\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.StringTokenizer;", "StringTokenizer", "java.util", "class Main {\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n \n public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n \n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n \n int nextInt() {\n return Integer.parseInt(next());\n }\n \n long nextLong() {\n return Long.parseLong(next());\n }\n \n double nextDouble() {\n return Double.parseDouble(next());\n }\n \n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n static FastReader in = new FastReader();\n public static void main(String[] args) {\n int t = 1; //in.nextInt();\n while (t-- > 0)\n solve();\n }\n \n public static void solve() {\n \n int N = in.nextInt();\n int M = in.nextInt();\n int t;\n long sum = 0;\n \n for(int i = 0; i < M; ++i){\n t = in.nextInt();\n sum += t;\n }\n if(sum > N){\n System.out.println(\"-1\");\n }else{\n System.out.println((N-sum));\n }\n }\n \n public static int max(int a, int b) {\n return a > b ? a : b;\n }\n \n public static int min(int a, int b) {\n return a < b ? a : b;\n }\n \n public static int gcd(int a, int b) {\n return b == 0 ? a : gcd(b, (a % b));\n }\n}", "Main", "static FastReader in = new FastReader();", "in", "new FastReader()", "public static void main(String[] args) {\n int t = 1; //in.nextInt();\n while (t-- > 0)\n solve();\n }", "main", "{\n int t = 1; //in.nextInt();\n while (t-- > 0)\n solve();\n }", "int t = 1;", "t", "1", "while (t-- > 0)\n solve();", "t-- > 0", "t--", "t", "0", "solve()", "solve", "String[] args", "args", "public static void solve() {\n \n int N = in.nextInt();\n int M = in.nextInt();\n int t;\n long sum = 0;\n \n for(int i = 0; i < M; ++i){\n t = in.nextInt();\n sum += t;\n }\n if(sum > N){\n System.out.println(\"-1\");\n }else{\n System.out.println((N-sum));\n }\n }", "solve", "{\n \n int N = in.nextInt();\n int M = in.nextInt();\n int t;\n long sum = 0;\n \n for(int i = 0; i < M; ++i){\n t = in.nextInt();\n sum += t;\n }\n if(sum > N){\n System.out.println(\"-1\");\n }else{\n System.out.println((N-sum));\n }\n }", "int N = in.nextInt();", "N", "in.nextInt()", "in.nextInt", "in", "int M = in.nextInt();", "M", "in.nextInt()", "in.nextInt", "in", "int t;", "t", "long sum = 0;", "sum", "0", "for(int i = 0; i < M; ++i){\n t = in.nextInt();\n sum += t;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < M", "i", "M", "++i", "++i", "i", "{\n t = in.nextInt();\n sum += t;\n }", "{\n t = in.nextInt();\n sum += t;\n }", "t = in.nextInt()", "t", "in.nextInt()", "in.nextInt", "in", "sum += t", "sum", "t", "if(sum > N){\n System.out.println(\"-1\");\n }else{\n System.out.println((N-sum));\n }", "sum > N", "sum", "N", "{\n System.out.println(\"-1\");\n }", "System.out.println(\"-1\")", "System.out.println", "System.out", "System", "System.out", "\"-1\"", "{\n System.out.println((N-sum));\n }", "System.out.println((N-sum))", "System.out.println", "System.out", "System", "System.out", "(N-sum)", "N", "sum", "public static int max(int a, int b) {\n return a > b ? a : b;\n }", "max", "{\n return a > b ? a : b;\n }", "return a > b ? a : b;", "a > b ? a : b", "a > b", "a", "b", "a", "b", "int a", "a", "int b", "b", "public static int min(int a, int b) {\n return a < b ? a : b;\n }", "min", "{\n return a < b ? a : b;\n }", "return a < b ? a : b;", "a < b ? a : b", "a < b", "a", "b", "a", "b", "int a", "a", "int b", "b", "public static int gcd(int a, int b) {\n return b == 0 ? a : gcd(b, (a % b));\n }", "gcd", "{\n return b == 0 ? a : gcd(b, (a % b));\n }", "return b == 0 ? a : gcd(b, (a % b));", "b == 0 ? a : gcd(b, (a % b))", "b == 0", "b", "0", "a", "gcd(b, (a % b))", "gcd", "b", "(a % b)", "a", "b", "int a", "a", "int b", "b", "static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n \n public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n \n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n \n int nextInt() {\n return Integer.parseInt(next());\n }\n \n long nextLong() {\n return Long.parseLong(next());\n }\n \n double nextDouble() {\n return Double.parseDouble(next());\n }\n \n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }", "FastReader", "BufferedReader br;", "br", "StringTokenizer st;", "st", "public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }", "FastReader", "{\n br = new BufferedReader(new InputStreamReader(System.in));\n }", "br = new BufferedReader(new InputStreamReader(System.in))", "br", "new BufferedReader(new InputStreamReader(System.in))", "String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "next", "{\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "st == null || !st.hasMoreElements()", "st == null", "st", "null", "!st.hasMoreElements()", "st.hasMoreElements()", "st.hasMoreElements", "st", "{\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }", "catch (IOException e) {\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n st = new StringTokenizer(br.readLine());\n }", "st = new StringTokenizer(br.readLine())", "st", "new StringTokenizer(br.readLine())", "return st.nextToken();", "st.nextToken()", "st.nextToken", "st", "int nextInt() {\n return Integer.parseInt(next());\n }", "nextInt", "{\n return Integer.parseInt(next());\n }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "long nextLong() {\n return Long.parseLong(next());\n }", "nextLong", "{\n return Long.parseLong(next());\n }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "double nextDouble() {\n return Double.parseDouble(next());\n }", "nextDouble", "{\n return Double.parseDouble(next());\n }", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }", "nextLine", "{\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }", "String str = \"\";", "str", "\"\"", "try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }", "catch (IOException e) {\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n str = br.readLine();\n }", "str = br.readLine()", "str", "br.readLine()", "br.readLine", "br", "return str;", "str" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; /** * * @author Milo */ class Main { static class FastReader { BufferedReader br; StringTokenizer st; public FastReader() { br = new BufferedReader(new InputStreamReader(System.in)); } String next() { while (st == null || !st.hasMoreElements()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { e.printStackTrace(); } } return st.nextToken(); } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } double nextDouble() { return Double.parseDouble(next()); } String nextLine() { String str = ""; try { str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } return str; } } static FastReader in = new FastReader(); public static void main(String[] args) { int t = 1; //in.nextInt(); while (t-- > 0) solve(); } public static void solve() { int N = in.nextInt(); int M = in.nextInt(); int t; long sum = 0; for(int i = 0; i < M; ++i){ t = in.nextInt(); sum += t; } if(sum > N){ System.out.println("-1"); }else{ System.out.println((N-sum)); } } public static int max(int a, int b) { return a > b ? a : b; } public static int min(int a, int b) { return a < b ? a : b; } public static int gcd(int a, int b) { return b == 0 ? a : gcd(b, (a % b)); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 2, 13, 18, 13, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 30, 4, 18, 18, 13, 13, 17, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 26, 31 ], [ 31, 32 ], [ 31, 33 ], [ 26, 34 ], [ 34, 35 ], [ 35, 36 ], [ 26, 37 ], [ 38, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 39, 43 ], [ 43, 44 ], [ 44, 45 ], [ 8, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 63, 65 ], [ 8, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 66, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 71, 76 ], [ 66, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 78, 83 ], [ 6, 84 ], [ 84, 85 ] ]
[ "import java.util.*;\nclass Main {\npublic static void main(String []args) {\n\tScanner sc = new Scanner (System.in);\n\tint n=sc.nextInt();\n\tint m=sc.nextInt();\n\tint arr[]=new int [m];\n\tfor(int i=0;i<m;i++) {\n\t\tarr[i]=sc.nextInt();\n\t}\n\tfor(int i=0;i<m;i++) {\n\t\tn=n-arr[i];\n\t}\n\tif(n>=0) {\n\t\tSystem.out.println(n);\n\t}\n\telse {\n\t\tSystem.out.println(\"-1\");\n\t}\n}\n}", "import java.util.*;", "util.*", "java", "class Main {\npublic static void main(String []args) {\n\tScanner sc = new Scanner (System.in);\n\tint n=sc.nextInt();\n\tint m=sc.nextInt();\n\tint arr[]=new int [m];\n\tfor(int i=0;i<m;i++) {\n\t\tarr[i]=sc.nextInt();\n\t}\n\tfor(int i=0;i<m;i++) {\n\t\tn=n-arr[i];\n\t}\n\tif(n>=0) {\n\t\tSystem.out.println(n);\n\t}\n\telse {\n\t\tSystem.out.println(\"-1\");\n\t}\n}\n}", "Main", "public static void main(String []args) {\n\tScanner sc = new Scanner (System.in);\n\tint n=sc.nextInt();\n\tint m=sc.nextInt();\n\tint arr[]=new int [m];\n\tfor(int i=0;i<m;i++) {\n\t\tarr[i]=sc.nextInt();\n\t}\n\tfor(int i=0;i<m;i++) {\n\t\tn=n-arr[i];\n\t}\n\tif(n>=0) {\n\t\tSystem.out.println(n);\n\t}\n\telse {\n\t\tSystem.out.println(\"-1\");\n\t}\n}", "main", "{\n\tScanner sc = new Scanner (System.in);\n\tint n=sc.nextInt();\n\tint m=sc.nextInt();\n\tint arr[]=new int [m];\n\tfor(int i=0;i<m;i++) {\n\t\tarr[i]=sc.nextInt();\n\t}\n\tfor(int i=0;i<m;i++) {\n\t\tn=n-arr[i];\n\t}\n\tif(n>=0) {\n\t\tSystem.out.println(n);\n\t}\n\telse {\n\t\tSystem.out.println(\"-1\");\n\t}\n}", "Scanner sc = new Scanner (System.in);", "sc", "new Scanner (System.in)", "int n=sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int m=sc.nextInt();", "m", "sc.nextInt()", "sc.nextInt", "sc", "int arr[]=new int [m];", "arr", "new int [m]", "m", "for(int i=0;i<m;i++) {\n\t\tarr[i]=sc.nextInt();\n\t}", "int i=0;", "int i=0;", "i", "0", "i<m", "i", "m", "i++", "i++", "i", "{\n\t\tarr[i]=sc.nextInt();\n\t}", "{\n\t\tarr[i]=sc.nextInt();\n\t}", "arr[i]=sc.nextInt()", "arr[i]", "arr", "i", "sc.nextInt()", "sc.nextInt", "sc", "for(int i=0;i<m;i++) {\n\t\tn=n-arr[i];\n\t}", "int i=0;", "int i=0;", "i", "0", "i<m", "i", "m", "i++", "i++", "i", "{\n\t\tn=n-arr[i];\n\t}", "{\n\t\tn=n-arr[i];\n\t}", "n=n-arr[i]", "n", "n-arr[i]", "n", "arr[i]", "arr", "i", "if(n>=0) {\n\t\tSystem.out.println(n);\n\t}\n\telse {\n\t\tSystem.out.println(\"-1\");\n\t}", "n>=0", "n", "0", "{\n\t\tSystem.out.println(n);\n\t}", "System.out.println(n)", "System.out.println", "System.out", "System", "System.out", "n", "{\n\t\tSystem.out.println(\"-1\");\n\t}", "System.out.println(\"-1\")", "System.out.println", "System.out", "System", "System.out", "\"-1\"", "String []args", "args" ]
import java.util.*; class Main { public static void main(String []args) { Scanner sc = new Scanner (System.in); int n=sc.nextInt(); int m=sc.nextInt(); int arr[]=new int [m]; for(int i=0;i<m;i++) { arr[i]=sc.nextInt(); } for(int i=0;i<m;i++) { n=n-arr[i]; } if(n>=0) { System.out.println(n); } else { System.out.println("-1"); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 30, 4, 18, 18, 13, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 64, 8 ], [ 64, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 11, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 11, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 11, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 48, 53 ], [ 43, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 55, 60 ], [ 9, 61 ], [ 61, 62 ], [ 0, 63 ], [ 63, 64 ], [ 63, 65 ] ]
[ "import java.util.*;\nimport java.lang.*;\n \npublic class Main {\n\tpublic static void main(String[] args) {\n\tScanner sc = new Scanner(System.in);\n\tint n = sc.nextInt();\n\tint m = sc.nextInt();\n\tfor(int i = 0; i < m; i++) {\n\t\tn -= sc.nextInt();\n\t}\n\tif(n >= 0) {\n\t\tSystem.out.println(n);\n\t}else{\n\t\tSystem.out.println(\"-1\");\n\t}\n\t}\n}", "import java.util.*;", "util.*", "java", "import java.lang.*;", "lang.*", "java", "public class Main {\n\tpublic static void main(String[] args) {\n\tScanner sc = new Scanner(System.in);\n\tint n = sc.nextInt();\n\tint m = sc.nextInt();\n\tfor(int i = 0; i < m; i++) {\n\t\tn -= sc.nextInt();\n\t}\n\tif(n >= 0) {\n\t\tSystem.out.println(n);\n\t}else{\n\t\tSystem.out.println(\"-1\");\n\t}\n\t}\n}", "Main", "public static void main(String[] args) {\n\tScanner sc = new Scanner(System.in);\n\tint n = sc.nextInt();\n\tint m = sc.nextInt();\n\tfor(int i = 0; i < m; i++) {\n\t\tn -= sc.nextInt();\n\t}\n\tif(n >= 0) {\n\t\tSystem.out.println(n);\n\t}else{\n\t\tSystem.out.println(\"-1\");\n\t}\n\t}", "main", "{\n\tScanner sc = new Scanner(System.in);\n\tint n = sc.nextInt();\n\tint m = sc.nextInt();\n\tfor(int i = 0; i < m; i++) {\n\t\tn -= sc.nextInt();\n\t}\n\tif(n >= 0) {\n\t\tSystem.out.println(n);\n\t}else{\n\t\tSystem.out.println(\"-1\");\n\t}\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int m = sc.nextInt();", "m", "sc.nextInt()", "sc.nextInt", "sc", "for(int i = 0; i < m; i++) {\n\t\tn -= sc.nextInt();\n\t}", "int i = 0;", "int i = 0;", "i", "0", "i < m", "i", "m", "i++", "i++", "i", "{\n\t\tn -= sc.nextInt();\n\t}", "{\n\t\tn -= sc.nextInt();\n\t}", "n -= sc.nextInt()", "n", "sc.nextInt()", "sc.nextInt", "sc", "if(n >= 0) {\n\t\tSystem.out.println(n);\n\t}else{\n\t\tSystem.out.println(\"-1\");\n\t}", "n >= 0", "n", "0", "{\n\t\tSystem.out.println(n);\n\t}", "System.out.println(n)", "System.out.println", "System.out", "System", "System.out", "n", "{\n\t\tSystem.out.println(\"-1\");\n\t}", "System.out.println(\"-1\")", "System.out.println", "System.out", "System", "System.out", "\"-1\"", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\tScanner sc = new Scanner(System.in);\n\tint n = sc.nextInt();\n\tint m = sc.nextInt();\n\tfor(int i = 0; i < m; i++) {\n\t\tn -= sc.nextInt();\n\t}\n\tif(n >= 0) {\n\t\tSystem.out.println(n);\n\t}else{\n\t\tSystem.out.println(\"-1\");\n\t}\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\tScanner sc = new Scanner(System.in);\n\tint n = sc.nextInt();\n\tint m = sc.nextInt();\n\tfor(int i = 0; i < m; i++) {\n\t\tn -= sc.nextInt();\n\t}\n\tif(n >= 0) {\n\t\tSystem.out.println(n);\n\t}else{\n\t\tSystem.out.println(\"-1\");\n\t}\n\t}\n}", "Main" ]
import java.util.*; import java.lang.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); for(int i = 0; i < m; i++) { n -= sc.nextInt(); } if(n >= 0) { System.out.println(n); }else{ System.out.println("-1"); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 18, 13, 13, 14, 2, 2, 13, 13, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 17, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 26 ], [ 26, 27 ], [ 26, 28 ], [ 8, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 29, 34 ], [ 34, 35 ], [ 34, 36 ], [ 29, 37 ], [ 37, 38 ], [ 38, 39 ], [ 29, 40 ], [ 41, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 42, 46 ], [ 46, 47 ], [ 47, 48 ], [ 8, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 49, 54 ], [ 54, 55 ], [ 54, 56 ], [ 49, 57 ], [ 57, 58 ], [ 58, 59 ], [ 49, 60 ], [ 61, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 64, 66 ], [ 8, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 68, 72 ], [ 67, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 74, 79 ], [ 79, 80 ], [ 79, 81 ], [ 67, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 83, 88 ], [ 6, 89 ], [ 89, 90 ] ]
[ "import java.util.Scanner;\n\nclass Main{\n public static void main(String[] args){\n Scanner stdIn = new Scanner(System.in);\n int N = stdIn.nextInt();\n int M = stdIn.nextInt();\n int[] A = new int[M];\n int Study_sum = 0;\n\n\n for (int i = 0; i<M; i++){\n A[i] = stdIn.nextInt();\n }\n \n for(int i=0; i<M; i++){\n Study_sum += A[i];\n }\n\n\n if ((N-Study_sum)>=0){\n System.out.print(N-Study_sum);\n }\n else{\n System.out.print(\"-1\");\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\n public static void main(String[] args){\n Scanner stdIn = new Scanner(System.in);\n int N = stdIn.nextInt();\n int M = stdIn.nextInt();\n int[] A = new int[M];\n int Study_sum = 0;\n\n\n for (int i = 0; i<M; i++){\n A[i] = stdIn.nextInt();\n }\n \n for(int i=0; i<M; i++){\n Study_sum += A[i];\n }\n\n\n if ((N-Study_sum)>=0){\n System.out.print(N-Study_sum);\n }\n else{\n System.out.print(\"-1\");\n }\n }\n}", "Main", "public static void main(String[] args){\n Scanner stdIn = new Scanner(System.in);\n int N = stdIn.nextInt();\n int M = stdIn.nextInt();\n int[] A = new int[M];\n int Study_sum = 0;\n\n\n for (int i = 0; i<M; i++){\n A[i] = stdIn.nextInt();\n }\n \n for(int i=0; i<M; i++){\n Study_sum += A[i];\n }\n\n\n if ((N-Study_sum)>=0){\n System.out.print(N-Study_sum);\n }\n else{\n System.out.print(\"-1\");\n }\n }", "main", "{\n Scanner stdIn = new Scanner(System.in);\n int N = stdIn.nextInt();\n int M = stdIn.nextInt();\n int[] A = new int[M];\n int Study_sum = 0;\n\n\n for (int i = 0; i<M; i++){\n A[i] = stdIn.nextInt();\n }\n \n for(int i=0; i<M; i++){\n Study_sum += A[i];\n }\n\n\n if ((N-Study_sum)>=0){\n System.out.print(N-Study_sum);\n }\n else{\n System.out.print(\"-1\");\n }\n }", "Scanner stdIn = new Scanner(System.in);", "stdIn", "new Scanner(System.in)", "int N = stdIn.nextInt();", "N", "stdIn.nextInt()", "stdIn.nextInt", "stdIn", "int M = stdIn.nextInt();", "M", "stdIn.nextInt()", "stdIn.nextInt", "stdIn", "int[] A = new int[M];", "A", "new int[M]", "M", "int Study_sum = 0;", "Study_sum", "0", "for (int i = 0; i<M; i++){\n A[i] = stdIn.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i<M", "i", "M", "i++", "i++", "i", "{\n A[i] = stdIn.nextInt();\n }", "{\n A[i] = stdIn.nextInt();\n }", "A[i] = stdIn.nextInt()", "A[i]", "A", "i", "stdIn.nextInt()", "stdIn.nextInt", "stdIn", "for(int i=0; i<M; i++){\n Study_sum += A[i];\n }", "int i=0;", "int i=0;", "i", "0", "i<M", "i", "M", "i++", "i++", "i", "{\n Study_sum += A[i];\n }", "{\n Study_sum += A[i];\n }", "Study_sum += A[i]", "Study_sum", "A[i]", "A", "i", "if ((N-Study_sum)>=0){\n System.out.print(N-Study_sum);\n }\n else{\n System.out.print(\"-1\");\n }", "(N-Study_sum)>=0", "(N-Study_sum)", "N", "Study_sum", "0", "{\n System.out.print(N-Study_sum);\n }", "System.out.print(N-Study_sum)", "System.out.print", "System.out", "System", "System.out", "N-Study_sum", "N", "Study_sum", "{\n System.out.print(\"-1\");\n }", "System.out.print(\"-1\")", "System.out.print", "System.out", "System", "System.out", "\"-1\"", "String[] args", "args" ]
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner stdIn = new Scanner(System.in); int N = stdIn.nextInt(); int M = stdIn.nextInt(); int[] A = new int[M]; int Study_sum = 0; for (int i = 0; i<M; i++){ A[i] = stdIn.nextInt(); } for(int i=0; i<M; i++){ Study_sum += A[i]; } if ((N-Study_sum)>=0){ System.out.print(N-Study_sum); } else{ System.out.print("-1"); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 0, 13, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 40, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 37, 43 ], [ 43, 44 ], [ 43, 45 ], [ 8, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 46, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 51, 56 ], [ 56, 57 ], [ 46, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 59, 64 ], [ 64, 65 ], [ 64, 66 ], [ 6, 67 ], [ 67, 68 ] ]
[ "import java.util.Scanner;\n \nclass Main {\n\tpublic static void main(String[] args) {\n \n\t Scanner sc = new Scanner(System.in);\n\t int N = sc.nextInt();\n\t int M = sc.nextInt();\n\t int A = 0;\n\t for (int i = 0; i < M; i++) {\n\t int temp = sc.nextInt();\n\t A += temp;\n\t }\n\t \n\t if (N < A) {\n\t System.out.println(-1);\n\t } else {\n\t System.out.println(N - A);\n\t }\n\t \n\t }\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main {\n\tpublic static void main(String[] args) {\n \n\t Scanner sc = new Scanner(System.in);\n\t int N = sc.nextInt();\n\t int M = sc.nextInt();\n\t int A = 0;\n\t for (int i = 0; i < M; i++) {\n\t int temp = sc.nextInt();\n\t A += temp;\n\t }\n\t \n\t if (N < A) {\n\t System.out.println(-1);\n\t } else {\n\t System.out.println(N - A);\n\t }\n\t \n\t }\n}", "Main", "public static void main(String[] args) {\n \n\t Scanner sc = new Scanner(System.in);\n\t int N = sc.nextInt();\n\t int M = sc.nextInt();\n\t int A = 0;\n\t for (int i = 0; i < M; i++) {\n\t int temp = sc.nextInt();\n\t A += temp;\n\t }\n\t \n\t if (N < A) {\n\t System.out.println(-1);\n\t } else {\n\t System.out.println(N - A);\n\t }\n\t \n\t }", "main", "{\n \n\t Scanner sc = new Scanner(System.in);\n\t int N = sc.nextInt();\n\t int M = sc.nextInt();\n\t int A = 0;\n\t for (int i = 0; i < M; i++) {\n\t int temp = sc.nextInt();\n\t A += temp;\n\t }\n\t \n\t if (N < A) {\n\t System.out.println(-1);\n\t } else {\n\t System.out.println(N - A);\n\t }\n\t \n\t }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int M = sc.nextInt();", "M", "sc.nextInt()", "sc.nextInt", "sc", "int A = 0;", "A", "0", "for (int i = 0; i < M; i++) {\n\t int temp = sc.nextInt();\n\t A += temp;\n\t }", "int i = 0;", "int i = 0;", "i", "0", "i < M", "i", "M", "i++", "i++", "i", "{\n\t int temp = sc.nextInt();\n\t A += temp;\n\t }", "{\n\t int temp = sc.nextInt();\n\t A += temp;\n\t }", "int temp = sc.nextInt();", "temp", "sc.nextInt()", "sc.nextInt", "sc", "A += temp", "A", "temp", "if (N < A) {\n\t System.out.println(-1);\n\t } else {\n\t System.out.println(N - A);\n\t }", "N < A", "N", "A", "{\n\t System.out.println(-1);\n\t }", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "{\n\t System.out.println(N - A);\n\t }", "System.out.println(N - A)", "System.out.println", "System.out", "System", "System.out", "N - A", "N", "A", "String[] args", "args" ]
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int M = sc.nextInt(); int A = 0; for (int i = 0; i < M; i++) { int temp = sc.nextInt(); A += temp; } if (N < A) { System.out.println(-1); } else { System.out.println(N - A); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 0, 13, 13, 14, 2, 13, 17, 30, 0, 13, 40, 17, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 64, 5 ], [ 64, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 8, 43 ], [ 43, 44 ], [ 43, 45 ], [ 8, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 46, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 8, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 55, 60 ], [ 6, 61 ], [ 61, 62 ], [ 0, 63 ], [ 63, 64 ], [ 63, 65 ] ]
[ "import java.util.Scanner;\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint maxday = sc.nextInt();\n\t\tint task = sc.nextInt();\n\t\tint days = 0;\n\t\tfor(int i = 0; i < task; i++){\n\t\t\tdays += sc.nextInt();\n\t\t}\n\t\tmaxday -= days;\n\t\tif(maxday < 0){\n\t\t\tmaxday = -1;\n\t\t}\n\t\tSystem.out.println(maxday);\n\t\t\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint maxday = sc.nextInt();\n\t\tint task = sc.nextInt();\n\t\tint days = 0;\n\t\tfor(int i = 0; i < task; i++){\n\t\t\tdays += sc.nextInt();\n\t\t}\n\t\tmaxday -= days;\n\t\tif(maxday < 0){\n\t\t\tmaxday = -1;\n\t\t}\n\t\tSystem.out.println(maxday);\n\t\t\n\t}\n}", "Main", "public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint maxday = sc.nextInt();\n\t\tint task = sc.nextInt();\n\t\tint days = 0;\n\t\tfor(int i = 0; i < task; i++){\n\t\t\tdays += sc.nextInt();\n\t\t}\n\t\tmaxday -= days;\n\t\tif(maxday < 0){\n\t\t\tmaxday = -1;\n\t\t}\n\t\tSystem.out.println(maxday);\n\t\t\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint maxday = sc.nextInt();\n\t\tint task = sc.nextInt();\n\t\tint days = 0;\n\t\tfor(int i = 0; i < task; i++){\n\t\t\tdays += sc.nextInt();\n\t\t}\n\t\tmaxday -= days;\n\t\tif(maxday < 0){\n\t\t\tmaxday = -1;\n\t\t}\n\t\tSystem.out.println(maxday);\n\t\t\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int maxday = sc.nextInt();", "maxday", "sc.nextInt()", "sc.nextInt", "sc", "int task = sc.nextInt();", "task", "sc.nextInt()", "sc.nextInt", "sc", "int days = 0;", "days", "0", "for(int i = 0; i < task; i++){\n\t\t\tdays += sc.nextInt();\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < task", "i", "task", "i++", "i++", "i", "{\n\t\t\tdays += sc.nextInt();\n\t\t}", "{\n\t\t\tdays += sc.nextInt();\n\t\t}", "days += sc.nextInt()", "days", "sc.nextInt()", "sc.nextInt", "sc", "maxday -= days", "maxday", "days", "if(maxday < 0){\n\t\t\tmaxday = -1;\n\t\t}", "maxday < 0", "maxday", "0", "{\n\t\t\tmaxday = -1;\n\t\t}", "maxday = -1", "maxday", "-1", "1", "System.out.println(maxday)", "System.out.println", "System.out", "System", "System.out", "maxday", "String[] args", "args", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint maxday = sc.nextInt();\n\t\tint task = sc.nextInt();\n\t\tint days = 0;\n\t\tfor(int i = 0; i < task; i++){\n\t\t\tdays += sc.nextInt();\n\t\t}\n\t\tmaxday -= days;\n\t\tif(maxday < 0){\n\t\t\tmaxday = -1;\n\t\t}\n\t\tSystem.out.println(maxday);\n\t\t\n\t}\n}", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint maxday = sc.nextInt();\n\t\tint task = sc.nextInt();\n\t\tint days = 0;\n\t\tfor(int i = 0; i < task; i++){\n\t\t\tdays += sc.nextInt();\n\t\t}\n\t\tmaxday -= days;\n\t\tif(maxday < 0){\n\t\t\tmaxday = -1;\n\t\t}\n\t\tSystem.out.println(maxday);\n\t\t\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int maxday = sc.nextInt(); int task = sc.nextInt(); int days = 0; for(int i = 0; i < task; i++){ days += sc.nextInt(); } maxday -= days; if(maxday < 0){ maxday = -1; } System.out.println(maxday); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 41, 13, 2, 13, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 30, 4, 18, 18, 13, 13, 40, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 73, 8 ], [ 73, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 11, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 11, 25 ], [ 25, 26 ], [ 25, 27 ], [ 11, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 28, 33 ], [ 33, 34 ], [ 33, 35 ], [ 28, 36 ], [ 36, 37 ], [ 37, 38 ], [ 28, 39 ], [ 40, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 44, 45 ], [ 11, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 48, 50 ], [ 11, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 51, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 56, 61 ], [ 51, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 68, 69 ], [ 9, 70 ], [ 70, 71 ], [ 0, 72 ], [ 72, 73 ], [ 72, 74 ] ]
[ "import java.io.IOException;\nimport java.util.Scanner;\n\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n//\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n//\t\t\tString W = in.readLine();\n//\n//\t\t\tint N= Integer.parseInt(W.split(\" \")[0]);\n//\t\t\tint M= Integer.parseInt(W.split(\" \")[1]);\n\t\tScanner sc = new Scanner(System.in);\n\t\t\tint N = sc.nextInt();\n\t\t\tint M= sc.nextInt();\n//\t\t\tint[] A = new int[M];\n\t\t\tint homework =0;\n\n\t\t\tfor(int i=0;i<M;i++) {\n\t\t\t\thomework+= sc.nextInt();\n\t\t\t}\n\n\t\t\tint ans = N - homework;\n\n\t\t\tif(ans >=0) {\n\t\t\t\tSystem.out.println(ans);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(-1);\n\t\t\t}\n\n\t}\n\n}", "import java.io.IOException;", "IOException", "java.io", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n//\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n//\t\t\tString W = in.readLine();\n//\n//\t\t\tint N= Integer.parseInt(W.split(\" \")[0]);\n//\t\t\tint M= Integer.parseInt(W.split(\" \")[1]);\n\t\tScanner sc = new Scanner(System.in);\n\t\t\tint N = sc.nextInt();\n\t\t\tint M= sc.nextInt();\n//\t\t\tint[] A = new int[M];\n\t\t\tint homework =0;\n\n\t\t\tfor(int i=0;i<M;i++) {\n\t\t\t\thomework+= sc.nextInt();\n\t\t\t}\n\n\t\t\tint ans = N - homework;\n\n\t\t\tif(ans >=0) {\n\t\t\t\tSystem.out.println(ans);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(-1);\n\t\t\t}\n\n\t}\n\n}", "Main", "public static void main(String[] args) throws IOException {\n//\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n//\t\t\tString W = in.readLine();\n//\n//\t\t\tint N= Integer.parseInt(W.split(\" \")[0]);\n//\t\t\tint M= Integer.parseInt(W.split(\" \")[1]);\n\t\tScanner sc = new Scanner(System.in);\n\t\t\tint N = sc.nextInt();\n\t\t\tint M= sc.nextInt();\n//\t\t\tint[] A = new int[M];\n\t\t\tint homework =0;\n\n\t\t\tfor(int i=0;i<M;i++) {\n\t\t\t\thomework+= sc.nextInt();\n\t\t\t}\n\n\t\t\tint ans = N - homework;\n\n\t\t\tif(ans >=0) {\n\t\t\t\tSystem.out.println(ans);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(-1);\n\t\t\t}\n\n\t}", "main", "{\n//\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n//\t\t\tString W = in.readLine();\n//\n//\t\t\tint N= Integer.parseInt(W.split(\" \")[0]);\n//\t\t\tint M= Integer.parseInt(W.split(\" \")[1]);\n\t\tScanner sc = new Scanner(System.in);\n\t\t\tint N = sc.nextInt();\n\t\t\tint M= sc.nextInt();\n//\t\t\tint[] A = new int[M];\n\t\t\tint homework =0;\n\n\t\t\tfor(int i=0;i<M;i++) {\n\t\t\t\thomework+= sc.nextInt();\n\t\t\t}\n\n\t\t\tint ans = N - homework;\n\n\t\t\tif(ans >=0) {\n\t\t\t\tSystem.out.println(ans);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(-1);\n\t\t\t}\n\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int M= sc.nextInt();", "M", "sc.nextInt()", "sc.nextInt", "sc", "int homework =0;", "homework", "0", "for(int i=0;i<M;i++) {\n\t\t\t\thomework+= sc.nextInt();\n\t\t\t}", "int i=0;", "int i=0;", "i", "0", "i<M", "i", "M", "i++", "i++", "i", "{\n\t\t\t\thomework+= sc.nextInt();\n\t\t\t}", "{\n\t\t\t\thomework+= sc.nextInt();\n\t\t\t}", "homework+= sc.nextInt()", "homework", "sc.nextInt()", "sc.nextInt", "sc", "int ans = N - homework;", "ans", "N - homework", "N", "homework", "if(ans >=0) {\n\t\t\t\tSystem.out.println(ans);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(-1);\n\t\t\t}", "ans >=0", "ans", "0", "{\n\t\t\t\tSystem.out.println(ans);\n\t\t\t}", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "{\n\t\t\t\tSystem.out.println(-1);\n\t\t\t}", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n//\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n//\t\t\tString W = in.readLine();\n//\n//\t\t\tint N= Integer.parseInt(W.split(\" \")[0]);\n//\t\t\tint M= Integer.parseInt(W.split(\" \")[1]);\n\t\tScanner sc = new Scanner(System.in);\n\t\t\tint N = sc.nextInt();\n\t\t\tint M= sc.nextInt();\n//\t\t\tint[] A = new int[M];\n\t\t\tint homework =0;\n\n\t\t\tfor(int i=0;i<M;i++) {\n\t\t\t\thomework+= sc.nextInt();\n\t\t\t}\n\n\t\t\tint ans = N - homework;\n\n\t\t\tif(ans >=0) {\n\t\t\t\tSystem.out.println(ans);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(-1);\n\t\t\t}\n\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n//\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n//\t\t\tString W = in.readLine();\n//\n//\t\t\tint N= Integer.parseInt(W.split(\" \")[0]);\n//\t\t\tint M= Integer.parseInt(W.split(\" \")[1]);\n\t\tScanner sc = new Scanner(System.in);\n\t\t\tint N = sc.nextInt();\n\t\t\tint M= sc.nextInt();\n//\t\t\tint[] A = new int[M];\n\t\t\tint homework =0;\n\n\t\t\tfor(int i=0;i<M;i++) {\n\t\t\t\thomework+= sc.nextInt();\n\t\t\t}\n\n\t\t\tint ans = N - homework;\n\n\t\t\tif(ans >=0) {\n\t\t\t\tSystem.out.println(ans);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(-1);\n\t\t\t}\n\n\t}\n\n}", "Main" ]
import java.io.IOException; import java.util.Scanner; public class Main { public static void main(String[] args) throws IOException { // BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); // String W = in.readLine(); // // int N= Integer.parseInt(W.split(" ")[0]); // int M= Integer.parseInt(W.split(" ")[1]); Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int M= sc.nextInt(); // int[] A = new int[M]; int homework =0; for(int i=0;i<M;i++) { homework+= sc.nextInt(); } int ans = N - homework; if(ans >=0) { System.out.println(ans); }else { System.out.println(-1); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 20, 41, 13, 20, 12, 13, 30, 0, 13, 4, 13, 0, 13, 4, 13, 0, 13, 4, 13, 13, 28, 13, 13, 30, 0, 13, 13, 4, 13, 8, 2, 13, 17, 40, 17, 13, 4, 18, 13, 4, 18, 13, 23, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 29, 13, 23, 13, 12, 13, 30, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 12, 13, 30, 4, 18, 13, 13, 23, 13, 12, 13, 30, 28, 13, 13, 30, 30, 4, 18, 13, 2, 13, 17, 4, 18, 13, 17, 23, 13, 12, 13, 30, 28, 13, 13, 30, 30, 4, 18, 13, 2, 13, 17, 23, 13, 12, 13, 30, 28, 13, 13, 30, 30, 4, 18, 13, 2, 13, 17, 23, 13, 12, 13, 30, 28, 13, 13, 30, 30, 4, 18, 13, 2, 13, 17, 4, 18, 13, 17, 4, 18, 13, 23, 13, 12, 13, 30, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 13, 20, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 2, 4, 13, 17, 41, 13, 2, 4, 13, 17, 4, 18, 4, 18, 13, 13, 13, 4, 18, 4, 18, 13, 13, 13, 29, 13, 23, 13, 6, 13, 41, 13, 41, 13, 20, 17, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 40, 17, 37, 20, 14, 2, 13, 13, 30, 0, 13, 17, 38, 5, 13, 30, 37, 20, 30, 0, 13, 4, 18, 13, 13, 14, 2, 13, 17, 29, 40, 17, 29, 18, 13, 40, 13, 12, 13, 30, 41, 13, 4, 13, 42, 4, 13, 13, 30, 0, 13, 4, 13, 41, 13, 17, 14, 2, 13, 17, 30, 0, 13, 40, 17, 0, 13, 4, 13, 41, 13, 17, 42, 40, 4, 13, 13, 30, 0, 13, 17, 0, 13, 2, 13, 17, 0, 13, 4, 13, 29, 2, 13, 13, 12, 13, 30, 41, 13, 4, 13, 42, 4, 13, 13, 30, 0, 13, 4, 13, 41, 13, 17, 14, 2, 13, 17, 30, 0, 13, 40, 17, 0, 13, 4, 13, 41, 13, 17, 42, 40, 4, 13, 13, 30, 0, 13, 17, 0, 13, 2, 13, 17, 0, 13, 4, 13, 29, 2, 13, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 4, 13, 42, 4, 13, 13, 30, 0, 13, 4, 13, 41, 13, 20, 42, 40, 4, 13, 13, 30, 4, 18, 13, 13, 0, 13, 4, 13, 29, 4, 18, 13, 12, 13, 30, 41, 13, 4, 13, 42, 4, 13, 13, 0, 13, 4, 13, 41, 13, 20, 42, 40, 4, 13, 13, 30, 4, 18, 13, 13, 0, 13, 4, 13, 29, 4, 18, 13, 12, 13, 30, 29, 2, 2, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 2, 13, 17, 2, 13, 40, 17, 23, 13, 12, 13, 30, 29, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 40, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 19, 20 ], [ 19, 21 ], [ 0, 22 ], [ 611, 23 ], [ 611, 24 ], [ 24, 25 ], [ 611, 26 ], [ 26, 27 ], [ 611, 28 ], [ 28, 29 ], [ 611, 30 ], [ 30, 31 ], [ 611, 32 ], [ 32, 33 ], [ 611, 34 ], [ 34, 35 ], [ 611, 36 ], [ 36, 37 ], [ 611, 38 ], [ 38, 39 ], [ 611, 40 ], [ 40, 41 ], [ 40, 42 ], [ 611, 43 ], [ 43, 44 ], [ 43, 45 ], [ 611, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 48, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 48, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 59, 61 ], [ 48, 62 ], [ 62, 63 ], [ 62, 64 ], [ 62, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 48, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 71, 75 ], [ 75, 76 ], [ 71, 77 ], [ 48, 78 ], [ 78, 79 ], [ 79, 80 ], [ 48, 81 ], [ 81, 82 ], [ 82, 83 ], [ 46, 84 ], [ 84, 85 ], [ 611, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 88, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 93, 98 ], [ 98, 99 ], [ 98, 100 ], [ 93, 101 ], [ 101, 102 ], [ 102, 103 ], [ 93, 104 ], [ 105, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 106, 110 ], [ 110, 111 ], [ 111, 112 ], [ 88, 113 ], [ 113, 114 ], [ 86, 115 ], [ 115, 116 ], [ 611, 117 ], [ 117, 118 ], [ 117, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 611, 124 ], [ 124, 125 ], [ 124, 126 ], [ 126, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 611, 131 ], [ 131, 132 ], [ 131, 133 ], [ 133, 134 ], [ 134, 135 ], [ 135, 136 ], [ 134, 137 ], [ 131, 138 ], [ 138, 139 ], [ 611, 140 ], [ 140, 141 ], [ 140, 142 ], [ 142, 143 ], [ 143, 144 ], [ 143, 145 ], [ 143, 146 ], [ 147, 147 ], [ 147, 148 ], [ 148, 149 ], [ 149, 150 ], [ 148, 151 ], [ 151, 152 ], [ 151, 153 ], [ 142, 154 ], [ 154, 155 ], [ 155, 156 ], [ 154, 157 ], [ 140, 158 ], [ 158, 159 ], [ 611, 160 ], [ 160, 161 ], [ 160, 162 ], [ 162, 163 ], [ 163, 164 ], [ 163, 165 ], [ 163, 166 ], [ 167, 167 ], [ 167, 168 ], [ 168, 169 ], [ 169, 170 ], [ 168, 171 ], [ 171, 172 ], [ 171, 173 ], [ 160, 174 ], [ 174, 175 ], [ 611, 176 ], [ 176, 177 ], [ 176, 178 ], [ 178, 179 ], [ 179, 180 ], [ 179, 181 ], [ 179, 182 ], [ 183, 183 ], [ 183, 184 ], [ 184, 185 ], [ 185, 186 ], [ 184, 187 ], [ 187, 188 ], [ 187, 189 ], [ 176, 190 ], [ 190, 191 ], [ 611, 192 ], [ 192, 193 ], [ 192, 194 ], [ 194, 195 ], [ 195, 196 ], [ 195, 197 ], [ 195, 198 ], [ 199, 199 ], [ 199, 200 ], [ 200, 201 ], [ 201, 202 ], [ 200, 203 ], [ 203, 204 ], [ 203, 205 ], [ 194, 206 ], [ 206, 207 ], [ 207, 208 ], [ 206, 209 ], [ 194, 210 ], [ 210, 211 ], [ 211, 212 ], [ 192, 213 ], [ 213, 214 ], [ 611, 215 ], [ 215, 216 ], [ 215, 217 ], [ 217, 218 ], [ 218, 219 ], [ 218, 220 ], [ 217, 221 ], [ 221, 222 ], [ 222, 223 ], [ 223, 224 ], [ 223, 225 ], [ 221, 226 ], [ 226, 227 ], [ 226, 228 ], [ 221, 229 ], [ 229, 230 ], [ 230, 231 ], [ 221, 232 ], [ 233, 233 ], [ 233, 234 ], [ 234, 235 ], [ 235, 236 ], [ 234, 237 ], [ 234, 238 ], [ 217, 239 ], [ 239, 240 ], [ 240, 241 ], [ 241, 242 ], [ 241, 243 ], [ 239, 244 ], [ 244, 245 ], [ 244, 246 ], [ 246, 247 ], [ 246, 248 ], [ 239, 249 ], [ 249, 250 ], [ 250, 251 ], [ 239, 252 ], [ 253, 253 ], [ 253, 254 ], [ 254, 255 ], [ 254, 256 ], [ 256, 257 ], [ 257, 258 ], [ 256, 259 ], [ 253, 260 ], [ 260, 261 ], [ 260, 262 ], [ 262, 263 ], [ 263, 264 ], [ 262, 265 ], [ 253, 266 ], [ 266, 267 ], [ 267, 268 ], [ 268, 269 ], [ 269, 270 ], [ 268, 271 ], [ 266, 272 ], [ 253, 273 ], [ 273, 274 ], [ 274, 275 ], [ 275, 276 ], [ 276, 277 ], [ 275, 278 ], [ 273, 279 ], [ 217, 280 ], [ 280, 281 ], [ 215, 282 ], [ 282, 283 ], [ 611, 284 ], [ 284, 285 ], [ 284, 286 ], [ 286, 287 ], [ 284, 288 ], [ 288, 289 ], [ 288, 290 ], [ 284, 292 ], [ 292, 293 ], [ 284, 294 ], [ 294, 295 ], [ 284, 296 ], [ 296, 297 ], [ 296, 298 ], [ 298, 299 ], [ 299, 300 ], [ 300, 301 ], [ 300, 302 ], [ 299, 303 ], [ 296, 304 ], [ 304, 305 ], [ 284, 306 ], [ 306, 307 ], [ 306, 308 ], [ 308, 309 ], [ 309, 310 ], [ 310, 311 ], [ 310, 312 ], [ 312, 313 ], [ 309, 314 ], [ 314, 315 ], [ 308, 316 ], [ 316, 317 ], [ 317, 318 ], [ 317, 319 ], [ 316, 320 ], [ 320, 321 ], [ 321, 322 ], [ 321, 323 ], [ 320, 324 ], [ 324, 325 ], [ 325, 326 ], [ 325, 327 ], [ 327, 328 ], [ 328, 329 ], [ 324, 330 ], [ 330, 331 ], [ 331, 332 ], [ 331, 333 ], [ 333, 334 ], [ 334, 335 ], [ 333, 336 ], [ 320, 337 ], [ 337, 338 ], [ 338, 339 ], [ 338, 340 ], [ 337, 341 ], [ 341, 342 ], [ 342, 343 ], [ 308, 344 ], [ 344, 345 ], [ 345, 346 ], [ 345, 347 ], [ 347, 348 ], [ 284, 349 ], [ 349, 350 ], [ 349, 351 ], [ 351, 352 ], [ 352, 353 ], [ 352, 354 ], [ 354, 355 ], [ 351, 356 ], [ 356, 357 ], [ 357, 358 ], [ 357, 359 ], [ 356, 360 ], [ 360, 361 ], [ 361, 362 ], [ 361, 363 ], [ 363, 364 ], [ 351, 365 ], [ 365, 366 ], [ 365, 367 ], [ 351, 368 ], [ 368, 369 ], [ 369, 370 ], [ 369, 371 ], [ 368, 372 ], [ 372, 373 ], [ 373, 374 ], [ 373, 375 ], [ 375, 376 ], [ 372, 377 ], [ 377, 378 ], [ 377, 379 ], [ 379, 380 ], [ 351, 381 ], [ 381, 382 ], [ 381, 383 ], [ 351, 384 ], [ 384, 385 ], [ 385, 386 ], [ 386, 387 ], [ 386, 388 ], [ 384, 389 ], [ 389, 390 ], [ 390, 391 ], [ 390, 392 ], [ 389, 393 ], [ 393, 394 ], [ 393, 395 ], [ 395, 396 ], [ 395, 397 ], [ 389, 398 ], [ 398, 399 ], [ 398, 400 ], [ 400, 401 ], [ 351, 402 ], [ 402, 403 ], [ 403, 404 ], [ 403, 405 ], [ 284, 406 ], [ 406, 407 ], [ 406, 408 ], [ 408, 409 ], [ 409, 410 ], [ 409, 411 ], [ 411, 412 ], [ 408, 413 ], [ 413, 414 ], [ 414, 415 ], [ 414, 416 ], [ 413, 417 ], [ 417, 418 ], [ 418, 419 ], [ 418, 420 ], [ 420, 421 ], [ 408, 422 ], [ 422, 423 ], [ 422, 424 ], [ 408, 425 ], [ 425, 426 ], [ 426, 427 ], [ 426, 428 ], [ 425, 429 ], [ 429, 430 ], [ 430, 431 ], [ 430, 432 ], [ 432, 433 ], [ 429, 434 ], [ 434, 435 ], [ 434, 436 ], [ 436, 437 ], [ 408, 438 ], [ 438, 439 ], [ 438, 440 ], [ 408, 441 ], [ 441, 442 ], [ 442, 443 ], [ 443, 444 ], [ 443, 445 ], [ 441, 446 ], [ 446, 447 ], [ 447, 448 ], [ 447, 449 ], [ 446, 450 ], [ 450, 451 ], [ 450, 452 ], [ 452, 453 ], [ 452, 454 ], [ 446, 455 ], [ 455, 456 ], [ 455, 457 ], [ 457, 458 ], [ 408, 459 ], [ 459, 460 ], [ 460, 461 ], [ 460, 462 ], [ 284, 463 ], [ 463, 464 ], [ 463, 465 ], [ 465, 466 ], [ 466, 467 ], [ 466, 468 ], [ 465, 470 ], [ 470, 471 ], [ 471, 472 ], [ 472, 473 ], [ 472, 474 ], [ 470, 475 ], [ 475, 476 ], [ 475, 477 ], [ 470, 478 ], [ 478, 479 ], [ 479, 480 ], [ 470, 481 ], [ 482, 482 ], [ 482, 483 ], [ 483, 484 ], [ 484, 485 ], [ 484, 486 ], [ 483, 487 ], [ 487, 488 ], [ 465, 489 ], [ 489, 490 ], [ 463, 491 ], [ 491, 492 ], [ 284, 493 ], [ 493, 494 ], [ 493, 495 ], [ 495, 496 ], [ 496, 497 ], [ 496, 498 ], [ 498, 499 ], [ 495, 500 ], [ 500, 501 ], [ 501, 502 ], [ 501, 503 ], [ 500, 504 ], [ 504, 505 ], [ 505, 506 ], [ 505, 507 ], [ 507, 508 ], [ 495, 509 ], [ 509, 510 ], [ 509, 511 ], [ 495, 512 ], [ 512, 513 ], [ 513, 514 ], [ 514, 515 ], [ 514, 516 ], [ 512, 517 ], [ 517, 518 ], [ 518, 519 ], [ 519, 520 ], [ 518, 521 ], [ 517, 522 ], [ 522, 523 ], [ 522, 524 ], [ 524, 525 ], [ 495, 526 ], [ 526, 527 ], [ 527, 528 ], [ 528, 529 ], [ 284, 530 ], [ 530, 531 ], [ 530, 532 ], [ 532, 533 ], [ 533, 534 ], [ 533, 535 ], [ 535, 536 ], [ 532, 537 ], [ 537, 538 ], [ 538, 539 ], [ 538, 540 ], [ 537, 541 ], [ 541, 542 ], [ 541, 543 ], [ 543, 544 ], [ 532, 545 ], [ 545, 546 ], [ 545, 547 ], [ 532, 548 ], [ 548, 549 ], [ 549, 550 ], [ 550, 551 ], [ 550, 552 ], [ 548, 553 ], [ 553, 554 ], [ 554, 555 ], [ 555, 556 ], [ 554, 557 ], [ 553, 558 ], [ 558, 559 ], [ 558, 560 ], [ 560, 561 ], [ 532, 562 ], [ 562, 563 ], [ 563, 564 ], [ 564, 565 ], [ 284, 566 ], [ 566, 567 ], [ 566, 568 ], [ 568, 569 ], [ 569, 570 ], [ 573, 571 ], [ 583, 572 ], [ 580, 573 ], [ 573, 574 ], [ 574, 575 ], [ 574, 576 ], [ 573, 577 ], [ 577, 578 ], [ 577, 579 ], [ 580, 580 ], [ 580, 581 ], [ 580, 582 ], [ 583, 583 ], [ 583, 584 ], [ 583, 585 ], [ 573, 586 ], [ 586, 587 ], [ 586, 588 ], [ 588, 589 ], [ 566, 590 ], [ 590, 591 ], [ 284, 592 ], [ 592, 593 ], [ 592, 594 ], [ 594, 595 ], [ 595, 596 ], [ 597, 597 ], [ 597, 598 ], [ 598, 599 ], [ 598, 600 ], [ 597, 601 ], [ 601, 602 ], [ 601, 603 ], [ 597, 604 ], [ 604, 605 ], [ 604, 606 ], [ 606, 607 ], [ 592, 608 ], [ 608, 609 ], [ 0, 610 ], [ 610, 611 ], [ 610, 612 ] ]
[ "\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.HashMap;\nimport java.util.InputMismatchException;\n\npublic class Main {\n\tprivate static int n, m;\n\tprivate static int[] a;\n\tprivate static String s;\n\tprivate static HashMap<Integer, ArrayList<Integer>> g;\n\tprivate static long pp, qq, rr;\n\n\tpublic static void main(String[] args) {\n\t\tn = ini();\n\t\tm = ini();\n\t\ta = ina(m);\n\t\t\n\t\tfor(int x: a) n-=x;\n\t\t\n\t\tprintln(n<0?-1:n);\n\n\t\tout.flush();\n\t\tout.close();\n\n\t}\n\n\t//NONPROBLEM CODE\n\n\tprivate static InputReader in = new InputReader(System.in);\n\tprivate static PrintWriter out = new PrintWriter(System.out);\n\n\tprivate static class InputReader {\n\n\t\tprivate final InputStream stream;\n\t\tprivate final byte[] buf = new byte[8192];\n\t\tprivate int curChar, snumChars;\n\n\t\tpublic InputReader(InputStream st) {\n\t\t\tthis.stream = st;\n\t\t}\n\n\t\tpublic int read() {\n\t\t\tif (snumChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= snumChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tsnumChars = stream.read(buf);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tif (snumChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint res = 0;\n\t\t\tdo {\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tlong res = 0;\n\t\t\tdo {\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic int[] nextIntArray(int n) {\n\t\t\tint a[] = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\ta[i] = nextInt();\n\t\t\t}\n\t\t\treturn a;\n\t\t}\n\n\t\tpublic String readString() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic String nextLine() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isEndOfLine(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic boolean isSpaceChar(int c) {\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}\n\n\t\tprivate boolean isEndOfLine(int c) {\n\t\t\treturn c == '\\n' || c == '\\r' || c == -1;\n\t\t}\n\n\t}\n\n\t//INPUT SHORTCUTS\n\n\tprivate static int[] ina(int n) {\n\t\tint[] temp = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ttemp[i] = in.nextInt();\n\t\t}\n\t\treturn temp;\n\t}\n\n\tprivate static int ini() {\n\t\treturn in.nextInt();\n\t}\n\n\tprivate static String ins() {\n\t\treturn in.readString();\n\t}\n\n\t//OTHER SHORTCUTS\n\tpublic static void sort(int[] a) {\n\t\tArrays.sort(a);\n\t}\n\n\t//PRINT SHORTCUTS\n\n\tprivate static void println(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t\tout.write(\"\\n\");\n\t}\n\n\tprivate static void print(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \"\");\n\t\t}\n\t}\n\n\tprivate static void printAll(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t}\n\n\tprivate static void debug(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t\tout.write(\"\\n\");\n\t\tout.flush();\n\t}\n\n\tprivate static HashMap<Integer, ArrayList<Integer>> intree(int n) {\n\n\t\tHashMap<Integer, ArrayList<Integer>> g = new HashMap<>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tg.put(i, new ArrayList<>());\n\t\t}\n\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\tint u = ini() - 1;\n\t\t\tint v = ini() - 1;\n\t\t\tg.get(u).add(v);\n\t\t\tg.get(v).add(u);\n\t\t}\n\n\t\treturn g;\n\t}\n}", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "import java.io.PrintWriter;", "PrintWriter", "java.io", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.Arrays;", "Arrays", "java.util", "import java.util.HashMap;", "HashMap", "java.util", "import java.util.InputMismatchException;", "InputMismatchException", "java.util", "public class Main {\n\tprivate static int n, m;\n\tprivate static int[] a;\n\tprivate static String s;\n\tprivate static HashMap<Integer, ArrayList<Integer>> g;\n\tprivate static long pp, qq, rr;\n\n\tpublic static void main(String[] args) {\n\t\tn = ini();\n\t\tm = ini();\n\t\ta = ina(m);\n\t\t\n\t\tfor(int x: a) n-=x;\n\t\t\n\t\tprintln(n<0?-1:n);\n\n\t\tout.flush();\n\t\tout.close();\n\n\t}\n\n\t//NONPROBLEM CODE\n\n\tprivate static InputReader in = new InputReader(System.in);\n\tprivate static PrintWriter out = new PrintWriter(System.out);\n\n\tprivate static class InputReader {\n\n\t\tprivate final InputStream stream;\n\t\tprivate final byte[] buf = new byte[8192];\n\t\tprivate int curChar, snumChars;\n\n\t\tpublic InputReader(InputStream st) {\n\t\t\tthis.stream = st;\n\t\t}\n\n\t\tpublic int read() {\n\t\t\tif (snumChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= snumChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tsnumChars = stream.read(buf);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tif (snumChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint res = 0;\n\t\t\tdo {\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tlong res = 0;\n\t\t\tdo {\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic int[] nextIntArray(int n) {\n\t\t\tint a[] = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\ta[i] = nextInt();\n\t\t\t}\n\t\t\treturn a;\n\t\t}\n\n\t\tpublic String readString() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic String nextLine() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isEndOfLine(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic boolean isSpaceChar(int c) {\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}\n\n\t\tprivate boolean isEndOfLine(int c) {\n\t\t\treturn c == '\\n' || c == '\\r' || c == -1;\n\t\t}\n\n\t}\n\n\t//INPUT SHORTCUTS\n\n\tprivate static int[] ina(int n) {\n\t\tint[] temp = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ttemp[i] = in.nextInt();\n\t\t}\n\t\treturn temp;\n\t}\n\n\tprivate static int ini() {\n\t\treturn in.nextInt();\n\t}\n\n\tprivate static String ins() {\n\t\treturn in.readString();\n\t}\n\n\t//OTHER SHORTCUTS\n\tpublic static void sort(int[] a) {\n\t\tArrays.sort(a);\n\t}\n\n\t//PRINT SHORTCUTS\n\n\tprivate static void println(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t\tout.write(\"\\n\");\n\t}\n\n\tprivate static void print(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \"\");\n\t\t}\n\t}\n\n\tprivate static void printAll(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t}\n\n\tprivate static void debug(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t\tout.write(\"\\n\");\n\t\tout.flush();\n\t}\n\n\tprivate static HashMap<Integer, ArrayList<Integer>> intree(int n) {\n\n\t\tHashMap<Integer, ArrayList<Integer>> g = new HashMap<>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tg.put(i, new ArrayList<>());\n\t\t}\n\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\tint u = ini() - 1;\n\t\t\tint v = ini() - 1;\n\t\t\tg.get(u).add(v);\n\t\t\tg.get(v).add(u);\n\t\t}\n\n\t\treturn g;\n\t}\n}", "Main", "private static int n", "n", "m;", "m", "private static int[] a;", "a", "private static String s;", "s", "private static HashMap<Integer, ArrayList<Integer>> g;", "g", "private static long pp", "pp", "qq", "qq", "rr;", "rr", "private static InputReader in = new InputReader(System.in);", "in", "new InputReader(System.in)", "private static PrintWriter out = new PrintWriter(System.out);", "out", "new PrintWriter(System.out)", "public static void main(String[] args) {\n\t\tn = ini();\n\t\tm = ini();\n\t\ta = ina(m);\n\t\t\n\t\tfor(int x: a) n-=x;\n\t\t\n\t\tprintln(n<0?-1:n);\n\n\t\tout.flush();\n\t\tout.close();\n\n\t}", "main", "{\n\t\tn = ini();\n\t\tm = ini();\n\t\ta = ina(m);\n\t\t\n\t\tfor(int x: a) n-=x;\n\t\t\n\t\tprintln(n<0?-1:n);\n\n\t\tout.flush();\n\t\tout.close();\n\n\t}", "n = ini()", "n", "ini()", "ini", "m = ini()", "m", "ini()", "ini", "a = ina(m)", "a", "ina(m)", "ina", "m", "for(int x: a) n-=x;", "int x", "a", "n-=x;", "n-=x", "n", "x", "println(n<0?-1:n)", "println", "n<0?-1:n", "n<0", "n", "0", "-1", "1", "n", "out.flush()", "out.flush", "out", "out.close()", "out.close", "out", "String[] args", "args", "private static int[] ina(int n) {\n\t\tint[] temp = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ttemp[i] = in.nextInt();\n\t\t}\n\t\treturn temp;\n\t}", "ina", "{\n\t\tint[] temp = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ttemp[i] = in.nextInt();\n\t\t}\n\t\treturn temp;\n\t}", "int[] temp = new int[n];", "temp", "new int[n]", "n", "for (int i = 0; i < n; i++) {\n\t\t\ttemp[i] = in.nextInt();\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\ttemp[i] = in.nextInt();\n\t\t}", "{\n\t\t\ttemp[i] = in.nextInt();\n\t\t}", "temp[i] = in.nextInt()", "temp[i]", "temp", "i", "in.nextInt()", "in.nextInt", "in", "return temp;", "temp", "int n", "n", "private static int ini() {\n\t\treturn in.nextInt();\n\t}", "ini", "{\n\t\treturn in.nextInt();\n\t}", "return in.nextInt();", "in.nextInt()", "in.nextInt", "in", "private static String ins() {\n\t\treturn in.readString();\n\t}", "ins", "{\n\t\treturn in.readString();\n\t}", "return in.readString();", "in.readString()", "in.readString", "in", "//OTHER SHORTCUTS\n\tpublic static void sort(int[] a) {\n\t\tArrays.sort(a);\n\t}", "sort", "{\n\t\tArrays.sort(a);\n\t}", "Arrays.sort(a)", "Arrays.sort", "Arrays", "a", "int[] a", "a", "private static void println(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t\tout.write(\"\\n\");\n\t}", "println", "{\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t\tout.write(\"\\n\");\n\t}", "for (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}", "Object x", "o", "{\n\t\t\tout.write(x + \" \");\n\t\t}", "{\n\t\t\tout.write(x + \" \");\n\t\t}", "out.write(x + \" \")", "out.write", "out", "x + \" \"", "x", "\" \"", "out.write(\"\\n\")", "out.write", "out", "\"\\n\"", "Object... o", "o", "private static void print(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \"\");\n\t\t}\n\t}", "print", "{\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \"\");\n\t\t}\n\t}", "for (Object x : o) {\n\t\t\tout.write(x + \"\");\n\t\t}", "Object x", "o", "{\n\t\t\tout.write(x + \"\");\n\t\t}", "{\n\t\t\tout.write(x + \"\");\n\t\t}", "out.write(x + \"\")", "out.write", "out", "x + \"\"", "x", "\"\"", "Object... o", "o", "private static void printAll(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t}", "printAll", "{\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t}", "for (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}", "Object x", "o", "{\n\t\t\tout.write(x + \" \");\n\t\t}", "{\n\t\t\tout.write(x + \" \");\n\t\t}", "out.write(x + \" \")", "out.write", "out", "x + \" \"", "x", "\" \"", "Object... o", "o", "private static void debug(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t\tout.write(\"\\n\");\n\t\tout.flush();\n\t}", "debug", "{\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t\tout.write(\"\\n\");\n\t\tout.flush();\n\t}", "for (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}", "Object x", "o", "{\n\t\t\tout.write(x + \" \");\n\t\t}", "{\n\t\t\tout.write(x + \" \");\n\t\t}", "out.write(x + \" \")", "out.write", "out", "x + \" \"", "x", "\" \"", "out.write(\"\\n\")", "out.write", "out", "\"\\n\"", "out.flush()", "out.flush", "out", "Object... o", "o", "private static HashMap<Integer, ArrayList<Integer>> intree(int n) {\n\n\t\tHashMap<Integer, ArrayList<Integer>> g = new HashMap<>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tg.put(i, new ArrayList<>());\n\t\t}\n\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\tint u = ini() - 1;\n\t\t\tint v = ini() - 1;\n\t\t\tg.get(u).add(v);\n\t\t\tg.get(v).add(u);\n\t\t}\n\n\t\treturn g;\n\t}", "intree", "{\n\n\t\tHashMap<Integer, ArrayList<Integer>> g = new HashMap<>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tg.put(i, new ArrayList<>());\n\t\t}\n\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\tint u = ini() - 1;\n\t\t\tint v = ini() - 1;\n\t\t\tg.get(u).add(v);\n\t\t\tg.get(v).add(u);\n\t\t}\n\n\t\treturn g;\n\t}", "HashMap<Integer, ArrayList<Integer>> g = new HashMap<>();", "g", "new HashMap<>()", "for (int i = 0; i < n; i++) {\n\t\t\tg.put(i, new ArrayList<>());\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tg.put(i, new ArrayList<>());\n\t\t}", "{\n\t\t\tg.put(i, new ArrayList<>());\n\t\t}", "g.put(i, new ArrayList<>())", "g.put", "g", "i", "new ArrayList<>()", "for (int i = 0; i < n - 1; i++) {\n\t\t\tint u = ini() - 1;\n\t\t\tint v = ini() - 1;\n\t\t\tg.get(u).add(v);\n\t\t\tg.get(v).add(u);\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n - 1", "i", "n - 1", "n", "1", "i++", "i++", "i", "{\n\t\t\tint u = ini() - 1;\n\t\t\tint v = ini() - 1;\n\t\t\tg.get(u).add(v);\n\t\t\tg.get(v).add(u);\n\t\t}", "{\n\t\t\tint u = ini() - 1;\n\t\t\tint v = ini() - 1;\n\t\t\tg.get(u).add(v);\n\t\t\tg.get(v).add(u);\n\t\t}", "int u = ini() - 1;", "u", "ini() - 1", "ini()", "ini", "1", "int v = ini() - 1;", "v", "ini() - 1", "ini()", "ini", "1", "g.get(u).add(v)", "g.get(u).add", "g.get(u)", "g.get", "g", "u", "v", "g.get(v).add(u)", "g.get(v).add", "g.get(v)", "g.get", "g", "v", "u", "return g;", "g", "int n", "n", "private static class InputReader {\n\n\t\tprivate final InputStream stream;\n\t\tprivate final byte[] buf = new byte[8192];\n\t\tprivate int curChar, snumChars;\n\n\t\tpublic InputReader(InputStream st) {\n\t\t\tthis.stream = st;\n\t\t}\n\n\t\tpublic int read() {\n\t\t\tif (snumChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= snumChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tsnumChars = stream.read(buf);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tif (snumChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint res = 0;\n\t\t\tdo {\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tlong res = 0;\n\t\t\tdo {\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic int[] nextIntArray(int n) {\n\t\t\tint a[] = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\ta[i] = nextInt();\n\t\t\t}\n\t\t\treturn a;\n\t\t}\n\n\t\tpublic String readString() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic String nextLine() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isEndOfLine(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic boolean isSpaceChar(int c) {\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}\n\n\t\tprivate boolean isEndOfLine(int c) {\n\t\t\treturn c == '\\n' || c == '\\r' || c == -1;\n\t\t}\n\n\t}", "InputReader", "private final InputStream stream;", "stream", "private final byte[] buf = new byte[8192];", "buf", "new byte[8192]", "8192", "private int curChar", "curChar", "snumChars;", "snumChars", "public InputReader(InputStream st) {\n\t\t\tthis.stream = st;\n\t\t}", "InputReader", "{\n\t\t\tthis.stream = st;\n\t\t}", "this.stream = st", "this.stream", "this", "this.stream", "st", "InputStream st", "st", "public int read() {\n\t\t\tif (snumChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= snumChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tsnumChars = stream.read(buf);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tif (snumChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}", "read", "{\n\t\t\tif (snumChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= snumChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tsnumChars = stream.read(buf);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tif (snumChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}", "if (snumChars == -1)\n\t\t\t\tthrow new InputMismatchException();", "snumChars == -1", "snumChars", "-1", "1", "throw new InputMismatchException();", "new InputMismatchException()", "if (curChar >= snumChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tsnumChars = stream.read(buf);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tif (snumChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}", "curChar >= snumChars", "curChar", "snumChars", "{\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tsnumChars = stream.read(buf);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tif (snumChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}", "curChar = 0", "curChar", "0", "try {\n\t\t\t\t\tsnumChars = stream.read(buf);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}", "catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}", "IOException e", "{\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}", "throw new InputMismatchException();", "new InputMismatchException()", "{\n\t\t\t\t\tsnumChars = stream.read(buf);\n\t\t\t\t}", "snumChars = stream.read(buf)", "snumChars", "stream.read(buf)", "stream.read", "stream", "buf", "if (snumChars <= 0)\n\t\t\t\t\treturn -1;", "snumChars <= 0", "snumChars", "0", "return -1;", "-1", "1", "return buf[curChar++];", "buf[curChar++]", "buf", "curChar++", "curChar", "public int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint res = 0;\n\t\t\tdo {\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}", "nextInt", "{\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint res = 0;\n\t\t\tdo {\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}", "int c = read();", "c", "read()", "read", "while (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}", "isSpaceChar(c)", "isSpaceChar", "c", "{\n\t\t\t\tc = read();\n\t\t\t}", "c = read()", "c", "read()", "read", "int sgn = 1;", "sgn", "1", "if (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}", "c == '-'", "c", "'-'", "{\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}", "sgn = -1", "sgn", "-1", "1", "c = read()", "c", "read()", "read", "int res = 0;", "res", "0", "do {\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));", "!isSpaceChar(c)", "isSpaceChar(c)", "isSpaceChar", "c", "{\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t}", "res *= 10", "res", "10", "res += c - '0'", "res", "c - '0'", "c", "'0'", "c = read()", "c", "read()", "read", "return res * sgn;", "res * sgn", "res", "sgn", "public long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tlong res = 0;\n\t\t\tdo {\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}", "nextLong", "{\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tlong res = 0;\n\t\t\tdo {\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}", "int c = read();", "c", "read()", "read", "while (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}", "isSpaceChar(c)", "isSpaceChar", "c", "{\n\t\t\t\tc = read();\n\t\t\t}", "c = read()", "c", "read()", "read", "int sgn = 1;", "sgn", "1", "if (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}", "c == '-'", "c", "'-'", "{\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}", "sgn = -1", "sgn", "-1", "1", "c = read()", "c", "read()", "read", "long res = 0;", "res", "0", "do {\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));", "!isSpaceChar(c)", "isSpaceChar(c)", "isSpaceChar", "c", "{\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t}", "res *= 10", "res", "10", "res += c - '0'", "res", "c - '0'", "c", "'0'", "c = read()", "c", "read()", "read", "return res * sgn;", "res * sgn", "res", "sgn", "public int[] nextIntArray(int n) {\n\t\t\tint a[] = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\ta[i] = nextInt();\n\t\t\t}\n\t\t\treturn a;\n\t\t}", "nextIntArray", "{\n\t\t\tint a[] = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\ta[i] = nextInt();\n\t\t\t}\n\t\t\treturn a;\n\t\t}", "int a[] = new int[n];", "a", "new int[n]", "n", "for (int i = 0; i < n; i++) {\n\t\t\t\ta[i] = nextInt();\n\t\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\t\ta[i] = nextInt();\n\t\t\t}", "{\n\t\t\t\ta[i] = nextInt();\n\t\t\t}", "a[i] = nextInt()", "a[i]", "a", "i", "nextInt()", "nextInt", "return a;", "a", "int n", "n", "public String readString() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}", "readString", "{\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}", "int c = read();", "c", "read()", "read", "while (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}", "isSpaceChar(c)", "isSpaceChar", "c", "{\n\t\t\t\tc = read();\n\t\t\t}", "c = read()", "c", "read()", "read", "StringBuilder res = new StringBuilder();", "res", "new StringBuilder()", "do {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));", "!isSpaceChar(c)", "isSpaceChar(c)", "isSpaceChar", "c", "{\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t}", "res.appendCodePoint(c)", "res.appendCodePoint", "res", "c", "c = read()", "c", "read()", "read", "return res.toString();", "res.toString()", "res.toString", "res", "public String nextLine() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isEndOfLine(c));\n\t\t\treturn res.toString();\n\t\t}", "nextLine", "{\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isEndOfLine(c));\n\t\t\treturn res.toString();\n\t\t}", "int c = read();", "c", "read()", "read", "while (isSpaceChar(c))\n\t\t\t\tc = read();", "isSpaceChar(c)", "isSpaceChar", "c", "c = read()", "c", "read()", "read", "StringBuilder res = new StringBuilder();", "res", "new StringBuilder()", "do {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isEndOfLine(c));", "!isEndOfLine(c)", "isEndOfLine(c)", "isEndOfLine", "c", "{\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t}", "res.appendCodePoint(c)", "res.appendCodePoint", "res", "c", "c = read()", "c", "read()", "read", "return res.toString();", "res.toString()", "res.toString", "res", "public boolean isSpaceChar(int c) {\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}", "isSpaceChar", "{\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}", "return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;", "c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1", "c == '\\t'", "c == '\\r'", "c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1", "c == ' '", "c", "' '", "c == '\\n'", "c", "'\\n'", "c == '\\r'", "c", "'\\r'", "c == '\\t'", "c", "'\\t'", "c == -1", "c", "-1", "1", "int c", "c", "private boolean isEndOfLine(int c) {\n\t\t\treturn c == '\\n' || c == '\\r' || c == -1;\n\t\t}", "isEndOfLine", "{\n\t\t\treturn c == '\\n' || c == '\\r' || c == -1;\n\t\t}", "return c == '\\n' || c == '\\r' || c == -1;", "c == '\\n' || c == '\\r' || c == -1", "c == '\\n' || c == '\\r' || c == -1", "c == '\\n'", "c", "'\\n'", "c == '\\r'", "c", "'\\r'", "c == -1", "c", "-1", "1", "int c", "c", "public class Main {\n\tprivate static int n, m;\n\tprivate static int[] a;\n\tprivate static String s;\n\tprivate static HashMap<Integer, ArrayList<Integer>> g;\n\tprivate static long pp, qq, rr;\n\n\tpublic static void main(String[] args) {\n\t\tn = ini();\n\t\tm = ini();\n\t\ta = ina(m);\n\t\t\n\t\tfor(int x: a) n-=x;\n\t\t\n\t\tprintln(n<0?-1:n);\n\n\t\tout.flush();\n\t\tout.close();\n\n\t}\n\n\t//NONPROBLEM CODE\n\n\tprivate static InputReader in = new InputReader(System.in);\n\tprivate static PrintWriter out = new PrintWriter(System.out);\n\n\tprivate static class InputReader {\n\n\t\tprivate final InputStream stream;\n\t\tprivate final byte[] buf = new byte[8192];\n\t\tprivate int curChar, snumChars;\n\n\t\tpublic InputReader(InputStream st) {\n\t\t\tthis.stream = st;\n\t\t}\n\n\t\tpublic int read() {\n\t\t\tif (snumChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= snumChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tsnumChars = stream.read(buf);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tif (snumChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint res = 0;\n\t\t\tdo {\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tlong res = 0;\n\t\t\tdo {\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic int[] nextIntArray(int n) {\n\t\t\tint a[] = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\ta[i] = nextInt();\n\t\t\t}\n\t\t\treturn a;\n\t\t}\n\n\t\tpublic String readString() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic String nextLine() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isEndOfLine(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic boolean isSpaceChar(int c) {\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}\n\n\t\tprivate boolean isEndOfLine(int c) {\n\t\t\treturn c == '\\n' || c == '\\r' || c == -1;\n\t\t}\n\n\t}\n\n\t//INPUT SHORTCUTS\n\n\tprivate static int[] ina(int n) {\n\t\tint[] temp = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ttemp[i] = in.nextInt();\n\t\t}\n\t\treturn temp;\n\t}\n\n\tprivate static int ini() {\n\t\treturn in.nextInt();\n\t}\n\n\tprivate static String ins() {\n\t\treturn in.readString();\n\t}\n\n\t//OTHER SHORTCUTS\n\tpublic static void sort(int[] a) {\n\t\tArrays.sort(a);\n\t}\n\n\t//PRINT SHORTCUTS\n\n\tprivate static void println(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t\tout.write(\"\\n\");\n\t}\n\n\tprivate static void print(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \"\");\n\t\t}\n\t}\n\n\tprivate static void printAll(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t}\n\n\tprivate static void debug(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t\tout.write(\"\\n\");\n\t\tout.flush();\n\t}\n\n\tprivate static HashMap<Integer, ArrayList<Integer>> intree(int n) {\n\n\t\tHashMap<Integer, ArrayList<Integer>> g = new HashMap<>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tg.put(i, new ArrayList<>());\n\t\t}\n\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\tint u = ini() - 1;\n\t\t\tint v = ini() - 1;\n\t\t\tg.get(u).add(v);\n\t\t\tg.get(v).add(u);\n\t\t}\n\n\t\treturn g;\n\t}\n}", "public class Main {\n\tprivate static int n, m;\n\tprivate static int[] a;\n\tprivate static String s;\n\tprivate static HashMap<Integer, ArrayList<Integer>> g;\n\tprivate static long pp, qq, rr;\n\n\tpublic static void main(String[] args) {\n\t\tn = ini();\n\t\tm = ini();\n\t\ta = ina(m);\n\t\t\n\t\tfor(int x: a) n-=x;\n\t\t\n\t\tprintln(n<0?-1:n);\n\n\t\tout.flush();\n\t\tout.close();\n\n\t}\n\n\t//NONPROBLEM CODE\n\n\tprivate static InputReader in = new InputReader(System.in);\n\tprivate static PrintWriter out = new PrintWriter(System.out);\n\n\tprivate static class InputReader {\n\n\t\tprivate final InputStream stream;\n\t\tprivate final byte[] buf = new byte[8192];\n\t\tprivate int curChar, snumChars;\n\n\t\tpublic InputReader(InputStream st) {\n\t\t\tthis.stream = st;\n\t\t}\n\n\t\tpublic int read() {\n\t\t\tif (snumChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= snumChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tsnumChars = stream.read(buf);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tif (snumChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint res = 0;\n\t\t\tdo {\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tlong res = 0;\n\t\t\tdo {\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic int[] nextIntArray(int n) {\n\t\t\tint a[] = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\ta[i] = nextInt();\n\t\t\t}\n\t\t\treturn a;\n\t\t}\n\n\t\tpublic String readString() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic String nextLine() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isEndOfLine(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic boolean isSpaceChar(int c) {\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}\n\n\t\tprivate boolean isEndOfLine(int c) {\n\t\t\treturn c == '\\n' || c == '\\r' || c == -1;\n\t\t}\n\n\t}\n\n\t//INPUT SHORTCUTS\n\n\tprivate static int[] ina(int n) {\n\t\tint[] temp = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ttemp[i] = in.nextInt();\n\t\t}\n\t\treturn temp;\n\t}\n\n\tprivate static int ini() {\n\t\treturn in.nextInt();\n\t}\n\n\tprivate static String ins() {\n\t\treturn in.readString();\n\t}\n\n\t//OTHER SHORTCUTS\n\tpublic static void sort(int[] a) {\n\t\tArrays.sort(a);\n\t}\n\n\t//PRINT SHORTCUTS\n\n\tprivate static void println(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t\tout.write(\"\\n\");\n\t}\n\n\tprivate static void print(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \"\");\n\t\t}\n\t}\n\n\tprivate static void printAll(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t}\n\n\tprivate static void debug(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t\tout.write(\"\\n\");\n\t\tout.flush();\n\t}\n\n\tprivate static HashMap<Integer, ArrayList<Integer>> intree(int n) {\n\n\t\tHashMap<Integer, ArrayList<Integer>> g = new HashMap<>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tg.put(i, new ArrayList<>());\n\t\t}\n\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\tint u = ini() - 1;\n\t\t\tint v = ini() - 1;\n\t\t\tg.get(u).add(v);\n\t\t\tg.get(v).add(u);\n\t\t}\n\n\t\treturn g;\n\t}\n}", "Main" ]
import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.InputMismatchException; public class Main { private static int n, m; private static int[] a; private static String s; private static HashMap<Integer, ArrayList<Integer>> g; private static long pp, qq, rr; public static void main(String[] args) { n = ini(); m = ini(); a = ina(m); for(int x: a) n-=x; println(n<0?-1:n); out.flush(); out.close(); } //NONPROBLEM CODE private static InputReader in = new InputReader(System.in); private static PrintWriter out = new PrintWriter(System.out); private static class InputReader { private final InputStream stream; private final byte[] buf = new byte[8192]; private int curChar, snumChars; public InputReader(InputStream st) { this.stream = st; } public int read() { if (snumChars == -1) throw new InputMismatchException(); if (curChar >= snumChars) { curChar = 0; try { snumChars = stream.read(buf); } catch (IOException e) { throw new InputMismatchException(); } if (snumChars <= 0) return -1; } return buf[curChar++]; } public int nextInt() { int c = read(); while (isSpaceChar(c)) { c = read(); } int sgn = 1; if (c == '-') { sgn = -1; c = read(); } int res = 0; do { res *= 10; res += c - '0'; c = read(); } while (!isSpaceChar(c)); return res * sgn; } public long nextLong() { int c = read(); while (isSpaceChar(c)) { c = read(); } int sgn = 1; if (c == '-') { sgn = -1; c = read(); } long res = 0; do { res *= 10; res += c - '0'; c = read(); } while (!isSpaceChar(c)); return res * sgn; } public int[] nextIntArray(int n) { int a[] = new int[n]; for (int i = 0; i < n; i++) { a[i] = nextInt(); } return a; } public String readString() { int c = read(); while (isSpaceChar(c)) { c = read(); } StringBuilder res = new StringBuilder(); do { res.appendCodePoint(c); c = read(); } while (!isSpaceChar(c)); return res.toString(); } public String nextLine() { int c = read(); while (isSpaceChar(c)) c = read(); StringBuilder res = new StringBuilder(); do { res.appendCodePoint(c); c = read(); } while (!isEndOfLine(c)); return res.toString(); } public boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; } private boolean isEndOfLine(int c) { return c == '\n' || c == '\r' || c == -1; } } //INPUT SHORTCUTS private static int[] ina(int n) { int[] temp = new int[n]; for (int i = 0; i < n; i++) { temp[i] = in.nextInt(); } return temp; } private static int ini() { return in.nextInt(); } private static String ins() { return in.readString(); } //OTHER SHORTCUTS public static void sort(int[] a) { Arrays.sort(a); } //PRINT SHORTCUTS private static void println(Object... o) { for (Object x : o) { out.write(x + " "); } out.write("\n"); } private static void print(Object... o) { for (Object x : o) { out.write(x + ""); } } private static void printAll(Object... o) { for (Object x : o) { out.write(x + " "); } } private static void debug(Object... o) { for (Object x : o) { out.write(x + " "); } out.write("\n"); out.flush(); } private static HashMap<Integer, ArrayList<Integer>> intree(int n) { HashMap<Integer, ArrayList<Integer>> g = new HashMap<>(); for (int i = 0; i < n; i++) { g.put(i, new ArrayList<>()); } for (int i = 0; i < n - 1; i++) { int u = ini() - 1; int v = ini() - 1; g.get(u).add(v); g.get(v).add(u); } return g; } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 2, 13, 4, 18, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 40, 17, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 11, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 11, 25 ], [ 25, 26 ], [ 25, 27 ], [ 11, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 28, 33 ], [ 33, 34 ], [ 33, 35 ], [ 28, 36 ], [ 36, 37 ], [ 37, 38 ], [ 28, 39 ], [ 40, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 46, 47 ], [ 11, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 48, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 53, 58 ], [ 58, 59 ], [ 58, 60 ], [ 48, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 62, 67 ], [ 67, 68 ], [ 9, 69 ], [ 69, 70 ] ]
[ "import java.util.Scanner;\nimport java.lang.Math;\nclass Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt(),\n m = sc.nextInt();\n int A = 0;\n for(int i=0;i<m;i++){\n A = A + sc.nextInt();\n }\n if(A <= n){\n System.out.print(n-A);\n }else{\n System.out.print(-1);\n }\n \n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "import java.lang.Math;", "Math", "java.lang", "class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt(),\n m = sc.nextInt();\n int A = 0;\n for(int i=0;i<m;i++){\n A = A + sc.nextInt();\n }\n if(A <= n){\n System.out.print(n-A);\n }else{\n System.out.print(-1);\n }\n \n }\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt(),\n m = sc.nextInt();\n int A = 0;\n for(int i=0;i<m;i++){\n A = A + sc.nextInt();\n }\n if(A <= n){\n System.out.print(n-A);\n }else{\n System.out.print(-1);\n }\n \n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt(),\n m = sc.nextInt();\n int A = 0;\n for(int i=0;i<m;i++){\n A = A + sc.nextInt();\n }\n if(A <= n){\n System.out.print(n-A);\n }else{\n System.out.print(-1);\n }\n \n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n = sc.nextInt()", "n", "sc.nextInt()", "sc.nextInt", "sc", "m = sc.nextInt();", "m", "sc.nextInt()", "sc.nextInt", "sc", "int A = 0;", "A", "0", "for(int i=0;i<m;i++){\n A = A + sc.nextInt();\n }", "int i=0;", "int i=0;", "i", "0", "i<m", "i", "m", "i++", "i++", "i", "{\n A = A + sc.nextInt();\n }", "{\n A = A + sc.nextInt();\n }", "A = A + sc.nextInt()", "A", "A + sc.nextInt()", "A", "sc.nextInt()", "sc.nextInt", "sc", "if(A <= n){\n System.out.print(n-A);\n }else{\n System.out.print(-1);\n }", "A <= n", "A", "n", "{\n System.out.print(n-A);\n }", "System.out.print(n-A)", "System.out.print", "System.out", "System", "System.out", "n-A", "n", "A", "{\n System.out.print(-1);\n }", "System.out.print(-1)", "System.out.print", "System.out", "System", "System.out", "-1", "1", "String[] args", "args" ]
import java.util.Scanner; import java.lang.Math; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(), m = sc.nextInt(); int A = 0; for(int i=0;i<m;i++){ A = A + sc.nextInt(); } if(A <= n){ System.out.print(n-A); }else{ System.out.print(-1); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 13, 17, 30, 0, 13, 40, 17, 3, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 59, 5 ], [ 59, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 22, 27 ], [ 27, 28 ], [ 27, 29 ], [ 22, 30 ], [ 30, 31 ], [ 31, 32 ], [ 22, 33 ], [ 34, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 34, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 40, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 44, 49 ], [ 8, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 6, 56 ], [ 56, 57 ], [ 0, 58 ], [ 58, 59 ], [ 58, 60 ] ]
[ "import java.util.Scanner;\npublic class Main{\n\tpublic static void main(String[] args){\n\t Scanner sc = new Scanner(System.in);\n\t long n = sc.nextLong();\n\t int m = sc.nextInt();\n\t for(int i = 0; i < m; i++) {\n\t\t n -= sc.nextLong();\n\t\t if(n < 0) {\n\t\t\t n = -1;\n\t\t\t break;\n\t\t }\n\t }\n\t System.out.println(n);\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n\tpublic static void main(String[] args){\n\t Scanner sc = new Scanner(System.in);\n\t long n = sc.nextLong();\n\t int m = sc.nextInt();\n\t for(int i = 0; i < m; i++) {\n\t\t n -= sc.nextLong();\n\t\t if(n < 0) {\n\t\t\t n = -1;\n\t\t\t break;\n\t\t }\n\t }\n\t System.out.println(n);\n\t}\n}", "Main", "public static void main(String[] args){\n\t Scanner sc = new Scanner(System.in);\n\t long n = sc.nextLong();\n\t int m = sc.nextInt();\n\t for(int i = 0; i < m; i++) {\n\t\t n -= sc.nextLong();\n\t\t if(n < 0) {\n\t\t\t n = -1;\n\t\t\t break;\n\t\t }\n\t }\n\t System.out.println(n);\n\t}", "main", "{\n\t Scanner sc = new Scanner(System.in);\n\t long n = sc.nextLong();\n\t int m = sc.nextInt();\n\t for(int i = 0; i < m; i++) {\n\t\t n -= sc.nextLong();\n\t\t if(n < 0) {\n\t\t\t n = -1;\n\t\t\t break;\n\t\t }\n\t }\n\t System.out.println(n);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "long n = sc.nextLong();", "n", "sc.nextLong()", "sc.nextLong", "sc", "int m = sc.nextInt();", "m", "sc.nextInt()", "sc.nextInt", "sc", "for(int i = 0; i < m; i++) {\n\t\t n -= sc.nextLong();\n\t\t if(n < 0) {\n\t\t\t n = -1;\n\t\t\t break;\n\t\t }\n\t }", "int i = 0;", "int i = 0;", "i", "0", "i < m", "i", "m", "i++", "i++", "i", "{\n\t\t n -= sc.nextLong();\n\t\t if(n < 0) {\n\t\t\t n = -1;\n\t\t\t break;\n\t\t }\n\t }", "{\n\t\t n -= sc.nextLong();\n\t\t if(n < 0) {\n\t\t\t n = -1;\n\t\t\t break;\n\t\t }\n\t }", "n -= sc.nextLong()", "n", "sc.nextLong()", "sc.nextLong", "sc", "if(n < 0) {\n\t\t\t n = -1;\n\t\t\t break;\n\t\t }", "n < 0", "n", "0", "{\n\t\t\t n = -1;\n\t\t\t break;\n\t\t }", "n = -1", "n", "-1", "1", "break;", "System.out.println(n)", "System.out.println", "System.out", "System", "System.out", "n", "String[] args", "args", "public class Main{\n\tpublic static void main(String[] args){\n\t Scanner sc = new Scanner(System.in);\n\t long n = sc.nextLong();\n\t int m = sc.nextInt();\n\t for(int i = 0; i < m; i++) {\n\t\t n -= sc.nextLong();\n\t\t if(n < 0) {\n\t\t\t n = -1;\n\t\t\t break;\n\t\t }\n\t }\n\t System.out.println(n);\n\t}\n}", "public class Main{\n\tpublic static void main(String[] args){\n\t Scanner sc = new Scanner(System.in);\n\t long n = sc.nextLong();\n\t int m = sc.nextInt();\n\t for(int i = 0; i < m; i++) {\n\t\t n -= sc.nextLong();\n\t\t if(n < 0) {\n\t\t\t n = -1;\n\t\t\t break;\n\t\t }\n\t }\n\t System.out.println(n);\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); long n = sc.nextLong(); int m = sc.nextInt(); for(int i = 0; i < m; i++) { n -= sc.nextLong(); if(n < 0) { n = -1; break; } } System.out.println(n); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 0, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 17, 28, 13, 13, 30, 30, 0, 13, 4, 18, 13, 13, 41, 13, 2, 4, 18, 13, 18, 13, 17, 13, 4, 18, 18, 13, 13, 8, 2, 13, 17, 13, 40, 17, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 76, 5 ], [ 76, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 19, 22 ], [ 8, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 8, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 31, 32 ], [ 30, 33 ], [ 8, 34 ], [ 34, 35 ], [ 34, 36 ], [ 8, 37 ], [ 37, 38 ], [ 37, 39 ], [ 37, 40 ], [ 41, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 44, 47 ], [ 8, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 51, 54 ], [ 54, 55 ], [ 54, 56 ], [ 50, 57 ], [ 8, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 58, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 63, 67 ], [ 63, 68 ], [ 68, 69 ], [ 8, 70 ], [ 70, 71 ], [ 71, 72 ], [ 6, 73 ], [ 73, 74 ], [ 0, 75 ], [ 75, 76 ], [ 75, 77 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString l = sc.nextLine();\n\t\tString[] arr1 = l.split(\" \");\n\t\tl = sc.nextLine();\n\t\tString[] arr2 = l.split(\" \");\n\n\t\tInteger dSum = 0;\n\t\tfor(String s : arr2) {\n\t\t\tdSum += Integer.valueOf(s);\n\n\t\t}\n\t\tInteger res = Integer.valueOf(arr1[0]) - dSum;\n\t\tSystem.out.println(res >= 0 ? res : -1);\n\t\tsc.close();\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString l = sc.nextLine();\n\t\tString[] arr1 = l.split(\" \");\n\t\tl = sc.nextLine();\n\t\tString[] arr2 = l.split(\" \");\n\n\t\tInteger dSum = 0;\n\t\tfor(String s : arr2) {\n\t\t\tdSum += Integer.valueOf(s);\n\n\t\t}\n\t\tInteger res = Integer.valueOf(arr1[0]) - dSum;\n\t\tSystem.out.println(res >= 0 ? res : -1);\n\t\tsc.close();\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString l = sc.nextLine();\n\t\tString[] arr1 = l.split(\" \");\n\t\tl = sc.nextLine();\n\t\tString[] arr2 = l.split(\" \");\n\n\t\tInteger dSum = 0;\n\t\tfor(String s : arr2) {\n\t\t\tdSum += Integer.valueOf(s);\n\n\t\t}\n\t\tInteger res = Integer.valueOf(arr1[0]) - dSum;\n\t\tSystem.out.println(res >= 0 ? res : -1);\n\t\tsc.close();\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tString l = sc.nextLine();\n\t\tString[] arr1 = l.split(\" \");\n\t\tl = sc.nextLine();\n\t\tString[] arr2 = l.split(\" \");\n\n\t\tInteger dSum = 0;\n\t\tfor(String s : arr2) {\n\t\t\tdSum += Integer.valueOf(s);\n\n\t\t}\n\t\tInteger res = Integer.valueOf(arr1[0]) - dSum;\n\t\tSystem.out.println(res >= 0 ? res : -1);\n\t\tsc.close();\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "String l = sc.nextLine();", "l", "sc.nextLine()", "sc.nextLine", "sc", "String[] arr1 = l.split(\" \");", "arr1", "l.split(\" \")", "l.split", "l", "\" \"", "l = sc.nextLine()", "l", "sc.nextLine()", "sc.nextLine", "sc", "String[] arr2 = l.split(\" \");", "arr2", "l.split(\" \")", "l.split", "l", "\" \"", "Integer dSum = 0;", "dSum", "0", "for(String s : arr2) {\n\t\t\tdSum += Integer.valueOf(s);\n\n\t\t}", "String s", "arr2", "{\n\t\t\tdSum += Integer.valueOf(s);\n\n\t\t}", "{\n\t\t\tdSum += Integer.valueOf(s);\n\n\t\t}", "dSum += Integer.valueOf(s)", "dSum", "Integer.valueOf(s)", "Integer.valueOf", "Integer", "s", "Integer res = Integer.valueOf(arr1[0]) - dSum;", "res", "Integer.valueOf(arr1[0]) - dSum", "Integer.valueOf(arr1[0])", "Integer.valueOf", "Integer", "arr1[0]", "arr1", "0", "dSum", "System.out.println(res >= 0 ? res : -1)", "System.out.println", "System.out", "System", "System.out", "res >= 0 ? res : -1", "res >= 0", "res", "0", "res", "-1", "1", "sc.close()", "sc.close", "sc", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString l = sc.nextLine();\n\t\tString[] arr1 = l.split(\" \");\n\t\tl = sc.nextLine();\n\t\tString[] arr2 = l.split(\" \");\n\n\t\tInteger dSum = 0;\n\t\tfor(String s : arr2) {\n\t\t\tdSum += Integer.valueOf(s);\n\n\t\t}\n\t\tInteger res = Integer.valueOf(arr1[0]) - dSum;\n\t\tSystem.out.println(res >= 0 ? res : -1);\n\t\tsc.close();\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString l = sc.nextLine();\n\t\tString[] arr1 = l.split(\" \");\n\t\tl = sc.nextLine();\n\t\tString[] arr2 = l.split(\" \");\n\n\t\tInteger dSum = 0;\n\t\tfor(String s : arr2) {\n\t\t\tdSum += Integer.valueOf(s);\n\n\t\t}\n\t\tInteger res = Integer.valueOf(arr1[0]) - dSum;\n\t\tSystem.out.println(res >= 0 ? res : -1);\n\t\tsc.close();\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String l = sc.nextLine(); String[] arr1 = l.split(" "); l = sc.nextLine(); String[] arr2 = l.split(" "); Integer dSum = 0; for(String s : arr2) { dSum += Integer.valueOf(s); } Integer res = Integer.valueOf(arr1[0]) - dSum; System.out.println(res >= 0 ? res : -1); sc.close(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 17, 29, 4, 18, 18, 13, 13, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 22, 27 ], [ 27, 28 ], [ 27, 29 ], [ 22, 30 ], [ 30, 31 ], [ 31, 32 ], [ 22, 33 ], [ 34, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 34, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 40, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 45, 50 ], [ 44, 51 ], [ 8, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 52, 57 ], [ 6, 58 ], [ 58, 59 ] ]
[ "import java.util.*;\nclass Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int M = sc.nextInt();\n for(int i=0; i<M; i++){\n N -= sc.nextInt();\n if(N<0){\n System.out.print(\"-1\");\n return;\n }\n }\n System.out.print(N);\n }\n}", "import java.util.*;", "util.*", "java", "class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int M = sc.nextInt();\n for(int i=0; i<M; i++){\n N -= sc.nextInt();\n if(N<0){\n System.out.print(\"-1\");\n return;\n }\n }\n System.out.print(N);\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int M = sc.nextInt();\n for(int i=0; i<M; i++){\n N -= sc.nextInt();\n if(N<0){\n System.out.print(\"-1\");\n return;\n }\n }\n System.out.print(N);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int M = sc.nextInt();\n for(int i=0; i<M; i++){\n N -= sc.nextInt();\n if(N<0){\n System.out.print(\"-1\");\n return;\n }\n }\n System.out.print(N);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int M = sc.nextInt();", "M", "sc.nextInt()", "sc.nextInt", "sc", "for(int i=0; i<M; i++){\n N -= sc.nextInt();\n if(N<0){\n System.out.print(\"-1\");\n return;\n }\n }", "int i=0;", "int i=0;", "i", "0", "i<M", "i", "M", "i++", "i++", "i", "{\n N -= sc.nextInt();\n if(N<0){\n System.out.print(\"-1\");\n return;\n }\n }", "{\n N -= sc.nextInt();\n if(N<0){\n System.out.print(\"-1\");\n return;\n }\n }", "N -= sc.nextInt()", "N", "sc.nextInt()", "sc.nextInt", "sc", "if(N<0){\n System.out.print(\"-1\");\n return;\n }", "N<0", "N", "0", "{\n System.out.print(\"-1\");\n return;\n }", "System.out.print(\"-1\")", "System.out.print", "System.out", "System", "System.out", "\"-1\"", "return;", "System.out.print(N)", "System.out.print", "System.out", "System", "System.out", "N", "String[] args", "args" ]
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int M = sc.nextInt(); for(int i=0; i<M; i++){ N -= sc.nextInt(); if(N<0){ System.out.print("-1"); return; } } System.out.print(N); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 0, 13, 13, 14, 2, 13, 17, 4, 18, 18, 13, 13, 40, 17, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 66, 5 ], [ 66, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 8, 43 ], [ 43, 44 ], [ 43, 45 ], [ 8, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 46, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 46, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 6, 63 ], [ 63, 64 ], [ 0, 65 ], [ 65, 66 ], [ 65, 67 ] ]
[ "import java.util.Scanner;\n\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint days = scan.nextInt();\n\t\tint total = scan.nextInt();\n\t\tint count = 0;\n\t\tfor(int i=0;i<total;i++){\n\t\t\tcount+= scan.nextInt();\n\t\t}\n\t\tdays -= count;\n\t\tif(days<0)\n\t\t\tSystem.out.println(-1);\n\t\telse\n\t\t\tSystem.out.println(days);\n\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint days = scan.nextInt();\n\t\tint total = scan.nextInt();\n\t\tint count = 0;\n\t\tfor(int i=0;i<total;i++){\n\t\t\tcount+= scan.nextInt();\n\t\t}\n\t\tdays -= count;\n\t\tif(days<0)\n\t\t\tSystem.out.println(-1);\n\t\telse\n\t\t\tSystem.out.println(days);\n\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint days = scan.nextInt();\n\t\tint total = scan.nextInt();\n\t\tint count = 0;\n\t\tfor(int i=0;i<total;i++){\n\t\t\tcount+= scan.nextInt();\n\t\t}\n\t\tdays -= count;\n\t\tif(days<0)\n\t\t\tSystem.out.println(-1);\n\t\telse\n\t\t\tSystem.out.println(days);\n\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint days = scan.nextInt();\n\t\tint total = scan.nextInt();\n\t\tint count = 0;\n\t\tfor(int i=0;i<total;i++){\n\t\t\tcount+= scan.nextInt();\n\t\t}\n\t\tdays -= count;\n\t\tif(days<0)\n\t\t\tSystem.out.println(-1);\n\t\telse\n\t\t\tSystem.out.println(days);\n\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int days = scan.nextInt();", "days", "scan.nextInt()", "scan.nextInt", "scan", "int total = scan.nextInt();", "total", "scan.nextInt()", "scan.nextInt", "scan", "int count = 0;", "count", "0", "for(int i=0;i<total;i++){\n\t\t\tcount+= scan.nextInt();\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<total", "i", "total", "i++", "i++", "i", "{\n\t\t\tcount+= scan.nextInt();\n\t\t}", "{\n\t\t\tcount+= scan.nextInt();\n\t\t}", "count+= scan.nextInt()", "count", "scan.nextInt()", "scan.nextInt", "scan", "days -= count", "days", "count", "if(days<0)\n\t\t\tSystem.out.println(-1);\n\t\telse\n\t\t\tSystem.out.println(days);", "days<0", "days", "0", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "System.out.println(days)", "System.out.println", "System.out", "System", "System.out", "days", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint days = scan.nextInt();\n\t\tint total = scan.nextInt();\n\t\tint count = 0;\n\t\tfor(int i=0;i<total;i++){\n\t\t\tcount+= scan.nextInt();\n\t\t}\n\t\tdays -= count;\n\t\tif(days<0)\n\t\t\tSystem.out.println(-1);\n\t\telse\n\t\t\tSystem.out.println(days);\n\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint days = scan.nextInt();\n\t\tint total = scan.nextInt();\n\t\tint count = 0;\n\t\tfor(int i=0;i<total;i++){\n\t\t\tcount+= scan.nextInt();\n\t\t}\n\t\tdays -= count;\n\t\tif(days<0)\n\t\t\tSystem.out.println(-1);\n\t\telse\n\t\t\tSystem.out.println(days);\n\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int days = scan.nextInt(); int total = scan.nextInt(); int count = 0; for(int i=0;i<total;i++){ count+= scan.nextInt(); } days -= count; if(days<0) System.out.println(-1); else System.out.println(days); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 13, 17, 4, 18, 18, 13, 13, 13, 4, 18, 18, 13, 13, 40, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 60, 5 ], [ 60, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 22, 27 ], [ 27, 28 ], [ 27, 29 ], [ 22, 30 ], [ 30, 31 ], [ 31, 32 ], [ 22, 33 ], [ 34, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 8, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 40, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 44, 49 ], [ 40, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 6, 57 ], [ 57, 58 ], [ 0, 59 ], [ 59, 60 ], [ 59, 61 ] ]
[ "import java.util.*;\n\npublic class Main {\n\n \n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int m = scan.nextInt();\n for (int i = 0; i < m; i++) {\n n -= scan.nextInt();\n }\n if (n >= 0) System.out.println(n);\n else System.out.println(-1);\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\n \n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int m = scan.nextInt();\n for (int i = 0; i < m; i++) {\n n -= scan.nextInt();\n }\n if (n >= 0) System.out.println(n);\n else System.out.println(-1);\n }\n}", "Main", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int m = scan.nextInt();\n for (int i = 0; i < m; i++) {\n n -= scan.nextInt();\n }\n if (n >= 0) System.out.println(n);\n else System.out.println(-1);\n }", "main", "{\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int m = scan.nextInt();\n for (int i = 0; i < m; i++) {\n n -= scan.nextInt();\n }\n if (n >= 0) System.out.println(n);\n else System.out.println(-1);\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int n = scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "int m = scan.nextInt();", "m", "scan.nextInt()", "scan.nextInt", "scan", "for (int i = 0; i < m; i++) {\n n -= scan.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < m", "i", "m", "i++", "i++", "i", "{\n n -= scan.nextInt();\n }", "{\n n -= scan.nextInt();\n }", "n -= scan.nextInt()", "n", "scan.nextInt()", "scan.nextInt", "scan", "if (n >= 0) System.out.println(n);\n else System.out.println(-1);", "n >= 0", "n", "0", "System.out.println(n)", "System.out.println", "System.out", "System", "System.out", "n", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "String[] args", "args", "public class Main {\n\n \n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int m = scan.nextInt();\n for (int i = 0; i < m; i++) {\n n -= scan.nextInt();\n }\n if (n >= 0) System.out.println(n);\n else System.out.println(-1);\n }\n}", "public class Main {\n\n \n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int m = scan.nextInt();\n for (int i = 0; i < m; i++) {\n n -= scan.nextInt();\n }\n if (n >= 0) System.out.println(n);\n else System.out.println(-1);\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int m = scan.nextInt(); for (int i = 0; i < m; i++) { n -= scan.nextInt(); } if (n >= 0) System.out.println(n); else System.out.println(-1); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 0, 13, 13, 14, 2, 2, 13, 13, 40, 17, 30, 4, 18, 18, 13, 13, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 72, 5 ], [ 72, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 37, 43 ], [ 43, 44 ], [ 43, 45 ], [ 8, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 47, 51 ], [ 51, 52 ], [ 46, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 54, 59 ], [ 46, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 61, 66 ], [ 66, 67 ], [ 66, 68 ], [ 6, 69 ], [ 69, 70 ], [ 0, 71 ], [ 71, 72 ], [ 71, 73 ] ]
[ "import java.util.*;\n \npublic class Main{\n public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N =sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tint total = 0;\n\t\tfor(int i = 0;i < M;i++) {\n\t\t\tint x = sc.nextInt();\n\t\t\ttotal += x;\n\t\t}\n\t\tif(N - total < -1) {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}else {\n\t\t\tSystem.out.println(N - total);\n\t\t}\n\t}\n}", "import java.util.*;", "util.*", "java", "public class Main{\n public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N =sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tint total = 0;\n\t\tfor(int i = 0;i < M;i++) {\n\t\t\tint x = sc.nextInt();\n\t\t\ttotal += x;\n\t\t}\n\t\tif(N - total < -1) {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}else {\n\t\t\tSystem.out.println(N - total);\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N =sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tint total = 0;\n\t\tfor(int i = 0;i < M;i++) {\n\t\t\tint x = sc.nextInt();\n\t\t\ttotal += x;\n\t\t}\n\t\tif(N - total < -1) {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}else {\n\t\t\tSystem.out.println(N - total);\n\t\t}\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N =sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tint total = 0;\n\t\tfor(int i = 0;i < M;i++) {\n\t\t\tint x = sc.nextInt();\n\t\t\ttotal += x;\n\t\t}\n\t\tif(N - total < -1) {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}else {\n\t\t\tSystem.out.println(N - total);\n\t\t}\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int N =sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int M = sc.nextInt();", "M", "sc.nextInt()", "sc.nextInt", "sc", "int total = 0;", "total", "0", "for(int i = 0;i < M;i++) {\n\t\t\tint x = sc.nextInt();\n\t\t\ttotal += x;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < M", "i", "M", "i++", "i++", "i", "{\n\t\t\tint x = sc.nextInt();\n\t\t\ttotal += x;\n\t\t}", "{\n\t\t\tint x = sc.nextInt();\n\t\t\ttotal += x;\n\t\t}", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "total += x", "total", "x", "if(N - total < -1) {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}else {\n\t\t\tSystem.out.println(N - total);\n\t\t}", "N - total < -1", "N - total", "N", "total", "-1", "1", "{\n\t\t\tSystem.out.println(\"-1\");\n\t\t}", "System.out.println(\"-1\")", "System.out.println", "System.out", "System", "System.out", "\"-1\"", "{\n\t\t\tSystem.out.println(N - total);\n\t\t}", "System.out.println(N - total)", "System.out.println", "System.out", "System", "System.out", "N - total", "N", "total", "String[] args", "args", "public class Main{\n public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N =sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tint total = 0;\n\t\tfor(int i = 0;i < M;i++) {\n\t\t\tint x = sc.nextInt();\n\t\t\ttotal += x;\n\t\t}\n\t\tif(N - total < -1) {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}else {\n\t\t\tSystem.out.println(N - total);\n\t\t}\n\t}\n}", "public class Main{\n public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N =sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tint total = 0;\n\t\tfor(int i = 0;i < M;i++) {\n\t\t\tint x = sc.nextInt();\n\t\t\ttotal += x;\n\t\t}\n\t\tif(N - total < -1) {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}else {\n\t\t\tSystem.out.println(N - total);\n\t\t}\n\t}\n}", "Main" ]
import java.util.*; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N =sc.nextInt(); int M = sc.nextInt(); int total = 0; for(int i = 0;i < M;i++) { int x = sc.nextInt(); total += x; } if(N - total < -1) { System.out.println("-1"); }else { System.out.println(N - total); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 40, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 67, 5 ], [ 67, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 8, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 48, 53 ], [ 53, 54 ], [ 43, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 56, 61 ], [ 61, 62 ], [ 61, 63 ], [ 6, 64 ], [ 64, 65 ], [ 0, 66 ], [ 66, 67 ], [ 66, 68 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint days = sc.nextInt();\n\t\tint cnt = sc.nextInt();\n\n\t\tint needDays = 0;\n\n\t\tfor(int i = 0; i < cnt; i++) {\n\t\t\tneedDays += sc.nextInt();\n\t\t}\n\n\t\tif(days < needDays) {\n\t\t\tSystem.out.println(-1);\n\t\t} else {\n\t\t\tSystem.out.println(days - needDays);\n\t\t}\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint days = sc.nextInt();\n\t\tint cnt = sc.nextInt();\n\n\t\tint needDays = 0;\n\n\t\tfor(int i = 0; i < cnt; i++) {\n\t\t\tneedDays += sc.nextInt();\n\t\t}\n\n\t\tif(days < needDays) {\n\t\t\tSystem.out.println(-1);\n\t\t} else {\n\t\t\tSystem.out.println(days - needDays);\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint days = sc.nextInt();\n\t\tint cnt = sc.nextInt();\n\n\t\tint needDays = 0;\n\n\t\tfor(int i = 0; i < cnt; i++) {\n\t\t\tneedDays += sc.nextInt();\n\t\t}\n\n\t\tif(days < needDays) {\n\t\t\tSystem.out.println(-1);\n\t\t} else {\n\t\t\tSystem.out.println(days - needDays);\n\t\t}\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint days = sc.nextInt();\n\t\tint cnt = sc.nextInt();\n\n\t\tint needDays = 0;\n\n\t\tfor(int i = 0; i < cnt; i++) {\n\t\t\tneedDays += sc.nextInt();\n\t\t}\n\n\t\tif(days < needDays) {\n\t\t\tSystem.out.println(-1);\n\t\t} else {\n\t\t\tSystem.out.println(days - needDays);\n\t\t}\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int days = sc.nextInt();", "days", "sc.nextInt()", "sc.nextInt", "sc", "int cnt = sc.nextInt();", "cnt", "sc.nextInt()", "sc.nextInt", "sc", "int needDays = 0;", "needDays", "0", "for(int i = 0; i < cnt; i++) {\n\t\t\tneedDays += sc.nextInt();\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < cnt", "i", "cnt", "i++", "i++", "i", "{\n\t\t\tneedDays += sc.nextInt();\n\t\t}", "{\n\t\t\tneedDays += sc.nextInt();\n\t\t}", "needDays += sc.nextInt()", "needDays", "sc.nextInt()", "sc.nextInt", "sc", "if(days < needDays) {\n\t\t\tSystem.out.println(-1);\n\t\t} else {\n\t\t\tSystem.out.println(days - needDays);\n\t\t}", "days < needDays", "days", "needDays", "{\n\t\t\tSystem.out.println(-1);\n\t\t}", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "{\n\t\t\tSystem.out.println(days - needDays);\n\t\t}", "System.out.println(days - needDays)", "System.out.println", "System.out", "System", "System.out", "days - needDays", "days", "needDays", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint days = sc.nextInt();\n\t\tint cnt = sc.nextInt();\n\n\t\tint needDays = 0;\n\n\t\tfor(int i = 0; i < cnt; i++) {\n\t\t\tneedDays += sc.nextInt();\n\t\t}\n\n\t\tif(days < needDays) {\n\t\t\tSystem.out.println(-1);\n\t\t} else {\n\t\t\tSystem.out.println(days - needDays);\n\t\t}\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint days = sc.nextInt();\n\t\tint cnt = sc.nextInt();\n\n\t\tint needDays = 0;\n\n\t\tfor(int i = 0; i < cnt; i++) {\n\t\t\tneedDays += sc.nextInt();\n\t\t}\n\n\t\tif(days < needDays) {\n\t\t\tSystem.out.println(-1);\n\t\t} else {\n\t\t\tSystem.out.println(days - needDays);\n\t\t}\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int days = sc.nextInt(); int cnt = sc.nextInt(); int needDays = 0; for(int i = 0; i < cnt; i++) { needDays += sc.nextInt(); } if(days < needDays) { System.out.println(-1); } else { System.out.println(days - needDays); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 40, 17, 4, 18, 18, 13, 13, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 22, 27 ], [ 27, 28 ], [ 27, 29 ], [ 22, 30 ], [ 30, 31 ], [ 31, 32 ], [ 22, 33 ], [ 34, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 8, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 40, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 45, 50 ], [ 50, 51 ], [ 40, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 52, 57 ], [ 6, 58 ], [ 58, 59 ] ]
[ "import java.util.*;\nclass Main {\n public static void main(String args[]){\n \tScanner sc = new Scanner(System.in);\n \tint N = sc.nextInt();\n \tint M = sc.nextInt();\n \tfor(int i = 0; i<M; i++){\n \tN -= sc.nextInt();\n }\n \tif (N<0){\n System.out.println(-1);\n }else System.out.println(N);\n \n }\n}", "import java.util.*;", "util.*", "java", "class Main {\n public static void main(String args[]){\n \tScanner sc = new Scanner(System.in);\n \tint N = sc.nextInt();\n \tint M = sc.nextInt();\n \tfor(int i = 0; i<M; i++){\n \tN -= sc.nextInt();\n }\n \tif (N<0){\n System.out.println(-1);\n }else System.out.println(N);\n \n }\n}", "Main", "public static void main(String args[]){\n \tScanner sc = new Scanner(System.in);\n \tint N = sc.nextInt();\n \tint M = sc.nextInt();\n \tfor(int i = 0; i<M; i++){\n \tN -= sc.nextInt();\n }\n \tif (N<0){\n System.out.println(-1);\n }else System.out.println(N);\n \n }", "main", "{\n \tScanner sc = new Scanner(System.in);\n \tint N = sc.nextInt();\n \tint M = sc.nextInt();\n \tfor(int i = 0; i<M; i++){\n \tN -= sc.nextInt();\n }\n \tif (N<0){\n System.out.println(-1);\n }else System.out.println(N);\n \n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int M = sc.nextInt();", "M", "sc.nextInt()", "sc.nextInt", "sc", "for(int i = 0; i<M; i++){\n \tN -= sc.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i<M", "i", "M", "i++", "i++", "i", "{\n \tN -= sc.nextInt();\n }", "{\n \tN -= sc.nextInt();\n }", "N -= sc.nextInt()", "N", "sc.nextInt()", "sc.nextInt", "sc", "if (N<0){\n System.out.println(-1);\n }else System.out.println(N);", "N<0", "N", "0", "{\n System.out.println(-1);\n }", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "System.out.println(N)", "System.out.println", "System.out", "System", "System.out", "N", "String args[]", "args" ]
import java.util.*; class Main { public static void main(String args[]){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int M = sc.nextInt(); for(int i = 0; i<M; i++){ N -= sc.nextInt(); } if (N<0){ System.out.println(-1); }else System.out.println(N); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 18, 13, 13, 41, 13, 18, 13, 13, 41, 13, 20, 41, 13, 20, 41, 13, 20, 4, 18, 13, 17, 13, 13, 4, 18, 13, 23, 13, 6, 13, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 13, 4, 18, 13, 41, 13, 2, 13, 13, 4, 18, 13, 8, 2, 13, 17, 13, 17, 23, 13, 23, 13, 23, 13, 6, 13, 41, 13, 41, 13, 20, 17, 41, 13, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 40, 17, 37, 20, 14, 2, 13, 13, 30, 0, 13, 17, 38, 5, 13, 30, 37, 20, 30, 0, 13, 4, 18, 13, 13, 14, 2, 13, 17, 29, 40, 17, 29, 18, 13, 40, 13, 12, 13, 30, 41, 13, 4, 13, 42, 4, 13, 13, 0, 13, 4, 13, 41, 13, 17, 14, 2, 13, 17, 30, 0, 13, 40, 17, 0, 13, 4, 13, 41, 13, 17, 42, 40, 4, 13, 13, 30, 14, 2, 2, 13, 17, 2, 13, 17, 37, 20, 0, 13, 17, 0, 13, 2, 13, 17, 0, 13, 4, 13, 29, 2, 13, 13, 12, 13, 30, 41, 13, 4, 13, 42, 4, 13, 13, 0, 13, 4, 13, 41, 13, 17, 14, 2, 13, 17, 30, 0, 13, 40, 17, 0, 13, 4, 13, 41, 13, 17, 42, 40, 4, 13, 13, 30, 14, 2, 2, 13, 17, 2, 13, 17, 37, 20, 0, 13, 17, 0, 13, 2, 13, 17, 0, 13, 4, 13, 29, 2, 13, 13, 12, 13, 30, 41, 13, 4, 13, 42, 4, 13, 13, 0, 13, 4, 13, 41, 13, 20, 42, 40, 4, 13, 13, 30, 4, 18, 13, 13, 0, 13, 4, 13, 29, 4, 18, 13, 12, 13, 30, 14, 2, 13, 17, 29, 4, 18, 13, 13, 29, 2, 2, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 2, 13, 17, 2, 13, 40, 17, 23, 13, 12, 13, 30, 29, 4, 13, 6, 13, 12, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 19, 20 ], [ 19, 21 ], [ 0, 22 ], [ 22, 23 ], [ 22, 24 ], [ 0, 25 ], [ 398, 26 ], [ 398, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 32, 34 ], [ 29, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 37, 39 ], [ 29, 40 ], [ 40, 41 ], [ 40, 42 ], [ 29, 43 ], [ 43, 44 ], [ 43, 45 ], [ 29, 46 ], [ 46, 47 ], [ 46, 48 ], [ 29, 49 ], [ 49, 50 ], [ 50, 51 ], [ 49, 52 ], [ 49, 53 ], [ 49, 54 ], [ 29, 55 ], [ 55, 56 ], [ 56, 57 ], [ 27, 58 ], [ 58, 59 ], [ 398, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 68, 69 ], [ 64, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 73, 74 ], [ 64, 75 ], [ 75, 76 ], [ 75, 77 ], [ 64, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 78, 83 ], [ 83, 84 ], [ 83, 85 ], [ 78, 86 ], [ 86, 87 ], [ 87, 88 ], [ 78, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 92, 93 ], [ 93, 94 ], [ 64, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 97, 99 ], [ 64, 100 ], [ 100, 101 ], [ 101, 102 ], [ 100, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 103, 107 ], [ 103, 108 ], [ 62, 109 ], [ 109, 110 ], [ 62, 111 ], [ 111, 112 ], [ 62, 113 ], [ 113, 114 ], [ 398, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 115, 119 ], [ 119, 120 ], [ 119, 121 ], [ 115, 123 ], [ 123, 124 ], [ 115, 125 ], [ 125, 126 ], [ 115, 127 ], [ 127, 128 ], [ 115, 129 ], [ 129, 130 ], [ 129, 131 ], [ 131, 132 ], [ 132, 133 ], [ 133, 134 ], [ 133, 135 ], [ 132, 136 ], [ 129, 137 ], [ 137, 138 ], [ 115, 139 ], [ 139, 140 ], [ 139, 141 ], [ 141, 142 ], [ 142, 143 ], [ 143, 144 ], [ 143, 145 ], [ 145, 146 ], [ 142, 147 ], [ 147, 148 ], [ 141, 149 ], [ 149, 150 ], [ 150, 151 ], [ 150, 152 ], [ 149, 153 ], [ 153, 154 ], [ 154, 155 ], [ 154, 156 ], [ 153, 157 ], [ 157, 158 ], [ 158, 159 ], [ 158, 160 ], [ 160, 161 ], [ 161, 162 ], [ 157, 163 ], [ 163, 164 ], [ 164, 165 ], [ 164, 166 ], [ 166, 167 ], [ 167, 168 ], [ 166, 169 ], [ 153, 170 ], [ 170, 171 ], [ 171, 172 ], [ 171, 173 ], [ 170, 174 ], [ 174, 175 ], [ 175, 176 ], [ 141, 177 ], [ 177, 178 ], [ 178, 179 ], [ 178, 180 ], [ 180, 181 ], [ 115, 182 ], [ 182, 183 ], [ 182, 184 ], [ 184, 185 ], [ 185, 186 ], [ 185, 187 ], [ 187, 188 ], [ 184, 189 ], [ 189, 190 ], [ 190, 191 ], [ 190, 192 ], [ 189, 193 ], [ 193, 194 ], [ 193, 195 ], [ 195, 196 ], [ 184, 197 ], [ 197, 198 ], [ 197, 199 ], [ 184, 200 ], [ 200, 201 ], [ 201, 202 ], [ 201, 203 ], [ 200, 204 ], [ 204, 205 ], [ 205, 206 ], [ 205, 207 ], [ 207, 208 ], [ 204, 209 ], [ 209, 210 ], [ 209, 211 ], [ 211, 212 ], [ 184, 213 ], [ 213, 214 ], [ 213, 215 ], [ 184, 216 ], [ 216, 217 ], [ 217, 218 ], [ 218, 219 ], [ 218, 220 ], [ 216, 221 ], [ 221, 222 ], [ 222, 223 ], [ 223, 224 ], [ 224, 225 ], [ 224, 226 ], [ 223, 227 ], [ 227, 228 ], [ 227, 229 ], [ 222, 230 ], [ 230, 231 ], [ 221, 232 ], [ 232, 233 ], [ 232, 234 ], [ 221, 235 ], [ 235, 236 ], [ 235, 237 ], [ 237, 238 ], [ 237, 239 ], [ 221, 240 ], [ 240, 241 ], [ 240, 242 ], [ 242, 243 ], [ 184, 244 ], [ 244, 245 ], [ 245, 246 ], [ 245, 247 ], [ 115, 248 ], [ 248, 249 ], [ 248, 250 ], [ 250, 251 ], [ 251, 252 ], [ 251, 253 ], [ 253, 254 ], [ 250, 255 ], [ 255, 256 ], [ 256, 257 ], [ 256, 258 ], [ 255, 259 ], [ 259, 260 ], [ 259, 261 ], [ 261, 262 ], [ 250, 263 ], [ 263, 264 ], [ 263, 265 ], [ 250, 266 ], [ 266, 267 ], [ 267, 268 ], [ 267, 269 ], [ 266, 270 ], [ 270, 271 ], [ 271, 272 ], [ 271, 273 ], [ 273, 274 ], [ 270, 275 ], [ 275, 276 ], [ 275, 277 ], [ 277, 278 ], [ 250, 279 ], [ 279, 280 ], [ 279, 281 ], [ 250, 282 ], [ 282, 283 ], [ 283, 284 ], [ 284, 285 ], [ 284, 286 ], [ 282, 287 ], [ 287, 288 ], [ 288, 289 ], [ 289, 290 ], [ 290, 291 ], [ 290, 292 ], [ 289, 293 ], [ 293, 294 ], [ 293, 295 ], [ 288, 296 ], [ 296, 297 ], [ 287, 298 ], [ 298, 299 ], [ 298, 300 ], [ 287, 301 ], [ 301, 302 ], [ 301, 303 ], [ 303, 304 ], [ 303, 305 ], [ 287, 306 ], [ 306, 307 ], [ 306, 308 ], [ 308, 309 ], [ 250, 310 ], [ 310, 311 ], [ 311, 312 ], [ 311, 313 ], [ 115, 314 ], [ 314, 315 ], [ 314, 316 ], [ 316, 317 ], [ 317, 318 ], [ 317, 319 ], [ 319, 320 ], [ 316, 321 ], [ 321, 322 ], [ 322, 323 ], [ 322, 324 ], [ 321, 325 ], [ 325, 326 ], [ 325, 327 ], [ 327, 328 ], [ 316, 329 ], [ 329, 330 ], [ 329, 331 ], [ 316, 332 ], [ 332, 333 ], [ 333, 334 ], [ 334, 335 ], [ 334, 336 ], [ 332, 337 ], [ 337, 338 ], [ 338, 339 ], [ 339, 340 ], [ 338, 341 ], [ 337, 342 ], [ 342, 343 ], [ 342, 344 ], [ 344, 345 ], [ 316, 346 ], [ 346, 347 ], [ 347, 348 ], [ 348, 349 ], [ 115, 350 ], [ 350, 351 ], [ 350, 352 ], [ 352, 353 ], [ 353, 354 ], [ 354, 355 ], [ 354, 356 ], [ 353, 357 ], [ 357, 358 ], [ 358, 359 ], [ 359, 360 ], [ 358, 361 ], [ 352, 362 ], [ 362, 363 ], [ 366, 364 ], [ 376, 365 ], [ 373, 366 ], [ 366, 367 ], [ 367, 368 ], [ 367, 369 ], [ 366, 370 ], [ 370, 371 ], [ 370, 372 ], [ 373, 373 ], [ 373, 374 ], [ 373, 375 ], [ 376, 376 ], [ 376, 377 ], [ 376, 378 ], [ 366, 379 ], [ 379, 380 ], [ 379, 381 ], [ 381, 382 ], [ 350, 383 ], [ 383, 384 ], [ 115, 385 ], [ 385, 386 ], [ 385, 387 ], [ 387, 388 ], [ 388, 389 ], [ 389, 390 ], [ 115, 391 ], [ 391, 392 ], [ 391, 393 ], [ 393, 394 ], [ 393, 395 ], [ 395, 396 ], [ 0, 397 ], [ 397, 398 ], [ 397, 399 ] ]
[ " import java.io.OutputStream;\n import java.io.IOException;\n import java.io.InputStream;\n import java.io.PrintWriter;\n import java.util.InputMismatchException;\n import java.io.IOException;\n import java.io.InputStream;\n import java.util.*;\n /**\n * Built using CHelper plug-in\n * Actual solution is at the top\n *\n * @author Manan Patel\n */\n public class Main{\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader sc = new InputReader(inputStream);\n PrintWriter w = new PrintWriter(outputStream);\n solution solver = new solution();\n //int t = sc.nextInt();\n //for(int i = 1 ; i <= t ; i++)\n solver.solve(1 , sc , w);\n \n w.close();\n }\n\n static class solution {\n public void solve(int tc, InputReader sc, PrintWriter w) {\n int n = sc.nextInt() , m = sc.nextInt();\n long sum = 0;\n for(int i = 0 ; i < m ; i++)\n sum += sc.nextInt();\n int d = (int) (n - sum);\n w.println(d >= 0 ? d : \"-1\");\n }\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1)\n throw new InputMismatchException();\n\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n int sgn = 1;\n\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res * sgn;\n }\n\n public long nextLong() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public String readString() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public String next() {\n return readString();\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n }\n", "import java.io.OutputStream;", "OutputStream", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "import java.io.PrintWriter;", "PrintWriter", "java.io", "import java.util.InputMismatchException;", "InputMismatchException", "java.util", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "import java.util.*;", "util.*", "java", "public class Main{\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader sc = new InputReader(inputStream);\n PrintWriter w = new PrintWriter(outputStream);\n solution solver = new solution();\n //int t = sc.nextInt();\n //for(int i = 1 ; i <= t ; i++)\n solver.solve(1 , sc , w);\n \n w.close();\n }\n\n static class solution {\n public void solve(int tc, InputReader sc, PrintWriter w) {\n int n = sc.nextInt() , m = sc.nextInt();\n long sum = 0;\n for(int i = 0 ; i < m ; i++)\n sum += sc.nextInt();\n int d = (int) (n - sum);\n w.println(d >= 0 ? d : \"-1\");\n }\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1)\n throw new InputMismatchException();\n\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n int sgn = 1;\n\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res * sgn;\n }\n\n public long nextLong() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public String readString() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public String next() {\n return readString();\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n }", "Main", "public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader sc = new InputReader(inputStream);\n PrintWriter w = new PrintWriter(outputStream);\n solution solver = new solution();\n //int t = sc.nextInt();\n //for(int i = 1 ; i <= t ; i++)\n solver.solve(1 , sc , w);\n \n w.close();\n }", "main", "{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader sc = new InputReader(inputStream);\n PrintWriter w = new PrintWriter(outputStream);\n solution solver = new solution();\n //int t = sc.nextInt();\n //for(int i = 1 ; i <= t ; i++)\n solver.solve(1 , sc , w);\n \n w.close();\n }", "InputStream inputStream = System.in;", "inputStream", "System.in", "System", "System.in", "OutputStream outputStream = System.out;", "outputStream", "System.out", "System", "System.out", "InputReader sc = new InputReader(inputStream);", "sc", "new InputReader(inputStream)", "PrintWriter w = new PrintWriter(outputStream);", "w", "new PrintWriter(outputStream)", "solution solver = new solution();", "solver", "new solution()", "solver.solve(1 , sc , w)", "solver.solve", "solver", "1", "sc", "w", "w.close()", "w.close", "w", "String[] args", "args", "static class solution {\n public void solve(int tc, InputReader sc, PrintWriter w) {\n int n = sc.nextInt() , m = sc.nextInt();\n long sum = 0;\n for(int i = 0 ; i < m ; i++)\n sum += sc.nextInt();\n int d = (int) (n - sum);\n w.println(d >= 0 ? d : \"-1\");\n }\n }", "solution", "public void solve(int tc, InputReader sc, PrintWriter w) {\n int n = sc.nextInt() , m = sc.nextInt();\n long sum = 0;\n for(int i = 0 ; i < m ; i++)\n sum += sc.nextInt();\n int d = (int) (n - sum);\n w.println(d >= 0 ? d : \"-1\");\n }", "solve", "{\n int n = sc.nextInt() , m = sc.nextInt();\n long sum = 0;\n for(int i = 0 ; i < m ; i++)\n sum += sc.nextInt();\n int d = (int) (n - sum);\n w.println(d >= 0 ? d : \"-1\");\n }", "int n = sc.nextInt()", "n", "sc.nextInt()", "sc.nextInt", "sc", "m = sc.nextInt();", "m", "sc.nextInt()", "sc.nextInt", "sc", "long sum = 0;", "sum", "0", "for(int i = 0 ; i < m ; i++)\n sum += sc.nextInt();", "int i = 0 ;", "int i = 0 ;", "i", "0", "i < m", "i", "m", "i++", "i++", "i", "sum += sc.nextInt();", "sum += sc.nextInt()", "sum", "sc.nextInt()", "sc.nextInt", "sc", "int d = (int) (n - sum);", "d", "(int) (n - sum)", "n", "sum", "w.println(d >= 0 ? d : \"-1\")", "w.println", "w", "d >= 0 ? d : \"-1\"", "d >= 0", "d", "0", "d", "\"-1\"", "int tc", "tc", "InputReader sc", "sc", "PrintWriter w", "w", "static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1)\n throw new InputMismatchException();\n\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n int sgn = 1;\n\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res * sgn;\n }\n\n public long nextLong() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public String readString() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public String next() {\n return readString();\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }", "InputReader", "private InputStream stream;", "stream", "private byte[] buf = new byte[1024];", "buf", "new byte[1024]", "1024", "private int curChar;", "curChar", "private int numChars;", "numChars", "private InputReader.SpaceCharFilter filter;", "filter", "public InputReader(InputStream stream) {\n this.stream = stream;\n }", "InputReader", "{\n this.stream = stream;\n }", "this.stream = stream", "this.stream", "this", "this.stream", "stream", "InputStream stream", "stream", "public int read() {\n if (numChars == -1)\n throw new InputMismatchException();\n\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }", "read", "{\n if (numChars == -1)\n throw new InputMismatchException();\n\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }", "if (numChars == -1)\n throw new InputMismatchException();", "numChars == -1", "numChars", "-1", "1", "throw new InputMismatchException();", "new InputMismatchException()", "if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n\n if (numChars <= 0)\n return -1;\n }", "curChar >= numChars", "curChar", "numChars", "{\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n\n if (numChars <= 0)\n return -1;\n }", "curChar = 0", "curChar", "0", "try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }", "catch (IOException e) {\n throw new InputMismatchException();\n }", "IOException e", "{\n throw new InputMismatchException();\n }", "throw new InputMismatchException();", "new InputMismatchException()", "{\n numChars = stream.read(buf);\n }", "numChars = stream.read(buf)", "numChars", "stream.read(buf)", "stream.read", "stream", "buf", "if (numChars <= 0)\n return -1;", "numChars <= 0", "numChars", "0", "return -1;", "-1", "1", "return buf[curChar++];", "buf[curChar++]", "buf", "curChar++", "curChar", "public int nextInt() {\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n int sgn = 1;\n\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res * sgn;\n }", "nextInt", "{\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n int sgn = 1;\n\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res * sgn;\n }", "int c = read();", "c", "read()", "read", "while (isSpaceChar(c))\n c = read();", "isSpaceChar(c)", "isSpaceChar", "c", "c = read()", "c", "read()", "read", "int sgn = 1;", "sgn", "1", "if (c == '-') {\n sgn = -1;\n c = read();\n }", "c == '-'", "c", "'-'", "{\n sgn = -1;\n c = read();\n }", "sgn = -1", "sgn", "-1", "1", "c = read()", "c", "read()", "read", "int res = 0;", "res", "0", "do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));", "!isSpaceChar(c)", "isSpaceChar(c)", "isSpaceChar", "c", "{\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }", "if (c < '0' || c > '9')\n throw new InputMismatchException();", "c < '0' || c > '9'", "c < '0'", "c", "'0'", "c > '9'", "c", "'9'", "throw new InputMismatchException();", "new InputMismatchException()", "res *= 10", "res", "10", "res += c - '0'", "res", "c - '0'", "c", "'0'", "c = read()", "c", "read()", "read", "return res * sgn;", "res * sgn", "res", "sgn", "public long nextLong() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n return res * sgn;\n }", "nextLong", "{\n int c = read();\n while (isSpaceChar(c))\n c = read();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n return res * sgn;\n }", "int c = read();", "c", "read()", "read", "while (isSpaceChar(c))\n c = read();", "isSpaceChar(c)", "isSpaceChar", "c", "c = read()", "c", "read()", "read", "int sgn = 1;", "sgn", "1", "if (c == '-') {\n sgn = -1;\n c = read();\n }", "c == '-'", "c", "'-'", "{\n sgn = -1;\n c = read();\n }", "sgn = -1", "sgn", "-1", "1", "c = read()", "c", "read()", "read", "long res = 0;", "res", "0", "do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));", "!isSpaceChar(c)", "isSpaceChar(c)", "isSpaceChar", "c", "{\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }", "if (c < '0' || c > '9')\n throw new InputMismatchException();", "c < '0' || c > '9'", "c < '0'", "c", "'0'", "c > '9'", "c", "'9'", "throw new InputMismatchException();", "new InputMismatchException()", "res *= 10", "res", "10", "res += c - '0'", "res", "c - '0'", "c", "'0'", "c = read()", "c", "read()", "read", "return res * sgn;", "res * sgn", "res", "sgn", "public String readString() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res.toString();\n }", "readString", "{\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res.toString();\n }", "int c = read();", "c", "read()", "read", "while (isSpaceChar(c))\n c = read();", "isSpaceChar(c)", "isSpaceChar", "c", "c = read()", "c", "read()", "read", "StringBuilder res = new StringBuilder();", "res", "new StringBuilder()", "do {\n res.appendCodePoint(c);\n c = read();\n }\n while (!isSpaceChar(c));", "!isSpaceChar(c)", "isSpaceChar(c)", "isSpaceChar", "c", "{\n res.appendCodePoint(c);\n c = read();\n }", "res.appendCodePoint(c)", "res.appendCodePoint", "res", "c", "c = read()", "c", "read()", "read", "return res.toString();", "res.toString()", "res.toString", "res", "public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }", "isSpaceChar", "{\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }", "if (filter != null)\n return filter.isSpaceChar(c);", "filter != null", "filter", "null", "return filter.isSpaceChar(c);", "filter.isSpaceChar(c)", "filter.isSpaceChar", "filter", "c", "return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;", "c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1", "c == '\\t'", "c == '\\r'", "c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1", "c == ' '", "c", "' '", "c == '\\n'", "c", "'\\n'", "c == '\\r'", "c", "'\\r'", "c == '\\t'", "c", "'\\t'", "c == -1", "c", "-1", "1", "int c", "c", "public String next() {\n return readString();\n }", "next", "{\n return readString();\n }", "return readString();", "readString()", "readString", "public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }", "SpaceCharFilter", "public boolean isSpaceChar(int ch);", "isSpaceChar", "int ch", "ch", "public class Main{\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader sc = new InputReader(inputStream);\n PrintWriter w = new PrintWriter(outputStream);\n solution solver = new solution();\n //int t = sc.nextInt();\n //for(int i = 1 ; i <= t ; i++)\n solver.solve(1 , sc , w);\n \n w.close();\n }\n\n static class solution {\n public void solve(int tc, InputReader sc, PrintWriter w) {\n int n = sc.nextInt() , m = sc.nextInt();\n long sum = 0;\n for(int i = 0 ; i < m ; i++)\n sum += sc.nextInt();\n int d = (int) (n - sum);\n w.println(d >= 0 ? d : \"-1\");\n }\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1)\n throw new InputMismatchException();\n\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n int sgn = 1;\n\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res * sgn;\n }\n\n public long nextLong() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public String readString() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public String next() {\n return readString();\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n }", "public class Main{\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader sc = new InputReader(inputStream);\n PrintWriter w = new PrintWriter(outputStream);\n solution solver = new solution();\n //int t = sc.nextInt();\n //for(int i = 1 ; i <= t ; i++)\n solver.solve(1 , sc , w);\n \n w.close();\n }\n\n static class solution {\n public void solve(int tc, InputReader sc, PrintWriter w) {\n int n = sc.nextInt() , m = sc.nextInt();\n long sum = 0;\n for(int i = 0 ; i < m ; i++)\n sum += sc.nextInt();\n int d = (int) (n - sum);\n w.println(d >= 0 ? d : \"-1\");\n }\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1)\n throw new InputMismatchException();\n\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n int sgn = 1;\n\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res * sgn;\n }\n\n public long nextLong() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public String readString() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public String next() {\n return readString();\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n }", "Main" ]
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.InputMismatchException; import java.io.IOException; import java.io.InputStream; import java.util.*; /** * Built using CHelper plug-in * Actual solution is at the top * * @author Manan Patel */ public class Main{ public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; InputReader sc = new InputReader(inputStream); PrintWriter w = new PrintWriter(outputStream); solution solver = new solution(); //int t = sc.nextInt(); //for(int i = 1 ; i <= t ; i++) solver.solve(1 , sc , w); w.close(); } static class solution { public void solve(int tc, InputReader sc, PrintWriter w) { int n = sc.nextInt() , m = sc.nextInt(); long sum = 0; for(int i = 0 ; i < m ; i++) sum += sc.nextInt(); int d = (int) (n - sum); w.println(d >= 0 ? d : "-1"); } } static class InputReader { private InputStream stream; private byte[] buf = new byte[1024]; private int curChar; private int numChars; private InputReader.SpaceCharFilter filter; public InputReader(InputStream stream) { this.stream = stream; } public int read() { if (numChars == -1) throw new InputMismatchException(); if (curChar >= numChars) { curChar = 0; try { numChars = stream.read(buf); } catch (IOException e) { throw new InputMismatchException(); } if (numChars <= 0) return -1; } return buf[curChar++]; } public int nextInt() { int c = read(); while (isSpaceChar(c)) c = read(); int sgn = 1; if (c == '-') { sgn = -1; c = read(); } int res = 0; do { if (c < '0' || c > '9') throw new InputMismatchException(); res *= 10; res += c - '0'; c = read(); } while (!isSpaceChar(c)); return res * sgn; } public long nextLong() { int c = read(); while (isSpaceChar(c)) c = read(); int sgn = 1; if (c == '-') { sgn = -1; c = read(); } long res = 0; do { if (c < '0' || c > '9') throw new InputMismatchException(); res *= 10; res += c - '0'; c = read(); } while (!isSpaceChar(c)); return res * sgn; } public String readString() { int c = read(); while (isSpaceChar(c)) c = read(); StringBuilder res = new StringBuilder(); do { res.appendCodePoint(c); c = read(); } while (!isSpaceChar(c)); return res.toString(); } public boolean isSpaceChar(int c) { if (filter != null) return filter.isSpaceChar(c); return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; } public String next() { return readString(); } public interface SpaceCharFilter { public boolean isSpaceChar(int ch); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 0, 13, 2, 13, 18, 13, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 40, 17, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 26 ], [ 26, 27 ], [ 26, 28 ], [ 8, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 29, 34 ], [ 34, 35 ], [ 34, 36 ], [ 29, 37 ], [ 37, 38 ], [ 38, 39 ], [ 29, 40 ], [ 41, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 42, 46 ], [ 46, 47 ], [ 47, 48 ], [ 41, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 53, 55 ], [ 8, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 56, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 61, 66 ], [ 66, 67 ], [ 66, 68 ], [ 56, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 70, 75 ], [ 75, 76 ], [ 6, 77 ], [ 77, 78 ] ]
[ "import java.util.Scanner;\n\nclass Main{\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int M = sc.nextInt();\n int[] A =new int[M];;\n int sum=0;\n \n for(int i=0;i<M;i++){\n A[i] = sc.nextInt();\n sum=sum+A[i];\n }\n\n if(sum<=N){\n System.out.println(N-sum);\n }\n else{\n System.out.println(-1);\n }\n \n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int M = sc.nextInt();\n int[] A =new int[M];;\n int sum=0;\n \n for(int i=0;i<M;i++){\n A[i] = sc.nextInt();\n sum=sum+A[i];\n }\n\n if(sum<=N){\n System.out.println(N-sum);\n }\n else{\n System.out.println(-1);\n }\n \n }\n}", "Main", "public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int M = sc.nextInt();\n int[] A =new int[M];;\n int sum=0;\n \n for(int i=0;i<M;i++){\n A[i] = sc.nextInt();\n sum=sum+A[i];\n }\n\n if(sum<=N){\n System.out.println(N-sum);\n }\n else{\n System.out.println(-1);\n }\n \n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int M = sc.nextInt();\n int[] A =new int[M];;\n int sum=0;\n \n for(int i=0;i<M;i++){\n A[i] = sc.nextInt();\n sum=sum+A[i];\n }\n\n if(sum<=N){\n System.out.println(N-sum);\n }\n else{\n System.out.println(-1);\n }\n \n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int M = sc.nextInt();", "M", "sc.nextInt()", "sc.nextInt", "sc", "int[] A =new int[M];", "A", "new int[M]", "M", "int sum=0;", "sum", "0", "for(int i=0;i<M;i++){\n A[i] = sc.nextInt();\n sum=sum+A[i];\n }", "int i=0;", "int i=0;", "i", "0", "i<M", "i", "M", "i++", "i++", "i", "{\n A[i] = sc.nextInt();\n sum=sum+A[i];\n }", "{\n A[i] = sc.nextInt();\n sum=sum+A[i];\n }", "A[i] = sc.nextInt()", "A[i]", "A", "i", "sc.nextInt()", "sc.nextInt", "sc", "sum=sum+A[i]", "sum", "sum+A[i]", "sum", "A[i]", "A", "i", "if(sum<=N){\n System.out.println(N-sum);\n }\n else{\n System.out.println(-1);\n }", "sum<=N", "sum", "N", "{\n System.out.println(N-sum);\n }", "System.out.println(N-sum)", "System.out.println", "System.out", "System", "System.out", "N-sum", "N", "sum", "{\n System.out.println(-1);\n }", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "String args[]", "args" ]
import java.util.Scanner; class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int M = sc.nextInt(); int[] A =new int[M];; int sum=0; for(int i=0;i<M;i++){ A[i] = sc.nextInt(); sum=sum+A[i]; } if(sum<=N){ System.out.println(N-sum); } else{ System.out.println(-1); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 30, 4, 18, 18, 13, 13, 40, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 65, 8 ], [ 65, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 11, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 11, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 11, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 48, 53 ], [ 43, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 55, 60 ], [ 60, 61 ], [ 9, 62 ], [ 62, 63 ], [ 0, 64 ], [ 64, 65 ], [ 64, 66 ] ]
[ "import java.io.*;\nimport java.util.*;\n\npublic class Main{\n public static void main(String[] args)throws Exception{\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n int m=sc.nextInt();\n for(int i=0;i<m;i++){\n n-=sc.nextInt();\n }\n if(n>=0){\n System.out.println(n);\n }else{\n System.out.println(-1);\n }\n }\n}", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "public class Main{\n public static void main(String[] args)throws Exception{\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n int m=sc.nextInt();\n for(int i=0;i<m;i++){\n n-=sc.nextInt();\n }\n if(n>=0){\n System.out.println(n);\n }else{\n System.out.println(-1);\n }\n }\n}", "Main", "public static void main(String[] args)throws Exception{\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n int m=sc.nextInt();\n for(int i=0;i<m;i++){\n n-=sc.nextInt();\n }\n if(n>=0){\n System.out.println(n);\n }else{\n System.out.println(-1);\n }\n }", "main", "{\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n int m=sc.nextInt();\n for(int i=0;i<m;i++){\n n-=sc.nextInt();\n }\n if(n>=0){\n System.out.println(n);\n }else{\n System.out.println(-1);\n }\n }", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n=sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int m=sc.nextInt();", "m", "sc.nextInt()", "sc.nextInt", "sc", "for(int i=0;i<m;i++){\n n-=sc.nextInt();\n }", "int i=0;", "int i=0;", "i", "0", "i<m", "i", "m", "i++", "i++", "i", "{\n n-=sc.nextInt();\n }", "{\n n-=sc.nextInt();\n }", "n-=sc.nextInt()", "n", "sc.nextInt()", "sc.nextInt", "sc", "if(n>=0){\n System.out.println(n);\n }else{\n System.out.println(-1);\n }", "n>=0", "n", "0", "{\n System.out.println(n);\n }", "System.out.println(n)", "System.out.println", "System.out", "System", "System.out", "n", "{\n System.out.println(-1);\n }", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "String[] args", "args", "public class Main{\n public static void main(String[] args)throws Exception{\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n int m=sc.nextInt();\n for(int i=0;i<m;i++){\n n-=sc.nextInt();\n }\n if(n>=0){\n System.out.println(n);\n }else{\n System.out.println(-1);\n }\n }\n}", "public class Main{\n public static void main(String[] args)throws Exception{\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n int m=sc.nextInt();\n for(int i=0;i<m;i++){\n n-=sc.nextInt();\n }\n if(n>=0){\n System.out.println(n);\n }else{\n System.out.println(-1);\n }\n }\n}", "Main" ]
import java.io.*; import java.util.*; public class Main{ public static void main(String[] args)throws Exception{ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int m=sc.nextInt(); for(int i=0;i<m;i++){ n-=sc.nextInt(); } if(n>=0){ System.out.println(n); }else{ System.out.println(-1); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 4, 18, 13, 4, 18, 18, 13, 13, 8, 2, 13, 13, 2, 13, 13, 40, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 63, 5 ], [ 63, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 8, 43 ], [ 43, 44 ], [ 44, 45 ], [ 8, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 51, 55 ], [ 55, 56 ], [ 55, 57 ], [ 51, 58 ], [ 58, 59 ], [ 6, 60 ], [ 60, 61 ], [ 0, 62 ], [ 62, 63 ], [ 62, 64 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int M = scanner.nextInt();\n\n int study = 0;\n\n for (int i = 0; i < M; i++) {\n study += scanner.nextInt();\n }\n scanner.close();\n\n System.out.println(N >= study ? N - study : -1);\n\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int M = scanner.nextInt();\n\n int study = 0;\n\n for (int i = 0; i < M; i++) {\n study += scanner.nextInt();\n }\n scanner.close();\n\n System.out.println(N >= study ? N - study : -1);\n\n }\n}", "Main", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int M = scanner.nextInt();\n\n int study = 0;\n\n for (int i = 0; i < M; i++) {\n study += scanner.nextInt();\n }\n scanner.close();\n\n System.out.println(N >= study ? N - study : -1);\n\n }", "main", "{\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int M = scanner.nextInt();\n\n int study = 0;\n\n for (int i = 0; i < M; i++) {\n study += scanner.nextInt();\n }\n scanner.close();\n\n System.out.println(N >= study ? N - study : -1);\n\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int N = scanner.nextInt();", "N", "scanner.nextInt()", "scanner.nextInt", "scanner", "int M = scanner.nextInt();", "M", "scanner.nextInt()", "scanner.nextInt", "scanner", "int study = 0;", "study", "0", "for (int i = 0; i < M; i++) {\n study += scanner.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < M", "i", "M", "i++", "i++", "i", "{\n study += scanner.nextInt();\n }", "{\n study += scanner.nextInt();\n }", "study += scanner.nextInt()", "study", "scanner.nextInt()", "scanner.nextInt", "scanner", "scanner.close()", "scanner.close", "scanner", "System.out.println(N >= study ? N - study : -1)", "System.out.println", "System.out", "System", "System.out", "N >= study ? N - study : -1", "N >= study", "N", "study", "N - study", "N", "study", "-1", "1", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int M = scanner.nextInt();\n\n int study = 0;\n\n for (int i = 0; i < M; i++) {\n study += scanner.nextInt();\n }\n scanner.close();\n\n System.out.println(N >= study ? N - study : -1);\n\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int M = scanner.nextInt();\n\n int study = 0;\n\n for (int i = 0; i < M; i++) {\n study += scanner.nextInt();\n }\n scanner.close();\n\n System.out.println(N >= study ? N - study : -1);\n\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int N = scanner.nextInt(); int M = scanner.nextInt(); int study = 0; for (int i = 0; i < M; i++) { study += scanner.nextInt(); } scanner.close(); System.out.println(N >= study ? N - study : -1); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 41, 13, 17, 41, 13, 17, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 0, 13, 13, 4, 18, 13, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 40, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 78, 8 ], [ 78, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 11, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 11, 25 ], [ 25, 26 ], [ 25, 27 ], [ 11, 28 ], [ 28, 29 ], [ 28, 30 ], [ 11, 31 ], [ 31, 32 ], [ 31, 33 ], [ 11, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 34, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 42, 43 ], [ 38, 44 ], [ 44, 45 ], [ 44, 46 ], [ 38, 47 ], [ 47, 48 ], [ 48, 49 ], [ 47, 50 ], [ 11, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 51, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 56, 61 ], [ 61, 62 ], [ 51, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 64, 69 ], [ 69, 70 ], [ 69, 71 ], [ 11, 72 ], [ 72, 73 ], [ 73, 74 ], [ 9, 75 ], [ 75, 76 ], [ 0, 77 ], [ 77, 78 ], [ 77, 79 ] ]
[ "import java.util.ArrayList;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint m = sc.nextInt();\n\n\t\tArrayList<Integer> array = new ArrayList<Integer>();\n\t\tInteger sum = 0;\n\t\tint x = 0;\n\t\t\n\t\twhile(sc.hasNext()) {\n\t\t\tInteger a = sc.nextInt();\n\t\t\tsum += a;\n\t\t\tarray.add(a);\n\t\t}\n\n\t\tif(sum > n) {\n\t\t\tSystem.out.println(-1);\n\t\t} else {\n\t\t\tSystem.out.println(n - sum);\n\t\t}\n\n\t\tsc.close();\n\n\t}\n\n}", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint m = sc.nextInt();\n\n\t\tArrayList<Integer> array = new ArrayList<Integer>();\n\t\tInteger sum = 0;\n\t\tint x = 0;\n\t\t\n\t\twhile(sc.hasNext()) {\n\t\t\tInteger a = sc.nextInt();\n\t\t\tsum += a;\n\t\t\tarray.add(a);\n\t\t}\n\n\t\tif(sum > n) {\n\t\t\tSystem.out.println(-1);\n\t\t} else {\n\t\t\tSystem.out.println(n - sum);\n\t\t}\n\n\t\tsc.close();\n\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint m = sc.nextInt();\n\n\t\tArrayList<Integer> array = new ArrayList<Integer>();\n\t\tInteger sum = 0;\n\t\tint x = 0;\n\t\t\n\t\twhile(sc.hasNext()) {\n\t\t\tInteger a = sc.nextInt();\n\t\t\tsum += a;\n\t\t\tarray.add(a);\n\t\t}\n\n\t\tif(sum > n) {\n\t\t\tSystem.out.println(-1);\n\t\t} else {\n\t\t\tSystem.out.println(n - sum);\n\t\t}\n\n\t\tsc.close();\n\n\t}", "main", "{\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint m = sc.nextInt();\n\n\t\tArrayList<Integer> array = new ArrayList<Integer>();\n\t\tInteger sum = 0;\n\t\tint x = 0;\n\t\t\n\t\twhile(sc.hasNext()) {\n\t\t\tInteger a = sc.nextInt();\n\t\t\tsum += a;\n\t\t\tarray.add(a);\n\t\t}\n\n\t\tif(sum > n) {\n\t\t\tSystem.out.println(-1);\n\t\t} else {\n\t\t\tSystem.out.println(n - sum);\n\t\t}\n\n\t\tsc.close();\n\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int m = sc.nextInt();", "m", "sc.nextInt()", "sc.nextInt", "sc", "ArrayList<Integer> array = new ArrayList<Integer>();", "array", "new ArrayList<Integer>()", "Integer sum = 0;", "sum", "0", "int x = 0;", "x", "0", "while(sc.hasNext()) {\n\t\t\tInteger a = sc.nextInt();\n\t\t\tsum += a;\n\t\t\tarray.add(a);\n\t\t}", "sc.hasNext()", "sc.hasNext", "sc", "{\n\t\t\tInteger a = sc.nextInt();\n\t\t\tsum += a;\n\t\t\tarray.add(a);\n\t\t}", "Integer a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "sum += a", "sum", "a", "array.add(a)", "array.add", "array", "a", "if(sum > n) {\n\t\t\tSystem.out.println(-1);\n\t\t} else {\n\t\t\tSystem.out.println(n - sum);\n\t\t}", "sum > n", "sum", "n", "{\n\t\t\tSystem.out.println(-1);\n\t\t}", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "{\n\t\t\tSystem.out.println(n - sum);\n\t\t}", "System.out.println(n - sum)", "System.out.println", "System.out", "System", "System.out", "n - sum", "n", "sum", "sc.close()", "sc.close", "sc", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint m = sc.nextInt();\n\n\t\tArrayList<Integer> array = new ArrayList<Integer>();\n\t\tInteger sum = 0;\n\t\tint x = 0;\n\t\t\n\t\twhile(sc.hasNext()) {\n\t\t\tInteger a = sc.nextInt();\n\t\t\tsum += a;\n\t\t\tarray.add(a);\n\t\t}\n\n\t\tif(sum > n) {\n\t\t\tSystem.out.println(-1);\n\t\t} else {\n\t\t\tSystem.out.println(n - sum);\n\t\t}\n\n\t\tsc.close();\n\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint m = sc.nextInt();\n\n\t\tArrayList<Integer> array = new ArrayList<Integer>();\n\t\tInteger sum = 0;\n\t\tint x = 0;\n\t\t\n\t\twhile(sc.hasNext()) {\n\t\t\tInteger a = sc.nextInt();\n\t\t\tsum += a;\n\t\t\tarray.add(a);\n\t\t}\n\n\t\tif(sum > n) {\n\t\t\tSystem.out.println(-1);\n\t\t} else {\n\t\t\tSystem.out.println(n - sum);\n\t\t}\n\n\t\tsc.close();\n\n\t}\n\n}", "Main" ]
import java.util.ArrayList; import java.util.Scanner; 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> array = new ArrayList<Integer>(); Integer sum = 0; int x = 0; while(sc.hasNext()) { Integer a = sc.nextInt(); sum += a; array.add(a); } if(sum > n) { System.out.println(-1); } else { System.out.println(n - sum); } sc.close(); } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 40, 17, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 14, 2, 13, 4, 18, 13, 17, 17, 30, 4, 18, 18, 13, 13, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 14, 2, 13, 4, 18, 13, 17, 17, 30, 4, 18, 18, 13, 13, 13, 4, 18, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 14, 2, 13, 4, 18, 13, 17, 17, 30, 4, 18, 18, 13, 13, 13, 4, 18, 13, 17, 14, 2, 13, 13, 30, 0, 13, 13, 3, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 135, 5 ], [ 135, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 135, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 13, 14 ], [ 13, 15 ], [ 12, 16 ], [ 16, 17 ], [ 16, 18 ], [ 18, 19 ], [ 19, 20 ], [ 12, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 24, 27 ], [ 24, 28 ], [ 21, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 32, 33 ], [ 32, 34 ], [ 30, 35 ], [ 29, 36 ], [ 36, 37 ], [ 37, 38 ], [ 36, 39 ], [ 12, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 12, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 49, 50 ], [ 48, 51 ], [ 48, 52 ], [ 45, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 54, 59 ], [ 53, 60 ], [ 60, 61 ], [ 61, 62 ], [ 60, 63 ], [ 12, 64 ], [ 64, 65 ], [ 64, 66 ], [ 12, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 67, 72 ], [ 72, 73 ], [ 72, 74 ], [ 67, 75 ], [ 75, 76 ], [ 76, 77 ], [ 67, 78 ], [ 79, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 83, 84 ], [ 79, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 89, 90 ], [ 88, 91 ], [ 88, 92 ], [ 85, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 94, 99 ], [ 93, 100 ], [ 100, 101 ], [ 101, 102 ], [ 100, 103 ], [ 79, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 104, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 104, 112 ], [ 12, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 113, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 120, 122 ], [ 118, 123 ], [ 113, 124 ], [ 124, 125 ], [ 125, 126 ], [ 126, 127 ], [ 126, 128 ], [ 124, 129 ], [ 129, 130 ], [ 129, 131 ], [ 10, 132 ], [ 132, 133 ], [ 0, 134 ], [ 134, 135 ], [ 134, 136 ] ]
[ "import java.util.Scanner;\n\n/**\n *\n * @author Masaya Misaizu\n */\npublic class Main {\n private static int error =-1;\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n if(a> Math.pow(10,6))\n {\n System.out.println(error);\n System.exit(0);\n }\n int b = sc.nextInt();\n if(b> Math.pow(10,4))\n {\n System.out.println(error);\n System.exit(0);\n }\n int sum = 0;\n for (int i = 0; i < b ; i++) {\n int c = sc.nextInt();\n if(c> Math.pow(10,4))\n {\n System.out.println(error);\n System.exit(0);\n }\n if(a>=sum)\n {\n sum+=c;\n }\n else\n break;\n }\n if(a < sum){\n System.out.println(error);\n }\n else\n System.out.println(a-sum);\n \n \n\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n private static int error =-1;\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n if(a> Math.pow(10,6))\n {\n System.out.println(error);\n System.exit(0);\n }\n int b = sc.nextInt();\n if(b> Math.pow(10,4))\n {\n System.out.println(error);\n System.exit(0);\n }\n int sum = 0;\n for (int i = 0; i < b ; i++) {\n int c = sc.nextInt();\n if(c> Math.pow(10,4))\n {\n System.out.println(error);\n System.exit(0);\n }\n if(a>=sum)\n {\n sum+=c;\n }\n else\n break;\n }\n if(a < sum){\n System.out.println(error);\n }\n else\n System.out.println(a-sum);\n \n \n\n }\n}", "Main", "private static int error =-1;", "error", "-1", "1", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n if(a> Math.pow(10,6))\n {\n System.out.println(error);\n System.exit(0);\n }\n int b = sc.nextInt();\n if(b> Math.pow(10,4))\n {\n System.out.println(error);\n System.exit(0);\n }\n int sum = 0;\n for (int i = 0; i < b ; i++) {\n int c = sc.nextInt();\n if(c> Math.pow(10,4))\n {\n System.out.println(error);\n System.exit(0);\n }\n if(a>=sum)\n {\n sum+=c;\n }\n else\n break;\n }\n if(a < sum){\n System.out.println(error);\n }\n else\n System.out.println(a-sum);\n \n \n\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n if(a> Math.pow(10,6))\n {\n System.out.println(error);\n System.exit(0);\n }\n int b = sc.nextInt();\n if(b> Math.pow(10,4))\n {\n System.out.println(error);\n System.exit(0);\n }\n int sum = 0;\n for (int i = 0; i < b ; i++) {\n int c = sc.nextInt();\n if(c> Math.pow(10,4))\n {\n System.out.println(error);\n System.exit(0);\n }\n if(a>=sum)\n {\n sum+=c;\n }\n else\n break;\n }\n if(a < sum){\n System.out.println(error);\n }\n else\n System.out.println(a-sum);\n \n \n\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "if(a> Math.pow(10,6))\n {\n System.out.println(error);\n System.exit(0);\n }", "a> Math.pow(10,6)", "a", "Math.pow(10,6)", "Math.pow", "Math", "10", "6", "{\n System.out.println(error);\n System.exit(0);\n }", "System.out.println(error)", "System.out.println", "System.out", "System", "System.out", "error", "System.exit(0)", "System.exit", "System", "0", "int b = sc.nextInt();", "b", "sc.nextInt()", "sc.nextInt", "sc", "if(b> Math.pow(10,4))\n {\n System.out.println(error);\n System.exit(0);\n }", "b> Math.pow(10,4)", "b", "Math.pow(10,4)", "Math.pow", "Math", "10", "4", "{\n System.out.println(error);\n System.exit(0);\n }", "System.out.println(error)", "System.out.println", "System.out", "System", "System.out", "error", "System.exit(0)", "System.exit", "System", "0", "int sum = 0;", "sum", "0", "for (int i = 0; i < b ; i++) {\n int c = sc.nextInt();\n if(c> Math.pow(10,4))\n {\n System.out.println(error);\n System.exit(0);\n }\n if(a>=sum)\n {\n sum+=c;\n }\n else\n break;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < b", "i", "b", "i++", "i++", "i", "{\n int c = sc.nextInt();\n if(c> Math.pow(10,4))\n {\n System.out.println(error);\n System.exit(0);\n }\n if(a>=sum)\n {\n sum+=c;\n }\n else\n break;\n }", "{\n int c = sc.nextInt();\n if(c> Math.pow(10,4))\n {\n System.out.println(error);\n System.exit(0);\n }\n if(a>=sum)\n {\n sum+=c;\n }\n else\n break;\n }", "int c = sc.nextInt();", "c", "sc.nextInt()", "sc.nextInt", "sc", "if(c> Math.pow(10,4))\n {\n System.out.println(error);\n System.exit(0);\n }", "c> Math.pow(10,4)", "c", "Math.pow(10,4)", "Math.pow", "Math", "10", "4", "{\n System.out.println(error);\n System.exit(0);\n }", "System.out.println(error)", "System.out.println", "System.out", "System", "System.out", "error", "System.exit(0)", "System.exit", "System", "0", "if(a>=sum)\n {\n sum+=c;\n }\n else\n break;", "a>=sum", "a", "sum", "{\n sum+=c;\n }", "sum+=c", "sum", "c", "break;", "if(a < sum){\n System.out.println(error);\n }\n else\n System.out.println(a-sum);", "a < sum", "a", "sum", "{\n System.out.println(error);\n }", "System.out.println(error)", "System.out.println", "System.out", "System", "System.out", "error", "System.out.println(a-sum)", "System.out.println", "System.out", "System", "System.out", "a-sum", "a", "sum", "String[] args", "args", "public class Main {\n private static int error =-1;\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n if(a> Math.pow(10,6))\n {\n System.out.println(error);\n System.exit(0);\n }\n int b = sc.nextInt();\n if(b> Math.pow(10,4))\n {\n System.out.println(error);\n System.exit(0);\n }\n int sum = 0;\n for (int i = 0; i < b ; i++) {\n int c = sc.nextInt();\n if(c> Math.pow(10,4))\n {\n System.out.println(error);\n System.exit(0);\n }\n if(a>=sum)\n {\n sum+=c;\n }\n else\n break;\n }\n if(a < sum){\n System.out.println(error);\n }\n else\n System.out.println(a-sum);\n \n \n\n }\n}", "public class Main {\n private static int error =-1;\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n if(a> Math.pow(10,6))\n {\n System.out.println(error);\n System.exit(0);\n }\n int b = sc.nextInt();\n if(b> Math.pow(10,4))\n {\n System.out.println(error);\n System.exit(0);\n }\n int sum = 0;\n for (int i = 0; i < b ; i++) {\n int c = sc.nextInt();\n if(c> Math.pow(10,4))\n {\n System.out.println(error);\n System.exit(0);\n }\n if(a>=sum)\n {\n sum+=c;\n }\n else\n break;\n }\n if(a < sum){\n System.out.println(error);\n }\n else\n System.out.println(a-sum);\n \n \n\n }\n}", "Main" ]
import java.util.Scanner; /** * * @author Masaya Misaizu */ public class Main { private static int error =-1; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); if(a> Math.pow(10,6)) { System.out.println(error); System.exit(0); } int b = sc.nextInt(); if(b> Math.pow(10,4)) { System.out.println(error); System.exit(0); } int sum = 0; for (int i = 0; i < b ; i++) { int c = sc.nextInt(); if(c> Math.pow(10,4)) { System.out.println(error); System.exit(0); } if(a>=sum) { sum+=c; } else break; } if(a < sum){ System.out.println(error); } else System.out.println(a-sum); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 66, 5 ], [ 66, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 8, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 48, 53 ], [ 43, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 55, 60 ], [ 60, 61 ], [ 60, 62 ], [ 6, 63 ], [ 63, 64 ], [ 0, 65 ], [ 65, 66 ], [ 65, 67 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int M = sc.nextInt();\n \n int all = 0;\n for(int i=0; i<M; i++){\n all += sc.nextInt();\n } \n if(all>N){\n System.out.println(\"-1\");\n }else{\n System.out.println(N-all);\n }\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int M = sc.nextInt();\n \n int all = 0;\n for(int i=0; i<M; i++){\n all += sc.nextInt();\n } \n if(all>N){\n System.out.println(\"-1\");\n }else{\n System.out.println(N-all);\n }\n }\n}", "Main", "public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int M = sc.nextInt();\n \n int all = 0;\n for(int i=0; i<M; i++){\n all += sc.nextInt();\n } \n if(all>N){\n System.out.println(\"-1\");\n }else{\n System.out.println(N-all);\n }\n }", "main", "{\n \n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int M = sc.nextInt();\n \n int all = 0;\n for(int i=0; i<M; i++){\n all += sc.nextInt();\n } \n if(all>N){\n System.out.println(\"-1\");\n }else{\n System.out.println(N-all);\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int M = sc.nextInt();", "M", "sc.nextInt()", "sc.nextInt", "sc", "int all = 0;", "all", "0", "for(int i=0; i<M; i++){\n all += sc.nextInt();\n }", "int i=0;", "int i=0;", "i", "0", "i<M", "i", "M", "i++", "i++", "i", "{\n all += sc.nextInt();\n }", "{\n all += sc.nextInt();\n }", "all += sc.nextInt()", "all", "sc.nextInt()", "sc.nextInt", "sc", "if(all>N){\n System.out.println(\"-1\");\n }else{\n System.out.println(N-all);\n }", "all>N", "all", "N", "{\n System.out.println(\"-1\");\n }", "System.out.println(\"-1\")", "System.out.println", "System.out", "System", "System.out", "\"-1\"", "{\n System.out.println(N-all);\n }", "System.out.println(N-all)", "System.out.println", "System.out", "System", "System.out", "N-all", "N", "all", "String[] args", "args", "public class Main {\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int M = sc.nextInt();\n \n int all = 0;\n for(int i=0; i<M; i++){\n all += sc.nextInt();\n } \n if(all>N){\n System.out.println(\"-1\");\n }else{\n System.out.println(N-all);\n }\n }\n}", "public class Main {\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int M = sc.nextInt();\n \n int all = 0;\n for(int i=0; i<M; i++){\n all += sc.nextInt();\n } \n if(all>N){\n System.out.println(\"-1\");\n }else{\n System.out.println(N-all);\n }\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int M = sc.nextInt(); int all = 0; for(int i=0; i<M; i++){ all += sc.nextInt(); } if(all>N){ System.out.println("-1"); }else{ System.out.println(N-all); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 0, 13, 18, 13, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 40, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 89, 5 ], [ 89, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 14, 17 ], [ 17, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 22, 25 ], [ 25, 26 ], [ 26, 27 ], [ 8, 28 ], [ 28, 29 ], [ 28, 30 ], [ 8, 31 ], [ 31, 32 ], [ 31, 33 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 35, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 42, 44 ], [ 35, 45 ], [ 45, 46 ], [ 46, 47 ], [ 35, 48 ], [ 49, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 50, 54 ], [ 54, 55 ], [ 55, 56 ], [ 54, 57 ], [ 57, 58 ], [ 58, 59 ], [ 49, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 62, 64 ], [ 8, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 65, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 70, 75 ], [ 75, 76 ], [ 65, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 78, 83 ], [ 83, 84 ], [ 83, 85 ], [ 6, 86 ], [ 86, 87 ], [ 0, 88 ], [ 88, 89 ], [ 88, 90 ] ]
[ "import java.util.*;\n\n\npublic class Main {\n public static void main(String[] args) {\n \n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int m = Integer.parseInt(sc.next());\n int sum = 0;\n int[] ary = new int[m];\n for (int i = 0; i < ary.length; i++) {\n ary[i] = Integer.parseInt(sc.next());\n sum += ary[i];\n }\n \n if (sum > n) {\n System.out.println(-1);\n } else {\n System.out.println(n - sum);\n }\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args) {\n \n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int m = Integer.parseInt(sc.next());\n int sum = 0;\n int[] ary = new int[m];\n for (int i = 0; i < ary.length; i++) {\n ary[i] = Integer.parseInt(sc.next());\n sum += ary[i];\n }\n \n if (sum > n) {\n System.out.println(-1);\n } else {\n System.out.println(n - sum);\n }\n }\n}", "Main", "public static void main(String[] args) {\n \n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int m = Integer.parseInt(sc.next());\n int sum = 0;\n int[] ary = new int[m];\n for (int i = 0; i < ary.length; i++) {\n ary[i] = Integer.parseInt(sc.next());\n sum += ary[i];\n }\n \n if (sum > n) {\n System.out.println(-1);\n } else {\n System.out.println(n - sum);\n }\n }", "main", "{\n \n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int m = Integer.parseInt(sc.next());\n int sum = 0;\n int[] ary = new int[m];\n for (int i = 0; i < ary.length; i++) {\n ary[i] = Integer.parseInt(sc.next());\n sum += ary[i];\n }\n \n if (sum > n) {\n System.out.println(-1);\n } else {\n System.out.println(n - sum);\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n = Integer.parseInt(sc.next());", "n", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "int m = Integer.parseInt(sc.next());", "m", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "int sum = 0;", "sum", "0", "int[] ary = new int[m];", "ary", "new int[m]", "m", "for (int i = 0; i < ary.length; i++) {\n ary[i] = Integer.parseInt(sc.next());\n sum += ary[i];\n }", "int i = 0;", "int i = 0;", "i", "0", "i < ary.length", "i", "ary.length", "ary", "ary.length", "i++", "i++", "i", "{\n ary[i] = Integer.parseInt(sc.next());\n sum += ary[i];\n }", "{\n ary[i] = Integer.parseInt(sc.next());\n sum += ary[i];\n }", "ary[i] = Integer.parseInt(sc.next())", "ary[i]", "ary", "i", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "sum += ary[i]", "sum", "ary[i]", "ary", "i", "if (sum > n) {\n System.out.println(-1);\n } else {\n System.out.println(n - sum);\n }", "sum > n", "sum", "n", "{\n System.out.println(-1);\n }", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "{\n System.out.println(n - sum);\n }", "System.out.println(n - sum)", "System.out.println", "System.out", "System", "System.out", "n - sum", "n", "sum", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n \n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int m = Integer.parseInt(sc.next());\n int sum = 0;\n int[] ary = new int[m];\n for (int i = 0; i < ary.length; i++) {\n ary[i] = Integer.parseInt(sc.next());\n sum += ary[i];\n }\n \n if (sum > n) {\n System.out.println(-1);\n } else {\n System.out.println(n - sum);\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n \n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int m = Integer.parseInt(sc.next());\n int sum = 0;\n int[] ary = new int[m];\n for (int i = 0; i < ary.length; i++) {\n ary[i] = Integer.parseInt(sc.next());\n sum += ary[i];\n }\n \n if (sum > n) {\n System.out.println(-1);\n } else {\n System.out.println(n - sum);\n }\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.next()); int m = Integer.parseInt(sc.next()); int sum = 0; int[] ary = new int[m]; for (int i = 0; i < ary.length; i++) { ary[i] = Integer.parseInt(sc.next()); sum += ary[i]; } if (sum > n) { System.out.println(-1); } else { System.out.println(n - sum); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 2, 13, 18, 13, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 40, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 93, 5 ], [ 93, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 26, 31 ], [ 31, 32 ], [ 31, 33 ], [ 26, 34 ], [ 34, 35 ], [ 35, 36 ], [ 26, 37 ], [ 38, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 39, 43 ], [ 43, 44 ], [ 44, 45 ], [ 8, 46 ], [ 46, 47 ], [ 46, 48 ], [ 8, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 49, 54 ], [ 54, 55 ], [ 54, 56 ], [ 49, 57 ], [ 57, 58 ], [ 58, 59 ], [ 49, 60 ], [ 61, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 66, 68 ], [ 8, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 69, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 74, 79 ], [ 79, 80 ], [ 69, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 82, 87 ], [ 87, 88 ], [ 87, 89 ], [ 6, 90 ], [ 90, 91 ], [ 0, 92 ], [ 92, 93 ], [ 92, 94 ] ]
[ "//package atcoder;\n \nimport java.util.*;\n \npublic class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tint A[] = new int [M];\n\t\tfor(int i=0;i<M;i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tint finish = 0;\n\t\tfor(int j=0;j<M;j++) {\n\t\t\tfinish = finish+A[j];\n\t\t}\n\t\tif(finish>N) {\n\t\t\tSystem.out.println(-1);\n\t\t}else {\n\t\t\tSystem.out.println(N-finish);\n\t\t}\n\t\t\n\t}\n}", "import java.util.*;", "util.*", "java", "public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tint A[] = new int [M];\n\t\tfor(int i=0;i<M;i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tint finish = 0;\n\t\tfor(int j=0;j<M;j++) {\n\t\t\tfinish = finish+A[j];\n\t\t}\n\t\tif(finish>N) {\n\t\t\tSystem.out.println(-1);\n\t\t}else {\n\t\t\tSystem.out.println(N-finish);\n\t\t}\n\t\t\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tint A[] = new int [M];\n\t\tfor(int i=0;i<M;i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tint finish = 0;\n\t\tfor(int j=0;j<M;j++) {\n\t\t\tfinish = finish+A[j];\n\t\t}\n\t\tif(finish>N) {\n\t\t\tSystem.out.println(-1);\n\t\t}else {\n\t\t\tSystem.out.println(N-finish);\n\t\t}\n\t\t\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tint A[] = new int [M];\n\t\tfor(int i=0;i<M;i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tint finish = 0;\n\t\tfor(int j=0;j<M;j++) {\n\t\t\tfinish = finish+A[j];\n\t\t}\n\t\tif(finish>N) {\n\t\t\tSystem.out.println(-1);\n\t\t}else {\n\t\t\tSystem.out.println(N-finish);\n\t\t}\n\t\t\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int M = sc.nextInt();", "M", "sc.nextInt()", "sc.nextInt", "sc", "int A[] = new int [M];", "A", "new int [M]", "M", "for(int i=0;i<M;i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<M", "i", "M", "i++", "i++", "i", "{\n\t\t\tA[i] = sc.nextInt();\n\t\t}", "{\n\t\t\tA[i] = sc.nextInt();\n\t\t}", "A[i] = sc.nextInt()", "A[i]", "A", "i", "sc.nextInt()", "sc.nextInt", "sc", "int finish = 0;", "finish", "0", "for(int j=0;j<M;j++) {\n\t\t\tfinish = finish+A[j];\n\t\t}", "int j=0;", "int j=0;", "j", "0", "j<M", "j", "M", "j++", "j++", "j", "{\n\t\t\tfinish = finish+A[j];\n\t\t}", "{\n\t\t\tfinish = finish+A[j];\n\t\t}", "finish = finish+A[j]", "finish", "finish+A[j]", "finish", "A[j]", "A", "j", "if(finish>N) {\n\t\t\tSystem.out.println(-1);\n\t\t}else {\n\t\t\tSystem.out.println(N-finish);\n\t\t}", "finish>N", "finish", "N", "{\n\t\t\tSystem.out.println(-1);\n\t\t}", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "{\n\t\t\tSystem.out.println(N-finish);\n\t\t}", "System.out.println(N-finish)", "System.out.println", "System.out", "System", "System.out", "N-finish", "N", "finish", "String[] args", "args", "public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tint A[] = new int [M];\n\t\tfor(int i=0;i<M;i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tint finish = 0;\n\t\tfor(int j=0;j<M;j++) {\n\t\t\tfinish = finish+A[j];\n\t\t}\n\t\tif(finish>N) {\n\t\t\tSystem.out.println(-1);\n\t\t}else {\n\t\t\tSystem.out.println(N-finish);\n\t\t}\n\t\t\n\t}\n}", "public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tint A[] = new int [M];\n\t\tfor(int i=0;i<M;i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tint finish = 0;\n\t\tfor(int j=0;j<M;j++) {\n\t\t\tfinish = finish+A[j];\n\t\t}\n\t\tif(finish>N) {\n\t\t\tSystem.out.println(-1);\n\t\t}else {\n\t\t\tSystem.out.println(N-finish);\n\t\t}\n\t\t\n\t}\n}", "Main" ]
//package atcoder; import java.util.*; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int M = sc.nextInt(); int A[] = new int [M]; for(int i=0;i<M;i++) { A[i] = sc.nextInt(); } int finish = 0; for(int j=0;j<M;j++) { finish = finish+A[j]; } if(finish>N) { System.out.println(-1); }else { System.out.println(N-finish); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 40, 17, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 78, 5 ], [ 78, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 8, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 48, 53 ], [ 53, 54 ], [ 43, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 55, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 60, 65 ], [ 65, 66 ], [ 65, 67 ], [ 55, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 69, 74 ], [ 6, 75 ], [ 75, 76 ], [ 0, 77 ], [ 77, 78 ], [ 77, 79 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int M = sc.nextInt();\n int sum = 0;\n\n for (int i = 0; i < M; i++) {\n sum += sc.nextInt();\n }\n\n if (N < sum) {\n System.out.println(-1);\n } else if (N > sum) {\n System.out.println(N - sum);\n } else {\n System.out.println(0);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int M = sc.nextInt();\n int sum = 0;\n\n for (int i = 0; i < M; i++) {\n sum += sc.nextInt();\n }\n\n if (N < sum) {\n System.out.println(-1);\n } else if (N > sum) {\n System.out.println(N - sum);\n } else {\n System.out.println(0);\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int M = sc.nextInt();\n int sum = 0;\n\n for (int i = 0; i < M; i++) {\n sum += sc.nextInt();\n }\n\n if (N < sum) {\n System.out.println(-1);\n } else if (N > sum) {\n System.out.println(N - sum);\n } else {\n System.out.println(0);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int M = sc.nextInt();\n int sum = 0;\n\n for (int i = 0; i < M; i++) {\n sum += sc.nextInt();\n }\n\n if (N < sum) {\n System.out.println(-1);\n } else if (N > sum) {\n System.out.println(N - sum);\n } else {\n System.out.println(0);\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int M = sc.nextInt();", "M", "sc.nextInt()", "sc.nextInt", "sc", "int sum = 0;", "sum", "0", "for (int i = 0; i < M; i++) {\n sum += sc.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < M", "i", "M", "i++", "i++", "i", "{\n sum += sc.nextInt();\n }", "{\n sum += sc.nextInt();\n }", "sum += sc.nextInt()", "sum", "sc.nextInt()", "sc.nextInt", "sc", "if (N < sum) {\n System.out.println(-1);\n } else if (N > sum) {\n System.out.println(N - sum);\n } else {\n System.out.println(0);\n }", "N < sum", "N", "sum", "{\n System.out.println(-1);\n }", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "if (N > sum) {\n System.out.println(N - sum);\n } else {\n System.out.println(0);\n }", "N > sum", "N", "sum", "{\n System.out.println(N - sum);\n }", "System.out.println(N - sum)", "System.out.println", "System.out", "System", "System.out", "N - sum", "N", "sum", "{\n System.out.println(0);\n }", "System.out.println(0)", "System.out.println", "System.out", "System", "System.out", "0", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int M = sc.nextInt();\n int sum = 0;\n\n for (int i = 0; i < M; i++) {\n sum += sc.nextInt();\n }\n\n if (N < sum) {\n System.out.println(-1);\n } else if (N > sum) {\n System.out.println(N - sum);\n } else {\n System.out.println(0);\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int M = sc.nextInt();\n int sum = 0;\n\n for (int i = 0; i < M; i++) {\n sum += sc.nextInt();\n }\n\n if (N < sum) {\n System.out.println(-1);\n } else if (N > sum) {\n System.out.println(N - sum);\n } else {\n System.out.println(0);\n }\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int M = sc.nextInt(); int sum = 0; for (int i = 0; i < M; i++) { sum += sc.nextInt(); } if (N < sum) { System.out.println(-1); } else if (N > sum) { System.out.println(N - sum); } else { System.out.println(0); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 40, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 67, 5 ], [ 67, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 8, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 48, 53 ], [ 53, 54 ], [ 43, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 56, 61 ], [ 61, 62 ], [ 61, 63 ], [ 6, 64 ], [ 64, 65 ], [ 0, 66 ], [ 66, 67 ], [ 66, 68 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n int N = scan.nextInt();\n int M = scan.nextInt();\n int day = 0;\n for (int i = 0; i < M; i++) {\n day += scan.nextInt();\n }\n if(day>N){\n System.out.println(-1);\n }\n else{\n System.out.println(N-day);\n }\n }\n}\n", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n int N = scan.nextInt();\n int M = scan.nextInt();\n int day = 0;\n for (int i = 0; i < M; i++) {\n day += scan.nextInt();\n }\n if(day>N){\n System.out.println(-1);\n }\n else{\n System.out.println(N-day);\n }\n }\n}", "Main", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n int N = scan.nextInt();\n int M = scan.nextInt();\n int day = 0;\n for (int i = 0; i < M; i++) {\n day += scan.nextInt();\n }\n if(day>N){\n System.out.println(-1);\n }\n else{\n System.out.println(N-day);\n }\n }", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\n int N = scan.nextInt();\n int M = scan.nextInt();\n int day = 0;\n for (int i = 0; i < M; i++) {\n day += scan.nextInt();\n }\n if(day>N){\n System.out.println(-1);\n }\n else{\n System.out.println(N-day);\n }\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int N = scan.nextInt();", "N", "scan.nextInt()", "scan.nextInt", "scan", "int M = scan.nextInt();", "M", "scan.nextInt()", "scan.nextInt", "scan", "int day = 0;", "day", "0", "for (int i = 0; i < M; i++) {\n day += scan.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < M", "i", "M", "i++", "i++", "i", "{\n day += scan.nextInt();\n }", "{\n day += scan.nextInt();\n }", "day += scan.nextInt()", "day", "scan.nextInt()", "scan.nextInt", "scan", "if(day>N){\n System.out.println(-1);\n }\n else{\n System.out.println(N-day);\n }", "day>N", "day", "N", "{\n System.out.println(-1);\n }", "System.out.println(-1)", "System.out.println", "System.out", "System", "System.out", "-1", "1", "{\n System.out.println(N-day);\n }", "System.out.println(N-day)", "System.out.println", "System.out", "System", "System.out", "N-day", "N", "day", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n int N = scan.nextInt();\n int M = scan.nextInt();\n int day = 0;\n for (int i = 0; i < M; i++) {\n day += scan.nextInt();\n }\n if(day>N){\n System.out.println(-1);\n }\n else{\n System.out.println(N-day);\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n int N = scan.nextInt();\n int M = scan.nextInt();\n int day = 0;\n for (int i = 0; i < M; i++) {\n day += scan.nextInt();\n }\n if(day>N){\n System.out.println(-1);\n }\n else{\n System.out.println(N-day);\n }\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int N = scan.nextInt(); int M = scan.nextInt(); int day = 0; for (int i = 0; i < M; i++) { day += scan.nextInt(); } if(day>N){ System.out.println(-1); } else{ System.out.println(N-day); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 18, 13, 13, 41, 13, 18, 13, 13, 41, 13, 20, 41, 13, 20, 41, 13, 20, 4, 18, 13, 17, 13, 13, 4, 18, 13, 23, 13, 6, 13, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 4, 18, 13, 8, 2, 17, 13, 13, 40, 17, 23, 13, 23, 13, 23, 13, 6, 13, 41, 13, 2, 17, 17, 41, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 20, 0, 18, 36, 13, 20, 13, 0, 18, 36, 13, 0, 13, 17, 12, 13, 30, 0, 18, 36, 13, 13, 0, 18, 36, 13, 20, 13, 0, 18, 36, 13, 0, 13, 17, 23, 13, 12, 13, 30, 38, 5, 13, 30, 37, 20, 30, 0, 18, 36, 13, 20, 0, 18, 36, 13, 20, 13, 0, 18, 36, 13, 0, 13, 17, 23, 13, 12, 13, 30, 41, 13, 17, 41, 13, 4, 13, 42, 2, 13, 17, 30, 0, 13, 4, 13, 41, 13, 2, 13, 17, 14, 13, 30, 0, 13, 4, 13, 42, 2, 2, 0, 13, 4, 13, 17, 2, 13, 17, 30, 0, 13, 2, 2, 2, 13, 17, 13, 17, 14, 13, 30, 29, 40, 13, 29, 13, 12, 13, 30, 38, 5, 13, 30, 37, 20, 30, 0, 13, 4, 18, 13, 13, 0, 13, 17, 13, 14, 2, 13, 40, 17, 30, 0, 18, 13, 17, 40, 17, 12, 13, 30, 14, 2, 13, 13, 30, 4, 13, 29, 18, 13, 40, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 19, 20 ], [ 19, 21 ], [ 0, 22 ], [ 303, 23 ], [ 303, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 29, 31 ], [ 26, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 34, 36 ], [ 26, 37 ], [ 37, 38 ], [ 37, 39 ], [ 26, 40 ], [ 40, 41 ], [ 40, 42 ], [ 26, 43 ], [ 43, 44 ], [ 43, 45 ], [ 26, 46 ], [ 46, 47 ], [ 47, 48 ], [ 46, 49 ], [ 46, 50 ], [ 46, 51 ], [ 26, 52 ], [ 52, 53 ], [ 53, 54 ], [ 24, 55 ], [ 55, 56 ], [ 303, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 65, 66 ], [ 61, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 70, 71 ], [ 61, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 72, 77 ], [ 77, 78 ], [ 77, 79 ], [ 72, 80 ], [ 80, 81 ], [ 81, 82 ], [ 72, 83 ], [ 84, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 88, 89 ], [ 61, 90 ], [ 90, 91 ], [ 91, 92 ], [ 90, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 93, 97 ], [ 93, 98 ], [ 98, 99 ], [ 59, 100 ], [ 100, 101 ], [ 59, 102 ], [ 102, 103 ], [ 59, 104 ], [ 104, 105 ], [ 303, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 108, 110 ], [ 110, 111 ], [ 110, 112 ], [ 106, 113 ], [ 113, 114 ], [ 106, 115 ], [ 115, 116 ], [ 106, 117 ], [ 117, 118 ], [ 106, 119 ], [ 119, 120 ], [ 106, 121 ], [ 121, 122 ], [ 121, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 124, 128 ], [ 123, 129 ], [ 129, 130 ], [ 130, 131 ], [ 130, 132 ], [ 129, 133 ], [ 123, 135 ], [ 135, 136 ], [ 136, 137 ], [ 136, 138 ], [ 135, 139 ], [ 139, 140 ], [ 139, 141 ], [ 106, 142 ], [ 142, 143 ], [ 142, 144 ], [ 144, 145 ], [ 145, 146 ], [ 146, 147 ], [ 146, 148 ], [ 145, 149 ], [ 144, 150 ], [ 150, 151 ], [ 151, 152 ], [ 151, 153 ], [ 150, 154 ], [ 144, 156 ], [ 156, 157 ], [ 157, 158 ], [ 157, 159 ], [ 156, 160 ], [ 160, 161 ], [ 160, 162 ], [ 142, 163 ], [ 163, 164 ], [ 106, 165 ], [ 165, 166 ], [ 165, 167 ], [ 167, 168 ], [ 168, 169 ], [ 169, 170 ], [ 169, 171 ], [ 171, 172 ], [ 172, 173 ], [ 168, 174 ], [ 174, 175 ], [ 175, 176 ], [ 176, 177 ], [ 176, 178 ], [ 175, 179 ], [ 174, 180 ], [ 180, 181 ], [ 181, 182 ], [ 181, 183 ], [ 180, 184 ], [ 174, 186 ], [ 186, 187 ], [ 187, 188 ], [ 187, 189 ], [ 186, 190 ], [ 190, 191 ], [ 190, 192 ], [ 165, 193 ], [ 193, 194 ], [ 106, 195 ], [ 195, 196 ], [ 195, 197 ], [ 197, 198 ], [ 198, 199 ], [ 198, 200 ], [ 197, 201 ], [ 201, 202 ], [ 201, 203 ], [ 203, 204 ], [ 197, 205 ], [ 205, 206 ], [ 206, 207 ], [ 206, 208 ], [ 205, 209 ], [ 209, 210 ], [ 210, 211 ], [ 210, 212 ], [ 212, 213 ], [ 197, 214 ], [ 214, 215 ], [ 214, 216 ], [ 216, 217 ], [ 216, 218 ], [ 197, 219 ], [ 219, 220 ], [ 219, 221 ], [ 221, 222 ], [ 222, 223 ], [ 222, 224 ], [ 224, 225 ], [ 197, 226 ], [ 226, 227 ], [ 227, 228 ], [ 228, 229 ], [ 229, 230 ], [ 229, 231 ], [ 231, 232 ], [ 228, 233 ], [ 227, 234 ], [ 234, 235 ], [ 234, 236 ], [ 226, 237 ], [ 237, 238 ], [ 238, 239 ], [ 238, 240 ], [ 240, 241 ], [ 241, 242 ], [ 242, 243 ], [ 242, 244 ], [ 241, 245 ], [ 240, 246 ], [ 197, 247 ], [ 247, 248 ], [ 247, 249 ], [ 249, 250 ], [ 250, 251 ], [ 251, 252 ], [ 197, 253 ], [ 253, 254 ], [ 106, 255 ], [ 255, 256 ], [ 255, 257 ], [ 257, 258 ], [ 258, 259 ], [ 259, 260 ], [ 259, 261 ], [ 261, 262 ], [ 262, 263 ], [ 258, 264 ], [ 264, 265 ], [ 265, 266 ], [ 265, 267 ], [ 267, 268 ], [ 268, 269 ], [ 267, 270 ], [ 267, 271 ], [ 271, 272 ], [ 271, 273 ], [ 267, 274 ], [ 264, 275 ], [ 275, 276 ], [ 276, 277 ], [ 276, 278 ], [ 278, 279 ], [ 275, 280 ], [ 280, 281 ], [ 281, 282 ], [ 282, 283 ], [ 282, 284 ], [ 281, 285 ], [ 285, 286 ], [ 106, 287 ], [ 287, 288 ], [ 287, 289 ], [ 289, 290 ], [ 290, 291 ], [ 291, 292 ], [ 291, 293 ], [ 290, 294 ], [ 294, 295 ], [ 295, 296 ], [ 289, 297 ], [ 297, 298 ], [ 298, 299 ], [ 298, 300 ], [ 300, 301 ], [ 0, 302 ], [ 302, 303 ], [ 302, 304 ] ]
[ "import java.io.DataInputStream;\nimport java.io.FileInputStream;\nimport java.io.FileNotFoundException;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputStream;\nimport java.io.PrintWriter;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n *\n * @author iavanish\n */\npublic class Main {\n\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BHomework solver = new BHomework();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BHomework {\n\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n = in.nextInt();\n int m = in.nextInt();\n\n for (int i = 0; i < m; i++) {\n n -= in.nextInt();\n }\n\n out.println(0 <= n ? n : -1);\n }\n\n }\n\n static class FastReader {\n\n private final int BUFFER_SIZE = 1 << 16;\n private final InputStream inputStream;\n private final byte[] buffer;\n private int bufferPointer;\n private int bytesRead;\n\n public FastReader() {\n this.inputStream = new DataInputStream(System.in);\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(InputStream inputStream) {\n this.inputStream = inputStream;\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(String fileName) {\n try {\n this.inputStream = new DataInputStream(new FileInputStream(fileName));\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n }\n\n public int nextInt() {\n int nextInt = 0;\n byte c = read();\n while (c <= ' ') {\n c = read();\n }\n boolean negative = (c == '-');\n if (negative) {\n c = read();\n }\n do {\n nextInt = nextInt * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (negative) {\n return -nextInt;\n }\n return nextInt;\n }\n\n private void fillBuffer() {\n try {\n bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1) {\n buffer[0] = -1;\n }\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n private byte read() {\n if (bufferPointer == bytesRead) {\n fillBuffer();\n }\n return buffer[bufferPointer++];\n }\n\n }\n\n}\n", "import java.io.DataInputStream;", "DataInputStream", "java.io", "import java.io.FileInputStream;", "FileInputStream", "java.io", "import java.io.FileNotFoundException;", "FileNotFoundException", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "import java.io.OutputStream;", "OutputStream", "java.io", "import java.io.PrintWriter;", "PrintWriter", "java.io", "public class Main {\n\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BHomework solver = new BHomework();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BHomework {\n\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n = in.nextInt();\n int m = in.nextInt();\n\n for (int i = 0; i < m; i++) {\n n -= in.nextInt();\n }\n\n out.println(0 <= n ? n : -1);\n }\n\n }\n\n static class FastReader {\n\n private final int BUFFER_SIZE = 1 << 16;\n private final InputStream inputStream;\n private final byte[] buffer;\n private int bufferPointer;\n private int bytesRead;\n\n public FastReader() {\n this.inputStream = new DataInputStream(System.in);\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(InputStream inputStream) {\n this.inputStream = inputStream;\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(String fileName) {\n try {\n this.inputStream = new DataInputStream(new FileInputStream(fileName));\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n }\n\n public int nextInt() {\n int nextInt = 0;\n byte c = read();\n while (c <= ' ') {\n c = read();\n }\n boolean negative = (c == '-');\n if (negative) {\n c = read();\n }\n do {\n nextInt = nextInt * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (negative) {\n return -nextInt;\n }\n return nextInt;\n }\n\n private void fillBuffer() {\n try {\n bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1) {\n buffer[0] = -1;\n }\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n private byte read() {\n if (bufferPointer == bytesRead) {\n fillBuffer();\n }\n return buffer[bufferPointer++];\n }\n\n }\n\n}", "Main", "public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BHomework solver = new BHomework();\n solver.solve(1, in, out);\n out.close();\n }", "main", "{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BHomework solver = new BHomework();\n solver.solve(1, in, out);\n out.close();\n }", "InputStream inputStream = System.in;", "inputStream", "System.in", "System", "System.in", "OutputStream outputStream = System.out;", "outputStream", "System.out", "System", "System.out", "FastReader in = new FastReader(inputStream);", "in", "new FastReader(inputStream)", "PrintWriter out = new PrintWriter(outputStream);", "out", "new PrintWriter(outputStream)", "BHomework solver = new BHomework();", "solver", "new BHomework()", "solver.solve(1, in, out)", "solver.solve", "solver", "1", "in", "out", "out.close()", "out.close", "out", "String[] args", "args", "static class BHomework {\n\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n = in.nextInt();\n int m = in.nextInt();\n\n for (int i = 0; i < m; i++) {\n n -= in.nextInt();\n }\n\n out.println(0 <= n ? n : -1);\n }\n\n }", "BHomework", "public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n = in.nextInt();\n int m = in.nextInt();\n\n for (int i = 0; i < m; i++) {\n n -= in.nextInt();\n }\n\n out.println(0 <= n ? n : -1);\n }", "solve", "{\n int n = in.nextInt();\n int m = in.nextInt();\n\n for (int i = 0; i < m; i++) {\n n -= in.nextInt();\n }\n\n out.println(0 <= n ? n : -1);\n }", "int n = in.nextInt();", "n", "in.nextInt()", "in.nextInt", "in", "int m = in.nextInt();", "m", "in.nextInt()", "in.nextInt", "in", "for (int i = 0; i < m; i++) {\n n -= in.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < m", "i", "m", "i++", "i++", "i", "{\n n -= in.nextInt();\n }", "{\n n -= in.nextInt();\n }", "n -= in.nextInt()", "n", "in.nextInt()", "in.nextInt", "in", "out.println(0 <= n ? n : -1)", "out.println", "out", "0 <= n ? n : -1", "0 <= n", "0", "n", "n", "-1", "1", "int testNumber", "testNumber", "FastReader in", "in", "PrintWriter out", "out", "static class FastReader {\n\n private final int BUFFER_SIZE = 1 << 16;\n private final InputStream inputStream;\n private final byte[] buffer;\n private int bufferPointer;\n private int bytesRead;\n\n public FastReader() {\n this.inputStream = new DataInputStream(System.in);\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(InputStream inputStream) {\n this.inputStream = inputStream;\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(String fileName) {\n try {\n this.inputStream = new DataInputStream(new FileInputStream(fileName));\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n }\n\n public int nextInt() {\n int nextInt = 0;\n byte c = read();\n while (c <= ' ') {\n c = read();\n }\n boolean negative = (c == '-');\n if (negative) {\n c = read();\n }\n do {\n nextInt = nextInt * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (negative) {\n return -nextInt;\n }\n return nextInt;\n }\n\n private void fillBuffer() {\n try {\n bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1) {\n buffer[0] = -1;\n }\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n private byte read() {\n if (bufferPointer == bytesRead) {\n fillBuffer();\n }\n return buffer[bufferPointer++];\n }\n\n }", "FastReader", "private final int BUFFER_SIZE = 1 << 16;", "BUFFER_SIZE", "1 << 16", "1", "16", "private final InputStream inputStream;", "inputStream", "private final byte[] buffer;", "buffer", "private int bufferPointer;", "bufferPointer", "private int bytesRead;", "bytesRead", "public FastReader() {\n this.inputStream = new DataInputStream(System.in);\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }", "FastReader", "{\n this.inputStream = new DataInputStream(System.in);\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }", "this.inputStream = new DataInputStream(System.in)", "this.inputStream", "this", "this.inputStream", "new DataInputStream(System.in)", "this.buffer = new byte[BUFFER_SIZE]", "this.buffer", "this", "this.buffer", "new byte[BUFFER_SIZE]", "BUFFER_SIZE", "this.bufferPointer = bytesRead = 0", "this.bufferPointer", "this", "this.bufferPointer", "bytesRead = 0", "bytesRead", "0", "public FastReader(InputStream inputStream) {\n this.inputStream = inputStream;\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }", "FastReader", "{\n this.inputStream = inputStream;\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }", "this.inputStream = inputStream", "this.inputStream", "this", "this.inputStream", "inputStream", "this.buffer = new byte[BUFFER_SIZE]", "this.buffer", "this", "this.buffer", "new byte[BUFFER_SIZE]", "BUFFER_SIZE", "this.bufferPointer = bytesRead = 0", "this.bufferPointer", "this", "this.bufferPointer", "bytesRead = 0", "bytesRead", "0", "InputStream inputStream", "inputStream", "public FastReader(String fileName) {\n try {\n this.inputStream = new DataInputStream(new FileInputStream(fileName));\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n }", "FastReader", "{\n try {\n this.inputStream = new DataInputStream(new FileInputStream(fileName));\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n }", "try {\n this.inputStream = new DataInputStream(new FileInputStream(fileName));\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }", "catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }", "FileNotFoundException e", "{\n throw new RuntimeException(e);\n }", "throw new RuntimeException(e);", "new RuntimeException(e)", "{\n this.inputStream = new DataInputStream(new FileInputStream(fileName));\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }", "this.inputStream = new DataInputStream(new FileInputStream(fileName))", "this.inputStream", "this", "this.inputStream", "new DataInputStream(new FileInputStream(fileName))", "this.buffer = new byte[BUFFER_SIZE]", "this.buffer", "this", "this.buffer", "new byte[BUFFER_SIZE]", "BUFFER_SIZE", "this.bufferPointer = bytesRead = 0", "this.bufferPointer", "this", "this.bufferPointer", "bytesRead = 0", "bytesRead", "0", "String fileName", "fileName", "public int nextInt() {\n int nextInt = 0;\n byte c = read();\n while (c <= ' ') {\n c = read();\n }\n boolean negative = (c == '-');\n if (negative) {\n c = read();\n }\n do {\n nextInt = nextInt * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (negative) {\n return -nextInt;\n }\n return nextInt;\n }", "nextInt", "{\n int nextInt = 0;\n byte c = read();\n while (c <= ' ') {\n c = read();\n }\n boolean negative = (c == '-');\n if (negative) {\n c = read();\n }\n do {\n nextInt = nextInt * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (negative) {\n return -nextInt;\n }\n return nextInt;\n }", "int nextInt = 0;", "nextInt", "0", "byte c = read();", "c", "read()", "read", "while (c <= ' ') {\n c = read();\n }", "c <= ' '", "c", "' '", "{\n c = read();\n }", "c = read()", "c", "read()", "read", "boolean negative = (c == '-');", "negative", "(c == '-')", "c", "'-'", "if (negative) {\n c = read();\n }", "negative", "{\n c = read();\n }", "c = read()", "c", "read()", "read", "do {\n nextInt = nextInt * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');", "(c = read()) >= '0' && c <= '9'", "(c = read()) >= '0'", "(c = read())", "c", "read()", "read", "'0'", "c <= '9'", "c", "'9'", "{\n nextInt = nextInt * 10 + c - '0';\n }", "nextInt = nextInt * 10 + c - '0'", "nextInt", "nextInt * 10 + c - '0'", "nextInt * 10 + c", "nextInt * 10", "nextInt", "10", "c", "'0'", "if (negative) {\n return -nextInt;\n }", "negative", "{\n return -nextInt;\n }", "return -nextInt;", "-nextInt", "nextInt", "return nextInt;", "nextInt", "private void fillBuffer() {\n try {\n bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1) {\n buffer[0] = -1;\n }\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "fillBuffer", "{\n try {\n bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1) {\n buffer[0] = -1;\n }\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "try {\n bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1) {\n buffer[0] = -1;\n }\n } catch (IOException e) {\n throw new RuntimeException(e);\n }", "catch (IOException e) {\n throw new RuntimeException(e);\n }", "IOException e", "{\n throw new RuntimeException(e);\n }", "throw new RuntimeException(e);", "new RuntimeException(e)", "{\n bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1) {\n buffer[0] = -1;\n }\n }", "bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE)", "bytesRead", "inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE)", "inputStream.read", "inputStream", "buffer", "bufferPointer = 0", "bufferPointer", "0", "BUFFER_SIZE", "if (bytesRead == -1) {\n buffer[0] = -1;\n }", "bytesRead == -1", "bytesRead", "-1", "1", "{\n buffer[0] = -1;\n }", "buffer[0] = -1", "buffer[0]", "buffer", "0", "-1", "1", "private byte read() {\n if (bufferPointer == bytesRead) {\n fillBuffer();\n }\n return buffer[bufferPointer++];\n }", "read", "{\n if (bufferPointer == bytesRead) {\n fillBuffer();\n }\n return buffer[bufferPointer++];\n }", "if (bufferPointer == bytesRead) {\n fillBuffer();\n }", "bufferPointer == bytesRead", "bufferPointer", "bytesRead", "{\n fillBuffer();\n }", "fillBuffer()", "fillBuffer", "return buffer[bufferPointer++];", "buffer[bufferPointer++]", "buffer", "bufferPointer++", "bufferPointer", "public class Main {\n\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BHomework solver = new BHomework();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BHomework {\n\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n = in.nextInt();\n int m = in.nextInt();\n\n for (int i = 0; i < m; i++) {\n n -= in.nextInt();\n }\n\n out.println(0 <= n ? n : -1);\n }\n\n }\n\n static class FastReader {\n\n private final int BUFFER_SIZE = 1 << 16;\n private final InputStream inputStream;\n private final byte[] buffer;\n private int bufferPointer;\n private int bytesRead;\n\n public FastReader() {\n this.inputStream = new DataInputStream(System.in);\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(InputStream inputStream) {\n this.inputStream = inputStream;\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(String fileName) {\n try {\n this.inputStream = new DataInputStream(new FileInputStream(fileName));\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n }\n\n public int nextInt() {\n int nextInt = 0;\n byte c = read();\n while (c <= ' ') {\n c = read();\n }\n boolean negative = (c == '-');\n if (negative) {\n c = read();\n }\n do {\n nextInt = nextInt * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (negative) {\n return -nextInt;\n }\n return nextInt;\n }\n\n private void fillBuffer() {\n try {\n bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1) {\n buffer[0] = -1;\n }\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n private byte read() {\n if (bufferPointer == bytesRead) {\n fillBuffer();\n }\n return buffer[bufferPointer++];\n }\n\n }\n\n}", "public class Main {\n\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BHomework solver = new BHomework();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BHomework {\n\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n = in.nextInt();\n int m = in.nextInt();\n\n for (int i = 0; i < m; i++) {\n n -= in.nextInt();\n }\n\n out.println(0 <= n ? n : -1);\n }\n\n }\n\n static class FastReader {\n\n private final int BUFFER_SIZE = 1 << 16;\n private final InputStream inputStream;\n private final byte[] buffer;\n private int bufferPointer;\n private int bytesRead;\n\n public FastReader() {\n this.inputStream = new DataInputStream(System.in);\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(InputStream inputStream) {\n this.inputStream = inputStream;\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(String fileName) {\n try {\n this.inputStream = new DataInputStream(new FileInputStream(fileName));\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n }\n\n public int nextInt() {\n int nextInt = 0;\n byte c = read();\n while (c <= ' ') {\n c = read();\n }\n boolean negative = (c == '-');\n if (negative) {\n c = read();\n }\n do {\n nextInt = nextInt * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (negative) {\n return -nextInt;\n }\n return nextInt;\n }\n\n private void fillBuffer() {\n try {\n bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1) {\n buffer[0] = -1;\n }\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n private byte read() {\n if (bufferPointer == bytesRead) {\n fillBuffer();\n }\n return buffer[bufferPointer++];\n }\n\n }\n\n}", "Main" ]
import java.io.DataInputStream; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.PrintWriter; /** * Built using CHelper plug-in * Actual solution is at the top * * @author iavanish */ public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; FastReader in = new FastReader(inputStream); PrintWriter out = new PrintWriter(outputStream); BHomework solver = new BHomework(); solver.solve(1, in, out); out.close(); } static class BHomework { public void solve(int testNumber, FastReader in, PrintWriter out) { int n = in.nextInt(); int m = in.nextInt(); for (int i = 0; i < m; i++) { n -= in.nextInt(); } out.println(0 <= n ? n : -1); } } static class FastReader { private final int BUFFER_SIZE = 1 << 16; private final InputStream inputStream; private final byte[] buffer; private int bufferPointer; private int bytesRead; public FastReader() { this.inputStream = new DataInputStream(System.in); this.buffer = new byte[BUFFER_SIZE]; this.bufferPointer = bytesRead = 0; } public FastReader(InputStream inputStream) { this.inputStream = inputStream; this.buffer = new byte[BUFFER_SIZE]; this.bufferPointer = bytesRead = 0; } public FastReader(String fileName) { try { this.inputStream = new DataInputStream(new FileInputStream(fileName)); this.buffer = new byte[BUFFER_SIZE]; this.bufferPointer = bytesRead = 0; } catch (FileNotFoundException e) { throw new RuntimeException(e); } } public int nextInt() { int nextInt = 0; byte c = read(); while (c <= ' ') { c = read(); } boolean negative = (c == '-'); if (negative) { c = read(); } do { nextInt = nextInt * 10 + c - '0'; } while ((c = read()) >= '0' && c <= '9'); if (negative) { return -nextInt; } return nextInt; } private void fillBuffer() { try { bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE); if (bytesRead == -1) { buffer[0] = -1; } } catch (IOException e) { throw new RuntimeException(e); } } private byte read() { if (bufferPointer == bytesRead) { fillBuffer(); } return buffer[bufferPointer++]; } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 17, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 0, 13, 2, 13, 18, 13, 13, 0, 13, 2, 13, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 30, 4, 18, 18, 13, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 88, 5 ], [ 88, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], [ 14, 15 ], [ 8, 16 ], [ 16, 17 ], [ 8, 18 ], [ 18, 19 ], [ 18, 20 ], [ 8, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 8, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 8, 31 ], [ 31, 32 ], [ 31, 33 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 35, 40 ], [ 40, 41 ], [ 40, 42 ], [ 35, 43 ], [ 43, 44 ], [ 44, 45 ], [ 35, 46 ], [ 47, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 48, 52 ], [ 52, 53 ], [ 53, 54 ], [ 47, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 59, 61 ], [ 8, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 64, 66 ], [ 8, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 67, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 72, 77 ], [ 67, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 79, 84 ], [ 6, 85 ], [ 85, 86 ], [ 0, 87 ], [ 87, 88 ], [ 87, 89 ] ]
[ "\nimport java.util.Scanner;\npublic class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t int n,m,hangout;\n\t int assignment = 0; // n days , m assingment\n\t \n\t n = sc.nextInt();\n\t m = sc.nextInt();\n\t \n\t int[] arr = new int[m];\n\t \n\t for(int i = 0; i<m; i++) {\n\t \tarr[i] = sc.nextInt();\n\t \tassignment = assignment+arr[i];\n\t }\n\t hangout = n-assignment;\n\t \n\t \n\t if(hangout>=0) {\n\t \tSystem.out.println(hangout);\n\t }\n\t else {\n\t \tSystem.out.println(\"-1\");\n\t }\n\t \n\t \n\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t int n,m,hangout;\n\t int assignment = 0; // n days , m assingment\n\t \n\t n = sc.nextInt();\n\t m = sc.nextInt();\n\t \n\t int[] arr = new int[m];\n\t \n\t for(int i = 0; i<m; i++) {\n\t \tarr[i] = sc.nextInt();\n\t \tassignment = assignment+arr[i];\n\t }\n\t hangout = n-assignment;\n\t \n\t \n\t if(hangout>=0) {\n\t \tSystem.out.println(hangout);\n\t }\n\t else {\n\t \tSystem.out.println(\"-1\");\n\t }\n\t \n\t \n\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t int n,m,hangout;\n\t int assignment = 0; // n days , m assingment\n\t \n\t n = sc.nextInt();\n\t m = sc.nextInt();\n\t \n\t int[] arr = new int[m];\n\t \n\t for(int i = 0; i<m; i++) {\n\t \tarr[i] = sc.nextInt();\n\t \tassignment = assignment+arr[i];\n\t }\n\t hangout = n-assignment;\n\t \n\t \n\t if(hangout>=0) {\n\t \tSystem.out.println(hangout);\n\t }\n\t else {\n\t \tSystem.out.println(\"-1\");\n\t }\n\t \n\t \n\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t int n,m,hangout;\n\t int assignment = 0; // n days , m assingment\n\t \n\t n = sc.nextInt();\n\t m = sc.nextInt();\n\t \n\t int[] arr = new int[m];\n\t \n\t for(int i = 0; i<m; i++) {\n\t \tarr[i] = sc.nextInt();\n\t \tassignment = assignment+arr[i];\n\t }\n\t hangout = n-assignment;\n\t \n\t \n\t if(hangout>=0) {\n\t \tSystem.out.println(hangout);\n\t }\n\t else {\n\t \tSystem.out.println(\"-1\");\n\t }\n\t \n\t \n\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n", "n", "m", "m", "hangout;", "hangout", "int assignment = 0;", "assignment", "0", "n = sc.nextInt()", "n", "sc.nextInt()", "sc.nextInt", "sc", "m = sc.nextInt()", "m", "sc.nextInt()", "sc.nextInt", "sc", "int[] arr = new int[m];", "arr", "new int[m]", "m", "for(int i = 0; i<m; i++) {\n\t \tarr[i] = sc.nextInt();\n\t \tassignment = assignment+arr[i];\n\t }", "int i = 0;", "int i = 0;", "i", "0", "i<m", "i", "m", "i++", "i++", "i", "{\n\t \tarr[i] = sc.nextInt();\n\t \tassignment = assignment+arr[i];\n\t }", "{\n\t \tarr[i] = sc.nextInt();\n\t \tassignment = assignment+arr[i];\n\t }", "arr[i] = sc.nextInt()", "arr[i]", "arr", "i", "sc.nextInt()", "sc.nextInt", "sc", "assignment = assignment+arr[i]", "assignment", "assignment+arr[i]", "assignment", "arr[i]", "arr", "i", "hangout = n-assignment", "hangout", "n-assignment", "n", "assignment", "if(hangout>=0) {\n\t \tSystem.out.println(hangout);\n\t }\n\t else {\n\t \tSystem.out.println(\"-1\");\n\t }", "hangout>=0", "hangout", "0", "{\n\t \tSystem.out.println(hangout);\n\t }", "System.out.println(hangout)", "System.out.println", "System.out", "System", "System.out", "hangout", "{\n\t \tSystem.out.println(\"-1\");\n\t }", "System.out.println(\"-1\")", "System.out.println", "System.out", "System", "System.out", "\"-1\"", "String[] args", "args", "public class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t int n,m,hangout;\n\t int assignment = 0; // n days , m assingment\n\t \n\t n = sc.nextInt();\n\t m = sc.nextInt();\n\t \n\t int[] arr = new int[m];\n\t \n\t for(int i = 0; i<m; i++) {\n\t \tarr[i] = sc.nextInt();\n\t \tassignment = assignment+arr[i];\n\t }\n\t hangout = n-assignment;\n\t \n\t \n\t if(hangout>=0) {\n\t \tSystem.out.println(hangout);\n\t }\n\t else {\n\t \tSystem.out.println(\"-1\");\n\t }\n\t \n\t \n\n\t}\n\n}", "public class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t int n,m,hangout;\n\t int assignment = 0; // n days , m assingment\n\t \n\t n = sc.nextInt();\n\t m = sc.nextInt();\n\t \n\t int[] arr = new int[m];\n\t \n\t for(int i = 0; i<m; i++) {\n\t \tarr[i] = sc.nextInt();\n\t \tassignment = assignment+arr[i];\n\t }\n\t hangout = n-assignment;\n\t \n\t \n\t if(hangout>=0) {\n\t \tSystem.out.println(hangout);\n\t }\n\t else {\n\t \tSystem.out.println(\"-1\");\n\t }\n\t \n\t \n\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n,m,hangout; int assignment = 0; // n days , m assingment n = sc.nextInt(); m = sc.nextInt(); int[] arr = new int[m]; for(int i = 0; i<m; i++) { arr[i] = sc.nextInt(); assignment = assignment+arr[i]; } hangout = n-assignment; if(hangout>=0) { System.out.println(hangout); } else { System.out.println("-1"); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 0, 13, 18, 13, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 17, 30, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 72, 5 ], [ 72, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 26, 31 ], [ 31, 32 ], [ 31, 33 ], [ 26, 34 ], [ 34, 35 ], [ 35, 36 ], [ 26, 37 ], [ 38, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 39, 43 ], [ 43, 44 ], [ 44, 45 ], [ 38, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 48, 50 ], [ 8, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 51, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 56, 61 ], [ 51, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 6, 69 ], [ 69, 70 ], [ 0, 71 ], [ 71, 72 ], [ 71, 73 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner a = new Scanner(System.in);\t\t\n\t\tint N = a.nextInt();\n\t\tint M = a.nextInt();\n\t\tInteger[] MArray = new Integer[M];\n\t\tfor(int i = 0; i < M ; i++) {\n\t\t\tMArray[i] = a.nextInt();\n\t\t\tN -= MArray[i];\n\t\t}\n\t\tif(N < 0) {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}else {\n\t\t\tSystem.out.println(N);\n\t\t}\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner a = new Scanner(System.in);\t\t\n\t\tint N = a.nextInt();\n\t\tint M = a.nextInt();\n\t\tInteger[] MArray = new Integer[M];\n\t\tfor(int i = 0; i < M ; i++) {\n\t\t\tMArray[i] = a.nextInt();\n\t\t\tN -= MArray[i];\n\t\t}\n\t\tif(N < 0) {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}else {\n\t\t\tSystem.out.println(N);\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner a = new Scanner(System.in);\t\t\n\t\tint N = a.nextInt();\n\t\tint M = a.nextInt();\n\t\tInteger[] MArray = new Integer[M];\n\t\tfor(int i = 0; i < M ; i++) {\n\t\t\tMArray[i] = a.nextInt();\n\t\t\tN -= MArray[i];\n\t\t}\n\t\tif(N < 0) {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}else {\n\t\t\tSystem.out.println(N);\n\t\t}\n\t}", "main", "{\n\t\tScanner a = new Scanner(System.in);\t\t\n\t\tint N = a.nextInt();\n\t\tint M = a.nextInt();\n\t\tInteger[] MArray = new Integer[M];\n\t\tfor(int i = 0; i < M ; i++) {\n\t\t\tMArray[i] = a.nextInt();\n\t\t\tN -= MArray[i];\n\t\t}\n\t\tif(N < 0) {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}else {\n\t\t\tSystem.out.println(N);\n\t\t}\n\t}", "Scanner a = new Scanner(System.in);", "a", "new Scanner(System.in)", "int N = a.nextInt();", "N", "a.nextInt()", "a.nextInt", "a", "int M = a.nextInt();", "M", "a.nextInt()", "a.nextInt", "a", "Integer[] MArray = new Integer[M];", "MArray", "new Integer[M]", "M", "for(int i = 0; i < M ; i++) {\n\t\t\tMArray[i] = a.nextInt();\n\t\t\tN -= MArray[i];\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < M", "i", "M", "i++", "i++", "i", "{\n\t\t\tMArray[i] = a.nextInt();\n\t\t\tN -= MArray[i];\n\t\t}", "{\n\t\t\tMArray[i] = a.nextInt();\n\t\t\tN -= MArray[i];\n\t\t}", "MArray[i] = a.nextInt()", "MArray[i]", "MArray", "i", "a.nextInt()", "a.nextInt", "a", "N -= MArray[i]", "N", "MArray[i]", "MArray", "i", "if(N < 0) {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}else {\n\t\t\tSystem.out.println(N);\n\t\t}", "N < 0", "N", "0", "{\n\t\t\tSystem.out.println(\"-1\");\n\t\t}", "System.out.println(\"-1\")", "System.out.println", "System.out", "System", "System.out", "\"-1\"", "{\n\t\t\tSystem.out.println(N);\n\t\t}", "System.out.println(N)", "System.out.println", "System.out", "System", "System.out", "N", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner a = new Scanner(System.in);\t\t\n\t\tint N = a.nextInt();\n\t\tint M = a.nextInt();\n\t\tInteger[] MArray = new Integer[M];\n\t\tfor(int i = 0; i < M ; i++) {\n\t\t\tMArray[i] = a.nextInt();\n\t\t\tN -= MArray[i];\n\t\t}\n\t\tif(N < 0) {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}else {\n\t\t\tSystem.out.println(N);\n\t\t}\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner a = new Scanner(System.in);\t\t\n\t\tint N = a.nextInt();\n\t\tint M = a.nextInt();\n\t\tInteger[] MArray = new Integer[M];\n\t\tfor(int i = 0; i < M ; i++) {\n\t\t\tMArray[i] = a.nextInt();\n\t\t\tN -= MArray[i];\n\t\t}\n\t\tif(N < 0) {\n\t\t\tSystem.out.println(\"-1\");\n\t\t}else {\n\t\t\tSystem.out.println(N);\n\t\t}\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner a = new Scanner(System.in); int N = a.nextInt(); int M = a.nextInt(); Integer[] MArray = new Integer[M]; for(int i = 0; i < M ; i++) { MArray[i] = a.nextInt(); N -= MArray[i]; } if(N < 0) { System.out.println("-1"); }else { System.out.println(N); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 0, 13, 2, 13, 18, 13, 13, 14, 2, 13, 17, 4, 18, 18, 13, 13, 17, 14, 2, 13, 17, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 76, 5 ], [ 76, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 26, 31 ], [ 31, 32 ], [ 31, 33 ], [ 26, 34 ], [ 34, 35 ], [ 35, 36 ], [ 26, 37 ], [ 38, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 39, 43 ], [ 43, 44 ], [ 44, 45 ], [ 38, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 50, 52 ], [ 8, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 53, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 8, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 63, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 67, 72 ], [ 6, 73 ], [ 73, 74 ], [ 0, 75 ], [ 75, 76 ], [ 75, 77 ] ]
[ "import java.util.Scanner;\npublic class Main\n{\n public static void main(String Args[])\n {\n Scanner sc=new Scanner (System.in);\n int n=sc.nextInt();\n int m=sc.nextInt();\n int[] x=new int[m];\n for(int a=0;a<m;a++)\n {\n x[a]=sc.nextInt();\n n=n-x[a];\n }\n \n if (n<0)\n System.out.println(\"-1\");\n if(n>=0)\n System.out.println(n);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main\n{\n public static void main(String Args[])\n {\n Scanner sc=new Scanner (System.in);\n int n=sc.nextInt();\n int m=sc.nextInt();\n int[] x=new int[m];\n for(int a=0;a<m;a++)\n {\n x[a]=sc.nextInt();\n n=n-x[a];\n }\n \n if (n<0)\n System.out.println(\"-1\");\n if(n>=0)\n System.out.println(n);\n }\n}", "Main", "public static void main(String Args[])\n {\n Scanner sc=new Scanner (System.in);\n int n=sc.nextInt();\n int m=sc.nextInt();\n int[] x=new int[m];\n for(int a=0;a<m;a++)\n {\n x[a]=sc.nextInt();\n n=n-x[a];\n }\n \n if (n<0)\n System.out.println(\"-1\");\n if(n>=0)\n System.out.println(n);\n }", "main", "{\n Scanner sc=new Scanner (System.in);\n int n=sc.nextInt();\n int m=sc.nextInt();\n int[] x=new int[m];\n for(int a=0;a<m;a++)\n {\n x[a]=sc.nextInt();\n n=n-x[a];\n }\n \n if (n<0)\n System.out.println(\"-1\");\n if(n>=0)\n System.out.println(n);\n }", "Scanner sc=new Scanner (System.in);", "sc", "new Scanner (System.in)", "int n=sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int m=sc.nextInt();", "m", "sc.nextInt()", "sc.nextInt", "sc", "int[] x=new int[m];", "x", "new int[m]", "m", "for(int a=0;a<m;a++)\n {\n x[a]=sc.nextInt();\n n=n-x[a];\n }", "int a=0;", "int a=0;", "a", "0", "a<m", "a", "m", "a++", "a++", "a", "{\n x[a]=sc.nextInt();\n n=n-x[a];\n }", "{\n x[a]=sc.nextInt();\n n=n-x[a];\n }", "x[a]=sc.nextInt()", "x[a]", "x", "a", "sc.nextInt()", "sc.nextInt", "sc", "n=n-x[a]", "n", "n-x[a]", "n", "x[a]", "x", "a", "if (n<0)\n System.out.println(\"-1\");", "n<0", "n", "0", "System.out.println(\"-1\")", "System.out.println", "System.out", "System", "System.out", "\"-1\"", "if(n>=0)\n System.out.println(n);", "n>=0", "n", "0", "System.out.println(n)", "System.out.println", "System.out", "System", "System.out", "n", "String Args[]", "Args", "public class Main\n{\n public static void main(String Args[])\n {\n Scanner sc=new Scanner (System.in);\n int n=sc.nextInt();\n int m=sc.nextInt();\n int[] x=new int[m];\n for(int a=0;a<m;a++)\n {\n x[a]=sc.nextInt();\n n=n-x[a];\n }\n \n if (n<0)\n System.out.println(\"-1\");\n if(n>=0)\n System.out.println(n);\n }\n}", "public class Main\n{\n public static void main(String Args[])\n {\n Scanner sc=new Scanner (System.in);\n int n=sc.nextInt();\n int m=sc.nextInt();\n int[] x=new int[m];\n for(int a=0;a<m;a++)\n {\n x[a]=sc.nextInt();\n n=n-x[a];\n }\n \n if (n<0)\n System.out.println(\"-1\");\n if(n>=0)\n System.out.println(n);\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String Args[]) { Scanner sc=new Scanner (System.in); int n=sc.nextInt(); int m=sc.nextInt(); int[] x=new int[m]; for(int a=0;a<m;a++) { x[a]=sc.nextInt(); n=n-x[a]; } if (n<0) System.out.println("-1"); if(n>=0) System.out.println(n); } }