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, 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, 41, 13, 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, 2, 17, 17, 1, 40, 13, 30, 30, 0, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 18, 13, 13, 13, 30, 0, 13, 17, 14, 13, 30, 14, 2, 4, 18, 13, 2, 13, 13, 13, 30, 0, 13, 4, 18, 13, 2, 13, 13, 0, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 129, 5 ], [ 129, 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 ], [ 29, 31 ], [ 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 ], [ 8, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 55, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 62, 64 ], [ 55, 65 ], [ 65, 66 ], [ 66, 67 ], [ 55, 68 ], [ 69, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 69, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 73, 78 ], [ 78, 79 ], [ 78, 80 ], [ 73, 81 ], [ 81, 82 ], [ 82, 83 ], [ 73, 84 ], [ 85, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 87, 91 ], [ 86, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 69, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 101, 104 ], [ 104, 105 ], [ 104, 106 ], [ 100, 107 ], [ 99, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 111, 112 ], [ 112, 113 ], [ 111, 114 ], [ 114, 115 ], [ 114, 116 ], [ 108, 117 ], [ 117, 118 ], [ 117, 119 ], [ 8, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 120, 125 ], [ 6, 126 ], [ 126, 127 ], [ 0, 128 ], [ 128, 129 ], [ 128, 130 ] ]
[ "import java.util.*;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n \tint x = sc.nextInt();\n \tint n = sc.nextInt();\n \tint[] p = new int[n];\n \tint min = 200;\n \tint pos = 0;\n \tboolean ans = false;\n\t\tfor(int i=0;i<n;i++){\n p[i] = sc.nextInt();\n }\n \tfor(int i=0;i<101+1;i++){\n ans = true;\n for(int j=0;j<n;j++){\n if( p[j] == i ){\n ans = false;\n }\n }\n if( ans ){\n if( Math.abs(x - i) < min ){\n min = Math.abs(x - i);\n pos = i;\n }\n }\n }\n System.out.println(pos);\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 \tint x = sc.nextInt();\n \tint n = sc.nextInt();\n \tint[] p = new int[n];\n \tint min = 200;\n \tint pos = 0;\n \tboolean ans = false;\n\t\tfor(int i=0;i<n;i++){\n p[i] = sc.nextInt();\n }\n \tfor(int i=0;i<101+1;i++){\n ans = true;\n for(int j=0;j<n;j++){\n if( p[j] == i ){\n ans = false;\n }\n }\n if( ans ){\n if( Math.abs(x - i) < min ){\n min = Math.abs(x - i);\n pos = i;\n }\n }\n }\n System.out.println(pos);\n\t}\n}", "Main", "public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n \tint x = sc.nextInt();\n \tint n = sc.nextInt();\n \tint[] p = new int[n];\n \tint min = 200;\n \tint pos = 0;\n \tboolean ans = false;\n\t\tfor(int i=0;i<n;i++){\n p[i] = sc.nextInt();\n }\n \tfor(int i=0;i<101+1;i++){\n ans = true;\n for(int j=0;j<n;j++){\n if( p[j] == i ){\n ans = false;\n }\n }\n if( ans ){\n if( Math.abs(x - i) < min ){\n min = Math.abs(x - i);\n pos = i;\n }\n }\n }\n System.out.println(pos);\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n \tint x = sc.nextInt();\n \tint n = sc.nextInt();\n \tint[] p = new int[n];\n \tint min = 200;\n \tint pos = 0;\n \tboolean ans = false;\n\t\tfor(int i=0;i<n;i++){\n p[i] = sc.nextInt();\n }\n \tfor(int i=0;i<101+1;i++){\n ans = true;\n for(int j=0;j<n;j++){\n if( p[j] == i ){\n ans = false;\n }\n }\n if( ans ){\n if( Math.abs(x - i) < min ){\n min = Math.abs(x - i);\n pos = i;\n }\n }\n }\n System.out.println(pos);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int[] p = new int[n];", "p", "new int[n]", "n", "int min = 200;", "min", "200", "int pos = 0;", "pos", "0", "boolean ans = false;", "ans", "false", "for(int i=0;i<n;i++){\n p[i] = sc.nextInt();\n }", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n p[i] = sc.nextInt();\n }", "{\n p[i] = sc.nextInt();\n }", "p[i] = sc.nextInt()", "p[i]", "p", "i", "sc.nextInt()", "sc.nextInt", "sc", "for(int i=0;i<101+1;i++){\n ans = true;\n for(int j=0;j<n;j++){\n if( p[j] == i ){\n ans = false;\n }\n }\n if( ans ){\n if( Math.abs(x - i) < min ){\n min = Math.abs(x - i);\n pos = i;\n }\n }\n }", "int i=0;", "int i=0;", "i", "0", "i<101+1", "i", "101+1", "101", "1", "i++", "i++", "i", "{\n ans = true;\n for(int j=0;j<n;j++){\n if( p[j] == i ){\n ans = false;\n }\n }\n if( ans ){\n if( Math.abs(x - i) < min ){\n min = Math.abs(x - i);\n pos = i;\n }\n }\n }", "{\n ans = true;\n for(int j=0;j<n;j++){\n if( p[j] == i ){\n ans = false;\n }\n }\n if( ans ){\n if( Math.abs(x - i) < min ){\n min = Math.abs(x - i);\n pos = i;\n }\n }\n }", "ans = true", "ans", "true", "for(int j=0;j<n;j++){\n if( p[j] == i ){\n ans = false;\n }\n }", "int j=0;", "int j=0;", "j", "0", "j<n", "j", "n", "j++", "j++", "j", "{\n if( p[j] == i ){\n ans = false;\n }\n }", "{\n if( p[j] == i ){\n ans = false;\n }\n }", "if( p[j] == i ){\n ans = false;\n }", "p[j] == i", "p[j]", "p", "j", "i", "{\n ans = false;\n }", "ans = false", "ans", "false", "if( ans ){\n if( Math.abs(x - i) < min ){\n min = Math.abs(x - i);\n pos = i;\n }\n }", "ans", "{\n if( Math.abs(x - i) < min ){\n min = Math.abs(x - i);\n pos = i;\n }\n }", "if( Math.abs(x - i) < min ){\n min = Math.abs(x - i);\n pos = i;\n }", "Math.abs(x - i) < min", "Math.abs(x - i)", "Math.abs", "Math", "x - i", "x", "i", "min", "{\n min = Math.abs(x - i);\n pos = i;\n }", "min = Math.abs(x - i)", "min", "Math.abs(x - i)", "Math.abs", "Math", "x - i", "x", "i", "pos = i", "pos", "i", "System.out.println(pos)", "System.out.println", "System.out", "System", "System.out", "pos", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n \tint x = sc.nextInt();\n \tint n = sc.nextInt();\n \tint[] p = new int[n];\n \tint min = 200;\n \tint pos = 0;\n \tboolean ans = false;\n\t\tfor(int i=0;i<n;i++){\n p[i] = sc.nextInt();\n }\n \tfor(int i=0;i<101+1;i++){\n ans = true;\n for(int j=0;j<n;j++){\n if( p[j] == i ){\n ans = false;\n }\n }\n if( ans ){\n if( Math.abs(x - i) < min ){\n min = Math.abs(x - i);\n pos = i;\n }\n }\n }\n System.out.println(pos);\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n \tint x = sc.nextInt();\n \tint n = sc.nextInt();\n \tint[] p = new int[n];\n \tint min = 200;\n \tint pos = 0;\n \tboolean ans = false;\n\t\tfor(int i=0;i<n;i++){\n p[i] = sc.nextInt();\n }\n \tfor(int i=0;i<101+1;i++){\n ans = true;\n for(int j=0;j<n;j++){\n if( p[j] == i ){\n ans = false;\n }\n }\n if( ans ){\n if( Math.abs(x - i) < min ){\n min = Math.abs(x - i);\n pos = i;\n }\n }\n }\n System.out.println(pos);\n\t}\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int n = sc.nextInt(); int[] p = new int[n]; int min = 200; int pos = 0; boolean ans = false; for(int i=0;i<n;i++){ p[i] = sc.nextInt(); } for(int i=0;i<101+1;i++){ ans = true; for(int j=0;j<n;j++){ if( p[j] == i ){ ans = false; } } if( ans ){ if( Math.abs(x - i) < min ){ min = Math.abs(x - i); pos = i; } } } System.out.println(pos); } }
[ 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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 41, 13, 40, 17, 41, 13, 17, 42, 2, 13, 40, 17, 30, 14, 40, 4, 18, 13, 2, 13, 13, 0, 13, 2, 13, 13, 14, 40, 4, 18, 13, 2, 13, 13, 0, 13, 2, 13, 13, 40, 13, 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 ], [ 97, 8 ], [ 97, 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 ], [ 42, 43 ], [ 41, 44 ], [ 44, 45 ], [ 45, 46 ], [ 11, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 11, 51 ], [ 51, 52 ], [ 51, 53 ], [ 11, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 54, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 62, 65 ], [ 65, 66 ], [ 65, 67 ], [ 60, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 70, 72 ], [ 60, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 75, 78 ], [ 78, 79 ], [ 78, 80 ], [ 73, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 83, 85 ], [ 59, 86 ], [ 86, 87 ], [ 11, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 88, 93 ], [ 9, 94 ], [ 94, 95 ], [ 0, 96 ], [ 96, 97 ], [ 96, 98 ] ]
[ "import java.util.ArrayList;\nimport java.util.Scanner;\n \npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint x = scanner.nextInt();\n\t\tint length = scanner.nextInt();\n\t\tArrayList<Integer> unwanted = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < length; i++) {\n\t\t\tunwanted.add(scanner.nextInt());\n\t\t}\n\t\tint maximum = -100;\n\t\tint difference = 0;\n\t\twhile(maximum == -100) {\n\t\t\tif(!unwanted.contains(x - difference))\n\t\t\t\tmaximum = x - difference;\n\t\t\telse if(!unwanted.contains(x + difference))\n\t\t\t\tmaximum = x + difference;\n\t\t\tdifference++;\n\t\t}\n\t\tSystem.out.print(maximum);\n\t\t\n\t}\n}", "import java.util.ArrayList;", "ArrayList", "java.util", "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\t\tint x = scanner.nextInt();\n\t\tint length = scanner.nextInt();\n\t\tArrayList<Integer> unwanted = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < length; i++) {\n\t\t\tunwanted.add(scanner.nextInt());\n\t\t}\n\t\tint maximum = -100;\n\t\tint difference = 0;\n\t\twhile(maximum == -100) {\n\t\t\tif(!unwanted.contains(x - difference))\n\t\t\t\tmaximum = x - difference;\n\t\t\telse if(!unwanted.contains(x + difference))\n\t\t\t\tmaximum = x + difference;\n\t\t\tdifference++;\n\t\t}\n\t\tSystem.out.print(maximum);\n\t\t\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint x = scanner.nextInt();\n\t\tint length = scanner.nextInt();\n\t\tArrayList<Integer> unwanted = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < length; i++) {\n\t\t\tunwanted.add(scanner.nextInt());\n\t\t}\n\t\tint maximum = -100;\n\t\tint difference = 0;\n\t\twhile(maximum == -100) {\n\t\t\tif(!unwanted.contains(x - difference))\n\t\t\t\tmaximum = x - difference;\n\t\t\telse if(!unwanted.contains(x + difference))\n\t\t\t\tmaximum = x + difference;\n\t\t\tdifference++;\n\t\t}\n\t\tSystem.out.print(maximum);\n\t\t\n\t}", "main", "{\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint x = scanner.nextInt();\n\t\tint length = scanner.nextInt();\n\t\tArrayList<Integer> unwanted = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < length; i++) {\n\t\t\tunwanted.add(scanner.nextInt());\n\t\t}\n\t\tint maximum = -100;\n\t\tint difference = 0;\n\t\twhile(maximum == -100) {\n\t\t\tif(!unwanted.contains(x - difference))\n\t\t\t\tmaximum = x - difference;\n\t\t\telse if(!unwanted.contains(x + difference))\n\t\t\t\tmaximum = x + difference;\n\t\t\tdifference++;\n\t\t}\n\t\tSystem.out.print(maximum);\n\t\t\n\t}", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int x = scanner.nextInt();", "x", "scanner.nextInt()", "scanner.nextInt", "scanner", "int length = scanner.nextInt();", "length", "scanner.nextInt()", "scanner.nextInt", "scanner", "ArrayList<Integer> unwanted = new ArrayList<Integer>();", "unwanted", "new ArrayList<Integer>()", "for(int i = 0; i < length; i++) {\n\t\t\tunwanted.add(scanner.nextInt());\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < length", "i", "length", "i++", "i++", "i", "{\n\t\t\tunwanted.add(scanner.nextInt());\n\t\t}", "{\n\t\t\tunwanted.add(scanner.nextInt());\n\t\t}", "unwanted.add(scanner.nextInt())", "unwanted.add", "unwanted", "scanner.nextInt()", "scanner.nextInt", "scanner", "int maximum = -100;", "maximum", "-100", "100", "int difference = 0;", "difference", "0", "while(maximum == -100) {\n\t\t\tif(!unwanted.contains(x - difference))\n\t\t\t\tmaximum = x - difference;\n\t\t\telse if(!unwanted.contains(x + difference))\n\t\t\t\tmaximum = x + difference;\n\t\t\tdifference++;\n\t\t}", "maximum == -100", "maximum", "-100", "100", "{\n\t\t\tif(!unwanted.contains(x - difference))\n\t\t\t\tmaximum = x - difference;\n\t\t\telse if(!unwanted.contains(x + difference))\n\t\t\t\tmaximum = x + difference;\n\t\t\tdifference++;\n\t\t}", "if(!unwanted.contains(x - difference))\n\t\t\t\tmaximum = x - difference;\n\t\t\telse if(!unwanted.contains(x + difference))\n\t\t\t\tmaximum = x + difference;", "!unwanted.contains(x - difference)", "unwanted.contains(x - difference)", "unwanted.contains", "unwanted", "x - difference", "x", "difference", "maximum = x - difference", "maximum", "x - difference", "x", "difference", "if(!unwanted.contains(x + difference))\n\t\t\t\tmaximum = x + difference;", "!unwanted.contains(x + difference)", "unwanted.contains(x + difference)", "unwanted.contains", "unwanted", "x + difference", "x", "difference", "maximum = x + difference", "maximum", "x + difference", "x", "difference", "difference++", "difference", "System.out.print(maximum)", "System.out.print", "System.out", "System", "System.out", "maximum", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint x = scanner.nextInt();\n\t\tint length = scanner.nextInt();\n\t\tArrayList<Integer> unwanted = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < length; i++) {\n\t\t\tunwanted.add(scanner.nextInt());\n\t\t}\n\t\tint maximum = -100;\n\t\tint difference = 0;\n\t\twhile(maximum == -100) {\n\t\t\tif(!unwanted.contains(x - difference))\n\t\t\t\tmaximum = x - difference;\n\t\t\telse if(!unwanted.contains(x + difference))\n\t\t\t\tmaximum = x + difference;\n\t\t\tdifference++;\n\t\t}\n\t\tSystem.out.print(maximum);\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\t\tint x = scanner.nextInt();\n\t\tint length = scanner.nextInt();\n\t\tArrayList<Integer> unwanted = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < length; i++) {\n\t\t\tunwanted.add(scanner.nextInt());\n\t\t}\n\t\tint maximum = -100;\n\t\tint difference = 0;\n\t\twhile(maximum == -100) {\n\t\t\tif(!unwanted.contains(x - difference))\n\t\t\t\tmaximum = x - difference;\n\t\t\telse if(!unwanted.contains(x + difference))\n\t\t\t\tmaximum = x + difference;\n\t\t\tdifference++;\n\t\t}\n\t\tSystem.out.print(maximum);\n\t\t\n\t}\n}", "Main" ]
import java.util.ArrayList; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int x = scanner.nextInt(); int length = scanner.nextInt(); ArrayList<Integer> unwanted = new ArrayList<Integer>(); for(int i = 0; i < length; i++) { unwanted.add(scanner.nextInt()); } int maximum = -100; int difference = 0; while(maximum == -100) { if(!unwanted.contains(x - difference)) maximum = x - difference; else if(!unwanted.contains(x + difference)) maximum = x + difference; difference++; } System.out.print(maximum); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 13, 17, 30, 41, 13, 20, 17, 41, 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, 13, 0, 13, 13, 14, 2, 13, 13, 0, 13, 13, 0, 18, 13, 13, 17, 4, 18, 13, 14, 2, 13, 17, 40, 13, 14, 2, 13, 17, 40, 13, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 13, 2, 13, 13, 1, 40, 13, 30, 30, 14, 40, 18, 13, 13, 30, 41, 13, 4, 18, 13, 2, 13, 13, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 13, 4, 18, 18, 13, 13, 13, 30, 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 ], [ 23, 25 ], [ 22, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 26, 31 ], [ 31, 32 ], [ 31, 33 ], [ 26, 34 ], [ 34, 35 ], [ 34, 36 ], [ 26, 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 ], [ 49, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 55, 59 ], [ 59, 60 ], [ 59, 61 ], [ 49, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 62, 66 ], [ 66, 67 ], [ 66, 68 ], [ 49, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 69, 73 ], [ 26, 74 ], [ 74, 75 ], [ 75, 76 ], [ 26, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 77, 81 ], [ 81, 82 ], [ 26, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 83, 87 ], [ 87, 88 ], [ 26, 89 ], [ 89, 90 ], [ 89, 91 ], [ 26, 92 ], [ 92, 93 ], [ 92, 94 ], [ 26, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 95, 100 ], [ 100, 101 ], [ 100, 102 ], [ 95, 103 ], [ 103, 104 ], [ 104, 105 ], [ 95, 106 ], [ 107, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 108, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 116, 117 ], [ 117, 118 ], [ 116, 119 ], [ 119, 120 ], [ 119, 121 ], [ 113, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 122, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 126, 130 ], [ 130, 131 ], [ 130, 132 ], [ 26, 133 ], [ 133, 134 ], [ 134, 135 ], [ 135, 136 ], [ 135, 137 ], [ 133, 138 ], [ 22, 139 ], [ 139, 140 ], [ 140, 141 ], [ 141, 142 ], [ 142, 143 ], [ 142, 144 ], [ 140, 145 ], [ 6, 146 ], [ 146, 147 ] ]
[ "import java.util.Scanner;\n\nclass Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n byte x = sc.nextByte();\n byte n = sc.nextByte();\n if(n > 0) {\n boolean[] num = new boolean[102];\n byte li = 101;\n byte ui = 0;\n for(byte i = 0; i < n; i++) {\n byte val = sc.nextByte();\n if(li > val) li = val;\n if(ui < val) ui = val;\n num[val] = true;\n }\n sc.close();\n if(li >= 1) li--;\n if(ui <= 100) ui++;\n byte cl = 0;\n byte cld = 101;\n for(byte i = li; i <= ui; i++) {\n if(!num[i]) {\n byte nd = (byte)Math.abs((int)(x - i));\n if(cld > nd) {\n cld = nd;\n cl = i;\n }\n }\n }\n System.out.println(cl); \n } else {\n System.out.println(x);\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 byte x = sc.nextByte();\n byte n = sc.nextByte();\n if(n > 0) {\n boolean[] num = new boolean[102];\n byte li = 101;\n byte ui = 0;\n for(byte i = 0; i < n; i++) {\n byte val = sc.nextByte();\n if(li > val) li = val;\n if(ui < val) ui = val;\n num[val] = true;\n }\n sc.close();\n if(li >= 1) li--;\n if(ui <= 100) ui++;\n byte cl = 0;\n byte cld = 101;\n for(byte i = li; i <= ui; i++) {\n if(!num[i]) {\n byte nd = (byte)Math.abs((int)(x - i));\n if(cld > nd) {\n cld = nd;\n cl = i;\n }\n }\n }\n System.out.println(cl); \n } else {\n System.out.println(x);\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n byte x = sc.nextByte();\n byte n = sc.nextByte();\n if(n > 0) {\n boolean[] num = new boolean[102];\n byte li = 101;\n byte ui = 0;\n for(byte i = 0; i < n; i++) {\n byte val = sc.nextByte();\n if(li > val) li = val;\n if(ui < val) ui = val;\n num[val] = true;\n }\n sc.close();\n if(li >= 1) li--;\n if(ui <= 100) ui++;\n byte cl = 0;\n byte cld = 101;\n for(byte i = li; i <= ui; i++) {\n if(!num[i]) {\n byte nd = (byte)Math.abs((int)(x - i));\n if(cld > nd) {\n cld = nd;\n cl = i;\n }\n }\n }\n System.out.println(cl); \n } else {\n System.out.println(x);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n byte x = sc.nextByte();\n byte n = sc.nextByte();\n if(n > 0) {\n boolean[] num = new boolean[102];\n byte li = 101;\n byte ui = 0;\n for(byte i = 0; i < n; i++) {\n byte val = sc.nextByte();\n if(li > val) li = val;\n if(ui < val) ui = val;\n num[val] = true;\n }\n sc.close();\n if(li >= 1) li--;\n if(ui <= 100) ui++;\n byte cl = 0;\n byte cld = 101;\n for(byte i = li; i <= ui; i++) {\n if(!num[i]) {\n byte nd = (byte)Math.abs((int)(x - i));\n if(cld > nd) {\n cld = nd;\n cl = i;\n }\n }\n }\n System.out.println(cl); \n } else {\n System.out.println(x);\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "byte x = sc.nextByte();", "x", "sc.nextByte()", "sc.nextByte", "sc", "byte n = sc.nextByte();", "n", "sc.nextByte()", "sc.nextByte", "sc", "if(n > 0) {\n boolean[] num = new boolean[102];\n byte li = 101;\n byte ui = 0;\n for(byte i = 0; i < n; i++) {\n byte val = sc.nextByte();\n if(li > val) li = val;\n if(ui < val) ui = val;\n num[val] = true;\n }\n sc.close();\n if(li >= 1) li--;\n if(ui <= 100) ui++;\n byte cl = 0;\n byte cld = 101;\n for(byte i = li; i <= ui; i++) {\n if(!num[i]) {\n byte nd = (byte)Math.abs((int)(x - i));\n if(cld > nd) {\n cld = nd;\n cl = i;\n }\n }\n }\n System.out.println(cl); \n } else {\n System.out.println(x);\n }", "n > 0", "n", "0", "{\n boolean[] num = new boolean[102];\n byte li = 101;\n byte ui = 0;\n for(byte i = 0; i < n; i++) {\n byte val = sc.nextByte();\n if(li > val) li = val;\n if(ui < val) ui = val;\n num[val] = true;\n }\n sc.close();\n if(li >= 1) li--;\n if(ui <= 100) ui++;\n byte cl = 0;\n byte cld = 101;\n for(byte i = li; i <= ui; i++) {\n if(!num[i]) {\n byte nd = (byte)Math.abs((int)(x - i));\n if(cld > nd) {\n cld = nd;\n cl = i;\n }\n }\n }\n System.out.println(cl); \n }", "boolean[] num = new boolean[102];", "num", "new boolean[102]", "102", "byte li = 101;", "li", "101", "byte ui = 0;", "ui", "0", "for(byte i = 0; i < n; i++) {\n byte val = sc.nextByte();\n if(li > val) li = val;\n if(ui < val) ui = val;\n num[val] = true;\n }", "byte i = 0;", "byte i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n byte val = sc.nextByte();\n if(li > val) li = val;\n if(ui < val) ui = val;\n num[val] = true;\n }", "{\n byte val = sc.nextByte();\n if(li > val) li = val;\n if(ui < val) ui = val;\n num[val] = true;\n }", "byte val = sc.nextByte();", "val", "sc.nextByte()", "sc.nextByte", "sc", "if(li > val) li = val;", "li > val", "li", "val", "li = val", "li", "val", "if(ui < val) ui = val;", "ui < val", "ui", "val", "ui = val", "ui", "val", "num[val] = true", "num[val]", "num", "val", "true", "sc.close()", "sc.close", "sc", "if(li >= 1) li--;", "li >= 1", "li", "1", "li--", "li", "if(ui <= 100) ui++;", "ui <= 100", "ui", "100", "ui++", "ui", "byte cl = 0;", "cl", "0", "byte cld = 101;", "cld", "101", "for(byte i = li; i <= ui; i++) {\n if(!num[i]) {\n byte nd = (byte)Math.abs((int)(x - i));\n if(cld > nd) {\n cld = nd;\n cl = i;\n }\n }\n }", "byte i = li;", "byte i = li;", "i", "li", "i <= ui", "i", "ui", "i++", "i++", "i", "{\n if(!num[i]) {\n byte nd = (byte)Math.abs((int)(x - i));\n if(cld > nd) {\n cld = nd;\n cl = i;\n }\n }\n }", "{\n if(!num[i]) {\n byte nd = (byte)Math.abs((int)(x - i));\n if(cld > nd) {\n cld = nd;\n cl = i;\n }\n }\n }", "if(!num[i]) {\n byte nd = (byte)Math.abs((int)(x - i));\n if(cld > nd) {\n cld = nd;\n cl = i;\n }\n }", "!num[i]", "num[i]", "num", "i", "{\n byte nd = (byte)Math.abs((int)(x - i));\n if(cld > nd) {\n cld = nd;\n cl = i;\n }\n }", "byte nd = (byte)Math.abs((int)(x - i));", "nd", "(byte)Math.abs((int)(x - i))", "Math.abs", "Math", "(int)(x - i)", "x", "i", "if(cld > nd) {\n cld = nd;\n cl = i;\n }", "cld > nd", "cld", "nd", "{\n cld = nd;\n cl = i;\n }", "cld = nd", "cld", "nd", "cl = i", "cl", "i", "System.out.println(cl)", "System.out.println", "System.out", "System", "System.out", "cl", "{\n System.out.println(x);\n }", "System.out.println(x)", "System.out.println", "System.out", "System", "System.out", "x", "String[] args", "args" ]
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); byte x = sc.nextByte(); byte n = sc.nextByte(); if(n > 0) { boolean[] num = new boolean[102]; byte li = 101; byte ui = 0; for(byte i = 0; i < n; i++) { byte val = sc.nextByte(); if(li > val) li = val; if(ui < val) ui = val; num[val] = true; } sc.close(); if(li >= 1) li--; if(ui <= 100) ui++; byte cl = 0; byte cld = 101; for(byte i = li; i <= ui; i++) { if(!num[i]) { byte nd = (byte)Math.abs((int)(x - i)); if(cld > nd) { cld = nd; cl = i; } } } System.out.println(cl); } else { System.out.println(x); } } }
[ 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, 41, 13, 20, 41, 13, 17, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 29, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 18, 13, 13, 14, 40, 4, 18, 13, 13, 30, 4, 18, 18, 13, 13, 13, 29, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 4, 18, 13, 2, 13, 13, 4, 18, 13, 2, 13, 13, 30, 9, 14, 40, 4, 18, 13, 2, 13, 13, 30, 0, 13, 17, 4, 18, 18, 13, 13, 2, 13, 13, 3, 14, 40, 4, 18, 13, 2, 13, 13, 30, 0, 13, 17, 4, 18, 18, 13, 13, 2, 13, 13, 3, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 161, 5 ], [ 161, 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 ], [ 29, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 40, 45 ], [ 39, 46 ], [ 8, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 47, 52 ], [ 52, 53 ], [ 52, 54 ], [ 47, 55 ], [ 55, 56 ], [ 56, 57 ], [ 47, 58 ], [ 59, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 60, 64 ], [ 64, 65 ], [ 65, 66 ], [ 59, 67 ], [ 67, 68 ], [ 68, 69 ], [ 67, 70 ], [ 70, 71 ], [ 70, 72 ], [ 8, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 75, 78 ], [ 73, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 80, 85 ], [ 79, 86 ], [ 8, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 87, 92 ], [ 92, 93 ], [ 92, 94 ], [ 87, 95 ], [ 95, 96 ], [ 96, 97 ], [ 87, 98 ], [ 99, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 102, 105 ], [ 105, 106 ], [ 105, 107 ], [ 101, 108 ], [ 108, 109 ], [ 109, 110 ], [ 108, 111 ], [ 111, 112 ], [ 111, 113 ], [ 100, 114 ], [ 114, 115 ], [ 99, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 118, 121 ], [ 121, 122 ], [ 121, 123 ], [ 116, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 124, 128 ], [ 128, 129 ], [ 129, 130 ], [ 130, 131 ], [ 130, 132 ], [ 128, 133 ], [ 133, 134 ], [ 133, 135 ], [ 124, 136 ], [ 99, 137 ], [ 137, 138 ], [ 138, 139 ], [ 139, 140 ], [ 140, 141 ], [ 139, 142 ], [ 142, 143 ], [ 142, 144 ], [ 137, 145 ], [ 145, 146 ], [ 146, 147 ], [ 146, 148 ], [ 145, 149 ], [ 149, 150 ], [ 150, 151 ], [ 151, 152 ], [ 151, 153 ], [ 149, 154 ], [ 154, 155 ], [ 154, 156 ], [ 145, 157 ], [ 6, 158 ], [ 158, 159 ], [ 0, 160 ], [ 160, 161 ], [ 160, 162 ] ]
[ "import java.util.*;\npublic class Main{\n\tpublic static void main(String[] args)\n\t{\n\t\t Scanner sc=new Scanner(System.in);\n\t\t int i=sc.nextInt();\n\t\t int j=sc.nextInt();\n\t\t int min=9999;\n\t\t int arr[]=new int[j];\n\t\t List<Integer> li1=new ArrayList<Integer>();\n\t\t int flag=0;\n\t\t if(j==0)\n\t\t {\n\t\t\t System.out.println(i);\n\t\t\t return;\n\t\t }\n\t\t for(int k=0;k<j;k++)\n\t\t {\n\t\t\t arr[k]=sc.nextInt();\n\t\t\t li1.add(arr[k]);\n\t\t }\n\t\t if(!li1.contains(i))\n\t\t {\n\t\t\t System.out.println(i);\n\t\t\t return;\n\t\t }\n\t\t\n\t\t for(int k=0;k<=j;k++)\n\t\t {\n\t\t\tif((li1.contains(i+k))&&(li1.contains(i-k)))\n\t\t\t { \n\t\t\t\t continue;\n\t\t\t }\n \n\t\t\t if(!li1.contains(i-k))\n\t\t\t {\n\t\t\t\t flag=1;\n\t\t\t\t\n\t\t\t\t System.out.println(i-k);\n break;\n\t\t\t\t \n\t\t\t }\n\t\t\t if(!li1.contains(i+k))\n\t\t\t {\n\t\t\t\t flag=1;\n\t\t\t\t System.out.println(i+k);\n break;\n\t\t\t\t \n\t\t\t }\n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t \n\t\t }\n\t\t \n\t\t \n\t}\n\n}", "import java.util.*;", "util.*", "java", "public class Main{\n\tpublic static void main(String[] args)\n\t{\n\t\t Scanner sc=new Scanner(System.in);\n\t\t int i=sc.nextInt();\n\t\t int j=sc.nextInt();\n\t\t int min=9999;\n\t\t int arr[]=new int[j];\n\t\t List<Integer> li1=new ArrayList<Integer>();\n\t\t int flag=0;\n\t\t if(j==0)\n\t\t {\n\t\t\t System.out.println(i);\n\t\t\t return;\n\t\t }\n\t\t for(int k=0;k<j;k++)\n\t\t {\n\t\t\t arr[k]=sc.nextInt();\n\t\t\t li1.add(arr[k]);\n\t\t }\n\t\t if(!li1.contains(i))\n\t\t {\n\t\t\t System.out.println(i);\n\t\t\t return;\n\t\t }\n\t\t\n\t\t for(int k=0;k<=j;k++)\n\t\t {\n\t\t\tif((li1.contains(i+k))&&(li1.contains(i-k)))\n\t\t\t { \n\t\t\t\t continue;\n\t\t\t }\n \n\t\t\t if(!li1.contains(i-k))\n\t\t\t {\n\t\t\t\t flag=1;\n\t\t\t\t\n\t\t\t\t System.out.println(i-k);\n break;\n\t\t\t\t \n\t\t\t }\n\t\t\t if(!li1.contains(i+k))\n\t\t\t {\n\t\t\t\t flag=1;\n\t\t\t\t System.out.println(i+k);\n break;\n\t\t\t\t \n\t\t\t }\n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t \n\t\t }\n\t\t \n\t\t \n\t}\n\n}", "Main", "public static void main(String[] args)\n\t{\n\t\t Scanner sc=new Scanner(System.in);\n\t\t int i=sc.nextInt();\n\t\t int j=sc.nextInt();\n\t\t int min=9999;\n\t\t int arr[]=new int[j];\n\t\t List<Integer> li1=new ArrayList<Integer>();\n\t\t int flag=0;\n\t\t if(j==0)\n\t\t {\n\t\t\t System.out.println(i);\n\t\t\t return;\n\t\t }\n\t\t for(int k=0;k<j;k++)\n\t\t {\n\t\t\t arr[k]=sc.nextInt();\n\t\t\t li1.add(arr[k]);\n\t\t }\n\t\t if(!li1.contains(i))\n\t\t {\n\t\t\t System.out.println(i);\n\t\t\t return;\n\t\t }\n\t\t\n\t\t for(int k=0;k<=j;k++)\n\t\t {\n\t\t\tif((li1.contains(i+k))&&(li1.contains(i-k)))\n\t\t\t { \n\t\t\t\t continue;\n\t\t\t }\n \n\t\t\t if(!li1.contains(i-k))\n\t\t\t {\n\t\t\t\t flag=1;\n\t\t\t\t\n\t\t\t\t System.out.println(i-k);\n break;\n\t\t\t\t \n\t\t\t }\n\t\t\t if(!li1.contains(i+k))\n\t\t\t {\n\t\t\t\t flag=1;\n\t\t\t\t System.out.println(i+k);\n break;\n\t\t\t\t \n\t\t\t }\n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t \n\t\t }\n\t\t \n\t\t \n\t}", "main", "{\n\t\t Scanner sc=new Scanner(System.in);\n\t\t int i=sc.nextInt();\n\t\t int j=sc.nextInt();\n\t\t int min=9999;\n\t\t int arr[]=new int[j];\n\t\t List<Integer> li1=new ArrayList<Integer>();\n\t\t int flag=0;\n\t\t if(j==0)\n\t\t {\n\t\t\t System.out.println(i);\n\t\t\t return;\n\t\t }\n\t\t for(int k=0;k<j;k++)\n\t\t {\n\t\t\t arr[k]=sc.nextInt();\n\t\t\t li1.add(arr[k]);\n\t\t }\n\t\t if(!li1.contains(i))\n\t\t {\n\t\t\t System.out.println(i);\n\t\t\t return;\n\t\t }\n\t\t\n\t\t for(int k=0;k<=j;k++)\n\t\t {\n\t\t\tif((li1.contains(i+k))&&(li1.contains(i-k)))\n\t\t\t { \n\t\t\t\t continue;\n\t\t\t }\n \n\t\t\t if(!li1.contains(i-k))\n\t\t\t {\n\t\t\t\t flag=1;\n\t\t\t\t\n\t\t\t\t System.out.println(i-k);\n break;\n\t\t\t\t \n\t\t\t }\n\t\t\t if(!li1.contains(i+k))\n\t\t\t {\n\t\t\t\t flag=1;\n\t\t\t\t System.out.println(i+k);\n break;\n\t\t\t\t \n\t\t\t }\n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t \n\t\t }\n\t\t \n\t\t \n\t}", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "int i=sc.nextInt();", "i", "sc.nextInt()", "sc.nextInt", "sc", "int j=sc.nextInt();", "j", "sc.nextInt()", "sc.nextInt", "sc", "int min=9999;", "min", "9999", "int arr[]=new int[j];", "arr", "new int[j]", "j", "List<Integer> li1=new ArrayList<Integer>();", "li1", "new ArrayList<Integer>()", "int flag=0;", "flag", "0", "if(j==0)\n\t\t {\n\t\t\t System.out.println(i);\n\t\t\t return;\n\t\t }", "j==0", "j", "0", "{\n\t\t\t System.out.println(i);\n\t\t\t return;\n\t\t }", "System.out.println(i)", "System.out.println", "System.out", "System", "System.out", "i", "return;", "for(int k=0;k<j;k++)\n\t\t {\n\t\t\t arr[k]=sc.nextInt();\n\t\t\t li1.add(arr[k]);\n\t\t }", "int k=0;", "int k=0;", "k", "0", "k<j", "k", "j", "k++", "k++", "k", "{\n\t\t\t arr[k]=sc.nextInt();\n\t\t\t li1.add(arr[k]);\n\t\t }", "{\n\t\t\t arr[k]=sc.nextInt();\n\t\t\t li1.add(arr[k]);\n\t\t }", "arr[k]=sc.nextInt()", "arr[k]", "arr", "k", "sc.nextInt()", "sc.nextInt", "sc", "li1.add(arr[k])", "li1.add", "li1", "arr[k]", "arr", "k", "if(!li1.contains(i))\n\t\t {\n\t\t\t System.out.println(i);\n\t\t\t return;\n\t\t }", "!li1.contains(i)", "li1.contains(i)", "li1.contains", "li1", "i", "{\n\t\t\t System.out.println(i);\n\t\t\t return;\n\t\t }", "System.out.println(i)", "System.out.println", "System.out", "System", "System.out", "i", "return;", "for(int k=0;k<=j;k++)\n\t\t {\n\t\t\tif((li1.contains(i+k))&&(li1.contains(i-k)))\n\t\t\t { \n\t\t\t\t continue;\n\t\t\t }\n \n\t\t\t if(!li1.contains(i-k))\n\t\t\t {\n\t\t\t\t flag=1;\n\t\t\t\t\n\t\t\t\t System.out.println(i-k);\n break;\n\t\t\t\t \n\t\t\t }\n\t\t\t if(!li1.contains(i+k))\n\t\t\t {\n\t\t\t\t flag=1;\n\t\t\t\t System.out.println(i+k);\n break;\n\t\t\t\t \n\t\t\t }\n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t \n\t\t }", "int k=0;", "int k=0;", "k", "0", "k<=j", "k", "j", "k++", "k++", "k", "{\n\t\t\tif((li1.contains(i+k))&&(li1.contains(i-k)))\n\t\t\t { \n\t\t\t\t continue;\n\t\t\t }\n \n\t\t\t if(!li1.contains(i-k))\n\t\t\t {\n\t\t\t\t flag=1;\n\t\t\t\t\n\t\t\t\t System.out.println(i-k);\n break;\n\t\t\t\t \n\t\t\t }\n\t\t\t if(!li1.contains(i+k))\n\t\t\t {\n\t\t\t\t flag=1;\n\t\t\t\t System.out.println(i+k);\n break;\n\t\t\t\t \n\t\t\t }\n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t \n\t\t }", "{\n\t\t\tif((li1.contains(i+k))&&(li1.contains(i-k)))\n\t\t\t { \n\t\t\t\t continue;\n\t\t\t }\n \n\t\t\t if(!li1.contains(i-k))\n\t\t\t {\n\t\t\t\t flag=1;\n\t\t\t\t\n\t\t\t\t System.out.println(i-k);\n break;\n\t\t\t\t \n\t\t\t }\n\t\t\t if(!li1.contains(i+k))\n\t\t\t {\n\t\t\t\t flag=1;\n\t\t\t\t System.out.println(i+k);\n break;\n\t\t\t\t \n\t\t\t }\n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t \n\t\t }", "if((li1.contains(i+k))&&(li1.contains(i-k)))\n\t\t\t { \n\t\t\t\t continue;\n\t\t\t }", "(li1.contains(i+k))&&(li1.contains(i-k))", "(li1.contains(i+k))", "li1.contains", "li1", "i+k", "i", "k", "(li1.contains(i-k))", "li1.contains", "li1", "i-k", "i", "k", "{ \n\t\t\t\t continue;\n\t\t\t }", "continue;", "if(!li1.contains(i-k))\n\t\t\t {\n\t\t\t\t flag=1;\n\t\t\t\t\n\t\t\t\t System.out.println(i-k);\n break;\n\t\t\t\t \n\t\t\t }", "!li1.contains(i-k)", "li1.contains(i-k)", "li1.contains", "li1", "i-k", "i", "k", "{\n\t\t\t\t flag=1;\n\t\t\t\t\n\t\t\t\t System.out.println(i-k);\n break;\n\t\t\t\t \n\t\t\t }", "flag=1", "flag", "1", "System.out.println(i-k)", "System.out.println", "System.out", "System", "System.out", "i-k", "i", "k", "break;", "if(!li1.contains(i+k))\n\t\t\t {\n\t\t\t\t flag=1;\n\t\t\t\t System.out.println(i+k);\n break;\n\t\t\t\t \n\t\t\t }", "!li1.contains(i+k)", "li1.contains(i+k)", "li1.contains", "li1", "i+k", "i", "k", "{\n\t\t\t\t flag=1;\n\t\t\t\t System.out.println(i+k);\n break;\n\t\t\t\t \n\t\t\t }", "flag=1", "flag", "1", "System.out.println(i+k)", "System.out.println", "System.out", "System", "System.out", "i+k", "i", "k", "break;", "String[] args", "args", "public class Main{\n\tpublic static void main(String[] args)\n\t{\n\t\t Scanner sc=new Scanner(System.in);\n\t\t int i=sc.nextInt();\n\t\t int j=sc.nextInt();\n\t\t int min=9999;\n\t\t int arr[]=new int[j];\n\t\t List<Integer> li1=new ArrayList<Integer>();\n\t\t int flag=0;\n\t\t if(j==0)\n\t\t {\n\t\t\t System.out.println(i);\n\t\t\t return;\n\t\t }\n\t\t for(int k=0;k<j;k++)\n\t\t {\n\t\t\t arr[k]=sc.nextInt();\n\t\t\t li1.add(arr[k]);\n\t\t }\n\t\t if(!li1.contains(i))\n\t\t {\n\t\t\t System.out.println(i);\n\t\t\t return;\n\t\t }\n\t\t\n\t\t for(int k=0;k<=j;k++)\n\t\t {\n\t\t\tif((li1.contains(i+k))&&(li1.contains(i-k)))\n\t\t\t { \n\t\t\t\t continue;\n\t\t\t }\n \n\t\t\t if(!li1.contains(i-k))\n\t\t\t {\n\t\t\t\t flag=1;\n\t\t\t\t\n\t\t\t\t System.out.println(i-k);\n break;\n\t\t\t\t \n\t\t\t }\n\t\t\t if(!li1.contains(i+k))\n\t\t\t {\n\t\t\t\t flag=1;\n\t\t\t\t System.out.println(i+k);\n break;\n\t\t\t\t \n\t\t\t }\n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t \n\t\t }\n\t\t \n\t\t \n\t}\n\n}", "public class Main{\n\tpublic static void main(String[] args)\n\t{\n\t\t Scanner sc=new Scanner(System.in);\n\t\t int i=sc.nextInt();\n\t\t int j=sc.nextInt();\n\t\t int min=9999;\n\t\t int arr[]=new int[j];\n\t\t List<Integer> li1=new ArrayList<Integer>();\n\t\t int flag=0;\n\t\t if(j==0)\n\t\t {\n\t\t\t System.out.println(i);\n\t\t\t return;\n\t\t }\n\t\t for(int k=0;k<j;k++)\n\t\t {\n\t\t\t arr[k]=sc.nextInt();\n\t\t\t li1.add(arr[k]);\n\t\t }\n\t\t if(!li1.contains(i))\n\t\t {\n\t\t\t System.out.println(i);\n\t\t\t return;\n\t\t }\n\t\t\n\t\t for(int k=0;k<=j;k++)\n\t\t {\n\t\t\tif((li1.contains(i+k))&&(li1.contains(i-k)))\n\t\t\t { \n\t\t\t\t continue;\n\t\t\t }\n \n\t\t\t if(!li1.contains(i-k))\n\t\t\t {\n\t\t\t\t flag=1;\n\t\t\t\t\n\t\t\t\t System.out.println(i-k);\n break;\n\t\t\t\t \n\t\t\t }\n\t\t\t if(!li1.contains(i+k))\n\t\t\t {\n\t\t\t\t flag=1;\n\t\t\t\t System.out.println(i+k);\n break;\n\t\t\t\t \n\t\t\t }\n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t \n\t\t }\n\t\t \n\t\t \n\t}\n\n}", "Main" ]
import java.util.*; public class Main{ public static void main(String[] args) { Scanner sc=new Scanner(System.in); int i=sc.nextInt(); int j=sc.nextInt(); int min=9999; int arr[]=new int[j]; List<Integer> li1=new ArrayList<Integer>(); int flag=0; if(j==0) { System.out.println(i); return; } for(int k=0;k<j;k++) { arr[k]=sc.nextInt(); li1.add(arr[k]); } if(!li1.contains(i)) { System.out.println(i); return; } for(int k=0;k<=j;k++) { if((li1.contains(i+k))&&(li1.contains(i-k))) { continue; } if(!li1.contains(i-k)) { flag=1; System.out.println(i-k); break; } if(!li1.contains(i+k)) { flag=1; System.out.println(i+k); break; } } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 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, 41, 13, 4, 18, 13, 4, 18, 13, 13, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 4, 18, 13, 13, 2, 13, 13, 30, 0, 13, 17, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 3, 30, 0, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 4, 18, 13, 13, 2, 13, 13, 30, 0, 13, 17, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 3, 30, 0, 13, 2, 13, 17, 0, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 162, 5 ], [ 162, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 8, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 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 ], [ 43, 46 ], [ 8, 47 ], [ 47, 48 ], [ 47, 49 ], [ 8, 50 ], [ 50, 51 ], [ 50, 52 ], [ 8, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 53, 58 ], [ 58, 59 ], [ 58, 60 ], [ 53, 61 ], [ 61, 62 ], [ 62, 63 ], [ 53, 64 ], [ 65, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 71, 72 ], [ 71, 73 ], [ 66, 74 ], [ 74, 75 ], [ 75, 76 ], [ 66, 77 ], [ 78, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 81, 84 ], [ 80, 85 ], [ 85, 86 ], [ 85, 87 ], [ 79, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 65, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 92, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 97, 102 ], [ 102, 103 ], [ 102, 104 ], [ 96, 105 ], [ 92, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 106, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 110, 115 ], [ 115, 116 ], [ 115, 117 ], [ 110, 118 ], [ 118, 119 ], [ 119, 120 ], [ 110, 121 ], [ 122, 122 ], [ 122, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 126, 127 ], [ 125, 128 ], [ 124, 129 ], [ 129, 130 ], [ 129, 131 ], [ 123, 132 ], [ 132, 133 ], [ 133, 134 ], [ 133, 135 ], [ 106, 136 ], [ 136, 137 ], [ 137, 138 ], [ 137, 139 ], [ 136, 140 ], [ 140, 141 ], [ 141, 142 ], [ 142, 143 ], [ 143, 144 ], [ 143, 145 ], [ 141, 146 ], [ 146, 147 ], [ 146, 148 ], [ 140, 149 ], [ 136, 150 ], [ 150, 151 ], [ 151, 152 ], [ 151, 153 ], [ 153, 154 ], [ 153, 155 ], [ 150, 156 ], [ 156, 157 ], [ 156, 158 ], [ 6, 159 ], [ 159, 160 ], [ 0, 161 ], [ 161, 162 ], [ 161, 163 ] ]
[ "import java.util.*;\n \npublic class Main {\n public static void main(String[] args ) {\n Scanner sc = new Scanner(System.in);\n ArrayList<Integer> forbidden = new ArrayList<Integer>();\n int X = sc.nextInt();\n int f = sc.nextInt();\n for (int i=0;i<f;i++) {\n int j = sc.nextInt();\n forbidden.add(j);\n }\n \n int i = 0;\n int tf = 1;\n\t\n for (int h=0; h<100; h++) {\n for (int j=0;j<f;j++) {\n if (forbidden.get(j) == X-i) {\n tf = 0;\n }\n } if (tf == 1) {\n System.out.println(X-i);\n break;\n } else {\n tf = 1;\n for (int k=0;k<f;k++) {\n if (forbidden.get(k) == X+i) {\n tf = 0;\n }\n } if (tf == 1) {\n System.out.println(X+i);\n break;\n } else {\n i = i+1;\n tf = 1;\n }\n }\n }\n \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 ArrayList<Integer> forbidden = new ArrayList<Integer>();\n int X = sc.nextInt();\n int f = sc.nextInt();\n for (int i=0;i<f;i++) {\n int j = sc.nextInt();\n forbidden.add(j);\n }\n \n int i = 0;\n int tf = 1;\n\t\n for (int h=0; h<100; h++) {\n for (int j=0;j<f;j++) {\n if (forbidden.get(j) == X-i) {\n tf = 0;\n }\n } if (tf == 1) {\n System.out.println(X-i);\n break;\n } else {\n tf = 1;\n for (int k=0;k<f;k++) {\n if (forbidden.get(k) == X+i) {\n tf = 0;\n }\n } if (tf == 1) {\n System.out.println(X+i);\n break;\n } else {\n i = i+1;\n tf = 1;\n }\n }\n }\n \n }\n}", "Main", "public static void main(String[] args ) {\n Scanner sc = new Scanner(System.in);\n ArrayList<Integer> forbidden = new ArrayList<Integer>();\n int X = sc.nextInt();\n int f = sc.nextInt();\n for (int i=0;i<f;i++) {\n int j = sc.nextInt();\n forbidden.add(j);\n }\n \n int i = 0;\n int tf = 1;\n\t\n for (int h=0; h<100; h++) {\n for (int j=0;j<f;j++) {\n if (forbidden.get(j) == X-i) {\n tf = 0;\n }\n } if (tf == 1) {\n System.out.println(X-i);\n break;\n } else {\n tf = 1;\n for (int k=0;k<f;k++) {\n if (forbidden.get(k) == X+i) {\n tf = 0;\n }\n } if (tf == 1) {\n System.out.println(X+i);\n break;\n } else {\n i = i+1;\n tf = 1;\n }\n }\n }\n \n }", "main", "{\n Scanner sc = new Scanner(System.in);\n ArrayList<Integer> forbidden = new ArrayList<Integer>();\n int X = sc.nextInt();\n int f = sc.nextInt();\n for (int i=0;i<f;i++) {\n int j = sc.nextInt();\n forbidden.add(j);\n }\n \n int i = 0;\n int tf = 1;\n\t\n for (int h=0; h<100; h++) {\n for (int j=0;j<f;j++) {\n if (forbidden.get(j) == X-i) {\n tf = 0;\n }\n } if (tf == 1) {\n System.out.println(X-i);\n break;\n } else {\n tf = 1;\n for (int k=0;k<f;k++) {\n if (forbidden.get(k) == X+i) {\n tf = 0;\n }\n } if (tf == 1) {\n System.out.println(X+i);\n break;\n } else {\n i = i+1;\n tf = 1;\n }\n }\n }\n \n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "ArrayList<Integer> forbidden = new ArrayList<Integer>();", "forbidden", "new ArrayList<Integer>()", "int X = sc.nextInt();", "X", "sc.nextInt()", "sc.nextInt", "sc", "int f = sc.nextInt();", "f", "sc.nextInt()", "sc.nextInt", "sc", "for (int i=0;i<f;i++) {\n int j = sc.nextInt();\n forbidden.add(j);\n }", "int i=0;", "int i=0;", "i", "0", "i<f", "i", "f", "i++", "i++", "i", "{\n int j = sc.nextInt();\n forbidden.add(j);\n }", "{\n int j = sc.nextInt();\n forbidden.add(j);\n }", "int j = sc.nextInt();", "j", "sc.nextInt()", "sc.nextInt", "sc", "forbidden.add(j)", "forbidden.add", "forbidden", "j", "int i = 0;", "i", "0", "int tf = 1;", "tf", "1", "for (int h=0; h<100; h++) {\n for (int j=0;j<f;j++) {\n if (forbidden.get(j) == X-i) {\n tf = 0;\n }\n } if (tf == 1) {\n System.out.println(X-i);\n break;\n } else {\n tf = 1;\n for (int k=0;k<f;k++) {\n if (forbidden.get(k) == X+i) {\n tf = 0;\n }\n } if (tf == 1) {\n System.out.println(X+i);\n break;\n } else {\n i = i+1;\n tf = 1;\n }\n }\n }", "int h=0;", "int h=0;", "h", "0", "h<100", "h", "100", "h++", "h++", "h", "{\n for (int j=0;j<f;j++) {\n if (forbidden.get(j) == X-i) {\n tf = 0;\n }\n } if (tf == 1) {\n System.out.println(X-i);\n break;\n } else {\n tf = 1;\n for (int k=0;k<f;k++) {\n if (forbidden.get(k) == X+i) {\n tf = 0;\n }\n } if (tf == 1) {\n System.out.println(X+i);\n break;\n } else {\n i = i+1;\n tf = 1;\n }\n }\n }", "{\n for (int j=0;j<f;j++) {\n if (forbidden.get(j) == X-i) {\n tf = 0;\n }\n } if (tf == 1) {\n System.out.println(X-i);\n break;\n } else {\n tf = 1;\n for (int k=0;k<f;k++) {\n if (forbidden.get(k) == X+i) {\n tf = 0;\n }\n } if (tf == 1) {\n System.out.println(X+i);\n break;\n } else {\n i = i+1;\n tf = 1;\n }\n }\n }", "for (int j=0;j<f;j++) {\n if (forbidden.get(j) == X-i) {\n tf = 0;\n }\n }", "int j=0;", "int j=0;", "j", "0", "j<f", "j", "f", "j++", "j++", "j", "{\n if (forbidden.get(j) == X-i) {\n tf = 0;\n }\n }", "{\n if (forbidden.get(j) == X-i) {\n tf = 0;\n }\n }", "if (forbidden.get(j) == X-i) {\n tf = 0;\n }", "forbidden.get(j) == X-i", "forbidden.get(j)", "forbidden.get", "forbidden", "j", "X-i", "X", "i", "{\n tf = 0;\n }", "tf = 0", "tf", "0", "if (tf == 1) {\n System.out.println(X-i);\n break;\n } else {\n tf = 1;\n for (int k=0;k<f;k++) {\n if (forbidden.get(k) == X+i) {\n tf = 0;\n }\n } if (tf == 1) {\n System.out.println(X+i);\n break;\n } else {\n i = i+1;\n tf = 1;\n }\n }", "tf == 1", "tf", "1", "{\n System.out.println(X-i);\n break;\n }", "System.out.println(X-i)", "System.out.println", "System.out", "System", "System.out", "X-i", "X", "i", "break;", "{\n tf = 1;\n for (int k=0;k<f;k++) {\n if (forbidden.get(k) == X+i) {\n tf = 0;\n }\n } if (tf == 1) {\n System.out.println(X+i);\n break;\n } else {\n i = i+1;\n tf = 1;\n }\n }", "tf = 1", "tf", "1", "for (int k=0;k<f;k++) {\n if (forbidden.get(k) == X+i) {\n tf = 0;\n }\n }", "int k=0;", "int k=0;", "k", "0", "k<f", "k", "f", "k++", "k++", "k", "{\n if (forbidden.get(k) == X+i) {\n tf = 0;\n }\n }", "{\n if (forbidden.get(k) == X+i) {\n tf = 0;\n }\n }", "if (forbidden.get(k) == X+i) {\n tf = 0;\n }", "forbidden.get(k) == X+i", "forbidden.get(k)", "forbidden.get", "forbidden", "k", "X+i", "X", "i", "{\n tf = 0;\n }", "tf = 0", "tf", "0", "if (tf == 1) {\n System.out.println(X+i);\n break;\n } else {\n i = i+1;\n tf = 1;\n }", "tf == 1", "tf", "1", "{\n System.out.println(X+i);\n break;\n }", "System.out.println(X+i)", "System.out.println", "System.out", "System", "System.out", "X+i", "X", "i", "break;", "{\n i = i+1;\n tf = 1;\n }", "i = i+1", "i", "i+1", "i", "1", "tf = 1", "tf", "1", "String[] args", "args", "public class Main {\n public static void main(String[] args ) {\n Scanner sc = new Scanner(System.in);\n ArrayList<Integer> forbidden = new ArrayList<Integer>();\n int X = sc.nextInt();\n int f = sc.nextInt();\n for (int i=0;i<f;i++) {\n int j = sc.nextInt();\n forbidden.add(j);\n }\n \n int i = 0;\n int tf = 1;\n\t\n for (int h=0; h<100; h++) {\n for (int j=0;j<f;j++) {\n if (forbidden.get(j) == X-i) {\n tf = 0;\n }\n } if (tf == 1) {\n System.out.println(X-i);\n break;\n } else {\n tf = 1;\n for (int k=0;k<f;k++) {\n if (forbidden.get(k) == X+i) {\n tf = 0;\n }\n } if (tf == 1) {\n System.out.println(X+i);\n break;\n } else {\n i = i+1;\n tf = 1;\n }\n }\n }\n \n }\n}", "public class Main {\n public static void main(String[] args ) {\n Scanner sc = new Scanner(System.in);\n ArrayList<Integer> forbidden = new ArrayList<Integer>();\n int X = sc.nextInt();\n int f = sc.nextInt();\n for (int i=0;i<f;i++) {\n int j = sc.nextInt();\n forbidden.add(j);\n }\n \n int i = 0;\n int tf = 1;\n\t\n for (int h=0; h<100; h++) {\n for (int j=0;j<f;j++) {\n if (forbidden.get(j) == X-i) {\n tf = 0;\n }\n } if (tf == 1) {\n System.out.println(X-i);\n break;\n } else {\n tf = 1;\n for (int k=0;k<f;k++) {\n if (forbidden.get(k) == X+i) {\n tf = 0;\n }\n } if (tf == 1) {\n System.out.println(X+i);\n break;\n } else {\n i = i+1;\n tf = 1;\n }\n }\n }\n \n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args ) { Scanner sc = new Scanner(System.in); ArrayList<Integer> forbidden = new ArrayList<Integer>(); int X = sc.nextInt(); int f = sc.nextInt(); for (int i=0;i<f;i++) { int j = sc.nextInt(); forbidden.add(j); } int i = 0; int tf = 1; for (int h=0; h<100; h++) { for (int j=0;j<f;j++) { if (forbidden.get(j) == X-i) { tf = 0; } } if (tf == 1) { System.out.println(X-i); break; } else { tf = 1; for (int k=0;k<f;k++) { if (forbidden.get(k) == X+i) { tf = 0; } } if (tf == 1) { System.out.println(X+i); break; } else { i = i+1; tf = 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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 40, 4, 18, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 3, 14, 40, 4, 18, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 3, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 99, 8 ], [ 99, 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 ], [ 42, 43 ], [ 41, 44 ], [ 44, 45 ], [ 45, 46 ], [ 11, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 47, 52 ], [ 52, 53 ], [ 52, 54 ], [ 47, 55 ], [ 55, 56 ], [ 56, 57 ], [ 47, 58 ], [ 59, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 62, 65 ], [ 65, 66 ], [ 65, 67 ], [ 60, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 69, 74 ], [ 74, 75 ], [ 74, 76 ], [ 68, 77 ], [ 60, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 80, 83 ], [ 83, 84 ], [ 83, 85 ], [ 78, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 87, 92 ], [ 92, 93 ], [ 92, 94 ], [ 86, 95 ], [ 9, 96 ], [ 96, 97 ], [ 0, 98 ], [ 98, 99 ], [ 98, 100 ] ]
[ "import java.util.ArrayList;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc=new Scanner(System.in);\n\n\t\tint x=sc.nextInt();\t\t//整数x\n\t\tint n=sc.nextInt();\t\t//数字列の長さ\n\n\t\tArrayList<Integer>array=new ArrayList<>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tarray.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tfor(int i=0;i<100;i++) {\n\t\t\tif(!array.contains(x-i)) {\n\t\t\t\tSystem.out.println(x-i);\n\t\t\t\tbreak;\n\t\t\t}else if(!array.contains(x+i)) {\n\t\t\t\tSystem.out.println(x+i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\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\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc=new Scanner(System.in);\n\n\t\tint x=sc.nextInt();\t\t//整数x\n\t\tint n=sc.nextInt();\t\t//数字列の長さ\n\n\t\tArrayList<Integer>array=new ArrayList<>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tarray.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tfor(int i=0;i<100;i++) {\n\t\t\tif(!array.contains(x-i)) {\n\t\t\t\tSystem.out.println(x-i);\n\t\t\t\tbreak;\n\t\t\t}else if(!array.contains(x+i)) {\n\t\t\t\tSystem.out.println(x+i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n }\n}", "Main", "public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc=new Scanner(System.in);\n\n\t\tint x=sc.nextInt();\t\t//整数x\n\t\tint n=sc.nextInt();\t\t//数字列の長さ\n\n\t\tArrayList<Integer>array=new ArrayList<>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tarray.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tfor(int i=0;i<100;i++) {\n\t\t\tif(!array.contains(x-i)) {\n\t\t\t\tSystem.out.println(x-i);\n\t\t\t\tbreak;\n\t\t\t}else if(!array.contains(x+i)) {\n\t\t\t\tSystem.out.println(x+i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n }", "main", "{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc=new Scanner(System.in);\n\n\t\tint x=sc.nextInt();\t\t//整数x\n\t\tint n=sc.nextInt();\t\t//数字列の長さ\n\n\t\tArrayList<Integer>array=new ArrayList<>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tarray.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tfor(int i=0;i<100;i++) {\n\t\t\tif(!array.contains(x-i)) {\n\t\t\t\tSystem.out.println(x-i);\n\t\t\t\tbreak;\n\t\t\t}else if(!array.contains(x+i)) {\n\t\t\t\tSystem.out.println(x+i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n }", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x=sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int n=sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "ArrayList<Integer>array=new ArrayList<>();", "array", "new ArrayList<>()", "for(int i=0;i<n;i++) {\n\t\t\tarray.add(sc.nextInt());\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t\t\tarray.add(sc.nextInt());\n\t\t}", "{\n\t\t\tarray.add(sc.nextInt());\n\t\t}", "array.add(sc.nextInt())", "array.add", "array", "sc.nextInt()", "sc.nextInt", "sc", "for(int i=0;i<100;i++) {\n\t\t\tif(!array.contains(x-i)) {\n\t\t\t\tSystem.out.println(x-i);\n\t\t\t\tbreak;\n\t\t\t}else if(!array.contains(x+i)) {\n\t\t\t\tSystem.out.println(x+i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<100", "i", "100", "i++", "i++", "i", "{\n\t\t\tif(!array.contains(x-i)) {\n\t\t\t\tSystem.out.println(x-i);\n\t\t\t\tbreak;\n\t\t\t}else if(!array.contains(x+i)) {\n\t\t\t\tSystem.out.println(x+i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}", "{\n\t\t\tif(!array.contains(x-i)) {\n\t\t\t\tSystem.out.println(x-i);\n\t\t\t\tbreak;\n\t\t\t}else if(!array.contains(x+i)) {\n\t\t\t\tSystem.out.println(x+i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}", "if(!array.contains(x-i)) {\n\t\t\t\tSystem.out.println(x-i);\n\t\t\t\tbreak;\n\t\t\t}else if(!array.contains(x+i)) {\n\t\t\t\tSystem.out.println(x+i);\n\t\t\t\tbreak;\n\t\t\t}", "!array.contains(x-i)", "array.contains(x-i)", "array.contains", "array", "x-i", "x", "i", "{\n\t\t\t\tSystem.out.println(x-i);\n\t\t\t\tbreak;\n\t\t\t}", "System.out.println(x-i)", "System.out.println", "System.out", "System", "System.out", "x-i", "x", "i", "break;", "if(!array.contains(x+i)) {\n\t\t\t\tSystem.out.println(x+i);\n\t\t\t\tbreak;\n\t\t\t}", "!array.contains(x+i)", "array.contains(x+i)", "array.contains", "array", "x+i", "x", "i", "{\n\t\t\t\tSystem.out.println(x+i);\n\t\t\t\tbreak;\n\t\t\t}", "System.out.println(x+i)", "System.out.println", "System.out", "System", "System.out", "x+i", "x", "i", "break;", "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\n\t\tint x=sc.nextInt();\t\t//整数x\n\t\tint n=sc.nextInt();\t\t//数字列の長さ\n\n\t\tArrayList<Integer>array=new ArrayList<>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tarray.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tfor(int i=0;i<100;i++) {\n\t\t\tif(!array.contains(x-i)) {\n\t\t\t\tSystem.out.println(x-i);\n\t\t\t\tbreak;\n\t\t\t}else if(!array.contains(x+i)) {\n\t\t\t\tSystem.out.println(x+i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\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\n\t\tint x=sc.nextInt();\t\t//整数x\n\t\tint n=sc.nextInt();\t\t//数字列の長さ\n\n\t\tArrayList<Integer>array=new ArrayList<>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tarray.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tfor(int i=0;i<100;i++) {\n\t\t\tif(!array.contains(x-i)) {\n\t\t\t\tSystem.out.println(x-i);\n\t\t\t\tbreak;\n\t\t\t}else if(!array.contains(x+i)) {\n\t\t\t\tSystem.out.println(x+i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n }\n}", "Main" ]
import java.util.ArrayList; import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner sc=new Scanner(System.in); int x=sc.nextInt(); //整数x int n=sc.nextInt(); //数字列の長さ ArrayList<Integer>array=new ArrayList<>(); for(int i=0;i<n;i++) { array.add(sc.nextInt()); } for(int i=0;i<100;i++) { if(!array.contains(x-i)) { System.out.println(x-i); break; }else if(!array.contains(x+i)) { System.out.println(x+i); break; } } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 29, 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, 17, 1, 40, 13, 30, 30, 14, 40, 4, 18, 4, 18, 13, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 29, 14, 40, 4, 18, 4, 18, 13, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 29, 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 ], [ 23, 25 ], [ 22, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 29, 31 ], [ 27, 32 ], [ 26, 33 ], [ 8, 34 ], [ 34, 35 ], [ 34, 36 ], [ 8, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 38, 43 ], [ 43, 44 ], [ 43, 45 ], [ 38, 46 ], [ 46, 47 ], [ 47, 48 ], [ 38, 49 ], [ 50, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 51, 55 ], [ 55, 56 ], [ 56, 57 ], [ 8, 58 ], [ 58, 59 ], [ 58, 60 ], [ 8, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 61, 66 ], [ 66, 67 ], [ 66, 68 ], [ 61, 69 ], [ 69, 70 ], [ 70, 71 ], [ 61, 72 ], [ 73, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 78, 81 ], [ 76, 82 ], [ 82, 83 ], [ 82, 84 ], [ 74, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 86, 91 ], [ 91, 92 ], [ 91, 93 ], [ 85, 94 ], [ 73, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 99, 102 ], [ 97, 103 ], [ 103, 104 ], [ 103, 105 ], [ 95, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 107, 112 ], [ 112, 113 ], [ 112, 114 ], [ 106, 115 ], [ 6, 116 ], [ 116, 117 ] ]
[ "import java.util.*;\n\nclass Main{\n\tpublic static void main(String[] args){\n\t\tScanner scn = new Scanner(System.in);\n \tint x = scn.nextInt();\n \tint n = scn.nextInt();\n \tif(n == 0){\n System.out.println(x);\n return;\n }\n \t\n \tInteger[] nums = new Integer[n];\n \tfor(int i = 0; i < n; i++){\n nums[i] = scn.nextInt();\n }\n \n \tint num = x; \t\n \tfor(int i = 0; i < 51;i++){\n\t \tif(!Arrays.asList(nums).contains(x-i)){\n System.out.println(x - i);\n return;\n \t }\n \tif(!Arrays.asList(nums).contains(x+i)){\n System.out.println(x + i);\n return;\n }\n }\n\t}\n}\n", "import java.util.*;", "util.*", "java", "class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scn = new Scanner(System.in);\n \tint x = scn.nextInt();\n \tint n = scn.nextInt();\n \tif(n == 0){\n System.out.println(x);\n return;\n }\n \t\n \tInteger[] nums = new Integer[n];\n \tfor(int i = 0; i < n; i++){\n nums[i] = scn.nextInt();\n }\n \n \tint num = x; \t\n \tfor(int i = 0; i < 51;i++){\n\t \tif(!Arrays.asList(nums).contains(x-i)){\n System.out.println(x - i);\n return;\n \t }\n \tif(!Arrays.asList(nums).contains(x+i)){\n System.out.println(x + i);\n return;\n }\n }\n\t}\n}", "Main", "public static void main(String[] args){\n\t\tScanner scn = new Scanner(System.in);\n \tint x = scn.nextInt();\n \tint n = scn.nextInt();\n \tif(n == 0){\n System.out.println(x);\n return;\n }\n \t\n \tInteger[] nums = new Integer[n];\n \tfor(int i = 0; i < n; i++){\n nums[i] = scn.nextInt();\n }\n \n \tint num = x; \t\n \tfor(int i = 0; i < 51;i++){\n\t \tif(!Arrays.asList(nums).contains(x-i)){\n System.out.println(x - i);\n return;\n \t }\n \tif(!Arrays.asList(nums).contains(x+i)){\n System.out.println(x + i);\n return;\n }\n }\n\t}", "main", "{\n\t\tScanner scn = new Scanner(System.in);\n \tint x = scn.nextInt();\n \tint n = scn.nextInt();\n \tif(n == 0){\n System.out.println(x);\n return;\n }\n \t\n \tInteger[] nums = new Integer[n];\n \tfor(int i = 0; i < n; i++){\n nums[i] = scn.nextInt();\n }\n \n \tint num = x; \t\n \tfor(int i = 0; i < 51;i++){\n\t \tif(!Arrays.asList(nums).contains(x-i)){\n System.out.println(x - i);\n return;\n \t }\n \tif(!Arrays.asList(nums).contains(x+i)){\n System.out.println(x + i);\n return;\n }\n }\n\t}", "Scanner scn = new Scanner(System.in);", "scn", "new Scanner(System.in)", "int x = scn.nextInt();", "x", "scn.nextInt()", "scn.nextInt", "scn", "int n = scn.nextInt();", "n", "scn.nextInt()", "scn.nextInt", "scn", "if(n == 0){\n System.out.println(x);\n return;\n }", "n == 0", "n", "0", "{\n System.out.println(x);\n return;\n }", "System.out.println(x)", "System.out.println", "System.out", "System", "System.out", "x", "return;", "Integer[] nums = new Integer[n];", "nums", "new Integer[n]", "n", "for(int i = 0; i < n; i++){\n nums[i] = scn.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n nums[i] = scn.nextInt();\n }", "{\n nums[i] = scn.nextInt();\n }", "nums[i] = scn.nextInt()", "nums[i]", "nums", "i", "scn.nextInt()", "scn.nextInt", "scn", "int num = x;", "num", "x", "for(int i = 0; i < 51;i++){\n\t \tif(!Arrays.asList(nums).contains(x-i)){\n System.out.println(x - i);\n return;\n \t }\n \tif(!Arrays.asList(nums).contains(x+i)){\n System.out.println(x + i);\n return;\n }\n }", "int i = 0;", "int i = 0;", "i", "0", "i < 51", "i", "51", "i++", "i++", "i", "{\n\t \tif(!Arrays.asList(nums).contains(x-i)){\n System.out.println(x - i);\n return;\n \t }\n \tif(!Arrays.asList(nums).contains(x+i)){\n System.out.println(x + i);\n return;\n }\n }", "{\n\t \tif(!Arrays.asList(nums).contains(x-i)){\n System.out.println(x - i);\n return;\n \t }\n \tif(!Arrays.asList(nums).contains(x+i)){\n System.out.println(x + i);\n return;\n }\n }", "if(!Arrays.asList(nums).contains(x-i)){\n System.out.println(x - i);\n return;\n \t }", "!Arrays.asList(nums).contains(x-i)", "Arrays.asList(nums).contains(x-i)", "Arrays.asList(nums).contains", "Arrays.asList(nums)", "Arrays.asList", "Arrays", "nums", "x-i", "x", "i", "{\n System.out.println(x - i);\n return;\n \t }", "System.out.println(x - i)", "System.out.println", "System.out", "System", "System.out", "x - i", "x", "i", "return;", "if(!Arrays.asList(nums).contains(x+i)){\n System.out.println(x + i);\n return;\n }", "!Arrays.asList(nums).contains(x+i)", "Arrays.asList(nums).contains(x+i)", "Arrays.asList(nums).contains", "Arrays.asList(nums)", "Arrays.asList", "Arrays", "nums", "x+i", "x", "i", "{\n System.out.println(x + i);\n return;\n }", "System.out.println(x + i)", "System.out.println", "System.out", "System", "System.out", "x + i", "x", "i", "return;", "String[] args", "args" ]
import java.util.*; class Main{ public static void main(String[] args){ Scanner scn = new Scanner(System.in); int x = scn.nextInt(); int n = scn.nextInt(); if(n == 0){ System.out.println(x); return; } Integer[] nums = new Integer[n]; for(int i = 0; i < n; i++){ nums[i] = scn.nextInt(); } int num = x; for(int i = 0; i < 51;i++){ if(!Arrays.asList(nums).contains(x-i)){ System.out.println(x - i); return; } if(!Arrays.asList(nums).contains(x+i)){ System.out.println(x + i); return; } } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 41, 13, 17, 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, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 18, 13, 13, 30, 40, 13, 0, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 40, 17, 0, 13, 13, 0, 13, 40, 17, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 113, 5 ], [ 113, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 8, 15 ], [ 15, 16 ], [ 15, 17 ], [ 8, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 8, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 8, 28 ], [ 28, 29 ], [ 28, 30 ], [ 8, 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 ], [ 8, 52 ], [ 52, 53 ], [ 53, 54 ], [ 8, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 55, 60 ], [ 60, 61 ], [ 60, 62 ], [ 55, 63 ], [ 63, 64 ], [ 64, 65 ], [ 55, 66 ], [ 67, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 71, 73 ], [ 68, 74 ], [ 74, 75 ], [ 75, 76 ], [ 74, 77 ], [ 77, 78 ], [ 77, 79 ], [ 74, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 80, 85 ], [ 85, 86 ], [ 85, 87 ], [ 80, 88 ], [ 88, 89 ], [ 89, 90 ], [ 80, 91 ], [ 92, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 74, 97 ], [ 97, 98 ], [ 97, 99 ], [ 74, 100 ], [ 100, 101 ], [ 100, 102 ], [ 102, 103 ], [ 8, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 104, 109 ], [ 6, 110 ], [ 110, 111 ], [ 0, 112 ], [ 112, 113 ], [ 112, 114 ] ]
[ "import java.util.Scanner;\n\npublic class Main\n{\n\n\tpublic static void main(String args[])\n\t{\n\n\t\tint count = 0;\n\t\tint temp = 0;\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\n\t\tint [] p = new int[n];\n\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tif(x == p[i])\n\t\t\t{\n\n\t\t\t\tcount++;\n\n\t\t\t\ttemp = count;\n\n\t\t\t\tfor(int j = 0; j < count; j++)\n\t\t\t\t{\n\t\t\t\t\ttemp *= -1;\n\t\t\t\t}\n\n\t\t\t\tx += temp;\n\n\t\t\t\ti = -1;\n\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(x);\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main\n{\n\n\tpublic static void main(String args[])\n\t{\n\n\t\tint count = 0;\n\t\tint temp = 0;\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\n\t\tint [] p = new int[n];\n\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tif(x == p[i])\n\t\t\t{\n\n\t\t\t\tcount++;\n\n\t\t\t\ttemp = count;\n\n\t\t\t\tfor(int j = 0; j < count; j++)\n\t\t\t\t{\n\t\t\t\t\ttemp *= -1;\n\t\t\t\t}\n\n\t\t\t\tx += temp;\n\n\t\t\t\ti = -1;\n\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(x);\n\t}\n\n}", "Main", "public static void main(String args[])\n\t{\n\n\t\tint count = 0;\n\t\tint temp = 0;\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\n\t\tint [] p = new int[n];\n\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tif(x == p[i])\n\t\t\t{\n\n\t\t\t\tcount++;\n\n\t\t\t\ttemp = count;\n\n\t\t\t\tfor(int j = 0; j < count; j++)\n\t\t\t\t{\n\t\t\t\t\ttemp *= -1;\n\t\t\t\t}\n\n\t\t\t\tx += temp;\n\n\t\t\t\ti = -1;\n\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(x);\n\t}", "main", "{\n\n\t\tint count = 0;\n\t\tint temp = 0;\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\n\t\tint [] p = new int[n];\n\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tif(x == p[i])\n\t\t\t{\n\n\t\t\t\tcount++;\n\n\t\t\t\ttemp = count;\n\n\t\t\t\tfor(int j = 0; j < count; j++)\n\t\t\t\t{\n\t\t\t\t\ttemp *= -1;\n\t\t\t\t}\n\n\t\t\t\tx += temp;\n\n\t\t\t\ti = -1;\n\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(x);\n\t}", "int count = 0;", "count", "0", "int temp = 0;", "temp", "0", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int [] p = new int[n];", "p", "new int[n]", "n", "for(int i = 0; i < n; i++)\n\t\t{\n\t\t\tp[i] = sc.nextInt();\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tp[i] = sc.nextInt();\n\t\t}", "{\n\t\t\tp[i] = sc.nextInt();\n\t\t}", "p[i] = sc.nextInt()", "p[i]", "p", "i", "sc.nextInt()", "sc.nextInt", "sc", "sc.close()", "sc.close", "sc", "for(int i = 0; i < n; i++)\n\t\t{\n\t\t\tif(x == p[i])\n\t\t\t{\n\n\t\t\t\tcount++;\n\n\t\t\t\ttemp = count;\n\n\t\t\t\tfor(int j = 0; j < count; j++)\n\t\t\t\t{\n\t\t\t\t\ttemp *= -1;\n\t\t\t\t}\n\n\t\t\t\tx += temp;\n\n\t\t\t\ti = -1;\n\n\t\t\t}\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tif(x == p[i])\n\t\t\t{\n\n\t\t\t\tcount++;\n\n\t\t\t\ttemp = count;\n\n\t\t\t\tfor(int j = 0; j < count; j++)\n\t\t\t\t{\n\t\t\t\t\ttemp *= -1;\n\t\t\t\t}\n\n\t\t\t\tx += temp;\n\n\t\t\t\ti = -1;\n\n\t\t\t}\n\t\t}", "{\n\t\t\tif(x == p[i])\n\t\t\t{\n\n\t\t\t\tcount++;\n\n\t\t\t\ttemp = count;\n\n\t\t\t\tfor(int j = 0; j < count; j++)\n\t\t\t\t{\n\t\t\t\t\ttemp *= -1;\n\t\t\t\t}\n\n\t\t\t\tx += temp;\n\n\t\t\t\ti = -1;\n\n\t\t\t}\n\t\t}", "if(x == p[i])\n\t\t\t{\n\n\t\t\t\tcount++;\n\n\t\t\t\ttemp = count;\n\n\t\t\t\tfor(int j = 0; j < count; j++)\n\t\t\t\t{\n\t\t\t\t\ttemp *= -1;\n\t\t\t\t}\n\n\t\t\t\tx += temp;\n\n\t\t\t\ti = -1;\n\n\t\t\t}", "x == p[i]", "x", "p[i]", "p", "i", "{\n\n\t\t\t\tcount++;\n\n\t\t\t\ttemp = count;\n\n\t\t\t\tfor(int j = 0; j < count; j++)\n\t\t\t\t{\n\t\t\t\t\ttemp *= -1;\n\t\t\t\t}\n\n\t\t\t\tx += temp;\n\n\t\t\t\ti = -1;\n\n\t\t\t}", "count++", "count", "temp = count", "temp", "count", "for(int j = 0; j < count; j++)\n\t\t\t\t{\n\t\t\t\t\ttemp *= -1;\n\t\t\t\t}", "int j = 0;", "int j = 0;", "j", "0", "j < count", "j", "count", "j++", "j++", "j", "{\n\t\t\t\t\ttemp *= -1;\n\t\t\t\t}", "{\n\t\t\t\t\ttemp *= -1;\n\t\t\t\t}", "temp *= -1", "temp", "-1", "1", "x += temp", "x", "temp", "i = -1", "i", "-1", "1", "System.out.println(x)", "System.out.println", "System.out", "System", "System.out", "x", "String args[]", "args", "public class Main\n{\n\n\tpublic static void main(String args[])\n\t{\n\n\t\tint count = 0;\n\t\tint temp = 0;\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\n\t\tint [] p = new int[n];\n\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tif(x == p[i])\n\t\t\t{\n\n\t\t\t\tcount++;\n\n\t\t\t\ttemp = count;\n\n\t\t\t\tfor(int j = 0; j < count; j++)\n\t\t\t\t{\n\t\t\t\t\ttemp *= -1;\n\t\t\t\t}\n\n\t\t\t\tx += temp;\n\n\t\t\t\ti = -1;\n\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(x);\n\t}\n\n}", "public class Main\n{\n\n\tpublic static void main(String args[])\n\t{\n\n\t\tint count = 0;\n\t\tint temp = 0;\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\n\t\tint [] p = new int[n];\n\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tif(x == p[i])\n\t\t\t{\n\n\t\t\t\tcount++;\n\n\t\t\t\ttemp = count;\n\n\t\t\t\tfor(int j = 0; j < count; j++)\n\t\t\t\t{\n\t\t\t\t\ttemp *= -1;\n\t\t\t\t}\n\n\t\t\t\tx += temp;\n\n\t\t\t\ti = -1;\n\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(x);\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String args[]) { int count = 0; int temp = 0; Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int n = sc.nextInt(); int [] p = new int[n]; for(int i = 0; i < n; i++) { p[i] = sc.nextInt(); } sc.close(); for(int i = 0; i < n; i++) { if(x == p[i]) { count++; temp = count; for(int j = 0; j < count; j++) { temp *= -1; } x += temp; i = -1; } } System.out.println(x); } }
[ 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, 14, 2, 13, 17, 4, 18, 18, 13, 13, 13, 30, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 4, 18, 13, 4, 18, 13, 14, 40, 4, 18, 13, 13, 30, 4, 18, 18, 13, 13, 13, 29, 11, 1, 41, 13, 17, 17, 1, 40, 13, 30, 30, 14, 40, 4, 18, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 29, 14, 40, 4, 18, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 29, 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 ], [ 26, 27 ], [ 26, 28 ], [ 25, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 29, 34 ], [ 25, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 39, 44 ], [ 44, 45 ], [ 44, 46 ], [ 39, 47 ], [ 47, 48 ], [ 48, 49 ], [ 39, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 51, 54 ], [ 54, 55 ], [ 55, 56 ], [ 35, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 59, 62 ], [ 57, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 64, 69 ], [ 63, 70 ], [ 35, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 71, 76 ], [ 71, 77 ], [ 77, 78 ], [ 78, 79 ], [ 71, 80 ], [ 81, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 87, 88 ], [ 87, 89 ], [ 82, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 91, 96 ], [ 96, 97 ], [ 96, 98 ], [ 90, 99 ], [ 81, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 102, 105 ], [ 105, 106 ], [ 105, 107 ], [ 100, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 109, 114 ], [ 114, 115 ], [ 114, 116 ], [ 108, 117 ], [ 9, 118 ], [ 118, 119 ] ]
[ "import java.util.*;\nimport java.lang.*;\nclass Main\n{\n public static void main(String args[])\n {\n Scanner sc=new Scanner(System.in);\n int k=sc.nextInt();\n int n=sc.nextInt();\n if(n==0)\n System.out.println(k);\n else\n {\n HashSet<Integer> s=new HashSet<Integer>();\n for(int i=0;i<n;i++)\n s.add(sc.nextInt());\n if(!s.contains(k))\n {\n System.out.println(k);\n return;\n }\n for(int d=1;true;d++)\n {\n if(!s.contains(k-d))\n {\n System.out.println(k-d);\n return;\n }\n if(!s.contains(k+d))\n {\n System.out.println(k+d);\n return;\n }\n }\n }\n }\n}", "import java.util.*;", "util.*", "java", "import java.lang.*;", "lang.*", "java", "class Main\n{\n public static void main(String args[])\n {\n Scanner sc=new Scanner(System.in);\n int k=sc.nextInt();\n int n=sc.nextInt();\n if(n==0)\n System.out.println(k);\n else\n {\n HashSet<Integer> s=new HashSet<Integer>();\n for(int i=0;i<n;i++)\n s.add(sc.nextInt());\n if(!s.contains(k))\n {\n System.out.println(k);\n return;\n }\n for(int d=1;true;d++)\n {\n if(!s.contains(k-d))\n {\n System.out.println(k-d);\n return;\n }\n if(!s.contains(k+d))\n {\n System.out.println(k+d);\n return;\n }\n }\n }\n }\n}", "Main", "public static void main(String args[])\n {\n Scanner sc=new Scanner(System.in);\n int k=sc.nextInt();\n int n=sc.nextInt();\n if(n==0)\n System.out.println(k);\n else\n {\n HashSet<Integer> s=new HashSet<Integer>();\n for(int i=0;i<n;i++)\n s.add(sc.nextInt());\n if(!s.contains(k))\n {\n System.out.println(k);\n return;\n }\n for(int d=1;true;d++)\n {\n if(!s.contains(k-d))\n {\n System.out.println(k-d);\n return;\n }\n if(!s.contains(k+d))\n {\n System.out.println(k+d);\n return;\n }\n }\n }\n }", "main", "{\n Scanner sc=new Scanner(System.in);\n int k=sc.nextInt();\n int n=sc.nextInt();\n if(n==0)\n System.out.println(k);\n else\n {\n HashSet<Integer> s=new HashSet<Integer>();\n for(int i=0;i<n;i++)\n s.add(sc.nextInt());\n if(!s.contains(k))\n {\n System.out.println(k);\n return;\n }\n for(int d=1;true;d++)\n {\n if(!s.contains(k-d))\n {\n System.out.println(k-d);\n return;\n }\n if(!s.contains(k+d))\n {\n System.out.println(k+d);\n return;\n }\n }\n }\n }", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "int k=sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "int n=sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "if(n==0)\n System.out.println(k);\n else\n {\n HashSet<Integer> s=new HashSet<Integer>();\n for(int i=0;i<n;i++)\n s.add(sc.nextInt());\n if(!s.contains(k))\n {\n System.out.println(k);\n return;\n }\n for(int d=1;true;d++)\n {\n if(!s.contains(k-d))\n {\n System.out.println(k-d);\n return;\n }\n if(!s.contains(k+d))\n {\n System.out.println(k+d);\n return;\n }\n }\n }", "n==0", "n", "0", "System.out.println(k)", "System.out.println", "System.out", "System", "System.out", "k", "{\n HashSet<Integer> s=new HashSet<Integer>();\n for(int i=0;i<n;i++)\n s.add(sc.nextInt());\n if(!s.contains(k))\n {\n System.out.println(k);\n return;\n }\n for(int d=1;true;d++)\n {\n if(!s.contains(k-d))\n {\n System.out.println(k-d);\n return;\n }\n if(!s.contains(k+d))\n {\n System.out.println(k+d);\n return;\n }\n }\n }", "HashSet<Integer> s=new HashSet<Integer>();", "s", "new HashSet<Integer>()", "for(int i=0;i<n;i++)\n s.add(sc.nextInt());", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "s.add(sc.nextInt());", "s.add(sc.nextInt())", "s.add", "s", "sc.nextInt()", "sc.nextInt", "sc", "if(!s.contains(k))\n {\n System.out.println(k);\n return;\n }", "!s.contains(k)", "s.contains(k)", "s.contains", "s", "k", "{\n System.out.println(k);\n return;\n }", "System.out.println(k)", "System.out.println", "System.out", "System", "System.out", "k", "return;", "for(int d=1;true;d++)\n {\n if(!s.contains(k-d))\n {\n System.out.println(k-d);\n return;\n }\n if(!s.contains(k+d))\n {\n System.out.println(k+d);\n return;\n }\n }", "int d=1;", "int d=1;", "d", "1", "true", "d++", "d++", "d", "{\n if(!s.contains(k-d))\n {\n System.out.println(k-d);\n return;\n }\n if(!s.contains(k+d))\n {\n System.out.println(k+d);\n return;\n }\n }", "{\n if(!s.contains(k-d))\n {\n System.out.println(k-d);\n return;\n }\n if(!s.contains(k+d))\n {\n System.out.println(k+d);\n return;\n }\n }", "if(!s.contains(k-d))\n {\n System.out.println(k-d);\n return;\n }", "!s.contains(k-d)", "s.contains(k-d)", "s.contains", "s", "k-d", "k", "d", "{\n System.out.println(k-d);\n return;\n }", "System.out.println(k-d)", "System.out.println", "System.out", "System", "System.out", "k-d", "k", "d", "return;", "if(!s.contains(k+d))\n {\n System.out.println(k+d);\n return;\n }", "!s.contains(k+d)", "s.contains(k+d)", "s.contains", "s", "k+d", "k", "d", "{\n System.out.println(k+d);\n return;\n }", "System.out.println(k+d)", "System.out.println", "System.out", "System", "System.out", "k+d", "k", "d", "return;", "String args[]", "args" ]
import java.util.*; import java.lang.*; class Main { public static void main(String args[]) { Scanner sc=new Scanner(System.in); int k=sc.nextInt(); int n=sc.nextInt(); if(n==0) System.out.println(k); else { HashSet<Integer> s=new HashSet<Integer>(); for(int i=0;i<n;i++) s.add(sc.nextInt()); if(!s.contains(k)) { System.out.println(k); return; } for(int d=1;true;d++) { if(!s.contains(k-d)) { System.out.println(k-d); return; } if(!s.contains(k+d)) { System.out.println(k+d); return; } } } } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 12, 13, 30, 0, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 4, 18, 13, 4, 18, 13, 14, 40, 4, 18, 13, 13, 30, 4, 18, 18, 13, 13, 13, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 0, 13, 13, 14, 4, 18, 13, 13, 30, 0, 13, 2, 13, 17, 14, 4, 18, 13, 13, 30, 0, 13, 13, 30, 4, 18, 18, 13, 13, 13, 4, 18, 13, 17, 30, 4, 18, 18, 13, 13, 13, 4, 18, 13, 17, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 4, 8 ], [ 8, 9 ], [ 8, 10 ], [ 10, 11 ], [ 11, 12 ], [ 11, 13 ], [ 10, 14 ], [ 14, 15 ], [ 14, 16 ], [ 16, 17 ], [ 17, 18 ], [ 10, 19 ], [ 19, 20 ], [ 19, 21 ], [ 21, 22 ], [ 22, 23 ], [ 10, 24 ], [ 24, 25 ], [ 24, 26 ], [ 10, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 29, 31 ], [ 27, 32 ], [ 32, 33 ], [ 32, 34 ], [ 27, 35 ], [ 35, 36 ], [ 36, 37 ], [ 27, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 39, 42 ], [ 42, 43 ], [ 43, 44 ], [ 10, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 47, 50 ], [ 45, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 52, 57 ], [ 51, 58 ], [ 58, 59 ], [ 59, 60 ], [ 58, 61 ], [ 10, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 62, 67 ], [ 67, 68 ], [ 67, 69 ], [ 62, 70 ], [ 70, 71 ], [ 71, 72 ], [ 62, 73 ], [ 74, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 74, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 79, 82 ], [ 78, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 86, 88 ], [ 83, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 90, 93 ], [ 89, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 89, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 99, 104 ], [ 98, 105 ], [ 105, 106 ], [ 106, 107 ], [ 105, 108 ], [ 78, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 110, 115 ], [ 109, 116 ], [ 116, 117 ], [ 117, 118 ], [ 116, 119 ], [ 8, 120 ], [ 120, 121 ] ]
[ "import java.util.*;\n\nclass Main {\n private static Scanner sc;\n\n public static void main(final String[] args) {\n sc = new Scanner(System.in);\n int a = sc.nextInt(),b = sc.nextInt();\n List<Integer> list = new ArrayList<>();\n for (int i = 0; i < b; i++) list.add(sc.nextInt());\n if(!list.contains(a)){\n System.out.println(a);\n System.exit(0); \n } \n for (int i = 1; i <= 100; i++) { \n a -= i;\n if(list.contains(a)){\n a += i*2;\n if(list.contains(a)){\n a -= i;\n }else {\n System.out.println(a);\n System.exit(0);\n }\n }else {\n System.out.println(a);\n System.exit(0);\n }\n \n }\n }\n}\n\n\n\n\n\n", "import java.util.*;", "util.*", "java", "class Main {\n private static Scanner sc;\n\n public static void main(final String[] args) {\n sc = new Scanner(System.in);\n int a = sc.nextInt(),b = sc.nextInt();\n List<Integer> list = new ArrayList<>();\n for (int i = 0; i < b; i++) list.add(sc.nextInt());\n if(!list.contains(a)){\n System.out.println(a);\n System.exit(0); \n } \n for (int i = 1; i <= 100; i++) { \n a -= i;\n if(list.contains(a)){\n a += i*2;\n if(list.contains(a)){\n a -= i;\n }else {\n System.out.println(a);\n System.exit(0);\n }\n }else {\n System.out.println(a);\n System.exit(0);\n }\n \n }\n }\n}", "Main", "private static Scanner sc;", "sc", "public static void main(final String[] args) {\n sc = new Scanner(System.in);\n int a = sc.nextInt(),b = sc.nextInt();\n List<Integer> list = new ArrayList<>();\n for (int i = 0; i < b; i++) list.add(sc.nextInt());\n if(!list.contains(a)){\n System.out.println(a);\n System.exit(0); \n } \n for (int i = 1; i <= 100; i++) { \n a -= i;\n if(list.contains(a)){\n a += i*2;\n if(list.contains(a)){\n a -= i;\n }else {\n System.out.println(a);\n System.exit(0);\n }\n }else {\n System.out.println(a);\n System.exit(0);\n }\n \n }\n }", "main", "{\n sc = new Scanner(System.in);\n int a = sc.nextInt(),b = sc.nextInt();\n List<Integer> list = new ArrayList<>();\n for (int i = 0; i < b; i++) list.add(sc.nextInt());\n if(!list.contains(a)){\n System.out.println(a);\n System.exit(0); \n } \n for (int i = 1; i <= 100; i++) { \n a -= i;\n if(list.contains(a)){\n a += i*2;\n if(list.contains(a)){\n a -= i;\n }else {\n System.out.println(a);\n System.exit(0);\n }\n }else {\n System.out.println(a);\n System.exit(0);\n }\n \n }\n }", "sc = new Scanner(System.in)", "sc", "new Scanner(System.in)", "int a = sc.nextInt()", "a", "sc.nextInt()", "sc.nextInt", "sc", "b = sc.nextInt();", "b", "sc.nextInt()", "sc.nextInt", "sc", "List<Integer> list = new ArrayList<>();", "list", "new ArrayList<>()", "for (int i = 0; i < b; i++) list.add(sc.nextInt());", "int i = 0;", "int i = 0;", "i", "0", "i < b", "i", "b", "i++", "i++", "i", "list.add(sc.nextInt());", "list.add(sc.nextInt())", "list.add", "list", "sc.nextInt()", "sc.nextInt", "sc", "if(!list.contains(a)){\n System.out.println(a);\n System.exit(0); \n }", "!list.contains(a)", "list.contains(a)", "list.contains", "list", "a", "{\n System.out.println(a);\n System.exit(0); \n }", "System.out.println(a)", "System.out.println", "System.out", "System", "System.out", "a", "System.exit(0)", "System.exit", "System", "0", "for (int i = 1; i <= 100; i++) { \n a -= i;\n if(list.contains(a)){\n a += i*2;\n if(list.contains(a)){\n a -= i;\n }else {\n System.out.println(a);\n System.exit(0);\n }\n }else {\n System.out.println(a);\n System.exit(0);\n }\n \n }", "int i = 1;", "int i = 1;", "i", "1", "i <= 100", "i", "100", "i++", "i++", "i", "{ \n a -= i;\n if(list.contains(a)){\n a += i*2;\n if(list.contains(a)){\n a -= i;\n }else {\n System.out.println(a);\n System.exit(0);\n }\n }else {\n System.out.println(a);\n System.exit(0);\n }\n \n }", "{ \n a -= i;\n if(list.contains(a)){\n a += i*2;\n if(list.contains(a)){\n a -= i;\n }else {\n System.out.println(a);\n System.exit(0);\n }\n }else {\n System.out.println(a);\n System.exit(0);\n }\n \n }", "a -= i", "a", "i", "if(list.contains(a)){\n a += i*2;\n if(list.contains(a)){\n a -= i;\n }else {\n System.out.println(a);\n System.exit(0);\n }\n }else {\n System.out.println(a);\n System.exit(0);\n }", "list.contains(a)", "list.contains", "list", "a", "{\n a += i*2;\n if(list.contains(a)){\n a -= i;\n }else {\n System.out.println(a);\n System.exit(0);\n }\n }", "a += i*2", "a", "i*2", "i", "2", "if(list.contains(a)){\n a -= i;\n }else {\n System.out.println(a);\n System.exit(0);\n }", "list.contains(a)", "list.contains", "list", "a", "{\n a -= i;\n }", "a -= i", "a", "i", "{\n System.out.println(a);\n System.exit(0);\n }", "System.out.println(a)", "System.out.println", "System.out", "System", "System.out", "a", "System.exit(0)", "System.exit", "System", "0", "{\n System.out.println(a);\n System.exit(0);\n }", "System.out.println(a)", "System.out.println", "System.out", "System", "System.out", "a", "System.exit(0)", "System.exit", "System", "0", "final String[] args", "args" ]
import java.util.*; class Main { private static Scanner sc; public static void main(final String[] args) { sc = new Scanner(System.in); int a = sc.nextInt(),b = sc.nextInt(); List<Integer> list = new ArrayList<>(); for (int i = 0; i < b; i++) list.add(sc.nextInt()); if(!list.contains(a)){ System.out.println(a); System.exit(0); } for (int i = 1; i <= 100; i++) { a -= i; if(list.contains(a)){ a += i*2; if(list.contains(a)){ a -= i; }else { System.out.println(a); System.exit(0); } }else { System.out.println(a); System.exit(0); } } } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 12, 13, 30, 0, 13, 20, 41, 13, 4, 13, 41, 13, 4, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 13, 41, 13, 17, 41, 13, 13, 42, 17, 30, 0, 13, 2, 4, 18, 13, 40, 17, 13, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 18, 13, 13, 13, 30, 40, 13, 0, 13, 17, 3, 14, 40, 13, 30, 3, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 18, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 144, 5 ], [ 144, 6 ], [ 6, 7 ], [ 144, 8 ], [ 8, 9 ], [ 8, 10 ], [ 10, 11 ], [ 11, 12 ], [ 11, 13 ], [ 10, 14 ], [ 14, 15 ], [ 14, 16 ], [ 16, 17 ], [ 10, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 10, 22 ], [ 22, 23 ], [ 22, 24 ], [ 10, 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 ], [ 10, 45 ], [ 45, 46 ], [ 45, 47 ], [ 10, 48 ], [ 48, 49 ], [ 48, 50 ], [ 10, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 57, 60 ], [ 60, 61 ], [ 57, 62 ], [ 56, 63 ], [ 53, 64 ], [ 64, 65 ], [ 64, 66 ], [ 53, 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 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 81, 85 ], [ 80, 86 ], [ 86, 87 ], [ 87, 88 ], [ 86, 89 ], [ 89, 90 ], [ 89, 91 ], [ 86, 92 ], [ 53, 93 ], [ 93, 94 ], [ 94, 95 ], [ 93, 96 ], [ 96, 97 ], [ 10, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 98, 103 ], [ 8, 104 ], [ 104, 105 ], [ 144, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 144, 113 ], [ 113, 114 ], [ 113, 115 ], [ 115, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 117, 120 ], [ 120, 121 ], [ 121, 122 ], [ 144, 123 ], [ 123, 124 ], [ 123, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 128, 129 ], [ 127, 130 ], [ 130, 131 ], [ 131, 132 ], [ 144, 133 ], [ 133, 134 ], [ 133, 135 ], [ 135, 136 ], [ 136, 137 ], [ 137, 138 ], [ 138, 139 ], [ 137, 140 ], [ 140, 141 ], [ 141, 142 ], [ 0, 143 ], [ 143, 144 ], [ 143, 145 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tstatic Scanner scanner;\n\n\tpublic static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n\t int X=gi();\n\t int N=gi();\n\t int[] P=new int[N];\n\n for(int i=0;i<N; i++) {\n \tP[i]=gi();\n\t }\n int q=0;\n int Y=X;\n while(true) {\n \tY+=Math.pow(-1, q)*q;\n \tboolean flg=false;\n \tfor(int i=0;i<N; i++) {\n \tif (P[i]==Y) {\n \t\tq++;\n \t\tflg=true;\n \t\tbreak;\n \t}\n \t }\n \tif (!flg) {\n \t break;\n \t}\n }\n\n System.out.println(Y);\n// if (flg) {\n// \tSystem.out.print(\"YES\");\n// }else {\n// \tSystem.out.print(\"NO\");\n// }\n\n\n\t}\n\n\t// 文字列として入力を取得\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}\n\n\t// intとして入力を取得\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}\n\n\t// longとして入力を取得\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}\n\n\t// doubleとして入力を取得\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tstatic Scanner scanner;\n\n\tpublic static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n\t int X=gi();\n\t int N=gi();\n\t int[] P=new int[N];\n\n for(int i=0;i<N; i++) {\n \tP[i]=gi();\n\t }\n int q=0;\n int Y=X;\n while(true) {\n \tY+=Math.pow(-1, q)*q;\n \tboolean flg=false;\n \tfor(int i=0;i<N; i++) {\n \tif (P[i]==Y) {\n \t\tq++;\n \t\tflg=true;\n \t\tbreak;\n \t}\n \t }\n \tif (!flg) {\n \t break;\n \t}\n }\n\n System.out.println(Y);\n// if (flg) {\n// \tSystem.out.print(\"YES\");\n// }else {\n// \tSystem.out.print(\"NO\");\n// }\n\n\n\t}\n\n\t// 文字列として入力を取得\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}\n\n\t// intとして入力を取得\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}\n\n\t// longとして入力を取得\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}\n\n\t// doubleとして入力を取得\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}\n}", "Main", "static Scanner scanner;", "scanner", "public static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n\t int X=gi();\n\t int N=gi();\n\t int[] P=new int[N];\n\n for(int i=0;i<N; i++) {\n \tP[i]=gi();\n\t }\n int q=0;\n int Y=X;\n while(true) {\n \tY+=Math.pow(-1, q)*q;\n \tboolean flg=false;\n \tfor(int i=0;i<N; i++) {\n \tif (P[i]==Y) {\n \t\tq++;\n \t\tflg=true;\n \t\tbreak;\n \t}\n \t }\n \tif (!flg) {\n \t break;\n \t}\n }\n\n System.out.println(Y);\n// if (flg) {\n// \tSystem.out.print(\"YES\");\n// }else {\n// \tSystem.out.print(\"NO\");\n// }\n\n\n\t}", "main", "{\n\t scanner = new Scanner(System.in);\n\n\t int X=gi();\n\t int N=gi();\n\t int[] P=new int[N];\n\n for(int i=0;i<N; i++) {\n \tP[i]=gi();\n\t }\n int q=0;\n int Y=X;\n while(true) {\n \tY+=Math.pow(-1, q)*q;\n \tboolean flg=false;\n \tfor(int i=0;i<N; i++) {\n \tif (P[i]==Y) {\n \t\tq++;\n \t\tflg=true;\n \t\tbreak;\n \t}\n \t }\n \tif (!flg) {\n \t break;\n \t}\n }\n\n System.out.println(Y);\n// if (flg) {\n// \tSystem.out.print(\"YES\");\n// }else {\n// \tSystem.out.print(\"NO\");\n// }\n\n\n\t}", "scanner = new Scanner(System.in)", "scanner", "new Scanner(System.in)", "int X=gi();", "X", "gi()", "gi", "int N=gi();", "N", "gi()", "gi", "int[] P=new int[N];", "P", "new int[N]", "N", "for(int i=0;i<N; i++) {\n \tP[i]=gi();\n\t }", "int i=0;", "int i=0;", "i", "0", "i<N", "i", "N", "i++", "i++", "i", "{\n \tP[i]=gi();\n\t }", "{\n \tP[i]=gi();\n\t }", "P[i]=gi()", "P[i]", "P", "i", "gi()", "gi", "int q=0;", "q", "0", "int Y=X;", "Y", "X", "while(true) {\n \tY+=Math.pow(-1, q)*q;\n \tboolean flg=false;\n \tfor(int i=0;i<N; i++) {\n \tif (P[i]==Y) {\n \t\tq++;\n \t\tflg=true;\n \t\tbreak;\n \t}\n \t }\n \tif (!flg) {\n \t break;\n \t}\n }", "true", "{\n \tY+=Math.pow(-1, q)*q;\n \tboolean flg=false;\n \tfor(int i=0;i<N; i++) {\n \tif (P[i]==Y) {\n \t\tq++;\n \t\tflg=true;\n \t\tbreak;\n \t}\n \t }\n \tif (!flg) {\n \t break;\n \t}\n }", "Y+=Math.pow(-1, q)*q", "Y", "Math.pow(-1, q)*q", "Math.pow(-1, q)", "Math.pow", "Math", "-1", "1", "q", "q", "boolean flg=false;", "flg", "false", "for(int i=0;i<N; i++) {\n \tif (P[i]==Y) {\n \t\tq++;\n \t\tflg=true;\n \t\tbreak;\n \t}\n \t }", "int i=0;", "int i=0;", "i", "0", "i<N", "i", "N", "i++", "i++", "i", "{\n \tif (P[i]==Y) {\n \t\tq++;\n \t\tflg=true;\n \t\tbreak;\n \t}\n \t }", "{\n \tif (P[i]==Y) {\n \t\tq++;\n \t\tflg=true;\n \t\tbreak;\n \t}\n \t }", "if (P[i]==Y) {\n \t\tq++;\n \t\tflg=true;\n \t\tbreak;\n \t}", "P[i]==Y", "P[i]", "P", "i", "Y", "{\n \t\tq++;\n \t\tflg=true;\n \t\tbreak;\n \t}", "q++", "q", "flg=true", "flg", "true", "break;", "if (!flg) {\n \t break;\n \t}", "!flg", "flg", "{\n \t break;\n \t}", "break;", "System.out.println(Y)", "System.out.println", "System.out", "System", "System.out", "Y", "String[] args", "args", "// 文字列として入力を取得\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}", "gs", "{\n\t\treturn scanner.next();\n\t}", "return scanner.next();", "scanner.next()", "scanner.next", "scanner", "// intとして入力を取得\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}", "gi", "{\n\t\treturn Integer.parseInt(scanner.next());\n\t}", "return Integer.parseInt(scanner.next());", "Integer.parseInt(scanner.next())", "Integer.parseInt", "Integer", "scanner.next()", "scanner.next", "scanner", "// longとして入力を取得\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}", "gl", "{\n\t\treturn Long.parseLong(scanner.next());\n\t}", "return Long.parseLong(scanner.next());", "Long.parseLong(scanner.next())", "Long.parseLong", "Long", "scanner.next()", "scanner.next", "scanner", "// doubleとして入力を取得\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}", "gd", "{\n\t\treturn Double.parseDouble(scanner.next());\n\t}", "return Double.parseDouble(scanner.next());", "Double.parseDouble(scanner.next())", "Double.parseDouble", "Double", "scanner.next()", "scanner.next", "scanner", "public class Main {\n\n\tstatic Scanner scanner;\n\n\tpublic static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n\t int X=gi();\n\t int N=gi();\n\t int[] P=new int[N];\n\n for(int i=0;i<N; i++) {\n \tP[i]=gi();\n\t }\n int q=0;\n int Y=X;\n while(true) {\n \tY+=Math.pow(-1, q)*q;\n \tboolean flg=false;\n \tfor(int i=0;i<N; i++) {\n \tif (P[i]==Y) {\n \t\tq++;\n \t\tflg=true;\n \t\tbreak;\n \t}\n \t }\n \tif (!flg) {\n \t break;\n \t}\n }\n\n System.out.println(Y);\n// if (flg) {\n// \tSystem.out.print(\"YES\");\n// }else {\n// \tSystem.out.print(\"NO\");\n// }\n\n\n\t}\n\n\t// 文字列として入力を取得\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}\n\n\t// intとして入力を取得\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}\n\n\t// longとして入力を取得\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}\n\n\t// doubleとして入力を取得\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}\n}", "public class Main {\n\n\tstatic Scanner scanner;\n\n\tpublic static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n\t int X=gi();\n\t int N=gi();\n\t int[] P=new int[N];\n\n for(int i=0;i<N; i++) {\n \tP[i]=gi();\n\t }\n int q=0;\n int Y=X;\n while(true) {\n \tY+=Math.pow(-1, q)*q;\n \tboolean flg=false;\n \tfor(int i=0;i<N; i++) {\n \tif (P[i]==Y) {\n \t\tq++;\n \t\tflg=true;\n \t\tbreak;\n \t}\n \t }\n \tif (!flg) {\n \t break;\n \t}\n }\n\n System.out.println(Y);\n// if (flg) {\n// \tSystem.out.print(\"YES\");\n// }else {\n// \tSystem.out.print(\"NO\");\n// }\n\n\n\t}\n\n\t// 文字列として入力を取得\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}\n\n\t// intとして入力を取得\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}\n\n\t// longとして入力を取得\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}\n\n\t// doubleとして入力を取得\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { static Scanner scanner; public static void main(String[] args) { scanner = new Scanner(System.in); int X=gi(); int N=gi(); int[] P=new int[N]; for(int i=0;i<N; i++) { P[i]=gi(); } int q=0; int Y=X; while(true) { Y+=Math.pow(-1, q)*q; boolean flg=false; for(int i=0;i<N; i++) { if (P[i]==Y) { q++; flg=true; break; } } if (!flg) { break; } } System.out.println(Y); // if (flg) { // System.out.print("YES"); // }else { // System.out.print("NO"); // } } // 文字列として入力を取得 public static String gs() { return scanner.next(); } // intとして入力を取得 public static int gi() { return Integer.parseInt(scanner.next()); } // longとして入力を取得 public static long gl() { return Long.parseLong(scanner.next()); } // doubleとして入力を取得 public static double gd() { return Double.parseDouble(scanner.next()); } }
[ 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, 41, 13, 17, 41, 13, 20, 11, 1, 41, 13, 40, 17, 2, 13, 17, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 14, 4, 18, 13, 13, 30, 4, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 2, 13, 4, 18, 13, 4, 18, 13, 13, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 4, 18, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 141, 8 ], [ 141, 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 ], [ 36, 38 ], [ 38, 39 ], [ 34, 40 ], [ 40, 41 ], [ 40, 42 ], [ 34, 43 ], [ 43, 44 ], [ 44, 45 ], [ 34, 46 ], [ 47, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 48, 51 ], [ 51, 52 ], [ 52, 53 ], [ 51, 54 ], [ 11, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 55, 60 ], [ 60, 61 ], [ 60, 62 ], [ 55, 63 ], [ 63, 64 ], [ 64, 65 ], [ 55, 66 ], [ 67, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 67, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 74, 77 ], [ 73, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 79, 82 ], [ 11, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 83, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 91, 92 ], [ 83, 93 ], [ 93, 94 ], [ 94, 95 ], [ 83, 96 ], [ 97, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 101, 102 ], [ 100, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 106, 107 ], [ 105, 108 ], [ 108, 109 ], [ 109, 110 ], [ 108, 111 ], [ 97, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 112, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 116, 120 ], [ 120, 121 ], [ 120, 122 ], [ 122, 123 ], [ 123, 124 ], [ 122, 125 ], [ 125, 126 ], [ 126, 127 ], [ 125, 128 ], [ 11, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 131, 133 ], [ 129, 134 ], [ 11, 135 ], [ 135, 136 ], [ 136, 137 ], [ 9, 138 ], [ 138, 139 ], [ 0, 140 ], [ 140, 141 ], [ 140, 142 ] ]
[ "import java.util.ArrayList;\nimport java.util.Scanner;\n\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint ans = 0;\n\t\tint minAbs = 100;\n\t\tArrayList<String> numList = new ArrayList<>();\n\n\t\tfor (int i=-100; i<=101; i++) {\n\t\t\tnumList.add(String.valueOf(i));\n\t\t}\n\t\t\n\t\tfor (int i=1; i<=n; i++) {\n\t\t\tString p = sc.next();\n\t\t\tif(numList.contains(p)) {\n\t\t\t\tnumList.remove(p);\n\t\t\t}\n\t\t}\n\n\t\tfor (int i=0; i<numList.size(); i++) {\n\t\t\tint abs = Math.abs(x - Integer.parseInt(numList.get(i)));\n\t\t\tif(abs < minAbs) {\n\t\t\t\tminAbs = abs;\n\t\t\t\tans = Integer.parseInt(numList.get(i));\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t\tsc.close();\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\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint ans = 0;\n\t\tint minAbs = 100;\n\t\tArrayList<String> numList = new ArrayList<>();\n\n\t\tfor (int i=-100; i<=101; i++) {\n\t\t\tnumList.add(String.valueOf(i));\n\t\t}\n\t\t\n\t\tfor (int i=1; i<=n; i++) {\n\t\t\tString p = sc.next();\n\t\t\tif(numList.contains(p)) {\n\t\t\t\tnumList.remove(p);\n\t\t\t}\n\t\t}\n\n\t\tfor (int i=0; i<numList.size(); i++) {\n\t\t\tint abs = Math.abs(x - Integer.parseInt(numList.get(i)));\n\t\t\tif(abs < minAbs) {\n\t\t\t\tminAbs = abs;\n\t\t\t\tans = Integer.parseInt(numList.get(i));\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t\tsc.close();\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint ans = 0;\n\t\tint minAbs = 100;\n\t\tArrayList<String> numList = new ArrayList<>();\n\n\t\tfor (int i=-100; i<=101; i++) {\n\t\t\tnumList.add(String.valueOf(i));\n\t\t}\n\t\t\n\t\tfor (int i=1; i<=n; i++) {\n\t\t\tString p = sc.next();\n\t\t\tif(numList.contains(p)) {\n\t\t\t\tnumList.remove(p);\n\t\t\t}\n\t\t}\n\n\t\tfor (int i=0; i<numList.size(); i++) {\n\t\t\tint abs = Math.abs(x - Integer.parseInt(numList.get(i)));\n\t\t\tif(abs < minAbs) {\n\t\t\t\tminAbs = abs;\n\t\t\t\tans = Integer.parseInt(numList.get(i));\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t\tsc.close();\n\t}", "main", "{\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint ans = 0;\n\t\tint minAbs = 100;\n\t\tArrayList<String> numList = new ArrayList<>();\n\n\t\tfor (int i=-100; i<=101; i++) {\n\t\t\tnumList.add(String.valueOf(i));\n\t\t}\n\t\t\n\t\tfor (int i=1; i<=n; i++) {\n\t\t\tString p = sc.next();\n\t\t\tif(numList.contains(p)) {\n\t\t\t\tnumList.remove(p);\n\t\t\t}\n\t\t}\n\n\t\tfor (int i=0; i<numList.size(); i++) {\n\t\t\tint abs = Math.abs(x - Integer.parseInt(numList.get(i)));\n\t\t\tif(abs < minAbs) {\n\t\t\t\tminAbs = abs;\n\t\t\t\tans = Integer.parseInt(numList.get(i));\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t\tsc.close();\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int ans = 0;", "ans", "0", "int minAbs = 100;", "minAbs", "100", "ArrayList<String> numList = new ArrayList<>();", "numList", "new ArrayList<>()", "for (int i=-100; i<=101; i++) {\n\t\t\tnumList.add(String.valueOf(i));\n\t\t}", "int i=-100;", "int i=-100;", "i", "-100", "100", "i<=101", "i", "101", "i++", "i++", "i", "{\n\t\t\tnumList.add(String.valueOf(i));\n\t\t}", "{\n\t\t\tnumList.add(String.valueOf(i));\n\t\t}", "numList.add(String.valueOf(i))", "numList.add", "numList", "String.valueOf(i)", "String.valueOf", "String", "i", "for (int i=1; i<=n; i++) {\n\t\t\tString p = sc.next();\n\t\t\tif(numList.contains(p)) {\n\t\t\t\tnumList.remove(p);\n\t\t\t}\n\t\t}", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n\t\t\tString p = sc.next();\n\t\t\tif(numList.contains(p)) {\n\t\t\t\tnumList.remove(p);\n\t\t\t}\n\t\t}", "{\n\t\t\tString p = sc.next();\n\t\t\tif(numList.contains(p)) {\n\t\t\t\tnumList.remove(p);\n\t\t\t}\n\t\t}", "String p = sc.next();", "p", "sc.next()", "sc.next", "sc", "if(numList.contains(p)) {\n\t\t\t\tnumList.remove(p);\n\t\t\t}", "numList.contains(p)", "numList.contains", "numList", "p", "{\n\t\t\t\tnumList.remove(p);\n\t\t\t}", "numList.remove(p)", "numList.remove", "numList", "p", "for (int i=0; i<numList.size(); i++) {\n\t\t\tint abs = Math.abs(x - Integer.parseInt(numList.get(i)));\n\t\t\tif(abs < minAbs) {\n\t\t\t\tminAbs = abs;\n\t\t\t\tans = Integer.parseInt(numList.get(i));\n\t\t\t}\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<numList.size()", "i", "numList.size()", "numList.size", "numList", "i++", "i++", "i", "{\n\t\t\tint abs = Math.abs(x - Integer.parseInt(numList.get(i)));\n\t\t\tif(abs < minAbs) {\n\t\t\t\tminAbs = abs;\n\t\t\t\tans = Integer.parseInt(numList.get(i));\n\t\t\t}\n\t\t}", "{\n\t\t\tint abs = Math.abs(x - Integer.parseInt(numList.get(i)));\n\t\t\tif(abs < minAbs) {\n\t\t\t\tminAbs = abs;\n\t\t\t\tans = Integer.parseInt(numList.get(i));\n\t\t\t}\n\t\t}", "int abs = Math.abs(x - Integer.parseInt(numList.get(i)));", "abs", "Math.abs(x - Integer.parseInt(numList.get(i)))", "Math.abs", "Math", "x - Integer.parseInt(numList.get(i))", "x", "Integer.parseInt(numList.get(i))", "Integer.parseInt", "Integer", "numList.get(i)", "numList.get", "numList", "i", "if(abs < minAbs) {\n\t\t\t\tminAbs = abs;\n\t\t\t\tans = Integer.parseInt(numList.get(i));\n\t\t\t}", "abs < minAbs", "abs", "minAbs", "{\n\t\t\t\tminAbs = abs;\n\t\t\t\tans = Integer.parseInt(numList.get(i));\n\t\t\t}", "minAbs = abs", "minAbs", "abs", "ans = Integer.parseInt(numList.get(i))", "ans", "Integer.parseInt(numList.get(i))", "Integer.parseInt", "Integer", "numList.get(i)", "numList.get", "numList", "i", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "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\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint ans = 0;\n\t\tint minAbs = 100;\n\t\tArrayList<String> numList = new ArrayList<>();\n\n\t\tfor (int i=-100; i<=101; i++) {\n\t\t\tnumList.add(String.valueOf(i));\n\t\t}\n\t\t\n\t\tfor (int i=1; i<=n; i++) {\n\t\t\tString p = sc.next();\n\t\t\tif(numList.contains(p)) {\n\t\t\t\tnumList.remove(p);\n\t\t\t}\n\t\t}\n\n\t\tfor (int i=0; i<numList.size(); i++) {\n\t\t\tint abs = Math.abs(x - Integer.parseInt(numList.get(i)));\n\t\t\tif(abs < minAbs) {\n\t\t\t\tminAbs = abs;\n\t\t\t\tans = Integer.parseInt(numList.get(i));\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t\tsc.close();\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\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint ans = 0;\n\t\tint minAbs = 100;\n\t\tArrayList<String> numList = new ArrayList<>();\n\n\t\tfor (int i=-100; i<=101; i++) {\n\t\t\tnumList.add(String.valueOf(i));\n\t\t}\n\t\t\n\t\tfor (int i=1; i<=n; i++) {\n\t\t\tString p = sc.next();\n\t\t\tif(numList.contains(p)) {\n\t\t\t\tnumList.remove(p);\n\t\t\t}\n\t\t}\n\n\t\tfor (int i=0; i<numList.size(); i++) {\n\t\t\tint abs = Math.abs(x - Integer.parseInt(numList.get(i)));\n\t\t\tif(abs < minAbs) {\n\t\t\t\tminAbs = abs;\n\t\t\t\tans = Integer.parseInt(numList.get(i));\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t\tsc.close();\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 x = sc.nextInt(); int n = sc.nextInt(); int ans = 0; int minAbs = 100; ArrayList<String> numList = new ArrayList<>(); for (int i=-100; i<=101; i++) { numList.add(String.valueOf(i)); } for (int i=1; i<=n; i++) { String p = sc.next(); if(numList.contains(p)) { numList.remove(p); } } for (int i=0; i<numList.size(); i++) { int abs = Math.abs(x - Integer.parseInt(numList.get(i))); if(abs < minAbs) { minAbs = abs; ans = Integer.parseInt(numList.get(i)); } } System.out.println(ans); 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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 18, 13, 13, 30, 0, 13, 17, 3, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 4, 18, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 0, 13, 2, 13, 13, 0, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 18, 13, 13, 30, 0, 13, 17, 3, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 4, 18, 13, 17, 0, 13, 2, 13, 13, 0, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 18, 13, 13, 30, 0, 13, 17, 3, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 4, 18, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 208, 8 ], [ 208, 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 ], [ 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 ], [ 11, 49 ], [ 49, 50 ], [ 50, 51 ], [ 49, 52 ], [ 11, 53 ], [ 53, 54 ], [ 53, 55 ], [ 11, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 56, 61 ], [ 61, 62 ], [ 61, 63 ], [ 56, 64 ], [ 64, 65 ], [ 65, 66 ], [ 56, 67 ], [ 68, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 72, 74 ], [ 69, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 75, 79 ], [ 11, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 80, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 85, 90 ], [ 84, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 11, 95 ], [ 95, 96 ], [ 95, 97 ], [ 11, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 98, 103 ], [ 103, 104 ], [ 103, 105 ], [ 98, 106 ], [ 106, 107 ], [ 107, 108 ], [ 98, 109 ], [ 110, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 113, 115 ], [ 110, 116 ], [ 116, 117 ], [ 116, 118 ], [ 110, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 119, 124 ], [ 124, 125 ], [ 124, 126 ], [ 119, 127 ], [ 127, 128 ], [ 128, 129 ], [ 119, 130 ], [ 131, 131 ], [ 131, 132 ], [ 132, 133 ], [ 133, 134 ], [ 133, 135 ], [ 135, 136 ], [ 135, 137 ], [ 132, 138 ], [ 138, 139 ], [ 139, 140 ], [ 139, 141 ], [ 138, 142 ], [ 110, 143 ], [ 143, 144 ], [ 144, 145 ], [ 144, 146 ], [ 143, 147 ], [ 147, 148 ], [ 148, 149 ], [ 149, 150 ], [ 150, 151 ], [ 150, 152 ], [ 148, 153 ], [ 147, 154 ], [ 154, 155 ], [ 155, 156 ], [ 154, 157 ], [ 110, 158 ], [ 158, 159 ], [ 158, 160 ], [ 160, 161 ], [ 160, 162 ], [ 110, 163 ], [ 163, 164 ], [ 163, 165 ], [ 110, 166 ], [ 166, 167 ], [ 167, 168 ], [ 168, 169 ], [ 168, 170 ], [ 166, 171 ], [ 171, 172 ], [ 171, 173 ], [ 166, 174 ], [ 174, 175 ], [ 175, 176 ], [ 166, 177 ], [ 178, 178 ], [ 178, 179 ], [ 179, 180 ], [ 180, 181 ], [ 180, 182 ], [ 182, 183 ], [ 182, 184 ], [ 179, 185 ], [ 185, 186 ], [ 186, 187 ], [ 186, 188 ], [ 185, 189 ], [ 110, 190 ], [ 190, 191 ], [ 191, 192 ], [ 191, 193 ], [ 190, 194 ], [ 194, 195 ], [ 195, 196 ], [ 196, 197 ], [ 197, 198 ], [ 197, 199 ], [ 195, 200 ], [ 194, 201 ], [ 201, 202 ], [ 202, 203 ], [ 201, 204 ], [ 9, 205 ], [ 205, 206 ], [ 0, 207 ], [ 207, 208 ], [ 207, 209 ] ]
[ "import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint p[] = new int[n];\n\t\tfor(int i=0; i<n;i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\n\t\tArrays.sort(p);\n\t\t\n//\t\tfor(int i=0; i<n;i++) {\n//\t\t\tSystem.out.println(p[i]);\n//\t\t}\n\n\t\tboolean flg = true;\n\t\tfor(int i=0; i<n;i++) {\n\t\t\tif(x == p[i]) {\n\t\t\t\tflg = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(flg == true) {\n\t\t\tSystem.out.println(x);\n\t\t\tSystem.exit(0);;\n\t\t}\n\n\t\tint xx =0;\n\t\tfor(int i=1; i<100; i++) {\n\t\t\txx = x - i;\n\t\t\tflg = true;\n\t\t\tfor(int j=0; j<n;j++) {\n\t\t\t\tif(xx == p[j]) {\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flg == true) {\n\t\t\t\tSystem.out.println(xx);\n\t\t\t\tSystem.exit(0);;\n\t\t\t}\n\t\t\t\n\t\t\txx = x + i;\n\t\t\tflg = true;\n\t\t\tfor(int j=0; j<n;j++) {\n\t\t\t\tif(xx == p[j]) {\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flg == true) {\n\t\t\t\tSystem.out.println(xx);\n\t\t\t\tSystem.exit(0);;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}\n\t\n}", "import java.util.Arrays;", "Arrays", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint p[] = new int[n];\n\t\tfor(int i=0; i<n;i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\n\t\tArrays.sort(p);\n\t\t\n//\t\tfor(int i=0; i<n;i++) {\n//\t\t\tSystem.out.println(p[i]);\n//\t\t}\n\n\t\tboolean flg = true;\n\t\tfor(int i=0; i<n;i++) {\n\t\t\tif(x == p[i]) {\n\t\t\t\tflg = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(flg == true) {\n\t\t\tSystem.out.println(x);\n\t\t\tSystem.exit(0);;\n\t\t}\n\n\t\tint xx =0;\n\t\tfor(int i=1; i<100; i++) {\n\t\t\txx = x - i;\n\t\t\tflg = true;\n\t\t\tfor(int j=0; j<n;j++) {\n\t\t\t\tif(xx == p[j]) {\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flg == true) {\n\t\t\t\tSystem.out.println(xx);\n\t\t\t\tSystem.exit(0);;\n\t\t\t}\n\t\t\t\n\t\t\txx = x + i;\n\t\t\tflg = true;\n\t\t\tfor(int j=0; j<n;j++) {\n\t\t\t\tif(xx == p[j]) {\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flg == true) {\n\t\t\t\tSystem.out.println(xx);\n\t\t\t\tSystem.exit(0);;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}\n\t\n}", "Main", "public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint p[] = new int[n];\n\t\tfor(int i=0; i<n;i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\n\t\tArrays.sort(p);\n\t\t\n//\t\tfor(int i=0; i<n;i++) {\n//\t\t\tSystem.out.println(p[i]);\n//\t\t}\n\n\t\tboolean flg = true;\n\t\tfor(int i=0; i<n;i++) {\n\t\t\tif(x == p[i]) {\n\t\t\t\tflg = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(flg == true) {\n\t\t\tSystem.out.println(x);\n\t\t\tSystem.exit(0);;\n\t\t}\n\n\t\tint xx =0;\n\t\tfor(int i=1; i<100; i++) {\n\t\t\txx = x - i;\n\t\t\tflg = true;\n\t\t\tfor(int j=0; j<n;j++) {\n\t\t\t\tif(xx == p[j]) {\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flg == true) {\n\t\t\t\tSystem.out.println(xx);\n\t\t\t\tSystem.exit(0);;\n\t\t\t}\n\t\t\t\n\t\t\txx = x + i;\n\t\t\tflg = true;\n\t\t\tfor(int j=0; j<n;j++) {\n\t\t\t\tif(xx == p[j]) {\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flg == true) {\n\t\t\t\tSystem.out.println(xx);\n\t\t\t\tSystem.exit(0);;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}", "main", "{\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint p[] = new int[n];\n\t\tfor(int i=0; i<n;i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\n\t\tArrays.sort(p);\n\t\t\n//\t\tfor(int i=0; i<n;i++) {\n//\t\t\tSystem.out.println(p[i]);\n//\t\t}\n\n\t\tboolean flg = true;\n\t\tfor(int i=0; i<n;i++) {\n\t\t\tif(x == p[i]) {\n\t\t\t\tflg = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(flg == true) {\n\t\t\tSystem.out.println(x);\n\t\t\tSystem.exit(0);;\n\t\t}\n\n\t\tint xx =0;\n\t\tfor(int i=1; i<100; i++) {\n\t\t\txx = x - i;\n\t\t\tflg = true;\n\t\t\tfor(int j=0; j<n;j++) {\n\t\t\t\tif(xx == p[j]) {\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flg == true) {\n\t\t\t\tSystem.out.println(xx);\n\t\t\t\tSystem.exit(0);;\n\t\t\t}\n\t\t\t\n\t\t\txx = x + i;\n\t\t\tflg = true;\n\t\t\tfor(int j=0; j<n;j++) {\n\t\t\t\tif(xx == p[j]) {\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flg == true) {\n\t\t\t\tSystem.out.println(xx);\n\t\t\t\tSystem.exit(0);;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int p[] = new int[n];", "p", "new int[n]", "n", "for(int i=0; i<n;i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t\t\tp[i] = sc.nextInt();\n\t\t}", "{\n\t\t\tp[i] = sc.nextInt();\n\t\t}", "p[i] = sc.nextInt()", "p[i]", "p", "i", "sc.nextInt()", "sc.nextInt", "sc", "Arrays.sort(p)", "Arrays.sort", "Arrays", "p", "boolean flg = true;", "flg", "true", "for(int i=0; i<n;i++) {\n\t\t\tif(x == p[i]) {\n\t\t\t\tflg = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t\t\tif(x == p[i]) {\n\t\t\t\tflg = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "{\n\t\t\tif(x == p[i]) {\n\t\t\t\tflg = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "if(x == p[i]) {\n\t\t\t\tflg = false;\n\t\t\t\tbreak;\n\t\t\t}", "x == p[i]", "x", "p[i]", "p", "i", "{\n\t\t\t\tflg = false;\n\t\t\t\tbreak;\n\t\t\t}", "flg = false", "flg", "false", "break;", "if(flg == true) {\n\t\t\tSystem.out.println(x);\n\t\t\tSystem.exit(0);;\n\t\t}", "flg == true", "flg", "true", "{\n\t\t\tSystem.out.println(x);\n\t\t\tSystem.exit(0);;\n\t\t}", "System.out.println(x)", "System.out.println", "System.out", "System", "System.out", "x", "System.exit(0)", "System.exit", "System", "0", "int xx =0;", "xx", "0", "for(int i=1; i<100; i++) {\n\t\t\txx = x - i;\n\t\t\tflg = true;\n\t\t\tfor(int j=0; j<n;j++) {\n\t\t\t\tif(xx == p[j]) {\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flg == true) {\n\t\t\t\tSystem.out.println(xx);\n\t\t\t\tSystem.exit(0);;\n\t\t\t}\n\t\t\t\n\t\t\txx = x + i;\n\t\t\tflg = true;\n\t\t\tfor(int j=0; j<n;j++) {\n\t\t\t\tif(xx == p[j]) {\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flg == true) {\n\t\t\t\tSystem.out.println(xx);\n\t\t\t\tSystem.exit(0);;\n\t\t\t}\n\t\t\t\n\t\t}", "int i=1;", "int i=1;", "i", "1", "i<100", "i", "100", "i++", "i++", "i", "{\n\t\t\txx = x - i;\n\t\t\tflg = true;\n\t\t\tfor(int j=0; j<n;j++) {\n\t\t\t\tif(xx == p[j]) {\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flg == true) {\n\t\t\t\tSystem.out.println(xx);\n\t\t\t\tSystem.exit(0);;\n\t\t\t}\n\t\t\t\n\t\t\txx = x + i;\n\t\t\tflg = true;\n\t\t\tfor(int j=0; j<n;j++) {\n\t\t\t\tif(xx == p[j]) {\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flg == true) {\n\t\t\t\tSystem.out.println(xx);\n\t\t\t\tSystem.exit(0);;\n\t\t\t}\n\t\t\t\n\t\t}", "{\n\t\t\txx = x - i;\n\t\t\tflg = true;\n\t\t\tfor(int j=0; j<n;j++) {\n\t\t\t\tif(xx == p[j]) {\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flg == true) {\n\t\t\t\tSystem.out.println(xx);\n\t\t\t\tSystem.exit(0);;\n\t\t\t}\n\t\t\t\n\t\t\txx = x + i;\n\t\t\tflg = true;\n\t\t\tfor(int j=0; j<n;j++) {\n\t\t\t\tif(xx == p[j]) {\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flg == true) {\n\t\t\t\tSystem.out.println(xx);\n\t\t\t\tSystem.exit(0);;\n\t\t\t}\n\t\t\t\n\t\t}", "xx = x - i", "xx", "x - i", "x", "i", "flg = true", "flg", "true", "for(int j=0; j<n;j++) {\n\t\t\t\tif(xx == p[j]) {\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "int j=0;", "int j=0;", "j", "0", "j<n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\tif(xx == p[j]) {\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tif(xx == p[j]) {\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "if(xx == p[j]) {\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}", "xx == p[j]", "xx", "p[j]", "p", "j", "{\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}", "flg = false", "flg", "false", "break;", "if(flg == true) {\n\t\t\t\tSystem.out.println(xx);\n\t\t\t\tSystem.exit(0);;\n\t\t\t}", "flg == true", "flg", "true", "{\n\t\t\t\tSystem.out.println(xx);\n\t\t\t\tSystem.exit(0);;\n\t\t\t}", "System.out.println(xx)", "System.out.println", "System.out", "System", "System.out", "xx", "System.exit(0)", "System.exit", "System", "0", "xx = x + i", "xx", "x + i", "x", "i", "flg = true", "flg", "true", "for(int j=0; j<n;j++) {\n\t\t\t\tif(xx == p[j]) {\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "int j=0;", "int j=0;", "j", "0", "j<n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\tif(xx == p[j]) {\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tif(xx == p[j]) {\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "if(xx == p[j]) {\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}", "xx == p[j]", "xx", "p[j]", "p", "j", "{\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}", "flg = false", "flg", "false", "break;", "if(flg == true) {\n\t\t\t\tSystem.out.println(xx);\n\t\t\t\tSystem.exit(0);;\n\t\t\t}", "flg == true", "flg", "true", "{\n\t\t\t\tSystem.out.println(xx);\n\t\t\t\tSystem.exit(0);;\n\t\t\t}", "System.out.println(xx)", "System.out.println", "System.out", "System", "System.out", "xx", "System.exit(0)", "System.exit", "System", "0", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint p[] = new int[n];\n\t\tfor(int i=0; i<n;i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\n\t\tArrays.sort(p);\n\t\t\n//\t\tfor(int i=0; i<n;i++) {\n//\t\t\tSystem.out.println(p[i]);\n//\t\t}\n\n\t\tboolean flg = true;\n\t\tfor(int i=0; i<n;i++) {\n\t\t\tif(x == p[i]) {\n\t\t\t\tflg = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(flg == true) {\n\t\t\tSystem.out.println(x);\n\t\t\tSystem.exit(0);;\n\t\t}\n\n\t\tint xx =0;\n\t\tfor(int i=1; i<100; i++) {\n\t\t\txx = x - i;\n\t\t\tflg = true;\n\t\t\tfor(int j=0; j<n;j++) {\n\t\t\t\tif(xx == p[j]) {\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flg == true) {\n\t\t\t\tSystem.out.println(xx);\n\t\t\t\tSystem.exit(0);;\n\t\t\t}\n\t\t\t\n\t\t\txx = x + i;\n\t\t\tflg = true;\n\t\t\tfor(int j=0; j<n;j++) {\n\t\t\t\tif(xx == p[j]) {\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flg == true) {\n\t\t\t\tSystem.out.println(xx);\n\t\t\t\tSystem.exit(0);;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}\n\t\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint p[] = new int[n];\n\t\tfor(int i=0; i<n;i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\n\t\tArrays.sort(p);\n\t\t\n//\t\tfor(int i=0; i<n;i++) {\n//\t\t\tSystem.out.println(p[i]);\n//\t\t}\n\n\t\tboolean flg = true;\n\t\tfor(int i=0; i<n;i++) {\n\t\t\tif(x == p[i]) {\n\t\t\t\tflg = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(flg == true) {\n\t\t\tSystem.out.println(x);\n\t\t\tSystem.exit(0);;\n\t\t}\n\n\t\tint xx =0;\n\t\tfor(int i=1; i<100; i++) {\n\t\t\txx = x - i;\n\t\t\tflg = true;\n\t\t\tfor(int j=0; j<n;j++) {\n\t\t\t\tif(xx == p[j]) {\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flg == true) {\n\t\t\t\tSystem.out.println(xx);\n\t\t\t\tSystem.exit(0);;\n\t\t\t}\n\t\t\t\n\t\t\txx = x + i;\n\t\t\tflg = true;\n\t\t\tfor(int j=0; j<n;j++) {\n\t\t\t\tif(xx == p[j]) {\n\t\t\t\t\tflg = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flg == true) {\n\t\t\t\tSystem.out.println(xx);\n\t\t\t\tSystem.exit(0);;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}\n\t\n}", "Main" ]
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int n = sc.nextInt(); int p[] = new int[n]; for(int i=0; i<n;i++) { p[i] = sc.nextInt(); } Arrays.sort(p); // for(int i=0; i<n;i++) { // System.out.println(p[i]); // } boolean flg = true; for(int i=0; i<n;i++) { if(x == p[i]) { flg = false; break; } } if(flg == true) { System.out.println(x); System.exit(0);; } int xx =0; for(int i=1; i<100; i++) { xx = x - i; flg = true; for(int j=0; j<n;j++) { if(xx == p[j]) { flg = false; break; } } if(flg == true) { System.out.println(xx); System.exit(0);; } xx = x + i; flg = true; for(int j=0; j<n;j++) { if(xx == p[j]) { flg = false; break; } } if(flg == true) { System.out.println(xx); System.exit(0);; } } } }
[ 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, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 29, 0, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 4, 18, 13, 4, 18, 13, 18, 13, 13, 14, 40, 4, 18, 13, 13, 30, 4, 18, 18, 13, 13, 13, 29, 41, 13, 17, 42, 17, 30, 14, 40, 4, 18, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 29, 14, 40, 4, 18, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 29, 40, 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 ], [ 150, 14 ], [ 150, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 17, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 26, 27 ], [ 23, 28 ], [ 17, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 31, 34 ], [ 34, 35 ], [ 34, 36 ], [ 17, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 39, 42 ], [ 42, 43 ], [ 42, 44 ], [ 17, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 45, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 49, 56 ], [ 17, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 59, 64 ], [ 17, 65 ], [ 65, 66 ], [ 65, 67 ], [ 17, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 73, 74 ], [ 73, 75 ], [ 68, 76 ], [ 76, 77 ], [ 77, 78 ], [ 68, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 80, 83 ], [ 83, 84 ], [ 84, 85 ], [ 83, 86 ], [ 86, 87 ], [ 86, 88 ], [ 17, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 89, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 96, 101 ], [ 95, 102 ], [ 17, 103 ], [ 103, 104 ], [ 103, 105 ], [ 17, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 111, 114 ], [ 114, 115 ], [ 114, 116 ], [ 109, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 120, 122 ], [ 118, 123 ], [ 123, 124 ], [ 123, 125 ], [ 117, 126 ], [ 108, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 130, 131 ], [ 129, 132 ], [ 132, 133 ], [ 132, 134 ], [ 127, 135 ], [ 135, 136 ], [ 136, 137 ], [ 137, 138 ], [ 138, 139 ], [ 138, 140 ], [ 136, 141 ], [ 141, 142 ], [ 141, 143 ], [ 135, 144 ], [ 108, 145 ], [ 145, 146 ], [ 15, 147 ], [ 147, 148 ], [ 0, 149 ], [ 149, 150 ], [ 149, 151 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.HashSet;\n\npublic class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] s = br.readLine().split(\" \");\n int x = Integer.parseInt(s[0]);\n int n = Integer.parseInt(s[1]);\n if(n == 0) {\n System.out.print(x);\n return;\n }\n\n s = br.readLine().split(\" \");\n HashSet<Integer> set = new HashSet<>();\n for(int i=0; i<n; i++)\n set.add(Integer.parseInt(s[i]));\n \n if(!set.contains(x)) {\n System.out.print(x);\n return;\n }\n int nearest = 1;\n while(true) {\n if(!set.contains(x-nearest)) {\n System.out.print(x-nearest);\n return;\n }\n\n if(!set.contains(x+nearest)) {\n System.out.print(x+nearest);\n return;\n }\n nearest++;\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.util.HashSet;", "HashSet", "java.util", "public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] s = br.readLine().split(\" \");\n int x = Integer.parseInt(s[0]);\n int n = Integer.parseInt(s[1]);\n if(n == 0) {\n System.out.print(x);\n return;\n }\n\n s = br.readLine().split(\" \");\n HashSet<Integer> set = new HashSet<>();\n for(int i=0; i<n; i++)\n set.add(Integer.parseInt(s[i]));\n \n if(!set.contains(x)) {\n System.out.print(x);\n return;\n }\n int nearest = 1;\n while(true) {\n if(!set.contains(x-nearest)) {\n System.out.print(x-nearest);\n return;\n }\n\n if(!set.contains(x+nearest)) {\n System.out.print(x+nearest);\n return;\n }\n nearest++;\n }\n }\n}", "Main", "public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] s = br.readLine().split(\" \");\n int x = Integer.parseInt(s[0]);\n int n = Integer.parseInt(s[1]);\n if(n == 0) {\n System.out.print(x);\n return;\n }\n\n s = br.readLine().split(\" \");\n HashSet<Integer> set = new HashSet<>();\n for(int i=0; i<n; i++)\n set.add(Integer.parseInt(s[i]));\n \n if(!set.contains(x)) {\n System.out.print(x);\n return;\n }\n int nearest = 1;\n while(true) {\n if(!set.contains(x-nearest)) {\n System.out.print(x-nearest);\n return;\n }\n\n if(!set.contains(x+nearest)) {\n System.out.print(x+nearest);\n return;\n }\n nearest++;\n }\n }", "main", "{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] s = br.readLine().split(\" \");\n int x = Integer.parseInt(s[0]);\n int n = Integer.parseInt(s[1]);\n if(n == 0) {\n System.out.print(x);\n return;\n }\n\n s = br.readLine().split(\" \");\n HashSet<Integer> set = new HashSet<>();\n for(int i=0; i<n; i++)\n set.add(Integer.parseInt(s[i]));\n \n if(!set.contains(x)) {\n System.out.print(x);\n return;\n }\n int nearest = 1;\n while(true) {\n if(!set.contains(x-nearest)) {\n System.out.print(x-nearest);\n return;\n }\n\n if(!set.contains(x+nearest)) {\n System.out.print(x+nearest);\n return;\n }\n nearest++;\n }\n }", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "String[] s = br.readLine().split(\" \");", "s", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "int x = Integer.parseInt(s[0]);", "x", "Integer.parseInt(s[0])", "Integer.parseInt", "Integer", "s[0]", "s", "0", "int n = Integer.parseInt(s[1]);", "n", "Integer.parseInt(s[1])", "Integer.parseInt", "Integer", "s[1]", "s", "1", "if(n == 0) {\n System.out.print(x);\n return;\n }", "n == 0", "n", "0", "{\n System.out.print(x);\n return;\n }", "System.out.print(x)", "System.out.print", "System.out", "System", "System.out", "x", "return;", "s = br.readLine().split(\" \")", "s", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "HashSet<Integer> set = new HashSet<>();", "set", "new HashSet<>()", "for(int i=0; i<n; i++)\n set.add(Integer.parseInt(s[i]));", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "set.add(Integer.parseInt(s[i]));", "set.add(Integer.parseInt(s[i]))", "set.add", "set", "Integer.parseInt(s[i])", "Integer.parseInt", "Integer", "s[i]", "s", "i", "if(!set.contains(x)) {\n System.out.print(x);\n return;\n }", "!set.contains(x)", "set.contains(x)", "set.contains", "set", "x", "{\n System.out.print(x);\n return;\n }", "System.out.print(x)", "System.out.print", "System.out", "System", "System.out", "x", "return;", "int nearest = 1;", "nearest", "1", "while(true) {\n if(!set.contains(x-nearest)) {\n System.out.print(x-nearest);\n return;\n }\n\n if(!set.contains(x+nearest)) {\n System.out.print(x+nearest);\n return;\n }\n nearest++;\n }", "true", "{\n if(!set.contains(x-nearest)) {\n System.out.print(x-nearest);\n return;\n }\n\n if(!set.contains(x+nearest)) {\n System.out.print(x+nearest);\n return;\n }\n nearest++;\n }", "if(!set.contains(x-nearest)) {\n System.out.print(x-nearest);\n return;\n }", "!set.contains(x-nearest)", "set.contains(x-nearest)", "set.contains", "set", "x-nearest", "x", "nearest", "{\n System.out.print(x-nearest);\n return;\n }", "System.out.print(x-nearest)", "System.out.print", "System.out", "System", "System.out", "x-nearest", "x", "nearest", "return;", "if(!set.contains(x+nearest)) {\n System.out.print(x+nearest);\n return;\n }", "!set.contains(x+nearest)", "set.contains(x+nearest)", "set.contains", "set", "x+nearest", "x", "nearest", "{\n System.out.print(x+nearest);\n return;\n }", "System.out.print(x+nearest)", "System.out.print", "System.out", "System", "System.out", "x+nearest", "x", "nearest", "return;", "nearest++", "nearest", "String[] args", "args", "public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] s = br.readLine().split(\" \");\n int x = Integer.parseInt(s[0]);\n int n = Integer.parseInt(s[1]);\n if(n == 0) {\n System.out.print(x);\n return;\n }\n\n s = br.readLine().split(\" \");\n HashSet<Integer> set = new HashSet<>();\n for(int i=0; i<n; i++)\n set.add(Integer.parseInt(s[i]));\n \n if(!set.contains(x)) {\n System.out.print(x);\n return;\n }\n int nearest = 1;\n while(true) {\n if(!set.contains(x-nearest)) {\n System.out.print(x-nearest);\n return;\n }\n\n if(!set.contains(x+nearest)) {\n System.out.print(x+nearest);\n return;\n }\n nearest++;\n }\n }\n}", "public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] s = br.readLine().split(\" \");\n int x = Integer.parseInt(s[0]);\n int n = Integer.parseInt(s[1]);\n if(n == 0) {\n System.out.print(x);\n return;\n }\n\n s = br.readLine().split(\" \");\n HashSet<Integer> set = new HashSet<>();\n for(int i=0; i<n; i++)\n set.add(Integer.parseInt(s[i]));\n \n if(!set.contains(x)) {\n System.out.print(x);\n return;\n }\n int nearest = 1;\n while(true) {\n if(!set.contains(x-nearest)) {\n System.out.print(x-nearest);\n return;\n }\n\n if(!set.contains(x+nearest)) {\n System.out.print(x+nearest);\n return;\n }\n nearest++;\n }\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.HashSet; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] s = br.readLine().split(" "); int x = Integer.parseInt(s[0]); int n = Integer.parseInt(s[1]); if(n == 0) { System.out.print(x); return; } s = br.readLine().split(" "); HashSet<Integer> set = new HashSet<>(); for(int i=0; i<n; i++) set.add(Integer.parseInt(s[i])); if(!set.contains(x)) { System.out.print(x); return; } int nearest = 1; while(true) { if(!set.contains(x-nearest)) { System.out.print(x-nearest); return; } if(!set.contains(x+nearest)) { System.out.print(x+nearest); return; } nearest++; } } }
[ 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, 20, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 41, 13, 18, 13, 13, 41, 13, 40, 17, 11, 1, 41, 13, 40, 17, 2, 13, 2, 17, 17, 1, 40, 13, 30, 30, 14, 40, 4, 18, 13, 13, 30, 41, 13, 4, 18, 13, 2, 13, 13, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 13, 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 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 117, 14 ], [ 117, 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, 35 ], [ 35, 36 ], [ 35, 37 ], [ 17, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 38, 43 ], [ 43, 44 ], [ 43, 45 ], [ 38, 46 ], [ 46, 47 ], [ 47, 48 ], [ 38, 49 ], [ 50, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 51, 54 ], [ 54, 55 ], [ 55, 56 ], [ 17, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 59, 61 ], [ 17, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 17, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 66, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 74, 76 ], [ 66, 77 ], [ 77, 78 ], [ 78, 79 ], [ 66, 80 ], [ 81, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 82, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 94, 95 ], [ 94, 96 ], [ 88, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 97, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 101, 105 ], [ 105, 106 ], [ 105, 107 ], [ 17, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 108, 113 ], [ 15, 114 ], [ 114, 115 ], [ 0, 116 ], [ 116, 117 ], [ 116, 118 ] ]
[ "import java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.List;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(final String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt(), n = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}\n\t\tint r = Integer.MAX_VALUE;\n\t\tint res = -1;\n\t\tfor (int i=-5;i<=100+5;i++) {\n\t\t\tif (!list.contains(i)) {\n\t\t\tint t = Math.abs(i - x);\n\t\t\t\tif (r > t) {\n\t\t\t\t\tr = t;\n\t\t\t\t\tres = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(res);\n\t}\n}", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.Arrays;", "Arrays", "java.util", "import java.util.List;", "List", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(final String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt(), n = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}\n\t\tint r = Integer.MAX_VALUE;\n\t\tint res = -1;\n\t\tfor (int i=-5;i<=100+5;i++) {\n\t\t\tif (!list.contains(i)) {\n\t\t\tint t = Math.abs(i - x);\n\t\t\t\tif (r > t) {\n\t\t\t\t\tr = t;\n\t\t\t\t\tres = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(res);\n\t}\n}", "Main", "public static void main(final String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt(), n = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}\n\t\tint r = Integer.MAX_VALUE;\n\t\tint res = -1;\n\t\tfor (int i=-5;i<=100+5;i++) {\n\t\t\tif (!list.contains(i)) {\n\t\t\tint t = Math.abs(i - x);\n\t\t\t\tif (r > t) {\n\t\t\t\t\tr = t;\n\t\t\t\t\tres = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(res);\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt(), n = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}\n\t\tint r = Integer.MAX_VALUE;\n\t\tint res = -1;\n\t\tfor (int i=-5;i<=100+5;i++) {\n\t\t\tif (!list.contains(i)) {\n\t\t\tint t = Math.abs(i - x);\n\t\t\t\tif (r > t) {\n\t\t\t\t\tr = t;\n\t\t\t\t\tres = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(res);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x = sc.nextInt()", "x", "sc.nextInt()", "sc.nextInt", "sc", "n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int[] a = new int[n];", "a", "new int[n]", "n", "List<Integer> list = new ArrayList<Integer>();", "list", "new ArrayList<Integer>()", "for (int i = 0; i < n; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tlist.add(sc.nextInt());\n\t\t}", "{\n\t\t\tlist.add(sc.nextInt());\n\t\t}", "list.add(sc.nextInt())", "list.add", "list", "sc.nextInt()", "sc.nextInt", "sc", "int r = Integer.MAX_VALUE;", "r", "Integer.MAX_VALUE", "Integer", "Integer.MAX_VALUE", "int res = -1;", "res", "-1", "1", "for (int i=-5;i<=100+5;i++) {\n\t\t\tif (!list.contains(i)) {\n\t\t\tint t = Math.abs(i - x);\n\t\t\t\tif (r > t) {\n\t\t\t\t\tr = t;\n\t\t\t\t\tres = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i=-5;", "int i=-5;", "i", "-5", "5", "i<=100+5", "i", "100+5", "100", "5", "i++", "i++", "i", "{\n\t\t\tif (!list.contains(i)) {\n\t\t\tint t = Math.abs(i - x);\n\t\t\t\tif (r > t) {\n\t\t\t\t\tr = t;\n\t\t\t\t\tres = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tif (!list.contains(i)) {\n\t\t\tint t = Math.abs(i - x);\n\t\t\t\tif (r > t) {\n\t\t\t\t\tr = t;\n\t\t\t\t\tres = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "if (!list.contains(i)) {\n\t\t\tint t = Math.abs(i - x);\n\t\t\t\tif (r > t) {\n\t\t\t\t\tr = t;\n\t\t\t\t\tres = i;\n\t\t\t\t}\n\t\t\t}", "!list.contains(i)", "list.contains(i)", "list.contains", "list", "i", "{\n\t\t\tint t = Math.abs(i - x);\n\t\t\t\tif (r > t) {\n\t\t\t\t\tr = t;\n\t\t\t\t\tres = i;\n\t\t\t\t}\n\t\t\t}", "int t = Math.abs(i - x);", "t", "Math.abs(i - x)", "Math.abs", "Math", "i - x", "i", "x", "if (r > t) {\n\t\t\t\t\tr = t;\n\t\t\t\t\tres = i;\n\t\t\t\t}", "r > t", "r", "t", "{\n\t\t\t\t\tr = t;\n\t\t\t\t\tres = i;\n\t\t\t\t}", "r = t", "r", "t", "res = i", "res", "i", "System.out.println(res)", "System.out.println", "System.out", "System", "System.out", "res", "final String[] args", "args", "public class Main {\n\n\tpublic static void main(final String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt(), n = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}\n\t\tint r = Integer.MAX_VALUE;\n\t\tint res = -1;\n\t\tfor (int i=-5;i<=100+5;i++) {\n\t\t\tif (!list.contains(i)) {\n\t\t\tint t = Math.abs(i - x);\n\t\t\t\tif (r > t) {\n\t\t\t\t\tr = t;\n\t\t\t\t\tres = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(res);\n\t}\n}", "public class Main {\n\n\tpublic static void main(final String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt(), n = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}\n\t\tint r = Integer.MAX_VALUE;\n\t\tint res = -1;\n\t\tfor (int i=-5;i<=100+5;i++) {\n\t\t\tif (!list.contains(i)) {\n\t\t\tint t = Math.abs(i - x);\n\t\t\t\tif (r > t) {\n\t\t\t\t\tr = t;\n\t\t\t\t\tres = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(res);\n\t}\n}", "Main" ]
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Scanner; public class Main { public static void main(final String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(), n = sc.nextInt(); int[] a = new int[n]; List<Integer> list = new ArrayList<Integer>(); for (int i = 0; i < n; i++) { list.add(sc.nextInt()); } int r = Integer.MAX_VALUE; int res = -1; for (int i=-5;i<=100+5;i++) { if (!list.contains(i)) { int t = Math.abs(i - x); if (r > t) { r = t; res = i; } } } System.out.println(res); } }
[ 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, 13, 41, 13, 17, 14, 2, 13, 17, 29, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 17, 30, 0, 13, 2, 13, 13, 14, 2, 13, 13, 30, 40, 13, 40, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 4, 18, 13, 13, 41, 13, 17, 41, 13, 17, 42, 2, 13, 17, 30, 14, 40, 4, 18, 13, 2, 13, 13, 30, 0, 13, 17, 4, 18, 18, 13, 13, 2, 13, 13, 14, 40, 4, 18, 13, 2, 13, 13, 30, 0, 13, 17, 4, 18, 18, 13, 13, 2, 13, 13, 40, 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, 12, 13, 30, 29, 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 ], [ 22, 23 ], [ 22, 24 ], [ 0, 25 ], [ 272, 26 ], [ 272, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 29, 33 ], [ 33, 34 ], [ 33, 35 ], [ 29, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 36, 40 ], [ 40, 41 ], [ 29, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 42, 47 ], [ 47, 48 ], [ 47, 49 ], [ 42, 50 ], [ 50, 51 ], [ 51, 52 ], [ 42, 53 ], [ 54, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 56, 60 ], [ 55, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 64, 66 ], [ 61, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 67, 71 ], [ 71, 72 ], [ 72, 73 ], [ 61, 74 ], [ 74, 75 ], [ 29, 76 ], [ 76, 77 ], [ 27, 78 ], [ 78, 79 ], [ 272, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 82, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 89, 90 ], [ 82, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 94, 95 ], [ 82, 96 ], [ 96, 97 ], [ 96, 98 ], [ 82, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 99, 104 ], [ 104, 105 ], [ 104, 106 ], [ 99, 107 ], [ 107, 108 ], [ 108, 109 ], [ 99, 110 ], [ 111, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 114, 115 ], [ 115, 116 ], [ 111, 117 ], [ 117, 118 ], [ 118, 119 ], [ 117, 120 ], [ 82, 121 ], [ 121, 122 ], [ 121, 123 ], [ 82, 124 ], [ 124, 125 ], [ 124, 126 ], [ 82, 127 ], [ 127, 128 ], [ 128, 129 ], [ 128, 130 ], [ 127, 131 ], [ 131, 132 ], [ 132, 133 ], [ 133, 134 ], [ 134, 135 ], [ 135, 136 ], [ 134, 137 ], [ 137, 138 ], [ 137, 139 ], [ 132, 140 ], [ 140, 141 ], [ 141, 142 ], [ 141, 143 ], [ 140, 144 ], [ 144, 145 ], [ 145, 146 ], [ 146, 147 ], [ 146, 148 ], [ 144, 149 ], [ 149, 150 ], [ 149, 151 ], [ 132, 152 ], [ 152, 153 ], [ 153, 154 ], [ 154, 155 ], [ 155, 156 ], [ 154, 157 ], [ 157, 158 ], [ 157, 159 ], [ 152, 160 ], [ 160, 161 ], [ 161, 162 ], [ 161, 163 ], [ 160, 164 ], [ 164, 165 ], [ 165, 166 ], [ 166, 167 ], [ 166, 168 ], [ 164, 169 ], [ 169, 170 ], [ 169, 171 ], [ 131, 172 ], [ 172, 173 ], [ 80, 174 ], [ 174, 175 ], [ 272, 176 ], [ 176, 177 ], [ 176, 178 ], [ 178, 179 ], [ 176, 180 ], [ 180, 181 ], [ 176, 182 ], [ 182, 183 ], [ 182, 184 ], [ 184, 185 ], [ 185, 186 ], [ 185, 187 ], [ 176, 188 ], [ 188, 189 ], [ 188, 190 ], [ 190, 191 ], [ 191, 192 ], [ 192, 193 ], [ 193, 194 ], [ 193, 195 ], [ 192, 196 ], [ 196, 197 ], [ 197, 198 ], [ 198, 199 ], [ 191, 200 ], [ 200, 201 ], [ 201, 202 ], [ 202, 203 ], [ 202, 204 ], [ 204, 205 ], [ 205, 206 ], [ 206, 207 ], [ 201, 208 ], [ 208, 209 ], [ 209, 210 ], [ 209, 211 ], [ 190, 212 ], [ 212, 213 ], [ 213, 214 ], [ 214, 215 ], [ 176, 216 ], [ 216, 217 ], [ 216, 218 ], [ 218, 219 ], [ 219, 220 ], [ 220, 221 ], [ 221, 222 ], [ 220, 223 ], [ 223, 224 ], [ 176, 225 ], [ 225, 226 ], [ 225, 227 ], [ 227, 228 ], [ 228, 229 ], [ 229, 230 ], [ 230, 231 ], [ 229, 232 ], [ 232, 233 ], [ 176, 234 ], [ 234, 235 ], [ 234, 236 ], [ 236, 237 ], [ 237, 238 ], [ 238, 239 ], [ 239, 240 ], [ 238, 241 ], [ 241, 242 ], [ 176, 243 ], [ 243, 244 ], [ 243, 245 ], [ 245, 246 ], [ 246, 247 ], [ 246, 248 ], [ 245, 249 ], [ 249, 250 ], [ 250, 251 ], [ 250, 252 ], [ 252, 253 ], [ 253, 254 ], [ 254, 255 ], [ 249, 256 ], [ 256, 257 ], [ 257, 258 ], [ 257, 259 ], [ 259, 260 ], [ 260, 261 ], [ 245, 262 ], [ 262, 263 ], [ 176, 264 ], [ 264, 265 ], [ 264, 266 ], [ 266, 267 ], [ 267, 268 ], [ 264, 269 ], [ 269, 270 ], [ 0, 271 ], [ 271, 272 ], [ 271, 273 ] ]
[ "import java.io.BufferedReader;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.List;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Scanner;\nimport java.util.StringTokenizer;\n\n\npublic class Main {\n\t static class FastReader \n\t { \n\t BufferedReader br; \n\t StringTokenizer st; \n\t \n\t \n\t public FastReader() \n\t { \n\t br = new BufferedReader(new\n\t InputStreamReader(System.in)); \n\t } \n\t \n\t String next() \n\t { \n\t while (st == null || !st.hasMoreTokens()) \n\t { \n\t try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t } \n\t return st.nextToken();\n\t \n\t } \n\t \n\t int nextInt() \n\t { \n\t return Integer.parseInt(next()); \n\t } \n\t \n\t long nextLong() \n\t { \n\t return Long.parseLong(next()); \n\t } \n\t \n\t double nextDouble() \n\t { \n\t return Double.parseDouble(next()); \n\t } \n\t \n\t String nextLine() \n\t { \n\t String str = \"\"; \n\t try\n\t { \n\t str = br.readLine(); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t return str; \n\t }\n\n\t\t\tpublic Character charAt(int i) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn null;\n\t\t\t} \n\t } \n\t static int divisors(long x) {\n\t\t long limit = x;\n\t\t int numberOfDivisors = 0;\n\n\t\t if (x == 1) return 1;\n\n\t\t for (int i = 1; i < limit; ++i) {\n\t\t if (x % i == 0) {\n\t\t limit = x / i;\n\t\t if (limit != i) {\n\t\t numberOfDivisors++;\n\t\t }\n\t\t numberOfDivisors++;\n\t\t }\n\t\t }\n\n\t\t return numberOfDivisors;\n\t\t} \n\tpublic static void main(String[] args)throws IOException {\n\t\tFastReader s=new FastReader();\t\t\n\t\tint x = s.nextInt();\n\t\tint n = s.nextInt();\n\t\tList<Integer> ar = new ArrayList<>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint p =s.nextInt();\n\t\t\tar.add(p);\n\t\t}\n\t\tint flag=0,i=0;\n\t\twhile(flag==0) {\n\t\t\tif(!ar.contains(x-i)) {\n\t\t\t\tflag=1;\n\t\t\t\tSystem.out.println(x-i);\n\t\t\t}\n\t\t\telse if(!ar.contains(x+i)) {\n\t\t\t\tflag=1;\n\t\t\t\tSystem.out.println(x+i);\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t}\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.Arrays;", "Arrays", "java.util", "import java.util.List;", "List", "java.util", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.StringTokenizer;", "StringTokenizer", "java.util", "public class Main {\n\t static class FastReader \n\t { \n\t BufferedReader br; \n\t StringTokenizer st; \n\t \n\t \n\t public FastReader() \n\t { \n\t br = new BufferedReader(new\n\t InputStreamReader(System.in)); \n\t } \n\t \n\t String next() \n\t { \n\t while (st == null || !st.hasMoreTokens()) \n\t { \n\t try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t } \n\t return st.nextToken();\n\t \n\t } \n\t \n\t int nextInt() \n\t { \n\t return Integer.parseInt(next()); \n\t } \n\t \n\t long nextLong() \n\t { \n\t return Long.parseLong(next()); \n\t } \n\t \n\t double nextDouble() \n\t { \n\t return Double.parseDouble(next()); \n\t } \n\t \n\t String nextLine() \n\t { \n\t String str = \"\"; \n\t try\n\t { \n\t str = br.readLine(); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t return str; \n\t }\n\n\t\t\tpublic Character charAt(int i) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn null;\n\t\t\t} \n\t } \n\t static int divisors(long x) {\n\t\t long limit = x;\n\t\t int numberOfDivisors = 0;\n\n\t\t if (x == 1) return 1;\n\n\t\t for (int i = 1; i < limit; ++i) {\n\t\t if (x % i == 0) {\n\t\t limit = x / i;\n\t\t if (limit != i) {\n\t\t numberOfDivisors++;\n\t\t }\n\t\t numberOfDivisors++;\n\t\t }\n\t\t }\n\n\t\t return numberOfDivisors;\n\t\t} \n\tpublic static void main(String[] args)throws IOException {\n\t\tFastReader s=new FastReader();\t\t\n\t\tint x = s.nextInt();\n\t\tint n = s.nextInt();\n\t\tList<Integer> ar = new ArrayList<>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint p =s.nextInt();\n\t\t\tar.add(p);\n\t\t}\n\t\tint flag=0,i=0;\n\t\twhile(flag==0) {\n\t\t\tif(!ar.contains(x-i)) {\n\t\t\t\tflag=1;\n\t\t\t\tSystem.out.println(x-i);\n\t\t\t}\n\t\t\telse if(!ar.contains(x+i)) {\n\t\t\t\tflag=1;\n\t\t\t\tSystem.out.println(x+i);\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t}\n}", "Main", "static int divisors(long x) {\n\t\t long limit = x;\n\t\t int numberOfDivisors = 0;\n\n\t\t if (x == 1) return 1;\n\n\t\t for (int i = 1; i < limit; ++i) {\n\t\t if (x % i == 0) {\n\t\t limit = x / i;\n\t\t if (limit != i) {\n\t\t numberOfDivisors++;\n\t\t }\n\t\t numberOfDivisors++;\n\t\t }\n\t\t }\n\n\t\t return numberOfDivisors;\n\t\t}", "divisors", "{\n\t\t long limit = x;\n\t\t int numberOfDivisors = 0;\n\n\t\t if (x == 1) return 1;\n\n\t\t for (int i = 1; i < limit; ++i) {\n\t\t if (x % i == 0) {\n\t\t limit = x / i;\n\t\t if (limit != i) {\n\t\t numberOfDivisors++;\n\t\t }\n\t\t numberOfDivisors++;\n\t\t }\n\t\t }\n\n\t\t return numberOfDivisors;\n\t\t}", "long limit = x;", "limit", "x", "int numberOfDivisors = 0;", "numberOfDivisors", "0", "if (x == 1) return 1;", "x == 1", "x", "1", "return 1;", "1", "for (int i = 1; i < limit; ++i) {\n\t\t if (x % i == 0) {\n\t\t limit = x / i;\n\t\t if (limit != i) {\n\t\t numberOfDivisors++;\n\t\t }\n\t\t numberOfDivisors++;\n\t\t }\n\t\t }", "int i = 1;", "int i = 1;", "i", "1", "i < limit", "i", "limit", "++i", "++i", "i", "{\n\t\t if (x % i == 0) {\n\t\t limit = x / i;\n\t\t if (limit != i) {\n\t\t numberOfDivisors++;\n\t\t }\n\t\t numberOfDivisors++;\n\t\t }\n\t\t }", "{\n\t\t if (x % i == 0) {\n\t\t limit = x / i;\n\t\t if (limit != i) {\n\t\t numberOfDivisors++;\n\t\t }\n\t\t numberOfDivisors++;\n\t\t }\n\t\t }", "if (x % i == 0) {\n\t\t limit = x / i;\n\t\t if (limit != i) {\n\t\t numberOfDivisors++;\n\t\t }\n\t\t numberOfDivisors++;\n\t\t }", "x % i == 0", "x % i", "x", "i", "0", "{\n\t\t limit = x / i;\n\t\t if (limit != i) {\n\t\t numberOfDivisors++;\n\t\t }\n\t\t numberOfDivisors++;\n\t\t }", "limit = x / i", "limit", "x / i", "x", "i", "if (limit != i) {\n\t\t numberOfDivisors++;\n\t\t }", "limit != i", "limit", "i", "{\n\t\t numberOfDivisors++;\n\t\t }", "numberOfDivisors++", "numberOfDivisors", "numberOfDivisors++", "numberOfDivisors", "return numberOfDivisors;", "numberOfDivisors", "long x", "x", "public static void main(String[] args)throws IOException {\n\t\tFastReader s=new FastReader();\t\t\n\t\tint x = s.nextInt();\n\t\tint n = s.nextInt();\n\t\tList<Integer> ar = new ArrayList<>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint p =s.nextInt();\n\t\t\tar.add(p);\n\t\t}\n\t\tint flag=0,i=0;\n\t\twhile(flag==0) {\n\t\t\tif(!ar.contains(x-i)) {\n\t\t\t\tflag=1;\n\t\t\t\tSystem.out.println(x-i);\n\t\t\t}\n\t\t\telse if(!ar.contains(x+i)) {\n\t\t\t\tflag=1;\n\t\t\t\tSystem.out.println(x+i);\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t}", "main", "{\n\t\tFastReader s=new FastReader();\t\t\n\t\tint x = s.nextInt();\n\t\tint n = s.nextInt();\n\t\tList<Integer> ar = new ArrayList<>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint p =s.nextInt();\n\t\t\tar.add(p);\n\t\t}\n\t\tint flag=0,i=0;\n\t\twhile(flag==0) {\n\t\t\tif(!ar.contains(x-i)) {\n\t\t\t\tflag=1;\n\t\t\t\tSystem.out.println(x-i);\n\t\t\t}\n\t\t\telse if(!ar.contains(x+i)) {\n\t\t\t\tflag=1;\n\t\t\t\tSystem.out.println(x+i);\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t}", "FastReader s=new FastReader();", "s", "new FastReader()", "int x = s.nextInt();", "x", "s.nextInt()", "s.nextInt", "s", "int n = s.nextInt();", "n", "s.nextInt()", "s.nextInt", "s", "List<Integer> ar = new ArrayList<>();", "ar", "new ArrayList<>()", "for(int i=0;i<n;i++) {\n\t\t\tint p =s.nextInt();\n\t\t\tar.add(p);\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t\t\tint p =s.nextInt();\n\t\t\tar.add(p);\n\t\t}", "{\n\t\t\tint p =s.nextInt();\n\t\t\tar.add(p);\n\t\t}", "int p =s.nextInt();", "p", "s.nextInt()", "s.nextInt", "s", "ar.add(p)", "ar.add", "ar", "p", "int flag=0", "flag", "0", "i=0;", "i", "0", "while(flag==0) {\n\t\t\tif(!ar.contains(x-i)) {\n\t\t\t\tflag=1;\n\t\t\t\tSystem.out.println(x-i);\n\t\t\t}\n\t\t\telse if(!ar.contains(x+i)) {\n\t\t\t\tflag=1;\n\t\t\t\tSystem.out.println(x+i);\n\t\t\t}\n\t\t\ti++;\n\t\t}", "flag==0", "flag", "0", "{\n\t\t\tif(!ar.contains(x-i)) {\n\t\t\t\tflag=1;\n\t\t\t\tSystem.out.println(x-i);\n\t\t\t}\n\t\t\telse if(!ar.contains(x+i)) {\n\t\t\t\tflag=1;\n\t\t\t\tSystem.out.println(x+i);\n\t\t\t}\n\t\t\ti++;\n\t\t}", "if(!ar.contains(x-i)) {\n\t\t\t\tflag=1;\n\t\t\t\tSystem.out.println(x-i);\n\t\t\t}\n\t\t\telse if(!ar.contains(x+i)) {\n\t\t\t\tflag=1;\n\t\t\t\tSystem.out.println(x+i);\n\t\t\t}", "!ar.contains(x-i)", "ar.contains(x-i)", "ar.contains", "ar", "x-i", "x", "i", "{\n\t\t\t\tflag=1;\n\t\t\t\tSystem.out.println(x-i);\n\t\t\t}", "flag=1", "flag", "1", "System.out.println(x-i)", "System.out.println", "System.out", "System", "System.out", "x-i", "x", "i", "if(!ar.contains(x+i)) {\n\t\t\t\tflag=1;\n\t\t\t\tSystem.out.println(x+i);\n\t\t\t}", "!ar.contains(x+i)", "ar.contains(x+i)", "ar.contains", "ar", "x+i", "x", "i", "{\n\t\t\t\tflag=1;\n\t\t\t\tSystem.out.println(x+i);\n\t\t\t}", "flag=1", "flag", "1", "System.out.println(x+i)", "System.out.println", "System.out", "System", "System.out", "x+i", "x", "i", "i++", "i", "String[] args", "args", "static class FastReader \n\t { \n\t BufferedReader br; \n\t StringTokenizer st; \n\t \n\t \n\t public FastReader() \n\t { \n\t br = new BufferedReader(new\n\t InputStreamReader(System.in)); \n\t } \n\t \n\t String next() \n\t { \n\t while (st == null || !st.hasMoreTokens()) \n\t { \n\t try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t } \n\t return st.nextToken();\n\t \n\t } \n\t \n\t int nextInt() \n\t { \n\t return Integer.parseInt(next()); \n\t } \n\t \n\t long nextLong() \n\t { \n\t return Long.parseLong(next()); \n\t } \n\t \n\t double nextDouble() \n\t { \n\t return Double.parseDouble(next()); \n\t } \n\t \n\t String nextLine() \n\t { \n\t String str = \"\"; \n\t try\n\t { \n\t str = br.readLine(); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t return str; \n\t }\n\n\t\t\tpublic Character charAt(int i) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn null;\n\t\t\t} \n\t }", "FastReader", "BufferedReader br;", "br", "StringTokenizer st;", "st", "public FastReader() \n\t { \n\t br = new BufferedReader(new\n\t InputStreamReader(System.in)); \n\t }", "FastReader", "{ \n\t br = new BufferedReader(new\n\t InputStreamReader(System.in)); \n\t }", "br = new BufferedReader(new\n\t InputStreamReader(System.in))", "br", "new BufferedReader(new\n\t InputStreamReader(System.in))", "String next() \n\t { \n\t while (st == null || !st.hasMoreTokens()) \n\t { \n\t try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t } \n\t return st.nextToken();\n\t \n\t }", "next", "{ \n\t while (st == null || !st.hasMoreTokens()) \n\t { \n\t try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t } \n\t return st.nextToken();\n\t \n\t }", "while (st == null || !st.hasMoreTokens()) \n\t { \n\t try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t }", "st == null || !st.hasMoreTokens()", "st == null", "st", "null", "!st.hasMoreTokens()", "st.hasMoreTokens()", "st.hasMoreTokens", "st", "{ \n\t try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t }", "try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t }", "catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t }", "IOException e", "{ \n\t e.printStackTrace(); \n\t }", "e.printStackTrace()", "e.printStackTrace", "e", "{ \n\t st = new StringTokenizer(br.readLine()); \n\t }", "st = new StringTokenizer(br.readLine())", "st", "new StringTokenizer(br.readLine())", "return st.nextToken();", "st.nextToken()", "st.nextToken", "st", "int nextInt() \n\t { \n\t return Integer.parseInt(next()); \n\t }", "nextInt", "{ \n\t return Integer.parseInt(next()); \n\t }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "long nextLong() \n\t { \n\t return Long.parseLong(next()); \n\t }", "nextLong", "{ \n\t return Long.parseLong(next()); \n\t }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "double nextDouble() \n\t { \n\t return Double.parseDouble(next()); \n\t }", "nextDouble", "{ \n\t return Double.parseDouble(next()); \n\t }", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "String nextLine() \n\t { \n\t String str = \"\"; \n\t try\n\t { \n\t str = br.readLine(); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t return str; \n\t }", "nextLine", "{ \n\t String str = \"\"; \n\t try\n\t { \n\t str = br.readLine(); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t return str; \n\t }", "String str = \"\";", "str", "\"\"", "try\n\t { \n\t str = br.readLine(); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t }", "catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t }", "IOException e", "{ \n\t e.printStackTrace(); \n\t }", "e.printStackTrace()", "e.printStackTrace", "e", "{ \n\t str = br.readLine(); \n\t }", "str = br.readLine()", "str", "br.readLine()", "br.readLine", "br", "return str;", "str", "public Character charAt(int i) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn null;\n\t\t\t}", "charAt", "{\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn null;\n\t\t\t}", "return null;", "null", "int i", "i", "public class Main {\n\t static class FastReader \n\t { \n\t BufferedReader br; \n\t StringTokenizer st; \n\t \n\t \n\t public FastReader() \n\t { \n\t br = new BufferedReader(new\n\t InputStreamReader(System.in)); \n\t } \n\t \n\t String next() \n\t { \n\t while (st == null || !st.hasMoreTokens()) \n\t { \n\t try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t } \n\t return st.nextToken();\n\t \n\t } \n\t \n\t int nextInt() \n\t { \n\t return Integer.parseInt(next()); \n\t } \n\t \n\t long nextLong() \n\t { \n\t return Long.parseLong(next()); \n\t } \n\t \n\t double nextDouble() \n\t { \n\t return Double.parseDouble(next()); \n\t } \n\t \n\t String nextLine() \n\t { \n\t String str = \"\"; \n\t try\n\t { \n\t str = br.readLine(); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t return str; \n\t }\n\n\t\t\tpublic Character charAt(int i) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn null;\n\t\t\t} \n\t } \n\t static int divisors(long x) {\n\t\t long limit = x;\n\t\t int numberOfDivisors = 0;\n\n\t\t if (x == 1) return 1;\n\n\t\t for (int i = 1; i < limit; ++i) {\n\t\t if (x % i == 0) {\n\t\t limit = x / i;\n\t\t if (limit != i) {\n\t\t numberOfDivisors++;\n\t\t }\n\t\t numberOfDivisors++;\n\t\t }\n\t\t }\n\n\t\t return numberOfDivisors;\n\t\t} \n\tpublic static void main(String[] args)throws IOException {\n\t\tFastReader s=new FastReader();\t\t\n\t\tint x = s.nextInt();\n\t\tint n = s.nextInt();\n\t\tList<Integer> ar = new ArrayList<>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint p =s.nextInt();\n\t\t\tar.add(p);\n\t\t}\n\t\tint flag=0,i=0;\n\t\twhile(flag==0) {\n\t\t\tif(!ar.contains(x-i)) {\n\t\t\t\tflag=1;\n\t\t\t\tSystem.out.println(x-i);\n\t\t\t}\n\t\t\telse if(!ar.contains(x+i)) {\n\t\t\t\tflag=1;\n\t\t\t\tSystem.out.println(x+i);\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t}\n}", "public class Main {\n\t static class FastReader \n\t { \n\t BufferedReader br; \n\t StringTokenizer st; \n\t \n\t \n\t public FastReader() \n\t { \n\t br = new BufferedReader(new\n\t InputStreamReader(System.in)); \n\t } \n\t \n\t String next() \n\t { \n\t while (st == null || !st.hasMoreTokens()) \n\t { \n\t try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t } \n\t return st.nextToken();\n\t \n\t } \n\t \n\t int nextInt() \n\t { \n\t return Integer.parseInt(next()); \n\t } \n\t \n\t long nextLong() \n\t { \n\t return Long.parseLong(next()); \n\t } \n\t \n\t double nextDouble() \n\t { \n\t return Double.parseDouble(next()); \n\t } \n\t \n\t String nextLine() \n\t { \n\t String str = \"\"; \n\t try\n\t { \n\t str = br.readLine(); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t return str; \n\t }\n\n\t\t\tpublic Character charAt(int i) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn null;\n\t\t\t} \n\t } \n\t static int divisors(long x) {\n\t\t long limit = x;\n\t\t int numberOfDivisors = 0;\n\n\t\t if (x == 1) return 1;\n\n\t\t for (int i = 1; i < limit; ++i) {\n\t\t if (x % i == 0) {\n\t\t limit = x / i;\n\t\t if (limit != i) {\n\t\t numberOfDivisors++;\n\t\t }\n\t\t numberOfDivisors++;\n\t\t }\n\t\t }\n\n\t\t return numberOfDivisors;\n\t\t} \n\tpublic static void main(String[] args)throws IOException {\n\t\tFastReader s=new FastReader();\t\t\n\t\tint x = s.nextInt();\n\t\tint n = s.nextInt();\n\t\tList<Integer> ar = new ArrayList<>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint p =s.nextInt();\n\t\t\tar.add(p);\n\t\t}\n\t\tint flag=0,i=0;\n\t\twhile(flag==0) {\n\t\t\tif(!ar.contains(x-i)) {\n\t\t\t\tflag=1;\n\t\t\t\tSystem.out.println(x-i);\n\t\t\t}\n\t\t\telse if(!ar.contains(x+i)) {\n\t\t\t\tflag=1;\n\t\t\t\tSystem.out.println(x+i);\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t}\n}", "Main" ]
import java.io.BufferedReader; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.io.IOException; import java.io.InputStreamReader; import java.util.Scanner; import java.util.StringTokenizer; 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.hasMoreTokens()) { 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 Character charAt(int i) { // TODO Auto-generated method stub return null; } } static int divisors(long x) { long limit = x; int numberOfDivisors = 0; if (x == 1) return 1; for (int i = 1; i < limit; ++i) { if (x % i == 0) { limit = x / i; if (limit != i) { numberOfDivisors++; } numberOfDivisors++; } } return numberOfDivisors; } public static void main(String[] args)throws IOException { FastReader s=new FastReader(); int x = s.nextInt(); int n = s.nextInt(); List<Integer> ar = new ArrayList<>(); for(int i=0;i<n;i++) { int p =s.nextInt(); ar.add(p); } int flag=0,i=0; while(flag==0) { if(!ar.contains(x-i)) { flag=1; System.out.println(x-i); } else if(!ar.contains(x+i)) { flag=1; System.out.println(x+i); } i++; } } }
[ 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, 20, 2, 13, 17, 41, 13, 20, 17, 41, 13, 20, 17, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, 41, 13, 17, 0, 18, 13, 17, 17, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 2, 18, 13, 13, 13, 14, 2, 13, 17, 30, 0, 18, 13, 13, 17, 30, 0, 13, 2, 13, 40, 17, 0, 18, 13, 13, 17, 41, 13, 17, 11, 1, 0, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 2, 18, 13, 13, 17, 30, 0, 13, 40, 13, 3, 14, 2, 18, 13, 13, 17, 30, 0, 13, 13, 3, 14, 2, 13, 13, 30, 3, 41, 13, 2, 13, 13, 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 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 174, 17 ], [ 174, 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 ], [ 37, 38 ], [ 37, 39 ], [ 20, 40 ], [ 40, 41 ], [ 40, 42 ], [ 20, 44 ], [ 44, 45 ], [ 44, 46 ], [ 20, 48 ], [ 48, 49 ], [ 49, 50 ], [ 48, 51 ], [ 48, 52 ], [ 20, 53 ], [ 53, 54 ], [ 54, 55 ], [ 53, 56 ], [ 53, 57 ], [ 20, 58 ], [ 58, 59 ], [ 58, 60 ], [ 20, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 61, 65 ], [ 20, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 71, 72 ], [ 71, 73 ], [ 66, 74 ], [ 74, 75 ], [ 75, 76 ], [ 66, 77 ], [ 78, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 79, 83 ], [ 83, 84 ], [ 84, 85 ], [ 78, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 88, 92 ], [ 78, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 93, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 98, 102 ], [ 93, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 103, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 110, 114 ], [ 20, 115 ], [ 115, 116 ], [ 115, 117 ], [ 20, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 120, 122 ], [ 118, 123 ], [ 123, 124 ], [ 123, 125 ], [ 118, 126 ], [ 126, 127 ], [ 127, 128 ], [ 118, 129 ], [ 130, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 133, 134 ], [ 133, 135 ], [ 132, 136 ], [ 131, 137 ], [ 137, 138 ], [ 138, 139 ], [ 138, 140 ], [ 140, 141 ], [ 137, 142 ], [ 131, 143 ], [ 143, 144 ], [ 144, 145 ], [ 145, 146 ], [ 145, 147 ], [ 144, 148 ], [ 143, 149 ], [ 149, 150 ], [ 150, 151 ], [ 150, 152 ], [ 149, 153 ], [ 143, 154 ], [ 154, 155 ], [ 155, 156 ], [ 155, 157 ], [ 154, 158 ], [ 158, 159 ], [ 20, 160 ], [ 160, 161 ], [ 160, 162 ], [ 162, 163 ], [ 162, 164 ], [ 20, 165 ], [ 165, 166 ], [ 166, 167 ], [ 167, 168 ], [ 167, 169 ], [ 165, 170 ], [ 18, 171 ], [ 171, 172 ], [ 0, 173 ], [ 173, 174 ], [ 173, 175 ] ]
[ "import java.io.*;\nimport java.util.Scanner;\nimport java.util.Arrays;\nimport java.util.ArrayList;\nimport java.math.BigDecimal;\n\npublic class Main{\n\n public static void main(String[] args){\n //START\n\n Scanner sc=new Scanner(System.in);\n\n int X=sc.nextInt();\n int N=sc.nextInt();\n\n int[] p=new int[N+10];\n\n int[] up=new int[200];\n int[] dw=new int[200];\n\n Arrays.fill(up, 0);\n Arrays.fill(dw, 0);\n\n int i=0;\n dw[0]=1;\n\n for(i=0;i<N;i++){\n p[i]=sc.nextInt();\n int sa=p[i]-X;\n\n if(sa>=0){\n up[sa]=1;\n //System.out.println(\"plus\");\n }else{\n sa=sa*(-1);\n dw[sa]=1;\n //System.out.println(\"minus\");\n }\n //System.out.println(dw[1]);\n }\n\n int hit=0;\n\n for(i=0;i<100;i++){\n if(dw[i]==0){\n hit=-i;\n //System.out.println(hit);\n break;\n }else if(up[i]==0){\n hit=i;\n //System.out.println(hit);\n break;\n }else if(i==X){\n //System.out.println(\"a\"+\"0\");\n break;\n }\n }\n\n int ans=X+hit;\n\n //if(i!=X){\n System.out.println(ans);\n //}\n\n //END\n }\n}\n\n\n", "import java.io.*;", "io.*", "java", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.Arrays;", "Arrays", "java.util", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.math.BigDecimal;", "BigDecimal", "java.math", "public class Main{\n\n public static void main(String[] args){\n //START\n\n Scanner sc=new Scanner(System.in);\n\n int X=sc.nextInt();\n int N=sc.nextInt();\n\n int[] p=new int[N+10];\n\n int[] up=new int[200];\n int[] dw=new int[200];\n\n Arrays.fill(up, 0);\n Arrays.fill(dw, 0);\n\n int i=0;\n dw[0]=1;\n\n for(i=0;i<N;i++){\n p[i]=sc.nextInt();\n int sa=p[i]-X;\n\n if(sa>=0){\n up[sa]=1;\n //System.out.println(\"plus\");\n }else{\n sa=sa*(-1);\n dw[sa]=1;\n //System.out.println(\"minus\");\n }\n //System.out.println(dw[1]);\n }\n\n int hit=0;\n\n for(i=0;i<100;i++){\n if(dw[i]==0){\n hit=-i;\n //System.out.println(hit);\n break;\n }else if(up[i]==0){\n hit=i;\n //System.out.println(hit);\n break;\n }else if(i==X){\n //System.out.println(\"a\"+\"0\");\n break;\n }\n }\n\n int ans=X+hit;\n\n //if(i!=X){\n System.out.println(ans);\n //}\n\n //END\n }\n}", "Main", "public static void main(String[] args){\n //START\n\n Scanner sc=new Scanner(System.in);\n\n int X=sc.nextInt();\n int N=sc.nextInt();\n\n int[] p=new int[N+10];\n\n int[] up=new int[200];\n int[] dw=new int[200];\n\n Arrays.fill(up, 0);\n Arrays.fill(dw, 0);\n\n int i=0;\n dw[0]=1;\n\n for(i=0;i<N;i++){\n p[i]=sc.nextInt();\n int sa=p[i]-X;\n\n if(sa>=0){\n up[sa]=1;\n //System.out.println(\"plus\");\n }else{\n sa=sa*(-1);\n dw[sa]=1;\n //System.out.println(\"minus\");\n }\n //System.out.println(dw[1]);\n }\n\n int hit=0;\n\n for(i=0;i<100;i++){\n if(dw[i]==0){\n hit=-i;\n //System.out.println(hit);\n break;\n }else if(up[i]==0){\n hit=i;\n //System.out.println(hit);\n break;\n }else if(i==X){\n //System.out.println(\"a\"+\"0\");\n break;\n }\n }\n\n int ans=X+hit;\n\n //if(i!=X){\n System.out.println(ans);\n //}\n\n //END\n }", "main", "{\n //START\n\n Scanner sc=new Scanner(System.in);\n\n int X=sc.nextInt();\n int N=sc.nextInt();\n\n int[] p=new int[N+10];\n\n int[] up=new int[200];\n int[] dw=new int[200];\n\n Arrays.fill(up, 0);\n Arrays.fill(dw, 0);\n\n int i=0;\n dw[0]=1;\n\n for(i=0;i<N;i++){\n p[i]=sc.nextInt();\n int sa=p[i]-X;\n\n if(sa>=0){\n up[sa]=1;\n //System.out.println(\"plus\");\n }else{\n sa=sa*(-1);\n dw[sa]=1;\n //System.out.println(\"minus\");\n }\n //System.out.println(dw[1]);\n }\n\n int hit=0;\n\n for(i=0;i<100;i++){\n if(dw[i]==0){\n hit=-i;\n //System.out.println(hit);\n break;\n }else if(up[i]==0){\n hit=i;\n //System.out.println(hit);\n break;\n }else if(i==X){\n //System.out.println(\"a\"+\"0\");\n break;\n }\n }\n\n int ans=X+hit;\n\n //if(i!=X){\n System.out.println(ans);\n //}\n\n //END\n }", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "int X=sc.nextInt();", "X", "sc.nextInt()", "sc.nextInt", "sc", "int N=sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int[] p=new int[N+10];", "p", "new int[N+10]", "N+10", "N", "10", "int[] up=new int[200];", "up", "new int[200]", "200", "int[] dw=new int[200];", "dw", "new int[200]", "200", "Arrays.fill(up, 0)", "Arrays.fill", "Arrays", "up", "0", "Arrays.fill(dw, 0)", "Arrays.fill", "Arrays", "dw", "0", "int i=0;", "i", "0", "dw[0]=1", "dw[0]", "dw", "0", "1", "for(i=0;i<N;i++){\n p[i]=sc.nextInt();\n int sa=p[i]-X;\n\n if(sa>=0){\n up[sa]=1;\n //System.out.println(\"plus\");\n }else{\n sa=sa*(-1);\n dw[sa]=1;\n //System.out.println(\"minus\");\n }\n //System.out.println(dw[1]);\n }", "i=0;", "i=0", "i", "0", "i<N", "i", "N", "i++", "i++", "i", "{\n p[i]=sc.nextInt();\n int sa=p[i]-X;\n\n if(sa>=0){\n up[sa]=1;\n //System.out.println(\"plus\");\n }else{\n sa=sa*(-1);\n dw[sa]=1;\n //System.out.println(\"minus\");\n }\n //System.out.println(dw[1]);\n }", "{\n p[i]=sc.nextInt();\n int sa=p[i]-X;\n\n if(sa>=0){\n up[sa]=1;\n //System.out.println(\"plus\");\n }else{\n sa=sa*(-1);\n dw[sa]=1;\n //System.out.println(\"minus\");\n }\n //System.out.println(dw[1]);\n }", "p[i]=sc.nextInt()", "p[i]", "p", "i", "sc.nextInt()", "sc.nextInt", "sc", "int sa=p[i]-X;", "sa", "p[i]-X", "p[i]", "p", "i", "X", "if(sa>=0){\n up[sa]=1;\n //System.out.println(\"plus\");\n }else{\n sa=sa*(-1);\n dw[sa]=1;\n //System.out.println(\"minus\");\n }", "sa>=0", "sa", "0", "{\n up[sa]=1;\n //System.out.println(\"plus\");\n }", "up[sa]=1", "up[sa]", "up", "sa", "1", "{\n sa=sa*(-1);\n dw[sa]=1;\n //System.out.println(\"minus\");\n }", "sa=sa*(-1)", "sa", "sa*(-1)", "sa", "(-1)", "1", "dw[sa]=1", "dw[sa]", "dw", "sa", "1", "int hit=0;", "hit", "0", "for(i=0;i<100;i++){\n if(dw[i]==0){\n hit=-i;\n //System.out.println(hit);\n break;\n }else if(up[i]==0){\n hit=i;\n //System.out.println(hit);\n break;\n }else if(i==X){\n //System.out.println(\"a\"+\"0\");\n break;\n }\n }", "i=0;", "i=0", "i", "0", "i<100", "i", "100", "i++", "i++", "i", "{\n if(dw[i]==0){\n hit=-i;\n //System.out.println(hit);\n break;\n }else if(up[i]==0){\n hit=i;\n //System.out.println(hit);\n break;\n }else if(i==X){\n //System.out.println(\"a\"+\"0\");\n break;\n }\n }", "{\n if(dw[i]==0){\n hit=-i;\n //System.out.println(hit);\n break;\n }else if(up[i]==0){\n hit=i;\n //System.out.println(hit);\n break;\n }else if(i==X){\n //System.out.println(\"a\"+\"0\");\n break;\n }\n }", "if(dw[i]==0){\n hit=-i;\n //System.out.println(hit);\n break;\n }else if(up[i]==0){\n hit=i;\n //System.out.println(hit);\n break;\n }else if(i==X){\n //System.out.println(\"a\"+\"0\");\n break;\n }", "dw[i]==0", "dw[i]", "dw", "i", "0", "{\n hit=-i;\n //System.out.println(hit);\n break;\n }", "hit=-i", "hit", "-i", "i", "break;", "if(up[i]==0){\n hit=i;\n //System.out.println(hit);\n break;\n }else if(i==X){\n //System.out.println(\"a\"+\"0\");\n break;\n }", "up[i]==0", "up[i]", "up", "i", "0", "{\n hit=i;\n //System.out.println(hit);\n break;\n }", "hit=i", "hit", "i", "break;", "if(i==X){\n //System.out.println(\"a\"+\"0\");\n break;\n }", "i==X", "i", "X", "{\n //System.out.println(\"a\"+\"0\");\n break;\n }", "break;", "int ans=X+hit;", "ans", "X+hit", "X", "hit", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "public class Main{\n\n public static void main(String[] args){\n //START\n\n Scanner sc=new Scanner(System.in);\n\n int X=sc.nextInt();\n int N=sc.nextInt();\n\n int[] p=new int[N+10];\n\n int[] up=new int[200];\n int[] dw=new int[200];\n\n Arrays.fill(up, 0);\n Arrays.fill(dw, 0);\n\n int i=0;\n dw[0]=1;\n\n for(i=0;i<N;i++){\n p[i]=sc.nextInt();\n int sa=p[i]-X;\n\n if(sa>=0){\n up[sa]=1;\n //System.out.println(\"plus\");\n }else{\n sa=sa*(-1);\n dw[sa]=1;\n //System.out.println(\"minus\");\n }\n //System.out.println(dw[1]);\n }\n\n int hit=0;\n\n for(i=0;i<100;i++){\n if(dw[i]==0){\n hit=-i;\n //System.out.println(hit);\n break;\n }else if(up[i]==0){\n hit=i;\n //System.out.println(hit);\n break;\n }else if(i==X){\n //System.out.println(\"a\"+\"0\");\n break;\n }\n }\n\n int ans=X+hit;\n\n //if(i!=X){\n System.out.println(ans);\n //}\n\n //END\n }\n}", "public class Main{\n\n public static void main(String[] args){\n //START\n\n Scanner sc=new Scanner(System.in);\n\n int X=sc.nextInt();\n int N=sc.nextInt();\n\n int[] p=new int[N+10];\n\n int[] up=new int[200];\n int[] dw=new int[200];\n\n Arrays.fill(up, 0);\n Arrays.fill(dw, 0);\n\n int i=0;\n dw[0]=1;\n\n for(i=0;i<N;i++){\n p[i]=sc.nextInt();\n int sa=p[i]-X;\n\n if(sa>=0){\n up[sa]=1;\n //System.out.println(\"plus\");\n }else{\n sa=sa*(-1);\n dw[sa]=1;\n //System.out.println(\"minus\");\n }\n //System.out.println(dw[1]);\n }\n\n int hit=0;\n\n for(i=0;i<100;i++){\n if(dw[i]==0){\n hit=-i;\n //System.out.println(hit);\n break;\n }else if(up[i]==0){\n hit=i;\n //System.out.println(hit);\n break;\n }else if(i==X){\n //System.out.println(\"a\"+\"0\");\n break;\n }\n }\n\n int ans=X+hit;\n\n //if(i!=X){\n System.out.println(ans);\n //}\n\n //END\n }\n}", "Main" ]
import java.io.*; import java.util.Scanner; import java.util.Arrays; import java.util.ArrayList; import java.math.BigDecimal; public class Main{ public static void main(String[] args){ //START Scanner sc=new Scanner(System.in); int X=sc.nextInt(); int N=sc.nextInt(); int[] p=new int[N+10]; int[] up=new int[200]; int[] dw=new int[200]; Arrays.fill(up, 0); Arrays.fill(dw, 0); int i=0; dw[0]=1; for(i=0;i<N;i++){ p[i]=sc.nextInt(); int sa=p[i]-X; if(sa>=0){ up[sa]=1; //System.out.println("plus"); }else{ sa=sa*(-1); dw[sa]=1; //System.out.println("minus"); } //System.out.println(dw[1]); } int hit=0; for(i=0;i<100;i++){ if(dw[i]==0){ hit=-i; //System.out.println(hit); break; }else if(up[i]==0){ hit=i; //System.out.println(hit); break; }else if(i==X){ //System.out.println("a"+"0"); break; } } int ans=X+hit; //if(i!=X){ System.out.println(ans); //} //END } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 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, 41, 13, 4, 18, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 14, 40, 4, 18, 13, 13, 30, 4, 18, 13, 13, 29, 41, 13, 17, 42, 17, 30, 14, 40, 4, 18, 13, 2, 13, 13, 30, 4, 18, 13, 2, 13, 13, 29, 14, 40, 4, 18, 13, 2, 13, 13, 30, 4, 18, 13, 2, 13, 13, 29, 40, 13, 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 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 129, 20 ], [ 129, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 26, 28 ], [ 24, 29 ], [ 29, 30 ], [ 29, 31 ], [ 21, 32 ], [ 32, 33 ], [ 129, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 36, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 36, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 49 ], [ 36, 50 ], [ 50, 51 ], [ 50, 52 ], [ 36, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 53, 58 ], [ 58, 59 ], [ 58, 60 ], [ 53, 61 ], [ 61, 62 ], [ 62, 63 ], [ 53, 64 ], [ 65, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 66, 69 ], [ 69, 70 ], [ 70, 71 ], [ 36, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 74, 77 ], [ 72, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 79, 82 ], [ 78, 83 ], [ 36, 84 ], [ 84, 85 ], [ 84, 86 ], [ 36, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 92, 95 ], [ 95, 96 ], [ 95, 97 ], [ 90, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 99, 102 ], [ 102, 103 ], [ 102, 104 ], [ 98, 105 ], [ 89, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 108, 111 ], [ 111, 112 ], [ 111, 113 ], [ 106, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 115, 118 ], [ 118, 119 ], [ 118, 120 ], [ 114, 121 ], [ 89, 122 ], [ 122, 123 ], [ 34, 124 ], [ 124, 125 ], [ 34, 126 ], [ 126, 127 ], [ 0, 128 ], [ 128, 129 ], [ 128, 130 ] ]
[ "import java.io.InputStream;\nimport java.io.PrintStream;\nimport java.math.BigDecimal;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n solve(System.in, System.out);\n }\n\n static void solve(InputStream is, PrintStream os) {\n // Your code here!\n Scanner scan = new Scanner(is);\n int X = scan.nextInt();\n int N = scan.nextInt();\n HashSet<Integer> set = new HashSet<>();\n for(int i = 0 ; i < N; i++) {\n set.add(scan.nextInt());\n }\n\n if(!set.contains(X)) {\n os.println(X);\n return;\n }\n\n int diff = 1;\n while(true) {\n if(!set.contains(X-diff)) {\n os.println(X-diff);\n return;\n }\n if(!set.contains(X+diff)) {\n os.println(X+diff);\n return;\n }\n diff++;\n }\n }\n}", "import java.io.InputStream;", "InputStream", "java.io", "import java.io.PrintStream;", "PrintStream", "java.io", "import java.math.BigDecimal;", "BigDecimal", "java.math", "import java.util.HashMap;", "HashMap", "java.util", "import java.util.HashSet;", "HashSet", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) throws Exception {\n solve(System.in, System.out);\n }\n\n static void solve(InputStream is, PrintStream os) {\n // Your code here!\n Scanner scan = new Scanner(is);\n int X = scan.nextInt();\n int N = scan.nextInt();\n HashSet<Integer> set = new HashSet<>();\n for(int i = 0 ; i < N; i++) {\n set.add(scan.nextInt());\n }\n\n if(!set.contains(X)) {\n os.println(X);\n return;\n }\n\n int diff = 1;\n while(true) {\n if(!set.contains(X-diff)) {\n os.println(X-diff);\n return;\n }\n if(!set.contains(X+diff)) {\n os.println(X+diff);\n return;\n }\n diff++;\n }\n }\n}", "Main", "public static void main(String[] args) throws Exception {\n solve(System.in, System.out);\n }", "main", "{\n solve(System.in, System.out);\n }", "solve(System.in, System.out)", "solve", "System.in", "System", "System.in", "System.out", "System", "System.out", "String[] args", "args", "static void solve(InputStream is, PrintStream os) {\n // Your code here!\n Scanner scan = new Scanner(is);\n int X = scan.nextInt();\n int N = scan.nextInt();\n HashSet<Integer> set = new HashSet<>();\n for(int i = 0 ; i < N; i++) {\n set.add(scan.nextInt());\n }\n\n if(!set.contains(X)) {\n os.println(X);\n return;\n }\n\n int diff = 1;\n while(true) {\n if(!set.contains(X-diff)) {\n os.println(X-diff);\n return;\n }\n if(!set.contains(X+diff)) {\n os.println(X+diff);\n return;\n }\n diff++;\n }\n }", "solve", "{\n // Your code here!\n Scanner scan = new Scanner(is);\n int X = scan.nextInt();\n int N = scan.nextInt();\n HashSet<Integer> set = new HashSet<>();\n for(int i = 0 ; i < N; i++) {\n set.add(scan.nextInt());\n }\n\n if(!set.contains(X)) {\n os.println(X);\n return;\n }\n\n int diff = 1;\n while(true) {\n if(!set.contains(X-diff)) {\n os.println(X-diff);\n return;\n }\n if(!set.contains(X+diff)) {\n os.println(X+diff);\n return;\n }\n diff++;\n }\n }", "Scanner scan = new Scanner(is);", "scan", "new Scanner(is)", "int X = scan.nextInt();", "X", "scan.nextInt()", "scan.nextInt", "scan", "int N = scan.nextInt();", "N", "scan.nextInt()", "scan.nextInt", "scan", "HashSet<Integer> set = new HashSet<>();", "set", "new HashSet<>()", "for(int i = 0 ; i < N; i++) {\n set.add(scan.nextInt());\n }", "int i = 0 ;", "int i = 0 ;", "i", "0", "i < N", "i", "N", "i++", "i++", "i", "{\n set.add(scan.nextInt());\n }", "{\n set.add(scan.nextInt());\n }", "set.add(scan.nextInt())", "set.add", "set", "scan.nextInt()", "scan.nextInt", "scan", "if(!set.contains(X)) {\n os.println(X);\n return;\n }", "!set.contains(X)", "set.contains(X)", "set.contains", "set", "X", "{\n os.println(X);\n return;\n }", "os.println(X)", "os.println", "os", "X", "return;", "int diff = 1;", "diff", "1", "while(true) {\n if(!set.contains(X-diff)) {\n os.println(X-diff);\n return;\n }\n if(!set.contains(X+diff)) {\n os.println(X+diff);\n return;\n }\n diff++;\n }", "true", "{\n if(!set.contains(X-diff)) {\n os.println(X-diff);\n return;\n }\n if(!set.contains(X+diff)) {\n os.println(X+diff);\n return;\n }\n diff++;\n }", "if(!set.contains(X-diff)) {\n os.println(X-diff);\n return;\n }", "!set.contains(X-diff)", "set.contains(X-diff)", "set.contains", "set", "X-diff", "X", "diff", "{\n os.println(X-diff);\n return;\n }", "os.println(X-diff)", "os.println", "os", "X-diff", "X", "diff", "return;", "if(!set.contains(X+diff)) {\n os.println(X+diff);\n return;\n }", "!set.contains(X+diff)", "set.contains(X+diff)", "set.contains", "set", "X+diff", "X", "diff", "{\n os.println(X+diff);\n return;\n }", "os.println(X+diff)", "os.println", "os", "X+diff", "X", "diff", "return;", "diff++", "diff", "InputStream is", "is", "PrintStream os", "os", "public class Main {\n public static void main(String[] args) throws Exception {\n solve(System.in, System.out);\n }\n\n static void solve(InputStream is, PrintStream os) {\n // Your code here!\n Scanner scan = new Scanner(is);\n int X = scan.nextInt();\n int N = scan.nextInt();\n HashSet<Integer> set = new HashSet<>();\n for(int i = 0 ; i < N; i++) {\n set.add(scan.nextInt());\n }\n\n if(!set.contains(X)) {\n os.println(X);\n return;\n }\n\n int diff = 1;\n while(true) {\n if(!set.contains(X-diff)) {\n os.println(X-diff);\n return;\n }\n if(!set.contains(X+diff)) {\n os.println(X+diff);\n return;\n }\n diff++;\n }\n }\n}", "public class Main {\n public static void main(String[] args) throws Exception {\n solve(System.in, System.out);\n }\n\n static void solve(InputStream is, PrintStream os) {\n // Your code here!\n Scanner scan = new Scanner(is);\n int X = scan.nextInt();\n int N = scan.nextInt();\n HashSet<Integer> set = new HashSet<>();\n for(int i = 0 ; i < N; i++) {\n set.add(scan.nextInt());\n }\n\n if(!set.contains(X)) {\n os.println(X);\n return;\n }\n\n int diff = 1;\n while(true) {\n if(!set.contains(X-diff)) {\n os.println(X-diff);\n return;\n }\n if(!set.contains(X+diff)) {\n os.println(X+diff);\n return;\n }\n diff++;\n }\n }\n}", "Main" ]
import java.io.InputStream; import java.io.PrintStream; import java.math.BigDecimal; import java.util.HashMap; import java.util.HashSet; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { solve(System.in, System.out); } static void solve(InputStream is, PrintStream os) { // Your code here! Scanner scan = new Scanner(is); int X = scan.nextInt(); int N = scan.nextInt(); HashSet<Integer> set = new HashSet<>(); for(int i = 0 ; i < N; i++) { set.add(scan.nextInt()); } if(!set.contains(X)) { os.println(X); return; } int diff = 1; while(true) { if(!set.contains(X-diff)) { os.println(X-diff); return; } if(!set.contains(X+diff)) { os.println(X+diff); return; } diff++; } } }
[ 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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 29, 14, 40, 4, 18, 13, 13, 30, 4, 18, 18, 13, 13, 13, 29, 30, 41, 13, 17, 42, 17, 30, 41, 13, 2, 13, 13, 41, 13, 2, 13, 13, 14, 40, 4, 18, 13, 13, 30, 4, 18, 18, 13, 13, 13, 29, 14, 40, 4, 18, 13, 13, 30, 4, 18, 18, 13, 13, 13, 29, 30, 40, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 124, 8 ], [ 124, 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 ], [ 42, 43 ], [ 41, 44 ], [ 44, 45 ], [ 45, 46 ], [ 11, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 47, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 52, 57 ], [ 51, 58 ], [ 47, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 61, 64 ], [ 59, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 65, 72 ], [ 59, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 73, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 82, 84 ], [ 79, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 87, 89 ], [ 79, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 92, 95 ], [ 90, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 97, 102 ], [ 96, 103 ], [ 90, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 106, 109 ], [ 104, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 111, 116 ], [ 110, 117 ], [ 104, 118 ], [ 118, 119 ], [ 119, 120 ], [ 9, 121 ], [ 121, 122 ], [ 0, 123 ], [ 123, 124 ], [ 123, 125 ] ]
[ "import java.util.*;\nimport java.util.Arrays;\n \npublic class Main{\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n ArrayList<Integer> list = new ArrayList<>();\n for(int i = 0; i < n; i++){\n list.add(sc.nextInt());\n }\n \n if(n == 0){\n System.out.println(x);\n return;\n }else if(!list.contains(x)){\n System.out.println(x);\n return;\n }else{\n \n int i = 1;\n while(true){\n int a = x-i;\n int b = x+i;\n if(!list.contains(a)){\n System.out.println(a);\n return;\n }else if(!list.contains(b)){\n System.out.println(b);\n return;\n }else{\n i++;\n } \n }\n \n }\n \n }\n}", "import java.util.*;", "util.*", "java", "import java.util.Arrays;", "Arrays", "java.util", "public class Main{\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n ArrayList<Integer> list = new ArrayList<>();\n for(int i = 0; i < n; i++){\n list.add(sc.nextInt());\n }\n \n if(n == 0){\n System.out.println(x);\n return;\n }else if(!list.contains(x)){\n System.out.println(x);\n return;\n }else{\n \n int i = 1;\n while(true){\n int a = x-i;\n int b = x+i;\n if(!list.contains(a)){\n System.out.println(a);\n return;\n }else if(!list.contains(b)){\n System.out.println(b);\n return;\n }else{\n i++;\n } \n }\n \n }\n \n }\n}", "Main", "public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n ArrayList<Integer> list = new ArrayList<>();\n for(int i = 0; i < n; i++){\n list.add(sc.nextInt());\n }\n \n if(n == 0){\n System.out.println(x);\n return;\n }else if(!list.contains(x)){\n System.out.println(x);\n return;\n }else{\n \n int i = 1;\n while(true){\n int a = x-i;\n int b = x+i;\n if(!list.contains(a)){\n System.out.println(a);\n return;\n }else if(!list.contains(b)){\n System.out.println(b);\n return;\n }else{\n i++;\n } \n }\n \n }\n \n }", "main", "{\n \n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n ArrayList<Integer> list = new ArrayList<>();\n for(int i = 0; i < n; i++){\n list.add(sc.nextInt());\n }\n \n if(n == 0){\n System.out.println(x);\n return;\n }else if(!list.contains(x)){\n System.out.println(x);\n return;\n }else{\n \n int i = 1;\n while(true){\n int a = x-i;\n int b = x+i;\n if(!list.contains(a)){\n System.out.println(a);\n return;\n }else if(!list.contains(b)){\n System.out.println(b);\n return;\n }else{\n i++;\n } \n }\n \n }\n \n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "ArrayList<Integer> list = new ArrayList<>();", "list", "new ArrayList<>()", "for(int i = 0; i < n; i++){\n list.add(sc.nextInt());\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n list.add(sc.nextInt());\n }", "{\n list.add(sc.nextInt());\n }", "list.add(sc.nextInt())", "list.add", "list", "sc.nextInt()", "sc.nextInt", "sc", "if(n == 0){\n System.out.println(x);\n return;\n }else if(!list.contains(x)){\n System.out.println(x);\n return;\n }else{\n \n int i = 1;\n while(true){\n int a = x-i;\n int b = x+i;\n if(!list.contains(a)){\n System.out.println(a);\n return;\n }else if(!list.contains(b)){\n System.out.println(b);\n return;\n }else{\n i++;\n } \n }\n \n }", "n == 0", "n", "0", "{\n System.out.println(x);\n return;\n }", "System.out.println(x)", "System.out.println", "System.out", "System", "System.out", "x", "return;", "if(!list.contains(x)){\n System.out.println(x);\n return;\n }else{\n \n int i = 1;\n while(true){\n int a = x-i;\n int b = x+i;\n if(!list.contains(a)){\n System.out.println(a);\n return;\n }else if(!list.contains(b)){\n System.out.println(b);\n return;\n }else{\n i++;\n } \n }\n \n }", "!list.contains(x)", "list.contains(x)", "list.contains", "list", "x", "{\n System.out.println(x);\n return;\n }", "System.out.println(x)", "System.out.println", "System.out", "System", "System.out", "x", "return;", "{\n \n int i = 1;\n while(true){\n int a = x-i;\n int b = x+i;\n if(!list.contains(a)){\n System.out.println(a);\n return;\n }else if(!list.contains(b)){\n System.out.println(b);\n return;\n }else{\n i++;\n } \n }\n \n }", "int i = 1;", "i", "1", "while(true){\n int a = x-i;\n int b = x+i;\n if(!list.contains(a)){\n System.out.println(a);\n return;\n }else if(!list.contains(b)){\n System.out.println(b);\n return;\n }else{\n i++;\n } \n }", "true", "{\n int a = x-i;\n int b = x+i;\n if(!list.contains(a)){\n System.out.println(a);\n return;\n }else if(!list.contains(b)){\n System.out.println(b);\n return;\n }else{\n i++;\n } \n }", "int a = x-i;", "a", "x-i", "x", "i", "int b = x+i;", "b", "x+i", "x", "i", "if(!list.contains(a)){\n System.out.println(a);\n return;\n }else if(!list.contains(b)){\n System.out.println(b);\n return;\n }else{\n i++;\n }", "!list.contains(a)", "list.contains(a)", "list.contains", "list", "a", "{\n System.out.println(a);\n return;\n }", "System.out.println(a)", "System.out.println", "System.out", "System", "System.out", "a", "return;", "if(!list.contains(b)){\n System.out.println(b);\n return;\n }else{\n i++;\n }", "!list.contains(b)", "list.contains(b)", "list.contains", "list", "b", "{\n System.out.println(b);\n return;\n }", "System.out.println(b)", "System.out.println", "System.out", "System", "System.out", "b", "return;", "{\n i++;\n }", "i++", "i", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n ArrayList<Integer> list = new ArrayList<>();\n for(int i = 0; i < n; i++){\n list.add(sc.nextInt());\n }\n \n if(n == 0){\n System.out.println(x);\n return;\n }else if(!list.contains(x)){\n System.out.println(x);\n return;\n }else{\n \n int i = 1;\n while(true){\n int a = x-i;\n int b = x+i;\n if(!list.contains(a)){\n System.out.println(a);\n return;\n }else if(!list.contains(b)){\n System.out.println(b);\n return;\n }else{\n i++;\n } \n }\n \n }\n \n }\n}", "public class Main{\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n ArrayList<Integer> list = new ArrayList<>();\n for(int i = 0; i < n; i++){\n list.add(sc.nextInt());\n }\n \n if(n == 0){\n System.out.println(x);\n return;\n }else if(!list.contains(x)){\n System.out.println(x);\n return;\n }else{\n \n int i = 1;\n while(true){\n int a = x-i;\n int b = x+i;\n if(!list.contains(a)){\n System.out.println(a);\n return;\n }else if(!list.contains(b)){\n System.out.println(b);\n return;\n }else{\n i++;\n } \n }\n \n }\n \n }\n}", "Main" ]
import java.util.*; import java.util.Arrays; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int n = sc.nextInt(); ArrayList<Integer> list = new ArrayList<>(); for(int i = 0; i < n; i++){ list.add(sc.nextInt()); } if(n == 0){ System.out.println(x); return; }else if(!list.contains(x)){ System.out.println(x); return; }else{ int i = 1; while(true){ int a = x-i; int b = x+i; if(!list.contains(a)){ System.out.println(a); return; }else if(!list.contains(b)){ System.out.println(b); return; }else{ i++; } } } } }
[ 7, 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, 20, 41, 13, 20, 41, 13, 20, 4, 18, 13, 13, 13, 4, 18, 13, 23, 13, 6, 13, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 4, 18, 13, 13, 14, 2, 13, 17, 30, 4, 18, 13, 13, 14, 40, 4, 18, 13, 13, 30, 4, 18, 13, 13, 30, 41, 13, 13, 41, 13, 17, 42, 17, 30, 14, 40, 4, 18, 13, 2, 13, 13, 30, 0, 13, 2, 13, 13, 3, 14, 40, 4, 18, 13, 2, 13, 13, 30, 0, 13, 2, 13, 13, 3, 40, 13, 4, 18, 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, 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 ], [ 245, 17 ], [ 245, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 23, 25 ], [ 20, 26 ], [ 26, 27 ], [ 26, 28 ], [ 20, 29 ], [ 29, 30 ], [ 29, 31 ], [ 20, 32 ], [ 32, 33 ], [ 32, 34 ], [ 20, 35 ], [ 35, 36 ], [ 36, 37 ], [ 35, 38 ], [ 35, 39 ], [ 20, 40 ], [ 40, 41 ], [ 41, 42 ], [ 18, 43 ], [ 43, 44 ], [ 0, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 53, 54 ], [ 49, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 58, 59 ], [ 49, 60 ], [ 60, 61 ], [ 60, 62 ], [ 49, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 68, 69 ], [ 68, 70 ], [ 63, 71 ], [ 71, 72 ], [ 72, 73 ], [ 63, 74 ], [ 75, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 76, 79 ], [ 79, 80 ], [ 80, 81 ], [ 49, 82 ], [ 82, 83 ], [ 83, 84 ], [ 82, 85 ], [ 49, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 86, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 86, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 97, 100 ], [ 95, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 102, 105 ], [ 95, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 106, 110 ], [ 110, 111 ], [ 110, 112 ], [ 106, 113 ], [ 113, 114 ], [ 113, 115 ], [ 115, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 118, 121 ], [ 121, 122 ], [ 121, 123 ], [ 116, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 127, 128 ], [ 127, 129 ], [ 124, 130 ], [ 116, 131 ], [ 131, 132 ], [ 132, 133 ], [ 133, 134 ], [ 134, 135 ], [ 133, 136 ], [ 136, 137 ], [ 136, 138 ], [ 131, 139 ], [ 139, 140 ], [ 140, 141 ], [ 140, 142 ], [ 142, 143 ], [ 142, 144 ], [ 139, 145 ], [ 115, 146 ], [ 146, 147 ], [ 106, 148 ], [ 148, 149 ], [ 149, 150 ], [ 148, 151 ], [ 47, 152 ], [ 152, 153 ], [ 47, 154 ], [ 154, 155 ], [ 0, 156 ], [ 156, 157 ], [ 156, 158 ], [ 158, 159 ], [ 156, 160 ], [ 160, 161 ], [ 156, 162 ], [ 162, 163 ], [ 162, 164 ], [ 164, 165 ], [ 165, 166 ], [ 165, 167 ], [ 156, 168 ], [ 168, 169 ], [ 168, 170 ], [ 170, 171 ], [ 171, 172 ], [ 172, 173 ], [ 173, 174 ], [ 173, 175 ], [ 172, 176 ], [ 176, 177 ], [ 177, 178 ], [ 178, 179 ], [ 171, 180 ], [ 180, 181 ], [ 181, 182 ], [ 182, 183 ], [ 182, 184 ], [ 184, 185 ], [ 185, 186 ], [ 186, 187 ], [ 181, 188 ], [ 188, 189 ], [ 189, 190 ], [ 189, 191 ], [ 170, 192 ], [ 192, 193 ], [ 193, 194 ], [ 194, 195 ], [ 156, 196 ], [ 196, 197 ], [ 196, 198 ], [ 198, 199 ], [ 199, 200 ], [ 200, 201 ], [ 201, 202 ], [ 200, 203 ], [ 203, 204 ], [ 156, 205 ], [ 205, 206 ], [ 205, 207 ], [ 207, 208 ], [ 208, 209 ], [ 209, 210 ], [ 210, 211 ], [ 209, 212 ], [ 212, 213 ], [ 156, 214 ], [ 214, 215 ], [ 214, 216 ], [ 216, 217 ], [ 217, 218 ], [ 218, 219 ], [ 219, 220 ], [ 218, 221 ], [ 221, 222 ], [ 156, 223 ], [ 223, 224 ], [ 223, 225 ], [ 225, 226 ], [ 226, 227 ], [ 226, 228 ], [ 225, 229 ], [ 229, 230 ], [ 230, 231 ], [ 230, 232 ], [ 232, 233 ], [ 233, 234 ], [ 234, 235 ], [ 229, 236 ], [ 236, 237 ], [ 237, 238 ], [ 237, 239 ], [ 239, 240 ], [ 240, 241 ], [ 225, 242 ], [ 242, 243 ], [ 0, 244 ], [ 244, 245 ], [ 244, 246 ] ]
[ "import java.io.*;\nimport java.lang.reflect.Array;\nimport java.math.BigInteger;\nimport java.nio.charset.IllegalCharsetNameException;\nimport java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws IOException {\n OutputStream outputStream = System.out;\n PrintWriter out = new PrintWriter(outputStream);\n FastReader in = new FastReader();\n test a=new test();\n a.solve(in,out);\n out.close();\n }\n}\n\nclass test {\n public void solve(FastReader in, PrintWriter out) {\n int x =in.nextInt();\n int n=in.nextInt();\n ArrayList<Integer> my =new ArrayList<>();\n for(int i=0;i<n;i++){\n my.add(in.nextInt());\n }\n Collections.sort(my);\n if(n==0){\n out.println(x);\n }\n \n else if(!my.contains(x)){\n out.println(x);\n }\n else{\n int k=x;int i=1;\n while(true){\n if(!my.contains(k-i)){\n k=k-i;\n break;\n }\n else if(!my.contains(k+i)){\n k=k+i;\n break;\n }\n i++;\n }\n out.println(k);\n }\n }\n}\n\nclass 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}", "import java.io.*;", "io.*", "java", "import java.lang.reflect.Array;", "Array", "java.lang.reflect", "import java.math.BigInteger;", "BigInteger", "java.math", "import java.nio.charset.IllegalCharsetNameException;", "IllegalCharsetNameException", "java.nio.charset", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args) throws IOException {\n OutputStream outputStream = System.out;\n PrintWriter out = new PrintWriter(outputStream);\n FastReader in = new FastReader();\n test a=new test();\n a.solve(in,out);\n out.close();\n }\n}", "Main", "public static void main(String[] args) throws IOException {\n OutputStream outputStream = System.out;\n PrintWriter out = new PrintWriter(outputStream);\n FastReader in = new FastReader();\n test a=new test();\n a.solve(in,out);\n out.close();\n }", "main", "{\n OutputStream outputStream = System.out;\n PrintWriter out = new PrintWriter(outputStream);\n FastReader in = new FastReader();\n test a=new test();\n a.solve(in,out);\n out.close();\n }", "OutputStream outputStream = System.out;", "outputStream", "System.out", "System", "System.out", "PrintWriter out = new PrintWriter(outputStream);", "out", "new PrintWriter(outputStream)", "FastReader in = new FastReader();", "in", "new FastReader()", "test a=new test();", "a", "new test()", "a.solve(in,out)", "a.solve", "a", "in", "out", "out.close()", "out.close", "out", "String[] args", "args", "class test {\n public void solve(FastReader in, PrintWriter out) {\n int x =in.nextInt();\n int n=in.nextInt();\n ArrayList<Integer> my =new ArrayList<>();\n for(int i=0;i<n;i++){\n my.add(in.nextInt());\n }\n Collections.sort(my);\n if(n==0){\n out.println(x);\n }\n \n else if(!my.contains(x)){\n out.println(x);\n }\n else{\n int k=x;int i=1;\n while(true){\n if(!my.contains(k-i)){\n k=k-i;\n break;\n }\n else if(!my.contains(k+i)){\n k=k+i;\n break;\n }\n i++;\n }\n out.println(k);\n }\n }\n}", "test", "public void solve(FastReader in, PrintWriter out) {\n int x =in.nextInt();\n int n=in.nextInt();\n ArrayList<Integer> my =new ArrayList<>();\n for(int i=0;i<n;i++){\n my.add(in.nextInt());\n }\n Collections.sort(my);\n if(n==0){\n out.println(x);\n }\n \n else if(!my.contains(x)){\n out.println(x);\n }\n else{\n int k=x;int i=1;\n while(true){\n if(!my.contains(k-i)){\n k=k-i;\n break;\n }\n else if(!my.contains(k+i)){\n k=k+i;\n break;\n }\n i++;\n }\n out.println(k);\n }\n }", "solve", "{\n int x =in.nextInt();\n int n=in.nextInt();\n ArrayList<Integer> my =new ArrayList<>();\n for(int i=0;i<n;i++){\n my.add(in.nextInt());\n }\n Collections.sort(my);\n if(n==0){\n out.println(x);\n }\n \n else if(!my.contains(x)){\n out.println(x);\n }\n else{\n int k=x;int i=1;\n while(true){\n if(!my.contains(k-i)){\n k=k-i;\n break;\n }\n else if(!my.contains(k+i)){\n k=k+i;\n break;\n }\n i++;\n }\n out.println(k);\n }\n }", "int x =in.nextInt();", "x", "in.nextInt()", "in.nextInt", "in", "int n=in.nextInt();", "n", "in.nextInt()", "in.nextInt", "in", "ArrayList<Integer> my =new ArrayList<>();", "my", "new ArrayList<>()", "for(int i=0;i<n;i++){\n my.add(in.nextInt());\n }", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n my.add(in.nextInt());\n }", "{\n my.add(in.nextInt());\n }", "my.add(in.nextInt())", "my.add", "my", "in.nextInt()", "in.nextInt", "in", "Collections.sort(my)", "Collections.sort", "Collections", "my", "if(n==0){\n out.println(x);\n }\n \n else if(!my.contains(x)){\n out.println(x);\n }\n else{\n int k=x;int i=1;\n while(true){\n if(!my.contains(k-i)){\n k=k-i;\n break;\n }\n else if(!my.contains(k+i)){\n k=k+i;\n break;\n }\n i++;\n }\n out.println(k);\n }", "n==0", "n", "0", "{\n out.println(x);\n }", "out.println(x)", "out.println", "out", "x", "if(!my.contains(x)){\n out.println(x);\n }\n else{\n int k=x;int i=1;\n while(true){\n if(!my.contains(k-i)){\n k=k-i;\n break;\n }\n else if(!my.contains(k+i)){\n k=k+i;\n break;\n }\n i++;\n }\n out.println(k);\n }", "!my.contains(x)", "my.contains(x)", "my.contains", "my", "x", "{\n out.println(x);\n }", "out.println(x)", "out.println", "out", "x", "{\n int k=x;int i=1;\n while(true){\n if(!my.contains(k-i)){\n k=k-i;\n break;\n }\n else if(!my.contains(k+i)){\n k=k+i;\n break;\n }\n i++;\n }\n out.println(k);\n }", "int k=x;", "k", "x", "int i=1;", "i", "1", "while(true){\n if(!my.contains(k-i)){\n k=k-i;\n break;\n }\n else if(!my.contains(k+i)){\n k=k+i;\n break;\n }\n i++;\n }", "true", "{\n if(!my.contains(k-i)){\n k=k-i;\n break;\n }\n else if(!my.contains(k+i)){\n k=k+i;\n break;\n }\n i++;\n }", "if(!my.contains(k-i)){\n k=k-i;\n break;\n }\n else if(!my.contains(k+i)){\n k=k+i;\n break;\n }", "!my.contains(k-i)", "my.contains(k-i)", "my.contains", "my", "k-i", "k", "i", "{\n k=k-i;\n break;\n }", "k=k-i", "k", "k-i", "k", "i", "break;", "if(!my.contains(k+i)){\n k=k+i;\n break;\n }", "!my.contains(k+i)", "my.contains(k+i)", "my.contains", "my", "k+i", "k", "i", "{\n k=k+i;\n break;\n }", "k=k+i", "k", "k+i", "k", "i", "break;", "i++", "i", "out.println(k)", "out.println", "out", "k", "FastReader in", "in", "PrintWriter out", "out", "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 public static void main(String[] args) throws IOException {\n OutputStream outputStream = System.out;\n PrintWriter out = new PrintWriter(outputStream);\n FastReader in = new FastReader();\n test a=new test();\n a.solve(in,out);\n out.close();\n }\n}", "public class Main {\n public static void main(String[] args) throws IOException {\n OutputStream outputStream = System.out;\n PrintWriter out = new PrintWriter(outputStream);\n FastReader in = new FastReader();\n test a=new test();\n a.solve(in,out);\n out.close();\n }\n}", "Main" ]
import java.io.*; import java.lang.reflect.Array; import java.math.BigInteger; import java.nio.charset.IllegalCharsetNameException; import java.util.*; public class Main { public static void main(String[] args) throws IOException { OutputStream outputStream = System.out; PrintWriter out = new PrintWriter(outputStream); FastReader in = new FastReader(); test a=new test(); a.solve(in,out); out.close(); } } class test { public void solve(FastReader in, PrintWriter out) { int x =in.nextInt(); int n=in.nextInt(); ArrayList<Integer> my =new ArrayList<>(); for(int i=0;i<n;i++){ my.add(in.nextInt()); } Collections.sort(my); if(n==0){ out.println(x); } else if(!my.contains(x)){ out.println(x); } else{ int k=x;int i=1; while(true){ if(!my.contains(k-i)){ k=k-i; break; } else if(!my.contains(k+i)){ k=k+i; break; } i++; } out.println(k); } } } 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; } }
[ 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, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 18, 13, 13, 41, 13, 17, 41, 13, 20, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 0, 18, 13, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 14, 40, 18, 13, 13, 30, 14, 2, 4, 18, 13, 2, 13, 13, 13, 30, 0, 13, 4, 18, 13, 2, 13, 13, 0, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 20, 23, 13, 12, 13, 30, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 20, 23, 13, 12, 13, 30, 41, 13, 17, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 4, 18, 13, 29, 13, 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, 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 ], [ 239, 23 ], [ 239, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 26, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 33, 34 ], [ 26, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 26, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 42, 44 ], [ 26, 45 ], [ 45, 46 ], [ 45, 47 ], [ 26, 48 ], [ 48, 49 ], [ 48, 50 ], [ 26, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 52, 57 ], [ 57, 58 ], [ 57, 59 ], [ 52, 60 ], [ 60, 61 ], [ 61, 62 ], [ 52, 63 ], [ 64, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 68, 69 ], [ 64, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 70, 74 ], [ 26, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 75, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 82, 84 ], [ 75, 85 ], [ 85, 86 ], [ 86, 87 ], [ 75, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 89, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 97, 100 ], [ 100, 101 ], [ 100, 102 ], [ 96, 103 ], [ 95, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 107, 108 ], [ 108, 109 ], [ 107, 110 ], [ 110, 111 ], [ 110, 112 ], [ 104, 113 ], [ 113, 114 ], [ 113, 115 ], [ 26, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 118, 120 ], [ 116, 121 ], [ 24, 122 ], [ 122, 123 ], [ 0, 124 ], [ 124, 125 ], [ 124, 126 ], [ 126, 127 ], [ 124, 128 ], [ 128, 129 ], [ 124, 130 ], [ 130, 131 ], [ 130, 132 ], [ 132, 133 ], [ 133, 134 ], [ 134, 135 ], [ 134, 136 ], [ 136, 137 ], [ 137, 138 ], [ 138, 139 ], [ 133, 140 ], [ 140, 141 ], [ 141, 142 ], [ 141, 143 ], [ 130, 144 ], [ 144, 145 ], [ 124, 146 ], [ 146, 147 ], [ 146, 148 ], [ 148, 149 ], [ 149, 150 ], [ 150, 151 ], [ 150, 152 ], [ 152, 153 ], [ 153, 154 ], [ 154, 155 ], [ 149, 156 ], [ 156, 157 ], [ 157, 158 ], [ 157, 159 ], [ 146, 160 ], [ 160, 161 ], [ 124, 162 ], [ 162, 163 ], [ 162, 164 ], [ 164, 165 ], [ 165, 166 ], [ 165, 167 ], [ 164, 168 ], [ 168, 169 ], [ 169, 170 ], [ 169, 171 ], [ 171, 172 ], [ 172, 173 ], [ 173, 174 ], [ 168, 175 ], [ 175, 176 ], [ 176, 177 ], [ 176, 178 ], [ 178, 179 ], [ 179, 180 ], [ 164, 181 ], [ 181, 182 ], [ 124, 183 ], [ 183, 184 ], [ 183, 185 ], [ 185, 186 ], [ 186, 187 ], [ 187, 188 ], [ 188, 189 ], [ 188, 190 ], [ 187, 191 ], [ 191, 192 ], [ 192, 193 ], [ 193, 194 ], [ 186, 195 ], [ 195, 196 ], [ 196, 197 ], [ 197, 198 ], [ 197, 199 ], [ 199, 200 ], [ 200, 201 ], [ 201, 202 ], [ 196, 203 ], [ 203, 204 ], [ 204, 205 ], [ 204, 206 ], [ 185, 207 ], [ 207, 208 ], [ 208, 209 ], [ 209, 210 ], [ 124, 211 ], [ 211, 212 ], [ 211, 213 ], [ 213, 214 ], [ 214, 215 ], [ 215, 216 ], [ 216, 217 ], [ 215, 218 ], [ 218, 219 ], [ 124, 220 ], [ 220, 221 ], [ 220, 222 ], [ 222, 223 ], [ 223, 224 ], [ 224, 225 ], [ 225, 226 ], [ 224, 227 ], [ 227, 228 ], [ 124, 229 ], [ 229, 230 ], [ 229, 231 ], [ 231, 232 ], [ 232, 233 ], [ 233, 234 ], [ 234, 235 ], [ 233, 236 ], [ 236, 237 ], [ 0, 238 ], [ 238, 239 ], [ 238, 240 ] ]
[ "import java.io.BufferedReader;\nimport java.io.File;\nimport java.io.FileReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tFastScanner in = new FastScanner(System.in);\n\t\tint x = in.nextInt();\n\t\tint n = in.nextInt();\n\t\tint min = Integer.MAX_VALUE;\n\t\tint num = 0;\n\t\tboolean[] mark = new boolean[102];\n\t\t\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tint pos = in.nextInt();\n\t\t\tmark[pos] = true;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < mark.length; i++)\n\t\t\tif(!mark[i])\n\t\t\t{\n\t\t\t\tif(Math.abs(x - i) < min) {\n\t\t\t\t\tmin = Math.abs(x - i);\n\t\t\t\t\tnum = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\tSystem.out.println(num);\n\t}\n\n}\n///////////////////////////////////TEMPLATE///////////////////////////////////\nclass FastScanner {\n\tBufferedReader br;\n\tStringTokenizer st;\n\n\tFastScanner(InputStream stream) {\n\t\ttry {\n\t\t\tbr = new BufferedReader(new InputStreamReader(stream));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\n\tFastScanner(File input) {\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(input));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\n\tString nextLine() {\n\t\tString s = \"\";\n\t\ttry {\n\t\t\ts = br.readLine();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn s;\n\t}\n\n\tString next() {\n\t\twhile (st == null || !st.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn st.nextToken();\n\t}\n\n\tint nextInt() {\n\t\treturn Integer.parseInt(next());\n\t}\n\n\tlong nextLong() {\n\t\treturn Long.parseLong(next());\n\t}\n\n\tdouble nextDouble() {\n\t\treturn Double.parseDouble(next());\n\t}\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.File;", "File", "java.io", "import java.io.FileReader;", "FileReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStream;", "InputStream", "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[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tFastScanner in = new FastScanner(System.in);\n\t\tint x = in.nextInt();\n\t\tint n = in.nextInt();\n\t\tint min = Integer.MAX_VALUE;\n\t\tint num = 0;\n\t\tboolean[] mark = new boolean[102];\n\t\t\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tint pos = in.nextInt();\n\t\t\tmark[pos] = true;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < mark.length; i++)\n\t\t\tif(!mark[i])\n\t\t\t{\n\t\t\t\tif(Math.abs(x - i) < min) {\n\t\t\t\t\tmin = Math.abs(x - i);\n\t\t\t\t\tnum = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\tSystem.out.println(num);\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tFastScanner in = new FastScanner(System.in);\n\t\tint x = in.nextInt();\n\t\tint n = in.nextInt();\n\t\tint min = Integer.MAX_VALUE;\n\t\tint num = 0;\n\t\tboolean[] mark = new boolean[102];\n\t\t\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tint pos = in.nextInt();\n\t\t\tmark[pos] = true;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < mark.length; i++)\n\t\t\tif(!mark[i])\n\t\t\t{\n\t\t\t\tif(Math.abs(x - i) < min) {\n\t\t\t\t\tmin = Math.abs(x - i);\n\t\t\t\t\tnum = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\tSystem.out.println(num);\n\t}", "main", "{\n\t\t// TODO Auto-generated method stub\n\t\tFastScanner in = new FastScanner(System.in);\n\t\tint x = in.nextInt();\n\t\tint n = in.nextInt();\n\t\tint min = Integer.MAX_VALUE;\n\t\tint num = 0;\n\t\tboolean[] mark = new boolean[102];\n\t\t\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tint pos = in.nextInt();\n\t\t\tmark[pos] = true;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < mark.length; i++)\n\t\t\tif(!mark[i])\n\t\t\t{\n\t\t\t\tif(Math.abs(x - i) < min) {\n\t\t\t\t\tmin = Math.abs(x - i);\n\t\t\t\t\tnum = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\tSystem.out.println(num);\n\t}", "FastScanner in = new FastScanner(System.in);", "in", "new FastScanner(System.in)", "int x = in.nextInt();", "x", "in.nextInt()", "in.nextInt", "in", "int n = in.nextInt();", "n", "in.nextInt()", "in.nextInt", "in", "int min = Integer.MAX_VALUE;", "min", "Integer.MAX_VALUE", "Integer", "Integer.MAX_VALUE", "int num = 0;", "num", "0", "boolean[] mark = new boolean[102];", "mark", "new boolean[102]", "102", "for(int i = 0; i < n; i++)\n\t\t{\n\t\t\tint pos = in.nextInt();\n\t\t\tmark[pos] = true;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tint pos = in.nextInt();\n\t\t\tmark[pos] = true;\n\t\t}", "{\n\t\t\tint pos = in.nextInt();\n\t\t\tmark[pos] = true;\n\t\t}", "int pos = in.nextInt();", "pos", "in.nextInt()", "in.nextInt", "in", "mark[pos] = true", "mark[pos]", "mark", "pos", "true", "for(int i = 0; i < mark.length; i++)\n\t\t\tif(!mark[i])\n\t\t\t{\n\t\t\t\tif(Math.abs(x - i) < min) {\n\t\t\t\t\tmin = Math.abs(x - i);\n\t\t\t\t\tnum = i;\n\t\t\t\t}\n\t\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < mark.length", "i", "mark.length", "mark", "mark.length", "i++", "i++", "i", "if(!mark[i])\n\t\t\t{\n\t\t\t\tif(Math.abs(x - i) < min) {\n\t\t\t\t\tmin = Math.abs(x - i);\n\t\t\t\t\tnum = i;\n\t\t\t\t}\n\t\t\t}", "if(!mark[i])\n\t\t\t{\n\t\t\t\tif(Math.abs(x - i) < min) {\n\t\t\t\t\tmin = Math.abs(x - i);\n\t\t\t\t\tnum = i;\n\t\t\t\t}\n\t\t\t}", "!mark[i]", "mark[i]", "mark", "i", "{\n\t\t\t\tif(Math.abs(x - i) < min) {\n\t\t\t\t\tmin = Math.abs(x - i);\n\t\t\t\t\tnum = i;\n\t\t\t\t}\n\t\t\t}", "if(Math.abs(x - i) < min) {\n\t\t\t\t\tmin = Math.abs(x - i);\n\t\t\t\t\tnum = i;\n\t\t\t\t}", "Math.abs(x - i) < min", "Math.abs(x - i)", "Math.abs", "Math", "x - i", "x", "i", "min", "{\n\t\t\t\t\tmin = Math.abs(x - i);\n\t\t\t\t\tnum = i;\n\t\t\t\t}", "min = Math.abs(x - i)", "min", "Math.abs(x - i)", "Math.abs", "Math", "x - i", "x", "i", "num = i", "num", "i", "System.out.println(num)", "System.out.println", "System.out", "System", "System.out", "num", "String[] args", "args", "class FastScanner {\n\tBufferedReader br;\n\tStringTokenizer st;\n\n\tFastScanner(InputStream stream) {\n\t\ttry {\n\t\t\tbr = new BufferedReader(new InputStreamReader(stream));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\n\tFastScanner(File input) {\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(input));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\n\tString nextLine() {\n\t\tString s = \"\";\n\t\ttry {\n\t\t\ts = br.readLine();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn s;\n\t}\n\n\tString next() {\n\t\twhile (st == null || !st.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn st.nextToken();\n\t}\n\n\tint nextInt() {\n\t\treturn Integer.parseInt(next());\n\t}\n\n\tlong nextLong() {\n\t\treturn Long.parseLong(next());\n\t}\n\n\tdouble nextDouble() {\n\t\treturn Double.parseDouble(next());\n\t}\n}", "FastScanner", "BufferedReader br;", "br", "StringTokenizer st;", "st", "FastScanner(InputStream stream) {\n\t\ttry {\n\t\t\tbr = new BufferedReader(new InputStreamReader(stream));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "FastScanner", "{\n\t\ttry {\n\t\t\tbr = new BufferedReader(new InputStreamReader(stream));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "try {\n\t\t\tbr = new BufferedReader(new InputStreamReader(stream));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}", "catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}", "Exception e", "{\n\t\t\te.printStackTrace();\n\t\t}", "e.printStackTrace()", "e.printStackTrace", "e", "{\n\t\t\tbr = new BufferedReader(new InputStreamReader(stream));\n\t\t}", "br = new BufferedReader(new InputStreamReader(stream))", "br", "new BufferedReader(new InputStreamReader(stream))", "InputStream stream", "stream", "FastScanner(File input) {\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(input));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "FastScanner", "{\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(input));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "try {\n\t\t\tbr = new BufferedReader(new FileReader(input));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}", "catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}", "Exception e", "{\n\t\t\te.printStackTrace();\n\t\t}", "e.printStackTrace()", "e.printStackTrace", "e", "{\n\t\t\tbr = new BufferedReader(new FileReader(input));\n\t\t}", "br = new BufferedReader(new FileReader(input))", "br", "new BufferedReader(new FileReader(input))", "File input", "input", "String nextLine() {\n\t\tString s = \"\";\n\t\ttry {\n\t\t\ts = br.readLine();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn s;\n\t}", "nextLine", "{\n\t\tString s = \"\";\n\t\ttry {\n\t\t\ts = br.readLine();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn s;\n\t}", "String s = \"\";", "s", "\"\"", "try {\n\t\t\ts = br.readLine();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}", "catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}", "IOException e", "{\n\t\t\te.printStackTrace();\n\t\t}", "e.printStackTrace()", "e.printStackTrace", "e", "{\n\t\t\ts = br.readLine();\n\t\t}", "s = br.readLine()", "s", "br.readLine()", "br.readLine", "br", "return s;", "s", "String next() {\n\t\twhile (st == null || !st.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn st.nextToken();\n\t}", "next", "{\n\t\twhile (st == null || !st.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn st.nextToken();\n\t}", "while (st == null || !st.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "st == null || !st.hasMoreTokens()", "st == null", "st", "null", "!st.hasMoreTokens()", "st.hasMoreTokens()", "st.hasMoreTokens", "st", "{\n\t\t\ttry {\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "try {\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}", "catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}", "IOException e", "{\n\t\t\t\te.printStackTrace();\n\t\t\t}", "e.printStackTrace()", "e.printStackTrace", "e", "{\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t}", "st = new StringTokenizer(br.readLine())", "st", "new StringTokenizer(br.readLine())", "return st.nextToken();", "st.nextToken()", "st.nextToken", "st", "int nextInt() {\n\t\treturn Integer.parseInt(next());\n\t}", "nextInt", "{\n\t\treturn Integer.parseInt(next());\n\t}", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "long nextLong() {\n\t\treturn Long.parseLong(next());\n\t}", "nextLong", "{\n\t\treturn Long.parseLong(next());\n\t}", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "double nextDouble() {\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\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tFastScanner in = new FastScanner(System.in);\n\t\tint x = in.nextInt();\n\t\tint n = in.nextInt();\n\t\tint min = Integer.MAX_VALUE;\n\t\tint num = 0;\n\t\tboolean[] mark = new boolean[102];\n\t\t\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tint pos = in.nextInt();\n\t\t\tmark[pos] = true;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < mark.length; i++)\n\t\t\tif(!mark[i])\n\t\t\t{\n\t\t\t\tif(Math.abs(x - i) < min) {\n\t\t\t\t\tmin = Math.abs(x - i);\n\t\t\t\t\tnum = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\tSystem.out.println(num);\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tFastScanner in = new FastScanner(System.in);\n\t\tint x = in.nextInt();\n\t\tint n = in.nextInt();\n\t\tint min = Integer.MAX_VALUE;\n\t\tint num = 0;\n\t\tboolean[] mark = new boolean[102];\n\t\t\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tint pos = in.nextInt();\n\t\t\tmark[pos] = true;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < mark.length; i++)\n\t\t\tif(!mark[i])\n\t\t\t{\n\t\t\t\tif(Math.abs(x - i) < min) {\n\t\t\t\t\tmin = Math.abs(x - i);\n\t\t\t\t\tnum = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\tSystem.out.println(num);\n\t}\n\n}", "Main" ]
import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub FastScanner in = new FastScanner(System.in); int x = in.nextInt(); int n = in.nextInt(); int min = Integer.MAX_VALUE; int num = 0; boolean[] mark = new boolean[102]; for(int i = 0; i < n; i++) { int pos = in.nextInt(); mark[pos] = true; } for(int i = 0; i < mark.length; i++) if(!mark[i]) { if(Math.abs(x - i) < min) { min = Math.abs(x - i); num = i; } } System.out.println(num); } } ///////////////////////////////////TEMPLATE/////////////////////////////////// class FastScanner { BufferedReader br; StringTokenizer st; FastScanner(InputStream stream) { try { br = new BufferedReader(new InputStreamReader(stream)); } catch (Exception e) { e.printStackTrace(); } } FastScanner(File input) { try { br = new BufferedReader(new FileReader(input)); } catch (Exception e) { e.printStackTrace(); } } String nextLine() { String s = ""; try { s = br.readLine(); } catch (IOException e) { e.printStackTrace(); } return s; } String next() { while (st == null || !st.hasMoreTokens()) { 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()); } }
[ 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, 20, 14, 2, 13, 17, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 4, 18, 13, 13, 4, 18, 13, 41, 13, 17, 41, 13, 42, 17, 30, 41, 13, 2, 13, 13, 41, 13, 2, 13, 13, 14, 40, 4, 18, 13, 13, 30, 0, 13, 13, 3, 14, 40, 4, 18, 13, 13, 30, 0, 13, 13, 3, 40, 13, 4, 18, 18, 13, 13, 13, 30, 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 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 122, 14 ], [ 122, 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 ], [ 35, 37 ], [ 34, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 39, 44 ], [ 44, 45 ], [ 44, 46 ], [ 39, 47 ], [ 47, 48 ], [ 48, 49 ], [ 39, 50 ], [ 51, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 55, 56 ], [ 51, 57 ], [ 57, 58 ], [ 58, 59 ], [ 57, 60 ], [ 38, 61 ], [ 61, 62 ], [ 62, 63 ], [ 38, 64 ], [ 64, 65 ], [ 64, 66 ], [ 38, 67 ], [ 67, 68 ], [ 38, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 74, 76 ], [ 71, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 79, 81 ], [ 71, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 82, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 88, 92 ], [ 82, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 95, 98 ], [ 93, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 99, 103 ], [ 71, 104 ], [ 104, 105 ], [ 38, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 106, 111 ], [ 34, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 113, 118 ], [ 15, 119 ], [ 119, 120 ], [ 0, 121 ], [ 121, 122 ], [ 121, 123 ] ]
[ "import java.util.Scanner;\nimport java.util.Arrays;\nimport java.util.List;\nimport java.util.ArrayList;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n List<Integer> list = new ArrayList<>();\n if(n != 0){\n for(int i = 0; i < n; i++){\n int a = sc.nextInt();\n list.add(a);\n }\n sc.close();\n int i = 0;\n int ans;\n while(true){\n int a = x - i;\n int b = x + i;\n if(!list.contains(a)){\n ans = a;\n break;\n }else if(!list.contains(b)){\n ans = b;\n break;\n }\n i++;\n }\n System.out.print(ans);\n }else{\n System.out.println(x);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.Arrays;", "Arrays", "java.util", "import java.util.List;", "List", "java.util", "import java.util.ArrayList;", "ArrayList", "java.util", "public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n List<Integer> list = new ArrayList<>();\n if(n != 0){\n for(int i = 0; i < n; i++){\n int a = sc.nextInt();\n list.add(a);\n }\n sc.close();\n int i = 0;\n int ans;\n while(true){\n int a = x - i;\n int b = x + i;\n if(!list.contains(a)){\n ans = a;\n break;\n }else if(!list.contains(b)){\n ans = b;\n break;\n }\n i++;\n }\n System.out.print(ans);\n }else{\n System.out.println(x);\n }\n }\n}", "Main", "public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n List<Integer> list = new ArrayList<>();\n if(n != 0){\n for(int i = 0; i < n; i++){\n int a = sc.nextInt();\n list.add(a);\n }\n sc.close();\n int i = 0;\n int ans;\n while(true){\n int a = x - i;\n int b = x + i;\n if(!list.contains(a)){\n ans = a;\n break;\n }else if(!list.contains(b)){\n ans = b;\n break;\n }\n i++;\n }\n System.out.print(ans);\n }else{\n System.out.println(x);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n List<Integer> list = new ArrayList<>();\n if(n != 0){\n for(int i = 0; i < n; i++){\n int a = sc.nextInt();\n list.add(a);\n }\n sc.close();\n int i = 0;\n int ans;\n while(true){\n int a = x - i;\n int b = x + i;\n if(!list.contains(a)){\n ans = a;\n break;\n }else if(!list.contains(b)){\n ans = b;\n break;\n }\n i++;\n }\n System.out.print(ans);\n }else{\n System.out.println(x);\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "List<Integer> list = new ArrayList<>();", "list", "new ArrayList<>()", "if(n != 0){\n for(int i = 0; i < n; i++){\n int a = sc.nextInt();\n list.add(a);\n }\n sc.close();\n int i = 0;\n int ans;\n while(true){\n int a = x - i;\n int b = x + i;\n if(!list.contains(a)){\n ans = a;\n break;\n }else if(!list.contains(b)){\n ans = b;\n break;\n }\n i++;\n }\n System.out.print(ans);\n }else{\n System.out.println(x);\n }", "n != 0", "n", "0", "{\n for(int i = 0; i < n; i++){\n int a = sc.nextInt();\n list.add(a);\n }\n sc.close();\n int i = 0;\n int ans;\n while(true){\n int a = x - i;\n int b = x + i;\n if(!list.contains(a)){\n ans = a;\n break;\n }else if(!list.contains(b)){\n ans = b;\n break;\n }\n i++;\n }\n System.out.print(ans);\n }", "for(int i = 0; i < n; i++){\n int a = sc.nextInt();\n list.add(a);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n int a = sc.nextInt();\n list.add(a);\n }", "{\n int a = sc.nextInt();\n list.add(a);\n }", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "list.add(a)", "list.add", "list", "a", "sc.close()", "sc.close", "sc", "int i = 0;", "i", "0", "int ans;", "ans", "while(true){\n int a = x - i;\n int b = x + i;\n if(!list.contains(a)){\n ans = a;\n break;\n }else if(!list.contains(b)){\n ans = b;\n break;\n }\n i++;\n }", "true", "{\n int a = x - i;\n int b = x + i;\n if(!list.contains(a)){\n ans = a;\n break;\n }else if(!list.contains(b)){\n ans = b;\n break;\n }\n i++;\n }", "int a = x - i;", "a", "x - i", "x", "i", "int b = x + i;", "b", "x + i", "x", "i", "if(!list.contains(a)){\n ans = a;\n break;\n }else if(!list.contains(b)){\n ans = b;\n break;\n }", "!list.contains(a)", "list.contains(a)", "list.contains", "list", "a", "{\n ans = a;\n break;\n }", "ans = a", "ans", "a", "break;", "if(!list.contains(b)){\n ans = b;\n break;\n }", "!list.contains(b)", "list.contains(b)", "list.contains", "list", "b", "{\n ans = b;\n break;\n }", "ans = b", "ans", "b", "break;", "i++", "i", "System.out.print(ans)", "System.out.print", "System.out", "System", "System.out", "ans", "{\n System.out.println(x);\n }", "System.out.println(x)", "System.out.println", "System.out", "System", "System.out", "x", "String[] args", "args", "public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n List<Integer> list = new ArrayList<>();\n if(n != 0){\n for(int i = 0; i < n; i++){\n int a = sc.nextInt();\n list.add(a);\n }\n sc.close();\n int i = 0;\n int ans;\n while(true){\n int a = x - i;\n int b = x + i;\n if(!list.contains(a)){\n ans = a;\n break;\n }else if(!list.contains(b)){\n ans = b;\n break;\n }\n i++;\n }\n System.out.print(ans);\n }else{\n System.out.println(x);\n }\n }\n}", "public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n List<Integer> list = new ArrayList<>();\n if(n != 0){\n for(int i = 0; i < n; i++){\n int a = sc.nextInt();\n list.add(a);\n }\n sc.close();\n int i = 0;\n int ans;\n while(true){\n int a = x - i;\n int b = x + i;\n if(!list.contains(a)){\n ans = a;\n break;\n }else if(!list.contains(b)){\n ans = b;\n break;\n }\n i++;\n }\n System.out.print(ans);\n }else{\n System.out.println(x);\n }\n }\n}", "Main" ]
import java.util.Scanner; import java.util.Arrays; import java.util.List; import java.util.ArrayList; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int n = sc.nextInt(); List<Integer> list = new ArrayList<>(); if(n != 0){ for(int i = 0; i < n; i++){ int a = sc.nextInt(); list.add(a); } sc.close(); int i = 0; int ans; while(true){ int a = x - i; int b = x + i; if(!list.contains(a)){ ans = a; break; }else if(!list.contains(b)){ ans = b; break; } i++; } System.out.print(ans); }else{ System.out.println(x); } } }
[ 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, 41, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 13, 13, 0, 18, 13, 13, 2, 4, 18, 13, 2, 13, 13, 17, 0, 18, 13, 13, 2, 2, 4, 18, 13, 2, 13, 13, 17, 17, 4, 18, 13, 13, 0, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 18, 13, 13, 13, 40, 13, 3, 14, 2, 2, 13, 17, 17, 0, 13, 2, 13, 17, 0, 13, 2, 13, 17, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 132, 5 ], [ 132, 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 ], [ 8, 28 ], [ 28, 29 ], [ 8, 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 ], [ 42, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 48, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 52, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 57, 60 ], [ 60, 61 ], [ 60, 62 ], [ 56, 63 ], [ 48, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 64, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 70, 73 ], [ 73, 74 ], [ 73, 75 ], [ 69, 76 ], [ 68, 77 ], [ 8, 78 ], [ 78, 79 ], [ 79, 80 ], [ 78, 81 ], [ 8, 82 ], [ 82, 83 ], [ 82, 84 ], [ 8, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 85, 90 ], [ 90, 91 ], [ 90, 92 ], [ 85, 93 ], [ 93, 94 ], [ 94, 95 ], [ 85, 96 ], [ 97, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 99, 103 ], [ 98, 104 ], [ 104, 105 ], [ 98, 106 ], [ 8, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 108, 112 ], [ 107, 113 ], [ 113, 114 ], [ 113, 115 ], [ 115, 116 ], [ 115, 117 ], [ 107, 118 ], [ 118, 119 ], [ 118, 120 ], [ 120, 121 ], [ 120, 122 ], [ 8, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 123, 128 ], [ 6, 129 ], [ 129, 130 ], [ 0, 131 ], [ 131, 132 ], [ 131, 133 ] ]
[ "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 \tint x = sc.nextInt();\n int n = sc.nextInt();\n \tint ps[] = new int[n];\n \tint ans;\n \tint istack;\n \n \tfor(int i = 0;i < n;i++){\n istack = sc.nextInt();\n if(istack < x) ps[i] = Math.abs(x-istack)*2;\n else ps[i] = Math.abs(x-istack)*2+1;\n }\n \n \tArrays.sort(ps);\n \tans = 1;\n \tfor(int i = 0;i < n;i++){\n if(ps[i] == ans) ans++;\n else break;\n \t}\n \tif(ans%2 == 0) x -= ans/2;\n \telse x += ans/2;\n \n \tSystem.out.println(x);\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\t\n \tint x = sc.nextInt();\n int n = sc.nextInt();\n \tint ps[] = new int[n];\n \tint ans;\n \tint istack;\n \n \tfor(int i = 0;i < n;i++){\n istack = sc.nextInt();\n if(istack < x) ps[i] = Math.abs(x-istack)*2;\n else ps[i] = Math.abs(x-istack)*2+1;\n }\n \n \tArrays.sort(ps);\n \tans = 1;\n \tfor(int i = 0;i < n;i++){\n if(ps[i] == ans) ans++;\n else break;\n \t}\n \tif(ans%2 == 0) x -= ans/2;\n \telse x += ans/2;\n \n \tSystem.out.println(x);\n \n\t}\n}", "Main", "public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n \tint x = sc.nextInt();\n int n = sc.nextInt();\n \tint ps[] = new int[n];\n \tint ans;\n \tint istack;\n \n \tfor(int i = 0;i < n;i++){\n istack = sc.nextInt();\n if(istack < x) ps[i] = Math.abs(x-istack)*2;\n else ps[i] = Math.abs(x-istack)*2+1;\n }\n \n \tArrays.sort(ps);\n \tans = 1;\n \tfor(int i = 0;i < n;i++){\n if(ps[i] == ans) ans++;\n else break;\n \t}\n \tif(ans%2 == 0) x -= ans/2;\n \telse x += ans/2;\n \n \tSystem.out.println(x);\n \n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n \tint x = sc.nextInt();\n int n = sc.nextInt();\n \tint ps[] = new int[n];\n \tint ans;\n \tint istack;\n \n \tfor(int i = 0;i < n;i++){\n istack = sc.nextInt();\n if(istack < x) ps[i] = Math.abs(x-istack)*2;\n else ps[i] = Math.abs(x-istack)*2+1;\n }\n \n \tArrays.sort(ps);\n \tans = 1;\n \tfor(int i = 0;i < n;i++){\n if(ps[i] == ans) ans++;\n else break;\n \t}\n \tif(ans%2 == 0) x -= ans/2;\n \telse x += ans/2;\n \n \tSystem.out.println(x);\n \n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int ps[] = new int[n];", "ps", "new int[n]", "n", "int ans;", "ans", "int istack;", "istack", "for(int i = 0;i < n;i++){\n istack = sc.nextInt();\n if(istack < x) ps[i] = Math.abs(x-istack)*2;\n else ps[i] = Math.abs(x-istack)*2+1;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n istack = sc.nextInt();\n if(istack < x) ps[i] = Math.abs(x-istack)*2;\n else ps[i] = Math.abs(x-istack)*2+1;\n }", "{\n istack = sc.nextInt();\n if(istack < x) ps[i] = Math.abs(x-istack)*2;\n else ps[i] = Math.abs(x-istack)*2+1;\n }", "istack = sc.nextInt()", "istack", "sc.nextInt()", "sc.nextInt", "sc", "if(istack < x) ps[i] = Math.abs(x-istack)*2;\n else ps[i] = Math.abs(x-istack)*2+1;", "istack < x", "istack", "x", "ps[i] = Math.abs(x-istack)*2", "ps[i]", "ps", "i", "Math.abs(x-istack)*2", "Math.abs(x-istack)", "Math.abs", "Math", "x-istack", "x", "istack", "2", "ps[i] = Math.abs(x-istack)*2+1", "ps[i]", "ps", "i", "Math.abs(x-istack)*2+1", "Math.abs(x-istack)*2", "Math.abs(x-istack)", "Math.abs", "Math", "x-istack", "x", "istack", "2", "1", "Arrays.sort(ps)", "Arrays.sort", "Arrays", "ps", "ans = 1", "ans", "1", "for(int i = 0;i < n;i++){\n if(ps[i] == ans) ans++;\n else break;\n \t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n if(ps[i] == ans) ans++;\n else break;\n \t}", "{\n if(ps[i] == ans) ans++;\n else break;\n \t}", "if(ps[i] == ans) ans++;\n else break;", "ps[i] == ans", "ps[i]", "ps", "i", "ans", "ans++", "ans", "break;", "if(ans%2 == 0) x -= ans/2;\n \telse x += ans/2;", "ans%2 == 0", "ans%2", "ans", "2", "0", "x -= ans/2", "x", "ans/2", "ans", "2", "x += ans/2", "x", "ans/2", "ans", "2", "System.out.println(x)", "System.out.println", "System.out", "System", "System.out", "x", "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 \tint x = sc.nextInt();\n int n = sc.nextInt();\n \tint ps[] = new int[n];\n \tint ans;\n \tint istack;\n \n \tfor(int i = 0;i < n;i++){\n istack = sc.nextInt();\n if(istack < x) ps[i] = Math.abs(x-istack)*2;\n else ps[i] = Math.abs(x-istack)*2+1;\n }\n \n \tArrays.sort(ps);\n \tans = 1;\n \tfor(int i = 0;i < n;i++){\n if(ps[i] == ans) ans++;\n else break;\n \t}\n \tif(ans%2 == 0) x -= ans/2;\n \telse x += ans/2;\n \n \tSystem.out.println(x);\n \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 \tint x = sc.nextInt();\n int n = sc.nextInt();\n \tint ps[] = new int[n];\n \tint ans;\n \tint istack;\n \n \tfor(int i = 0;i < n;i++){\n istack = sc.nextInt();\n if(istack < x) ps[i] = Math.abs(x-istack)*2;\n else ps[i] = Math.abs(x-istack)*2+1;\n }\n \n \tArrays.sort(ps);\n \tans = 1;\n \tfor(int i = 0;i < n;i++){\n if(ps[i] == ans) ans++;\n else break;\n \t}\n \tif(ans%2 == 0) x -= ans/2;\n \telse x += ans/2;\n \n \tSystem.out.println(x);\n \n\t}\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int n = sc.nextInt(); int ps[] = new int[n]; int ans; int istack; for(int i = 0;i < n;i++){ istack = sc.nextInt(); if(istack < x) ps[i] = Math.abs(x-istack)*2; else ps[i] = Math.abs(x-istack)*2+1; } Arrays.sort(ps); ans = 1; for(int i = 0;i < n;i++){ if(ps[i] == ans) ans++; else break; } if(ans%2 == 0) x -= ans/2; else x += ans/2; System.out.println(x); } }
[ 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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 4, 18, 13, 17, 41, 13, 13, 41, 13, 13, 42, 17, 30, 14, 2, 18, 13, 13, 17, 30, 4, 18, 18, 13, 13, 13, 3, 14, 2, 18, 13, 13, 17, 30, 4, 18, 18, 13, 13, 13, 3, 40, 13, 40, 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 ], [ 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 ], [ 42, 43 ], [ 43, 44 ], [ 39, 45 ], [ 8, 46 ], [ 46, 47 ], [ 46, 48 ], [ 8, 49 ], [ 49, 50 ], [ 49, 51 ], [ 8, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 56, 60 ], [ 55, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 62, 67 ], [ 61, 68 ], [ 55, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 70, 74 ], [ 69, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 76, 81 ], [ 75, 82 ], [ 54, 83 ], [ 83, 84 ], [ 54, 85 ], [ 85, 86 ], [ 6, 87 ], [ 87, 88 ], [ 0, 89 ], [ 89, 90 ], [ 89, 91 ] ]
[ "import java.util.*;\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n boolean[] line = new boolean[105];\n for (int i = 0; i < n; i++) {\n line[sc.nextInt()] = true;\n }\n\n int pointerLeft = x;\n int pointerRight = x;\n while (true) {\n if (line[pointerLeft] == false) {\n System.out.println(pointerLeft);\n break;\n } else if (line[pointerRight] == false) {\n System.out.println(pointerRight);\n break;\n }\n pointerLeft--;\n pointerRight++;\n }\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 x = sc.nextInt();\n int n = sc.nextInt();\n boolean[] line = new boolean[105];\n for (int i = 0; i < n; i++) {\n line[sc.nextInt()] = true;\n }\n\n int pointerLeft = x;\n int pointerRight = x;\n while (true) {\n if (line[pointerLeft] == false) {\n System.out.println(pointerLeft);\n break;\n } else if (line[pointerRight] == false) {\n System.out.println(pointerRight);\n break;\n }\n pointerLeft--;\n pointerRight++;\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n boolean[] line = new boolean[105];\n for (int i = 0; i < n; i++) {\n line[sc.nextInt()] = true;\n }\n\n int pointerLeft = x;\n int pointerRight = x;\n while (true) {\n if (line[pointerLeft] == false) {\n System.out.println(pointerLeft);\n break;\n } else if (line[pointerRight] == false) {\n System.out.println(pointerRight);\n break;\n }\n pointerLeft--;\n pointerRight++;\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n boolean[] line = new boolean[105];\n for (int i = 0; i < n; i++) {\n line[sc.nextInt()] = true;\n }\n\n int pointerLeft = x;\n int pointerRight = x;\n while (true) {\n if (line[pointerLeft] == false) {\n System.out.println(pointerLeft);\n break;\n } else if (line[pointerRight] == false) {\n System.out.println(pointerRight);\n break;\n }\n pointerLeft--;\n pointerRight++;\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "boolean[] line = new boolean[105];", "line", "new boolean[105]", "105", "for (int i = 0; i < n; i++) {\n line[sc.nextInt()] = true;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n line[sc.nextInt()] = true;\n }", "{\n line[sc.nextInt()] = true;\n }", "line[sc.nextInt()] = true", "line[sc.nextInt()]", "line", "sc.nextInt()", "sc.nextInt", "sc", "true", "int pointerLeft = x;", "pointerLeft", "x", "int pointerRight = x;", "pointerRight", "x", "while (true) {\n if (line[pointerLeft] == false) {\n System.out.println(pointerLeft);\n break;\n } else if (line[pointerRight] == false) {\n System.out.println(pointerRight);\n break;\n }\n pointerLeft--;\n pointerRight++;\n }", "true", "{\n if (line[pointerLeft] == false) {\n System.out.println(pointerLeft);\n break;\n } else if (line[pointerRight] == false) {\n System.out.println(pointerRight);\n break;\n }\n pointerLeft--;\n pointerRight++;\n }", "if (line[pointerLeft] == false) {\n System.out.println(pointerLeft);\n break;\n } else if (line[pointerRight] == false) {\n System.out.println(pointerRight);\n break;\n }", "line[pointerLeft] == false", "line[pointerLeft]", "line", "pointerLeft", "false", "{\n System.out.println(pointerLeft);\n break;\n }", "System.out.println(pointerLeft)", "System.out.println", "System.out", "System", "System.out", "pointerLeft", "break;", "if (line[pointerRight] == false) {\n System.out.println(pointerRight);\n break;\n }", "line[pointerRight] == false", "line[pointerRight]", "line", "pointerRight", "false", "{\n System.out.println(pointerRight);\n break;\n }", "System.out.println(pointerRight)", "System.out.println", "System.out", "System", "System.out", "pointerRight", "break;", "pointerLeft--", "pointerLeft", "pointerRight++", "pointerRight", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n boolean[] line = new boolean[105];\n for (int i = 0; i < n; i++) {\n line[sc.nextInt()] = true;\n }\n\n int pointerLeft = x;\n int pointerRight = x;\n while (true) {\n if (line[pointerLeft] == false) {\n System.out.println(pointerLeft);\n break;\n } else if (line[pointerRight] == false) {\n System.out.println(pointerRight);\n break;\n }\n pointerLeft--;\n pointerRight++;\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n boolean[] line = new boolean[105];\n for (int i = 0; i < n; i++) {\n line[sc.nextInt()] = true;\n }\n\n int pointerLeft = x;\n int pointerRight = x;\n while (true) {\n if (line[pointerLeft] == false) {\n System.out.println(pointerLeft);\n break;\n } else if (line[pointerRight] == false) {\n System.out.println(pointerRight);\n break;\n }\n pointerLeft--;\n pointerRight++;\n }\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int n = sc.nextInt(); boolean[] line = new boolean[105]; for (int i = 0; i < n; i++) { line[sc.nextInt()] = true; } int pointerLeft = x; int pointerRight = x; while (true) { if (line[pointerLeft] == false) { System.out.println(pointerLeft); break; } else if (line[pointerRight] == false) { System.out.println(pointerRight); break; } pointerLeft--; pointerRight++; } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 41, 13, 20, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 20, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 18, 13, 13, 17, 41, 13, 13, 41, 13, 17, 42, 17, 30, 14, 40, 4, 18, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 3, 14, 40, 4, 18, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 3, 40, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 112, 5 ], [ 112, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 8, 11 ], [ 11, 12 ], [ 8, 13 ], [ 13, 14 ], [ 8, 15 ], [ 15, 16 ], [ 15, 17 ], [ 8, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 8, 23 ], [ 23, 24 ], [ 23, 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 ], [ 47, 55 ], [ 55, 56 ], [ 56, 57 ], [ 55, 58 ], [ 58, 59 ], [ 58, 60 ], [ 55, 61 ], [ 8, 62 ], [ 62, 63 ], [ 62, 64 ], [ 8, 65 ], [ 65, 66 ], [ 65, 67 ], [ 8, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 73, 76 ], [ 76, 77 ], [ 76, 78 ], [ 71, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 80, 85 ], [ 85, 86 ], [ 85, 87 ], [ 79, 88 ], [ 71, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 94, 95 ], [ 94, 96 ], [ 89, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 98, 103 ], [ 103, 104 ], [ 103, 105 ], [ 97, 106 ], [ 89, 107 ], [ 107, 108 ], [ 6, 109 ], [ 109, 110 ], [ 0, 111 ], [ 111, 112 ], [ 111, 113 ] ]
[ "import java.util.*;\npublic class Main{\n public static void main(String args[]){\n int i,x,n;\n Scanner scn =new Scanner(System.in);\n x=scn.nextInt();\n n=scn.nextInt();\n int[] a= new int[n];\n HashMap<Integer,Boolean> map = new HashMap<>();\n for(i=0;i<n;i++){\n a[i]=scn.nextInt();\n map.put(a[i],true);\n }\n int check = x;\n int diff =0;\n\n while(true){\n if(!map.containsKey(check-diff)){\n System.out.println(check-diff);\n break;\n }\n \n else if(!map.containsKey(check+diff)){\n System.out.println(check+diff);\n break;\n }\n \n else diff++;\n }\n }\n}\n\n", "import java.util.*;", "util.*", "java", "public class Main{\n public static void main(String args[]){\n int i,x,n;\n Scanner scn =new Scanner(System.in);\n x=scn.nextInt();\n n=scn.nextInt();\n int[] a= new int[n];\n HashMap<Integer,Boolean> map = new HashMap<>();\n for(i=0;i<n;i++){\n a[i]=scn.nextInt();\n map.put(a[i],true);\n }\n int check = x;\n int diff =0;\n\n while(true){\n if(!map.containsKey(check-diff)){\n System.out.println(check-diff);\n break;\n }\n \n else if(!map.containsKey(check+diff)){\n System.out.println(check+diff);\n break;\n }\n \n else diff++;\n }\n }\n}", "Main", "public static void main(String args[]){\n int i,x,n;\n Scanner scn =new Scanner(System.in);\n x=scn.nextInt();\n n=scn.nextInt();\n int[] a= new int[n];\n HashMap<Integer,Boolean> map = new HashMap<>();\n for(i=0;i<n;i++){\n a[i]=scn.nextInt();\n map.put(a[i],true);\n }\n int check = x;\n int diff =0;\n\n while(true){\n if(!map.containsKey(check-diff)){\n System.out.println(check-diff);\n break;\n }\n \n else if(!map.containsKey(check+diff)){\n System.out.println(check+diff);\n break;\n }\n \n else diff++;\n }\n }", "main", "{\n int i,x,n;\n Scanner scn =new Scanner(System.in);\n x=scn.nextInt();\n n=scn.nextInt();\n int[] a= new int[n];\n HashMap<Integer,Boolean> map = new HashMap<>();\n for(i=0;i<n;i++){\n a[i]=scn.nextInt();\n map.put(a[i],true);\n }\n int check = x;\n int diff =0;\n\n while(true){\n if(!map.containsKey(check-diff)){\n System.out.println(check-diff);\n break;\n }\n \n else if(!map.containsKey(check+diff)){\n System.out.println(check+diff);\n break;\n }\n \n else diff++;\n }\n }", "int i", "i", "x", "x", "n;", "n", "Scanner scn =new Scanner(System.in);", "scn", "new Scanner(System.in)", "x=scn.nextInt()", "x", "scn.nextInt()", "scn.nextInt", "scn", "n=scn.nextInt()", "n", "scn.nextInt()", "scn.nextInt", "scn", "int[] a= new int[n];", "a", "new int[n]", "n", "HashMap<Integer,Boolean> map = new HashMap<>();", "map", "new HashMap<>()", "for(i=0;i<n;i++){\n a[i]=scn.nextInt();\n map.put(a[i],true);\n }", "i=0;", "i=0", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n a[i]=scn.nextInt();\n map.put(a[i],true);\n }", "{\n a[i]=scn.nextInt();\n map.put(a[i],true);\n }", "a[i]=scn.nextInt()", "a[i]", "a", "i", "scn.nextInt()", "scn.nextInt", "scn", "map.put(a[i],true)", "map.put", "map", "a[i]", "a", "i", "true", "int check = x;", "check", "x", "int diff =0;", "diff", "0", "while(true){\n if(!map.containsKey(check-diff)){\n System.out.println(check-diff);\n break;\n }\n \n else if(!map.containsKey(check+diff)){\n System.out.println(check+diff);\n break;\n }\n \n else diff++;\n }", "true", "{\n if(!map.containsKey(check-diff)){\n System.out.println(check-diff);\n break;\n }\n \n else if(!map.containsKey(check+diff)){\n System.out.println(check+diff);\n break;\n }\n \n else diff++;\n }", "if(!map.containsKey(check-diff)){\n System.out.println(check-diff);\n break;\n }\n \n else if(!map.containsKey(check+diff)){\n System.out.println(check+diff);\n break;\n }\n \n else diff++;", "!map.containsKey(check-diff)", "map.containsKey(check-diff)", "map.containsKey", "map", "check-diff", "check", "diff", "{\n System.out.println(check-diff);\n break;\n }", "System.out.println(check-diff)", "System.out.println", "System.out", "System", "System.out", "check-diff", "check", "diff", "break;", "if(!map.containsKey(check+diff)){\n System.out.println(check+diff);\n break;\n }\n \n else diff++;", "!map.containsKey(check+diff)", "map.containsKey(check+diff)", "map.containsKey", "map", "check+diff", "check", "diff", "{\n System.out.println(check+diff);\n break;\n }", "System.out.println(check+diff)", "System.out.println", "System.out", "System", "System.out", "check+diff", "check", "diff", "break;", "diff++", "diff", "String args[]", "args", "public class Main{\n public static void main(String args[]){\n int i,x,n;\n Scanner scn =new Scanner(System.in);\n x=scn.nextInt();\n n=scn.nextInt();\n int[] a= new int[n];\n HashMap<Integer,Boolean> map = new HashMap<>();\n for(i=0;i<n;i++){\n a[i]=scn.nextInt();\n map.put(a[i],true);\n }\n int check = x;\n int diff =0;\n\n while(true){\n if(!map.containsKey(check-diff)){\n System.out.println(check-diff);\n break;\n }\n \n else if(!map.containsKey(check+diff)){\n System.out.println(check+diff);\n break;\n }\n \n else diff++;\n }\n }\n}", "public class Main{\n public static void main(String args[]){\n int i,x,n;\n Scanner scn =new Scanner(System.in);\n x=scn.nextInt();\n n=scn.nextInt();\n int[] a= new int[n];\n HashMap<Integer,Boolean> map = new HashMap<>();\n for(i=0;i<n;i++){\n a[i]=scn.nextInt();\n map.put(a[i],true);\n }\n int check = x;\n int diff =0;\n\n while(true){\n if(!map.containsKey(check-diff)){\n System.out.println(check-diff);\n break;\n }\n \n else if(!map.containsKey(check+diff)){\n System.out.println(check+diff);\n break;\n }\n \n else diff++;\n }\n }\n}", "Main" ]
import java.util.*; public class Main{ public static void main(String args[]){ int i,x,n; Scanner scn =new Scanner(System.in); x=scn.nextInt(); n=scn.nextInt(); int[] a= new int[n]; HashMap<Integer,Boolean> map = new HashMap<>(); for(i=0;i<n;i++){ a[i]=scn.nextInt(); map.put(a[i],true); } int check = x; int diff =0; while(true){ if(!map.containsKey(check-diff)){ System.out.println(check-diff); break; } else if(!map.containsKey(check+diff)){ System.out.println(check+diff); break; } else diff++; } } }
[ 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, 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, 17, 1, 40, 13, 30, 30, 14, 40, 4, 18, 4, 18, 13, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 29, 14, 40, 4, 18, 4, 18, 13, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 29, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 107, 8 ], [ 107, 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 ], [ 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 ], [ 11, 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 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 66, 69 ], [ 64, 70 ], [ 70, 71 ], [ 70, 72 ], [ 62, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 74, 79 ], [ 79, 80 ], [ 79, 81 ], [ 73, 82 ], [ 62, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 87, 90 ], [ 85, 91 ], [ 91, 92 ], [ 91, 93 ], [ 83, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 95, 100 ], [ 100, 101 ], [ 100, 102 ], [ 94, 103 ], [ 9, 104 ], [ 104, 105 ], [ 0, 106 ], [ 106, 107 ], [ 106, 108 ] ]
[ "import java.util.*;\nimport java.lang.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n Integer[] p = new Integer[n];\n for(int i = 0; i < n; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tfor(int a = 0; a < 1000; a++) {\n\t\t\tif(!(Arrays.asList(p).contains(x - a))){\n\t\t\tSystem.out.println(x - a);\n\t\t\treturn;\n\t\t\t}\n\t\t\telse if(!(Arrays.asList(p).contains(x + a))){\n\t\t\tSystem.out.println(x + a);\n\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n}", "import java.util.*;", "util.*", "java", "import java.lang.*;", "lang.*", "java", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n Integer[] p = new Integer[n];\n for(int i = 0; i < n; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tfor(int a = 0; a < 1000; a++) {\n\t\t\tif(!(Arrays.asList(p).contains(x - a))){\n\t\t\tSystem.out.println(x - a);\n\t\t\treturn;\n\t\t\t}\n\t\t\telse if(!(Arrays.asList(p).contains(x + a))){\n\t\t\tSystem.out.println(x + a);\n\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n Integer[] p = new Integer[n];\n for(int i = 0; i < n; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tfor(int a = 0; a < 1000; a++) {\n\t\t\tif(!(Arrays.asList(p).contains(x - a))){\n\t\t\tSystem.out.println(x - a);\n\t\t\treturn;\n\t\t\t}\n\t\t\telse if(!(Arrays.asList(p).contains(x + a))){\n\t\t\tSystem.out.println(x + a);\n\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "main", "{\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n Integer[] p = new Integer[n];\n for(int i = 0; i < n; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tfor(int a = 0; a < 1000; a++) {\n\t\t\tif(!(Arrays.asList(p).contains(x - a))){\n\t\t\tSystem.out.println(x - a);\n\t\t\treturn;\n\t\t\t}\n\t\t\telse if(!(Arrays.asList(p).contains(x + a))){\n\t\t\tSystem.out.println(x + a);\n\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "Integer[] p = new Integer[n];", "p", "new Integer[n]", "n", "for(int i = 0; i < n; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tp[i] = sc.nextInt();\n\t\t}", "{\n\t\t\tp[i] = sc.nextInt();\n\t\t}", "p[i] = sc.nextInt()", "p[i]", "p", "i", "sc.nextInt()", "sc.nextInt", "sc", "for(int a = 0; a < 1000; a++) {\n\t\t\tif(!(Arrays.asList(p).contains(x - a))){\n\t\t\tSystem.out.println(x - a);\n\t\t\treturn;\n\t\t\t}\n\t\t\telse if(!(Arrays.asList(p).contains(x + a))){\n\t\t\tSystem.out.println(x + a);\n\t\t\treturn;\n\t\t\t}\n\t\t}", "int a = 0;", "int a = 0;", "a", "0", "a < 1000", "a", "1000", "a++", "a++", "a", "{\n\t\t\tif(!(Arrays.asList(p).contains(x - a))){\n\t\t\tSystem.out.println(x - a);\n\t\t\treturn;\n\t\t\t}\n\t\t\telse if(!(Arrays.asList(p).contains(x + a))){\n\t\t\tSystem.out.println(x + a);\n\t\t\treturn;\n\t\t\t}\n\t\t}", "{\n\t\t\tif(!(Arrays.asList(p).contains(x - a))){\n\t\t\tSystem.out.println(x - a);\n\t\t\treturn;\n\t\t\t}\n\t\t\telse if(!(Arrays.asList(p).contains(x + a))){\n\t\t\tSystem.out.println(x + a);\n\t\t\treturn;\n\t\t\t}\n\t\t}", "if(!(Arrays.asList(p).contains(x - a))){\n\t\t\tSystem.out.println(x - a);\n\t\t\treturn;\n\t\t\t}\n\t\t\telse if(!(Arrays.asList(p).contains(x + a))){\n\t\t\tSystem.out.println(x + a);\n\t\t\treturn;\n\t\t\t}", "!(Arrays.asList(p).contains(x - a))", "(Arrays.asList(p).contains(x - a))", "Arrays.asList(p).contains", "Arrays.asList(p)", "Arrays.asList", "Arrays", "p", "x - a", "x", "a", "{\n\t\t\tSystem.out.println(x - a);\n\t\t\treturn;\n\t\t\t}", "System.out.println(x - a)", "System.out.println", "System.out", "System", "System.out", "x - a", "x", "a", "return;", "if(!(Arrays.asList(p).contains(x + a))){\n\t\t\tSystem.out.println(x + a);\n\t\t\treturn;\n\t\t\t}", "!(Arrays.asList(p).contains(x + a))", "(Arrays.asList(p).contains(x + a))", "Arrays.asList(p).contains", "Arrays.asList(p)", "Arrays.asList", "Arrays", "p", "x + a", "x", "a", "{\n\t\t\tSystem.out.println(x + a);\n\t\t\treturn;\n\t\t\t}", "System.out.println(x + a)", "System.out.println", "System.out", "System", "System.out", "x + a", "x", "a", "return;", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n Integer[] p = new Integer[n];\n for(int i = 0; i < n; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tfor(int a = 0; a < 1000; a++) {\n\t\t\tif(!(Arrays.asList(p).contains(x - a))){\n\t\t\tSystem.out.println(x - a);\n\t\t\treturn;\n\t\t\t}\n\t\t\telse if(!(Arrays.asList(p).contains(x + a))){\n\t\t\tSystem.out.println(x + a);\n\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n Integer[] p = new Integer[n];\n for(int i = 0; i < n; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tfor(int a = 0; a < 1000; a++) {\n\t\t\tif(!(Arrays.asList(p).contains(x - a))){\n\t\t\tSystem.out.println(x - a);\n\t\t\treturn;\n\t\t\t}\n\t\t\telse if(!(Arrays.asList(p).contains(x + a))){\n\t\t\tSystem.out.println(x + a);\n\t\t\treturn;\n\t\t\t}\n\t\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 x = sc.nextInt(); int n = sc.nextInt(); Integer[] p = new Integer[n]; for(int i = 0; i < n; i++) { p[i] = sc.nextInt(); } for(int a = 0; a < 1000; a++) { if(!(Arrays.asList(p).contains(x - a))){ System.out.println(x - a); return; } else if(!(Arrays.asList(p).contains(x + a))){ System.out.println(x + a); return; } } } }
[ 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, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 17, 41, 13, 17, 41, 13, 41, 13, 41, 13, 17, 41, 13, 17, 41, 13, 17, 41, 13, 41, 13, 20, 17, 41, 13, 17, 41, 13, 17, 41, 13, 12, 13, 30, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 4, 13, 13, 12, 13, 30, 41, 13, 4, 13, 41, 13, 4, 13, 41, 13, 20, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 40, 18, 13, 4, 13, 41, 13, 13, 41, 13, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 14, 2, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 2, 13, 13, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 13, 4, 18, 13, 13, 23, 13, 12, 13, 30, 41, 13, 17, 41, 13, 13, 42, 2, 13, 17, 30, 14, 2, 2, 13, 17, 17, 30, 0, 13, 2, 2, 13, 13, 13, 0, 13, 2, 2, 13, 13, 13, 0, 13, 17, 29, 2, 13, 13, 23, 13, 23, 13, 12, 13, 30, 42, 2, 13, 17, 30, 41, 13, 2, 13, 13, 0, 13, 13, 0, 13, 13, 29, 13, 23, 13, 23, 13, 12, 13, 30, 0, 13, 8, 4, 18, 13, 18, 13, 13, 20, 0, 13, 20, 41, 13, 4, 18, 13, 4, 13, 4, 18, 13, 14, 40, 4, 18, 13, 4, 13, 2, 2, 4, 18, 13, 13, 17, 12, 13, 30, 4, 18, 20, 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, 29, 40, 2, 2, 13, 17, 2, 13, 17, 23, 13, 12, 13, 30, 41, 13, 42, 2, 2, 0, 13, 4, 13, 40, 17, 4, 13, 13, 29, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 13, 12, 13, 30, 41, 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, 20, 13, 41, 13, 4, 13, 41, 13, 17, 42, 2, 13, 13, 30, 14, 40, 4, 13, 13, 0, 18, 13, 40, 13, 13, 0, 13, 4, 13, 29, 8, 2, 13, 13, 13, 4, 18, 13, 13, 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, 13, 29, 13, 23, 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, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 4, 18, 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, 13, 29, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 17, 41, 13, 41, 13, 17, 42, 2, 2, 0, 13, 4, 13, 40, 17, 40, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 14, 2, 13, 17, 30, 0, 13, 17, 0, 13, 4, 13, 42, 17, 30, 14, 2, 2, 13, 17, 2, 13, 17, 30, 0, 13, 2, 2, 13, 17, 2, 13, 17, 30, 29, 8, 13, 40, 13, 13, 0, 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, 13, 29, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 17, 41, 13, 41, 13, 17, 42, 2, 2, 0, 13, 4, 13, 40, 17, 40, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 14, 2, 13, 17, 30, 0, 13, 17, 0, 13, 4, 13, 42, 17, 30, 14, 2, 2, 13, 17, 2, 13, 17, 30, 0, 13, 2, 2, 13, 17, 2, 13, 17, 30, 29, 8, 13, 40, 13, 13, 0, 13, 4, 13, 12, 13, 30, 4, 18, 18, 13, 13, 4, 18, 13, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 29, 13, 12, 13, 30, 29, 13, 12, 13, 30, 0, 18, 36, 13, 13, 0, 18, 36, 13, 13, 23, 13, 23, 13, 12, 13, 30, 29, 2, 2, 13, 17, 13, 12, 13, 30, 29, 2, 2, 4, 18, 13, 17, 8, 2, 13, 17, 17, 4, 18, 13, 12, 13, 30, 14, 2, 36, 13, 29, 17, 14, 2, 13, 13, 30, 41, 13, 13, 14, 8, 2, 13, 17, 40, 4, 18, 13, 18, 13, 13, 2, 18, 13, 13, 17, 29, 17, 14, 8, 2, 13, 17, 40, 4, 18, 13, 18, 13, 13, 2, 18, 13, 13, 17, 29, 17, 29, 17, 29, 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 ], [ 22, 23 ], [ 22, 24 ], [ 0, 25 ], [ 25, 26 ], [ 25, 27 ], [ 0, 28 ], [ 28, 29 ], [ 28, 30 ], [ 0, 31 ], [ 925, 32 ], [ 925, 33 ], [ 33, 34 ], [ 33, 35 ], [ 925, 36 ], [ 36, 37 ], [ 36, 38 ], [ 925, 39 ], [ 39, 40 ], [ 925, 41 ], [ 41, 42 ], [ 925, 43 ], [ 43, 44 ], [ 43, 45 ], [ 925, 46 ], [ 46, 47 ], [ 46, 48 ], [ 925, 49 ], [ 49, 50 ], [ 49, 51 ], [ 925, 52 ], [ 52, 53 ], [ 925, 54 ], [ 54, 55 ], [ 54, 56 ], [ 925, 58 ], [ 58, 59 ], [ 58, 60 ], [ 925, 61 ], [ 61, 62 ], [ 61, 63 ], [ 925, 64 ], [ 64, 65 ], [ 925, 66 ], [ 66, 67 ], [ 66, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 68, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 72, 77 ], [ 77, 78 ], [ 77, 79 ], [ 72, 80 ], [ 80, 81 ], [ 81, 82 ], [ 72, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 925, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 92, 93 ], [ 89, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 89, 98 ], [ 98, 99 ], [ 98, 100 ], [ 89, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 102, 107 ], [ 107, 108 ], [ 107, 109 ], [ 102, 110 ], [ 110, 111 ], [ 111, 112 ], [ 102, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 89, 119 ], [ 119, 120 ], [ 119, 121 ], [ 89, 122 ], [ 122, 123 ], [ 122, 124 ], [ 124, 125 ], [ 124, 126 ], [ 89, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 127, 132 ], [ 132, 133 ], [ 132, 134 ], [ 127, 135 ], [ 135, 136 ], [ 136, 137 ], [ 127, 138 ], [ 138, 139 ], [ 139, 140 ], [ 140, 141 ], [ 141, 142 ], [ 141, 143 ], [ 140, 144 ], [ 139, 145 ], [ 145, 146 ], [ 146, 147 ], [ 146, 148 ], [ 148, 149 ], [ 149, 150 ], [ 148, 151 ], [ 151, 152 ], [ 151, 153 ], [ 145, 154 ], [ 154, 155 ], [ 155, 156 ], [ 155, 157 ], [ 154, 158 ], [ 158, 159 ], [ 159, 160 ], [ 159, 161 ], [ 158, 162 ], [ 162, 163 ], [ 162, 164 ], [ 89, 165 ], [ 165, 166 ], [ 166, 167 ], [ 165, 168 ], [ 87, 169 ], [ 169, 170 ], [ 925, 171 ], [ 171, 172 ], [ 171, 173 ], [ 173, 174 ], [ 174, 175 ], [ 174, 176 ], [ 173, 177 ], [ 177, 178 ], [ 177, 179 ], [ 173, 180 ], [ 180, 181 ], [ 181, 182 ], [ 181, 183 ], [ 180, 184 ], [ 184, 185 ], [ 185, 186 ], [ 186, 187 ], [ 187, 188 ], [ 187, 189 ], [ 186, 190 ], [ 185, 191 ], [ 191, 192 ], [ 192, 193 ], [ 192, 194 ], [ 194, 195 ], [ 195, 196 ], [ 195, 197 ], [ 194, 198 ], [ 184, 199 ], [ 199, 200 ], [ 199, 201 ], [ 201, 202 ], [ 202, 203 ], [ 202, 204 ], [ 201, 205 ], [ 184, 206 ], [ 206, 207 ], [ 206, 208 ], [ 173, 209 ], [ 209, 210 ], [ 210, 211 ], [ 210, 212 ], [ 171, 213 ], [ 213, 214 ], [ 171, 215 ], [ 215, 216 ], [ 925, 217 ], [ 217, 218 ], [ 217, 219 ], [ 219, 220 ], [ 220, 221 ], [ 221, 222 ], [ 221, 223 ], [ 220, 224 ], [ 224, 225 ], [ 225, 226 ], [ 225, 227 ], [ 227, 228 ], [ 227, 229 ], [ 224, 230 ], [ 230, 231 ], [ 230, 232 ], [ 224, 233 ], [ 233, 234 ], [ 233, 235 ], [ 219, 236 ], [ 236, 237 ], [ 217, 238 ], [ 238, 239 ], [ 217, 240 ], [ 240, 241 ], [ 925, 242 ], [ 242, 243 ], [ 242, 244 ], [ 244, 245 ], [ 245, 246 ], [ 245, 247 ], [ 247, 248 ], [ 248, 249 ], [ 249, 250 ], [ 247, 251 ], [ 251, 252 ], [ 251, 253 ], [ 247, 254 ], [ 244, 255 ], [ 255, 256 ], [ 255, 257 ], [ 244, 258 ], [ 258, 259 ], [ 258, 260 ], [ 260, 261 ], [ 261, 262 ], [ 244, 263 ], [ 263, 264 ], [ 244, 265 ], [ 265, 266 ], [ 266, 267 ], [ 244, 268 ], [ 268, 269 ], [ 269, 270 ], [ 270, 271 ], [ 271, 272 ], [ 268, 273 ], [ 273, 274 ], [ 273, 275 ], [ 275, 276 ], [ 276, 277 ], [ 277, 278 ], [ 278, 279 ], [ 276, 280 ], [ 275, 281 ], [ 925, 282 ], [ 282, 283 ], [ 282, 284 ], [ 284, 285 ], [ 285, 286 ], [ 286, 287 ], [ 282, 288 ], [ 288, 289 ], [ 925, 290 ], [ 290, 291 ], [ 290, 292 ], [ 292, 293 ], [ 293, 294 ], [ 294, 295 ], [ 294, 296 ], [ 296, 297 ], [ 293, 298 ], [ 298, 299 ], [ 292, 300 ], [ 300, 301 ], [ 301, 302 ], [ 301, 303 ], [ 300, 304 ], [ 304, 305 ], [ 305, 306 ], [ 305, 307 ], [ 304, 308 ], [ 308, 309 ], [ 309, 310 ], [ 309, 311 ], [ 311, 312 ], [ 312, 313 ], [ 308, 314 ], [ 314, 315 ], [ 315, 316 ], [ 315, 317 ], [ 317, 318 ], [ 318, 319 ], [ 317, 320 ], [ 304, 321 ], [ 321, 322 ], [ 322, 323 ], [ 322, 324 ], [ 321, 325 ], [ 325, 326 ], [ 326, 327 ], [ 292, 328 ], [ 328, 329 ], [ 329, 330 ], [ 329, 331 ], [ 331, 332 ], [ 925, 333 ], [ 333, 334 ], [ 333, 335 ], [ 335, 336 ], [ 336, 337 ], [ 337, 338 ], [ 338, 339 ], [ 339, 340 ], [ 339, 341 ], [ 338, 342 ], [ 342, 343 ], [ 342, 344 ], [ 333, 345 ], [ 345, 346 ], [ 925, 347 ], [ 347, 348 ], [ 347, 349 ], [ 349, 350 ], [ 350, 351 ], [ 349, 352 ], [ 352, 353 ], [ 353, 354 ], [ 354, 355 ], [ 355, 356 ], [ 355, 357 ], [ 357, 358 ], [ 354, 359 ], [ 359, 360 ], [ 353, 361 ], [ 361, 362 ], [ 361, 363 ], [ 349, 364 ], [ 364, 365 ], [ 925, 366 ], [ 366, 367 ], [ 366, 368 ], [ 368, 369 ], [ 369, 370 ], [ 370, 371 ], [ 371, 372 ], [ 370, 373 ], [ 373, 374 ], [ 925, 375 ], [ 375, 376 ], [ 375, 377 ], [ 377, 378 ], [ 378, 379 ], [ 379, 380 ], [ 925, 381 ], [ 381, 382 ], [ 381, 383 ], [ 383, 384 ], [ 384, 385 ], [ 384, 386 ], [ 386, 387 ], [ 383, 388 ], [ 388, 389 ], [ 388, 390 ], [ 383, 391 ], [ 391, 392 ], [ 392, 393 ], [ 393, 394 ], [ 393, 395 ], [ 391, 396 ], [ 396, 397 ], [ 397, 398 ], [ 398, 399 ], [ 397, 400 ], [ 396, 401 ], [ 401, 402 ], [ 401, 403 ], [ 403, 404 ], [ 383, 405 ], [ 405, 406 ], [ 406, 407 ], [ 407, 408 ], [ 925, 409 ], [ 409, 410 ], [ 409, 411 ], [ 411, 412 ], [ 412, 413 ], [ 412, 414 ], [ 411, 416 ], [ 416, 417 ], [ 416, 418 ], [ 418, 419 ], [ 411, 420 ], [ 420, 421 ], [ 420, 422 ], [ 411, 423 ], [ 423, 424 ], [ 424, 425 ], [ 424, 426 ], [ 423, 427 ], [ 427, 428 ], [ 428, 429 ], [ 429, 430 ], [ 430, 431 ], [ 430, 432 ], [ 428, 433 ], [ 433, 434 ], [ 434, 435 ], [ 434, 436 ], [ 436, 437 ], [ 433, 438 ], [ 427, 439 ], [ 439, 440 ], [ 439, 441 ], [ 441, 442 ], [ 411, 443 ], [ 443, 444 ], [ 444, 445 ], [ 445, 446 ], [ 445, 447 ], [ 444, 448 ], [ 444, 449 ], [ 449, 450 ], [ 450, 451 ], [ 449, 452 ], [ 449, 453 ], [ 409, 454 ], [ 454, 455 ], [ 925, 456 ], [ 456, 457 ], [ 456, 458 ], [ 458, 459 ], [ 459, 460 ], [ 459, 461 ], [ 458, 463 ], [ 463, 464 ], [ 464, 465 ], [ 465, 466 ], [ 465, 467 ], [ 463, 468 ], [ 468, 469 ], [ 468, 470 ], [ 463, 471 ], [ 471, 472 ], [ 472, 473 ], [ 463, 474 ], [ 474, 475 ], [ 475, 476 ], [ 476, 477 ], [ 476, 478 ], [ 475, 479 ], [ 479, 480 ], [ 479, 481 ], [ 458, 482 ], [ 482, 483 ], [ 456, 484 ], [ 484, 485 ], [ 456, 486 ], [ 486, 487 ], [ 925, 488 ], [ 488, 489 ], [ 488, 490 ], [ 490, 491 ], [ 491, 492 ], [ 491, 493 ], [ 490, 495 ], [ 495, 496 ], [ 496, 497 ], [ 497, 498 ], [ 497, 499 ], [ 495, 500 ], [ 500, 501 ], [ 500, 502 ], [ 495, 503 ], [ 503, 504 ], [ 504, 505 ], [ 495, 506 ], [ 506, 507 ], [ 507, 508 ], [ 508, 509 ], [ 508, 510 ], [ 507, 511 ], [ 511, 512 ], [ 490, 513 ], [ 513, 514 ], [ 488, 515 ], [ 515, 516 ], [ 925, 517 ], [ 517, 518 ], [ 517, 519 ], [ 519, 520 ], [ 520, 521 ], [ 520, 522 ], [ 519, 523 ], [ 523, 524 ], [ 524, 525 ], [ 525, 526 ], [ 525, 527 ], [ 523, 528 ], [ 528, 529 ], [ 528, 530 ], [ 523, 531 ], [ 531, 532 ], [ 532, 533 ], [ 523, 534 ], [ 534, 535 ], [ 535, 536 ], [ 536, 537 ], [ 535, 538 ], [ 538, 539 ], [ 519, 540 ], [ 540, 541 ], [ 517, 542 ], [ 542, 543 ], [ 925, 544 ], [ 544, 545 ], [ 544, 546 ], [ 546, 547 ], [ 547, 548 ], [ 547, 549 ], [ 546, 551 ], [ 551, 552 ], [ 552, 553 ], [ 553, 554 ], [ 553, 555 ], [ 551, 556 ], [ 556, 557 ], [ 556, 558 ], [ 551, 559 ], [ 559, 560 ], [ 560, 561 ], [ 551, 562 ], [ 562, 563 ], [ 563, 564 ], [ 564, 565 ], [ 564, 566 ], [ 563, 567 ], [ 567, 568 ], [ 567, 569 ], [ 546, 570 ], [ 570, 571 ], [ 544, 572 ], [ 572, 573 ], [ 544, 574 ], [ 574, 575 ], [ 925, 576 ], [ 576, 577 ], [ 576, 578 ], [ 578, 579 ], [ 579, 580 ], [ 579, 581 ], [ 578, 582 ], [ 582, 583 ], [ 578, 584 ], [ 584, 585 ], [ 584, 586 ], [ 578, 587 ], [ 587, 588 ], [ 588, 589 ], [ 589, 590 ], [ 590, 591 ], [ 590, 592 ], [ 592, 593 ], [ 589, 594 ], [ 594, 595 ], [ 588, 596 ], [ 596, 597 ], [ 597, 598 ], [ 598, 599 ], [ 599, 600 ], [ 599, 601 ], [ 598, 602 ], [ 602, 603 ], [ 602, 604 ], [ 597, 605 ], [ 605, 606 ], [ 605, 607 ], [ 578, 608 ], [ 608, 609 ], [ 609, 610 ], [ 609, 611 ], [ 608, 612 ], [ 612, 613 ], [ 613, 614 ], [ 613, 615 ], [ 612, 616 ], [ 616, 617 ], [ 616, 618 ], [ 618, 619 ], [ 578, 620 ], [ 620, 621 ], [ 620, 622 ], [ 622, 623 ], [ 623, 624 ], [ 624, 625 ], [ 625, 626 ], [ 625, 627 ], [ 624, 628 ], [ 628, 629 ], [ 628, 630 ], [ 623, 631 ], [ 631, 632 ], [ 632, 633 ], [ 632, 634 ], [ 634, 635 ], [ 635, 636 ], [ 635, 637 ], [ 634, 638 ], [ 638, 639 ], [ 638, 640 ], [ 623, 641 ], [ 641, 642 ], [ 642, 643 ], [ 643, 644 ], [ 643, 645 ], [ 645, 646 ], [ 643, 647 ], [ 622, 648 ], [ 648, 649 ], [ 648, 650 ], [ 650, 651 ], [ 925, 652 ], [ 652, 653 ], [ 652, 654 ], [ 654, 655 ], [ 655, 656 ], [ 655, 657 ], [ 654, 659 ], [ 659, 660 ], [ 660, 661 ], [ 661, 662 ], [ 661, 663 ], [ 659, 664 ], [ 664, 665 ], [ 664, 666 ], [ 659, 667 ], [ 667, 668 ], [ 668, 669 ], [ 659, 670 ], [ 670, 671 ], [ 671, 672 ], [ 672, 673 ], [ 672, 674 ], [ 671, 675 ], [ 675, 676 ], [ 654, 677 ], [ 677, 678 ], [ 652, 679 ], [ 679, 680 ], [ 925, 681 ], [ 681, 682 ], [ 681, 683 ], [ 683, 684 ], [ 684, 685 ], [ 684, 686 ], [ 683, 688 ], [ 688, 689 ], [ 689, 690 ], [ 690, 691 ], [ 690, 692 ], [ 688, 693 ], [ 693, 694 ], [ 693, 695 ], [ 688, 696 ], [ 696, 697 ], [ 697, 698 ], [ 688, 699 ], [ 699, 700 ], [ 700, 701 ], [ 701, 702 ], [ 701, 703 ], [ 700, 704 ], [ 704, 705 ], [ 704, 706 ], [ 683, 707 ], [ 707, 708 ], [ 681, 709 ], [ 709, 710 ], [ 681, 711 ], [ 711, 712 ], [ 925, 713 ], [ 713, 714 ], [ 713, 715 ], [ 715, 716 ], [ 716, 717 ], [ 716, 718 ], [ 715, 719 ], [ 719, 720 ], [ 715, 721 ], [ 721, 722 ], [ 721, 723 ], [ 715, 724 ], [ 724, 725 ], [ 725, 726 ], [ 726, 727 ], [ 727, 728 ], [ 727, 729 ], [ 729, 730 ], [ 726, 731 ], [ 731, 732 ], [ 725, 733 ], [ 733, 734 ], [ 734, 735 ], [ 735, 736 ], [ 736, 737 ], [ 736, 738 ], [ 735, 739 ], [ 739, 740 ], [ 739, 741 ], [ 734, 742 ], [ 742, 743 ], [ 742, 744 ], [ 715, 745 ], [ 745, 746 ], [ 746, 747 ], [ 746, 748 ], [ 745, 749 ], [ 749, 750 ], [ 750, 751 ], [ 750, 752 ], [ 749, 753 ], [ 753, 754 ], [ 753, 755 ], [ 755, 756 ], [ 715, 757 ], [ 757, 758 ], [ 757, 759 ], [ 759, 760 ], [ 760, 761 ], [ 761, 762 ], [ 762, 763 ], [ 762, 764 ], [ 761, 765 ], [ 765, 766 ], [ 765, 767 ], [ 760, 768 ], [ 768, 769 ], [ 769, 770 ], [ 769, 771 ], [ 771, 772 ], [ 772, 773 ], [ 772, 774 ], [ 771, 775 ], [ 775, 776 ], [ 775, 777 ], [ 760, 778 ], [ 778, 779 ], [ 779, 780 ], [ 780, 781 ], [ 780, 782 ], [ 782, 783 ], [ 780, 784 ], [ 759, 785 ], [ 785, 786 ], [ 785, 787 ], [ 787, 788 ], [ 925, 789 ], [ 789, 790 ], [ 789, 791 ], [ 791, 792 ], [ 792, 793 ], [ 793, 794 ], [ 794, 795 ], [ 794, 796 ], [ 792, 797 ], [ 797, 798 ], [ 798, 799 ], [ 797, 800 ], [ 789, 801 ], [ 801, 802 ], [ 925, 803 ], [ 803, 804 ], [ 803, 805 ], [ 805, 806 ], [ 803, 807 ], [ 807, 808 ], [ 803, 809 ], [ 809, 810 ], [ 809, 811 ], [ 811, 812 ], [ 812, 813 ], [ 803, 814 ], [ 814, 815 ], [ 814, 816 ], [ 816, 817 ], [ 817, 818 ], [ 803, 819 ], [ 819, 820 ], [ 819, 821 ], [ 821, 822 ], [ 822, 823 ], [ 823, 824 ], [ 823, 825 ], [ 822, 826 ], [ 821, 827 ], [ 827, 828 ], [ 828, 829 ], [ 828, 830 ], [ 827, 831 ], [ 819, 832 ], [ 832, 833 ], [ 819, 834 ], [ 834, 835 ], [ 803, 836 ], [ 836, 837 ], [ 836, 838 ], [ 838, 839 ], [ 839, 840 ], [ 841, 841 ], [ 841, 842 ], [ 841, 843 ], [ 841, 844 ], [ 803, 845 ], [ 845, 846 ], [ 845, 847 ], [ 847, 848 ], [ 848, 849 ], [ 849, 850 ], [ 850, 851 ], [ 851, 852 ], [ 852, 853 ], [ 850, 854 ], [ 849, 855 ], [ 855, 856 ], [ 856, 857 ], [ 856, 858 ], [ 855, 859 ], [ 855, 860 ], [ 860, 861 ], [ 861, 862 ], [ 803, 863 ], [ 863, 864 ], [ 863, 865 ], [ 865, 866 ], [ 866, 867 ], [ 867, 868 ], [ 867, 869 ], [ 866, 870 ], [ 870, 871 ], [ 865, 872 ], [ 872, 873 ], [ 873, 874 ], [ 873, 875 ], [ 872, 876 ], [ 876, 877 ], [ 877, 878 ], [ 877, 879 ], [ 876, 880 ], [ 880, 881 ], [ 881, 882 ], [ 882, 883 ], [ 882, 884 ], [ 881, 885 ], [ 885, 886 ], [ 886, 887 ], [ 887, 888 ], [ 886, 889 ], [ 889, 890 ], [ 889, 891 ], [ 881, 892 ], [ 892, 893 ], [ 893, 894 ], [ 893, 895 ], [ 892, 896 ], [ 880, 897 ], [ 897, 898 ], [ 876, 899 ], [ 899, 900 ], [ 900, 901 ], [ 901, 902 ], [ 901, 903 ], [ 900, 904 ], [ 904, 905 ], [ 905, 906 ], [ 906, 907 ], [ 905, 908 ], [ 908, 909 ], [ 908, 910 ], [ 900, 911 ], [ 911, 912 ], [ 912, 913 ], [ 912, 914 ], [ 911, 915 ], [ 899, 916 ], [ 916, 917 ], [ 876, 918 ], [ 918, 919 ], [ 865, 920 ], [ 920, 921 ], [ 863, 922 ], [ 922, 923 ], [ 0, 924 ], [ 924, 925 ], [ 924, 926 ] ]
[ "import java.io.ByteArrayInputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.InputMismatchException;\nimport java.util.List;\nimport java.util.Set;\nimport java.util.TreeSet;\n\npublic class Main {\n\n\tprivate static final String NO = \"NO\";\n\tprivate static final String YES = \"YES\";\n\tInputStream is;\n\tPrintWriter out;\n\tString INPUT = \"\";\n\n\tprivate static final long MOD = 1000000007;\n\tprivate static final long inf = 100000000000L;\n\n\tSet<Integer> g[];\n\n\tvoid solve() {\n\t\tint T =1;\n\t\tfor (int i = 0; i < T; i++)\n\t\t\tsolve(i);\n\t}\n\n\tvoid solve(int T) {\n\t\tint x = ni();\n\t\tint n = ni();\n\t\tint cnt[] = new int[102];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tcnt[ni()]++;\n\t\tint ans = x;\n\t\tint min = Integer.MAX_VALUE;\n\t\tfor (int i=0;i<=101; i++)\n\t\t\tif (cnt[i]==0) {\n\t\t\t\tint d = Math.abs(i-x);\n\t\t\t\tif (d<min) {\n\t\t\t\t\tmin = d;\n\t\t\t\t\tans = i;\n\t\t\t\t}\n\t\t\t}\n\n\t\tout.println(ans);\n\t}\n\n\t// a^b\n\tlong power(long a, long b) {\n\t\tlong x = 1, y = a;\n\t\twhile (b > 0) {\n\t\t\tif (b % 2 != 0) {\n\t\t\t\tx = (x * y) % MOD;\n\t\t\t}\n\t\t\ty = (y * y) % MOD;\n\t\t\tb /= 2;\n\t\t}\n\t\treturn x % MOD;\n\t}\n\n\tprivate long gcd(long a, long b) {\n\t\twhile (a != 0) {\n\t\t\tlong tmp = b % a;\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\t\treturn b;\n\t}\n\n\tvoid run() throws Exception {\n\t\tis = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n\t\tout = new PrintWriter(System.out);\n\n\t\tlong s = System.currentTimeMillis();\n\t\tsolve();\n\t\tout.flush();\n\t\tif (!INPUT.isEmpty())\n\t\t\ttr(System.currentTimeMillis() - s + \"ms\");\n\t}\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tnew Main().run();\n\t}\n\n\tprivate byte[] inbuf = new byte[1024];\n\tpublic int lenbuf = 0, ptrbuf = 0;\n\tprivate boolean vis[];\n\n\tprivate int readByte() {\n\t\tif (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();\n\t\tif (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}\n\t\treturn inbuf[ptrbuf++];\n\t}\n\n\tprivate boolean isSpaceChar(int c) {\n\t\treturn !(c >= 33 && c <= 126);\n\t}\n\n\tprivate int skip() {\n\t\tint b;\n\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;\n\t\treturn b;\n\t}\n\n\tprivate double nd() {\n\t\treturn Double.parseDouble(ns());\n\t}\n\n\tprivate char nc() {\n\t\treturn (char) skip();\n\t}\n\n\tprivate String ns() {\n\t\tint b = skip();\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != '\n\t\t\t\t\t\t\t\t\t// ')\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}\n\n\tprivate char[] ns(int n) {\n\t\tchar[] buf = new char[n];\n\t\tint b = skip(), p = 0;\n\t\twhile (p < n) {\n\t\t\tif (!(isSpaceChar(b)))\n\t\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}\n\t\treturn n == p ? buf : Arrays.copyOf(buf, p);\n\t}\n\n\tprivate char[][] nm(int n, int m) {\n\t\tchar[][] map = new char[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);\n\t\treturn map;\n\t}\n\n\tprivate int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}\n\n\tprivate List<Integer> na2(int n) {\n\t\tList<Integer> a = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta.add(ni());\n\t\treturn a;\n\t}\n\n\tprivate int[][] na(int n, int m) {\n\t\tint[][] a = new int[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = na(m);\n\t\treturn a;\n\t}\n\n\tprivate int ni() {\n\t\tint num = 0, b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\n\tprivate long[] nl(int n) {\n\t\tlong[] a = new long[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl();\n\t\treturn a;\n\t}\n\n\tprivate long[][] nl(int n, int m) {\n\t\tlong[][] a = new long[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl(m);\n\t\treturn a;\n\t}\n\n\tprivate long nl() {\n\t\tlong num = 0;\n\t\tint b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\n\tprivate static void tr(Object... o) {\n\t\tSystem.out.println(Arrays.deepToString(o));\n\t}\n\n\tpublic class Pair<K, V> {\n\n\t\t/**\n\t\t * Key of this <code>Pair</code>.\n\t\t */\n\t\tprivate K key;\n\n\t\t/**\n\t\t * Gets the key for this pair.\n\t\t * \n\t\t * @return key for this pair\n\t\t */\n\t\tpublic K getKey() {\n\t\t\treturn key;\n\t\t}\n\n\t\t/**\n\t\t * Value of this this <code>Pair</code>.\n\t\t */\n\t\tprivate V value;\n\n\t\t/**\n\t\t * Gets the value for this pair.\n\t\t * \n\t\t * @return value for this pair\n\t\t */\n\t\tpublic V getValue() {\n\t\t\treturn value;\n\t\t}\n\n\t\t/**\n\t\t * Creates a new pair\n\t\t * \n\t\t * @param key The key for this pair\n\t\t * @param value The value to use for this pair\n\t\t */\n\t\tpublic Pair(K key, V value) {\n\t\t\tthis.key = key;\n\t\t\tthis.value = value;\n\t\t}\n\n\t\t/**\n\t\t * <p>\n\t\t * <code>String</code> representation of this <code>Pair</code>.\n\t\t * </p>\n\t\t *\n\t\t * <p>\n\t\t * The default name/value delimiter '=' is always used.\n\t\t * </p>\n\t\t *\n\t\t * @return <code>String</code> representation of this <code>Pair</code>\n\t\t */\n\t\t@Override\n\t\tpublic String toString() {\n\t\t\treturn key + \"=\" + value;\n\t\t}\n\n\t\t/**\n\t\t * <p>\n\t\t * Generate a hash code for this <code>Pair</code>.\n\t\t * </p>\n\t\t *\n\t\t * <p>\n\t\t * The hash code is calculated using both the name and the value of the\n\t\t * <code>Pair</code>.\n\t\t * </p>\n\t\t *\n\t\t * @return hash code for this <code>Pair</code>\n\t\t */\n\t\t@Override\n\t\tpublic int hashCode() {\n\t\t\t// name's hashCode is multiplied by an arbitrary prime number (13)\n\t\t\t// in order to make sure there is a difference in the hashCode between\n\t\t\t// these two parameters:\n\t\t\t// name: a value: aa\n\t\t\t// name: aa value: a\n\t\t\treturn key.hashCode() * 13 + (value == null ? 0 : value.hashCode());\n\t\t}\n\n\t\t/**\n\t\t * <p>\n\t\t * Test this <code>Pair</code> for equality with another <code>Object</code>.\n\t\t * </p>\n\t\t *\n\t\t * <p>\n\t\t * If the <code>Object</code> to be tested is not a <code>Pair</code> or is\n\t\t * <code>null</code>, then this method returns <code>false</code>.\n\t\t * </p>\n\t\t *\n\t\t * <p>\n\t\t * Two <code>Pair</code>s are considered equal if and only if both the names and\n\t\t * values are equal.\n\t\t * </p>\n\t\t *\n\t\t * @param o the <code>Object</code> to test for equality with this\n\t\t * <code>Pair</code>\n\t\t * @return <code>true</code> if the given <code>Object</code> is equal to this\n\t\t * <code>Pair</code> else <code>false</code>\n\t\t */\n\t\t@Override\n\t\tpublic boolean equals(Object o) {\n\t\t\tif (this == o)\n\t\t\t\treturn true;\n\t\t\tif (o instanceof Pair) {\n\t\t\t\tPair pair = (Pair) o;\n\t\t\t\tif (key != null ? !key.equals(pair.key) : pair.key != null)\n\t\t\t\t\treturn false;\n\t\t\t\tif (value != null ? !value.equals(pair.value) : pair.value != null)\n\t\t\t\t\treturn false;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}\n\n}", "import java.io.ByteArrayInputStream;", "ByteArrayInputStream", "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.ArrayList;", "ArrayList", "java.util", "import java.util.Arrays;", "Arrays", "java.util", "import java.util.InputMismatchException;", "InputMismatchException", "java.util", "import java.util.List;", "List", "java.util", "import java.util.Set;", "Set", "java.util", "import java.util.TreeSet;", "TreeSet", "java.util", "public class Main {\n\n\tprivate static final String NO = \"NO\";\n\tprivate static final String YES = \"YES\";\n\tInputStream is;\n\tPrintWriter out;\n\tString INPUT = \"\";\n\n\tprivate static final long MOD = 1000000007;\n\tprivate static final long inf = 100000000000L;\n\n\tSet<Integer> g[];\n\n\tvoid solve() {\n\t\tint T =1;\n\t\tfor (int i = 0; i < T; i++)\n\t\t\tsolve(i);\n\t}\n\n\tvoid solve(int T) {\n\t\tint x = ni();\n\t\tint n = ni();\n\t\tint cnt[] = new int[102];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tcnt[ni()]++;\n\t\tint ans = x;\n\t\tint min = Integer.MAX_VALUE;\n\t\tfor (int i=0;i<=101; i++)\n\t\t\tif (cnt[i]==0) {\n\t\t\t\tint d = Math.abs(i-x);\n\t\t\t\tif (d<min) {\n\t\t\t\t\tmin = d;\n\t\t\t\t\tans = i;\n\t\t\t\t}\n\t\t\t}\n\n\t\tout.println(ans);\n\t}\n\n\t// a^b\n\tlong power(long a, long b) {\n\t\tlong x = 1, y = a;\n\t\twhile (b > 0) {\n\t\t\tif (b % 2 != 0) {\n\t\t\t\tx = (x * y) % MOD;\n\t\t\t}\n\t\t\ty = (y * y) % MOD;\n\t\t\tb /= 2;\n\t\t}\n\t\treturn x % MOD;\n\t}\n\n\tprivate long gcd(long a, long b) {\n\t\twhile (a != 0) {\n\t\t\tlong tmp = b % a;\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\t\treturn b;\n\t}\n\n\tvoid run() throws Exception {\n\t\tis = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n\t\tout = new PrintWriter(System.out);\n\n\t\tlong s = System.currentTimeMillis();\n\t\tsolve();\n\t\tout.flush();\n\t\tif (!INPUT.isEmpty())\n\t\t\ttr(System.currentTimeMillis() - s + \"ms\");\n\t}\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tnew Main().run();\n\t}\n\n\tprivate byte[] inbuf = new byte[1024];\n\tpublic int lenbuf = 0, ptrbuf = 0;\n\tprivate boolean vis[];\n\n\tprivate int readByte() {\n\t\tif (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();\n\t\tif (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}\n\t\treturn inbuf[ptrbuf++];\n\t}\n\n\tprivate boolean isSpaceChar(int c) {\n\t\treturn !(c >= 33 && c <= 126);\n\t}\n\n\tprivate int skip() {\n\t\tint b;\n\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;\n\t\treturn b;\n\t}\n\n\tprivate double nd() {\n\t\treturn Double.parseDouble(ns());\n\t}\n\n\tprivate char nc() {\n\t\treturn (char) skip();\n\t}\n\n\tprivate String ns() {\n\t\tint b = skip();\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != '\n\t\t\t\t\t\t\t\t\t// ')\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}\n\n\tprivate char[] ns(int n) {\n\t\tchar[] buf = new char[n];\n\t\tint b = skip(), p = 0;\n\t\twhile (p < n) {\n\t\t\tif (!(isSpaceChar(b)))\n\t\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}\n\t\treturn n == p ? buf : Arrays.copyOf(buf, p);\n\t}\n\n\tprivate char[][] nm(int n, int m) {\n\t\tchar[][] map = new char[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);\n\t\treturn map;\n\t}\n\n\tprivate int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}\n\n\tprivate List<Integer> na2(int n) {\n\t\tList<Integer> a = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta.add(ni());\n\t\treturn a;\n\t}\n\n\tprivate int[][] na(int n, int m) {\n\t\tint[][] a = new int[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = na(m);\n\t\treturn a;\n\t}\n\n\tprivate int ni() {\n\t\tint num = 0, b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\n\tprivate long[] nl(int n) {\n\t\tlong[] a = new long[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl();\n\t\treturn a;\n\t}\n\n\tprivate long[][] nl(int n, int m) {\n\t\tlong[][] a = new long[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl(m);\n\t\treturn a;\n\t}\n\n\tprivate long nl() {\n\t\tlong num = 0;\n\t\tint b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\n\tprivate static void tr(Object... o) {\n\t\tSystem.out.println(Arrays.deepToString(o));\n\t}\n\n\tpublic class Pair<K, V> {\n\n\t\t/**\n\t\t * Key of this <code>Pair</code>.\n\t\t */\n\t\tprivate K key;\n\n\t\t/**\n\t\t * Gets the key for this pair.\n\t\t * \n\t\t * @return key for this pair\n\t\t */\n\t\tpublic K getKey() {\n\t\t\treturn key;\n\t\t}\n\n\t\t/**\n\t\t * Value of this this <code>Pair</code>.\n\t\t */\n\t\tprivate V value;\n\n\t\t/**\n\t\t * Gets the value for this pair.\n\t\t * \n\t\t * @return value for this pair\n\t\t */\n\t\tpublic V getValue() {\n\t\t\treturn value;\n\t\t}\n\n\t\t/**\n\t\t * Creates a new pair\n\t\t * \n\t\t * @param key The key for this pair\n\t\t * @param value The value to use for this pair\n\t\t */\n\t\tpublic Pair(K key, V value) {\n\t\t\tthis.key = key;\n\t\t\tthis.value = value;\n\t\t}\n\n\t\t/**\n\t\t * <p>\n\t\t * <code>String</code> representation of this <code>Pair</code>.\n\t\t * </p>\n\t\t *\n\t\t * <p>\n\t\t * The default name/value delimiter '=' is always used.\n\t\t * </p>\n\t\t *\n\t\t * @return <code>String</code> representation of this <code>Pair</code>\n\t\t */\n\t\t@Override\n\t\tpublic String toString() {\n\t\t\treturn key + \"=\" + value;\n\t\t}\n\n\t\t/**\n\t\t * <p>\n\t\t * Generate a hash code for this <code>Pair</code>.\n\t\t * </p>\n\t\t *\n\t\t * <p>\n\t\t * The hash code is calculated using both the name and the value of the\n\t\t * <code>Pair</code>.\n\t\t * </p>\n\t\t *\n\t\t * @return hash code for this <code>Pair</code>\n\t\t */\n\t\t@Override\n\t\tpublic int hashCode() {\n\t\t\t// name's hashCode is multiplied by an arbitrary prime number (13)\n\t\t\t// in order to make sure there is a difference in the hashCode between\n\t\t\t// these two parameters:\n\t\t\t// name: a value: aa\n\t\t\t// name: aa value: a\n\t\t\treturn key.hashCode() * 13 + (value == null ? 0 : value.hashCode());\n\t\t}\n\n\t\t/**\n\t\t * <p>\n\t\t * Test this <code>Pair</code> for equality with another <code>Object</code>.\n\t\t * </p>\n\t\t *\n\t\t * <p>\n\t\t * If the <code>Object</code> to be tested is not a <code>Pair</code> or is\n\t\t * <code>null</code>, then this method returns <code>false</code>.\n\t\t * </p>\n\t\t *\n\t\t * <p>\n\t\t * Two <code>Pair</code>s are considered equal if and only if both the names and\n\t\t * values are equal.\n\t\t * </p>\n\t\t *\n\t\t * @param o the <code>Object</code> to test for equality with this\n\t\t * <code>Pair</code>\n\t\t * @return <code>true</code> if the given <code>Object</code> is equal to this\n\t\t * <code>Pair</code> else <code>false</code>\n\t\t */\n\t\t@Override\n\t\tpublic boolean equals(Object o) {\n\t\t\tif (this == o)\n\t\t\t\treturn true;\n\t\t\tif (o instanceof Pair) {\n\t\t\t\tPair pair = (Pair) o;\n\t\t\t\tif (key != null ? !key.equals(pair.key) : pair.key != null)\n\t\t\t\t\treturn false;\n\t\t\t\tif (value != null ? !value.equals(pair.value) : pair.value != null)\n\t\t\t\t\treturn false;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}\n\n}", "Main", "private static final String NO = \"NO\";", "NO", "\"NO\"", "private static final String YES = \"YES\";", "YES", "\"YES\"", "InputStream is;", "is", "PrintWriter out;", "out", "String INPUT = \"\";", "INPUT", "\"\"", "private static final long MOD = 1000000007;", "MOD", "1000000007", "private static final long inf = 100000000000L;", "inf", "100000000000L", "Set<Integer> g[];", "g", "private byte[] inbuf = new byte[1024];", "inbuf", "new byte[1024]", "1024", "public int lenbuf = 0", "lenbuf", "0", "ptrbuf = 0;", "ptrbuf", "0", "private boolean vis[];", "vis", "void solve() {\n\t\tint T =1;\n\t\tfor (int i = 0; i < T; i++)\n\t\t\tsolve(i);\n\t}", "solve", "{\n\t\tint T =1;\n\t\tfor (int i = 0; i < T; i++)\n\t\t\tsolve(i);\n\t}", "int T =1;", "T", "1", "for (int i = 0; i < T; i++)\n\t\t\tsolve(i);", "int i = 0;", "int i = 0;", "i", "0", "i < T", "i", "T", "i++", "i++", "i", "solve(i);", "solve(i)", "solve", "i", "void solve(int T) {\n\t\tint x = ni();\n\t\tint n = ni();\n\t\tint cnt[] = new int[102];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tcnt[ni()]++;\n\t\tint ans = x;\n\t\tint min = Integer.MAX_VALUE;\n\t\tfor (int i=0;i<=101; i++)\n\t\t\tif (cnt[i]==0) {\n\t\t\t\tint d = Math.abs(i-x);\n\t\t\t\tif (d<min) {\n\t\t\t\t\tmin = d;\n\t\t\t\t\tans = i;\n\t\t\t\t}\n\t\t\t}\n\n\t\tout.println(ans);\n\t}", "solve", "{\n\t\tint x = ni();\n\t\tint n = ni();\n\t\tint cnt[] = new int[102];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tcnt[ni()]++;\n\t\tint ans = x;\n\t\tint min = Integer.MAX_VALUE;\n\t\tfor (int i=0;i<=101; i++)\n\t\t\tif (cnt[i]==0) {\n\t\t\t\tint d = Math.abs(i-x);\n\t\t\t\tif (d<min) {\n\t\t\t\t\tmin = d;\n\t\t\t\t\tans = i;\n\t\t\t\t}\n\t\t\t}\n\n\t\tout.println(ans);\n\t}", "int x = ni();", "x", "ni()", "ni", "int n = ni();", "n", "ni()", "ni", "int cnt[] = new int[102];", "cnt", "new int[102]", "102", "for (int i = 0; i < n; i++)\n\t\t\tcnt[ni()]++;", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "cnt[ni()]++;", "cnt[ni()]++", "cnt[ni()]", "cnt", "ni()", "ni", "int ans = x;", "ans", "x", "int min = Integer.MAX_VALUE;", "min", "Integer.MAX_VALUE", "Integer", "Integer.MAX_VALUE", "for (int i=0;i<=101; i++)\n\t\t\tif (cnt[i]==0) {\n\t\t\t\tint d = Math.abs(i-x);\n\t\t\t\tif (d<min) {\n\t\t\t\t\tmin = d;\n\t\t\t\t\tans = i;\n\t\t\t\t}\n\t\t\t}", "int i=0;", "int i=0;", "i", "0", "i<=101", "i", "101", "i++", "i++", "i", "if (cnt[i]==0) {\n\t\t\t\tint d = Math.abs(i-x);\n\t\t\t\tif (d<min) {\n\t\t\t\t\tmin = d;\n\t\t\t\t\tans = i;\n\t\t\t\t}\n\t\t\t}", "if (cnt[i]==0) {\n\t\t\t\tint d = Math.abs(i-x);\n\t\t\t\tif (d<min) {\n\t\t\t\t\tmin = d;\n\t\t\t\t\tans = i;\n\t\t\t\t}\n\t\t\t}", "cnt[i]==0", "cnt[i]", "cnt", "i", "0", "{\n\t\t\t\tint d = Math.abs(i-x);\n\t\t\t\tif (d<min) {\n\t\t\t\t\tmin = d;\n\t\t\t\t\tans = i;\n\t\t\t\t}\n\t\t\t}", "int d = Math.abs(i-x);", "d", "Math.abs(i-x)", "Math.abs", "Math", "i-x", "i", "x", "if (d<min) {\n\t\t\t\t\tmin = d;\n\t\t\t\t\tans = i;\n\t\t\t\t}", "d<min", "d", "min", "{\n\t\t\t\t\tmin = d;\n\t\t\t\t\tans = i;\n\t\t\t\t}", "min = d", "min", "d", "ans = i", "ans", "i", "out.println(ans)", "out.println", "out", "ans", "int T", "T", "// a^b\n\tlong power(long a, long b) {\n\t\tlong x = 1, y = a;\n\t\twhile (b > 0) {\n\t\t\tif (b % 2 != 0) {\n\t\t\t\tx = (x * y) % MOD;\n\t\t\t}\n\t\t\ty = (y * y) % MOD;\n\t\t\tb /= 2;\n\t\t}\n\t\treturn x % MOD;\n\t}", "power", "{\n\t\tlong x = 1, y = a;\n\t\twhile (b > 0) {\n\t\t\tif (b % 2 != 0) {\n\t\t\t\tx = (x * y) % MOD;\n\t\t\t}\n\t\t\ty = (y * y) % MOD;\n\t\t\tb /= 2;\n\t\t}\n\t\treturn x % MOD;\n\t}", "long x = 1", "x", "1", "y = a;", "y", "a", "while (b > 0) {\n\t\t\tif (b % 2 != 0) {\n\t\t\t\tx = (x * y) % MOD;\n\t\t\t}\n\t\t\ty = (y * y) % MOD;\n\t\t\tb /= 2;\n\t\t}", "b > 0", "b", "0", "{\n\t\t\tif (b % 2 != 0) {\n\t\t\t\tx = (x * y) % MOD;\n\t\t\t}\n\t\t\ty = (y * y) % MOD;\n\t\t\tb /= 2;\n\t\t}", "if (b % 2 != 0) {\n\t\t\t\tx = (x * y) % MOD;\n\t\t\t}", "b % 2 != 0", "b % 2", "b", "2", "0", "{\n\t\t\t\tx = (x * y) % MOD;\n\t\t\t}", "x = (x * y) % MOD", "x", "(x * y) % MOD", "(x * y)", "x", "y", "MOD", "y = (y * y) % MOD", "y", "(y * y) % MOD", "(y * y)", "y", "y", "MOD", "b /= 2", "b", "2", "return x % MOD;", "x % MOD", "x", "MOD", "long a", "a", "long b", "b", "private long gcd(long a, long b) {\n\t\twhile (a != 0) {\n\t\t\tlong tmp = b % a;\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\t\treturn b;\n\t}", "gcd", "{\n\t\twhile (a != 0) {\n\t\t\tlong tmp = b % a;\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\t\treturn b;\n\t}", "while (a != 0) {\n\t\t\tlong tmp = b % a;\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}", "a != 0", "a", "0", "{\n\t\t\tlong tmp = b % a;\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}", "long tmp = b % a;", "tmp", "b % a", "b", "a", "b = a", "b", "a", "a = tmp", "a", "tmp", "return b;", "b", "long a", "a", "long b", "b", "void run() throws Exception {\n\t\tis = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n\t\tout = new PrintWriter(System.out);\n\n\t\tlong s = System.currentTimeMillis();\n\t\tsolve();\n\t\tout.flush();\n\t\tif (!INPUT.isEmpty())\n\t\t\ttr(System.currentTimeMillis() - s + \"ms\");\n\t}", "run", "{\n\t\tis = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n\t\tout = new PrintWriter(System.out);\n\n\t\tlong s = System.currentTimeMillis();\n\t\tsolve();\n\t\tout.flush();\n\t\tif (!INPUT.isEmpty())\n\t\t\ttr(System.currentTimeMillis() - s + \"ms\");\n\t}", "is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes())", "is", "INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes())", "INPUT.isEmpty()", "INPUT.isEmpty", "INPUT", "System.in", "System", "System.in", "new ByteArrayInputStream(INPUT.getBytes())", "out = new PrintWriter(System.out)", "out", "new PrintWriter(System.out)", "long s = System.currentTimeMillis();", "s", "System.currentTimeMillis()", "System.currentTimeMillis", "System", "solve()", "solve", "out.flush()", "out.flush", "out", "if (!INPUT.isEmpty())\n\t\t\ttr(System.currentTimeMillis() - s + \"ms\");", "!INPUT.isEmpty()", "INPUT.isEmpty()", "INPUT.isEmpty", "INPUT", "tr(System.currentTimeMillis() - s + \"ms\")", "tr", "System.currentTimeMillis() - s + \"ms\"", "System.currentTimeMillis() - s", "System.currentTimeMillis()", "System.currentTimeMillis", "System", "s", "\"ms\"", "public static void main(String[] args) throws Exception {\n\t\tnew Main().run();\n\t}", "main", "{\n\t\tnew Main().run();\n\t}", "new Main().run()", "new Main().run", "new Main()", "String[] args", "args", "private int readByte() {\n\t\tif (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();\n\t\tif (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}\n\t\treturn inbuf[ptrbuf++];\n\t}", "readByte", "{\n\t\tif (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();\n\t\tif (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}\n\t\treturn inbuf[ptrbuf++];\n\t}", "if (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();", "lenbuf == -1", "lenbuf", "-1", "1", "throw new InputMismatchException();", "new InputMismatchException()", "if (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}", "ptrbuf >= lenbuf", "ptrbuf", "lenbuf", "{\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}", "ptrbuf = 0", "ptrbuf", "0", "try {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}", "catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}", "IOException e", "{\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}", "throw new InputMismatchException();", "new InputMismatchException()", "{\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t}", "lenbuf = is.read(inbuf)", "lenbuf", "is.read(inbuf)", "is.read", "is", "inbuf", "if (lenbuf <= 0)\n\t\t\t\treturn -1;", "lenbuf <= 0", "lenbuf", "0", "return -1;", "-1", "1", "return inbuf[ptrbuf++];", "inbuf[ptrbuf++]", "inbuf", "ptrbuf++", "ptrbuf", "private boolean isSpaceChar(int c) {\n\t\treturn !(c >= 33 && c <= 126);\n\t}", "isSpaceChar", "{\n\t\treturn !(c >= 33 && c <= 126);\n\t}", "return !(c >= 33 && c <= 126);", "!(c >= 33 && c <= 126)", "(c >= 33 && c <= 126)", "c >= 33", "c", "33", "c <= 126", "c", "126", "int c", "c", "private int skip() {\n\t\tint b;\n\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;\n\t\treturn b;\n\t}", "skip", "{\n\t\tint b;\n\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;\n\t\treturn b;\n\t}", "int b;", "b", "while ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;", "(b = readByte()) != -1 && isSpaceChar(b)", "(b = readByte()) != -1", "(b = readByte())", "b", "readByte()", "readByte", "-1", "1", "isSpaceChar(b)", "isSpaceChar", "b", "return b;", "b", "private double nd() {\n\t\treturn Double.parseDouble(ns());\n\t}", "nd", "{\n\t\treturn Double.parseDouble(ns());\n\t}", "return Double.parseDouble(ns());", "Double.parseDouble(ns())", "Double.parseDouble", "Double", "ns()", "ns", "private char nc() {\n\t\treturn (char) skip();\n\t}", "nc", "{\n\t\treturn (char) skip();\n\t}", "return (char) skip();", "(char) skip()", "skip", "private String ns() {\n\t\tint b = skip();\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != '\n\t\t\t\t\t\t\t\t\t// ')\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}", "ns", "{\n\t\tint b = skip();\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != '\n\t\t\t\t\t\t\t\t\t// ')\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}", "int b = skip();", "b", "skip()", "skip", "StringBuilder sb = new StringBuilder();", "sb", "new StringBuilder()", "while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != '\n\t\t\t\t\t\t\t\t\t// ')\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}", "!(isSpaceChar(b))", "(isSpaceChar(b))", "isSpaceChar", "b", "{ // when nextLine, (isSpaceChar(b) && b != '\n\t\t\t\t\t\t\t\t\t// ')\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}", "sb.appendCodePoint(b)", "sb.appendCodePoint", "sb", "b", "b = readByte()", "b", "readByte()", "readByte", "return sb.toString();", "sb.toString()", "sb.toString", "sb", "private char[] ns(int n) {\n\t\tchar[] buf = new char[n];\n\t\tint b = skip(), p = 0;\n\t\twhile (p < n) {\n\t\t\tif (!(isSpaceChar(b)))\n\t\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}\n\t\treturn n == p ? buf : Arrays.copyOf(buf, p);\n\t}", "ns", "{\n\t\tchar[] buf = new char[n];\n\t\tint b = skip(), p = 0;\n\t\twhile (p < n) {\n\t\t\tif (!(isSpaceChar(b)))\n\t\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}\n\t\treturn n == p ? buf : Arrays.copyOf(buf, p);\n\t}", "char[] buf = new char[n];", "buf", "new char[n]", "n", "int b = skip()", "b", "skip()", "skip", "p = 0;", "p", "0", "while (p < n) {\n\t\t\tif (!(isSpaceChar(b)))\n\t\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}", "p < n", "p", "n", "{\n\t\t\tif (!(isSpaceChar(b)))\n\t\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}", "if (!(isSpaceChar(b)))\n\t\t\t\tbuf[p++] = (char) b;", "!(isSpaceChar(b))", "(isSpaceChar(b))", "isSpaceChar", "b", "buf[p++] = (char) b", "buf[p++]", "buf", "p++", "p", "(char) b", "b = readByte()", "b", "readByte()", "readByte", "return n == p ? buf : Arrays.copyOf(buf, p);", "n == p ? buf : Arrays.copyOf(buf, p)", "n == p", "n", "p", "buf", "Arrays.copyOf(buf, p)", "Arrays.copyOf", "Arrays", "buf", "p", "int n", "n", "private char[][] nm(int n, int m) {\n\t\tchar[][] map = new char[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);\n\t\treturn map;\n\t}", "nm", "{\n\t\tchar[][] map = new char[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);\n\t\treturn map;\n\t}", "char[][] map = new char[n][];", "map", "new char[n][]", "n", "for (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "map[i] = ns(m);", "map[i] = ns(m)", "map[i]", "map", "i", "ns(m)", "ns", "m", "return map;", "map", "int n", "n", "int m", "m", "private int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}", "na", "{\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}", "int[] a = new int[n];", "a", "new int[n]", "n", "for (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "a[i] = ni();", "a[i] = ni()", "a[i]", "a", "i", "ni()", "ni", "return a;", "a", "int n", "n", "private List<Integer> na2(int n) {\n\t\tList<Integer> a = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta.add(ni());\n\t\treturn a;\n\t}", "na2", "{\n\t\tList<Integer> a = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta.add(ni());\n\t\treturn a;\n\t}", "List<Integer> a = new ArrayList<Integer>();", "a", "new ArrayList<Integer>()", "for (int i = 0; i < n; i++)\n\t\t\ta.add(ni());", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "a.add(ni());", "a.add(ni())", "a.add", "a", "ni()", "ni", "return a;", "a", "int n", "n", "private int[][] na(int n, int m) {\n\t\tint[][] a = new int[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = na(m);\n\t\treturn a;\n\t}", "na", "{\n\t\tint[][] a = new int[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = na(m);\n\t\treturn a;\n\t}", "int[][] a = new int[n][];", "a", "new int[n][]", "n", "for (int i = 0; i < n; i++)\n\t\t\ta[i] = na(m);", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "a[i] = na(m);", "a[i] = na(m)", "a[i]", "a", "i", "na(m)", "na", "m", "return a;", "a", "int n", "n", "int m", "m", "private int ni() {\n\t\tint num = 0, b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}", "ni", "{\n\t\tint num = 0, b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}", "int num = 0", "num", "0", "b;", "b", "boolean minus = false;", "minus", "false", "while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;", "(b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')", "(b = readByte()) != -1", "(b = readByte())", "b", "readByte()", "readByte", "-1", "1", "!((b >= '0' && b <= '9') || b == '-')", "((b >= '0' && b <= '9') || b == '-')", "(b >= '0' && b <= '9')", "b >= '0'", "b", "'0'", "b <= '9'", "b", "'9'", "b == '-'", "b", "'-'", "if (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}", "b == '-'", "b", "'-'", "{\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}", "minus = true", "minus", "true", "b = readByte()", "b", "readByte()", "readByte", "while (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}", "true", "{\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}", "if (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}", "b >= '0' && b <= '9'", "b >= '0'", "b", "'0'", "b <= '9'", "b", "'9'", "{\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t}", "num = num * 10 + (b - '0')", "num", "num * 10 + (b - '0')", "num * 10", "num", "10", "(b - '0')", "b", "'0'", "{\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}", "return minus ? -num : num;", "minus ? -num : num", "minus", "-num", "num", "num", "b = readByte()", "b", "readByte()", "readByte", "private long[] nl(int n) {\n\t\tlong[] a = new long[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl();\n\t\treturn a;\n\t}", "nl", "{\n\t\tlong[] a = new long[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl();\n\t\treturn a;\n\t}", "long[] a = new long[n];", "a", "new long[n]", "n", "for (int i = 0; i < n; i++)\n\t\t\ta[i] = nl();", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "a[i] = nl();", "a[i] = nl()", "a[i]", "a", "i", "nl()", "nl", "return a;", "a", "int n", "n", "private long[][] nl(int n, int m) {\n\t\tlong[][] a = new long[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl(m);\n\t\treturn a;\n\t}", "nl", "{\n\t\tlong[][] a = new long[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl(m);\n\t\treturn a;\n\t}", "long[][] a = new long[n][];", "a", "new long[n][]", "n", "for (int i = 0; i < n; i++)\n\t\t\ta[i] = nl(m);", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "a[i] = nl(m);", "a[i] = nl(m)", "a[i]", "a", "i", "nl(m)", "nl", "m", "return a;", "a", "int n", "n", "int m", "m", "private long nl() {\n\t\tlong num = 0;\n\t\tint b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}", "nl", "{\n\t\tlong num = 0;\n\t\tint b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}", "long num = 0;", "num", "0", "int b;", "b", "boolean minus = false;", "minus", "false", "while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;", "(b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')", "(b = readByte()) != -1", "(b = readByte())", "b", "readByte()", "readByte", "-1", "1", "!((b >= '0' && b <= '9') || b == '-')", "((b >= '0' && b <= '9') || b == '-')", "(b >= '0' && b <= '9')", "b >= '0'", "b", "'0'", "b <= '9'", "b", "'9'", "b == '-'", "b", "'-'", "if (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}", "b == '-'", "b", "'-'", "{\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}", "minus = true", "minus", "true", "b = readByte()", "b", "readByte()", "readByte", "while (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}", "true", "{\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}", "if (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}", "b >= '0' && b <= '9'", "b >= '0'", "b", "'0'", "b <= '9'", "b", "'9'", "{\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t}", "num = num * 10 + (b - '0')", "num", "num * 10 + (b - '0')", "num * 10", "num", "10", "(b - '0')", "b", "'0'", "{\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}", "return minus ? -num : num;", "minus ? -num : num", "minus", "-num", "num", "num", "b = readByte()", "b", "readByte()", "readByte", "private static void tr(Object... o) {\n\t\tSystem.out.println(Arrays.deepToString(o));\n\t}", "tr", "{\n\t\tSystem.out.println(Arrays.deepToString(o));\n\t}", "System.out.println(Arrays.deepToString(o))", "System.out.println", "System.out", "System", "System.out", "Arrays.deepToString(o)", "Arrays.deepToString", "Arrays", "o", "Object... o", "o", "public class Pair<K, V> {\n\n\t\t/**\n\t\t * Key of this <code>Pair</code>.\n\t\t */\n\t\tprivate K key;\n\n\t\t/**\n\t\t * Gets the key for this pair.\n\t\t * \n\t\t * @return key for this pair\n\t\t */\n\t\tpublic K getKey() {\n\t\t\treturn key;\n\t\t}\n\n\t\t/**\n\t\t * Value of this this <code>Pair</code>.\n\t\t */\n\t\tprivate V value;\n\n\t\t/**\n\t\t * Gets the value for this pair.\n\t\t * \n\t\t * @return value for this pair\n\t\t */\n\t\tpublic V getValue() {\n\t\t\treturn value;\n\t\t}\n\n\t\t/**\n\t\t * Creates a new pair\n\t\t * \n\t\t * @param key The key for this pair\n\t\t * @param value The value to use for this pair\n\t\t */\n\t\tpublic Pair(K key, V value) {\n\t\t\tthis.key = key;\n\t\t\tthis.value = value;\n\t\t}\n\n\t\t/**\n\t\t * <p>\n\t\t * <code>String</code> representation of this <code>Pair</code>.\n\t\t * </p>\n\t\t *\n\t\t * <p>\n\t\t * The default name/value delimiter '=' is always used.\n\t\t * </p>\n\t\t *\n\t\t * @return <code>String</code> representation of this <code>Pair</code>\n\t\t */\n\t\t@Override\n\t\tpublic String toString() {\n\t\t\treturn key + \"=\" + value;\n\t\t}\n\n\t\t/**\n\t\t * <p>\n\t\t * Generate a hash code for this <code>Pair</code>.\n\t\t * </p>\n\t\t *\n\t\t * <p>\n\t\t * The hash code is calculated using both the name and the value of the\n\t\t * <code>Pair</code>.\n\t\t * </p>\n\t\t *\n\t\t * @return hash code for this <code>Pair</code>\n\t\t */\n\t\t@Override\n\t\tpublic int hashCode() {\n\t\t\t// name's hashCode is multiplied by an arbitrary prime number (13)\n\t\t\t// in order to make sure there is a difference in the hashCode between\n\t\t\t// these two parameters:\n\t\t\t// name: a value: aa\n\t\t\t// name: aa value: a\n\t\t\treturn key.hashCode() * 13 + (value == null ? 0 : value.hashCode());\n\t\t}\n\n\t\t/**\n\t\t * <p>\n\t\t * Test this <code>Pair</code> for equality with another <code>Object</code>.\n\t\t * </p>\n\t\t *\n\t\t * <p>\n\t\t * If the <code>Object</code> to be tested is not a <code>Pair</code> or is\n\t\t * <code>null</code>, then this method returns <code>false</code>.\n\t\t * </p>\n\t\t *\n\t\t * <p>\n\t\t * Two <code>Pair</code>s are considered equal if and only if both the names and\n\t\t * values are equal.\n\t\t * </p>\n\t\t *\n\t\t * @param o the <code>Object</code> to test for equality with this\n\t\t * <code>Pair</code>\n\t\t * @return <code>true</code> if the given <code>Object</code> is equal to this\n\t\t * <code>Pair</code> else <code>false</code>\n\t\t */\n\t\t@Override\n\t\tpublic boolean equals(Object o) {\n\t\t\tif (this == o)\n\t\t\t\treturn true;\n\t\t\tif (o instanceof Pair) {\n\t\t\t\tPair pair = (Pair) o;\n\t\t\t\tif (key != null ? !key.equals(pair.key) : pair.key != null)\n\t\t\t\t\treturn false;\n\t\t\t\tif (value != null ? !value.equals(pair.value) : pair.value != null)\n\t\t\t\t\treturn false;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}", "Pair", "/**\n\t\t * Key of this <code>Pair</code>.\n\t\t */\n\t\tprivate K key;", "key", "/**\n\t\t * Value of this this <code>Pair</code>.\n\t\t */\n\t\tprivate V value;", "value", "/**\n\t\t * Gets the key for this pair.\n\t\t * \n\t\t * @return key for this pair\n\t\t */\n\t\tpublic K getKey() {\n\t\t\treturn key;\n\t\t}", "getKey", "{\n\t\t\treturn key;\n\t\t}", "return key;", "key", "/**\n\t\t * Gets the value for this pair.\n\t\t * \n\t\t * @return value for this pair\n\t\t */\n\t\tpublic V getValue() {\n\t\t\treturn value;\n\t\t}", "getValue", "{\n\t\t\treturn value;\n\t\t}", "return value;", "value", "/**\n\t\t * Creates a new pair\n\t\t * \n\t\t * @param key The key for this pair\n\t\t * @param value The value to use for this pair\n\t\t */\n\t\tpublic Pair(K key, V value) {\n\t\t\tthis.key = key;\n\t\t\tthis.value = value;\n\t\t}", "Pair", "{\n\t\t\tthis.key = key;\n\t\t\tthis.value = value;\n\t\t}", "this.key = key", "this.key", "this", "this.key", "key", "this.value = value", "this.value", "this", "this.value", "value", "K key", "key", "V value", "value", "/**\n\t\t * <p>\n\t\t * <code>String</code> representation of this <code>Pair</code>.\n\t\t * </p>\n\t\t *\n\t\t * <p>\n\t\t * The default name/value delimiter '=' is always used.\n\t\t * </p>\n\t\t *\n\t\t * @return <code>String</code> representation of this <code>Pair</code>\n\t\t */\n\t\t@Override\n\t\tpublic String toString() {\n\t\t\treturn key + \"=\" + value;\n\t\t}", "toString", "{\n\t\t\treturn key + \"=\" + value;\n\t\t}", "return key + \"=\" + value;", "key + \"=\" + value", "key + \"=\" + value", "key", "\"=\"", "value", "/**\n\t\t * <p>\n\t\t * Generate a hash code for this <code>Pair</code>.\n\t\t * </p>\n\t\t *\n\t\t * <p>\n\t\t * The hash code is calculated using both the name and the value of the\n\t\t * <code>Pair</code>.\n\t\t * </p>\n\t\t *\n\t\t * @return hash code for this <code>Pair</code>\n\t\t */\n\t\t@Override\n\t\tpublic int hashCode() {\n\t\t\t// name's hashCode is multiplied by an arbitrary prime number (13)\n\t\t\t// in order to make sure there is a difference in the hashCode between\n\t\t\t// these two parameters:\n\t\t\t// name: a value: aa\n\t\t\t// name: aa value: a\n\t\t\treturn key.hashCode() * 13 + (value == null ? 0 : value.hashCode());\n\t\t}", "hashCode", "{\n\t\t\t// name's hashCode is multiplied by an arbitrary prime number (13)\n\t\t\t// in order to make sure there is a difference in the hashCode between\n\t\t\t// these two parameters:\n\t\t\t// name: a value: aa\n\t\t\t// name: aa value: a\n\t\t\treturn key.hashCode() * 13 + (value == null ? 0 : value.hashCode());\n\t\t}", "return key.hashCode() * 13 + (value == null ? 0 : value.hashCode());", "key.hashCode() * 13 + (value == null ? 0 : value.hashCode())", "key.hashCode() * 13", "key.hashCode()", "key.hashCode", "key", "13", "(value == null ? 0 : value.hashCode())", "value == null", "value", "null", "0", "value.hashCode()", "value.hashCode", "value", "/**\n\t\t * <p>\n\t\t * Test this <code>Pair</code> for equality with another <code>Object</code>.\n\t\t * </p>\n\t\t *\n\t\t * <p>\n\t\t * If the <code>Object</code> to be tested is not a <code>Pair</code> or is\n\t\t * <code>null</code>, then this method returns <code>false</code>.\n\t\t * </p>\n\t\t *\n\t\t * <p>\n\t\t * Two <code>Pair</code>s are considered equal if and only if both the names and\n\t\t * values are equal.\n\t\t * </p>\n\t\t *\n\t\t * @param o the <code>Object</code> to test for equality with this\n\t\t * <code>Pair</code>\n\t\t * @return <code>true</code> if the given <code>Object</code> is equal to this\n\t\t * <code>Pair</code> else <code>false</code>\n\t\t */\n\t\t@Override\n\t\tpublic boolean equals(Object o) {\n\t\t\tif (this == o)\n\t\t\t\treturn true;\n\t\t\tif (o instanceof Pair) {\n\t\t\t\tPair pair = (Pair) o;\n\t\t\t\tif (key != null ? !key.equals(pair.key) : pair.key != null)\n\t\t\t\t\treturn false;\n\t\t\t\tif (value != null ? !value.equals(pair.value) : pair.value != null)\n\t\t\t\t\treturn false;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "equals", "{\n\t\t\tif (this == o)\n\t\t\t\treturn true;\n\t\t\tif (o instanceof Pair) {\n\t\t\t\tPair pair = (Pair) o;\n\t\t\t\tif (key != null ? !key.equals(pair.key) : pair.key != null)\n\t\t\t\t\treturn false;\n\t\t\t\tif (value != null ? !value.equals(pair.value) : pair.value != null)\n\t\t\t\t\treturn false;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "if (this == o)\n\t\t\t\treturn true;", "this == o", "this", "o", "return true;", "true", "if (o instanceof Pair) {\n\t\t\t\tPair pair = (Pair) o;\n\t\t\t\tif (key != null ? !key.equals(pair.key) : pair.key != null)\n\t\t\t\t\treturn false;\n\t\t\t\tif (value != null ? !value.equals(pair.value) : pair.value != null)\n\t\t\t\t\treturn false;\n\t\t\t\treturn true;\n\t\t\t}", "o instanceof Pair", "o", "Pair", "{\n\t\t\t\tPair pair = (Pair) o;\n\t\t\t\tif (key != null ? !key.equals(pair.key) : pair.key != null)\n\t\t\t\t\treturn false;\n\t\t\t\tif (value != null ? !value.equals(pair.value) : pair.value != null)\n\t\t\t\t\treturn false;\n\t\t\t\treturn true;\n\t\t\t}", "Pair pair = (Pair) o;", "pair", "(Pair) o", "if (key != null ? !key.equals(pair.key) : pair.key != null)\n\t\t\t\t\treturn false;", "key != null ? !key.equals(pair.key) : pair.key != null", "key != null", "key", "null", "!key.equals(pair.key)", "key.equals(pair.key)", "key.equals", "key", "pair.key", "pair", "pair.key", "pair.key != null", "pair.key", "pair", "pair.key", "null", "return false;", "false", "if (value != null ? !value.equals(pair.value) : pair.value != null)\n\t\t\t\t\treturn false;", "value != null ? !value.equals(pair.value) : pair.value != null", "value != null", "value", "null", "!value.equals(pair.value)", "value.equals(pair.value)", "value.equals", "value", "pair.value", "pair", "pair.value", "pair.value != null", "pair.value", "pair", "pair.value", "null", "return false;", "false", "return true;", "true", "return false;", "false", "Object o", "o", "public class Main {\n\n\tprivate static final String NO = \"NO\";\n\tprivate static final String YES = \"YES\";\n\tInputStream is;\n\tPrintWriter out;\n\tString INPUT = \"\";\n\n\tprivate static final long MOD = 1000000007;\n\tprivate static final long inf = 100000000000L;\n\n\tSet<Integer> g[];\n\n\tvoid solve() {\n\t\tint T =1;\n\t\tfor (int i = 0; i < T; i++)\n\t\t\tsolve(i);\n\t}\n\n\tvoid solve(int T) {\n\t\tint x = ni();\n\t\tint n = ni();\n\t\tint cnt[] = new int[102];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tcnt[ni()]++;\n\t\tint ans = x;\n\t\tint min = Integer.MAX_VALUE;\n\t\tfor (int i=0;i<=101; i++)\n\t\t\tif (cnt[i]==0) {\n\t\t\t\tint d = Math.abs(i-x);\n\t\t\t\tif (d<min) {\n\t\t\t\t\tmin = d;\n\t\t\t\t\tans = i;\n\t\t\t\t}\n\t\t\t}\n\n\t\tout.println(ans);\n\t}\n\n\t// a^b\n\tlong power(long a, long b) {\n\t\tlong x = 1, y = a;\n\t\twhile (b > 0) {\n\t\t\tif (b % 2 != 0) {\n\t\t\t\tx = (x * y) % MOD;\n\t\t\t}\n\t\t\ty = (y * y) % MOD;\n\t\t\tb /= 2;\n\t\t}\n\t\treturn x % MOD;\n\t}\n\n\tprivate long gcd(long a, long b) {\n\t\twhile (a != 0) {\n\t\t\tlong tmp = b % a;\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\t\treturn b;\n\t}\n\n\tvoid run() throws Exception {\n\t\tis = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n\t\tout = new PrintWriter(System.out);\n\n\t\tlong s = System.currentTimeMillis();\n\t\tsolve();\n\t\tout.flush();\n\t\tif (!INPUT.isEmpty())\n\t\t\ttr(System.currentTimeMillis() - s + \"ms\");\n\t}\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tnew Main().run();\n\t}\n\n\tprivate byte[] inbuf = new byte[1024];\n\tpublic int lenbuf = 0, ptrbuf = 0;\n\tprivate boolean vis[];\n\n\tprivate int readByte() {\n\t\tif (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();\n\t\tif (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}\n\t\treturn inbuf[ptrbuf++];\n\t}\n\n\tprivate boolean isSpaceChar(int c) {\n\t\treturn !(c >= 33 && c <= 126);\n\t}\n\n\tprivate int skip() {\n\t\tint b;\n\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;\n\t\treturn b;\n\t}\n\n\tprivate double nd() {\n\t\treturn Double.parseDouble(ns());\n\t}\n\n\tprivate char nc() {\n\t\treturn (char) skip();\n\t}\n\n\tprivate String ns() {\n\t\tint b = skip();\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != '\n\t\t\t\t\t\t\t\t\t// ')\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}\n\n\tprivate char[] ns(int n) {\n\t\tchar[] buf = new char[n];\n\t\tint b = skip(), p = 0;\n\t\twhile (p < n) {\n\t\t\tif (!(isSpaceChar(b)))\n\t\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}\n\t\treturn n == p ? buf : Arrays.copyOf(buf, p);\n\t}\n\n\tprivate char[][] nm(int n, int m) {\n\t\tchar[][] map = new char[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);\n\t\treturn map;\n\t}\n\n\tprivate int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}\n\n\tprivate List<Integer> na2(int n) {\n\t\tList<Integer> a = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta.add(ni());\n\t\treturn a;\n\t}\n\n\tprivate int[][] na(int n, int m) {\n\t\tint[][] a = new int[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = na(m);\n\t\treturn a;\n\t}\n\n\tprivate int ni() {\n\t\tint num = 0, b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\n\tprivate long[] nl(int n) {\n\t\tlong[] a = new long[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl();\n\t\treturn a;\n\t}\n\n\tprivate long[][] nl(int n, int m) {\n\t\tlong[][] a = new long[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl(m);\n\t\treturn a;\n\t}\n\n\tprivate long nl() {\n\t\tlong num = 0;\n\t\tint b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\n\tprivate static void tr(Object... o) {\n\t\tSystem.out.println(Arrays.deepToString(o));\n\t}\n\n\tpublic class Pair<K, V> {\n\n\t\t/**\n\t\t * Key of this <code>Pair</code>.\n\t\t */\n\t\tprivate K key;\n\n\t\t/**\n\t\t * Gets the key for this pair.\n\t\t * \n\t\t * @return key for this pair\n\t\t */\n\t\tpublic K getKey() {\n\t\t\treturn key;\n\t\t}\n\n\t\t/**\n\t\t * Value of this this <code>Pair</code>.\n\t\t */\n\t\tprivate V value;\n\n\t\t/**\n\t\t * Gets the value for this pair.\n\t\t * \n\t\t * @return value for this pair\n\t\t */\n\t\tpublic V getValue() {\n\t\t\treturn value;\n\t\t}\n\n\t\t/**\n\t\t * Creates a new pair\n\t\t * \n\t\t * @param key The key for this pair\n\t\t * @param value The value to use for this pair\n\t\t */\n\t\tpublic Pair(K key, V value) {\n\t\t\tthis.key = key;\n\t\t\tthis.value = value;\n\t\t}\n\n\t\t/**\n\t\t * <p>\n\t\t * <code>String</code> representation of this <code>Pair</code>.\n\t\t * </p>\n\t\t *\n\t\t * <p>\n\t\t * The default name/value delimiter '=' is always used.\n\t\t * </p>\n\t\t *\n\t\t * @return <code>String</code> representation of this <code>Pair</code>\n\t\t */\n\t\t@Override\n\t\tpublic String toString() {\n\t\t\treturn key + \"=\" + value;\n\t\t}\n\n\t\t/**\n\t\t * <p>\n\t\t * Generate a hash code for this <code>Pair</code>.\n\t\t * </p>\n\t\t *\n\t\t * <p>\n\t\t * The hash code is calculated using both the name and the value of the\n\t\t * <code>Pair</code>.\n\t\t * </p>\n\t\t *\n\t\t * @return hash code for this <code>Pair</code>\n\t\t */\n\t\t@Override\n\t\tpublic int hashCode() {\n\t\t\t// name's hashCode is multiplied by an arbitrary prime number (13)\n\t\t\t// in order to make sure there is a difference in the hashCode between\n\t\t\t// these two parameters:\n\t\t\t// name: a value: aa\n\t\t\t// name: aa value: a\n\t\t\treturn key.hashCode() * 13 + (value == null ? 0 : value.hashCode());\n\t\t}\n\n\t\t/**\n\t\t * <p>\n\t\t * Test this <code>Pair</code> for equality with another <code>Object</code>.\n\t\t * </p>\n\t\t *\n\t\t * <p>\n\t\t * If the <code>Object</code> to be tested is not a <code>Pair</code> or is\n\t\t * <code>null</code>, then this method returns <code>false</code>.\n\t\t * </p>\n\t\t *\n\t\t * <p>\n\t\t * Two <code>Pair</code>s are considered equal if and only if both the names and\n\t\t * values are equal.\n\t\t * </p>\n\t\t *\n\t\t * @param o the <code>Object</code> to test for equality with this\n\t\t * <code>Pair</code>\n\t\t * @return <code>true</code> if the given <code>Object</code> is equal to this\n\t\t * <code>Pair</code> else <code>false</code>\n\t\t */\n\t\t@Override\n\t\tpublic boolean equals(Object o) {\n\t\t\tif (this == o)\n\t\t\t\treturn true;\n\t\t\tif (o instanceof Pair) {\n\t\t\t\tPair pair = (Pair) o;\n\t\t\t\tif (key != null ? !key.equals(pair.key) : pair.key != null)\n\t\t\t\t\treturn false;\n\t\t\t\tif (value != null ? !value.equals(pair.value) : pair.value != null)\n\t\t\t\t\treturn false;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}\n\n}", "public class Main {\n\n\tprivate static final String NO = \"NO\";\n\tprivate static final String YES = \"YES\";\n\tInputStream is;\n\tPrintWriter out;\n\tString INPUT = \"\";\n\n\tprivate static final long MOD = 1000000007;\n\tprivate static final long inf = 100000000000L;\n\n\tSet<Integer> g[];\n\n\tvoid solve() {\n\t\tint T =1;\n\t\tfor (int i = 0; i < T; i++)\n\t\t\tsolve(i);\n\t}\n\n\tvoid solve(int T) {\n\t\tint x = ni();\n\t\tint n = ni();\n\t\tint cnt[] = new int[102];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tcnt[ni()]++;\n\t\tint ans = x;\n\t\tint min = Integer.MAX_VALUE;\n\t\tfor (int i=0;i<=101; i++)\n\t\t\tif (cnt[i]==0) {\n\t\t\t\tint d = Math.abs(i-x);\n\t\t\t\tif (d<min) {\n\t\t\t\t\tmin = d;\n\t\t\t\t\tans = i;\n\t\t\t\t}\n\t\t\t}\n\n\t\tout.println(ans);\n\t}\n\n\t// a^b\n\tlong power(long a, long b) {\n\t\tlong x = 1, y = a;\n\t\twhile (b > 0) {\n\t\t\tif (b % 2 != 0) {\n\t\t\t\tx = (x * y) % MOD;\n\t\t\t}\n\t\t\ty = (y * y) % MOD;\n\t\t\tb /= 2;\n\t\t}\n\t\treturn x % MOD;\n\t}\n\n\tprivate long gcd(long a, long b) {\n\t\twhile (a != 0) {\n\t\t\tlong tmp = b % a;\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\t\treturn b;\n\t}\n\n\tvoid run() throws Exception {\n\t\tis = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n\t\tout = new PrintWriter(System.out);\n\n\t\tlong s = System.currentTimeMillis();\n\t\tsolve();\n\t\tout.flush();\n\t\tif (!INPUT.isEmpty())\n\t\t\ttr(System.currentTimeMillis() - s + \"ms\");\n\t}\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tnew Main().run();\n\t}\n\n\tprivate byte[] inbuf = new byte[1024];\n\tpublic int lenbuf = 0, ptrbuf = 0;\n\tprivate boolean vis[];\n\n\tprivate int readByte() {\n\t\tif (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();\n\t\tif (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}\n\t\treturn inbuf[ptrbuf++];\n\t}\n\n\tprivate boolean isSpaceChar(int c) {\n\t\treturn !(c >= 33 && c <= 126);\n\t}\n\n\tprivate int skip() {\n\t\tint b;\n\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;\n\t\treturn b;\n\t}\n\n\tprivate double nd() {\n\t\treturn Double.parseDouble(ns());\n\t}\n\n\tprivate char nc() {\n\t\treturn (char) skip();\n\t}\n\n\tprivate String ns() {\n\t\tint b = skip();\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != '\n\t\t\t\t\t\t\t\t\t// ')\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}\n\n\tprivate char[] ns(int n) {\n\t\tchar[] buf = new char[n];\n\t\tint b = skip(), p = 0;\n\t\twhile (p < n) {\n\t\t\tif (!(isSpaceChar(b)))\n\t\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}\n\t\treturn n == p ? buf : Arrays.copyOf(buf, p);\n\t}\n\n\tprivate char[][] nm(int n, int m) {\n\t\tchar[][] map = new char[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);\n\t\treturn map;\n\t}\n\n\tprivate int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}\n\n\tprivate List<Integer> na2(int n) {\n\t\tList<Integer> a = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta.add(ni());\n\t\treturn a;\n\t}\n\n\tprivate int[][] na(int n, int m) {\n\t\tint[][] a = new int[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = na(m);\n\t\treturn a;\n\t}\n\n\tprivate int ni() {\n\t\tint num = 0, b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\n\tprivate long[] nl(int n) {\n\t\tlong[] a = new long[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl();\n\t\treturn a;\n\t}\n\n\tprivate long[][] nl(int n, int m) {\n\t\tlong[][] a = new long[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl(m);\n\t\treturn a;\n\t}\n\n\tprivate long nl() {\n\t\tlong num = 0;\n\t\tint b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\n\tprivate static void tr(Object... o) {\n\t\tSystem.out.println(Arrays.deepToString(o));\n\t}\n\n\tpublic class Pair<K, V> {\n\n\t\t/**\n\t\t * Key of this <code>Pair</code>.\n\t\t */\n\t\tprivate K key;\n\n\t\t/**\n\t\t * Gets the key for this pair.\n\t\t * \n\t\t * @return key for this pair\n\t\t */\n\t\tpublic K getKey() {\n\t\t\treturn key;\n\t\t}\n\n\t\t/**\n\t\t * Value of this this <code>Pair</code>.\n\t\t */\n\t\tprivate V value;\n\n\t\t/**\n\t\t * Gets the value for this pair.\n\t\t * \n\t\t * @return value for this pair\n\t\t */\n\t\tpublic V getValue() {\n\t\t\treturn value;\n\t\t}\n\n\t\t/**\n\t\t * Creates a new pair\n\t\t * \n\t\t * @param key The key for this pair\n\t\t * @param value The value to use for this pair\n\t\t */\n\t\tpublic Pair(K key, V value) {\n\t\t\tthis.key = key;\n\t\t\tthis.value = value;\n\t\t}\n\n\t\t/**\n\t\t * <p>\n\t\t * <code>String</code> representation of this <code>Pair</code>.\n\t\t * </p>\n\t\t *\n\t\t * <p>\n\t\t * The default name/value delimiter '=' is always used.\n\t\t * </p>\n\t\t *\n\t\t * @return <code>String</code> representation of this <code>Pair</code>\n\t\t */\n\t\t@Override\n\t\tpublic String toString() {\n\t\t\treturn key + \"=\" + value;\n\t\t}\n\n\t\t/**\n\t\t * <p>\n\t\t * Generate a hash code for this <code>Pair</code>.\n\t\t * </p>\n\t\t *\n\t\t * <p>\n\t\t * The hash code is calculated using both the name and the value of the\n\t\t * <code>Pair</code>.\n\t\t * </p>\n\t\t *\n\t\t * @return hash code for this <code>Pair</code>\n\t\t */\n\t\t@Override\n\t\tpublic int hashCode() {\n\t\t\t// name's hashCode is multiplied by an arbitrary prime number (13)\n\t\t\t// in order to make sure there is a difference in the hashCode between\n\t\t\t// these two parameters:\n\t\t\t// name: a value: aa\n\t\t\t// name: aa value: a\n\t\t\treturn key.hashCode() * 13 + (value == null ? 0 : value.hashCode());\n\t\t}\n\n\t\t/**\n\t\t * <p>\n\t\t * Test this <code>Pair</code> for equality with another <code>Object</code>.\n\t\t * </p>\n\t\t *\n\t\t * <p>\n\t\t * If the <code>Object</code> to be tested is not a <code>Pair</code> or is\n\t\t * <code>null</code>, then this method returns <code>false</code>.\n\t\t * </p>\n\t\t *\n\t\t * <p>\n\t\t * Two <code>Pair</code>s are considered equal if and only if both the names and\n\t\t * values are equal.\n\t\t * </p>\n\t\t *\n\t\t * @param o the <code>Object</code> to test for equality with this\n\t\t * <code>Pair</code>\n\t\t * @return <code>true</code> if the given <code>Object</code> is equal to this\n\t\t * <code>Pair</code> else <code>false</code>\n\t\t */\n\t\t@Override\n\t\tpublic boolean equals(Object o) {\n\t\t\tif (this == o)\n\t\t\t\treturn true;\n\t\t\tif (o instanceof Pair) {\n\t\t\t\tPair pair = (Pair) o;\n\t\t\t\tif (key != null ? !key.equals(pair.key) : pair.key != null)\n\t\t\t\t\treturn false;\n\t\t\t\tif (value != null ? !value.equals(pair.value) : pair.value != null)\n\t\t\t\t\treturn false;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}\n\n}", "Main" ]
import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.InputMismatchException; import java.util.List; import java.util.Set; import java.util.TreeSet; public class Main { private static final String NO = "NO"; private static final String YES = "YES"; InputStream is; PrintWriter out; String INPUT = ""; private static final long MOD = 1000000007; private static final long inf = 100000000000L; Set<Integer> g[]; void solve() { int T =1; for (int i = 0; i < T; i++) solve(i); } void solve(int T) { int x = ni(); int n = ni(); int cnt[] = new int[102]; for (int i = 0; i < n; i++) cnt[ni()]++; int ans = x; int min = Integer.MAX_VALUE; for (int i=0;i<=101; i++) if (cnt[i]==0) { int d = Math.abs(i-x); if (d<min) { min = d; ans = i; } } out.println(ans); } // a^b long power(long a, long b) { long x = 1, y = a; while (b > 0) { if (b % 2 != 0) { x = (x * y) % MOD; } y = (y * y) % MOD; b /= 2; } return x % MOD; } private long gcd(long a, long b) { while (a != 0) { long tmp = b % a; b = a; a = tmp; } return b; } void run() throws Exception { is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes()); out = new PrintWriter(System.out); long s = System.currentTimeMillis(); solve(); out.flush(); if (!INPUT.isEmpty()) tr(System.currentTimeMillis() - s + "ms"); } public static void main(String[] args) throws Exception { new Main().run(); } private byte[] inbuf = new byte[1024]; public int lenbuf = 0, ptrbuf = 0; private boolean vis[]; private int readByte() { if (lenbuf == -1) throw new InputMismatchException(); if (ptrbuf >= lenbuf) { ptrbuf = 0; try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); } if (lenbuf <= 0) return -1; } return inbuf[ptrbuf++]; } private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); } private int skip() { int b; while ((b = readByte()) != -1 && isSpaceChar(b)) ; return b; } private double nd() { return Double.parseDouble(ns()); } private char nc() { return (char) skip(); } private String ns() { int b = skip(); StringBuilder sb = new StringBuilder(); while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' // ') sb.appendCodePoint(b); b = readByte(); } return sb.toString(); } private char[] ns(int n) { char[] buf = new char[n]; int b = skip(), p = 0; while (p < n) { if (!(isSpaceChar(b))) buf[p++] = (char) b; b = readByte(); } return n == p ? buf : Arrays.copyOf(buf, p); } private char[][] nm(int n, int m) { char[][] map = new char[n][]; for (int i = 0; i < n; i++) map[i] = ns(m); return map; } private int[] na(int n) { int[] a = new int[n]; for (int i = 0; i < n; i++) a[i] = ni(); return a; } private List<Integer> na2(int n) { List<Integer> a = new ArrayList<Integer>(); for (int i = 0; i < n; i++) a.add(ni()); return a; } private int[][] na(int n, int m) { int[][] a = new int[n][]; for (int i = 0; i < n; i++) a[i] = na(m); return a; } private int ni() { int num = 0, b; boolean minus = false; while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ; if (b == '-') { minus = true; b = readByte(); } while (true) { if (b >= '0' && b <= '9') { num = num * 10 + (b - '0'); } else { return minus ? -num : num; } b = readByte(); } } private long[] nl(int n) { long[] a = new long[n]; for (int i = 0; i < n; i++) a[i] = nl(); return a; } private long[][] nl(int n, int m) { long[][] a = new long[n][]; for (int i = 0; i < n; i++) a[i] = nl(m); return a; } private long nl() { long num = 0; int b; boolean minus = false; while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ; if (b == '-') { minus = true; b = readByte(); } while (true) { if (b >= '0' && b <= '9') { num = num * 10 + (b - '0'); } else { return minus ? -num : num; } b = readByte(); } } private static void tr(Object... o) { System.out.println(Arrays.deepToString(o)); } public class Pair<K, V> { /** * Key of this <code>Pair</code>. */ private K key; /** * Gets the key for this pair. * * @return key for this pair */ public K getKey() { return key; } /** * Value of this this <code>Pair</code>. */ private V value; /** * Gets the value for this pair. * * @return value for this pair */ public V getValue() { return value; } /** * Creates a new pair * * @param key The key for this pair * @param value The value to use for this pair */ public Pair(K key, V value) { this.key = key; this.value = value; } /** * <p> * <code>String</code> representation of this <code>Pair</code>. * </p> * * <p> * The default name/value delimiter '=' is always used. * </p> * * @return <code>String</code> representation of this <code>Pair</code> */ @Override public String toString() { return key + "=" + value; } /** * <p> * Generate a hash code for this <code>Pair</code>. * </p> * * <p> * The hash code is calculated using both the name and the value of the * <code>Pair</code>. * </p> * * @return hash code for this <code>Pair</code> */ @Override public int hashCode() { // name's hashCode is multiplied by an arbitrary prime number (13) // in order to make sure there is a difference in the hashCode between // these two parameters: // name: a value: aa // name: aa value: a return key.hashCode() * 13 + (value == null ? 0 : value.hashCode()); } /** * <p> * Test this <code>Pair</code> for equality with another <code>Object</code>. * </p> * * <p> * If the <code>Object</code> to be tested is not a <code>Pair</code> or is * <code>null</code>, then this method returns <code>false</code>. * </p> * * <p> * Two <code>Pair</code>s are considered equal if and only if both the names and * values are equal. * </p> * * @param o the <code>Object</code> to test for equality with this * <code>Pair</code> * @return <code>true</code> if the given <code>Object</code> is equal to this * <code>Pair</code> else <code>false</code> */ @Override public boolean equals(Object o) { if (this == o) return true; if (o instanceof Pair) { Pair pair = (Pair) o; if (key != null ? !key.equals(pair.key) : pair.key != null) return false; if (value != null ? !value.equals(pair.value) : pair.value != null) return false; return true; } return false; } } }
[ 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, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 0, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 18, 13, 13, 30, 0, 13, 17, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 4, 18, 13, 17, 0, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 18, 13, 13, 30, 0, 13, 17, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 4, 18, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 157, 5 ], [ 157, 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 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 38, 42 ], [ 42, 43 ], [ 43, 44 ], [ 8, 45 ], [ 45, 46 ], [ 46, 47 ], [ 8, 48 ], [ 48, 49 ], [ 48, 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 ], [ 63, 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 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 81, 85 ], [ 85, 86 ], [ 85, 87 ], [ 80, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 63, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 92, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 97, 102 ], [ 102, 103 ], [ 102, 104 ], [ 96, 105 ], [ 105, 106 ], [ 106, 107 ], [ 105, 108 ], [ 63, 109 ], [ 109, 110 ], [ 109, 111 ], [ 63, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 112, 117 ], [ 117, 118 ], [ 117, 119 ], [ 112, 120 ], [ 120, 121 ], [ 121, 122 ], [ 112, 123 ], [ 124, 124 ], [ 124, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 126, 130 ], [ 130, 131 ], [ 130, 132 ], [ 125, 133 ], [ 133, 134 ], [ 134, 135 ], [ 134, 136 ], [ 63, 137 ], [ 137, 138 ], [ 138, 139 ], [ 138, 140 ], [ 137, 141 ], [ 141, 142 ], [ 142, 143 ], [ 143, 144 ], [ 144, 145 ], [ 144, 146 ], [ 142, 147 ], [ 147, 148 ], [ 147, 149 ], [ 141, 150 ], [ 150, 151 ], [ 151, 152 ], [ 150, 153 ], [ 6, 154 ], [ 154, 155 ], [ 0, 156 ], [ 156, 157 ], [ 156, 158 ] ]
[ "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 X=sc.nextInt();\n\t\tint N=sc.nextInt();\n\t\tint p[]=new int[N];\n\t\tfor(int i=0;i<N;i++) \n\t\t\tp[i]=sc.nextInt();\n\t\tsc.close();\n\t\tboolean result=true;\n\t\tfor(int i=0;i<=100;i++) {\n\t\t\tresult=true;\n\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\tif(X-i==p[j]) {\n\t\t\t\t\tresult=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(result==true) {\n\t\t\t\tSystem.out.println(X-i);\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\tresult=true;\n\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\tif(X+i==p[j]) {\n\t\t\t\t\tresult=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(result==true) {\n\t\t\t\tSystem.out.println(X+i);\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\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 X=sc.nextInt();\n\t\tint N=sc.nextInt();\n\t\tint p[]=new int[N];\n\t\tfor(int i=0;i<N;i++) \n\t\t\tp[i]=sc.nextInt();\n\t\tsc.close();\n\t\tboolean result=true;\n\t\tfor(int i=0;i<=100;i++) {\n\t\t\tresult=true;\n\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\tif(X-i==p[j]) {\n\t\t\t\t\tresult=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(result==true) {\n\t\t\t\tSystem.out.println(X-i);\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\tresult=true;\n\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\tif(X+i==p[j]) {\n\t\t\t\t\tresult=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(result==true) {\n\t\t\t\tSystem.out.println(X+i);\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\t\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X=sc.nextInt();\n\t\tint N=sc.nextInt();\n\t\tint p[]=new int[N];\n\t\tfor(int i=0;i<N;i++) \n\t\t\tp[i]=sc.nextInt();\n\t\tsc.close();\n\t\tboolean result=true;\n\t\tfor(int i=0;i<=100;i++) {\n\t\t\tresult=true;\n\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\tif(X-i==p[j]) {\n\t\t\t\t\tresult=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(result==true) {\n\t\t\t\tSystem.out.println(X-i);\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\tresult=true;\n\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\tif(X+i==p[j]) {\n\t\t\t\t\tresult=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(result==true) {\n\t\t\t\tSystem.out.println(X+i);\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\t\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X=sc.nextInt();\n\t\tint N=sc.nextInt();\n\t\tint p[]=new int[N];\n\t\tfor(int i=0;i<N;i++) \n\t\t\tp[i]=sc.nextInt();\n\t\tsc.close();\n\t\tboolean result=true;\n\t\tfor(int i=0;i<=100;i++) {\n\t\t\tresult=true;\n\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\tif(X-i==p[j]) {\n\t\t\t\t\tresult=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(result==true) {\n\t\t\t\tSystem.out.println(X-i);\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\tresult=true;\n\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\tif(X+i==p[j]) {\n\t\t\t\t\tresult=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(result==true) {\n\t\t\t\tSystem.out.println(X+i);\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\t\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int X=sc.nextInt();", "X", "sc.nextInt()", "sc.nextInt", "sc", "int N=sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int p[]=new int[N];", "p", "new int[N]", "N", "for(int i=0;i<N;i++) \n\t\t\tp[i]=sc.nextInt();", "int i=0;", "int i=0;", "i", "0", "i<N", "i", "N", "i++", "i++", "i", "p[i]=sc.nextInt();", "p[i]=sc.nextInt()", "p[i]", "p", "i", "sc.nextInt()", "sc.nextInt", "sc", "sc.close()", "sc.close", "sc", "boolean result=true;", "result", "true", "for(int i=0;i<=100;i++) {\n\t\t\tresult=true;\n\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\tif(X-i==p[j]) {\n\t\t\t\t\tresult=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(result==true) {\n\t\t\t\tSystem.out.println(X-i);\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\tresult=true;\n\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\tif(X+i==p[j]) {\n\t\t\t\t\tresult=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(result==true) {\n\t\t\t\tSystem.out.println(X+i);\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<=100", "i", "100", "i++", "i++", "i", "{\n\t\t\tresult=true;\n\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\tif(X-i==p[j]) {\n\t\t\t\t\tresult=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(result==true) {\n\t\t\t\tSystem.out.println(X-i);\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\tresult=true;\n\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\tif(X+i==p[j]) {\n\t\t\t\t\tresult=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(result==true) {\n\t\t\t\tSystem.out.println(X+i);\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}", "{\n\t\t\tresult=true;\n\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\tif(X-i==p[j]) {\n\t\t\t\t\tresult=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(result==true) {\n\t\t\t\tSystem.out.println(X-i);\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\tresult=true;\n\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\tif(X+i==p[j]) {\n\t\t\t\t\tresult=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(result==true) {\n\t\t\t\tSystem.out.println(X+i);\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}", "result=true", "result", "true", "for(int j=0;j<N;j++) {\n\t\t\t\tif(X-i==p[j]) {\n\t\t\t\t\tresult=false;\n\t\t\t\t}\n\t\t\t}", "int j=0;", "int j=0;", "j", "0", "j<N", "j", "N", "j++", "j++", "j", "{\n\t\t\t\tif(X-i==p[j]) {\n\t\t\t\t\tresult=false;\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tif(X-i==p[j]) {\n\t\t\t\t\tresult=false;\n\t\t\t\t}\n\t\t\t}", "if(X-i==p[j]) {\n\t\t\t\t\tresult=false;\n\t\t\t\t}", "X-i==p[j]", "X-i", "X", "i", "p[j]", "p", "j", "{\n\t\t\t\t\tresult=false;\n\t\t\t\t}", "result=false", "result", "false", "if(result==true) {\n\t\t\t\tSystem.out.println(X-i);\n\t\t\t\tSystem.exit(0);\n\t\t\t}", "result==true", "result", "true", "{\n\t\t\t\tSystem.out.println(X-i);\n\t\t\t\tSystem.exit(0);\n\t\t\t}", "System.out.println(X-i)", "System.out.println", "System.out", "System", "System.out", "X-i", "X", "i", "System.exit(0)", "System.exit", "System", "0", "result=true", "result", "true", "for(int j=0;j<N;j++) {\n\t\t\t\tif(X+i==p[j]) {\n\t\t\t\t\tresult=false;\n\t\t\t\t}\n\t\t\t}", "int j=0;", "int j=0;", "j", "0", "j<N", "j", "N", "j++", "j++", "j", "{\n\t\t\t\tif(X+i==p[j]) {\n\t\t\t\t\tresult=false;\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tif(X+i==p[j]) {\n\t\t\t\t\tresult=false;\n\t\t\t\t}\n\t\t\t}", "if(X+i==p[j]) {\n\t\t\t\t\tresult=false;\n\t\t\t\t}", "X+i==p[j]", "X+i", "X", "i", "p[j]", "p", "j", "{\n\t\t\t\t\tresult=false;\n\t\t\t\t}", "result=false", "result", "false", "if(result==true) {\n\t\t\t\tSystem.out.println(X+i);\n\t\t\t\tSystem.exit(0);\n\t\t\t}", "result==true", "result", "true", "{\n\t\t\t\tSystem.out.println(X+i);\n\t\t\t\tSystem.exit(0);\n\t\t\t}", "System.out.println(X+i)", "System.out.println", "System.out", "System", "System.out", "X+i", "X", "i", "System.exit(0)", "System.exit", "System", "0", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X=sc.nextInt();\n\t\tint N=sc.nextInt();\n\t\tint p[]=new int[N];\n\t\tfor(int i=0;i<N;i++) \n\t\t\tp[i]=sc.nextInt();\n\t\tsc.close();\n\t\tboolean result=true;\n\t\tfor(int i=0;i<=100;i++) {\n\t\t\tresult=true;\n\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\tif(X-i==p[j]) {\n\t\t\t\t\tresult=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(result==true) {\n\t\t\t\tSystem.out.println(X-i);\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\tresult=true;\n\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\tif(X+i==p[j]) {\n\t\t\t\t\tresult=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(result==true) {\n\t\t\t\tSystem.out.println(X+i);\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\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 X=sc.nextInt();\n\t\tint N=sc.nextInt();\n\t\tint p[]=new int[N];\n\t\tfor(int i=0;i<N;i++) \n\t\t\tp[i]=sc.nextInt();\n\t\tsc.close();\n\t\tboolean result=true;\n\t\tfor(int i=0;i<=100;i++) {\n\t\t\tresult=true;\n\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\tif(X-i==p[j]) {\n\t\t\t\t\tresult=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(result==true) {\n\t\t\t\tSystem.out.println(X-i);\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\tresult=true;\n\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\tif(X+i==p[j]) {\n\t\t\t\t\tresult=false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(result==true) {\n\t\t\t\tSystem.out.println(X+i);\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\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 X=sc.nextInt(); int N=sc.nextInt(); int p[]=new int[N]; for(int i=0;i<N;i++) p[i]=sc.nextInt(); sc.close(); boolean result=true; for(int i=0;i<=100;i++) { result=true; for(int j=0;j<N;j++) { if(X-i==p[j]) { result=false; } } if(result==true) { System.out.println(X-i); System.exit(0); } result=true; for(int j=0;j<N;j++) { if(X+i==p[j]) { result=false; } } if(result==true) { System.out.println(X+i); System.exit(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, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 41, 13, 13, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 2, 2, 13, 17, 17, 30, 0, 13, 2, 13, 13, 30, 0, 13, 2, 13, 13, 14, 2, 4, 18, 4, 18, 13, 13, 13, 40, 17, 30, 4, 18, 18, 13, 13, 13, 29, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 105, 5 ], [ 105, 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 ], [ 8, 49 ], [ 49, 50 ], [ 49, 51 ], [ 8, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 52, 57 ], [ 57, 58 ], [ 57, 59 ], [ 52, 60 ], [ 60, 61 ], [ 61, 62 ], [ 52, 63 ], [ 64, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 66, 70 ], [ 65, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 74, 76 ], [ 65, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 80, 82 ], [ 64, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 87, 90 ], [ 85, 91 ], [ 84, 92 ], [ 92, 93 ], [ 83, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 95, 100 ], [ 94, 101 ], [ 6, 102 ], [ 102, 103 ], [ 0, 104 ], [ 104, 105 ], [ 104, 106 ] ]
[ "import java.util.*;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt();\n\t\tint N = sc.nextInt();\n\t\tInteger[] p = new Integer[N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\n\t\t// -1, +2, -3, +4という順番で調べていく\n\t\tint num = X;\n\t\tfor (int i = 0; i <= 200; i++) {\n\t\t\tif (i % 2 == 1) {\n\t\t\t\tnum = num - i;\n\t\t\t} else {\n\t\t\t\tnum = num + i;\n\t\t\t}\n\n\t\t\tif (Arrays.asList(p).indexOf(num) == -1) {\n\t\t\t\tSystem.out.println(num);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt();\n\t\tint N = sc.nextInt();\n\t\tInteger[] p = new Integer[N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\n\t\t// -1, +2, -3, +4という順番で調べていく\n\t\tint num = X;\n\t\tfor (int i = 0; i <= 200; i++) {\n\t\t\tif (i % 2 == 1) {\n\t\t\t\tnum = num - i;\n\t\t\t} else {\n\t\t\t\tnum = num + i;\n\t\t\t}\n\n\t\t\tif (Arrays.asList(p).indexOf(num) == -1) {\n\t\t\t\tSystem.out.println(num);\n\t\t\t\treturn;\n\t\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 X = sc.nextInt();\n\t\tint N = sc.nextInt();\n\t\tInteger[] p = new Integer[N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\n\t\t// -1, +2, -3, +4という順番で調べていく\n\t\tint num = X;\n\t\tfor (int i = 0; i <= 200; i++) {\n\t\t\tif (i % 2 == 1) {\n\t\t\t\tnum = num - i;\n\t\t\t} else {\n\t\t\t\tnum = num + i;\n\t\t\t}\n\n\t\t\tif (Arrays.asList(p).indexOf(num) == -1) {\n\t\t\t\tSystem.out.println(num);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt();\n\t\tint N = sc.nextInt();\n\t\tInteger[] p = new Integer[N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\n\t\t// -1, +2, -3, +4という順番で調べていく\n\t\tint num = X;\n\t\tfor (int i = 0; i <= 200; i++) {\n\t\t\tif (i % 2 == 1) {\n\t\t\t\tnum = num - i;\n\t\t\t} else {\n\t\t\t\tnum = num + i;\n\t\t\t}\n\n\t\t\tif (Arrays.asList(p).indexOf(num) == -1) {\n\t\t\t\tSystem.out.println(num);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int X = sc.nextInt();", "X", "sc.nextInt()", "sc.nextInt", "sc", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "Integer[] p = new Integer[N];", "p", "new Integer[N]", "N", "for (int i = 0; i < N; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < N", "i", "N", "i++", "i++", "i", "{\n\t\t\tp[i] = sc.nextInt();\n\t\t}", "{\n\t\t\tp[i] = sc.nextInt();\n\t\t}", "p[i] = sc.nextInt()", "p[i]", "p", "i", "sc.nextInt()", "sc.nextInt", "sc", "sc.close()", "sc.close", "sc", "int num = X;", "num", "X", "for (int i = 0; i <= 200; i++) {\n\t\t\tif (i % 2 == 1) {\n\t\t\t\tnum = num - i;\n\t\t\t} else {\n\t\t\t\tnum = num + i;\n\t\t\t}\n\n\t\t\tif (Arrays.asList(p).indexOf(num) == -1) {\n\t\t\t\tSystem.out.println(num);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i <= 200", "i", "200", "i++", "i++", "i", "{\n\t\t\tif (i % 2 == 1) {\n\t\t\t\tnum = num - i;\n\t\t\t} else {\n\t\t\t\tnum = num + i;\n\t\t\t}\n\n\t\t\tif (Arrays.asList(p).indexOf(num) == -1) {\n\t\t\t\tSystem.out.println(num);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}", "{\n\t\t\tif (i % 2 == 1) {\n\t\t\t\tnum = num - i;\n\t\t\t} else {\n\t\t\t\tnum = num + i;\n\t\t\t}\n\n\t\t\tif (Arrays.asList(p).indexOf(num) == -1) {\n\t\t\t\tSystem.out.println(num);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}", "if (i % 2 == 1) {\n\t\t\t\tnum = num - i;\n\t\t\t} else {\n\t\t\t\tnum = num + i;\n\t\t\t}", "i % 2 == 1", "i % 2", "i", "2", "1", "{\n\t\t\t\tnum = num - i;\n\t\t\t}", "num = num - i", "num", "num - i", "num", "i", "{\n\t\t\t\tnum = num + i;\n\t\t\t}", "num = num + i", "num", "num + i", "num", "i", "if (Arrays.asList(p).indexOf(num) == -1) {\n\t\t\t\tSystem.out.println(num);\n\t\t\t\treturn;\n\t\t\t}", "Arrays.asList(p).indexOf(num) == -1", "Arrays.asList(p).indexOf(num)", "Arrays.asList(p).indexOf", "Arrays.asList(p)", "Arrays.asList", "Arrays", "p", "num", "-1", "1", "{\n\t\t\t\tSystem.out.println(num);\n\t\t\t\treturn;\n\t\t\t}", "System.out.println(num)", "System.out.println", "System.out", "System", "System.out", "num", "return;", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt();\n\t\tint N = sc.nextInt();\n\t\tInteger[] p = new Integer[N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\n\t\t// -1, +2, -3, +4という順番で調べていく\n\t\tint num = X;\n\t\tfor (int i = 0; i <= 200; i++) {\n\t\t\tif (i % 2 == 1) {\n\t\t\t\tnum = num - i;\n\t\t\t} else {\n\t\t\t\tnum = num + i;\n\t\t\t}\n\n\t\t\tif (Arrays.asList(p).indexOf(num) == -1) {\n\t\t\t\tSystem.out.println(num);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt();\n\t\tint N = sc.nextInt();\n\t\tInteger[] p = new Integer[N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\n\t\t// -1, +2, -3, +4という順番で調べていく\n\t\tint num = X;\n\t\tfor (int i = 0; i <= 200; i++) {\n\t\t\tif (i % 2 == 1) {\n\t\t\t\tnum = num - i;\n\t\t\t} else {\n\t\t\t\tnum = num + i;\n\t\t\t}\n\n\t\t\tif (Arrays.asList(p).indexOf(num) == -1) {\n\t\t\t\tSystem.out.println(num);\n\t\t\t\treturn;\n\t\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 X = sc.nextInt(); int N = sc.nextInt(); Integer[] p = new Integer[N]; for (int i = 0; i < N; i++) { p[i] = sc.nextInt(); } sc.close(); // -1, +2, -3, +4という順番で調べていく int num = X; for (int i = 0; i <= 200; i++) { if (i % 2 == 1) { num = num - i; } else { num = num + i; } if (Arrays.asList(p).indexOf(num) == -1) { System.out.println(num); return; } } } }
[ 7, 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, 20, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 14, 2, 13, 17, 30, 4, 18, 13, 13, 4, 18, 13, 4, 18, 13, 29, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 28, 13, 13, 30, 30, 4, 18, 13, 4, 18, 13, 13, 41, 13, 13, 41, 13, 13, 41, 13, 17, 14, 40, 4, 18, 13, 13, 30, 4, 18, 13, 13, 4, 18, 13, 4, 18, 13, 29, 42, 2, 2, 13, 17, 2, 13, 17, 30, 0, 13, 13, 0, 13, 13, 14, 40, 4, 18, 13, 13, 30, 4, 18, 13, 13, 3, 14, 40, 4, 18, 13, 13, 30, 4, 18, 13, 13, 3, 4, 18, 13, 4, 18, 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 ], [ 163, 20 ], [ 163, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 23, 27 ], [ 27, 28 ], [ 27, 29 ], [ 23, 30 ], [ 30, 31 ], [ 30, 32 ], [ 23, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 35, 38 ], [ 38, 39 ], [ 39, 40 ], [ 23, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 44, 45 ], [ 43, 46 ], [ 46, 47 ], [ 47, 48 ], [ 23, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 49, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 54, 57 ], [ 53, 58 ], [ 58, 59 ], [ 59, 60 ], [ 53, 61 ], [ 61, 62 ], [ 62, 63 ], [ 53, 64 ], [ 23, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 67, 72 ], [ 23, 73 ], [ 73, 74 ], [ 73, 75 ], [ 23, 76 ], [ 76, 77 ], [ 76, 78 ], [ 76, 79 ], [ 80, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 81, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 23, 88 ], [ 88, 89 ], [ 88, 90 ], [ 23, 91 ], [ 91, 92 ], [ 91, 93 ], [ 23, 94 ], [ 94, 95 ], [ 94, 96 ], [ 23, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 99, 102 ], [ 97, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 104, 107 ], [ 103, 108 ], [ 108, 109 ], [ 109, 110 ], [ 103, 111 ], [ 111, 112 ], [ 112, 113 ], [ 103, 114 ], [ 23, 115 ], [ 115, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 116, 120 ], [ 120, 121 ], [ 120, 122 ], [ 115, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 123, 127 ], [ 127, 128 ], [ 127, 129 ], [ 123, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 133, 134 ], [ 132, 135 ], [ 130, 136 ], [ 136, 137 ], [ 137, 138 ], [ 138, 139 ], [ 137, 140 ], [ 136, 141 ], [ 130, 142 ], [ 142, 143 ], [ 143, 144 ], [ 144, 145 ], [ 145, 146 ], [ 144, 147 ], [ 142, 148 ], [ 148, 149 ], [ 149, 150 ], [ 150, 151 ], [ 149, 152 ], [ 148, 153 ], [ 23, 154 ], [ 154, 155 ], [ 155, 156 ], [ 23, 157 ], [ 157, 158 ], [ 158, 159 ], [ 21, 160 ], [ 160, 161 ], [ 0, 162 ], [ 162, 163 ], [ 162, 164 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.PrintWriter;\nimport java.util.HashSet;\nimport java.util.Set;\nimport java.util.StringTokenizer;\n\npublic class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int X = Integer.parseInt(st.nextToken());\n int N = Integer.parseInt(st.nextToken());\n\n if(N == 0) {\n pw.println(X);\n br.close();\n pw.close();\n return;\n }\n\n String[] input_array = br.readLine().split(\" \");\n\n Set<Integer> checkSet = new HashSet<>();\n\n for(String str : input_array) {\n checkSet.add(Integer.parseInt(str));\n }\n\n int up = X;\n int down = X;\n int increment = 1;\n\n if(!checkSet.contains(X)) {\n pw.println(X);\n br.close();\n pw.close();\n return;\n }\n\n while(up != 100 || down != 0) {\n up += increment;\n down -= increment;\n\n if(!checkSet.contains(down)) {\n pw.println(down);\n break;\n } else if(!checkSet.contains(up)) {\n pw.println(up);\n break;\n }\n } \n\n br.close();\n pw.close();\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.PrintWriter;", "PrintWriter", "java.io", "import java.util.HashSet;", "HashSet", "java.util", "import java.util.Set;", "Set", "java.util", "import java.util.StringTokenizer;", "StringTokenizer", "java.util", "public class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int X = Integer.parseInt(st.nextToken());\n int N = Integer.parseInt(st.nextToken());\n\n if(N == 0) {\n pw.println(X);\n br.close();\n pw.close();\n return;\n }\n\n String[] input_array = br.readLine().split(\" \");\n\n Set<Integer> checkSet = new HashSet<>();\n\n for(String str : input_array) {\n checkSet.add(Integer.parseInt(str));\n }\n\n int up = X;\n int down = X;\n int increment = 1;\n\n if(!checkSet.contains(X)) {\n pw.println(X);\n br.close();\n pw.close();\n return;\n }\n\n while(up != 100 || down != 0) {\n up += increment;\n down -= increment;\n\n if(!checkSet.contains(down)) {\n pw.println(down);\n break;\n } else if(!checkSet.contains(up)) {\n pw.println(up);\n break;\n }\n } \n\n br.close();\n pw.close();\n }\n}", "Main", "public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int X = Integer.parseInt(st.nextToken());\n int N = Integer.parseInt(st.nextToken());\n\n if(N == 0) {\n pw.println(X);\n br.close();\n pw.close();\n return;\n }\n\n String[] input_array = br.readLine().split(\" \");\n\n Set<Integer> checkSet = new HashSet<>();\n\n for(String str : input_array) {\n checkSet.add(Integer.parseInt(str));\n }\n\n int up = X;\n int down = X;\n int increment = 1;\n\n if(!checkSet.contains(X)) {\n pw.println(X);\n br.close();\n pw.close();\n return;\n }\n\n while(up != 100 || down != 0) {\n up += increment;\n down -= increment;\n\n if(!checkSet.contains(down)) {\n pw.println(down);\n break;\n } else if(!checkSet.contains(up)) {\n pw.println(up);\n break;\n }\n } \n\n br.close();\n pw.close();\n }", "main", "{\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int X = Integer.parseInt(st.nextToken());\n int N = Integer.parseInt(st.nextToken());\n\n if(N == 0) {\n pw.println(X);\n br.close();\n pw.close();\n return;\n }\n\n String[] input_array = br.readLine().split(\" \");\n\n Set<Integer> checkSet = new HashSet<>();\n\n for(String str : input_array) {\n checkSet.add(Integer.parseInt(str));\n }\n\n int up = X;\n int down = X;\n int increment = 1;\n\n if(!checkSet.contains(X)) {\n pw.println(X);\n br.close();\n pw.close();\n return;\n }\n\n while(up != 100 || down != 0) {\n up += increment;\n down -= increment;\n\n if(!checkSet.contains(down)) {\n pw.println(down);\n break;\n } else if(!checkSet.contains(up)) {\n pw.println(up);\n break;\n }\n } \n\n br.close();\n pw.close();\n }", "BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));", "br", "new BufferedReader(new java.io.InputStreamReader(System.in))", "PrintWriter pw = new PrintWriter(System.out);", "pw", "new PrintWriter(System.out)", "StringTokenizer st = new StringTokenizer(br.readLine());", "st", "new StringTokenizer(br.readLine())", "int X = Integer.parseInt(st.nextToken());", "X", "Integer.parseInt(st.nextToken())", "Integer.parseInt", "Integer", "st.nextToken()", "st.nextToken", "st", "int N = Integer.parseInt(st.nextToken());", "N", "Integer.parseInt(st.nextToken())", "Integer.parseInt", "Integer", "st.nextToken()", "st.nextToken", "st", "if(N == 0) {\n pw.println(X);\n br.close();\n pw.close();\n return;\n }", "N == 0", "N", "0", "{\n pw.println(X);\n br.close();\n pw.close();\n return;\n }", "pw.println(X)", "pw.println", "pw", "X", "br.close()", "br.close", "br", "pw.close()", "pw.close", "pw", "return;", "String[] input_array = br.readLine().split(\" \");", "input_array", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "Set<Integer> checkSet = new HashSet<>();", "checkSet", "new HashSet<>()", "for(String str : input_array) {\n checkSet.add(Integer.parseInt(str));\n }", "String str", "input_array", "{\n checkSet.add(Integer.parseInt(str));\n }", "{\n checkSet.add(Integer.parseInt(str));\n }", "checkSet.add(Integer.parseInt(str))", "checkSet.add", "checkSet", "Integer.parseInt(str)", "Integer.parseInt", "Integer", "str", "int up = X;", "up", "X", "int down = X;", "down", "X", "int increment = 1;", "increment", "1", "if(!checkSet.contains(X)) {\n pw.println(X);\n br.close();\n pw.close();\n return;\n }", "!checkSet.contains(X)", "checkSet.contains(X)", "checkSet.contains", "checkSet", "X", "{\n pw.println(X);\n br.close();\n pw.close();\n return;\n }", "pw.println(X)", "pw.println", "pw", "X", "br.close()", "br.close", "br", "pw.close()", "pw.close", "pw", "return;", "while(up != 100 || down != 0) {\n up += increment;\n down -= increment;\n\n if(!checkSet.contains(down)) {\n pw.println(down);\n break;\n } else if(!checkSet.contains(up)) {\n pw.println(up);\n break;\n }\n }", "up != 100 || down != 0", "up != 100", "up", "100", "down != 0", "down", "0", "{\n up += increment;\n down -= increment;\n\n if(!checkSet.contains(down)) {\n pw.println(down);\n break;\n } else if(!checkSet.contains(up)) {\n pw.println(up);\n break;\n }\n }", "up += increment", "up", "increment", "down -= increment", "down", "increment", "if(!checkSet.contains(down)) {\n pw.println(down);\n break;\n } else if(!checkSet.contains(up)) {\n pw.println(up);\n break;\n }", "!checkSet.contains(down)", "checkSet.contains(down)", "checkSet.contains", "checkSet", "down", "{\n pw.println(down);\n break;\n }", "pw.println(down)", "pw.println", "pw", "down", "break;", "if(!checkSet.contains(up)) {\n pw.println(up);\n break;\n }", "!checkSet.contains(up)", "checkSet.contains(up)", "checkSet.contains", "checkSet", "up", "{\n pw.println(up);\n break;\n }", "pw.println(up)", "pw.println", "pw", "up", "break;", "br.close()", "br.close", "br", "pw.close()", "pw.close", "pw", "String[] args", "args", "public class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int X = Integer.parseInt(st.nextToken());\n int N = Integer.parseInt(st.nextToken());\n\n if(N == 0) {\n pw.println(X);\n br.close();\n pw.close();\n return;\n }\n\n String[] input_array = br.readLine().split(\" \");\n\n Set<Integer> checkSet = new HashSet<>();\n\n for(String str : input_array) {\n checkSet.add(Integer.parseInt(str));\n }\n\n int up = X;\n int down = X;\n int increment = 1;\n\n if(!checkSet.contains(X)) {\n pw.println(X);\n br.close();\n pw.close();\n return;\n }\n\n while(up != 100 || down != 0) {\n up += increment;\n down -= increment;\n\n if(!checkSet.contains(down)) {\n pw.println(down);\n break;\n } else if(!checkSet.contains(up)) {\n pw.println(up);\n break;\n }\n } \n\n br.close();\n pw.close();\n }\n}", "public class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int X = Integer.parseInt(st.nextToken());\n int N = Integer.parseInt(st.nextToken());\n\n if(N == 0) {\n pw.println(X);\n br.close();\n pw.close();\n return;\n }\n\n String[] input_array = br.readLine().split(\" \");\n\n Set<Integer> checkSet = new HashSet<>();\n\n for(String str : input_array) {\n checkSet.add(Integer.parseInt(str));\n }\n\n int up = X;\n int down = X;\n int increment = 1;\n\n if(!checkSet.contains(X)) {\n pw.println(X);\n br.close();\n pw.close();\n return;\n }\n\n while(up != 100 || down != 0) {\n up += increment;\n down -= increment;\n\n if(!checkSet.contains(down)) {\n pw.println(down);\n break;\n } else if(!checkSet.contains(up)) {\n pw.println(up);\n break;\n }\n } \n\n br.close();\n pw.close();\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.PrintWriter; import java.util.HashSet; import java.util.Set; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in)); PrintWriter pw = new PrintWriter(System.out); StringTokenizer st = new StringTokenizer(br.readLine()); int X = Integer.parseInt(st.nextToken()); int N = Integer.parseInt(st.nextToken()); if(N == 0) { pw.println(X); br.close(); pw.close(); return; } String[] input_array = br.readLine().split(" "); Set<Integer> checkSet = new HashSet<>(); for(String str : input_array) { checkSet.add(Integer.parseInt(str)); } int up = X; int down = X; int increment = 1; if(!checkSet.contains(X)) { pw.println(X); br.close(); pw.close(); return; } while(up != 100 || down != 0) { up += increment; down -= increment; if(!checkSet.contains(down)) { pw.println(down); break; } else if(!checkSet.contains(up)) { pw.println(up); break; } } br.close(); pw.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, 13, 41, 13, 17, 41, 13, 20, 13, 41, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 4, 18, 13, 13, 14, 2, 4, 18, 13, 13, 30, 4, 18, 18, 13, 13, 13, 4, 18, 13, 17, 11, 1, 41, 13, 40, 17, 2, 13, 17, 1, 40, 13, 30, 30, 4, 18, 13, 13, 14, 2, 4, 18, 13, 13, 30, 14, 2, 4, 18, 13, 2, 13, 13, 13, 30, 0, 13, 2, 13, 13, 0, 13, 13, 40, 13, 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 ], [ 135, 8 ], [ 135, 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, 35 ], [ 35, 36 ], [ 35, 37 ], [ 11, 38 ], [ 38, 39 ], [ 38, 40 ], [ 11, 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 ], [ 54, 57 ], [ 57, 58 ], [ 58, 59 ], [ 11, 60 ], [ 60, 61 ], [ 61, 62 ], [ 60, 63 ], [ 11, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 65, 69 ], [ 64, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 71, 76 ], [ 70, 77 ], [ 77, 78 ], [ 78, 79 ], [ 77, 80 ], [ 11, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 81, 87 ], [ 87, 88 ], [ 87, 89 ], [ 81, 90 ], [ 90, 91 ], [ 91, 92 ], [ 81, 93 ], [ 94, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 95, 98 ], [ 94, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 100, 104 ], [ 99, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 108, 111 ], [ 111, 112 ], [ 111, 113 ], [ 107, 114 ], [ 106, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 118, 119 ], [ 118, 120 ], [ 115, 121 ], [ 121, 122 ], [ 121, 123 ], [ 105, 124 ], [ 124, 125 ], [ 11, 126 ], [ 126, 127 ], [ 127, 128 ], [ 128, 129 ], [ 128, 130 ], [ 126, 131 ], [ 9, 132 ], [ 132, 133 ], [ 0, 134 ], [ 134, 135 ], [ 134, 136 ] ]
[ "import java.util.*;\nimport java.math.BigDecimal;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 整数の入力\n\t\tint x = sc.nextInt();\n int n = sc.nextInt();\n int check = n;\n int z= 999;\n int p[] = new int[n];\n int ans = 100;\n HashSet hs = new HashSet();\n for(int i = 0; i < n;i++){\n hs.add(sc.nextInt());\n }\n \n hs.add(x);\n if(hs.size() != n){\n System.out.println(x);\n System.exit(0);\n }\n for(int i = -100; i <= 200;i++){\n hs.add(i);\n if(hs.size() != check){\n if(Math.abs(x - i) < ans){\n ans = x - i;\n z = i;\n }\n check++;\n }\n }\n \n\n System.out.println(z);\n }\n}", "import java.util.*;", "util.*", "java", "import java.math.BigDecimal;", "BigDecimal", "java.math", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 整数の入力\n\t\tint x = sc.nextInt();\n int n = sc.nextInt();\n int check = n;\n int z= 999;\n int p[] = new int[n];\n int ans = 100;\n HashSet hs = new HashSet();\n for(int i = 0; i < n;i++){\n hs.add(sc.nextInt());\n }\n \n hs.add(x);\n if(hs.size() != n){\n System.out.println(x);\n System.exit(0);\n }\n for(int i = -100; i <= 200;i++){\n hs.add(i);\n if(hs.size() != check){\n if(Math.abs(x - i) < ans){\n ans = x - i;\n z = i;\n }\n check++;\n }\n }\n \n\n System.out.println(z);\n }\n}", "Main", "public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 整数の入力\n\t\tint x = sc.nextInt();\n int n = sc.nextInt();\n int check = n;\n int z= 999;\n int p[] = new int[n];\n int ans = 100;\n HashSet hs = new HashSet();\n for(int i = 0; i < n;i++){\n hs.add(sc.nextInt());\n }\n \n hs.add(x);\n if(hs.size() != n){\n System.out.println(x);\n System.exit(0);\n }\n for(int i = -100; i <= 200;i++){\n hs.add(i);\n if(hs.size() != check){\n if(Math.abs(x - i) < ans){\n ans = x - i;\n z = i;\n }\n check++;\n }\n }\n \n\n System.out.println(z);\n }", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 整数の入力\n\t\tint x = sc.nextInt();\n int n = sc.nextInt();\n int check = n;\n int z= 999;\n int p[] = new int[n];\n int ans = 100;\n HashSet hs = new HashSet();\n for(int i = 0; i < n;i++){\n hs.add(sc.nextInt());\n }\n \n hs.add(x);\n if(hs.size() != n){\n System.out.println(x);\n System.exit(0);\n }\n for(int i = -100; i <= 200;i++){\n hs.add(i);\n if(hs.size() != check){\n if(Math.abs(x - i) < ans){\n ans = x - i;\n z = i;\n }\n check++;\n }\n }\n \n\n System.out.println(z);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int check = n;", "check", "n", "int z= 999;", "z", "999", "int p[] = new int[n];", "p", "new int[n]", "n", "int ans = 100;", "ans", "100", "HashSet hs = new HashSet();", "hs", "new HashSet()", "for(int i = 0; i < n;i++){\n hs.add(sc.nextInt());\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n hs.add(sc.nextInt());\n }", "{\n hs.add(sc.nextInt());\n }", "hs.add(sc.nextInt())", "hs.add", "hs", "sc.nextInt()", "sc.nextInt", "sc", "hs.add(x)", "hs.add", "hs", "x", "if(hs.size() != n){\n System.out.println(x);\n System.exit(0);\n }", "hs.size() != n", "hs.size()", "hs.size", "hs", "n", "{\n System.out.println(x);\n System.exit(0);\n }", "System.out.println(x)", "System.out.println", "System.out", "System", "System.out", "x", "System.exit(0)", "System.exit", "System", "0", "for(int i = -100; i <= 200;i++){\n hs.add(i);\n if(hs.size() != check){\n if(Math.abs(x - i) < ans){\n ans = x - i;\n z = i;\n }\n check++;\n }\n }", "int i = -100;", "int i = -100;", "i", "-100", "100", "i <= 200", "i", "200", "i++", "i++", "i", "{\n hs.add(i);\n if(hs.size() != check){\n if(Math.abs(x - i) < ans){\n ans = x - i;\n z = i;\n }\n check++;\n }\n }", "{\n hs.add(i);\n if(hs.size() != check){\n if(Math.abs(x - i) < ans){\n ans = x - i;\n z = i;\n }\n check++;\n }\n }", "hs.add(i)", "hs.add", "hs", "i", "if(hs.size() != check){\n if(Math.abs(x - i) < ans){\n ans = x - i;\n z = i;\n }\n check++;\n }", "hs.size() != check", "hs.size()", "hs.size", "hs", "check", "{\n if(Math.abs(x - i) < ans){\n ans = x - i;\n z = i;\n }\n check++;\n }", "if(Math.abs(x - i) < ans){\n ans = x - i;\n z = i;\n }", "Math.abs(x - i) < ans", "Math.abs(x - i)", "Math.abs", "Math", "x - i", "x", "i", "ans", "{\n ans = x - i;\n z = i;\n }", "ans = x - i", "ans", "x - i", "x", "i", "z = i", "z", "i", "check++", "check", "System.out.println(z)", "System.out.println", "System.out", "System", "System.out", "z", "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 x = sc.nextInt();\n int n = sc.nextInt();\n int check = n;\n int z= 999;\n int p[] = new int[n];\n int ans = 100;\n HashSet hs = new HashSet();\n for(int i = 0; i < n;i++){\n hs.add(sc.nextInt());\n }\n \n hs.add(x);\n if(hs.size() != n){\n System.out.println(x);\n System.exit(0);\n }\n for(int i = -100; i <= 200;i++){\n hs.add(i);\n if(hs.size() != check){\n if(Math.abs(x - i) < ans){\n ans = x - i;\n z = i;\n }\n check++;\n }\n }\n \n\n System.out.println(z);\n }\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 x = sc.nextInt();\n int n = sc.nextInt();\n int check = n;\n int z= 999;\n int p[] = new int[n];\n int ans = 100;\n HashSet hs = new HashSet();\n for(int i = 0; i < n;i++){\n hs.add(sc.nextInt());\n }\n \n hs.add(x);\n if(hs.size() != n){\n System.out.println(x);\n System.exit(0);\n }\n for(int i = -100; i <= 200;i++){\n hs.add(i);\n if(hs.size() != check){\n if(Math.abs(x - i) < ans){\n ans = x - i;\n z = i;\n }\n check++;\n }\n }\n \n\n System.out.println(z);\n }\n}", "Main" ]
import java.util.*; import java.math.BigDecimal; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); // 整数の入力 int x = sc.nextInt(); int n = sc.nextInt(); int check = n; int z= 999; int p[] = new int[n]; int ans = 100; HashSet hs = new HashSet(); for(int i = 0; i < n;i++){ hs.add(sc.nextInt()); } hs.add(x); if(hs.size() != n){ System.out.println(x); System.exit(0); } for(int i = -100; i <= 200;i++){ hs.add(i); if(hs.size() != check){ if(Math.abs(x - i) < ans){ ans = x - i; z = i; } check++; } } System.out.println(z); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 13, 41, 13, 17, 41, 13, 4, 18, 13, 41, 13, 20, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 42, 13, 30, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 1, 40, 13, 30, 30, 14, 2, 13, 4, 18, 13, 13, 30, 40, 13, 4, 18, 13, 13, 0, 13, 40, 17, 0, 13, 13, 0, 13, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 1, 40, 13, 30, 30, 14, 2, 13, 4, 18, 13, 13, 30, 40, 13, 4, 18, 13, 13, 0, 13, 40, 17, 14, 2, 4, 18, 13, 2, 13, 13, 4, 18, 13, 2, 13, 13, 0, 13, 13, 3, 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 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 8, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 8, 28 ], [ 28, 29 ], [ 28, 30 ], [ 8, 31 ], [ 31, 32 ], [ 31, 33 ], [ 8, 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 ], [ 48, 49 ], [ 47, 50 ], [ 50, 51 ], [ 51, 52 ], [ 8, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 56, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 64, 65 ], [ 56, 66 ], [ 66, 67 ], [ 67, 68 ], [ 56, 69 ], [ 70, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 75, 76 ], [ 74, 77 ], [ 71, 78 ], [ 78, 79 ], [ 79, 80 ], [ 78, 81 ], [ 81, 82 ], [ 82, 83 ], [ 81, 84 ], [ 78, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 55, 89 ], [ 89, 90 ], [ 89, 91 ], [ 55, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 94, 96 ], [ 55, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 97, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 105, 106 ], [ 97, 107 ], [ 107, 108 ], [ 108, 109 ], [ 97, 110 ], [ 111, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 115, 116 ], [ 116, 117 ], [ 115, 118 ], [ 112, 119 ], [ 119, 120 ], [ 120, 121 ], [ 119, 122 ], [ 122, 123 ], [ 123, 124 ], [ 122, 125 ], [ 119, 126 ], [ 126, 127 ], [ 126, 128 ], [ 128, 129 ], [ 55, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 133, 134 ], [ 132, 135 ], [ 135, 136 ], [ 135, 137 ], [ 131, 138 ], [ 138, 139 ], [ 139, 140 ], [ 138, 141 ], [ 141, 142 ], [ 141, 143 ], [ 130, 144 ], [ 144, 145 ], [ 144, 146 ], [ 55, 147 ], [ 8, 148 ], [ 148, 149 ], [ 149, 150 ], [ 150, 151 ], [ 150, 152 ], [ 148, 153 ], [ 6, 154 ], [ 154, 155 ] ]
[ "import java.util.*;\n\nclass Main{\n public static void main(String[] args){\n Scanner scn=new Scanner(System.in);\n int x=scn.nextInt();\n int x_=x;\n int ans=0;\n int n=scn.nextInt();\n ArrayList<Integer> p=new ArrayList<>();\n boolean flg=true;\n \n for(int i=0;i<n;i++){\n\t\tp.add(scn.nextInt());\n }\n \n while(flg){\n for(int i=0;i<p.size();i++){\n if(x_==p.get(i)){\n x_--;\n p.remove(i);\n i=-1;\n }\n }\n ans=x_;\n x_=x+1;\n \n for(int i=0;i<p.size();i++){\n \tif(x_==p.get(i)){\n \t\tx_++;\n \t\tp.remove(i);\n \t\ti=-1;\n \t\t}\n }\n if(Math.abs(x_-x)<Math.abs(ans-x)) ans=x_;\n break;\n }\n System.out.println(ans);\n }\n}\n \n ", "import java.util.*;", "util.*", "java", "class Main{\n public static void main(String[] args){\n Scanner scn=new Scanner(System.in);\n int x=scn.nextInt();\n int x_=x;\n int ans=0;\n int n=scn.nextInt();\n ArrayList<Integer> p=new ArrayList<>();\n boolean flg=true;\n \n for(int i=0;i<n;i++){\n\t\tp.add(scn.nextInt());\n }\n \n while(flg){\n for(int i=0;i<p.size();i++){\n if(x_==p.get(i)){\n x_--;\n p.remove(i);\n i=-1;\n }\n }\n ans=x_;\n x_=x+1;\n \n for(int i=0;i<p.size();i++){\n \tif(x_==p.get(i)){\n \t\tx_++;\n \t\tp.remove(i);\n \t\ti=-1;\n \t\t}\n }\n if(Math.abs(x_-x)<Math.abs(ans-x)) ans=x_;\n break;\n }\n System.out.println(ans);\n }\n}", "Main", "public static void main(String[] args){\n Scanner scn=new Scanner(System.in);\n int x=scn.nextInt();\n int x_=x;\n int ans=0;\n int n=scn.nextInt();\n ArrayList<Integer> p=new ArrayList<>();\n boolean flg=true;\n \n for(int i=0;i<n;i++){\n\t\tp.add(scn.nextInt());\n }\n \n while(flg){\n for(int i=0;i<p.size();i++){\n if(x_==p.get(i)){\n x_--;\n p.remove(i);\n i=-1;\n }\n }\n ans=x_;\n x_=x+1;\n \n for(int i=0;i<p.size();i++){\n \tif(x_==p.get(i)){\n \t\tx_++;\n \t\tp.remove(i);\n \t\ti=-1;\n \t\t}\n }\n if(Math.abs(x_-x)<Math.abs(ans-x)) ans=x_;\n break;\n }\n System.out.println(ans);\n }", "main", "{\n Scanner scn=new Scanner(System.in);\n int x=scn.nextInt();\n int x_=x;\n int ans=0;\n int n=scn.nextInt();\n ArrayList<Integer> p=new ArrayList<>();\n boolean flg=true;\n \n for(int i=0;i<n;i++){\n\t\tp.add(scn.nextInt());\n }\n \n while(flg){\n for(int i=0;i<p.size();i++){\n if(x_==p.get(i)){\n x_--;\n p.remove(i);\n i=-1;\n }\n }\n ans=x_;\n x_=x+1;\n \n for(int i=0;i<p.size();i++){\n \tif(x_==p.get(i)){\n \t\tx_++;\n \t\tp.remove(i);\n \t\ti=-1;\n \t\t}\n }\n if(Math.abs(x_-x)<Math.abs(ans-x)) ans=x_;\n break;\n }\n System.out.println(ans);\n }", "Scanner scn=new Scanner(System.in);", "scn", "new Scanner(System.in)", "int x=scn.nextInt();", "x", "scn.nextInt()", "scn.nextInt", "scn", "int x_=x;", "x_", "x", "int ans=0;", "ans", "0", "int n=scn.nextInt();", "n", "scn.nextInt()", "scn.nextInt", "scn", "ArrayList<Integer> p=new ArrayList<>();", "p", "new ArrayList<>()", "boolean flg=true;", "flg", "true", "for(int i=0;i<n;i++){\n\t\tp.add(scn.nextInt());\n }", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t\tp.add(scn.nextInt());\n }", "{\n\t\tp.add(scn.nextInt());\n }", "p.add(scn.nextInt())", "p.add", "p", "scn.nextInt()", "scn.nextInt", "scn", "while(flg){\n for(int i=0;i<p.size();i++){\n if(x_==p.get(i)){\n x_--;\n p.remove(i);\n i=-1;\n }\n }\n ans=x_;\n x_=x+1;\n \n for(int i=0;i<p.size();i++){\n \tif(x_==p.get(i)){\n \t\tx_++;\n \t\tp.remove(i);\n \t\ti=-1;\n \t\t}\n }\n if(Math.abs(x_-x)<Math.abs(ans-x)) ans=x_;\n break;\n }", "flg", "{\n for(int i=0;i<p.size();i++){\n if(x_==p.get(i)){\n x_--;\n p.remove(i);\n i=-1;\n }\n }\n ans=x_;\n x_=x+1;\n \n for(int i=0;i<p.size();i++){\n \tif(x_==p.get(i)){\n \t\tx_++;\n \t\tp.remove(i);\n \t\ti=-1;\n \t\t}\n }\n if(Math.abs(x_-x)<Math.abs(ans-x)) ans=x_;\n break;\n }", "for(int i=0;i<p.size();i++){\n if(x_==p.get(i)){\n x_--;\n p.remove(i);\n i=-1;\n }\n }", "int i=0;", "int i=0;", "i", "0", "i<p.size()", "i", "p.size()", "p.size", "p", "i++", "i++", "i", "{\n if(x_==p.get(i)){\n x_--;\n p.remove(i);\n i=-1;\n }\n }", "{\n if(x_==p.get(i)){\n x_--;\n p.remove(i);\n i=-1;\n }\n }", "if(x_==p.get(i)){\n x_--;\n p.remove(i);\n i=-1;\n }", "x_==p.get(i)", "x_", "p.get(i)", "p.get", "p", "i", "{\n x_--;\n p.remove(i);\n i=-1;\n }", "x_--", "x_", "p.remove(i)", "p.remove", "p", "i", "i=-1", "i", "-1", "1", "ans=x_", "ans", "x_", "x_=x+1", "x_", "x+1", "x", "1", "for(int i=0;i<p.size();i++){\n \tif(x_==p.get(i)){\n \t\tx_++;\n \t\tp.remove(i);\n \t\ti=-1;\n \t\t}\n }", "int i=0;", "int i=0;", "i", "0", "i<p.size()", "i", "p.size()", "p.size", "p", "i++", "i++", "i", "{\n \tif(x_==p.get(i)){\n \t\tx_++;\n \t\tp.remove(i);\n \t\ti=-1;\n \t\t}\n }", "{\n \tif(x_==p.get(i)){\n \t\tx_++;\n \t\tp.remove(i);\n \t\ti=-1;\n \t\t}\n }", "if(x_==p.get(i)){\n \t\tx_++;\n \t\tp.remove(i);\n \t\ti=-1;\n \t\t}", "x_==p.get(i)", "x_", "p.get(i)", "p.get", "p", "i", "{\n \t\tx_++;\n \t\tp.remove(i);\n \t\ti=-1;\n \t\t}", "x_++", "x_", "p.remove(i)", "p.remove", "p", "i", "i=-1", "i", "-1", "1", "if(Math.abs(x_-x)<Math.abs(ans-x)) ans=x_;", "Math.abs(x_-x)<Math.abs(ans-x)", "Math.abs(x_-x)", "Math.abs", "Math", "x_-x", "x_", "x", "Math.abs(ans-x)", "Math.abs", "Math", "ans-x", "ans", "x", "ans=x_", "ans", "x_", "break;", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args" ]
import java.util.*; class Main{ public static void main(String[] args){ Scanner scn=new Scanner(System.in); int x=scn.nextInt(); int x_=x; int ans=0; int n=scn.nextInt(); ArrayList<Integer> p=new ArrayList<>(); boolean flg=true; for(int i=0;i<n;i++){ p.add(scn.nextInt()); } while(flg){ for(int i=0;i<p.size();i++){ if(x_==p.get(i)){ x_--; p.remove(i); i=-1; } } ans=x_; x_=x+1; for(int i=0;i<p.size();i++){ if(x_==p.get(i)){ x_++; p.remove(i); i=-1; } } if(Math.abs(x_-x)<Math.abs(ans-x)) ans=x_; break; } System.out.println(ans); } }
[ 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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 41, 13, 20, 17, 28, 13, 13, 30, 30, 0, 18, 13, 13, 17, 41, 13, 18, 13, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 2, 18, 13, 13, 17, 30, 14, 2, 13, 4, 18, 13, 2, 13, 13, 30, 0, 13, 2, 13, 13, 0, 13, 13, 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 ], [ 118, 8 ], [ 118, 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 ], [ 42, 43 ], [ 41, 44 ], [ 44, 45 ], [ 45, 46 ], [ 11, 47 ], [ 47, 48 ], [ 47, 49 ], [ 11, 51 ], [ 51, 52 ], [ 51, 53 ], [ 51, 54 ], [ 55, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 56, 60 ], [ 11, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 63, 65 ], [ 11, 66 ], [ 66, 67 ], [ 66, 68 ], [ 11, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 69, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 76, 78 ], [ 69, 79 ], [ 79, 80 ], [ 80, 81 ], [ 69, 82 ], [ 83, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 85, 89 ], [ 84, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 95, 96 ], [ 94, 97 ], [ 97, 98 ], [ 97, 99 ], [ 91, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 103, 104 ], [ 103, 105 ], [ 100, 106 ], [ 106, 107 ], [ 106, 108 ], [ 11, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 109, 114 ], [ 9, 115 ], [ 115, 116 ], [ 0, 117 ], [ 117, 118 ], [ 117, 119 ] ]
[ "import java.util.Scanner;\nimport java.util.TreeSet;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n TreeSet<Integer> p = new TreeSet<>();\n for (int i = 0; i < n; i++) {\n p.add(sc.nextInt());\n }\n int[] arr = new int[102];\n for (int i : p) {\n arr[i] = 1;\n }\n int min = Integer.MAX_VALUE;\n int ans = 0;\n for (int i = 0; i < arr.length; i++) {\n if(arr[i] == 0) {\n if(min > Math.abs(x - i)) {\n min = x - i;\n ans = i;\n }\n }\n }\n System.out.println(ans);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.TreeSet;", "TreeSet", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n TreeSet<Integer> p = new TreeSet<>();\n for (int i = 0; i < n; i++) {\n p.add(sc.nextInt());\n }\n int[] arr = new int[102];\n for (int i : p) {\n arr[i] = 1;\n }\n int min = Integer.MAX_VALUE;\n int ans = 0;\n for (int i = 0; i < arr.length; i++) {\n if(arr[i] == 0) {\n if(min > Math.abs(x - i)) {\n min = x - i;\n ans = i;\n }\n }\n }\n System.out.println(ans);\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n TreeSet<Integer> p = new TreeSet<>();\n for (int i = 0; i < n; i++) {\n p.add(sc.nextInt());\n }\n int[] arr = new int[102];\n for (int i : p) {\n arr[i] = 1;\n }\n int min = Integer.MAX_VALUE;\n int ans = 0;\n for (int i = 0; i < arr.length; i++) {\n if(arr[i] == 0) {\n if(min > Math.abs(x - i)) {\n min = x - i;\n ans = i;\n }\n }\n }\n System.out.println(ans);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n TreeSet<Integer> p = new TreeSet<>();\n for (int i = 0; i < n; i++) {\n p.add(sc.nextInt());\n }\n int[] arr = new int[102];\n for (int i : p) {\n arr[i] = 1;\n }\n int min = Integer.MAX_VALUE;\n int ans = 0;\n for (int i = 0; i < arr.length; i++) {\n if(arr[i] == 0) {\n if(min > Math.abs(x - i)) {\n min = x - i;\n ans = i;\n }\n }\n }\n System.out.println(ans);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "TreeSet<Integer> p = new TreeSet<>();", "p", "new TreeSet<>()", "for (int i = 0; i < n; i++) {\n p.add(sc.nextInt());\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n p.add(sc.nextInt());\n }", "{\n p.add(sc.nextInt());\n }", "p.add(sc.nextInt())", "p.add", "p", "sc.nextInt()", "sc.nextInt", "sc", "int[] arr = new int[102];", "arr", "new int[102]", "102", "for (int i : p) {\n arr[i] = 1;\n }", "int i", "p", "{\n arr[i] = 1;\n }", "{\n arr[i] = 1;\n }", "arr[i] = 1", "arr[i]", "arr", "i", "1", "int min = Integer.MAX_VALUE;", "min", "Integer.MAX_VALUE", "Integer", "Integer.MAX_VALUE", "int ans = 0;", "ans", "0", "for (int i = 0; i < arr.length; i++) {\n if(arr[i] == 0) {\n if(min > Math.abs(x - i)) {\n min = x - i;\n ans = i;\n }\n }\n }", "int i = 0;", "int i = 0;", "i", "0", "i < arr.length", "i", "arr.length", "arr", "arr.length", "i++", "i++", "i", "{\n if(arr[i] == 0) {\n if(min > Math.abs(x - i)) {\n min = x - i;\n ans = i;\n }\n }\n }", "{\n if(arr[i] == 0) {\n if(min > Math.abs(x - i)) {\n min = x - i;\n ans = i;\n }\n }\n }", "if(arr[i] == 0) {\n if(min > Math.abs(x - i)) {\n min = x - i;\n ans = i;\n }\n }", "arr[i] == 0", "arr[i]", "arr", "i", "0", "{\n if(min > Math.abs(x - i)) {\n min = x - i;\n ans = i;\n }\n }", "if(min > Math.abs(x - i)) {\n min = x - i;\n ans = i;\n }", "min > Math.abs(x - i)", "min", "Math.abs(x - i)", "Math.abs", "Math", "x - i", "x", "i", "{\n min = x - i;\n ans = i;\n }", "min = x - i", "min", "x - i", "x", "i", "ans = i", "ans", "i", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n TreeSet<Integer> p = new TreeSet<>();\n for (int i = 0; i < n; i++) {\n p.add(sc.nextInt());\n }\n int[] arr = new int[102];\n for (int i : p) {\n arr[i] = 1;\n }\n int min = Integer.MAX_VALUE;\n int ans = 0;\n for (int i = 0; i < arr.length; i++) {\n if(arr[i] == 0) {\n if(min > Math.abs(x - i)) {\n min = x - i;\n ans = i;\n }\n }\n }\n System.out.println(ans);\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n TreeSet<Integer> p = new TreeSet<>();\n for (int i = 0; i < n; i++) {\n p.add(sc.nextInt());\n }\n int[] arr = new int[102];\n for (int i : p) {\n arr[i] = 1;\n }\n int min = Integer.MAX_VALUE;\n int ans = 0;\n for (int i = 0; i < arr.length; i++) {\n if(arr[i] == 0) {\n if(min > Math.abs(x - i)) {\n min = x - i;\n ans = i;\n }\n }\n }\n System.out.println(ans);\n }\n}", "Main" ]
import java.util.Scanner; import java.util.TreeSet; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int n = sc.nextInt(); TreeSet<Integer> p = new TreeSet<>(); for (int i = 0; i < n; i++) { p.add(sc.nextInt()); } int[] arr = new int[102]; for (int i : p) { arr[i] = 1; } int min = Integer.MAX_VALUE; int ans = 0; for (int i = 0; i < arr.length; i++) { if(arr[i] == 0) { if(min > Math.abs(x - i)) { min = x - i; ans = i; } } } System.out.println(ans); } }
[ 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, 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, 40, 17, 11, 1, 41, 13, 17, 2, 13, 40, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 40, 17, 2, 2, 13, 17, 2, 13, 40, 17, 1, 0, 13, 17, 30, 30, 41, 13, 2, 13, 2, 13, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 18, 13, 13, 13, 30, 0, 13, 17, 3, 14, 13, 30, 0, 13, 13, 4, 18, 13, 13, 4, 18, 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, 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, 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 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 206, 17 ], [ 206, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 20, 24 ], [ 24, 25 ], [ 24, 26 ], [ 20, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 20, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 20, 37 ], [ 37, 38 ], [ 37, 39 ], [ 20, 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 ], [ 20, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 20, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 65, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 65, 74 ], [ 74, 75 ], [ 75, 76 ], [ 65, 77 ], [ 78, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 79, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 85, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 79, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 79, 97 ], [ 98, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 101, 103 ], [ 103, 104 ], [ 103, 105 ], [ 98, 106 ], [ 106, 107 ], [ 106, 108 ], [ 98, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 109, 114 ], [ 114, 115 ], [ 114, 116 ], [ 109, 117 ], [ 117, 118 ], [ 118, 119 ], [ 109, 120 ], [ 121, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 123, 127 ], [ 122, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 128, 132 ], [ 98, 133 ], [ 133, 134 ], [ 133, 135 ], [ 135, 136 ], [ 136, 137 ], [ 136, 138 ], [ 20, 139 ], [ 139, 140 ], [ 140, 141 ], [ 139, 142 ], [ 20, 143 ], [ 143, 144 ], [ 144, 145 ], [ 18, 146 ], [ 146, 147 ], [ 206, 148 ], [ 148, 149 ], [ 148, 150 ], [ 150, 151 ], [ 148, 152 ], [ 152, 153 ], [ 148, 154 ], [ 154, 155 ], [ 154, 156 ], [ 156, 157 ], [ 157, 158 ], [ 157, 159 ], [ 148, 160 ], [ 160, 161 ], [ 160, 162 ], [ 162, 163 ], [ 163, 164 ], [ 164, 165 ], [ 165, 166 ], [ 165, 167 ], [ 164, 168 ], [ 168, 169 ], [ 169, 170 ], [ 170, 171 ], [ 163, 172 ], [ 172, 173 ], [ 173, 174 ], [ 174, 175 ], [ 174, 176 ], [ 176, 177 ], [ 177, 178 ], [ 173, 179 ], [ 179, 180 ], [ 180, 181 ], [ 180, 182 ], [ 162, 183 ], [ 183, 184 ], [ 184, 185 ], [ 185, 186 ], [ 148, 187 ], [ 187, 188 ], [ 187, 189 ], [ 189, 190 ], [ 190, 191 ], [ 191, 192 ], [ 192, 193 ], [ 191, 194 ], [ 194, 195 ], [ 148, 196 ], [ 196, 197 ], [ 196, 198 ], [ 198, 199 ], [ 199, 200 ], [ 200, 201 ], [ 201, 202 ], [ 200, 203 ], [ 203, 204 ], [ 0, 205 ], [ 205, 206 ], [ 205, 207 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\tMyScanner sc = new MyScanner();\n\t\tPrintWriter out = new PrintWriter(System.out);\n\t\tint X = sc.nextInt();\n\t\tint N = sc.nextInt();\n\t\tint[] vals = new int[N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tvals[i] = sc.nextInt();\n\t\t}\n\t\tint ans = -1000;\n\t\tfor (int i = 0; ans == -1000; i++) {\n\t\t\tfor (int j = -1; j <= 1 && ans == -1000; j+=2) {\n\t\t\t\tint val = X + i * j;\n\t\t\t\tboolean can = true;\n\t\t\t\tfor (int k = 0; k < N; k++) {\n\t\t\t\t\tif (vals[k] == val) {\n\t\t\t\t\t\tcan = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (can) {\n\t\t\t\t\tans = val;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tout.println(ans);\n\t\t\n\t\tout.flush();\n\t}\n\t\n\tstatic class MyScanner {\n\t\tprivate BufferedReader br;\n\t\tprivate StringTokenizer tokenizer;\n\t\t\n\t\tpublic MyScanner() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\t\t\n\t\tpublic String next() {\n\t\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}\n\t\t\n\t\tpublic int nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tpublic long nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\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.io.PrintWriter;", "PrintWriter", "java.io", "import java.util.StringTokenizer;", "StringTokenizer", "java.util", "public class Main {\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\tMyScanner sc = new MyScanner();\n\t\tPrintWriter out = new PrintWriter(System.out);\n\t\tint X = sc.nextInt();\n\t\tint N = sc.nextInt();\n\t\tint[] vals = new int[N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tvals[i] = sc.nextInt();\n\t\t}\n\t\tint ans = -1000;\n\t\tfor (int i = 0; ans == -1000; i++) {\n\t\t\tfor (int j = -1; j <= 1 && ans == -1000; j+=2) {\n\t\t\t\tint val = X + i * j;\n\t\t\t\tboolean can = true;\n\t\t\t\tfor (int k = 0; k < N; k++) {\n\t\t\t\t\tif (vals[k] == val) {\n\t\t\t\t\t\tcan = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (can) {\n\t\t\t\t\tans = val;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tout.println(ans);\n\t\t\n\t\tout.flush();\n\t}\n\t\n\tstatic class MyScanner {\n\t\tprivate BufferedReader br;\n\t\tprivate StringTokenizer tokenizer;\n\t\t\n\t\tpublic MyScanner() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\t\t\n\t\tpublic String next() {\n\t\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}\n\t\t\n\t\tpublic int nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tpublic long nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args) throws IOException {\n\t\tMyScanner sc = new MyScanner();\n\t\tPrintWriter out = new PrintWriter(System.out);\n\t\tint X = sc.nextInt();\n\t\tint N = sc.nextInt();\n\t\tint[] vals = new int[N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tvals[i] = sc.nextInt();\n\t\t}\n\t\tint ans = -1000;\n\t\tfor (int i = 0; ans == -1000; i++) {\n\t\t\tfor (int j = -1; j <= 1 && ans == -1000; j+=2) {\n\t\t\t\tint val = X + i * j;\n\t\t\t\tboolean can = true;\n\t\t\t\tfor (int k = 0; k < N; k++) {\n\t\t\t\t\tif (vals[k] == val) {\n\t\t\t\t\t\tcan = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (can) {\n\t\t\t\t\tans = val;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tout.println(ans);\n\t\t\n\t\tout.flush();\n\t}", "main", "{\n\t\tMyScanner sc = new MyScanner();\n\t\tPrintWriter out = new PrintWriter(System.out);\n\t\tint X = sc.nextInt();\n\t\tint N = sc.nextInt();\n\t\tint[] vals = new int[N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tvals[i] = sc.nextInt();\n\t\t}\n\t\tint ans = -1000;\n\t\tfor (int i = 0; ans == -1000; i++) {\n\t\t\tfor (int j = -1; j <= 1 && ans == -1000; j+=2) {\n\t\t\t\tint val = X + i * j;\n\t\t\t\tboolean can = true;\n\t\t\t\tfor (int k = 0; k < N; k++) {\n\t\t\t\t\tif (vals[k] == val) {\n\t\t\t\t\t\tcan = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (can) {\n\t\t\t\t\tans = val;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tout.println(ans);\n\t\t\n\t\tout.flush();\n\t}", "MyScanner sc = new MyScanner();", "sc", "new MyScanner()", "PrintWriter out = new PrintWriter(System.out);", "out", "new PrintWriter(System.out)", "int X = sc.nextInt();", "X", "sc.nextInt()", "sc.nextInt", "sc", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int[] vals = new int[N];", "vals", "new int[N]", "N", "for (int i = 0; i < N; i++) {\n\t\t\tvals[i] = sc.nextInt();\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < N", "i", "N", "i++", "i++", "i", "{\n\t\t\tvals[i] = sc.nextInt();\n\t\t}", "{\n\t\t\tvals[i] = sc.nextInt();\n\t\t}", "vals[i] = sc.nextInt()", "vals[i]", "vals", "i", "sc.nextInt()", "sc.nextInt", "sc", "int ans = -1000;", "ans", "-1000", "1000", "for (int i = 0; ans == -1000; i++) {\n\t\t\tfor (int j = -1; j <= 1 && ans == -1000; j+=2) {\n\t\t\t\tint val = X + i * j;\n\t\t\t\tboolean can = true;\n\t\t\t\tfor (int k = 0; k < N; k++) {\n\t\t\t\t\tif (vals[k] == val) {\n\t\t\t\t\t\tcan = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (can) {\n\t\t\t\t\tans = val;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "ans == -1000", "ans", "-1000", "1000", "i++", "i++", "i", "{\n\t\t\tfor (int j = -1; j <= 1 && ans == -1000; j+=2) {\n\t\t\t\tint val = X + i * j;\n\t\t\t\tboolean can = true;\n\t\t\t\tfor (int k = 0; k < N; k++) {\n\t\t\t\t\tif (vals[k] == val) {\n\t\t\t\t\t\tcan = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (can) {\n\t\t\t\t\tans = val;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tfor (int j = -1; j <= 1 && ans == -1000; j+=2) {\n\t\t\t\tint val = X + i * j;\n\t\t\t\tboolean can = true;\n\t\t\t\tfor (int k = 0; k < N; k++) {\n\t\t\t\t\tif (vals[k] == val) {\n\t\t\t\t\t\tcan = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (can) {\n\t\t\t\t\tans = val;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "for (int j = -1; j <= 1 && ans == -1000; j+=2) {\n\t\t\t\tint val = X + i * j;\n\t\t\t\tboolean can = true;\n\t\t\t\tfor (int k = 0; k < N; k++) {\n\t\t\t\t\tif (vals[k] == val) {\n\t\t\t\t\t\tcan = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (can) {\n\t\t\t\t\tans = val;\n\t\t\t\t}\n\t\t\t}", "int j = -1;", "int j = -1;", "j", "-1", "1", "j <= 1 && ans == -1000", "j <= 1", "j", "1", "ans == -1000", "ans", "-1000", "1000", "j+=2", "j+=2", "j", "2", "{\n\t\t\t\tint val = X + i * j;\n\t\t\t\tboolean can = true;\n\t\t\t\tfor (int k = 0; k < N; k++) {\n\t\t\t\t\tif (vals[k] == val) {\n\t\t\t\t\t\tcan = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (can) {\n\t\t\t\t\tans = val;\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tint val = X + i * j;\n\t\t\t\tboolean can = true;\n\t\t\t\tfor (int k = 0; k < N; k++) {\n\t\t\t\t\tif (vals[k] == val) {\n\t\t\t\t\t\tcan = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (can) {\n\t\t\t\t\tans = val;\n\t\t\t\t}\n\t\t\t}", "int val = X + i * j;", "val", "X + i * j", "X", "i * j", "i", "j", "boolean can = true;", "can", "true", "for (int k = 0; k < N; k++) {\n\t\t\t\t\tif (vals[k] == val) {\n\t\t\t\t\t\tcan = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}", "int k = 0;", "int k = 0;", "k", "0", "k < N", "k", "N", "k++", "k++", "k", "{\n\t\t\t\t\tif (vals[k] == val) {\n\t\t\t\t\t\tcan = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tif (vals[k] == val) {\n\t\t\t\t\t\tcan = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}", "if (vals[k] == val) {\n\t\t\t\t\t\tcan = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}", "vals[k] == val", "vals[k]", "vals", "k", "val", "{\n\t\t\t\t\t\tcan = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}", "can = false", "can", "false", "break;", "if (can) {\n\t\t\t\t\tans = val;\n\t\t\t\t}", "can", "{\n\t\t\t\t\tans = val;\n\t\t\t\t}", "ans = val", "ans", "val", "out.println(ans)", "out.println", "out", "ans", "out.flush()", "out.flush", "out", "String[] args", "args", "static class MyScanner {\n\t\tprivate BufferedReader br;\n\t\tprivate StringTokenizer tokenizer;\n\t\t\n\t\tpublic MyScanner() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\t\t\n\t\tpublic String next() {\n\t\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}\n\t\t\n\t\tpublic int nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tpublic long nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t}", "MyScanner", "private BufferedReader br;", "br", "private StringTokenizer tokenizer;", "tokenizer", "public MyScanner() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}", "MyScanner", "{\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}", "br = new BufferedReader(new InputStreamReader(System.in))", "br", "new BufferedReader(new InputStreamReader(System.in))", "public String next() {\n\t\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}", "next", "{\n\t\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}", "while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}", "tokenizer == null || !tokenizer.hasMoreTokens()", "tokenizer == null", "tokenizer", "null", "!tokenizer.hasMoreTokens()", "tokenizer.hasMoreTokens()", "tokenizer.hasMoreTokens", "tokenizer", "{\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}", "try {\n\t\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}", "catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}", "IOException e", "{\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}", "throw new RuntimeException(e);", "new RuntimeException(e)", "{\n\t\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t\t}", "tokenizer = new StringTokenizer(br.readLine())", "tokenizer", "new StringTokenizer(br.readLine())", "return tokenizer.nextToken();", "tokenizer.nextToken()", "tokenizer.nextToken", "tokenizer", "public int nextInt() {\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 long nextLong() {\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 class Main {\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\tMyScanner sc = new MyScanner();\n\t\tPrintWriter out = new PrintWriter(System.out);\n\t\tint X = sc.nextInt();\n\t\tint N = sc.nextInt();\n\t\tint[] vals = new int[N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tvals[i] = sc.nextInt();\n\t\t}\n\t\tint ans = -1000;\n\t\tfor (int i = 0; ans == -1000; i++) {\n\t\t\tfor (int j = -1; j <= 1 && ans == -1000; j+=2) {\n\t\t\t\tint val = X + i * j;\n\t\t\t\tboolean can = true;\n\t\t\t\tfor (int k = 0; k < N; k++) {\n\t\t\t\t\tif (vals[k] == val) {\n\t\t\t\t\t\tcan = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (can) {\n\t\t\t\t\tans = val;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tout.println(ans);\n\t\t\n\t\tout.flush();\n\t}\n\t\n\tstatic class MyScanner {\n\t\tprivate BufferedReader br;\n\t\tprivate StringTokenizer tokenizer;\n\t\t\n\t\tpublic MyScanner() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\t\t\n\t\tpublic String next() {\n\t\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}\n\t\t\n\t\tpublic int nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tpublic long nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t}\n}", "public class Main {\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\tMyScanner sc = new MyScanner();\n\t\tPrintWriter out = new PrintWriter(System.out);\n\t\tint X = sc.nextInt();\n\t\tint N = sc.nextInt();\n\t\tint[] vals = new int[N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tvals[i] = sc.nextInt();\n\t\t}\n\t\tint ans = -1000;\n\t\tfor (int i = 0; ans == -1000; i++) {\n\t\t\tfor (int j = -1; j <= 1 && ans == -1000; j+=2) {\n\t\t\t\tint val = X + i * j;\n\t\t\t\tboolean can = true;\n\t\t\t\tfor (int k = 0; k < N; k++) {\n\t\t\t\t\tif (vals[k] == val) {\n\t\t\t\t\t\tcan = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (can) {\n\t\t\t\t\tans = val;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tout.println(ans);\n\t\t\n\t\tout.flush();\n\t}\n\t\n\tstatic class MyScanner {\n\t\tprivate BufferedReader br;\n\t\tprivate StringTokenizer tokenizer;\n\t\t\n\t\tpublic MyScanner() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\t\t\n\t\tpublic String next() {\n\t\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}\n\t\t\n\t\tpublic int nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tpublic long nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t}\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws IOException { MyScanner sc = new MyScanner(); PrintWriter out = new PrintWriter(System.out); int X = sc.nextInt(); int N = sc.nextInt(); int[] vals = new int[N]; for (int i = 0; i < N; i++) { vals[i] = sc.nextInt(); } int ans = -1000; for (int i = 0; ans == -1000; i++) { for (int j = -1; j <= 1 && ans == -1000; j+=2) { int val = X + i * j; boolean can = true; for (int k = 0; k < N; k++) { if (vals[k] == val) { can = false; break; } } if (can) { ans = val; } } } out.println(ans); out.flush(); } static class MyScanner { private BufferedReader br; private StringTokenizer tokenizer; public MyScanner() { br = new BufferedReader(new InputStreamReader(System.in)); } public String next() { while (tokenizer == null || !tokenizer.hasMoreTokens()) { try { tokenizer = new StringTokenizer(br.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return tokenizer.nextToken(); } public int nextInt() { return Integer.parseInt(next()); } public long nextLong() { return Long.parseLong(next()); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 41, 13, 17, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 14, 2, 13, 17, 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, 4, 18, 13, 13, 41, 13, 20, 2, 2, 18, 13, 2, 13, 17, 18, 13, 17, 17, 41, 13, 17, 11, 1, 41, 13, 2, 18, 13, 17, 17, 2, 13, 2, 18, 13, 2, 13, 17, 17, 1, 40, 13, 30, 30, 0, 18, 13, 13, 13, 40, 13, 41, 13, 4, 13, 13, 41, 13, 4, 13, 13, 4, 18, 13, 13, 41, 13, 20, 41, 13, 20, 28, 13, 13, 30, 30, 4, 18, 13, 4, 18, 13, 2, 13, 13, 4, 18, 13, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 18, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 18, 13, 13, 30, 0, 13, 18, 13, 13, 0, 13, 13, 4, 18, 18, 13, 13, 18, 13, 13, 30, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 20, 28, 13, 13, 30, 4, 18, 13, 13, 29, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 233, 8 ], [ 233, 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 ], [ 23, 24 ], [ 24, 25 ], [ 11, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 11, 31 ], [ 31, 32 ], [ 32, 33 ], [ 32, 34 ], [ 31, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 40, 45 ], [ 45, 46 ], [ 45, 47 ], [ 40, 48 ], [ 48, 49 ], [ 49, 50 ], [ 40, 51 ], [ 52, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 53, 57 ], [ 57, 58 ], [ 58, 59 ], [ 35, 60 ], [ 60, 61 ], [ 61, 62 ], [ 60, 63 ], [ 35, 64 ], [ 64, 65 ], [ 64, 66 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 71, 73 ], [ 68, 74 ], [ 74, 75 ], [ 74, 76 ], [ 67, 77 ], [ 35, 78 ], [ 78, 79 ], [ 78, 80 ], [ 35, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 85, 89 ], [ 81, 90 ], [ 90, 91 ], [ 90, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 95, 97 ], [ 92, 98 ], [ 81, 99 ], [ 99, 100 ], [ 100, 101 ], [ 81, 102 ], [ 103, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 104, 108 ], [ 103, 109 ], [ 109, 110 ], [ 35, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 113, 115 ], [ 35, 116 ], [ 116, 117 ], [ 116, 118 ], [ 118, 119 ], [ 118, 120 ], [ 35, 121 ], [ 121, 122 ], [ 122, 123 ], [ 121, 124 ], [ 35, 125 ], [ 125, 126 ], [ 125, 127 ], [ 35, 128 ], [ 128, 129 ], [ 128, 130 ], [ 35, 131 ], [ 131, 132 ], [ 131, 133 ], [ 131, 134 ], [ 135, 135 ], [ 135, 136 ], [ 136, 137 ], [ 137, 138 ], [ 136, 139 ], [ 139, 140 ], [ 140, 141 ], [ 139, 142 ], [ 142, 143 ], [ 142, 144 ], [ 135, 145 ], [ 145, 146 ], [ 146, 147 ], [ 145, 148 ], [ 35, 149 ], [ 149, 150 ], [ 149, 151 ], [ 151, 152 ], [ 152, 153 ], [ 35, 154 ], [ 154, 155 ], [ 154, 156 ], [ 156, 157 ], [ 157, 158 ], [ 35, 159 ], [ 159, 160 ], [ 159, 161 ], [ 161, 162 ], [ 161, 163 ], [ 35, 164 ], [ 164, 165 ], [ 164, 166 ], [ 35, 167 ], [ 167, 168 ], [ 168, 169 ], [ 169, 170 ], [ 169, 171 ], [ 167, 172 ], [ 172, 173 ], [ 172, 174 ], [ 174, 175 ], [ 174, 176 ], [ 167, 177 ], [ 177, 178 ], [ 178, 179 ], [ 167, 180 ], [ 181, 181 ], [ 181, 182 ], [ 182, 183 ], [ 183, 184 ], [ 183, 185 ], [ 185, 186 ], [ 185, 187 ], [ 182, 188 ], [ 188, 189 ], [ 189, 190 ], [ 189, 191 ], [ 191, 192 ], [ 191, 193 ], [ 188, 194 ], [ 194, 195 ], [ 194, 196 ], [ 35, 197 ], [ 197, 198 ], [ 198, 199 ], [ 199, 200 ], [ 199, 201 ], [ 197, 202 ], [ 202, 203 ], [ 202, 204 ], [ 31, 205 ], [ 205, 206 ], [ 206, 207 ], [ 207, 208 ], [ 208, 209 ], [ 208, 210 ], [ 206, 211 ], [ 9, 212 ], [ 212, 213 ], [ 233, 214 ], [ 214, 215 ], [ 214, 216 ], [ 216, 217 ], [ 217, 218 ], [ 217, 219 ], [ 216, 220 ], [ 220, 221 ], [ 220, 222 ], [ 220, 223 ], [ 223, 224 ], [ 224, 225 ], [ 225, 226 ], [ 224, 227 ], [ 216, 228 ], [ 228, 229 ], [ 214, 230 ], [ 230, 231 ], [ 0, 232 ], [ 232, 233 ], [ 232, 234 ] ]
[ "import java.util.Arrays;\nimport java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int X = 0;\n int N = 0;\n X = scanner.nextInt();\n N = scanner.nextInt();\n if (N != 0) {\n int[] suuretu = new int[N];\n for (int i = 0; i < N; i++) {\n suuretu[i] = scanner.nextInt();\n }\n Arrays.sort(suuretu);\n// System.out.println(\" \" +suuretu[N - 1] + \" \" + suuretu[0]);\n\n int[] junban = new int[suuretu[N - 1] - suuretu[0] + 3];\n int index = 0;\n for (int i = suuretu[0] - 1; i <= suuretu[N - 1] + 1; i++) {\n junban[index] = i;\n// System.out.println(\" \" + i);\n index++;\n }\n\n List<Integer> suuretuList = toList(suuretu);\n List<Integer> junbanList = toList(junban);\n junbanList.removeAll(suuretuList);\n List<Integer> sabunList = new ArrayList<>();\n List<Integer> sabunAtaiList = new ArrayList<>();\n for (Integer info : junbanList) {\n// System.out.println(info);\n sabunList.add(Math.abs(info - X));\n sabunAtaiList.add(info);\n }\n Object[] sabun = sabunList.toArray();\n Object[] sabunAtai = sabunAtaiList.toArray();\n\n\n// if (sabunList.size() > 0) {\n int intMin = (int) sabun[0];\n int minIndex = 0;\n for (int i = 1; i < sabun.length; i++) {\n\n if (intMin > (int) sabun[i]) {\n intMin = (int) sabun[i];\n minIndex = i;\n }\n }\n System.out.println(sabunAtai[minIndex]);\n// } else {\n//\n// System.out.println(X);\n// }\n\n } else {\n\n System.out.println(X);\n }\n\n\n }\n\n public static ArrayList<Integer> toList(int[] arr){\n // int[] -> ArrayList<Integer>\n ArrayList<Integer> list = new ArrayList<Integer>();\n for (int t : arr) list.add(t);\n return list;\n }\n}", "import java.util.Arrays;", "Arrays", "java.util", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int X = 0;\n int N = 0;\n X = scanner.nextInt();\n N = scanner.nextInt();\n if (N != 0) {\n int[] suuretu = new int[N];\n for (int i = 0; i < N; i++) {\n suuretu[i] = scanner.nextInt();\n }\n Arrays.sort(suuretu);\n// System.out.println(\" \" +suuretu[N - 1] + \" \" + suuretu[0]);\n\n int[] junban = new int[suuretu[N - 1] - suuretu[0] + 3];\n int index = 0;\n for (int i = suuretu[0] - 1; i <= suuretu[N - 1] + 1; i++) {\n junban[index] = i;\n// System.out.println(\" \" + i);\n index++;\n }\n\n List<Integer> suuretuList = toList(suuretu);\n List<Integer> junbanList = toList(junban);\n junbanList.removeAll(suuretuList);\n List<Integer> sabunList = new ArrayList<>();\n List<Integer> sabunAtaiList = new ArrayList<>();\n for (Integer info : junbanList) {\n// System.out.println(info);\n sabunList.add(Math.abs(info - X));\n sabunAtaiList.add(info);\n }\n Object[] sabun = sabunList.toArray();\n Object[] sabunAtai = sabunAtaiList.toArray();\n\n\n// if (sabunList.size() > 0) {\n int intMin = (int) sabun[0];\n int minIndex = 0;\n for (int i = 1; i < sabun.length; i++) {\n\n if (intMin > (int) sabun[i]) {\n intMin = (int) sabun[i];\n minIndex = i;\n }\n }\n System.out.println(sabunAtai[minIndex]);\n// } else {\n//\n// System.out.println(X);\n// }\n\n } else {\n\n System.out.println(X);\n }\n\n\n }\n\n public static ArrayList<Integer> toList(int[] arr){\n // int[] -> ArrayList<Integer>\n ArrayList<Integer> list = new ArrayList<Integer>();\n for (int t : arr) list.add(t);\n return list;\n }\n}", "Main", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int X = 0;\n int N = 0;\n X = scanner.nextInt();\n N = scanner.nextInt();\n if (N != 0) {\n int[] suuretu = new int[N];\n for (int i = 0; i < N; i++) {\n suuretu[i] = scanner.nextInt();\n }\n Arrays.sort(suuretu);\n// System.out.println(\" \" +suuretu[N - 1] + \" \" + suuretu[0]);\n\n int[] junban = new int[suuretu[N - 1] - suuretu[0] + 3];\n int index = 0;\n for (int i = suuretu[0] - 1; i <= suuretu[N - 1] + 1; i++) {\n junban[index] = i;\n// System.out.println(\" \" + i);\n index++;\n }\n\n List<Integer> suuretuList = toList(suuretu);\n List<Integer> junbanList = toList(junban);\n junbanList.removeAll(suuretuList);\n List<Integer> sabunList = new ArrayList<>();\n List<Integer> sabunAtaiList = new ArrayList<>();\n for (Integer info : junbanList) {\n// System.out.println(info);\n sabunList.add(Math.abs(info - X));\n sabunAtaiList.add(info);\n }\n Object[] sabun = sabunList.toArray();\n Object[] sabunAtai = sabunAtaiList.toArray();\n\n\n// if (sabunList.size() > 0) {\n int intMin = (int) sabun[0];\n int minIndex = 0;\n for (int i = 1; i < sabun.length; i++) {\n\n if (intMin > (int) sabun[i]) {\n intMin = (int) sabun[i];\n minIndex = i;\n }\n }\n System.out.println(sabunAtai[minIndex]);\n// } else {\n//\n// System.out.println(X);\n// }\n\n } else {\n\n System.out.println(X);\n }\n\n\n }", "main", "{\n Scanner scanner = new Scanner(System.in);\n int X = 0;\n int N = 0;\n X = scanner.nextInt();\n N = scanner.nextInt();\n if (N != 0) {\n int[] suuretu = new int[N];\n for (int i = 0; i < N; i++) {\n suuretu[i] = scanner.nextInt();\n }\n Arrays.sort(suuretu);\n// System.out.println(\" \" +suuretu[N - 1] + \" \" + suuretu[0]);\n\n int[] junban = new int[suuretu[N - 1] - suuretu[0] + 3];\n int index = 0;\n for (int i = suuretu[0] - 1; i <= suuretu[N - 1] + 1; i++) {\n junban[index] = i;\n// System.out.println(\" \" + i);\n index++;\n }\n\n List<Integer> suuretuList = toList(suuretu);\n List<Integer> junbanList = toList(junban);\n junbanList.removeAll(suuretuList);\n List<Integer> sabunList = new ArrayList<>();\n List<Integer> sabunAtaiList = new ArrayList<>();\n for (Integer info : junbanList) {\n// System.out.println(info);\n sabunList.add(Math.abs(info - X));\n sabunAtaiList.add(info);\n }\n Object[] sabun = sabunList.toArray();\n Object[] sabunAtai = sabunAtaiList.toArray();\n\n\n// if (sabunList.size() > 0) {\n int intMin = (int) sabun[0];\n int minIndex = 0;\n for (int i = 1; i < sabun.length; i++) {\n\n if (intMin > (int) sabun[i]) {\n intMin = (int) sabun[i];\n minIndex = i;\n }\n }\n System.out.println(sabunAtai[minIndex]);\n// } else {\n//\n// System.out.println(X);\n// }\n\n } else {\n\n System.out.println(X);\n }\n\n\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int X = 0;", "X", "0", "int N = 0;", "N", "0", "X = scanner.nextInt()", "X", "scanner.nextInt()", "scanner.nextInt", "scanner", "N = scanner.nextInt()", "N", "scanner.nextInt()", "scanner.nextInt", "scanner", "if (N != 0) {\n int[] suuretu = new int[N];\n for (int i = 0; i < N; i++) {\n suuretu[i] = scanner.nextInt();\n }\n Arrays.sort(suuretu);\n// System.out.println(\" \" +suuretu[N - 1] + \" \" + suuretu[0]);\n\n int[] junban = new int[suuretu[N - 1] - suuretu[0] + 3];\n int index = 0;\n for (int i = suuretu[0] - 1; i <= suuretu[N - 1] + 1; i++) {\n junban[index] = i;\n// System.out.println(\" \" + i);\n index++;\n }\n\n List<Integer> suuretuList = toList(suuretu);\n List<Integer> junbanList = toList(junban);\n junbanList.removeAll(suuretuList);\n List<Integer> sabunList = new ArrayList<>();\n List<Integer> sabunAtaiList = new ArrayList<>();\n for (Integer info : junbanList) {\n// System.out.println(info);\n sabunList.add(Math.abs(info - X));\n sabunAtaiList.add(info);\n }\n Object[] sabun = sabunList.toArray();\n Object[] sabunAtai = sabunAtaiList.toArray();\n\n\n// if (sabunList.size() > 0) {\n int intMin = (int) sabun[0];\n int minIndex = 0;\n for (int i = 1; i < sabun.length; i++) {\n\n if (intMin > (int) sabun[i]) {\n intMin = (int) sabun[i];\n minIndex = i;\n }\n }\n System.out.println(sabunAtai[minIndex]);\n// } else {\n//\n// System.out.println(X);\n// }\n\n } else {\n\n System.out.println(X);\n }", "N != 0", "N", "0", "{\n int[] suuretu = new int[N];\n for (int i = 0; i < N; i++) {\n suuretu[i] = scanner.nextInt();\n }\n Arrays.sort(suuretu);\n// System.out.println(\" \" +suuretu[N - 1] + \" \" + suuretu[0]);\n\n int[] junban = new int[suuretu[N - 1] - suuretu[0] + 3];\n int index = 0;\n for (int i = suuretu[0] - 1; i <= suuretu[N - 1] + 1; i++) {\n junban[index] = i;\n// System.out.println(\" \" + i);\n index++;\n }\n\n List<Integer> suuretuList = toList(suuretu);\n List<Integer> junbanList = toList(junban);\n junbanList.removeAll(suuretuList);\n List<Integer> sabunList = new ArrayList<>();\n List<Integer> sabunAtaiList = new ArrayList<>();\n for (Integer info : junbanList) {\n// System.out.println(info);\n sabunList.add(Math.abs(info - X));\n sabunAtaiList.add(info);\n }\n Object[] sabun = sabunList.toArray();\n Object[] sabunAtai = sabunAtaiList.toArray();\n\n\n// if (sabunList.size() > 0) {\n int intMin = (int) sabun[0];\n int minIndex = 0;\n for (int i = 1; i < sabun.length; i++) {\n\n if (intMin > (int) sabun[i]) {\n intMin = (int) sabun[i];\n minIndex = i;\n }\n }\n System.out.println(sabunAtai[minIndex]);\n// } else {\n//\n// System.out.println(X);\n// }\n\n }", "int[] suuretu = new int[N];", "suuretu", "new int[N]", "N", "for (int i = 0; i < N; i++) {\n suuretu[i] = scanner.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < N", "i", "N", "i++", "i++", "i", "{\n suuretu[i] = scanner.nextInt();\n }", "{\n suuretu[i] = scanner.nextInt();\n }", "suuretu[i] = scanner.nextInt()", "suuretu[i]", "suuretu", "i", "scanner.nextInt()", "scanner.nextInt", "scanner", "Arrays.sort(suuretu)", "Arrays.sort", "Arrays", "suuretu", "int[] junban = new int[suuretu[N - 1] - suuretu[0] + 3];", "junban", "new int[suuretu[N - 1] - suuretu[0] + 3]", "suuretu[N - 1] - suuretu[0] + 3", "suuretu[N - 1] - suuretu[0]", "suuretu[N - 1]", "suuretu", "N - 1", "N", "1", "suuretu[0]", "suuretu", "0", "3", "int index = 0;", "index", "0", "for (int i = suuretu[0] - 1; i <= suuretu[N - 1] + 1; i++) {\n junban[index] = i;\n// System.out.println(\" \" + i);\n index++;\n }", "int i = suuretu[0] - 1;", "int i = suuretu[0] - 1;", "i", "suuretu[0] - 1", "suuretu[0]", "suuretu", "0", "1", "i <= suuretu[N - 1] + 1", "i", "suuretu[N - 1] + 1", "suuretu[N - 1]", "suuretu", "N - 1", "N", "1", "1", "i++", "i++", "i", "{\n junban[index] = i;\n// System.out.println(\" \" + i);\n index++;\n }", "{\n junban[index] = i;\n// System.out.println(\" \" + i);\n index++;\n }", "junban[index] = i", "junban[index]", "junban", "index", "i", "index++", "index", "List<Integer> suuretuList = toList(suuretu);", "suuretuList", "toList(suuretu)", "toList", "suuretu", "List<Integer> junbanList = toList(junban);", "junbanList", "toList(junban)", "toList", "junban", "junbanList.removeAll(suuretuList)", "junbanList.removeAll", "junbanList", "suuretuList", "List<Integer> sabunList = new ArrayList<>();", "sabunList", "new ArrayList<>()", "List<Integer> sabunAtaiList = new ArrayList<>();", "sabunAtaiList", "new ArrayList<>()", "for (Integer info : junbanList) {\n// System.out.println(info);\n sabunList.add(Math.abs(info - X));\n sabunAtaiList.add(info);\n }", "Integer info", "junbanList", "{\n// System.out.println(info);\n sabunList.add(Math.abs(info - X));\n sabunAtaiList.add(info);\n }", "{\n// System.out.println(info);\n sabunList.add(Math.abs(info - X));\n sabunAtaiList.add(info);\n }", "sabunList.add(Math.abs(info - X))", "sabunList.add", "sabunList", "Math.abs(info - X)", "Math.abs", "Math", "info - X", "info", "X", "sabunAtaiList.add(info)", "sabunAtaiList.add", "sabunAtaiList", "info", "Object[] sabun = sabunList.toArray();", "sabun", "sabunList.toArray()", "sabunList.toArray", "sabunList", "Object[] sabunAtai = sabunAtaiList.toArray();", "sabunAtai", "sabunAtaiList.toArray()", "sabunAtaiList.toArray", "sabunAtaiList", "int intMin = (int) sabun[0];", "intMin", "(int) sabun[0]", "sabun", "0", "int minIndex = 0;", "minIndex", "0", "for (int i = 1; i < sabun.length; i++) {\n\n if (intMin > (int) sabun[i]) {\n intMin = (int) sabun[i];\n minIndex = i;\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i < sabun.length", "i", "sabun.length", "sabun", "sabun.length", "i++", "i++", "i", "{\n\n if (intMin > (int) sabun[i]) {\n intMin = (int) sabun[i];\n minIndex = i;\n }\n }", "{\n\n if (intMin > (int) sabun[i]) {\n intMin = (int) sabun[i];\n minIndex = i;\n }\n }", "if (intMin > (int) sabun[i]) {\n intMin = (int) sabun[i];\n minIndex = i;\n }", "intMin > (int) sabun[i]", "intMin", "(int) sabun[i]", "sabun", "i", "{\n intMin = (int) sabun[i];\n minIndex = i;\n }", "intMin = (int) sabun[i]", "intMin", "(int) sabun[i]", "sabun", "i", "minIndex = i", "minIndex", "i", "System.out.println(sabunAtai[minIndex])", "System.out.println", "System.out", "System", "System.out", "sabunAtai[minIndex]", "sabunAtai", "minIndex", "{\n\n System.out.println(X);\n }", "System.out.println(X)", "System.out.println", "System.out", "System", "System.out", "X", "String[] args", "args", "public static ArrayList<Integer> toList(int[] arr){\n // int[] -> ArrayList<Integer>\n ArrayList<Integer> list = new ArrayList<Integer>();\n for (int t : arr) list.add(t);\n return list;\n }", "toList", "{\n // int[] -> ArrayList<Integer>\n ArrayList<Integer> list = new ArrayList<Integer>();\n for (int t : arr) list.add(t);\n return list;\n }", "ArrayList<Integer> list = new ArrayList<Integer>();", "list", "new ArrayList<Integer>()", "for (int t : arr) list.add(t);", "int t", "arr", "list.add(t);", "list.add(t)", "list.add", "list", "t", "return list;", "list", "int[] arr", "arr", "public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int X = 0;\n int N = 0;\n X = scanner.nextInt();\n N = scanner.nextInt();\n if (N != 0) {\n int[] suuretu = new int[N];\n for (int i = 0; i < N; i++) {\n suuretu[i] = scanner.nextInt();\n }\n Arrays.sort(suuretu);\n// System.out.println(\" \" +suuretu[N - 1] + \" \" + suuretu[0]);\n\n int[] junban = new int[suuretu[N - 1] - suuretu[0] + 3];\n int index = 0;\n for (int i = suuretu[0] - 1; i <= suuretu[N - 1] + 1; i++) {\n junban[index] = i;\n// System.out.println(\" \" + i);\n index++;\n }\n\n List<Integer> suuretuList = toList(suuretu);\n List<Integer> junbanList = toList(junban);\n junbanList.removeAll(suuretuList);\n List<Integer> sabunList = new ArrayList<>();\n List<Integer> sabunAtaiList = new ArrayList<>();\n for (Integer info : junbanList) {\n// System.out.println(info);\n sabunList.add(Math.abs(info - X));\n sabunAtaiList.add(info);\n }\n Object[] sabun = sabunList.toArray();\n Object[] sabunAtai = sabunAtaiList.toArray();\n\n\n// if (sabunList.size() > 0) {\n int intMin = (int) sabun[0];\n int minIndex = 0;\n for (int i = 1; i < sabun.length; i++) {\n\n if (intMin > (int) sabun[i]) {\n intMin = (int) sabun[i];\n minIndex = i;\n }\n }\n System.out.println(sabunAtai[minIndex]);\n// } else {\n//\n// System.out.println(X);\n// }\n\n } else {\n\n System.out.println(X);\n }\n\n\n }\n\n public static ArrayList<Integer> toList(int[] arr){\n // int[] -> ArrayList<Integer>\n ArrayList<Integer> list = new ArrayList<Integer>();\n for (int t : arr) list.add(t);\n return list;\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int X = 0;\n int N = 0;\n X = scanner.nextInt();\n N = scanner.nextInt();\n if (N != 0) {\n int[] suuretu = new int[N];\n for (int i = 0; i < N; i++) {\n suuretu[i] = scanner.nextInt();\n }\n Arrays.sort(suuretu);\n// System.out.println(\" \" +suuretu[N - 1] + \" \" + suuretu[0]);\n\n int[] junban = new int[suuretu[N - 1] - suuretu[0] + 3];\n int index = 0;\n for (int i = suuretu[0] - 1; i <= suuretu[N - 1] + 1; i++) {\n junban[index] = i;\n// System.out.println(\" \" + i);\n index++;\n }\n\n List<Integer> suuretuList = toList(suuretu);\n List<Integer> junbanList = toList(junban);\n junbanList.removeAll(suuretuList);\n List<Integer> sabunList = new ArrayList<>();\n List<Integer> sabunAtaiList = new ArrayList<>();\n for (Integer info : junbanList) {\n// System.out.println(info);\n sabunList.add(Math.abs(info - X));\n sabunAtaiList.add(info);\n }\n Object[] sabun = sabunList.toArray();\n Object[] sabunAtai = sabunAtaiList.toArray();\n\n\n// if (sabunList.size() > 0) {\n int intMin = (int) sabun[0];\n int minIndex = 0;\n for (int i = 1; i < sabun.length; i++) {\n\n if (intMin > (int) sabun[i]) {\n intMin = (int) sabun[i];\n minIndex = i;\n }\n }\n System.out.println(sabunAtai[minIndex]);\n// } else {\n//\n// System.out.println(X);\n// }\n\n } else {\n\n System.out.println(X);\n }\n\n\n }\n\n public static ArrayList<Integer> toList(int[] arr){\n // int[] -> ArrayList<Integer>\n ArrayList<Integer> list = new ArrayList<Integer>();\n for (int t : arr) list.add(t);\n return list;\n }\n}", "Main" ]
import java.util.Arrays; import java.util.*; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int X = 0; int N = 0; X = scanner.nextInt(); N = scanner.nextInt(); if (N != 0) { int[] suuretu = new int[N]; for (int i = 0; i < N; i++) { suuretu[i] = scanner.nextInt(); } Arrays.sort(suuretu); // System.out.println(" " +suuretu[N - 1] + " " + suuretu[0]); int[] junban = new int[suuretu[N - 1] - suuretu[0] + 3]; int index = 0; for (int i = suuretu[0] - 1; i <= suuretu[N - 1] + 1; i++) { junban[index] = i; // System.out.println(" " + i); index++; } List<Integer> suuretuList = toList(suuretu); List<Integer> junbanList = toList(junban); junbanList.removeAll(suuretuList); List<Integer> sabunList = new ArrayList<>(); List<Integer> sabunAtaiList = new ArrayList<>(); for (Integer info : junbanList) { // System.out.println(info); sabunList.add(Math.abs(info - X)); sabunAtaiList.add(info); } Object[] sabun = sabunList.toArray(); Object[] sabunAtai = sabunAtaiList.toArray(); // if (sabunList.size() > 0) { int intMin = (int) sabun[0]; int minIndex = 0; for (int i = 1; i < sabun.length; i++) { if (intMin > (int) sabun[i]) { intMin = (int) sabun[i]; minIndex = i; } } System.out.println(sabunAtai[minIndex]); // } else { // // System.out.println(X); // } } else { System.out.println(X); } } public static ArrayList<Integer> toList(int[] arr){ // int[] -> ArrayList<Integer> ArrayList<Integer> list = new ArrayList<Integer>(); for (int t : arr) list.add(t); return list; } }
[ 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, 41, 13, 2, 13, 17, 41, 13, 17, 41, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 14, 2, 13, 18, 13, 13, 30, 0, 13, 17, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 30, 11, 1, 41, 13, 17, 2, 13, 2, 17, 13, 1, 40, 13, 30, 30, 41, 13, 2, 13, 13, 41, 13, 2, 13, 13, 41, 13, 17, 41, 13, 17, 14, 2, 2, 13, 13, 2, 13, 13, 30, 0, 13, 17, 0, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 18, 13, 13, 13, 30, 0, 13, 17, 14, 2, 18, 13, 13, 13, 30, 0, 13, 17, 14, 2, 13, 13, 30, 0, 13, 13, 3, 14, 2, 13, 13, 30, 0, 13, 13, 3, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 187, 5 ], [ 187, 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 ], [ 29, 31 ], [ 31, 32 ], [ 31, 33 ], [ 8, 34 ], [ 34, 35 ], [ 34, 36 ], [ 8, 37 ], [ 37, 38 ], [ 8, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 39, 44 ], [ 44, 45 ], [ 44, 46 ], [ 39, 47 ], [ 47, 48 ], [ 48, 49 ], [ 39, 50 ], [ 51, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 52, 56 ], [ 56, 57 ], [ 57, 58 ], [ 51, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 62, 64 ], [ 59, 65 ], [ 65, 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 ], [ 69, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 81, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 88, 90 ], [ 81, 91 ], [ 91, 92 ], [ 92, 93 ], [ 81, 94 ], [ 95, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 98, 100 ], [ 95, 101 ], [ 101, 102 ], [ 101, 103 ], [ 103, 104 ], [ 103, 105 ], [ 95, 106 ], [ 106, 107 ], [ 106, 108 ], [ 95, 109 ], [ 109, 110 ], [ 109, 111 ], [ 95, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 113, 117 ], [ 117, 118 ], [ 117, 119 ], [ 112, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 120, 124 ], [ 124, 125 ], [ 124, 126 ], [ 120, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 127, 132 ], [ 132, 133 ], [ 132, 134 ], [ 127, 135 ], [ 135, 136 ], [ 136, 137 ], [ 127, 138 ], [ 139, 139 ], [ 139, 140 ], [ 140, 141 ], [ 141, 142 ], [ 142, 143 ], [ 142, 144 ], [ 141, 145 ], [ 140, 146 ], [ 146, 147 ], [ 147, 148 ], [ 147, 149 ], [ 139, 150 ], [ 150, 151 ], [ 151, 152 ], [ 152, 153 ], [ 152, 154 ], [ 151, 155 ], [ 150, 156 ], [ 156, 157 ], [ 157, 158 ], [ 157, 159 ], [ 120, 160 ], [ 160, 161 ], [ 161, 162 ], [ 161, 163 ], [ 160, 164 ], [ 164, 165 ], [ 165, 166 ], [ 165, 167 ], [ 164, 168 ], [ 160, 169 ], [ 169, 170 ], [ 170, 171 ], [ 170, 172 ], [ 169, 173 ], [ 173, 174 ], [ 174, 175 ], [ 174, 176 ], [ 173, 177 ], [ 80, 178 ], [ 178, 179 ], [ 179, 180 ], [ 180, 181 ], [ 180, 182 ], [ 178, 183 ], [ 6, 184 ], [ 184, 185 ], [ 0, 186 ], [ 186, 187 ], [ 186, 188 ] ]
[ "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\n\t\tint X = scan.nextInt();\n\t\tint N = scan.nextInt();\n\t\tint[] box = new int[N];\n\t\tint con=0;\n\t\tint min = X+100;\n\t\tint judge=0;\n\t\tint nbox;\n\t\t\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tbox[i] = scan.nextInt();\n\t\t\tif(X==box[i]) {\n\t\t\t\tcon=1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(con==0) {\n\t\t\tSystem.out.print(X);\n\t\t}\n\t\telse {\n\t\t\tfor(int i=1;i<=200-X;i++) {\n\t\t\t\tint a = X-i;\n\t\t\t\tint b = X+i;\n\t\t\t\tint acount=0;\n\t\t\t\tint bcount=0;\n\t\t\t\tif(a<=min||b<=min) {\n\t\t\t\t\tacount=0;\n\t\t\t\t\tbcount=0;\n\t\t\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\t\t\tif(box[j] != a) {\n\t\t\t\t\t\t\tacount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(box[j] != b) {\n\t\t\t\t\t\t\tbcount += 1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(acount==N) {\n\t\t\t\t\t\tmin=a;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if(bcount==N) {\n\t\t\t\t\t\tmin=b;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.print(min);\n\t\t}\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\t\tScanner scan = new Scanner(System.in);\n\n\t\tint X = scan.nextInt();\n\t\tint N = scan.nextInt();\n\t\tint[] box = new int[N];\n\t\tint con=0;\n\t\tint min = X+100;\n\t\tint judge=0;\n\t\tint nbox;\n\t\t\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tbox[i] = scan.nextInt();\n\t\t\tif(X==box[i]) {\n\t\t\t\tcon=1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(con==0) {\n\t\t\tSystem.out.print(X);\n\t\t}\n\t\telse {\n\t\t\tfor(int i=1;i<=200-X;i++) {\n\t\t\t\tint a = X-i;\n\t\t\t\tint b = X+i;\n\t\t\t\tint acount=0;\n\t\t\t\tint bcount=0;\n\t\t\t\tif(a<=min||b<=min) {\n\t\t\t\t\tacount=0;\n\t\t\t\t\tbcount=0;\n\t\t\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\t\t\tif(box[j] != a) {\n\t\t\t\t\t\t\tacount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(box[j] != b) {\n\t\t\t\t\t\t\tbcount += 1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(acount==N) {\n\t\t\t\t\t\tmin=a;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if(bcount==N) {\n\t\t\t\t\t\tmin=b;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.print(min);\n\t\t}\n\n\n\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint X = scan.nextInt();\n\t\tint N = scan.nextInt();\n\t\tint[] box = new int[N];\n\t\tint con=0;\n\t\tint min = X+100;\n\t\tint judge=0;\n\t\tint nbox;\n\t\t\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tbox[i] = scan.nextInt();\n\t\t\tif(X==box[i]) {\n\t\t\t\tcon=1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(con==0) {\n\t\t\tSystem.out.print(X);\n\t\t}\n\t\telse {\n\t\t\tfor(int i=1;i<=200-X;i++) {\n\t\t\t\tint a = X-i;\n\t\t\t\tint b = X+i;\n\t\t\t\tint acount=0;\n\t\t\t\tint bcount=0;\n\t\t\t\tif(a<=min||b<=min) {\n\t\t\t\t\tacount=0;\n\t\t\t\t\tbcount=0;\n\t\t\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\t\t\tif(box[j] != a) {\n\t\t\t\t\t\t\tacount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(box[j] != b) {\n\t\t\t\t\t\t\tbcount += 1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(acount==N) {\n\t\t\t\t\t\tmin=a;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if(bcount==N) {\n\t\t\t\t\t\tmin=b;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.print(min);\n\t\t}\n\n\n\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint X = scan.nextInt();\n\t\tint N = scan.nextInt();\n\t\tint[] box = new int[N];\n\t\tint con=0;\n\t\tint min = X+100;\n\t\tint judge=0;\n\t\tint nbox;\n\t\t\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tbox[i] = scan.nextInt();\n\t\t\tif(X==box[i]) {\n\t\t\t\tcon=1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(con==0) {\n\t\t\tSystem.out.print(X);\n\t\t}\n\t\telse {\n\t\t\tfor(int i=1;i<=200-X;i++) {\n\t\t\t\tint a = X-i;\n\t\t\t\tint b = X+i;\n\t\t\t\tint acount=0;\n\t\t\t\tint bcount=0;\n\t\t\t\tif(a<=min||b<=min) {\n\t\t\t\t\tacount=0;\n\t\t\t\t\tbcount=0;\n\t\t\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\t\t\tif(box[j] != a) {\n\t\t\t\t\t\t\tacount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(box[j] != b) {\n\t\t\t\t\t\t\tbcount += 1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(acount==N) {\n\t\t\t\t\t\tmin=a;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if(bcount==N) {\n\t\t\t\t\t\tmin=b;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.print(min);\n\t\t}\n\n\n\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int X = scan.nextInt();", "X", "scan.nextInt()", "scan.nextInt", "scan", "int N = scan.nextInt();", "N", "scan.nextInt()", "scan.nextInt", "scan", "int[] box = new int[N];", "box", "new int[N]", "N", "int con=0;", "con", "0", "int min = X+100;", "min", "X+100", "X", "100", "int judge=0;", "judge", "0", "int nbox;", "nbox", "for(int i=0;i<N;i++) {\n\t\t\tbox[i] = scan.nextInt();\n\t\t\tif(X==box[i]) {\n\t\t\t\tcon=1;\n\t\t\t}\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<N", "i", "N", "i++", "i++", "i", "{\n\t\t\tbox[i] = scan.nextInt();\n\t\t\tif(X==box[i]) {\n\t\t\t\tcon=1;\n\t\t\t}\n\t\t}", "{\n\t\t\tbox[i] = scan.nextInt();\n\t\t\tif(X==box[i]) {\n\t\t\t\tcon=1;\n\t\t\t}\n\t\t}", "box[i] = scan.nextInt()", "box[i]", "box", "i", "scan.nextInt()", "scan.nextInt", "scan", "if(X==box[i]) {\n\t\t\t\tcon=1;\n\t\t\t}", "X==box[i]", "X", "box[i]", "box", "i", "{\n\t\t\t\tcon=1;\n\t\t\t}", "con=1", "con", "1", "if(con==0) {\n\t\t\tSystem.out.print(X);\n\t\t}\n\t\telse {\n\t\t\tfor(int i=1;i<=200-X;i++) {\n\t\t\t\tint a = X-i;\n\t\t\t\tint b = X+i;\n\t\t\t\tint acount=0;\n\t\t\t\tint bcount=0;\n\t\t\t\tif(a<=min||b<=min) {\n\t\t\t\t\tacount=0;\n\t\t\t\t\tbcount=0;\n\t\t\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\t\t\tif(box[j] != a) {\n\t\t\t\t\t\t\tacount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(box[j] != b) {\n\t\t\t\t\t\t\tbcount += 1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(acount==N) {\n\t\t\t\t\t\tmin=a;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if(bcount==N) {\n\t\t\t\t\t\tmin=b;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.print(min);\n\t\t}", "con==0", "con", "0", "{\n\t\t\tSystem.out.print(X);\n\t\t}", "System.out.print(X)", "System.out.print", "System.out", "System", "System.out", "X", "{\n\t\t\tfor(int i=1;i<=200-X;i++) {\n\t\t\t\tint a = X-i;\n\t\t\t\tint b = X+i;\n\t\t\t\tint acount=0;\n\t\t\t\tint bcount=0;\n\t\t\t\tif(a<=min||b<=min) {\n\t\t\t\t\tacount=0;\n\t\t\t\t\tbcount=0;\n\t\t\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\t\t\tif(box[j] != a) {\n\t\t\t\t\t\t\tacount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(box[j] != b) {\n\t\t\t\t\t\t\tbcount += 1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(acount==N) {\n\t\t\t\t\t\tmin=a;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if(bcount==N) {\n\t\t\t\t\t\tmin=b;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.print(min);\n\t\t}", "for(int i=1;i<=200-X;i++) {\n\t\t\t\tint a = X-i;\n\t\t\t\tint b = X+i;\n\t\t\t\tint acount=0;\n\t\t\t\tint bcount=0;\n\t\t\t\tif(a<=min||b<=min) {\n\t\t\t\t\tacount=0;\n\t\t\t\t\tbcount=0;\n\t\t\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\t\t\tif(box[j] != a) {\n\t\t\t\t\t\t\tacount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(box[j] != b) {\n\t\t\t\t\t\t\tbcount += 1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(acount==N) {\n\t\t\t\t\t\tmin=a;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if(bcount==N) {\n\t\t\t\t\t\tmin=b;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "int i=1;", "int i=1;", "i", "1", "i<=200-X", "i", "200-X", "200", "X", "i++", "i++", "i", "{\n\t\t\t\tint a = X-i;\n\t\t\t\tint b = X+i;\n\t\t\t\tint acount=0;\n\t\t\t\tint bcount=0;\n\t\t\t\tif(a<=min||b<=min) {\n\t\t\t\t\tacount=0;\n\t\t\t\t\tbcount=0;\n\t\t\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\t\t\tif(box[j] != a) {\n\t\t\t\t\t\t\tacount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(box[j] != b) {\n\t\t\t\t\t\t\tbcount += 1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(acount==N) {\n\t\t\t\t\t\tmin=a;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if(bcount==N) {\n\t\t\t\t\t\tmin=b;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "{\n\t\t\t\tint a = X-i;\n\t\t\t\tint b = X+i;\n\t\t\t\tint acount=0;\n\t\t\t\tint bcount=0;\n\t\t\t\tif(a<=min||b<=min) {\n\t\t\t\t\tacount=0;\n\t\t\t\t\tbcount=0;\n\t\t\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\t\t\tif(box[j] != a) {\n\t\t\t\t\t\t\tacount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(box[j] != b) {\n\t\t\t\t\t\t\tbcount += 1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(acount==N) {\n\t\t\t\t\t\tmin=a;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if(bcount==N) {\n\t\t\t\t\t\tmin=b;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "int a = X-i;", "a", "X-i", "X", "i", "int b = X+i;", "b", "X+i", "X", "i", "int acount=0;", "acount", "0", "int bcount=0;", "bcount", "0", "if(a<=min||b<=min) {\n\t\t\t\t\tacount=0;\n\t\t\t\t\tbcount=0;\n\t\t\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\t\t\tif(box[j] != a) {\n\t\t\t\t\t\t\tacount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(box[j] != b) {\n\t\t\t\t\t\t\tbcount += 1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(acount==N) {\n\t\t\t\t\t\tmin=a;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if(bcount==N) {\n\t\t\t\t\t\tmin=b;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}", "a<=min||b<=min", "a<=min", "a", "min", "b<=min", "b", "min", "{\n\t\t\t\t\tacount=0;\n\t\t\t\t\tbcount=0;\n\t\t\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\t\t\tif(box[j] != a) {\n\t\t\t\t\t\t\tacount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(box[j] != b) {\n\t\t\t\t\t\t\tbcount += 1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(acount==N) {\n\t\t\t\t\t\tmin=a;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if(bcount==N) {\n\t\t\t\t\t\tmin=b;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}", "acount=0", "acount", "0", "bcount=0", "bcount", "0", "for(int j=0;j<N;j++) {\n\t\t\t\t\t\tif(box[j] != a) {\n\t\t\t\t\t\t\tacount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(box[j] != b) {\n\t\t\t\t\t\t\tbcount += 1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int j=0;", "int j=0;", "j", "0", "j<N", "j", "N", "j++", "j++", "j", "{\n\t\t\t\t\t\tif(box[j] != a) {\n\t\t\t\t\t\t\tacount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(box[j] != b) {\n\t\t\t\t\t\t\tbcount += 1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif(box[j] != a) {\n\t\t\t\t\t\t\tacount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(box[j] != b) {\n\t\t\t\t\t\t\tbcount += 1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "if(box[j] != a) {\n\t\t\t\t\t\t\tacount += 1;\n\t\t\t\t\t\t}", "box[j] != a", "box[j]", "box", "j", "a", "{\n\t\t\t\t\t\t\tacount += 1;\n\t\t\t\t\t\t}", "acount += 1", "acount", "1", "if(box[j] != b) {\n\t\t\t\t\t\t\tbcount += 1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "box[j] != b", "box[j]", "box", "j", "b", "{\n\t\t\t\t\t\t\tbcount += 1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "bcount += 1", "bcount", "1", "if(acount==N) {\n\t\t\t\t\t\tmin=a;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if(bcount==N) {\n\t\t\t\t\t\tmin=b;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}", "acount==N", "acount", "N", "{\n\t\t\t\t\t\tmin=a;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}", "min=a", "min", "a", "break;", "if(bcount==N) {\n\t\t\t\t\t\tmin=b;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}", "bcount==N", "bcount", "N", "{\n\t\t\t\t\t\tmin=b;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}", "min=b", "min", "b", "break;", "System.out.print(min)", "System.out.print", "System.out", "System", "System.out", "min", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint X = scan.nextInt();\n\t\tint N = scan.nextInt();\n\t\tint[] box = new int[N];\n\t\tint con=0;\n\t\tint min = X+100;\n\t\tint judge=0;\n\t\tint nbox;\n\t\t\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tbox[i] = scan.nextInt();\n\t\t\tif(X==box[i]) {\n\t\t\t\tcon=1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(con==0) {\n\t\t\tSystem.out.print(X);\n\t\t}\n\t\telse {\n\t\t\tfor(int i=1;i<=200-X;i++) {\n\t\t\t\tint a = X-i;\n\t\t\t\tint b = X+i;\n\t\t\t\tint acount=0;\n\t\t\t\tint bcount=0;\n\t\t\t\tif(a<=min||b<=min) {\n\t\t\t\t\tacount=0;\n\t\t\t\t\tbcount=0;\n\t\t\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\t\t\tif(box[j] != a) {\n\t\t\t\t\t\t\tacount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(box[j] != b) {\n\t\t\t\t\t\t\tbcount += 1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(acount==N) {\n\t\t\t\t\t\tmin=a;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if(bcount==N) {\n\t\t\t\t\t\tmin=b;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.print(min);\n\t\t}\n\n\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\n\t\tint X = scan.nextInt();\n\t\tint N = scan.nextInt();\n\t\tint[] box = new int[N];\n\t\tint con=0;\n\t\tint min = X+100;\n\t\tint judge=0;\n\t\tint nbox;\n\t\t\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tbox[i] = scan.nextInt();\n\t\t\tif(X==box[i]) {\n\t\t\t\tcon=1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(con==0) {\n\t\t\tSystem.out.print(X);\n\t\t}\n\t\telse {\n\t\t\tfor(int i=1;i<=200-X;i++) {\n\t\t\t\tint a = X-i;\n\t\t\t\tint b = X+i;\n\t\t\t\tint acount=0;\n\t\t\t\tint bcount=0;\n\t\t\t\tif(a<=min||b<=min) {\n\t\t\t\t\tacount=0;\n\t\t\t\t\tbcount=0;\n\t\t\t\t\tfor(int j=0;j<N;j++) {\n\t\t\t\t\t\tif(box[j] != a) {\n\t\t\t\t\t\t\tacount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(box[j] != b) {\n\t\t\t\t\t\t\tbcount += 1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(acount==N) {\n\t\t\t\t\t\tmin=a;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if(bcount==N) {\n\t\t\t\t\t\tmin=b;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.print(min);\n\t\t}\n\n\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 X = scan.nextInt(); int N = scan.nextInt(); int[] box = new int[N]; int con=0; int min = X+100; int judge=0; int nbox; for(int i=0;i<N;i++) { box[i] = scan.nextInt(); if(X==box[i]) { con=1; } } if(con==0) { System.out.print(X); } else { for(int i=1;i<=200-X;i++) { int a = X-i; int b = X+i; int acount=0; int bcount=0; if(a<=min||b<=min) { acount=0; bcount=0; for(int j=0;j<N;j++) { if(box[j] != a) { acount += 1; } if(box[j] != b) { bcount += 1; } } if(acount==N) { min=a; break; } else if(bcount==N) { min=b; break; } } } System.out.print(min); } } }
[ 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, 41, 13, 40, 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, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 40, 4, 18, 4, 18, 13, 13, 4, 18, 13, 13, 30, 14, 2, 13, 13, 30, 0, 13, 2, 13, 13, 30, 0, 13, 2, 13, 13, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 117, 5 ], [ 117, 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 ], [ 8, 27 ], [ 27, 28 ], [ 27, 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 ], [ 8, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 55, 60 ], [ 60, 61 ], [ 60, 62 ], [ 55, 63 ], [ 63, 64 ], [ 64, 65 ], [ 55, 66 ], [ 67, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 72, 75 ], [ 70, 76 ], [ 76, 77 ], [ 77, 78 ], [ 76, 79 ], [ 68, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 81, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 88, 90 ], [ 81, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 94, 96 ], [ 80, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 97, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 101, 105 ], [ 105, 106 ], [ 105, 107 ], [ 8, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 108, 113 ], [ 6, 114 ], [ 114, 115 ], [ 0, 116 ], [ 116, 117 ], [ 116, 118 ] ]
[ "import java.util.*;\n\npublic class Main{\n public static void main(String args[]) {\n Scanner sc = new Scanner(System.in);\n int X = sc.nextInt(), N=sc.nextInt(), min=1001, sa, ans=-100;\n String p[] = new String[N];\n for(int i=0; i<N; i++) {\n p[i] = sc.next();\n\t}\n \n for(int j=0; j<=101; j++) {\n if(!Arrays.asList(p).contains(String.valueOf(j))) {\n if(X>=j) {\n sa=X-j;\n } else {\n sa=j-X;\n }\n if(min>sa) {\n ans = j;\n min=sa;\n }\n } \n }\n System.out.println(ans);\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 X = sc.nextInt(), N=sc.nextInt(), min=1001, sa, ans=-100;\n String p[] = new String[N];\n for(int i=0; i<N; i++) {\n p[i] = sc.next();\n\t}\n \n for(int j=0; j<=101; j++) {\n if(!Arrays.asList(p).contains(String.valueOf(j))) {\n if(X>=j) {\n sa=X-j;\n } else {\n sa=j-X;\n }\n if(min>sa) {\n ans = j;\n min=sa;\n }\n } \n }\n System.out.println(ans);\n }\n}", "Main", "public static void main(String args[]) {\n Scanner sc = new Scanner(System.in);\n int X = sc.nextInt(), N=sc.nextInt(), min=1001, sa, ans=-100;\n String p[] = new String[N];\n for(int i=0; i<N; i++) {\n p[i] = sc.next();\n\t}\n \n for(int j=0; j<=101; j++) {\n if(!Arrays.asList(p).contains(String.valueOf(j))) {\n if(X>=j) {\n sa=X-j;\n } else {\n sa=j-X;\n }\n if(min>sa) {\n ans = j;\n min=sa;\n }\n } \n }\n System.out.println(ans);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int X = sc.nextInt(), N=sc.nextInt(), min=1001, sa, ans=-100;\n String p[] = new String[N];\n for(int i=0; i<N; i++) {\n p[i] = sc.next();\n\t}\n \n for(int j=0; j<=101; j++) {\n if(!Arrays.asList(p).contains(String.valueOf(j))) {\n if(X>=j) {\n sa=X-j;\n } else {\n sa=j-X;\n }\n if(min>sa) {\n ans = j;\n min=sa;\n }\n } \n }\n System.out.println(ans);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int X = sc.nextInt()", "X", "sc.nextInt()", "sc.nextInt", "sc", "N=sc.nextInt()", "N", "sc.nextInt()", "sc.nextInt", "sc", "min=1001", "min", "1001", "sa", "sa", "ans=-100;", "ans", "-100", "100", "String p[] = new String[N];", "p", "new String[N]", "N", "for(int i=0; i<N; i++) {\n p[i] = sc.next();\n\t}", "int i=0;", "int i=0;", "i", "0", "i<N", "i", "N", "i++", "i++", "i", "{\n p[i] = sc.next();\n\t}", "{\n p[i] = sc.next();\n\t}", "p[i] = sc.next()", "p[i]", "p", "i", "sc.next()", "sc.next", "sc", "for(int j=0; j<=101; j++) {\n if(!Arrays.asList(p).contains(String.valueOf(j))) {\n if(X>=j) {\n sa=X-j;\n } else {\n sa=j-X;\n }\n if(min>sa) {\n ans = j;\n min=sa;\n }\n } \n }", "int j=0;", "int j=0;", "j", "0", "j<=101", "j", "101", "j++", "j++", "j", "{\n if(!Arrays.asList(p).contains(String.valueOf(j))) {\n if(X>=j) {\n sa=X-j;\n } else {\n sa=j-X;\n }\n if(min>sa) {\n ans = j;\n min=sa;\n }\n } \n }", "{\n if(!Arrays.asList(p).contains(String.valueOf(j))) {\n if(X>=j) {\n sa=X-j;\n } else {\n sa=j-X;\n }\n if(min>sa) {\n ans = j;\n min=sa;\n }\n } \n }", "if(!Arrays.asList(p).contains(String.valueOf(j))) {\n if(X>=j) {\n sa=X-j;\n } else {\n sa=j-X;\n }\n if(min>sa) {\n ans = j;\n min=sa;\n }\n }", "!Arrays.asList(p).contains(String.valueOf(j))", "Arrays.asList(p).contains(String.valueOf(j))", "Arrays.asList(p).contains", "Arrays.asList(p)", "Arrays.asList", "Arrays", "p", "String.valueOf(j)", "String.valueOf", "String", "j", "{\n if(X>=j) {\n sa=X-j;\n } else {\n sa=j-X;\n }\n if(min>sa) {\n ans = j;\n min=sa;\n }\n }", "if(X>=j) {\n sa=X-j;\n } else {\n sa=j-X;\n }", "X>=j", "X", "j", "{\n sa=X-j;\n }", "sa=X-j", "sa", "X-j", "X", "j", "{\n sa=j-X;\n }", "sa=j-X", "sa", "j-X", "j", "X", "if(min>sa) {\n ans = j;\n min=sa;\n }", "min>sa", "min", "sa", "{\n ans = j;\n min=sa;\n }", "ans = j", "ans", "j", "min=sa", "min", "sa", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String args[]", "args", "public class Main{\n public static void main(String args[]) {\n Scanner sc = new Scanner(System.in);\n int X = sc.nextInt(), N=sc.nextInt(), min=1001, sa, ans=-100;\n String p[] = new String[N];\n for(int i=0; i<N; i++) {\n p[i] = sc.next();\n\t}\n \n for(int j=0; j<=101; j++) {\n if(!Arrays.asList(p).contains(String.valueOf(j))) {\n if(X>=j) {\n sa=X-j;\n } else {\n sa=j-X;\n }\n if(min>sa) {\n ans = j;\n min=sa;\n }\n } \n }\n System.out.println(ans);\n }\n}", "public class Main{\n public static void main(String args[]) {\n Scanner sc = new Scanner(System.in);\n int X = sc.nextInt(), N=sc.nextInt(), min=1001, sa, ans=-100;\n String p[] = new String[N];\n for(int i=0; i<N; i++) {\n p[i] = sc.next();\n\t}\n \n for(int j=0; j<=101; j++) {\n if(!Arrays.asList(p).contains(String.valueOf(j))) {\n if(X>=j) {\n sa=X-j;\n } else {\n sa=j-X;\n }\n if(min>sa) {\n ans = j;\n min=sa;\n }\n } \n }\n System.out.println(ans);\n }\n}", "Main" ]
import java.util.*; public class Main{ public static void main(String args[]) { Scanner sc = new Scanner(System.in); int X = sc.nextInt(), N=sc.nextInt(), min=1001, sa, ans=-100; String p[] = new String[N]; for(int i=0; i<N; i++) { p[i] = sc.next(); } for(int j=0; j<=101; j++) { if(!Arrays.asList(p).contains(String.valueOf(j))) { if(X>=j) { sa=X-j; } else { sa=j-X; } if(min>sa) { ans = j; min=sa; } } } System.out.println(ans); } }
[ 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, 20, 2, 2, 17, 13, 17, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 4, 18, 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, 13, 41, 13, 17, 0, 18, 13, 17, 17, 0, 18, 13, 2, 2, 17, 13, 17, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 2, 2, 13, 17, 18, 13, 13, 30, 40, 13, 30, 0, 18, 13, 13, 2, 13, 17, 40, 13, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 2, 18, 13, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 2, 13, 4, 18, 13, 2, 13, 18, 13, 13, 30, 0, 13, 18, 13, 13, 0, 13, 4, 18, 13, 2, 13, 18, 13, 13, 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 ], [ 193, 8 ], [ 193, 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 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 32, 36 ], [ 11, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 37, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 42, 47 ], [ 41, 48 ], [ 48, 49 ], [ 49, 50 ], [ 48, 51 ], [ 11, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 52, 57 ], [ 57, 58 ], [ 57, 59 ], [ 52, 60 ], [ 60, 61 ], [ 61, 62 ], [ 52, 63 ], [ 64, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 65, 69 ], [ 69, 70 ], [ 70, 71 ], [ 11, 72 ], [ 72, 73 ], [ 73, 74 ], [ 72, 75 ], [ 11, 76 ], [ 76, 77 ], [ 76, 78 ], [ 11, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 79, 83 ], [ 11, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 87, 91 ], [ 84, 92 ], [ 11, 93 ], [ 93, 94 ], [ 93, 95 ], [ 11, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 96, 101 ], [ 101, 102 ], [ 101, 103 ], [ 96, 104 ], [ 104, 105 ], [ 105, 106 ], [ 96, 107 ], [ 108, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 110, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 114, 118 ], [ 118, 119 ], [ 118, 120 ], [ 109, 121 ], [ 121, 122 ], [ 122, 123 ], [ 109, 124 ], [ 124, 125 ], [ 125, 126 ], [ 126, 127 ], [ 126, 128 ], [ 125, 129 ], [ 129, 130 ], [ 129, 131 ], [ 124, 132 ], [ 132, 133 ], [ 11, 134 ], [ 134, 135 ], [ 134, 136 ], [ 11, 137 ], [ 137, 138 ], [ 137, 139 ], [ 11, 140 ], [ 140, 141 ], [ 141, 142 ], [ 142, 143 ], [ 142, 144 ], [ 144, 145 ], [ 145, 146 ], [ 145, 147 ], [ 144, 148 ], [ 140, 149 ], [ 149, 150 ], [ 149, 151 ], [ 140, 152 ], [ 152, 153 ], [ 153, 154 ], [ 140, 155 ], [ 156, 156 ], [ 156, 157 ], [ 157, 158 ], [ 158, 159 ], [ 158, 160 ], [ 160, 161 ], [ 161, 162 ], [ 160, 163 ], [ 163, 164 ], [ 163, 165 ], [ 165, 166 ], [ 165, 167 ], [ 157, 168 ], [ 168, 169 ], [ 169, 170 ], [ 169, 171 ], [ 171, 172 ], [ 171, 173 ], [ 168, 174 ], [ 174, 175 ], [ 174, 176 ], [ 176, 177 ], [ 177, 178 ], [ 176, 179 ], [ 179, 180 ], [ 179, 181 ], [ 181, 182 ], [ 181, 183 ], [ 11, 184 ], [ 184, 185 ], [ 185, 186 ], [ 186, 187 ], [ 186, 188 ], [ 184, 189 ], [ 9, 190 ], [ 190, 191 ], [ 0, 192 ], [ 192, 193 ], [ 192, 194 ] ]
[ "import java.util.Arrays;\nimport 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 X = sc.nextInt();\n\t\tint N = sc.nextInt();\n\t\tint[] p = new int[N];\n\t\tint[] np = new int[100-N+2];\n\t\tif(N==0) {\n\t\t\tSystem.out.println(X);\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tArrays.sort(p);\n\t\tint pc = 0;\n\t\tnp[0] = 0;\n\t\tnp[100-N+1] = 101;\n\t\tint npc = 1;\n\t\tfor(int i=0; i<100; i++) {\n\t\t\tif(pc < N && i+1 == p[pc]) {\n\t\t\t\tpc++;\n\t\t\t}else {\n\t\t\t\tnp[npc] = i+1;\n\t\t\t\tnpc++;\n\t\t\t}\n\t\t}\n\t\tint res = 100;\n\t\tint diff = 100;\n\t\tfor(int i=np.length-1; i>=0; i--) {\n\t\t\tif(diff>=Math.abs(X-np[i])) {\n\t\t\t\tres = np[i];\n\t\t\t\tdiff = Math.abs(X-np[i]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(res);\n\t}\n}", "import java.util.Arrays;", "Arrays", "java.util", "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 X = sc.nextInt();\n\t\tint N = sc.nextInt();\n\t\tint[] p = new int[N];\n\t\tint[] np = new int[100-N+2];\n\t\tif(N==0) {\n\t\t\tSystem.out.println(X);\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tArrays.sort(p);\n\t\tint pc = 0;\n\t\tnp[0] = 0;\n\t\tnp[100-N+1] = 101;\n\t\tint npc = 1;\n\t\tfor(int i=0; i<100; i++) {\n\t\t\tif(pc < N && i+1 == p[pc]) {\n\t\t\t\tpc++;\n\t\t\t}else {\n\t\t\t\tnp[npc] = i+1;\n\t\t\t\tnpc++;\n\t\t\t}\n\t\t}\n\t\tint res = 100;\n\t\tint diff = 100;\n\t\tfor(int i=np.length-1; i>=0; i--) {\n\t\t\tif(diff>=Math.abs(X-np[i])) {\n\t\t\t\tres = np[i];\n\t\t\t\tdiff = Math.abs(X-np[i]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(res);\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt();\n\t\tint N = sc.nextInt();\n\t\tint[] p = new int[N];\n\t\tint[] np = new int[100-N+2];\n\t\tif(N==0) {\n\t\t\tSystem.out.println(X);\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tArrays.sort(p);\n\t\tint pc = 0;\n\t\tnp[0] = 0;\n\t\tnp[100-N+1] = 101;\n\t\tint npc = 1;\n\t\tfor(int i=0; i<100; i++) {\n\t\t\tif(pc < N && i+1 == p[pc]) {\n\t\t\t\tpc++;\n\t\t\t}else {\n\t\t\t\tnp[npc] = i+1;\n\t\t\t\tnpc++;\n\t\t\t}\n\t\t}\n\t\tint res = 100;\n\t\tint diff = 100;\n\t\tfor(int i=np.length-1; i>=0; i--) {\n\t\t\tif(diff>=Math.abs(X-np[i])) {\n\t\t\t\tres = np[i];\n\t\t\t\tdiff = Math.abs(X-np[i]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(res);\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt();\n\t\tint N = sc.nextInt();\n\t\tint[] p = new int[N];\n\t\tint[] np = new int[100-N+2];\n\t\tif(N==0) {\n\t\t\tSystem.out.println(X);\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tArrays.sort(p);\n\t\tint pc = 0;\n\t\tnp[0] = 0;\n\t\tnp[100-N+1] = 101;\n\t\tint npc = 1;\n\t\tfor(int i=0; i<100; i++) {\n\t\t\tif(pc < N && i+1 == p[pc]) {\n\t\t\t\tpc++;\n\t\t\t}else {\n\t\t\t\tnp[npc] = i+1;\n\t\t\t\tnpc++;\n\t\t\t}\n\t\t}\n\t\tint res = 100;\n\t\tint diff = 100;\n\t\tfor(int i=np.length-1; i>=0; i--) {\n\t\t\tif(diff>=Math.abs(X-np[i])) {\n\t\t\t\tres = np[i];\n\t\t\t\tdiff = Math.abs(X-np[i]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(res);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int X = sc.nextInt();", "X", "sc.nextInt()", "sc.nextInt", "sc", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int[] p = new int[N];", "p", "new int[N]", "N", "int[] np = new int[100-N+2];", "np", "new int[100-N+2]", "100-N+2", "100-N", "100", "N", "2", "if(N==0) {\n\t\t\tSystem.out.println(X);\n\t\t\tSystem.exit(0);\n\t\t}", "N==0", "N", "0", "{\n\t\t\tSystem.out.println(X);\n\t\t\tSystem.exit(0);\n\t\t}", "System.out.println(X)", "System.out.println", "System.out", "System", "System.out", "X", "System.exit(0)", "System.exit", "System", "0", "for(int i=0;i<N;i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<N", "i", "N", "i++", "i++", "i", "{\n\t\t\tp[i] = sc.nextInt();\n\t\t}", "{\n\t\t\tp[i] = sc.nextInt();\n\t\t}", "p[i] = sc.nextInt()", "p[i]", "p", "i", "sc.nextInt()", "sc.nextInt", "sc", "Arrays.sort(p)", "Arrays.sort", "Arrays", "p", "int pc = 0;", "pc", "0", "np[0] = 0", "np[0]", "np", "0", "0", "np[100-N+1] = 101", "np[100-N+1]", "np", "100-N+1", "100-N", "100", "N", "1", "101", "int npc = 1;", "npc", "1", "for(int i=0; i<100; i++) {\n\t\t\tif(pc < N && i+1 == p[pc]) {\n\t\t\t\tpc++;\n\t\t\t}else {\n\t\t\t\tnp[npc] = i+1;\n\t\t\t\tnpc++;\n\t\t\t}\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<100", "i", "100", "i++", "i++", "i", "{\n\t\t\tif(pc < N && i+1 == p[pc]) {\n\t\t\t\tpc++;\n\t\t\t}else {\n\t\t\t\tnp[npc] = i+1;\n\t\t\t\tnpc++;\n\t\t\t}\n\t\t}", "{\n\t\t\tif(pc < N && i+1 == p[pc]) {\n\t\t\t\tpc++;\n\t\t\t}else {\n\t\t\t\tnp[npc] = i+1;\n\t\t\t\tnpc++;\n\t\t\t}\n\t\t}", "if(pc < N && i+1 == p[pc]) {\n\t\t\t\tpc++;\n\t\t\t}else {\n\t\t\t\tnp[npc] = i+1;\n\t\t\t\tnpc++;\n\t\t\t}", "pc < N && i+1 == p[pc]", "pc < N", "pc", "N", "i+1 == p[pc]", "i+1", "i", "1", "p[pc]", "p", "pc", "{\n\t\t\t\tpc++;\n\t\t\t}", "pc++", "pc", "{\n\t\t\t\tnp[npc] = i+1;\n\t\t\t\tnpc++;\n\t\t\t}", "np[npc] = i+1", "np[npc]", "np", "npc", "i+1", "i", "1", "npc++", "npc", "int res = 100;", "res", "100", "int diff = 100;", "diff", "100", "for(int i=np.length-1; i>=0; i--) {\n\t\t\tif(diff>=Math.abs(X-np[i])) {\n\t\t\t\tres = np[i];\n\t\t\t\tdiff = Math.abs(X-np[i]);\n\t\t\t}\n\t\t}", "int i=np.length-1;", "int i=np.length-1;", "i", "np.length-1", "np.length", "np", "np.length", "1", "i>=0", "i", "0", "i--", "i--", "i", "{\n\t\t\tif(diff>=Math.abs(X-np[i])) {\n\t\t\t\tres = np[i];\n\t\t\t\tdiff = Math.abs(X-np[i]);\n\t\t\t}\n\t\t}", "{\n\t\t\tif(diff>=Math.abs(X-np[i])) {\n\t\t\t\tres = np[i];\n\t\t\t\tdiff = Math.abs(X-np[i]);\n\t\t\t}\n\t\t}", "if(diff>=Math.abs(X-np[i])) {\n\t\t\t\tres = np[i];\n\t\t\t\tdiff = Math.abs(X-np[i]);\n\t\t\t}", "diff>=Math.abs(X-np[i])", "diff", "Math.abs(X-np[i])", "Math.abs", "Math", "X-np[i]", "X", "np[i]", "np", "i", "{\n\t\t\t\tres = np[i];\n\t\t\t\tdiff = Math.abs(X-np[i]);\n\t\t\t}", "res = np[i]", "res", "np[i]", "np", "i", "diff = Math.abs(X-np[i])", "diff", "Math.abs(X-np[i])", "Math.abs", "Math", "X-np[i]", "X", "np[i]", "np", "i", "System.out.println(res)", "System.out.println", "System.out", "System", "System.out", "res", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt();\n\t\tint N = sc.nextInt();\n\t\tint[] p = new int[N];\n\t\tint[] np = new int[100-N+2];\n\t\tif(N==0) {\n\t\t\tSystem.out.println(X);\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tArrays.sort(p);\n\t\tint pc = 0;\n\t\tnp[0] = 0;\n\t\tnp[100-N+1] = 101;\n\t\tint npc = 1;\n\t\tfor(int i=0; i<100; i++) {\n\t\t\tif(pc < N && i+1 == p[pc]) {\n\t\t\t\tpc++;\n\t\t\t}else {\n\t\t\t\tnp[npc] = i+1;\n\t\t\t\tnpc++;\n\t\t\t}\n\t\t}\n\t\tint res = 100;\n\t\tint diff = 100;\n\t\tfor(int i=np.length-1; i>=0; i--) {\n\t\t\tif(diff>=Math.abs(X-np[i])) {\n\t\t\t\tres = np[i];\n\t\t\t\tdiff = Math.abs(X-np[i]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(res);\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt();\n\t\tint N = sc.nextInt();\n\t\tint[] p = new int[N];\n\t\tint[] np = new int[100-N+2];\n\t\tif(N==0) {\n\t\t\tSystem.out.println(X);\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tArrays.sort(p);\n\t\tint pc = 0;\n\t\tnp[0] = 0;\n\t\tnp[100-N+1] = 101;\n\t\tint npc = 1;\n\t\tfor(int i=0; i<100; i++) {\n\t\t\tif(pc < N && i+1 == p[pc]) {\n\t\t\t\tpc++;\n\t\t\t}else {\n\t\t\t\tnp[npc] = i+1;\n\t\t\t\tnpc++;\n\t\t\t}\n\t\t}\n\t\tint res = 100;\n\t\tint diff = 100;\n\t\tfor(int i=np.length-1; i>=0; i--) {\n\t\t\tif(diff>=Math.abs(X-np[i])) {\n\t\t\t\tres = np[i];\n\t\t\t\tdiff = Math.abs(X-np[i]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(res);\n\t}\n}", "Main" ]
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int X = sc.nextInt(); int N = sc.nextInt(); int[] p = new int[N]; int[] np = new int[100-N+2]; if(N==0) { System.out.println(X); System.exit(0); } for(int i=0;i<N;i++) { p[i] = sc.nextInt(); } Arrays.sort(p); int pc = 0; np[0] = 0; np[100-N+1] = 101; int npc = 1; for(int i=0; i<100; i++) { if(pc < N && i+1 == p[pc]) { pc++; }else { np[npc] = i+1; npc++; } } int res = 100; int diff = 100; for(int i=np.length-1; i>=0; i--) { if(diff>=Math.abs(X-np[i])) { res = np[i]; diff = Math.abs(X-np[i]); } } System.out.println(res); } }
[ 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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 42, 2, 2, 13, 2, 40, 17, 13, 2, 13, 17, 30, 0, 13, 13, 14, 2, 4, 18, 13, 13, 40, 17, 30, 4, 18, 18, 13, 13, 13, 0, 13, 17, 30, 14, 2, 13, 17, 30, 40, 13, 30, 40, 13, 14, 2, 13, 17, 30, 0, 13, 40, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 109, 8 ], [ 109, 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 ], [ 42, 43 ], [ 41, 44 ], [ 44, 45 ], [ 45, 46 ], [ 11, 47 ], [ 47, 48 ], [ 47, 49 ], [ 11, 50 ], [ 50, 51 ], [ 50, 52 ], [ 11, 53 ], [ 53, 54 ], [ 55, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 58, 59 ], [ 57, 60 ], [ 55, 61 ], [ 61, 62 ], [ 61, 63 ], [ 53, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 64, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 70, 73 ], [ 69, 74 ], [ 74, 75 ], [ 68, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 77, 82 ], [ 76, 83 ], [ 83, 84 ], [ 83, 85 ], [ 68, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 87, 91 ], [ 91, 92 ], [ 92, 93 ], [ 87, 94 ], [ 94, 95 ], [ 95, 96 ], [ 86, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 97, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 9, 106 ], [ 106, 107 ], [ 0, 108 ], [ 108, 109 ], [ 108, 110 ] ]
[ "import java.util.*;\nimport java.math.BigDecimal;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 整数の入力\n\t\tint a = sc.nextInt();//最もこれに近い整数を求める\n\t\tint b = sc.nextInt();//整数の数\n\n\t\tList<Integer> list = new ArrayList<>();\n\t\t\n\t\tfor (int i = 0; i < b; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tint index = 0;\n\t\tboolean flag = true;\n\t\t\n\t\twhile (flag && -100 <= index && index <= 100) {\n\t\t\ta -= index;\n\t\t\tif (list.indexOf(a) == -1) {\n\t\t\t\tSystem.out.println(a);\n\t\t\t\tflag = false;\n\t\t\t} else {\n\t\t\t\tif (index >= 0) {\n\t\t\t\t\tindex++;\n\t\t\t\t} else {\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\tif (index != 1) {\n\t\t\t\t\tindex *= -1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}\n}", "import java.util.*;", "util.*", "java", "import java.math.BigDecimal;", "BigDecimal", "java.math", "public class Main {\n\tpublic static void main(String[] args){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 整数の入力\n\t\tint a = sc.nextInt();//最もこれに近い整数を求める\n\t\tint b = sc.nextInt();//整数の数\n\n\t\tList<Integer> list = new ArrayList<>();\n\t\t\n\t\tfor (int i = 0; i < b; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tint index = 0;\n\t\tboolean flag = true;\n\t\t\n\t\twhile (flag && -100 <= index && index <= 100) {\n\t\t\ta -= index;\n\t\t\tif (list.indexOf(a) == -1) {\n\t\t\t\tSystem.out.println(a);\n\t\t\t\tflag = false;\n\t\t\t} else {\n\t\t\t\tif (index >= 0) {\n\t\t\t\t\tindex++;\n\t\t\t\t} else {\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\tif (index != 1) {\n\t\t\t\t\tindex *= -1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 整数の入力\n\t\tint a = sc.nextInt();//最もこれに近い整数を求める\n\t\tint b = sc.nextInt();//整数の数\n\n\t\tList<Integer> list = new ArrayList<>();\n\t\t\n\t\tfor (int i = 0; i < b; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tint index = 0;\n\t\tboolean flag = true;\n\t\t\n\t\twhile (flag && -100 <= index && index <= 100) {\n\t\t\ta -= index;\n\t\t\tif (list.indexOf(a) == -1) {\n\t\t\t\tSystem.out.println(a);\n\t\t\t\tflag = false;\n\t\t\t} else {\n\t\t\t\tif (index >= 0) {\n\t\t\t\t\tindex++;\n\t\t\t\t} else {\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\tif (index != 1) {\n\t\t\t\t\tindex *= -1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "main", "{\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 整数の入力\n\t\tint a = sc.nextInt();//最もこれに近い整数を求める\n\t\tint b = sc.nextInt();//整数の数\n\n\t\tList<Integer> list = new ArrayList<>();\n\t\t\n\t\tfor (int i = 0; i < b; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tint index = 0;\n\t\tboolean flag = true;\n\t\t\n\t\twhile (flag && -100 <= index && index <= 100) {\n\t\t\ta -= index;\n\t\t\tif (list.indexOf(a) == -1) {\n\t\t\t\tSystem.out.println(a);\n\t\t\t\tflag = false;\n\t\t\t} else {\n\t\t\t\tif (index >= 0) {\n\t\t\t\t\tindex++;\n\t\t\t\t} else {\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\tif (index != 1) {\n\t\t\t\t\tindex *= -1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "int b = sc.nextInt();", "b", "sc.nextInt()", "sc.nextInt", "sc", "List<Integer> list = new ArrayList<>();", "list", "new ArrayList<>()", "for (int i = 0; i < b; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < b", "i", "b", "i++", "i++", "i", "{\n\t\t\tlist.add(sc.nextInt());\n\t\t}", "{\n\t\t\tlist.add(sc.nextInt());\n\t\t}", "list.add(sc.nextInt())", "list.add", "list", "sc.nextInt()", "sc.nextInt", "sc", "int index = 0;", "index", "0", "boolean flag = true;", "flag", "true", "while (flag && -100 <= index && index <= 100) {\n\t\t\ta -= index;\n\t\t\tif (list.indexOf(a) == -1) {\n\t\t\t\tSystem.out.println(a);\n\t\t\t\tflag = false;\n\t\t\t} else {\n\t\t\t\tif (index >= 0) {\n\t\t\t\t\tindex++;\n\t\t\t\t} else {\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\tif (index != 1) {\n\t\t\t\t\tindex *= -1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}", "flag && -100 <= index && index <= 100", "flag && -100 <= index && index <= 100", "flag", "-100 <= index", "-100", "100", "index", "index <= 100", "index", "100", "{\n\t\t\ta -= index;\n\t\t\tif (list.indexOf(a) == -1) {\n\t\t\t\tSystem.out.println(a);\n\t\t\t\tflag = false;\n\t\t\t} else {\n\t\t\t\tif (index >= 0) {\n\t\t\t\t\tindex++;\n\t\t\t\t} else {\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\tif (index != 1) {\n\t\t\t\t\tindex *= -1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}", "a -= index", "a", "index", "if (list.indexOf(a) == -1) {\n\t\t\t\tSystem.out.println(a);\n\t\t\t\tflag = false;\n\t\t\t} else {\n\t\t\t\tif (index >= 0) {\n\t\t\t\t\tindex++;\n\t\t\t\t} else {\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\tif (index != 1) {\n\t\t\t\t\tindex *= -1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "list.indexOf(a) == -1", "list.indexOf(a)", "list.indexOf", "list", "a", "-1", "1", "{\n\t\t\t\tSystem.out.println(a);\n\t\t\t\tflag = false;\n\t\t\t}", "System.out.println(a)", "System.out.println", "System.out", "System", "System.out", "a", "flag = false", "flag", "false", "{\n\t\t\t\tif (index >= 0) {\n\t\t\t\t\tindex++;\n\t\t\t\t} else {\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\tif (index != 1) {\n\t\t\t\t\tindex *= -1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "if (index >= 0) {\n\t\t\t\t\tindex++;\n\t\t\t\t} else {\n\t\t\t\t\tindex--;\n\t\t\t\t}", "index >= 0", "index", "0", "{\n\t\t\t\t\tindex++;\n\t\t\t\t}", "index++", "index", "{\n\t\t\t\t\tindex--;\n\t\t\t\t}", "index--", "index", "if (index != 1) {\n\t\t\t\t\tindex *= -1;\n\t\t\t\t}", "index != 1", "index", "1", "{\n\t\t\t\t\tindex *= -1;\n\t\t\t\t}", "index *= -1", "index", "-1", "1", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 整数の入力\n\t\tint a = sc.nextInt();//最もこれに近い整数を求める\n\t\tint b = sc.nextInt();//整数の数\n\n\t\tList<Integer> list = new ArrayList<>();\n\t\t\n\t\tfor (int i = 0; i < b; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tint index = 0;\n\t\tboolean flag = true;\n\t\t\n\t\twhile (flag && -100 <= index && index <= 100) {\n\t\t\ta -= index;\n\t\t\tif (list.indexOf(a) == -1) {\n\t\t\t\tSystem.out.println(a);\n\t\t\t\tflag = false;\n\t\t\t} else {\n\t\t\t\tif (index >= 0) {\n\t\t\t\t\tindex++;\n\t\t\t\t} else {\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\tif (index != 1) {\n\t\t\t\t\tindex *= -1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 整数の入力\n\t\tint a = sc.nextInt();//最もこれに近い整数を求める\n\t\tint b = sc.nextInt();//整数の数\n\n\t\tList<Integer> list = new ArrayList<>();\n\t\t\n\t\tfor (int i = 0; i < b; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tint index = 0;\n\t\tboolean flag = true;\n\t\t\n\t\twhile (flag && -100 <= index && index <= 100) {\n\t\t\ta -= index;\n\t\t\tif (list.indexOf(a) == -1) {\n\t\t\t\tSystem.out.println(a);\n\t\t\t\tflag = false;\n\t\t\t} else {\n\t\t\t\tif (index >= 0) {\n\t\t\t\t\tindex++;\n\t\t\t\t} else {\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\tif (index != 1) {\n\t\t\t\t\tindex *= -1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}\n}", "Main" ]
import java.util.*; import java.math.BigDecimal; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); // 整数の入力 int a = sc.nextInt();//最もこれに近い整数を求める int b = sc.nextInt();//整数の数 List<Integer> list = new ArrayList<>(); for (int i = 0; i < b; i++) { list.add(sc.nextInt()); } int index = 0; boolean flag = true; while (flag && -100 <= index && index <= 100) { a -= index; if (list.indexOf(a) == -1) { System.out.println(a); flag = false; } else { if (index >= 0) { index++; } else { index--; } if (index != 1) { index *= -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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 4, 18, 13, 13, 41, 13, 13, 14, 4, 18, 13, 13, 30, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 40, 4, 18, 13, 2, 13, 13, 30, 0, 13, 2, 13, 13, 3, 14, 40, 4, 18, 13, 2, 13, 13, 30, 0, 13, 2, 13, 13, 3, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 108, 5 ], [ 108, 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 ], [ 43, 46 ], [ 8, 47 ], [ 47, 48 ], [ 47, 49 ], [ 8, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 51, 54 ], [ 50, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 56, 61 ], [ 61, 62 ], [ 61, 63 ], [ 56, 64 ], [ 64, 65 ], [ 65, 66 ], [ 56, 67 ], [ 68, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 71, 74 ], [ 74, 75 ], [ 74, 76 ], [ 69, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 80, 82 ], [ 77, 83 ], [ 68, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 86, 89 ], [ 89, 90 ], [ 89, 91 ], [ 84, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 95, 97 ], [ 92, 98 ], [ 8, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 99, 104 ], [ 6, 105 ], [ 105, 106 ], [ 0, 107 ], [ 107, 108 ], [ 107, 109 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int X = sc.nextInt();\n int N = sc.nextInt();\n HashSet<Integer> set = new HashSet<Integer>();\n for (int i=0;i<N;i++) {\n int p = sc.nextInt();\n set.add(p);\n }\n\n int ans = X;\n if (set.contains(X)) {\n for (int i=1;i<200;i++) {\n if (!set.contains(X-i)) {\n ans = X-i;\n break;\n }\n if (!set.contains(X+i)) {\n ans = X+i;\n break;\n }\n }\n }\n System.out.println(ans);\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 X = sc.nextInt();\n int N = sc.nextInt();\n HashSet<Integer> set = new HashSet<Integer>();\n for (int i=0;i<N;i++) {\n int p = sc.nextInt();\n set.add(p);\n }\n\n int ans = X;\n if (set.contains(X)) {\n for (int i=1;i<200;i++) {\n if (!set.contains(X-i)) {\n ans = X-i;\n break;\n }\n if (!set.contains(X+i)) {\n ans = X+i;\n break;\n }\n }\n }\n System.out.println(ans);\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int X = sc.nextInt();\n int N = sc.nextInt();\n HashSet<Integer> set = new HashSet<Integer>();\n for (int i=0;i<N;i++) {\n int p = sc.nextInt();\n set.add(p);\n }\n\n int ans = X;\n if (set.contains(X)) {\n for (int i=1;i<200;i++) {\n if (!set.contains(X-i)) {\n ans = X-i;\n break;\n }\n if (!set.contains(X+i)) {\n ans = X+i;\n break;\n }\n }\n }\n System.out.println(ans);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int X = sc.nextInt();\n int N = sc.nextInt();\n HashSet<Integer> set = new HashSet<Integer>();\n for (int i=0;i<N;i++) {\n int p = sc.nextInt();\n set.add(p);\n }\n\n int ans = X;\n if (set.contains(X)) {\n for (int i=1;i<200;i++) {\n if (!set.contains(X-i)) {\n ans = X-i;\n break;\n }\n if (!set.contains(X+i)) {\n ans = X+i;\n break;\n }\n }\n }\n System.out.println(ans);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int X = sc.nextInt();", "X", "sc.nextInt()", "sc.nextInt", "sc", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "HashSet<Integer> set = new HashSet<Integer>();", "set", "new HashSet<Integer>()", "for (int i=0;i<N;i++) {\n int p = sc.nextInt();\n set.add(p);\n }", "int i=0;", "int i=0;", "i", "0", "i<N", "i", "N", "i++", "i++", "i", "{\n int p = sc.nextInt();\n set.add(p);\n }", "{\n int p = sc.nextInt();\n set.add(p);\n }", "int p = sc.nextInt();", "p", "sc.nextInt()", "sc.nextInt", "sc", "set.add(p)", "set.add", "set", "p", "int ans = X;", "ans", "X", "if (set.contains(X)) {\n for (int i=1;i<200;i++) {\n if (!set.contains(X-i)) {\n ans = X-i;\n break;\n }\n if (!set.contains(X+i)) {\n ans = X+i;\n break;\n }\n }\n }", "set.contains(X)", "set.contains", "set", "X", "{\n for (int i=1;i<200;i++) {\n if (!set.contains(X-i)) {\n ans = X-i;\n break;\n }\n if (!set.contains(X+i)) {\n ans = X+i;\n break;\n }\n }\n }", "for (int i=1;i<200;i++) {\n if (!set.contains(X-i)) {\n ans = X-i;\n break;\n }\n if (!set.contains(X+i)) {\n ans = X+i;\n break;\n }\n }", "int i=1;", "int i=1;", "i", "1", "i<200", "i", "200", "i++", "i++", "i", "{\n if (!set.contains(X-i)) {\n ans = X-i;\n break;\n }\n if (!set.contains(X+i)) {\n ans = X+i;\n break;\n }\n }", "{\n if (!set.contains(X-i)) {\n ans = X-i;\n break;\n }\n if (!set.contains(X+i)) {\n ans = X+i;\n break;\n }\n }", "if (!set.contains(X-i)) {\n ans = X-i;\n break;\n }", "!set.contains(X-i)", "set.contains(X-i)", "set.contains", "set", "X-i", "X", "i", "{\n ans = X-i;\n break;\n }", "ans = X-i", "ans", "X-i", "X", "i", "break;", "if (!set.contains(X+i)) {\n ans = X+i;\n break;\n }", "!set.contains(X+i)", "set.contains(X+i)", "set.contains", "set", "X+i", "X", "i", "{\n ans = X+i;\n break;\n }", "ans = X+i", "ans", "X+i", "X", "i", "break;", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int X = sc.nextInt();\n int N = sc.nextInt();\n HashSet<Integer> set = new HashSet<Integer>();\n for (int i=0;i<N;i++) {\n int p = sc.nextInt();\n set.add(p);\n }\n\n int ans = X;\n if (set.contains(X)) {\n for (int i=1;i<200;i++) {\n if (!set.contains(X-i)) {\n ans = X-i;\n break;\n }\n if (!set.contains(X+i)) {\n ans = X+i;\n break;\n }\n }\n }\n System.out.println(ans);\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int X = sc.nextInt();\n int N = sc.nextInt();\n HashSet<Integer> set = new HashSet<Integer>();\n for (int i=0;i<N;i++) {\n int p = sc.nextInt();\n set.add(p);\n }\n\n int ans = X;\n if (set.contains(X)) {\n for (int i=1;i<200;i++) {\n if (!set.contains(X-i)) {\n ans = X-i;\n break;\n }\n if (!set.contains(X+i)) {\n ans = X+i;\n break;\n }\n }\n }\n System.out.println(ans);\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int X = sc.nextInt(); int N = sc.nextInt(); HashSet<Integer> set = new HashSet<Integer>(); for (int i=0;i<N;i++) { int p = sc.nextInt(); set.add(p); } int ans = X; if (set.contains(X)) { for (int i=1;i<200;i++) { if (!set.contains(X-i)) { ans = X-i; break; } if (!set.contains(X+i)) { ans = X+i; break; } } } System.out.println(ans); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 17, 41, 13, 17, 41, 13, 13, 41, 13, 17, 41, 13, 41, 13, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 41, 13, 20, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 40, 18, 13, 18, 13, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 18, 13, 13, 17, 2, 4, 18, 13, 2, 13, 13, 4, 18, 13, 2, 13, 13, 30, 0, 13, 13, 4, 18, 18, 13, 13, 13, 12, 13, 30, 14, 2, 13, 13, 30, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 20, 4, 18, 18, 13, 13, 17, 30, 0, 13, 18, 13, 13, 0, 13, 20, 0, 13, 20, 4, 13, 12, 13, 30, 4, 18, 20, 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, 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, 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, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 13, 13, 29, 13, 23, 13, 23, 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, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 13, 13, 29, 13, 23, 13, 23, 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, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 13, 13, 29, 13, 23, 13, 23, 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, 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, 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, 41, 13, 20, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 18, 13, 13, 13, 4, 13, 29, 13, 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 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 651, 20 ], [ 651, 21 ], [ 21, 22 ], [ 651, 23 ], [ 23, 24 ], [ 23, 25 ], [ 651, 26 ], [ 26, 27 ], [ 26, 28 ], [ 651, 29 ], [ 29, 30 ], [ 29, 31 ], [ 651, 32 ], [ 32, 33 ], [ 32, 34 ], [ 651, 35 ], [ 35, 36 ], [ 651, 37 ], [ 37, 38 ], [ 651, 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 ], [ 54, 55 ], [ 55, 56 ], [ 54, 57 ], [ 41, 58 ], [ 58, 59 ], [ 58, 60 ], [ 41, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 62, 67 ], [ 67, 68 ], [ 67, 69 ], [ 62, 70 ], [ 70, 71 ], [ 71, 72 ], [ 62, 73 ], [ 74, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 78, 80 ], [ 41, 81 ], [ 81, 82 ], [ 81, 83 ], [ 41, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 84, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 91, 93 ], [ 84, 94 ], [ 94, 95 ], [ 95, 96 ], [ 84, 97 ], [ 98, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 101, 105 ], [ 100, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 107, 110 ], [ 110, 111 ], [ 110, 112 ], [ 106, 113 ], [ 113, 114 ], [ 114, 115 ], [ 113, 116 ], [ 116, 117 ], [ 116, 118 ], [ 99, 119 ], [ 119, 120 ], [ 120, 121 ], [ 120, 122 ], [ 41, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 123, 128 ], [ 651, 129 ], [ 129, 130 ], [ 129, 131 ], [ 131, 132 ], [ 132, 133 ], [ 133, 134 ], [ 133, 135 ], [ 132, 136 ], [ 136, 137 ], [ 137, 138 ], [ 138, 139 ], [ 138, 140 ], [ 140, 141 ], [ 141, 142 ], [ 142, 143 ], [ 137, 144 ], [ 144, 145 ], [ 145, 146 ], [ 145, 147 ], [ 136, 148 ], [ 148, 149 ], [ 149, 150 ], [ 150, 151 ], [ 150, 152 ], [ 148, 153 ], [ 132, 154 ], [ 154, 155 ], [ 155, 156 ], [ 155, 157 ], [ 157, 158 ], [ 157, 159 ], [ 131, 160 ], [ 160, 161 ], [ 160, 162 ], [ 131, 163 ], [ 163, 164 ], [ 163, 165 ], [ 131, 166 ], [ 166, 167 ], [ 651, 168 ], [ 168, 169 ], [ 168, 170 ], [ 170, 171 ], [ 171, 172 ], [ 172, 173 ], [ 168, 174 ], [ 174, 175 ], [ 0, 176 ], [ 176, 177 ], [ 176, 178 ], [ 178, 179 ], [ 176, 180 ], [ 180, 181 ], [ 180, 182 ], [ 176, 184 ], [ 184, 185 ], [ 176, 186 ], [ 186, 187 ], [ 176, 188 ], [ 188, 189 ], [ 188, 190 ], [ 190, 191 ], [ 191, 192 ], [ 192, 193 ], [ 192, 194 ], [ 191, 195 ], [ 188, 196 ], [ 196, 197 ], [ 176, 198 ], [ 198, 199 ], [ 198, 200 ], [ 200, 201 ], [ 201, 202 ], [ 202, 203 ], [ 202, 204 ], [ 204, 205 ], [ 201, 206 ], [ 206, 207 ], [ 200, 208 ], [ 208, 209 ], [ 209, 210 ], [ 209, 211 ], [ 208, 212 ], [ 212, 213 ], [ 213, 214 ], [ 213, 215 ], [ 212, 216 ], [ 216, 217 ], [ 217, 218 ], [ 217, 219 ], [ 219, 220 ], [ 220, 221 ], [ 216, 222 ], [ 222, 223 ], [ 223, 224 ], [ 223, 225 ], [ 225, 226 ], [ 226, 227 ], [ 225, 228 ], [ 212, 229 ], [ 229, 230 ], [ 230, 231 ], [ 230, 232 ], [ 229, 233 ], [ 233, 234 ], [ 234, 235 ], [ 200, 236 ], [ 236, 237 ], [ 237, 238 ], [ 237, 239 ], [ 239, 240 ], [ 176, 241 ], [ 241, 242 ], [ 241, 243 ], [ 243, 244 ], [ 244, 245 ], [ 248, 246 ], [ 258, 247 ], [ 255, 248 ], [ 248, 249 ], [ 249, 250 ], [ 249, 251 ], [ 248, 252 ], [ 252, 253 ], [ 252, 254 ], [ 255, 255 ], [ 255, 256 ], [ 255, 257 ], [ 258, 258 ], [ 258, 259 ], [ 258, 260 ], [ 248, 261 ], [ 261, 262 ], [ 261, 263 ], [ 263, 264 ], [ 241, 265 ], [ 265, 266 ], [ 176, 267 ], [ 267, 268 ], [ 267, 269 ], [ 269, 270 ], [ 270, 271 ], [ 272, 272 ], [ 272, 273 ], [ 273, 274 ], [ 273, 275 ], [ 272, 276 ], [ 276, 277 ], [ 276, 278 ], [ 272, 279 ], [ 279, 280 ], [ 279, 281 ], [ 281, 282 ], [ 267, 283 ], [ 283, 284 ], [ 176, 285 ], [ 285, 286 ], [ 285, 287 ], [ 287, 288 ], [ 288, 289 ], [ 289, 290 ], [ 290, 291 ], [ 289, 292 ], [ 292, 293 ], [ 176, 294 ], [ 294, 295 ], [ 294, 296 ], [ 296, 297 ], [ 297, 298 ], [ 297, 299 ], [ 296, 301 ], [ 301, 302 ], [ 302, 303 ], [ 303, 304 ], [ 303, 305 ], [ 301, 306 ], [ 306, 307 ], [ 306, 308 ], [ 301, 309 ], [ 309, 310 ], [ 310, 311 ], [ 301, 312 ], [ 312, 313 ], [ 313, 314 ], [ 314, 315 ], [ 314, 316 ], [ 313, 317 ], [ 317, 318 ], [ 296, 319 ], [ 319, 320 ], [ 294, 321 ], [ 321, 322 ], [ 176, 323 ], [ 323, 324 ], [ 323, 325 ], [ 325, 326 ], [ 326, 327 ], [ 326, 328 ], [ 325, 331 ], [ 331, 332 ], [ 332, 333 ], [ 333, 334 ], [ 333, 335 ], [ 331, 336 ], [ 336, 337 ], [ 336, 338 ], [ 331, 339 ], [ 339, 340 ], [ 340, 341 ], [ 331, 342 ], [ 343, 343 ], [ 343, 344 ], [ 344, 345 ], [ 345, 346 ], [ 345, 347 ], [ 344, 348 ], [ 348, 349 ], [ 348, 350 ], [ 325, 351 ], [ 351, 352 ], [ 323, 353 ], [ 353, 354 ], [ 323, 355 ], [ 355, 356 ], [ 176, 357 ], [ 357, 358 ], [ 357, 359 ], [ 359, 360 ], [ 360, 361 ], [ 361, 362 ], [ 362, 363 ], [ 361, 364 ], [ 364, 365 ], [ 176, 366 ], [ 366, 367 ], [ 366, 368 ], [ 368, 369 ], [ 369, 370 ], [ 369, 371 ], [ 368, 373 ], [ 373, 374 ], [ 374, 375 ], [ 375, 376 ], [ 375, 377 ], [ 373, 378 ], [ 378, 379 ], [ 378, 380 ], [ 373, 381 ], [ 381, 382 ], [ 382, 383 ], [ 373, 384 ], [ 384, 385 ], [ 385, 386 ], [ 386, 387 ], [ 386, 388 ], [ 385, 389 ], [ 389, 390 ], [ 368, 391 ], [ 391, 392 ], [ 366, 393 ], [ 393, 394 ], [ 176, 395 ], [ 395, 396 ], [ 395, 397 ], [ 397, 398 ], [ 398, 399 ], [ 398, 400 ], [ 397, 403 ], [ 403, 404 ], [ 404, 405 ], [ 405, 406 ], [ 405, 407 ], [ 403, 408 ], [ 408, 409 ], [ 408, 410 ], [ 403, 411 ], [ 411, 412 ], [ 412, 413 ], [ 403, 414 ], [ 415, 415 ], [ 415, 416 ], [ 416, 417 ], [ 417, 418 ], [ 417, 419 ], [ 416, 420 ], [ 420, 421 ], [ 420, 422 ], [ 397, 423 ], [ 423, 424 ], [ 395, 425 ], [ 425, 426 ], [ 395, 427 ], [ 427, 428 ], [ 176, 429 ], [ 429, 430 ], [ 429, 431 ], [ 431, 432 ], [ 432, 433 ], [ 433, 434 ], [ 434, 435 ], [ 433, 436 ], [ 436, 437 ], [ 176, 438 ], [ 438, 439 ], [ 438, 440 ], [ 440, 441 ], [ 441, 442 ], [ 441, 443 ], [ 440, 445 ], [ 445, 446 ], [ 446, 447 ], [ 447, 448 ], [ 447, 449 ], [ 445, 450 ], [ 450, 451 ], [ 450, 452 ], [ 445, 453 ], [ 453, 454 ], [ 454, 455 ], [ 445, 456 ], [ 456, 457 ], [ 457, 458 ], [ 458, 459 ], [ 458, 460 ], [ 457, 461 ], [ 461, 462 ], [ 440, 463 ], [ 463, 464 ], [ 438, 465 ], [ 465, 466 ], [ 176, 467 ], [ 467, 468 ], [ 467, 469 ], [ 469, 470 ], [ 470, 471 ], [ 470, 472 ], [ 469, 475 ], [ 475, 476 ], [ 476, 477 ], [ 477, 478 ], [ 477, 479 ], [ 475, 480 ], [ 480, 481 ], [ 480, 482 ], [ 475, 483 ], [ 483, 484 ], [ 484, 485 ], [ 475, 486 ], [ 487, 487 ], [ 487, 488 ], [ 488, 489 ], [ 489, 490 ], [ 489, 491 ], [ 488, 492 ], [ 492, 493 ], [ 492, 494 ], [ 469, 495 ], [ 495, 496 ], [ 467, 497 ], [ 497, 498 ], [ 467, 499 ], [ 499, 500 ], [ 176, 501 ], [ 501, 502 ], [ 501, 503 ], [ 503, 504 ], [ 504, 505 ], [ 504, 506 ], [ 506, 507 ], [ 503, 508 ], [ 508, 509 ], [ 509, 510 ], [ 509, 511 ], [ 508, 512 ], [ 512, 513 ], [ 512, 514 ], [ 514, 515 ], [ 503, 516 ], [ 516, 517 ], [ 516, 518 ], [ 503, 519 ], [ 519, 520 ], [ 520, 521 ], [ 521, 522 ], [ 521, 523 ], [ 519, 524 ], [ 524, 525 ], [ 525, 526 ], [ 526, 527 ], [ 525, 528 ], [ 524, 529 ], [ 529, 530 ], [ 529, 531 ], [ 531, 532 ], [ 503, 533 ], [ 533, 534 ], [ 534, 535 ], [ 535, 536 ], [ 176, 537 ], [ 537, 538 ], [ 537, 539 ], [ 539, 540 ], [ 540, 541 ], [ 540, 542 ], [ 539, 544 ], [ 544, 545 ], [ 545, 546 ], [ 546, 547 ], [ 546, 548 ], [ 544, 549 ], [ 549, 550 ], [ 549, 551 ], [ 544, 552 ], [ 552, 553 ], [ 553, 554 ], [ 544, 555 ], [ 555, 556 ], [ 556, 557 ], [ 557, 558 ], [ 557, 559 ], [ 556, 560 ], [ 560, 561 ], [ 539, 562 ], [ 562, 563 ], [ 537, 564 ], [ 564, 565 ], [ 176, 566 ], [ 566, 567 ], [ 566, 568 ], [ 568, 569 ], [ 569, 570 ], [ 569, 571 ], [ 571, 572 ], [ 568, 573 ], [ 573, 574 ], [ 574, 575 ], [ 574, 576 ], [ 573, 577 ], [ 577, 578 ], [ 577, 579 ], [ 579, 580 ], [ 568, 581 ], [ 581, 582 ], [ 581, 583 ], [ 568, 584 ], [ 584, 585 ], [ 585, 586 ], [ 586, 587 ], [ 586, 588 ], [ 584, 589 ], [ 589, 590 ], [ 590, 591 ], [ 591, 592 ], [ 590, 593 ], [ 589, 594 ], [ 594, 595 ], [ 594, 596 ], [ 596, 597 ], [ 568, 598 ], [ 598, 599 ], [ 599, 600 ], [ 600, 601 ], [ 176, 602 ], [ 602, 603 ], [ 602, 604 ], [ 604, 605 ], [ 605, 606 ], [ 605, 607 ], [ 604, 610 ], [ 610, 611 ], [ 611, 612 ], [ 612, 613 ], [ 612, 614 ], [ 610, 615 ], [ 615, 616 ], [ 615, 617 ], [ 610, 618 ], [ 618, 619 ], [ 619, 620 ], [ 610, 621 ], [ 622, 622 ], [ 622, 623 ], [ 623, 624 ], [ 624, 625 ], [ 625, 626 ], [ 625, 627 ], [ 623, 628 ], [ 628, 629 ], [ 628, 630 ], [ 623, 631 ], [ 631, 632 ], [ 632, 633 ], [ 623, 634 ], [ 635, 635 ], [ 635, 636 ], [ 636, 637 ], [ 637, 638 ], [ 638, 639 ], [ 638, 640 ], [ 637, 641 ], [ 636, 642 ], [ 642, 643 ], [ 604, 644 ], [ 644, 645 ], [ 602, 646 ], [ 646, 647 ], [ 602, 648 ], [ 648, 649 ], [ 0, 650 ], [ 650, 651 ], [ 650, 652 ] ]
[ "import java.util.InputMismatchException;\nimport java.io.FileInputStream;\nimport java.io.FileNotFoundException;\nimport java.io.PrintWriter;\nimport java.io.IOException;\nimport java.io.InputStream;\n\npublic class Main {\n InputStream is;\n\n int __t__ = 1;\n int __f__ = 0;\n int __FILE_DEBUG_FLAG__ = __f__;\n String __DEBUG_FILE_NAME__ = \"src/O1\";\n\n FastScanner in;\n PrintWriter out;\n\n public void solve() {\n int x = in.nextInt(), n = in.nextInt();\n int[] a = in.nextIntArray(n);\n\n int[] cnt = new int[301];\n for (int i = 0; i < n; i++) {\n cnt[a[i]]++;\n }\n\n int res = 0;\n for (int i = 0; i < cnt.length; i++) {\n if (cnt[i] == 0 && Math.abs(x - i) < Math.abs(x - res)) {\n res = i;\n }\n }\n System.out.println(res);\n }\n\n public void run() {\n if (__FILE_DEBUG_FLAG__ == __t__) {\n try {\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n System.out.println(\"FILE_INPUT!\");\n } else {\n is = System.in;\n }\n in = new FastScanner(is);\n out = new PrintWriter(System.out);\n\n solve();\n }\n\n public static void main(final String[] args) {\n new Main().run();\n }\n}\n\n\nclass FastScanner {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n\n public FastScanner(InputStream stream) {\n this.stream = stream;\n // stream = new FileInputStream(new File(\"dec.in\"));\n }\n\n int read() {\n if (numChars == -1)\n throw new InputMismatchException();\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 return buf[curChar++];\n }\n\n public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public boolean isEndline(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public int[] nextIntArray(int n) {\n int[] array = new int[n];\n for (int i = 0; i < n; i++)\n array[i] = nextInt();\n\n return array;\n }\n\n public int[][] nextIntMap(int n, int m) {\n int[][] map = new int[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextIntArray(m);\n }\n return map;\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public long[] nextLongArray(int n) {\n long[] array = new long[n];\n for (int i = 0; i < n; i++)\n array[i] = nextLong();\n\n return array;\n }\n\n public long[][] nextLongMap(int n, int m) {\n long[][] map = new long[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextLongArray(m);\n }\n return map;\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public double[] nextDoubleArray(int n) {\n double[] array = new double[n];\n for (int i = 0; i < n; i++)\n array[i] = nextDouble();\n\n return array;\n }\n\n public double[][] nextDoubleMap(int n, int m) {\n double[][] map = new double[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextDoubleArray(m);\n }\n return map;\n }\n\n public String next() {\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 (!isSpaceChar(c));\n return res.toString();\n }\n\n public String[] nextStringArray(int n) {\n String[] array = new String[n];\n for (int i = 0; i < n; i++)\n array[i] = next();\n\n return array;\n }\n\n public String nextLine() {\n int c = read();\n while (isEndline(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndline(c));\n return res.toString();\n }\n\n public int[][] nextPackedIntArrays(int packN, int size) {\n int[][] res = new int[packN][size];\n for (int i = 0; i < size; i++) {\n for (int j = 0; j < packN; j++) {\n res[j][i] = nextInt();\n }\n }\n return res;\n }\n}", "import java.util.InputMismatchException;", "InputMismatchException", "java.util", "import java.io.FileInputStream;", "FileInputStream", "java.io", "import java.io.FileNotFoundException;", "FileNotFoundException", "java.io", "import java.io.PrintWriter;", "PrintWriter", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "public class Main {\n InputStream is;\n\n int __t__ = 1;\n int __f__ = 0;\n int __FILE_DEBUG_FLAG__ = __f__;\n String __DEBUG_FILE_NAME__ = \"src/O1\";\n\n FastScanner in;\n PrintWriter out;\n\n public void solve() {\n int x = in.nextInt(), n = in.nextInt();\n int[] a = in.nextIntArray(n);\n\n int[] cnt = new int[301];\n for (int i = 0; i < n; i++) {\n cnt[a[i]]++;\n }\n\n int res = 0;\n for (int i = 0; i < cnt.length; i++) {\n if (cnt[i] == 0 && Math.abs(x - i) < Math.abs(x - res)) {\n res = i;\n }\n }\n System.out.println(res);\n }\n\n public void run() {\n if (__FILE_DEBUG_FLAG__ == __t__) {\n try {\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n System.out.println(\"FILE_INPUT!\");\n } else {\n is = System.in;\n }\n in = new FastScanner(is);\n out = new PrintWriter(System.out);\n\n solve();\n }\n\n public static void main(final String[] args) {\n new Main().run();\n }\n}", "Main", "InputStream is;", "is", "int __t__ = 1;", "__t__", "1", "int __f__ = 0;", "__f__", "0", "int __FILE_DEBUG_FLAG__ = __f__;", "__FILE_DEBUG_FLAG__", "__f__", "String __DEBUG_FILE_NAME__ = \"src/O1\";", "__DEBUG_FILE_NAME__", "\"src/O1\"", "FastScanner in;", "in", "PrintWriter out;", "out", "public void solve() {\n int x = in.nextInt(), n = in.nextInt();\n int[] a = in.nextIntArray(n);\n\n int[] cnt = new int[301];\n for (int i = 0; i < n; i++) {\n cnt[a[i]]++;\n }\n\n int res = 0;\n for (int i = 0; i < cnt.length; i++) {\n if (cnt[i] == 0 && Math.abs(x - i) < Math.abs(x - res)) {\n res = i;\n }\n }\n System.out.println(res);\n }", "solve", "{\n int x = in.nextInt(), n = in.nextInt();\n int[] a = in.nextIntArray(n);\n\n int[] cnt = new int[301];\n for (int i = 0; i < n; i++) {\n cnt[a[i]]++;\n }\n\n int res = 0;\n for (int i = 0; i < cnt.length; i++) {\n if (cnt[i] == 0 && Math.abs(x - i) < Math.abs(x - res)) {\n res = i;\n }\n }\n System.out.println(res);\n }", "int x = in.nextInt()", "x", "in.nextInt()", "in.nextInt", "in", "n = in.nextInt();", "n", "in.nextInt()", "in.nextInt", "in", "int[] a = in.nextIntArray(n);", "a", "in.nextIntArray(n)", "in.nextIntArray", "in", "n", "int[] cnt = new int[301];", "cnt", "new int[301]", "301", "for (int i = 0; i < n; i++) {\n cnt[a[i]]++;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n cnt[a[i]]++;\n }", "{\n cnt[a[i]]++;\n }", "cnt[a[i]]++", "cnt[a[i]]", "cnt", "a[i]", "a", "i", "int res = 0;", "res", "0", "for (int i = 0; i < cnt.length; i++) {\n if (cnt[i] == 0 && Math.abs(x - i) < Math.abs(x - res)) {\n res = i;\n }\n }", "int i = 0;", "int i = 0;", "i", "0", "i < cnt.length", "i", "cnt.length", "cnt", "cnt.length", "i++", "i++", "i", "{\n if (cnt[i] == 0 && Math.abs(x - i) < Math.abs(x - res)) {\n res = i;\n }\n }", "{\n if (cnt[i] == 0 && Math.abs(x - i) < Math.abs(x - res)) {\n res = i;\n }\n }", "if (cnt[i] == 0 && Math.abs(x - i) < Math.abs(x - res)) {\n res = i;\n }", "cnt[i] == 0 && Math.abs(x - i) < Math.abs(x - res)", "cnt[i] == 0", "cnt[i]", "cnt", "i", "0", "Math.abs(x - i) < Math.abs(x - res)", "Math.abs(x - i)", "Math.abs", "Math", "x - i", "x", "i", "Math.abs(x - res)", "Math.abs", "Math", "x - res", "x", "res", "{\n res = i;\n }", "res = i", "res", "i", "System.out.println(res)", "System.out.println", "System.out", "System", "System.out", "res", "public void run() {\n if (__FILE_DEBUG_FLAG__ == __t__) {\n try {\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n System.out.println(\"FILE_INPUT!\");\n } else {\n is = System.in;\n }\n in = new FastScanner(is);\n out = new PrintWriter(System.out);\n\n solve();\n }", "run", "{\n if (__FILE_DEBUG_FLAG__ == __t__) {\n try {\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n System.out.println(\"FILE_INPUT!\");\n } else {\n is = System.in;\n }\n in = new FastScanner(is);\n out = new PrintWriter(System.out);\n\n solve();\n }", "if (__FILE_DEBUG_FLAG__ == __t__) {\n try {\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n System.out.println(\"FILE_INPUT!\");\n } else {\n is = System.in;\n }", "__FILE_DEBUG_FLAG__ == __t__", "__FILE_DEBUG_FLAG__", "__t__", "{\n try {\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n System.out.println(\"FILE_INPUT!\");\n }", "try {\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }", "catch (FileNotFoundException e) {\n e.printStackTrace();\n }", "FileNotFoundException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n }", "is = new FileInputStream(__DEBUG_FILE_NAME__)", "is", "new FileInputStream(__DEBUG_FILE_NAME__)", "System.out.println(\"FILE_INPUT!\")", "System.out.println", "System.out", "System", "System.out", "\"FILE_INPUT!\"", "{\n is = System.in;\n }", "is = System.in", "is", "System.in", "System", "System.in", "in = new FastScanner(is)", "in", "new FastScanner(is)", "out = new PrintWriter(System.out)", "out", "new PrintWriter(System.out)", "solve()", "solve", "public static void main(final String[] args) {\n new Main().run();\n }", "main", "{\n new Main().run();\n }", "new Main().run()", "new Main().run", "new Main()", "final String[] args", "args", "class FastScanner {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n\n public FastScanner(InputStream stream) {\n this.stream = stream;\n // stream = new FileInputStream(new File(\"dec.in\"));\n }\n\n int read() {\n if (numChars == -1)\n throw new InputMismatchException();\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 return buf[curChar++];\n }\n\n public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public boolean isEndline(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public int[] nextIntArray(int n) {\n int[] array = new int[n];\n for (int i = 0; i < n; i++)\n array[i] = nextInt();\n\n return array;\n }\n\n public int[][] nextIntMap(int n, int m) {\n int[][] map = new int[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextIntArray(m);\n }\n return map;\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public long[] nextLongArray(int n) {\n long[] array = new long[n];\n for (int i = 0; i < n; i++)\n array[i] = nextLong();\n\n return array;\n }\n\n public long[][] nextLongMap(int n, int m) {\n long[][] map = new long[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextLongArray(m);\n }\n return map;\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public double[] nextDoubleArray(int n) {\n double[] array = new double[n];\n for (int i = 0; i < n; i++)\n array[i] = nextDouble();\n\n return array;\n }\n\n public double[][] nextDoubleMap(int n, int m) {\n double[][] map = new double[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextDoubleArray(m);\n }\n return map;\n }\n\n public String next() {\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 (!isSpaceChar(c));\n return res.toString();\n }\n\n public String[] nextStringArray(int n) {\n String[] array = new String[n];\n for (int i = 0; i < n; i++)\n array[i] = next();\n\n return array;\n }\n\n public String nextLine() {\n int c = read();\n while (isEndline(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndline(c));\n return res.toString();\n }\n\n public int[][] nextPackedIntArrays(int packN, int size) {\n int[][] res = new int[packN][size];\n for (int i = 0; i < size; i++) {\n for (int j = 0; j < packN; j++) {\n res[j][i] = nextInt();\n }\n }\n return res;\n }\n}", "FastScanner", "private InputStream stream;", "stream", "private byte[] buf = new byte[1024];", "buf", "new byte[1024]", "1024", "private int curChar;", "curChar", "private int numChars;", "numChars", "public FastScanner(InputStream stream) {\n this.stream = stream;\n // stream = new FileInputStream(new File(\"dec.in\"));\n }", "FastScanner", "{\n this.stream = stream;\n // stream = new FileInputStream(new File(\"dec.in\"));\n }", "this.stream = stream", "this.stream", "this", "this.stream", "stream", "InputStream stream", "stream", "int read() {\n if (numChars == -1)\n throw new InputMismatchException();\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 return buf[curChar++];\n }", "read", "{\n if (numChars == -1)\n throw new InputMismatchException();\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 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 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 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 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", "public boolean isEndline(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }", "isEndline", "{\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 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 int[] nextIntArray(int n) {\n int[] array = new int[n];\n for (int i = 0; i < n; i++)\n array[i] = nextInt();\n\n return array;\n }", "nextIntArray", "{\n int[] array = new int[n];\n for (int i = 0; i < n; i++)\n array[i] = nextInt();\n\n return array;\n }", "int[] array = new int[n];", "array", "new int[n]", "n", "for (int i = 0; i < n; i++)\n 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 int[][] nextIntMap(int n, int m) {\n int[][] map = new int[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextIntArray(m);\n }\n return map;\n }", "nextIntMap", "{\n int[][] map = new int[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextIntArray(m);\n }\n return map;\n }", "int[][] map = new int[n][m];", "map", "new int[n][m]", "n", "m", "for (int i = 0; i < n; i++) {\n map[i] = nextIntArray(m);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n map[i] = nextIntArray(m);\n }", "{\n map[i] = nextIntArray(m);\n }", "map[i] = nextIntArray(m)", "map[i]", "map", "i", "nextIntArray(m)", "nextIntArray", "m", "return map;", "map", "int n", "n", "int m", "m", "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", "public long[] nextLongArray(int n) {\n long[] array = new long[n];\n for (int i = 0; i < n; i++)\n array[i] = nextLong();\n\n return array;\n }", "nextLongArray", "{\n long[] array = new long[n];\n for (int i = 0; i < n; i++)\n array[i] = nextLong();\n\n return array;\n }", "long[] array = new long[n];", "array", "new long[n]", "n", "for (int i = 0; i < n; i++)\n array[i] = nextLong();", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "array[i] = nextLong();", "array[i] = nextLong()", "array[i]", "array", "i", "nextLong()", "nextLong", "return array;", "array", "int n", "n", "public long[][] nextLongMap(int n, int m) {\n long[][] map = new long[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextLongArray(m);\n }\n return map;\n }", "nextLongMap", "{\n long[][] map = new long[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextLongArray(m);\n }\n return map;\n }", "long[][] map = new long[n][m];", "map", "new long[n][m]", "n", "m", "for (int i = 0; i < n; i++) {\n map[i] = nextLongArray(m);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n map[i] = nextLongArray(m);\n }", "{\n map[i] = nextLongArray(m);\n }", "map[i] = nextLongArray(m)", "map[i]", "map", "i", "nextLongArray(m)", "nextLongArray", "m", "return map;", "map", "int n", "n", "int m", "m", "public 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", "public double[] nextDoubleArray(int n) {\n double[] array = new double[n];\n for (int i = 0; i < n; i++)\n array[i] = nextDouble();\n\n return array;\n }", "nextDoubleArray", "{\n double[] array = new double[n];\n for (int i = 0; i < n; i++)\n array[i] = nextDouble();\n\n return array;\n }", "double[] array = new double[n];", "array", "new double[n]", "n", "for (int i = 0; i < n; i++)\n array[i] = nextDouble();", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "array[i] = nextDouble();", "array[i] = nextDouble()", "array[i]", "array", "i", "nextDouble()", "nextDouble", "return array;", "array", "int n", "n", "public double[][] nextDoubleMap(int n, int m) {\n double[][] map = new double[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextDoubleArray(m);\n }\n return map;\n }", "nextDoubleMap", "{\n double[][] map = new double[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextDoubleArray(m);\n }\n return map;\n }", "double[][] map = new double[n][m];", "map", "new double[n][m]", "n", "m", "for (int i = 0; i < n; i++) {\n map[i] = nextDoubleArray(m);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n map[i] = nextDoubleArray(m);\n }", "{\n map[i] = nextDoubleArray(m);\n }", "map[i] = nextDoubleArray(m)", "map[i]", "map", "i", "nextDoubleArray(m)", "nextDoubleArray", "m", "return map;", "map", "int n", "n", "int m", "m", "public String next() {\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 (!isSpaceChar(c));\n return res.toString();\n }", "next", "{\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 (!isSpaceChar(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 (!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[] nextStringArray(int n) {\n String[] array = new String[n];\n for (int i = 0; i < n; i++)\n array[i] = next();\n\n return array;\n }", "nextStringArray", "{\n String[] array = new String[n];\n for (int i = 0; i < n; i++)\n array[i] = next();\n\n return array;\n }", "String[] array = new String[n];", "array", "new String[n]", "n", "for (int i = 0; i < n; i++)\n array[i] = next();", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "array[i] = next();", "array[i] = next()", "array[i]", "array", "i", "next()", "next", "return array;", "array", "int n", "n", "public String nextLine() {\n int c = read();\n while (isEndline(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndline(c));\n return res.toString();\n }", "nextLine", "{\n int c = read();\n while (isEndline(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndline(c));\n return res.toString();\n }", "int c = read();", "c", "read()", "read", "while (isEndline(c))\n c = read();", "isEndline(c)", "isEndline", "c", "c = read()", "c", "read()", "read", "StringBuilder res = new StringBuilder();", "res", "new StringBuilder()", "do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndline(c));", "!isEndline(c)", "isEndline(c)", "isEndline", "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 int[][] nextPackedIntArrays(int packN, int size) {\n int[][] res = new int[packN][size];\n for (int i = 0; i < size; i++) {\n for (int j = 0; j < packN; j++) {\n res[j][i] = nextInt();\n }\n }\n return res;\n }", "nextPackedIntArrays", "{\n int[][] res = new int[packN][size];\n for (int i = 0; i < size; i++) {\n for (int j = 0; j < packN; j++) {\n res[j][i] = nextInt();\n }\n }\n return res;\n }", "int[][] res = new int[packN][size];", "res", "new int[packN][size]", "packN", "size", "for (int i = 0; i < size; i++) {\n for (int j = 0; j < packN; j++) {\n res[j][i] = nextInt();\n }\n }", "int i = 0;", "int i = 0;", "i", "0", "i < size", "i", "size", "i++", "i++", "i", "{\n for (int j = 0; j < packN; j++) {\n res[j][i] = nextInt();\n }\n }", "{\n for (int j = 0; j < packN; j++) {\n res[j][i] = nextInt();\n }\n }", "for (int j = 0; j < packN; j++) {\n res[j][i] = nextInt();\n }", "int j = 0;", "int j = 0;", "j", "0", "j < packN", "j", "packN", "j++", "j++", "j", "{\n res[j][i] = nextInt();\n }", "{\n res[j][i] = nextInt();\n }", "res[j][i] = nextInt()", "res[j][i]", "res[j]", "res", "j", "i", "nextInt()", "nextInt", "return res;", "res", "int packN", "packN", "int size", "size", "public class Main {\n InputStream is;\n\n int __t__ = 1;\n int __f__ = 0;\n int __FILE_DEBUG_FLAG__ = __f__;\n String __DEBUG_FILE_NAME__ = \"src/O1\";\n\n FastScanner in;\n PrintWriter out;\n\n public void solve() {\n int x = in.nextInt(), n = in.nextInt();\n int[] a = in.nextIntArray(n);\n\n int[] cnt = new int[301];\n for (int i = 0; i < n; i++) {\n cnt[a[i]]++;\n }\n\n int res = 0;\n for (int i = 0; i < cnt.length; i++) {\n if (cnt[i] == 0 && Math.abs(x - i) < Math.abs(x - res)) {\n res = i;\n }\n }\n System.out.println(res);\n }\n\n public void run() {\n if (__FILE_DEBUG_FLAG__ == __t__) {\n try {\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n System.out.println(\"FILE_INPUT!\");\n } else {\n is = System.in;\n }\n in = new FastScanner(is);\n out = new PrintWriter(System.out);\n\n solve();\n }\n\n public static void main(final String[] args) {\n new Main().run();\n }\n}", "public class Main {\n InputStream is;\n\n int __t__ = 1;\n int __f__ = 0;\n int __FILE_DEBUG_FLAG__ = __f__;\n String __DEBUG_FILE_NAME__ = \"src/O1\";\n\n FastScanner in;\n PrintWriter out;\n\n public void solve() {\n int x = in.nextInt(), n = in.nextInt();\n int[] a = in.nextIntArray(n);\n\n int[] cnt = new int[301];\n for (int i = 0; i < n; i++) {\n cnt[a[i]]++;\n }\n\n int res = 0;\n for (int i = 0; i < cnt.length; i++) {\n if (cnt[i] == 0 && Math.abs(x - i) < Math.abs(x - res)) {\n res = i;\n }\n }\n System.out.println(res);\n }\n\n public void run() {\n if (__FILE_DEBUG_FLAG__ == __t__) {\n try {\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n System.out.println(\"FILE_INPUT!\");\n } else {\n is = System.in;\n }\n in = new FastScanner(is);\n out = new PrintWriter(System.out);\n\n solve();\n }\n\n public static void main(final String[] args) {\n new Main().run();\n }\n}", "Main" ]
import java.util.InputMismatchException; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.PrintWriter; import java.io.IOException; import java.io.InputStream; public class Main { InputStream is; int __t__ = 1; int __f__ = 0; int __FILE_DEBUG_FLAG__ = __f__; String __DEBUG_FILE_NAME__ = "src/O1"; FastScanner in; PrintWriter out; public void solve() { int x = in.nextInt(), n = in.nextInt(); int[] a = in.nextIntArray(n); int[] cnt = new int[301]; for (int i = 0; i < n; i++) { cnt[a[i]]++; } int res = 0; for (int i = 0; i < cnt.length; i++) { if (cnt[i] == 0 && Math.abs(x - i) < Math.abs(x - res)) { res = i; } } System.out.println(res); } public void run() { if (__FILE_DEBUG_FLAG__ == __t__) { try { is = new FileInputStream(__DEBUG_FILE_NAME__); } catch (FileNotFoundException e) { e.printStackTrace(); } System.out.println("FILE_INPUT!"); } else { is = System.in; } in = new FastScanner(is); out = new PrintWriter(System.out); solve(); } public static void main(final String[] args) { new Main().run(); } } class FastScanner { private InputStream stream; private byte[] buf = new byte[1024]; private int curChar; private int numChars; public FastScanner(InputStream stream) { this.stream = stream; // stream = new FileInputStream(new File("dec.in")); } 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 boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; } public boolean isEndline(int c) { return c == '\n' || c == '\r' || c == -1; } public int nextInt() { return Integer.parseInt(next()); } public int[] nextIntArray(int n) { int[] array = new int[n]; for (int i = 0; i < n; i++) array[i] = nextInt(); return array; } public int[][] nextIntMap(int n, int m) { int[][] map = new int[n][m]; for (int i = 0; i < n; i++) { map[i] = nextIntArray(m); } return map; } public long nextLong() { return Long.parseLong(next()); } public long[] nextLongArray(int n) { long[] array = new long[n]; for (int i = 0; i < n; i++) array[i] = nextLong(); return array; } public long[][] nextLongMap(int n, int m) { long[][] map = new long[n][m]; for (int i = 0; i < n; i++) { map[i] = nextLongArray(m); } return map; } public double nextDouble() { return Double.parseDouble(next()); } public double[] nextDoubleArray(int n) { double[] array = new double[n]; for (int i = 0; i < n; i++) array[i] = nextDouble(); return array; } public double[][] nextDoubleMap(int n, int m) { double[][] map = new double[n][m]; for (int i = 0; i < n; i++) { map[i] = nextDoubleArray(m); } return map; } public String next() { 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[] nextStringArray(int n) { String[] array = new String[n]; for (int i = 0; i < n; i++) array[i] = next(); return array; } public String nextLine() { int c = read(); while (isEndline(c)) c = read(); StringBuilder res = new StringBuilder(); do { res.appendCodePoint(c); c = read(); } while (!isEndline(c)); return res.toString(); } public int[][] nextPackedIntArrays(int packN, int size) { int[][] res = new int[packN][size]; for (int i = 0; i < size; i++) { for (int j = 0; j < packN; j++) { res[j][i] = nextInt(); } } return res; } }
[ 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, 41, 13, 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, 17, 1, 40, 13, 30, 30, 14, 2, 2, 4, 18, 13, 2, 13, 13, 13, 40, 4, 18, 4, 18, 13, 13, 13, 30, 0, 13, 4, 18, 13, 2, 13, 13, 0, 13, 13, 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 ], [ 107, 8 ], [ 107, 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 ], [ 32, 34 ], [ 11, 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 ], [ 11, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 55, 60 ], [ 60, 61 ], [ 60, 62 ], [ 55, 63 ], [ 63, 64 ], [ 64, 65 ], [ 55, 66 ], [ 67, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 71, 74 ], [ 74, 75 ], [ 74, 76 ], [ 70, 77 ], [ 69, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 81, 84 ], [ 79, 85 ], [ 68, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 90, 91 ], [ 89, 92 ], [ 92, 93 ], [ 92, 94 ], [ 86, 95 ], [ 95, 96 ], [ 95, 97 ], [ 11, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 98, 103 ], [ 9, 104 ], [ 104, 105 ], [ 0, 106 ], [ 106, 107 ], [ 106, 108 ] ]
[ "import java.util.Arrays;\nimport 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 X = scan.nextInt();\n\t\tint N = scan.nextInt();\n\t\tInteger p[] = new Integer[N];\n\t\t//int min = Math.abs(100 - X);\n\t\tint min = 100;\n int result = X;\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tp[i] = scan.nextInt();\n\t\t}\n\n\t\tfor (int i = 0; i <= 200; i++) {\n\t\t\tif (Math.abs(X - i) < min && !Arrays.asList(p).contains(i)) {\n\t\t\t\tmin = Math.abs(X - i);\n\t\t\t\tresult = i;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(result);\n\n\t}\n\n}", "import java.util.Arrays;", "Arrays", "java.util", "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 X = scan.nextInt();\n\t\tint N = scan.nextInt();\n\t\tInteger p[] = new Integer[N];\n\t\t//int min = Math.abs(100 - X);\n\t\tint min = 100;\n int result = X;\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tp[i] = scan.nextInt();\n\t\t}\n\n\t\tfor (int i = 0; i <= 200; i++) {\n\t\t\tif (Math.abs(X - i) < min && !Arrays.asList(p).contains(i)) {\n\t\t\t\tmin = Math.abs(X - i);\n\t\t\t\tresult = i;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(result);\n\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint X = scan.nextInt();\n\t\tint N = scan.nextInt();\n\t\tInteger p[] = new Integer[N];\n\t\t//int min = Math.abs(100 - X);\n\t\tint min = 100;\n int result = X;\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tp[i] = scan.nextInt();\n\t\t}\n\n\t\tfor (int i = 0; i <= 200; i++) {\n\t\t\tif (Math.abs(X - i) < min && !Arrays.asList(p).contains(i)) {\n\t\t\t\tmin = Math.abs(X - i);\n\t\t\t\tresult = i;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(result);\n\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint X = scan.nextInt();\n\t\tint N = scan.nextInt();\n\t\tInteger p[] = new Integer[N];\n\t\t//int min = Math.abs(100 - X);\n\t\tint min = 100;\n int result = X;\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tp[i] = scan.nextInt();\n\t\t}\n\n\t\tfor (int i = 0; i <= 200; i++) {\n\t\t\tif (Math.abs(X - i) < min && !Arrays.asList(p).contains(i)) {\n\t\t\t\tmin = Math.abs(X - i);\n\t\t\t\tresult = i;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(result);\n\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int X = scan.nextInt();", "X", "scan.nextInt()", "scan.nextInt", "scan", "int N = scan.nextInt();", "N", "scan.nextInt()", "scan.nextInt", "scan", "Integer p[] = new Integer[N];", "p", "new Integer[N]", "N", "int min = 100;", "min", "100", "int result = X;", "result", "X", "for (int i = 0; i < N; i++) {\n\t\t\tp[i] = scan.nextInt();\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < N", "i", "N", "i++", "i++", "i", "{\n\t\t\tp[i] = scan.nextInt();\n\t\t}", "{\n\t\t\tp[i] = scan.nextInt();\n\t\t}", "p[i] = scan.nextInt()", "p[i]", "p", "i", "scan.nextInt()", "scan.nextInt", "scan", "for (int i = 0; i <= 200; i++) {\n\t\t\tif (Math.abs(X - i) < min && !Arrays.asList(p).contains(i)) {\n\t\t\t\tmin = Math.abs(X - i);\n\t\t\t\tresult = i;\n\t\t\t}\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i <= 200", "i", "200", "i++", "i++", "i", "{\n\t\t\tif (Math.abs(X - i) < min && !Arrays.asList(p).contains(i)) {\n\t\t\t\tmin = Math.abs(X - i);\n\t\t\t\tresult = i;\n\t\t\t}\n\t\t}", "{\n\t\t\tif (Math.abs(X - i) < min && !Arrays.asList(p).contains(i)) {\n\t\t\t\tmin = Math.abs(X - i);\n\t\t\t\tresult = i;\n\t\t\t}\n\t\t}", "if (Math.abs(X - i) < min && !Arrays.asList(p).contains(i)) {\n\t\t\t\tmin = Math.abs(X - i);\n\t\t\t\tresult = i;\n\t\t\t}", "Math.abs(X - i) < min && !Arrays.asList(p).contains(i)", "Math.abs(X - i) < min", "Math.abs(X - i)", "Math.abs", "Math", "X - i", "X", "i", "min", "!Arrays.asList(p).contains(i)", "Arrays.asList(p).contains(i)", "Arrays.asList(p).contains", "Arrays.asList(p)", "Arrays.asList", "Arrays", "p", "i", "{\n\t\t\t\tmin = Math.abs(X - i);\n\t\t\t\tresult = i;\n\t\t\t}", "min = Math.abs(X - i)", "min", "Math.abs(X - i)", "Math.abs", "Math", "X - i", "X", "i", "result = i", "result", "i", "System.out.println(result)", "System.out.println", "System.out", "System", "System.out", "result", "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 X = scan.nextInt();\n\t\tint N = scan.nextInt();\n\t\tInteger p[] = new Integer[N];\n\t\t//int min = Math.abs(100 - X);\n\t\tint min = 100;\n int result = X;\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tp[i] = scan.nextInt();\n\t\t}\n\n\t\tfor (int i = 0; i <= 200; i++) {\n\t\t\tif (Math.abs(X - i) < min && !Arrays.asList(p).contains(i)) {\n\t\t\t\tmin = Math.abs(X - i);\n\t\t\t\tresult = i;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(result);\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 X = scan.nextInt();\n\t\tint N = scan.nextInt();\n\t\tInteger p[] = new Integer[N];\n\t\t//int min = Math.abs(100 - X);\n\t\tint min = 100;\n int result = X;\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tp[i] = scan.nextInt();\n\t\t}\n\n\t\tfor (int i = 0; i <= 200; i++) {\n\t\t\tif (Math.abs(X - i) < min && !Arrays.asList(p).contains(i)) {\n\t\t\t\tmin = Math.abs(X - i);\n\t\t\t\tresult = i;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(result);\n\n\t}\n\n}", "Main" ]
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int X = scan.nextInt(); int N = scan.nextInt(); Integer p[] = new Integer[N]; //int min = Math.abs(100 - X); int min = 100; int result = X; for (int i = 0; i < N; i++) { p[i] = scan.nextInt(); } for (int i = 0; i <= 200; i++) { if (Math.abs(X - i) < min && !Arrays.asList(p).contains(i)) { min = Math.abs(X - i); result = i; } } System.out.println(result); } }
[ 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, 40, 17, 41, 13, 20, 11, 1, 41, 13, 40, 17, 2, 13, 17, 1, 40, 13, 30, 30, 4, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 1, 40, 13, 30, 30, 14, 2, 13, 4, 18, 13, 13, 30, 4, 18, 13, 13, 3, 41, 13, 17, 41, 13, 40, 17, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 1, 40, 13, 30, 30, 14, 2, 13, 4, 18, 13, 2, 13, 4, 18, 13, 13, 30, 0, 13, 4, 18, 13, 2, 13, 4, 18, 13, 13, 0, 13, 4, 18, 13, 13, 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 ], [ 157, 8 ], [ 157, 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 ], [ 27, 28 ], [ 11, 29 ], [ 29, 30 ], [ 29, 31 ], [ 11, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 32, 38 ], [ 38, 39 ], [ 38, 40 ], [ 32, 41 ], [ 41, 42 ], [ 42, 43 ], [ 32, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 46, 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 ], [ 62, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 68, 78 ], [ 78, 79 ], [ 79, 80 ], [ 68, 81 ], [ 82, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 87, 88 ], [ 86, 89 ], [ 83, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 90, 95 ], [ 11, 96 ], [ 96, 97 ], [ 96, 98 ], [ 11, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 11, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 103, 108 ], [ 108, 109 ], [ 108, 110 ], [ 110, 111 ], [ 111, 112 ], [ 103, 113 ], [ 113, 114 ], [ 114, 115 ], [ 103, 116 ], [ 117, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 121, 122 ], [ 122, 123 ], [ 121, 124 ], [ 124, 125 ], [ 124, 126 ], [ 126, 127 ], [ 127, 128 ], [ 126, 129 ], [ 118, 130 ], [ 130, 131 ], [ 131, 132 ], [ 131, 133 ], [ 133, 134 ], [ 134, 135 ], [ 133, 136 ], [ 136, 137 ], [ 136, 138 ], [ 138, 139 ], [ 139, 140 ], [ 138, 141 ], [ 130, 142 ], [ 142, 143 ], [ 142, 144 ], [ 144, 145 ], [ 145, 146 ], [ 144, 147 ], [ 11, 148 ], [ 148, 149 ], [ 149, 150 ], [ 150, 151 ], [ 150, 152 ], [ 148, 153 ], [ 9, 154 ], [ 154, 155 ], [ 0, 156 ], [ 156, 157 ], [ 156, 158 ] ]
[ "import java.util.*; \nimport java.lang.*; \n\n\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n \n int X = scan.nextInt();\n int N = scan.nextInt();\n \n int min1=-1;\n ArrayList<Integer> list = new ArrayList<>();\n for(int i=-1; i<=101; i++){\n list.add(i);\n } \n for(int i=0; i<N;i++){\n int p = scan.nextInt();\n for(int j=0; j<list.size(); j++){\n if(p==list.get(j)){\n list.remove(j);\n break;\n }\n }\n }\n int sa = 1000;\n int ans = -1;\n for(int i=0; i<list.size();i++){\n if(sa>Math.abs(X-list.get(i))){\n sa = Math.abs(X-list.get(i));\n ans = list.get(i);\n }\n }\n \n System.out.println(ans);\n }\n}", "import java.util.*;", "util.*", "java", "import java.lang.*;", "lang.*", "java", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n \n int X = scan.nextInt();\n int N = scan.nextInt();\n \n int min1=-1;\n ArrayList<Integer> list = new ArrayList<>();\n for(int i=-1; i<=101; i++){\n list.add(i);\n } \n for(int i=0; i<N;i++){\n int p = scan.nextInt();\n for(int j=0; j<list.size(); j++){\n if(p==list.get(j)){\n list.remove(j);\n break;\n }\n }\n }\n int sa = 1000;\n int ans = -1;\n for(int i=0; i<list.size();i++){\n if(sa>Math.abs(X-list.get(i))){\n sa = Math.abs(X-list.get(i));\n ans = list.get(i);\n }\n }\n \n System.out.println(ans);\n }\n}", "Main", "public static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n \n int X = scan.nextInt();\n int N = scan.nextInt();\n \n int min1=-1;\n ArrayList<Integer> list = new ArrayList<>();\n for(int i=-1; i<=101; i++){\n list.add(i);\n } \n for(int i=0; i<N;i++){\n int p = scan.nextInt();\n for(int j=0; j<list.size(); j++){\n if(p==list.get(j)){\n list.remove(j);\n break;\n }\n }\n }\n int sa = 1000;\n int ans = -1;\n for(int i=0; i<list.size();i++){\n if(sa>Math.abs(X-list.get(i))){\n sa = Math.abs(X-list.get(i));\n ans = list.get(i);\n }\n }\n \n System.out.println(ans);\n }", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n \n int X = scan.nextInt();\n int N = scan.nextInt();\n \n int min1=-1;\n ArrayList<Integer> list = new ArrayList<>();\n for(int i=-1; i<=101; i++){\n list.add(i);\n } \n for(int i=0; i<N;i++){\n int p = scan.nextInt();\n for(int j=0; j<list.size(); j++){\n if(p==list.get(j)){\n list.remove(j);\n break;\n }\n }\n }\n int sa = 1000;\n int ans = -1;\n for(int i=0; i<list.size();i++){\n if(sa>Math.abs(X-list.get(i))){\n sa = Math.abs(X-list.get(i));\n ans = list.get(i);\n }\n }\n \n System.out.println(ans);\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int X = scan.nextInt();", "X", "scan.nextInt()", "scan.nextInt", "scan", "int N = scan.nextInt();", "N", "scan.nextInt()", "scan.nextInt", "scan", "int min1=-1;", "min1", "-1", "1", "ArrayList<Integer> list = new ArrayList<>();", "list", "new ArrayList<>()", "for(int i=-1; i<=101; i++){\n list.add(i);\n }", "int i=-1;", "int i=-1;", "i", "-1", "1", "i<=101", "i", "101", "i++", "i++", "i", "{\n list.add(i);\n }", "{\n list.add(i);\n }", "list.add(i)", "list.add", "list", "i", "for(int i=0; i<N;i++){\n int p = scan.nextInt();\n for(int j=0; j<list.size(); j++){\n if(p==list.get(j)){\n list.remove(j);\n break;\n }\n }\n }", "int i=0;", "int i=0;", "i", "0", "i<N", "i", "N", "i++", "i++", "i", "{\n int p = scan.nextInt();\n for(int j=0; j<list.size(); j++){\n if(p==list.get(j)){\n list.remove(j);\n break;\n }\n }\n }", "{\n int p = scan.nextInt();\n for(int j=0; j<list.size(); j++){\n if(p==list.get(j)){\n list.remove(j);\n break;\n }\n }\n }", "int p = scan.nextInt();", "p", "scan.nextInt()", "scan.nextInt", "scan", "for(int j=0; j<list.size(); j++){\n if(p==list.get(j)){\n list.remove(j);\n break;\n }\n }", "int j=0;", "int j=0;", "j", "0", "j<list.size()", "j", "list.size()", "list.size", "list", "j++", "j++", "j", "{\n if(p==list.get(j)){\n list.remove(j);\n break;\n }\n }", "{\n if(p==list.get(j)){\n list.remove(j);\n break;\n }\n }", "if(p==list.get(j)){\n list.remove(j);\n break;\n }", "p==list.get(j)", "p", "list.get(j)", "list.get", "list", "j", "{\n list.remove(j);\n break;\n }", "list.remove(j)", "list.remove", "list", "j", "break;", "int sa = 1000;", "sa", "1000", "int ans = -1;", "ans", "-1", "1", "for(int i=0; i<list.size();i++){\n if(sa>Math.abs(X-list.get(i))){\n sa = Math.abs(X-list.get(i));\n ans = list.get(i);\n }\n }", "int i=0;", "int i=0;", "i", "0", "i<list.size()", "i", "list.size()", "list.size", "list", "i++", "i++", "i", "{\n if(sa>Math.abs(X-list.get(i))){\n sa = Math.abs(X-list.get(i));\n ans = list.get(i);\n }\n }", "{\n if(sa>Math.abs(X-list.get(i))){\n sa = Math.abs(X-list.get(i));\n ans = list.get(i);\n }\n }", "if(sa>Math.abs(X-list.get(i))){\n sa = Math.abs(X-list.get(i));\n ans = list.get(i);\n }", "sa>Math.abs(X-list.get(i))", "sa", "Math.abs(X-list.get(i))", "Math.abs", "Math", "X-list.get(i)", "X", "list.get(i)", "list.get", "list", "i", "{\n sa = Math.abs(X-list.get(i));\n ans = list.get(i);\n }", "sa = Math.abs(X-list.get(i))", "sa", "Math.abs(X-list.get(i))", "Math.abs", "Math", "X-list.get(i)", "X", "list.get(i)", "list.get", "list", "i", "ans = list.get(i)", "ans", "list.get(i)", "list.get", "list", "i", "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 scan = new Scanner(System.in);\n \n int X = scan.nextInt();\n int N = scan.nextInt();\n \n int min1=-1;\n ArrayList<Integer> list = new ArrayList<>();\n for(int i=-1; i<=101; i++){\n list.add(i);\n } \n for(int i=0; i<N;i++){\n int p = scan.nextInt();\n for(int j=0; j<list.size(); j++){\n if(p==list.get(j)){\n list.remove(j);\n break;\n }\n }\n }\n int sa = 1000;\n int ans = -1;\n for(int i=0; i<list.size();i++){\n if(sa>Math.abs(X-list.get(i))){\n sa = Math.abs(X-list.get(i));\n ans = list.get(i);\n }\n }\n \n System.out.println(ans);\n }\n}", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n \n int X = scan.nextInt();\n int N = scan.nextInt();\n \n int min1=-1;\n ArrayList<Integer> list = new ArrayList<>();\n for(int i=-1; i<=101; i++){\n list.add(i);\n } \n for(int i=0; i<N;i++){\n int p = scan.nextInt();\n for(int j=0; j<list.size(); j++){\n if(p==list.get(j)){\n list.remove(j);\n break;\n }\n }\n }\n int sa = 1000;\n int ans = -1;\n for(int i=0; i<list.size();i++){\n if(sa>Math.abs(X-list.get(i))){\n sa = Math.abs(X-list.get(i));\n ans = list.get(i);\n }\n }\n \n System.out.println(ans);\n }\n}", "Main" ]
import java.util.*; import java.lang.*; public class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); int X = scan.nextInt(); int N = scan.nextInt(); int min1=-1; ArrayList<Integer> list = new ArrayList<>(); for(int i=-1; i<=101; i++){ list.add(i); } for(int i=0; i<N;i++){ int p = scan.nextInt(); for(int j=0; j<list.size(); j++){ if(p==list.get(j)){ list.remove(j); break; } } } int sa = 1000; int ans = -1; for(int i=0; i<list.size();i++){ if(sa>Math.abs(X-list.get(i))){ sa = Math.abs(X-list.get(i)); ans = list.get(i); } } System.out.println(ans); } }
[ 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, 20, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 29, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 14, 40, 4, 18, 13, 13, 30, 4, 18, 18, 13, 13, 13, 29, 41, 13, 4, 18, 13, 2, 13, 17, 41, 13, 17, 11, 1, 41, 13, 2, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 40, 4, 18, 13, 13, 30, 0, 13, 13, 0, 13, 4, 18, 13, 2, 13, 13, 3, 41, 13, 4, 18, 13, 2, 17, 13, 41, 13, 17, 11, 1, 41, 13, 2, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 40, 4, 18, 13, 13, 30, 0, 13, 13, 0, 13, 4, 18, 13, 2, 13, 13, 3, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 30, 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 ], [ 198, 11 ], [ 198, 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 ], [ 32, 34 ], [ 31, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 36, 41 ], [ 35, 42 ], [ 14, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 43, 48 ], [ 48, 49 ], [ 48, 50 ], [ 43, 51 ], [ 51, 52 ], [ 52, 53 ], [ 43, 54 ], [ 55, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 56, 59 ], [ 59, 60 ], [ 60, 61 ], [ 14, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 64, 67 ], [ 62, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 69, 74 ], [ 68, 75 ], [ 14, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 78, 81 ], [ 81, 82 ], [ 81, 83 ], [ 14, 84 ], [ 84, 85 ], [ 84, 86 ], [ 14, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 91, 93 ], [ 87, 94 ], [ 94, 95 ], [ 94, 96 ], [ 87, 97 ], [ 97, 98 ], [ 98, 99 ], [ 87, 100 ], [ 101, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 104, 107 ], [ 102, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 108, 112 ], [ 112, 113 ], [ 112, 114 ], [ 114, 115 ], [ 115, 116 ], [ 114, 117 ], [ 117, 118 ], [ 117, 119 ], [ 108, 120 ], [ 14, 121 ], [ 121, 122 ], [ 121, 123 ], [ 123, 124 ], [ 124, 125 ], [ 123, 126 ], [ 126, 127 ], [ 126, 128 ], [ 14, 129 ], [ 129, 130 ], [ 129, 131 ], [ 14, 132 ], [ 132, 133 ], [ 133, 134 ], [ 134, 135 ], [ 134, 136 ], [ 136, 137 ], [ 136, 138 ], [ 132, 139 ], [ 139, 140 ], [ 139, 141 ], [ 132, 142 ], [ 142, 143 ], [ 143, 144 ], [ 132, 145 ], [ 146, 146 ], [ 146, 147 ], [ 147, 148 ], [ 148, 149 ], [ 149, 150 ], [ 150, 151 ], [ 149, 152 ], [ 147, 153 ], [ 153, 154 ], [ 154, 155 ], [ 154, 156 ], [ 153, 157 ], [ 157, 158 ], [ 157, 159 ], [ 159, 160 ], [ 160, 161 ], [ 159, 162 ], [ 162, 163 ], [ 162, 164 ], [ 153, 165 ], [ 14, 166 ], [ 166, 167 ], [ 167, 168 ], [ 167, 169 ], [ 166, 170 ], [ 170, 171 ], [ 171, 172 ], [ 172, 173 ], [ 173, 174 ], [ 173, 175 ], [ 171, 176 ], [ 166, 177 ], [ 177, 178 ], [ 178, 179 ], [ 178, 180 ], [ 177, 181 ], [ 181, 182 ], [ 182, 183 ], [ 183, 184 ], [ 184, 185 ], [ 184, 186 ], [ 182, 187 ], [ 177, 188 ], [ 188, 189 ], [ 189, 190 ], [ 190, 191 ], [ 191, 192 ], [ 191, 193 ], [ 189, 194 ], [ 12, 195 ], [ 195, 196 ], [ 0, 197 ], [ 197, 198 ], [ 197, 199 ] ]
[ "import java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\t// 読み込み\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt();\n\t\tint N = sc.nextInt();\n\n\t\tList<Integer> p = new ArrayList<>();\n\t\t\n\t\tif (N == 0) {\n\t\t\tSystem.out.println(X);\n\t\t\treturn;\n\t\t}\n\t\tfor (int i = 1; i <=N ; i++) {\n\t\t\tp.add(sc.nextInt());\n\t\t}\n\t\tif (!p.contains(X)) {\n\t\t\tSystem.out.println(X);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint cost_l = Math.abs(X - 0);\n\t\tint ans_l = 0;\n\t\t\n\t\tfor (int i = X -1; i >= 0 ; i--) {\n\t\t\tif(!p.contains(i)) {\n\t\t\t\tans_l = i;\n\t\t\t\tcost_l = Math.abs(X - i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tint cost_r = Math.abs(101 - X);\n\t\tint ans_r = 101;\n\t\t\n\t\tfor (int i = X +1; i <= 101 ; i++) {\n\t\t\tif(!p.contains(i)) {\n\t\t\t\tans_r = i;\n\t\t\t\tcost_r = Math.abs(X - i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\tif(cost_l < cost_r) {\n\t\t\tSystem.out.println(ans_l);\n\t\t}\n\t\telse if(cost_l > cost_r) {\n\t\t\tSystem.out.println(ans_r);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(ans_l);\n\t\t}\n\t\t\n\t}\n}", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.List;", "List", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\t// 読み込み\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt();\n\t\tint N = sc.nextInt();\n\n\t\tList<Integer> p = new ArrayList<>();\n\t\t\n\t\tif (N == 0) {\n\t\t\tSystem.out.println(X);\n\t\t\treturn;\n\t\t}\n\t\tfor (int i = 1; i <=N ; i++) {\n\t\t\tp.add(sc.nextInt());\n\t\t}\n\t\tif (!p.contains(X)) {\n\t\t\tSystem.out.println(X);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint cost_l = Math.abs(X - 0);\n\t\tint ans_l = 0;\n\t\t\n\t\tfor (int i = X -1; i >= 0 ; i--) {\n\t\t\tif(!p.contains(i)) {\n\t\t\t\tans_l = i;\n\t\t\t\tcost_l = Math.abs(X - i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tint cost_r = Math.abs(101 - X);\n\t\tint ans_r = 101;\n\t\t\n\t\tfor (int i = X +1; i <= 101 ; i++) {\n\t\t\tif(!p.contains(i)) {\n\t\t\t\tans_r = i;\n\t\t\t\tcost_r = Math.abs(X - i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\tif(cost_l < cost_r) {\n\t\t\tSystem.out.println(ans_l);\n\t\t}\n\t\telse if(cost_l > cost_r) {\n\t\t\tSystem.out.println(ans_r);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(ans_l);\n\t\t}\n\t\t\n\t}\n}", "Main", "public static void main(String[] args) {\n\n\t\t// 読み込み\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt();\n\t\tint N = sc.nextInt();\n\n\t\tList<Integer> p = new ArrayList<>();\n\t\t\n\t\tif (N == 0) {\n\t\t\tSystem.out.println(X);\n\t\t\treturn;\n\t\t}\n\t\tfor (int i = 1; i <=N ; i++) {\n\t\t\tp.add(sc.nextInt());\n\t\t}\n\t\tif (!p.contains(X)) {\n\t\t\tSystem.out.println(X);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint cost_l = Math.abs(X - 0);\n\t\tint ans_l = 0;\n\t\t\n\t\tfor (int i = X -1; i >= 0 ; i--) {\n\t\t\tif(!p.contains(i)) {\n\t\t\t\tans_l = i;\n\t\t\t\tcost_l = Math.abs(X - i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tint cost_r = Math.abs(101 - X);\n\t\tint ans_r = 101;\n\t\t\n\t\tfor (int i = X +1; i <= 101 ; i++) {\n\t\t\tif(!p.contains(i)) {\n\t\t\t\tans_r = i;\n\t\t\t\tcost_r = Math.abs(X - i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\tif(cost_l < cost_r) {\n\t\t\tSystem.out.println(ans_l);\n\t\t}\n\t\telse if(cost_l > cost_r) {\n\t\t\tSystem.out.println(ans_r);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(ans_l);\n\t\t}\n\t\t\n\t}", "main", "{\n\n\t\t// 読み込み\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt();\n\t\tint N = sc.nextInt();\n\n\t\tList<Integer> p = new ArrayList<>();\n\t\t\n\t\tif (N == 0) {\n\t\t\tSystem.out.println(X);\n\t\t\treturn;\n\t\t}\n\t\tfor (int i = 1; i <=N ; i++) {\n\t\t\tp.add(sc.nextInt());\n\t\t}\n\t\tif (!p.contains(X)) {\n\t\t\tSystem.out.println(X);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint cost_l = Math.abs(X - 0);\n\t\tint ans_l = 0;\n\t\t\n\t\tfor (int i = X -1; i >= 0 ; i--) {\n\t\t\tif(!p.contains(i)) {\n\t\t\t\tans_l = i;\n\t\t\t\tcost_l = Math.abs(X - i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tint cost_r = Math.abs(101 - X);\n\t\tint ans_r = 101;\n\t\t\n\t\tfor (int i = X +1; i <= 101 ; i++) {\n\t\t\tif(!p.contains(i)) {\n\t\t\t\tans_r = i;\n\t\t\t\tcost_r = Math.abs(X - i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\tif(cost_l < cost_r) {\n\t\t\tSystem.out.println(ans_l);\n\t\t}\n\t\telse if(cost_l > cost_r) {\n\t\t\tSystem.out.println(ans_r);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(ans_l);\n\t\t}\n\t\t\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int X = sc.nextInt();", "X", "sc.nextInt()", "sc.nextInt", "sc", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "List<Integer> p = new ArrayList<>();", "p", "new ArrayList<>()", "if (N == 0) {\n\t\t\tSystem.out.println(X);\n\t\t\treturn;\n\t\t}", "N == 0", "N", "0", "{\n\t\t\tSystem.out.println(X);\n\t\t\treturn;\n\t\t}", "System.out.println(X)", "System.out.println", "System.out", "System", "System.out", "X", "return;", "for (int i = 1; i <=N ; i++) {\n\t\t\tp.add(sc.nextInt());\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <=N", "i", "N", "i++", "i++", "i", "{\n\t\t\tp.add(sc.nextInt());\n\t\t}", "{\n\t\t\tp.add(sc.nextInt());\n\t\t}", "p.add(sc.nextInt())", "p.add", "p", "sc.nextInt()", "sc.nextInt", "sc", "if (!p.contains(X)) {\n\t\t\tSystem.out.println(X);\n\t\t\treturn;\n\t\t}", "!p.contains(X)", "p.contains(X)", "p.contains", "p", "X", "{\n\t\t\tSystem.out.println(X);\n\t\t\treturn;\n\t\t}", "System.out.println(X)", "System.out.println", "System.out", "System", "System.out", "X", "return;", "int cost_l = Math.abs(X - 0);", "cost_l", "Math.abs(X - 0)", "Math.abs", "Math", "X - 0", "X", "0", "int ans_l = 0;", "ans_l", "0", "for (int i = X -1; i >= 0 ; i--) {\n\t\t\tif(!p.contains(i)) {\n\t\t\t\tans_l = i;\n\t\t\t\tcost_l = Math.abs(X - i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "int i = X -1;", "int i = X -1;", "i", "X -1", "X", "1", "i >= 0", "i", "0", "i--", "i--", "i", "{\n\t\t\tif(!p.contains(i)) {\n\t\t\t\tans_l = i;\n\t\t\t\tcost_l = Math.abs(X - i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "{\n\t\t\tif(!p.contains(i)) {\n\t\t\t\tans_l = i;\n\t\t\t\tcost_l = Math.abs(X - i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "if(!p.contains(i)) {\n\t\t\t\tans_l = i;\n\t\t\t\tcost_l = Math.abs(X - i);\n\t\t\t\tbreak;\n\t\t\t}", "!p.contains(i)", "p.contains(i)", "p.contains", "p", "i", "{\n\t\t\t\tans_l = i;\n\t\t\t\tcost_l = Math.abs(X - i);\n\t\t\t\tbreak;\n\t\t\t}", "ans_l = i", "ans_l", "i", "cost_l = Math.abs(X - i)", "cost_l", "Math.abs(X - i)", "Math.abs", "Math", "X - i", "X", "i", "break;", "int cost_r = Math.abs(101 - X);", "cost_r", "Math.abs(101 - X)", "Math.abs", "Math", "101 - X", "101", "X", "int ans_r = 101;", "ans_r", "101", "for (int i = X +1; i <= 101 ; i++) {\n\t\t\tif(!p.contains(i)) {\n\t\t\t\tans_r = i;\n\t\t\t\tcost_r = Math.abs(X - i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "int i = X +1;", "int i = X +1;", "i", "X +1", "X", "1", "i <= 101", "i", "101", "i++", "i++", "i", "{\n\t\t\tif(!p.contains(i)) {\n\t\t\t\tans_r = i;\n\t\t\t\tcost_r = Math.abs(X - i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "{\n\t\t\tif(!p.contains(i)) {\n\t\t\t\tans_r = i;\n\t\t\t\tcost_r = Math.abs(X - i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "if(!p.contains(i)) {\n\t\t\t\tans_r = i;\n\t\t\t\tcost_r = Math.abs(X - i);\n\t\t\t\tbreak;\n\t\t\t}", "!p.contains(i)", "p.contains(i)", "p.contains", "p", "i", "{\n\t\t\t\tans_r = i;\n\t\t\t\tcost_r = Math.abs(X - i);\n\t\t\t\tbreak;\n\t\t\t}", "ans_r = i", "ans_r", "i", "cost_r = Math.abs(X - i)", "cost_r", "Math.abs(X - i)", "Math.abs", "Math", "X - i", "X", "i", "break;", "if(cost_l < cost_r) {\n\t\t\tSystem.out.println(ans_l);\n\t\t}\n\t\telse if(cost_l > cost_r) {\n\t\t\tSystem.out.println(ans_r);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(ans_l);\n\t\t}", "cost_l < cost_r", "cost_l", "cost_r", "{\n\t\t\tSystem.out.println(ans_l);\n\t\t}", "System.out.println(ans_l)", "System.out.println", "System.out", "System", "System.out", "ans_l", "if(cost_l > cost_r) {\n\t\t\tSystem.out.println(ans_r);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(ans_l);\n\t\t}", "cost_l > cost_r", "cost_l", "cost_r", "{\n\t\t\tSystem.out.println(ans_r);\n\t\t}", "System.out.println(ans_r)", "System.out.println", "System.out", "System", "System.out", "ans_r", "{\n\t\t\tSystem.out.println(ans_l);\n\t\t}", "System.out.println(ans_l)", "System.out.println", "System.out", "System", "System.out", "ans_l", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\t// 読み込み\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt();\n\t\tint N = sc.nextInt();\n\n\t\tList<Integer> p = new ArrayList<>();\n\t\t\n\t\tif (N == 0) {\n\t\t\tSystem.out.println(X);\n\t\t\treturn;\n\t\t}\n\t\tfor (int i = 1; i <=N ; i++) {\n\t\t\tp.add(sc.nextInt());\n\t\t}\n\t\tif (!p.contains(X)) {\n\t\t\tSystem.out.println(X);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint cost_l = Math.abs(X - 0);\n\t\tint ans_l = 0;\n\t\t\n\t\tfor (int i = X -1; i >= 0 ; i--) {\n\t\t\tif(!p.contains(i)) {\n\t\t\t\tans_l = i;\n\t\t\t\tcost_l = Math.abs(X - i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tint cost_r = Math.abs(101 - X);\n\t\tint ans_r = 101;\n\t\t\n\t\tfor (int i = X +1; i <= 101 ; i++) {\n\t\t\tif(!p.contains(i)) {\n\t\t\t\tans_r = i;\n\t\t\t\tcost_r = Math.abs(X - i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\tif(cost_l < cost_r) {\n\t\t\tSystem.out.println(ans_l);\n\t\t}\n\t\telse if(cost_l > cost_r) {\n\t\t\tSystem.out.println(ans_r);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(ans_l);\n\t\t}\n\t\t\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\t// 読み込み\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt();\n\t\tint N = sc.nextInt();\n\n\t\tList<Integer> p = new ArrayList<>();\n\t\t\n\t\tif (N == 0) {\n\t\t\tSystem.out.println(X);\n\t\t\treturn;\n\t\t}\n\t\tfor (int i = 1; i <=N ; i++) {\n\t\t\tp.add(sc.nextInt());\n\t\t}\n\t\tif (!p.contains(X)) {\n\t\t\tSystem.out.println(X);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint cost_l = Math.abs(X - 0);\n\t\tint ans_l = 0;\n\t\t\n\t\tfor (int i = X -1; i >= 0 ; i--) {\n\t\t\tif(!p.contains(i)) {\n\t\t\t\tans_l = i;\n\t\t\t\tcost_l = Math.abs(X - i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tint cost_r = Math.abs(101 - X);\n\t\tint ans_r = 101;\n\t\t\n\t\tfor (int i = X +1; i <= 101 ; i++) {\n\t\t\tif(!p.contains(i)) {\n\t\t\t\tans_r = i;\n\t\t\t\tcost_r = Math.abs(X - i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\tif(cost_l < cost_r) {\n\t\t\tSystem.out.println(ans_l);\n\t\t}\n\t\telse if(cost_l > cost_r) {\n\t\t\tSystem.out.println(ans_r);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(ans_l);\n\t\t}\n\t\t\n\t}\n}", "Main" ]
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { // 読み込み Scanner sc = new Scanner(System.in); int X = sc.nextInt(); int N = sc.nextInt(); List<Integer> p = new ArrayList<>(); if (N == 0) { System.out.println(X); return; } for (int i = 1; i <=N ; i++) { p.add(sc.nextInt()); } if (!p.contains(X)) { System.out.println(X); return; } int cost_l = Math.abs(X - 0); int ans_l = 0; for (int i = X -1; i >= 0 ; i--) { if(!p.contains(i)) { ans_l = i; cost_l = Math.abs(X - i); break; } } int cost_r = Math.abs(101 - X); int ans_r = 101; for (int i = X +1; i <= 101 ; i++) { if(!p.contains(i)) { ans_r = i; cost_r = Math.abs(X - i); break; } } if(cost_l < cost_r) { System.out.println(ans_l); } else if(cost_l > cost_r) { System.out.println(ans_r); } else { System.out.println(ans_l); } } }
[ 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, 41, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 40, 4, 18, 13, 13, 30, 14, 2, 13, 4, 18, 13, 2, 13, 13, 30, 0, 13, 4, 18, 13, 2, 13, 13, 0, 13, 13, 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 ], [ 106, 11 ], [ 106, 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 ], [ 31, 33 ], [ 14, 34 ], [ 34, 35 ], [ 34, 36 ], [ 14, 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 ], [ 51, 52 ], [ 50, 53 ], [ 53, 54 ], [ 54, 55 ], [ 14, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 56, 61 ], [ 61, 62 ], [ 61, 63 ], [ 56, 64 ], [ 64, 65 ], [ 65, 66 ], [ 56, 67 ], [ 68, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 71, 74 ], [ 69, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 80, 81 ], [ 79, 82 ], [ 82, 83 ], [ 82, 84 ], [ 76, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 89, 90 ], [ 88, 91 ], [ 91, 92 ], [ 91, 93 ], [ 85, 94 ], [ 94, 95 ], [ 94, 96 ], [ 14, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 97, 102 ], [ 12, 103 ], [ 103, 104 ], [ 0, 105 ], [ 105, 106 ], [ 105, 107 ] ]
[ "import java.util.ArrayList;\nimport java.util.List;\nimport 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 x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint ans=102;\n\t\tint re=0;\n\t\tList<Integer> p = new ArrayList<Integer>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tp.add(sc.nextInt());\n\t\t}\n\t\tfor(int i=101;i>=0;i--) {\n\t\t\tif(!p.contains(i)) {\n\t\t\t\tif(ans>=Math.abs(x-i)) {\n\t\t\t\t\tans=Math.abs(x-i);\n\t\t\t\t\tre = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(re);\n\t}\n}", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.List;", "List", "java.util", "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 x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint ans=102;\n\t\tint re=0;\n\t\tList<Integer> p = new ArrayList<Integer>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tp.add(sc.nextInt());\n\t\t}\n\t\tfor(int i=101;i>=0;i--) {\n\t\t\tif(!p.contains(i)) {\n\t\t\t\tif(ans>=Math.abs(x-i)) {\n\t\t\t\t\tans=Math.abs(x-i);\n\t\t\t\t\tre = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(re);\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint ans=102;\n\t\tint re=0;\n\t\tList<Integer> p = new ArrayList<Integer>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tp.add(sc.nextInt());\n\t\t}\n\t\tfor(int i=101;i>=0;i--) {\n\t\t\tif(!p.contains(i)) {\n\t\t\t\tif(ans>=Math.abs(x-i)) {\n\t\t\t\t\tans=Math.abs(x-i);\n\t\t\t\t\tre = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(re);\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint ans=102;\n\t\tint re=0;\n\t\tList<Integer> p = new ArrayList<Integer>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tp.add(sc.nextInt());\n\t\t}\n\t\tfor(int i=101;i>=0;i--) {\n\t\t\tif(!p.contains(i)) {\n\t\t\t\tif(ans>=Math.abs(x-i)) {\n\t\t\t\t\tans=Math.abs(x-i);\n\t\t\t\t\tre = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(re);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int ans=102;", "ans", "102", "int re=0;", "re", "0", "List<Integer> p = new ArrayList<Integer>();", "p", "new ArrayList<Integer>()", "for(int i=0;i<n;i++) {\n\t\t\tp.add(sc.nextInt());\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t\t\tp.add(sc.nextInt());\n\t\t}", "{\n\t\t\tp.add(sc.nextInt());\n\t\t}", "p.add(sc.nextInt())", "p.add", "p", "sc.nextInt()", "sc.nextInt", "sc", "for(int i=101;i>=0;i--) {\n\t\t\tif(!p.contains(i)) {\n\t\t\t\tif(ans>=Math.abs(x-i)) {\n\t\t\t\t\tans=Math.abs(x-i);\n\t\t\t\t\tre = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i=101;", "int i=101;", "i", "101", "i>=0", "i", "0", "i--", "i--", "i", "{\n\t\t\tif(!p.contains(i)) {\n\t\t\t\tif(ans>=Math.abs(x-i)) {\n\t\t\t\t\tans=Math.abs(x-i);\n\t\t\t\t\tre = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tif(!p.contains(i)) {\n\t\t\t\tif(ans>=Math.abs(x-i)) {\n\t\t\t\t\tans=Math.abs(x-i);\n\t\t\t\t\tre = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "if(!p.contains(i)) {\n\t\t\t\tif(ans>=Math.abs(x-i)) {\n\t\t\t\t\tans=Math.abs(x-i);\n\t\t\t\t\tre = i;\n\t\t\t\t}\n\t\t\t}", "!p.contains(i)", "p.contains(i)", "p.contains", "p", "i", "{\n\t\t\t\tif(ans>=Math.abs(x-i)) {\n\t\t\t\t\tans=Math.abs(x-i);\n\t\t\t\t\tre = i;\n\t\t\t\t}\n\t\t\t}", "if(ans>=Math.abs(x-i)) {\n\t\t\t\t\tans=Math.abs(x-i);\n\t\t\t\t\tre = i;\n\t\t\t\t}", "ans>=Math.abs(x-i)", "ans", "Math.abs(x-i)", "Math.abs", "Math", "x-i", "x", "i", "{\n\t\t\t\t\tans=Math.abs(x-i);\n\t\t\t\t\tre = i;\n\t\t\t\t}", "ans=Math.abs(x-i)", "ans", "Math.abs(x-i)", "Math.abs", "Math", "x-i", "x", "i", "re = i", "re", "i", "System.out.println(re)", "System.out.println", "System.out", "System", "System.out", "re", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint ans=102;\n\t\tint re=0;\n\t\tList<Integer> p = new ArrayList<Integer>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tp.add(sc.nextInt());\n\t\t}\n\t\tfor(int i=101;i>=0;i--) {\n\t\t\tif(!p.contains(i)) {\n\t\t\t\tif(ans>=Math.abs(x-i)) {\n\t\t\t\t\tans=Math.abs(x-i);\n\t\t\t\t\tre = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(re);\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint ans=102;\n\t\tint re=0;\n\t\tList<Integer> p = new ArrayList<Integer>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tp.add(sc.nextInt());\n\t\t}\n\t\tfor(int i=101;i>=0;i--) {\n\t\t\tif(!p.contains(i)) {\n\t\t\t\tif(ans>=Math.abs(x-i)) {\n\t\t\t\t\tans=Math.abs(x-i);\n\t\t\t\t\tre = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(re);\n\t}\n}", "Main" ]
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int n = sc.nextInt(); int ans=102; int re=0; List<Integer> p = new ArrayList<Integer>(); for(int i=0;i<n;i++) { p.add(sc.nextInt()); } for(int i=101;i>=0;i--) { if(!p.contains(i)) { if(ans>=Math.abs(x-i)) { ans=Math.abs(x-i); re = i; } } } System.out.println(re); } }
[ 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, 17, 1, 40, 13, 30, 30, 41, 13, 2, 13, 13, 41, 13, 2, 13, 13, 41, 13, 17, 41, 13, 17, 41, 13, 17, 42, 2, 13, 13, 30, 14, 2, 13, 13, 30, 3, 14, 2, 18, 13, 13, 13, 30, 0, 13, 17, 14, 2, 18, 13, 13, 13, 30, 0, 13, 17, 40, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 4, 18, 13, 17, 14, 2, 13, 40, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 4, 18, 13, 17, 14, 2, 40, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 4, 18, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 170, 5 ], [ 170, 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 ], [ 61, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 69, 71 ], [ 61, 72 ], [ 72, 73 ], [ 72, 74 ], [ 61, 75 ], [ 75, 76 ], [ 75, 77 ], [ 61, 78 ], [ 78, 79 ], [ 78, 80 ], [ 61, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 81, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 86, 90 ], [ 90, 91 ], [ 85, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 93, 97 ], [ 92, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 85, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 103, 107 ], [ 102, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 85, 112 ], [ 112, 113 ], [ 61, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 114, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 119, 124 ], [ 124, 125 ], [ 124, 126 ], [ 118, 127 ], [ 127, 128 ], [ 128, 129 ], [ 127, 130 ], [ 114, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 134, 135 ], [ 131, 136 ], [ 136, 137 ], [ 137, 138 ], [ 138, 139 ], [ 139, 140 ], [ 139, 141 ], [ 137, 142 ], [ 142, 143 ], [ 142, 144 ], [ 136, 145 ], [ 145, 146 ], [ 146, 147 ], [ 145, 148 ], [ 131, 149 ], [ 149, 150 ], [ 150, 151 ], [ 151, 152 ], [ 150, 153 ], [ 149, 154 ], [ 154, 155 ], [ 155, 156 ], [ 156, 157 ], [ 157, 158 ], [ 157, 159 ], [ 155, 160 ], [ 160, 161 ], [ 160, 162 ], [ 154, 163 ], [ 163, 164 ], [ 164, 165 ], [ 163, 166 ], [ 6, 167 ], [ 167, 168 ], [ 0, 169 ], [ 169, 170 ], [ 169, 171 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\n public static void main(String[] args) {\n\n\n Scanner sc = new Scanner(System.in);\n int x= sc.nextInt();\n int n = sc.nextInt();\n int p[] = new int[n];\n for(int i = 0;i<n;i++){\n p[i] = sc.nextInt();\n }\n int ans = 0;\n\n\n for(int i = 0;i<105;i++){\n int tmp = x + i;\n int tmpp = x - i;\n boolean tmplus = true;\n boolean tmpminus = true;\n int j = 0;\n while (tmplus||tmpminus){\n if(j == n){\n break;\n }\n if(p[j]==tmp){\n tmplus =false;\n }\n if(p[j]==tmpp){\n tmpminus = false;\n\n }\n\n j++;\n }\n if(tmplus&&tmpminus){\n System.out.println(x-i);\n System.exit(0);\n }\n else if(tmplus&&!tmpminus){\n System.out.println(x+i);\n System.exit(0);\n }\n else if(!tmplus&&tmpminus){\n System.out.println(x-i);\n System.exit(0);\n }\n\n\n\n }\n\n }\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\n public static void main(String[] args) {\n\n\n Scanner sc = new Scanner(System.in);\n int x= sc.nextInt();\n int n = sc.nextInt();\n int p[] = new int[n];\n for(int i = 0;i<n;i++){\n p[i] = sc.nextInt();\n }\n int ans = 0;\n\n\n for(int i = 0;i<105;i++){\n int tmp = x + i;\n int tmpp = x - i;\n boolean tmplus = true;\n boolean tmpminus = true;\n int j = 0;\n while (tmplus||tmpminus){\n if(j == n){\n break;\n }\n if(p[j]==tmp){\n tmplus =false;\n }\n if(p[j]==tmpp){\n tmpminus = false;\n\n }\n\n j++;\n }\n if(tmplus&&tmpminus){\n System.out.println(x-i);\n System.exit(0);\n }\n else if(tmplus&&!tmpminus){\n System.out.println(x+i);\n System.exit(0);\n }\n else if(!tmplus&&tmpminus){\n System.out.println(x-i);\n System.exit(0);\n }\n\n\n\n }\n\n }\n\n}", "Main", "public static void main(String[] args) {\n\n\n Scanner sc = new Scanner(System.in);\n int x= sc.nextInt();\n int n = sc.nextInt();\n int p[] = new int[n];\n for(int i = 0;i<n;i++){\n p[i] = sc.nextInt();\n }\n int ans = 0;\n\n\n for(int i = 0;i<105;i++){\n int tmp = x + i;\n int tmpp = x - i;\n boolean tmplus = true;\n boolean tmpminus = true;\n int j = 0;\n while (tmplus||tmpminus){\n if(j == n){\n break;\n }\n if(p[j]==tmp){\n tmplus =false;\n }\n if(p[j]==tmpp){\n tmpminus = false;\n\n }\n\n j++;\n }\n if(tmplus&&tmpminus){\n System.out.println(x-i);\n System.exit(0);\n }\n else if(tmplus&&!tmpminus){\n System.out.println(x+i);\n System.exit(0);\n }\n else if(!tmplus&&tmpminus){\n System.out.println(x-i);\n System.exit(0);\n }\n\n\n\n }\n\n }", "main", "{\n\n\n Scanner sc = new Scanner(System.in);\n int x= sc.nextInt();\n int n = sc.nextInt();\n int p[] = new int[n];\n for(int i = 0;i<n;i++){\n p[i] = sc.nextInt();\n }\n int ans = 0;\n\n\n for(int i = 0;i<105;i++){\n int tmp = x + i;\n int tmpp = x - i;\n boolean tmplus = true;\n boolean tmpminus = true;\n int j = 0;\n while (tmplus||tmpminus){\n if(j == n){\n break;\n }\n if(p[j]==tmp){\n tmplus =false;\n }\n if(p[j]==tmpp){\n tmpminus = false;\n\n }\n\n j++;\n }\n if(tmplus&&tmpminus){\n System.out.println(x-i);\n System.exit(0);\n }\n else if(tmplus&&!tmpminus){\n System.out.println(x+i);\n System.exit(0);\n }\n else if(!tmplus&&tmpminus){\n System.out.println(x-i);\n System.exit(0);\n }\n\n\n\n }\n\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x= sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int p[] = new int[n];", "p", "new int[n]", "n", "for(int i = 0;i<n;i++){\n p[i] = sc.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n p[i] = sc.nextInt();\n }", "{\n p[i] = sc.nextInt();\n }", "p[i] = sc.nextInt()", "p[i]", "p", "i", "sc.nextInt()", "sc.nextInt", "sc", "int ans = 0;", "ans", "0", "for(int i = 0;i<105;i++){\n int tmp = x + i;\n int tmpp = x - i;\n boolean tmplus = true;\n boolean tmpminus = true;\n int j = 0;\n while (tmplus||tmpminus){\n if(j == n){\n break;\n }\n if(p[j]==tmp){\n tmplus =false;\n }\n if(p[j]==tmpp){\n tmpminus = false;\n\n }\n\n j++;\n }\n if(tmplus&&tmpminus){\n System.out.println(x-i);\n System.exit(0);\n }\n else if(tmplus&&!tmpminus){\n System.out.println(x+i);\n System.exit(0);\n }\n else if(!tmplus&&tmpminus){\n System.out.println(x-i);\n System.exit(0);\n }\n\n\n\n }", "int i = 0;", "int i = 0;", "i", "0", "i<105", "i", "105", "i++", "i++", "i", "{\n int tmp = x + i;\n int tmpp = x - i;\n boolean tmplus = true;\n boolean tmpminus = true;\n int j = 0;\n while (tmplus||tmpminus){\n if(j == n){\n break;\n }\n if(p[j]==tmp){\n tmplus =false;\n }\n if(p[j]==tmpp){\n tmpminus = false;\n\n }\n\n j++;\n }\n if(tmplus&&tmpminus){\n System.out.println(x-i);\n System.exit(0);\n }\n else if(tmplus&&!tmpminus){\n System.out.println(x+i);\n System.exit(0);\n }\n else if(!tmplus&&tmpminus){\n System.out.println(x-i);\n System.exit(0);\n }\n\n\n\n }", "{\n int tmp = x + i;\n int tmpp = x - i;\n boolean tmplus = true;\n boolean tmpminus = true;\n int j = 0;\n while (tmplus||tmpminus){\n if(j == n){\n break;\n }\n if(p[j]==tmp){\n tmplus =false;\n }\n if(p[j]==tmpp){\n tmpminus = false;\n\n }\n\n j++;\n }\n if(tmplus&&tmpminus){\n System.out.println(x-i);\n System.exit(0);\n }\n else if(tmplus&&!tmpminus){\n System.out.println(x+i);\n System.exit(0);\n }\n else if(!tmplus&&tmpminus){\n System.out.println(x-i);\n System.exit(0);\n }\n\n\n\n }", "int tmp = x + i;", "tmp", "x + i", "x", "i", "int tmpp = x - i;", "tmpp", "x - i", "x", "i", "boolean tmplus = true;", "tmplus", "true", "boolean tmpminus = true;", "tmpminus", "true", "int j = 0;", "j", "0", "while (tmplus||tmpminus){\n if(j == n){\n break;\n }\n if(p[j]==tmp){\n tmplus =false;\n }\n if(p[j]==tmpp){\n tmpminus = false;\n\n }\n\n j++;\n }", "tmplus||tmpminus", "tmplus", "tmpminus", "{\n if(j == n){\n break;\n }\n if(p[j]==tmp){\n tmplus =false;\n }\n if(p[j]==tmpp){\n tmpminus = false;\n\n }\n\n j++;\n }", "if(j == n){\n break;\n }", "j == n", "j", "n", "{\n break;\n }", "break;", "if(p[j]==tmp){\n tmplus =false;\n }", "p[j]==tmp", "p[j]", "p", "j", "tmp", "{\n tmplus =false;\n }", "tmplus =false", "tmplus", "false", "if(p[j]==tmpp){\n tmpminus = false;\n\n }", "p[j]==tmpp", "p[j]", "p", "j", "tmpp", "{\n tmpminus = false;\n\n }", "tmpminus = false", "tmpminus", "false", "j++", "j", "if(tmplus&&tmpminus){\n System.out.println(x-i);\n System.exit(0);\n }\n else if(tmplus&&!tmpminus){\n System.out.println(x+i);\n System.exit(0);\n }\n else if(!tmplus&&tmpminus){\n System.out.println(x-i);\n System.exit(0);\n }", "tmplus&&tmpminus", "tmplus", "tmpminus", "{\n System.out.println(x-i);\n System.exit(0);\n }", "System.out.println(x-i)", "System.out.println", "System.out", "System", "System.out", "x-i", "x", "i", "System.exit(0)", "System.exit", "System", "0", "if(tmplus&&!tmpminus){\n System.out.println(x+i);\n System.exit(0);\n }\n else if(!tmplus&&tmpminus){\n System.out.println(x-i);\n System.exit(0);\n }", "tmplus&&!tmpminus", "tmplus", "!tmpminus", "tmpminus", "{\n System.out.println(x+i);\n System.exit(0);\n }", "System.out.println(x+i)", "System.out.println", "System.out", "System", "System.out", "x+i", "x", "i", "System.exit(0)", "System.exit", "System", "0", "if(!tmplus&&tmpminus){\n System.out.println(x-i);\n System.exit(0);\n }", "!tmplus&&tmpminus", "!tmplus", "tmplus", "tmpminus", "{\n System.out.println(x-i);\n System.exit(0);\n }", "System.out.println(x-i)", "System.out.println", "System.out", "System", "System.out", "x-i", "x", "i", "System.exit(0)", "System.exit", "System", "0", "String[] args", "args", "public class Main {\n\n\n public static void main(String[] args) {\n\n\n Scanner sc = new Scanner(System.in);\n int x= sc.nextInt();\n int n = sc.nextInt();\n int p[] = new int[n];\n for(int i = 0;i<n;i++){\n p[i] = sc.nextInt();\n }\n int ans = 0;\n\n\n for(int i = 0;i<105;i++){\n int tmp = x + i;\n int tmpp = x - i;\n boolean tmplus = true;\n boolean tmpminus = true;\n int j = 0;\n while (tmplus||tmpminus){\n if(j == n){\n break;\n }\n if(p[j]==tmp){\n tmplus =false;\n }\n if(p[j]==tmpp){\n tmpminus = false;\n\n }\n\n j++;\n }\n if(tmplus&&tmpminus){\n System.out.println(x-i);\n System.exit(0);\n }\n else if(tmplus&&!tmpminus){\n System.out.println(x+i);\n System.exit(0);\n }\n else if(!tmplus&&tmpminus){\n System.out.println(x-i);\n System.exit(0);\n }\n\n\n\n }\n\n }\n\n}", "public class Main {\n\n\n public static void main(String[] args) {\n\n\n Scanner sc = new Scanner(System.in);\n int x= sc.nextInt();\n int n = sc.nextInt();\n int p[] = new int[n];\n for(int i = 0;i<n;i++){\n p[i] = sc.nextInt();\n }\n int ans = 0;\n\n\n for(int i = 0;i<105;i++){\n int tmp = x + i;\n int tmpp = x - i;\n boolean tmplus = true;\n boolean tmpminus = true;\n int j = 0;\n while (tmplus||tmpminus){\n if(j == n){\n break;\n }\n if(p[j]==tmp){\n tmplus =false;\n }\n if(p[j]==tmpp){\n tmpminus = false;\n\n }\n\n j++;\n }\n if(tmplus&&tmpminus){\n System.out.println(x-i);\n System.exit(0);\n }\n else if(tmplus&&!tmpminus){\n System.out.println(x+i);\n System.exit(0);\n }\n else if(!tmplus&&tmpminus){\n System.out.println(x-i);\n System.exit(0);\n }\n\n\n\n }\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 x= sc.nextInt(); int n = sc.nextInt(); int p[] = new int[n]; for(int i = 0;i<n;i++){ p[i] = sc.nextInt(); } int ans = 0; for(int i = 0;i<105;i++){ int tmp = x + i; int tmpp = x - i; boolean tmplus = true; boolean tmpminus = true; int j = 0; while (tmplus||tmpminus){ if(j == n){ break; } if(p[j]==tmp){ tmplus =false; } if(p[j]==tmpp){ tmpminus = false; } j++; } if(tmplus&&tmpminus){ System.out.println(x-i); System.exit(0); } else if(tmplus&&!tmpminus){ System.out.println(x+i); System.exit(0); } else if(!tmplus&&tmpminus){ System.out.println(x-i); System.exit(0); } } } }
[ 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, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 4, 18, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 41, 13, 41, 13, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 0, 13, 2, 13, 13, 0, 13, 2, 13, 13, 14, 4, 18, 13, 13, 30, 14, 4, 18, 13, 13, 30, 30, 4, 18, 18, 13, 13, 13, 3, 30, 4, 18, 18, 13, 13, 13, 3, 4, 18, 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 ], [ 126, 11 ], [ 126, 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 ], [ 29, 30 ], [ 29, 31 ], [ 28, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 32, 39 ], [ 39, 40 ], [ 40, 41 ], [ 39, 42 ], [ 14, 43 ], [ 43, 44 ], [ 43, 45 ], [ 14, 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 ], [ 60, 61 ], [ 59, 62 ], [ 62, 63 ], [ 63, 64 ], [ 14, 65 ], [ 65, 66 ], [ 14, 67 ], [ 67, 68 ], [ 14, 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 ], [ 82, 84 ], [ 84, 85 ], [ 84, 86 ], [ 81, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 89, 91 ], [ 81, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 93, 96 ], [ 92, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 99, 102 ], [ 98, 103 ], [ 98, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 105, 110 ], [ 104, 111 ], [ 92, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 113, 118 ], [ 112, 119 ], [ 14, 120 ], [ 120, 121 ], [ 121, 122 ], [ 12, 123 ], [ 123, 124 ], [ 0, 125 ], [ 125, 126 ], [ 125, 127 ] ]
[ "import java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint x = scan.nextInt();\n\t\tint n = scan.nextInt();\n\n\t\tif (n == 0) {\n\t\t\tSystem.out.println(x);\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\tList<Integer> p = new ArrayList<>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tp.add(scan.nextInt());\n\t\t}\n\n\t\tint y1;\n\t\tint y2;\n\n\t\tfor (int i = 0; i <= 100; i++) {\n\t\t\ty1 = x - i;\n\t\t\ty2 = x + i;\n\n\t\t\tif (p.contains(y1)) {\n\t\t\t\tif (p.contains(y2)) {\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(y2);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(y1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tscan.close();\n\n\t}\n\n}", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.List;", "List", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint x = scan.nextInt();\n\t\tint n = scan.nextInt();\n\n\t\tif (n == 0) {\n\t\t\tSystem.out.println(x);\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\tList<Integer> p = new ArrayList<>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tp.add(scan.nextInt());\n\t\t}\n\n\t\tint y1;\n\t\tint y2;\n\n\t\tfor (int i = 0; i <= 100; i++) {\n\t\t\ty1 = x - i;\n\t\t\ty2 = x + i;\n\n\t\t\tif (p.contains(y1)) {\n\t\t\t\tif (p.contains(y2)) {\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(y2);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(y1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tscan.close();\n\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint x = scan.nextInt();\n\t\tint n = scan.nextInt();\n\n\t\tif (n == 0) {\n\t\t\tSystem.out.println(x);\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\tList<Integer> p = new ArrayList<>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tp.add(scan.nextInt());\n\t\t}\n\n\t\tint y1;\n\t\tint y2;\n\n\t\tfor (int i = 0; i <= 100; i++) {\n\t\t\ty1 = x - i;\n\t\t\ty2 = x + i;\n\n\t\t\tif (p.contains(y1)) {\n\t\t\t\tif (p.contains(y2)) {\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(y2);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(y1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tscan.close();\n\n\t}", "main", "{\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint x = scan.nextInt();\n\t\tint n = scan.nextInt();\n\n\t\tif (n == 0) {\n\t\t\tSystem.out.println(x);\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\tList<Integer> p = new ArrayList<>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tp.add(scan.nextInt());\n\t\t}\n\n\t\tint y1;\n\t\tint y2;\n\n\t\tfor (int i = 0; i <= 100; i++) {\n\t\t\ty1 = x - i;\n\t\t\ty2 = x + i;\n\n\t\t\tif (p.contains(y1)) {\n\t\t\t\tif (p.contains(y2)) {\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(y2);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(y1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tscan.close();\n\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int x = scan.nextInt();", "x", "scan.nextInt()", "scan.nextInt", "scan", "int n = scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "if (n == 0) {\n\t\t\tSystem.out.println(x);\n\t\t\tSystem.exit(0);\n\t\t}", "n == 0", "n", "0", "{\n\t\t\tSystem.out.println(x);\n\t\t\tSystem.exit(0);\n\t\t}", "System.out.println(x)", "System.out.println", "System.out", "System", "System.out", "x", "System.exit(0)", "System.exit", "System", "0", "List<Integer> p = new ArrayList<>();", "p", "new ArrayList<>()", "for (int i = 0; i < n; i++) {\n\t\t\tp.add(scan.nextInt());\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tp.add(scan.nextInt());\n\t\t}", "{\n\t\t\tp.add(scan.nextInt());\n\t\t}", "p.add(scan.nextInt())", "p.add", "p", "scan.nextInt()", "scan.nextInt", "scan", "int y1;", "y1", "int y2;", "y2", "for (int i = 0; i <= 100; i++) {\n\t\t\ty1 = x - i;\n\t\t\ty2 = x + i;\n\n\t\t\tif (p.contains(y1)) {\n\t\t\t\tif (p.contains(y2)) {\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(y2);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(y1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i <= 100", "i", "100", "i++", "i++", "i", "{\n\t\t\ty1 = x - i;\n\t\t\ty2 = x + i;\n\n\t\t\tif (p.contains(y1)) {\n\t\t\t\tif (p.contains(y2)) {\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(y2);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(y1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "{\n\t\t\ty1 = x - i;\n\t\t\ty2 = x + i;\n\n\t\t\tif (p.contains(y1)) {\n\t\t\t\tif (p.contains(y2)) {\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(y2);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(y1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "y1 = x - i", "y1", "x - i", "x", "i", "y2 = x + i", "y2", "x + i", "x", "i", "if (p.contains(y1)) {\n\t\t\t\tif (p.contains(y2)) {\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(y2);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(y1);\n\t\t\t\tbreak;\n\t\t\t}", "p.contains(y1)", "p.contains", "p", "y1", "{\n\t\t\t\tif (p.contains(y2)) {\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(y2);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "if (p.contains(y2)) {\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(y2);\n\t\t\t\t\tbreak;\n\t\t\t\t}", "p.contains(y2)", "p.contains", "p", "y2", "{\n\n\t\t\t\t}", "{\n\t\t\t\t\tSystem.out.println(y2);\n\t\t\t\t\tbreak;\n\t\t\t\t}", "System.out.println(y2)", "System.out.println", "System.out", "System", "System.out", "y2", "break;", "{\n\t\t\t\tSystem.out.println(y1);\n\t\t\t\tbreak;\n\t\t\t}", "System.out.println(y1)", "System.out.println", "System.out", "System", "System.out", "y1", "break;", "scan.close()", "scan.close", "scan", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint x = scan.nextInt();\n\t\tint n = scan.nextInt();\n\n\t\tif (n == 0) {\n\t\t\tSystem.out.println(x);\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\tList<Integer> p = new ArrayList<>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tp.add(scan.nextInt());\n\t\t}\n\n\t\tint y1;\n\t\tint y2;\n\n\t\tfor (int i = 0; i <= 100; i++) {\n\t\t\ty1 = x - i;\n\t\t\ty2 = x + i;\n\n\t\t\tif (p.contains(y1)) {\n\t\t\t\tif (p.contains(y2)) {\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(y2);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(y1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tscan.close();\n\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint x = scan.nextInt();\n\t\tint n = scan.nextInt();\n\n\t\tif (n == 0) {\n\t\t\tSystem.out.println(x);\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\tList<Integer> p = new ArrayList<>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tp.add(scan.nextInt());\n\t\t}\n\n\t\tint y1;\n\t\tint y2;\n\n\t\tfor (int i = 0; i <= 100; i++) {\n\t\t\ty1 = x - i;\n\t\t\ty2 = x + i;\n\n\t\t\tif (p.contains(y1)) {\n\t\t\t\tif (p.contains(y2)) {\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(y2);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(y1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tscan.close();\n\n\t}\n\n}", "Main" ]
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int x = scan.nextInt(); int n = scan.nextInt(); if (n == 0) { System.out.println(x); System.exit(0); } List<Integer> p = new ArrayList<>(); for (int i = 0; i < n; i++) { p.add(scan.nextInt()); } int y1; int y2; for (int i = 0; i <= 100; i++) { y1 = x - i; y2 = x + i; if (p.contains(y1)) { if (p.contains(y2)) { } else { System.out.println(y2); break; } } else { System.out.println(y1); break; } } scan.close(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 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, 4, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 2, 13, 13, 41, 13, 2, 13, 13, 14, 40, 4, 18, 13, 13, 30, 4, 18, 18, 13, 13, 13, 4, 18, 13, 17, 14, 40, 4, 18, 13, 13, 30, 4, 18, 18, 13, 13, 13, 4, 18, 13, 17, 4, 18, 18, 13, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 109, 5 ], [ 109, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 8, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 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 ], [ 38, 39 ], [ 37, 40 ], [ 40, 41 ], [ 41, 42 ], [ 8, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 43, 48 ], [ 48, 49 ], [ 48, 50 ], [ 43, 51 ], [ 51, 52 ], [ 52, 53 ], [ 43, 54 ], [ 55, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 58, 60 ], [ 55, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 63, 65 ], [ 55, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 68, 71 ], [ 66, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 73, 78 ], [ 72, 79 ], [ 79, 80 ], [ 80, 81 ], [ 79, 82 ], [ 55, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 85, 88 ], [ 83, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 90, 95 ], [ 89, 96 ], [ 96, 97 ], [ 97, 98 ], [ 96, 99 ], [ 8, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 100, 105 ], [ 6, 106 ], [ 106, 107 ], [ 0, 108 ], [ 108, 109 ], [ 108, 110 ] ]
[ "import java.util.*;\npublic class Main{\n\n public static void main(String []args){\n \n Scanner sc=new Scanner(System.in);\n List<Integer> li=new ArrayList<Integer>();\n int x=sc.nextInt();\n int y=sc.nextInt();\n for(int i=0;i<y;i++)\n li.add(sc.nextInt());\n for(int i=0;i<=x;i++)\n {\n int sub=x-i;\n int add=x+i;\n if(!(li.contains(sub) )){\n \n System.out.println(sub);\n System.exit(0);}\n if(!( li.contains(add))){\n System.out.println(add);\n System.exit(0);}\n }\n System.out.println(\"-1\"); \n }\n}", "import java.util.*;", "util.*", "java", "public class Main{\n\n public static void main(String []args){\n \n Scanner sc=new Scanner(System.in);\n List<Integer> li=new ArrayList<Integer>();\n int x=sc.nextInt();\n int y=sc.nextInt();\n for(int i=0;i<y;i++)\n li.add(sc.nextInt());\n for(int i=0;i<=x;i++)\n {\n int sub=x-i;\n int add=x+i;\n if(!(li.contains(sub) )){\n \n System.out.println(sub);\n System.exit(0);}\n if(!( li.contains(add))){\n System.out.println(add);\n System.exit(0);}\n }\n System.out.println(\"-1\"); \n }\n}", "Main", "public static void main(String []args){\n \n Scanner sc=new Scanner(System.in);\n List<Integer> li=new ArrayList<Integer>();\n int x=sc.nextInt();\n int y=sc.nextInt();\n for(int i=0;i<y;i++)\n li.add(sc.nextInt());\n for(int i=0;i<=x;i++)\n {\n int sub=x-i;\n int add=x+i;\n if(!(li.contains(sub) )){\n \n System.out.println(sub);\n System.exit(0);}\n if(!( li.contains(add))){\n System.out.println(add);\n System.exit(0);}\n }\n System.out.println(\"-1\"); \n }", "main", "{\n \n Scanner sc=new Scanner(System.in);\n List<Integer> li=new ArrayList<Integer>();\n int x=sc.nextInt();\n int y=sc.nextInt();\n for(int i=0;i<y;i++)\n li.add(sc.nextInt());\n for(int i=0;i<=x;i++)\n {\n int sub=x-i;\n int add=x+i;\n if(!(li.contains(sub) )){\n \n System.out.println(sub);\n System.exit(0);}\n if(!( li.contains(add))){\n System.out.println(add);\n System.exit(0);}\n }\n System.out.println(\"-1\"); \n }", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "List<Integer> li=new ArrayList<Integer>();", "li", "new ArrayList<Integer>()", "int x=sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int y=sc.nextInt();", "y", "sc.nextInt()", "sc.nextInt", "sc", "for(int i=0;i<y;i++)\n li.add(sc.nextInt());", "int i=0;", "int i=0;", "i", "0", "i<y", "i", "y", "i++", "i++", "i", "li.add(sc.nextInt());", "li.add(sc.nextInt())", "li.add", "li", "sc.nextInt()", "sc.nextInt", "sc", "for(int i=0;i<=x;i++)\n {\n int sub=x-i;\n int add=x+i;\n if(!(li.contains(sub) )){\n \n System.out.println(sub);\n System.exit(0);}\n if(!( li.contains(add))){\n System.out.println(add);\n System.exit(0);}\n }", "int i=0;", "int i=0;", "i", "0", "i<=x", "i", "x", "i++", "i++", "i", "{\n int sub=x-i;\n int add=x+i;\n if(!(li.contains(sub) )){\n \n System.out.println(sub);\n System.exit(0);}\n if(!( li.contains(add))){\n System.out.println(add);\n System.exit(0);}\n }", "{\n int sub=x-i;\n int add=x+i;\n if(!(li.contains(sub) )){\n \n System.out.println(sub);\n System.exit(0);}\n if(!( li.contains(add))){\n System.out.println(add);\n System.exit(0);}\n }", "int sub=x-i;", "sub", "x-i", "x", "i", "int add=x+i;", "add", "x+i", "x", "i", "if(!(li.contains(sub) )){\n \n System.out.println(sub);\n System.exit(0);}", "!(li.contains(sub) )", "(li.contains(sub) )", "li.contains", "li", "sub", "{\n \n System.out.println(sub);\n System.exit(0);}", "System.out.println(sub)", "System.out.println", "System.out", "System", "System.out", "sub", "System.exit(0)", "System.exit", "System", "0", "if(!( li.contains(add))){\n System.out.println(add);\n System.exit(0);}", "!( li.contains(add))", "( li.contains(add))", "li.contains", "li", "add", "{\n System.out.println(add);\n System.exit(0);}", "System.out.println(add)", "System.out.println", "System.out", "System", "System.out", "add", "System.exit(0)", "System.exit", "System", "0", "System.out.println(\"-1\")", "System.out.println", "System.out", "System", "System.out", "\"-1\"", "String []args", "args", "public class Main{\n\n public static void main(String []args){\n \n Scanner sc=new Scanner(System.in);\n List<Integer> li=new ArrayList<Integer>();\n int x=sc.nextInt();\n int y=sc.nextInt();\n for(int i=0;i<y;i++)\n li.add(sc.nextInt());\n for(int i=0;i<=x;i++)\n {\n int sub=x-i;\n int add=x+i;\n if(!(li.contains(sub) )){\n \n System.out.println(sub);\n System.exit(0);}\n if(!( li.contains(add))){\n System.out.println(add);\n System.exit(0);}\n }\n System.out.println(\"-1\"); \n }\n}", "public class Main{\n\n public static void main(String []args){\n \n Scanner sc=new Scanner(System.in);\n List<Integer> li=new ArrayList<Integer>();\n int x=sc.nextInt();\n int y=sc.nextInt();\n for(int i=0;i<y;i++)\n li.add(sc.nextInt());\n for(int i=0;i<=x;i++)\n {\n int sub=x-i;\n int add=x+i;\n if(!(li.contains(sub) )){\n \n System.out.println(sub);\n System.exit(0);}\n if(!( li.contains(add))){\n System.out.println(add);\n System.exit(0);}\n }\n 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); List<Integer> li=new ArrayList<Integer>(); int x=sc.nextInt(); int y=sc.nextInt(); for(int i=0;i<y;i++) li.add(sc.nextInt()); for(int i=0;i<=x;i++) { int sub=x-i; int add=x+i; if(!(li.contains(sub) )){ System.out.println(sub); System.exit(0);} if(!( li.contains(add))){ System.out.println(add); System.exit(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, 17, 41, 13, 20, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 1, 40, 13, 30, 30, 14, 2, 13, 17, 30, 14, 40, 4, 18, 13, 2, 13, 13, 30, 4, 18, 13, 2, 13, 13, 0, 13, 17, 14, 40, 4, 18, 13, 2, 13, 13, 30, 4, 18, 13, 2, 13, 13, 0, 13, 17, 14, 2, 13, 17, 3, 4, 18, 13, 13, 14, 2, 13, 17, 4, 18, 18, 13, 13, 4, 18, 13, 17, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 137, 5 ], [ 137, 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 ], [ 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 ], [ 45, 46 ], [ 44, 47 ], [ 47, 48 ], [ 48, 49 ], [ 8, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 58, 59 ], [ 50, 60 ], [ 60, 61 ], [ 61, 62 ], [ 50, 63 ], [ 64, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 65, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 72, 75 ], [ 75, 76 ], [ 75, 77 ], [ 70, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 79, 82 ], [ 82, 83 ], [ 82, 84 ], [ 78, 85 ], [ 85, 86 ], [ 85, 87 ], [ 69, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 90, 93 ], [ 93, 94 ], [ 93, 95 ], [ 88, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 97, 100 ], [ 100, 101 ], [ 100, 102 ], [ 96, 103 ], [ 103, 104 ], [ 103, 105 ], [ 69, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 106, 110 ], [ 8, 111 ], [ 111, 112 ], [ 112, 113 ], [ 111, 114 ], [ 8, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 115, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 119, 124 ], [ 124, 125 ], [ 125, 126 ], [ 124, 127 ], [ 115, 128 ], [ 128, 129 ], [ 129, 130 ], [ 130, 131 ], [ 130, 132 ], [ 128, 133 ], [ 6, 134 ], [ 134, 135 ], [ 0, 136 ], [ 136, 137 ], [ 136, 138 ] ]
[ "import java.util.*;\npublic class Main{\n public static void main(String[] args)\n {\n Scanner sc=new Scanner(System.in);\n int x=sc.nextInt();\n int n=sc.nextInt();\n int flag=0;\n ArrayList<Integer> a=new ArrayList<Integer>();\n ArrayList<Integer> a1=new ArrayList<Integer>();\n for(int i=0;i<n;i++)\n {\n a.add(sc.nextInt());\n }\n for(int j=0;j<=a.size();j++)\n {\n if(flag==0)\n {\n if(!a.contains(x+j))\n {\n a1.add(x+j);\n flag=1;\n }\n if(!a.contains(x-j))\n {\n a1.add(x-j);\n\t\tflag=1;\n }\n if(flag==1)\n break;\n }\n\n \n }\n Collections.sort(a1);\n if(n>0)\n System.out.println(a1.get(0));\n else\n System.out.println(x);\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 x=sc.nextInt();\n int n=sc.nextInt();\n int flag=0;\n ArrayList<Integer> a=new ArrayList<Integer>();\n ArrayList<Integer> a1=new ArrayList<Integer>();\n for(int i=0;i<n;i++)\n {\n a.add(sc.nextInt());\n }\n for(int j=0;j<=a.size();j++)\n {\n if(flag==0)\n {\n if(!a.contains(x+j))\n {\n a1.add(x+j);\n flag=1;\n }\n if(!a.contains(x-j))\n {\n a1.add(x-j);\n\t\tflag=1;\n }\n if(flag==1)\n break;\n }\n\n \n }\n Collections.sort(a1);\n if(n>0)\n System.out.println(a1.get(0));\n else\n System.out.println(x);\n }\n}", "Main", "public static void main(String[] args)\n {\n Scanner sc=new Scanner(System.in);\n int x=sc.nextInt();\n int n=sc.nextInt();\n int flag=0;\n ArrayList<Integer> a=new ArrayList<Integer>();\n ArrayList<Integer> a1=new ArrayList<Integer>();\n for(int i=0;i<n;i++)\n {\n a.add(sc.nextInt());\n }\n for(int j=0;j<=a.size();j++)\n {\n if(flag==0)\n {\n if(!a.contains(x+j))\n {\n a1.add(x+j);\n flag=1;\n }\n if(!a.contains(x-j))\n {\n a1.add(x-j);\n\t\tflag=1;\n }\n if(flag==1)\n break;\n }\n\n \n }\n Collections.sort(a1);\n if(n>0)\n System.out.println(a1.get(0));\n else\n System.out.println(x);\n }", "main", "{\n Scanner sc=new Scanner(System.in);\n int x=sc.nextInt();\n int n=sc.nextInt();\n int flag=0;\n ArrayList<Integer> a=new ArrayList<Integer>();\n ArrayList<Integer> a1=new ArrayList<Integer>();\n for(int i=0;i<n;i++)\n {\n a.add(sc.nextInt());\n }\n for(int j=0;j<=a.size();j++)\n {\n if(flag==0)\n {\n if(!a.contains(x+j))\n {\n a1.add(x+j);\n flag=1;\n }\n if(!a.contains(x-j))\n {\n a1.add(x-j);\n\t\tflag=1;\n }\n if(flag==1)\n break;\n }\n\n \n }\n Collections.sort(a1);\n if(n>0)\n System.out.println(a1.get(0));\n else\n System.out.println(x);\n }", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x=sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int n=sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int flag=0;", "flag", "0", "ArrayList<Integer> a=new ArrayList<Integer>();", "a", "new ArrayList<Integer>()", "ArrayList<Integer> a1=new ArrayList<Integer>();", "a1", "new ArrayList<Integer>()", "for(int i=0;i<n;i++)\n {\n a.add(sc.nextInt());\n }", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n a.add(sc.nextInt());\n }", "{\n a.add(sc.nextInt());\n }", "a.add(sc.nextInt())", "a.add", "a", "sc.nextInt()", "sc.nextInt", "sc", "for(int j=0;j<=a.size();j++)\n {\n if(flag==0)\n {\n if(!a.contains(x+j))\n {\n a1.add(x+j);\n flag=1;\n }\n if(!a.contains(x-j))\n {\n a1.add(x-j);\n\t\tflag=1;\n }\n if(flag==1)\n break;\n }\n\n \n }", "int j=0;", "int j=0;", "j", "0", "j<=a.size()", "j", "a.size()", "a.size", "a", "j++", "j++", "j", "{\n if(flag==0)\n {\n if(!a.contains(x+j))\n {\n a1.add(x+j);\n flag=1;\n }\n if(!a.contains(x-j))\n {\n a1.add(x-j);\n\t\tflag=1;\n }\n if(flag==1)\n break;\n }\n\n \n }", "{\n if(flag==0)\n {\n if(!a.contains(x+j))\n {\n a1.add(x+j);\n flag=1;\n }\n if(!a.contains(x-j))\n {\n a1.add(x-j);\n\t\tflag=1;\n }\n if(flag==1)\n break;\n }\n\n \n }", "if(flag==0)\n {\n if(!a.contains(x+j))\n {\n a1.add(x+j);\n flag=1;\n }\n if(!a.contains(x-j))\n {\n a1.add(x-j);\n\t\tflag=1;\n }\n if(flag==1)\n break;\n }", "flag==0", "flag", "0", "{\n if(!a.contains(x+j))\n {\n a1.add(x+j);\n flag=1;\n }\n if(!a.contains(x-j))\n {\n a1.add(x-j);\n\t\tflag=1;\n }\n if(flag==1)\n break;\n }", "if(!a.contains(x+j))\n {\n a1.add(x+j);\n flag=1;\n }", "!a.contains(x+j)", "a.contains(x+j)", "a.contains", "a", "x+j", "x", "j", "{\n a1.add(x+j);\n flag=1;\n }", "a1.add(x+j)", "a1.add", "a1", "x+j", "x", "j", "flag=1", "flag", "1", "if(!a.contains(x-j))\n {\n a1.add(x-j);\n\t\tflag=1;\n }", "!a.contains(x-j)", "a.contains(x-j)", "a.contains", "a", "x-j", "x", "j", "{\n a1.add(x-j);\n\t\tflag=1;\n }", "a1.add(x-j)", "a1.add", "a1", "x-j", "x", "j", "flag=1", "flag", "1", "if(flag==1)\n break;", "flag==1", "flag", "1", "break;", "Collections.sort(a1)", "Collections.sort", "Collections", "a1", "if(n>0)\n System.out.println(a1.get(0));\n else\n System.out.println(x);", "n>0", "n", "0", "System.out.println(a1.get(0))", "System.out.println", "System.out", "System", "System.out", "a1.get(0)", "a1.get", "a1", "0", "System.out.println(x)", "System.out.println", "System.out", "System", "System.out", "x", "String[] args", "args", "public class Main{\n public static void main(String[] args)\n {\n Scanner sc=new Scanner(System.in);\n int x=sc.nextInt();\n int n=sc.nextInt();\n int flag=0;\n ArrayList<Integer> a=new ArrayList<Integer>();\n ArrayList<Integer> a1=new ArrayList<Integer>();\n for(int i=0;i<n;i++)\n {\n a.add(sc.nextInt());\n }\n for(int j=0;j<=a.size();j++)\n {\n if(flag==0)\n {\n if(!a.contains(x+j))\n {\n a1.add(x+j);\n flag=1;\n }\n if(!a.contains(x-j))\n {\n a1.add(x-j);\n\t\tflag=1;\n }\n if(flag==1)\n break;\n }\n\n \n }\n Collections.sort(a1);\n if(n>0)\n System.out.println(a1.get(0));\n else\n System.out.println(x);\n }\n}", "public class Main{\n public static void main(String[] args)\n {\n Scanner sc=new Scanner(System.in);\n int x=sc.nextInt();\n int n=sc.nextInt();\n int flag=0;\n ArrayList<Integer> a=new ArrayList<Integer>();\n ArrayList<Integer> a1=new ArrayList<Integer>();\n for(int i=0;i<n;i++)\n {\n a.add(sc.nextInt());\n }\n for(int j=0;j<=a.size();j++)\n {\n if(flag==0)\n {\n if(!a.contains(x+j))\n {\n a1.add(x+j);\n flag=1;\n }\n if(!a.contains(x-j))\n {\n a1.add(x-j);\n\t\tflag=1;\n }\n if(flag==1)\n break;\n }\n\n \n }\n Collections.sort(a1);\n if(n>0)\n System.out.println(a1.get(0));\n else\n System.out.println(x);\n }\n}", "Main" ]
import java.util.*; public class Main{ public static void main(String[] args) { Scanner sc=new Scanner(System.in); int x=sc.nextInt(); int n=sc.nextInt(); int flag=0; ArrayList<Integer> a=new ArrayList<Integer>(); ArrayList<Integer> a1=new ArrayList<Integer>(); for(int i=0;i<n;i++) { a.add(sc.nextInt()); } for(int j=0;j<=a.size();j++) { if(flag==0) { if(!a.contains(x+j)) { a1.add(x+j); flag=1; } if(!a.contains(x-j)) { a1.add(x-j); flag=1; } if(flag==1) break; } } Collections.sort(a1); if(n>0) System.out.println(a1.get(0)); else System.out.println(x); } }
[ 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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 41, 13, 17, 41, 13, 13, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 40, 4, 18, 13, 13, 30, 14, 2, 4, 18, 13, 2, 13, 13, 13, 30, 0, 13, 13, 0, 13, 4, 18, 13, 2, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 100, 5 ], [ 100, 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 ], [ 39, 40 ], [ 38, 41 ], [ 41, 42 ], [ 42, 43 ], [ 8, 44 ], [ 44, 45 ], [ 44, 46 ], [ 8, 47 ], [ 47, 48 ], [ 47, 49 ], [ 8, 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 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 65, 68 ], [ 63, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 72, 75 ], [ 75, 76 ], [ 75, 77 ], [ 71, 78 ], [ 70, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 79, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 86, 87 ], [ 85, 88 ], [ 88, 89 ], [ 88, 90 ], [ 8, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 91, 96 ], [ 6, 97 ], [ 97, 98 ], [ 0, 99 ], [ 99, 100 ], [ 99, 101 ] ]
[ "import java.util.*;\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint x = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tHashSet<Integer> set = new HashSet<>();\n\t\tfor(int i = 0;i < n; ++i){\n\t\t\tset.add(scan.nextInt());\n\t\t}\n\t\tint diff = 99999;\n\t\tint ans = x;\n\t\tfor(int i = 0;i <= 101; ++i){\n\t\t\tif(!set.contains(i)){\n\t\t\t\tif(Math.abs(i-x) < diff){\n\t\t\t\t\tans = i;\n\t\t\t\t\tdiff = Math.abs(i-x);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.print(ans);\n\t}\n}", "import java.util.*;", "util.*", "java", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint x = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tHashSet<Integer> set = new HashSet<>();\n\t\tfor(int i = 0;i < n; ++i){\n\t\t\tset.add(scan.nextInt());\n\t\t}\n\t\tint diff = 99999;\n\t\tint ans = x;\n\t\tfor(int i = 0;i <= 101; ++i){\n\t\t\tif(!set.contains(i)){\n\t\t\t\tif(Math.abs(i-x) < diff){\n\t\t\t\t\tans = i;\n\t\t\t\t\tdiff = Math.abs(i-x);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.print(ans);\n\t}\n}", "Main", "public static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint x = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tHashSet<Integer> set = new HashSet<>();\n\t\tfor(int i = 0;i < n; ++i){\n\t\t\tset.add(scan.nextInt());\n\t\t}\n\t\tint diff = 99999;\n\t\tint ans = x;\n\t\tfor(int i = 0;i <= 101; ++i){\n\t\t\tif(!set.contains(i)){\n\t\t\t\tif(Math.abs(i-x) < diff){\n\t\t\t\t\tans = i;\n\t\t\t\t\tdiff = Math.abs(i-x);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.print(ans);\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint x = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tHashSet<Integer> set = new HashSet<>();\n\t\tfor(int i = 0;i < n; ++i){\n\t\t\tset.add(scan.nextInt());\n\t\t}\n\t\tint diff = 99999;\n\t\tint ans = x;\n\t\tfor(int i = 0;i <= 101; ++i){\n\t\t\tif(!set.contains(i)){\n\t\t\t\tif(Math.abs(i-x) < diff){\n\t\t\t\t\tans = i;\n\t\t\t\t\tdiff = Math.abs(i-x);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.print(ans);\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int x = scan.nextInt();", "x", "scan.nextInt()", "scan.nextInt", "scan", "int n = scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "HashSet<Integer> set = new HashSet<>();", "set", "new HashSet<>()", "for(int i = 0;i < n; ++i){\n\t\t\tset.add(scan.nextInt());\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "++i", "++i", "i", "{\n\t\t\tset.add(scan.nextInt());\n\t\t}", "{\n\t\t\tset.add(scan.nextInt());\n\t\t}", "set.add(scan.nextInt())", "set.add", "set", "scan.nextInt()", "scan.nextInt", "scan", "int diff = 99999;", "diff", "99999", "int ans = x;", "ans", "x", "for(int i = 0;i <= 101; ++i){\n\t\t\tif(!set.contains(i)){\n\t\t\t\tif(Math.abs(i-x) < diff){\n\t\t\t\t\tans = i;\n\t\t\t\t\tdiff = Math.abs(i-x);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i <= 101", "i", "101", "++i", "++i", "i", "{\n\t\t\tif(!set.contains(i)){\n\t\t\t\tif(Math.abs(i-x) < diff){\n\t\t\t\t\tans = i;\n\t\t\t\t\tdiff = Math.abs(i-x);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tif(!set.contains(i)){\n\t\t\t\tif(Math.abs(i-x) < diff){\n\t\t\t\t\tans = i;\n\t\t\t\t\tdiff = Math.abs(i-x);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "if(!set.contains(i)){\n\t\t\t\tif(Math.abs(i-x) < diff){\n\t\t\t\t\tans = i;\n\t\t\t\t\tdiff = Math.abs(i-x);\n\t\t\t\t}\n\t\t\t}", "!set.contains(i)", "set.contains(i)", "set.contains", "set", "i", "{\n\t\t\t\tif(Math.abs(i-x) < diff){\n\t\t\t\t\tans = i;\n\t\t\t\t\tdiff = Math.abs(i-x);\n\t\t\t\t}\n\t\t\t}", "if(Math.abs(i-x) < diff){\n\t\t\t\t\tans = i;\n\t\t\t\t\tdiff = Math.abs(i-x);\n\t\t\t\t}", "Math.abs(i-x) < diff", "Math.abs(i-x)", "Math.abs", "Math", "i-x", "i", "x", "diff", "{\n\t\t\t\t\tans = i;\n\t\t\t\t\tdiff = Math.abs(i-x);\n\t\t\t\t}", "ans = i", "ans", "i", "diff = Math.abs(i-x)", "diff", "Math.abs(i-x)", "Math.abs", "Math", "i-x", "i", "x", "System.out.print(ans)", "System.out.print", "System.out", "System", "System.out", "ans", "String[] args", "args", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint x = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tHashSet<Integer> set = new HashSet<>();\n\t\tfor(int i = 0;i < n; ++i){\n\t\t\tset.add(scan.nextInt());\n\t\t}\n\t\tint diff = 99999;\n\t\tint ans = x;\n\t\tfor(int i = 0;i <= 101; ++i){\n\t\t\tif(!set.contains(i)){\n\t\t\t\tif(Math.abs(i-x) < diff){\n\t\t\t\t\tans = i;\n\t\t\t\t\tdiff = Math.abs(i-x);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.print(ans);\n\t}\n}", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint x = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tHashSet<Integer> set = new HashSet<>();\n\t\tfor(int i = 0;i < n; ++i){\n\t\t\tset.add(scan.nextInt());\n\t\t}\n\t\tint diff = 99999;\n\t\tint ans = x;\n\t\tfor(int i = 0;i <= 101; ++i){\n\t\t\tif(!set.contains(i)){\n\t\t\t\tif(Math.abs(i-x) < diff){\n\t\t\t\t\tans = i;\n\t\t\t\t\tdiff = Math.abs(i-x);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.print(ans);\n\t}\n}", "Main" ]
import java.util.*; public class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); int x = scan.nextInt(); int n = scan.nextInt(); HashSet<Integer> set = new HashSet<>(); for(int i = 0;i < n; ++i){ set.add(scan.nextInt()); } int diff = 99999; int ans = x; for(int i = 0;i <= 101; ++i){ if(!set.contains(i)){ if(Math.abs(i-x) < diff){ ans = i; diff = Math.abs(i-x); } } } System.out.print(ans); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 4, 18, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 29, 41, 13, 4, 18, 13, 13, 4, 18, 13, 13, 41, 13, 17, 41, 13, 40, 17, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 4, 13, 13, 13, 30, 9, 14, 2, 4, 18, 13, 2, 13, 13, 13, 30, 0, 13, 4, 18, 13, 2, 13, 13, 0, 13, 13, 4, 18, 18, 13, 13, 13, 12, 13, 30, 28, 13, 13, 30, 30, 14, 2, 13, 13, 30, 29, 17, 29, 17, 23, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 17, 0, 13, 20, 12, 13, 30, 14, 2, 2, 13, 17, 40, 4, 18, 13, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 0, 13, 17, 41, 13, 17, 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, 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, 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, 4, 18, 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 ], [ 278, 17 ], [ 278, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 20, 24 ], [ 24, 25 ], [ 25, 26 ], [ 18, 27 ], [ 27, 28 ], [ 278, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 32, 34 ], [ 31, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 31, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 31, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 45, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 49, 56 ], [ 31, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 60, 61 ], [ 59, 62 ], [ 31, 63 ], [ 63, 64 ], [ 64, 65 ], [ 63, 66 ], [ 31, 67 ], [ 67, 68 ], [ 67, 69 ], [ 31, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 31, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 74, 79 ], [ 79, 80 ], [ 79, 81 ], [ 74, 82 ], [ 82, 83 ], [ 83, 84 ], [ 74, 85 ], [ 86, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 88, 91 ], [ 87, 92 ], [ 92, 93 ], [ 86, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 96, 99 ], [ 99, 100 ], [ 99, 101 ], [ 95, 102 ], [ 94, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 106, 107 ], [ 107, 108 ], [ 106, 109 ], [ 109, 110 ], [ 109, 111 ], [ 103, 112 ], [ 112, 113 ], [ 112, 114 ], [ 31, 115 ], [ 115, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 115, 120 ], [ 278, 121 ], [ 121, 122 ], [ 121, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 124, 127 ], [ 128, 128 ], [ 128, 129 ], [ 129, 130 ], [ 130, 131 ], [ 130, 132 ], [ 129, 133 ], [ 133, 134 ], [ 134, 135 ], [ 123, 136 ], [ 136, 137 ], [ 121, 138 ], [ 138, 139 ], [ 121, 140 ], [ 140, 141 ], [ 278, 142 ], [ 142, 143 ], [ 142, 144 ], [ 144, 145 ], [ 142, 146 ], [ 146, 147 ], [ 142, 148 ], [ 148, 149 ], [ 148, 150 ], [ 150, 151 ], [ 151, 152 ], [ 151, 153 ], [ 150, 154 ], [ 154, 155 ], [ 154, 156 ], [ 142, 157 ], [ 157, 158 ], [ 157, 159 ], [ 159, 160 ], [ 160, 161 ], [ 161, 162 ], [ 162, 163 ], [ 162, 164 ], [ 161, 165 ], [ 165, 166 ], [ 166, 167 ], [ 167, 168 ], [ 160, 169 ], [ 169, 170 ], [ 170, 171 ], [ 170, 172 ], [ 159, 173 ], [ 173, 174 ], [ 174, 175 ], [ 175, 176 ], [ 142, 177 ], [ 177, 178 ], [ 177, 179 ], [ 179, 180 ], [ 180, 181 ], [ 180, 182 ], [ 179, 183 ], [ 183, 184 ], [ 183, 185 ], [ 179, 186 ], [ 186, 187 ], [ 186, 188 ], [ 188, 189 ], [ 189, 190 ], [ 179, 191 ], [ 191, 192 ], [ 142, 193 ], [ 193, 194 ], [ 193, 195 ], [ 195, 196 ], [ 196, 197 ], [ 197, 198 ], [ 198, 199 ], [ 197, 200 ], [ 200, 201 ], [ 142, 202 ], [ 202, 203 ], [ 202, 204 ], [ 204, 205 ], [ 205, 206 ], [ 206, 207 ], [ 207, 208 ], [ 206, 209 ], [ 209, 210 ], [ 142, 211 ], [ 211, 212 ], [ 211, 213 ], [ 213, 214 ], [ 214, 215 ], [ 214, 216 ], [ 213, 218 ], [ 218, 219 ], [ 219, 220 ], [ 220, 221 ], [ 220, 222 ], [ 218, 223 ], [ 223, 224 ], [ 223, 225 ], [ 218, 226 ], [ 226, 227 ], [ 227, 228 ], [ 218, 229 ], [ 230, 230 ], [ 230, 231 ], [ 231, 232 ], [ 232, 233 ], [ 232, 234 ], [ 231, 235 ], [ 235, 236 ], [ 213, 237 ], [ 237, 238 ], [ 211, 239 ], [ 239, 240 ], [ 142, 241 ], [ 241, 242 ], [ 241, 243 ], [ 243, 244 ], [ 244, 245 ], [ 244, 246 ], [ 243, 248 ], [ 248, 249 ], [ 249, 250 ], [ 250, 251 ], [ 250, 252 ], [ 248, 253 ], [ 253, 254 ], [ 253, 255 ], [ 248, 256 ], [ 256, 257 ], [ 257, 258 ], [ 248, 259 ], [ 260, 260 ], [ 260, 261 ], [ 261, 262 ], [ 262, 263 ], [ 262, 264 ], [ 261, 265 ], [ 265, 266 ], [ 243, 267 ], [ 267, 268 ], [ 241, 269 ], [ 269, 270 ], [ 142, 271 ], [ 271, 272 ], [ 271, 273 ], [ 273, 274 ], [ 274, 275 ], [ 275, 276 ], [ 0, 277 ], [ 277, 278 ], [ 277, 279 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Arrays;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tMain mainObj = new Main();\n\t\tmainObj.solve();\n\t}\n\n\tpublic void solve() throws IOException {\n\t\tFastScanner fs = new FastScanner();\n\t\t\n\t\tint x = fs.nextInt();\n\t\tint n = fs.nextInt();\n\t\t\n\t\tif(n == 0) {\n\t\t\tSystem.out.println(x);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint[] pArr = fs.nextIntArr(n);\n\t\tArrays.sort(pArr);\n\t\t\n\t\tint minDiff = 1_000_000;\n\t\tint candidate = -1;\n\t\t\n\t\tfor(int i = 0; i < 1000; i++) {\n\t\t\tif(exist(pArr, i)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(Math.abs(i-x) < minDiff) {\n\t\t\t\tminDiff = Math.abs(i-x);\n\t\t\t\tcandidate = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(candidate);\n\t}\n\t\n\tboolean exist(int[] intArr, int value) {\n\t\tfor(int arrContent : intArr) {\n\t\t\tif(arrContent == value) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}\n\n\t\n\n\tpublic class FastScanner {\n\n\t\tBufferedReader reader;\n\t\tprivate StringTokenizer st;\n\n\t\tpublic FastScanner() {\n\t\t\tst = null;\n\t\t\treader = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tpublic String next() throws IOException {\n\t\t\tif (st == null || !st.hasMoreElements()) {\n\t\t\t\tst = new StringTokenizer(reader.readLine());\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tpublic String nextLine() throws IOException {\n\t\t\tst = null;\n\t\t\tString readLine = null;\n\t\t\treadLine = reader.readLine();\n\t\t\treturn readLine;\n\t\t}\n\n\t\tpublic int nextInt() throws NumberFormatException, IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tpublic long nextLong() throws NumberFormatException, IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tpublic int[] nextIntArr(int n) throws NumberFormatException, IOException {\n\t\t\tint[] retArr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextInt();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}\n\n\t\tpublic long[] nextLongArr(int n) throws NumberFormatException, IOException {\n\t\t\tlong[] retArr = new long[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextLong();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}\n\n\t\tpublic void close() throws IOException {\n\t\t\treader.close();\n\t\t}\n\t}\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.Arrays;", "Arrays", "java.util", "import java.util.StringTokenizer;", "StringTokenizer", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tMain mainObj = new Main();\n\t\tmainObj.solve();\n\t}\n\n\tpublic void solve() throws IOException {\n\t\tFastScanner fs = new FastScanner();\n\t\t\n\t\tint x = fs.nextInt();\n\t\tint n = fs.nextInt();\n\t\t\n\t\tif(n == 0) {\n\t\t\tSystem.out.println(x);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint[] pArr = fs.nextIntArr(n);\n\t\tArrays.sort(pArr);\n\t\t\n\t\tint minDiff = 1_000_000;\n\t\tint candidate = -1;\n\t\t\n\t\tfor(int i = 0; i < 1000; i++) {\n\t\t\tif(exist(pArr, i)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(Math.abs(i-x) < minDiff) {\n\t\t\t\tminDiff = Math.abs(i-x);\n\t\t\t\tcandidate = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(candidate);\n\t}\n\t\n\tboolean exist(int[] intArr, int value) {\n\t\tfor(int arrContent : intArr) {\n\t\t\tif(arrContent == value) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}\n\n\t\n\n\tpublic class FastScanner {\n\n\t\tBufferedReader reader;\n\t\tprivate StringTokenizer st;\n\n\t\tpublic FastScanner() {\n\t\t\tst = null;\n\t\t\treader = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tpublic String next() throws IOException {\n\t\t\tif (st == null || !st.hasMoreElements()) {\n\t\t\t\tst = new StringTokenizer(reader.readLine());\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tpublic String nextLine() throws IOException {\n\t\t\tst = null;\n\t\t\tString readLine = null;\n\t\t\treadLine = reader.readLine();\n\t\t\treturn readLine;\n\t\t}\n\n\t\tpublic int nextInt() throws NumberFormatException, IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tpublic long nextLong() throws NumberFormatException, IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tpublic int[] nextIntArr(int n) throws NumberFormatException, IOException {\n\t\t\tint[] retArr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextInt();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}\n\n\t\tpublic long[] nextLongArr(int n) throws NumberFormatException, IOException {\n\t\t\tlong[] retArr = new long[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextLong();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}\n\n\t\tpublic void close() throws IOException {\n\t\t\treader.close();\n\t\t}\n\t}\n\n}", "Main", "public static void main(String[] args) throws IOException {\n\t\tMain mainObj = new Main();\n\t\tmainObj.solve();\n\t}", "main", "{\n\t\tMain mainObj = new Main();\n\t\tmainObj.solve();\n\t}", "Main mainObj = new Main();", "mainObj", "new Main()", "mainObj.solve()", "mainObj.solve", "mainObj", "String[] args", "args", "public void solve() throws IOException {\n\t\tFastScanner fs = new FastScanner();\n\t\t\n\t\tint x = fs.nextInt();\n\t\tint n = fs.nextInt();\n\t\t\n\t\tif(n == 0) {\n\t\t\tSystem.out.println(x);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint[] pArr = fs.nextIntArr(n);\n\t\tArrays.sort(pArr);\n\t\t\n\t\tint minDiff = 1_000_000;\n\t\tint candidate = -1;\n\t\t\n\t\tfor(int i = 0; i < 1000; i++) {\n\t\t\tif(exist(pArr, i)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(Math.abs(i-x) < minDiff) {\n\t\t\t\tminDiff = Math.abs(i-x);\n\t\t\t\tcandidate = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(candidate);\n\t}", "solve", "{\n\t\tFastScanner fs = new FastScanner();\n\t\t\n\t\tint x = fs.nextInt();\n\t\tint n = fs.nextInt();\n\t\t\n\t\tif(n == 0) {\n\t\t\tSystem.out.println(x);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint[] pArr = fs.nextIntArr(n);\n\t\tArrays.sort(pArr);\n\t\t\n\t\tint minDiff = 1_000_000;\n\t\tint candidate = -1;\n\t\t\n\t\tfor(int i = 0; i < 1000; i++) {\n\t\t\tif(exist(pArr, i)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(Math.abs(i-x) < minDiff) {\n\t\t\t\tminDiff = Math.abs(i-x);\n\t\t\t\tcandidate = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(candidate);\n\t}", "FastScanner fs = new FastScanner();", "fs", "new FastScanner()", "int x = fs.nextInt();", "x", "fs.nextInt()", "fs.nextInt", "fs", "int n = fs.nextInt();", "n", "fs.nextInt()", "fs.nextInt", "fs", "if(n == 0) {\n\t\t\tSystem.out.println(x);\n\t\t\treturn;\n\t\t}", "n == 0", "n", "0", "{\n\t\t\tSystem.out.println(x);\n\t\t\treturn;\n\t\t}", "System.out.println(x)", "System.out.println", "System.out", "System", "System.out", "x", "return;", "int[] pArr = fs.nextIntArr(n);", "pArr", "fs.nextIntArr(n)", "fs.nextIntArr", "fs", "n", "Arrays.sort(pArr)", "Arrays.sort", "Arrays", "pArr", "int minDiff = 1_000_000;", "minDiff", "1_000_000", "int candidate = -1;", "candidate", "-1", "1", "for(int i = 0; i < 1000; i++) {\n\t\t\tif(exist(pArr, i)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(Math.abs(i-x) < minDiff) {\n\t\t\t\tminDiff = Math.abs(i-x);\n\t\t\t\tcandidate = i;\n\t\t\t}\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < 1000", "i", "1000", "i++", "i++", "i", "{\n\t\t\tif(exist(pArr, i)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(Math.abs(i-x) < minDiff) {\n\t\t\t\tminDiff = Math.abs(i-x);\n\t\t\t\tcandidate = i;\n\t\t\t}\n\t\t}", "{\n\t\t\tif(exist(pArr, i)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(Math.abs(i-x) < minDiff) {\n\t\t\t\tminDiff = Math.abs(i-x);\n\t\t\t\tcandidate = i;\n\t\t\t}\n\t\t}", "if(exist(pArr, i)) {\n\t\t\t\tcontinue;\n\t\t\t}", "exist(pArr, i)", "exist", "pArr", "i", "{\n\t\t\t\tcontinue;\n\t\t\t}", "continue;", "if(Math.abs(i-x) < minDiff) {\n\t\t\t\tminDiff = Math.abs(i-x);\n\t\t\t\tcandidate = i;\n\t\t\t}", "Math.abs(i-x) < minDiff", "Math.abs(i-x)", "Math.abs", "Math", "i-x", "i", "x", "minDiff", "{\n\t\t\t\tminDiff = Math.abs(i-x);\n\t\t\t\tcandidate = i;\n\t\t\t}", "minDiff = Math.abs(i-x)", "minDiff", "Math.abs(i-x)", "Math.abs", "Math", "i-x", "i", "x", "candidate = i", "candidate", "i", "System.out.println(candidate)", "System.out.println", "System.out", "System", "System.out", "candidate", "boolean exist(int[] intArr, int value) {\n\t\tfor(int arrContent : intArr) {\n\t\t\tif(arrContent == value) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "exist", "{\n\t\tfor(int arrContent : intArr) {\n\t\t\tif(arrContent == value) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "for(int arrContent : intArr) {\n\t\t\tif(arrContent == value) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}", "int arrContent", "intArr", "{\n\t\t\tif(arrContent == value) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}", "{\n\t\t\tif(arrContent == value) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}", "if(arrContent == value) {\n\t\t\t\treturn true;\n\t\t\t}", "arrContent == value", "arrContent", "value", "{\n\t\t\t\treturn true;\n\t\t\t}", "return true;", "true", "return false;", "false", "int[] intArr", "intArr", "int value", "value", "public class FastScanner {\n\n\t\tBufferedReader reader;\n\t\tprivate StringTokenizer st;\n\n\t\tpublic FastScanner() {\n\t\t\tst = null;\n\t\t\treader = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tpublic String next() throws IOException {\n\t\t\tif (st == null || !st.hasMoreElements()) {\n\t\t\t\tst = new StringTokenizer(reader.readLine());\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tpublic String nextLine() throws IOException {\n\t\t\tst = null;\n\t\t\tString readLine = null;\n\t\t\treadLine = reader.readLine();\n\t\t\treturn readLine;\n\t\t}\n\n\t\tpublic int nextInt() throws NumberFormatException, IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tpublic long nextLong() throws NumberFormatException, IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tpublic int[] nextIntArr(int n) throws NumberFormatException, IOException {\n\t\t\tint[] retArr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextInt();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}\n\n\t\tpublic long[] nextLongArr(int n) throws NumberFormatException, IOException {\n\t\t\tlong[] retArr = new long[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextLong();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}\n\n\t\tpublic void close() throws IOException {\n\t\t\treader.close();\n\t\t}\n\t}", "FastScanner", "BufferedReader reader;", "reader", "private StringTokenizer st;", "st", "public FastScanner() {\n\t\t\tst = null;\n\t\t\treader = new BufferedReader(new InputStreamReader(System.in));\n\t\t}", "FastScanner", "{\n\t\t\tst = null;\n\t\t\treader = new BufferedReader(new InputStreamReader(System.in));\n\t\t}", "st = null", "st", "null", "reader = new BufferedReader(new InputStreamReader(System.in))", "reader", "new BufferedReader(new InputStreamReader(System.in))", "public String next() throws IOException {\n\t\t\tif (st == null || !st.hasMoreElements()) {\n\t\t\t\tst = new StringTokenizer(reader.readLine());\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}", "next", "{\n\t\t\tif (st == null || !st.hasMoreElements()) {\n\t\t\t\tst = new StringTokenizer(reader.readLine());\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}", "if (st == null || !st.hasMoreElements()) {\n\t\t\t\tst = new StringTokenizer(reader.readLine());\n\t\t\t}", "st == null || !st.hasMoreElements()", "st == null", "st", "null", "!st.hasMoreElements()", "st.hasMoreElements()", "st.hasMoreElements", "st", "{\n\t\t\t\tst = new StringTokenizer(reader.readLine());\n\t\t\t}", "st = new StringTokenizer(reader.readLine())", "st", "new StringTokenizer(reader.readLine())", "return st.nextToken();", "st.nextToken()", "st.nextToken", "st", "public String nextLine() throws IOException {\n\t\t\tst = null;\n\t\t\tString readLine = null;\n\t\t\treadLine = reader.readLine();\n\t\t\treturn readLine;\n\t\t}", "nextLine", "{\n\t\t\tst = null;\n\t\t\tString readLine = null;\n\t\t\treadLine = reader.readLine();\n\t\t\treturn readLine;\n\t\t}", "st = null", "st", "null", "String readLine = null;", "readLine", "null", "readLine = reader.readLine()", "readLine", "reader.readLine()", "reader.readLine", "reader", "return readLine;", "readLine", "public int nextInt() throws NumberFormatException, 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 long nextLong() throws NumberFormatException, 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[] nextIntArr(int n) throws NumberFormatException, IOException {\n\t\t\tint[] retArr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextInt();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}", "nextIntArr", "{\n\t\t\tint[] retArr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextInt();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}", "int[] retArr = new int[n];", "retArr", "new int[n]", "n", "for (int i = 0; i < n; i++) {\n\t\t\t\tretArr[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\tretArr[i] = nextInt();\n\t\t\t}", "{\n\t\t\t\tretArr[i] = nextInt();\n\t\t\t}", "retArr[i] = nextInt()", "retArr[i]", "retArr", "i", "nextInt()", "nextInt", "return retArr;", "retArr", "int n", "n", "public long[] nextLongArr(int n) throws NumberFormatException, IOException {\n\t\t\tlong[] retArr = new long[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextLong();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}", "nextLongArr", "{\n\t\t\tlong[] retArr = new long[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextLong();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}", "long[] retArr = new long[n];", "retArr", "new long[n]", "n", "for (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextLong();\n\t\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\t\tretArr[i] = nextLong();\n\t\t\t}", "{\n\t\t\t\tretArr[i] = nextLong();\n\t\t\t}", "retArr[i] = nextLong()", "retArr[i]", "retArr", "i", "nextLong()", "nextLong", "return retArr;", "retArr", "int n", "n", "public void close() throws IOException {\n\t\t\treader.close();\n\t\t}", "close", "{\n\t\t\treader.close();\n\t\t}", "reader.close()", "reader.close", "reader", "public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tMain mainObj = new Main();\n\t\tmainObj.solve();\n\t}\n\n\tpublic void solve() throws IOException {\n\t\tFastScanner fs = new FastScanner();\n\t\t\n\t\tint x = fs.nextInt();\n\t\tint n = fs.nextInt();\n\t\t\n\t\tif(n == 0) {\n\t\t\tSystem.out.println(x);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint[] pArr = fs.nextIntArr(n);\n\t\tArrays.sort(pArr);\n\t\t\n\t\tint minDiff = 1_000_000;\n\t\tint candidate = -1;\n\t\t\n\t\tfor(int i = 0; i < 1000; i++) {\n\t\t\tif(exist(pArr, i)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(Math.abs(i-x) < minDiff) {\n\t\t\t\tminDiff = Math.abs(i-x);\n\t\t\t\tcandidate = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(candidate);\n\t}\n\t\n\tboolean exist(int[] intArr, int value) {\n\t\tfor(int arrContent : intArr) {\n\t\t\tif(arrContent == value) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}\n\n\t\n\n\tpublic class FastScanner {\n\n\t\tBufferedReader reader;\n\t\tprivate StringTokenizer st;\n\n\t\tpublic FastScanner() {\n\t\t\tst = null;\n\t\t\treader = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tpublic String next() throws IOException {\n\t\t\tif (st == null || !st.hasMoreElements()) {\n\t\t\t\tst = new StringTokenizer(reader.readLine());\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tpublic String nextLine() throws IOException {\n\t\t\tst = null;\n\t\t\tString readLine = null;\n\t\t\treadLine = reader.readLine();\n\t\t\treturn readLine;\n\t\t}\n\n\t\tpublic int nextInt() throws NumberFormatException, IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tpublic long nextLong() throws NumberFormatException, IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tpublic int[] nextIntArr(int n) throws NumberFormatException, IOException {\n\t\t\tint[] retArr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextInt();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}\n\n\t\tpublic long[] nextLongArr(int n) throws NumberFormatException, IOException {\n\t\t\tlong[] retArr = new long[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextLong();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}\n\n\t\tpublic void close() throws IOException {\n\t\t\treader.close();\n\t\t}\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tMain mainObj = new Main();\n\t\tmainObj.solve();\n\t}\n\n\tpublic void solve() throws IOException {\n\t\tFastScanner fs = new FastScanner();\n\t\t\n\t\tint x = fs.nextInt();\n\t\tint n = fs.nextInt();\n\t\t\n\t\tif(n == 0) {\n\t\t\tSystem.out.println(x);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint[] pArr = fs.nextIntArr(n);\n\t\tArrays.sort(pArr);\n\t\t\n\t\tint minDiff = 1_000_000;\n\t\tint candidate = -1;\n\t\t\n\t\tfor(int i = 0; i < 1000; i++) {\n\t\t\tif(exist(pArr, i)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(Math.abs(i-x) < minDiff) {\n\t\t\t\tminDiff = Math.abs(i-x);\n\t\t\t\tcandidate = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(candidate);\n\t}\n\t\n\tboolean exist(int[] intArr, int value) {\n\t\tfor(int arrContent : intArr) {\n\t\t\tif(arrContent == value) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}\n\n\t\n\n\tpublic class FastScanner {\n\n\t\tBufferedReader reader;\n\t\tprivate StringTokenizer st;\n\n\t\tpublic FastScanner() {\n\t\t\tst = null;\n\t\t\treader = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tpublic String next() throws IOException {\n\t\t\tif (st == null || !st.hasMoreElements()) {\n\t\t\t\tst = new StringTokenizer(reader.readLine());\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tpublic String nextLine() throws IOException {\n\t\t\tst = null;\n\t\t\tString readLine = null;\n\t\t\treadLine = reader.readLine();\n\t\t\treturn readLine;\n\t\t}\n\n\t\tpublic int nextInt() throws NumberFormatException, IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tpublic long nextLong() throws NumberFormatException, IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tpublic int[] nextIntArr(int n) throws NumberFormatException, IOException {\n\t\t\tint[] retArr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextInt();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}\n\n\t\tpublic long[] nextLongArr(int n) throws NumberFormatException, IOException {\n\t\t\tlong[] retArr = new long[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tretArr[i] = nextLong();\n\t\t\t}\n\t\t\treturn retArr;\n\t\t}\n\n\t\tpublic void close() throws IOException {\n\t\t\treader.close();\n\t\t}\n\t}\n\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws IOException { Main mainObj = new Main(); mainObj.solve(); } public void solve() throws IOException { FastScanner fs = new FastScanner(); int x = fs.nextInt(); int n = fs.nextInt(); if(n == 0) { System.out.println(x); return; } int[] pArr = fs.nextIntArr(n); Arrays.sort(pArr); int minDiff = 1_000_000; int candidate = -1; for(int i = 0; i < 1000; i++) { if(exist(pArr, i)) { continue; } if(Math.abs(i-x) < minDiff) { minDiff = Math.abs(i-x); candidate = i; } } System.out.println(candidate); } boolean exist(int[] intArr, int value) { for(int arrContent : intArr) { if(arrContent == value) { return true; } } return false; } public class FastScanner { BufferedReader reader; private StringTokenizer st; public FastScanner() { st = null; reader = new BufferedReader(new InputStreamReader(System.in)); } public String next() throws IOException { if (st == null || !st.hasMoreElements()) { st = new StringTokenizer(reader.readLine()); } return st.nextToken(); } public String nextLine() throws IOException { st = null; String readLine = null; readLine = reader.readLine(); return readLine; } public int nextInt() throws NumberFormatException, IOException { return Integer.parseInt(next()); } public long nextLong() throws NumberFormatException, IOException { return Long.parseLong(next()); } public int[] nextIntArr(int n) throws NumberFormatException, IOException { int[] retArr = new int[n]; for (int i = 0; i < n; i++) { retArr[i] = nextInt(); } return retArr; } public long[] nextLongArr(int n) throws NumberFormatException, IOException { long[] retArr = new long[n]; for (int i = 0; i < n; i++) { retArr[i] = nextLong(); } return retArr; } public void close() throws IOException { reader.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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 14, 2, 2, 4, 18, 13, 17, 40, 4, 18, 13, 13, 30, 4, 18, 18, 13, 13, 13, 29, 41, 13, 17, 42, 17, 30, 41, 13, 4, 18, 13, 2, 4, 18, 13, 13, 13, 41, 13, 4, 18, 13, 2, 4, 18, 13, 13, 13, 14, 2, 4, 18, 13, 13, 4, 18, 13, 13, 30, 40, 13, 9, 14, 2, 40, 4, 18, 13, 13, 40, 4, 18, 13, 13, 30, 4, 18, 18, 13, 13, 13, 3, 14, 40, 4, 18, 13, 13, 30, 4, 18, 18, 13, 13, 13, 3, 30, 4, 18, 18, 13, 13, 13, 3, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 151, 5 ], [ 151, 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 ], [ 39, 40 ], [ 38, 41 ], [ 41, 42 ], [ 42, 43 ], [ 8, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 46, 50 ], [ 45, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 52, 55 ], [ 44, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 56, 63 ], [ 8, 64 ], [ 64, 65 ], [ 64, 66 ], [ 8, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 73, 74 ], [ 72, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 76, 79 ], [ 75, 80 ], [ 69, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 84, 85 ], [ 83, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 87, 90 ], [ 86, 91 ], [ 69, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 94, 97 ], [ 93, 98 ], [ 98, 99 ], [ 99, 100 ], [ 98, 101 ], [ 92, 102 ], [ 102, 103 ], [ 103, 104 ], [ 102, 105 ], [ 69, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 109, 112 ], [ 107, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 114, 117 ], [ 106, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 119, 124 ], [ 118, 125 ], [ 106, 126 ], [ 126, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 128, 131 ], [ 126, 132 ], [ 132, 133 ], [ 133, 134 ], [ 134, 135 ], [ 135, 136 ], [ 135, 137 ], [ 133, 138 ], [ 132, 139 ], [ 126, 140 ], [ 140, 141 ], [ 141, 142 ], [ 142, 143 ], [ 143, 144 ], [ 143, 145 ], [ 141, 146 ], [ 140, 147 ], [ 6, 148 ], [ 148, 149 ], [ 0, 150 ], [ 150, 151 ], [ 150, 152 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n String X = s.next();\n final int N = s.nextInt();\n List<String> pList = new ArrayList<String>();\n\n for (int i = 0 ; i < N ; i++) {\n pList.add(s.next());\n }\n\n if (pList.size() == 0 || !pList.contains(X)) {\n System.out.println(X);\n return;\n }\n\n int idx = 1;\n while (true) {\n String minus = String.valueOf(Integer.parseInt(X) - idx);\n String plus = String.valueOf(Integer.parseInt(X) + idx);\n \n if (pList.contains(minus) && pList.contains(plus)) {\n idx++;\n continue;\n }\n\n if (!pList.contains(minus) && !pList.contains(plus)) {\n System.out.println(minus);\n break;\n } else if (!pList.contains(minus)) {\n System.out.println(minus);\n break;\n } else {\n System.out.println(plus);\n break;\n }\n }\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n String X = s.next();\n final int N = s.nextInt();\n List<String> pList = new ArrayList<String>();\n\n for (int i = 0 ; i < N ; i++) {\n pList.add(s.next());\n }\n\n if (pList.size() == 0 || !pList.contains(X)) {\n System.out.println(X);\n return;\n }\n\n int idx = 1;\n while (true) {\n String minus = String.valueOf(Integer.parseInt(X) - idx);\n String plus = String.valueOf(Integer.parseInt(X) + idx);\n \n if (pList.contains(minus) && pList.contains(plus)) {\n idx++;\n continue;\n }\n\n if (!pList.contains(minus) && !pList.contains(plus)) {\n System.out.println(minus);\n break;\n } else if (!pList.contains(minus)) {\n System.out.println(minus);\n break;\n } else {\n System.out.println(plus);\n break;\n }\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n String X = s.next();\n final int N = s.nextInt();\n List<String> pList = new ArrayList<String>();\n\n for (int i = 0 ; i < N ; i++) {\n pList.add(s.next());\n }\n\n if (pList.size() == 0 || !pList.contains(X)) {\n System.out.println(X);\n return;\n }\n\n int idx = 1;\n while (true) {\n String minus = String.valueOf(Integer.parseInt(X) - idx);\n String plus = String.valueOf(Integer.parseInt(X) + idx);\n \n if (pList.contains(minus) && pList.contains(plus)) {\n idx++;\n continue;\n }\n\n if (!pList.contains(minus) && !pList.contains(plus)) {\n System.out.println(minus);\n break;\n } else if (!pList.contains(minus)) {\n System.out.println(minus);\n break;\n } else {\n System.out.println(plus);\n break;\n }\n }\n }", "main", "{\n Scanner s = new Scanner(System.in);\n String X = s.next();\n final int N = s.nextInt();\n List<String> pList = new ArrayList<String>();\n\n for (int i = 0 ; i < N ; i++) {\n pList.add(s.next());\n }\n\n if (pList.size() == 0 || !pList.contains(X)) {\n System.out.println(X);\n return;\n }\n\n int idx = 1;\n while (true) {\n String minus = String.valueOf(Integer.parseInt(X) - idx);\n String plus = String.valueOf(Integer.parseInt(X) + idx);\n \n if (pList.contains(minus) && pList.contains(plus)) {\n idx++;\n continue;\n }\n\n if (!pList.contains(minus) && !pList.contains(plus)) {\n System.out.println(minus);\n break;\n } else if (!pList.contains(minus)) {\n System.out.println(minus);\n break;\n } else {\n System.out.println(plus);\n break;\n }\n }\n }", "Scanner s = new Scanner(System.in);", "s", "new Scanner(System.in)", "String X = s.next();", "X", "s.next()", "s.next", "s", "final int N = s.nextInt();", "N", "s.nextInt()", "s.nextInt", "s", "List<String> pList = new ArrayList<String>();", "pList", "new ArrayList<String>()", "for (int i = 0 ; i < N ; i++) {\n pList.add(s.next());\n }", "int i = 0 ;", "int i = 0 ;", "i", "0", "i < N", "i", "N", "i++", "i++", "i", "{\n pList.add(s.next());\n }", "{\n pList.add(s.next());\n }", "pList.add(s.next())", "pList.add", "pList", "s.next()", "s.next", "s", "if (pList.size() == 0 || !pList.contains(X)) {\n System.out.println(X);\n return;\n }", "pList.size() == 0 || !pList.contains(X)", "pList.size() == 0", "pList.size()", "pList.size", "pList", "0", "!pList.contains(X)", "pList.contains(X)", "pList.contains", "pList", "X", "{\n System.out.println(X);\n return;\n }", "System.out.println(X)", "System.out.println", "System.out", "System", "System.out", "X", "return;", "int idx = 1;", "idx", "1", "while (true) {\n String minus = String.valueOf(Integer.parseInt(X) - idx);\n String plus = String.valueOf(Integer.parseInt(X) + idx);\n \n if (pList.contains(minus) && pList.contains(plus)) {\n idx++;\n continue;\n }\n\n if (!pList.contains(minus) && !pList.contains(plus)) {\n System.out.println(minus);\n break;\n } else if (!pList.contains(minus)) {\n System.out.println(minus);\n break;\n } else {\n System.out.println(plus);\n break;\n }\n }", "true", "{\n String minus = String.valueOf(Integer.parseInt(X) - idx);\n String plus = String.valueOf(Integer.parseInt(X) + idx);\n \n if (pList.contains(minus) && pList.contains(plus)) {\n idx++;\n continue;\n }\n\n if (!pList.contains(minus) && !pList.contains(plus)) {\n System.out.println(minus);\n break;\n } else if (!pList.contains(minus)) {\n System.out.println(minus);\n break;\n } else {\n System.out.println(plus);\n break;\n }\n }", "String minus = String.valueOf(Integer.parseInt(X) - idx);", "minus", "String.valueOf(Integer.parseInt(X) - idx)", "String.valueOf", "String", "Integer.parseInt(X) - idx", "Integer.parseInt(X)", "Integer.parseInt", "Integer", "X", "idx", "String plus = String.valueOf(Integer.parseInt(X) + idx);", "plus", "String.valueOf(Integer.parseInt(X) + idx)", "String.valueOf", "String", "Integer.parseInt(X) + idx", "Integer.parseInt(X)", "Integer.parseInt", "Integer", "X", "idx", "if (pList.contains(minus) && pList.contains(plus)) {\n idx++;\n continue;\n }", "pList.contains(minus) && pList.contains(plus)", "pList.contains(minus)", "pList.contains", "pList", "minus", "pList.contains(plus)", "pList.contains", "pList", "plus", "{\n idx++;\n continue;\n }", "idx++", "idx", "continue;", "if (!pList.contains(minus) && !pList.contains(plus)) {\n System.out.println(minus);\n break;\n } else if (!pList.contains(minus)) {\n System.out.println(minus);\n break;\n } else {\n System.out.println(plus);\n break;\n }", "!pList.contains(minus) && !pList.contains(plus)", "!pList.contains(minus)", "pList.contains(minus)", "pList.contains", "pList", "minus", "!pList.contains(plus)", "pList.contains(plus)", "pList.contains", "pList", "plus", "{\n System.out.println(minus);\n break;\n }", "System.out.println(minus)", "System.out.println", "System.out", "System", "System.out", "minus", "break;", "if (!pList.contains(minus)) {\n System.out.println(minus);\n break;\n } else {\n System.out.println(plus);\n break;\n }", "!pList.contains(minus)", "pList.contains(minus)", "pList.contains", "pList", "minus", "{\n System.out.println(minus);\n break;\n }", "System.out.println(minus)", "System.out.println", "System.out", "System", "System.out", "minus", "break;", "{\n System.out.println(plus);\n break;\n }", "System.out.println(plus)", "System.out.println", "System.out", "System", "System.out", "plus", "break;", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n String X = s.next();\n final int N = s.nextInt();\n List<String> pList = new ArrayList<String>();\n\n for (int i = 0 ; i < N ; i++) {\n pList.add(s.next());\n }\n\n if (pList.size() == 0 || !pList.contains(X)) {\n System.out.println(X);\n return;\n }\n\n int idx = 1;\n while (true) {\n String minus = String.valueOf(Integer.parseInt(X) - idx);\n String plus = String.valueOf(Integer.parseInt(X) + idx);\n \n if (pList.contains(minus) && pList.contains(plus)) {\n idx++;\n continue;\n }\n\n if (!pList.contains(minus) && !pList.contains(plus)) {\n System.out.println(minus);\n break;\n } else if (!pList.contains(minus)) {\n System.out.println(minus);\n break;\n } else {\n System.out.println(plus);\n break;\n }\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n String X = s.next();\n final int N = s.nextInt();\n List<String> pList = new ArrayList<String>();\n\n for (int i = 0 ; i < N ; i++) {\n pList.add(s.next());\n }\n\n if (pList.size() == 0 || !pList.contains(X)) {\n System.out.println(X);\n return;\n }\n\n int idx = 1;\n while (true) {\n String minus = String.valueOf(Integer.parseInt(X) - idx);\n String plus = String.valueOf(Integer.parseInt(X) + idx);\n \n if (pList.contains(minus) && pList.contains(plus)) {\n idx++;\n continue;\n }\n\n if (!pList.contains(minus) && !pList.contains(plus)) {\n System.out.println(minus);\n break;\n } else if (!pList.contains(minus)) {\n System.out.println(minus);\n break;\n } else {\n System.out.println(plus);\n break;\n }\n }\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); String X = s.next(); final int N = s.nextInt(); List<String> pList = new ArrayList<String>(); for (int i = 0 ; i < N ; i++) { pList.add(s.next()); } if (pList.size() == 0 || !pList.contains(X)) { System.out.println(X); return; } int idx = 1; while (true) { String minus = String.valueOf(Integer.parseInt(X) - idx); String plus = String.valueOf(Integer.parseInt(X) + idx); if (pList.contains(minus) && pList.contains(plus)) { idx++; continue; } if (!pList.contains(minus) && !pList.contains(plus)) { System.out.println(minus); break; } else if (!pList.contains(minus)) { System.out.println(minus); break; } else { System.out.println(plus); break; } } } }
[ 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, 17, 1, 40, 13, 30, 30, 41, 13, 2, 13, 13, 41, 13, 2, 13, 13, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 18, 13, 13, 13, 40, 13, 14, 2, 18, 13, 13, 13, 40, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 3, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 3, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 131, 5 ], [ 131, 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 ], [ 58, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 66, 68 ], [ 58, 69 ], [ 69, 70 ], [ 69, 71 ], [ 58, 72 ], [ 72, 73 ], [ 72, 74 ], [ 58, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 75, 80 ], [ 80, 81 ], [ 80, 82 ], [ 75, 83 ], [ 83, 84 ], [ 84, 85 ], [ 75, 86 ], [ 87, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 89, 93 ], [ 88, 94 ], [ 94, 95 ], [ 87, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 97, 101 ], [ 96, 102 ], [ 102, 103 ], [ 58, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 104, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 109, 114 ], [ 108, 115 ], [ 104, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 116, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 121, 126 ], [ 120, 127 ], [ 6, 128 ], [ 128, 129 ], [ 0, 130 ], [ 130, 131 ], [ 130, 132 ] ]
[ "import java.util.Scanner;\n//EphSon solution\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x=sc.nextInt();\n int n=sc.nextInt();\n int[] p=new int[n];\n for(int i=0;i<n;i++) {\n \tp[i]=sc.nextInt();\n }\n for(int i=0;i<=100;i++) {\n \tint num1=x-i,num2=x+i;\n \tint count1=0,count2=0;\n \tfor(int j=0;j<n;j++) {\n \t\tif(p[j]==num1)\tcount1++;\n \t\tif(p[j]==num2)\tcount2++;\n \t}\n \tif(count1==0) {\n \t\tSystem.out.println(num1);\n \t\tbreak;\n \t}else if(count2==0) {\n \t\tSystem.out.println(num2);\n \t\tbreak;\n \t}\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 x=sc.nextInt();\n int n=sc.nextInt();\n int[] p=new int[n];\n for(int i=0;i<n;i++) {\n \tp[i]=sc.nextInt();\n }\n for(int i=0;i<=100;i++) {\n \tint num1=x-i,num2=x+i;\n \tint count1=0,count2=0;\n \tfor(int j=0;j<n;j++) {\n \t\tif(p[j]==num1)\tcount1++;\n \t\tif(p[j]==num2)\tcount2++;\n \t}\n \tif(count1==0) {\n \t\tSystem.out.println(num1);\n \t\tbreak;\n \t}else if(count2==0) {\n \t\tSystem.out.println(num2);\n \t\tbreak;\n \t}\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x=sc.nextInt();\n int n=sc.nextInt();\n int[] p=new int[n];\n for(int i=0;i<n;i++) {\n \tp[i]=sc.nextInt();\n }\n for(int i=0;i<=100;i++) {\n \tint num1=x-i,num2=x+i;\n \tint count1=0,count2=0;\n \tfor(int j=0;j<n;j++) {\n \t\tif(p[j]==num1)\tcount1++;\n \t\tif(p[j]==num2)\tcount2++;\n \t}\n \tif(count1==0) {\n \t\tSystem.out.println(num1);\n \t\tbreak;\n \t}else if(count2==0) {\n \t\tSystem.out.println(num2);\n \t\tbreak;\n \t}\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int x=sc.nextInt();\n int n=sc.nextInt();\n int[] p=new int[n];\n for(int i=0;i<n;i++) {\n \tp[i]=sc.nextInt();\n }\n for(int i=0;i<=100;i++) {\n \tint num1=x-i,num2=x+i;\n \tint count1=0,count2=0;\n \tfor(int j=0;j<n;j++) {\n \t\tif(p[j]==num1)\tcount1++;\n \t\tif(p[j]==num2)\tcount2++;\n \t}\n \tif(count1==0) {\n \t\tSystem.out.println(num1);\n \t\tbreak;\n \t}else if(count2==0) {\n \t\tSystem.out.println(num2);\n \t\tbreak;\n \t}\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x=sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int n=sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int[] p=new int[n];", "p", "new int[n]", "n", "for(int i=0;i<n;i++) {\n \tp[i]=sc.nextInt();\n }", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n \tp[i]=sc.nextInt();\n }", "{\n \tp[i]=sc.nextInt();\n }", "p[i]=sc.nextInt()", "p[i]", "p", "i", "sc.nextInt()", "sc.nextInt", "sc", "for(int i=0;i<=100;i++) {\n \tint num1=x-i,num2=x+i;\n \tint count1=0,count2=0;\n \tfor(int j=0;j<n;j++) {\n \t\tif(p[j]==num1)\tcount1++;\n \t\tif(p[j]==num2)\tcount2++;\n \t}\n \tif(count1==0) {\n \t\tSystem.out.println(num1);\n \t\tbreak;\n \t}else if(count2==0) {\n \t\tSystem.out.println(num2);\n \t\tbreak;\n \t}\n }", "int i=0;", "int i=0;", "i", "0", "i<=100", "i", "100", "i++", "i++", "i", "{\n \tint num1=x-i,num2=x+i;\n \tint count1=0,count2=0;\n \tfor(int j=0;j<n;j++) {\n \t\tif(p[j]==num1)\tcount1++;\n \t\tif(p[j]==num2)\tcount2++;\n \t}\n \tif(count1==0) {\n \t\tSystem.out.println(num1);\n \t\tbreak;\n \t}else if(count2==0) {\n \t\tSystem.out.println(num2);\n \t\tbreak;\n \t}\n }", "{\n \tint num1=x-i,num2=x+i;\n \tint count1=0,count2=0;\n \tfor(int j=0;j<n;j++) {\n \t\tif(p[j]==num1)\tcount1++;\n \t\tif(p[j]==num2)\tcount2++;\n \t}\n \tif(count1==0) {\n \t\tSystem.out.println(num1);\n \t\tbreak;\n \t}else if(count2==0) {\n \t\tSystem.out.println(num2);\n \t\tbreak;\n \t}\n }", "int num1=x-i", "num1", "x-i", "x", "i", "num2=x+i;", "num2", "x+i", "x", "i", "int count1=0", "count1", "0", "count2=0;", "count2", "0", "for(int j=0;j<n;j++) {\n \t\tif(p[j]==num1)\tcount1++;\n \t\tif(p[j]==num2)\tcount2++;\n \t}", "int j=0;", "int j=0;", "j", "0", "j<n", "j", "n", "j++", "j++", "j", "{\n \t\tif(p[j]==num1)\tcount1++;\n \t\tif(p[j]==num2)\tcount2++;\n \t}", "{\n \t\tif(p[j]==num1)\tcount1++;\n \t\tif(p[j]==num2)\tcount2++;\n \t}", "if(p[j]==num1)\tcount1++;", "p[j]==num1", "p[j]", "p", "j", "num1", "count1++", "count1", "if(p[j]==num2)\tcount2++;", "p[j]==num2", "p[j]", "p", "j", "num2", "count2++", "count2", "if(count1==0) {\n \t\tSystem.out.println(num1);\n \t\tbreak;\n \t}else if(count2==0) {\n \t\tSystem.out.println(num2);\n \t\tbreak;\n \t}", "count1==0", "count1", "0", "{\n \t\tSystem.out.println(num1);\n \t\tbreak;\n \t}", "System.out.println(num1)", "System.out.println", "System.out", "System", "System.out", "num1", "break;", "if(count2==0) {\n \t\tSystem.out.println(num2);\n \t\tbreak;\n \t}", "count2==0", "count2", "0", "{\n \t\tSystem.out.println(num2);\n \t\tbreak;\n \t}", "System.out.println(num2)", "System.out.println", "System.out", "System", "System.out", "num2", "break;", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x=sc.nextInt();\n int n=sc.nextInt();\n int[] p=new int[n];\n for(int i=0;i<n;i++) {\n \tp[i]=sc.nextInt();\n }\n for(int i=0;i<=100;i++) {\n \tint num1=x-i,num2=x+i;\n \tint count1=0,count2=0;\n \tfor(int j=0;j<n;j++) {\n \t\tif(p[j]==num1)\tcount1++;\n \t\tif(p[j]==num2)\tcount2++;\n \t}\n \tif(count1==0) {\n \t\tSystem.out.println(num1);\n \t\tbreak;\n \t}else if(count2==0) {\n \t\tSystem.out.println(num2);\n \t\tbreak;\n \t}\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x=sc.nextInt();\n int n=sc.nextInt();\n int[] p=new int[n];\n for(int i=0;i<n;i++) {\n \tp[i]=sc.nextInt();\n }\n for(int i=0;i<=100;i++) {\n \tint num1=x-i,num2=x+i;\n \tint count1=0,count2=0;\n \tfor(int j=0;j<n;j++) {\n \t\tif(p[j]==num1)\tcount1++;\n \t\tif(p[j]==num2)\tcount2++;\n \t}\n \tif(count1==0) {\n \t\tSystem.out.println(num1);\n \t\tbreak;\n \t}else if(count2==0) {\n \t\tSystem.out.println(num2);\n \t\tbreak;\n \t}\n }\n }\n}", "Main" ]
import java.util.Scanner; //EphSon solution public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x=sc.nextInt(); int n=sc.nextInt(); int[] p=new int[n]; for(int i=0;i<n;i++) { p[i]=sc.nextInt(); } for(int i=0;i<=100;i++) { int num1=x-i,num2=x+i; int count1=0,count2=0; for(int j=0;j<n;j++) { if(p[j]==num1) count1++; if(p[j]==num2) count2++; } if(count1==0) { System.out.println(num1); break; }else if(count2==0) { System.out.println(num2); break; } } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 4, 13, 41, 13, 4, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 13, 41, 13, 17, 42, 17, 30, 14, 40, 4, 18, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 3, 14, 40, 4, 18, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 3, 4, 18, 13, 4, 18, 13, 2, 13, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 2, 2, 2, 13, 13, 18, 13, 13, 2, 2, 13, 13, 18, 13, 13, 30, 3, 40, 13, 23, 13, 12, 13, 30, 4, 18, 13, 17, 42, 17, 30, 38, 5, 13, 30, 3, 30, 41, 13, 4, 18, 18, 13, 13, 14, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 40, 17, 30, 3, 30, 4, 18, 13, 13, 12, 13, 30, 4, 13, 29, 4, 18, 13, 4, 18, 13, 12, 13, 30, 4, 13, 29, 4, 18, 13, 4, 18, 13, 13, 23, 13, 12, 13, 30, 4, 13, 29, 4, 18, 13, 4, 18, 13, 12, 13, 30, 4, 13, 29, 4, 18, 13, 4, 18, 13, 13, 23, 13, 12, 13, 30, 4, 13, 29, 20, 12, 13, 30, 4, 13, 29, 20, 23, 13, 12, 13, 30, 42, 17, 30, 38, 5, 13, 30, 3, 30, 41, 13, 4, 18, 18, 13, 13, 14, 2, 2, 13, 17, 2, 13, 40, 17, 30, 3, 12, 13, 30, 42, 17, 30, 38, 5, 13, 30, 3, 30, 41, 13, 4, 18, 18, 13, 13, 14, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 40, 17, 3, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 306, 11 ], [ 306, 12 ], [ 12, 13 ], [ 12, 14 ], [ 306, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 17, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 17, 26 ], [ 26, 27 ], [ 26, 28 ], [ 17, 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 ], [ 42, 45 ], [ 45, 46 ], [ 17, 47 ], [ 47, 48 ], [ 47, 49 ], [ 17, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 55, 58 ], [ 58, 59 ], [ 58, 60 ], [ 53, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 62, 67 ], [ 67, 68 ], [ 67, 69 ], [ 61, 70 ], [ 52, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 73, 76 ], [ 76, 77 ], [ 76, 78 ], [ 71, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 80, 85 ], [ 85, 86 ], [ 85, 87 ], [ 79, 88 ], [ 52, 89 ], [ 89, 90 ], [ 90, 91 ], [ 89, 92 ], [ 92, 93 ], [ 93, 94 ], [ 92, 95 ], [ 95, 96 ], [ 95, 97 ], [ 52, 98 ], [ 98, 99 ], [ 99, 100 ], [ 98, 101 ], [ 101, 102 ], [ 102, 103 ], [ 101, 104 ], [ 104, 105 ], [ 104, 106 ], [ 52, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 109, 113 ], [ 113, 114 ], [ 113, 115 ], [ 108, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 116, 120 ], [ 120, 121 ], [ 120, 122 ], [ 107, 123 ], [ 123, 124 ], [ 52, 125 ], [ 125, 126 ], [ 15, 127 ], [ 127, 128 ], [ 306, 129 ], [ 129, 130 ], [ 129, 131 ], [ 131, 132 ], [ 132, 133 ], [ 133, 134 ], [ 132, 135 ], [ 131, 136 ], [ 136, 137 ], [ 136, 138 ], [ 138, 139 ], [ 139, 140 ], [ 140, 141 ], [ 140, 142 ], [ 142, 143 ], [ 139, 144 ], [ 144, 145 ], [ 145, 146 ], [ 145, 147 ], [ 147, 148 ], [ 148, 149 ], [ 149, 150 ], [ 149, 151 ], [ 144, 152 ], [ 152, 153 ], [ 154, 154 ], [ 154, 155 ], [ 155, 156 ], [ 155, 157 ], [ 154, 158 ], [ 158, 159 ], [ 158, 160 ], [ 154, 161 ], [ 161, 162 ], [ 161, 163 ], [ 163, 164 ], [ 152, 165 ], [ 165, 166 ], [ 152, 167 ], [ 167, 168 ], [ 168, 169 ], [ 169, 170 ], [ 168, 171 ], [ 306, 172 ], [ 172, 173 ], [ 172, 174 ], [ 174, 175 ], [ 175, 176 ], [ 174, 177 ], [ 177, 178 ], [ 178, 179 ], [ 179, 180 ], [ 178, 181 ], [ 181, 182 ], [ 182, 183 ], [ 306, 184 ], [ 184, 185 ], [ 184, 186 ], [ 186, 187 ], [ 187, 188 ], [ 186, 189 ], [ 189, 190 ], [ 190, 191 ], [ 191, 192 ], [ 190, 193 ], [ 193, 194 ], [ 194, 195 ], [ 190, 196 ], [ 184, 197 ], [ 197, 198 ], [ 306, 199 ], [ 199, 200 ], [ 199, 201 ], [ 201, 202 ], [ 202, 203 ], [ 201, 204 ], [ 204, 205 ], [ 205, 206 ], [ 206, 207 ], [ 205, 208 ], [ 208, 209 ], [ 209, 210 ], [ 306, 211 ], [ 211, 212 ], [ 211, 213 ], [ 213, 214 ], [ 214, 215 ], [ 213, 216 ], [ 216, 217 ], [ 217, 218 ], [ 218, 219 ], [ 217, 220 ], [ 220, 221 ], [ 221, 222 ], [ 217, 223 ], [ 211, 224 ], [ 224, 225 ], [ 306, 226 ], [ 226, 227 ], [ 226, 228 ], [ 228, 229 ], [ 229, 230 ], [ 228, 231 ], [ 231, 232 ], [ 306, 233 ], [ 233, 234 ], [ 233, 235 ], [ 235, 236 ], [ 236, 237 ], [ 235, 238 ], [ 238, 239 ], [ 233, 240 ], [ 240, 241 ], [ 306, 242 ], [ 242, 243 ], [ 242, 244 ], [ 244, 245 ], [ 245, 246 ], [ 245, 247 ], [ 247, 248 ], [ 248, 249 ], [ 249, 250 ], [ 249, 251 ], [ 251, 252 ], [ 248, 253 ], [ 253, 254 ], [ 254, 255 ], [ 254, 256 ], [ 256, 257 ], [ 257, 258 ], [ 258, 259 ], [ 258, 260 ], [ 253, 261 ], [ 261, 262 ], [ 262, 263 ], [ 263, 264 ], [ 263, 265 ], [ 262, 266 ], [ 266, 267 ], [ 266, 268 ], [ 268, 269 ], [ 261, 270 ], [ 270, 271 ], [ 306, 272 ], [ 272, 273 ], [ 272, 274 ], [ 274, 275 ], [ 275, 276 ], [ 275, 277 ], [ 277, 278 ], [ 278, 279 ], [ 279, 280 ], [ 279, 281 ], [ 281, 282 ], [ 278, 283 ], [ 283, 284 ], [ 284, 285 ], [ 284, 286 ], [ 286, 287 ], [ 287, 288 ], [ 288, 289 ], [ 288, 290 ], [ 283, 291 ], [ 291, 292 ], [ 293, 293 ], [ 293, 294 ], [ 294, 295 ], [ 294, 296 ], [ 293, 297 ], [ 297, 298 ], [ 297, 299 ], [ 293, 300 ], [ 300, 301 ], [ 300, 302 ], [ 302, 303 ], [ 291, 304 ], [ 0, 305 ], [ 305, 306 ], [ 305, 307 ] ]
[ "import java.io.IOException;\nimport java.math.BigInteger;\nimport java.util.ArrayList;\n\npublic class Main {\n private static StringBuilder builder = new StringBuilder();\n public static void main(String[] args) {\n int x = readInt();\n int n = readInt();\n ArrayList<Integer> list = new ArrayList<>(n);\n for (int i = 0; i < n; i++) {\n list.add(readInt());\n }\n\n int i = 0;\n while (true) {\n if (!list.contains(x - i)) {\n System.out.print(x - i);\n break;\n }\n\n if (!list.contains(x + i)) {\n System.out.print(x + i);\n break;\n }\n\n list.remove(Integer.valueOf(x - i));\n list.remove(Integer.valueOf(x + i));\n if (x + i == Integer.MAX_VALUE || x - i == Integer.MIN_VALUE) {\n break;\n }\n\n i++;\n }\n }\n\n private static void read() {\n builder.setLength(0);\n while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) {\n break;\n } else {\n builder.appendCodePoint(b);\n }\n } catch (IOException e) {\n break;\n }\n }\n }\n\n private static int readInt() {\n read();\n return Integer.parseInt(builder.toString());\n }\n\n private static int readInt(int radix) {\n read();\n return Integer.parseInt(builder.toString(), radix);\n }\n\n private static long readLong() {\n read();\n return Long.parseLong(builder.toString());\n }\n\n private static long readLong(int radix) {\n read();\n return Long.parseLong(builder.toString(), radix);\n }\n\n private static BigInteger readBigInteger() {\n read();\n return new BigInteger(builder.toString());\n }\n\n private static BigInteger readBigInteger(int radix) {\n read();\n return new BigInteger(builder.toString(), radix);\n }\n\n private static void skipLine() {\n while (true) {\n try {\n int b = System.in.read();\n if (b == '\\n' || b == -1) {\n break;\n }\n } catch (IOException e) {\n break;\n }\n }\n }\n\n private static void skip() {\n while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) break;\n } catch (IOException e) {\n break;\n }\n }\n }\n\n}", "import java.io.IOException;", "IOException", "java.io", "import java.math.BigInteger;", "BigInteger", "java.math", "import java.util.ArrayList;", "ArrayList", "java.util", "public class Main {\n private static StringBuilder builder = new StringBuilder();\n public static void main(String[] args) {\n int x = readInt();\n int n = readInt();\n ArrayList<Integer> list = new ArrayList<>(n);\n for (int i = 0; i < n; i++) {\n list.add(readInt());\n }\n\n int i = 0;\n while (true) {\n if (!list.contains(x - i)) {\n System.out.print(x - i);\n break;\n }\n\n if (!list.contains(x + i)) {\n System.out.print(x + i);\n break;\n }\n\n list.remove(Integer.valueOf(x - i));\n list.remove(Integer.valueOf(x + i));\n if (x + i == Integer.MAX_VALUE || x - i == Integer.MIN_VALUE) {\n break;\n }\n\n i++;\n }\n }\n\n private static void read() {\n builder.setLength(0);\n while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) {\n break;\n } else {\n builder.appendCodePoint(b);\n }\n } catch (IOException e) {\n break;\n }\n }\n }\n\n private static int readInt() {\n read();\n return Integer.parseInt(builder.toString());\n }\n\n private static int readInt(int radix) {\n read();\n return Integer.parseInt(builder.toString(), radix);\n }\n\n private static long readLong() {\n read();\n return Long.parseLong(builder.toString());\n }\n\n private static long readLong(int radix) {\n read();\n return Long.parseLong(builder.toString(), radix);\n }\n\n private static BigInteger readBigInteger() {\n read();\n return new BigInteger(builder.toString());\n }\n\n private static BigInteger readBigInteger(int radix) {\n read();\n return new BigInteger(builder.toString(), radix);\n }\n\n private static void skipLine() {\n while (true) {\n try {\n int b = System.in.read();\n if (b == '\\n' || b == -1) {\n break;\n }\n } catch (IOException e) {\n break;\n }\n }\n }\n\n private static void skip() {\n while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) break;\n } catch (IOException e) {\n break;\n }\n }\n }\n\n}", "Main", "private static StringBuilder builder = new StringBuilder();", "builder", "new StringBuilder()", "public static void main(String[] args) {\n int x = readInt();\n int n = readInt();\n ArrayList<Integer> list = new ArrayList<>(n);\n for (int i = 0; i < n; i++) {\n list.add(readInt());\n }\n\n int i = 0;\n while (true) {\n if (!list.contains(x - i)) {\n System.out.print(x - i);\n break;\n }\n\n if (!list.contains(x + i)) {\n System.out.print(x + i);\n break;\n }\n\n list.remove(Integer.valueOf(x - i));\n list.remove(Integer.valueOf(x + i));\n if (x + i == Integer.MAX_VALUE || x - i == Integer.MIN_VALUE) {\n break;\n }\n\n i++;\n }\n }", "main", "{\n int x = readInt();\n int n = readInt();\n ArrayList<Integer> list = new ArrayList<>(n);\n for (int i = 0; i < n; i++) {\n list.add(readInt());\n }\n\n int i = 0;\n while (true) {\n if (!list.contains(x - i)) {\n System.out.print(x - i);\n break;\n }\n\n if (!list.contains(x + i)) {\n System.out.print(x + i);\n break;\n }\n\n list.remove(Integer.valueOf(x - i));\n list.remove(Integer.valueOf(x + i));\n if (x + i == Integer.MAX_VALUE || x - i == Integer.MIN_VALUE) {\n break;\n }\n\n i++;\n }\n }", "int x = readInt();", "x", "readInt()", "readInt", "int n = readInt();", "n", "readInt()", "readInt", "ArrayList<Integer> list = new ArrayList<>(n);", "list", "new ArrayList<>(n)", "for (int i = 0; i < n; i++) {\n list.add(readInt());\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n list.add(readInt());\n }", "{\n list.add(readInt());\n }", "list.add(readInt())", "list.add", "list", "readInt()", "readInt", "int i = 0;", "i", "0", "while (true) {\n if (!list.contains(x - i)) {\n System.out.print(x - i);\n break;\n }\n\n if (!list.contains(x + i)) {\n System.out.print(x + i);\n break;\n }\n\n list.remove(Integer.valueOf(x - i));\n list.remove(Integer.valueOf(x + i));\n if (x + i == Integer.MAX_VALUE || x - i == Integer.MIN_VALUE) {\n break;\n }\n\n i++;\n }", "true", "{\n if (!list.contains(x - i)) {\n System.out.print(x - i);\n break;\n }\n\n if (!list.contains(x + i)) {\n System.out.print(x + i);\n break;\n }\n\n list.remove(Integer.valueOf(x - i));\n list.remove(Integer.valueOf(x + i));\n if (x + i == Integer.MAX_VALUE || x - i == Integer.MIN_VALUE) {\n break;\n }\n\n i++;\n }", "if (!list.contains(x - i)) {\n System.out.print(x - i);\n break;\n }", "!list.contains(x - i)", "list.contains(x - i)", "list.contains", "list", "x - i", "x", "i", "{\n System.out.print(x - i);\n break;\n }", "System.out.print(x - i)", "System.out.print", "System.out", "System", "System.out", "x - i", "x", "i", "break;", "if (!list.contains(x + i)) {\n System.out.print(x + i);\n break;\n }", "!list.contains(x + i)", "list.contains(x + i)", "list.contains", "list", "x + i", "x", "i", "{\n System.out.print(x + i);\n break;\n }", "System.out.print(x + i)", "System.out.print", "System.out", "System", "System.out", "x + i", "x", "i", "break;", "list.remove(Integer.valueOf(x - i))", "list.remove", "list", "Integer.valueOf(x - i)", "Integer.valueOf", "Integer", "x - i", "x", "i", "list.remove(Integer.valueOf(x + i))", "list.remove", "list", "Integer.valueOf(x + i)", "Integer.valueOf", "Integer", "x + i", "x", "i", "if (x + i == Integer.MAX_VALUE || x - i == Integer.MIN_VALUE) {\n break;\n }", "x + i == Integer.MAX_VALUE || x - i == Integer.MIN_VALUE", "x + i == Integer.MAX_VALUE", "x + i", "x", "i", "Integer.MAX_VALUE", "Integer", "Integer.MAX_VALUE", "x - i == Integer.MIN_VALUE", "x - i", "x", "i", "Integer.MIN_VALUE", "Integer", "Integer.MIN_VALUE", "{\n break;\n }", "break;", "i++", "i", "String[] args", "args", "private static void read() {\n builder.setLength(0);\n while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) {\n break;\n } else {\n builder.appendCodePoint(b);\n }\n } catch (IOException e) {\n break;\n }\n }\n }", "read", "{\n builder.setLength(0);\n while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) {\n break;\n } else {\n builder.appendCodePoint(b);\n }\n } catch (IOException e) {\n break;\n }\n }\n }", "builder.setLength(0)", "builder.setLength", "builder", "0", "while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) {\n break;\n } else {\n builder.appendCodePoint(b);\n }\n } catch (IOException e) {\n break;\n }\n }", "true", "{\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) {\n break;\n } else {\n builder.appendCodePoint(b);\n }\n } catch (IOException e) {\n break;\n }\n }", "try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) {\n break;\n } else {\n builder.appendCodePoint(b);\n }\n } catch (IOException e) {\n break;\n }", "catch (IOException e) {\n break;\n }", "IOException e", "{\n break;\n }", "break;", "{\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) {\n break;\n } else {\n builder.appendCodePoint(b);\n }\n }", "int b = System.in.read();", "b", "System.in.read()", "System.in.read", "System.in", "System", "System.in", "if (b == ' ' || b == '\\n' || b == -1) {\n break;\n } else {\n builder.appendCodePoint(b);\n }", "b == ' ' || b == '\\n' || b == -1", "b == ' ' || b == '\\n' || b == -1", "b == ' '", "b", "' '", "b == '\\n'", "b", "'\\n'", "b == -1", "b", "-1", "1", "{\n break;\n }", "break;", "{\n builder.appendCodePoint(b);\n }", "builder.appendCodePoint(b)", "builder.appendCodePoint", "builder", "b", "private static int readInt() {\n read();\n return Integer.parseInt(builder.toString());\n }", "readInt", "{\n read();\n return Integer.parseInt(builder.toString());\n }", "read()", "read", "return Integer.parseInt(builder.toString());", "Integer.parseInt(builder.toString())", "Integer.parseInt", "Integer", "builder.toString()", "builder.toString", "builder", "private static int readInt(int radix) {\n read();\n return Integer.parseInt(builder.toString(), radix);\n }", "readInt", "{\n read();\n return Integer.parseInt(builder.toString(), radix);\n }", "read()", "read", "return Integer.parseInt(builder.toString(), radix);", "Integer.parseInt(builder.toString(), radix)", "Integer.parseInt", "Integer", "builder.toString()", "builder.toString", "builder", "radix", "int radix", "radix", "private static long readLong() {\n read();\n return Long.parseLong(builder.toString());\n }", "readLong", "{\n read();\n return Long.parseLong(builder.toString());\n }", "read()", "read", "return Long.parseLong(builder.toString());", "Long.parseLong(builder.toString())", "Long.parseLong", "Long", "builder.toString()", "builder.toString", "builder", "private static long readLong(int radix) {\n read();\n return Long.parseLong(builder.toString(), radix);\n }", "readLong", "{\n read();\n return Long.parseLong(builder.toString(), radix);\n }", "read()", "read", "return Long.parseLong(builder.toString(), radix);", "Long.parseLong(builder.toString(), radix)", "Long.parseLong", "Long", "builder.toString()", "builder.toString", "builder", "radix", "int radix", "radix", "private static BigInteger readBigInteger() {\n read();\n return new BigInteger(builder.toString());\n }", "readBigInteger", "{\n read();\n return new BigInteger(builder.toString());\n }", "read()", "read", "return new BigInteger(builder.toString());", "new BigInteger(builder.toString())", "private static BigInteger readBigInteger(int radix) {\n read();\n return new BigInteger(builder.toString(), radix);\n }", "readBigInteger", "{\n read();\n return new BigInteger(builder.toString(), radix);\n }", "read()", "read", "return new BigInteger(builder.toString(), radix);", "new BigInteger(builder.toString(), radix)", "int radix", "radix", "private static void skipLine() {\n while (true) {\n try {\n int b = System.in.read();\n if (b == '\\n' || b == -1) {\n break;\n }\n } catch (IOException e) {\n break;\n }\n }\n }", "skipLine", "{\n while (true) {\n try {\n int b = System.in.read();\n if (b == '\\n' || b == -1) {\n break;\n }\n } catch (IOException e) {\n break;\n }\n }\n }", "while (true) {\n try {\n int b = System.in.read();\n if (b == '\\n' || b == -1) {\n break;\n }\n } catch (IOException e) {\n break;\n }\n }", "true", "{\n try {\n int b = System.in.read();\n if (b == '\\n' || b == -1) {\n break;\n }\n } catch (IOException e) {\n break;\n }\n }", "try {\n int b = System.in.read();\n if (b == '\\n' || b == -1) {\n break;\n }\n } catch (IOException e) {\n break;\n }", "catch (IOException e) {\n break;\n }", "IOException e", "{\n break;\n }", "break;", "{\n int b = System.in.read();\n if (b == '\\n' || b == -1) {\n break;\n }\n }", "int b = System.in.read();", "b", "System.in.read()", "System.in.read", "System.in", "System", "System.in", "if (b == '\\n' || b == -1) {\n break;\n }", "b == '\\n' || b == -1", "b == '\\n'", "b", "'\\n'", "b == -1", "b", "-1", "1", "{\n break;\n }", "break;", "private static void skip() {\n while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) break;\n } catch (IOException e) {\n break;\n }\n }\n }", "skip", "{\n while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) break;\n } catch (IOException e) {\n break;\n }\n }\n }", "while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) break;\n } catch (IOException e) {\n break;\n }\n }", "true", "{\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) break;\n } catch (IOException e) {\n break;\n }\n }", "try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) break;\n } catch (IOException e) {\n break;\n }", "catch (IOException e) {\n break;\n }", "IOException e", "{\n break;\n }", "break;", "{\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) break;\n }", "int b = System.in.read();", "b", "System.in.read()", "System.in.read", "System.in", "System", "System.in", "if (b == ' ' || b == '\\n' || b == -1) break;", "b == ' ' || b == '\\n' || b == -1", "b == ' ' || b == '\\n' || b == -1", "b == ' '", "b", "' '", "b == '\\n'", "b", "'\\n'", "b == -1", "b", "-1", "1", "break;", "public class Main {\n private static StringBuilder builder = new StringBuilder();\n public static void main(String[] args) {\n int x = readInt();\n int n = readInt();\n ArrayList<Integer> list = new ArrayList<>(n);\n for (int i = 0; i < n; i++) {\n list.add(readInt());\n }\n\n int i = 0;\n while (true) {\n if (!list.contains(x - i)) {\n System.out.print(x - i);\n break;\n }\n\n if (!list.contains(x + i)) {\n System.out.print(x + i);\n break;\n }\n\n list.remove(Integer.valueOf(x - i));\n list.remove(Integer.valueOf(x + i));\n if (x + i == Integer.MAX_VALUE || x - i == Integer.MIN_VALUE) {\n break;\n }\n\n i++;\n }\n }\n\n private static void read() {\n builder.setLength(0);\n while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) {\n break;\n } else {\n builder.appendCodePoint(b);\n }\n } catch (IOException e) {\n break;\n }\n }\n }\n\n private static int readInt() {\n read();\n return Integer.parseInt(builder.toString());\n }\n\n private static int readInt(int radix) {\n read();\n return Integer.parseInt(builder.toString(), radix);\n }\n\n private static long readLong() {\n read();\n return Long.parseLong(builder.toString());\n }\n\n private static long readLong(int radix) {\n read();\n return Long.parseLong(builder.toString(), radix);\n }\n\n private static BigInteger readBigInteger() {\n read();\n return new BigInteger(builder.toString());\n }\n\n private static BigInteger readBigInteger(int radix) {\n read();\n return new BigInteger(builder.toString(), radix);\n }\n\n private static void skipLine() {\n while (true) {\n try {\n int b = System.in.read();\n if (b == '\\n' || b == -1) {\n break;\n }\n } catch (IOException e) {\n break;\n }\n }\n }\n\n private static void skip() {\n while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) break;\n } catch (IOException e) {\n break;\n }\n }\n }\n\n}", "public class Main {\n private static StringBuilder builder = new StringBuilder();\n public static void main(String[] args) {\n int x = readInt();\n int n = readInt();\n ArrayList<Integer> list = new ArrayList<>(n);\n for (int i = 0; i < n; i++) {\n list.add(readInt());\n }\n\n int i = 0;\n while (true) {\n if (!list.contains(x - i)) {\n System.out.print(x - i);\n break;\n }\n\n if (!list.contains(x + i)) {\n System.out.print(x + i);\n break;\n }\n\n list.remove(Integer.valueOf(x - i));\n list.remove(Integer.valueOf(x + i));\n if (x + i == Integer.MAX_VALUE || x - i == Integer.MIN_VALUE) {\n break;\n }\n\n i++;\n }\n }\n\n private static void read() {\n builder.setLength(0);\n while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) {\n break;\n } else {\n builder.appendCodePoint(b);\n }\n } catch (IOException e) {\n break;\n }\n }\n }\n\n private static int readInt() {\n read();\n return Integer.parseInt(builder.toString());\n }\n\n private static int readInt(int radix) {\n read();\n return Integer.parseInt(builder.toString(), radix);\n }\n\n private static long readLong() {\n read();\n return Long.parseLong(builder.toString());\n }\n\n private static long readLong(int radix) {\n read();\n return Long.parseLong(builder.toString(), radix);\n }\n\n private static BigInteger readBigInteger() {\n read();\n return new BigInteger(builder.toString());\n }\n\n private static BigInteger readBigInteger(int radix) {\n read();\n return new BigInteger(builder.toString(), radix);\n }\n\n private static void skipLine() {\n while (true) {\n try {\n int b = System.in.read();\n if (b == '\\n' || b == -1) {\n break;\n }\n } catch (IOException e) {\n break;\n }\n }\n }\n\n private static void skip() {\n while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) break;\n } catch (IOException e) {\n break;\n }\n }\n }\n\n}", "Main" ]
import java.io.IOException; import java.math.BigInteger; import java.util.ArrayList; public class Main { private static StringBuilder builder = new StringBuilder(); public static void main(String[] args) { int x = readInt(); int n = readInt(); ArrayList<Integer> list = new ArrayList<>(n); for (int i = 0; i < n; i++) { list.add(readInt()); } int i = 0; while (true) { if (!list.contains(x - i)) { System.out.print(x - i); break; } if (!list.contains(x + i)) { System.out.print(x + i); break; } list.remove(Integer.valueOf(x - i)); list.remove(Integer.valueOf(x + i)); if (x + i == Integer.MAX_VALUE || x - i == Integer.MIN_VALUE) { break; } i++; } } private static void read() { builder.setLength(0); while (true) { try { int b = System.in.read(); if (b == ' ' || b == '\n' || b == -1) { break; } else { builder.appendCodePoint(b); } } catch (IOException e) { break; } } } private static int readInt() { read(); return Integer.parseInt(builder.toString()); } private static int readInt(int radix) { read(); return Integer.parseInt(builder.toString(), radix); } private static long readLong() { read(); return Long.parseLong(builder.toString()); } private static long readLong(int radix) { read(); return Long.parseLong(builder.toString(), radix); } private static BigInteger readBigInteger() { read(); return new BigInteger(builder.toString()); } private static BigInteger readBigInteger(int radix) { read(); return new BigInteger(builder.toString(), radix); } private static void skipLine() { while (true) { try { int b = System.in.read(); if (b == '\n' || b == -1) { break; } } catch (IOException e) { break; } } } private static void skip() { while (true) { try { int b = System.in.read(); if (b == ' ' || b == '\n' || b == -1) break; } catch (IOException e) { break; } } } }
[ 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, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 0, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 40, 4, 18, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 29, 14, 40, 4, 18, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 29, 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 ], [ 133, 17 ], [ 133, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 20, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 26, 31 ], [ 20, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 34, 37 ], [ 37, 38 ], [ 37, 39 ], [ 20, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 42, 45 ], [ 45, 46 ], [ 45, 47 ], [ 20, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 50, 55 ], [ 20, 56 ], [ 56, 57 ], [ 56, 58 ], [ 20, 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 ], [ 73, 74 ], [ 72, 75 ], [ 75, 76 ], [ 76, 77 ], [ 75, 78 ], [ 78, 79 ], [ 78, 80 ], [ 20, 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 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 96, 99 ], [ 99, 100 ], [ 99, 101 ], [ 94, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 103, 108 ], [ 108, 109 ], [ 108, 110 ], [ 102, 111 ], [ 93, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 114, 117 ], [ 117, 118 ], [ 117, 119 ], [ 112, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 121, 126 ], [ 126, 127 ], [ 126, 128 ], [ 120, 129 ], [ 18, 130 ], [ 130, 131 ], [ 0, 132 ], [ 132, 133 ], [ 132, 134 ] ]
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\nimport java.util.Set;\nimport java.util.HashSet;\n\npublic class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String[] str = in.readLine().split(\" \");\n int x = Integer.parseInt(str[0]);\n int n = Integer.parseInt(str[1]);\n str = in.readLine().split(\" \");\n Set<Integer> set = new HashSet<>();\n for(int i=0; i<n; i++) {\n set.add(Integer.parseInt(str[i]));\n }\n for(int i=0; i<=200; i++) {\n if(!set.contains(x-i)) {\n System.out.println(x-i);\n return;\n }\n if(!set.contains(x+i)) {\n System.out.println(x+i);\n return;\n }\n }\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.util.Set;", "Set", "java.util", "import java.util.HashSet;", "HashSet", "java.util", "public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String[] str = in.readLine().split(\" \");\n int x = Integer.parseInt(str[0]);\n int n = Integer.parseInt(str[1]);\n str = in.readLine().split(\" \");\n Set<Integer> set = new HashSet<>();\n for(int i=0; i<n; i++) {\n set.add(Integer.parseInt(str[i]));\n }\n for(int i=0; i<=200; i++) {\n if(!set.contains(x-i)) {\n System.out.println(x-i);\n return;\n }\n if(!set.contains(x+i)) {\n System.out.println(x+i);\n return;\n }\n }\n }\n}", "Main", "public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String[] str = in.readLine().split(\" \");\n int x = Integer.parseInt(str[0]);\n int n = Integer.parseInt(str[1]);\n str = in.readLine().split(\" \");\n Set<Integer> set = new HashSet<>();\n for(int i=0; i<n; i++) {\n set.add(Integer.parseInt(str[i]));\n }\n for(int i=0; i<=200; i++) {\n if(!set.contains(x-i)) {\n System.out.println(x-i);\n return;\n }\n if(!set.contains(x+i)) {\n System.out.println(x+i);\n return;\n }\n }\n }", "main", "{\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String[] str = in.readLine().split(\" \");\n int x = Integer.parseInt(str[0]);\n int n = Integer.parseInt(str[1]);\n str = in.readLine().split(\" \");\n Set<Integer> set = new HashSet<>();\n for(int i=0; i<n; i++) {\n set.add(Integer.parseInt(str[i]));\n }\n for(int i=0; i<=200; i++) {\n if(!set.contains(x-i)) {\n System.out.println(x-i);\n return;\n }\n if(!set.contains(x+i)) {\n System.out.println(x+i);\n return;\n }\n }\n }", "BufferedReader in = new BufferedReader(new InputStreamReader(System.in));", "in", "new BufferedReader(new InputStreamReader(System.in))", "String[] str = in.readLine().split(\" \");", "str", "in.readLine().split(\" \")", "in.readLine().split", "in.readLine()", "in.readLine", "in", "\" \"", "int x = Integer.parseInt(str[0]);", "x", "Integer.parseInt(str[0])", "Integer.parseInt", "Integer", "str[0]", "str", "0", "int n = Integer.parseInt(str[1]);", "n", "Integer.parseInt(str[1])", "Integer.parseInt", "Integer", "str[1]", "str", "1", "str = in.readLine().split(\" \")", "str", "in.readLine().split(\" \")", "in.readLine().split", "in.readLine()", "in.readLine", "in", "\" \"", "Set<Integer> set = new HashSet<>();", "set", "new HashSet<>()", "for(int i=0; i<n; i++) {\n set.add(Integer.parseInt(str[i]));\n }", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n set.add(Integer.parseInt(str[i]));\n }", "{\n set.add(Integer.parseInt(str[i]));\n }", "set.add(Integer.parseInt(str[i]))", "set.add", "set", "Integer.parseInt(str[i])", "Integer.parseInt", "Integer", "str[i]", "str", "i", "for(int i=0; i<=200; i++) {\n if(!set.contains(x-i)) {\n System.out.println(x-i);\n return;\n }\n if(!set.contains(x+i)) {\n System.out.println(x+i);\n return;\n }\n }", "int i=0;", "int i=0;", "i", "0", "i<=200", "i", "200", "i++", "i++", "i", "{\n if(!set.contains(x-i)) {\n System.out.println(x-i);\n return;\n }\n if(!set.contains(x+i)) {\n System.out.println(x+i);\n return;\n }\n }", "{\n if(!set.contains(x-i)) {\n System.out.println(x-i);\n return;\n }\n if(!set.contains(x+i)) {\n System.out.println(x+i);\n return;\n }\n }", "if(!set.contains(x-i)) {\n System.out.println(x-i);\n return;\n }", "!set.contains(x-i)", "set.contains(x-i)", "set.contains", "set", "x-i", "x", "i", "{\n System.out.println(x-i);\n return;\n }", "System.out.println(x-i)", "System.out.println", "System.out", "System", "System.out", "x-i", "x", "i", "return;", "if(!set.contains(x+i)) {\n System.out.println(x+i);\n return;\n }", "!set.contains(x+i)", "set.contains(x+i)", "set.contains", "set", "x+i", "x", "i", "{\n System.out.println(x+i);\n return;\n }", "System.out.println(x+i)", "System.out.println", "System.out", "System", "System.out", "x+i", "x", "i", "return;", "String[] args", "args", "public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String[] str = in.readLine().split(\" \");\n int x = Integer.parseInt(str[0]);\n int n = Integer.parseInt(str[1]);\n str = in.readLine().split(\" \");\n Set<Integer> set = new HashSet<>();\n for(int i=0; i<n; i++) {\n set.add(Integer.parseInt(str[i]));\n }\n for(int i=0; i<=200; i++) {\n if(!set.contains(x-i)) {\n System.out.println(x-i);\n return;\n }\n if(!set.contains(x+i)) {\n System.out.println(x+i);\n return;\n }\n }\n }\n}", "public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String[] str = in.readLine().split(\" \");\n int x = Integer.parseInt(str[0]);\n int n = Integer.parseInt(str[1]);\n str = in.readLine().split(\" \");\n Set<Integer> set = new HashSet<>();\n for(int i=0; i<n; i++) {\n set.add(Integer.parseInt(str[i]));\n }\n for(int i=0; i<=200; i++) {\n if(!set.contains(x-i)) {\n System.out.println(x-i);\n return;\n }\n if(!set.contains(x+i)) {\n System.out.println(x+i);\n return;\n }\n }\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.util.Set; import java.util.HashSet; public class Main { public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String[] str = in.readLine().split(" "); int x = Integer.parseInt(str[0]); int n = Integer.parseInt(str[1]); str = in.readLine().split(" "); Set<Integer> set = new HashSet<>(); for(int i=0; i<n; i++) { set.add(Integer.parseInt(str[i])); } for(int i=0; i<=200; i++) { if(!set.contains(x-i)) { System.out.println(x-i); return; } if(!set.contains(x+i)) { System.out.println(x+i); return; } } } }
[ 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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 40, 4, 18, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 3, 14, 40, 4, 18, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 3, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 99, 8 ], [ 99, 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 ], [ 42, 43 ], [ 41, 44 ], [ 44, 45 ], [ 45, 46 ], [ 11, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 47, 52 ], [ 52, 53 ], [ 52, 54 ], [ 47, 55 ], [ 55, 56 ], [ 56, 57 ], [ 47, 58 ], [ 59, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 62, 65 ], [ 65, 66 ], [ 65, 67 ], [ 60, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 69, 74 ], [ 74, 75 ], [ 74, 76 ], [ 68, 77 ], [ 60, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 80, 83 ], [ 83, 84 ], [ 83, 85 ], [ 78, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 87, 92 ], [ 92, 93 ], [ 92, 94 ], [ 86, 95 ], [ 9, 96 ], [ 96, 97 ], [ 0, 98 ], [ 98, 99 ], [ 98, 100 ] ]
[ "import java.util.*;\nimport java.util.ArrayList;\n \npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt();\n \tint N = sc.nextInt();\n \n List <Integer> a = new ArrayList <Integer>();//リストでaを格納する\n \n for(int i=0; i<N; i++){\n a.add(sc.nextInt());//リストにaを入力していく,aはXに含まれない整数\n }\n \n for(int i=0; i<100; i++){//N(0~100)をまわす\n if(!a.contains(X-i)){//aに含まれないX-iの整数\n System.out.println(X-i);//Xに近い前の整数\n break;\n }\n else if(!a.contains(X+i)){\n System.out.println(X+i);//Xに近い後ろの整数\n break;\n }\n }\n }\n}", "import java.util.*;", "util.*", "java", "import java.util.ArrayList;", "ArrayList", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt();\n \tint N = sc.nextInt();\n \n List <Integer> a = new ArrayList <Integer>();//リストでaを格納する\n \n for(int i=0; i<N; i++){\n a.add(sc.nextInt());//リストにaを入力していく,aはXに含まれない整数\n }\n \n for(int i=0; i<100; i++){//N(0~100)をまわす\n if(!a.contains(X-i)){//aに含まれないX-iの整数\n System.out.println(X-i);//Xに近い前の整数\n break;\n }\n else if(!a.contains(X+i)){\n System.out.println(X+i);//Xに近い後ろの整数\n break;\n }\n }\n }\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt();\n \tint N = sc.nextInt();\n \n List <Integer> a = new ArrayList <Integer>();//リストでaを格納する\n \n for(int i=0; i<N; i++){\n a.add(sc.nextInt());//リストにaを入力していく,aはXに含まれない整数\n }\n \n for(int i=0; i<100; i++){//N(0~100)をまわす\n if(!a.contains(X-i)){//aに含まれないX-iの整数\n System.out.println(X-i);//Xに近い前の整数\n break;\n }\n else if(!a.contains(X+i)){\n System.out.println(X+i);//Xに近い後ろの整数\n break;\n }\n }\n }", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt();\n \tint N = sc.nextInt();\n \n List <Integer> a = new ArrayList <Integer>();//リストでaを格納する\n \n for(int i=0; i<N; i++){\n a.add(sc.nextInt());//リストにaを入力していく,aはXに含まれない整数\n }\n \n for(int i=0; i<100; i++){//N(0~100)をまわす\n if(!a.contains(X-i)){//aに含まれないX-iの整数\n System.out.println(X-i);//Xに近い前の整数\n break;\n }\n else if(!a.contains(X+i)){\n System.out.println(X+i);//Xに近い後ろの整数\n break;\n }\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int X = sc.nextInt();", "X", "sc.nextInt()", "sc.nextInt", "sc", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "List <Integer> a = new ArrayList <Integer>();", "a", "new ArrayList <Integer>()", "for(int i=0; i<N; i++){\n a.add(sc.nextInt());//リストにaを入力していく,aはXに含まれない整数\n }", "int i=0;", "int i=0;", "i", "0", "i<N", "i", "N", "i++", "i++", "i", "{\n a.add(sc.nextInt());//リストにaを入力していく,aはXに含まれない整数\n }", "{\n a.add(sc.nextInt());//リストにaを入力していく,aはXに含まれない整数\n }", "a.add(sc.nextInt())", "a.add", "a", "sc.nextInt()", "sc.nextInt", "sc", "for(int i=0; i<100; i++){//N(0~100)をまわす\n if(!a.contains(X-i)){//aに含まれないX-iの整数\n System.out.println(X-i);//Xに近い前の整数\n break;\n }\n else if(!a.contains(X+i)){\n System.out.println(X+i);//Xに近い後ろの整数\n break;\n }\n }", "int i=0;", "int i=0;", "i", "0", "i<100", "i", "100", "i++", "i++", "i", "{//N(0~100)をまわす\n if(!a.contains(X-i)){//aに含まれないX-iの整数\n System.out.println(X-i);//Xに近い前の整数\n break;\n }\n else if(!a.contains(X+i)){\n System.out.println(X+i);//Xに近い後ろの整数\n break;\n }\n }", "{//N(0~100)をまわす\n if(!a.contains(X-i)){//aに含まれないX-iの整数\n System.out.println(X-i);//Xに近い前の整数\n break;\n }\n else if(!a.contains(X+i)){\n System.out.println(X+i);//Xに近い後ろの整数\n break;\n }\n }", "if(!a.contains(X-i)){//aに含まれないX-iの整数\n System.out.println(X-i);//Xに近い前の整数\n break;\n }\n else if(!a.contains(X+i)){\n System.out.println(X+i);//Xに近い後ろの整数\n break;\n }", "!a.contains(X-i)", "a.contains(X-i)", "a.contains", "a", "X-i", "X", "i", "{//aに含まれないX-iの整数\n System.out.println(X-i);//Xに近い前の整数\n break;\n }", "System.out.println(X-i)", "System.out.println", "System.out", "System", "System.out", "X-i", "X", "i", "break;", "if(!a.contains(X+i)){\n System.out.println(X+i);//Xに近い後ろの整数\n break;\n }", "!a.contains(X+i)", "a.contains(X+i)", "a.contains", "a", "X+i", "X", "i", "{\n System.out.println(X+i);//Xに近い後ろの整数\n break;\n }", "System.out.println(X+i)", "System.out.println", "System.out", "System", "System.out", "X+i", "X", "i", "break;", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt();\n \tint N = sc.nextInt();\n \n List <Integer> a = new ArrayList <Integer>();//リストでaを格納する\n \n for(int i=0; i<N; i++){\n a.add(sc.nextInt());//リストにaを入力していく,aはXに含まれない整数\n }\n \n for(int i=0; i<100; i++){//N(0~100)をまわす\n if(!a.contains(X-i)){//aに含まれないX-iの整数\n System.out.println(X-i);//Xに近い前の整数\n break;\n }\n else if(!a.contains(X+i)){\n System.out.println(X+i);//Xに近い後ろの整数\n break;\n }\n }\n }\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt();\n \tint N = sc.nextInt();\n \n List <Integer> a = new ArrayList <Integer>();//リストでaを格納する\n \n for(int i=0; i<N; i++){\n a.add(sc.nextInt());//リストにaを入力していく,aはXに含まれない整数\n }\n \n for(int i=0; i<100; i++){//N(0~100)をまわす\n if(!a.contains(X-i)){//aに含まれないX-iの整数\n System.out.println(X-i);//Xに近い前の整数\n break;\n }\n else if(!a.contains(X+i)){\n System.out.println(X+i);//Xに近い後ろの整数\n break;\n }\n }\n }\n}", "Main" ]
import java.util.*; import java.util.ArrayList; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int X = sc.nextInt(); int N = sc.nextInt(); List <Integer> a = new ArrayList <Integer>();//リストでaを格納する for(int i=0; i<N; i++){ a.add(sc.nextInt());//リストにaを入力していく,aはXに含まれない整数 } for(int i=0; i<100; i++){//N(0~100)をまわす if(!a.contains(X-i)){//aに含まれないX-iの整数 System.out.println(X-i);//Xに近い前の整数 break; } else if(!a.contains(X+i)){ System.out.println(X+i);//Xに近い後ろの整数 break; } } } }
[ 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, 41, 13, 41, 13, 20, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 0, 18, 13, 13, 13, 11, 1, 41, 13, 17, 1, 40, 13, 30, 30, 0, 13, 2, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 18, 13, 13, 13, 30, 3, 14, 2, 13, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 4, 18, 13, 17, 0, 13, 2, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 18, 13, 13, 13, 30, 3, 14, 2, 13, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 4, 18, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 170, 5 ], [ 170, 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 ], [ 8, 27 ], [ 27, 28 ], [ 8, 29 ], [ 29, 30 ], [ 29, 31 ], [ 8, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 33, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 38, 43 ], [ 37, 44 ], [ 44, 45 ], [ 45, 46 ], [ 44, 47 ], [ 8, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 48, 53 ], [ 53, 54 ], [ 53, 55 ], [ 48, 56 ], [ 56, 57 ], [ 57, 58 ], [ 48, 59 ], [ 60, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 64, 65 ], [ 60, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 66, 70 ], [ 8, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 71, 76 ], [ 76, 77 ], [ 77, 78 ], [ 71, 79 ], [ 80, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 83, 85 ], [ 80, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 86, 91 ], [ 91, 92 ], [ 91, 93 ], [ 86, 94 ], [ 94, 95 ], [ 95, 96 ], [ 86, 97 ], [ 98, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 100, 104 ], [ 99, 105 ], [ 105, 106 ], [ 99, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 110, 111 ], [ 110, 112 ], [ 107, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 114, 119 ], [ 113, 120 ], [ 120, 121 ], [ 121, 122 ], [ 120, 123 ], [ 80, 124 ], [ 124, 125 ], [ 124, 126 ], [ 126, 127 ], [ 126, 128 ], [ 80, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 131, 133 ], [ 129, 134 ], [ 134, 135 ], [ 134, 136 ], [ 129, 137 ], [ 137, 138 ], [ 138, 139 ], [ 129, 140 ], [ 141, 141 ], [ 141, 142 ], [ 142, 143 ], [ 143, 144 ], [ 144, 145 ], [ 144, 146 ], [ 143, 147 ], [ 142, 148 ], [ 148, 149 ], [ 142, 150 ], [ 150, 151 ], [ 151, 152 ], [ 151, 153 ], [ 153, 154 ], [ 153, 155 ], [ 150, 156 ], [ 156, 157 ], [ 157, 158 ], [ 158, 159 ], [ 159, 160 ], [ 159, 161 ], [ 157, 162 ], [ 156, 163 ], [ 163, 164 ], [ 164, 165 ], [ 163, 166 ], [ 6, 167 ], [ 167, 168 ], [ 0, 169 ], [ 169, 170 ], [ 169, 171 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint X = scan.nextInt();\n\t\tint N = scan.nextInt();\n\t\tint p = 0;\n\t\tint min;\n\t\tint max;\n\t\tint[] result = new int[N];\n\n\t\tif(N == 0) {\n\t\t\tSystem.out.println(X);\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\tfor(int i = 0;i < N;i++) {\n\t\t\tp = scan.nextInt();\n\t\t\tresult[i] = p;\n\t\t}\n\n\t\tfor(int i = 0;;i++) {\n\t\t\tmin = X - i;\n\t\t\tfor(int j = 0;j < N;j++) {\n\t\t\t\tif(result[j] == min) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(min);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tmax = X + i;\n\t\t\tfor(int j = 0;j < N;j++) {\n\t\t\t\tif(result[j] == max) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(max);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\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\t\tScanner scan = new Scanner(System.in);\n\n\t\tint X = scan.nextInt();\n\t\tint N = scan.nextInt();\n\t\tint p = 0;\n\t\tint min;\n\t\tint max;\n\t\tint[] result = new int[N];\n\n\t\tif(N == 0) {\n\t\t\tSystem.out.println(X);\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\tfor(int i = 0;i < N;i++) {\n\t\t\tp = scan.nextInt();\n\t\t\tresult[i] = p;\n\t\t}\n\n\t\tfor(int i = 0;;i++) {\n\t\t\tmin = X - i;\n\t\t\tfor(int j = 0;j < N;j++) {\n\t\t\t\tif(result[j] == min) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(min);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tmax = X + i;\n\t\t\tfor(int j = 0;j < N;j++) {\n\t\t\t\tif(result[j] == max) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(max);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint X = scan.nextInt();\n\t\tint N = scan.nextInt();\n\t\tint p = 0;\n\t\tint min;\n\t\tint max;\n\t\tint[] result = new int[N];\n\n\t\tif(N == 0) {\n\t\t\tSystem.out.println(X);\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\tfor(int i = 0;i < N;i++) {\n\t\t\tp = scan.nextInt();\n\t\t\tresult[i] = p;\n\t\t}\n\n\t\tfor(int i = 0;;i++) {\n\t\t\tmin = X - i;\n\t\t\tfor(int j = 0;j < N;j++) {\n\t\t\t\tif(result[j] == min) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(min);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tmax = X + i;\n\t\t\tfor(int j = 0;j < N;j++) {\n\t\t\t\tif(result[j] == max) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(max);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint X = scan.nextInt();\n\t\tint N = scan.nextInt();\n\t\tint p = 0;\n\t\tint min;\n\t\tint max;\n\t\tint[] result = new int[N];\n\n\t\tif(N == 0) {\n\t\t\tSystem.out.println(X);\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\tfor(int i = 0;i < N;i++) {\n\t\t\tp = scan.nextInt();\n\t\t\tresult[i] = p;\n\t\t}\n\n\t\tfor(int i = 0;;i++) {\n\t\t\tmin = X - i;\n\t\t\tfor(int j = 0;j < N;j++) {\n\t\t\t\tif(result[j] == min) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(min);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tmax = X + i;\n\t\t\tfor(int j = 0;j < N;j++) {\n\t\t\t\tif(result[j] == max) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(max);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int X = scan.nextInt();", "X", "scan.nextInt()", "scan.nextInt", "scan", "int N = scan.nextInt();", "N", "scan.nextInt()", "scan.nextInt", "scan", "int p = 0;", "p", "0", "int min;", "min", "int max;", "max", "int[] result = new int[N];", "result", "new int[N]", "N", "if(N == 0) {\n\t\t\tSystem.out.println(X);\n\t\t\tSystem.exit(0);\n\t\t}", "N == 0", "N", "0", "{\n\t\t\tSystem.out.println(X);\n\t\t\tSystem.exit(0);\n\t\t}", "System.out.println(X)", "System.out.println", "System.out", "System", "System.out", "X", "System.exit(0)", "System.exit", "System", "0", "for(int i = 0;i < N;i++) {\n\t\t\tp = scan.nextInt();\n\t\t\tresult[i] = p;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < N", "i", "N", "i++", "i++", "i", "{\n\t\t\tp = scan.nextInt();\n\t\t\tresult[i] = p;\n\t\t}", "{\n\t\t\tp = scan.nextInt();\n\t\t\tresult[i] = p;\n\t\t}", "p = scan.nextInt()", "p", "scan.nextInt()", "scan.nextInt", "scan", "result[i] = p", "result[i]", "result", "i", "p", "for(int i = 0;;i++) {\n\t\t\tmin = X - i;\n\t\t\tfor(int j = 0;j < N;j++) {\n\t\t\t\tif(result[j] == min) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(min);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tmax = X + i;\n\t\t\tfor(int j = 0;j < N;j++) {\n\t\t\t\tif(result[j] == max) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(max);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i++", "i++", "i", "{\n\t\t\tmin = X - i;\n\t\t\tfor(int j = 0;j < N;j++) {\n\t\t\t\tif(result[j] == min) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(min);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tmax = X + i;\n\t\t\tfor(int j = 0;j < N;j++) {\n\t\t\t\tif(result[j] == max) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(max);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tmin = X - i;\n\t\t\tfor(int j = 0;j < N;j++) {\n\t\t\t\tif(result[j] == min) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(min);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tmax = X + i;\n\t\t\tfor(int j = 0;j < N;j++) {\n\t\t\t\tif(result[j] == max) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(max);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "min = X - i", "min", "X - i", "X", "i", "for(int j = 0;j < N;j++) {\n\t\t\t\tif(result[j] == min) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(min);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}", "int j = 0;", "int j = 0;", "j", "0", "j < N", "j", "N", "j++", "j++", "j", "{\n\t\t\t\tif(result[j] == min) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(min);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tif(result[j] == min) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(min);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}", "if(result[j] == min) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(min);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}", "result[j] == min", "result[j]", "result", "j", "min", "{\n\t\t\t\t\tbreak;\n\t\t\t\t}", "break;", "if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(min);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}", "j == N - 1", "j", "N - 1", "N", "1", "{\n\t\t\t\t\tSystem.out.println(min);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}", "System.out.println(min)", "System.out.println", "System.out", "System", "System.out", "min", "System.exit(0)", "System.exit", "System", "0", "max = X + i", "max", "X + i", "X", "i", "for(int j = 0;j < N;j++) {\n\t\t\t\tif(result[j] == max) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(max);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}", "int j = 0;", "int j = 0;", "j", "0", "j < N", "j", "N", "j++", "j++", "j", "{\n\t\t\t\tif(result[j] == max) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(max);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tif(result[j] == max) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(max);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}", "if(result[j] == max) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(max);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}", "result[j] == max", "result[j]", "result", "j", "max", "{\n\t\t\t\t\tbreak;\n\t\t\t\t}", "break;", "if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(max);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}", "j == N - 1", "j", "N - 1", "N", "1", "{\n\t\t\t\t\tSystem.out.println(max);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}", "System.out.println(max)", "System.out.println", "System.out", "System", "System.out", "max", "System.exit(0)", "System.exit", "System", "0", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint X = scan.nextInt();\n\t\tint N = scan.nextInt();\n\t\tint p = 0;\n\t\tint min;\n\t\tint max;\n\t\tint[] result = new int[N];\n\n\t\tif(N == 0) {\n\t\t\tSystem.out.println(X);\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\tfor(int i = 0;i < N;i++) {\n\t\t\tp = scan.nextInt();\n\t\t\tresult[i] = p;\n\t\t}\n\n\t\tfor(int i = 0;;i++) {\n\t\t\tmin = X - i;\n\t\t\tfor(int j = 0;j < N;j++) {\n\t\t\t\tif(result[j] == min) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(min);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tmax = X + i;\n\t\t\tfor(int j = 0;j < N;j++) {\n\t\t\t\tif(result[j] == max) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(max);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint X = scan.nextInt();\n\t\tint N = scan.nextInt();\n\t\tint p = 0;\n\t\tint min;\n\t\tint max;\n\t\tint[] result = new int[N];\n\n\t\tif(N == 0) {\n\t\t\tSystem.out.println(X);\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\tfor(int i = 0;i < N;i++) {\n\t\t\tp = scan.nextInt();\n\t\t\tresult[i] = p;\n\t\t}\n\n\t\tfor(int i = 0;;i++) {\n\t\t\tmin = X - i;\n\t\t\tfor(int j = 0;j < N;j++) {\n\t\t\t\tif(result[j] == min) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(min);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tmax = X + i;\n\t\t\tfor(int j = 0;j < N;j++) {\n\t\t\t\tif(result[j] == max) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(j == N - 1) {\n\t\t\t\t\tSystem.out.println(max);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\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 X = scan.nextInt(); int N = scan.nextInt(); int p = 0; int min; int max; int[] result = new int[N]; if(N == 0) { System.out.println(X); System.exit(0); } for(int i = 0;i < N;i++) { p = scan.nextInt(); result[i] = p; } for(int i = 0;;i++) { min = X - i; for(int j = 0;j < N;j++) { if(result[j] == min) { break; }else if(j == N - 1) { System.out.println(min); System.exit(0); } } max = X + i; for(int j = 0;j < N;j++) { if(result[j] == max) { break; }else if(j == N - 1) { System.out.println(max); System.exit(0); } } } } }
[ 7, 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, 13, 13, 4, 18, 13, 23, 13, 6, 13, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 20, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 0, 18, 13, 13, 17, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 13, 2, 13, 17, 1, 40, 13, 30, 30, 14, 40, 18, 13, 13, 30, 0, 13, 13, 3, 11, 1, 41, 13, 2, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 40, 18, 13, 13, 30, 0, 13, 13, 3, 14, 2, 2, 13, 13, 2, 13, 13, 30, 4, 18, 13, 13, 30, 4, 18, 13, 13, 23, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 23, 13, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 30, 41, 13, 17, 38, 5, 13, 30, 37, 20, 30, 0, 13, 4, 18, 13, 14, 2, 13, 17, 30, 29, 17, 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, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 238, 8 ], [ 238, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 14, 16 ], [ 11, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 19, 21 ], [ 11, 22 ], [ 22, 23 ], [ 22, 24 ], [ 11, 25 ], [ 25, 26 ], [ 25, 27 ], [ 11, 28 ], [ 28, 29 ], [ 28, 30 ], [ 11, 31 ], [ 31, 32 ], [ 32, 33 ], [ 31, 34 ], [ 31, 35 ], [ 11, 36 ], [ 36, 37 ], [ 37, 38 ], [ 9, 39 ], [ 39, 40 ], [ 238, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 49, 50 ], [ 45, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 54, 55 ], [ 45, 56 ], [ 56, 57 ], [ 56, 58 ], [ 45, 60 ], [ 60, 61 ], [ 60, 62 ], [ 45, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 64, 69 ], [ 69, 70 ], [ 69, 71 ], [ 64, 72 ], [ 72, 73 ], [ 73, 74 ], [ 64, 75 ], [ 76, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 80, 81 ], [ 76, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 82, 86 ], [ 45, 87 ], [ 87, 88 ], [ 87, 89 ], [ 45, 90 ], [ 90, 91 ], [ 90, 92 ], [ 45, 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 ], [ 108, 109 ], [ 108, 110 ], [ 106, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 111, 115 ], [ 45, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 118, 120 ], [ 120, 121 ], [ 120, 122 ], [ 116, 123 ], [ 123, 124 ], [ 123, 125 ], [ 116, 126 ], [ 126, 127 ], [ 127, 128 ], [ 116, 129 ], [ 130, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 133, 134 ], [ 133, 135 ], [ 131, 136 ], [ 136, 137 ], [ 137, 138 ], [ 137, 139 ], [ 136, 140 ], [ 45, 141 ], [ 141, 142 ], [ 142, 143 ], [ 143, 144 ], [ 143, 145 ], [ 142, 146 ], [ 146, 147 ], [ 146, 148 ], [ 141, 149 ], [ 149, 150 ], [ 150, 151 ], [ 151, 152 ], [ 150, 153 ], [ 141, 154 ], [ 154, 155 ], [ 155, 156 ], [ 156, 157 ], [ 155, 158 ], [ 43, 159 ], [ 159, 160 ], [ 43, 161 ], [ 161, 162 ], [ 238, 163 ], [ 163, 164 ], [ 163, 165 ], [ 165, 166 ], [ 163, 167 ], [ 167, 168 ], [ 163, 169 ], [ 169, 170 ], [ 169, 171 ], [ 171, 172 ], [ 172, 173 ], [ 172, 174 ], [ 169, 175 ], [ 175, 176 ], [ 163, 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 ], [ 190, 192 ], [ 189, 193 ], [ 193, 194 ], [ 194, 195 ], [ 194, 196 ], [ 196, 197 ], [ 197, 198 ], [ 193, 199 ], [ 199, 200 ], [ 200, 201 ], [ 200, 202 ], [ 202, 203 ], [ 203, 204 ], [ 189, 205 ], [ 205, 206 ], [ 206, 207 ], [ 206, 208 ], [ 205, 209 ], [ 209, 210 ], [ 210, 211 ], [ 189, 212 ], [ 212, 213 ], [ 212, 214 ], [ 179, 215 ], [ 215, 216 ], [ 216, 217 ], [ 217, 218 ], [ 163, 219 ], [ 219, 220 ], [ 219, 221 ], [ 221, 222 ], [ 222, 223 ], [ 223, 224 ], [ 224, 225 ], [ 223, 226 ], [ 226, 227 ], [ 163, 228 ], [ 228, 229 ], [ 228, 230 ], [ 230, 231 ], [ 231, 232 ], [ 232, 233 ], [ 233, 234 ], [ 232, 235 ], [ 235, 236 ], [ 0, 237 ], [ 237, 238 ], [ 237, 239 ] ]
[ "\nimport java.io.*;\nimport java.util.*;\n\n/**\n * @author Tran Anh Tai\n * @template for CP codes\n */\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n Task solver = new Task();\n solver.solve(in, out);\n out.close();\n }\n // main solver\n static class Task{\n public void solve(InputReader in, PrintWriter out) {\n int x = in.nextInt();\n int n = in.nextInt();\n int p[] = new int[n];\n boolean[] visited = new boolean[101];\n for (int i = 0; i < n; i++){\n int num = in.nextInt();\n visited[num] = true;\n }\n int more = 101, less = 0;\n for (int i = x; i >= 0; i--){\n if (!visited[i]){\n less = i;\n break;\n }\n }\n for (int i = x + 1; i <= 100; i++){\n if (!visited[i]){\n more = i;\n break;\n }\n }\n if (more - x < x - less){\n out.println(more);\n }\n else{\n out.println(less);\n }\n }\n }\n // fast input reader class;\n static class InputReader {\n BufferedReader br;\n StringTokenizer st;\n\n public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream));\n }\n\n public String nextToken() {\n while (st == null || !st.hasMoreTokens()) {\n String line = null;\n try {\n line = br.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n if (line == null) {\n return null;\n }\n st = new StringTokenizer(line);\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(nextToken());\n }\n public long nextLong(){\n return Long.parseLong(nextToken());\n }\n }\n}", "import java.io.*;", "io.*", "java", "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 in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n Task solver = new Task();\n solver.solve(in, out);\n out.close();\n }\n // main solver\n static class Task{\n public void solve(InputReader in, PrintWriter out) {\n int x = in.nextInt();\n int n = in.nextInt();\n int p[] = new int[n];\n boolean[] visited = new boolean[101];\n for (int i = 0; i < n; i++){\n int num = in.nextInt();\n visited[num] = true;\n }\n int more = 101, less = 0;\n for (int i = x; i >= 0; i--){\n if (!visited[i]){\n less = i;\n break;\n }\n }\n for (int i = x + 1; i <= 100; i++){\n if (!visited[i]){\n more = i;\n break;\n }\n }\n if (more - x < x - less){\n out.println(more);\n }\n else{\n out.println(less);\n }\n }\n }\n // fast input reader class;\n static class InputReader {\n BufferedReader br;\n StringTokenizer st;\n\n public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream));\n }\n\n public String nextToken() {\n while (st == null || !st.hasMoreTokens()) {\n String line = null;\n try {\n line = br.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n if (line == null) {\n return null;\n }\n st = new StringTokenizer(line);\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(nextToken());\n }\n public long nextLong(){\n return Long.parseLong(nextToken());\n }\n }\n}", "Main", "public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n Task solver = new Task();\n solver.solve(in, out);\n out.close();\n }", "main", "{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n Task solver = new Task();\n solver.solve(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", "InputReader in = new InputReader(inputStream);", "in", "new InputReader(inputStream)", "PrintWriter out = new PrintWriter(outputStream);", "out", "new PrintWriter(outputStream)", "Task solver = new Task();", "solver", "new Task()", "solver.solve(in, out)", "solver.solve", "solver", "in", "out", "out.close()", "out.close", "out", "String[] args", "args", "static class Task{\n public void solve(InputReader in, PrintWriter out) {\n int x = in.nextInt();\n int n = in.nextInt();\n int p[] = new int[n];\n boolean[] visited = new boolean[101];\n for (int i = 0; i < n; i++){\n int num = in.nextInt();\n visited[num] = true;\n }\n int more = 101, less = 0;\n for (int i = x; i >= 0; i--){\n if (!visited[i]){\n less = i;\n break;\n }\n }\n for (int i = x + 1; i <= 100; i++){\n if (!visited[i]){\n more = i;\n break;\n }\n }\n if (more - x < x - less){\n out.println(more);\n }\n else{\n out.println(less);\n }\n }\n }", "Task", "public void solve(InputReader in, PrintWriter out) {\n int x = in.nextInt();\n int n = in.nextInt();\n int p[] = new int[n];\n boolean[] visited = new boolean[101];\n for (int i = 0; i < n; i++){\n int num = in.nextInt();\n visited[num] = true;\n }\n int more = 101, less = 0;\n for (int i = x; i >= 0; i--){\n if (!visited[i]){\n less = i;\n break;\n }\n }\n for (int i = x + 1; i <= 100; i++){\n if (!visited[i]){\n more = i;\n break;\n }\n }\n if (more - x < x - less){\n out.println(more);\n }\n else{\n out.println(less);\n }\n }", "solve", "{\n int x = in.nextInt();\n int n = in.nextInt();\n int p[] = new int[n];\n boolean[] visited = new boolean[101];\n for (int i = 0; i < n; i++){\n int num = in.nextInt();\n visited[num] = true;\n }\n int more = 101, less = 0;\n for (int i = x; i >= 0; i--){\n if (!visited[i]){\n less = i;\n break;\n }\n }\n for (int i = x + 1; i <= 100; i++){\n if (!visited[i]){\n more = i;\n break;\n }\n }\n if (more - x < x - less){\n out.println(more);\n }\n else{\n out.println(less);\n }\n }", "int x = in.nextInt();", "x", "in.nextInt()", "in.nextInt", "in", "int n = in.nextInt();", "n", "in.nextInt()", "in.nextInt", "in", "int p[] = new int[n];", "p", "new int[n]", "n", "boolean[] visited = new boolean[101];", "visited", "new boolean[101]", "101", "for (int i = 0; i < n; i++){\n int num = in.nextInt();\n visited[num] = true;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n int num = in.nextInt();\n visited[num] = true;\n }", "{\n int num = in.nextInt();\n visited[num] = true;\n }", "int num = in.nextInt();", "num", "in.nextInt()", "in.nextInt", "in", "visited[num] = true", "visited[num]", "visited", "num", "true", "int more = 101", "more", "101", "less = 0;", "less", "0", "for (int i = x; i >= 0; i--){\n if (!visited[i]){\n less = i;\n break;\n }\n }", "int i = x;", "int i = x;", "i", "x", "i >= 0", "i", "0", "i--", "i--", "i", "{\n if (!visited[i]){\n less = i;\n break;\n }\n }", "{\n if (!visited[i]){\n less = i;\n break;\n }\n }", "if (!visited[i]){\n less = i;\n break;\n }", "!visited[i]", "visited[i]", "visited", "i", "{\n less = i;\n break;\n }", "less = i", "less", "i", "break;", "for (int i = x + 1; i <= 100; i++){\n if (!visited[i]){\n more = i;\n break;\n }\n }", "int i = x + 1;", "int i = x + 1;", "i", "x + 1", "x", "1", "i <= 100", "i", "100", "i++", "i++", "i", "{\n if (!visited[i]){\n more = i;\n break;\n }\n }", "{\n if (!visited[i]){\n more = i;\n break;\n }\n }", "if (!visited[i]){\n more = i;\n break;\n }", "!visited[i]", "visited[i]", "visited", "i", "{\n more = i;\n break;\n }", "more = i", "more", "i", "break;", "if (more - x < x - less){\n out.println(more);\n }\n else{\n out.println(less);\n }", "more - x < x - less", "more - x", "more", "x", "x - less", "x", "less", "{\n out.println(more);\n }", "out.println(more)", "out.println", "out", "more", "{\n out.println(less);\n }", "out.println(less)", "out.println", "out", "less", "InputReader in", "in", "PrintWriter out", "out", "static class InputReader {\n BufferedReader br;\n StringTokenizer st;\n\n public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream));\n }\n\n public String nextToken() {\n while (st == null || !st.hasMoreTokens()) {\n String line = null;\n try {\n line = br.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n if (line == null) {\n return null;\n }\n st = new StringTokenizer(line);\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(nextToken());\n }\n public long nextLong(){\n return Long.parseLong(nextToken());\n }\n }", "InputReader", "BufferedReader br;", "br", "StringTokenizer st;", "st", "public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream));\n }", "InputReader", "{\n br = new BufferedReader(new InputStreamReader(stream));\n }", "br = new BufferedReader(new InputStreamReader(stream))", "br", "new BufferedReader(new InputStreamReader(stream))", "InputStream stream", "stream", "public String nextToken() {\n while (st == null || !st.hasMoreTokens()) {\n String line = null;\n try {\n line = br.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n if (line == null) {\n return null;\n }\n st = new StringTokenizer(line);\n }\n return st.nextToken();\n }", "nextToken", "{\n while (st == null || !st.hasMoreTokens()) {\n String line = null;\n try {\n line = br.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n if (line == null) {\n return null;\n }\n st = new StringTokenizer(line);\n }\n return st.nextToken();\n }", "while (st == null || !st.hasMoreTokens()) {\n String line = null;\n try {\n line = br.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n if (line == null) {\n return null;\n }\n st = new StringTokenizer(line);\n }", "st == null || !st.hasMoreTokens()", "st == null", "st", "null", "!st.hasMoreTokens()", "st.hasMoreTokens()", "st.hasMoreTokens", "st", "{\n String line = null;\n try {\n line = br.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n if (line == null) {\n return null;\n }\n st = new StringTokenizer(line);\n }", "String line = null;", "line", "null", "try {\n line = 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 line = br.readLine();\n }", "line = br.readLine()", "line", "br.readLine()", "br.readLine", "br", "if (line == null) {\n return null;\n }", "line == null", "line", "null", "{\n return null;\n }", "return null;", "null", "st = new StringTokenizer(line)", "st", "new StringTokenizer(line)", "return st.nextToken();", "st.nextToken()", "st.nextToken", "st", "public int nextInt() {\n return Integer.parseInt(nextToken());\n }", "nextInt", "{\n return Integer.parseInt(nextToken());\n }", "return Integer.parseInt(nextToken());", "Integer.parseInt(nextToken())", "Integer.parseInt", "Integer", "nextToken()", "nextToken", "public long nextLong(){\n return Long.parseLong(nextToken());\n }", "nextLong", "{\n return Long.parseLong(nextToken());\n }", "return Long.parseLong(nextToken());", "Long.parseLong(nextToken())", "Long.parseLong", "Long", "nextToken()", "nextToken", "public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n Task solver = new Task();\n solver.solve(in, out);\n out.close();\n }\n // main solver\n static class Task{\n public void solve(InputReader in, PrintWriter out) {\n int x = in.nextInt();\n int n = in.nextInt();\n int p[] = new int[n];\n boolean[] visited = new boolean[101];\n for (int i = 0; i < n; i++){\n int num = in.nextInt();\n visited[num] = true;\n }\n int more = 101, less = 0;\n for (int i = x; i >= 0; i--){\n if (!visited[i]){\n less = i;\n break;\n }\n }\n for (int i = x + 1; i <= 100; i++){\n if (!visited[i]){\n more = i;\n break;\n }\n }\n if (more - x < x - less){\n out.println(more);\n }\n else{\n out.println(less);\n }\n }\n }\n // fast input reader class;\n static class InputReader {\n BufferedReader br;\n StringTokenizer st;\n\n public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream));\n }\n\n public String nextToken() {\n while (st == null || !st.hasMoreTokens()) {\n String line = null;\n try {\n line = br.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n if (line == null) {\n return null;\n }\n st = new StringTokenizer(line);\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(nextToken());\n }\n public long nextLong(){\n return Long.parseLong(nextToken());\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 in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n Task solver = new Task();\n solver.solve(in, out);\n out.close();\n }\n // main solver\n static class Task{\n public void solve(InputReader in, PrintWriter out) {\n int x = in.nextInt();\n int n = in.nextInt();\n int p[] = new int[n];\n boolean[] visited = new boolean[101];\n for (int i = 0; i < n; i++){\n int num = in.nextInt();\n visited[num] = true;\n }\n int more = 101, less = 0;\n for (int i = x; i >= 0; i--){\n if (!visited[i]){\n less = i;\n break;\n }\n }\n for (int i = x + 1; i <= 100; i++){\n if (!visited[i]){\n more = i;\n break;\n }\n }\n if (more - x < x - less){\n out.println(more);\n }\n else{\n out.println(less);\n }\n }\n }\n // fast input reader class;\n static class InputReader {\n BufferedReader br;\n StringTokenizer st;\n\n public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream));\n }\n\n public String nextToken() {\n while (st == null || !st.hasMoreTokens()) {\n String line = null;\n try {\n line = br.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n if (line == null) {\n return null;\n }\n st = new StringTokenizer(line);\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(nextToken());\n }\n public long nextLong(){\n return Long.parseLong(nextToken());\n }\n }\n}", "Main" ]
import java.io.*; import java.util.*; /** * @author Tran Anh Tai * @template for CP codes */ public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; InputReader in = new InputReader(inputStream); PrintWriter out = new PrintWriter(outputStream); Task solver = new Task(); solver.solve(in, out); out.close(); } // main solver static class Task{ public void solve(InputReader in, PrintWriter out) { int x = in.nextInt(); int n = in.nextInt(); int p[] = new int[n]; boolean[] visited = new boolean[101]; for (int i = 0; i < n; i++){ int num = in.nextInt(); visited[num] = true; } int more = 101, less = 0; for (int i = x; i >= 0; i--){ if (!visited[i]){ less = i; break; } } for (int i = x + 1; i <= 100; i++){ if (!visited[i]){ more = i; break; } } if (more - x < x - less){ out.println(more); } else{ out.println(less); } } } // fast input reader class; static class InputReader { BufferedReader br; StringTokenizer st; public InputReader(InputStream stream) { br = new BufferedReader(new InputStreamReader(stream)); } public String nextToken() { while (st == null || !st.hasMoreTokens()) { String line = null; try { line = br.readLine(); } catch (IOException e) { throw new RuntimeException(e); } if (line == null) { return null; } st = new StringTokenizer(line); } return st.nextToken(); } public int nextInt() { return Integer.parseInt(nextToken()); } public long nextLong(){ return Long.parseLong(nextToken()); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 41, 13, 17, 12, 13, 30, 41, 13, 20, 0, 13, 4, 18, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 4, 18, 18, 13, 13, 4, 13, 17, 23, 13, 12, 13, 30, 14, 40, 4, 18, 13, 2, 13, 13, 30, 29, 2, 13, 13, 14, 40, 4, 18, 13, 2, 13, 13, 30, 29, 2, 13, 13, 29, 4, 13, 40, 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 ], [ 100, 11 ], [ 100, 12 ], [ 12, 13 ], [ 12, 14 ], [ 100, 15 ], [ 15, 16 ], [ 15, 17 ], [ 100, 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 ], [ 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 ], [ 48, 49 ], [ 47, 50 ], [ 50, 51 ], [ 51, 52 ], [ 20, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 53, 58 ], [ 58, 59 ], [ 58, 60 ], [ 18, 61 ], [ 61, 62 ], [ 100, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 68, 71 ], [ 71, 72 ], [ 71, 73 ], [ 66, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 66, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 81, 84 ], [ 84, 85 ], [ 84, 86 ], [ 79, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 65, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 63, 97 ], [ 97, 98 ], [ 0, 99 ], [ 99, 100 ], [ 99, 101 ] ]
[ "import java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\n \npublic class Main {\n static List<Integer> list = new ArrayList<Integer>();\n static int x = 0;\n \n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n x = sc.nextInt();\n int n = sc.nextInt();\n \n for (int i = 0; i < n; i++) {\n list.add(sc.nextInt());\n }\n \n System.out.println(dfs(0));\n }\n \n private static int dfs(int n) {\n if (!(list.contains(x - n))) {\n return x - n;\n } else if (!(list.contains(x + n))) {\n return x + n;\n }\n return dfs(++n);\n }\n}", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.List;", "List", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n static List<Integer> list = new ArrayList<Integer>();\n static int x = 0;\n \n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n x = sc.nextInt();\n int n = sc.nextInt();\n \n for (int i = 0; i < n; i++) {\n list.add(sc.nextInt());\n }\n \n System.out.println(dfs(0));\n }\n \n private static int dfs(int n) {\n if (!(list.contains(x - n))) {\n return x - n;\n } else if (!(list.contains(x + n))) {\n return x + n;\n }\n return dfs(++n);\n }\n}", "Main", "static List<Integer> list = new ArrayList<Integer>();", "list", "new ArrayList<Integer>()", "static int x = 0;", "x", "0", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n x = sc.nextInt();\n int n = sc.nextInt();\n \n for (int i = 0; i < n; i++) {\n list.add(sc.nextInt());\n }\n \n System.out.println(dfs(0));\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n x = sc.nextInt();\n int n = sc.nextInt();\n \n for (int i = 0; i < n; i++) {\n list.add(sc.nextInt());\n }\n \n System.out.println(dfs(0));\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "x = sc.nextInt()", "x", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "for (int i = 0; i < n; i++) {\n list.add(sc.nextInt());\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n list.add(sc.nextInt());\n }", "{\n list.add(sc.nextInt());\n }", "list.add(sc.nextInt())", "list.add", "list", "sc.nextInt()", "sc.nextInt", "sc", "System.out.println(dfs(0))", "System.out.println", "System.out", "System", "System.out", "dfs(0)", "dfs", "0", "String[] args", "args", "private static int dfs(int n) {\n if (!(list.contains(x - n))) {\n return x - n;\n } else if (!(list.contains(x + n))) {\n return x + n;\n }\n return dfs(++n);\n }", "dfs", "{\n if (!(list.contains(x - n))) {\n return x - n;\n } else if (!(list.contains(x + n))) {\n return x + n;\n }\n return dfs(++n);\n }", "if (!(list.contains(x - n))) {\n return x - n;\n } else if (!(list.contains(x + n))) {\n return x + n;\n }", "!(list.contains(x - n))", "(list.contains(x - n))", "list.contains", "list", "x - n", "x", "n", "{\n return x - n;\n }", "return x - n;", "x - n", "x", "n", "if (!(list.contains(x + n))) {\n return x + n;\n }", "!(list.contains(x + n))", "(list.contains(x + n))", "list.contains", "list", "x + n", "x", "n", "{\n return x + n;\n }", "return x + n;", "x + n", "x", "n", "return dfs(++n);", "dfs(++n)", "dfs", "++n", "n", "int n", "n", "public class Main {\n static List<Integer> list = new ArrayList<Integer>();\n static int x = 0;\n \n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n x = sc.nextInt();\n int n = sc.nextInt();\n \n for (int i = 0; i < n; i++) {\n list.add(sc.nextInt());\n }\n \n System.out.println(dfs(0));\n }\n \n private static int dfs(int n) {\n if (!(list.contains(x - n))) {\n return x - n;\n } else if (!(list.contains(x + n))) {\n return x + n;\n }\n return dfs(++n);\n }\n}", "public class Main {\n static List<Integer> list = new ArrayList<Integer>();\n static int x = 0;\n \n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n x = sc.nextInt();\n int n = sc.nextInt();\n \n for (int i = 0; i < n; i++) {\n list.add(sc.nextInt());\n }\n \n System.out.println(dfs(0));\n }\n \n private static int dfs(int n) {\n if (!(list.contains(x - n))) {\n return x - n;\n } else if (!(list.contains(x + n))) {\n return x + n;\n }\n return dfs(++n);\n }\n}", "Main" ]
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { static List<Integer> list = new ArrayList<Integer>(); static int x = 0; public static void main(String[] args) { Scanner sc = new Scanner(System.in); x = sc.nextInt(); int n = sc.nextInt(); for (int i = 0; i < n; i++) { list.add(sc.nextInt()); } System.out.println(dfs(0)); } private static int dfs(int n) { if (!(list.contains(x - n))) { return x - n; } else if (!(list.contains(x + n))) { return x + n; } return dfs(++n); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 29, 41, 13, 20, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 17, 30, 14, 2, 17, 18, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 29, 14, 2, 2, 13, 13, 17, 30, 14, 2, 17, 18, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 29, 30, 4, 18, 18, 13, 13, 17, 29, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 132, 5 ], [ 132, 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 ], [ 23, 25 ], [ 22, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 29, 31 ], [ 27, 32 ], [ 26, 33 ], [ 8, 34 ], [ 34, 35 ], [ 34, 36 ], [ 8, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 38, 43 ], [ 43, 44 ], [ 43, 45 ], [ 38, 46 ], [ 46, 47 ], [ 47, 48 ], [ 38, 49 ], [ 50, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 55, 56 ], [ 51, 57 ], [ 8, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 58, 63 ], [ 63, 64 ], [ 63, 65 ], [ 58, 66 ], [ 66, 67 ], [ 67, 68 ], [ 58, 69 ], [ 70, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 72, 76 ], [ 71, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 83, 85 ], [ 78, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 87, 92 ], [ 92, 93 ], [ 92, 94 ], [ 86, 95 ], [ 70, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 97, 101 ], [ 96, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 108, 110 ], [ 103, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 112, 117 ], [ 117, 118 ], [ 117, 119 ], [ 111, 120 ], [ 96, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 122, 127 ], [ 121, 128 ], [ 6, 129 ], [ 129, 130 ], [ 0, 131 ], [ 131, 132 ], [ 131, 133 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n if(n == 0) {\n System.out.println(x);\n return;\n }\n int[]p = new int [101];\n for(int i=0; i<n; i++) {\n p[sc.nextInt()] = 1;\n }\n for(int i=0; i<101; i++) {\n if(x-i >= 0) {\n if(0 == p[x-i]) {\n System.out.println(x-i);\n return;\n }\n } \n if(x+i <101) {\n if(0 == p[x+i]) {\n System.out.println(x+i);\n return;\n }\n }else {\n System.out.println(101);\n return;\n }\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n if(n == 0) {\n System.out.println(x);\n return;\n }\n int[]p = new int [101];\n for(int i=0; i<n; i++) {\n p[sc.nextInt()] = 1;\n }\n for(int i=0; i<101; i++) {\n if(x-i >= 0) {\n if(0 == p[x-i]) {\n System.out.println(x-i);\n return;\n }\n } \n if(x+i <101) {\n if(0 == p[x+i]) {\n System.out.println(x+i);\n return;\n }\n }else {\n System.out.println(101);\n return;\n }\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n if(n == 0) {\n System.out.println(x);\n return;\n }\n int[]p = new int [101];\n for(int i=0; i<n; i++) {\n p[sc.nextInt()] = 1;\n }\n for(int i=0; i<101; i++) {\n if(x-i >= 0) {\n if(0 == p[x-i]) {\n System.out.println(x-i);\n return;\n }\n } \n if(x+i <101) {\n if(0 == p[x+i]) {\n System.out.println(x+i);\n return;\n }\n }else {\n System.out.println(101);\n return;\n }\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n if(n == 0) {\n System.out.println(x);\n return;\n }\n int[]p = new int [101];\n for(int i=0; i<n; i++) {\n p[sc.nextInt()] = 1;\n }\n for(int i=0; i<101; i++) {\n if(x-i >= 0) {\n if(0 == p[x-i]) {\n System.out.println(x-i);\n return;\n }\n } \n if(x+i <101) {\n if(0 == p[x+i]) {\n System.out.println(x+i);\n return;\n }\n }else {\n System.out.println(101);\n return;\n }\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "if(n == 0) {\n System.out.println(x);\n return;\n }", "n == 0", "n", "0", "{\n System.out.println(x);\n return;\n }", "System.out.println(x)", "System.out.println", "System.out", "System", "System.out", "x", "return;", "int[]p = new int [101];", "p", "new int [101]", "101", "for(int i=0; i<n; i++) {\n p[sc.nextInt()] = 1;\n }", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n p[sc.nextInt()] = 1;\n }", "{\n p[sc.nextInt()] = 1;\n }", "p[sc.nextInt()] = 1", "p[sc.nextInt()]", "p", "sc.nextInt()", "sc.nextInt", "sc", "1", "for(int i=0; i<101; i++) {\n if(x-i >= 0) {\n if(0 == p[x-i]) {\n System.out.println(x-i);\n return;\n }\n } \n if(x+i <101) {\n if(0 == p[x+i]) {\n System.out.println(x+i);\n return;\n }\n }else {\n System.out.println(101);\n return;\n }\n }", "int i=0;", "int i=0;", "i", "0", "i<101", "i", "101", "i++", "i++", "i", "{\n if(x-i >= 0) {\n if(0 == p[x-i]) {\n System.out.println(x-i);\n return;\n }\n } \n if(x+i <101) {\n if(0 == p[x+i]) {\n System.out.println(x+i);\n return;\n }\n }else {\n System.out.println(101);\n return;\n }\n }", "{\n if(x-i >= 0) {\n if(0 == p[x-i]) {\n System.out.println(x-i);\n return;\n }\n } \n if(x+i <101) {\n if(0 == p[x+i]) {\n System.out.println(x+i);\n return;\n }\n }else {\n System.out.println(101);\n return;\n }\n }", "if(x-i >= 0) {\n if(0 == p[x-i]) {\n System.out.println(x-i);\n return;\n }\n }", "x-i >= 0", "x-i", "x", "i", "0", "{\n if(0 == p[x-i]) {\n System.out.println(x-i);\n return;\n }\n }", "if(0 == p[x-i]) {\n System.out.println(x-i);\n return;\n }", "0 == p[x-i]", "0", "p[x-i]", "p", "x-i", "x", "i", "{\n System.out.println(x-i);\n return;\n }", "System.out.println(x-i)", "System.out.println", "System.out", "System", "System.out", "x-i", "x", "i", "return;", "if(x+i <101) {\n if(0 == p[x+i]) {\n System.out.println(x+i);\n return;\n }\n }else {\n System.out.println(101);\n return;\n }", "x+i <101", "x+i", "x", "i", "101", "{\n if(0 == p[x+i]) {\n System.out.println(x+i);\n return;\n }\n }", "if(0 == p[x+i]) {\n System.out.println(x+i);\n return;\n }", "0 == p[x+i]", "0", "p[x+i]", "p", "x+i", "x", "i", "{\n System.out.println(x+i);\n return;\n }", "System.out.println(x+i)", "System.out.println", "System.out", "System", "System.out", "x+i", "x", "i", "return;", "{\n System.out.println(101);\n return;\n }", "System.out.println(101)", "System.out.println", "System.out", "System", "System.out", "101", "return;", "String[] args", "args", "public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n if(n == 0) {\n System.out.println(x);\n return;\n }\n int[]p = new int [101];\n for(int i=0; i<n; i++) {\n p[sc.nextInt()] = 1;\n }\n for(int i=0; i<101; i++) {\n if(x-i >= 0) {\n if(0 == p[x-i]) {\n System.out.println(x-i);\n return;\n }\n } \n if(x+i <101) {\n if(0 == p[x+i]) {\n System.out.println(x+i);\n return;\n }\n }else {\n System.out.println(101);\n return;\n }\n }\n }\n}", "public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n if(n == 0) {\n System.out.println(x);\n return;\n }\n int[]p = new int [101];\n for(int i=0; i<n; i++) {\n p[sc.nextInt()] = 1;\n }\n for(int i=0; i<101; i++) {\n if(x-i >= 0) {\n if(0 == p[x-i]) {\n System.out.println(x-i);\n return;\n }\n } \n if(x+i <101) {\n if(0 == p[x+i]) {\n System.out.println(x+i);\n return;\n }\n }else {\n System.out.println(101);\n return;\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 x = sc.nextInt(); int n = sc.nextInt(); if(n == 0) { System.out.println(x); return; } int[]p = new int [101]; for(int i=0; i<n; i++) { p[sc.nextInt()] = 1; } for(int i=0; i<101; i++) { if(x-i >= 0) { if(0 == p[x-i]) { System.out.println(x-i); return; } } if(x+i <101) { if(0 == p[x+i]) { System.out.println(x+i); return; } }else { System.out.println(101); return; } } } }
[ 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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 13, 41, 13, 40, 17, 41, 13, 41, 13, 41, 13, 17, 41, 13, 40, 17, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 18, 13, 13, 30, 40, 13, 0, 13, 18, 13, 13, 14, 2, 2, 13, 13, 18, 13, 13, 30, 40, 13, 0, 13, 18, 13, 13, 14, 2, 2, 13, 17, 2, 13, 17, 30, 14, 2, 13, 2, 13, 13, 30, 0, 13, 2, 13, 13, 14, 2, 13, 2, 13, 13, 30, 0, 13, 2, 13, 13, 3, 14, 2, 13, 17, 30, 0, 13, 2, 13, 13, 3, 0, 13, 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 ], [ 183, 8 ], [ 183, 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 ], [ 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 ], [ 11, 49 ], [ 49, 50 ], [ 50, 51 ], [ 49, 52 ], [ 11, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 11, 57 ], [ 57, 58 ], [ 11, 59 ], [ 59, 60 ], [ 11, 61 ], [ 61, 62 ], [ 61, 63 ], [ 11, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 11, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 73, 74 ], [ 73, 75 ], [ 68, 76 ], [ 76, 77 ], [ 77, 78 ], [ 68, 79 ], [ 80, 80 ], [ 80, 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 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 95, 99 ], [ 99, 100 ], [ 99, 101 ], [ 94, 102 ], [ 102, 103 ], [ 103, 104 ], [ 102, 105 ], [ 105, 106 ], [ 105, 107 ], [ 107, 108 ], [ 107, 109 ], [ 94, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 111, 115 ], [ 115, 116 ], [ 115, 117 ], [ 110, 118 ], [ 118, 119 ], [ 119, 120 ], [ 118, 121 ], [ 121, 122 ], [ 121, 123 ], [ 123, 124 ], [ 123, 125 ], [ 80, 126 ], [ 126, 127 ], [ 127, 128 ], [ 128, 129 ], [ 128, 130 ], [ 127, 131 ], [ 131, 132 ], [ 131, 133 ], [ 126, 134 ], [ 134, 135 ], [ 135, 136 ], [ 136, 137 ], [ 136, 138 ], [ 138, 139 ], [ 138, 140 ], [ 135, 141 ], [ 141, 142 ], [ 142, 143 ], [ 142, 144 ], [ 144, 145 ], [ 144, 146 ], [ 135, 147 ], [ 147, 148 ], [ 148, 149 ], [ 148, 150 ], [ 150, 151 ], [ 150, 152 ], [ 147, 153 ], [ 153, 154 ], [ 154, 155 ], [ 154, 156 ], [ 156, 157 ], [ 156, 158 ], [ 134, 159 ], [ 126, 160 ], [ 160, 161 ], [ 161, 162 ], [ 161, 163 ], [ 160, 164 ], [ 164, 165 ], [ 165, 166 ], [ 165, 167 ], [ 167, 168 ], [ 167, 169 ], [ 164, 170 ], [ 80, 171 ], [ 171, 172 ], [ 171, 173 ], [ 11, 174 ], [ 174, 175 ], [ 175, 176 ], [ 176, 177 ], [ 176, 178 ], [ 174, 179 ], [ 9, 180 ], [ 180, 181 ], [ 0, 182 ], [ 182, 183 ], [ 182, 184 ] ]
[ "import java.util.Scanner;\nimport java.util.Arrays;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int x = sc.nextInt();\n int n = sc.nextInt();\n int[] p = new int[n];\n for(int i = 0; i<n; i++){\n p[i] = sc.nextInt();\n }\n\n Arrays.sort(p);\n int ans = -100000000;\n int ansLow, ansHigh;\n int count = 0;\n int matchNotAns = -1000000000;\n\n for(int j = 0; j<1000; j++){\n for(int k = 0; k<n; k++){\n if(x - j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n else if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n }\n if(count == 1 && j!=0){\n if(matchNotAns == x - j){\n ans = x + j;\n }\n else if(matchNotAns == x + j){\n ans = x - j;\n }\n break;\n }\n else if(count == 0){\n ans = x - j;\n break;\n }\n count = 0;\n }\n\n System.out.println(ans);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.Arrays;", "Arrays", "java.util", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int x = sc.nextInt();\n int n = sc.nextInt();\n int[] p = new int[n];\n for(int i = 0; i<n; i++){\n p[i] = sc.nextInt();\n }\n\n Arrays.sort(p);\n int ans = -100000000;\n int ansLow, ansHigh;\n int count = 0;\n int matchNotAns = -1000000000;\n\n for(int j = 0; j<1000; j++){\n for(int k = 0; k<n; k++){\n if(x - j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n else if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n }\n if(count == 1 && j!=0){\n if(matchNotAns == x - j){\n ans = x + j;\n }\n else if(matchNotAns == x + j){\n ans = x - j;\n }\n break;\n }\n else if(count == 0){\n ans = x - j;\n break;\n }\n count = 0;\n }\n\n System.out.println(ans);\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int x = sc.nextInt();\n int n = sc.nextInt();\n int[] p = new int[n];\n for(int i = 0; i<n; i++){\n p[i] = sc.nextInt();\n }\n\n Arrays.sort(p);\n int ans = -100000000;\n int ansLow, ansHigh;\n int count = 0;\n int matchNotAns = -1000000000;\n\n for(int j = 0; j<1000; j++){\n for(int k = 0; k<n; k++){\n if(x - j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n else if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n }\n if(count == 1 && j!=0){\n if(matchNotAns == x - j){\n ans = x + j;\n }\n else if(matchNotAns == x + j){\n ans = x - j;\n }\n break;\n }\n else if(count == 0){\n ans = x - j;\n break;\n }\n count = 0;\n }\n\n System.out.println(ans);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n\n int x = sc.nextInt();\n int n = sc.nextInt();\n int[] p = new int[n];\n for(int i = 0; i<n; i++){\n p[i] = sc.nextInt();\n }\n\n Arrays.sort(p);\n int ans = -100000000;\n int ansLow, ansHigh;\n int count = 0;\n int matchNotAns = -1000000000;\n\n for(int j = 0; j<1000; j++){\n for(int k = 0; k<n; k++){\n if(x - j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n else if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n }\n if(count == 1 && j!=0){\n if(matchNotAns == x - j){\n ans = x + j;\n }\n else if(matchNotAns == x + j){\n ans = x - j;\n }\n break;\n }\n else if(count == 0){\n ans = x - j;\n break;\n }\n count = 0;\n }\n\n System.out.println(ans);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int[] p = new int[n];", "p", "new int[n]", "n", "for(int i = 0; i<n; i++){\n p[i] = sc.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n p[i] = sc.nextInt();\n }", "{\n p[i] = sc.nextInt();\n }", "p[i] = sc.nextInt()", "p[i]", "p", "i", "sc.nextInt()", "sc.nextInt", "sc", "Arrays.sort(p)", "Arrays.sort", "Arrays", "p", "int ans = -100000000;", "ans", "-100000000", "100000000", "int ansLow", "ansLow", "ansHigh;", "ansHigh", "int count = 0;", "count", "0", "int matchNotAns = -1000000000;", "matchNotAns", "-1000000000", "1000000000", "for(int j = 0; j<1000; j++){\n for(int k = 0; k<n; k++){\n if(x - j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n else if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n }\n if(count == 1 && j!=0){\n if(matchNotAns == x - j){\n ans = x + j;\n }\n else if(matchNotAns == x + j){\n ans = x - j;\n }\n break;\n }\n else if(count == 0){\n ans = x - j;\n break;\n }\n count = 0;\n }", "int j = 0;", "int j = 0;", "j", "0", "j<1000", "j", "1000", "j++", "j++", "j", "{\n for(int k = 0; k<n; k++){\n if(x - j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n else if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n }\n if(count == 1 && j!=0){\n if(matchNotAns == x - j){\n ans = x + j;\n }\n else if(matchNotAns == x + j){\n ans = x - j;\n }\n break;\n }\n else if(count == 0){\n ans = x - j;\n break;\n }\n count = 0;\n }", "{\n for(int k = 0; k<n; k++){\n if(x - j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n else if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n }\n if(count == 1 && j!=0){\n if(matchNotAns == x - j){\n ans = x + j;\n }\n else if(matchNotAns == x + j){\n ans = x - j;\n }\n break;\n }\n else if(count == 0){\n ans = x - j;\n break;\n }\n count = 0;\n }", "for(int k = 0; k<n; k++){\n if(x - j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n else if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n }", "int k = 0;", "int k = 0;", "k", "0", "k<n", "k", "n", "k++", "k++", "k", "{\n if(x - j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n else if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n }", "{\n if(x - j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n else if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n }", "if(x - j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n else if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }", "x - j == p[k]", "x - j", "x", "j", "p[k]", "p", "k", "{\n count++;\n matchNotAns = p[k];\n }", "count++", "count", "matchNotAns = p[k]", "matchNotAns", "p[k]", "p", "k", "if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }", "x + j == p[k]", "x + j", "x", "j", "p[k]", "p", "k", "{\n count++;\n matchNotAns = p[k];\n }", "count++", "count", "matchNotAns = p[k]", "matchNotAns", "p[k]", "p", "k", "if(count == 1 && j!=0){\n if(matchNotAns == x - j){\n ans = x + j;\n }\n else if(matchNotAns == x + j){\n ans = x - j;\n }\n break;\n }\n else if(count == 0){\n ans = x - j;\n break;\n }", "count == 1 && j!=0", "count == 1", "count", "1", "j!=0", "j", "0", "{\n if(matchNotAns == x - j){\n ans = x + j;\n }\n else if(matchNotAns == x + j){\n ans = x - j;\n }\n break;\n }", "if(matchNotAns == x - j){\n ans = x + j;\n }\n else if(matchNotAns == x + j){\n ans = x - j;\n }", "matchNotAns == x - j", "matchNotAns", "x - j", "x", "j", "{\n ans = x + j;\n }", "ans = x + j", "ans", "x + j", "x", "j", "if(matchNotAns == x + j){\n ans = x - j;\n }", "matchNotAns == x + j", "matchNotAns", "x + j", "x", "j", "{\n ans = x - j;\n }", "ans = x - j", "ans", "x - j", "x", "j", "break;", "if(count == 0){\n ans = x - j;\n break;\n }", "count == 0", "count", "0", "{\n ans = x - j;\n break;\n }", "ans = x - j", "ans", "x - j", "x", "j", "break;", "count = 0", "count", "0", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int x = sc.nextInt();\n int n = sc.nextInt();\n int[] p = new int[n];\n for(int i = 0; i<n; i++){\n p[i] = sc.nextInt();\n }\n\n Arrays.sort(p);\n int ans = -100000000;\n int ansLow, ansHigh;\n int count = 0;\n int matchNotAns = -1000000000;\n\n for(int j = 0; j<1000; j++){\n for(int k = 0; k<n; k++){\n if(x - j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n else if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n }\n if(count == 1 && j!=0){\n if(matchNotAns == x - j){\n ans = x + j;\n }\n else if(matchNotAns == x + j){\n ans = x - j;\n }\n break;\n }\n else if(count == 0){\n ans = x - j;\n break;\n }\n count = 0;\n }\n\n System.out.println(ans);\n }\n}", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int x = sc.nextInt();\n int n = sc.nextInt();\n int[] p = new int[n];\n for(int i = 0; i<n; i++){\n p[i] = sc.nextInt();\n }\n\n Arrays.sort(p);\n int ans = -100000000;\n int ansLow, ansHigh;\n int count = 0;\n int matchNotAns = -1000000000;\n\n for(int j = 0; j<1000; j++){\n for(int k = 0; k<n; k++){\n if(x - j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n else if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n }\n if(count == 1 && j!=0){\n if(matchNotAns == x - j){\n ans = x + j;\n }\n else if(matchNotAns == x + j){\n ans = x - j;\n }\n break;\n }\n else if(count == 0){\n ans = x - j;\n break;\n }\n count = 0;\n }\n\n System.out.println(ans);\n }\n}", "Main" ]
import java.util.Scanner; import java.util.Arrays; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int n = sc.nextInt(); int[] p = new int[n]; for(int i = 0; i<n; i++){ p[i] = sc.nextInt(); } Arrays.sort(p); int ans = -100000000; int ansLow, ansHigh; int count = 0; int matchNotAns = -1000000000; for(int j = 0; j<1000; j++){ for(int k = 0; k<n; k++){ if(x - j == p[k]){ count++; matchNotAns = p[k]; } else if(x + j == p[k]){ count++; matchNotAns = p[k]; } } if(count == 1 && j!=0){ if(matchNotAns == x - j){ ans = x + j; } else if(matchNotAns == x + j){ ans = x - j; } break; } else if(count == 0){ ans = x - j; break; } count = 0; } 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, 20, 13, 41, 13, 20, 17, 41, 13, 17, 41, 13, 13, 41, 13, 17, 11, 1, 41, 13, 40, 17, 2, 13, 17, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 2, 13, 13, 40, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 0, 18, 13, 2, 13, 17, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 18, 13, 13, 30, 0, 13, 18, 13, 13, 0, 13, 13, 14, 2, 18, 13, 2, 13, 17, 17, 30, 0, 13, 2, 13, 13, 14, 2, 13, 17, 30, 0, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 151, 5 ], [ 151, 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, 30 ], [ 30, 31 ], [ 30, 32 ], [ 8, 33 ], [ 33, 34 ], [ 33, 35 ], [ 8, 36 ], [ 36, 37 ], [ 36, 38 ], [ 8, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 39, 45 ], [ 45, 46 ], [ 45, 47 ], [ 39, 48 ], [ 48, 49 ], [ 49, 50 ], [ 39, 51 ], [ 52, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 53, 57 ], [ 57, 58 ], [ 58, 59 ], [ 57, 60 ], [ 60, 61 ], [ 60, 62 ], [ 52, 63 ], [ 63, 64 ], [ 8, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 65, 70 ], [ 70, 71 ], [ 70, 72 ], [ 65, 73 ], [ 73, 74 ], [ 74, 75 ], [ 65, 76 ], [ 77, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 81, 82 ], [ 77, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 86, 88 ], [ 83, 89 ], [ 8, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 90, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 97, 99 ], [ 90, 100 ], [ 100, 101 ], [ 101, 102 ], [ 90, 103 ], [ 104, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 108, 110 ], [ 105, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 114, 115 ], [ 114, 116 ], [ 8, 117 ], [ 117, 118 ], [ 117, 119 ], [ 8, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 124, 125 ], [ 124, 126 ], [ 121, 127 ], [ 120, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 131, 132 ], [ 131, 133 ], [ 8, 134 ], [ 134, 135 ], [ 135, 136 ], [ 135, 137 ], [ 134, 138 ], [ 138, 139 ], [ 139, 140 ], [ 139, 141 ], [ 8, 142 ], [ 142, 143 ], [ 143, 144 ], [ 144, 145 ], [ 144, 146 ], [ 142, 147 ], [ 6, 148 ], [ 148, 149 ], [ 0, 150 ], [ 150, 151 ], [ 150, 152 ] ]
[ "import java.util.*;\n \npublic class Main {\n public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int X = sc.nextInt();\n int N = sc.nextInt();\n int[] p = new int[N];\n int[] ans = new int[202];\n int min = 1000;\n int result = X;\n int j=0;\n for(int i=-100;i<=101;i++){\n ans[j] = Math.abs(X-i);\n j++;\n }\n for(int i=0;i<N;i++){\n int num = sc.nextInt();\n ans[num+100] = 1000;\n }\n for(int i=0;i<ans.length;i++){\n if(min>ans[i])\n {\n min = ans[i];\n }\n }\n result -= min;\n if(ans[result+100]==1000){\n result = X + min;\n }\n if(N==0){\n result = X;\n }\n System.out.println(result);\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int X = sc.nextInt();\n int N = sc.nextInt();\n int[] p = new int[N];\n int[] ans = new int[202];\n int min = 1000;\n int result = X;\n int j=0;\n for(int i=-100;i<=101;i++){\n ans[j] = Math.abs(X-i);\n j++;\n }\n for(int i=0;i<N;i++){\n int num = sc.nextInt();\n ans[num+100] = 1000;\n }\n for(int i=0;i<ans.length;i++){\n if(min>ans[i])\n {\n min = ans[i];\n }\n }\n result -= min;\n if(ans[result+100]==1000){\n result = X + min;\n }\n if(N==0){\n result = X;\n }\n System.out.println(result);\n }\n}", "Main", "public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int X = sc.nextInt();\n int N = sc.nextInt();\n int[] p = new int[N];\n int[] ans = new int[202];\n int min = 1000;\n int result = X;\n int j=0;\n for(int i=-100;i<=101;i++){\n ans[j] = Math.abs(X-i);\n j++;\n }\n for(int i=0;i<N;i++){\n int num = sc.nextInt();\n ans[num+100] = 1000;\n }\n for(int i=0;i<ans.length;i++){\n if(min>ans[i])\n {\n min = ans[i];\n }\n }\n result -= min;\n if(ans[result+100]==1000){\n result = X + min;\n }\n if(N==0){\n result = X;\n }\n System.out.println(result);\n }", "main", "{\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int X = sc.nextInt();\n int N = sc.nextInt();\n int[] p = new int[N];\n int[] ans = new int[202];\n int min = 1000;\n int result = X;\n int j=0;\n for(int i=-100;i<=101;i++){\n ans[j] = Math.abs(X-i);\n j++;\n }\n for(int i=0;i<N;i++){\n int num = sc.nextInt();\n ans[num+100] = 1000;\n }\n for(int i=0;i<ans.length;i++){\n if(min>ans[i])\n {\n min = ans[i];\n }\n }\n result -= min;\n if(ans[result+100]==1000){\n result = X + min;\n }\n if(N==0){\n result = X;\n }\n System.out.println(result);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int X = sc.nextInt();", "X", "sc.nextInt()", "sc.nextInt", "sc", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int[] p = new int[N];", "p", "new int[N]", "N", "int[] ans = new int[202];", "ans", "new int[202]", "202", "int min = 1000;", "min", "1000", "int result = X;", "result", "X", "int j=0;", "j", "0", "for(int i=-100;i<=101;i++){\n ans[j] = Math.abs(X-i);\n j++;\n }", "int i=-100;", "int i=-100;", "i", "-100", "100", "i<=101", "i", "101", "i++", "i++", "i", "{\n ans[j] = Math.abs(X-i);\n j++;\n }", "{\n ans[j] = Math.abs(X-i);\n j++;\n }", "ans[j] = Math.abs(X-i)", "ans[j]", "ans", "j", "Math.abs(X-i)", "Math.abs", "Math", "X-i", "X", "i", "j++", "j", "for(int i=0;i<N;i++){\n int num = sc.nextInt();\n ans[num+100] = 1000;\n }", "int i=0;", "int i=0;", "i", "0", "i<N", "i", "N", "i++", "i++", "i", "{\n int num = sc.nextInt();\n ans[num+100] = 1000;\n }", "{\n int num = sc.nextInt();\n ans[num+100] = 1000;\n }", "int num = sc.nextInt();", "num", "sc.nextInt()", "sc.nextInt", "sc", "ans[num+100] = 1000", "ans[num+100]", "ans", "num+100", "num", "100", "1000", "for(int i=0;i<ans.length;i++){\n if(min>ans[i])\n {\n min = ans[i];\n }\n }", "int i=0;", "int i=0;", "i", "0", "i<ans.length", "i", "ans.length", "ans", "ans.length", "i++", "i++", "i", "{\n if(min>ans[i])\n {\n min = ans[i];\n }\n }", "{\n if(min>ans[i])\n {\n min = ans[i];\n }\n }", "if(min>ans[i])\n {\n min = ans[i];\n }", "min>ans[i]", "min", "ans[i]", "ans", "i", "{\n min = ans[i];\n }", "min = ans[i]", "min", "ans[i]", "ans", "i", "result -= min", "result", "min", "if(ans[result+100]==1000){\n result = X + min;\n }", "ans[result+100]==1000", "ans[result+100]", "ans", "result+100", "result", "100", "1000", "{\n result = X + min;\n }", "result = X + min", "result", "X + min", "X", "min", "if(N==0){\n result = X;\n }", "N==0", "N", "0", "{\n result = X;\n }", "result = X", "result", "X", "System.out.println(result)", "System.out.println", "System.out", "System", "System.out", "result", "String[] args", "args", "public class Main {\n public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int X = sc.nextInt();\n int N = sc.nextInt();\n int[] p = new int[N];\n int[] ans = new int[202];\n int min = 1000;\n int result = X;\n int j=0;\n for(int i=-100;i<=101;i++){\n ans[j] = Math.abs(X-i);\n j++;\n }\n for(int i=0;i<N;i++){\n int num = sc.nextInt();\n ans[num+100] = 1000;\n }\n for(int i=0;i<ans.length;i++){\n if(min>ans[i])\n {\n min = ans[i];\n }\n }\n result -= min;\n if(ans[result+100]==1000){\n result = X + min;\n }\n if(N==0){\n result = X;\n }\n System.out.println(result);\n }\n}", "public class Main {\n public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int X = sc.nextInt();\n int N = sc.nextInt();\n int[] p = new int[N];\n int[] ans = new int[202];\n int min = 1000;\n int result = X;\n int j=0;\n for(int i=-100;i<=101;i++){\n ans[j] = Math.abs(X-i);\n j++;\n }\n for(int i=0;i<N;i++){\n int num = sc.nextInt();\n ans[num+100] = 1000;\n }\n for(int i=0;i<ans.length;i++){\n if(min>ans[i])\n {\n min = ans[i];\n }\n }\n result -= min;\n if(ans[result+100]==1000){\n result = X + min;\n }\n if(N==0){\n result = X;\n }\n System.out.println(result);\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) throws Exception { // Your code here! Scanner sc = new Scanner(System.in); int X = sc.nextInt(); int N = sc.nextInt(); int[] p = new int[N]; int[] ans = new int[202]; int min = 1000; int result = X; int j=0; for(int i=-100;i<=101;i++){ ans[j] = Math.abs(X-i); j++; } for(int i=0;i<N;i++){ int num = sc.nextInt(); ans[num+100] = 1000; } for(int i=0;i<ans.length;i++){ if(min>ans[i]) { min = ans[i]; } } result -= min; if(ans[result+100]==1000){ result = X + min; } if(N==0){ result = X; } System.out.println(result); } }
[ 7, 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, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 4, 18, 4, 18, 13, 17, 17, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 41, 13, 18, 13, 13, 41, 13, 18, 13, 13, 28, 13, 13, 30, 30, 14, 2, 4, 18, 13, 2, 13, 13, 13, 30, 0, 13, 4, 18, 13, 2, 13, 13, 0, 13, 13, 14, 2, 4, 18, 13, 2, 13, 13, 13, 30, 0, 13, 4, 18, 13, 13, 13, 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 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 135, 20 ], [ 135, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 23, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 23, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 23, 37 ], [ 37, 38 ], [ 38, 39 ], [ 23, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 46, 49 ], [ 46, 50 ], [ 42, 51 ], [ 51, 52 ], [ 52, 53 ], [ 23, 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 ], [ 67, 70 ], [ 70, 71 ], [ 71, 72 ], [ 23, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 75, 77 ], [ 23, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 80, 82 ], [ 23, 83 ], [ 83, 84 ], [ 83, 85 ], [ 83, 86 ], [ 87, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 90, 93 ], [ 93, 94 ], [ 93, 95 ], [ 89, 96 ], [ 88, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 101, 102 ], [ 100, 103 ], [ 103, 104 ], [ 103, 105 ], [ 97, 106 ], [ 106, 107 ], [ 106, 108 ], [ 88, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 111, 114 ], [ 114, 115 ], [ 114, 116 ], [ 110, 117 ], [ 109, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 121, 122 ], [ 122, 123 ], [ 121, 124 ], [ 121, 125 ], [ 23, 126 ], [ 126, 127 ], [ 127, 128 ], [ 128, 129 ], [ 128, 130 ], [ 126, 131 ], [ 21, 132 ], [ 132, 133 ], [ 0, 134 ], [ 134, 135 ], [ 134, 136 ] ]
[ "\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.Scanner;\nimport java.util.Set;\nimport java.util.stream.Collectors;\nimport java.util.stream.IntStream;\n\npublic final class Main {\n\n public static void main(String[] args) {\n final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n final int x = in.nextInt();\n final int n = in.nextInt();\n in.nextLine();\n final Set<Integer> set = IntStream.rangeClosed(0, 101).boxed().collect(Collectors.toSet());\n for (int i = 0; i < n; i++) {\n set.remove(in.nextInt());\n }\n int diff = Integer.MAX_VALUE;\n int res = Integer.MAX_VALUE;\n for (int item : set) {\n if (Math.abs(item - x) < diff) {\n diff = Math.abs(item - x);\n res = item;\n } else if (Math.abs(item - x) == diff) {\n res = Math.min(res, item);\n }\n }\n System.out.println(res);\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.Set;", "Set", "java.util", "import java.util.stream.Collectors;", "Collectors", "java.util.stream", "import java.util.stream.IntStream;", "IntStream", "java.util.stream", "public final class Main {\n\n public static void main(String[] args) {\n final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n final int x = in.nextInt();\n final int n = in.nextInt();\n in.nextLine();\n final Set<Integer> set = IntStream.rangeClosed(0, 101).boxed().collect(Collectors.toSet());\n for (int i = 0; i < n; i++) {\n set.remove(in.nextInt());\n }\n int diff = Integer.MAX_VALUE;\n int res = Integer.MAX_VALUE;\n for (int item : set) {\n if (Math.abs(item - x) < diff) {\n diff = Math.abs(item - x);\n res = item;\n } else if (Math.abs(item - x) == diff) {\n res = Math.min(res, item);\n }\n }\n System.out.println(res);\n }\n}", "Main", "public static void main(String[] args) {\n final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n final int x = in.nextInt();\n final int n = in.nextInt();\n in.nextLine();\n final Set<Integer> set = IntStream.rangeClosed(0, 101).boxed().collect(Collectors.toSet());\n for (int i = 0; i < n; i++) {\n set.remove(in.nextInt());\n }\n int diff = Integer.MAX_VALUE;\n int res = Integer.MAX_VALUE;\n for (int item : set) {\n if (Math.abs(item - x) < diff) {\n diff = Math.abs(item - x);\n res = item;\n } else if (Math.abs(item - x) == diff) {\n res = Math.min(res, item);\n }\n }\n System.out.println(res);\n }", "main", "{\n final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n final int x = in.nextInt();\n final int n = in.nextInt();\n in.nextLine();\n final Set<Integer> set = IntStream.rangeClosed(0, 101).boxed().collect(Collectors.toSet());\n for (int i = 0; i < n; i++) {\n set.remove(in.nextInt());\n }\n int diff = Integer.MAX_VALUE;\n int res = Integer.MAX_VALUE;\n for (int item : set) {\n if (Math.abs(item - x) < diff) {\n diff = Math.abs(item - x);\n res = item;\n } else if (Math.abs(item - x) == diff) {\n res = Math.min(res, item);\n }\n }\n System.out.println(res);\n }", "final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));", "in", "new Scanner(new BufferedReader(new InputStreamReader(System.in)))", "final int x = in.nextInt();", "x", "in.nextInt()", "in.nextInt", "in", "final int n = in.nextInt();", "n", "in.nextInt()", "in.nextInt", "in", "in.nextLine()", "in.nextLine", "in", "final Set<Integer> set = IntStream.rangeClosed(0, 101).boxed().collect(Collectors.toSet());", "set", "IntStream.rangeClosed(0, 101).boxed().collect(Collectors.toSet())", "IntStream.rangeClosed(0, 101).boxed().collect", "IntStream.rangeClosed(0, 101).boxed()", "IntStream.rangeClosed(0, 101).boxed", "IntStream.rangeClosed(0, 101)", "IntStream.rangeClosed", "IntStream", "0", "101", "Collectors.toSet()", "Collectors.toSet", "Collectors", "for (int i = 0; i < n; i++) {\n set.remove(in.nextInt());\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n set.remove(in.nextInt());\n }", "{\n set.remove(in.nextInt());\n }", "set.remove(in.nextInt())", "set.remove", "set", "in.nextInt()", "in.nextInt", "in", "int diff = Integer.MAX_VALUE;", "diff", "Integer.MAX_VALUE", "Integer", "Integer.MAX_VALUE", "int res = Integer.MAX_VALUE;", "res", "Integer.MAX_VALUE", "Integer", "Integer.MAX_VALUE", "for (int item : set) {\n if (Math.abs(item - x) < diff) {\n diff = Math.abs(item - x);\n res = item;\n } else if (Math.abs(item - x) == diff) {\n res = Math.min(res, item);\n }\n }", "int item", "set", "{\n if (Math.abs(item - x) < diff) {\n diff = Math.abs(item - x);\n res = item;\n } else if (Math.abs(item - x) == diff) {\n res = Math.min(res, item);\n }\n }", "{\n if (Math.abs(item - x) < diff) {\n diff = Math.abs(item - x);\n res = item;\n } else if (Math.abs(item - x) == diff) {\n res = Math.min(res, item);\n }\n }", "if (Math.abs(item - x) < diff) {\n diff = Math.abs(item - x);\n res = item;\n } else if (Math.abs(item - x) == diff) {\n res = Math.min(res, item);\n }", "Math.abs(item - x) < diff", "Math.abs(item - x)", "Math.abs", "Math", "item - x", "item", "x", "diff", "{\n diff = Math.abs(item - x);\n res = item;\n }", "diff = Math.abs(item - x)", "diff", "Math.abs(item - x)", "Math.abs", "Math", "item - x", "item", "x", "res = item", "res", "item", "if (Math.abs(item - x) == diff) {\n res = Math.min(res, item);\n }", "Math.abs(item - x) == diff", "Math.abs(item - x)", "Math.abs", "Math", "item - x", "item", "x", "diff", "{\n res = Math.min(res, item);\n }", "res = Math.min(res, item)", "res", "Math.min(res, item)", "Math.min", "Math", "res", "item", "System.out.println(res)", "System.out.println", "System.out", "System", "System.out", "res", "String[] args", "args", "public final class Main {\n\n public static void main(String[] args) {\n final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n final int x = in.nextInt();\n final int n = in.nextInt();\n in.nextLine();\n final Set<Integer> set = IntStream.rangeClosed(0, 101).boxed().collect(Collectors.toSet());\n for (int i = 0; i < n; i++) {\n set.remove(in.nextInt());\n }\n int diff = Integer.MAX_VALUE;\n int res = Integer.MAX_VALUE;\n for (int item : set) {\n if (Math.abs(item - x) < diff) {\n diff = Math.abs(item - x);\n res = item;\n } else if (Math.abs(item - x) == diff) {\n res = Math.min(res, item);\n }\n }\n System.out.println(res);\n }\n}", "public final class Main {\n\n public static void main(String[] args) {\n final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n final int x = in.nextInt();\n final int n = in.nextInt();\n in.nextLine();\n final Set<Integer> set = IntStream.rangeClosed(0, 101).boxed().collect(Collectors.toSet());\n for (int i = 0; i < n; i++) {\n set.remove(in.nextInt());\n }\n int diff = Integer.MAX_VALUE;\n int res = Integer.MAX_VALUE;\n for (int item : set) {\n if (Math.abs(item - x) < diff) {\n diff = Math.abs(item - x);\n res = item;\n } else if (Math.abs(item - x) == diff) {\n res = Math.min(res, item);\n }\n }\n System.out.println(res);\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Scanner; import java.util.Set; import java.util.stream.Collectors; import java.util.stream.IntStream; public final class Main { public static void main(String[] args) { final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in))); final int x = in.nextInt(); final int n = in.nextInt(); in.nextLine(); final Set<Integer> set = IntStream.rangeClosed(0, 101).boxed().collect(Collectors.toSet()); for (int i = 0; i < n; i++) { set.remove(in.nextInt()); } int diff = Integer.MAX_VALUE; int res = Integer.MAX_VALUE; for (int item : set) { if (Math.abs(item - x) < diff) { diff = Math.abs(item - x); res = item; } else if (Math.abs(item - x) == diff) { res = Math.min(res, item); } } System.out.println(res); } }
[ 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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 4, 18, 13, 13, 41, 13, 17, 41, 13, 13, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 40, 4, 18, 13, 13, 30, 14, 2, 4, 18, 13, 2, 13, 13, 13, 30, 0, 13, 4, 18, 13, 2, 13, 13, 0, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 103, 5 ], [ 103, 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 ], [ 43, 46 ], [ 8, 47 ], [ 47, 48 ], [ 47, 49 ], [ 8, 50 ], [ 50, 51 ], [ 50, 52 ], [ 8, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 53, 58 ], [ 58, 59 ], [ 58, 60 ], [ 53, 61 ], [ 61, 62 ], [ 62, 63 ], [ 53, 64 ], [ 65, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 68, 71 ], [ 66, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 75, 78 ], [ 78, 79 ], [ 78, 80 ], [ 74, 81 ], [ 73, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 86, 87 ], [ 85, 88 ], [ 88, 89 ], [ 88, 90 ], [ 82, 91 ], [ 91, 92 ], [ 91, 93 ], [ 8, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 94, 99 ], [ 6, 100 ], [ 100, 101 ], [ 0, 102 ], [ 102, 103 ], [ 102, 104 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n ArrayList<Integer> list = new ArrayList<Integer>();\n for(int i = 0; i < n; i++) {\n int p = sc.nextInt();\n list.add(p);\n }\n int ans = 0;\n int t = x;\n for(int i = 1; i <= 101; i++) {\n if(!list.contains(i)) {\n if(Math.abs(x - i) < t) {\n t = Math.abs(x - i);\n ans = i;\n }\n }\n }\n System.out.println(ans);\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 x = sc.nextInt();\n int n = sc.nextInt();\n ArrayList<Integer> list = new ArrayList<Integer>();\n for(int i = 0; i < n; i++) {\n int p = sc.nextInt();\n list.add(p);\n }\n int ans = 0;\n int t = x;\n for(int i = 1; i <= 101; i++) {\n if(!list.contains(i)) {\n if(Math.abs(x - i) < t) {\n t = Math.abs(x - i);\n ans = i;\n }\n }\n }\n System.out.println(ans);\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n ArrayList<Integer> list = new ArrayList<Integer>();\n for(int i = 0; i < n; i++) {\n int p = sc.nextInt();\n list.add(p);\n }\n int ans = 0;\n int t = x;\n for(int i = 1; i <= 101; i++) {\n if(!list.contains(i)) {\n if(Math.abs(x - i) < t) {\n t = Math.abs(x - i);\n ans = i;\n }\n }\n }\n System.out.println(ans);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n ArrayList<Integer> list = new ArrayList<Integer>();\n for(int i = 0; i < n; i++) {\n int p = sc.nextInt();\n list.add(p);\n }\n int ans = 0;\n int t = x;\n for(int i = 1; i <= 101; i++) {\n if(!list.contains(i)) {\n if(Math.abs(x - i) < t) {\n t = Math.abs(x - i);\n ans = i;\n }\n }\n }\n System.out.println(ans);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "ArrayList<Integer> list = new ArrayList<Integer>();", "list", "new ArrayList<Integer>()", "for(int i = 0; i < n; i++) {\n int p = sc.nextInt();\n list.add(p);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n int p = sc.nextInt();\n list.add(p);\n }", "{\n int p = sc.nextInt();\n list.add(p);\n }", "int p = sc.nextInt();", "p", "sc.nextInt()", "sc.nextInt", "sc", "list.add(p)", "list.add", "list", "p", "int ans = 0;", "ans", "0", "int t = x;", "t", "x", "for(int i = 1; i <= 101; i++) {\n if(!list.contains(i)) {\n if(Math.abs(x - i) < t) {\n t = Math.abs(x - i);\n ans = i;\n }\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= 101", "i", "101", "i++", "i++", "i", "{\n if(!list.contains(i)) {\n if(Math.abs(x - i) < t) {\n t = Math.abs(x - i);\n ans = i;\n }\n }\n }", "{\n if(!list.contains(i)) {\n if(Math.abs(x - i) < t) {\n t = Math.abs(x - i);\n ans = i;\n }\n }\n }", "if(!list.contains(i)) {\n if(Math.abs(x - i) < t) {\n t = Math.abs(x - i);\n ans = i;\n }\n }", "!list.contains(i)", "list.contains(i)", "list.contains", "list", "i", "{\n if(Math.abs(x - i) < t) {\n t = Math.abs(x - i);\n ans = i;\n }\n }", "if(Math.abs(x - i) < t) {\n t = Math.abs(x - i);\n ans = i;\n }", "Math.abs(x - i) < t", "Math.abs(x - i)", "Math.abs", "Math", "x - i", "x", "i", "t", "{\n t = Math.abs(x - i);\n ans = i;\n }", "t = Math.abs(x - i)", "t", "Math.abs(x - i)", "Math.abs", "Math", "x - i", "x", "i", "ans = i", "ans", "i", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n ArrayList<Integer> list = new ArrayList<Integer>();\n for(int i = 0; i < n; i++) {\n int p = sc.nextInt();\n list.add(p);\n }\n int ans = 0;\n int t = x;\n for(int i = 1; i <= 101; i++) {\n if(!list.contains(i)) {\n if(Math.abs(x - i) < t) {\n t = Math.abs(x - i);\n ans = i;\n }\n }\n }\n System.out.println(ans);\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int n = sc.nextInt();\n ArrayList<Integer> list = new ArrayList<Integer>();\n for(int i = 0; i < n; i++) {\n int p = sc.nextInt();\n list.add(p);\n }\n int ans = 0;\n int t = x;\n for(int i = 1; i <= 101; i++) {\n if(!list.contains(i)) {\n if(Math.abs(x - i) < t) {\n t = Math.abs(x - i);\n ans = i;\n }\n }\n }\n System.out.println(ans);\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int n = sc.nextInt(); ArrayList<Integer> list = new ArrayList<Integer>(); for(int i = 0; i < n; i++) { int p = sc.nextInt(); list.add(p); } int ans = 0; int t = x; for(int i = 1; i <= 101; i++) { if(!list.contains(i)) { if(Math.abs(x - i) < t) { t = Math.abs(x - i); ans = i; } } } System.out.println(ans); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 2, 2, 2, 17, 17, 17, 17, 41, 13, 39, 17, 40, 17, 17, 17, 41, 13, 39, 17, 17, 40, 17, 17, 12, 13, 30, 41, 13, 4, 13, 41, 13, 4, 13, 41, 13, 4, 13, 13, 41, 13, 20, 28, 13, 13, 30, 30, 4, 18, 13, 13, 41, 13, 18, 13, 13, 41, 13, 40, 17, 11, 1, 41, 13, 40, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 4, 18, 13, 13, 30, 9, 41, 13, 4, 18, 13, 2, 13, 13, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 13, 4, 13, 13, 12, 13, 30, 41, 13, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 2, 13, 2, 4, 18, 13, 2, 13, 13, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 23, 13, 12, 13, 30, 4, 18, 13, 13, 23, 13, 12, 13, 30, 4, 18, 13, 13, 23, 13, 12, 13, 30, 0, 13, 20, 0, 13, 20, 4, 13, 4, 18, 13, 12, 13, 30, 20, 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, 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, 42, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 0, 13, 17, 29, 17, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 38, 5, 13, 30, 0, 13, 17, 29, 17, 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, 13, 4, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 344, 8 ], [ 344, 9 ], [ 9, 10 ], [ 344, 11 ], [ 11, 12 ], [ 344, 13 ], [ 13, 14 ], [ 344, 15 ], [ 15, 16 ], [ 344, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 21, 21 ], [ 21, 22 ], [ 21, 23 ], [ 21, 24 ], [ 19, 25 ], [ 344, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 28, 32 ], [ 28, 33 ], [ 344, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 36, 38 ], [ 36, 39 ], [ 39, 40 ], [ 36, 41 ], [ 344, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 44, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 44, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 55, 57 ], [ 44, 58 ], [ 58, 59 ], [ 58, 60 ], [ 44, 61 ], [ 61, 62 ], [ 61, 63 ], [ 61, 64 ], [ 65, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 66, 69 ], [ 44, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 72, 74 ], [ 44, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 44, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 79, 85 ], [ 85, 86 ], [ 85, 87 ], [ 79, 88 ], [ 88, 89 ], [ 89, 90 ], [ 79, 91 ], [ 92, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 94, 97 ], [ 93, 98 ], [ 98, 99 ], [ 92, 100 ], [ 100, 101 ], [ 100, 102 ], [ 102, 103 ], [ 103, 104 ], [ 102, 105 ], [ 105, 106 ], [ 105, 107 ], [ 92, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 108, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 112, 116 ], [ 116, 117 ], [ 116, 118 ], [ 44, 119 ], [ 119, 120 ], [ 119, 121 ], [ 344, 122 ], [ 122, 123 ], [ 122, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 127, 128 ], [ 127, 129 ], [ 124, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 130, 135 ], [ 135, 136 ], [ 135, 137 ], [ 130, 138 ], [ 138, 139 ], [ 139, 140 ], [ 130, 141 ], [ 142, 142 ], [ 142, 143 ], [ 143, 144 ], [ 143, 145 ], [ 145, 146 ], [ 145, 147 ], [ 147, 148 ], [ 148, 149 ], [ 149, 150 ], [ 147, 151 ], [ 151, 152 ], [ 151, 153 ], [ 142, 154 ], [ 154, 155 ], [ 154, 156 ], [ 156, 157 ], [ 156, 158 ], [ 142, 159 ], [ 159, 160 ], [ 160, 161 ], [ 160, 162 ], [ 159, 163 ], [ 163, 164 ], [ 163, 165 ], [ 142, 166 ], [ 166, 167 ], [ 167, 168 ], [ 167, 169 ], [ 166, 170 ], [ 122, 171 ], [ 171, 172 ], [ 344, 173 ], [ 173, 174 ], [ 173, 175 ], [ 175, 176 ], [ 176, 177 ], [ 177, 178 ], [ 176, 179 ], [ 173, 180 ], [ 180, 181 ], [ 344, 182 ], [ 182, 183 ], [ 182, 184 ], [ 184, 185 ], [ 185, 186 ], [ 186, 187 ], [ 185, 188 ], [ 182, 189 ], [ 189, 190 ], [ 344, 191 ], [ 191, 192 ], [ 191, 193 ], [ 193, 194 ], [ 194, 195 ], [ 194, 196 ], [ 193, 197 ], [ 197, 198 ], [ 197, 199 ], [ 193, 200 ], [ 200, 201 ], [ 193, 202 ], [ 202, 203 ], [ 203, 204 ], [ 344, 205 ], [ 205, 206 ], [ 205, 207 ], [ 207, 208 ], [ 205, 209 ], [ 209, 210 ], [ 344, 211 ], [ 211, 212 ], [ 211, 213 ], [ 213, 214 ], [ 214, 215 ], [ 214, 216 ], [ 213, 218 ], [ 218, 219 ], [ 219, 220 ], [ 220, 221 ], [ 220, 222 ], [ 218, 223 ], [ 223, 224 ], [ 223, 225 ], [ 218, 226 ], [ 226, 227 ], [ 227, 228 ], [ 218, 229 ], [ 229, 230 ], [ 230, 231 ], [ 231, 232 ], [ 231, 233 ], [ 230, 234 ], [ 234, 235 ], [ 213, 236 ], [ 236, 237 ], [ 211, 238 ], [ 238, 239 ], [ 344, 240 ], [ 240, 241 ], [ 240, 242 ], [ 242, 243 ], [ 243, 244 ], [ 243, 245 ], [ 242, 247 ], [ 247, 248 ], [ 248, 249 ], [ 249, 250 ], [ 249, 251 ], [ 247, 252 ], [ 252, 253 ], [ 252, 254 ], [ 247, 255 ], [ 255, 256 ], [ 256, 257 ], [ 247, 258 ], [ 258, 259 ], [ 259, 260 ], [ 260, 261 ], [ 260, 262 ], [ 259, 263 ], [ 263, 264 ], [ 242, 265 ], [ 265, 266 ], [ 240, 267 ], [ 267, 268 ], [ 344, 269 ], [ 269, 270 ], [ 269, 271 ], [ 271, 272 ], [ 272, 273 ], [ 273, 274 ], [ 274, 275 ], [ 274, 276 ], [ 273, 277 ], [ 277, 278 ], [ 278, 279 ], [ 279, 280 ], [ 272, 281 ], [ 281, 282 ], [ 282, 283 ], [ 283, 284 ], [ 283, 285 ], [ 285, 286 ], [ 286, 287 ], [ 286, 288 ], [ 285, 289 ], [ 289, 290 ], [ 282, 291 ], [ 291, 292 ], [ 292, 293 ], [ 292, 294 ], [ 271, 295 ], [ 295, 296 ], [ 296, 297 ], [ 297, 298 ], [ 344, 299 ], [ 299, 300 ], [ 299, 301 ], [ 301, 302 ], [ 302, 303 ], [ 303, 304 ], [ 303, 305 ], [ 305, 306 ], [ 306, 307 ], [ 306, 308 ], [ 305, 309 ], [ 309, 310 ], [ 302, 311 ], [ 311, 312 ], [ 312, 313 ], [ 313, 314 ], [ 314, 315 ], [ 344, 316 ], [ 316, 317 ], [ 316, 318 ], [ 318, 319 ], [ 319, 320 ], [ 320, 321 ], [ 321, 322 ], [ 320, 323 ], [ 323, 324 ], [ 344, 325 ], [ 325, 326 ], [ 325, 327 ], [ 327, 328 ], [ 328, 329 ], [ 329, 330 ], [ 330, 331 ], [ 329, 332 ], [ 332, 333 ], [ 344, 334 ], [ 334, 335 ], [ 334, 336 ], [ 336, 337 ], [ 337, 338 ], [ 338, 339 ], [ 339, 340 ], [ 338, 341 ], [ 341, 342 ], [ 0, 343 ], [ 343, 344 ], [ 343, 345 ] ]
[ "import java.util.*;\nimport java.io.*;\n\n// Template for atcoder\npublic class Main {\n\n BufferedReader br;\n PrintWriter out;\n StringTokenizer st;\n boolean eof;\n final long MOD = 1000L * 1000L * 1000L + 7;\n private static final int[] dx = {0, -1, 0, 1};\n private static final int[] dy = {1, 0, -1, 0};\n\n void solve() throws IOException {\n int x = nextInt();\n int n = nextInt();\n int[] p = nextIntArr(n);\n Set<Integer> has = new HashSet<>();\n for (int v : p) {\n has.add(v);\n }\n int diff = Integer.MAX_VALUE;\n int res = -1;\n for (int i = -1; i < 1000; i++) {\n if (has.contains(i)) {\n continue;\n }\n int tmp = Math.abs(i - x);\n if (tmp < diff) {\n diff = tmp;\n res = i;\n }\n }\n outln(res);\n }\n\n\n\n void shuffle(int[] a) {\n int n = a.length;\n for(int i = 0; i < n; i++) {\n int r = i + (int) (Math.random() * (n - i));\n int tmp = a[i];\n a[i] = a[r];\n a[r] = tmp;\n }\n }\n private void outln(Object o) {\n out.println(o);\n }\n private void out(Object o) {\n out.print(o);\n }\n public Main() throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n out = new PrintWriter(System.out);\n solve();\n out.close();\n }\n public static void main(String[] args) throws IOException {\n new Main();\n }\n\n public long[] nextLongArr(int n) throws IOException{\n long[] res = new long[n];\n for(int i = 0; i < n; i++)\n res[i] = nextLong();\n return res;\n }\n public int[] nextIntArr(int n) throws IOException {\n int[] res = new int[n];\n for(int i = 0; i < n; i++)\n res[i] = nextInt();\n return res;\n }\n public String nextToken() {\n while (st == null || !st.hasMoreTokens()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (Exception e) {\n eof = true;\n return null;\n }\n }\n return st.nextToken();\n }\n public String nextString() {\n try {\n return br.readLine();\n } catch (IOException e) {\n eof = true;\n return null;\n }\n }\n public int nextInt() throws IOException {\n return Integer.parseInt(nextToken());\n }\n public long nextLong() throws IOException {\n return Long.parseLong(nextToken());\n }\n public double nextDouble() throws IOException {\n return Double.parseDouble(nextToken());\n }\n}", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "public class Main {\n\n BufferedReader br;\n PrintWriter out;\n StringTokenizer st;\n boolean eof;\n final long MOD = 1000L * 1000L * 1000L + 7;\n private static final int[] dx = {0, -1, 0, 1};\n private static final int[] dy = {1, 0, -1, 0};\n\n void solve() throws IOException {\n int x = nextInt();\n int n = nextInt();\n int[] p = nextIntArr(n);\n Set<Integer> has = new HashSet<>();\n for (int v : p) {\n has.add(v);\n }\n int diff = Integer.MAX_VALUE;\n int res = -1;\n for (int i = -1; i < 1000; i++) {\n if (has.contains(i)) {\n continue;\n }\n int tmp = Math.abs(i - x);\n if (tmp < diff) {\n diff = tmp;\n res = i;\n }\n }\n outln(res);\n }\n\n\n\n void shuffle(int[] a) {\n int n = a.length;\n for(int i = 0; i < n; i++) {\n int r = i + (int) (Math.random() * (n - i));\n int tmp = a[i];\n a[i] = a[r];\n a[r] = tmp;\n }\n }\n private void outln(Object o) {\n out.println(o);\n }\n private void out(Object o) {\n out.print(o);\n }\n public Main() throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n out = new PrintWriter(System.out);\n solve();\n out.close();\n }\n public static void main(String[] args) throws IOException {\n new Main();\n }\n\n public long[] nextLongArr(int n) throws IOException{\n long[] res = new long[n];\n for(int i = 0; i < n; i++)\n res[i] = nextLong();\n return res;\n }\n public int[] nextIntArr(int n) throws IOException {\n int[] res = new int[n];\n for(int i = 0; i < n; i++)\n res[i] = nextInt();\n return res;\n }\n public String nextToken() {\n while (st == null || !st.hasMoreTokens()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (Exception e) {\n eof = true;\n return null;\n }\n }\n return st.nextToken();\n }\n public String nextString() {\n try {\n return br.readLine();\n } catch (IOException e) {\n eof = true;\n return null;\n }\n }\n public int nextInt() throws IOException {\n return Integer.parseInt(nextToken());\n }\n public long nextLong() throws IOException {\n return Long.parseLong(nextToken());\n }\n public double nextDouble() throws IOException {\n return Double.parseDouble(nextToken());\n }\n}", "Main", "BufferedReader br;", "br", "PrintWriter out;", "out", "StringTokenizer st;", "st", "boolean eof;", "eof", "final long MOD = 1000L * 1000L * 1000L + 7;", "MOD", "1000L * 1000L * 1000L + 7", "1000L * 1000L * 1000L", "1000L * 1000L * 1000L", "1000L", "1000L", "1000L", "7", "private static final int[] dx = {0, -1, 0, 1};", "dx", "{0, -1, 0, 1}", "0", "-1", "1", "0", "1", "private static final int[] dy = {1, 0, -1, 0};", "dy", "{1, 0, -1, 0}", "1", "0", "-1", "1", "0", "void solve() throws IOException {\n int x = nextInt();\n int n = nextInt();\n int[] p = nextIntArr(n);\n Set<Integer> has = new HashSet<>();\n for (int v : p) {\n has.add(v);\n }\n int diff = Integer.MAX_VALUE;\n int res = -1;\n for (int i = -1; i < 1000; i++) {\n if (has.contains(i)) {\n continue;\n }\n int tmp = Math.abs(i - x);\n if (tmp < diff) {\n diff = tmp;\n res = i;\n }\n }\n outln(res);\n }", "solve", "{\n int x = nextInt();\n int n = nextInt();\n int[] p = nextIntArr(n);\n Set<Integer> has = new HashSet<>();\n for (int v : p) {\n has.add(v);\n }\n int diff = Integer.MAX_VALUE;\n int res = -1;\n for (int i = -1; i < 1000; i++) {\n if (has.contains(i)) {\n continue;\n }\n int tmp = Math.abs(i - x);\n if (tmp < diff) {\n diff = tmp;\n res = i;\n }\n }\n outln(res);\n }", "int x = nextInt();", "x", "nextInt()", "nextInt", "int n = nextInt();", "n", "nextInt()", "nextInt", "int[] p = nextIntArr(n);", "p", "nextIntArr(n)", "nextIntArr", "n", "Set<Integer> has = new HashSet<>();", "has", "new HashSet<>()", "for (int v : p) {\n has.add(v);\n }", "int v", "p", "{\n has.add(v);\n }", "{\n has.add(v);\n }", "has.add(v)", "has.add", "has", "v", "int diff = Integer.MAX_VALUE;", "diff", "Integer.MAX_VALUE", "Integer", "Integer.MAX_VALUE", "int res = -1;", "res", "-1", "1", "for (int i = -1; i < 1000; i++) {\n if (has.contains(i)) {\n continue;\n }\n int tmp = Math.abs(i - x);\n if (tmp < diff) {\n diff = tmp;\n res = i;\n }\n }", "int i = -1;", "int i = -1;", "i", "-1", "1", "i < 1000", "i", "1000", "i++", "i++", "i", "{\n if (has.contains(i)) {\n continue;\n }\n int tmp = Math.abs(i - x);\n if (tmp < diff) {\n diff = tmp;\n res = i;\n }\n }", "{\n if (has.contains(i)) {\n continue;\n }\n int tmp = Math.abs(i - x);\n if (tmp < diff) {\n diff = tmp;\n res = i;\n }\n }", "if (has.contains(i)) {\n continue;\n }", "has.contains(i)", "has.contains", "has", "i", "{\n continue;\n }", "continue;", "int tmp = Math.abs(i - x);", "tmp", "Math.abs(i - x)", "Math.abs", "Math", "i - x", "i", "x", "if (tmp < diff) {\n diff = tmp;\n res = i;\n }", "tmp < diff", "tmp", "diff", "{\n diff = tmp;\n res = i;\n }", "diff = tmp", "diff", "tmp", "res = i", "res", "i", "outln(res)", "outln", "res", "void shuffle(int[] a) {\n int n = a.length;\n for(int i = 0; i < n; i++) {\n int r = i + (int) (Math.random() * (n - i));\n int tmp = a[i];\n a[i] = a[r];\n a[r] = tmp;\n }\n }", "shuffle", "{\n int n = a.length;\n for(int i = 0; i < n; i++) {\n int r = i + (int) (Math.random() * (n - i));\n int tmp = a[i];\n a[i] = a[r];\n a[r] = tmp;\n }\n }", "int n = a.length;", "n", "a.length", "a", "a.length", "for(int i = 0; i < n; i++) {\n int r = i + (int) (Math.random() * (n - i));\n int tmp = a[i];\n a[i] = a[r];\n a[r] = tmp;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n int r = i + (int) (Math.random() * (n - i));\n int tmp = a[i];\n a[i] = a[r];\n a[r] = tmp;\n }", "{\n int r = i + (int) (Math.random() * (n - i));\n int tmp = a[i];\n a[i] = a[r];\n a[r] = tmp;\n }", "int r = i + (int) (Math.random() * (n - i));", "r", "i + (int) (Math.random() * (n - i))", "i", "(int) (Math.random() * (n - i))", "Math.random()", "Math.random", "Math", "(n - i)", "n", "i", "int tmp = a[i];", "tmp", "a[i]", "a", "i", "a[i] = a[r]", "a[i]", "a", "i", "a[r]", "a", "r", "a[r] = tmp", "a[r]", "a", "r", "tmp", "int[] a", "a", "private void outln(Object o) {\n out.println(o);\n }", "outln", "{\n out.println(o);\n }", "out.println(o)", "out.println", "out", "o", "Object o", "o", "private void out(Object o) {\n out.print(o);\n }", "out", "{\n out.print(o);\n }", "out.print(o)", "out.print", "out", "o", "Object o", "o", "public Main() throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n out = new PrintWriter(System.out);\n solve();\n out.close();\n }", "Main", "{\n br = new BufferedReader(new InputStreamReader(System.in));\n out = new PrintWriter(System.out);\n solve();\n out.close();\n }", "br = new BufferedReader(new InputStreamReader(System.in))", "br", "new BufferedReader(new InputStreamReader(System.in))", "out = new PrintWriter(System.out)", "out", "new PrintWriter(System.out)", "solve()", "solve", "out.close()", "out.close", "out", "public static void main(String[] args) throws IOException {\n new Main();\n }", "main", "{\n new Main();\n }", "new Main()", "String[] args", "args", "public long[] nextLongArr(int n) throws IOException{\n long[] res = new long[n];\n for(int i = 0; i < n; i++)\n res[i] = nextLong();\n return res;\n }", "nextLongArr", "{\n long[] res = new long[n];\n for(int i = 0; i < n; i++)\n res[i] = nextLong();\n return res;\n }", "long[] res = new long[n];", "res", "new long[n]", "n", "for(int i = 0; i < n; i++)\n res[i] = nextLong();", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "res[i] = nextLong();", "res[i] = nextLong()", "res[i]", "res", "i", "nextLong()", "nextLong", "return res;", "res", "int n", "n", "public int[] nextIntArr(int n) throws IOException {\n int[] res = new int[n];\n for(int i = 0; i < n; i++)\n res[i] = nextInt();\n return res;\n }", "nextIntArr", "{\n int[] res = new int[n];\n for(int i = 0; i < n; i++)\n res[i] = nextInt();\n return res;\n }", "int[] res = new int[n];", "res", "new int[n]", "n", "for(int i = 0; i < n; i++)\n res[i] = nextInt();", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "res[i] = nextInt();", "res[i] = nextInt()", "res[i]", "res", "i", "nextInt()", "nextInt", "return res;", "res", "int n", "n", "public String nextToken() {\n while (st == null || !st.hasMoreTokens()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (Exception e) {\n eof = true;\n return null;\n }\n }\n return st.nextToken();\n }", "nextToken", "{\n while (st == null || !st.hasMoreTokens()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (Exception e) {\n eof = true;\n return null;\n }\n }\n return st.nextToken();\n }", "while (st == null || !st.hasMoreTokens()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (Exception e) {\n eof = true;\n return null;\n }\n }", "st == null || !st.hasMoreTokens()", "st == null", "st", "null", "!st.hasMoreTokens()", "st.hasMoreTokens()", "st.hasMoreTokens", "st", "{\n try {\n st = new StringTokenizer(br.readLine());\n } catch (Exception e) {\n eof = true;\n return null;\n }\n }", "try {\n st = new StringTokenizer(br.readLine());\n } catch (Exception e) {\n eof = true;\n return null;\n }", "catch (Exception e) {\n eof = true;\n return null;\n }", "Exception e", "{\n eof = true;\n return null;\n }", "eof = true", "eof", "true", "return null;", "null", "{\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", "public String nextString() {\n try {\n return br.readLine();\n } catch (IOException e) {\n eof = true;\n return null;\n }\n }", "nextString", "{\n try {\n return br.readLine();\n } catch (IOException e) {\n eof = true;\n return null;\n }\n }", "try {\n return br.readLine();\n } catch (IOException e) {\n eof = true;\n return null;\n }", "catch (IOException e) {\n eof = true;\n return null;\n }", "IOException e", "{\n eof = true;\n return null;\n }", "eof = true", "eof", "true", "return null;", "null", "{\n return br.readLine();\n }", "return br.readLine();", "br.readLine()", "br.readLine", "br", "public int nextInt() throws IOException {\n return Integer.parseInt(nextToken());\n }", "nextInt", "{\n return Integer.parseInt(nextToken());\n }", "return Integer.parseInt(nextToken());", "Integer.parseInt(nextToken())", "Integer.parseInt", "Integer", "nextToken()", "nextToken", "public long nextLong() throws IOException {\n return Long.parseLong(nextToken());\n }", "nextLong", "{\n return Long.parseLong(nextToken());\n }", "return Long.parseLong(nextToken());", "Long.parseLong(nextToken())", "Long.parseLong", "Long", "nextToken()", "nextToken", "public double nextDouble() throws IOException {\n return Double.parseDouble(nextToken());\n }", "nextDouble", "{\n return Double.parseDouble(nextToken());\n }", "return Double.parseDouble(nextToken());", "Double.parseDouble(nextToken())", "Double.parseDouble", "Double", "nextToken()", "nextToken", "public class Main {\n\n BufferedReader br;\n PrintWriter out;\n StringTokenizer st;\n boolean eof;\n final long MOD = 1000L * 1000L * 1000L + 7;\n private static final int[] dx = {0, -1, 0, 1};\n private static final int[] dy = {1, 0, -1, 0};\n\n void solve() throws IOException {\n int x = nextInt();\n int n = nextInt();\n int[] p = nextIntArr(n);\n Set<Integer> has = new HashSet<>();\n for (int v : p) {\n has.add(v);\n }\n int diff = Integer.MAX_VALUE;\n int res = -1;\n for (int i = -1; i < 1000; i++) {\n if (has.contains(i)) {\n continue;\n }\n int tmp = Math.abs(i - x);\n if (tmp < diff) {\n diff = tmp;\n res = i;\n }\n }\n outln(res);\n }\n\n\n\n void shuffle(int[] a) {\n int n = a.length;\n for(int i = 0; i < n; i++) {\n int r = i + (int) (Math.random() * (n - i));\n int tmp = a[i];\n a[i] = a[r];\n a[r] = tmp;\n }\n }\n private void outln(Object o) {\n out.println(o);\n }\n private void out(Object o) {\n out.print(o);\n }\n public Main() throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n out = new PrintWriter(System.out);\n solve();\n out.close();\n }\n public static void main(String[] args) throws IOException {\n new Main();\n }\n\n public long[] nextLongArr(int n) throws IOException{\n long[] res = new long[n];\n for(int i = 0; i < n; i++)\n res[i] = nextLong();\n return res;\n }\n public int[] nextIntArr(int n) throws IOException {\n int[] res = new int[n];\n for(int i = 0; i < n; i++)\n res[i] = nextInt();\n return res;\n }\n public String nextToken() {\n while (st == null || !st.hasMoreTokens()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (Exception e) {\n eof = true;\n return null;\n }\n }\n return st.nextToken();\n }\n public String nextString() {\n try {\n return br.readLine();\n } catch (IOException e) {\n eof = true;\n return null;\n }\n }\n public int nextInt() throws IOException {\n return Integer.parseInt(nextToken());\n }\n public long nextLong() throws IOException {\n return Long.parseLong(nextToken());\n }\n public double nextDouble() throws IOException {\n return Double.parseDouble(nextToken());\n }\n}", "public class Main {\n\n BufferedReader br;\n PrintWriter out;\n StringTokenizer st;\n boolean eof;\n final long MOD = 1000L * 1000L * 1000L + 7;\n private static final int[] dx = {0, -1, 0, 1};\n private static final int[] dy = {1, 0, -1, 0};\n\n void solve() throws IOException {\n int x = nextInt();\n int n = nextInt();\n int[] p = nextIntArr(n);\n Set<Integer> has = new HashSet<>();\n for (int v : p) {\n has.add(v);\n }\n int diff = Integer.MAX_VALUE;\n int res = -1;\n for (int i = -1; i < 1000; i++) {\n if (has.contains(i)) {\n continue;\n }\n int tmp = Math.abs(i - x);\n if (tmp < diff) {\n diff = tmp;\n res = i;\n }\n }\n outln(res);\n }\n\n\n\n void shuffle(int[] a) {\n int n = a.length;\n for(int i = 0; i < n; i++) {\n int r = i + (int) (Math.random() * (n - i));\n int tmp = a[i];\n a[i] = a[r];\n a[r] = tmp;\n }\n }\n private void outln(Object o) {\n out.println(o);\n }\n private void out(Object o) {\n out.print(o);\n }\n public Main() throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n out = new PrintWriter(System.out);\n solve();\n out.close();\n }\n public static void main(String[] args) throws IOException {\n new Main();\n }\n\n public long[] nextLongArr(int n) throws IOException{\n long[] res = new long[n];\n for(int i = 0; i < n; i++)\n res[i] = nextLong();\n return res;\n }\n public int[] nextIntArr(int n) throws IOException {\n int[] res = new int[n];\n for(int i = 0; i < n; i++)\n res[i] = nextInt();\n return res;\n }\n public String nextToken() {\n while (st == null || !st.hasMoreTokens()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (Exception e) {\n eof = true;\n return null;\n }\n }\n return st.nextToken();\n }\n public String nextString() {\n try {\n return br.readLine();\n } catch (IOException e) {\n eof = true;\n return null;\n }\n }\n public int nextInt() throws IOException {\n return Integer.parseInt(nextToken());\n }\n public long nextLong() throws IOException {\n return Long.parseLong(nextToken());\n }\n public double nextDouble() throws IOException {\n return Double.parseDouble(nextToken());\n }\n}", "Main" ]
import java.util.*; import java.io.*; // Template for atcoder public class Main { BufferedReader br; PrintWriter out; StringTokenizer st; boolean eof; final long MOD = 1000L * 1000L * 1000L + 7; private static final int[] dx = {0, -1, 0, 1}; private static final int[] dy = {1, 0, -1, 0}; void solve() throws IOException { int x = nextInt(); int n = nextInt(); int[] p = nextIntArr(n); Set<Integer> has = new HashSet<>(); for (int v : p) { has.add(v); } int diff = Integer.MAX_VALUE; int res = -1; for (int i = -1; i < 1000; i++) { if (has.contains(i)) { continue; } int tmp = Math.abs(i - x); if (tmp < diff) { diff = tmp; res = i; } } outln(res); } void shuffle(int[] a) { int n = a.length; for(int i = 0; i < n; i++) { int r = i + (int) (Math.random() * (n - i)); int tmp = a[i]; a[i] = a[r]; a[r] = tmp; } } private void outln(Object o) { out.println(o); } private void out(Object o) { out.print(o); } public Main() throws IOException { br = new BufferedReader(new InputStreamReader(System.in)); out = new PrintWriter(System.out); solve(); out.close(); } public static void main(String[] args) throws IOException { new Main(); } public long[] nextLongArr(int n) throws IOException{ long[] res = new long[n]; for(int i = 0; i < n; i++) res[i] = nextLong(); return res; } public int[] nextIntArr(int n) throws IOException { int[] res = new int[n]; for(int i = 0; i < n; i++) res[i] = nextInt(); return res; } public String nextToken() { while (st == null || !st.hasMoreTokens()) { try { st = new StringTokenizer(br.readLine()); } catch (Exception e) { eof = true; return null; } } return st.nextToken(); } public String nextString() { try { return br.readLine(); } catch (IOException e) { eof = true; return null; } } public int nextInt() throws IOException { return Integer.parseInt(nextToken()); } public long nextLong() throws IOException { return Long.parseLong(nextToken()); } public double nextDouble() throws IOException { return Double.parseDouble(nextToken()); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 12, 13, 30, 41, 13, 20, 41, 13, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 18, 13, 13, 41, 13, 17, 42, 17, 30, 14, 40, 4, 18, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 29, 14, 40, 4, 18, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 29, 40, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 20, 13, 0, 13, 4, 18, 4, 18, 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, 4, 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 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 174, 17 ], [ 174, 18 ], [ 18, 19 ], [ 174, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 23, 25 ], [ 22, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 28, 30 ], [ 22, 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 ], [ 45, 46 ], [ 44, 47 ], [ 47, 48 ], [ 47, 49 ], [ 22, 50 ], [ 50, 51 ], [ 50, 52 ], [ 22, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 58, 61 ], [ 61, 62 ], [ 61, 63 ], [ 56, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 65, 70 ], [ 70, 71 ], [ 70, 72 ], [ 64, 73 ], [ 56, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 76, 79 ], [ 79, 80 ], [ 79, 81 ], [ 74, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 83, 88 ], [ 88, 89 ], [ 88, 90 ], [ 82, 91 ], [ 55, 92 ], [ 92, 93 ], [ 20, 94 ], [ 94, 95 ], [ 20, 96 ], [ 96, 97 ], [ 174, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 100, 104 ], [ 104, 105 ], [ 104, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 106, 111 ], [ 100, 112 ], [ 112, 113 ], [ 112, 114 ], [ 100, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 118, 119 ], [ 117, 120 ], [ 120, 121 ], [ 120, 122 ], [ 100, 123 ], [ 123, 124 ], [ 123, 125 ], [ 125, 126 ], [ 126, 127 ], [ 125, 128 ], [ 128, 129 ], [ 128, 130 ], [ 100, 131 ], [ 131, 132 ], [ 131, 133 ], [ 100, 135 ], [ 135, 136 ], [ 135, 137 ], [ 137, 138 ], [ 138, 139 ], [ 139, 140 ], [ 140, 141 ], [ 137, 142 ], [ 100, 143 ], [ 143, 144 ], [ 144, 145 ], [ 145, 146 ], [ 145, 147 ], [ 143, 148 ], [ 148, 149 ], [ 148, 150 ], [ 143, 151 ], [ 151, 152 ], [ 152, 153 ], [ 143, 154 ], [ 155, 155 ], [ 155, 156 ], [ 156, 157 ], [ 157, 158 ], [ 157, 159 ], [ 156, 160 ], [ 160, 161 ], [ 161, 162 ], [ 160, 163 ], [ 163, 164 ], [ 163, 165 ], [ 100, 166 ], [ 166, 167 ], [ 167, 168 ], [ 166, 169 ], [ 166, 170 ], [ 98, 171 ], [ 171, 172 ], [ 0, 173 ], [ 173, 174 ], [ 173, 175 ] ]
[ "import java.util.*;\nimport java.io.*;\nimport java.math.BigDecimal;\nimport java.nio.file.Files;\nimport java.nio.charset.StandardCharsets;\n//给出两个数a,b 求出[a,b]中各位数字之和能整除原数的数的个数。\npublic class Main {\n\n int mod ;\n void solve(int v, int[] arr) {\n Set<Integer> set = new HashSet<>();\n int n = arr.length;\n for(int i=0;i<n;i++){\n set.add(arr[i]);\n }\n int add = 0;\n while(true){\n if(!set.contains(v-add)){\n System.out.println((v-add));\n return;\n }else if(!set.contains(v+add)){\n System.out.println((v+add));\n return;\n }\n add++;\n }\n\n }\n\n\n public static void main(String[] args) throws IOException {\n // Use the Scanner class\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n String[] s = br.readLine().split(\" \");\n Main test = new Main();\n\n int n = Integer.parseInt(s[0]);\n int len = Integer.parseInt(s[1]);\n int[] arr = new int[len];\n s = br.readLine().split(\" \");\n for(int i=0;i<len;i++) {\n arr[i] = Integer.parseInt(s[i]);\n\n }\n\n test.solve(n, arr);\n //int tot = Integer.parseInt(br.readLine());\n\n\n// int i =1;\n// System.out.println();\n// while(tot>0){\n//\n// String s = br.readLine();\n// String[] sr = s.split(\" \");\n// List<Long> ls = new ArrayList<>();\n// for(String ss:sr){\n// ls.add(Long.parseLong(ss));\n// }\n// Main tt = new Main();\n// tt.sol(ls);\n// // String Buffer to store answer\n// StringBuffer sb = new StringBuffer();\n//// Solution obj = new Solution();\n////\n//// System.out.println(\"Case #\"+i+\": \"+obj.sol());\n// tot--;\n// i++;\n// }\n }\n\n}", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "import java.math.BigDecimal;", "BigDecimal", "java.math", "import java.nio.file.Files;", "Files", "java.nio.file", "import java.nio.charset.StandardCharsets;", "StandardCharsets", "java.nio.charset", "public class Main {\n\n int mod ;\n void solve(int v, int[] arr) {\n Set<Integer> set = new HashSet<>();\n int n = arr.length;\n for(int i=0;i<n;i++){\n set.add(arr[i]);\n }\n int add = 0;\n while(true){\n if(!set.contains(v-add)){\n System.out.println((v-add));\n return;\n }else if(!set.contains(v+add)){\n System.out.println((v+add));\n return;\n }\n add++;\n }\n\n }\n\n\n public static void main(String[] args) throws IOException {\n // Use the Scanner class\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n String[] s = br.readLine().split(\" \");\n Main test = new Main();\n\n int n = Integer.parseInt(s[0]);\n int len = Integer.parseInt(s[1]);\n int[] arr = new int[len];\n s = br.readLine().split(\" \");\n for(int i=0;i<len;i++) {\n arr[i] = Integer.parseInt(s[i]);\n\n }\n\n test.solve(n, arr);\n //int tot = Integer.parseInt(br.readLine());\n\n\n// int i =1;\n// System.out.println();\n// while(tot>0){\n//\n// String s = br.readLine();\n// String[] sr = s.split(\" \");\n// List<Long> ls = new ArrayList<>();\n// for(String ss:sr){\n// ls.add(Long.parseLong(ss));\n// }\n// Main tt = new Main();\n// tt.sol(ls);\n// // String Buffer to store answer\n// StringBuffer sb = new StringBuffer();\n//// Solution obj = new Solution();\n////\n//// System.out.println(\"Case #\"+i+\": \"+obj.sol());\n// tot--;\n// i++;\n// }\n }\n\n}", "Main", "int mod ;", "mod", "void solve(int v, int[] arr) {\n Set<Integer> set = new HashSet<>();\n int n = arr.length;\n for(int i=0;i<n;i++){\n set.add(arr[i]);\n }\n int add = 0;\n while(true){\n if(!set.contains(v-add)){\n System.out.println((v-add));\n return;\n }else if(!set.contains(v+add)){\n System.out.println((v+add));\n return;\n }\n add++;\n }\n\n }", "solve", "{\n Set<Integer> set = new HashSet<>();\n int n = arr.length;\n for(int i=0;i<n;i++){\n set.add(arr[i]);\n }\n int add = 0;\n while(true){\n if(!set.contains(v-add)){\n System.out.println((v-add));\n return;\n }else if(!set.contains(v+add)){\n System.out.println((v+add));\n return;\n }\n add++;\n }\n\n }", "Set<Integer> set = new HashSet<>();", "set", "new HashSet<>()", "int n = arr.length;", "n", "arr.length", "arr", "arr.length", "for(int i=0;i<n;i++){\n set.add(arr[i]);\n }", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n set.add(arr[i]);\n }", "{\n set.add(arr[i]);\n }", "set.add(arr[i])", "set.add", "set", "arr[i]", "arr", "i", "int add = 0;", "add", "0", "while(true){\n if(!set.contains(v-add)){\n System.out.println((v-add));\n return;\n }else if(!set.contains(v+add)){\n System.out.println((v+add));\n return;\n }\n add++;\n }", "true", "{\n if(!set.contains(v-add)){\n System.out.println((v-add));\n return;\n }else if(!set.contains(v+add)){\n System.out.println((v+add));\n return;\n }\n add++;\n }", "if(!set.contains(v-add)){\n System.out.println((v-add));\n return;\n }else if(!set.contains(v+add)){\n System.out.println((v+add));\n return;\n }", "!set.contains(v-add)", "set.contains(v-add)", "set.contains", "set", "v-add", "v", "add", "{\n System.out.println((v-add));\n return;\n }", "System.out.println((v-add))", "System.out.println", "System.out", "System", "System.out", "(v-add)", "v", "add", "return;", "if(!set.contains(v+add)){\n System.out.println((v+add));\n return;\n }", "!set.contains(v+add)", "set.contains(v+add)", "set.contains", "set", "v+add", "v", "add", "{\n System.out.println((v+add));\n return;\n }", "System.out.println((v+add))", "System.out.println", "System.out", "System", "System.out", "(v+add)", "v", "add", "return;", "add++", "add", "int v", "v", "int[] arr", "arr", "public static void main(String[] args) throws IOException {\n // Use the Scanner class\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n String[] s = br.readLine().split(\" \");\n Main test = new Main();\n\n int n = Integer.parseInt(s[0]);\n int len = Integer.parseInt(s[1]);\n int[] arr = new int[len];\n s = br.readLine().split(\" \");\n for(int i=0;i<len;i++) {\n arr[i] = Integer.parseInt(s[i]);\n\n }\n\n test.solve(n, arr);\n //int tot = Integer.parseInt(br.readLine());\n\n\n// int i =1;\n// System.out.println();\n// while(tot>0){\n//\n// String s = br.readLine();\n// String[] sr = s.split(\" \");\n// List<Long> ls = new ArrayList<>();\n// for(String ss:sr){\n// ls.add(Long.parseLong(ss));\n// }\n// Main tt = new Main();\n// tt.sol(ls);\n// // String Buffer to store answer\n// StringBuffer sb = new StringBuffer();\n//// Solution obj = new Solution();\n////\n//// System.out.println(\"Case #\"+i+\": \"+obj.sol());\n// tot--;\n// i++;\n// }\n }", "main", "{\n // Use the Scanner class\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n String[] s = br.readLine().split(\" \");\n Main test = new Main();\n\n int n = Integer.parseInt(s[0]);\n int len = Integer.parseInt(s[1]);\n int[] arr = new int[len];\n s = br.readLine().split(\" \");\n for(int i=0;i<len;i++) {\n arr[i] = Integer.parseInt(s[i]);\n\n }\n\n test.solve(n, arr);\n //int tot = Integer.parseInt(br.readLine());\n\n\n// int i =1;\n// System.out.println();\n// while(tot>0){\n//\n// String s = br.readLine();\n// String[] sr = s.split(\" \");\n// List<Long> ls = new ArrayList<>();\n// for(String ss:sr){\n// ls.add(Long.parseLong(ss));\n// }\n// Main tt = new Main();\n// tt.sol(ls);\n// // String Buffer to store answer\n// StringBuffer sb = new StringBuffer();\n//// Solution obj = new Solution();\n////\n//// System.out.println(\"Case #\"+i+\": \"+obj.sol());\n// tot--;\n// i++;\n// }\n }", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "String[] s = br.readLine().split(\" \");", "s", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "Main test = new Main();", "test", "new Main()", "int n = Integer.parseInt(s[0]);", "n", "Integer.parseInt(s[0])", "Integer.parseInt", "Integer", "s[0]", "s", "0", "int len = Integer.parseInt(s[1]);", "len", "Integer.parseInt(s[1])", "Integer.parseInt", "Integer", "s[1]", "s", "1", "int[] arr = new int[len];", "arr", "new int[len]", "len", "s = br.readLine().split(\" \")", "s", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "for(int i=0;i<len;i++) {\n arr[i] = Integer.parseInt(s[i]);\n\n }", "int i=0;", "int i=0;", "i", "0", "i<len", "i", "len", "i++", "i++", "i", "{\n arr[i] = Integer.parseInt(s[i]);\n\n }", "{\n arr[i] = Integer.parseInt(s[i]);\n\n }", "arr[i] = Integer.parseInt(s[i])", "arr[i]", "arr", "i", "Integer.parseInt(s[i])", "Integer.parseInt", "Integer", "s[i]", "s", "i", "test.solve(n, arr)", "test.solve", "test", "n", "arr", "String[] args", "args", "public class Main {\n\n int mod ;\n void solve(int v, int[] arr) {\n Set<Integer> set = new HashSet<>();\n int n = arr.length;\n for(int i=0;i<n;i++){\n set.add(arr[i]);\n }\n int add = 0;\n while(true){\n if(!set.contains(v-add)){\n System.out.println((v-add));\n return;\n }else if(!set.contains(v+add)){\n System.out.println((v+add));\n return;\n }\n add++;\n }\n\n }\n\n\n public static void main(String[] args) throws IOException {\n // Use the Scanner class\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n String[] s = br.readLine().split(\" \");\n Main test = new Main();\n\n int n = Integer.parseInt(s[0]);\n int len = Integer.parseInt(s[1]);\n int[] arr = new int[len];\n s = br.readLine().split(\" \");\n for(int i=0;i<len;i++) {\n arr[i] = Integer.parseInt(s[i]);\n\n }\n\n test.solve(n, arr);\n //int tot = Integer.parseInt(br.readLine());\n\n\n// int i =1;\n// System.out.println();\n// while(tot>0){\n//\n// String s = br.readLine();\n// String[] sr = s.split(\" \");\n// List<Long> ls = new ArrayList<>();\n// for(String ss:sr){\n// ls.add(Long.parseLong(ss));\n// }\n// Main tt = new Main();\n// tt.sol(ls);\n// // String Buffer to store answer\n// StringBuffer sb = new StringBuffer();\n//// Solution obj = new Solution();\n////\n//// System.out.println(\"Case #\"+i+\": \"+obj.sol());\n// tot--;\n// i++;\n// }\n }\n\n}", "public class Main {\n\n int mod ;\n void solve(int v, int[] arr) {\n Set<Integer> set = new HashSet<>();\n int n = arr.length;\n for(int i=0;i<n;i++){\n set.add(arr[i]);\n }\n int add = 0;\n while(true){\n if(!set.contains(v-add)){\n System.out.println((v-add));\n return;\n }else if(!set.contains(v+add)){\n System.out.println((v+add));\n return;\n }\n add++;\n }\n\n }\n\n\n public static void main(String[] args) throws IOException {\n // Use the Scanner class\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n String[] s = br.readLine().split(\" \");\n Main test = new Main();\n\n int n = Integer.parseInt(s[0]);\n int len = Integer.parseInt(s[1]);\n int[] arr = new int[len];\n s = br.readLine().split(\" \");\n for(int i=0;i<len;i++) {\n arr[i] = Integer.parseInt(s[i]);\n\n }\n\n test.solve(n, arr);\n //int tot = Integer.parseInt(br.readLine());\n\n\n// int i =1;\n// System.out.println();\n// while(tot>0){\n//\n// String s = br.readLine();\n// String[] sr = s.split(\" \");\n// List<Long> ls = new ArrayList<>();\n// for(String ss:sr){\n// ls.add(Long.parseLong(ss));\n// }\n// Main tt = new Main();\n// tt.sol(ls);\n// // String Buffer to store answer\n// StringBuffer sb = new StringBuffer();\n//// Solution obj = new Solution();\n////\n//// System.out.println(\"Case #\"+i+\": \"+obj.sol());\n// tot--;\n// i++;\n// }\n }\n\n}", "Main" ]
import java.util.*; import java.io.*; import java.math.BigDecimal; import java.nio.file.Files; import java.nio.charset.StandardCharsets; //给出两个数a,b 求出[a,b]中各位数字之和能整除原数的数的个数。 public class Main { int mod ; void solve(int v, int[] arr) { Set<Integer> set = new HashSet<>(); int n = arr.length; for(int i=0;i<n;i++){ set.add(arr[i]); } int add = 0; while(true){ if(!set.contains(v-add)){ System.out.println((v-add)); return; }else if(!set.contains(v+add)){ System.out.println((v+add)); return; } add++; } } public static void main(String[] args) throws IOException { // Use the Scanner class BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] s = br.readLine().split(" "); Main test = new Main(); int n = Integer.parseInt(s[0]); int len = Integer.parseInt(s[1]); int[] arr = new int[len]; s = br.readLine().split(" "); for(int i=0;i<len;i++) { arr[i] = Integer.parseInt(s[i]); } test.solve(n, arr); //int tot = Integer.parseInt(br.readLine()); // int i =1; // System.out.println(); // while(tot>0){ // // String s = br.readLine(); // String[] sr = s.split(" "); // List<Long> ls = new ArrayList<>(); // for(String ss:sr){ // ls.add(Long.parseLong(ss)); // } // Main tt = new Main(); // tt.sol(ls); // // String Buffer to store answer // StringBuffer sb = new StringBuffer(); //// Solution obj = new Solution(); //// //// System.out.println("Case #"+i+": "+obj.sol()); // tot--; // i++; // } } }
[ 7, 6, 12, 13, 30, 14, 2, 18, 13, 17, 18, 13, 17, 29, 40, 17, 29, 17, 23, 13, 23, 13, 6, 12, 13, 30, 29, 2, 18, 13, 17, 18, 13, 17, 23, 13, 23, 13, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 17, 41, 13, 17, 41, 13, 17, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 4, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 40, 4, 18, 13, 2, 13, 13, 30, 4, 18, 13, 2, 13, 13, 4, 18, 13, 29, 14, 40, 4, 18, 13, 2, 13, 13, 30, 4, 18, 13, 2, 13, 13, 4, 18, 13, 29, 4, 18, 13, 23, 13, 12, 13, 30, 29, 2, 4, 18, 13, 2, 18, 13, 17, 18, 13, 17, 4, 18, 13, 2, 18, 13, 17, 18, 13, 17, 23, 13, 23, 13, 12, 13, 30, 14, 2, 13, 13, 29, 4, 13, 13, 13, 14, 2, 13, 17, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 29, 17, 41, 13, 17, 0, 13, 13, 42, 2, 13, 17, 30, 14, 2, 2, 13, 17, 17, 0, 13, 2, 2, 13, 13, 13, 0, 13, 17, 0, 13, 2, 2, 13, 13, 13, 29, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 18, 13, 13, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 18, 13, 13, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 18, 13, 13, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 4, 18, 13, 13, 20, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 18, 13, 13, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 4, 18, 13, 13, 20, 29, 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 ], [ 2, 3 ], [ 2, 4 ], [ 4, 5 ], [ 5, 6 ], [ 6, 7 ], [ 7, 8 ], [ 7, 9 ], [ 6, 10 ], [ 10, 11 ], [ 10, 12 ], [ 5, 13 ], [ 13, 14 ], [ 14, 15 ], [ 5, 16 ], [ 16, 17 ], [ 2, 18 ], [ 18, 19 ], [ 2, 20 ], [ 20, 21 ], [ 0, 22 ], [ 22, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 27, 31 ], [ 31, 32 ], [ 31, 33 ], [ 23, 34 ], [ 34, 35 ], [ 23, 36 ], [ 36, 37 ], [ 0, 38 ], [ 38, 39 ], [ 38, 40 ], [ 0, 41 ], [ 41, 42 ], [ 41, 43 ], [ 0, 44 ], [ 44, 45 ], [ 44, 46 ], [ 0, 47 ], [ 47, 48 ], [ 47, 49 ], [ 0, 50 ], [ 565, 51 ], [ 565, 52 ], [ 52, 53 ], [ 52, 54 ], [ 565, 55 ], [ 55, 56 ], [ 55, 57 ], [ 565, 58 ], [ 58, 59 ], [ 58, 60 ], [ 565, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 63, 67 ], [ 67, 68 ], [ 67, 69 ], [ 63, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 73, 74 ], [ 63, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 78, 79 ], [ 63, 80 ], [ 80, 81 ], [ 80, 82 ], [ 63, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 83, 88 ], [ 88, 89 ], [ 88, 90 ], [ 83, 91 ], [ 91, 92 ], [ 92, 93 ], [ 83, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 95, 98 ], [ 98, 99 ], [ 99, 100 ], [ 63, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 101, 106 ], [ 106, 107 ], [ 106, 108 ], [ 101, 109 ], [ 109, 110 ], [ 110, 111 ], [ 101, 112 ], [ 113, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 117, 118 ], [ 116, 119 ], [ 119, 120 ], [ 119, 121 ], [ 114, 122 ], [ 122, 123 ], [ 123, 124 ], [ 124, 125 ], [ 123, 126 ], [ 126, 127 ], [ 126, 128 ], [ 122, 129 ], [ 129, 130 ], [ 130, 131 ], [ 122, 132 ], [ 113, 133 ], [ 133, 134 ], [ 134, 135 ], [ 135, 136 ], [ 136, 137 ], [ 135, 138 ], [ 138, 139 ], [ 138, 140 ], [ 133, 141 ], [ 141, 142 ], [ 142, 143 ], [ 143, 144 ], [ 142, 145 ], [ 145, 146 ], [ 145, 147 ], [ 141, 148 ], [ 148, 149 ], [ 149, 150 ], [ 141, 151 ], [ 63, 152 ], [ 152, 153 ], [ 153, 154 ], [ 61, 155 ], [ 155, 156 ], [ 565, 157 ], [ 157, 158 ], [ 157, 159 ], [ 159, 160 ], [ 160, 161 ], [ 161, 162 ], [ 162, 163 ], [ 163, 164 ], [ 162, 165 ], [ 165, 166 ], [ 166, 167 ], [ 166, 168 ], [ 165, 169 ], [ 169, 170 ], [ 169, 171 ], [ 161, 172 ], [ 172, 173 ], [ 173, 174 ], [ 172, 175 ], [ 175, 176 ], [ 176, 177 ], [ 176, 178 ], [ 175, 179 ], [ 179, 180 ], [ 179, 181 ], [ 157, 182 ], [ 182, 183 ], [ 157, 184 ], [ 184, 185 ], [ 565, 186 ], [ 186, 187 ], [ 186, 188 ], [ 188, 189 ], [ 189, 190 ], [ 190, 191 ], [ 190, 192 ], [ 189, 193 ], [ 193, 194 ], [ 194, 195 ], [ 194, 196 ], [ 194, 197 ], [ 188, 198 ], [ 198, 199 ], [ 199, 200 ], [ 199, 201 ], [ 198, 202 ], [ 202, 203 ], [ 198, 204 ], [ 204, 205 ], [ 205, 206 ], [ 205, 207 ], [ 205, 208 ], [ 208, 209 ], [ 208, 210 ], [ 186, 211 ], [ 211, 212 ], [ 186, 213 ], [ 213, 214 ], [ 565, 215 ], [ 215, 216 ], [ 215, 217 ], [ 217, 218 ], [ 218, 219 ], [ 219, 220 ], [ 219, 221 ], [ 218, 222 ], [ 222, 223 ], [ 217, 224 ], [ 224, 225 ], [ 224, 226 ], [ 217, 227 ], [ 227, 228 ], [ 227, 229 ], [ 217, 230 ], [ 230, 231 ], [ 231, 232 ], [ 231, 233 ], [ 230, 234 ], [ 234, 235 ], [ 235, 236 ], [ 236, 237 ], [ 237, 238 ], [ 237, 239 ], [ 236, 240 ], [ 235, 241 ], [ 241, 242 ], [ 241, 243 ], [ 243, 244 ], [ 244, 245 ], [ 244, 246 ], [ 243, 247 ], [ 234, 248 ], [ 248, 249 ], [ 248, 250 ], [ 234, 251 ], [ 251, 252 ], [ 251, 253 ], [ 253, 254 ], [ 254, 255 ], [ 254, 256 ], [ 253, 257 ], [ 217, 258 ], [ 258, 259 ], [ 215, 260 ], [ 260, 261 ], [ 215, 262 ], [ 262, 263 ], [ 215, 264 ], [ 264, 265 ], [ 565, 266 ], [ 266, 267 ], [ 266, 268 ], [ 268, 269 ], [ 269, 270 ], [ 269, 271 ], [ 268, 272 ], [ 272, 273 ], [ 273, 274 ], [ 274, 275 ], [ 274, 276 ], [ 272, 277 ], [ 277, 278 ], [ 277, 279 ], [ 279, 280 ], [ 279, 281 ], [ 272, 282 ], [ 282, 283 ], [ 283, 284 ], [ 272, 285 ], [ 286, 286 ], [ 286, 287 ], [ 287, 288 ], [ 287, 289 ], [ 289, 290 ], [ 290, 291 ], [ 289, 292 ], [ 292, 293 ], [ 292, 294 ], [ 286, 295 ], [ 295, 296 ], [ 295, 297 ], [ 297, 298 ], [ 297, 299 ], [ 286, 300 ], [ 300, 301 ], [ 301, 302 ], [ 301, 303 ], [ 300, 304 ], [ 304, 305 ], [ 304, 306 ], [ 286, 307 ], [ 307, 308 ], [ 308, 309 ], [ 308, 310 ], [ 307, 311 ], [ 268, 312 ], [ 312, 313 ], [ 266, 314 ], [ 314, 315 ], [ 565, 316 ], [ 316, 317 ], [ 316, 318 ], [ 318, 319 ], [ 319, 320 ], [ 319, 321 ], [ 318, 322 ], [ 322, 323 ], [ 323, 324 ], [ 324, 325 ], [ 324, 326 ], [ 322, 327 ], [ 327, 328 ], [ 327, 329 ], [ 329, 330 ], [ 329, 331 ], [ 322, 332 ], [ 332, 333 ], [ 333, 334 ], [ 322, 335 ], [ 336, 336 ], [ 336, 337 ], [ 337, 338 ], [ 337, 339 ], [ 339, 340 ], [ 340, 341 ], [ 339, 342 ], [ 342, 343 ], [ 342, 344 ], [ 336, 345 ], [ 345, 346 ], [ 345, 347 ], [ 347, 348 ], [ 347, 349 ], [ 336, 350 ], [ 350, 351 ], [ 351, 352 ], [ 351, 353 ], [ 350, 354 ], [ 354, 355 ], [ 354, 356 ], [ 336, 357 ], [ 357, 358 ], [ 358, 359 ], [ 358, 360 ], [ 357, 361 ], [ 318, 362 ], [ 362, 363 ], [ 316, 364 ], [ 364, 365 ], [ 565, 366 ], [ 366, 367 ], [ 366, 368 ], [ 368, 369 ], [ 369, 370 ], [ 369, 371 ], [ 368, 372 ], [ 372, 373 ], [ 373, 374 ], [ 374, 375 ], [ 374, 376 ], [ 372, 377 ], [ 377, 378 ], [ 377, 379 ], [ 379, 380 ], [ 379, 381 ], [ 372, 382 ], [ 382, 383 ], [ 383, 384 ], [ 372, 385 ], [ 386, 386 ], [ 386, 387 ], [ 387, 388 ], [ 387, 389 ], [ 389, 390 ], [ 390, 391 ], [ 389, 392 ], [ 392, 393 ], [ 392, 394 ], [ 386, 395 ], [ 395, 396 ], [ 395, 397 ], [ 397, 398 ], [ 397, 399 ], [ 386, 400 ], [ 400, 401 ], [ 401, 402 ], [ 401, 403 ], [ 400, 404 ], [ 404, 405 ], [ 404, 406 ], [ 386, 407 ], [ 407, 408 ], [ 408, 409 ], [ 408, 410 ], [ 407, 411 ], [ 368, 412 ], [ 412, 413 ], [ 413, 414 ], [ 412, 415 ], [ 412, 416 ], [ 368, 417 ], [ 417, 418 ], [ 366, 419 ], [ 419, 420 ], [ 565, 421 ], [ 421, 422 ], [ 421, 423 ], [ 423, 424 ], [ 424, 425 ], [ 424, 426 ], [ 423, 427 ], [ 427, 428 ], [ 428, 429 ], [ 429, 430 ], [ 429, 431 ], [ 427, 432 ], [ 432, 433 ], [ 432, 434 ], [ 434, 435 ], [ 434, 436 ], [ 427, 437 ], [ 437, 438 ], [ 438, 439 ], [ 427, 440 ], [ 441, 441 ], [ 441, 442 ], [ 442, 443 ], [ 442, 444 ], [ 444, 445 ], [ 445, 446 ], [ 444, 447 ], [ 447, 448 ], [ 447, 449 ], [ 441, 450 ], [ 450, 451 ], [ 450, 452 ], [ 452, 453 ], [ 452, 454 ], [ 441, 455 ], [ 455, 456 ], [ 456, 457 ], [ 456, 458 ], [ 455, 459 ], [ 459, 460 ], [ 459, 461 ], [ 441, 462 ], [ 462, 463 ], [ 463, 464 ], [ 463, 465 ], [ 462, 466 ], [ 423, 467 ], [ 467, 468 ], [ 468, 469 ], [ 467, 470 ], [ 467, 471 ], [ 423, 472 ], [ 472, 473 ], [ 421, 474 ], [ 474, 475 ], [ 565, 476 ], [ 476, 477 ], [ 476, 478 ], [ 478, 479 ], [ 476, 480 ], [ 480, 481 ], [ 476, 482 ], [ 482, 483 ], [ 482, 484 ], [ 484, 485 ], [ 485, 486 ], [ 485, 487 ], [ 476, 488 ], [ 488, 489 ], [ 488, 490 ], [ 490, 491 ], [ 491, 492 ], [ 492, 493 ], [ 493, 494 ], [ 493, 495 ], [ 492, 496 ], [ 496, 497 ], [ 497, 498 ], [ 498, 499 ], [ 491, 500 ], [ 500, 501 ], [ 501, 502 ], [ 502, 503 ], [ 502, 504 ], [ 504, 505 ], [ 505, 506 ], [ 506, 507 ], [ 501, 508 ], [ 508, 509 ], [ 509, 510 ], [ 509, 511 ], [ 490, 512 ], [ 512, 513 ], [ 513, 514 ], [ 514, 515 ], [ 476, 516 ], [ 516, 517 ], [ 516, 518 ], [ 518, 519 ], [ 519, 520 ], [ 520, 521 ], [ 521, 522 ], [ 520, 523 ], [ 523, 524 ], [ 476, 525 ], [ 525, 526 ], [ 525, 527 ], [ 527, 528 ], [ 528, 529 ], [ 529, 530 ], [ 530, 531 ], [ 529, 532 ], [ 532, 533 ], [ 476, 534 ], [ 534, 535 ], [ 534, 536 ], [ 536, 537 ], [ 537, 538 ], [ 538, 539 ], [ 539, 540 ], [ 538, 541 ], [ 541, 542 ], [ 476, 543 ], [ 543, 544 ], [ 543, 545 ], [ 545, 546 ], [ 546, 547 ], [ 546, 548 ], [ 545, 549 ], [ 549, 550 ], [ 550, 551 ], [ 550, 552 ], [ 552, 553 ], [ 553, 554 ], [ 554, 555 ], [ 549, 556 ], [ 556, 557 ], [ 557, 558 ], [ 557, 559 ], [ 559, 560 ], [ 560, 561 ], [ 545, 562 ], [ 562, 563 ], [ 0, 564 ], [ 564, 565 ], [ 564, 566 ] ]
[ "import java.io.*;\nimport java.util.*;\nimport java.math.*;\nimport java.awt.Point;\n \npublic class Main {\n\tstatic final long MOD = 998244353L;\n\t//static final long INF = 1000000000000000007L;\n\tstatic String letters = \"abcdefghijklmnopqrstuvwxyz\";\n\t//static final long MOD = 1000000007L;\n\tstatic final int INF = 1000000007;\n\t\n\tpublic static void main(String[] args) {\n\t\tFastScanner sc = new FastScanner();\n\t\tPrintWriter pw = new PrintWriter(System.out);\n\t\t\n\t\tint X = sc.ni();\n\t\tint N = sc.ni();\n\t\tHashSet<Integer> hs = new HashSet<Integer>();\n\t\tfor (int i = 0; i < N; i++)\n\t\t\ths.add(sc.ni());\n\t\tfor (int s = 0; s <= 100; s++) {\n\t\t\tif (!hs.contains(X-s)) {\n\t\t\t\tpw.println(X-s);\n\t\t\t\tpw.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!hs.contains(X+s)) {\n\t\t\t\tpw.println(X+s);\n\t\t\t\tpw.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tpw.close();\n\t}\n\t\n\tpublic static long dist(long[] p1, long[] p2) {\n\t\treturn (Math.abs(p2[0]-p1[0])+Math.abs(p2[1]-p1[1]));\n\t}\n\t\n\t//Find the GCD of two numbers\n\tpublic static long gcd(long a, long b) {\n\t\tif (a < b) return gcd(b,a);\n\t\tif (b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn gcd(b,a%b);\n\t}\n\t\n\t//Fast exponentiation (x^y mod m)\n\tpublic static long power(long x, long y, long m) { \n\t\tif (y < 0) return 0L;\n\t\tlong ans = 1;\n\t\tx %= m;\n\t\twhile (y > 0) { \n\t\t\tif(y % 2 == 1) \n\t\t\t\tans = (ans * x) % m; \n\t\t\ty /= 2; \n\t\t\tx = (x * x) % m;\n\t\t} \n\t\treturn ans; \n\t}\n\t\n\tpublic static int[] shuffle(int[] array) {\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\treturn array;\n\t}\n\t\n\tpublic static long[] shuffle(long[] array) {\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\treturn array;\n\t}\n\t\n public static int[][] sort(int[][] array) {\n \t//Sort an array (immune to quicksort TLE)\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\tArrays.sort(array, new Comparator<int[]>() {\n\t\t\t @Override\n \t public int compare(int[] a, int[] b) {\n\t\t\t\t return a[0]-b[0]; //ascending order\n\t }\n\t\t});\n\t\treturn array;\n\t}\n \n public static long[][] sort(long[][] array) {\n \t//Sort an array (immune to quicksort TLE)\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\tArrays.sort(array, new Comparator<long[]>() {\n\t\t\t @Override\n \t public int compare(long[] a, long[] b) {\n\t\t\t\t if (a[0] < b[0])\n\t\t\t\t\t return -1;\n\t\t\t\t else\n\t\t\t\t\t return 1;\n\t }\n\t\t});\n\t\treturn array;\n\t}\n \n static class FastScanner { \n BufferedReader br; \n StringTokenizer st; \n \n public FastScanner() { \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 ni() { \n return Integer.parseInt(next()); \n }\n \n long nl() { \n return Long.parseLong(next()); \n } \n \n double nd() { \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}", "Comparator<long[]>() {\n\t\t\t @Override\n \t public int compare(long[] a, long[] b) {\n\t\t\t\t if (a[0] < b[0])\n\t\t\t\t\t return -1;\n\t\t\t\t else\n\t\t\t\t\t return 1;\n\t }\n\t\t}", "@Override\n \t public int compare(long[] a, long[] b) {\n\t\t\t\t if (a[0] < b[0])\n\t\t\t\t\t return -1;\n\t\t\t\t else\n\t\t\t\t\t return 1;\n\t }", "compare", "{\n\t\t\t\t if (a[0] < b[0])\n\t\t\t\t\t return -1;\n\t\t\t\t else\n\t\t\t\t\t return 1;\n\t }", "if (a[0] < b[0])\n\t\t\t\t\t return -1;\n\t\t\t\t else\n\t\t\t\t\t return 1;", "a[0] < b[0]", "a[0]", "a", "0", "b[0]", "b", "0", "return -1;", "-1", "1", "return 1;", "1", "long[] a", "a", "long[] b", "b", "Comparator<int[]>() {\n\t\t\t @Override\n \t public int compare(int[] a, int[] b) {\n\t\t\t\t return a[0]-b[0]; //ascending order\n\t }\n\t\t}", "@Override\n \t public int compare(int[] a, int[] b) {\n\t\t\t\t return a[0]-b[0]; //ascending order\n\t }", "compare", "{\n\t\t\t\t return a[0]-b[0]; //ascending order\n\t }", "return a[0]-b[0]; //ascending order", "a[0]-b[0]", "a[0]", "a", "0", "b[0]", "b", "0", "int[] a", "a", "int[] b", "b", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "import java.math.*;", "math.*", "java", "import java.awt.Point;", "Point", "java.awt", "public class Main {\n\tstatic final long MOD = 998244353L;\n\t//static final long INF = 1000000000000000007L;\n\tstatic String letters = \"abcdefghijklmnopqrstuvwxyz\";\n\t//static final long MOD = 1000000007L;\n\tstatic final int INF = 1000000007;\n\t\n\tpublic static void main(String[] args) {\n\t\tFastScanner sc = new FastScanner();\n\t\tPrintWriter pw = new PrintWriter(System.out);\n\t\t\n\t\tint X = sc.ni();\n\t\tint N = sc.ni();\n\t\tHashSet<Integer> hs = new HashSet<Integer>();\n\t\tfor (int i = 0; i < N; i++)\n\t\t\ths.add(sc.ni());\n\t\tfor (int s = 0; s <= 100; s++) {\n\t\t\tif (!hs.contains(X-s)) {\n\t\t\t\tpw.println(X-s);\n\t\t\t\tpw.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!hs.contains(X+s)) {\n\t\t\t\tpw.println(X+s);\n\t\t\t\tpw.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tpw.close();\n\t}\n\t\n\tpublic static long dist(long[] p1, long[] p2) {\n\t\treturn (Math.abs(p2[0]-p1[0])+Math.abs(p2[1]-p1[1]));\n\t}\n\t\n\t//Find the GCD of two numbers\n\tpublic static long gcd(long a, long b) {\n\t\tif (a < b) return gcd(b,a);\n\t\tif (b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn gcd(b,a%b);\n\t}\n\t\n\t//Fast exponentiation (x^y mod m)\n\tpublic static long power(long x, long y, long m) { \n\t\tif (y < 0) return 0L;\n\t\tlong ans = 1;\n\t\tx %= m;\n\t\twhile (y > 0) { \n\t\t\tif(y % 2 == 1) \n\t\t\t\tans = (ans * x) % m; \n\t\t\ty /= 2; \n\t\t\tx = (x * x) % m;\n\t\t} \n\t\treturn ans; \n\t}\n\t\n\tpublic static int[] shuffle(int[] array) {\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\treturn array;\n\t}\n\t\n\tpublic static long[] shuffle(long[] array) {\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\treturn array;\n\t}\n\t\n public static int[][] sort(int[][] array) {\n \t//Sort an array (immune to quicksort TLE)\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\tArrays.sort(array, new Comparator<int[]>() {\n\t\t\t @Override\n \t public int compare(int[] a, int[] b) {\n\t\t\t\t return a[0]-b[0]; //ascending order\n\t }\n\t\t});\n\t\treturn array;\n\t}\n \n public static long[][] sort(long[][] array) {\n \t//Sort an array (immune to quicksort TLE)\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\tArrays.sort(array, new Comparator<long[]>() {\n\t\t\t @Override\n \t public int compare(long[] a, long[] b) {\n\t\t\t\t if (a[0] < b[0])\n\t\t\t\t\t return -1;\n\t\t\t\t else\n\t\t\t\t\t return 1;\n\t }\n\t\t});\n\t\treturn array;\n\t}\n \n static class FastScanner { \n BufferedReader br; \n StringTokenizer st; \n \n public FastScanner() { \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 ni() { \n return Integer.parseInt(next()); \n }\n \n long nl() { \n return Long.parseLong(next()); \n } \n \n double nd() { \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}", "Main", "static final long MOD = 998244353L;", "MOD", "998244353L", "//static final long INF = 1000000000000000007L;\n\tstatic String letters = \"abcdefghijklmnopqrstuvwxyz\";", "letters", "\"abcdefghijklmnopqrstuvwxyz\"", "//static final long MOD = 1000000007L;\n\tstatic final int INF = 1000000007;", "INF", "1000000007", "public static void main(String[] args) {\n\t\tFastScanner sc = new FastScanner();\n\t\tPrintWriter pw = new PrintWriter(System.out);\n\t\t\n\t\tint X = sc.ni();\n\t\tint N = sc.ni();\n\t\tHashSet<Integer> hs = new HashSet<Integer>();\n\t\tfor (int i = 0; i < N; i++)\n\t\t\ths.add(sc.ni());\n\t\tfor (int s = 0; s <= 100; s++) {\n\t\t\tif (!hs.contains(X-s)) {\n\t\t\t\tpw.println(X-s);\n\t\t\t\tpw.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!hs.contains(X+s)) {\n\t\t\t\tpw.println(X+s);\n\t\t\t\tpw.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tpw.close();\n\t}", "main", "{\n\t\tFastScanner sc = new FastScanner();\n\t\tPrintWriter pw = new PrintWriter(System.out);\n\t\t\n\t\tint X = sc.ni();\n\t\tint N = sc.ni();\n\t\tHashSet<Integer> hs = new HashSet<Integer>();\n\t\tfor (int i = 0; i < N; i++)\n\t\t\ths.add(sc.ni());\n\t\tfor (int s = 0; s <= 100; s++) {\n\t\t\tif (!hs.contains(X-s)) {\n\t\t\t\tpw.println(X-s);\n\t\t\t\tpw.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!hs.contains(X+s)) {\n\t\t\t\tpw.println(X+s);\n\t\t\t\tpw.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tpw.close();\n\t}", "FastScanner sc = new FastScanner();", "sc", "new FastScanner()", "PrintWriter pw = new PrintWriter(System.out);", "pw", "new PrintWriter(System.out)", "int X = sc.ni();", "X", "sc.ni()", "sc.ni", "sc", "int N = sc.ni();", "N", "sc.ni()", "sc.ni", "sc", "HashSet<Integer> hs = new HashSet<Integer>();", "hs", "new HashSet<Integer>()", "for (int i = 0; i < N; i++)\n\t\t\ths.add(sc.ni());", "int i = 0;", "int i = 0;", "i", "0", "i < N", "i", "N", "i++", "i++", "i", "hs.add(sc.ni());", "hs.add(sc.ni())", "hs.add", "hs", "sc.ni()", "sc.ni", "sc", "for (int s = 0; s <= 100; s++) {\n\t\t\tif (!hs.contains(X-s)) {\n\t\t\t\tpw.println(X-s);\n\t\t\t\tpw.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!hs.contains(X+s)) {\n\t\t\t\tpw.println(X+s);\n\t\t\t\tpw.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}", "int s = 0;", "int s = 0;", "s", "0", "s <= 100", "s", "100", "s++", "s++", "s", "{\n\t\t\tif (!hs.contains(X-s)) {\n\t\t\t\tpw.println(X-s);\n\t\t\t\tpw.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!hs.contains(X+s)) {\n\t\t\t\tpw.println(X+s);\n\t\t\t\tpw.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}", "{\n\t\t\tif (!hs.contains(X-s)) {\n\t\t\t\tpw.println(X-s);\n\t\t\t\tpw.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!hs.contains(X+s)) {\n\t\t\t\tpw.println(X+s);\n\t\t\t\tpw.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}", "if (!hs.contains(X-s)) {\n\t\t\t\tpw.println(X-s);\n\t\t\t\tpw.close();\n\t\t\t\treturn;\n\t\t\t}", "!hs.contains(X-s)", "hs.contains(X-s)", "hs.contains", "hs", "X-s", "X", "s", "{\n\t\t\t\tpw.println(X-s);\n\t\t\t\tpw.close();\n\t\t\t\treturn;\n\t\t\t}", "pw.println(X-s)", "pw.println", "pw", "X-s", "X", "s", "pw.close()", "pw.close", "pw", "return;", "if (!hs.contains(X+s)) {\n\t\t\t\tpw.println(X+s);\n\t\t\t\tpw.close();\n\t\t\t\treturn;\n\t\t\t}", "!hs.contains(X+s)", "hs.contains(X+s)", "hs.contains", "hs", "X+s", "X", "s", "{\n\t\t\t\tpw.println(X+s);\n\t\t\t\tpw.close();\n\t\t\t\treturn;\n\t\t\t}", "pw.println(X+s)", "pw.println", "pw", "X+s", "X", "s", "pw.close()", "pw.close", "pw", "return;", "pw.close()", "pw.close", "pw", "String[] args", "args", "public static long dist(long[] p1, long[] p2) {\n\t\treturn (Math.abs(p2[0]-p1[0])+Math.abs(p2[1]-p1[1]));\n\t}", "dist", "{\n\t\treturn (Math.abs(p2[0]-p1[0])+Math.abs(p2[1]-p1[1]));\n\t}", "return (Math.abs(p2[0]-p1[0])+Math.abs(p2[1]-p1[1]));", "(Math.abs(p2[0]-p1[0])+Math.abs(p2[1]-p1[1]))", "Math.abs(p2[0]-p1[0])", "Math.abs", "Math", "p2[0]-p1[0]", "p2[0]", "p2", "0", "p1[0]", "p1", "0", "Math.abs(p2[1]-p1[1])", "Math.abs", "Math", "p2[1]-p1[1]", "p2[1]", "p2", "1", "p1[1]", "p1", "1", "long[] p1", "p1", "long[] p2", "p2", "//Find the GCD of two numbers\n\tpublic static long gcd(long a, long b) {\n\t\tif (a < b) return gcd(b,a);\n\t\tif (b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn gcd(b,a%b);\n\t}", "gcd", "{\n\t\tif (a < b) return gcd(b,a);\n\t\tif (b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn gcd(b,a%b);\n\t}", "if (a < b) return gcd(b,a);", "a < b", "a", "b", "return gcd(b,a);", "gcd(b,a)", "gcd", "b", "a", "if (b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn gcd(b,a%b);", "b == 0", "b", "0", "return a;", "a", "return gcd(b,a%b);", "gcd(b,a%b)", "gcd", "b", "a%b", "a", "b", "long a", "a", "long b", "b", "//Fast exponentiation (x^y mod m)\n\tpublic static long power(long x, long y, long m) { \n\t\tif (y < 0) return 0L;\n\t\tlong ans = 1;\n\t\tx %= m;\n\t\twhile (y > 0) { \n\t\t\tif(y % 2 == 1) \n\t\t\t\tans = (ans * x) % m; \n\t\t\ty /= 2; \n\t\t\tx = (x * x) % m;\n\t\t} \n\t\treturn ans; \n\t}", "power", "{ \n\t\tif (y < 0) return 0L;\n\t\tlong ans = 1;\n\t\tx %= m;\n\t\twhile (y > 0) { \n\t\t\tif(y % 2 == 1) \n\t\t\t\tans = (ans * x) % m; \n\t\t\ty /= 2; \n\t\t\tx = (x * x) % m;\n\t\t} \n\t\treturn ans; \n\t}", "if (y < 0) return 0L;", "y < 0", "y", "0", "return 0L;", "0L", "long ans = 1;", "ans", "1", "x %= m", "x", "m", "while (y > 0) { \n\t\t\tif(y % 2 == 1) \n\t\t\t\tans = (ans * x) % m; \n\t\t\ty /= 2; \n\t\t\tx = (x * x) % m;\n\t\t}", "y > 0", "y", "0", "{ \n\t\t\tif(y % 2 == 1) \n\t\t\t\tans = (ans * x) % m; \n\t\t\ty /= 2; \n\t\t\tx = (x * x) % m;\n\t\t}", "if(y % 2 == 1) \n\t\t\t\tans = (ans * x) % m;", "y % 2 == 1", "y % 2", "y", "2", "1", "ans = (ans * x) % m", "ans", "(ans * x) % m", "(ans * x)", "ans", "x", "m", "y /= 2", "y", "2", "x = (x * x) % m", "x", "(x * x) % m", "(x * x)", "x", "x", "m", "return ans;", "ans", "long x", "x", "long y", "y", "long m", "m", "public static int[] shuffle(int[] array) {\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\treturn array;\n\t}", "shuffle", "{\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\treturn array;\n\t}", "Random rgen = new Random();", "rgen", "new Random()", "for (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < array.length", "i", "array.length", "array", "array.length", "i++", "i++", "i", "{\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}", "{\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}", "int randomPosition = rgen.nextInt(array.length);", "randomPosition", "rgen.nextInt(array.length)", "rgen.nextInt", "rgen", "array.length", "array", "array.length", "int temp = array[i];", "temp", "array[i]", "array", "i", "array[i] = array[randomPosition]", "array[i]", "array", "i", "array[randomPosition]", "array", "randomPosition", "array[randomPosition] = temp", "array[randomPosition]", "array", "randomPosition", "temp", "return array;", "array", "int[] array", "array", "public static long[] shuffle(long[] array) {\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\treturn array;\n\t}", "shuffle", "{\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\treturn array;\n\t}", "Random rgen = new Random();", "rgen", "new Random()", "for (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < array.length", "i", "array.length", "array", "array.length", "i++", "i++", "i", "{\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}", "{\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}", "int randomPosition = rgen.nextInt(array.length);", "randomPosition", "rgen.nextInt(array.length)", "rgen.nextInt", "rgen", "array.length", "array", "array.length", "long temp = array[i];", "temp", "array[i]", "array", "i", "array[i] = array[randomPosition]", "array[i]", "array", "i", "array[randomPosition]", "array", "randomPosition", "array[randomPosition] = temp", "array[randomPosition]", "array", "randomPosition", "temp", "return array;", "array", "long[] array", "array", "public static int[][] sort(int[][] array) {\n \t//Sort an array (immune to quicksort TLE)\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\tArrays.sort(array, new Comparator<int[]>() {\n\t\t\t @Override\n \t public int compare(int[] a, int[] b) {\n\t\t\t\t return a[0]-b[0]; //ascending order\n\t }\n\t\t});\n\t\treturn array;\n\t}", "sort", "{\n \t//Sort an array (immune to quicksort TLE)\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\tArrays.sort(array, new Comparator<int[]>() {\n\t\t\t @Override\n \t public int compare(int[] a, int[] b) {\n\t\t\t\t return a[0]-b[0]; //ascending order\n\t }\n\t\t});\n\t\treturn array;\n\t}", "Random rgen = new Random();", "rgen", "new Random()", "for (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < array.length", "i", "array.length", "array", "array.length", "i++", "i++", "i", "{\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}", "{\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}", "int randomPosition = rgen.nextInt(array.length);", "randomPosition", "rgen.nextInt(array.length)", "rgen.nextInt", "rgen", "array.length", "array", "array.length", "int[] temp = array[i];", "temp", "array[i]", "array", "i", "array[i] = array[randomPosition]", "array[i]", "array", "i", "array[randomPosition]", "array", "randomPosition", "array[randomPosition] = temp", "array[randomPosition]", "array", "randomPosition", "temp", "Arrays.sort(array, new Comparator<int[]>() {\n\t\t\t @Override\n \t public int compare(int[] a, int[] b) {\n\t\t\t\t return a[0]-b[0]; //ascending order\n\t }\n\t\t})", "Arrays.sort", "Arrays", "array", "new Comparator<int[]>() {\n\t\t\t @Override\n \t public int compare(int[] a, int[] b) {\n\t\t\t\t return a[0]-b[0]; //ascending order\n\t }\n\t\t}", "return array;", "array", "int[][] array", "array", "public static long[][] sort(long[][] array) {\n \t//Sort an array (immune to quicksort TLE)\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\tArrays.sort(array, new Comparator<long[]>() {\n\t\t\t @Override\n \t public int compare(long[] a, long[] b) {\n\t\t\t\t if (a[0] < b[0])\n\t\t\t\t\t return -1;\n\t\t\t\t else\n\t\t\t\t\t return 1;\n\t }\n\t\t});\n\t\treturn array;\n\t}", "sort", "{\n \t//Sort an array (immune to quicksort TLE)\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\tArrays.sort(array, new Comparator<long[]>() {\n\t\t\t @Override\n \t public int compare(long[] a, long[] b) {\n\t\t\t\t if (a[0] < b[0])\n\t\t\t\t\t return -1;\n\t\t\t\t else\n\t\t\t\t\t return 1;\n\t }\n\t\t});\n\t\treturn array;\n\t}", "Random rgen = new Random();", "rgen", "new Random()", "for (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < array.length", "i", "array.length", "array", "array.length", "i++", "i++", "i", "{\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}", "{\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}", "int randomPosition = rgen.nextInt(array.length);", "randomPosition", "rgen.nextInt(array.length)", "rgen.nextInt", "rgen", "array.length", "array", "array.length", "long[] temp = array[i];", "temp", "array[i]", "array", "i", "array[i] = array[randomPosition]", "array[i]", "array", "i", "array[randomPosition]", "array", "randomPosition", "array[randomPosition] = temp", "array[randomPosition]", "array", "randomPosition", "temp", "Arrays.sort(array, new Comparator<long[]>() {\n\t\t\t @Override\n \t public int compare(long[] a, long[] b) {\n\t\t\t\t if (a[0] < b[0])\n\t\t\t\t\t return -1;\n\t\t\t\t else\n\t\t\t\t\t return 1;\n\t }\n\t\t})", "Arrays.sort", "Arrays", "array", "new Comparator<long[]>() {\n\t\t\t @Override\n \t public int compare(long[] a, long[] b) {\n\t\t\t\t if (a[0] < b[0])\n\t\t\t\t\t return -1;\n\t\t\t\t else\n\t\t\t\t\t return 1;\n\t }\n\t\t}", "return array;", "array", "long[][] array", "array", "static class FastScanner { \n BufferedReader br; \n StringTokenizer st; \n \n public FastScanner() { \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 ni() { \n return Integer.parseInt(next()); \n }\n \n long nl() { \n return Long.parseLong(next()); \n } \n \n double nd() { \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 }", "FastScanner", "BufferedReader br;", "br", "StringTokenizer st;", "st", "public FastScanner() { \n br = new BufferedReader(new InputStreamReader(System.in)); \n }", "FastScanner", "{ \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 ni() { \n return Integer.parseInt(next()); \n }", "ni", "{ \n return Integer.parseInt(next()); \n }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "long nl() { \n return Long.parseLong(next()); \n }", "nl", "{ \n return Long.parseLong(next()); \n }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "double nd() { \n return Double.parseDouble(next()); \n }", "nd", "{ \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\tstatic final long MOD = 998244353L;\n\t//static final long INF = 1000000000000000007L;\n\tstatic String letters = \"abcdefghijklmnopqrstuvwxyz\";\n\t//static final long MOD = 1000000007L;\n\tstatic final int INF = 1000000007;\n\t\n\tpublic static void main(String[] args) {\n\t\tFastScanner sc = new FastScanner();\n\t\tPrintWriter pw = new PrintWriter(System.out);\n\t\t\n\t\tint X = sc.ni();\n\t\tint N = sc.ni();\n\t\tHashSet<Integer> hs = new HashSet<Integer>();\n\t\tfor (int i = 0; i < N; i++)\n\t\t\ths.add(sc.ni());\n\t\tfor (int s = 0; s <= 100; s++) {\n\t\t\tif (!hs.contains(X-s)) {\n\t\t\t\tpw.println(X-s);\n\t\t\t\tpw.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!hs.contains(X+s)) {\n\t\t\t\tpw.println(X+s);\n\t\t\t\tpw.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tpw.close();\n\t}\n\t\n\tpublic static long dist(long[] p1, long[] p2) {\n\t\treturn (Math.abs(p2[0]-p1[0])+Math.abs(p2[1]-p1[1]));\n\t}\n\t\n\t//Find the GCD of two numbers\n\tpublic static long gcd(long a, long b) {\n\t\tif (a < b) return gcd(b,a);\n\t\tif (b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn gcd(b,a%b);\n\t}\n\t\n\t//Fast exponentiation (x^y mod m)\n\tpublic static long power(long x, long y, long m) { \n\t\tif (y < 0) return 0L;\n\t\tlong ans = 1;\n\t\tx %= m;\n\t\twhile (y > 0) { \n\t\t\tif(y % 2 == 1) \n\t\t\t\tans = (ans * x) % m; \n\t\t\ty /= 2; \n\t\t\tx = (x * x) % m;\n\t\t} \n\t\treturn ans; \n\t}\n\t\n\tpublic static int[] shuffle(int[] array) {\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\treturn array;\n\t}\n\t\n\tpublic static long[] shuffle(long[] array) {\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\treturn array;\n\t}\n\t\n public static int[][] sort(int[][] array) {\n \t//Sort an array (immune to quicksort TLE)\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\tArrays.sort(array, new Comparator<int[]>() {\n\t\t\t @Override\n \t public int compare(int[] a, int[] b) {\n\t\t\t\t return a[0]-b[0]; //ascending order\n\t }\n\t\t});\n\t\treturn array;\n\t}\n \n public static long[][] sort(long[][] array) {\n \t//Sort an array (immune to quicksort TLE)\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\tArrays.sort(array, new Comparator<long[]>() {\n\t\t\t @Override\n \t public int compare(long[] a, long[] b) {\n\t\t\t\t if (a[0] < b[0])\n\t\t\t\t\t return -1;\n\t\t\t\t else\n\t\t\t\t\t return 1;\n\t }\n\t\t});\n\t\treturn array;\n\t}\n \n static class FastScanner { \n BufferedReader br; \n StringTokenizer st; \n \n public FastScanner() { \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 ni() { \n return Integer.parseInt(next()); \n }\n \n long nl() { \n return Long.parseLong(next()); \n } \n \n double nd() { \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}", "public class Main {\n\tstatic final long MOD = 998244353L;\n\t//static final long INF = 1000000000000000007L;\n\tstatic String letters = \"abcdefghijklmnopqrstuvwxyz\";\n\t//static final long MOD = 1000000007L;\n\tstatic final int INF = 1000000007;\n\t\n\tpublic static void main(String[] args) {\n\t\tFastScanner sc = new FastScanner();\n\t\tPrintWriter pw = new PrintWriter(System.out);\n\t\t\n\t\tint X = sc.ni();\n\t\tint N = sc.ni();\n\t\tHashSet<Integer> hs = new HashSet<Integer>();\n\t\tfor (int i = 0; i < N; i++)\n\t\t\ths.add(sc.ni());\n\t\tfor (int s = 0; s <= 100; s++) {\n\t\t\tif (!hs.contains(X-s)) {\n\t\t\t\tpw.println(X-s);\n\t\t\t\tpw.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!hs.contains(X+s)) {\n\t\t\t\tpw.println(X+s);\n\t\t\t\tpw.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tpw.close();\n\t}\n\t\n\tpublic static long dist(long[] p1, long[] p2) {\n\t\treturn (Math.abs(p2[0]-p1[0])+Math.abs(p2[1]-p1[1]));\n\t}\n\t\n\t//Find the GCD of two numbers\n\tpublic static long gcd(long a, long b) {\n\t\tif (a < b) return gcd(b,a);\n\t\tif (b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn gcd(b,a%b);\n\t}\n\t\n\t//Fast exponentiation (x^y mod m)\n\tpublic static long power(long x, long y, long m) { \n\t\tif (y < 0) return 0L;\n\t\tlong ans = 1;\n\t\tx %= m;\n\t\twhile (y > 0) { \n\t\t\tif(y % 2 == 1) \n\t\t\t\tans = (ans * x) % m; \n\t\t\ty /= 2; \n\t\t\tx = (x * x) % m;\n\t\t} \n\t\treturn ans; \n\t}\n\t\n\tpublic static int[] shuffle(int[] array) {\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\treturn array;\n\t}\n\t\n\tpublic static long[] shuffle(long[] array) {\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\treturn array;\n\t}\n\t\n public static int[][] sort(int[][] array) {\n \t//Sort an array (immune to quicksort TLE)\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\tArrays.sort(array, new Comparator<int[]>() {\n\t\t\t @Override\n \t public int compare(int[] a, int[] b) {\n\t\t\t\t return a[0]-b[0]; //ascending order\n\t }\n\t\t});\n\t\treturn array;\n\t}\n \n public static long[][] sort(long[][] array) {\n \t//Sort an array (immune to quicksort TLE)\n\t\tRandom rgen = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t long[] temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n\t\tArrays.sort(array, new Comparator<long[]>() {\n\t\t\t @Override\n \t public int compare(long[] a, long[] b) {\n\t\t\t\t if (a[0] < b[0])\n\t\t\t\t\t return -1;\n\t\t\t\t else\n\t\t\t\t\t return 1;\n\t }\n\t\t});\n\t\treturn array;\n\t}\n \n static class FastScanner { \n BufferedReader br; \n StringTokenizer st; \n \n public FastScanner() { \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 ni() { \n return Integer.parseInt(next()); \n }\n \n long nl() { \n return Long.parseLong(next()); \n } \n \n double nd() { \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}", "Main" ]
import java.io.*; import java.util.*; import java.math.*; import java.awt.Point; public class Main { static final long MOD = 998244353L; //static final long INF = 1000000000000000007L; static String letters = "abcdefghijklmnopqrstuvwxyz"; //static final long MOD = 1000000007L; static final int INF = 1000000007; public static void main(String[] args) { FastScanner sc = new FastScanner(); PrintWriter pw = new PrintWriter(System.out); int X = sc.ni(); int N = sc.ni(); HashSet<Integer> hs = new HashSet<Integer>(); for (int i = 0; i < N; i++) hs.add(sc.ni()); for (int s = 0; s <= 100; s++) { if (!hs.contains(X-s)) { pw.println(X-s); pw.close(); return; } if (!hs.contains(X+s)) { pw.println(X+s); pw.close(); return; } } pw.close(); } public static long dist(long[] p1, long[] p2) { return (Math.abs(p2[0]-p1[0])+Math.abs(p2[1]-p1[1])); } //Find the GCD of two numbers public static long gcd(long a, long b) { if (a < b) return gcd(b,a); if (b == 0) return a; else return gcd(b,a%b); } //Fast exponentiation (x^y mod m) public static long power(long x, long y, long m) { if (y < 0) return 0L; long ans = 1; x %= m; while (y > 0) { if(y % 2 == 1) ans = (ans * x) % m; y /= 2; x = (x * x) % m; } return ans; } public static int[] shuffle(int[] array) { Random rgen = new Random(); for (int i = 0; i < array.length; i++) { int randomPosition = rgen.nextInt(array.length); int temp = array[i]; array[i] = array[randomPosition]; array[randomPosition] = temp; } return array; } public static long[] shuffle(long[] array) { Random rgen = new Random(); for (int i = 0; i < array.length; i++) { int randomPosition = rgen.nextInt(array.length); long temp = array[i]; array[i] = array[randomPosition]; array[randomPosition] = temp; } return array; } public static int[][] sort(int[][] array) { //Sort an array (immune to quicksort TLE) Random rgen = new Random(); for (int i = 0; i < array.length; i++) { int randomPosition = rgen.nextInt(array.length); int[] temp = array[i]; array[i] = array[randomPosition]; array[randomPosition] = temp; } Arrays.sort(array, new Comparator<int[]>() { @Override public int compare(int[] a, int[] b) { return a[0]-b[0]; //ascending order } }); return array; } public static long[][] sort(long[][] array) { //Sort an array (immune to quicksort TLE) Random rgen = new Random(); for (int i = 0; i < array.length; i++) { int randomPosition = rgen.nextInt(array.length); long[] temp = array[i]; array[i] = array[randomPosition]; array[randomPosition] = temp; } Arrays.sort(array, new Comparator<long[]>() { @Override public int compare(long[] a, long[] b) { if (a[0] < b[0]) return -1; else return 1; } }); return array; } static class FastScanner { BufferedReader br; StringTokenizer st; public FastScanner() { 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 ni() { return Integer.parseInt(next()); } long nl() { return Long.parseLong(next()); } double nd() { return Double.parseDouble(next()); } String nextLine() { String str = ""; try { str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } return str; } } }
[ 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, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 4, 18, 13, 4, 18, 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, 41, 13, 4, 18, 13, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 14, 40, 4, 18, 13, 13, 30, 0, 13, 13, 0, 13, 17, 41, 13, 17, 42, 13, 30, 40, 13, 41, 13, 2, 13, 13, 41, 13, 2, 13, 13, 14, 40, 4, 18, 13, 13, 30, 0, 13, 13, 0, 13, 17, 14, 40, 4, 18, 13, 13, 30, 0, 13, 13, 0, 13, 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 ], [ 151, 11 ], [ 151, 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 ], [ 29, 30 ], [ 29, 31 ], [ 28, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 32, 39 ], [ 39, 40 ], [ 40, 41 ], [ 32, 42 ], [ 42, 43 ], [ 43, 44 ], [ 42, 45 ], [ 14, 46 ], [ 46, 47 ], [ 46, 48 ], [ 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 ], [ 64, 65 ], [ 64, 66 ], [ 63, 67 ], [ 67, 68 ], [ 68, 69 ], [ 14, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 73, 74 ], [ 72, 75 ], [ 14, 76 ], [ 76, 77 ], [ 77, 78 ], [ 14, 79 ], [ 79, 80 ], [ 79, 81 ], [ 14, 82 ], [ 82, 83 ], [ 82, 84 ], [ 14, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 87, 90 ], [ 85, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 91, 95 ], [ 95, 96 ], [ 95, 97 ], [ 14, 98 ], [ 98, 99 ], [ 98, 100 ], [ 14, 101 ], [ 101, 102 ], [ 101, 103 ], [ 103, 104 ], [ 104, 105 ], [ 103, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 108, 110 ], [ 103, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 113, 115 ], [ 103, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 118, 121 ], [ 116, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 122, 126 ], [ 126, 127 ], [ 126, 128 ], [ 116, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 131, 134 ], [ 129, 135 ], [ 135, 136 ], [ 136, 137 ], [ 136, 138 ], [ 135, 139 ], [ 139, 140 ], [ 139, 141 ], [ 14, 142 ], [ 142, 143 ], [ 143, 144 ], [ 144, 145 ], [ 144, 146 ], [ 142, 147 ], [ 12, 148 ], [ 148, 149 ], [ 0, 150 ], [ 150, 151 ], [ 150, 152 ] ]
[ "import java.util.Arrays;\nimport java.util.List;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\t//スキャナー\n\t\tScanner s = new Scanner(System.in);\n\n\n\t\tint numx = s.nextInt();\n\t\tint numn = s.nextInt();\n\n\t\tif(numn == 0) {\n\n\t\t\tSystem.out.println(numx);\n\n\t\t\ts.close();\n\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tInteger[] array = new Integer[numn];\n\n\t\tfor(int i = 0 ; i < numn ; i++) {\n\n\t\t\tarray[i] = s.nextInt();\n\n\t\t}\n\n\t\t//リストへ変換\n\t\tList<Integer> listNum = Arrays.asList(array);\n\n\t\t//スキャナーを閉じる\n\t\ts.close();\n\n\t\t//answer\n\t\tint ans = 0;\n\n\t\tboolean flg_con = true;\n\n\t\tif(! listNum.contains(numx)) {\n\t\t\t//同数が配列にいない場合\n\t\t\tans = numx;\n\t\t\t\n\t\t\tflg_con = false;\n\t\t}\n\n\t\tint count = 0;\n\n\t\twhile(flg_con) {\n\n\t\t\tcount++;\n\n\t\t\tint mnx = numx - count;\n\t\t\tint plx = numx + count;\n\n\t\t\tif(! listNum.contains(mnx)) {\n\n\t\t\t\tans = mnx;\n\n\t\t\t\tflg_con = false;\n\t\t\t}else if (! listNum.contains(plx)) {\n\n\t\t\t\tans = plx;\n\n\t\t\t\tflg_con=false;\n\t\t\t}\n\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t}\n\n}", "import java.util.Arrays;", "Arrays", "java.util", "import java.util.List;", "List", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\t//スキャナー\n\t\tScanner s = new Scanner(System.in);\n\n\n\t\tint numx = s.nextInt();\n\t\tint numn = s.nextInt();\n\n\t\tif(numn == 0) {\n\n\t\t\tSystem.out.println(numx);\n\n\t\t\ts.close();\n\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tInteger[] array = new Integer[numn];\n\n\t\tfor(int i = 0 ; i < numn ; i++) {\n\n\t\t\tarray[i] = s.nextInt();\n\n\t\t}\n\n\t\t//リストへ変換\n\t\tList<Integer> listNum = Arrays.asList(array);\n\n\t\t//スキャナーを閉じる\n\t\ts.close();\n\n\t\t//answer\n\t\tint ans = 0;\n\n\t\tboolean flg_con = true;\n\n\t\tif(! listNum.contains(numx)) {\n\t\t\t//同数が配列にいない場合\n\t\t\tans = numx;\n\t\t\t\n\t\t\tflg_con = false;\n\t\t}\n\n\t\tint count = 0;\n\n\t\twhile(flg_con) {\n\n\t\t\tcount++;\n\n\t\t\tint mnx = numx - count;\n\t\t\tint plx = numx + count;\n\n\t\t\tif(! listNum.contains(mnx)) {\n\n\t\t\t\tans = mnx;\n\n\t\t\t\tflg_con = false;\n\t\t\t}else if (! listNum.contains(plx)) {\n\n\t\t\t\tans = plx;\n\n\t\t\t\tflg_con=false;\n\t\t\t}\n\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\n\t\t//スキャナー\n\t\tScanner s = new Scanner(System.in);\n\n\n\t\tint numx = s.nextInt();\n\t\tint numn = s.nextInt();\n\n\t\tif(numn == 0) {\n\n\t\t\tSystem.out.println(numx);\n\n\t\t\ts.close();\n\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tInteger[] array = new Integer[numn];\n\n\t\tfor(int i = 0 ; i < numn ; i++) {\n\n\t\t\tarray[i] = s.nextInt();\n\n\t\t}\n\n\t\t//リストへ変換\n\t\tList<Integer> listNum = Arrays.asList(array);\n\n\t\t//スキャナーを閉じる\n\t\ts.close();\n\n\t\t//answer\n\t\tint ans = 0;\n\n\t\tboolean flg_con = true;\n\n\t\tif(! listNum.contains(numx)) {\n\t\t\t//同数が配列にいない場合\n\t\t\tans = numx;\n\t\t\t\n\t\t\tflg_con = false;\n\t\t}\n\n\t\tint count = 0;\n\n\t\twhile(flg_con) {\n\n\t\t\tcount++;\n\n\t\t\tint mnx = numx - count;\n\t\t\tint plx = numx + count;\n\n\t\t\tif(! listNum.contains(mnx)) {\n\n\t\t\t\tans = mnx;\n\n\t\t\t\tflg_con = false;\n\t\t\t}else if (! listNum.contains(plx)) {\n\n\t\t\t\tans = plx;\n\n\t\t\t\tflg_con=false;\n\t\t\t}\n\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t}", "main", "{\n\n\t\t//スキャナー\n\t\tScanner s = new Scanner(System.in);\n\n\n\t\tint numx = s.nextInt();\n\t\tint numn = s.nextInt();\n\n\t\tif(numn == 0) {\n\n\t\t\tSystem.out.println(numx);\n\n\t\t\ts.close();\n\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tInteger[] array = new Integer[numn];\n\n\t\tfor(int i = 0 ; i < numn ; i++) {\n\n\t\t\tarray[i] = s.nextInt();\n\n\t\t}\n\n\t\t//リストへ変換\n\t\tList<Integer> listNum = Arrays.asList(array);\n\n\t\t//スキャナーを閉じる\n\t\ts.close();\n\n\t\t//answer\n\t\tint ans = 0;\n\n\t\tboolean flg_con = true;\n\n\t\tif(! listNum.contains(numx)) {\n\t\t\t//同数が配列にいない場合\n\t\t\tans = numx;\n\t\t\t\n\t\t\tflg_con = false;\n\t\t}\n\n\t\tint count = 0;\n\n\t\twhile(flg_con) {\n\n\t\t\tcount++;\n\n\t\t\tint mnx = numx - count;\n\t\t\tint plx = numx + count;\n\n\t\t\tif(! listNum.contains(mnx)) {\n\n\t\t\t\tans = mnx;\n\n\t\t\t\tflg_con = false;\n\t\t\t}else if (! listNum.contains(plx)) {\n\n\t\t\t\tans = plx;\n\n\t\t\t\tflg_con=false;\n\t\t\t}\n\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t}", "Scanner s = new Scanner(System.in);", "s", "new Scanner(System.in)", "int numx = s.nextInt();", "numx", "s.nextInt()", "s.nextInt", "s", "int numn = s.nextInt();", "numn", "s.nextInt()", "s.nextInt", "s", "if(numn == 0) {\n\n\t\t\tSystem.out.println(numx);\n\n\t\t\ts.close();\n\n\t\t\tSystem.exit(0);\n\t\t}", "numn == 0", "numn", "0", "{\n\n\t\t\tSystem.out.println(numx);\n\n\t\t\ts.close();\n\n\t\t\tSystem.exit(0);\n\t\t}", "System.out.println(numx)", "System.out.println", "System.out", "System", "System.out", "numx", "s.close()", "s.close", "s", "System.exit(0)", "System.exit", "System", "0", "Integer[] array = new Integer[numn];", "array", "new Integer[numn]", "numn", "for(int i = 0 ; i < numn ; i++) {\n\n\t\t\tarray[i] = s.nextInt();\n\n\t\t}", "int i = 0 ;", "int i = 0 ;", "i", "0", "i < numn", "i", "numn", "i++", "i++", "i", "{\n\n\t\t\tarray[i] = s.nextInt();\n\n\t\t}", "{\n\n\t\t\tarray[i] = s.nextInt();\n\n\t\t}", "array[i] = s.nextInt()", "array[i]", "array", "i", "s.nextInt()", "s.nextInt", "s", "List<Integer> listNum = Arrays.asList(array);", "listNum", "Arrays.asList(array)", "Arrays.asList", "Arrays", "array", "s.close()", "s.close", "s", "int ans = 0;", "ans", "0", "boolean flg_con = true;", "flg_con", "true", "if(! listNum.contains(numx)) {\n\t\t\t//同数が配列にいない場合\n\t\t\tans = numx;\n\t\t\t\n\t\t\tflg_con = false;\n\t\t}", "! listNum.contains(numx)", "listNum.contains(numx)", "listNum.contains", "listNum", "numx", "{\n\t\t\t//同数が配列にいない場合\n\t\t\tans = numx;\n\t\t\t\n\t\t\tflg_con = false;\n\t\t}", "ans = numx", "ans", "numx", "flg_con = false", "flg_con", "false", "int count = 0;", "count", "0", "while(flg_con) {\n\n\t\t\tcount++;\n\n\t\t\tint mnx = numx - count;\n\t\t\tint plx = numx + count;\n\n\t\t\tif(! listNum.contains(mnx)) {\n\n\t\t\t\tans = mnx;\n\n\t\t\t\tflg_con = false;\n\t\t\t}else if (! listNum.contains(plx)) {\n\n\t\t\t\tans = plx;\n\n\t\t\t\tflg_con=false;\n\t\t\t}\n\n\t\t}", "flg_con", "{\n\n\t\t\tcount++;\n\n\t\t\tint mnx = numx - count;\n\t\t\tint plx = numx + count;\n\n\t\t\tif(! listNum.contains(mnx)) {\n\n\t\t\t\tans = mnx;\n\n\t\t\t\tflg_con = false;\n\t\t\t}else if (! listNum.contains(plx)) {\n\n\t\t\t\tans = plx;\n\n\t\t\t\tflg_con=false;\n\t\t\t}\n\n\t\t}", "count++", "count", "int mnx = numx - count;", "mnx", "numx - count", "numx", "count", "int plx = numx + count;", "plx", "numx + count", "numx", "count", "if(! listNum.contains(mnx)) {\n\n\t\t\t\tans = mnx;\n\n\t\t\t\tflg_con = false;\n\t\t\t}else if (! listNum.contains(plx)) {\n\n\t\t\t\tans = plx;\n\n\t\t\t\tflg_con=false;\n\t\t\t}", "! listNum.contains(mnx)", "listNum.contains(mnx)", "listNum.contains", "listNum", "mnx", "{\n\n\t\t\t\tans = mnx;\n\n\t\t\t\tflg_con = false;\n\t\t\t}", "ans = mnx", "ans", "mnx", "flg_con = false", "flg_con", "false", "if (! listNum.contains(plx)) {\n\n\t\t\t\tans = plx;\n\n\t\t\t\tflg_con=false;\n\t\t\t}", "! listNum.contains(plx)", "listNum.contains(plx)", "listNum.contains", "listNum", "plx", "{\n\n\t\t\t\tans = plx;\n\n\t\t\t\tflg_con=false;\n\t\t\t}", "ans = plx", "ans", "plx", "flg_con=false", "flg_con", "false", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\t//スキャナー\n\t\tScanner s = new Scanner(System.in);\n\n\n\t\tint numx = s.nextInt();\n\t\tint numn = s.nextInt();\n\n\t\tif(numn == 0) {\n\n\t\t\tSystem.out.println(numx);\n\n\t\t\ts.close();\n\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tInteger[] array = new Integer[numn];\n\n\t\tfor(int i = 0 ; i < numn ; i++) {\n\n\t\t\tarray[i] = s.nextInt();\n\n\t\t}\n\n\t\t//リストへ変換\n\t\tList<Integer> listNum = Arrays.asList(array);\n\n\t\t//スキャナーを閉じる\n\t\ts.close();\n\n\t\t//answer\n\t\tint ans = 0;\n\n\t\tboolean flg_con = true;\n\n\t\tif(! listNum.contains(numx)) {\n\t\t\t//同数が配列にいない場合\n\t\t\tans = numx;\n\t\t\t\n\t\t\tflg_con = false;\n\t\t}\n\n\t\tint count = 0;\n\n\t\twhile(flg_con) {\n\n\t\t\tcount++;\n\n\t\t\tint mnx = numx - count;\n\t\t\tint plx = numx + count;\n\n\t\t\tif(! listNum.contains(mnx)) {\n\n\t\t\t\tans = mnx;\n\n\t\t\t\tflg_con = false;\n\t\t\t}else if (! listNum.contains(plx)) {\n\n\t\t\t\tans = plx;\n\n\t\t\t\tflg_con=false;\n\t\t\t}\n\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\t//スキャナー\n\t\tScanner s = new Scanner(System.in);\n\n\n\t\tint numx = s.nextInt();\n\t\tint numn = s.nextInt();\n\n\t\tif(numn == 0) {\n\n\t\t\tSystem.out.println(numx);\n\n\t\t\ts.close();\n\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tInteger[] array = new Integer[numn];\n\n\t\tfor(int i = 0 ; i < numn ; i++) {\n\n\t\t\tarray[i] = s.nextInt();\n\n\t\t}\n\n\t\t//リストへ変換\n\t\tList<Integer> listNum = Arrays.asList(array);\n\n\t\t//スキャナーを閉じる\n\t\ts.close();\n\n\t\t//answer\n\t\tint ans = 0;\n\n\t\tboolean flg_con = true;\n\n\t\tif(! listNum.contains(numx)) {\n\t\t\t//同数が配列にいない場合\n\t\t\tans = numx;\n\t\t\t\n\t\t\tflg_con = false;\n\t\t}\n\n\t\tint count = 0;\n\n\t\twhile(flg_con) {\n\n\t\t\tcount++;\n\n\t\t\tint mnx = numx - count;\n\t\t\tint plx = numx + count;\n\n\t\t\tif(! listNum.contains(mnx)) {\n\n\t\t\t\tans = mnx;\n\n\t\t\t\tflg_con = false;\n\t\t\t}else if (! listNum.contains(plx)) {\n\n\t\t\t\tans = plx;\n\n\t\t\t\tflg_con=false;\n\t\t\t}\n\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t}\n\n}", "Main" ]
import java.util.Arrays; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { //スキャナー Scanner s = new Scanner(System.in); int numx = s.nextInt(); int numn = s.nextInt(); if(numn == 0) { System.out.println(numx); s.close(); System.exit(0); } Integer[] array = new Integer[numn]; for(int i = 0 ; i < numn ; i++) { array[i] = s.nextInt(); } //リストへ変換 List<Integer> listNum = Arrays.asList(array); //スキャナーを閉じる s.close(); //answer int ans = 0; boolean flg_con = true; if(! listNum.contains(numx)) { //同数が配列にいない場合 ans = numx; flg_con = false; } int count = 0; while(flg_con) { count++; int mnx = numx - count; int plx = numx + count; if(! listNum.contains(mnx)) { ans = mnx; flg_con = false; }else if (! listNum.contains(plx)) { ans = plx; flg_con=false; } } System.out.println(ans); } }
[ 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, 20, 13, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 14, 2, 18, 13, 13, 13, 30, 0, 13, 17, 0, 13, 17, 41, 13, 13, 41, 13, 17, 4, 18, 13, 13, 11, 1, 41, 13, 17, 2, 2, 2, 13, 13, 2, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 0, 13, 17, 0, 13, 17, 11, 1, 41, 13, 2, 13, 17, 2, 2, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 2, 18, 13, 13, 2, 13, 13, 30, 0, 13, 17, 0, 13, 18, 13, 13, 14, 2, 18, 13, 13, 2, 13, 13, 30, 0, 13, 17, 0, 13, 18, 13, 13, 14, 2, 2, 2, 13, 13, 2, 13, 17, 2, 13, 17, 30, 4, 18, 18, 13, 13, 2, 2, 2, 17, 13, 13, 17, 14, 2, 2, 2, 13, 13, 2, 13, 17, 2, 13, 17, 30, 4, 18, 18, 13, 13, 2, 2, 17, 13, 13, 14, 2, 2, 2, 13, 13, 2, 13, 17, 2, 13, 17, 30, 4, 18, 18, 13, 13, 2, 13, 17, 14, 2, 2, 2, 2, 13, 13, 2, 13, 17, 2, 13, 17, 2, 13, 17, 30, 4, 18, 18, 13, 13, 2, 2, 17, 13, 13, 14, 2, 2, 13, 13, 2, 13, 17, 30, 4, 18, 18, 13, 13, 2, 13, 17, 14, 2, 13, 17, 30, 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 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 291, 14 ], [ 291, 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, 35 ], [ 35, 36 ], [ 35, 37 ], [ 17, 38 ], [ 38, 39 ], [ 38, 40 ], [ 17, 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 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 62, 66 ], [ 61, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 67, 71 ], [ 71, 72 ], [ 71, 73 ], [ 17, 74 ], [ 74, 75 ], [ 74, 76 ], [ 17, 77 ], [ 77, 78 ], [ 77, 79 ], [ 17, 80 ], [ 80, 81 ], [ 81, 82 ], [ 80, 83 ], [ 17, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 84, 89 ], [ 90, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 90, 94 ], [ 94, 95 ], [ 94, 96 ], [ 90, 97 ], [ 97, 98 ], [ 97, 99 ], [ 84, 100 ], [ 100, 101 ], [ 101, 102 ], [ 84, 103 ], [ 104, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 104, 108 ], [ 108, 109 ], [ 108, 110 ], [ 104, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 115, 116 ], [ 115, 117 ], [ 111, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 118, 122 ], [ 122, 123 ], [ 122, 124 ], [ 111, 125 ], [ 125, 126 ], [ 126, 127 ], [ 111, 128 ], [ 129, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 131, 135 ], [ 135, 136 ], [ 135, 137 ], [ 130, 138 ], [ 138, 139 ], [ 139, 140 ], [ 139, 141 ], [ 138, 142 ], [ 142, 143 ], [ 142, 144 ], [ 144, 145 ], [ 144, 146 ], [ 129, 147 ], [ 147, 148 ], [ 148, 149 ], [ 149, 150 ], [ 149, 151 ], [ 148, 152 ], [ 152, 153 ], [ 152, 154 ], [ 147, 155 ], [ 155, 156 ], [ 156, 157 ], [ 156, 158 ], [ 155, 159 ], [ 159, 160 ], [ 159, 161 ], [ 161, 162 ], [ 161, 163 ], [ 17, 164 ], [ 164, 165 ], [ 166, 166 ], [ 166, 167 ], [ 167, 168 ], [ 167, 169 ], [ 166, 170 ], [ 170, 171 ], [ 170, 172 ], [ 166, 173 ], [ 173, 174 ], [ 173, 175 ], [ 164, 176 ], [ 176, 177 ], [ 177, 178 ], [ 178, 179 ], [ 179, 180 ], [ 179, 181 ], [ 177, 182 ], [ 183, 183 ], [ 183, 184 ], [ 184, 185 ], [ 184, 186 ], [ 183, 187 ], [ 183, 188 ], [ 17, 189 ], [ 189, 190 ], [ 191, 191 ], [ 191, 192 ], [ 192, 193 ], [ 192, 194 ], [ 191, 195 ], [ 195, 196 ], [ 195, 197 ], [ 191, 198 ], [ 198, 199 ], [ 198, 200 ], [ 189, 201 ], [ 201, 202 ], [ 202, 203 ], [ 203, 204 ], [ 204, 205 ], [ 204, 206 ], [ 202, 207 ], [ 207, 208 ], [ 208, 209 ], [ 208, 210 ], [ 207, 211 ], [ 17, 212 ], [ 212, 213 ], [ 214, 214 ], [ 214, 215 ], [ 215, 216 ], [ 215, 217 ], [ 214, 218 ], [ 218, 219 ], [ 218, 220 ], [ 214, 221 ], [ 221, 222 ], [ 221, 223 ], [ 212, 224 ], [ 224, 225 ], [ 225, 226 ], [ 226, 227 ], [ 227, 228 ], [ 227, 229 ], [ 225, 230 ], [ 230, 231 ], [ 230, 232 ], [ 17, 233 ], [ 233, 234 ], [ 236, 235 ], [ 243, 236 ], [ 236, 237 ], [ 237, 238 ], [ 237, 239 ], [ 236, 240 ], [ 240, 241 ], [ 240, 242 ], [ 243, 243 ], [ 243, 244 ], [ 243, 245 ], [ 236, 246 ], [ 246, 247 ], [ 246, 248 ], [ 233, 249 ], [ 249, 250 ], [ 250, 251 ], [ 251, 252 ], [ 252, 253 ], [ 252, 254 ], [ 250, 255 ], [ 255, 256 ], [ 256, 257 ], [ 256, 258 ], [ 255, 259 ], [ 17, 260 ], [ 260, 261 ], [ 261, 262 ], [ 262, 263 ], [ 262, 264 ], [ 261, 265 ], [ 265, 266 ], [ 265, 267 ], [ 260, 268 ], [ 268, 269 ], [ 269, 270 ], [ 270, 271 ], [ 271, 272 ], [ 271, 273 ], [ 269, 274 ], [ 274, 275 ], [ 274, 276 ], [ 17, 277 ], [ 277, 278 ], [ 278, 279 ], [ 278, 280 ], [ 277, 281 ], [ 281, 282 ], [ 282, 283 ], [ 283, 284 ], [ 284, 285 ], [ 284, 286 ], [ 282, 287 ], [ 15, 288 ], [ 288, 289 ], [ 0, 290 ], [ 290, 291 ], [ 290, 292 ] ]
[ "import java.util.Arrays;\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.Scanner;\npublic class Main {\n\n\n public static void main(String[] args) {\n\n\n Scanner scan = new Scanner(System.in);\nint X=scan.nextInt();\n int N =scan.nextInt();\n\n\n int M[]=new int[N];\n int K=0;\n int Y=0;\n for(int i=0;i<N;i++) {M[i]=scan.nextInt();\n if (M[i]==X){K=1;\n Y=1;\n }}\n\n\n int P=X;\n int C=1;\n Arrays.sort(M);\n for(int i=0;i<N&&K==1&&C==1;i++){ C=0;\n K=0;\n for(int j=N-1;j>=0&&K==0;j--) {\n if (M[j] == X +i) {\n C= 1;\n P=M[j];\n }\n\n if (M[j] == X -i) {\n K = 1;\n P = M[j];\n }\n }\n\n }\n if (P>X&&Y==1&&C==0){System.out.println(2*X-P-1);}\n if (P>X&&Y==1&&C==1){System.out.println(2*X-P);}\n if (P<X&&Y==1&&K==0){System.out.println(P-1);}\n if (P<X&&Y==1&&K==1&&C==0){System.out.println(2*X-P);}\n \n if (P==X&&Y==1){System.out.println(P-1);}\n if (Y==0){System.out.println(X);}\n\n\n\n\n }\n }\n\n\n\n", "import java.util.Arrays;", "Arrays", "java.util", "import java.util.HashMap;", "HashMap", "java.util", "import java.util.Map;", "Map", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\n public static void main(String[] args) {\n\n\n Scanner scan = new Scanner(System.in);\nint X=scan.nextInt();\n int N =scan.nextInt();\n\n\n int M[]=new int[N];\n int K=0;\n int Y=0;\n for(int i=0;i<N;i++) {M[i]=scan.nextInt();\n if (M[i]==X){K=1;\n Y=1;\n }}\n\n\n int P=X;\n int C=1;\n Arrays.sort(M);\n for(int i=0;i<N&&K==1&&C==1;i++){ C=0;\n K=0;\n for(int j=N-1;j>=0&&K==0;j--) {\n if (M[j] == X +i) {\n C= 1;\n P=M[j];\n }\n\n if (M[j] == X -i) {\n K = 1;\n P = M[j];\n }\n }\n\n }\n if (P>X&&Y==1&&C==0){System.out.println(2*X-P-1);}\n if (P>X&&Y==1&&C==1){System.out.println(2*X-P);}\n if (P<X&&Y==1&&K==0){System.out.println(P-1);}\n if (P<X&&Y==1&&K==1&&C==0){System.out.println(2*X-P);}\n \n if (P==X&&Y==1){System.out.println(P-1);}\n if (Y==0){System.out.println(X);}\n\n\n\n\n }\n }", "Main", "public static void main(String[] args) {\n\n\n Scanner scan = new Scanner(System.in);\nint X=scan.nextInt();\n int N =scan.nextInt();\n\n\n int M[]=new int[N];\n int K=0;\n int Y=0;\n for(int i=0;i<N;i++) {M[i]=scan.nextInt();\n if (M[i]==X){K=1;\n Y=1;\n }}\n\n\n int P=X;\n int C=1;\n Arrays.sort(M);\n for(int i=0;i<N&&K==1&&C==1;i++){ C=0;\n K=0;\n for(int j=N-1;j>=0&&K==0;j--) {\n if (M[j] == X +i) {\n C= 1;\n P=M[j];\n }\n\n if (M[j] == X -i) {\n K = 1;\n P = M[j];\n }\n }\n\n }\n if (P>X&&Y==1&&C==0){System.out.println(2*X-P-1);}\n if (P>X&&Y==1&&C==1){System.out.println(2*X-P);}\n if (P<X&&Y==1&&K==0){System.out.println(P-1);}\n if (P<X&&Y==1&&K==1&&C==0){System.out.println(2*X-P);}\n \n if (P==X&&Y==1){System.out.println(P-1);}\n if (Y==0){System.out.println(X);}\n\n\n\n\n }", "main", "{\n\n\n Scanner scan = new Scanner(System.in);\nint X=scan.nextInt();\n int N =scan.nextInt();\n\n\n int M[]=new int[N];\n int K=0;\n int Y=0;\n for(int i=0;i<N;i++) {M[i]=scan.nextInt();\n if (M[i]==X){K=1;\n Y=1;\n }}\n\n\n int P=X;\n int C=1;\n Arrays.sort(M);\n for(int i=0;i<N&&K==1&&C==1;i++){ C=0;\n K=0;\n for(int j=N-1;j>=0&&K==0;j--) {\n if (M[j] == X +i) {\n C= 1;\n P=M[j];\n }\n\n if (M[j] == X -i) {\n K = 1;\n P = M[j];\n }\n }\n\n }\n if (P>X&&Y==1&&C==0){System.out.println(2*X-P-1);}\n if (P>X&&Y==1&&C==1){System.out.println(2*X-P);}\n if (P<X&&Y==1&&K==0){System.out.println(P-1);}\n if (P<X&&Y==1&&K==1&&C==0){System.out.println(2*X-P);}\n \n if (P==X&&Y==1){System.out.println(P-1);}\n if (Y==0){System.out.println(X);}\n\n\n\n\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int X=scan.nextInt();", "X", "scan.nextInt()", "scan.nextInt", "scan", "int N =scan.nextInt();", "N", "scan.nextInt()", "scan.nextInt", "scan", "int M[]=new int[N];", "M", "new int[N]", "N", "int K=0;", "K", "0", "int Y=0;", "Y", "0", "for(int i=0;i<N;i++) {M[i]=scan.nextInt();\n if (M[i]==X){K=1;\n Y=1;\n }}", "int i=0;", "int i=0;", "i", "0", "i<N", "i", "N", "i++", "i++", "i", "{M[i]=scan.nextInt();\n if (M[i]==X){K=1;\n Y=1;\n }}", "{M[i]=scan.nextInt();\n if (M[i]==X){K=1;\n Y=1;\n }}", "M[i]=scan.nextInt()", "M[i]", "M", "i", "scan.nextInt()", "scan.nextInt", "scan", "if (M[i]==X){K=1;\n Y=1;\n }", "M[i]==X", "M[i]", "M", "i", "X", "{K=1;\n Y=1;\n }", "K=1", "K", "1", "Y=1", "Y", "1", "int P=X;", "P", "X", "int C=1;", "C", "1", "Arrays.sort(M)", "Arrays.sort", "Arrays", "M", "for(int i=0;i<N&&K==1&&C==1;i++){ C=0;\n K=0;\n for(int j=N-1;j>=0&&K==0;j--) {\n if (M[j] == X +i) {\n C= 1;\n P=M[j];\n }\n\n if (M[j] == X -i) {\n K = 1;\n P = M[j];\n }\n }\n\n }", "int i=0;", "int i=0;", "i", "0", "i<N&&K==1&&C==1", "i<N&&K==1&&C==1", "i<N", "i", "N", "K==1", "K", "1", "C==1", "C", "1", "i++", "i++", "i", "{ C=0;\n K=0;\n for(int j=N-1;j>=0&&K==0;j--) {\n if (M[j] == X +i) {\n C= 1;\n P=M[j];\n }\n\n if (M[j] == X -i) {\n K = 1;\n P = M[j];\n }\n }\n\n }", "{ C=0;\n K=0;\n for(int j=N-1;j>=0&&K==0;j--) {\n if (M[j] == X +i) {\n C= 1;\n P=M[j];\n }\n\n if (M[j] == X -i) {\n K = 1;\n P = M[j];\n }\n }\n\n }", "C=0", "C", "0", "K=0", "K", "0", "for(int j=N-1;j>=0&&K==0;j--) {\n if (M[j] == X +i) {\n C= 1;\n P=M[j];\n }\n\n if (M[j] == X -i) {\n K = 1;\n P = M[j];\n }\n }", "int j=N-1;", "int j=N-1;", "j", "N-1", "N", "1", "j>=0&&K==0", "j>=0", "j", "0", "K==0", "K", "0", "j--", "j--", "j", "{\n if (M[j] == X +i) {\n C= 1;\n P=M[j];\n }\n\n if (M[j] == X -i) {\n K = 1;\n P = M[j];\n }\n }", "{\n if (M[j] == X +i) {\n C= 1;\n P=M[j];\n }\n\n if (M[j] == X -i) {\n K = 1;\n P = M[j];\n }\n }", "if (M[j] == X +i) {\n C= 1;\n P=M[j];\n }", "M[j] == X +i", "M[j]", "M", "j", "X +i", "X", "i", "{\n C= 1;\n P=M[j];\n }", "C= 1", "C", "1", "P=M[j]", "P", "M[j]", "M", "j", "if (M[j] == X -i) {\n K = 1;\n P = M[j];\n }", "M[j] == X -i", "M[j]", "M", "j", "X -i", "X", "i", "{\n K = 1;\n P = M[j];\n }", "K = 1", "K", "1", "P = M[j]", "P", "M[j]", "M", "j", "if (P>X&&Y==1&&C==0){System.out.println(2*X-P-1);}", "P>X&&Y==1&&C==0", "P>X&&Y==1&&C==0", "P>X", "P", "X", "Y==1", "Y", "1", "C==0", "C", "0", "{System.out.println(2*X-P-1);}", "System.out.println(2*X-P-1)", "System.out.println", "System.out", "System", "System.out", "2*X-P-1", "2*X-P-1", "2*X", "2", "X", "P", "1", "if (P>X&&Y==1&&C==1){System.out.println(2*X-P);}", "P>X&&Y==1&&C==1", "P>X&&Y==1&&C==1", "P>X", "P", "X", "Y==1", "Y", "1", "C==1", "C", "1", "{System.out.println(2*X-P);}", "System.out.println(2*X-P)", "System.out.println", "System.out", "System", "System.out", "2*X-P", "2*X", "2", "X", "P", "if (P<X&&Y==1&&K==0){System.out.println(P-1);}", "P<X&&Y==1&&K==0", "P<X&&Y==1&&K==0", "P<X", "P", "X", "Y==1", "Y", "1", "K==0", "K", "0", "{System.out.println(P-1);}", "System.out.println(P-1)", "System.out.println", "System.out", "System", "System.out", "P-1", "P", "1", "if (P<X&&Y==1&&K==1&&C==0){System.out.println(2*X-P);}", "P<X&&Y==1&&K==1&&C==0", "K==1", "P<X&&Y==1&&K==1&&C==0", "P<X", "P", "X", "Y==1", "Y", "1", "K==1", "K", "1", "C==0", "C", "0", "{System.out.println(2*X-P);}", "System.out.println(2*X-P)", "System.out.println", "System.out", "System", "System.out", "2*X-P", "2*X", "2", "X", "P", "if (P==X&&Y==1){System.out.println(P-1);}", "P==X&&Y==1", "P==X", "P", "X", "Y==1", "Y", "1", "{System.out.println(P-1);}", "System.out.println(P-1)", "System.out.println", "System.out", "System", "System.out", "P-1", "P", "1", "if (Y==0){System.out.println(X);}", "Y==0", "Y", "0", "{System.out.println(X);}", "System.out.println(X)", "System.out.println", "System.out", "System", "System.out", "X", "String[] args", "args", "public class Main {\n\n\n public static void main(String[] args) {\n\n\n Scanner scan = new Scanner(System.in);\nint X=scan.nextInt();\n int N =scan.nextInt();\n\n\n int M[]=new int[N];\n int K=0;\n int Y=0;\n for(int i=0;i<N;i++) {M[i]=scan.nextInt();\n if (M[i]==X){K=1;\n Y=1;\n }}\n\n\n int P=X;\n int C=1;\n Arrays.sort(M);\n for(int i=0;i<N&&K==1&&C==1;i++){ C=0;\n K=0;\n for(int j=N-1;j>=0&&K==0;j--) {\n if (M[j] == X +i) {\n C= 1;\n P=M[j];\n }\n\n if (M[j] == X -i) {\n K = 1;\n P = M[j];\n }\n }\n\n }\n if (P>X&&Y==1&&C==0){System.out.println(2*X-P-1);}\n if (P>X&&Y==1&&C==1){System.out.println(2*X-P);}\n if (P<X&&Y==1&&K==0){System.out.println(P-1);}\n if (P<X&&Y==1&&K==1&&C==0){System.out.println(2*X-P);}\n \n if (P==X&&Y==1){System.out.println(P-1);}\n if (Y==0){System.out.println(X);}\n\n\n\n\n }\n }", "public class Main {\n\n\n public static void main(String[] args) {\n\n\n Scanner scan = new Scanner(System.in);\nint X=scan.nextInt();\n int N =scan.nextInt();\n\n\n int M[]=new int[N];\n int K=0;\n int Y=0;\n for(int i=0;i<N;i++) {M[i]=scan.nextInt();\n if (M[i]==X){K=1;\n Y=1;\n }}\n\n\n int P=X;\n int C=1;\n Arrays.sort(M);\n for(int i=0;i<N&&K==1&&C==1;i++){ C=0;\n K=0;\n for(int j=N-1;j>=0&&K==0;j--) {\n if (M[j] == X +i) {\n C= 1;\n P=M[j];\n }\n\n if (M[j] == X -i) {\n K = 1;\n P = M[j];\n }\n }\n\n }\n if (P>X&&Y==1&&C==0){System.out.println(2*X-P-1);}\n if (P>X&&Y==1&&C==1){System.out.println(2*X-P);}\n if (P<X&&Y==1&&K==0){System.out.println(P-1);}\n if (P<X&&Y==1&&K==1&&C==0){System.out.println(2*X-P);}\n \n if (P==X&&Y==1){System.out.println(P-1);}\n if (Y==0){System.out.println(X);}\n\n\n\n\n }\n }", "Main" ]
import java.util.Arrays; import java.util.HashMap; import java.util.Map; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int X=scan.nextInt(); int N =scan.nextInt(); int M[]=new int[N]; int K=0; int Y=0; for(int i=0;i<N;i++) {M[i]=scan.nextInt(); if (M[i]==X){K=1; Y=1; }} int P=X; int C=1; Arrays.sort(M); for(int i=0;i<N&&K==1&&C==1;i++){ C=0; K=0; for(int j=N-1;j>=0&&K==0;j--) { if (M[j] == X +i) { C= 1; P=M[j]; } if (M[j] == X -i) { K = 1; P = M[j]; } } } if (P>X&&Y==1&&C==0){System.out.println(2*X-P-1);} if (P>X&&Y==1&&C==1){System.out.println(2*X-P);} if (P<X&&Y==1&&K==0){System.out.println(P-1);} if (P<X&&Y==1&&K==1&&C==0){System.out.println(2*X-P);} if (P==X&&Y==1){System.out.println(P-1);} if (Y==0){System.out.println(X);} } }
[ 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, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 40, 4, 18, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 29, 14, 40, 4, 18, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 29, 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 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 108, 11 ], [ 108, 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 ], [ 45, 46 ], [ 44, 47 ], [ 47, 48 ], [ 48, 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 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 65, 68 ], [ 68, 69 ], [ 68, 70 ], [ 63, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 72, 77 ], [ 77, 78 ], [ 77, 79 ], [ 71, 80 ], [ 62, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 83, 86 ], [ 86, 87 ], [ 86, 88 ], [ 81, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 90, 95 ], [ 95, 96 ], [ 95, 97 ], [ 89, 98 ], [ 14, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 99, 104 ], [ 12, 105 ], [ 105, 106 ], [ 0, 107 ], [ 107, 108 ], [ 107, 109 ] ]
[ "//package atcoder;\n\nimport java.util.HashSet;\nimport java.util.Scanner;\nimport java.util.Set;\n\npublic class Main {\n\n public static void main(String[] args) {\n final Scanner in = new Scanner(System.in);\n final int X = in.nextInt();\n final int N = in.nextInt();\n final Set<Integer> p = new HashSet<>();\n\n for (int i = 1; i <= N; ++i) {\n p.add(in.nextInt());\n }\n\n for (int d = 0; d <= 100; ++d){\n if (!p.contains(X - d)) {\n System.out.println(X - d);\n return;\n }\n if (!p.contains(X + d)) {\n System.out.println(X + d);\n return;\n }\n }\n System.out.println(0);\n }\n}", "import java.util.HashSet;", "HashSet", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.Set;", "Set", "java.util", "public class Main {\n\n public static void main(String[] args) {\n final Scanner in = new Scanner(System.in);\n final int X = in.nextInt();\n final int N = in.nextInt();\n final Set<Integer> p = new HashSet<>();\n\n for (int i = 1; i <= N; ++i) {\n p.add(in.nextInt());\n }\n\n for (int d = 0; d <= 100; ++d){\n if (!p.contains(X - d)) {\n System.out.println(X - d);\n return;\n }\n if (!p.contains(X + d)) {\n System.out.println(X + d);\n return;\n }\n }\n System.out.println(0);\n }\n}", "Main", "public static void main(String[] args) {\n final Scanner in = new Scanner(System.in);\n final int X = in.nextInt();\n final int N = in.nextInt();\n final Set<Integer> p = new HashSet<>();\n\n for (int i = 1; i <= N; ++i) {\n p.add(in.nextInt());\n }\n\n for (int d = 0; d <= 100; ++d){\n if (!p.contains(X - d)) {\n System.out.println(X - d);\n return;\n }\n if (!p.contains(X + d)) {\n System.out.println(X + d);\n return;\n }\n }\n System.out.println(0);\n }", "main", "{\n final Scanner in = new Scanner(System.in);\n final int X = in.nextInt();\n final int N = in.nextInt();\n final Set<Integer> p = new HashSet<>();\n\n for (int i = 1; i <= N; ++i) {\n p.add(in.nextInt());\n }\n\n for (int d = 0; d <= 100; ++d){\n if (!p.contains(X - d)) {\n System.out.println(X - d);\n return;\n }\n if (!p.contains(X + d)) {\n System.out.println(X + d);\n return;\n }\n }\n System.out.println(0);\n }", "final Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "final int X = in.nextInt();", "X", "in.nextInt()", "in.nextInt", "in", "final int N = in.nextInt();", "N", "in.nextInt()", "in.nextInt", "in", "final Set<Integer> p = new HashSet<>();", "p", "new HashSet<>()", "for (int i = 1; i <= N; ++i) {\n p.add(in.nextInt());\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= N", "i", "N", "++i", "++i", "i", "{\n p.add(in.nextInt());\n }", "{\n p.add(in.nextInt());\n }", "p.add(in.nextInt())", "p.add", "p", "in.nextInt()", "in.nextInt", "in", "for (int d = 0; d <= 100; ++d){\n if (!p.contains(X - d)) {\n System.out.println(X - d);\n return;\n }\n if (!p.contains(X + d)) {\n System.out.println(X + d);\n return;\n }\n }", "int d = 0;", "int d = 0;", "d", "0", "d <= 100", "d", "100", "++d", "++d", "d", "{\n if (!p.contains(X - d)) {\n System.out.println(X - d);\n return;\n }\n if (!p.contains(X + d)) {\n System.out.println(X + d);\n return;\n }\n }", "{\n if (!p.contains(X - d)) {\n System.out.println(X - d);\n return;\n }\n if (!p.contains(X + d)) {\n System.out.println(X + d);\n return;\n }\n }", "if (!p.contains(X - d)) {\n System.out.println(X - d);\n return;\n }", "!p.contains(X - d)", "p.contains(X - d)", "p.contains", "p", "X - d", "X", "d", "{\n System.out.println(X - d);\n return;\n }", "System.out.println(X - d)", "System.out.println", "System.out", "System", "System.out", "X - d", "X", "d", "return;", "if (!p.contains(X + d)) {\n System.out.println(X + d);\n return;\n }", "!p.contains(X + d)", "p.contains(X + d)", "p.contains", "p", "X + d", "X", "d", "{\n System.out.println(X + d);\n return;\n }", "System.out.println(X + d)", "System.out.println", "System.out", "System", "System.out", "X + d", "X", "d", "return;", "System.out.println(0)", "System.out.println", "System.out", "System", "System.out", "0", "String[] args", "args", "public class Main {\n\n public static void main(String[] args) {\n final Scanner in = new Scanner(System.in);\n final int X = in.nextInt();\n final int N = in.nextInt();\n final Set<Integer> p = new HashSet<>();\n\n for (int i = 1; i <= N; ++i) {\n p.add(in.nextInt());\n }\n\n for (int d = 0; d <= 100; ++d){\n if (!p.contains(X - d)) {\n System.out.println(X - d);\n return;\n }\n if (!p.contains(X + d)) {\n System.out.println(X + d);\n return;\n }\n }\n System.out.println(0);\n }\n}", "public class Main {\n\n public static void main(String[] args) {\n final Scanner in = new Scanner(System.in);\n final int X = in.nextInt();\n final int N = in.nextInt();\n final Set<Integer> p = new HashSet<>();\n\n for (int i = 1; i <= N; ++i) {\n p.add(in.nextInt());\n }\n\n for (int d = 0; d <= 100; ++d){\n if (!p.contains(X - d)) {\n System.out.println(X - d);\n return;\n }\n if (!p.contains(X + d)) {\n System.out.println(X + d);\n return;\n }\n }\n System.out.println(0);\n }\n}", "Main" ]
//package atcoder; import java.util.HashSet; import java.util.Scanner; import java.util.Set; public class Main { public static void main(String[] args) { final Scanner in = new Scanner(System.in); final int X = in.nextInt(); final int N = in.nextInt(); final Set<Integer> p = new HashSet<>(); for (int i = 1; i <= N; ++i) { p.add(in.nextInt()); } for (int d = 0; d <= 100; ++d){ if (!p.contains(X - d)) { System.out.println(X - d); return; } if (!p.contains(X + d)) { System.out.println(X + d); return; } } System.out.println(0); } }
[ 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, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 30, 41, 13, 20, 13, 41, 13, 20, 2, 17, 13, 0, 18, 13, 17, 17, 0, 18, 13, 2, 17, 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, 13, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 40, 2, 18, 13, 13, 13, 30, 0, 18, 13, 13, 13, 40, 13, 30, 40, 13, 14, 2, 13, 13, 30, 40, 13, 41, 13, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 4, 18, 13, 2, 18, 13, 13, 13, 30, 0, 13, 4, 18, 13, 2, 18, 13, 13, 13, 0, 13, 18, 13, 13, 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 ], [ 184, 8 ], [ 184, 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 ], [ 26, 28 ], [ 25, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 32, 33 ], [ 32, 34 ], [ 30, 35 ], [ 25, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 36, 41 ], [ 41, 42 ], [ 41, 43 ], [ 44, 45 ], [ 44, 46 ], [ 36, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 47, 51 ], [ 36, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 55, 57 ], [ 52, 58 ], [ 36, 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 ], [ 73, 74 ], [ 73, 75 ], [ 72, 76 ], [ 76, 77 ], [ 77, 78 ], [ 36, 79 ], [ 79, 80 ], [ 80, 81 ], [ 79, 82 ], [ 36, 83 ], [ 83, 84 ], [ 83, 85 ], [ 36, 86 ], [ 86, 87 ], [ 86, 88 ], [ 36, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 89, 94 ], [ 94, 95 ], [ 94, 96 ], [ 89, 97 ], [ 97, 98 ], [ 98, 99 ], [ 89, 100 ], [ 101, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 104, 108 ], [ 102, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 110, 114 ], [ 109, 115 ], [ 115, 116 ], [ 102, 117 ], [ 117, 118 ], [ 118, 119 ], [ 117, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 120, 124 ], [ 124, 125 ], [ 125, 126 ], [ 36, 127 ], [ 127, 128 ], [ 127, 129 ], [ 36, 130 ], [ 130, 131 ], [ 130, 132 ], [ 36, 133 ], [ 133, 134 ], [ 134, 135 ], [ 135, 136 ], [ 135, 137 ], [ 133, 138 ], [ 138, 139 ], [ 138, 140 ], [ 140, 141 ], [ 140, 142 ], [ 133, 143 ], [ 143, 144 ], [ 144, 145 ], [ 133, 146 ], [ 147, 147 ], [ 147, 148 ], [ 148, 149 ], [ 149, 150 ], [ 149, 151 ], [ 151, 152 ], [ 152, 153 ], [ 151, 154 ], [ 154, 155 ], [ 155, 156 ], [ 155, 157 ], [ 154, 158 ], [ 148, 159 ], [ 159, 160 ], [ 160, 161 ], [ 160, 162 ], [ 162, 163 ], [ 163, 164 ], [ 162, 165 ], [ 165, 166 ], [ 166, 167 ], [ 166, 168 ], [ 165, 169 ], [ 159, 170 ], [ 170, 171 ], [ 170, 172 ], [ 172, 173 ], [ 172, 174 ], [ 36, 175 ], [ 175, 176 ], [ 176, 177 ], [ 177, 178 ], [ 177, 179 ], [ 175, 180 ], [ 9, 181 ], [ 181, 182 ], [ 0, 183 ], [ 183, 184 ], [ 183, 185 ] ]
[ "import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\nif(n==0){System.out.println(x);}else{\n\t\tint p[] = new int[n];\n\t\tint q[] = new int[102 - n];\n\t\tq[0] = 0;\n\t\tq[101 - n] = 101;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\n\t\tArrays.sort(p);\n\t\tint look = 0;\n\t\tint lookb = 0;\n\t\tfor (int i = 0; i <= 101; i++) {\n\t\t\tif (!(p[lookb] == i)) {\n\t\t\t\t// System.out.println(\"!\"+i);\n\t\t\t\tq[look] = i;\n\t\t\t\tlook++;\n\n\t\t\t} else {\n\t\t\t\tlookb++;\n\t\t\t\tif (lookb >= n) {\n\t\t\t\t\tlookb--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n/*\t\tfor (int i = 0; i < q.length; i++) {\n\t\t\tSystem.out.println(q[i]);\n\t\t}\n*/\n\t\tint sub=x;\n\t\tint ans=0;\nfor(int i=0;i<q.length;i++){\nif(sub>Math.abs(q[i]-x)){\n\tsub=Math.abs(q[i]-x);\n\tans=q[i];\n}\n}System.out.println(ans);\n}\n\t}\n}", "import java.util.Arrays;", "Arrays", "java.util", "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\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\nif(n==0){System.out.println(x);}else{\n\t\tint p[] = new int[n];\n\t\tint q[] = new int[102 - n];\n\t\tq[0] = 0;\n\t\tq[101 - n] = 101;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\n\t\tArrays.sort(p);\n\t\tint look = 0;\n\t\tint lookb = 0;\n\t\tfor (int i = 0; i <= 101; i++) {\n\t\t\tif (!(p[lookb] == i)) {\n\t\t\t\t// System.out.println(\"!\"+i);\n\t\t\t\tq[look] = i;\n\t\t\t\tlook++;\n\n\t\t\t} else {\n\t\t\t\tlookb++;\n\t\t\t\tif (lookb >= n) {\n\t\t\t\t\tlookb--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n/*\t\tfor (int i = 0; i < q.length; i++) {\n\t\t\tSystem.out.println(q[i]);\n\t\t}\n*/\n\t\tint sub=x;\n\t\tint ans=0;\nfor(int i=0;i<q.length;i++){\nif(sub>Math.abs(q[i]-x)){\n\tsub=Math.abs(q[i]-x);\n\tans=q[i];\n}\n}System.out.println(ans);\n}\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\nif(n==0){System.out.println(x);}else{\n\t\tint p[] = new int[n];\n\t\tint q[] = new int[102 - n];\n\t\tq[0] = 0;\n\t\tq[101 - n] = 101;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\n\t\tArrays.sort(p);\n\t\tint look = 0;\n\t\tint lookb = 0;\n\t\tfor (int i = 0; i <= 101; i++) {\n\t\t\tif (!(p[lookb] == i)) {\n\t\t\t\t// System.out.println(\"!\"+i);\n\t\t\t\tq[look] = i;\n\t\t\t\tlook++;\n\n\t\t\t} else {\n\t\t\t\tlookb++;\n\t\t\t\tif (lookb >= n) {\n\t\t\t\t\tlookb--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n/*\t\tfor (int i = 0; i < q.length; i++) {\n\t\t\tSystem.out.println(q[i]);\n\t\t}\n*/\n\t\tint sub=x;\n\t\tint ans=0;\nfor(int i=0;i<q.length;i++){\nif(sub>Math.abs(q[i]-x)){\n\tsub=Math.abs(q[i]-x);\n\tans=q[i];\n}\n}System.out.println(ans);\n}\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\nif(n==0){System.out.println(x);}else{\n\t\tint p[] = new int[n];\n\t\tint q[] = new int[102 - n];\n\t\tq[0] = 0;\n\t\tq[101 - n] = 101;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\n\t\tArrays.sort(p);\n\t\tint look = 0;\n\t\tint lookb = 0;\n\t\tfor (int i = 0; i <= 101; i++) {\n\t\t\tif (!(p[lookb] == i)) {\n\t\t\t\t// System.out.println(\"!\"+i);\n\t\t\t\tq[look] = i;\n\t\t\t\tlook++;\n\n\t\t\t} else {\n\t\t\t\tlookb++;\n\t\t\t\tif (lookb >= n) {\n\t\t\t\t\tlookb--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n/*\t\tfor (int i = 0; i < q.length; i++) {\n\t\t\tSystem.out.println(q[i]);\n\t\t}\n*/\n\t\tint sub=x;\n\t\tint ans=0;\nfor(int i=0;i<q.length;i++){\nif(sub>Math.abs(q[i]-x)){\n\tsub=Math.abs(q[i]-x);\n\tans=q[i];\n}\n}System.out.println(ans);\n}\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "if(n==0){System.out.println(x);}else{\n\t\tint p[] = new int[n];\n\t\tint q[] = new int[102 - n];\n\t\tq[0] = 0;\n\t\tq[101 - n] = 101;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\n\t\tArrays.sort(p);\n\t\tint look = 0;\n\t\tint lookb = 0;\n\t\tfor (int i = 0; i <= 101; i++) {\n\t\t\tif (!(p[lookb] == i)) {\n\t\t\t\t// System.out.println(\"!\"+i);\n\t\t\t\tq[look] = i;\n\t\t\t\tlook++;\n\n\t\t\t} else {\n\t\t\t\tlookb++;\n\t\t\t\tif (lookb >= n) {\n\t\t\t\t\tlookb--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n/*\t\tfor (int i = 0; i < q.length; i++) {\n\t\t\tSystem.out.println(q[i]);\n\t\t}\n*/\n\t\tint sub=x;\n\t\tint ans=0;\nfor(int i=0;i<q.length;i++){\nif(sub>Math.abs(q[i]-x)){\n\tsub=Math.abs(q[i]-x);\n\tans=q[i];\n}\n}System.out.println(ans);\n}", "n==0", "n", "0", "{System.out.println(x);}", "System.out.println(x)", "System.out.println", "System.out", "System", "System.out", "x", "{\n\t\tint p[] = new int[n];\n\t\tint q[] = new int[102 - n];\n\t\tq[0] = 0;\n\t\tq[101 - n] = 101;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\n\t\tArrays.sort(p);\n\t\tint look = 0;\n\t\tint lookb = 0;\n\t\tfor (int i = 0; i <= 101; i++) {\n\t\t\tif (!(p[lookb] == i)) {\n\t\t\t\t// System.out.println(\"!\"+i);\n\t\t\t\tq[look] = i;\n\t\t\t\tlook++;\n\n\t\t\t} else {\n\t\t\t\tlookb++;\n\t\t\t\tif (lookb >= n) {\n\t\t\t\t\tlookb--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n/*\t\tfor (int i = 0; i < q.length; i++) {\n\t\t\tSystem.out.println(q[i]);\n\t\t}\n*/\n\t\tint sub=x;\n\t\tint ans=0;\nfor(int i=0;i<q.length;i++){\nif(sub>Math.abs(q[i]-x)){\n\tsub=Math.abs(q[i]-x);\n\tans=q[i];\n}\n}System.out.println(ans);\n}", "int p[] = new int[n];", "p", "new int[n]", "n", "int q[] = new int[102 - n];", "q", "new int[102 - n]", "102 - n", "102", "n", "q[0] = 0", "q[0]", "q", "0", "0", "q[101 - n] = 101", "q[101 - n]", "q", "101 - n", "101", "n", "101", "for (int i = 0; i < n; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tp[i] = sc.nextInt();\n\t\t}", "{\n\t\t\tp[i] = sc.nextInt();\n\t\t}", "p[i] = sc.nextInt()", "p[i]", "p", "i", "sc.nextInt()", "sc.nextInt", "sc", "Arrays.sort(p)", "Arrays.sort", "Arrays", "p", "int look = 0;", "look", "0", "int lookb = 0;", "lookb", "0", "for (int i = 0; i <= 101; i++) {\n\t\t\tif (!(p[lookb] == i)) {\n\t\t\t\t// System.out.println(\"!\"+i);\n\t\t\t\tq[look] = i;\n\t\t\t\tlook++;\n\n\t\t\t} else {\n\t\t\t\tlookb++;\n\t\t\t\tif (lookb >= n) {\n\t\t\t\t\tlookb--;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i <= 101", "i", "101", "i++", "i++", "i", "{\n\t\t\tif (!(p[lookb] == i)) {\n\t\t\t\t// System.out.println(\"!\"+i);\n\t\t\t\tq[look] = i;\n\t\t\t\tlook++;\n\n\t\t\t} else {\n\t\t\t\tlookb++;\n\t\t\t\tif (lookb >= n) {\n\t\t\t\t\tlookb--;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tif (!(p[lookb] == i)) {\n\t\t\t\t// System.out.println(\"!\"+i);\n\t\t\t\tq[look] = i;\n\t\t\t\tlook++;\n\n\t\t\t} else {\n\t\t\t\tlookb++;\n\t\t\t\tif (lookb >= n) {\n\t\t\t\t\tlookb--;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "if (!(p[lookb] == i)) {\n\t\t\t\t// System.out.println(\"!\"+i);\n\t\t\t\tq[look] = i;\n\t\t\t\tlook++;\n\n\t\t\t} else {\n\t\t\t\tlookb++;\n\t\t\t\tif (lookb >= n) {\n\t\t\t\t\tlookb--;\n\t\t\t\t}\n\t\t\t}", "!(p[lookb] == i)", "(p[lookb] == i)", "p[lookb]", "p", "lookb", "i", "{\n\t\t\t\t// System.out.println(\"!\"+i);\n\t\t\t\tq[look] = i;\n\t\t\t\tlook++;\n\n\t\t\t}", "q[look] = i", "q[look]", "q", "look", "i", "look++", "look", "{\n\t\t\t\tlookb++;\n\t\t\t\tif (lookb >= n) {\n\t\t\t\t\tlookb--;\n\t\t\t\t}\n\t\t\t}", "lookb++", "lookb", "if (lookb >= n) {\n\t\t\t\t\tlookb--;\n\t\t\t\t}", "lookb >= n", "lookb", "n", "{\n\t\t\t\t\tlookb--;\n\t\t\t\t}", "lookb--", "lookb", "int sub=x;", "sub", "x", "int ans=0;", "ans", "0", "for(int i=0;i<q.length;i++){\nif(sub>Math.abs(q[i]-x)){\n\tsub=Math.abs(q[i]-x);\n\tans=q[i];\n}\n}", "int i=0;", "int i=0;", "i", "0", "i<q.length", "i", "q.length", "q", "q.length", "i++", "i++", "i", "{\nif(sub>Math.abs(q[i]-x)){\n\tsub=Math.abs(q[i]-x);\n\tans=q[i];\n}\n}", "{\nif(sub>Math.abs(q[i]-x)){\n\tsub=Math.abs(q[i]-x);\n\tans=q[i];\n}\n}", "if(sub>Math.abs(q[i]-x)){\n\tsub=Math.abs(q[i]-x);\n\tans=q[i];\n}", "sub>Math.abs(q[i]-x)", "sub", "Math.abs(q[i]-x)", "Math.abs", "Math", "q[i]-x", "q[i]", "q", "i", "x", "{\n\tsub=Math.abs(q[i]-x);\n\tans=q[i];\n}", "sub=Math.abs(q[i]-x)", "sub", "Math.abs(q[i]-x)", "Math.abs", "Math", "q[i]-x", "q[i]", "q", "i", "x", "ans=q[i]", "ans", "q[i]", "q", "i", "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\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\nif(n==0){System.out.println(x);}else{\n\t\tint p[] = new int[n];\n\t\tint q[] = new int[102 - n];\n\t\tq[0] = 0;\n\t\tq[101 - n] = 101;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\n\t\tArrays.sort(p);\n\t\tint look = 0;\n\t\tint lookb = 0;\n\t\tfor (int i = 0; i <= 101; i++) {\n\t\t\tif (!(p[lookb] == i)) {\n\t\t\t\t// System.out.println(\"!\"+i);\n\t\t\t\tq[look] = i;\n\t\t\t\tlook++;\n\n\t\t\t} else {\n\t\t\t\tlookb++;\n\t\t\t\tif (lookb >= n) {\n\t\t\t\t\tlookb--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n/*\t\tfor (int i = 0; i < q.length; i++) {\n\t\t\tSystem.out.println(q[i]);\n\t\t}\n*/\n\t\tint sub=x;\n\t\tint ans=0;\nfor(int i=0;i<q.length;i++){\nif(sub>Math.abs(q[i]-x)){\n\tsub=Math.abs(q[i]-x);\n\tans=q[i];\n}\n}System.out.println(ans);\n}\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\nif(n==0){System.out.println(x);}else{\n\t\tint p[] = new int[n];\n\t\tint q[] = new int[102 - n];\n\t\tq[0] = 0;\n\t\tq[101 - n] = 101;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\n\t\tArrays.sort(p);\n\t\tint look = 0;\n\t\tint lookb = 0;\n\t\tfor (int i = 0; i <= 101; i++) {\n\t\t\tif (!(p[lookb] == i)) {\n\t\t\t\t// System.out.println(\"!\"+i);\n\t\t\t\tq[look] = i;\n\t\t\t\tlook++;\n\n\t\t\t} else {\n\t\t\t\tlookb++;\n\t\t\t\tif (lookb >= n) {\n\t\t\t\t\tlookb--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n/*\t\tfor (int i = 0; i < q.length; i++) {\n\t\t\tSystem.out.println(q[i]);\n\t\t}\n*/\n\t\tint sub=x;\n\t\tint ans=0;\nfor(int i=0;i<q.length;i++){\nif(sub>Math.abs(q[i]-x)){\n\tsub=Math.abs(q[i]-x);\n\tans=q[i];\n}\n}System.out.println(ans);\n}\n\t}\n}", "Main" ]
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int n = sc.nextInt(); if(n==0){System.out.println(x);}else{ int p[] = new int[n]; int q[] = new int[102 - n]; q[0] = 0; q[101 - n] = 101; for (int i = 0; i < n; i++) { p[i] = sc.nextInt(); } Arrays.sort(p); int look = 0; int lookb = 0; for (int i = 0; i <= 101; i++) { if (!(p[lookb] == i)) { // System.out.println("!"+i); q[look] = i; look++; } else { lookb++; if (lookb >= n) { lookb--; } } } /* for (int i = 0; i < q.length; i++) { System.out.println(q[i]); } */ int sub=x; int ans=0; for(int i=0;i<q.length;i++){ if(sub>Math.abs(q[i]-x)){ sub=Math.abs(q[i]-x); ans=q[i]; } }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, 13, 41, 13, 20, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 0, 18, 13, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 14, 2, 18, 13, 13, 17, 14, 2, 13, 4, 18, 13, 2, 13, 13, 30, 0, 13, 4, 18, 13, 2, 13, 13, 0, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 116, 5 ], [ 116, 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 ], [ 29, 31 ], [ 8, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 32, 37 ], [ 37, 38 ], [ 37, 39 ], [ 32, 40 ], [ 40, 41 ], [ 41, 42 ], [ 32, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 44, 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 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 65, 66 ], [ 61, 67 ], [ 8, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 73, 74 ], [ 73, 75 ], [ 68, 76 ], [ 76, 77 ], [ 77, 78 ], [ 68, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 81, 85 ], [ 80, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 90, 91 ], [ 89, 92 ], [ 92, 93 ], [ 92, 94 ], [ 86, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 99, 100 ], [ 98, 101 ], [ 101, 102 ], [ 101, 103 ], [ 95, 104 ], [ 104, 105 ], [ 104, 106 ], [ 8, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 107, 112 ], [ 6, 113 ], [ 113, 114 ], [ 0, 115 ], [ 115, 116 ], [ 115, 117 ] ]
[ "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 X = sc.nextInt(), N = sc.nextInt(), minDiff = X, pNot[] = new int[102], ans = 0;\n\t\tfor (int i = 0; i <= 101; i++)\n\t\t\tpNot[i] = 1;\n\t\tfor (int i = 0; i < N; i++)\n\t\t\tpNot[sc.nextInt()] = 0;\n\t\tfor (int i = 0; i <= 101; i++)\n\t\t\tif (pNot[i] == 1)\n\t\t\t\tif (minDiff > Math.abs(X - i)) {\n\t\t\t\t\tminDiff = Math.abs(X - i);\n\t\t\t\t\tans = i;\n\t\t\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\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 X = sc.nextInt(), N = sc.nextInt(), minDiff = X, pNot[] = new int[102], ans = 0;\n\t\tfor (int i = 0; i <= 101; i++)\n\t\t\tpNot[i] = 1;\n\t\tfor (int i = 0; i < N; i++)\n\t\t\tpNot[sc.nextInt()] = 0;\n\t\tfor (int i = 0; i <= 101; i++)\n\t\t\tif (pNot[i] == 1)\n\t\t\t\tif (minDiff > Math.abs(X - i)) {\n\t\t\t\t\tminDiff = Math.abs(X - i);\n\t\t\t\t\tans = i;\n\t\t\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt(), N = sc.nextInt(), minDiff = X, pNot[] = new int[102], ans = 0;\n\t\tfor (int i = 0; i <= 101; i++)\n\t\t\tpNot[i] = 1;\n\t\tfor (int i = 0; i < N; i++)\n\t\t\tpNot[sc.nextInt()] = 0;\n\t\tfor (int i = 0; i <= 101; i++)\n\t\t\tif (pNot[i] == 1)\n\t\t\t\tif (minDiff > Math.abs(X - i)) {\n\t\t\t\t\tminDiff = Math.abs(X - i);\n\t\t\t\t\tans = i;\n\t\t\t\t}\n\t\tSystem.out.println(ans);\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt(), N = sc.nextInt(), minDiff = X, pNot[] = new int[102], ans = 0;\n\t\tfor (int i = 0; i <= 101; i++)\n\t\t\tpNot[i] = 1;\n\t\tfor (int i = 0; i < N; i++)\n\t\t\tpNot[sc.nextInt()] = 0;\n\t\tfor (int i = 0; i <= 101; i++)\n\t\t\tif (pNot[i] == 1)\n\t\t\t\tif (minDiff > Math.abs(X - i)) {\n\t\t\t\t\tminDiff = Math.abs(X - i);\n\t\t\t\t\tans = i;\n\t\t\t\t}\n\t\tSystem.out.println(ans);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int X = sc.nextInt()", "X", "sc.nextInt()", "sc.nextInt", "sc", "N = sc.nextInt()", "N", "sc.nextInt()", "sc.nextInt", "sc", "minDiff = X", "minDiff", "X", "pNot[] = new int[102]", "pNot", "new int[102]", "102", "ans = 0;", "ans", "0", "for (int i = 0; i <= 101; i++)\n\t\t\tpNot[i] = 1;", "int i = 0;", "int i = 0;", "i", "0", "i <= 101", "i", "101", "i++", "i++", "i", "pNot[i] = 1;", "pNot[i] = 1", "pNot[i]", "pNot", "i", "1", "for (int i = 0; i < N; i++)\n\t\t\tpNot[sc.nextInt()] = 0;", "int i = 0;", "int i = 0;", "i", "0", "i < N", "i", "N", "i++", "i++", "i", "pNot[sc.nextInt()] = 0;", "pNot[sc.nextInt()] = 0", "pNot[sc.nextInt()]", "pNot", "sc.nextInt()", "sc.nextInt", "sc", "0", "for (int i = 0; i <= 101; i++)\n\t\t\tif (pNot[i] == 1)\n\t\t\t\tif (minDiff > Math.abs(X - i)) {\n\t\t\t\t\tminDiff = Math.abs(X - i);\n\t\t\t\t\tans = i;\n\t\t\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i <= 101", "i", "101", "i++", "i++", "i", "if (pNot[i] == 1)\n\t\t\t\tif (minDiff > Math.abs(X - i)) {\n\t\t\t\t\tminDiff = Math.abs(X - i);\n\t\t\t\t\tans = i;\n\t\t\t\t}", "if (pNot[i] == 1)\n\t\t\t\tif (minDiff > Math.abs(X - i)) {\n\t\t\t\t\tminDiff = Math.abs(X - i);\n\t\t\t\t\tans = i;\n\t\t\t\t}", "pNot[i] == 1", "pNot[i]", "pNot", "i", "1", "if (minDiff > Math.abs(X - i)) {\n\t\t\t\t\tminDiff = Math.abs(X - i);\n\t\t\t\t\tans = i;\n\t\t\t\t}", "minDiff > Math.abs(X - i)", "minDiff", "Math.abs(X - i)", "Math.abs", "Math", "X - i", "X", "i", "{\n\t\t\t\t\tminDiff = Math.abs(X - i);\n\t\t\t\t\tans = i;\n\t\t\t\t}", "minDiff = Math.abs(X - i)", "minDiff", "Math.abs(X - i)", "Math.abs", "Math", "X - i", "X", "i", "ans = i", "ans", "i", "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 X = sc.nextInt(), N = sc.nextInt(), minDiff = X, pNot[] = new int[102], ans = 0;\n\t\tfor (int i = 0; i <= 101; i++)\n\t\t\tpNot[i] = 1;\n\t\tfor (int i = 0; i < N; i++)\n\t\t\tpNot[sc.nextInt()] = 0;\n\t\tfor (int i = 0; i <= 101; i++)\n\t\t\tif (pNot[i] == 1)\n\t\t\t\tif (minDiff > Math.abs(X - i)) {\n\t\t\t\t\tminDiff = Math.abs(X - i);\n\t\t\t\t\tans = i;\n\t\t\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt(), N = sc.nextInt(), minDiff = X, pNot[] = new int[102], ans = 0;\n\t\tfor (int i = 0; i <= 101; i++)\n\t\t\tpNot[i] = 1;\n\t\tfor (int i = 0; i < N; i++)\n\t\t\tpNot[sc.nextInt()] = 0;\n\t\tfor (int i = 0; i <= 101; i++)\n\t\t\tif (pNot[i] == 1)\n\t\t\t\tif (minDiff > Math.abs(X - i)) {\n\t\t\t\t\tminDiff = Math.abs(X - i);\n\t\t\t\t\tans = i;\n\t\t\t\t}\n\t\tSystem.out.println(ans);\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 X = sc.nextInt(), N = sc.nextInt(), minDiff = X, pNot[] = new int[102], ans = 0; for (int i = 0; i <= 101; i++) pNot[i] = 1; for (int i = 0; i < N; i++) pNot[sc.nextInt()] = 0; for (int i = 0; i <= 101; i++) if (pNot[i] == 1) if (minDiff > Math.abs(X - i)) { minDiff = Math.abs(X - i); ans = i; } System.out.println(ans); } }
[ 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, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 13, 41, 13, 40, 17, 41, 13, 17, 14, 2, 13, 17, 0, 13, 13, 14, 2, 13, 18, 13, 17, 0, 13, 13, 14, 2, 13, 18, 13, 2, 13, 17, 0, 13, 13, 30, 14, 2, 13, 18, 13, 17, 0, 13, 2, 13, 17, 14, 2, 2, 18, 13, 2, 13, 17, 13, 2, 2, 18, 13, 2, 13, 17, 18, 13, 2, 13, 17, 17, 0, 13, 2, 13, 17, 30, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 18, 13, 13, 41, 13, 18, 13, 2, 13, 17, 14, 2, 2, 13, 13, 2, 13, 13, 0, 13, 13, 14, 2, 2, 13, 13, 2, 13, 2, 2, 13, 17, 13, 30, 14, 2, 2, 13, 13, 17, 30, 0, 13, 2, 13, 17, 0, 13, 2, 13, 13, 14, 2, 2, 13, 13, 2, 13, 2, 2, 13, 17, 13, 30, 3, 14, 2, 2, 13, 13, 2, 13, 2, 13, 2, 13, 17, 30, 14, 2, 2, 13, 13, 17, 30, 0, 13, 2, 13, 17, 0, 13, 2, 13, 13, 14, 2, 2, 13, 13, 2, 13, 2, 13, 2, 13, 17, 30, 3, 14, 2, 13, 40, 17, 30, 14, 2, 4, 18, 13, 2, 2, 18, 13, 17, 17, 13, 4, 18, 13, 2, 2, 18, 13, 2, 13, 17, 17, 13, 30, 0, 13, 2, 18, 13, 17, 17, 0, 13, 2, 18, 13, 2, 13, 17, 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 ], [ 312, 11 ], [ 312, 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, 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 ], [ 14, 52 ], [ 52, 53 ], [ 53, 54 ], [ 52, 55 ], [ 14, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 14, 60 ], [ 60, 61 ], [ 60, 62 ], [ 14, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 63, 67 ], [ 67, 68 ], [ 67, 69 ], [ 63, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 73, 75 ], [ 70, 76 ], [ 76, 77 ], [ 76, 78 ], [ 70, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 84, 86 ], [ 79, 87 ], [ 87, 88 ], [ 87, 89 ], [ 79, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 94, 96 ], [ 91, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 99, 101 ], [ 91, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 107, 108 ], [ 107, 109 ], [ 104, 110 ], [ 103, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 115, 116 ], [ 115, 117 ], [ 112, 118 ], [ 118, 119 ], [ 118, 120 ], [ 120, 121 ], [ 120, 122 ], [ 111, 123 ], [ 102, 124 ], [ 124, 125 ], [ 124, 126 ], [ 126, 127 ], [ 126, 128 ], [ 102, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 130, 135 ], [ 135, 136 ], [ 135, 137 ], [ 137, 138 ], [ 137, 139 ], [ 130, 140 ], [ 140, 141 ], [ 141, 142 ], [ 130, 143 ], [ 144, 144 ], [ 144, 145 ], [ 145, 146 ], [ 145, 147 ], [ 147, 148 ], [ 147, 149 ], [ 144, 150 ], [ 150, 151 ], [ 150, 152 ], [ 152, 153 ], [ 152, 154 ], [ 154, 155 ], [ 154, 156 ], [ 144, 157 ], [ 157, 158 ], [ 158, 159 ], [ 159, 160 ], [ 159, 161 ], [ 158, 162 ], [ 162, 163 ], [ 162, 164 ], [ 157, 165 ], [ 165, 166 ], [ 165, 167 ], [ 157, 168 ], [ 168, 169 ], [ 169, 170 ], [ 170, 171 ], [ 170, 172 ], [ 169, 173 ], [ 173, 174 ], [ 173, 175 ], [ 175, 176 ], [ 176, 177 ], [ 176, 178 ], [ 175, 179 ], [ 168, 180 ], [ 180, 181 ], [ 181, 182 ], [ 182, 183 ], [ 183, 184 ], [ 183, 185 ], [ 182, 186 ], [ 181, 187 ], [ 187, 188 ], [ 188, 189 ], [ 188, 190 ], [ 190, 191 ], [ 190, 192 ], [ 187, 193 ], [ 193, 194 ], [ 193, 195 ], [ 195, 196 ], [ 195, 197 ], [ 168, 198 ], [ 198, 199 ], [ 199, 200 ], [ 200, 201 ], [ 200, 202 ], [ 199, 203 ], [ 203, 204 ], [ 203, 205 ], [ 205, 206 ], [ 206, 207 ], [ 206, 208 ], [ 205, 209 ], [ 198, 210 ], [ 210, 211 ], [ 198, 212 ], [ 212, 213 ], [ 213, 214 ], [ 214, 215 ], [ 214, 216 ], [ 213, 217 ], [ 217, 218 ], [ 217, 219 ], [ 219, 220 ], [ 219, 221 ], [ 221, 222 ], [ 221, 223 ], [ 212, 224 ], [ 224, 225 ], [ 225, 226 ], [ 226, 227 ], [ 227, 228 ], [ 227, 229 ], [ 226, 230 ], [ 225, 231 ], [ 231, 232 ], [ 232, 233 ], [ 232, 234 ], [ 234, 235 ], [ 234, 236 ], [ 231, 237 ], [ 237, 238 ], [ 237, 239 ], [ 239, 240 ], [ 239, 241 ], [ 212, 242 ], [ 242, 243 ], [ 243, 244 ], [ 244, 245 ], [ 244, 246 ], [ 243, 247 ], [ 247, 248 ], [ 247, 249 ], [ 249, 250 ], [ 249, 251 ], [ 251, 252 ], [ 251, 253 ], [ 242, 254 ], [ 254, 255 ], [ 14, 256 ], [ 256, 257 ], [ 257, 258 ], [ 257, 259 ], [ 259, 260 ], [ 256, 261 ], [ 261, 262 ], [ 262, 263 ], [ 263, 264 ], [ 264, 265 ], [ 265, 266 ], [ 264, 267 ], [ 267, 268 ], [ 268, 269 ], [ 269, 270 ], [ 269, 271 ], [ 268, 272 ], [ 267, 273 ], [ 263, 274 ], [ 274, 275 ], [ 275, 276 ], [ 274, 277 ], [ 277, 278 ], [ 278, 279 ], [ 279, 280 ], [ 279, 281 ], [ 281, 282 ], [ 281, 283 ], [ 278, 284 ], [ 277, 285 ], [ 262, 286 ], [ 286, 287 ], [ 287, 288 ], [ 287, 289 ], [ 289, 290 ], [ 290, 291 ], [ 290, 292 ], [ 289, 293 ], [ 262, 294 ], [ 294, 295 ], [ 294, 296 ], [ 296, 297 ], [ 297, 298 ], [ 297, 299 ], [ 299, 300 ], [ 299, 301 ], [ 296, 302 ], [ 14, 303 ], [ 303, 304 ], [ 304, 305 ], [ 305, 306 ], [ 305, 307 ], [ 303, 308 ], [ 12, 309 ], [ 309, 310 ], [ 0, 311 ], [ 311, 312 ], [ 311, 313 ] ]
[ "import java.util.*;\nimport java.math.RoundingMode;\nimport java.math.BigDecimal;\n \n \n \npublic class Main{\n\t public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] p = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tArrays.sort(p);\n\t\tint ans = -1;\n\t\tint sub = 100;\n\t\tif(n==0) ans = x;\n\t\telse if(x<p[0]) ans=x;\n\t\telse if(x>p[n-1]) ans=x;\n\t\telse {\n\t\t\tif(x==p[0]) ans=x-1;\n\t\t\telse if(p[n-1]==x&&p[n-1]-p[n-2]<=1) ans=x+1;\n\t\t\telse {\n\t\t\t\tfor(int i = 0; i < n-1; i++) {\n\t\t\t\t\tint left = p[i];\n\t\t\t\t\tint right = p[i+1];\n\t\t\t\t\tif(right>x&&left<x) ans = x;\n\t\t\t\t\telse if(left>=x&&sub>left+1-x) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=left+1;\n\t\t\t\t\t\t\t\tsub = ans-x;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(left>=x&&sub<left+1-x) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub>x-(right-1)) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=right-1;\n\t\t\t\t\t\t\t\tsub = x-ans;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub<x-(right-1)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(ans==-1) {\n\t\t\tif(Math.abs((p[0]-1)-x)<=Math.abs((p[n-1]+1)-x)) {\n\t\t\t\tans = p[0]-1;\n\t\t\t}\n\t\t\telse ans =p[n-1]+1;\n\t\t}\n\t\tSystem.out.println(ans);\n\t }\n}", "import java.util.*;", "util.*", "java", "import java.math.RoundingMode;", "RoundingMode", "java.math", "import java.math.BigDecimal;", "BigDecimal", "java.math", "public class Main{\n\t public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] p = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tArrays.sort(p);\n\t\tint ans = -1;\n\t\tint sub = 100;\n\t\tif(n==0) ans = x;\n\t\telse if(x<p[0]) ans=x;\n\t\telse if(x>p[n-1]) ans=x;\n\t\telse {\n\t\t\tif(x==p[0]) ans=x-1;\n\t\t\telse if(p[n-1]==x&&p[n-1]-p[n-2]<=1) ans=x+1;\n\t\t\telse {\n\t\t\t\tfor(int i = 0; i < n-1; i++) {\n\t\t\t\t\tint left = p[i];\n\t\t\t\t\tint right = p[i+1];\n\t\t\t\t\tif(right>x&&left<x) ans = x;\n\t\t\t\t\telse if(left>=x&&sub>left+1-x) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=left+1;\n\t\t\t\t\t\t\t\tsub = ans-x;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(left>=x&&sub<left+1-x) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub>x-(right-1)) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=right-1;\n\t\t\t\t\t\t\t\tsub = x-ans;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub<x-(right-1)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(ans==-1) {\n\t\t\tif(Math.abs((p[0]-1)-x)<=Math.abs((p[n-1]+1)-x)) {\n\t\t\t\tans = p[0]-1;\n\t\t\t}\n\t\t\telse ans =p[n-1]+1;\n\t\t}\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 x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] p = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tArrays.sort(p);\n\t\tint ans = -1;\n\t\tint sub = 100;\n\t\tif(n==0) ans = x;\n\t\telse if(x<p[0]) ans=x;\n\t\telse if(x>p[n-1]) ans=x;\n\t\telse {\n\t\t\tif(x==p[0]) ans=x-1;\n\t\t\telse if(p[n-1]==x&&p[n-1]-p[n-2]<=1) ans=x+1;\n\t\t\telse {\n\t\t\t\tfor(int i = 0; i < n-1; i++) {\n\t\t\t\t\tint left = p[i];\n\t\t\t\t\tint right = p[i+1];\n\t\t\t\t\tif(right>x&&left<x) ans = x;\n\t\t\t\t\telse if(left>=x&&sub>left+1-x) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=left+1;\n\t\t\t\t\t\t\t\tsub = ans-x;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(left>=x&&sub<left+1-x) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub>x-(right-1)) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=right-1;\n\t\t\t\t\t\t\t\tsub = x-ans;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub<x-(right-1)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(ans==-1) {\n\t\t\tif(Math.abs((p[0]-1)-x)<=Math.abs((p[n-1]+1)-x)) {\n\t\t\t\tans = p[0]-1;\n\t\t\t}\n\t\t\telse ans =p[n-1]+1;\n\t\t}\n\t\tSystem.out.println(ans);\n\t }", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] p = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tArrays.sort(p);\n\t\tint ans = -1;\n\t\tint sub = 100;\n\t\tif(n==0) ans = x;\n\t\telse if(x<p[0]) ans=x;\n\t\telse if(x>p[n-1]) ans=x;\n\t\telse {\n\t\t\tif(x==p[0]) ans=x-1;\n\t\t\telse if(p[n-1]==x&&p[n-1]-p[n-2]<=1) ans=x+1;\n\t\t\telse {\n\t\t\t\tfor(int i = 0; i < n-1; i++) {\n\t\t\t\t\tint left = p[i];\n\t\t\t\t\tint right = p[i+1];\n\t\t\t\t\tif(right>x&&left<x) ans = x;\n\t\t\t\t\telse if(left>=x&&sub>left+1-x) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=left+1;\n\t\t\t\t\t\t\t\tsub = ans-x;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(left>=x&&sub<left+1-x) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub>x-(right-1)) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=right-1;\n\t\t\t\t\t\t\t\tsub = x-ans;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub<x-(right-1)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(ans==-1) {\n\t\t\tif(Math.abs((p[0]-1)-x)<=Math.abs((p[n-1]+1)-x)) {\n\t\t\t\tans = p[0]-1;\n\t\t\t}\n\t\t\telse ans =p[n-1]+1;\n\t\t}\n\t\tSystem.out.println(ans);\n\t }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int[] p = new int[n];", "p", "new int[n]", "n", "for(int i = 0; i < n; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tp[i] = sc.nextInt();\n\t\t}", "{\n\t\t\tp[i] = sc.nextInt();\n\t\t}", "p[i] = sc.nextInt()", "p[i]", "p", "i", "sc.nextInt()", "sc.nextInt", "sc", "Arrays.sort(p)", "Arrays.sort", "Arrays", "p", "int ans = -1;", "ans", "-1", "1", "int sub = 100;", "sub", "100", "if(n==0) ans = x;\n\t\telse if(x<p[0]) ans=x;\n\t\telse if(x>p[n-1]) ans=x;\n\t\telse {\n\t\t\tif(x==p[0]) ans=x-1;\n\t\t\telse if(p[n-1]==x&&p[n-1]-p[n-2]<=1) ans=x+1;\n\t\t\telse {\n\t\t\t\tfor(int i = 0; i < n-1; i++) {\n\t\t\t\t\tint left = p[i];\n\t\t\t\t\tint right = p[i+1];\n\t\t\t\t\tif(right>x&&left<x) ans = x;\n\t\t\t\t\telse if(left>=x&&sub>left+1-x) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=left+1;\n\t\t\t\t\t\t\t\tsub = ans-x;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(left>=x&&sub<left+1-x) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub>x-(right-1)) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=right-1;\n\t\t\t\t\t\t\t\tsub = x-ans;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub<x-(right-1)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "n==0", "n", "0", "ans = x", "ans", "x", "if(x<p[0]) ans=x;\n\t\telse if(x>p[n-1]) ans=x;\n\t\telse {\n\t\t\tif(x==p[0]) ans=x-1;\n\t\t\telse if(p[n-1]==x&&p[n-1]-p[n-2]<=1) ans=x+1;\n\t\t\telse {\n\t\t\t\tfor(int i = 0; i < n-1; i++) {\n\t\t\t\t\tint left = p[i];\n\t\t\t\t\tint right = p[i+1];\n\t\t\t\t\tif(right>x&&left<x) ans = x;\n\t\t\t\t\telse if(left>=x&&sub>left+1-x) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=left+1;\n\t\t\t\t\t\t\t\tsub = ans-x;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(left>=x&&sub<left+1-x) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub>x-(right-1)) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=right-1;\n\t\t\t\t\t\t\t\tsub = x-ans;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub<x-(right-1)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "x<p[0]", "x", "p[0]", "p", "0", "ans=x", "ans", "x", "if(x>p[n-1]) ans=x;\n\t\telse {\n\t\t\tif(x==p[0]) ans=x-1;\n\t\t\telse if(p[n-1]==x&&p[n-1]-p[n-2]<=1) ans=x+1;\n\t\t\telse {\n\t\t\t\tfor(int i = 0; i < n-1; i++) {\n\t\t\t\t\tint left = p[i];\n\t\t\t\t\tint right = p[i+1];\n\t\t\t\t\tif(right>x&&left<x) ans = x;\n\t\t\t\t\telse if(left>=x&&sub>left+1-x) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=left+1;\n\t\t\t\t\t\t\t\tsub = ans-x;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(left>=x&&sub<left+1-x) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub>x-(right-1)) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=right-1;\n\t\t\t\t\t\t\t\tsub = x-ans;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub<x-(right-1)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "x>p[n-1]", "x", "p[n-1]", "p", "n-1", "n", "1", "ans=x", "ans", "x", "{\n\t\t\tif(x==p[0]) ans=x-1;\n\t\t\telse if(p[n-1]==x&&p[n-1]-p[n-2]<=1) ans=x+1;\n\t\t\telse {\n\t\t\t\tfor(int i = 0; i < n-1; i++) {\n\t\t\t\t\tint left = p[i];\n\t\t\t\t\tint right = p[i+1];\n\t\t\t\t\tif(right>x&&left<x) ans = x;\n\t\t\t\t\telse if(left>=x&&sub>left+1-x) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=left+1;\n\t\t\t\t\t\t\t\tsub = ans-x;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(left>=x&&sub<left+1-x) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub>x-(right-1)) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=right-1;\n\t\t\t\t\t\t\t\tsub = x-ans;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub<x-(right-1)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "if(x==p[0]) ans=x-1;\n\t\t\telse if(p[n-1]==x&&p[n-1]-p[n-2]<=1) ans=x+1;\n\t\t\telse {\n\t\t\t\tfor(int i = 0; i < n-1; i++) {\n\t\t\t\t\tint left = p[i];\n\t\t\t\t\tint right = p[i+1];\n\t\t\t\t\tif(right>x&&left<x) ans = x;\n\t\t\t\t\telse if(left>=x&&sub>left+1-x) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=left+1;\n\t\t\t\t\t\t\t\tsub = ans-x;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(left>=x&&sub<left+1-x) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub>x-(right-1)) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=right-1;\n\t\t\t\t\t\t\t\tsub = x-ans;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub<x-(right-1)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "x==p[0]", "x", "p[0]", "p", "0", "ans=x-1", "ans", "x-1", "x", "1", "if(p[n-1]==x&&p[n-1]-p[n-2]<=1) ans=x+1;\n\t\t\telse {\n\t\t\t\tfor(int i = 0; i < n-1; i++) {\n\t\t\t\t\tint left = p[i];\n\t\t\t\t\tint right = p[i+1];\n\t\t\t\t\tif(right>x&&left<x) ans = x;\n\t\t\t\t\telse if(left>=x&&sub>left+1-x) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=left+1;\n\t\t\t\t\t\t\t\tsub = ans-x;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(left>=x&&sub<left+1-x) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub>x-(right-1)) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=right-1;\n\t\t\t\t\t\t\t\tsub = x-ans;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub<x-(right-1)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "p[n-1]==x&&p[n-1]-p[n-2]<=1", "p[n-1]==x", "p[n-1]", "p", "n-1", "n", "1", "x", "p[n-1]-p[n-2]<=1", "p[n-1]-p[n-2]", "p[n-1]", "p", "n-1", "n", "1", "p[n-2]", "p", "n-2", "n", "2", "1", "ans=x+1", "ans", "x+1", "x", "1", "{\n\t\t\t\tfor(int i = 0; i < n-1; i++) {\n\t\t\t\t\tint left = p[i];\n\t\t\t\t\tint right = p[i+1];\n\t\t\t\t\tif(right>x&&left<x) ans = x;\n\t\t\t\t\telse if(left>=x&&sub>left+1-x) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=left+1;\n\t\t\t\t\t\t\t\tsub = ans-x;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(left>=x&&sub<left+1-x) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub>x-(right-1)) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=right-1;\n\t\t\t\t\t\t\t\tsub = x-ans;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub<x-(right-1)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for(int i = 0; i < n-1; i++) {\n\t\t\t\t\tint left = p[i];\n\t\t\t\t\tint right = p[i+1];\n\t\t\t\t\tif(right>x&&left<x) ans = x;\n\t\t\t\t\telse if(left>=x&&sub>left+1-x) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=left+1;\n\t\t\t\t\t\t\t\tsub = ans-x;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(left>=x&&sub<left+1-x) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub>x-(right-1)) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=right-1;\n\t\t\t\t\t\t\t\tsub = x-ans;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub<x-(right-1)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n\t\t\t\t\tint left = p[i];\n\t\t\t\t\tint right = p[i+1];\n\t\t\t\t\tif(right>x&&left<x) ans = x;\n\t\t\t\t\telse if(left>=x&&sub>left+1-x) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=left+1;\n\t\t\t\t\t\t\t\tsub = ans-x;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(left>=x&&sub<left+1-x) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub>x-(right-1)) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=right-1;\n\t\t\t\t\t\t\t\tsub = x-ans;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub<x-(right-1)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tint left = p[i];\n\t\t\t\t\tint right = p[i+1];\n\t\t\t\t\tif(right>x&&left<x) ans = x;\n\t\t\t\t\telse if(left>=x&&sub>left+1-x) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=left+1;\n\t\t\t\t\t\t\t\tsub = ans-x;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(left>=x&&sub<left+1-x) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub>x-(right-1)) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=right-1;\n\t\t\t\t\t\t\t\tsub = x-ans;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub<x-(right-1)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t}", "int left = p[i];", "left", "p[i]", "p", "i", "int right = p[i+1];", "right", "p[i+1]", "p", "i+1", "i", "1", "if(right>x&&left<x) ans = x;\n\t\t\t\t\telse if(left>=x&&sub>left+1-x) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=left+1;\n\t\t\t\t\t\t\t\tsub = ans-x;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(left>=x&&sub<left+1-x) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub>x-(right-1)) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=right-1;\n\t\t\t\t\t\t\t\tsub = x-ans;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub<x-(right-1)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}", "right>x&&left<x", "right>x", "right", "x", "left<x", "left", "x", "ans = x", "ans", "x", "if(left>=x&&sub>left+1-x) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=left+1;\n\t\t\t\t\t\t\t\tsub = ans-x;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(left>=x&&sub<left+1-x) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub>x-(right-1)) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=right-1;\n\t\t\t\t\t\t\t\tsub = x-ans;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub<x-(right-1)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}", "left>=x&&sub>left+1-x", "left>=x", "left", "x", "sub>left+1-x", "sub", "left+1-x", "left+1", "left", "1", "x", "{\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=left+1;\n\t\t\t\t\t\t\t\tsub = ans-x;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "if(right-left>1) {\n\t\t\t\t\t\t\t\tans=left+1;\n\t\t\t\t\t\t\t\tsub = ans-x;\n\t\t\t\t\t\t\t}", "right-left>1", "right-left", "right", "left", "1", "{\n\t\t\t\t\t\t\t\tans=left+1;\n\t\t\t\t\t\t\t\tsub = ans-x;\n\t\t\t\t\t\t\t}", "ans=left+1", "ans", "left+1", "left", "1", "sub = ans-x", "sub", "ans-x", "ans", "x", "if(left>=x&&sub<left+1-x) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub>x-(right-1)) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=right-1;\n\t\t\t\t\t\t\t\tsub = x-ans;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub<x-(right-1)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}", "left>=x&&sub<left+1-x", "left>=x", "left", "x", "sub<left+1-x", "sub", "left+1-x", "left+1", "left", "1", "x", "{\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}", "break;", "if(right<=x&&sub>x-(right-1)) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=right-1;\n\t\t\t\t\t\t\t\tsub = x-ans;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub<x-(right-1)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}", "right<=x&&sub>x-(right-1)", "right<=x", "right", "x", "sub>x-(right-1)", "sub", "x-(right-1)", "x", "(right-1)", "right", "1", "{\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=right-1;\n\t\t\t\t\t\t\t\tsub = x-ans;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "if(right-left>1) {\n\t\t\t\t\t\t\t\tans=right-1;\n\t\t\t\t\t\t\t\tsub = x-ans;\n\t\t\t\t\t\t\t}", "right-left>1", "right-left", "right", "left", "1", "{\n\t\t\t\t\t\t\t\tans=right-1;\n\t\t\t\t\t\t\t\tsub = x-ans;\n\t\t\t\t\t\t\t}", "ans=right-1", "ans", "right-1", "right", "1", "sub = x-ans", "sub", "x-ans", "x", "ans", "if(right<=x&&sub<x-(right-1)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}", "right<=x&&sub<x-(right-1)", "right<=x", "right", "x", "sub<x-(right-1)", "sub", "x-(right-1)", "x", "(right-1)", "right", "1", "{\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}", "break;", "if(ans==-1) {\n\t\t\tif(Math.abs((p[0]-1)-x)<=Math.abs((p[n-1]+1)-x)) {\n\t\t\t\tans = p[0]-1;\n\t\t\t}\n\t\t\telse ans =p[n-1]+1;\n\t\t}", "ans==-1", "ans", "-1", "1", "{\n\t\t\tif(Math.abs((p[0]-1)-x)<=Math.abs((p[n-1]+1)-x)) {\n\t\t\t\tans = p[0]-1;\n\t\t\t}\n\t\t\telse ans =p[n-1]+1;\n\t\t}", "if(Math.abs((p[0]-1)-x)<=Math.abs((p[n-1]+1)-x)) {\n\t\t\t\tans = p[0]-1;\n\t\t\t}\n\t\t\telse ans =p[n-1]+1;", "Math.abs((p[0]-1)-x)<=Math.abs((p[n-1]+1)-x)", "Math.abs((p[0]-1)-x)", "Math.abs", "Math", "(p[0]-1)-x", "(p[0]-1)", "p[0]", "p", "0", "1", "x", "Math.abs((p[n-1]+1)-x)", "Math.abs", "Math", "(p[n-1]+1)-x", "(p[n-1]+1)", "p[n-1]", "p", "n-1", "n", "1", "1", "x", "{\n\t\t\t\tans = p[0]-1;\n\t\t\t}", "ans = p[0]-1", "ans", "p[0]-1", "p[0]", "p", "0", "1", "ans =p[n-1]+1", "ans", "p[n-1]+1", "p[n-1]", "p", "n-1", "n", "1", "1", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "public class Main{\n\t public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] p = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tArrays.sort(p);\n\t\tint ans = -1;\n\t\tint sub = 100;\n\t\tif(n==0) ans = x;\n\t\telse if(x<p[0]) ans=x;\n\t\telse if(x>p[n-1]) ans=x;\n\t\telse {\n\t\t\tif(x==p[0]) ans=x-1;\n\t\t\telse if(p[n-1]==x&&p[n-1]-p[n-2]<=1) ans=x+1;\n\t\t\telse {\n\t\t\t\tfor(int i = 0; i < n-1; i++) {\n\t\t\t\t\tint left = p[i];\n\t\t\t\t\tint right = p[i+1];\n\t\t\t\t\tif(right>x&&left<x) ans = x;\n\t\t\t\t\telse if(left>=x&&sub>left+1-x) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=left+1;\n\t\t\t\t\t\t\t\tsub = ans-x;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(left>=x&&sub<left+1-x) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub>x-(right-1)) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=right-1;\n\t\t\t\t\t\t\t\tsub = x-ans;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub<x-(right-1)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(ans==-1) {\n\t\t\tif(Math.abs((p[0]-1)-x)<=Math.abs((p[n-1]+1)-x)) {\n\t\t\t\tans = p[0]-1;\n\t\t\t}\n\t\t\telse ans =p[n-1]+1;\n\t\t}\n\t\tSystem.out.println(ans);\n\t }\n}", "public class Main{\n\t public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] p = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tp[i] = sc.nextInt();\n\t\t}\n\t\tArrays.sort(p);\n\t\tint ans = -1;\n\t\tint sub = 100;\n\t\tif(n==0) ans = x;\n\t\telse if(x<p[0]) ans=x;\n\t\telse if(x>p[n-1]) ans=x;\n\t\telse {\n\t\t\tif(x==p[0]) ans=x-1;\n\t\t\telse if(p[n-1]==x&&p[n-1]-p[n-2]<=1) ans=x+1;\n\t\t\telse {\n\t\t\t\tfor(int i = 0; i < n-1; i++) {\n\t\t\t\t\tint left = p[i];\n\t\t\t\t\tint right = p[i+1];\n\t\t\t\t\tif(right>x&&left<x) ans = x;\n\t\t\t\t\telse if(left>=x&&sub>left+1-x) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=left+1;\n\t\t\t\t\t\t\t\tsub = ans-x;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(left>=x&&sub<left+1-x) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub>x-(right-1)) {\n\t\t\t\t\t\t\tif(right-left>1) {\n\t\t\t\t\t\t\t\tans=right-1;\n\t\t\t\t\t\t\t\tsub = x-ans;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(right<=x&&sub<x-(right-1)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(ans==-1) {\n\t\t\tif(Math.abs((p[0]-1)-x)<=Math.abs((p[n-1]+1)-x)) {\n\t\t\t\tans = p[0]-1;\n\t\t\t}\n\t\t\telse ans =p[n-1]+1;\n\t\t}\n\t\tSystem.out.println(ans);\n\t }\n}", "Main" ]
import java.util.*; import java.math.RoundingMode; import java.math.BigDecimal; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int n = sc.nextInt(); int[] p = new int[n]; for(int i = 0; i < n; i++) { p[i] = sc.nextInt(); } Arrays.sort(p); int ans = -1; int sub = 100; if(n==0) ans = x; else if(x<p[0]) ans=x; else if(x>p[n-1]) ans=x; else { if(x==p[0]) ans=x-1; else if(p[n-1]==x&&p[n-1]-p[n-2]<=1) ans=x+1; else { for(int i = 0; i < n-1; i++) { int left = p[i]; int right = p[i+1]; if(right>x&&left<x) ans = x; else if(left>=x&&sub>left+1-x) { if(right-left>1) { ans=left+1; sub = ans-x; } } else if(left>=x&&sub<left+1-x) { break; } else if(right<=x&&sub>x-(right-1)) { if(right-left>1) { ans=right-1; sub = x-ans; } } else if(right<=x&&sub<x-(right-1)) { break; } } } } if(ans==-1) { if(Math.abs((p[0]-1)-x)<=Math.abs((p[n-1]+1)-x)) { ans = p[0]-1; } else ans =p[n-1]+1; } 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, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 40, 17, 41, 13, 41, 13, 41, 13, 17, 41, 13, 40, 17, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 18, 13, 13, 30, 40, 13, 0, 13, 18, 13, 13, 14, 2, 2, 13, 13, 18, 13, 13, 30, 40, 13, 0, 13, 18, 13, 13, 14, 2, 2, 13, 17, 2, 13, 17, 30, 14, 2, 13, 2, 13, 13, 30, 0, 13, 2, 13, 13, 14, 2, 13, 2, 13, 13, 30, 0, 13, 2, 13, 13, 3, 14, 2, 13, 17, 30, 0, 13, 2, 13, 13, 3, 0, 13, 17, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 176, 5 ], [ 176, 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 ], [ 48, 49 ], [ 8, 50 ], [ 50, 51 ], [ 8, 52 ], [ 52, 53 ], [ 8, 54 ], [ 54, 55 ], [ 54, 56 ], [ 8, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 8, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 61, 66 ], [ 66, 67 ], [ 66, 68 ], [ 61, 69 ], [ 69, 70 ], [ 70, 71 ], [ 61, 72 ], [ 73, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 74, 79 ], [ 79, 80 ], [ 79, 81 ], [ 74, 82 ], [ 82, 83 ], [ 83, 84 ], [ 74, 85 ], [ 86, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 88, 92 ], [ 92, 93 ], [ 92, 94 ], [ 87, 95 ], [ 95, 96 ], [ 96, 97 ], [ 95, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 100, 102 ], [ 87, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 104, 108 ], [ 108, 109 ], [ 108, 110 ], [ 103, 111 ], [ 111, 112 ], [ 112, 113 ], [ 111, 114 ], [ 114, 115 ], [ 114, 116 ], [ 116, 117 ], [ 116, 118 ], [ 73, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 120, 124 ], [ 124, 125 ], [ 124, 126 ], [ 119, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 131, 132 ], [ 131, 133 ], [ 128, 134 ], [ 134, 135 ], [ 135, 136 ], [ 135, 137 ], [ 137, 138 ], [ 137, 139 ], [ 128, 140 ], [ 140, 141 ], [ 141, 142 ], [ 141, 143 ], [ 143, 144 ], [ 143, 145 ], [ 140, 146 ], [ 146, 147 ], [ 147, 148 ], [ 147, 149 ], [ 149, 150 ], [ 149, 151 ], [ 127, 152 ], [ 119, 153 ], [ 153, 154 ], [ 154, 155 ], [ 154, 156 ], [ 153, 157 ], [ 157, 158 ], [ 158, 159 ], [ 158, 160 ], [ 160, 161 ], [ 160, 162 ], [ 157, 163 ], [ 73, 164 ], [ 164, 165 ], [ 164, 166 ], [ 8, 167 ], [ 167, 168 ], [ 168, 169 ], [ 169, 170 ], [ 169, 171 ], [ 167, 172 ], [ 6, 173 ], [ 173, 174 ], [ 0, 175 ], [ 175, 176 ], [ 175, 177 ] ]
[ "import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int x = sc.nextInt();\n int n = sc.nextInt();\n int[] p = new int[n];\n for(int i = 0; i<n; i++){\n p[i] = sc.nextInt();\n }\n\n int ans = -100000000;\n int ansLow, ansHigh;\n int count = 0;\n int matchNotAns = -1000000000;\n\n for(int j = 0; j<1000; j++){\n for(int k = 0; k<n; k++){\n if(x - j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n else if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n }\n if(count == 1 && j!=0){\n if(matchNotAns == x - j){\n ans = x + j;\n }\n else if(matchNotAns == x + j){\n ans = x - j;\n }\n break;\n }\n else if(count == 0){\n ans = x - j;\n break;\n }\n count = 0;\n }\n System.out.println(ans);\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\n int x = sc.nextInt();\n int n = sc.nextInt();\n int[] p = new int[n];\n for(int i = 0; i<n; i++){\n p[i] = sc.nextInt();\n }\n\n int ans = -100000000;\n int ansLow, ansHigh;\n int count = 0;\n int matchNotAns = -1000000000;\n\n for(int j = 0; j<1000; j++){\n for(int k = 0; k<n; k++){\n if(x - j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n else if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n }\n if(count == 1 && j!=0){\n if(matchNotAns == x - j){\n ans = x + j;\n }\n else if(matchNotAns == x + j){\n ans = x - j;\n }\n break;\n }\n else if(count == 0){\n ans = x - j;\n break;\n }\n count = 0;\n }\n System.out.println(ans);\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int x = sc.nextInt();\n int n = sc.nextInt();\n int[] p = new int[n];\n for(int i = 0; i<n; i++){\n p[i] = sc.nextInt();\n }\n\n int ans = -100000000;\n int ansLow, ansHigh;\n int count = 0;\n int matchNotAns = -1000000000;\n\n for(int j = 0; j<1000; j++){\n for(int k = 0; k<n; k++){\n if(x - j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n else if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n }\n if(count == 1 && j!=0){\n if(matchNotAns == x - j){\n ans = x + j;\n }\n else if(matchNotAns == x + j){\n ans = x - j;\n }\n break;\n }\n else if(count == 0){\n ans = x - j;\n break;\n }\n count = 0;\n }\n System.out.println(ans);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n\n int x = sc.nextInt();\n int n = sc.nextInt();\n int[] p = new int[n];\n for(int i = 0; i<n; i++){\n p[i] = sc.nextInt();\n }\n\n int ans = -100000000;\n int ansLow, ansHigh;\n int count = 0;\n int matchNotAns = -1000000000;\n\n for(int j = 0; j<1000; j++){\n for(int k = 0; k<n; k++){\n if(x - j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n else if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n }\n if(count == 1 && j!=0){\n if(matchNotAns == x - j){\n ans = x + j;\n }\n else if(matchNotAns == x + j){\n ans = x - j;\n }\n break;\n }\n else if(count == 0){\n ans = x - j;\n break;\n }\n count = 0;\n }\n System.out.println(ans);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int[] p = new int[n];", "p", "new int[n]", "n", "for(int i = 0; i<n; i++){\n p[i] = sc.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n p[i] = sc.nextInt();\n }", "{\n p[i] = sc.nextInt();\n }", "p[i] = sc.nextInt()", "p[i]", "p", "i", "sc.nextInt()", "sc.nextInt", "sc", "int ans = -100000000;", "ans", "-100000000", "100000000", "int ansLow", "ansLow", "ansHigh;", "ansHigh", "int count = 0;", "count", "0", "int matchNotAns = -1000000000;", "matchNotAns", "-1000000000", "1000000000", "for(int j = 0; j<1000; j++){\n for(int k = 0; k<n; k++){\n if(x - j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n else if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n }\n if(count == 1 && j!=0){\n if(matchNotAns == x - j){\n ans = x + j;\n }\n else if(matchNotAns == x + j){\n ans = x - j;\n }\n break;\n }\n else if(count == 0){\n ans = x - j;\n break;\n }\n count = 0;\n }", "int j = 0;", "int j = 0;", "j", "0", "j<1000", "j", "1000", "j++", "j++", "j", "{\n for(int k = 0; k<n; k++){\n if(x - j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n else if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n }\n if(count == 1 && j!=0){\n if(matchNotAns == x - j){\n ans = x + j;\n }\n else if(matchNotAns == x + j){\n ans = x - j;\n }\n break;\n }\n else if(count == 0){\n ans = x - j;\n break;\n }\n count = 0;\n }", "{\n for(int k = 0; k<n; k++){\n if(x - j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n else if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n }\n if(count == 1 && j!=0){\n if(matchNotAns == x - j){\n ans = x + j;\n }\n else if(matchNotAns == x + j){\n ans = x - j;\n }\n break;\n }\n else if(count == 0){\n ans = x - j;\n break;\n }\n count = 0;\n }", "for(int k = 0; k<n; k++){\n if(x - j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n else if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n }", "int k = 0;", "int k = 0;", "k", "0", "k<n", "k", "n", "k++", "k++", "k", "{\n if(x - j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n else if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n }", "{\n if(x - j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n else if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n }", "if(x - j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n else if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }", "x - j == p[k]", "x - j", "x", "j", "p[k]", "p", "k", "{\n count++;\n matchNotAns = p[k];\n }", "count++", "count", "matchNotAns = p[k]", "matchNotAns", "p[k]", "p", "k", "if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }", "x + j == p[k]", "x + j", "x", "j", "p[k]", "p", "k", "{\n count++;\n matchNotAns = p[k];\n }", "count++", "count", "matchNotAns = p[k]", "matchNotAns", "p[k]", "p", "k", "if(count == 1 && j!=0){\n if(matchNotAns == x - j){\n ans = x + j;\n }\n else if(matchNotAns == x + j){\n ans = x - j;\n }\n break;\n }\n else if(count == 0){\n ans = x - j;\n break;\n }", "count == 1 && j!=0", "count == 1", "count", "1", "j!=0", "j", "0", "{\n if(matchNotAns == x - j){\n ans = x + j;\n }\n else if(matchNotAns == x + j){\n ans = x - j;\n }\n break;\n }", "if(matchNotAns == x - j){\n ans = x + j;\n }\n else if(matchNotAns == x + j){\n ans = x - j;\n }", "matchNotAns == x - j", "matchNotAns", "x - j", "x", "j", "{\n ans = x + j;\n }", "ans = x + j", "ans", "x + j", "x", "j", "if(matchNotAns == x + j){\n ans = x - j;\n }", "matchNotAns == x + j", "matchNotAns", "x + j", "x", "j", "{\n ans = x - j;\n }", "ans = x - j", "ans", "x - j", "x", "j", "break;", "if(count == 0){\n ans = x - j;\n break;\n }", "count == 0", "count", "0", "{\n ans = x - j;\n break;\n }", "ans = x - j", "ans", "x - j", "x", "j", "break;", "count = 0", "count", "0", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int x = sc.nextInt();\n int n = sc.nextInt();\n int[] p = new int[n];\n for(int i = 0; i<n; i++){\n p[i] = sc.nextInt();\n }\n\n int ans = -100000000;\n int ansLow, ansHigh;\n int count = 0;\n int matchNotAns = -1000000000;\n\n for(int j = 0; j<1000; j++){\n for(int k = 0; k<n; k++){\n if(x - j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n else if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n }\n if(count == 1 && j!=0){\n if(matchNotAns == x - j){\n ans = x + j;\n }\n else if(matchNotAns == x + j){\n ans = x - j;\n }\n break;\n }\n else if(count == 0){\n ans = x - j;\n break;\n }\n count = 0;\n }\n System.out.println(ans);\n }\n}", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int x = sc.nextInt();\n int n = sc.nextInt();\n int[] p = new int[n];\n for(int i = 0; i<n; i++){\n p[i] = sc.nextInt();\n }\n\n int ans = -100000000;\n int ansLow, ansHigh;\n int count = 0;\n int matchNotAns = -1000000000;\n\n for(int j = 0; j<1000; j++){\n for(int k = 0; k<n; k++){\n if(x - j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n else if(x + j == p[k]){\n count++;\n matchNotAns = p[k];\n }\n }\n if(count == 1 && j!=0){\n if(matchNotAns == x - j){\n ans = x + j;\n }\n else if(matchNotAns == x + j){\n ans = x - j;\n }\n break;\n }\n else if(count == 0){\n ans = x - j;\n break;\n }\n count = 0;\n }\n System.out.println(ans);\n }\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int n = sc.nextInt(); int[] p = new int[n]; for(int i = 0; i<n; i++){ p[i] = sc.nextInt(); } int ans = -100000000; int ansLow, ansHigh; int count = 0; int matchNotAns = -1000000000; for(int j = 0; j<1000; j++){ for(int k = 0; k<n; k++){ if(x - j == p[k]){ count++; matchNotAns = p[k]; } else if(x + j == p[k]){ count++; matchNotAns = p[k]; } } if(count == 1 && j!=0){ if(matchNotAns == x - j){ ans = x + j; } else if(matchNotAns == x + j){ ans = x - j; } break; } else if(count == 0){ ans = x - j; break; } count = 0; } System.out.println(ans); } }
[ 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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 4, 18, 13, 13, 30, 9, 41, 13, 4, 18, 13, 2, 13, 13, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 13, 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 ], [ 101, 8 ], [ 101, 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 ], [ 42, 43 ], [ 41, 44 ], [ 44, 45 ], [ 45, 46 ], [ 11, 47 ], [ 47, 48 ], [ 47, 49 ], [ 11, 50 ], [ 50, 51 ], [ 50, 52 ], [ 11, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 53, 58 ], [ 58, 59 ], [ 58, 60 ], [ 53, 61 ], [ 61, 62 ], [ 62, 63 ], [ 53, 64 ], [ 65, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 67, 70 ], [ 66, 71 ], [ 71, 72 ], [ 65, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 75, 78 ], [ 78, 79 ], [ 78, 80 ], [ 65, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 81, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 85, 89 ], [ 89, 90 ], [ 89, 91 ], [ 11, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 92, 97 ], [ 9, 98 ], [ 98, 99 ], [ 0, 100 ], [ 100, 101 ], [ 100, 102 ] ]
[ "import java.util.HashSet;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tHashSet<Integer> p = new HashSet<Integer>();\n\t\tfor (int i = 0; i < n; ++i) {\n\t\t\tp.add(sc.nextInt());\n\t\t}\n\n\t\tint minAbs = 200;\n\t\tint ans = 0;\n\t\tfor (int possible = 0; possible <= 101; ++possible) {\n\t\t\tif (p.contains(possible)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tint abs = Math.abs(possible - x);\n\t\t\tif (abs < minAbs) {\n\t\t\t\tminAbs = abs;\n\t\t\t\tans = possible;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t}\n}", "import java.util.HashSet;", "HashSet", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tHashSet<Integer> p = new HashSet<Integer>();\n\t\tfor (int i = 0; i < n; ++i) {\n\t\t\tp.add(sc.nextInt());\n\t\t}\n\n\t\tint minAbs = 200;\n\t\tint ans = 0;\n\t\tfor (int possible = 0; possible <= 101; ++possible) {\n\t\t\tif (p.contains(possible)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tint abs = Math.abs(possible - x);\n\t\t\tif (abs < minAbs) {\n\t\t\t\tminAbs = abs;\n\t\t\t\tans = possible;\n\t\t\t}\n\t\t}\n\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 x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tHashSet<Integer> p = new HashSet<Integer>();\n\t\tfor (int i = 0; i < n; ++i) {\n\t\t\tp.add(sc.nextInt());\n\t\t}\n\n\t\tint minAbs = 200;\n\t\tint ans = 0;\n\t\tfor (int possible = 0; possible <= 101; ++possible) {\n\t\t\tif (p.contains(possible)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tint abs = Math.abs(possible - x);\n\t\t\tif (abs < minAbs) {\n\t\t\t\tminAbs = abs;\n\t\t\t\tans = possible;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tHashSet<Integer> p = new HashSet<Integer>();\n\t\tfor (int i = 0; i < n; ++i) {\n\t\t\tp.add(sc.nextInt());\n\t\t}\n\n\t\tint minAbs = 200;\n\t\tint ans = 0;\n\t\tfor (int possible = 0; possible <= 101; ++possible) {\n\t\t\tif (p.contains(possible)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tint abs = Math.abs(possible - x);\n\t\t\tif (abs < minAbs) {\n\t\t\t\tminAbs = abs;\n\t\t\t\tans = possible;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "HashSet<Integer> p = new HashSet<Integer>();", "p", "new HashSet<Integer>()", "for (int i = 0; i < n; ++i) {\n\t\t\tp.add(sc.nextInt());\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "++i", "++i", "i", "{\n\t\t\tp.add(sc.nextInt());\n\t\t}", "{\n\t\t\tp.add(sc.nextInt());\n\t\t}", "p.add(sc.nextInt())", "p.add", "p", "sc.nextInt()", "sc.nextInt", "sc", "int minAbs = 200;", "minAbs", "200", "int ans = 0;", "ans", "0", "for (int possible = 0; possible <= 101; ++possible) {\n\t\t\tif (p.contains(possible)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tint abs = Math.abs(possible - x);\n\t\t\tif (abs < minAbs) {\n\t\t\t\tminAbs = abs;\n\t\t\t\tans = possible;\n\t\t\t}\n\t\t}", "int possible = 0;", "int possible = 0;", "possible", "0", "possible <= 101", "possible", "101", "++possible", "++possible", "possible", "{\n\t\t\tif (p.contains(possible)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tint abs = Math.abs(possible - x);\n\t\t\tif (abs < minAbs) {\n\t\t\t\tminAbs = abs;\n\t\t\t\tans = possible;\n\t\t\t}\n\t\t}", "{\n\t\t\tif (p.contains(possible)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tint abs = Math.abs(possible - x);\n\t\t\tif (abs < minAbs) {\n\t\t\t\tminAbs = abs;\n\t\t\t\tans = possible;\n\t\t\t}\n\t\t}", "if (p.contains(possible)) {\n\t\t\t\tcontinue;\n\t\t\t}", "p.contains(possible)", "p.contains", "p", "possible", "{\n\t\t\t\tcontinue;\n\t\t\t}", "continue;", "int abs = Math.abs(possible - x);", "abs", "Math.abs(possible - x)", "Math.abs", "Math", "possible - x", "possible", "x", "if (abs < minAbs) {\n\t\t\t\tminAbs = abs;\n\t\t\t\tans = possible;\n\t\t\t}", "abs < minAbs", "abs", "minAbs", "{\n\t\t\t\tminAbs = abs;\n\t\t\t\tans = possible;\n\t\t\t}", "minAbs = abs", "minAbs", "abs", "ans = possible", "ans", "possible", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tHashSet<Integer> p = new HashSet<Integer>();\n\t\tfor (int i = 0; i < n; ++i) {\n\t\t\tp.add(sc.nextInt());\n\t\t}\n\n\t\tint minAbs = 200;\n\t\tint ans = 0;\n\t\tfor (int possible = 0; possible <= 101; ++possible) {\n\t\t\tif (p.contains(possible)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tint abs = Math.abs(possible - x);\n\t\t\tif (abs < minAbs) {\n\t\t\t\tminAbs = abs;\n\t\t\t\tans = possible;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tHashSet<Integer> p = new HashSet<Integer>();\n\t\tfor (int i = 0; i < n; ++i) {\n\t\t\tp.add(sc.nextInt());\n\t\t}\n\n\t\tint minAbs = 200;\n\t\tint ans = 0;\n\t\tfor (int possible = 0; possible <= 101; ++possible) {\n\t\t\tif (p.contains(possible)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tint abs = Math.abs(possible - x);\n\t\t\tif (abs < minAbs) {\n\t\t\t\tminAbs = abs;\n\t\t\t\tans = possible;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t}\n}", "Main" ]
import java.util.HashSet; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int n = sc.nextInt(); HashSet<Integer> p = new HashSet<Integer>(); for (int i = 0; i < n; ++i) { p.add(sc.nextInt()); } int minAbs = 200; int ans = 0; for (int possible = 0; possible <= 101; ++possible) { if (p.contains(possible)) { continue; } int abs = Math.abs(possible - x); if (abs < minAbs) { minAbs = abs; ans = possible; } } 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, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 13, 30, 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, 20, 17, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 0, 18, 13, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 18, 13, 13, 0, 18, 13, 13, 17, 14, 2, 18, 13, 13, 17, 30, 4, 18, 18, 13, 13, 13, 30, 41, 13, 17, 41, 13, 17, 42, 2, 13, 17, 30, 14, 2, 18, 13, 2, 13, 13, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 40, 13, 14, 2, 2, 2, 13, 17, 2, 17, 2, 13, 13, 2, 18, 13, 2, 13, 13, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 40, 13, 40, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 184, 5 ], [ 184, 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 ], [ 23, 25 ], [ 22, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 29, 31 ], [ 27, 32 ], [ 22, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 33, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 38, 43 ], [ 43, 44 ], [ 43, 45 ], [ 38, 46 ], [ 46, 47 ], [ 47, 48 ], [ 38, 49 ], [ 50, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 54, 55 ], [ 50, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 56, 60 ], [ 33, 61 ], [ 61, 62 ], [ 61, 63 ], [ 33, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 65, 70 ], [ 70, 71 ], [ 70, 72 ], [ 65, 73 ], [ 73, 74 ], [ 74, 75 ], [ 65, 76 ], [ 77, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 78, 82 ], [ 33, 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 ], [ 98, 100 ], [ 95, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 101, 105 ], [ 33, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 107, 111 ], [ 106, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 113, 118 ], [ 106, 119 ], [ 119, 120 ], [ 120, 121 ], [ 120, 122 ], [ 119, 123 ], [ 123, 124 ], [ 123, 125 ], [ 119, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 126, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 133, 134 ], [ 133, 135 ], [ 135, 136 ], [ 135, 137 ], [ 132, 138 ], [ 131, 139 ], [ 139, 140 ], [ 140, 141 ], [ 141, 142 ], [ 142, 143 ], [ 142, 144 ], [ 140, 145 ], [ 145, 146 ], [ 145, 147 ], [ 139, 148 ], [ 148, 149 ], [ 131, 150 ], [ 150, 151 ], [ 152, 152 ], [ 152, 153 ], [ 153, 154 ], [ 153, 155 ], [ 152, 156 ], [ 156, 157 ], [ 156, 158 ], [ 158, 159 ], [ 158, 160 ], [ 152, 161 ], [ 161, 162 ], [ 162, 163 ], [ 162, 164 ], [ 164, 165 ], [ 164, 166 ], [ 161, 167 ], [ 150, 168 ], [ 168, 169 ], [ 169, 170 ], [ 170, 171 ], [ 171, 172 ], [ 171, 173 ], [ 169, 174 ], [ 174, 175 ], [ 174, 176 ], [ 168, 177 ], [ 177, 178 ], [ 130, 179 ], [ 179, 180 ], [ 6, 181 ], [ 181, 182 ], [ 0, 183 ], [ 183, 184 ], [ 183, 185 ] ]
[ "import java.util.*;\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int x = sc.nextInt();\n int n = sc.nextInt();\n \n if (n == 0) {\n System.out.println(x);\n } else {\n int a[] = new int[n];\n\n for (int i = 0; i < n; i++) {\n int aa = sc.nextInt();\n a[i] = aa;\n }\n \n int b[] = new int[102];\n \n for (int j = 0; j < 102; j++) {\n b[j] = 0;\n }\n \n for (int k = 0; k < n; k++) {\n int aaa = a[k];\n b[aaa] = 1;\n }\n \n if (b[x] == 0) {\n System.out.println(x);\n } else {\n int fin = 0;\n int count = 1;\n while (fin == 0) {\n if (b[x-count] == 0) {\n System.out.println(x-count);\n fin++;\n } else if (fin == 0 && 101 >= x + count && b[x + count] == 0) {\n System.out.println(x+count);\n fin++;\n }\n count++;\n }\n }\n }\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\n int x = sc.nextInt();\n int n = sc.nextInt();\n \n if (n == 0) {\n System.out.println(x);\n } else {\n int a[] = new int[n];\n\n for (int i = 0; i < n; i++) {\n int aa = sc.nextInt();\n a[i] = aa;\n }\n \n int b[] = new int[102];\n \n for (int j = 0; j < 102; j++) {\n b[j] = 0;\n }\n \n for (int k = 0; k < n; k++) {\n int aaa = a[k];\n b[aaa] = 1;\n }\n \n if (b[x] == 0) {\n System.out.println(x);\n } else {\n int fin = 0;\n int count = 1;\n while (fin == 0) {\n if (b[x-count] == 0) {\n System.out.println(x-count);\n fin++;\n } else if (fin == 0 && 101 >= x + count && b[x + count] == 0) {\n System.out.println(x+count);\n fin++;\n }\n count++;\n }\n }\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int x = sc.nextInt();\n int n = sc.nextInt();\n \n if (n == 0) {\n System.out.println(x);\n } else {\n int a[] = new int[n];\n\n for (int i = 0; i < n; i++) {\n int aa = sc.nextInt();\n a[i] = aa;\n }\n \n int b[] = new int[102];\n \n for (int j = 0; j < 102; j++) {\n b[j] = 0;\n }\n \n for (int k = 0; k < n; k++) {\n int aaa = a[k];\n b[aaa] = 1;\n }\n \n if (b[x] == 0) {\n System.out.println(x);\n } else {\n int fin = 0;\n int count = 1;\n while (fin == 0) {\n if (b[x-count] == 0) {\n System.out.println(x-count);\n fin++;\n } else if (fin == 0 && 101 >= x + count && b[x + count] == 0) {\n System.out.println(x+count);\n fin++;\n }\n count++;\n }\n }\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n\n int x = sc.nextInt();\n int n = sc.nextInt();\n \n if (n == 0) {\n System.out.println(x);\n } else {\n int a[] = new int[n];\n\n for (int i = 0; i < n; i++) {\n int aa = sc.nextInt();\n a[i] = aa;\n }\n \n int b[] = new int[102];\n \n for (int j = 0; j < 102; j++) {\n b[j] = 0;\n }\n \n for (int k = 0; k < n; k++) {\n int aaa = a[k];\n b[aaa] = 1;\n }\n \n if (b[x] == 0) {\n System.out.println(x);\n } else {\n int fin = 0;\n int count = 1;\n while (fin == 0) {\n if (b[x-count] == 0) {\n System.out.println(x-count);\n fin++;\n } else if (fin == 0 && 101 >= x + count && b[x + count] == 0) {\n System.out.println(x+count);\n fin++;\n }\n count++;\n }\n }\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "if (n == 0) {\n System.out.println(x);\n } else {\n int a[] = new int[n];\n\n for (int i = 0; i < n; i++) {\n int aa = sc.nextInt();\n a[i] = aa;\n }\n \n int b[] = new int[102];\n \n for (int j = 0; j < 102; j++) {\n b[j] = 0;\n }\n \n for (int k = 0; k < n; k++) {\n int aaa = a[k];\n b[aaa] = 1;\n }\n \n if (b[x] == 0) {\n System.out.println(x);\n } else {\n int fin = 0;\n int count = 1;\n while (fin == 0) {\n if (b[x-count] == 0) {\n System.out.println(x-count);\n fin++;\n } else if (fin == 0 && 101 >= x + count && b[x + count] == 0) {\n System.out.println(x+count);\n fin++;\n }\n count++;\n }\n }\n }", "n == 0", "n", "0", "{\n System.out.println(x);\n }", "System.out.println(x)", "System.out.println", "System.out", "System", "System.out", "x", "{\n int a[] = new int[n];\n\n for (int i = 0; i < n; i++) {\n int aa = sc.nextInt();\n a[i] = aa;\n }\n \n int b[] = new int[102];\n \n for (int j = 0; j < 102; j++) {\n b[j] = 0;\n }\n \n for (int k = 0; k < n; k++) {\n int aaa = a[k];\n b[aaa] = 1;\n }\n \n if (b[x] == 0) {\n System.out.println(x);\n } else {\n int fin = 0;\n int count = 1;\n while (fin == 0) {\n if (b[x-count] == 0) {\n System.out.println(x-count);\n fin++;\n } else if (fin == 0 && 101 >= x + count && b[x + count] == 0) {\n System.out.println(x+count);\n fin++;\n }\n count++;\n }\n }\n }", "int a[] = new int[n];", "a", "new int[n]", "n", "for (int i = 0; i < n; i++) {\n int aa = sc.nextInt();\n a[i] = aa;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n int aa = sc.nextInt();\n a[i] = aa;\n }", "{\n int aa = sc.nextInt();\n a[i] = aa;\n }", "int aa = sc.nextInt();", "aa", "sc.nextInt()", "sc.nextInt", "sc", "a[i] = aa", "a[i]", "a", "i", "aa", "int b[] = new int[102];", "b", "new int[102]", "102", "for (int j = 0; j < 102; j++) {\n b[j] = 0;\n }", "int j = 0;", "int j = 0;", "j", "0", "j < 102", "j", "102", "j++", "j++", "j", "{\n b[j] = 0;\n }", "{\n b[j] = 0;\n }", "b[j] = 0", "b[j]", "b", "j", "0", "for (int k = 0; k < n; k++) {\n int aaa = a[k];\n b[aaa] = 1;\n }", "int k = 0;", "int k = 0;", "k", "0", "k < n", "k", "n", "k++", "k++", "k", "{\n int aaa = a[k];\n b[aaa] = 1;\n }", "{\n int aaa = a[k];\n b[aaa] = 1;\n }", "int aaa = a[k];", "aaa", "a[k]", "a", "k", "b[aaa] = 1", "b[aaa]", "b", "aaa", "1", "if (b[x] == 0) {\n System.out.println(x);\n } else {\n int fin = 0;\n int count = 1;\n while (fin == 0) {\n if (b[x-count] == 0) {\n System.out.println(x-count);\n fin++;\n } else if (fin == 0 && 101 >= x + count && b[x + count] == 0) {\n System.out.println(x+count);\n fin++;\n }\n count++;\n }\n }", "b[x] == 0", "b[x]", "b", "x", "0", "{\n System.out.println(x);\n }", "System.out.println(x)", "System.out.println", "System.out", "System", "System.out", "x", "{\n int fin = 0;\n int count = 1;\n while (fin == 0) {\n if (b[x-count] == 0) {\n System.out.println(x-count);\n fin++;\n } else if (fin == 0 && 101 >= x + count && b[x + count] == 0) {\n System.out.println(x+count);\n fin++;\n }\n count++;\n }\n }", "int fin = 0;", "fin", "0", "int count = 1;", "count", "1", "while (fin == 0) {\n if (b[x-count] == 0) {\n System.out.println(x-count);\n fin++;\n } else if (fin == 0 && 101 >= x + count && b[x + count] == 0) {\n System.out.println(x+count);\n fin++;\n }\n count++;\n }", "fin == 0", "fin", "0", "{\n if (b[x-count] == 0) {\n System.out.println(x-count);\n fin++;\n } else if (fin == 0 && 101 >= x + count && b[x + count] == 0) {\n System.out.println(x+count);\n fin++;\n }\n count++;\n }", "if (b[x-count] == 0) {\n System.out.println(x-count);\n fin++;\n } else if (fin == 0 && 101 >= x + count && b[x + count] == 0) {\n System.out.println(x+count);\n fin++;\n }", "b[x-count] == 0", "b[x-count]", "b", "x-count", "x", "count", "0", "{\n System.out.println(x-count);\n fin++;\n }", "System.out.println(x-count)", "System.out.println", "System.out", "System", "System.out", "x-count", "x", "count", "fin++", "fin", "if (fin == 0 && 101 >= x + count && b[x + count] == 0) {\n System.out.println(x+count);\n fin++;\n }", "fin == 0 && 101 >= x + count && b[x + count] == 0", "fin == 0 && 101 >= x + count && b[x + count] == 0", "fin == 0", "fin", "0", "101 >= x + count", "101", "x + count", "x", "count", "b[x + count] == 0", "b[x + count]", "b", "x + count", "x", "count", "0", "{\n System.out.println(x+count);\n fin++;\n }", "System.out.println(x+count)", "System.out.println", "System.out", "System", "System.out", "x+count", "x", "count", "fin++", "fin", "count++", "count", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int x = sc.nextInt();\n int n = sc.nextInt();\n \n if (n == 0) {\n System.out.println(x);\n } else {\n int a[] = new int[n];\n\n for (int i = 0; i < n; i++) {\n int aa = sc.nextInt();\n a[i] = aa;\n }\n \n int b[] = new int[102];\n \n for (int j = 0; j < 102; j++) {\n b[j] = 0;\n }\n \n for (int k = 0; k < n; k++) {\n int aaa = a[k];\n b[aaa] = 1;\n }\n \n if (b[x] == 0) {\n System.out.println(x);\n } else {\n int fin = 0;\n int count = 1;\n while (fin == 0) {\n if (b[x-count] == 0) {\n System.out.println(x-count);\n fin++;\n } else if (fin == 0 && 101 >= x + count && b[x + count] == 0) {\n System.out.println(x+count);\n fin++;\n }\n count++;\n }\n }\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int x = sc.nextInt();\n int n = sc.nextInt();\n \n if (n == 0) {\n System.out.println(x);\n } else {\n int a[] = new int[n];\n\n for (int i = 0; i < n; i++) {\n int aa = sc.nextInt();\n a[i] = aa;\n }\n \n int b[] = new int[102];\n \n for (int j = 0; j < 102; j++) {\n b[j] = 0;\n }\n \n for (int k = 0; k < n; k++) {\n int aaa = a[k];\n b[aaa] = 1;\n }\n \n if (b[x] == 0) {\n System.out.println(x);\n } else {\n int fin = 0;\n int count = 1;\n while (fin == 0) {\n if (b[x-count] == 0) {\n System.out.println(x-count);\n fin++;\n } else if (fin == 0 && 101 >= x + count && b[x + count] == 0) {\n System.out.println(x+count);\n fin++;\n }\n count++;\n }\n }\n }\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int n = sc.nextInt(); if (n == 0) { System.out.println(x); } else { int a[] = new int[n]; for (int i = 0; i < n; i++) { int aa = sc.nextInt(); a[i] = aa; } int b[] = new int[102]; for (int j = 0; j < 102; j++) { b[j] = 0; } for (int k = 0; k < n; k++) { int aaa = a[k]; b[aaa] = 1; } if (b[x] == 0) { System.out.println(x); } else { int fin = 0; int count = 1; while (fin == 0) { if (b[x-count] == 0) { System.out.println(x-count); fin++; } else if (fin == 0 && 101 >= x + count && b[x + count] == 0) { System.out.println(x+count); fin++; } count++; } } } } }
[ 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, 41, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 13, 41, 13, 17, 11, 1, 41, 13, 40, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 2, 18, 13, 13, 13, 30, 40, 13, 9, 14, 2, 4, 18, 13, 2, 13, 13, 13, 30, 0, 13, 4, 18, 13, 2, 13, 13, 0, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 117, 5 ], [ 117, 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 ], [ 29, 31 ], [ 8, 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 ], [ 8, 52 ], [ 52, 53 ], [ 53, 54 ], [ 52, 55 ], [ 8, 56 ], [ 56, 57 ], [ 56, 58 ], [ 8, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 59, 65 ], [ 65, 66 ], [ 65, 67 ], [ 59, 68 ], [ 68, 69 ], [ 69, 70 ], [ 59, 71 ], [ 72, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 74, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 78, 82 ], [ 73, 83 ], [ 83, 84 ], [ 84, 85 ], [ 83, 86 ], [ 72, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 89, 92 ], [ 92, 93 ], [ 92, 94 ], [ 88, 95 ], [ 87, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 100, 101 ], [ 99, 102 ], [ 102, 103 ], [ 102, 104 ], [ 96, 105 ], [ 105, 106 ], [ 105, 107 ], [ 8, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 108, 113 ], [ 6, 114 ], [ 114, 115 ], [ 0, 116 ], [ 116, 117 ], [ 116, 118 ] ]
[ "import java.util.*;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n \tint X = sc.nextInt();\n \tint Y = sc.nextInt();\n \tint[] num = new int[Y];\n \tint dist = 10000;\n \tint ans = X;\n \tfor(int i=0;i<Y;i++){\n num[i] = sc.nextInt();\n }\n \tArrays.sort(num);\n \tint pos = 0;\n \tfor(int i=-101;i<102;i++){\n if( pos < Y && num[pos] == i ){\n pos++;\n continue;\n }\n if( Math.abs( i-X ) < dist ){\n dist = Math.abs( i-X );\n ans = i;\n }\n }\n System.out.println(ans); \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 \tint X = sc.nextInt();\n \tint Y = sc.nextInt();\n \tint[] num = new int[Y];\n \tint dist = 10000;\n \tint ans = X;\n \tfor(int i=0;i<Y;i++){\n num[i] = sc.nextInt();\n }\n \tArrays.sort(num);\n \tint pos = 0;\n \tfor(int i=-101;i<102;i++){\n if( pos < Y && num[pos] == i ){\n pos++;\n continue;\n }\n if( Math.abs( i-X ) < dist ){\n dist = Math.abs( i-X );\n ans = i;\n }\n }\n System.out.println(ans); \t\n\t}\n}", "Main", "public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n \tint X = sc.nextInt();\n \tint Y = sc.nextInt();\n \tint[] num = new int[Y];\n \tint dist = 10000;\n \tint ans = X;\n \tfor(int i=0;i<Y;i++){\n num[i] = sc.nextInt();\n }\n \tArrays.sort(num);\n \tint pos = 0;\n \tfor(int i=-101;i<102;i++){\n if( pos < Y && num[pos] == i ){\n pos++;\n continue;\n }\n if( Math.abs( i-X ) < dist ){\n dist = Math.abs( i-X );\n ans = i;\n }\n }\n System.out.println(ans); \t\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n \tint X = sc.nextInt();\n \tint Y = sc.nextInt();\n \tint[] num = new int[Y];\n \tint dist = 10000;\n \tint ans = X;\n \tfor(int i=0;i<Y;i++){\n num[i] = sc.nextInt();\n }\n \tArrays.sort(num);\n \tint pos = 0;\n \tfor(int i=-101;i<102;i++){\n if( pos < Y && num[pos] == i ){\n pos++;\n continue;\n }\n if( Math.abs( i-X ) < dist ){\n dist = Math.abs( i-X );\n ans = i;\n }\n }\n System.out.println(ans); \t\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int X = sc.nextInt();", "X", "sc.nextInt()", "sc.nextInt", "sc", "int Y = sc.nextInt();", "Y", "sc.nextInt()", "sc.nextInt", "sc", "int[] num = new int[Y];", "num", "new int[Y]", "Y", "int dist = 10000;", "dist", "10000", "int ans = X;", "ans", "X", "for(int i=0;i<Y;i++){\n num[i] = sc.nextInt();\n }", "int i=0;", "int i=0;", "i", "0", "i<Y", "i", "Y", "i++", "i++", "i", "{\n num[i] = sc.nextInt();\n }", "{\n num[i] = sc.nextInt();\n }", "num[i] = sc.nextInt()", "num[i]", "num", "i", "sc.nextInt()", "sc.nextInt", "sc", "Arrays.sort(num)", "Arrays.sort", "Arrays", "num", "int pos = 0;", "pos", "0", "for(int i=-101;i<102;i++){\n if( pos < Y && num[pos] == i ){\n pos++;\n continue;\n }\n if( Math.abs( i-X ) < dist ){\n dist = Math.abs( i-X );\n ans = i;\n }\n }", "int i=-101;", "int i=-101;", "i", "-101", "101", "i<102", "i", "102", "i++", "i++", "i", "{\n if( pos < Y && num[pos] == i ){\n pos++;\n continue;\n }\n if( Math.abs( i-X ) < dist ){\n dist = Math.abs( i-X );\n ans = i;\n }\n }", "{\n if( pos < Y && num[pos] == i ){\n pos++;\n continue;\n }\n if( Math.abs( i-X ) < dist ){\n dist = Math.abs( i-X );\n ans = i;\n }\n }", "if( pos < Y && num[pos] == i ){\n pos++;\n continue;\n }", "pos < Y && num[pos] == i", "pos < Y", "pos", "Y", "num[pos] == i", "num[pos]", "num", "pos", "i", "{\n pos++;\n continue;\n }", "pos++", "pos", "continue;", "if( Math.abs( i-X ) < dist ){\n dist = Math.abs( i-X );\n ans = i;\n }", "Math.abs( i-X ) < dist", "Math.abs( i-X )", "Math.abs", "Math", "i-X", "i", "X", "dist", "{\n dist = Math.abs( i-X );\n ans = i;\n }", "dist = Math.abs( i-X )", "dist", "Math.abs( i-X )", "Math.abs", "Math", "i-X", "i", "X", "ans = i", "ans", "i", "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 \tint X = sc.nextInt();\n \tint Y = sc.nextInt();\n \tint[] num = new int[Y];\n \tint dist = 10000;\n \tint ans = X;\n \tfor(int i=0;i<Y;i++){\n num[i] = sc.nextInt();\n }\n \tArrays.sort(num);\n \tint pos = 0;\n \tfor(int i=-101;i<102;i++){\n if( pos < Y && num[pos] == i ){\n pos++;\n continue;\n }\n if( Math.abs( i-X ) < dist ){\n dist = Math.abs( i-X );\n ans = i;\n }\n }\n System.out.println(ans); \t\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n \tint X = sc.nextInt();\n \tint Y = sc.nextInt();\n \tint[] num = new int[Y];\n \tint dist = 10000;\n \tint ans = X;\n \tfor(int i=0;i<Y;i++){\n num[i] = sc.nextInt();\n }\n \tArrays.sort(num);\n \tint pos = 0;\n \tfor(int i=-101;i<102;i++){\n if( pos < Y && num[pos] == i ){\n pos++;\n continue;\n }\n if( Math.abs( i-X ) < dist ){\n dist = Math.abs( i-X );\n ans = i;\n }\n }\n System.out.println(ans); \t\n\t}\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int X = sc.nextInt(); int Y = sc.nextInt(); int[] num = new int[Y]; int dist = 10000; int ans = X; for(int i=0;i<Y;i++){ num[i] = sc.nextInt(); } Arrays.sort(num); int pos = 0; for(int i=-101;i<102;i++){ if( pos < Y && num[pos] == i ){ pos++; continue; } if( Math.abs( i-X ) < dist ){ dist = Math.abs( i-X ); ans = i; } } System.out.println(ans); } }
[ 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, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 4, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 40, 4, 18, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 3, 14, 40, 4, 18, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 2, 13, 13, 3, 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 ], [ 105, 11 ], [ 105, 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 ], [ 43, 49 ], [ 49, 50 ], [ 50, 51 ], [ 49, 52 ], [ 14, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 53, 58 ], [ 58, 59 ], [ 58, 60 ], [ 53, 61 ], [ 61, 62 ], [ 62, 63 ], [ 53, 64 ], [ 65, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 68, 71 ], [ 71, 72 ], [ 71, 73 ], [ 66, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 75, 80 ], [ 80, 81 ], [ 80, 82 ], [ 74, 83 ], [ 66, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 86, 89 ], [ 89, 90 ], [ 89, 91 ], [ 84, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 93, 98 ], [ 98, 99 ], [ 98, 100 ], [ 92, 101 ], [ 12, 102 ], [ 102, 103 ], [ 0, 104 ], [ 104, 105 ], [ 104, 106 ] ]
[ "import java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\npublic class Main{\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan =new Scanner(System.in);\n\t\tint X=scan.nextInt();\n\t\tint N=scan.nextInt();\n\t\tList<Integer> list = new ArrayList<>();\n\t\t \n\t\tfor(int i=0;i<N;i++) {\n\t\t\tint a=scan.nextInt();\n\t\t\tlist.add(a);\n\t\t}\n\t\t\n\t\tfor(int i=0;i<100;i++) {\n\t\t\tif(!list.contains(X-i)) {\n\t\t\t\tSystem.out.println(X-i);\n\t\t\t\tbreak;\n\t\t\t}else if(!list.contains(X+i)) {\n\t\t\t\tSystem.out.println(X+i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n}", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.List;", "List", "java.util", "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 scan =new Scanner(System.in);\n\t\tint X=scan.nextInt();\n\t\tint N=scan.nextInt();\n\t\tList<Integer> list = new ArrayList<>();\n\t\t \n\t\tfor(int i=0;i<N;i++) {\n\t\t\tint a=scan.nextInt();\n\t\t\tlist.add(a);\n\t\t}\n\t\t\n\t\tfor(int i=0;i<100;i++) {\n\t\t\tif(!list.contains(X-i)) {\n\t\t\t\tSystem.out.println(X-i);\n\t\t\t\tbreak;\n\t\t\t}else if(!list.contains(X+i)) {\n\t\t\t\tSystem.out.println(X+i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan =new Scanner(System.in);\n\t\tint X=scan.nextInt();\n\t\tint N=scan.nextInt();\n\t\tList<Integer> list = new ArrayList<>();\n\t\t \n\t\tfor(int i=0;i<N;i++) {\n\t\t\tint a=scan.nextInt();\n\t\t\tlist.add(a);\n\t\t}\n\t\t\n\t\tfor(int i=0;i<100;i++) {\n\t\t\tif(!list.contains(X-i)) {\n\t\t\t\tSystem.out.println(X-i);\n\t\t\t\tbreak;\n\t\t\t}else if(!list.contains(X+i)) {\n\t\t\t\tSystem.out.println(X+i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "main", "{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan =new Scanner(System.in);\n\t\tint X=scan.nextInt();\n\t\tint N=scan.nextInt();\n\t\tList<Integer> list = new ArrayList<>();\n\t\t \n\t\tfor(int i=0;i<N;i++) {\n\t\t\tint a=scan.nextInt();\n\t\t\tlist.add(a);\n\t\t}\n\t\t\n\t\tfor(int i=0;i<100;i++) {\n\t\t\tif(!list.contains(X-i)) {\n\t\t\t\tSystem.out.println(X-i);\n\t\t\t\tbreak;\n\t\t\t}else if(!list.contains(X+i)) {\n\t\t\t\tSystem.out.println(X+i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "Scanner scan =new Scanner(System.in);", "scan", "new Scanner(System.in)", "int X=scan.nextInt();", "X", "scan.nextInt()", "scan.nextInt", "scan", "int N=scan.nextInt();", "N", "scan.nextInt()", "scan.nextInt", "scan", "List<Integer> list = new ArrayList<>();", "list", "new ArrayList<>()", "for(int i=0;i<N;i++) {\n\t\t\tint a=scan.nextInt();\n\t\t\tlist.add(a);\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<N", "i", "N", "i++", "i++", "i", "{\n\t\t\tint a=scan.nextInt();\n\t\t\tlist.add(a);\n\t\t}", "{\n\t\t\tint a=scan.nextInt();\n\t\t\tlist.add(a);\n\t\t}", "int a=scan.nextInt();", "a", "scan.nextInt()", "scan.nextInt", "scan", "list.add(a)", "list.add", "list", "a", "for(int i=0;i<100;i++) {\n\t\t\tif(!list.contains(X-i)) {\n\t\t\t\tSystem.out.println(X-i);\n\t\t\t\tbreak;\n\t\t\t}else if(!list.contains(X+i)) {\n\t\t\t\tSystem.out.println(X+i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<100", "i", "100", "i++", "i++", "i", "{\n\t\t\tif(!list.contains(X-i)) {\n\t\t\t\tSystem.out.println(X-i);\n\t\t\t\tbreak;\n\t\t\t}else if(!list.contains(X+i)) {\n\t\t\t\tSystem.out.println(X+i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "{\n\t\t\tif(!list.contains(X-i)) {\n\t\t\t\tSystem.out.println(X-i);\n\t\t\t\tbreak;\n\t\t\t}else if(!list.contains(X+i)) {\n\t\t\t\tSystem.out.println(X+i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "if(!list.contains(X-i)) {\n\t\t\t\tSystem.out.println(X-i);\n\t\t\t\tbreak;\n\t\t\t}else if(!list.contains(X+i)) {\n\t\t\t\tSystem.out.println(X+i);\n\t\t\t\tbreak;\n\t\t\t}", "!list.contains(X-i)", "list.contains(X-i)", "list.contains", "list", "X-i", "X", "i", "{\n\t\t\t\tSystem.out.println(X-i);\n\t\t\t\tbreak;\n\t\t\t}", "System.out.println(X-i)", "System.out.println", "System.out", "System", "System.out", "X-i", "X", "i", "break;", "if(!list.contains(X+i)) {\n\t\t\t\tSystem.out.println(X+i);\n\t\t\t\tbreak;\n\t\t\t}", "!list.contains(X+i)", "list.contains(X+i)", "list.contains", "list", "X+i", "X", "i", "{\n\t\t\t\tSystem.out.println(X+i);\n\t\t\t\tbreak;\n\t\t\t}", "System.out.println(X+i)", "System.out.println", "System.out", "System", "System.out", "X+i", "X", "i", "break;", "String[] args", "args", "public class Main{\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan =new Scanner(System.in);\n\t\tint X=scan.nextInt();\n\t\tint N=scan.nextInt();\n\t\tList<Integer> list = new ArrayList<>();\n\t\t \n\t\tfor(int i=0;i<N;i++) {\n\t\t\tint a=scan.nextInt();\n\t\t\tlist.add(a);\n\t\t}\n\t\t\n\t\tfor(int i=0;i<100;i++) {\n\t\t\tif(!list.contains(X-i)) {\n\t\t\t\tSystem.out.println(X-i);\n\t\t\t\tbreak;\n\t\t\t}else if(!list.contains(X+i)) {\n\t\t\t\tSystem.out.println(X+i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n}", "public class Main{\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan =new Scanner(System.in);\n\t\tint X=scan.nextInt();\n\t\tint N=scan.nextInt();\n\t\tList<Integer> list = new ArrayList<>();\n\t\t \n\t\tfor(int i=0;i<N;i++) {\n\t\t\tint a=scan.nextInt();\n\t\t\tlist.add(a);\n\t\t}\n\t\t\n\t\tfor(int i=0;i<100;i++) {\n\t\t\tif(!list.contains(X-i)) {\n\t\t\t\tSystem.out.println(X-i);\n\t\t\t\tbreak;\n\t\t\t}else if(!list.contains(X+i)) {\n\t\t\t\tSystem.out.println(X+i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n}", "Main" ]
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main{ public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner scan =new Scanner(System.in); int X=scan.nextInt(); int N=scan.nextInt(); List<Integer> list = new ArrayList<>(); for(int i=0;i<N;i++) { int a=scan.nextInt(); list.add(a); } for(int i=0;i<100;i++) { if(!list.contains(X-i)) { System.out.println(X-i); break; }else if(!list.contains(X+i)) { System.out.println(X+i); break; } } } }
[ 7, 15, 13, 17, 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, 41, 13, 20, 11, 1, 41, 13, 40, 17, 2, 13, 17, 1, 40, 13, 30, 30, 4, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 4, 18, 13, 13, 41, 13, 17, 41, 13, 17, 28, 13, 13, 30, 30, 14, 2, 4, 18, 13, 2, 13, 13, 13, 30, 0, 13, 4, 18, 13, 2, 13, 13, 0, 13, 13, 4, 18, 18, 13, 13, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 115, 8 ], [ 115, 9 ], [ 9, 10 ], [ 9, 11 ], [ 115, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 16, 17 ], [ 12, 18 ], [ 18, 19 ], [ 115, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 22, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 31, 32 ], [ 22, 33 ], [ 33, 34 ], [ 33, 35 ], [ 22, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 36, 42 ], [ 42, 43 ], [ 42, 44 ], [ 36, 45 ], [ 45, 46 ], [ 46, 47 ], [ 36, 48 ], [ 49, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 50, 53 ], [ 22, 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 ], [ 67, 69 ], [ 69, 70 ], [ 70, 71 ], [ 66, 72 ], [ 72, 73 ], [ 73, 74 ], [ 72, 75 ], [ 22, 76 ], [ 76, 77 ], [ 76, 78 ], [ 22, 79 ], [ 79, 80 ], [ 79, 81 ], [ 22, 82 ], [ 82, 83 ], [ 82, 84 ], [ 82, 85 ], [ 86, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 89, 92 ], [ 92, 93 ], [ 92, 94 ], [ 88, 95 ], [ 87, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 100, 101 ], [ 99, 102 ], [ 102, 103 ], [ 102, 104 ], [ 96, 105 ], [ 105, 106 ], [ 105, 107 ], [ 22, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 108, 113 ], [ 0, 114 ], [ 114, 115 ], [ 114, 116 ] ]
[ "import java.util.*;\nimport java.text.*;\n\npublic class Main {\n\n Scanner sc = new Scanner(System.in);\n\n public static void main(String[] args) {\n new Main().run();\n }\n\n void run() {\n int x = sc.nextInt();\n int n = sc.nextInt();\n List<Integer> list = new ArrayList<>();\n\n for (int i=-200; i<=200; i++) {\n list.add(i);\n }\n\n for (int i=0; i<n; i++) {\n int t = sc.nextInt();\n list.remove((Integer)t);\n }\n\n int res = 1000;\n int diff = 10000;\n\n for (Integer i: list) {\n if (Math.abs(x-i)<diff) {\n diff = Math.abs(x-i);\n res = i;\n }\n }\n\n// System.out.println(list);\n\n System.out.println(res);\n }\n\n\n}", "import java.util.*;", "util.*", "java", "import java.text.*;", "text.*", "java", "public class Main {\n\n Scanner sc = new Scanner(System.in);\n\n public static void main(String[] args) {\n new Main().run();\n }\n\n void run() {\n int x = sc.nextInt();\n int n = sc.nextInt();\n List<Integer> list = new ArrayList<>();\n\n for (int i=-200; i<=200; i++) {\n list.add(i);\n }\n\n for (int i=0; i<n; i++) {\n int t = sc.nextInt();\n list.remove((Integer)t);\n }\n\n int res = 1000;\n int diff = 10000;\n\n for (Integer i: list) {\n if (Math.abs(x-i)<diff) {\n diff = Math.abs(x-i);\n res = i;\n }\n }\n\n// System.out.println(list);\n\n System.out.println(res);\n }\n\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", "void run() {\n int x = sc.nextInt();\n int n = sc.nextInt();\n List<Integer> list = new ArrayList<>();\n\n for (int i=-200; i<=200; i++) {\n list.add(i);\n }\n\n for (int i=0; i<n; i++) {\n int t = sc.nextInt();\n list.remove((Integer)t);\n }\n\n int res = 1000;\n int diff = 10000;\n\n for (Integer i: list) {\n if (Math.abs(x-i)<diff) {\n diff = Math.abs(x-i);\n res = i;\n }\n }\n\n// System.out.println(list);\n\n System.out.println(res);\n }", "run", "{\n int x = sc.nextInt();\n int n = sc.nextInt();\n List<Integer> list = new ArrayList<>();\n\n for (int i=-200; i<=200; i++) {\n list.add(i);\n }\n\n for (int i=0; i<n; i++) {\n int t = sc.nextInt();\n list.remove((Integer)t);\n }\n\n int res = 1000;\n int diff = 10000;\n\n for (Integer i: list) {\n if (Math.abs(x-i)<diff) {\n diff = Math.abs(x-i);\n res = i;\n }\n }\n\n// System.out.println(list);\n\n System.out.println(res);\n }", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "List<Integer> list = new ArrayList<>();", "list", "new ArrayList<>()", "for (int i=-200; i<=200; i++) {\n list.add(i);\n }", "int i=-200;", "int i=-200;", "i", "-200", "200", "i<=200", "i", "200", "i++", "i++", "i", "{\n list.add(i);\n }", "{\n list.add(i);\n }", "list.add(i)", "list.add", "list", "i", "for (int i=0; i<n; i++) {\n int t = sc.nextInt();\n list.remove((Integer)t);\n }", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n int t = sc.nextInt();\n list.remove((Integer)t);\n }", "{\n int t = sc.nextInt();\n list.remove((Integer)t);\n }", "int t = sc.nextInt();", "t", "sc.nextInt()", "sc.nextInt", "sc", "list.remove((Integer)t)", "list.remove", "list", "(Integer)t", "int res = 1000;", "res", "1000", "int diff = 10000;", "diff", "10000", "for (Integer i: list) {\n if (Math.abs(x-i)<diff) {\n diff = Math.abs(x-i);\n res = i;\n }\n }", "Integer i", "list", "{\n if (Math.abs(x-i)<diff) {\n diff = Math.abs(x-i);\n res = i;\n }\n }", "{\n if (Math.abs(x-i)<diff) {\n diff = Math.abs(x-i);\n res = i;\n }\n }", "if (Math.abs(x-i)<diff) {\n diff = Math.abs(x-i);\n res = i;\n }", "Math.abs(x-i)<diff", "Math.abs(x-i)", "Math.abs", "Math", "x-i", "x", "i", "diff", "{\n diff = Math.abs(x-i);\n res = i;\n }", "diff = Math.abs(x-i)", "diff", "Math.abs(x-i)", "Math.abs", "Math", "x-i", "x", "i", "res = i", "res", "i", "System.out.println(res)", "System.out.println", "System.out", "System", "System.out", "res", "public class Main {\n\n Scanner sc = new Scanner(System.in);\n\n public static void main(String[] args) {\n new Main().run();\n }\n\n void run() {\n int x = sc.nextInt();\n int n = sc.nextInt();\n List<Integer> list = new ArrayList<>();\n\n for (int i=-200; i<=200; i++) {\n list.add(i);\n }\n\n for (int i=0; i<n; i++) {\n int t = sc.nextInt();\n list.remove((Integer)t);\n }\n\n int res = 1000;\n int diff = 10000;\n\n for (Integer i: list) {\n if (Math.abs(x-i)<diff) {\n diff = Math.abs(x-i);\n res = i;\n }\n }\n\n// System.out.println(list);\n\n System.out.println(res);\n }\n\n\n}", "public class Main {\n\n Scanner sc = new Scanner(System.in);\n\n public static void main(String[] args) {\n new Main().run();\n }\n\n void run() {\n int x = sc.nextInt();\n int n = sc.nextInt();\n List<Integer> list = new ArrayList<>();\n\n for (int i=-200; i<=200; i++) {\n list.add(i);\n }\n\n for (int i=0; i<n; i++) {\n int t = sc.nextInt();\n list.remove((Integer)t);\n }\n\n int res = 1000;\n int diff = 10000;\n\n for (Integer i: list) {\n if (Math.abs(x-i)<diff) {\n diff = Math.abs(x-i);\n res = i;\n }\n }\n\n// System.out.println(list);\n\n System.out.println(res);\n }\n\n\n}", "Main" ]
import java.util.*; import java.text.*; public class Main { Scanner sc = new Scanner(System.in); public static void main(String[] args) { new Main().run(); } void run() { int x = sc.nextInt(); int n = sc.nextInt(); List<Integer> list = new ArrayList<>(); for (int i=-200; i<=200; i++) { list.add(i); } for (int i=0; i<n; i++) { int t = sc.nextInt(); list.remove((Integer)t); } int res = 1000; int diff = 10000; for (Integer i: list) { if (Math.abs(x-i)<diff) { diff = Math.abs(x-i); res = i; } } // System.out.println(list); System.out.println(res); } }
[ 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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 40, 18, 13, 4, 18, 13, 14, 2, 18, 13, 13, 17, 30, 4, 18, 18, 13, 13, 13, 29, 41, 13, 17, 11, 1, 41, 13, 2, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 2, 18, 13, 13, 17, 30, 0, 13, 13, 3, 41, 13, 17, 11, 1, 41, 13, 2, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 2, 18, 13, 13, 17, 30, 0, 13, 13, 3, 14, 2, 2, 13, 13, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 30, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 142, 5 ], [ 142, 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 ], [ 42, 43 ], [ 43, 44 ], [ 8, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 46, 50 ], [ 45, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 52, 57 ], [ 51, 58 ], [ 8, 59 ], [ 59, 60 ], [ 59, 61 ], [ 8, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 66, 68 ], [ 62, 69 ], [ 69, 70 ], [ 69, 71 ], [ 62, 72 ], [ 72, 73 ], [ 73, 74 ], [ 62, 75 ], [ 76, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 78, 82 ], [ 77, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 83, 87 ], [ 8, 88 ], [ 88, 89 ], [ 88, 90 ], [ 8, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 95, 97 ], [ 91, 98 ], [ 98, 99 ], [ 98, 100 ], [ 91, 101 ], [ 101, 102 ], [ 102, 103 ], [ 91, 104 ], [ 105, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 107, 111 ], [ 106, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 112, 116 ], [ 8, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 118, 122 ], [ 122, 123 ], [ 122, 124 ], [ 117, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 128, 129 ], [ 128, 130 ], [ 126, 131 ], [ 117, 132 ], [ 132, 133 ], [ 133, 134 ], [ 134, 135 ], [ 135, 136 ], [ 135, 137 ], [ 133, 138 ], [ 6, 139 ], [ 139, 140 ], [ 0, 141 ], [ 141, 142 ], [ 141, 143 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] numberInfo = new int[102];\n\t\tfor(int i=0;i <n;i ++) {\n\t\t\tnumberInfo[sc.nextInt()]++;\n\t\t}\n\t\tif(numberInfo[x] ==0) {\n\t\t\tSystem.out.println(x);\n\t\t\treturn;\n\t\t}\n\t\tint right = 0;\n\t\tfor(int i =x+1; i <=101;i++) {\n\t\t\tif(numberInfo[i] ==0) {\n\t\t\t\tright = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tint left = 0;\n\t\tfor(int i =x-1; i >=0;i--) {\n\t\t\tif(numberInfo[i] ==0) {\n\t\t\t\tleft = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif((right -x) >= (x - left)) {\n\t\t\tSystem.out.println(left);\n\t\t}else {\n\t\t\tSystem.out.println(right);\n\t\t}\n\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] numberInfo = new int[102];\n\t\tfor(int i=0;i <n;i ++) {\n\t\t\tnumberInfo[sc.nextInt()]++;\n\t\t}\n\t\tif(numberInfo[x] ==0) {\n\t\t\tSystem.out.println(x);\n\t\t\treturn;\n\t\t}\n\t\tint right = 0;\n\t\tfor(int i =x+1; i <=101;i++) {\n\t\t\tif(numberInfo[i] ==0) {\n\t\t\t\tright = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tint left = 0;\n\t\tfor(int i =x-1; i >=0;i--) {\n\t\t\tif(numberInfo[i] ==0) {\n\t\t\t\tleft = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif((right -x) >= (x - left)) {\n\t\t\tSystem.out.println(left);\n\t\t}else {\n\t\t\tSystem.out.println(right);\n\t\t}\n\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] numberInfo = new int[102];\n\t\tfor(int i=0;i <n;i ++) {\n\t\t\tnumberInfo[sc.nextInt()]++;\n\t\t}\n\t\tif(numberInfo[x] ==0) {\n\t\t\tSystem.out.println(x);\n\t\t\treturn;\n\t\t}\n\t\tint right = 0;\n\t\tfor(int i =x+1; i <=101;i++) {\n\t\t\tif(numberInfo[i] ==0) {\n\t\t\t\tright = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tint left = 0;\n\t\tfor(int i =x-1; i >=0;i--) {\n\t\t\tif(numberInfo[i] ==0) {\n\t\t\t\tleft = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif((right -x) >= (x - left)) {\n\t\t\tSystem.out.println(left);\n\t\t}else {\n\t\t\tSystem.out.println(right);\n\t\t}\n\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] numberInfo = new int[102];\n\t\tfor(int i=0;i <n;i ++) {\n\t\t\tnumberInfo[sc.nextInt()]++;\n\t\t}\n\t\tif(numberInfo[x] ==0) {\n\t\t\tSystem.out.println(x);\n\t\t\treturn;\n\t\t}\n\t\tint right = 0;\n\t\tfor(int i =x+1; i <=101;i++) {\n\t\t\tif(numberInfo[i] ==0) {\n\t\t\t\tright = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tint left = 0;\n\t\tfor(int i =x-1; i >=0;i--) {\n\t\t\tif(numberInfo[i] ==0) {\n\t\t\t\tleft = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif((right -x) >= (x - left)) {\n\t\t\tSystem.out.println(left);\n\t\t}else {\n\t\t\tSystem.out.println(right);\n\t\t}\n\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int[] numberInfo = new int[102];", "numberInfo", "new int[102]", "102", "for(int i=0;i <n;i ++) {\n\t\t\tnumberInfo[sc.nextInt()]++;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i <n", "i", "n", "i ++", "i ++", "i", "{\n\t\t\tnumberInfo[sc.nextInt()]++;\n\t\t}", "{\n\t\t\tnumberInfo[sc.nextInt()]++;\n\t\t}", "numberInfo[sc.nextInt()]++", "numberInfo[sc.nextInt()]", "numberInfo", "sc.nextInt()", "sc.nextInt", "sc", "if(numberInfo[x] ==0) {\n\t\t\tSystem.out.println(x);\n\t\t\treturn;\n\t\t}", "numberInfo[x] ==0", "numberInfo[x]", "numberInfo", "x", "0", "{\n\t\t\tSystem.out.println(x);\n\t\t\treturn;\n\t\t}", "System.out.println(x)", "System.out.println", "System.out", "System", "System.out", "x", "return;", "int right = 0;", "right", "0", "for(int i =x+1; i <=101;i++) {\n\t\t\tif(numberInfo[i] ==0) {\n\t\t\t\tright = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "int i =x+1;", "int i =x+1;", "i", "x+1", "x", "1", "i <=101", "i", "101", "i++", "i++", "i", "{\n\t\t\tif(numberInfo[i] ==0) {\n\t\t\t\tright = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "{\n\t\t\tif(numberInfo[i] ==0) {\n\t\t\t\tright = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "if(numberInfo[i] ==0) {\n\t\t\t\tright = i;\n\t\t\t\tbreak;\n\t\t\t}", "numberInfo[i] ==0", "numberInfo[i]", "numberInfo", "i", "0", "{\n\t\t\t\tright = i;\n\t\t\t\tbreak;\n\t\t\t}", "right = i", "right", "i", "break;", "int left = 0;", "left", "0", "for(int i =x-1; i >=0;i--) {\n\t\t\tif(numberInfo[i] ==0) {\n\t\t\t\tleft = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "int i =x-1;", "int i =x-1;", "i", "x-1", "x", "1", "i >=0", "i", "0", "i--", "i--", "i", "{\n\t\t\tif(numberInfo[i] ==0) {\n\t\t\t\tleft = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "{\n\t\t\tif(numberInfo[i] ==0) {\n\t\t\t\tleft = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "if(numberInfo[i] ==0) {\n\t\t\t\tleft = i;\n\t\t\t\tbreak;\n\t\t\t}", "numberInfo[i] ==0", "numberInfo[i]", "numberInfo", "i", "0", "{\n\t\t\t\tleft = i;\n\t\t\t\tbreak;\n\t\t\t}", "left = i", "left", "i", "break;", "if((right -x) >= (x - left)) {\n\t\t\tSystem.out.println(left);\n\t\t}else {\n\t\t\tSystem.out.println(right);\n\t\t}", "(right -x) >= (x - left)", "(right -x)", "right", "x", "(x - left)", "x", "left", "{\n\t\t\tSystem.out.println(left);\n\t\t}", "System.out.println(left)", "System.out.println", "System.out", "System", "System.out", "left", "{\n\t\t\tSystem.out.println(right);\n\t\t}", "System.out.println(right)", "System.out.println", "System.out", "System", "System.out", "right", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] numberInfo = new int[102];\n\t\tfor(int i=0;i <n;i ++) {\n\t\t\tnumberInfo[sc.nextInt()]++;\n\t\t}\n\t\tif(numberInfo[x] ==0) {\n\t\t\tSystem.out.println(x);\n\t\t\treturn;\n\t\t}\n\t\tint right = 0;\n\t\tfor(int i =x+1; i <=101;i++) {\n\t\t\tif(numberInfo[i] ==0) {\n\t\t\t\tright = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tint left = 0;\n\t\tfor(int i =x-1; i >=0;i--) {\n\t\t\tif(numberInfo[i] ==0) {\n\t\t\t\tleft = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif((right -x) >= (x - left)) {\n\t\t\tSystem.out.println(left);\n\t\t}else {\n\t\t\tSystem.out.println(right);\n\t\t}\n\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint x = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] numberInfo = new int[102];\n\t\tfor(int i=0;i <n;i ++) {\n\t\t\tnumberInfo[sc.nextInt()]++;\n\t\t}\n\t\tif(numberInfo[x] ==0) {\n\t\t\tSystem.out.println(x);\n\t\t\treturn;\n\t\t}\n\t\tint right = 0;\n\t\tfor(int i =x+1; i <=101;i++) {\n\t\t\tif(numberInfo[i] ==0) {\n\t\t\t\tright = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tint left = 0;\n\t\tfor(int i =x-1; i >=0;i--) {\n\t\t\tif(numberInfo[i] ==0) {\n\t\t\t\tleft = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif((right -x) >= (x - left)) {\n\t\t\tSystem.out.println(left);\n\t\t}else {\n\t\t\tSystem.out.println(right);\n\t\t}\n\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int n = sc.nextInt(); int[] numberInfo = new int[102]; for(int i=0;i <n;i ++) { numberInfo[sc.nextInt()]++; } if(numberInfo[x] ==0) { System.out.println(x); return; } int right = 0; for(int i =x+1; i <=101;i++) { if(numberInfo[i] ==0) { right = i; break; } } int left = 0; for(int i =x-1; i >=0;i--) { if(numberInfo[i] ==0) { left = i; break; } } if((right -x) >= (x - left)) { System.out.println(left); }else { System.out.println(right); } } }
[ 7, 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, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 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, 12, 13, 30, 29, 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 ], [ 143, 20 ], [ 143, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 23, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 23, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 23, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 37, 42 ], [ 42, 43 ], [ 42, 44 ], [ 21, 45 ], [ 45, 46 ], [ 143, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 47, 51 ], [ 51, 52 ], [ 47, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 47, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 63, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 62, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 72, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 61, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 47, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 94, 95 ], [ 47, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 100, 103 ], [ 103, 104 ], [ 47, 105 ], [ 105, 106 ], [ 105, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 109, 112 ], [ 112, 113 ], [ 47, 114 ], [ 114, 115 ], [ 114, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 116, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 120, 127 ], [ 127, 128 ], [ 128, 129 ], [ 128, 130 ], [ 130, 131 ], [ 131, 132 ], [ 116, 133 ], [ 133, 134 ], [ 47, 135 ], [ 135, 136 ], [ 135, 137 ], [ 137, 138 ], [ 138, 139 ], [ 135, 140 ], [ 140, 141 ], [ 0, 142 ], [ 142, 143 ], [ 142, 144 ] ]
[ "import java.io.*;\nimport java.io.BufferedReader; \nimport java.io.IOException; \nimport java.io.InputStreamReader; \nimport java.util.StringTokenizer; \nimport java.util.*;\n\n\npublic class Main \n{\n\n\t \n\t static class FastReader \n\t { \n\t BufferedReader br; \n\t StringTokenizer st; \n\t \n\t \n\t public FastReader() \n\t { \n\t br = new BufferedReader(new\n\t InputStreamReader(System.in)); \n\t } \n\t \n\t String next() \n\t { \n\t while (st == null || !st.hasMoreTokens()) \n\t { \n\t try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t } \n\t return st.nextToken();\n\t \n\t } \n\t \n\t int nextInt() \n\t { \n\t return Integer.parseInt(next()); \n\t } \n\t \n\t long nextLong() \n\t { \n\t return Long.parseLong(next()); \n\t } \n\t \n\t double nextDouble() \n\t { \n\t return Double.parseDouble(next()); \n\t } \n\t \n\t String nextLine() \n\t { \n\t String str = \"\"; \n\t try\n\t { \n\t str = br.readLine(); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t return str; \n\t }\n\n\t\t\tpublic Character charAt(int i) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn null;\n\t\t\t} \n\t } \n\n \n\n\t // Complete the hurdleRace function below.\n// public static void solve() {\n// \tFastReader s=new FastReader();\n\n \n public static void main(String[] args) throws IOException {\n \tFastReader s=new FastReader();\n \tint n = s.nextInt();\n \tint b = s.nextInt();\n \tSystem.out.println(n*b);\n\t\t\n\n\n\t\t\n\n \t\n }\t\n}\n", "import java.io.*;", "io.*", "java", "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", "import java.util.*;", "util.*", "java", "public class Main \n{\n\n\t \n\t static class FastReader \n\t { \n\t BufferedReader br; \n\t StringTokenizer st; \n\t \n\t \n\t public FastReader() \n\t { \n\t br = new BufferedReader(new\n\t InputStreamReader(System.in)); \n\t } \n\t \n\t String next() \n\t { \n\t while (st == null || !st.hasMoreTokens()) \n\t { \n\t try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t } \n\t return st.nextToken();\n\t \n\t } \n\t \n\t int nextInt() \n\t { \n\t return Integer.parseInt(next()); \n\t } \n\t \n\t long nextLong() \n\t { \n\t return Long.parseLong(next()); \n\t } \n\t \n\t double nextDouble() \n\t { \n\t return Double.parseDouble(next()); \n\t } \n\t \n\t String nextLine() \n\t { \n\t String str = \"\"; \n\t try\n\t { \n\t str = br.readLine(); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t return str; \n\t }\n\n\t\t\tpublic Character charAt(int i) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn null;\n\t\t\t} \n\t } \n\n \n\n\t // Complete the hurdleRace function below.\n// public static void solve() {\n// \tFastReader s=new FastReader();\n\n \n public static void main(String[] args) throws IOException {\n \tFastReader s=new FastReader();\n \tint n = s.nextInt();\n \tint b = s.nextInt();\n \tSystem.out.println(n*b);\n\t\t\n\n\n\t\t\n\n \t\n }\t\n}", "Main", "public static void main(String[] args) throws IOException {\n \tFastReader s=new FastReader();\n \tint n = s.nextInt();\n \tint b = s.nextInt();\n \tSystem.out.println(n*b);\n\t\t\n\n\n\t\t\n\n \t\n }", "main", "{\n \tFastReader s=new FastReader();\n \tint n = s.nextInt();\n \tint b = s.nextInt();\n \tSystem.out.println(n*b);\n\t\t\n\n\n\t\t\n\n \t\n }", "FastReader s=new FastReader();", "s", "new FastReader()", "int n = s.nextInt();", "n", "s.nextInt()", "s.nextInt", "s", "int b = s.nextInt();", "b", "s.nextInt()", "s.nextInt", "s", "System.out.println(n*b)", "System.out.println", "System.out", "System", "System.out", "n*b", "n", "b", "String[] args", "args", "static class FastReader \n\t { \n\t BufferedReader br; \n\t StringTokenizer st; \n\t \n\t \n\t public FastReader() \n\t { \n\t br = new BufferedReader(new\n\t InputStreamReader(System.in)); \n\t } \n\t \n\t String next() \n\t { \n\t while (st == null || !st.hasMoreTokens()) \n\t { \n\t try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t } \n\t return st.nextToken();\n\t \n\t } \n\t \n\t int nextInt() \n\t { \n\t return Integer.parseInt(next()); \n\t } \n\t \n\t long nextLong() \n\t { \n\t return Long.parseLong(next()); \n\t } \n\t \n\t double nextDouble() \n\t { \n\t return Double.parseDouble(next()); \n\t } \n\t \n\t String nextLine() \n\t { \n\t String str = \"\"; \n\t try\n\t { \n\t str = br.readLine(); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t return str; \n\t }\n\n\t\t\tpublic Character charAt(int i) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn null;\n\t\t\t} \n\t }", "FastReader", "BufferedReader br;", "br", "StringTokenizer st;", "st", "public FastReader() \n\t { \n\t br = new BufferedReader(new\n\t InputStreamReader(System.in)); \n\t }", "FastReader", "{ \n\t br = new BufferedReader(new\n\t InputStreamReader(System.in)); \n\t }", "br = new BufferedReader(new\n\t InputStreamReader(System.in))", "br", "new BufferedReader(new\n\t InputStreamReader(System.in))", "String next() \n\t { \n\t while (st == null || !st.hasMoreTokens()) \n\t { \n\t try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t } \n\t return st.nextToken();\n\t \n\t }", "next", "{ \n\t while (st == null || !st.hasMoreTokens()) \n\t { \n\t try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t } \n\t return st.nextToken();\n\t \n\t }", "while (st == null || !st.hasMoreTokens()) \n\t { \n\t try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t }", "st == null || !st.hasMoreTokens()", "st == null", "st", "null", "!st.hasMoreTokens()", "st.hasMoreTokens()", "st.hasMoreTokens", "st", "{ \n\t try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t }", "try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t }", "catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t }", "IOException e", "{ \n\t e.printStackTrace(); \n\t }", "e.printStackTrace()", "e.printStackTrace", "e", "{ \n\t st = new StringTokenizer(br.readLine()); \n\t }", "st = new StringTokenizer(br.readLine())", "st", "new StringTokenizer(br.readLine())", "return st.nextToken();", "st.nextToken()", "st.nextToken", "st", "int nextInt() \n\t { \n\t return Integer.parseInt(next()); \n\t }", "nextInt", "{ \n\t return Integer.parseInt(next()); \n\t }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "long nextLong() \n\t { \n\t return Long.parseLong(next()); \n\t }", "nextLong", "{ \n\t return Long.parseLong(next()); \n\t }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "double nextDouble() \n\t { \n\t return Double.parseDouble(next()); \n\t }", "nextDouble", "{ \n\t return Double.parseDouble(next()); \n\t }", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "String nextLine() \n\t { \n\t String str = \"\"; \n\t try\n\t { \n\t str = br.readLine(); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t return str; \n\t }", "nextLine", "{ \n\t String str = \"\"; \n\t try\n\t { \n\t str = br.readLine(); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t return str; \n\t }", "String str = \"\";", "str", "\"\"", "try\n\t { \n\t str = br.readLine(); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t }", "catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t }", "IOException e", "{ \n\t e.printStackTrace(); \n\t }", "e.printStackTrace()", "e.printStackTrace", "e", "{ \n\t str = br.readLine(); \n\t }", "str = br.readLine()", "str", "br.readLine()", "br.readLine", "br", "return str;", "str", "public Character charAt(int i) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn null;\n\t\t\t}", "charAt", "{\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn null;\n\t\t\t}", "return null;", "null", "int i", "i", "public class Main \n{\n\n\t \n\t static class FastReader \n\t { \n\t BufferedReader br; \n\t StringTokenizer st; \n\t \n\t \n\t public FastReader() \n\t { \n\t br = new BufferedReader(new\n\t InputStreamReader(System.in)); \n\t } \n\t \n\t String next() \n\t { \n\t while (st == null || !st.hasMoreTokens()) \n\t { \n\t try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t } \n\t return st.nextToken();\n\t \n\t } \n\t \n\t int nextInt() \n\t { \n\t return Integer.parseInt(next()); \n\t } \n\t \n\t long nextLong() \n\t { \n\t return Long.parseLong(next()); \n\t } \n\t \n\t double nextDouble() \n\t { \n\t return Double.parseDouble(next()); \n\t } \n\t \n\t String nextLine() \n\t { \n\t String str = \"\"; \n\t try\n\t { \n\t str = br.readLine(); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t return str; \n\t }\n\n\t\t\tpublic Character charAt(int i) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn null;\n\t\t\t} \n\t } \n\n \n\n\t // Complete the hurdleRace function below.\n// public static void solve() {\n// \tFastReader s=new FastReader();\n\n \n public static void main(String[] args) throws IOException {\n \tFastReader s=new FastReader();\n \tint n = s.nextInt();\n \tint b = s.nextInt();\n \tSystem.out.println(n*b);\n\t\t\n\n\n\t\t\n\n \t\n }\t\n}", "public class Main \n{\n\n\t \n\t static class FastReader \n\t { \n\t BufferedReader br; \n\t StringTokenizer st; \n\t \n\t \n\t public FastReader() \n\t { \n\t br = new BufferedReader(new\n\t InputStreamReader(System.in)); \n\t } \n\t \n\t String next() \n\t { \n\t while (st == null || !st.hasMoreTokens()) \n\t { \n\t try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t } \n\t return st.nextToken();\n\t \n\t } \n\t \n\t int nextInt() \n\t { \n\t return Integer.parseInt(next()); \n\t } \n\t \n\t long nextLong() \n\t { \n\t return Long.parseLong(next()); \n\t } \n\t \n\t double nextDouble() \n\t { \n\t return Double.parseDouble(next()); \n\t } \n\t \n\t String nextLine() \n\t { \n\t String str = \"\"; \n\t try\n\t { \n\t str = br.readLine(); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t return str; \n\t }\n\n\t\t\tpublic Character charAt(int i) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn null;\n\t\t\t} \n\t } \n\n \n\n\t // Complete the hurdleRace function below.\n// public static void solve() {\n// \tFastReader s=new FastReader();\n\n \n public static void main(String[] args) throws IOException {\n \tFastReader s=new FastReader();\n \tint n = s.nextInt();\n \tint b = s.nextInt();\n \tSystem.out.println(n*b);\n\t\t\n\n\n\t\t\n\n \t\n }\t\n}", "Main" ]
import java.io.*; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; 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.hasMoreTokens()) { 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 Character charAt(int i) { // TODO Auto-generated method stub return null; } } // Complete the hurdleRace function below. // public static void solve() { // FastReader s=new FastReader(); public static void main(String[] args) throws IOException { FastReader s=new FastReader(); int n = s.nextInt(); int b = s.nextInt(); System.out.println(n*b); } }
[ 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, 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 ], [ 39, 11 ], [ 39, 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 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 28, 33 ], [ 33, 34 ], [ 33, 35 ], [ 12, 36 ], [ 36, 37 ], [ 0, 38 ], [ 38, 39 ], [ 38, 40 ] ]
[ "import java.util.Arrays;\nimport java.util.BitSet;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String ars[]){\n Scanner in = new Scanner(System.in);\n long a = in.nextLong();\n long b = in.nextLong();\n System.out.println(a*b);\n }\n}", "import java.util.Arrays;", "Arrays", "java.util", "import java.util.BitSet;", "BitSet", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String ars[]){\n Scanner in = new Scanner(System.in);\n long a = in.nextLong();\n long b = in.nextLong();\n System.out.println(a*b);\n }\n}", "Main", "public static void main(String ars[]){\n Scanner in = new Scanner(System.in);\n long a = in.nextLong();\n long b = in.nextLong();\n System.out.println(a*b);\n }", "main", "{\n Scanner in = new Scanner(System.in);\n long a = in.nextLong();\n long b = in.nextLong();\n System.out.println(a*b);\n }", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "long a = in.nextLong();", "a", "in.nextLong()", "in.nextLong", "in", "long b = in.nextLong();", "b", "in.nextLong()", "in.nextLong", "in", "System.out.println(a*b)", "System.out.println", "System.out", "System", "System.out", "a*b", "a", "b", "String ars[]", "ars", "public class Main {\n public static void main(String ars[]){\n Scanner in = new Scanner(System.in);\n long a = in.nextLong();\n long b = in.nextLong();\n System.out.println(a*b);\n }\n}", "public class Main {\n public static void main(String ars[]){\n Scanner in = new Scanner(System.in);\n long a = in.nextLong();\n long b = in.nextLong();\n System.out.println(a*b);\n }\n}", "Main" ]
import java.util.Arrays; import java.util.BitSet; import java.util.Scanner; public class Main { public static void main(String ars[]){ Scanner in = new Scanner(System.in); long a = in.nextLong(); long b = in.nextLong(); System.out.println(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, 17, 0, 13, 2, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 39, 5 ], [ 39, 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 ], [ 27, 28 ], [ 27, 29 ], [ 8, 30 ], [ 30, 31 ], [ 31, 32 ], [ 32, 33 ], [ 32, 34 ], [ 30, 35 ], [ 6, 36 ], [ 36, 37 ], [ 0, 38 ], [ 38, 39 ], [ 38, 40 ] ]
[ "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 A=scan.nextInt();\n\t\tint B=scan.nextInt();\n\t\tint C=0;\n\t\tC=A*B;\n\t\tSystem.out.println(C);\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 A=scan.nextInt();\n\t\tint B=scan.nextInt();\n\t\tint C=0;\n\t\tC=A*B;\n\t\tSystem.out.println(C);\n\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\tint A=scan.nextInt();\n\t\tint B=scan.nextInt();\n\t\tint C=0;\n\t\tC=A*B;\n\t\tSystem.out.println(C);\n\n\t}", "main", "{\n\t\tScanner scan=new Scanner(System.in);\n\t\tint A=scan.nextInt();\n\t\tint B=scan.nextInt();\n\t\tint C=0;\n\t\tC=A*B;\n\t\tSystem.out.println(C);\n\n\t}", "Scanner scan=new Scanner(System.in);", "scan", "new Scanner(System.in)", "int A=scan.nextInt();", "A", "scan.nextInt()", "scan.nextInt", "scan", "int B=scan.nextInt();", "B", "scan.nextInt()", "scan.nextInt", "scan", "int C=0;", "C", "0", "C=A*B", "C", "A*B", "A", "B", "System.out.println(C)", "System.out.println", "System.out", "System", "System.out", "C", "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 A=scan.nextInt();\n\t\tint B=scan.nextInt();\n\t\tint C=0;\n\t\tC=A*B;\n\t\tSystem.out.println(C);\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 A=scan.nextInt();\n\t\tint B=scan.nextInt();\n\t\tint C=0;\n\t\tC=A*B;\n\t\tSystem.out.println(C);\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 A=scan.nextInt(); int B=scan.nextInt(); int C=0; C=A*B; System.out.println(C); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 4, 18, 20, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 47, 5 ], [ 47, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 8, 14 ], [ 14, 15 ], [ 14, 16 ], [ 16, 17 ], [ 17, 18 ], [ 16, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 22, 25 ], [ 25, 26 ], [ 25, 27 ], [ 8, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 31, 32 ], [ 30, 33 ], [ 33, 34 ], [ 33, 35 ], [ 8, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 36, 41 ], [ 41, 42 ], [ 41, 43 ], [ 6, 44 ], [ 44, 45 ], [ 0, 46 ], [ 46, 47 ], [ 46, 48 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tString first = new Scanner(System.in).nextLine();\n\t\tString Array[] = first.split(\" \");\n\t\tint Num0 = Integer.parseInt(Array[0]);\n\t\tint Num1 = Integer.parseInt(Array[1]);\n\t\tSystem.out.println(Num0 * Num1);\n\t\t\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args) {\n\t\tString first = new Scanner(System.in).nextLine();\n\t\tString Array[] = first.split(\" \");\n\t\tint Num0 = Integer.parseInt(Array[0]);\n\t\tint Num1 = Integer.parseInt(Array[1]);\n\t\tSystem.out.println(Num0 * Num1);\n\t\t\n }\n}", "Main", "public static void main(String[] args) {\n\t\tString first = new Scanner(System.in).nextLine();\n\t\tString Array[] = first.split(\" \");\n\t\tint Num0 = Integer.parseInt(Array[0]);\n\t\tint Num1 = Integer.parseInt(Array[1]);\n\t\tSystem.out.println(Num0 * Num1);\n\t\t\n }", "main", "{\n\t\tString first = new Scanner(System.in).nextLine();\n\t\tString Array[] = first.split(\" \");\n\t\tint Num0 = Integer.parseInt(Array[0]);\n\t\tint Num1 = Integer.parseInt(Array[1]);\n\t\tSystem.out.println(Num0 * Num1);\n\t\t\n }", "String first = new Scanner(System.in).nextLine();", "first", "new Scanner(System.in).nextLine()", "new Scanner(System.in).nextLine", "new Scanner(System.in)", "String Array[] = first.split(\" \");", "Array", "first.split(\" \")", "first.split", "first", "\" \"", "int Num0 = Integer.parseInt(Array[0]);", "Num0", "Integer.parseInt(Array[0])", "Integer.parseInt", "Integer", "Array[0]", "Array", "0", "int Num1 = Integer.parseInt(Array[1]);", "Num1", "Integer.parseInt(Array[1])", "Integer.parseInt", "Integer", "Array[1]", "Array", "1", "System.out.println(Num0 * Num1)", "System.out.println", "System.out", "System", "System.out", "Num0 * Num1", "Num0", "Num1", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n\t\tString first = new Scanner(System.in).nextLine();\n\t\tString Array[] = first.split(\" \");\n\t\tint Num0 = Integer.parseInt(Array[0]);\n\t\tint Num1 = Integer.parseInt(Array[1]);\n\t\tSystem.out.println(Num0 * Num1);\n\t\t\n }\n}", "public class Main {\n public static void main(String[] args) {\n\t\tString first = new Scanner(System.in).nextLine();\n\t\tString Array[] = first.split(\" \");\n\t\tint Num0 = Integer.parseInt(Array[0]);\n\t\tint Num1 = Integer.parseInt(Array[1]);\n\t\tSystem.out.println(Num0 * Num1);\n\t\t\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { String first = new Scanner(System.in).nextLine(); String Array[] = first.split(" "); int Num0 = Integer.parseInt(Array[0]); int Num1 = Integer.parseInt(Array[1]); System.out.println(Num0 * Num1); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 38, 30, 41, 13, 20, 4, 18, 18, 13, 13, 2, 4, 18, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 29, 5 ], [ 29, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 10, 11 ], [ 11, 12 ], [ 11, 13 ], [ 10, 14 ], [ 14, 15 ], [ 15, 16 ], [ 16, 17 ], [ 16, 18 ], [ 14, 19 ], [ 19, 20 ], [ 20, 21 ], [ 21, 22 ], [ 19, 23 ], [ 23, 24 ], [ 24, 25 ], [ 6, 26 ], [ 26, 27 ], [ 0, 28 ], [ 28, 29 ], [ 28, 30 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\ttry (Scanner scanner = new Scanner(System.in)) {\n\t\t\tSystem.out.println(scanner.nextInt() * scanner.nextInt());\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\ttry (Scanner scanner = new Scanner(System.in)) {\n\t\t\tSystem.out.println(scanner.nextInt() * scanner.nextInt());\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\ttry (Scanner scanner = new Scanner(System.in)) {\n\t\t\tSystem.out.println(scanner.nextInt() * scanner.nextInt());\n\t\t}\n\t}", "main", "{\n\t\ttry (Scanner scanner = new Scanner(System.in)) {\n\t\t\tSystem.out.println(scanner.nextInt() * scanner.nextInt());\n\t\t}\n\t}", "try (Scanner scanner = new Scanner(System.in)) {\n\t\t\tSystem.out.println(scanner.nextInt() * scanner.nextInt());\n\t\t}", "{\n\t\t\tSystem.out.println(scanner.nextInt() * scanner.nextInt());\n\t\t}", "Scanner scanner = new Scanner(System.in)", "Scanner scanner = new Scanner(System.in)", "new Scanner(System.in)", "System.out.println(scanner.nextInt() * scanner.nextInt())", "System.out.println", "System.out", "System", "System.out", "scanner.nextInt() * scanner.nextInt()", "scanner.nextInt()", "scanner.nextInt", "scanner", "scanner.nextInt()", "scanner.nextInt", "scanner", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\ttry (Scanner scanner = new Scanner(System.in)) {\n\t\t\tSystem.out.println(scanner.nextInt() * scanner.nextInt());\n\t\t}\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\ttry (Scanner scanner = new Scanner(System.in)) {\n\t\t\tSystem.out.println(scanner.nextInt() * scanner.nextInt());\n\t\t}\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { try (Scanner scanner = new Scanner(System.in)) { System.out.println(scanner.nextInt() * scanner.nextInt()); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 2, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 36, 5 ], [ 36, 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 ], [ 24, 26 ], [ 8, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 29, 31 ], [ 27, 32 ], [ 6, 33 ], [ 33, 34 ], [ 0, 35 ], [ 35, 36 ], [ 35, 37 ] ]
[ "import java.util.Scanner;\n \npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint factor1 = scanner.nextInt();\n\t\tint factor2 = scanner.nextInt();\n \tint result = factor1 * factor2;\n \tSystem.out.println(result);\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\t\tint factor1 = scanner.nextInt();\n\t\tint factor2 = scanner.nextInt();\n \tint result = factor1 * factor2;\n \tSystem.out.println(result);\n\t}\n}", "Main", "public static void main(String[] args){\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint factor1 = scanner.nextInt();\n\t\tint factor2 = scanner.nextInt();\n \tint result = factor1 * factor2;\n \tSystem.out.println(result);\n\t}", "main", "{\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint factor1 = scanner.nextInt();\n\t\tint factor2 = scanner.nextInt();\n \tint result = factor1 * factor2;\n \tSystem.out.println(result);\n\t}", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int factor1 = scanner.nextInt();", "factor1", "scanner.nextInt()", "scanner.nextInt", "scanner", "int factor2 = scanner.nextInt();", "factor2", "scanner.nextInt()", "scanner.nextInt", "scanner", "int result = factor1 * factor2;", "result", "factor1 * factor2", "factor1", "factor2", "System.out.println(result)", "System.out.println", "System.out", "System", "System.out", "result", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint factor1 = scanner.nextInt();\n\t\tint factor2 = scanner.nextInt();\n \tint result = factor1 * factor2;\n \tSystem.out.println(result);\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint factor1 = scanner.nextInt();\n\t\tint factor2 = scanner.nextInt();\n \tint result = factor1 * factor2;\n \tSystem.out.println(result);\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner scanner = new Scanner(System.in); int factor1 = scanner.nextInt(); int factor2 = scanner.nextInt(); int result = factor1 * factor2; System.out.println(result); } }
[ 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, 41, 13, 20, 41, 13, 20, 41, 13, 17, 41, 13, 17, 41, 13, 17, 41, 13, 39, 40, 17, 17, 17, 17, 40, 17, 17, 17, 40, 17, 40, 17, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 2, 4, 18, 13, 4, 18, 13, 17, 4, 18, 13, 2, 2, 13, 13, 17, 12, 13, 30, 4, 18, 20, 4, 18, 13, 23, 13, 6, 13, 41, 13, 20, 41, 13, 12, 13, 30, 38, 5, 13, 30, 30, 42, 2, 2, 13, 17, 40, 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, 4, 13, 12, 13, 30, 41, 13, 20, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 4, 13, 29, 13, 23, 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, 13, 29, 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, 4, 13, 29, 13, 23, 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, 13, 29, 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, 4, 13, 29, 13, 23, 13, 23, 13, 6, 13, 41, 13, 20, 41, 13, 17, 12, 13, 30, 41, 13, 20, 28, 13, 13, 30, 30, 4, 18, 13, 4, 18, 13, 13, 4, 18, 13, 13, 14, 13, 30, 4, 18, 13, 23, 13, 12, 13, 30, 4, 18, 13, 4, 18, 13, 13, 14, 13, 30, 4, 18, 13, 23, 13, 12, 13, 30, 41, 13, 20, 28, 13, 13, 30, 30, 4, 18, 13, 4, 18, 13, 13, 4, 18, 13, 13, 14, 13, 30, 4, 18, 13, 23, 13, 12, 13, 30, 41, 13, 20, 28, 13, 13, 30, 30, 4, 18, 13, 4, 18, 13, 13, 4, 18, 13, 13, 14, 13, 30, 4, 18, 13, 23, 13, 12, 13, 30, 4, 18, 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 ], [ 441, 26 ], [ 441, 27 ], [ 27, 28 ], [ 27, 29 ], [ 441, 30 ], [ 30, 31 ], [ 30, 32 ], [ 441, 33 ], [ 33, 34 ], [ 33, 35 ], [ 441, 36 ], [ 36, 37 ], [ 36, 38 ], [ 441, 39 ], [ 39, 40 ], [ 39, 41 ], [ 441, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 44, 47 ], [ 44, 48 ], [ 44, 49 ], [ 44, 50 ], [ 50, 51 ], [ 44, 52 ], [ 44, 53 ], [ 44, 54 ], [ 54, 55 ], [ 44, 56 ], [ 56, 57 ], [ 441, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 64, 65 ], [ 60, 66 ], [ 66, 67 ], [ 66, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 69, 72 ], [ 72, 73 ], [ 73, 74 ], [ 68, 75 ], [ 60, 76 ], [ 76, 77 ], [ 77, 78 ], [ 76, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 79, 83 ], [ 441, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 86, 90 ], [ 90, 91 ], [ 91, 92 ], [ 84, 93 ], [ 93, 94 ], [ 0, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 97, 99 ], [ 95, 100 ], [ 100, 101 ], [ 95, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 105, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 111, 115 ], [ 115, 116 ], [ 116, 117 ], [ 117, 118 ], [ 110, 119 ], [ 119, 120 ], [ 120, 121 ], [ 120, 122 ], [ 104, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 95, 127 ], [ 127, 128 ], [ 127, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 131, 134 ], [ 134, 135 ], [ 95, 136 ], [ 136, 137 ], [ 136, 138 ], [ 138, 139 ], [ 139, 140 ], [ 140, 141 ], [ 141, 142 ], [ 140, 143 ], [ 143, 144 ], [ 95, 145 ], [ 145, 146 ], [ 145, 147 ], [ 147, 148 ], [ 148, 149 ], [ 149, 150 ], [ 150, 151 ], [ 151, 152 ], [ 95, 153 ], [ 153, 154 ], [ 153, 155 ], [ 155, 156 ], [ 156, 157 ], [ 156, 158 ], [ 155, 161 ], [ 161, 162 ], [ 162, 163 ], [ 163, 164 ], [ 163, 165 ], [ 161, 166 ], [ 166, 167 ], [ 166, 168 ], [ 161, 169 ], [ 169, 170 ], [ 170, 171 ], [ 161, 172 ], [ 173, 173 ], [ 173, 174 ], [ 174, 175 ], [ 175, 176 ], [ 175, 177 ], [ 174, 178 ], [ 178, 179 ], [ 179, 180 ], [ 180, 181 ], [ 155, 182 ], [ 182, 183 ], [ 153, 184 ], [ 184, 185 ], [ 153, 186 ], [ 186, 187 ], [ 95, 188 ], [ 188, 189 ], [ 188, 190 ], [ 190, 191 ], [ 191, 192 ], [ 191, 193 ], [ 190, 195 ], [ 195, 196 ], [ 196, 197 ], [ 197, 198 ], [ 197, 199 ], [ 195, 200 ], [ 200, 201 ], [ 200, 202 ], [ 195, 203 ], [ 203, 204 ], [ 204, 205 ], [ 195, 206 ], [ 207, 207 ], [ 207, 208 ], [ 208, 209 ], [ 209, 210 ], [ 209, 211 ], [ 208, 212 ], [ 212, 213 ], [ 190, 214 ], [ 214, 215 ], [ 188, 216 ], [ 216, 217 ], [ 95, 218 ], [ 218, 219 ], [ 218, 220 ], [ 220, 221 ], [ 221, 222 ], [ 221, 223 ], [ 220, 225 ], [ 225, 226 ], [ 226, 227 ], [ 227, 228 ], [ 227, 229 ], [ 225, 230 ], [ 230, 231 ], [ 230, 232 ], [ 225, 233 ], [ 233, 234 ], [ 234, 235 ], [ 225, 236 ], [ 237, 237 ], [ 237, 238 ], [ 238, 239 ], [ 239, 240 ], [ 239, 241 ], [ 238, 242 ], [ 242, 243 ], [ 243, 244 ], [ 242, 245 ], [ 245, 246 ], [ 220, 247 ], [ 247, 248 ], [ 218, 249 ], [ 249, 250 ], [ 218, 251 ], [ 251, 252 ], [ 95, 253 ], [ 253, 254 ], [ 253, 255 ], [ 255, 256 ], [ 256, 257 ], [ 256, 258 ], [ 255, 260 ], [ 260, 261 ], [ 261, 262 ], [ 262, 263 ], [ 262, 264 ], [ 260, 265 ], [ 265, 266 ], [ 265, 267 ], [ 260, 268 ], [ 268, 269 ], [ 269, 270 ], [ 260, 271 ], [ 272, 272 ], [ 272, 273 ], [ 273, 274 ], [ 274, 275 ], [ 274, 276 ], [ 273, 277 ], [ 277, 278 ], [ 255, 279 ], [ 279, 280 ], [ 253, 281 ], [ 281, 282 ], [ 95, 283 ], [ 283, 284 ], [ 283, 285 ], [ 285, 286 ], [ 286, 287 ], [ 286, 288 ], [ 285, 290 ], [ 290, 291 ], [ 291, 292 ], [ 292, 293 ], [ 292, 294 ], [ 290, 295 ], [ 295, 296 ], [ 295, 297 ], [ 290, 298 ], [ 298, 299 ], [ 299, 300 ], [ 290, 301 ], [ 302, 302 ], [ 302, 303 ], [ 303, 304 ], [ 304, 305 ], [ 304, 306 ], [ 303, 307 ], [ 307, 308 ], [ 308, 309 ], [ 307, 310 ], [ 310, 311 ], [ 285, 312 ], [ 312, 313 ], [ 283, 314 ], [ 314, 315 ], [ 283, 316 ], [ 316, 317 ], [ 0, 318 ], [ 318, 319 ], [ 318, 320 ], [ 320, 321 ], [ 320, 322 ], [ 318, 323 ], [ 323, 324 ], [ 323, 325 ], [ 318, 326 ], [ 326, 327 ], [ 326, 328 ], [ 328, 329 ], [ 329, 330 ], [ 329, 331 ], [ 328, 332 ], [ 332, 333 ], [ 332, 334 ], [ 332, 335 ], [ 336, 336 ], [ 336, 337 ], [ 337, 338 ], [ 338, 339 ], [ 337, 340 ], [ 340, 341 ], [ 341, 342 ], [ 340, 343 ], [ 328, 344 ], [ 344, 345 ], [ 345, 346 ], [ 344, 347 ], [ 328, 348 ], [ 348, 349 ], [ 348, 350 ], [ 350, 351 ], [ 351, 352 ], [ 352, 353 ], [ 326, 354 ], [ 354, 355 ], [ 318, 356 ], [ 356, 357 ], [ 356, 358 ], [ 358, 359 ], [ 359, 360 ], [ 360, 361 ], [ 359, 362 ], [ 362, 363 ], [ 363, 364 ], [ 362, 365 ], [ 358, 366 ], [ 366, 367 ], [ 366, 368 ], [ 368, 369 ], [ 369, 370 ], [ 370, 371 ], [ 356, 372 ], [ 372, 373 ], [ 318, 374 ], [ 374, 375 ], [ 374, 376 ], [ 376, 377 ], [ 377, 378 ], [ 377, 379 ], [ 376, 380 ], [ 380, 381 ], [ 380, 382 ], [ 380, 383 ], [ 384, 384 ], [ 384, 385 ], [ 385, 386 ], [ 386, 387 ], [ 385, 388 ], [ 388, 389 ], [ 389, 390 ], [ 388, 391 ], [ 376, 392 ], [ 392, 393 ], [ 393, 394 ], [ 392, 395 ], [ 376, 396 ], [ 396, 397 ], [ 396, 398 ], [ 398, 399 ], [ 399, 400 ], [ 400, 401 ], [ 374, 402 ], [ 402, 403 ], [ 318, 404 ], [ 404, 405 ], [ 404, 406 ], [ 406, 407 ], [ 407, 408 ], [ 407, 409 ], [ 406, 410 ], [ 410, 411 ], [ 410, 412 ], [ 410, 413 ], [ 414, 414 ], [ 414, 415 ], [ 415, 416 ], [ 416, 417 ], [ 415, 418 ], [ 418, 419 ], [ 419, 420 ], [ 418, 421 ], [ 406, 422 ], [ 422, 423 ], [ 423, 424 ], [ 422, 425 ], [ 406, 426 ], [ 426, 427 ], [ 426, 428 ], [ 428, 429 ], [ 429, 430 ], [ 430, 431 ], [ 404, 432 ], [ 432, 433 ], [ 318, 434 ], [ 434, 435 ], [ 434, 436 ], [ 436, 437 ], [ 437, 438 ], [ 438, 439 ], [ 0, 440 ], [ 440, 441 ], [ 440, 442 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\nimport java.util.StringJoiner;\nimport java.util.StringTokenizer;\nimport java.util.function.IntUnaryOperator;\nimport java.util.function.LongUnaryOperator;\n\npublic class Main {\n static In in = new In();\n static Out out = new Out();\n static final long mod = 1000000007;\n static final long inf = 0x1fffffffffffffffL;\n static final int iinf = 0x3fffffff;\n static final int[] da = {-1, 0, 1, 0, -1, 1, 1, -1, -1};\n\n void solve() {\n long a = in.nextLong();\n long b = (long)(Double.parseDouble(in.next()) * 100);\n out.println(a * b / 100);\n }\n\n public static void main(String[]$) {\n new Main().solve();\n out.flush();\n }\n}\n\nclass In {\n private BufferedReader reader = new BufferedReader(new InputStreamReader(System.in), 0x10000);\n private StringTokenizer tokenizer;\n\n String next() {\n try {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n tokenizer = new StringTokenizer(reader.readLine());\n }\n } catch (IOException ignored) {\n }\n return tokenizer.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n char[] nextCharArray() {\n return next().toCharArray();\n }\n\n char[][] nextCharGrid(int n, int m) {\n char[][] a = new char[n][m];\n for (int i = 0; i < n; i++) {\n a[i] = next().toCharArray();\n }\n return a;\n }\n\n 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 int[] nextIntArray(int n, IntUnaryOperator op) {\n int[] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = op.applyAsInt(nextInt());\n }\n return a;\n }\n\n long[] nextLongArray(int n) {\n long[] a = new long[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextLong();\n }\n return a;\n }\n\n long[] nextLongArray(int n, LongUnaryOperator op) {\n long[] a = new long[n];\n for (int i = 0; i < n; i++) {\n a[i] = op.applyAsLong(nextLong());\n }\n return a;\n }\n}\n\nclass Out {\n private PrintWriter out = new PrintWriter(System.out);\n boolean autoFlush = false;\n\n void println(Object... a) {\n StringJoiner joiner = new StringJoiner(\" \");\n for (Object obj : a) {\n joiner.add(String.valueOf(obj));\n }\n out.println(joiner);\n if (autoFlush) {\n out.flush();\n }\n }\n\n void println(char[] s) {\n out.println(String.valueOf(s));\n if (autoFlush) {\n out.flush();\n }\n }\n\n void println(int[] a) {\n StringJoiner joiner = new StringJoiner(\" \");\n for (int i : a) {\n joiner.add(Integer.toString(i));\n }\n out.println(joiner);\n if (autoFlush) {\n out.flush();\n }\n }\n\n void println(long[] a) {\n StringJoiner joiner = new StringJoiner(\" \");\n for (long i : a) {\n joiner.add(Long.toString(i));\n }\n out.println(joiner);\n if (autoFlush) {\n out.flush();\n }\n }\n\n void flush() {\n out.flush();\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.io.PrintWriter;", "PrintWriter", "java.io", "import java.util.StringJoiner;", "StringJoiner", "java.util", "import java.util.StringTokenizer;", "StringTokenizer", "java.util", "import java.util.function.IntUnaryOperator;", "IntUnaryOperator", "java.util.function", "import java.util.function.LongUnaryOperator;", "LongUnaryOperator", "java.util.function", "public class Main {\n static In in = new In();\n static Out out = new Out();\n static final long mod = 1000000007;\n static final long inf = 0x1fffffffffffffffL;\n static final int iinf = 0x3fffffff;\n static final int[] da = {-1, 0, 1, 0, -1, 1, 1, -1, -1};\n\n void solve() {\n long a = in.nextLong();\n long b = (long)(Double.parseDouble(in.next()) * 100);\n out.println(a * b / 100);\n }\n\n public static void main(String[]$) {\n new Main().solve();\n out.flush();\n }\n}", "Main", "static In in = new In();", "in", "new In()", "static Out out = new Out();", "out", "new Out()", "static final long mod = 1000000007;", "mod", "1000000007", "static final long inf = 0x1fffffffffffffffL;", "inf", "0x1fffffffffffffffL", "static final int iinf = 0x3fffffff;", "iinf", "0x3fffffff", "static final int[] da = {-1, 0, 1, 0, -1, 1, 1, -1, -1};", "da", "{-1, 0, 1, 0, -1, 1, 1, -1, -1}", "-1", "1", "0", "1", "0", "-1", "1", "1", "1", "-1", "1", "-1", "1", "void solve() {\n long a = in.nextLong();\n long b = (long)(Double.parseDouble(in.next()) * 100);\n out.println(a * b / 100);\n }", "solve", "{\n long a = in.nextLong();\n long b = (long)(Double.parseDouble(in.next()) * 100);\n out.println(a * b / 100);\n }", "long a = in.nextLong();", "a", "in.nextLong()", "in.nextLong", "in", "long b = (long)(Double.parseDouble(in.next()) * 100);", "b", "(long)(Double.parseDouble(in.next()) * 100)", "Double.parseDouble(in.next())", "Double.parseDouble", "Double", "in.next()", "in.next", "in", "100", "out.println(a * b / 100)", "out.println", "out", "a * b / 100", "a * b", "a", "b", "100", "public static void main(String[]$) {\n new Main().solve();\n out.flush();\n }", "main", "{\n new Main().solve();\n out.flush();\n }", "new Main().solve()", "new Main().solve", "new Main()", "out.flush()", "out.flush", "out", "String[]$", "$", "class In {\n private BufferedReader reader = new BufferedReader(new InputStreamReader(System.in), 0x10000);\n private StringTokenizer tokenizer;\n\n String next() {\n try {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n tokenizer = new StringTokenizer(reader.readLine());\n }\n } catch (IOException ignored) {\n }\n return tokenizer.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n char[] nextCharArray() {\n return next().toCharArray();\n }\n\n char[][] nextCharGrid(int n, int m) {\n char[][] a = new char[n][m];\n for (int i = 0; i < n; i++) {\n a[i] = next().toCharArray();\n }\n return a;\n }\n\n 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 int[] nextIntArray(int n, IntUnaryOperator op) {\n int[] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = op.applyAsInt(nextInt());\n }\n return a;\n }\n\n long[] nextLongArray(int n) {\n long[] a = new long[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextLong();\n }\n return a;\n }\n\n long[] nextLongArray(int n, LongUnaryOperator op) {\n long[] a = new long[n];\n for (int i = 0; i < n; i++) {\n a[i] = op.applyAsLong(nextLong());\n }\n return a;\n }\n}", "In", "private BufferedReader reader = new BufferedReader(new InputStreamReader(System.in), 0x10000);", "reader", "new BufferedReader(new InputStreamReader(System.in), 0x10000)", "private StringTokenizer tokenizer;", "tokenizer", "String next() {\n try {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n tokenizer = new StringTokenizer(reader.readLine());\n }\n } catch (IOException ignored) {\n }\n return tokenizer.nextToken();\n }", "next", "{\n try {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n tokenizer = new StringTokenizer(reader.readLine());\n }\n } catch (IOException ignored) {\n }\n return tokenizer.nextToken();\n }", "try {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n tokenizer = new StringTokenizer(reader.readLine());\n }\n } catch (IOException ignored) {\n }", "catch (IOException ignored) {\n }", "IOException ignored", "{\n }", "{\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n tokenizer = new StringTokenizer(reader.readLine());\n }\n }", "while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n tokenizer = new StringTokenizer(reader.readLine());\n }", "tokenizer == null || !tokenizer.hasMoreTokens()", "tokenizer == null", "tokenizer", "null", "!tokenizer.hasMoreTokens()", "tokenizer.hasMoreTokens()", "tokenizer.hasMoreTokens", "tokenizer", "{\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", "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", "char[] nextCharArray() {\n return next().toCharArray();\n }", "nextCharArray", "{\n return next().toCharArray();\n }", "return next().toCharArray();", "next().toCharArray()", "next().toCharArray", "next()", "next", "char[][] nextCharGrid(int n, int m) {\n char[][] a = new char[n][m];\n for (int i = 0; i < n; i++) {\n a[i] = next().toCharArray();\n }\n return a;\n }", "nextCharGrid", "{\n char[][] a = new char[n][m];\n for (int i = 0; i < n; i++) {\n a[i] = next().toCharArray();\n }\n return a;\n }", "char[][] a = new char[n][m];", "a", "new char[n][m]", "n", "m", "for (int i = 0; i < n; i++) {\n a[i] = next().toCharArray();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n a[i] = next().toCharArray();\n }", "{\n a[i] = next().toCharArray();\n }", "a[i] = next().toCharArray()", "a[i]", "a", "i", "next().toCharArray()", "next().toCharArray", "next()", "next", "return a;", "a", "int n", "n", "int m", "m", "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", "int[] nextIntArray(int n, IntUnaryOperator op) {\n int[] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = op.applyAsInt(nextInt());\n }\n return a;\n }", "nextIntArray", "{\n int[] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = op.applyAsInt(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] = op.applyAsInt(nextInt());\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n a[i] = op.applyAsInt(nextInt());\n }", "{\n a[i] = op.applyAsInt(nextInt());\n }", "a[i] = op.applyAsInt(nextInt())", "a[i]", "a", "i", "op.applyAsInt(nextInt())", "op.applyAsInt", "op", "nextInt()", "nextInt", "return a;", "a", "int n", "n", "IntUnaryOperator op", "op", "long[] nextLongArray(int n) {\n long[] a = new long[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextLong();\n }\n return a;\n }", "nextLongArray", "{\n long[] a = new long[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextLong();\n }\n return a;\n }", "long[] a = new long[n];", "a", "new long[n]", "n", "for (int i = 0; i < n; i++) {\n a[i] = nextLong();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n a[i] = nextLong();\n }", "{\n a[i] = nextLong();\n }", "a[i] = nextLong()", "a[i]", "a", "i", "nextLong()", "nextLong", "return a;", "a", "int n", "n", "long[] nextLongArray(int n, LongUnaryOperator op) {\n long[] a = new long[n];\n for (int i = 0; i < n; i++) {\n a[i] = op.applyAsLong(nextLong());\n }\n return a;\n }", "nextLongArray", "{\n long[] a = new long[n];\n for (int i = 0; i < n; i++) {\n a[i] = op.applyAsLong(nextLong());\n }\n return a;\n }", "long[] a = new long[n];", "a", "new long[n]", "n", "for (int i = 0; i < n; i++) {\n a[i] = op.applyAsLong(nextLong());\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n a[i] = op.applyAsLong(nextLong());\n }", "{\n a[i] = op.applyAsLong(nextLong());\n }", "a[i] = op.applyAsLong(nextLong())", "a[i]", "a", "i", "op.applyAsLong(nextLong())", "op.applyAsLong", "op", "nextLong()", "nextLong", "return a;", "a", "int n", "n", "LongUnaryOperator op", "op", "class Out {\n private PrintWriter out = new PrintWriter(System.out);\n boolean autoFlush = false;\n\n void println(Object... a) {\n StringJoiner joiner = new StringJoiner(\" \");\n for (Object obj : a) {\n joiner.add(String.valueOf(obj));\n }\n out.println(joiner);\n if (autoFlush) {\n out.flush();\n }\n }\n\n void println(char[] s) {\n out.println(String.valueOf(s));\n if (autoFlush) {\n out.flush();\n }\n }\n\n void println(int[] a) {\n StringJoiner joiner = new StringJoiner(\" \");\n for (int i : a) {\n joiner.add(Integer.toString(i));\n }\n out.println(joiner);\n if (autoFlush) {\n out.flush();\n }\n }\n\n void println(long[] a) {\n StringJoiner joiner = new StringJoiner(\" \");\n for (long i : a) {\n joiner.add(Long.toString(i));\n }\n out.println(joiner);\n if (autoFlush) {\n out.flush();\n }\n }\n\n void flush() {\n out.flush();\n }\n}", "Out", "private PrintWriter out = new PrintWriter(System.out);", "out", "new PrintWriter(System.out)", "boolean autoFlush = false;", "autoFlush", "false", "void println(Object... a) {\n StringJoiner joiner = new StringJoiner(\" \");\n for (Object obj : a) {\n joiner.add(String.valueOf(obj));\n }\n out.println(joiner);\n if (autoFlush) {\n out.flush();\n }\n }", "println", "{\n StringJoiner joiner = new StringJoiner(\" \");\n for (Object obj : a) {\n joiner.add(String.valueOf(obj));\n }\n out.println(joiner);\n if (autoFlush) {\n out.flush();\n }\n }", "StringJoiner joiner = new StringJoiner(\" \");", "joiner", "new StringJoiner(\" \")", "for (Object obj : a) {\n joiner.add(String.valueOf(obj));\n }", "Object obj", "a", "{\n joiner.add(String.valueOf(obj));\n }", "{\n joiner.add(String.valueOf(obj));\n }", "joiner.add(String.valueOf(obj))", "joiner.add", "joiner", "String.valueOf(obj)", "String.valueOf", "String", "obj", "out.println(joiner)", "out.println", "out", "joiner", "if (autoFlush) {\n out.flush();\n }", "autoFlush", "{\n out.flush();\n }", "out.flush()", "out.flush", "out", "Object... a", "a", "void println(char[] s) {\n out.println(String.valueOf(s));\n if (autoFlush) {\n out.flush();\n }\n }", "println", "{\n out.println(String.valueOf(s));\n if (autoFlush) {\n out.flush();\n }\n }", "out.println(String.valueOf(s))", "out.println", "out", "String.valueOf(s)", "String.valueOf", "String", "s", "if (autoFlush) {\n out.flush();\n }", "autoFlush", "{\n out.flush();\n }", "out.flush()", "out.flush", "out", "char[] s", "s", "void println(int[] a) {\n StringJoiner joiner = new StringJoiner(\" \");\n for (int i : a) {\n joiner.add(Integer.toString(i));\n }\n out.println(joiner);\n if (autoFlush) {\n out.flush();\n }\n }", "println", "{\n StringJoiner joiner = new StringJoiner(\" \");\n for (int i : a) {\n joiner.add(Integer.toString(i));\n }\n out.println(joiner);\n if (autoFlush) {\n out.flush();\n }\n }", "StringJoiner joiner = new StringJoiner(\" \");", "joiner", "new StringJoiner(\" \")", "for (int i : a) {\n joiner.add(Integer.toString(i));\n }", "int i", "a", "{\n joiner.add(Integer.toString(i));\n }", "{\n joiner.add(Integer.toString(i));\n }", "joiner.add(Integer.toString(i))", "joiner.add", "joiner", "Integer.toString(i)", "Integer.toString", "Integer", "i", "out.println(joiner)", "out.println", "out", "joiner", "if (autoFlush) {\n out.flush();\n }", "autoFlush", "{\n out.flush();\n }", "out.flush()", "out.flush", "out", "int[] a", "a", "void println(long[] a) {\n StringJoiner joiner = new StringJoiner(\" \");\n for (long i : a) {\n joiner.add(Long.toString(i));\n }\n out.println(joiner);\n if (autoFlush) {\n out.flush();\n }\n }", "println", "{\n StringJoiner joiner = new StringJoiner(\" \");\n for (long i : a) {\n joiner.add(Long.toString(i));\n }\n out.println(joiner);\n if (autoFlush) {\n out.flush();\n }\n }", "StringJoiner joiner = new StringJoiner(\" \");", "joiner", "new StringJoiner(\" \")", "for (long i : a) {\n joiner.add(Long.toString(i));\n }", "long i", "a", "{\n joiner.add(Long.toString(i));\n }", "{\n joiner.add(Long.toString(i));\n }", "joiner.add(Long.toString(i))", "joiner.add", "joiner", "Long.toString(i)", "Long.toString", "Long", "i", "out.println(joiner)", "out.println", "out", "joiner", "if (autoFlush) {\n out.flush();\n }", "autoFlush", "{\n out.flush();\n }", "out.flush()", "out.flush", "out", "long[] a", "a", "void flush() {\n out.flush();\n }", "flush", "{\n out.flush();\n }", "out.flush()", "out.flush", "out", "public class Main {\n static In in = new In();\n static Out out = new Out();\n static final long mod = 1000000007;\n static final long inf = 0x1fffffffffffffffL;\n static final int iinf = 0x3fffffff;\n static final int[] da = {-1, 0, 1, 0, -1, 1, 1, -1, -1};\n\n void solve() {\n long a = in.nextLong();\n long b = (long)(Double.parseDouble(in.next()) * 100);\n out.println(a * b / 100);\n }\n\n public static void main(String[]$) {\n new Main().solve();\n out.flush();\n }\n}", "public class Main {\n static In in = new In();\n static Out out = new Out();\n static final long mod = 1000000007;\n static final long inf = 0x1fffffffffffffffL;\n static final int iinf = 0x3fffffff;\n static final int[] da = {-1, 0, 1, 0, -1, 1, 1, -1, -1};\n\n void solve() {\n long a = in.nextLong();\n long b = (long)(Double.parseDouble(in.next()) * 100);\n out.println(a * b / 100);\n }\n\n public static void main(String[]$) {\n new Main().solve();\n out.flush();\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.StringJoiner; import java.util.StringTokenizer; import java.util.function.IntUnaryOperator; import java.util.function.LongUnaryOperator; public class Main { static In in = new In(); static Out out = new Out(); static final long mod = 1000000007; static final long inf = 0x1fffffffffffffffL; static final int iinf = 0x3fffffff; static final int[] da = {-1, 0, 1, 0, -1, 1, 1, -1, -1}; void solve() { long a = in.nextLong(); long b = (long)(Double.parseDouble(in.next()) * 100); out.println(a * b / 100); } public static void main(String[]$) { new Main().solve(); out.flush(); } } class In { private BufferedReader reader = new BufferedReader(new InputStreamReader(System.in), 0x10000); private StringTokenizer tokenizer; String next() { try { while (tokenizer == null || !tokenizer.hasMoreTokens()) { tokenizer = new StringTokenizer(reader.readLine()); } } catch (IOException ignored) { } return tokenizer.nextToken(); } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } char[] nextCharArray() { return next().toCharArray(); } char[][] nextCharGrid(int n, int m) { char[][] a = new char[n][m]; for (int i = 0; i < n; i++) { a[i] = next().toCharArray(); } return a; } int[] nextIntArray(int n) { int[] a = new int[n]; for (int i = 0; i < n; i++) { a[i] = nextInt(); } return a; } int[] nextIntArray(int n, IntUnaryOperator op) { int[] a = new int[n]; for (int i = 0; i < n; i++) { a[i] = op.applyAsInt(nextInt()); } return a; } long[] nextLongArray(int n) { long[] a = new long[n]; for (int i = 0; i < n; i++) { a[i] = nextLong(); } return a; } long[] nextLongArray(int n, LongUnaryOperator op) { long[] a = new long[n]; for (int i = 0; i < n; i++) { a[i] = op.applyAsLong(nextLong()); } return a; } } class Out { private PrintWriter out = new PrintWriter(System.out); boolean autoFlush = false; void println(Object... a) { StringJoiner joiner = new StringJoiner(" "); for (Object obj : a) { joiner.add(String.valueOf(obj)); } out.println(joiner); if (autoFlush) { out.flush(); } } void println(char[] s) { out.println(String.valueOf(s)); if (autoFlush) { out.flush(); } } void println(int[] a) { StringJoiner joiner = new StringJoiner(" "); for (int i : a) { joiner.add(Integer.toString(i)); } out.println(joiner); if (autoFlush) { out.flush(); } } void println(long[] a) { StringJoiner joiner = new StringJoiner(" "); for (long i : a) { joiner.add(Long.toString(i)); } out.println(joiner); if (autoFlush) { out.flush(); } } void flush() { out.flush(); } }
[ 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, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 37, 5 ], [ 37, 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 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 26, 31 ], [ 31, 32 ], [ 31, 33 ], [ 6, 34 ], [ 34, 35 ], [ 0, 36 ], [ 36, 37 ], [ 36, 38 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n long a, b;\n Scanner in = new Scanner(System.in);\n a = in.nextInt();\n b = in.nextInt();\n System.out.println(a * b);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n long a, b;\n Scanner in = new Scanner(System.in);\n a = in.nextInt();\n b = in.nextInt();\n System.out.println(a * b);\n }\n}", "Main", "public static void main(String[] args) {\n long a, b;\n Scanner in = new Scanner(System.in);\n a = in.nextInt();\n b = in.nextInt();\n System.out.println(a * b);\n }", "main", "{\n long a, b;\n Scanner in = new Scanner(System.in);\n a = in.nextInt();\n b = in.nextInt();\n System.out.println(a * b);\n }", "long a", "a", "b;", "b", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "a = in.nextInt()", "a", "in.nextInt()", "in.nextInt", "in", "b = in.nextInt()", "b", "in.nextInt()", "in.nextInt", "in", "System.out.println(a * b)", "System.out.println", "System.out", "System", "System.out", "a * b", "a", "b", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n long a, b;\n Scanner in = new Scanner(System.in);\n a = in.nextInt();\n b = in.nextInt();\n System.out.println(a * b);\n }\n}", "public class Main {\n public static void main(String[] args) {\n long a, b;\n Scanner in = new Scanner(System.in);\n a = in.nextInt();\n b = in.nextInt();\n System.out.println(a * b);\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { long a, b; Scanner in = new Scanner(System.in); a = in.nextInt(); b = in.nextInt(); System.out.println(a * b); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 4, 18, 18, 13, 13, 2, 4, 13, 4, 13, 23, 13, 12, 13, 30, 4, 18, 13, 17, 42, 17, 30, 38, 5, 13, 30, 3, 30, 41, 13, 4, 18, 18, 13, 13, 14, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 40, 17, 30, 3, 30, 4, 18, 13, 13, 12, 13, 30, 4, 13, 29, 4, 18, 13, 4, 18, 13, 12, 13, 30, 4, 13, 29, 4, 18, 13, 4, 18, 13, 13, 23, 13, 12, 13, 30, 4, 13, 29, 4, 18, 13, 4, 18, 13, 12, 13, 30, 4, 13, 29, 4, 18, 13, 4, 18, 13, 13, 23, 13, 12, 13, 30, 4, 13, 29, 20, 12, 13, 30, 4, 13, 29, 20, 23, 13, 12, 13, 30, 42, 17, 30, 38, 5, 13, 30, 3, 30, 41, 13, 4, 18, 18, 13, 13, 14, 2, 2, 13, 17, 2, 13, 40, 17, 30, 3, 12, 13, 30, 42, 17, 30, 38, 5, 13, 30, 3, 30, 41, 13, 4, 18, 18, 13, 13, 14, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 40, 17, 3, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 204, 8 ], [ 204, 9 ], [ 9, 10 ], [ 9, 11 ], [ 204, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 16, 17 ], [ 17, 18 ], [ 17, 19 ], [ 15, 20 ], [ 20, 21 ], [ 21, 22 ], [ 20, 23 ], [ 23, 24 ], [ 12, 25 ], [ 25, 26 ], [ 204, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 30, 33 ], [ 29, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 37, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 42, 50 ], [ 50, 51 ], [ 52, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 52, 56 ], [ 56, 57 ], [ 56, 58 ], [ 52, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 50, 63 ], [ 63, 64 ], [ 50, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 66, 69 ], [ 204, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 73, 74 ], [ 72, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 76, 79 ], [ 79, 80 ], [ 80, 81 ], [ 204, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 88, 91 ], [ 91, 92 ], [ 92, 93 ], [ 88, 94 ], [ 82, 95 ], [ 95, 96 ], [ 204, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 100, 101 ], [ 99, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 103, 106 ], [ 106, 107 ], [ 107, 108 ], [ 204, 109 ], [ 109, 110 ], [ 109, 111 ], [ 111, 112 ], [ 112, 113 ], [ 111, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 115, 118 ], [ 118, 119 ], [ 119, 120 ], [ 115, 121 ], [ 109, 122 ], [ 122, 123 ], [ 204, 124 ], [ 124, 125 ], [ 124, 126 ], [ 126, 127 ], [ 127, 128 ], [ 126, 129 ], [ 129, 130 ], [ 204, 131 ], [ 131, 132 ], [ 131, 133 ], [ 133, 134 ], [ 134, 135 ], [ 133, 136 ], [ 136, 137 ], [ 131, 138 ], [ 138, 139 ], [ 204, 140 ], [ 140, 141 ], [ 140, 142 ], [ 142, 143 ], [ 143, 144 ], [ 143, 145 ], [ 145, 146 ], [ 146, 147 ], [ 147, 148 ], [ 147, 149 ], [ 149, 150 ], [ 146, 151 ], [ 151, 152 ], [ 152, 153 ], [ 152, 154 ], [ 154, 155 ], [ 155, 156 ], [ 156, 157 ], [ 156, 158 ], [ 151, 159 ], [ 159, 160 ], [ 160, 161 ], [ 161, 162 ], [ 161, 163 ], [ 160, 164 ], [ 164, 165 ], [ 164, 166 ], [ 166, 167 ], [ 159, 168 ], [ 168, 169 ], [ 204, 170 ], [ 170, 171 ], [ 170, 172 ], [ 172, 173 ], [ 173, 174 ], [ 173, 175 ], [ 175, 176 ], [ 176, 177 ], [ 177, 178 ], [ 177, 179 ], [ 179, 180 ], [ 176, 181 ], [ 181, 182 ], [ 182, 183 ], [ 182, 184 ], [ 184, 185 ], [ 185, 186 ], [ 186, 187 ], [ 186, 188 ], [ 181, 189 ], [ 189, 190 ], [ 191, 191 ], [ 191, 192 ], [ 192, 193 ], [ 192, 194 ], [ 191, 195 ], [ 195, 196 ], [ 195, 197 ], [ 191, 198 ], [ 198, 199 ], [ 198, 200 ], [ 200, 201 ], [ 189, 202 ], [ 0, 203 ], [ 203, 204 ], [ 203, 205 ] ]
[ "import java.io.IOException;\nimport java.math.BigInteger;\n\npublic class Main {\n private static final StringBuilder builder = new StringBuilder();\n public static void main(String[] args) {\n System.out.print(readInt() * readInt());\n }\n\n private static void read() {\n builder.setLength(0);\n while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) {\n break;\n } else {\n builder.appendCodePoint(b);\n }\n } catch (IOException e) {\n break;\n }\n }\n }\n\n private static int readInt() {\n read();\n return Integer.parseInt(builder.toString());\n }\n\n private static int readInt(int radix) {\n read();\n return Integer.parseInt(builder.toString(), radix);\n }\n\n private static long readLong() {\n read();\n return Long.parseLong(builder.toString());\n }\n\n private static long readLong(int radix) {\n read();\n return Long.parseLong(builder.toString(), radix);\n }\n\n private static BigInteger readBigInteger() {\n read();\n return new BigInteger(builder.toString());\n }\n\n private static BigInteger readBigInteger(int radix) {\n read();\n return new BigInteger(builder.toString(), radix);\n }\n\n private static void skipLine() {\n while (true) {\n try {\n int b = System.in.read();\n if (b == '\\n' || b == -1) {\n break;\n }\n } catch (IOException e) {\n break;\n }\n }\n }\n\n private static void skip() {\n while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) break;\n } catch (IOException e) {\n break;\n }\n }\n }\n\n}", "import java.io.IOException;", "IOException", "java.io", "import java.math.BigInteger;", "BigInteger", "java.math", "public class Main {\n private static final StringBuilder builder = new StringBuilder();\n public static void main(String[] args) {\n System.out.print(readInt() * readInt());\n }\n\n private static void read() {\n builder.setLength(0);\n while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) {\n break;\n } else {\n builder.appendCodePoint(b);\n }\n } catch (IOException e) {\n break;\n }\n }\n }\n\n private static int readInt() {\n read();\n return Integer.parseInt(builder.toString());\n }\n\n private static int readInt(int radix) {\n read();\n return Integer.parseInt(builder.toString(), radix);\n }\n\n private static long readLong() {\n read();\n return Long.parseLong(builder.toString());\n }\n\n private static long readLong(int radix) {\n read();\n return Long.parseLong(builder.toString(), radix);\n }\n\n private static BigInteger readBigInteger() {\n read();\n return new BigInteger(builder.toString());\n }\n\n private static BigInteger readBigInteger(int radix) {\n read();\n return new BigInteger(builder.toString(), radix);\n }\n\n private static void skipLine() {\n while (true) {\n try {\n int b = System.in.read();\n if (b == '\\n' || b == -1) {\n break;\n }\n } catch (IOException e) {\n break;\n }\n }\n }\n\n private static void skip() {\n while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) break;\n } catch (IOException e) {\n break;\n }\n }\n }\n\n}", "Main", "private static final StringBuilder builder = new StringBuilder();", "builder", "new StringBuilder()", "public static void main(String[] args) {\n System.out.print(readInt() * readInt());\n }", "main", "{\n System.out.print(readInt() * readInt());\n }", "System.out.print(readInt() * readInt())", "System.out.print", "System.out", "System", "System.out", "readInt() * readInt()", "readInt()", "readInt", "readInt()", "readInt", "String[] args", "args", "private static void read() {\n builder.setLength(0);\n while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) {\n break;\n } else {\n builder.appendCodePoint(b);\n }\n } catch (IOException e) {\n break;\n }\n }\n }", "read", "{\n builder.setLength(0);\n while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) {\n break;\n } else {\n builder.appendCodePoint(b);\n }\n } catch (IOException e) {\n break;\n }\n }\n }", "builder.setLength(0)", "builder.setLength", "builder", "0", "while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) {\n break;\n } else {\n builder.appendCodePoint(b);\n }\n } catch (IOException e) {\n break;\n }\n }", "true", "{\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) {\n break;\n } else {\n builder.appendCodePoint(b);\n }\n } catch (IOException e) {\n break;\n }\n }", "try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) {\n break;\n } else {\n builder.appendCodePoint(b);\n }\n } catch (IOException e) {\n break;\n }", "catch (IOException e) {\n break;\n }", "IOException e", "{\n break;\n }", "break;", "{\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) {\n break;\n } else {\n builder.appendCodePoint(b);\n }\n }", "int b = System.in.read();", "b", "System.in.read()", "System.in.read", "System.in", "System", "System.in", "if (b == ' ' || b == '\\n' || b == -1) {\n break;\n } else {\n builder.appendCodePoint(b);\n }", "b == ' ' || b == '\\n' || b == -1", "b == ' ' || b == '\\n' || b == -1", "b == ' '", "b", "' '", "b == '\\n'", "b", "'\\n'", "b == -1", "b", "-1", "1", "{\n break;\n }", "break;", "{\n builder.appendCodePoint(b);\n }", "builder.appendCodePoint(b)", "builder.appendCodePoint", "builder", "b", "private static int readInt() {\n read();\n return Integer.parseInt(builder.toString());\n }", "readInt", "{\n read();\n return Integer.parseInt(builder.toString());\n }", "read()", "read", "return Integer.parseInt(builder.toString());", "Integer.parseInt(builder.toString())", "Integer.parseInt", "Integer", "builder.toString()", "builder.toString", "builder", "private static int readInt(int radix) {\n read();\n return Integer.parseInt(builder.toString(), radix);\n }", "readInt", "{\n read();\n return Integer.parseInt(builder.toString(), radix);\n }", "read()", "read", "return Integer.parseInt(builder.toString(), radix);", "Integer.parseInt(builder.toString(), radix)", "Integer.parseInt", "Integer", "builder.toString()", "builder.toString", "builder", "radix", "int radix", "radix", "private static long readLong() {\n read();\n return Long.parseLong(builder.toString());\n }", "readLong", "{\n read();\n return Long.parseLong(builder.toString());\n }", "read()", "read", "return Long.parseLong(builder.toString());", "Long.parseLong(builder.toString())", "Long.parseLong", "Long", "builder.toString()", "builder.toString", "builder", "private static long readLong(int radix) {\n read();\n return Long.parseLong(builder.toString(), radix);\n }", "readLong", "{\n read();\n return Long.parseLong(builder.toString(), radix);\n }", "read()", "read", "return Long.parseLong(builder.toString(), radix);", "Long.parseLong(builder.toString(), radix)", "Long.parseLong", "Long", "builder.toString()", "builder.toString", "builder", "radix", "int radix", "radix", "private static BigInteger readBigInteger() {\n read();\n return new BigInteger(builder.toString());\n }", "readBigInteger", "{\n read();\n return new BigInteger(builder.toString());\n }", "read()", "read", "return new BigInteger(builder.toString());", "new BigInteger(builder.toString())", "private static BigInteger readBigInteger(int radix) {\n read();\n return new BigInteger(builder.toString(), radix);\n }", "readBigInteger", "{\n read();\n return new BigInteger(builder.toString(), radix);\n }", "read()", "read", "return new BigInteger(builder.toString(), radix);", "new BigInteger(builder.toString(), radix)", "int radix", "radix", "private static void skipLine() {\n while (true) {\n try {\n int b = System.in.read();\n if (b == '\\n' || b == -1) {\n break;\n }\n } catch (IOException e) {\n break;\n }\n }\n }", "skipLine", "{\n while (true) {\n try {\n int b = System.in.read();\n if (b == '\\n' || b == -1) {\n break;\n }\n } catch (IOException e) {\n break;\n }\n }\n }", "while (true) {\n try {\n int b = System.in.read();\n if (b == '\\n' || b == -1) {\n break;\n }\n } catch (IOException e) {\n break;\n }\n }", "true", "{\n try {\n int b = System.in.read();\n if (b == '\\n' || b == -1) {\n break;\n }\n } catch (IOException e) {\n break;\n }\n }", "try {\n int b = System.in.read();\n if (b == '\\n' || b == -1) {\n break;\n }\n } catch (IOException e) {\n break;\n }", "catch (IOException e) {\n break;\n }", "IOException e", "{\n break;\n }", "break;", "{\n int b = System.in.read();\n if (b == '\\n' || b == -1) {\n break;\n }\n }", "int b = System.in.read();", "b", "System.in.read()", "System.in.read", "System.in", "System", "System.in", "if (b == '\\n' || b == -1) {\n break;\n }", "b == '\\n' || b == -1", "b == '\\n'", "b", "'\\n'", "b == -1", "b", "-1", "1", "{\n break;\n }", "break;", "private static void skip() {\n while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) break;\n } catch (IOException e) {\n break;\n }\n }\n }", "skip", "{\n while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) break;\n } catch (IOException e) {\n break;\n }\n }\n }", "while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) break;\n } catch (IOException e) {\n break;\n }\n }", "true", "{\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) break;\n } catch (IOException e) {\n break;\n }\n }", "try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) break;\n } catch (IOException e) {\n break;\n }", "catch (IOException e) {\n break;\n }", "IOException e", "{\n break;\n }", "break;", "{\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) break;\n }", "int b = System.in.read();", "b", "System.in.read()", "System.in.read", "System.in", "System", "System.in", "if (b == ' ' || b == '\\n' || b == -1) break;", "b == ' ' || b == '\\n' || b == -1", "b == ' ' || b == '\\n' || b == -1", "b == ' '", "b", "' '", "b == '\\n'", "b", "'\\n'", "b == -1", "b", "-1", "1", "break;", "public class Main {\n private static final StringBuilder builder = new StringBuilder();\n public static void main(String[] args) {\n System.out.print(readInt() * readInt());\n }\n\n private static void read() {\n builder.setLength(0);\n while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) {\n break;\n } else {\n builder.appendCodePoint(b);\n }\n } catch (IOException e) {\n break;\n }\n }\n }\n\n private static int readInt() {\n read();\n return Integer.parseInt(builder.toString());\n }\n\n private static int readInt(int radix) {\n read();\n return Integer.parseInt(builder.toString(), radix);\n }\n\n private static long readLong() {\n read();\n return Long.parseLong(builder.toString());\n }\n\n private static long readLong(int radix) {\n read();\n return Long.parseLong(builder.toString(), radix);\n }\n\n private static BigInteger readBigInteger() {\n read();\n return new BigInteger(builder.toString());\n }\n\n private static BigInteger readBigInteger(int radix) {\n read();\n return new BigInteger(builder.toString(), radix);\n }\n\n private static void skipLine() {\n while (true) {\n try {\n int b = System.in.read();\n if (b == '\\n' || b == -1) {\n break;\n }\n } catch (IOException e) {\n break;\n }\n }\n }\n\n private static void skip() {\n while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) break;\n } catch (IOException e) {\n break;\n }\n }\n }\n\n}", "public class Main {\n private static final StringBuilder builder = new StringBuilder();\n public static void main(String[] args) {\n System.out.print(readInt() * readInt());\n }\n\n private static void read() {\n builder.setLength(0);\n while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) {\n break;\n } else {\n builder.appendCodePoint(b);\n }\n } catch (IOException e) {\n break;\n }\n }\n }\n\n private static int readInt() {\n read();\n return Integer.parseInt(builder.toString());\n }\n\n private static int readInt(int radix) {\n read();\n return Integer.parseInt(builder.toString(), radix);\n }\n\n private static long readLong() {\n read();\n return Long.parseLong(builder.toString());\n }\n\n private static long readLong(int radix) {\n read();\n return Long.parseLong(builder.toString(), radix);\n }\n\n private static BigInteger readBigInteger() {\n read();\n return new BigInteger(builder.toString());\n }\n\n private static BigInteger readBigInteger(int radix) {\n read();\n return new BigInteger(builder.toString(), radix);\n }\n\n private static void skipLine() {\n while (true) {\n try {\n int b = System.in.read();\n if (b == '\\n' || b == -1) {\n break;\n }\n } catch (IOException e) {\n break;\n }\n }\n }\n\n private static void skip() {\n while (true) {\n try {\n int b = System.in.read();\n if (b == ' ' || b == '\\n' || b == -1) break;\n } catch (IOException e) {\n break;\n }\n }\n }\n\n}", "Main" ]
import java.io.IOException; import java.math.BigInteger; public class Main { private static final StringBuilder builder = new StringBuilder(); public static void main(String[] args) { System.out.print(readInt() * readInt()); } private static void read() { builder.setLength(0); while (true) { try { int b = System.in.read(); if (b == ' ' || b == '\n' || b == -1) { break; } else { builder.appendCodePoint(b); } } catch (IOException e) { break; } } } private static int readInt() { read(); return Integer.parseInt(builder.toString()); } private static int readInt(int radix) { read(); return Integer.parseInt(builder.toString(), radix); } private static long readLong() { read(); return Long.parseLong(builder.toString()); } private static long readLong(int radix) { read(); return Long.parseLong(builder.toString(), radix); } private static BigInteger readBigInteger() { read(); return new BigInteger(builder.toString()); } private static BigInteger readBigInteger(int radix) { read(); return new BigInteger(builder.toString(), radix); } private static void skipLine() { while (true) { try { int b = System.in.read(); if (b == '\n' || b == -1) { break; } } catch (IOException e) { break; } } } private static void skip() { while (true) { try { int b = System.in.read(); if (b == ' ' || b == '\n' || b == -1) break; } catch (IOException e) { break; } } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 4, 18, 13, 17, 41, 13, 2, 13, 13, 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 ], [ 61, 11 ], [ 61, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 20, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 26, 27 ], [ 23, 28 ], [ 14, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 31, 34 ], [ 34, 35 ], [ 35, 36 ], [ 34, 37 ], [ 14, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 40, 43 ], [ 43, 44 ], [ 44, 45 ], [ 43, 46 ], [ 14, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 49, 51 ], [ 14, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 52, 57 ], [ 12, 58 ], [ 58, 59 ], [ 0, 60 ], [ 60, 61 ], [ 60, 62 ] ]
[ "import java.util.Arrays;\nimport java.util.List;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tList<String> l = Arrays.asList(sc.nextLine().split(\" \"));\n\t\tint a = Integer.parseInt(l.get(0));\n\t\tint b = Integer.parseInt(l.get(1));\n\t\tint ans = a * b;\n\t\tSystem.out.print(ans);\n\t}\n}", "import java.util.Arrays;", "Arrays", "java.util", "import java.util.List;", "List", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tList<String> l = Arrays.asList(sc.nextLine().split(\" \"));\n\t\tint a = Integer.parseInt(l.get(0));\n\t\tint b = Integer.parseInt(l.get(1));\n\t\tint ans = a * b;\n\t\tSystem.out.print(ans);\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tList<String> l = Arrays.asList(sc.nextLine().split(\" \"));\n\t\tint a = Integer.parseInt(l.get(0));\n\t\tint b = Integer.parseInt(l.get(1));\n\t\tint ans = a * b;\n\t\tSystem.out.print(ans);\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tList<String> l = Arrays.asList(sc.nextLine().split(\" \"));\n\t\tint a = Integer.parseInt(l.get(0));\n\t\tint b = Integer.parseInt(l.get(1));\n\t\tint ans = a * b;\n\t\tSystem.out.print(ans);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "List<String> l = Arrays.asList(sc.nextLine().split(\" \"));", "l", "Arrays.asList(sc.nextLine().split(\" \"))", "Arrays.asList", "Arrays", "sc.nextLine().split(\" \")", "sc.nextLine().split", "sc.nextLine()", "sc.nextLine", "sc", "\" \"", "int a = Integer.parseInt(l.get(0));", "a", "Integer.parseInt(l.get(0))", "Integer.parseInt", "Integer", "l.get(0)", "l.get", "l", "0", "int b = Integer.parseInt(l.get(1));", "b", "Integer.parseInt(l.get(1))", "Integer.parseInt", "Integer", "l.get(1)", "l.get", "l", "1", "int ans = a * b;", "ans", "a * b", "a", "b", "System.out.print(ans)", "System.out.print", "System.out", "System", "System.out", "ans", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tList<String> l = Arrays.asList(sc.nextLine().split(\" \"));\n\t\tint a = Integer.parseInt(l.get(0));\n\t\tint b = Integer.parseInt(l.get(1));\n\t\tint ans = a * b;\n\t\tSystem.out.print(ans);\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tList<String> l = Arrays.asList(sc.nextLine().split(\" \"));\n\t\tint a = Integer.parseInt(l.get(0));\n\t\tint b = Integer.parseInt(l.get(1));\n\t\tint ans = a * b;\n\t\tSystem.out.print(ans);\n\t}\n}", "Main" ]
import java.util.Arrays; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); List<String> l = Arrays.asList(sc.nextLine().split(" ")); int a = Integer.parseInt(l.get(0)); int b = Integer.parseInt(l.get(1)); int ans = a * b; System.out.print(ans); } }
[ 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, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 41, 13, 20, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 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, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 38, 5, 13, 30, 4, 18, 13, 30, 29, 4, 18, 13, 29, 17, 12, 13, 30, 41, 13, 17, 38, 5, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 13, 17, 30, 29, 17, 0, 13, 20, 29, 17, 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 ], [ 25, 26 ], [ 25, 27 ], [ 0, 28 ], [ 28, 29 ], [ 28, 30 ], [ 0, 31 ], [ 31, 32 ], [ 31, 33 ], [ 0, 34 ], [ 34, 35 ], [ 34, 36 ], [ 0, 37 ], [ 37, 38 ], [ 37, 39 ], [ 0, 40 ], [ 189, 41 ], [ 189, 42 ], [ 42, 43 ], [ 42, 44 ], [ 189, 45 ], [ 45, 46 ], [ 45, 47 ], [ 189, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 54, 55 ], [ 50, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 59, 60 ], [ 50, 61 ], [ 61, 62 ], [ 62, 63 ], [ 61, 64 ], [ 64, 65 ], [ 64, 66 ], [ 50, 67 ], [ 67, 68 ], [ 68, 69 ], [ 48, 70 ], [ 70, 71 ], [ 189, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 72, 76 ], [ 76, 77 ], [ 72, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 80, 84 ], [ 84, 85 ], [ 84, 86 ], [ 78, 87 ], [ 87, 88 ], [ 72, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 93, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 92, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 106, 107 ], [ 102, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 91, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 72, 116 ], [ 116, 117 ], [ 116, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 120, 123 ], [ 123, 124 ], [ 72, 125 ], [ 125, 126 ], [ 125, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 130, 131 ], [ 129, 132 ], [ 132, 133 ], [ 72, 134 ], [ 134, 135 ], [ 134, 136 ], [ 136, 137 ], [ 137, 138 ], [ 138, 139 ], [ 139, 140 ], [ 138, 141 ], [ 141, 142 ], [ 72, 143 ], [ 143, 144 ], [ 143, 145 ], [ 145, 146 ], [ 146, 147 ], [ 147, 148 ], [ 147, 149 ], [ 149, 150 ], [ 150, 151 ], [ 151, 152 ], [ 146, 153 ], [ 153, 154 ], [ 154, 155 ], [ 155, 156 ], [ 156, 157 ], [ 145, 158 ], [ 158, 159 ], [ 72, 160 ], [ 160, 161 ], [ 160, 162 ], [ 162, 163 ], [ 163, 164 ], [ 163, 165 ], [ 162, 166 ], [ 166, 167 ], [ 167, 168 ], [ 167, 169 ], [ 166, 170 ], [ 170, 171 ], [ 171, 172 ], [ 171, 173 ], [ 173, 174 ], [ 174, 175 ], [ 162, 176 ], [ 176, 177 ], [ 177, 178 ], [ 177, 179 ], [ 176, 180 ], [ 180, 181 ], [ 181, 182 ], [ 162, 183 ], [ 183, 184 ], [ 183, 185 ], [ 162, 186 ], [ 186, 187 ], [ 0, 188 ], [ 188, 189 ], [ 188, 190 ] ]
[ "//code written by a living bruh moment\nimport java.io.*;\nimport java.lang.*;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.io.BufferedReader;\nimport java.io.OutputStream;\nimport java.io.PrintWriter;\nimport java.io.IOException;\nimport java.util.StringTokenizer;\nimport java.util.Random;\nimport java.util.Arrays;\nimport java.util.ArrayList;\nimport java.util.Collections;\n\npublic class Main {\n static InputReader in = new InputReader(System.in);\n static PrintWriter out = new PrintWriter(System.out);\n\n public static void main(String[] args) {\n int n = in.nextInt();\n int m = in.nextInt();\n out.println(n*m);\n out.close();\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\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\n public int nextInt() {\n return Integer.parseInt(next());\n }\n public long nextLong()\n {\n return Long.parseLong(next());\n }\n public double nextDouble()\n {\n return Double.parseDouble(next());\n }\n public String nextLine()\n {\n try\n {\n return reader.readLine();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n return null;\n }\n public boolean hasNext()\n {\n String next=null;\n try\n {\n next=reader.readLine();\n }\n catch(Exception e)\n {\n }\n if(next==null)\n {\n return false;\n }\n tokenizer=new StringTokenizer(next);\n return true;\n }\n }\n}", "import java.io.*;", "io.*", "java", "import java.lang.*;", "lang.*", "java", "import java.io.InputStream;", "InputStream", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.OutputStream;", "OutputStream", "java.io", "import java.io.PrintWriter;", "PrintWriter", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.util.StringTokenizer;", "StringTokenizer", "java.util", "import java.util.Random;", "Random", "java.util", "import java.util.Arrays;", "Arrays", "java.util", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.Collections;", "Collections", "java.util", "public class Main {\n static InputReader in = new InputReader(System.in);\n static PrintWriter out = new PrintWriter(System.out);\n\n public static void main(String[] args) {\n int n = in.nextInt();\n int m = in.nextInt();\n out.println(n*m);\n out.close();\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\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\n public int nextInt() {\n return Integer.parseInt(next());\n }\n public long nextLong()\n {\n return Long.parseLong(next());\n }\n public double nextDouble()\n {\n return Double.parseDouble(next());\n }\n public String nextLine()\n {\n try\n {\n return reader.readLine();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n return null;\n }\n public boolean hasNext()\n {\n String next=null;\n try\n {\n next=reader.readLine();\n }\n catch(Exception e)\n {\n }\n if(next==null)\n {\n return false;\n }\n tokenizer=new StringTokenizer(next);\n return true;\n }\n }\n}", "Main", "static InputReader in = new InputReader(System.in);", "in", "new InputReader(System.in)", "static PrintWriter out = new PrintWriter(System.out);", "out", "new PrintWriter(System.out)", "public static void main(String[] args) {\n int n = in.nextInt();\n int m = in.nextInt();\n out.println(n*m);\n out.close();\n }", "main", "{\n int n = in.nextInt();\n int m = in.nextInt();\n out.println(n*m);\n out.close();\n }", "int n = in.nextInt();", "n", "in.nextInt()", "in.nextInt", "in", "int m = in.nextInt();", "m", "in.nextInt()", "in.nextInt", "in", "out.println(n*m)", "out.println", "out", "n*m", "n", "m", "out.close()", "out.close", "out", "String[] args", "args", "static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\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\n public int nextInt() {\n return Integer.parseInt(next());\n }\n public long nextLong()\n {\n return Long.parseLong(next());\n }\n public double nextDouble()\n {\n return Double.parseDouble(next());\n }\n public String nextLine()\n {\n try\n {\n return reader.readLine();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n return null;\n }\n public boolean hasNext()\n {\n String next=null;\n try\n {\n next=reader.readLine();\n }\n catch(Exception e)\n {\n }\n if(next==null)\n {\n return false;\n }\n tokenizer=new StringTokenizer(next);\n return true;\n }\n }", "InputReader", "public BufferedReader reader;", "reader", "public StringTokenizer tokenizer;", "tokenizer", "public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }", "InputReader", "{\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }", "reader = new BufferedReader(new InputStreamReader(stream), 32768)", "reader", "new BufferedReader(new InputStreamReader(stream), 32768)", "tokenizer = null", "tokenizer", "null", "InputStream stream", "stream", "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 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 {\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 double nextDouble()\n {\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", "public String nextLine()\n {\n try\n {\n return reader.readLine();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n return null;\n }", "nextLine", "{\n try\n {\n return reader.readLine();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n return null;\n }", "try\n {\n return reader.readLine();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }", "catch(Exception e)\n {\n e.printStackTrace();\n }", "Exception e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n return reader.readLine();\n }", "return reader.readLine();", "reader.readLine()", "reader.readLine", "reader", "return null;", "null", "public boolean hasNext()\n {\n String next=null;\n try\n {\n next=reader.readLine();\n }\n catch(Exception e)\n {\n }\n if(next==null)\n {\n return false;\n }\n tokenizer=new StringTokenizer(next);\n return true;\n }", "hasNext", "{\n String next=null;\n try\n {\n next=reader.readLine();\n }\n catch(Exception e)\n {\n }\n if(next==null)\n {\n return false;\n }\n tokenizer=new StringTokenizer(next);\n return true;\n }", "String next=null;", "next", "null", "try\n {\n next=reader.readLine();\n }\n catch(Exception e)\n {\n }", "catch(Exception e)\n {\n }", "Exception e", "{\n }", "{\n next=reader.readLine();\n }", "next=reader.readLine()", "next", "reader.readLine()", "reader.readLine", "reader", "if(next==null)\n {\n return false;\n }", "next==null", "next", "null", "{\n return false;\n }", "return false;", "false", "tokenizer=new StringTokenizer(next)", "tokenizer", "new StringTokenizer(next)", "return true;", "true", "public class Main {\n static InputReader in = new InputReader(System.in);\n static PrintWriter out = new PrintWriter(System.out);\n\n public static void main(String[] args) {\n int n = in.nextInt();\n int m = in.nextInt();\n out.println(n*m);\n out.close();\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\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\n public int nextInt() {\n return Integer.parseInt(next());\n }\n public long nextLong()\n {\n return Long.parseLong(next());\n }\n public double nextDouble()\n {\n return Double.parseDouble(next());\n }\n public String nextLine()\n {\n try\n {\n return reader.readLine();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n return null;\n }\n public boolean hasNext()\n {\n String next=null;\n try\n {\n next=reader.readLine();\n }\n catch(Exception e)\n {\n }\n if(next==null)\n {\n return false;\n }\n tokenizer=new StringTokenizer(next);\n return true;\n }\n }\n}", "public class Main {\n static InputReader in = new InputReader(System.in);\n static PrintWriter out = new PrintWriter(System.out);\n\n public static void main(String[] args) {\n int n = in.nextInt();\n int m = in.nextInt();\n out.println(n*m);\n out.close();\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\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\n public int nextInt() {\n return Integer.parseInt(next());\n }\n public long nextLong()\n {\n return Long.parseLong(next());\n }\n public double nextDouble()\n {\n return Double.parseDouble(next());\n }\n public String nextLine()\n {\n try\n {\n return reader.readLine();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n return null;\n }\n public boolean hasNext()\n {\n String next=null;\n try\n {\n next=reader.readLine();\n }\n catch(Exception e)\n {\n }\n if(next==null)\n {\n return false;\n }\n tokenizer=new StringTokenizer(next);\n return true;\n }\n }\n}", "Main" ]
//code written by a living bruh moment import java.io.*; import java.lang.*; import java.io.InputStream; import java.io.InputStreamReader; import java.io.BufferedReader; import java.io.OutputStream; import java.io.PrintWriter; import java.io.IOException; import java.util.StringTokenizer; import java.util.Random; import java.util.Arrays; import java.util.ArrayList; import java.util.Collections; public class Main { static InputReader in = new InputReader(System.in); static PrintWriter out = new PrintWriter(System.out); public static void main(String[] args) { int n = in.nextInt(); int m = in.nextInt(); out.println(n*m); out.close(); } static class InputReader { public BufferedReader reader; public StringTokenizer tokenizer; public InputReader(InputStream stream) { reader = new BufferedReader(new InputStreamReader(stream), 32768); tokenizer = null; } public String next() { while (tokenizer == null || !tokenizer.hasMoreTokens()) { try { tokenizer = new StringTokenizer(reader.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return tokenizer.nextToken(); } public int nextInt() { return Integer.parseInt(next()); } public long nextLong() { return Long.parseLong(next()); } public double nextDouble() { return Double.parseDouble(next()); } public String nextLine() { try { return reader.readLine(); } catch(Exception e) { e.printStackTrace(); } return null; } public boolean hasNext() { String next=null; try { next=reader.readLine(); } catch(Exception e) { } if(next==null) { return false; } tokenizer=new StringTokenizer(next); return true; } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 18, 13, 13, 2, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 36, 5 ], [ 36, 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 ], [ 8, 30 ], [ 30, 31 ], [ 31, 32 ], [ 6, 33 ], [ 33, 34 ], [ 0, 35 ], [ 35, 36 ], [ 35, 37 ] ]
[ "import java.util.*;\n\npublic class Main{\n public static void main(String[] args){\n Scanner scan = new java.util.Scanner(System.in);\n int a = scan.nextInt();\n int b = scan.nextInt();\n System.out.println(a * b);\n scan.close();\n }\n}", "import java.util.*;", "util.*", "java", "public class Main{\n public static void main(String[] args){\n Scanner scan = new java.util.Scanner(System.in);\n int a = scan.nextInt();\n int b = scan.nextInt();\n System.out.println(a * b);\n scan.close();\n }\n}", "Main", "public static void main(String[] args){\n Scanner scan = new java.util.Scanner(System.in);\n int a = scan.nextInt();\n int b = scan.nextInt();\n System.out.println(a * b);\n scan.close();\n }", "main", "{\n Scanner scan = new java.util.Scanner(System.in);\n int a = scan.nextInt();\n int b = scan.nextInt();\n System.out.println(a * b);\n scan.close();\n }", "Scanner scan = new java.util.Scanner(System.in);", "scan", "new java.util.Scanner(System.in)", "int a = scan.nextInt();", "a", "scan.nextInt()", "scan.nextInt", "scan", "int b = scan.nextInt();", "b", "scan.nextInt()", "scan.nextInt", "scan", "System.out.println(a * b)", "System.out.println", "System.out", "System", "System.out", "a * b", "a", "b", "scan.close()", "scan.close", "scan", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n Scanner scan = new java.util.Scanner(System.in);\n int a = scan.nextInt();\n int b = scan.nextInt();\n System.out.println(a * b);\n scan.close();\n }\n}", "public class Main{\n public static void main(String[] args){\n Scanner scan = new java.util.Scanner(System.in);\n int a = scan.nextInt();\n int b = scan.nextInt();\n System.out.println(a * b);\n scan.close();\n }\n}", "Main" ]
import java.util.*; public class Main{ public static void main(String[] args){ Scanner scan = new java.util.Scanner(System.in); int a = scan.nextInt(); int b = scan.nextInt(); System.out.println(a * b); scan.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, 2, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 36, 5 ], [ 36, 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 ], [ 24, 26 ], [ 8, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 29, 31 ], [ 27, 32 ], [ 6, 33 ], [ 33, 34 ], [ 0, 35 ], [ 35, 36 ], [ 35, 37 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\t\n\t\t\t\t\n\t\t\t\tScanner in = new Scanner(System.in);\n\t\t\t\t\n\t\t\t\tint a =in.nextInt();\n\t\t\t\tint b = in.nextInt();\n\t\t\t\tint ans = a * b;\n\t\t\t\tSystem.out.print(ans);\n\t\t\t}\n\n\t\t\n\n\n\t}\n", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\t\n\t\t\t\t\n\t\t\t\tScanner in = new Scanner(System.in);\n\t\t\t\t\n\t\t\t\tint a =in.nextInt();\n\t\t\t\tint b = in.nextInt();\n\t\t\t\tint ans = a * b;\n\t\t\t\tSystem.out.print(ans);\n\t\t\t}\n\n\t\t\n\n\n\t}", "Main", "public static void main(String[] args) {\n\n\t\t\n\t\t\t\t\n\t\t\t\tScanner in = new Scanner(System.in);\n\t\t\t\t\n\t\t\t\tint a =in.nextInt();\n\t\t\t\tint b = in.nextInt();\n\t\t\t\tint ans = a * b;\n\t\t\t\tSystem.out.print(ans);\n\t\t\t}", "main", "{\n\n\t\t\n\t\t\t\t\n\t\t\t\tScanner in = new Scanner(System.in);\n\t\t\t\t\n\t\t\t\tint a =in.nextInt();\n\t\t\t\tint b = in.nextInt();\n\t\t\t\tint ans = a * b;\n\t\t\t\tSystem.out.print(ans);\n\t\t\t}", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "int a =in.nextInt();", "a", "in.nextInt()", "in.nextInt", "in", "int b = in.nextInt();", "b", "in.nextInt()", "in.nextInt", "in", "int ans = a * b;", "ans", "a * b", "a", "b", "System.out.print(ans)", "System.out.print", "System.out", "System", "System.out", "ans", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\t\n\t\t\t\t\n\t\t\t\tScanner in = new Scanner(System.in);\n\t\t\t\t\n\t\t\t\tint a =in.nextInt();\n\t\t\t\tint b = in.nextInt();\n\t\t\t\tint ans = a * b;\n\t\t\t\tSystem.out.print(ans);\n\t\t\t}\n\n\t\t\n\n\n\t}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\t\n\t\t\t\t\n\t\t\t\tScanner in = new Scanner(System.in);\n\t\t\t\t\n\t\t\t\tint a =in.nextInt();\n\t\t\t\tint b = in.nextInt();\n\t\t\t\tint ans = a * b;\n\t\t\t\tSystem.out.print(ans);\n\t\t\t}\n\n\t\t\n\n\n\t}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int a =in.nextInt(); int b = in.nextInt(); int ans = a * b; System.out.print(ans); } }
[ 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, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 39, 5 ], [ 39, 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 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 28, 33 ], [ 33, 34 ], [ 33, 35 ], [ 6, 36 ], [ 36, 37 ], [ 0, 38 ], [ 38, 39 ], [ 38, 40 ] ]
[ "import java.util.Scanner;\npublic class Main {\n public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n int x = Integer.parseInt(sc.next());\n int y = Integer.parseInt(sc.next());\n System.out.println(x*y);\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 int x = Integer.parseInt(sc.next());\n int y = Integer.parseInt(sc.next());\n System.out.println(x*y);\n }\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n int x = Integer.parseInt(sc.next());\n int y = Integer.parseInt(sc.next());\n System.out.println(x*y);\n }", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n int x = Integer.parseInt(sc.next());\n int y = Integer.parseInt(sc.next());\n System.out.println(x*y);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x = Integer.parseInt(sc.next());", "x", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "int y = Integer.parseInt(sc.next());", "y", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "System.out.println(x*y)", "System.out.println", "System.out", "System", "System.out", "x*y", "x", "y", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n int x = Integer.parseInt(sc.next());\n int y = Integer.parseInt(sc.next());\n System.out.println(x*y);\n }\n}", "public class Main {\n public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n int x = Integer.parseInt(sc.next());\n int y = Integer.parseInt(sc.next());\n System.out.println(x*y);\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = Integer.parseInt(sc.next()); int y = Integer.parseInt(sc.next()); System.out.println(x*y); } }
[ 7, 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, 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 ], [ 45, 8 ], [ 45, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 11, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 20, 23 ], [ 23, 24 ], [ 24, 25 ], [ 11, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 28, 31 ], [ 31, 32 ], [ 32, 33 ], [ 11, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 34, 39 ], [ 39, 40 ], [ 39, 41 ], [ 9, 42 ], [ 42, 43 ], [ 0, 44 ], [ 44, 45 ], [ 44, 46 ] ]
[ " import java.io.*;\n\timport java.util.*;\n public class Main{\n \tpublic static void main(String args[]) throws IOException{\n \tBufferedReader in=new BufferedReader(new InputStreamReader(System.in));\n \tStringTokenizer st=new StringTokenizer(in.readLine());\n \tint a=Integer.parseInt(st.nextToken());\n \tint b=Integer.parseInt(st.nextToken());\n \tSystem.out.println(a*b);\n }\n }", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "public class Main{\n \tpublic static void main(String args[]) throws IOException{\n \tBufferedReader in=new BufferedReader(new InputStreamReader(System.in));\n \tStringTokenizer st=new StringTokenizer(in.readLine());\n \tint a=Integer.parseInt(st.nextToken());\n \tint b=Integer.parseInt(st.nextToken());\n \tSystem.out.println(a*b);\n }\n }", "Main", "public static void main(String args[]) throws IOException{\n \tBufferedReader in=new BufferedReader(new InputStreamReader(System.in));\n \tStringTokenizer st=new StringTokenizer(in.readLine());\n \tint a=Integer.parseInt(st.nextToken());\n \tint b=Integer.parseInt(st.nextToken());\n \tSystem.out.println(a*b);\n }", "main", "{\n \tBufferedReader in=new BufferedReader(new InputStreamReader(System.in));\n \tStringTokenizer st=new StringTokenizer(in.readLine());\n \tint a=Integer.parseInt(st.nextToken());\n \tint b=Integer.parseInt(st.nextToken());\n \tSystem.out.println(a*b);\n }", "BufferedReader in=new BufferedReader(new InputStreamReader(System.in));", "in", "new BufferedReader(new InputStreamReader(System.in))", "StringTokenizer st=new StringTokenizer(in.readLine());", "st", "new StringTokenizer(in.readLine())", "int a=Integer.parseInt(st.nextToken());", "a", "Integer.parseInt(st.nextToken())", "Integer.parseInt", "Integer", "st.nextToken()", "st.nextToken", "st", "int b=Integer.parseInt(st.nextToken());", "b", "Integer.parseInt(st.nextToken())", "Integer.parseInt", "Integer", "st.nextToken()", "st.nextToken", "st", "System.out.println(a*b)", "System.out.println", "System.out", "System", "System.out", "a*b", "a", "b", "String args[]", "args", "public class Main{\n \tpublic static void main(String args[]) throws IOException{\n \tBufferedReader in=new BufferedReader(new InputStreamReader(System.in));\n \tStringTokenizer st=new StringTokenizer(in.readLine());\n \tint a=Integer.parseInt(st.nextToken());\n \tint b=Integer.parseInt(st.nextToken());\n \tSystem.out.println(a*b);\n }\n }", "public class Main{\n \tpublic static void main(String args[]) throws IOException{\n \tBufferedReader in=new BufferedReader(new InputStreamReader(System.in));\n \tStringTokenizer st=new StringTokenizer(in.readLine());\n \tint a=Integer.parseInt(st.nextToken());\n \tint b=Integer.parseInt(st.nextToken());\n \tSystem.out.println(a*b);\n }\n }", "Main" ]
import java.io.*; import java.util.*; public class Main{ public static void main(String args[]) throws IOException{ BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st=new StringTokenizer(in.readLine()); int a=Integer.parseInt(st.nextToken()); int b=Integer.parseInt(st.nextToken()); System.out.println(a*b); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 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 ], [ 40, 8 ], [ 40, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 11, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 11, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 11, 28 ], [ 28, 29 ], [ 29, 30 ], [ 28, 31 ], [ 31, 32 ], [ 31, 33 ], [ 11, 34 ], [ 34, 35 ], [ 35, 36 ], [ 9, 37 ], [ 37, 38 ], [ 0, 39 ], [ 39, 40 ], [ 39, 41 ] ]
[ "import java.util.*;\nimport java.io.*;\npublic class Main{\n public static void main(String agrs[])\n {\n Scanner in = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n int n = in.nextInt();\n int a = in.nextInt();\n out.println(n * a);\n out.close();\n }\n}", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "public class Main{\n public static void main(String agrs[])\n {\n Scanner in = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n int n = in.nextInt();\n int a = in.nextInt();\n out.println(n * a);\n out.close();\n }\n}", "Main", "public static void main(String agrs[])\n {\n Scanner in = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n int n = in.nextInt();\n int a = in.nextInt();\n out.println(n * a);\n out.close();\n }", "main", "{\n Scanner in = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n int n = in.nextInt();\n int a = in.nextInt();\n out.println(n * a);\n out.close();\n }", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "PrintWriter out = new PrintWriter(System.out);", "out", "new PrintWriter(System.out)", "int n = in.nextInt();", "n", "in.nextInt()", "in.nextInt", "in", "int a = in.nextInt();", "a", "in.nextInt()", "in.nextInt", "in", "out.println(n * a)", "out.println", "out", "n * a", "n", "a", "out.close()", "out.close", "out", "String agrs[]", "agrs", "public class Main{\n public static void main(String agrs[])\n {\n Scanner in = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n int n = in.nextInt();\n int a = in.nextInt();\n out.println(n * a);\n out.close();\n }\n}", "public class Main{\n public static void main(String agrs[])\n {\n Scanner in = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n int n = in.nextInt();\n int a = in.nextInt();\n out.println(n * a);\n out.close();\n }\n}", "Main" ]
import java.util.*; import java.io.*; public class Main{ public static void main(String agrs[]) { Scanner in = new Scanner(System.in); PrintWriter out = new PrintWriter(System.out); int n = in.nextInt(); int a = in.nextInt(); out.println(n * a); out.close(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 12, 13, 30, 41, 13, 20, 4, 18, 20, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 42, 5 ], [ 42, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 8, 14 ], [ 14, 15 ], [ 14, 16 ], [ 16, 17 ], [ 17, 18 ], [ 8, 19 ], [ 19, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 19, 24 ], [ 24, 25 ], [ 24, 26 ], [ 6, 27 ], [ 27, 28 ], [ 42, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 32, 34 ], [ 31, 35 ], [ 35, 36 ], [ 36, 37 ], [ 35, 38 ], [ 29, 39 ], [ 39, 40 ], [ 0, 41 ], [ 41, 42 ], [ 41, 43 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic void main(Scanner sc) {\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\n\t\tSystem.out.println(a * b);\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tnew Main().main(sc);\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic void main(Scanner sc) {\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\n\t\tSystem.out.println(a * b);\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tnew Main().main(sc);\n\t}\n}", "Main", "public void main(Scanner sc) {\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\n\t\tSystem.out.println(a * b);\n\t}", "main", "{\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\n\t\tSystem.out.println(a * b);\n\t}", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "int b = sc.nextInt();", "b", "sc.nextInt()", "sc.nextInt", "sc", "System.out.println(a * b)", "System.out.println", "System.out", "System", "System.out", "a * b", "a", "b", "Scanner sc", "sc", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tnew Main().main(sc);\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tnew Main().main(sc);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "new Main().main(sc)", "new Main().main", "new Main()", "sc", "String[] args", "args", "public class Main {\n\tpublic void main(Scanner sc) {\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\n\t\tSystem.out.println(a * b);\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tnew Main().main(sc);\n\t}\n}", "public class Main {\n\tpublic void main(Scanner sc) {\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\n\t\tSystem.out.println(a * b);\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tnew Main().main(sc);\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public void main(Scanner sc) { int a = sc.nextInt(); int b = sc.nextInt(); System.out.println(a * b); } public static void main(String[] args) { Scanner sc = new Scanner(System.in); new Main().main(sc); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 4, 18, 13, 23, 13, 6, 13, 41, 13, 17, 41, 13, 17, 12, 13, 30, 0, 13, 20, 0, 13, 17, 23, 13, 12, 13, 30, 14, 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, 14, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 37, 20, 30, 29, 4, 18, 13, 29, 4, 18, 13, 17, 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 ], [ 133, 8 ], [ 133, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 11, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 11, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 11, 28 ], [ 28, 29 ], [ 29, 30 ], [ 28, 31 ], [ 31, 32 ], [ 31, 33 ], [ 11, 34 ], [ 34, 35 ], [ 35, 36 ], [ 9, 37 ], [ 37, 38 ], [ 133, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 41, 43 ], [ 39, 44 ], [ 44, 45 ], [ 44, 46 ], [ 39, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 49, 53 ], [ 53, 54 ], [ 53, 55 ], [ 47, 56 ], [ 56, 57 ], [ 39, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 62, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 61, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 75, 76 ], [ 71, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 60, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 39, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 89, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 88, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 102, 103 ], [ 98, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 87, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 110, 113 ], [ 39, 114 ], [ 114, 115 ], [ 114, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 118, 121 ], [ 121, 122 ], [ 39, 123 ], [ 123, 124 ], [ 123, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 128, 129 ], [ 127, 130 ], [ 130, 131 ], [ 0, 132 ], [ 132, 133 ], [ 132, 134 ] ]
[ "import java.io.*;\nimport java.util.*;\n\npublic class Main {\n\n public static void main(String[] args) throws Exception {\n FastScanner sc = new FastScanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n int A = sc.nextInt();\n int B =sc.nextInt();\n out.println(A*B);\n\n out.flush();\n\n }\n\n static class FastScanner {\n private BufferedReader reader = null;\n private StringTokenizer tokenizer = null;\n\n public FastScanner(InputStream in) {\n reader = new BufferedReader(new InputStreamReader(in));\n tokenizer = null;\n }\n\n public String next() {\n if (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\n public String nextLine() {\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n return reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n return tokenizer.nextToken(\"\\n\");\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\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) throws Exception {\n FastScanner sc = new FastScanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n int A = sc.nextInt();\n int B =sc.nextInt();\n out.println(A*B);\n\n out.flush();\n\n }\n\n static class FastScanner {\n private BufferedReader reader = null;\n private StringTokenizer tokenizer = null;\n\n public FastScanner(InputStream in) {\n reader = new BufferedReader(new InputStreamReader(in));\n tokenizer = null;\n }\n\n public String next() {\n if (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\n public String nextLine() {\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n return reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n return tokenizer.nextToken(\"\\n\");\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }\n}", "Main", "public static void main(String[] args) throws Exception {\n FastScanner sc = new FastScanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n int A = sc.nextInt();\n int B =sc.nextInt();\n out.println(A*B);\n\n out.flush();\n\n }", "main", "{\n FastScanner sc = new FastScanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n int A = sc.nextInt();\n int B =sc.nextInt();\n out.println(A*B);\n\n out.flush();\n\n }", "FastScanner sc = new FastScanner(System.in);", "sc", "new FastScanner(System.in)", "PrintWriter out = new PrintWriter(System.out);", "out", "new PrintWriter(System.out)", "int A = sc.nextInt();", "A", "sc.nextInt()", "sc.nextInt", "sc", "int B =sc.nextInt();", "B", "sc.nextInt()", "sc.nextInt", "sc", "out.println(A*B)", "out.println", "out", "A*B", "A", "B", "out.flush()", "out.flush", "out", "String[] args", "args", "static class FastScanner {\n private BufferedReader reader = null;\n private StringTokenizer tokenizer = null;\n\n public FastScanner(InputStream in) {\n reader = new BufferedReader(new InputStreamReader(in));\n tokenizer = null;\n }\n\n public String next() {\n if (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\n public String nextLine() {\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n return reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n return tokenizer.nextToken(\"\\n\");\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }", "FastScanner", "private BufferedReader reader = null;", "reader", "null", "private StringTokenizer tokenizer = null;", "tokenizer", "null", "public FastScanner(InputStream in) {\n reader = new BufferedReader(new InputStreamReader(in));\n tokenizer = null;\n }", "FastScanner", "{\n reader = new BufferedReader(new InputStreamReader(in));\n tokenizer = null;\n }", "reader = new BufferedReader(new InputStreamReader(in))", "reader", "new BufferedReader(new InputStreamReader(in))", "tokenizer = null", "tokenizer", "null", "InputStream in", "in", "public String next() {\n if (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 if (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 }", "if (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 if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n return reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n return tokenizer.nextToken(\"\\n\");\n }", "nextLine", "{\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n return reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n return tokenizer.nextToken(\"\\n\");\n }", "if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n return 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 return reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "try {\n return 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 return reader.readLine();\n }", "return reader.readLine();", "reader.readLine()", "reader.readLine", "reader", "return tokenizer.nextToken(\"\\n\");", "tokenizer.nextToken(\"\\n\")", "tokenizer.nextToken", "tokenizer", "\"\\n\"", "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", "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 class Main {\n\n public static void main(String[] args) throws Exception {\n FastScanner sc = new FastScanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n int A = sc.nextInt();\n int B =sc.nextInt();\n out.println(A*B);\n\n out.flush();\n\n }\n\n static class FastScanner {\n private BufferedReader reader = null;\n private StringTokenizer tokenizer = null;\n\n public FastScanner(InputStream in) {\n reader = new BufferedReader(new InputStreamReader(in));\n tokenizer = null;\n }\n\n public String next() {\n if (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\n public String nextLine() {\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n return reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n return tokenizer.nextToken(\"\\n\");\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }\n}", "public class Main {\n\n public static void main(String[] args) throws Exception {\n FastScanner sc = new FastScanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n int A = sc.nextInt();\n int B =sc.nextInt();\n out.println(A*B);\n\n out.flush();\n\n }\n\n static class FastScanner {\n private BufferedReader reader = null;\n private StringTokenizer tokenizer = null;\n\n public FastScanner(InputStream in) {\n reader = new BufferedReader(new InputStreamReader(in));\n tokenizer = null;\n }\n\n public String next() {\n if (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\n public String nextLine() {\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n return reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n return tokenizer.nextToken(\"\\n\");\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }\n}", "Main" ]
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws Exception { FastScanner sc = new FastScanner(System.in); PrintWriter out = new PrintWriter(System.out); int A = sc.nextInt(); int B =sc.nextInt(); out.println(A*B); out.flush(); } static class FastScanner { private BufferedReader reader = null; private StringTokenizer tokenizer = null; public FastScanner(InputStream in) { reader = new BufferedReader(new InputStreamReader(in)); tokenizer = null; } public String next() { if (tokenizer == null || !tokenizer.hasMoreTokens()) { try { tokenizer = new StringTokenizer(reader.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return tokenizer.nextToken(); } public String nextLine() { if (tokenizer == null || !tokenizer.hasMoreTokens()) { try { return reader.readLine(); } catch (IOException e) { throw new RuntimeException(e); } } return tokenizer.nextToken("\n"); } public long nextLong() { return Long.parseLong(next()); } public int nextInt() { return Integer.parseInt(next()); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 50, 5 ], [ 50, 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 ], [ 25, 28 ], [ 28, 29 ], [ 28, 30 ], [ 8, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 34, 35 ], [ 33, 36 ], [ 36, 37 ], [ 36, 38 ], [ 8, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 39, 44 ], [ 44, 45 ], [ 44, 46 ], [ 6, 47 ], [ 47, 48 ], [ 0, 49 ], [ 49, 50 ], [ 49, 51 ] ]
[ "\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n String line = sc.nextLine();\n String[] lines = line.split(\" \");\n\n int A = Integer.parseInt(lines[0]);\n int B = Integer.parseInt(lines[1]);\n\n System.out.println(A*B);\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\n String line = sc.nextLine();\n String[] lines = line.split(\" \");\n\n int A = Integer.parseInt(lines[0]);\n int B = Integer.parseInt(lines[1]);\n\n System.out.println(A*B);\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n String line = sc.nextLine();\n String[] lines = line.split(\" \");\n\n int A = Integer.parseInt(lines[0]);\n int B = Integer.parseInt(lines[1]);\n\n System.out.println(A*B);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n\n String line = sc.nextLine();\n String[] lines = line.split(\" \");\n\n int A = Integer.parseInt(lines[0]);\n int B = Integer.parseInt(lines[1]);\n\n System.out.println(A*B);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "String line = sc.nextLine();", "line", "sc.nextLine()", "sc.nextLine", "sc", "String[] lines = line.split(\" \");", "lines", "line.split(\" \")", "line.split", "line", "\" \"", "int A = Integer.parseInt(lines[0]);", "A", "Integer.parseInt(lines[0])", "Integer.parseInt", "Integer", "lines[0]", "lines", "0", "int B = Integer.parseInt(lines[1]);", "B", "Integer.parseInt(lines[1])", "Integer.parseInt", "Integer", "lines[1]", "lines", "1", "System.out.println(A*B)", "System.out.println", "System.out", "System", "System.out", "A*B", "A", "B", "String[] args", "args", "public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n String line = sc.nextLine();\n String[] lines = line.split(\" \");\n\n int A = Integer.parseInt(lines[0]);\n int B = Integer.parseInt(lines[1]);\n\n System.out.println(A*B);\n }\n}", "public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n String line = sc.nextLine();\n String[] lines = line.split(\" \");\n\n int A = Integer.parseInt(lines[0]);\n int B = Integer.parseInt(lines[1]);\n\n System.out.println(A*B);\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); String line = sc.nextLine(); String[] lines = line.split(" "); int A = Integer.parseInt(lines[0]); int B = Integer.parseInt(lines[1]); System.out.println(A*B); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 17, 41, 13, 18, 13, 17, 41, 13, 18, 13, 17, 4, 18, 18, 13, 13, 4, 13, 13, 13, 23, 13, 12, 13, 30, 29, 2, 13, 13, 23, 13, 23, 13, 6, 13, 41, 13, 12, 13, 30, 0, 13, 20, 12, 13, 30, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 4, 13, 13, 23, 13, 12, 13, 30, 41, 13, 4, 13, 13, 41, 13, 20, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 18, 13, 13, 29, 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 ], [ 137, 11 ], [ 137, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 20, 23 ], [ 14, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 26, 28 ], [ 14, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 31, 33 ], [ 14, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 34, 39 ], [ 39, 40 ], [ 39, 41 ], [ 39, 42 ], [ 12, 43 ], [ 43, 44 ], [ 137, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 45, 52 ], [ 52, 53 ], [ 45, 54 ], [ 54, 55 ], [ 137, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 56, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 56, 66 ], [ 66, 67 ], [ 66, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 56, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 77, 80 ], [ 80, 81 ], [ 56, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 86, 90 ], [ 82, 91 ], [ 91, 92 ], [ 56, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 98, 100 ], [ 95, 101 ], [ 101, 102 ], [ 101, 103 ], [ 104, 105 ], [ 104, 106 ], [ 95, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 107, 112 ], [ 112, 113 ], [ 112, 114 ], [ 114, 115 ], [ 114, 116 ], [ 107, 117 ], [ 117, 118 ], [ 118, 119 ], [ 107, 120 ], [ 121, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 122, 126 ], [ 126, 127 ], [ 127, 128 ], [ 126, 129 ], [ 129, 130 ], [ 129, 131 ], [ 95, 132 ], [ 132, 133 ], [ 93, 134 ], [ 134, 135 ], [ 0, 136 ], [ 136, 137 ], [ 136, 138 ] ]
[ "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 MyReader reader = new MyReader();\n int[] ab = reader.readInts(\" \");\n int a = ab[0];\n int b = ab[1];\n System.out.println(problem169a(a, b));\n }\n\n private static int problem169a(int a, int b) {\n return a * b;\n }\n\n private static class MyReader {\n private final BufferedReader br;\n private MyReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n private String readString() throws IOException {\n return br.readLine();\n }\n\n private int readInt() throws IOException {\n return Integer.parseInt(readString());\n }\n\n private String[] readStrings(String regex) throws IOException {\n return readString().split(regex);\n }\n\n private int[] readInts(String regex) throws IOException {\n String[] strings = readStrings(regex);\n int[] ints = new int[strings.length];\n for (int i = 0; i < ints.length; i++) {\n ints[i] = Integer.parseInt(strings[i]);\n }\n return ints;\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 MyReader reader = new MyReader();\n int[] ab = reader.readInts(\" \");\n int a = ab[0];\n int b = ab[1];\n System.out.println(problem169a(a, b));\n }\n\n private static int problem169a(int a, int b) {\n return a * b;\n }\n\n private static class MyReader {\n private final BufferedReader br;\n private MyReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n private String readString() throws IOException {\n return br.readLine();\n }\n\n private int readInt() throws IOException {\n return Integer.parseInt(readString());\n }\n\n private String[] readStrings(String regex) throws IOException {\n return readString().split(regex);\n }\n\n private int[] readInts(String regex) throws IOException {\n String[] strings = readStrings(regex);\n int[] ints = new int[strings.length];\n for (int i = 0; i < ints.length; i++) {\n ints[i] = Integer.parseInt(strings[i]);\n }\n return ints;\n }\n }\n}", "Main", "public static void main(String[] args) throws IOException {\n MyReader reader = new MyReader();\n int[] ab = reader.readInts(\" \");\n int a = ab[0];\n int b = ab[1];\n System.out.println(problem169a(a, b));\n }", "main", "{\n MyReader reader = new MyReader();\n int[] ab = reader.readInts(\" \");\n int a = ab[0];\n int b = ab[1];\n System.out.println(problem169a(a, b));\n }", "MyReader reader = new MyReader();", "reader", "new MyReader()", "int[] ab = reader.readInts(\" \");", "ab", "reader.readInts(\" \")", "reader.readInts", "reader", "\" \"", "int a = ab[0];", "a", "ab[0]", "ab", "0", "int b = ab[1];", "b", "ab[1]", "ab", "1", "System.out.println(problem169a(a, b))", "System.out.println", "System.out", "System", "System.out", "problem169a(a, b)", "problem169a", "a", "b", "String[] args", "args", "private static int problem169a(int a, int b) {\n return a * b;\n }", "problem169a", "{\n return a * b;\n }", "return a * b;", "a * b", "a", "b", "int a", "a", "int b", "b", "private static class MyReader {\n private final BufferedReader br;\n private MyReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n private String readString() throws IOException {\n return br.readLine();\n }\n\n private int readInt() throws IOException {\n return Integer.parseInt(readString());\n }\n\n private String[] readStrings(String regex) throws IOException {\n return readString().split(regex);\n }\n\n private int[] readInts(String regex) throws IOException {\n String[] strings = readStrings(regex);\n int[] ints = new int[strings.length];\n for (int i = 0; i < ints.length; i++) {\n ints[i] = Integer.parseInt(strings[i]);\n }\n return ints;\n }\n }", "MyReader", "private final BufferedReader br;", "br", "private MyReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }", "MyReader", "{\n br = new BufferedReader(new InputStreamReader(System.in));\n }", "br = new BufferedReader(new InputStreamReader(System.in))", "br", "new BufferedReader(new InputStreamReader(System.in))", "private String readString() throws IOException {\n return br.readLine();\n }", "readString", "{\n return br.readLine();\n }", "return br.readLine();", "br.readLine()", "br.readLine", "br", "private int readInt() throws IOException {\n return Integer.parseInt(readString());\n }", "readInt", "{\n return Integer.parseInt(readString());\n }", "return Integer.parseInt(readString());", "Integer.parseInt(readString())", "Integer.parseInt", "Integer", "readString()", "readString", "private String[] readStrings(String regex) throws IOException {\n return readString().split(regex);\n }", "readStrings", "{\n return readString().split(regex);\n }", "return readString().split(regex);", "readString().split(regex)", "readString().split", "readString()", "readString", "regex", "String regex", "regex", "private int[] readInts(String regex) throws IOException {\n String[] strings = readStrings(regex);\n int[] ints = new int[strings.length];\n for (int i = 0; i < ints.length; i++) {\n ints[i] = Integer.parseInt(strings[i]);\n }\n return ints;\n }", "readInts", "{\n String[] strings = readStrings(regex);\n int[] ints = new int[strings.length];\n for (int i = 0; i < ints.length; i++) {\n ints[i] = Integer.parseInt(strings[i]);\n }\n return ints;\n }", "String[] strings = readStrings(regex);", "strings", "readStrings(regex)", "readStrings", "regex", "int[] ints = new int[strings.length];", "ints", "new int[strings.length]", "strings.length", "strings", "strings.length", "for (int i = 0; i < ints.length; i++) {\n ints[i] = Integer.parseInt(strings[i]);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < ints.length", "i", "ints.length", "ints", "ints.length", "i++", "i++", "i", "{\n ints[i] = Integer.parseInt(strings[i]);\n }", "{\n ints[i] = Integer.parseInt(strings[i]);\n }", "ints[i] = Integer.parseInt(strings[i])", "ints[i]", "ints", "i", "Integer.parseInt(strings[i])", "Integer.parseInt", "Integer", "strings[i]", "strings", "i", "return ints;", "ints", "String regex", "regex", "public class Main {\n\n public static void main(String[] args) throws IOException {\n MyReader reader = new MyReader();\n int[] ab = reader.readInts(\" \");\n int a = ab[0];\n int b = ab[1];\n System.out.println(problem169a(a, b));\n }\n\n private static int problem169a(int a, int b) {\n return a * b;\n }\n\n private static class MyReader {\n private final BufferedReader br;\n private MyReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n private String readString() throws IOException {\n return br.readLine();\n }\n\n private int readInt() throws IOException {\n return Integer.parseInt(readString());\n }\n\n private String[] readStrings(String regex) throws IOException {\n return readString().split(regex);\n }\n\n private int[] readInts(String regex) throws IOException {\n String[] strings = readStrings(regex);\n int[] ints = new int[strings.length];\n for (int i = 0; i < ints.length; i++) {\n ints[i] = Integer.parseInt(strings[i]);\n }\n return ints;\n }\n }\n}", "public class Main {\n\n public static void main(String[] args) throws IOException {\n MyReader reader = new MyReader();\n int[] ab = reader.readInts(\" \");\n int a = ab[0];\n int b = ab[1];\n System.out.println(problem169a(a, b));\n }\n\n private static int problem169a(int a, int b) {\n return a * b;\n }\n\n private static class MyReader {\n private final BufferedReader br;\n private MyReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n private String readString() throws IOException {\n return br.readLine();\n }\n\n private int readInt() throws IOException {\n return Integer.parseInt(readString());\n }\n\n private String[] readStrings(String regex) throws IOException {\n return readString().split(regex);\n }\n\n private int[] readInts(String regex) throws IOException {\n String[] strings = readStrings(regex);\n int[] ints = new int[strings.length];\n for (int i = 0; i < ints.length; i++) {\n ints[i] = Integer.parseInt(strings[i]);\n }\n return ints;\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 { MyReader reader = new MyReader(); int[] ab = reader.readInts(" "); int a = ab[0]; int b = ab[1]; System.out.println(problem169a(a, b)); } private static int problem169a(int a, int b) { return a * b; } private static class MyReader { private final BufferedReader br; private MyReader() { br = new BufferedReader(new InputStreamReader(System.in)); } private String readString() throws IOException { return br.readLine(); } private int readInt() throws IOException { return Integer.parseInt(readString()); } private String[] readStrings(String regex) throws IOException { return readString().split(regex); } private int[] readInts(String regex) throws IOException { String[] strings = readStrings(regex); int[] ints = new int[strings.length]; for (int i = 0; i < ints.length; i++) { ints[i] = Integer.parseInt(strings[i]); } return ints; } } }