node_ids
listlengths
4
1.4k
edge_index
listlengths
1
2.22k
text
listlengths
4
1.4k
source
stringlengths
14
427k
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 17, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 2, 4, 18, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 113, 8 ], [ 113, 9 ], [ 9, 10 ], [ 9, 11 ], [ 113, 13 ], [ 13, 14 ], [ 13, 15 ...
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tstatic int[] boo = new int[100000];\n\tpublic static void main(String[] args)throws Exception{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t...
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { static int[] boo = new int[100000]; public static void main(String[] args)throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); String[] st = br.re...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 0, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 181, 5 ], [ 181, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] ary = new int[n];\n \n for (int i = 0; i < n; i++) {\n ary[i] = sc.nextInt();\n ...
import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] ary = new int[n]; for (int i = 0; i < n; i++) { ary[i] = sc.nextInt(); } ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 41, 13, 17, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 4, 18, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 8, 11 ], [ 11, 12 ], [ 8, 13 ], [ 13, 14 ], [...
[ "import java.util.Scanner;\n\nclass Main{\n public static void main(String[] args){\n\tint i;\n\tint j;\n\tint key;\n\tint count = 0;\n\tScanner scan = new Scanner(System.in);\n\n\tint n = scan.nextInt();\n\tint S[] = new int[n];\n\tfor(i=0 ; i<n ; i++){S[i] = scan.nextInt();}\n\n\tint q = scan.nextInt();\n\tint...
import java.util.Scanner; class Main{ public static void main(String[] args){ int i; int j; int key; int count = 0; Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int S[] = new int[n]; for(i=0 ; i<n ; i++){S[i] = scan.nextInt();} int q = scan.nextInt(); int T[] = new int[q]; for(j=0 ; ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 17, 41, 13, 41, 13, 20, 17, 41, 13, 20, 17, 0, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 0...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 191, 5 ], [ 191, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], ...
[ "import java.util.*;\n\npublic class Main{\n\tpublic static void main(String args[]){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n, q, cnt = 0, isExist;\n\t\tint[] S = new int[100000], T = new int[50000];\n\t\t\n\t\tn = sc.nextInt();\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tS[i] = sc.nextInt();\n\t\t}\n\t\t\...
import java.util.*; public class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int n, q, cnt = 0, isExist; int[] S = new int[100000], T = new int[50000]; n = sc.nextInt(); for(int i = 0; i < n; i++){ S[i] = sc.nextInt(); } q = sc.nextInt(); for(int i = 0; ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 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, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 158, 5 ], [ 158, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "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 count=0;\n \n int n=sc.nextInt(); \n int array1[]=new int[n];\n for(int i=0;i<n;i++)array1[i]=sc.nextInt();\n \n int q=sc.nextInt();\n int array2[...
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int count=0; int n=sc.nextInt(); int array1[]=new int[n]; for(int i=0;i<n;i++)array1[i]=sc.nextInt(); int q=sc.nextInt(); int array2[]=new int[q]; ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 4, 18, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 18, 13, 18,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 9, 10 ], [ 9, 11 ], [ 7, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.io.*;\nimport java.util.*;\n\nclass Main{\n static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n public static void main(String[] args) throws IOException{\n int n1 = Integer.parseInt(br.readLine());\n int[] a1 = new int[n1];\n ...
import java.io.*; import java.util.*; class Main{ static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); public static void main(String[] args) throws IOException{ int n1 = Integer.parseInt(br.readLine()); int[] a1 = new int[n1]; ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 41, 13, 20, 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, 4, 18, 13, 41, 13, 20, 13, 11, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 158, 5 ], [ 158, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tint count = 0;\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tint n = scanner.nextInt();\n\t\tint[] S = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tS[i] = scanner.nextInt();\n\t\t}\n\n\t\tint q = scan...
import java.util.Scanner; public class Main { public static void main(String[] args) { int count = 0; Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int[] S = new int[n]; for (int i = 0; i < n; i++) { S[i] = scanner.nextInt(); } int q = scanner.nextInt(); int[] T = new int[q...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 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, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 174, 5 ], [ 174, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args) {\n Scanner stdIn = new Scanner(System.in);\n int n = stdIn.nextInt();\n int[] s = new int[n];\n for(int i=0; i<n; i++){\n s[i] = stdIn.nextInt();\n }\n\n int q = stdIn.n...
import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int n = stdIn.nextInt(); int[] s = new int[n]; for(int i=0; i<n; i++){ s[i] = stdIn.nextInt(); } int q = stdIn.nextInt(); ...
[ 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, 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, 41, 13, 2...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 114, 11 ], [ 114, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.IOException;\nimport java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) throws IOException {\n\n Scanner sc = new Scanner(System.in);\n int n1 = sc.nextInt();\n int sp1[] = new int[n1];\n for (int i = 0; i < n1;...
import java.io.IOException; import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) throws IOException { Scanner sc = new Scanner(System.in); int n1 = sc.nextInt(); int sp1[] = new int[n1]; for (int i = 0; i < n1; i++) { ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 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, 4, 18...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 361, 11 ], [ 361, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.*;\nimport java.util.*;\nimport static java.lang.System.*;\n\npublic class Main {\n\tstatic FastScanner sc = new FastScanner(System.in);\n\tpublic static void main(String[] args) {\n\t\tint n = sc.nextInt();\n\t\tint[] ar = new int[n];\n\t\tfor (int i=0; i<n; i++) {ar[i] = sc.nextInt();}\n\t\tArrays...
import java.io.*; import java.util.*; import static java.lang.System.*; public class Main { static FastScanner sc = new FastScanner(System.in); public static void main(String[] args) { int n = sc.nextInt(); int[] ar = new int[n]; for (int i=0; i<n; i++) {ar[i] = sc.nextInt();} Arrays.sort(ar); int m = sc.n...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 20, 41, 13, 17, 42, 2, 2, 0, 13, 4, 18, 13, 17, 40, 4, 18, 13, 30, 41, 13, 17, 41, 13, 4, 18, 13, 13, 41, 13, 20, 13, 41, 13, 20, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.io.*;\nimport java.util.Arrays;\nimport java.util.StringTokenizer;\n \nclass Main{\n \nstatic final PrintWriter out=new PrintWriter(System.out);\n \npublic static void main(String[] args) throws IOException{\nBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\nString line=\"\";\nwh...
import java.io.*; import java.util.Arrays; import java.util.StringTokenizer; class Main{ static final PrintWriter out=new PrintWriter(System.out); public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line=""; while((line=br.readL...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 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, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 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 ], [...
[ "import java.util.*;\n\nclass Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n HashSet<Integer> S = new HashSet<>();\n for(int i = 0;i < n;i++){\n S.add(sc.nextInt());\n }\n \n int q = sc...
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); HashSet<Integer> S = new HashSet<>(); for(int i = 0;i < n;i++){ S.add(sc.nextInt()); } int q = sc.nextInt(); ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 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, 4, 18, 13, 41, 13, 17, 41, 13, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 126, 8 ], [ 126, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.util.*;\nimport java.util.Arrays;\npublic class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n long[] s = new long[n];\n for(int i = 0; i < n; i++){\n s[i] = sc.nextLong();\n ...
import java.util.*; import java.util.Arrays; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); long[] s = new long[n]; for(int i = 0; i < n; i++){ s[i] = sc.nextLong(); } ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 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, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17...
[ [ 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 ],...
[ "import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] S = new int[n];\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tS[i] = sc.nextInt();\n\t\t}\n\n\t\tint q = sc.nextInt();\n\t\tint[] T = new int[q];\...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] S = new int[n]; for(int i = 0; i < n; i++){ S[i] = sc.nextInt(); } int q = sc.nextInt(); int[] T = new int[q]; for(int i = 0; i < q; i++){ T[i] ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 152, 5 ], [ 152, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "\nimport java.io.*;\n\npublic class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(\n\t\t\tnew InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tString S[] = br.readLine().split(\" \");\n\t\tint q = Integer.parseInt(br...
import java.io.*; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader( new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); String S[] = br.readLine().split(" "); int q = Integer.parseInt(br.readLine()); String T[] =...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 38, 5, 13, 30, 4, 18, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 191, 11 ], [ 191, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\n\t\ttry (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) {\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tString[] ...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) { int n = Integer.parseInt(br.readLine()); String[] tmp = br.readLine().spl...
[ 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, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 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 ], ...
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.Arrays;\nimport java.io.IOException;\nimport java.util.Scanner;\nimport java.util.List;\nimport java.util.ArrayList;\n \npublic class Main {\n public static void main(String[] args) throws IOException {\n \n Scann...
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Arrays; import java.io.IOException; import java.util.Scanner; import java.util.List; import java.util.ArrayList; public class Main { public static void main(String[] args) throws IOException { Scanner sc = new Scan...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 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, 11, 1, 41, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 126, 5 ], [ 126, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main (String[] args) {\n\t\tScanner scan = new Scanner (System.in);\n\t\tint count = 0;\n\t\tfinal int n = scan.nextInt();\n\t\tint[] dataS = new int[n + 1];\n\t\t\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tdataS[i] = scan.nextInt();\n\t\t}\n\t\...
import java.util.Scanner; public class Main { public static void main (String[] args) { Scanner scan = new Scanner (System.in); int count = 0; final int n = scan.nextInt(); int[] dataS = new int[n + 1]; for (int i = 0; i < n; i++) { dataS[i] = scan.nextInt(); } final int q = scan.nextInt(); ...
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 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, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 113, 5 ], [ 113, 6 ], [ 6, 7 ], [ 6, 8 ], [ 113, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ...
[ "import java.util.*;\n\npublic class Main {\n\n Scanner sc = new Scanner(System.in);\n\n void solve() {\n // Input\n int n = sc.nextInt();\n int[] S = new int[n];\n for (int i = 0; i < n; i++) {\n S[i] = sc.nextInt();\n }\n int q = sc.nextInt();\n in...
import java.util.*; public class Main { Scanner sc = new Scanner(System.in); void solve() { // Input int n = sc.nextInt(); int[] S = new int[n]; for (int i = 0; i < n; i++) { S[i] = sc.nextInt(); } int q = sc.nextInt(); int[] T = new int[q];...
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 17, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 2, 4, 18, 13, 17, 17, 41, 13, 17, 0, 13, 4, 18, 13, 4, 18, 13, 11, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 85, 5 ], [ 85, 6 ], [ 6, 7 ], [ 6, 8 ], [ 85, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 13, 14 ], [ 13, 15 ...
[ "import java.util.Scanner;\n\npublic class Main {\n\tstatic int[] boo = new int[100000];\n\tpublic static void main(String[] args)throws Exception{\n\t\t//BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = (sc.nextInt());\n\t\t//Str...
import java.util.Scanner; public class Main { static int[] boo = new int[100000]; public static void main(String[] args)throws Exception{ //BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); Scanner sc = new Scanner(System.in); int n = (sc.nextInt()); //String[] st = br.readLine().s...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 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, 4, 18, 13, 41, 13, 20, 13, 41, 13, 17, 11, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 164, 5 ], [ 164, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint n = scanner.nextInt();\n\t\tint[] sArray = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tsArray[i] = scanner.nextInt();\n\t\t}\n\t\tint p = scanner.nextIn...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int[] sArray = new int[n]; for (int i = 0; i < n; i++) { sArray[i] = scanner.nextInt(); } int p = scanner.nextInt(); int[] tArray = new int[p];...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 17, 41, 13, 20, 17, 41, 13, 41, 13, 41, 13, 41, 13, 17, 41, 13, 20, 0, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 8, 11 ], [ 11, 12 ], [ 8, 13 ], [ 13, 14 ], [...
[ "import java.util.*;\n\nclass Main\n{\n public static void main(String args[])\n {\n\tint n, q, C=0;\n\tlong S[] = new long[100000];\n\tlong k;\n\tint left, right, mid=0;\n\tScanner read = new Scanner(System.in);\n\n\t//read\n\tn=read.nextInt();\n\tfor(int i=0; i<n; i++)S[i]=read.nextInt();\n\n\t//search\n\tq...
import java.util.*; class Main { public static void main(String args[]) { int n, q, C=0; long S[] = new long[100000]; long k; int left, right, mid=0; Scanner read = new Scanner(System.in); //read n=read.nextInt(); for(int i=0; i<n; i++)S[i]=read.nextInt(); //search q=read.nextInt(); for(int i=0; i...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 38, 5, 13, 30, 4, 18, 18, 13, 13, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 13, 14 ], ...
[ "import java.io.*;\n\nclass Main {\n public static void main(String[] args) {\n try {\n \tBufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n \tint n = Integer.parseInt( kb.readLine( ) );\n\t\t\tString[] str = kb.readLine( ).split( \" \" );\n\t\t\tint[] S = new in...
import java.io.*; class Main { public static void main(String[] args) { try { BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) ); int n = Integer.parseInt( kb.readLine( ) ); String[] str = kb.readLine( ).split( " " ); int[] S = new int[ n ]; for( int i=0...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 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, 4, 18, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 183, 5 ], [ 183, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n List<Integer> s = new ArrayList<>();\n for(int i = 0; i < n; i++) {\n s.add(sc.nextInt());\n }\n int q = sc.nextInt();\n List<Integer> t ...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); List<Integer> s = new ArrayList<>(); for(int i = 0; i < n; i++) { s.add(sc.nextInt()); } int q = sc.nextInt(); List<Integer> t = new ArrayList<...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 41, 13, 20, 0, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 187, 5 ], [ 187, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 8, 11 ], [ 11, 12 ], [ 8, 13 ], [ 13, 14 ],...
[ "import java.util.Scanner;\n\n\npublic class Main{\n\n\tpublic static void main(String args[]){\n\t\tint i,j,n;;\n\t\tScanner sc=new Scanner(System.in);\n\t\tn=Integer.parseInt(sc.next());\n\t\tint s[]=new int[n+1];\n\t\tfor(i=0;i<n;i++){\n\t\t\ts[i]=Integer.parseInt(sc.next());\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tint ...
import java.util.Scanner; public class Main{ public static void main(String args[]){ int i,j,n;; Scanner sc=new Scanner(System.in); n=Integer.parseInt(sc.next()); int s[]=new int[n+1]; for(i=0;i<n;i++){ s[i]=Integer.parseInt(sc.next()); } int q=Integer.parseInt(sc.next()); int t[]=new i...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 18, 13, 13, 41, 13, 20, 41, 13, 20, 4, 18, 13, 13, 23, 13, 6, 13, 12, 13, 30, 41, 13, 17, 41, 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 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.util.Arrays;\nimport java.util.InputMismatchException;\nimport java.util.StringTokenizer;\n\nclass Main {\n\t\n\tstatic class BinarySearch {\n\t\tpublic void binarysearch (InputR...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.Arrays; import java.util.InputMismatchException; import java.util.StringTokenizer; class Main { static class BinarySearch { public void binarysearch (InputReader ir) { i...
[ 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, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 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 ], ...
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\nimport java.util.HashSet;\nimport java.util.Scanner;\nimport java.util.Set;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan=new Scanner(new BufferedReader(new InputStreamReader(Sys...
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.HashSet; import java.util.Scanner; import java.util.Set; public class Main { public static void main(String[] args) { Scanner scan=new Scanner(new BufferedReader(new InputStreamReader(System.in))); int s...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 41, 13, 18, 13, 13, 42, 17, 30, 41, 13, 2, 2, 13, 13, 17, 14, 2, 13, 13, 29, 17, 14, 2, 18, 13, 13, 13, 30, 29, 17, 14, 2, 18, 13, 13, 13, 30, 0, 13, 2, 13, 17, 3...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 141, 5 ], [ 141, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n static boolean binary_search (int x, int[] data) {\n int left = 0, right = data.length;\n while (true) {\n int mid = (left + right) / 2;\n\n if (left > right) return false;\n\n if (data[mid] == x) {\n ...
import java.util.Scanner; public class Main { static boolean binary_search (int x, int[] data) { int left = 0, right = data.length; while (true) { int mid = (left + right) / 2; if (left > right) return false; if (data[mid] == x) { return true; ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 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, 4, 18, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2,...
[ [ 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 ], ...
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] s = new int[n];\n for(int i = 0; i < n; i++) {\n s[i] = sc.nextInt();\n }\n int q = sc.nextInt();\n List<Integer> t = new ArrayList...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] s = new int[n]; for(int i = 0; i < n; i++) { s[i] = sc.nextInt(); } int q = sc.nextInt(); List<Integer> t = new ArrayList<>(); for(in...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 40, 17, 41, 13, 2, 18, 13, 13, 17, 41, 13, 17, 42, 2, 2, 13, 40, 17, 2, 13, 13, 30, 41, 13, 2, 2, 13, 13, 17, 14, 2, 18, 13, 13, 13, 30, 0, 13, 2, 13, 17, 14, 2, 18, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 8, 13 ], [ 13, 14 ], [...
[ "import java.util.*;\nclass Main{\n\tstatic int BinarySearch(int[] data, int key){\n\t\tint result = -1;\n\t\tint r = data.length-1;\n\t\tint l = 0;\n\t\twhile(result == -1 && l <= r){\n\t\t\tint middle = (l+r)/2;\n\t\t\tif(data[middle]<key){\n\t\t\t l = middle + 1;\n\t\t\t}else if(data[middle] > key){\n\t\t\t\t...
import java.util.*; class Main{ static int BinarySearch(int[] data, int key){ int result = -1; int r = data.length-1; int l = 0; while(result == -1 && l <= r){ int middle = (l+r)/2; if(data[middle]<key){ l = middle + 1; }else if(data[middle] > key){ r = middle - 1; }else{ result = mi...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 12, 13, 30, 41, 13, 20, 0, 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, 0, 13, 4, 18, 13, 41, 13, 20,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 162, 8 ], [ 162, 9 ], [ 9, 10 ], [ 162, 11 ], [ 11, 12 ], [ 162, 13 ], [ 13, 14 ...
[ "import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tstatic int n, q;\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tn = sc.nextInt();\n\t\tint[] S = new int[n];\n\t\tfor(int i = 0 ; i < n ; i++) S[i] = sc.nextInt();\n\t\tq = sc.nextInt();\n\...
import java.util.Arrays; import java.util.Scanner; public class Main { static int n, q; public static void main(String[] args) { Scanner sc = new Scanner(System.in); n = sc.nextInt(); int[] S = new int[n]; for(int i = 0 ; i < n ; i++) S[i] = sc.nextInt(); q = sc.nextInt(); int[] T = new int[q]; for(i...
[ 7, 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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 4, 18, 13, 13, 41, 13, 4, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 176, 11 ], [ 176, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\n\npublic class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tList<Integer> T = new ArrayList<Integer>();\n\t\tList<Integer> S = new ArrayList<Integer>();\n\t\t\n\t\tint n = in.nex...
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); List<Integer> T = new ArrayList<Integer>(); List<Integer> S = new ArrayList<Integer>(); int n = in.nextInt(); for (int i = 0; i ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 4, 18, 20, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 20, 2, 13, 17, 13, 41, 13, 4, 18, 13, 41, 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 ], [ 204, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\n \npublic class Main {\n \n public static void main(String[] args) throws IOException {\n new Main().exec();\n }\n \n public void exec() throws IOException {\n ...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; public class Main { public static void main(String[] args) throws IOException { new Main().exec(); } public void exec() throws IOException { SimpleInputUti...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 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, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 13, 17, 30, 11, 1,...
[ [ 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 ],...
[ "import java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n int s[]=new int[n];\n for(int i=0;i<n;i++) s[i]=sc.nextInt();\n int q=sc.nextInt();\n int cnt=0;\n if(n<10){\n ...
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int s[]=new int[n]; for(int i=0;i<n;i++) s[i]=sc.nextInt(); int q=sc.nextInt(); int cnt=0; if(n<10){ for(int...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 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, 4, 18, 13, 41, 13, 2...
[ [ 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 ], ...
[ "import java.io.IOException;\nimport java.util.Scanner;\nclass Main{\n\tpublic static void main(String[] args)throws NumberFormatException, IOException{\n//\t\tSystem.out.println(\" \");\n\t\tScanner scan = new Scanner(System.in);\n\t\tint finded = 0;\n\t\tint lineSamount = scan.nextInt();\n\t\tint[] lineSnum = new...
import java.io.IOException; import java.util.Scanner; class Main{ public static void main(String[] args)throws NumberFormatException, IOException{ // System.out.println(" "); Scanner scan = new Scanner(System.in); int finded = 0; int lineSamount = scan.nextInt(); int[] lineSnum = new int[lineSamount]; for(i...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 20, 0, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 165, 5 ], [ 165, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 8, 11 ], [ 11, 12 ], [ 8, 13 ], [ 13, 14 ],...
[ "import java.util.Scanner;\n\n\npublic class Main{\n\n\tpublic static void main(String args[]){\n\t\tint i,j,n,h;\n\t\tScanner sc=new Scanner(System.in);\n\t\tn=Integer.parseInt(sc.next());\n\t\tint s[]=new int[n+1];\n\t\tfor(i=0;i<n;i++){\n\t\t\ts[i]=Integer.parseInt(sc.next());\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\...
import java.util.Scanner; public class Main{ public static void main(String args[]){ int i,j,n,h; Scanner sc=new Scanner(System.in); n=Integer.parseInt(sc.next()); int s[]=new int[n+1]; for(i=0;i<n;i++){ s[i]=Integer.parseInt(sc.next()); } int q=Integer.parseInt(sc.next()); int t[]=n...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 12, 13, 30, 14, 2, 13, 17, 30, 0, 13, 20, 29, 13, 12, 13, 30, 0, 13, 20, 12, 13, 30, 29, 4, 18, 13, 4, 18, 13, 12, 13, 30, 41, 13, 4, 18, 4, 18, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 10, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\nclass Console {\n static Console instance;\n final BufferedReader reader;\n\n public static Console getInstance() {\n if (instance == null) {\n instance = new Console();\n }\n ...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; class Console { static Console instance; final BufferedReader reader; public static Console getInstance() { if (instance == null) { instance = new Console(); } return instance; ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 41, 13, 18, 13, 13, 41, 13, 17, 41, 13, 17, 42, 2, 13, 13, 30, 0, 13, 2, 2, 13, 13, 17, 14, 2, 18, 13, 13, 13, 30, 29, 17, 14, 2, 18, 13, 13, 13, 30, ...
[ [ 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 ], ...
[ "import java.util.*;\nimport java.io.*;\n\nclass Main {\n static boolean binary(int key, int[] s) {\n int left = 0;\n int right = s.length;\n int mid = 0;\n int count = 0;\n while( left < right) {\n mid = (left + right)/2;\n if(s[mid] == key) {\n ...
import java.util.*; import java.io.*; class Main { static boolean binary(int key, int[] s) { int left = 0; int right = s.length; int mid = 0; int count = 0; while( left < right) { mid = (left + right)/2; if(s[mid] == key) { return true; ...
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 41, 13, 20, 0, 13, 4, 18, 13, 0, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 0, 13, 4, 18, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 168, 5 ], [ 168, 6 ], [ 6, 7 ], [ 168, 8 ], [ 8, 9 ], [ 168, 10 ], [ 10, 11 ], [ 168, 12 ], [ 12, 13 ], [ 168, ...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tstatic int n;\n\tstatic int[] S;\n\tstatic int q;\n\tstatic int[] T;\n\tstatic int ans;\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tn = sc.nextInt();\n\t\tS = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\...
import java.util.Scanner; public class Main { static int n; static int[] S; static int q; static int[] T; static int ans; public static void main(String[] args) { Scanner sc = new Scanner(System.in); n = sc.nextInt(); S = new int[n]; for (int i = 0; i < n; i++) { S[i] = sc.nextInt(); } q = sc.ne...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 41, 13, 4, 18, 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, 1...
[ [ 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 ], ...
[ "import java.util.Scanner;\nimport java.util.Arrays;\nimport java.util.Deque;\nimport java.util.ArrayDeque;\n\nclass Main{\n\tpublic static void main(String[] args){\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint answer = 0;\n\t\tint n = Integer.parseInt(scanner.nextLine());\n\t\tint[] data1 = new int[n];\...
import java.util.Scanner; import java.util.Arrays; import java.util.Deque; import java.util.ArrayDeque; class Main{ public static void main(String[] args){ Scanner scanner = new Scanner(System.in); int answer = 0; int n = Integer.parseInt(scanner.nextLine()); int[] data1 = new int[n]; for(int i = 0; i < n; ...
[ 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, 13, 41, 13, 4, 18, 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...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\n\nclass Main {\n\n\n public static void main(String args[]) throws IOException{\n\n\t BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t int n = Integer.parseInt( br.readLine() );\...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; class Main { public static void main(String args[]) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt( br.readLine() ); String[] string ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 20, 41, 13, 4, 18, 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, 20, 41, 13, 4, 18, 20, 41,...
[ [ 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 ],...
[ "import java.util.Scanner;\n\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint arrayCnt = new Integer(s.nextLine()).intValue();\n\t\tString[] tmp = s.nextLine().split(\" \");\n\t\tint[] targetArray = new int[arrayCnt];\n\t\tfor(int i=0 ; i < array...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); int arrayCnt = new Integer(s.nextLine()).intValue(); String[] tmp = s.nextLine().split(" "); int[] targetArray = new int[arrayCnt]; for(int i=0 ; i < arrayCnt ; i++) { targetArray[...
[ 7, 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, 41, 13, 12, 13, 30, 41, 13, 17, 41, 13, 13, 41, 13, 42, 2, 2, 13, 13, 17, 30, 0, 13, 2, 2, ...
[ [ 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 ], ...
[ "import java.util.*;\nimport java.io.*;\nimport static java.util.Arrays.*;\nimport static java.util.Collections.*;\nimport static java.lang.Math.*;\n\npublic class Main {\n\n static final int N = 100000;\n static final int Q = 50000;\n static int n, q;\n static int s[], t[];\n\n public static int binary_search...
import java.util.*; import java.io.*; import static java.util.Arrays.*; import static java.util.Collections.*; import static java.lang.Math.*; public class Main { static final int N = 100000; static final int Q = 50000; static int n, q; static int s[], t[]; public static int binary_search(int x) { int ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 17, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 2, 4, 18, 13, 17, 17, 41, 13, 17, 0, 13, 4,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 299, 11 ], [ 299, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "/*\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.util.NoSuchElementException;\n*/\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.util.InputMismatchException;\n\npublic class Main {\n\tstatic int[] boo = new int[100000];\n\tpublic static void main(String[] args)throw...
/* import java.io.IOException; import java.io.InputStream; import java.util.NoSuchElementException; */ import java.io.IOException; import java.io.InputStream; import java.util.InputMismatchException; public class Main { static int[] boo = new int[100000]; public static void main(String[] args)throws Exception{ // ...
[ 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, 13, 41, 13, 4, 18, 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...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 190, 11 ], [ 190, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tint n = Integer.parseInt(reader....
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(reader.readLine()); String[] ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 17, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 0, 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, 14, 2, 2, 4,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 118, 11 ], [ 118, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.*;\nimport java.io.*;\nimport java.lang.*;\n\npublic class Main {\n static final int INF = 1000000000; \n \n public static void main(String[] args) throws Exception { \n Scanner input = new Scanner(System.in);\n int n, q;\n n = input.nextInt();\n ...
import java.util.*; import java.io.*; import java.lang.*; public class Main { static final int INF = 1000000000; public static void main(String[] args) throws Exception { Scanner input = new Scanner(System.in); int n, q; n = input.nextInt(); ArrayList<I...
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 17, 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, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 4, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.*;\nclass Main{\n\tScanner sc= new Scanner(System.in);\n\tvoid aaaa(){\n\t\tint gundam=0;\n\t\tint n=sc.nextInt();\n\t\tint[] N=new int[n];\n\t\tfor(int i=0;i<n;i++)N[i]=sc.nextInt();\n\t\tint q=sc.nextInt();\n\t\tfor(int i=0;i<q;i++){\n\t\t\tint Q=sc.nextInt();\n\t\t\tint L=0;\n\t\t\tint R=n-1;\...
import java.util.*; class Main{ Scanner sc= new Scanner(System.in); void aaaa(){ int gundam=0; int n=sc.nextInt(); int[] N=new int[n]; for(int i=0;i<n;i++)N[i]=sc.nextInt(); int q=sc.nextInt(); for(int i=0;i<q;i++){ int Q=sc.nextInt(); int L=0; int R=n-1; while(N[L]<=Q&&Q<=N[R]){ int cent...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 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, 41, 13, 20, 13, 11, 1, 41,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 165, 5 ], [ 165, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint[] s = new int[n + 1];\t\t// ????????¨???????°?????????¨?????¨???????????????\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ts[i] = sc.nextInt()...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] s = new int[n + 1]; // ????????¨???????°?????????¨?????¨??????????????? for (int i = 0; i < n; i++) { s[i] = sc.nextInt(); } int q = sc.nextInt();...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 17, 0, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 0, 13, 4, 18,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 94, 8 ], [ 94, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "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 countA,countB,sum=0;\n\t\tcountA = sc.nextInt();\n\t\tint[] s = new int[countA];\n\t\tfor(int i=0; i<countA; i++) {\n\t\t\ts[i] = sc.nextInt();\n...
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int countA,countB,sum=0; countA = sc.nextInt(); int[] s = new int[countA]; for(int i=0; i<countA; i++) { s[i] = sc.nextInt(); } countB = sc.nextInt(); ...
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 41, 13, 2, 2, 13, 13, 17, 14, 2, 2, 13, 13, 17, 30, 14, 2, 2, 18, 13, 13, 13, 2, 18, 13, 13, 13, 40, 13, 14, 2, 18, 13, 13, 13, 40, 13, 14, 2, 18, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 4, 8 ], [ 8, 9 ], [ 4, 10 ], [ 10, 11 ], [ 4, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\n\nclass Solve{\n\tpublic int s[];\n\tpublic int t[];\n\tpublic int count;\n\tpublic void binary(int left,int right,int num){\n\t\tint mid = (left + right) / 2;\n\t\tif(right - left <= 1) {\n\t\t\tif(s[right] == num || s[left] == num) count++;\n\t\t}\n\t\telse if(s[mid] == num) count++;\n...
import java.util.Scanner; class Solve{ public int s[]; public int t[]; public int count; public void binary(int left,int right,int num){ int mid = (left + right) / 2; if(right - left <= 1) { if(s[right] == num || s[left] == num) count++; } else if(s[mid] == num) count++; else if(s[mid] < num) binary(m...
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 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, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 4, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.*;\n\nclass Main {\n\n\tstatic Scanner in = new Scanner(System.in);\n\n void solve() {\n\t\tint n = in.nextInt();\n\t\tint[] s = new int[n];\n\t\tfor(int i = 0; i < n; i++) s[i] = in.nextInt();\n\t\tint q = in.nextInt();\n\t\tint[] t = new int[q];\n\t\tfor(int i = 0; i < q; i++) t[i] = in.nextI...
import java.util.*; class Main { static Scanner in = new Scanner(System.in); void solve() { int n = in.nextInt(); int[] s = new int[n]; for(int i = 0; i < n; i++) s[i] = in.nextInt(); int q = in.nextInt(); int[] t = new int[q]; for(int i = 0; i < q; i++) t[i] = in.nextInt(); int ans = 0; for(int...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 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, 4, 18, 13, 41, 13, 20, 13, 11, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 137, 8 ], [ 137, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] S = new int[n];\n for (int i = 0; i < n; i++) {\n S[i] = sc.nextInt();\n }\...
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] S = new int[n]; for (int i = 0; i < n; i++) { S[i] = sc.nextInt(); } int q = ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 17, 12, 13, 30, 41, 13, 20, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 4, 18, 13, 4, 18, 18, 13, 13, 13, 4, 18, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 205, 8 ], [ 205, 9 ], [ 9, 10 ], [ 205, 11 ], [ 11, 12 ], [ 205, 13 ], [ 13, 14 ...
[ "import java.io.*;\nimport java.util.*;\n\npublic class Main {\n\tpublic ArrayList<Integer> S;\n\tpublic ArrayList<Integer> T;\n\tpublic int n;\n\tpublic int q;\n\tpublic int count = 0;\n\tpublic static void main(String[] args) {\n\t\tMain m = new Main();\n\t\tm.init();\n\t\tfor (int i = 0; i < m.q; ++i)\n\t\t\tm.b...
import java.io.*; import java.util.*; public class Main { public ArrayList<Integer> S; public ArrayList<Integer> T; public int n; public int q; public int count = 0; public static void main(String[] args) { Main m = new Main(); m.init(); for (int i = 0; i < m.q; ++i) m.biSearch(m.T.get(i)); System.out...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 18, 13, 18, 13, 13, 41,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 323, 5 ], [ 323, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.*;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tint n=Integer.parseInt(br.readLine());\n String[] str=br.readLine().split(\" \");\n ...
import java.io.*; public class Main { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n=Integer.parseInt(br.readLine()); String[] str=br.readLine().split(" "); int[] S=new int[n]; ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 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, 41, 13, 4,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 152, 8 ], [ 152, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n long[] S = new long[n];\n for (int i = 0; i < n; i++) S[i] = Integer.parseInt(sc.nex...
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.next()); long[] S = new long[n]; for (int i = 0; i < n; i++) S[i] = Integer.parseInt(sc.next()); ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 41, 13, 4, 13, 41, 13, 4, 13, 13, 41, 13, 4, 13, 41, 13, 4, 13, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, ...
[ [ 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 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\nimport java.util.*;\n\npublic class Main {\n\n static BufferedReader in;\n static PrintWriter out;\n static StringTokenizer tok;\n\n void solve() throws IOException {\n in...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.*; public class Main { static BufferedReader in; static PrintWriter out; static StringTokenizer tok; void solve() throws IOException { int n = ni(); ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 38, 30, 41, 13, 20, 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, 4, 18, 13, 41, 13, 20, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 113, 8 ], [ 113, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 13, 14 ]...
[ "import java.util.Arrays;\nimport java.util.Scanner;\n \npublic class Main {\n public static void main(String[] args) {\n try(Scanner sc = new Scanner(System.in)){\n \tint n = sc.nextInt();\n \tint [] S = new int[n];\n \tfor(int i=0;i<n;i++) {\n \t\tS[i] = sc.nextInt();\n ...
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { try(Scanner sc = new Scanner(System.in)){ int n = sc.nextInt(); int [] S = new int[n]; for(int i=0;i<n;i++) { S[i] = sc.nextInt(); } ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 38, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 4, 18, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 181, 11 ], [ 181, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "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 \n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n int n = Integer.parseInt(br.read...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) { int n = Integer.parseInt(br.readLine()); ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 38, 5, 13, 30, 4, 18, 18, 13, 13, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 13, 14 ], ...
[ "import java.io.*;\n\nclass Main {\n public static void main(String[] args) {\n try {\n \tBufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n \tint n = Integer.parseInt( kb.readLine( ) );\n\t\t\tString[] str = kb.readLine( ).split( \" \" );\n\t\t\tint[] S = new in...
import java.io.*; class Main { public static void main(String[] args) { try { BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) ); int n = Integer.parseInt( kb.readLine( ) ); String[] str = kb.readLine( ).split( " " ); int[] S = new int[ n ]; for( int i=0...
[ 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, 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, 41, 13, 4, 18,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 165, 11 ], [ 165, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.IOException;\nimport java.util.ArrayList;\nimport java.util.Scanner;\n\n//5-3 二分探索\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = Integer.parseInt(sc.next());\n\t\tArrayList<Integer> S = new ArrayList<>();\...
import java.io.IOException; import java.util.ArrayList; import java.util.Scanner; //5-3 二分探索 public class Main { public static void main(String[] args) throws IOException { Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.next()); ArrayList<Integer> S = new ArrayList<>(); for(int i = 0; i < n...
[ 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, 4, 18, 13, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0...
[ [ 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 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Arrays;\n\nclass Main{\n public static void main(String[] args) throws IOException{\n final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n final int n = Int...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; class Main{ public static void main(String[] args) throws IOException{ final BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); final int n = Integer.parseInt...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 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,...
[ [ 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 ], ...
[ "import java.util.*;\nimport java.lang.*;\n\nclass Main{\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.nextLine());\n String[] line = sc.nextLine().split(\" \");\n int[] data =new int[n];\n for(int i=0; i < n; i++...
import java.util.*; import java.lang.*; class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.nextLine()); String[] line = sc.nextLine().split(" "); int[] data =new int[n]; for(int i=0; i < n; i++){ d...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 14, 2, 13, 13, 30, 14, 2, 18, 13, 2, 2, 13, 13, 17, 13, 30, 29, 17, 14, 2, 18, 13, 2, 2, 13, 13, 17, 13, 30, 29, 4, 13, 13, 2, 2, 2, 13, 13, 17, 17, 13, 13, 30, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 170, 8 ], [ 170, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 13, 14 ]...
[ "import java.util.Arrays;\nimport java.util.Scanner;\npublic class Main {\n\t\n\tstatic boolean search(int[] S,int a,int b,int target){\n\t\tif(a<=b){\n\t\t\tif(S[(a+b)/2]==target){\n\t\t\t\treturn true;\n\t\t\t}else if(S[(a+b)/2]<target){\n\t\t\t\treturn search(S,((a+b)/2)+1,b,target);\n\t\t\t}else{\n\t\t\t\tretur...
import java.util.Arrays; import java.util.Scanner; public class Main { static boolean search(int[] S,int a,int b,int target){ if(a<=b){ if(S[(a+b)/2]==target){ return true; }else if(S[(a+b)/2]<target){ return search(S,((a+b)/2)+1,b,target); }else{ return search(S,a,((a+b)/2)-1,target); } ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 40, 13, 41, 13, 4, 18, 13, 41, 13, 20, 1...
[ [ 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 ], ...
[ "import java.util.Scanner;\nimport java.util.Arrays;\n\nclass Main { \n public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n \n int n = in.nextInt();\n int[] S = new int[n];\n for (int i = 0; n != 0; i++) {\n S[i] = in.nextInt();\n ...
import java.util.Scanner; import java.util.Arrays; class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int[] S = new int[n]; for (int i = 0; n != 0; i++) { S[i] = in.nextInt(); n--; ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 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, 4, 18...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 171, 8 ], [ 171, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main{\n\tvoid run() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint count = 0;\n\t\tint n = sc.nextInt();\n\t\tint[] S = new int[n];\n\t\t\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tS[i] = sc.nextInt();\n\t\t}\n\t\tArrays.sort(S);\n\t\tint q = ...
import java.util.Arrays; import java.util.Scanner; public class Main{ void run() { Scanner sc = new Scanner(System.in); int count = 0; int n = sc.nextInt(); int[] S = new int[n]; for(int i = 0; i < n; i++) { S[i] = sc.nextInt(); } Arrays.sort(S); int q = sc.nextInt(); int[] T = new int[q]; f...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 2, 2, 13, 13, 17, 14, 2, 13, 13, 30, 29, 40, 17, 14, 2, 13, 18, 13, 13, 30, 29, 17, 14, 2, 13, 18, 13, 13, 30, 29, 4, ...
[ [ 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 ], ...
[ "import java.io.IOException;\nimport java.io.InputStream;\nimport java.util.Arrays;\nimport java.util.InputMismatchException;\nimport java.util.Scanner;\n\npublic class Main {\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curC...
import java.io.IOException; import java.io.InputStream; import java.util.Arrays; import java.util.InputMismatchException; import java.util.Scanner; public class Main { static class InputReader { private InputStream stream; private byte[] buf = new byte[1024]; private int curChar; pr...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 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, 4, 18, 13, 41, 13, 17, 41, 13, 4...
[ [ 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 ], ...
[ "\nimport java.util.*;\nimport java.util.Arrays;\nclass Main {\n public static void main(String[] args) {\n \n Scanner scner = new Scanner(System.in);\n\n int n = scner.nextInt();\n int[] S = new int[n];\n for (int i=0; i<n; i++) {\n S[i] = scner.nextInt();\n }\...
import java.util.*; import java.util.Arrays; class Main { public static void main(String[] args) { Scanner scner = new Scanner(System.in); int n = scner.nextInt(); int[] S = new int[n]; for (int i=0; i<n; i++) { S[i] = scner.nextInt(); } int q = ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 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, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17...
[ [ 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 ], [...
[ "import java.util.Scanner;\n\nclass Main {\n public static void main(String... args) {\n Scanner sc = new Scanner(System.in);\n int size = sc.nextInt();\n\n int[] elements = new int[size];\n for (int i = 0; i < size; i++) {\n elements[i] = sc.nextInt();\n }\n\n int searchSize = sc.nextInt();...
import java.util.Scanner; class Main { public static void main(String... args) { Scanner sc = new Scanner(System.in); int size = sc.nextInt(); int[] elements = new int[size]; for (int i = 0; i < size; i++) { elements[i] = sc.nextInt(); } int searchSize = sc.nextInt(); int[] search...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 0, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18...
[ [ 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 ], [ 132, 14 ], ...
[ "import java.io.*;\nimport java.util.*;\nimport java.lang.Math;\nimport java.util.Arrays;\n\npublic class Main {\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n \n int n = 0;\n n = sc.nextInt();\n int A[] = new int[n];\n for(int i = ...
import java.io.*; import java.util.*; import java.lang.Math; import java.util.Arrays; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = 0; n = sc.nextInt(); int A[] = new int[n]; for(int i = 0; i < n; i++){ ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 20, 0, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 146, 5 ], [ 146, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 8, 11 ], [ 11, 12 ], [ 8, 13 ], [ 13, 14 ],...
[ "import java.util.Scanner;\n\n\npublic class Main{\n\n\tpublic static void main(String args[]){\n\tint i,j,k,n,q;;\n\tScanner sc=new Scanner(System.in);\n\t\n\tn=Integer.parseInt(sc.next());\n\tlong s[]=new long[n+1];\n\tfor(i=0;i<n;i++){\n\t\ts[i]=Integer.parseInt(sc.next());\n\t}\n\t\n\tq=Integer.parseInt(sc.next...
import java.util.Scanner; public class Main{ public static void main(String args[]){ int i,j,k,n,q;; Scanner sc=new Scanner(System.in); n=Integer.parseInt(sc.next()); long s[]=new long[n+1]; for(i=0;i<n;i++){ s[i]=Integer.parseInt(sc.next()); } q=Integer.parseInt(sc.next()); long T[]=new long[q+1]; ...
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 42, 4, 18, 13, 30, 0, 13, 17, 0, 13, 4, 18, 13, 14, 2, 13, 17, 3, 0, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 157, 5 ], [ 157, 6 ], [ 6, 7 ], [ 157, 8 ], [ 8, 9 ], [ 157, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 13, 1...
[ "import java.util.*;\n\npublic class Main{\n int n;\n long[] a;\n\n Main(){\n\tScanner sc = new Scanner(System.in);\n\tint cnt, q;\n\n\twhile(sc.hasNext()){\n\t cnt = 0;\n\t n = sc.nextInt();\n\t if(n == 0) break;\n\t a = new long[n];\n\n\t for(int i = 0; i < n; ++i) a[i] = sc.nextLong();\n\...
import java.util.*; public class Main{ int n; long[] a; Main(){ Scanner sc = new Scanner(System.in); int cnt, q; while(sc.hasNext()){ cnt = 0; n = sc.nextInt(); if(n == 0) break; a = new long[n]; for(int i = 0; i < n; ++i) a[i] = sc.nextLong(); Arrays.sort(a); q = ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 2, 13, 13, 41, 13, 2, 13, 2, 13, 17, 14, 2, 13, 13, 30, 29, 2, 18, 13, 13, 13, 14, 2, 18, 13, 13, 13, 30, 29, 17, 14, 2, 18, 13, 13, 13, 30, 29, 4, 13, 13, 13, 13, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 218, 5 ], [ 218, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 11, 13 ], [ 8, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\t\n\tpublic static boolean exist(int[] list, int number, int start, int end) {\n\t\n\t\tint l = end - start;\n\t\tint midIndex = start + l/2;\n\t\t\n\t\tif(start == end) {\n\t\t\treturn list[start] == number;\n\t\t}\n\t\telse if(list[midIndex] == number) {\n\t\t...
import java.util.Scanner; public class Main { public static boolean exist(int[] list, int number, int start, int end) { int l = end - start; int midIndex = start + l/2; if(start == end) { return list[start] == number; } else if(list[midIndex] == number) { return true; } else if(list[midInd...
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 0, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 166, 5 ], [ 166, 6 ], [ 6, 7 ], [ 166, 8 ], [ 8, 9 ], [ 166, 10 ], [ 10, 11 ], [ 166, 12 ], [ 12, 13 ], [ 12, ...
[ "import java.util.Scanner;\n\npublic class Main {\n\t\n\tstatic int[] s;\n\tstatic int tt;\n\tstatic int ans;\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\ts = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ts[i] = sc.nextInt();\n\t\t...
import java.util.Scanner; public class Main { static int[] s; static int tt; static int ans; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); s = new int[n]; for (int i = 0; i < n; i++) { s[i] = sc.nextInt(); } int q = sc.nextInt(); int[] t = ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 17, 41, 13, 20, 41, 13, 4, 18, 13, 0, 13, 20, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 41, 13, 4, 18, 13, 0, 13, 20, 13, 4, 18, 13, 41, 13, 4, 18...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 226, 5 ], [ 226, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 8, 11 ], [ 11, 12 ], [ 8, 13 ], [ 13, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main{\n\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\tint[] S;\n\t\tint[] T;\n\t\tint C = 0;\n\t\t\n\t\tScanner keyboard = new Scanner(System.in);\n\t\t\n\t\tint S_length = keyboard.nextInt();\n\t\tS = new int[S_length];\n\t\t\n\t\tkeyboard.nextLine();\n\t\t\n\t...
import java.util.Scanner; public class Main{ public static void main(String[] args) { int[] S; int[] T; int C = 0; Scanner keyboard = new Scanner(System.in); int S_length = keyboard.nextInt(); S = new int[S_length]; keyboard.nextLine(); String S_inputString = keyboard.nextLine(); ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 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, 4, 18, 13, 41, 13, 17, 11, 1, 41...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 88, 8 ], [ 88, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.*;\nimport java.io.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tint n = scanner.nextInt();\n\t\tint[] s = new int[n];\n\t\t\n\t\tfor (int i = 0; i < n; i ++) {\n\t\t\ts[i] = scanner.nextInt();\n\t\t}\n\t\t\n\t\tint...
import java.util.*; import java.io.*; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int[] s = new int[n]; for (int i = 0; i < n; i ++) { s[i] = scanner.nextInt(); } int q = scanner.nextInt(); int c = 0; f...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 41, 13, 2, 18, 13, 13, 17, 42, 2, 13, 13, 30, 14, 2, 13, 13, 30, 29, 8, 2, 18, 13, 13, 13, 13, 40, 17, 41, 13, 2, 13, 2, 2, 13, 13, 17, 14, 2, 18, 13, 13, 13, 30,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 164, 5 ], [ 164, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "\nimport java.util.Scanner;\n\n//this implements the bin search which return the position if find, otherwise negative\npublic class Main {\n\tpublic static int bin_search(int[] arr, int elem) {\n\t\tint lo = 0;\n\t\tint hi = arr.length-1;\n\t\t\n\t\twhile(lo <= hi) {\n\t\t\tif(lo == hi) {\n\t\t\t\treturn (arr[lo] ...
import java.util.Scanner; //this implements the bin search which return the position if find, otherwise negative public class Main { public static int bin_search(int[] arr, int elem) { int lo = 0; int hi = arr.length-1; while(lo <= hi) { if(lo == hi) { return (arr[lo] == elem)? lo: -1; } i...
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 17, 41, 13, 12, 13, 30, 41, 13, 17, 41, 13, 13, 41, 13, 42, 2, 13, 13, 30, 0, 13, 2, 2, 13, 13, 17, 14, 2, 13, 18, 13, 13, 29, 17, 14, 2, 13, 18, 13, 13, 0, 13, 2, 13, 17, 14...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 147, 5 ], [ 147, 6 ], [ 6, 7 ], [ 6, 8 ], [ 147, 10 ], [ 10, 11 ], [ 147, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, ...
[ "\n\nimport java.util.Scanner;\n\npublic class Main {\n static int[] A = new int[1000000];\n static int n;\n\n public static int binarySearch(int key) {\n int left = 0;\n int right = n;\n int mid;\n\n while(left < right)\n {\n mid = (left + right) / 2;\n ...
import java.util.Scanner; public class Main { static int[] A = new int[1000000]; static int n; public static int binarySearch(int key) { int left = 0; int right = n; int mid; while(left < right) { mid = (left + right) / 2; if(key == A[mid]...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 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, 4, 18, 13, 41, 13, 17, 11, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 90, 8 ], [ 90, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\nimport java.util.TreeSet;\npublic class Main {\n \n public static void main(String[] args) {\n Scanner sc =new Scanner(System.in);\n TreeSet<Integer> st = new TreeSet<>();\n int n=sc.nextInt();\n for(int i=0;i<n;i++){\n int b=sc.nextInt();\n ...
import java.util.Scanner; import java.util.TreeSet; public class Main { public static void main(String[] args) { Scanner sc =new Scanner(System.in); TreeSet<Integer> st = new TreeSet<>(); int n=sc.nextInt(); for(int i=0;i<n;i++){ int b=sc.nextInt(); st.add(b...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 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, 4, 18, 13, 41, 13, 20, 13, 11, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 140, 8 ], [ 140, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "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 int n = sc.nextInt();\n int[] S = new int[n];\n for(int i = 0; i < n; i++){\n S[i] = sc.nextInt();\n }\n ...
import java.util.Scanner; import java.util.Arrays; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] S = new int[n]; for(int i = 0; i < n; i++){ S[i] = sc.nextInt(); } int q = sc.ne...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 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, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17...
[ [ 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 ], [...
[ "import java.util.*;\n\nclass Main {\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\n\t\tint n = stdIn.nextInt();\n\t\tint[] S = new int[n];\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tS[i] = stdIn.nextInt();\n\t\t}\n\n\t\tint q = stdIn.nextInt();\n\t\tint[] T = new int[q];\n\t...
import java.util.*; class Main { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int n = stdIn.nextInt(); int[] S = new int[n]; for (int i=0; i<n; i++) { S[i] = stdIn.nextInt(); } int q = stdIn.nextInt(); int[] T = new int[q]; for (int i=0; i<q; i++) { T[i] = s...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 38, 5, 13, 30, 4, 18, 13, 5, 13, 30, 4, 18, 13, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18,...
[ [ 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 ], [ 245, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Arrays;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t \n\t\ttry {\n\t\t\tint lima = Integer.par...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; public class Main { public static void main(String[] args) { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); try { int lima = Integer.parseInt(in.readLine()); ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 126, 8 ], [ 126, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "\n\nimport 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 n = sc.nextInt(); //n个\n\t\tint[] arr1 = new int[n];\n\t\tfor(int i=0;i<arr1.length;i++)\n\t\t{\n\t\t\tarr1[i]=sc.nextInt();\n\t\t}\n\t\tint ...
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); //n个 int[] arr1 = new int[n]; for(int i=0;i<arr1.length;i++) { arr1[i]=sc.nextInt(); } int q = sc.nextInt(); //q int[] arr2 = ...
[ 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, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, ...
[ [ 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 ], ...
[ "import javax.sound.midi.Soundbank;\nimport java.util.Scanner;\n\nimport static java.lang.System.currentTimeMillis;\nimport static java.lang.System.out;\nimport static java.lang.System.setOut;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n...
import javax.sound.midi.Soundbank; import java.util.Scanner; import static java.lang.System.currentTimeMillis; import static java.lang.System.out; import static java.lang.System.setOut; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); //探索対象を...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 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, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17...
[ [ 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 ], [...
[ "import java.util.Scanner;\nclass Main {\n public static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint[] S = new int[n]; \n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tS[i] = scan.nextInt();\n\t\t}\n\t\t\n\t\tint q = scan.nextInt();\n\t\tint[] T = new...
import java.util.Scanner; class Main { public static void main(String[] args){ Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int[] S = new int[n]; for(int i = 0; i < n; i++){ S[i] = scan.nextInt(); } int q = scan.nextInt(); int[] T = new int[q]; for(int i = 0; i < q; i+...
[ 7, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 0, 13, 4, 18, 13, 0, 13, 20, 13, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13...
[ [ 0, 1 ], [ 185, 2 ], [ 185, 3 ], [ 3, 4 ], [ 3, 5 ], [ 5, 6 ], [ 6, 7 ], [ 6, 8 ], [ 5, 9 ], [ 9, 10 ], [ 5, 11 ], [ 11, 12 ], [ 5, 13 ], [ 13, 14 ],...
[ "public class Main{\n public void run(java.io.InputStream in, java.io.PrintStream out){\n java.util.Scanner sc = new java.util.Scanner(in);\n/*answer*/\n int n, q;\n int[] s, t;\n int i, j, c, l, r, a;\n\n n = sc.nextInt();\n s = new int[n];\n for(i = 0;i < n;i++){\n s[i] = sc.nextInt();\...
public class Main{ public void run(java.io.InputStream in, java.io.PrintStream out){ java.util.Scanner sc = new java.util.Scanner(in); /*answer*/ int n, q; int[] s, t; int i, j, c, l, r, a; n = sc.nextInt(); s = new int[n]; for(i = 0;i < n;i++){ s[i] = sc.nextInt(); } q = sc...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 17, 41, 13, 41, 13, 41, 13, 41, 13, 20, 41, 13, 20, 4, 18, 13, 11, 1, 0, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 20, 4...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 159, 5 ], [ 159, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 8, 11 ], [ 11, 12 ], [ 11, 13 ], [ 8, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main{\n\n\tpublic static void main(String[] args) {\n\t\tint i,cnt=0,big,sma,mid;\n\t\t// TODO Auto-generated method stub\n Scanner sca=new Scanner(System.in);\n int hair1[]=new int[sca.nextInt()];\n for(i=0;i<hair1.length;i++){\n \thair1[i]=sca.nextInt();\n ...
import java.util.Scanner; public class Main{ public static void main(String[] args) { int i,cnt=0,big,sma,mid; // TODO Auto-generated method stub Scanner sca=new Scanner(System.in); int hair1[]=new int[sca.nextInt()]; for(i=0;i<hair1.length;i++){ hair1[i]=sca.nextInt(); } int hair2[]=new ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 41, 13, 18, 13, 13, 41, 13, 42, 2, 13, 13, 30, 0, 13, 2, 2, 13, 13, 17, 14, 2, 13, 18, 13, 13, 29, 13, 14, 2, 13, 18, 13, 13, 0, 13, 2, 13, 17, 14, 2, 13, 18, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 148, 5 ], [ 148, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "\nimport java.util.Scanner;\n\npublic class Main {\n\t\n\tstatic int search(int[] a, int key) {\n\t\tint left=0, right=a.length;\n\t\tint mid;\n\t\twhile (left < right) {\n\t\t\tmid = (left+right) / 2;\n\t\t\tif (key == a[mid]) return mid;\n\t\t\tif (key > a[mid]) left = mid+1;\n\t\t\telse if (key < a[mid]) right ...
import java.util.Scanner; public class Main { static int search(int[] a, int key) { int left=0, right=a.length; int mid; while (left < right) { mid = (left+right) / 2; if (key == a[mid]) return mid; if (key > a[mid]) left = mid+1; else if (key < a[mid]) right = mid; } return -1; } public ...
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 20, 12, 13, 30, 42, 4, 13, 30, 4, 18, 18, 13, 13, 4, 13, 23, 13, 12, 13, 30, 14, 40, 4, 18, 13, 29, 17, 0, 13, 4, 18, 13, 0, 13, 20, 13, 11, 1, 41...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 182, 5 ], [ 182, 6 ], [ 6, 7 ], [ 182, 8 ], [ 8, 9 ], [ 182, 10 ], [ 10, 11 ], [ 182, 12 ], [ 12, 13 ], [ 182, ...
[ "import java.util.Scanner;\n\n/**\n * Created by akensho on 2015/11/23.\n */\npublic class Main {\n static int n, q;\n static int[] S, T;\n static Scanner sc = new Scanner(System.in);\n public static void main(String[] args){\n while (read()){\n System.out.println(solve());\n }\...
import java.util.Scanner; /** * Created by akensho on 2015/11/23. */ public class Main { static int n, q; static int[] S, T; static Scanner sc = new Scanner(System.in); public static void main(String[] args){ while (read()){ System.out.println(solve()); } } static...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 17, 12, 13, 30, 41, 13, 20, 0, 13, 4, 18, 13, 4, 18, 13, 0, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 228, 8 ], [ 228, 9 ], [ 9, 10 ], [ 228, 11 ], [ 11, 12 ], [ 228, 13 ], [ 13, 14 ...
[ "import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n\tstatic int n, m;\n\tstatic int[] a, b;\n\tstatic int count = 0;\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tn = Integer.parseInt(sc.next());\n\t\ta = new int[n];\n\t\tfor (int i = 0; i < n...
import java.util.Arrays; import java.util.Scanner; public class Main { static int n, m; static int[] a, b; static int count = 0; public static void main(String[] args) { Scanner sc = new Scanner(System.in); n = Integer.parseInt(sc.next()); a = new int[n]; for (int i = 0; i < n; i++) { a[i] = Integer.pa...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 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, 41, 13, 4, 18, 13, 41, 13, 41, 13, 17, 11, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 91, 8 ], [ 91, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "\n\nimport java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint[] a1 = new int[n];\n\t\tfor (int i = 0; i < n; ++i)\n\t\t\ta1[i] = scan.nextInt();\n\t\t//System.out.println(A...
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int[] a1 = new int[n]; for (int i = 0; i < n; ++i) a1[i] = scan.nextInt(); //System.out.println(Arrays.toString(a1)); //System...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 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, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 242, 8 ], [ 242, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "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 int n = sc.nextInt();\n int[] S = new int[n];\n for(int i=0; i<n; i++) S[i] = sc.nextInt();\n int q = s...
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws Exception { FastScanner sc = new FastScanner(System.in); int n = sc.nextInt(); int[] S = new int[n]; for(int i=0; i<n; i++) S[i] = sc.nextInt(); int q = sc.nextInt(); ...
[ 7, 15, 13, 17, 6, 13, 41, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 0, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 141, 5 ], [ 141, 6 ], [ 6, 7 ], [ 141, 8 ], [ 8, 9 ], [ 8, 10 ], [ 10, 11 ], [ 11, 12 ], [ 11, 13 ], [ 10, 14 ...
[ "import java.util.Scanner;\n\npublic class Main {\n static int[] s;\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n s = new int[n];\n for (int i = 0; i < n; i++) {\n s[i] = sc.nextInt();\n }\n in...
import java.util.Scanner; public class Main { static int[] s; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); s = new int[n]; for (int i = 0; i < n; i++) { s[i] = sc.nextInt(); } int q = sc.nextInt(...
[ 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, 4, 18, 13, 41, 13, 20, 13, 41, 13, 4, 18, 4, 18, 13, 17, 11, 1, 41, 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 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.Comparator;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReade...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new Buffere...
[ 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, 13, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.io.*;\nimport java.util.Arrays;\nimport java.util.*;\n\nclass Main{\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tDeque<Integer> stack = new ArrayDeque<Integ...
import java.io.*; import java.util.Arrays; import java.util.*; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); Deque<Integer> stack = new ArrayDeque<Integer>(); String[] st...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 41, 13, 20, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 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 ], [...
[ "import java.util.*;\n\nclass Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n Set<String> S = new HashSet<>();\n int n = sc.nextInt();\n for (int i=0; i<n; i++) {\n S.add(sc.next());\n }\n\n Set<String> T = new Hash...
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); Set<String> S = new HashSet<>(); int n = sc.nextInt(); for (int i=0; i<n; i++) { S.add(sc.next()); } Set<String> T = new HashSet<>(); ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 2, 13, 2, 2, 13, 13, 17, 14, 2, 13, 13, 30, 29, 17, 14, 2, 18, 13, 13, 13, 30, 29, 4, 13, 13, 13, 13, 2, 13, 17, 14, 2, 18, 13, 13, 13, 30, 29, 4, 13, 13, 13, 2, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 193, 5 ], [ 193, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 11, 13 ], [ 13, 14 ]...
[ "import java.util.Scanner;\n\npublic class Main {\n\t\n\tpublic static Boolean BinarySearch(int[] Value, int input, int left, int right) {\n\t\tint middle = left + (right-left)/2; // \n\t\tif (right < left) {\n\t\t\treturn false; // This means that the algorithm is not sorted\n\t\t\t}\n\t\telse if (Value[middle] ...
import java.util.Scanner; public class Main { public static Boolean BinarySearch(int[] Value, int input, int left, int right) { int middle = left + (right-left)/2; // if (right < left) { return false; // This means that the algorithm is not sorted } else if (Value[middle] > input) { return BinaryS...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 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, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17...
[ [ 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 ],...
[ "\n\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint[] a = new int[n];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\ta[i] = in.nextInt();\...
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO ????????????????????????????????????????????? Scanner in = new Scanner(System.in); int n = in.nextInt(); int[] a = new int[n]; for(int i = 0; i < n; i++){ a[i] = in.nextInt(); } int m = in.nextInt(); i...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 42, 17, 30, 0, 13, 4, 18, 13, 14, 2, 13, 17, 3, 41, 13, 17, 41, 13, 17, 41, 13, 17, 41, 13, 0, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30...
[ [ 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 ], [ 8, 14 ], [ ...
[ "import java.util.Scanner;\n\nclass Main {\n\tpublic static void main(String args[]){\t\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n;\n\t\twhile(true){\n\t\t\tn = scan.nextInt();\n\t\t\tif(n == 0)break;\n\t\t\tdouble sum = 0;\n\t\t\tdouble ave = 0;\n\t\t\tdouble var = 0;\n\t\t\n\t\t\tint a[];\n\t\t\ta...
import java.util.Scanner; class Main { public static void main(String args[]){ Scanner scan = new Scanner(System.in); int n; while(true){ n = scan.nextInt(); if(n == 0)break; double sum = 0; double ave = 0; double var = 0; int a[]; a = new int[n]; for(int i = 0;i < n;i++){ a[...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 42, 2, 13, 17, 30, 41, 13, 20, 13, 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, 0, 13, 18, 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 ],...
[ "\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String args[]) {\n Scanner scn = new Scanner(System.in);\n int n = scn.nextInt();\n\n while(n!=0){\n double[] a = new double[n];\n double sum =0, ave;\n for(int i=0;i<n;i++){\n ...
import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner scn = new Scanner(System.in); int n = scn.nextInt(); while(n!=0){ double[] a = new double[n]; double sum =0, ave; for(int i=0;i<n;i++){ a[i]=s...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 13, 14, 2, 13, 17, 3, 41, 13, 20, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 0, 13, 2, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 119, 5 ], [ 119, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] arg){\n Scanner sc = new Scanner(System.in);\n while(true){\n int n = sc.nextInt();\n if(n==0) break;\n int s[] = new int[n];\n int sum = 0;\n for(int i=0;i<n;i...
import java.util.Scanner; public class Main{ public static void main(String[] arg){ Scanner sc = new Scanner(System.in); while(true){ int n = sc.nextInt(); if(n==0) break; int s[] = new int[n]; int sum = 0; for(int i=0;i<n;i++){ ...