node_ids
listlengths
4
1.4k
edge_index
listlengths
1
2.22k
text
listlengths
4
1.4k
source
stringlengths
14
427k
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 156, 5 ], [ 156, 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\t\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\tint numSwaps = 0;\n\t\t\t\n\t\tint n = in.nextInt();\n\t\tint [] arr = new int [n];\n\t\t\n\t\t\t\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\t\tarr[i] = in.nextInt();\...
import java.util.Scanner; public class Main { public static void main(String [] args) { Scanner in = new Scanner(System.in); int numSwaps = 0; int n = in.nextInt(); int [] arr = new int [n]; for(int i = 0; i < n; i++) { arr[i] = in.nextInt(); } for(int j = 0; j < n; j++) {...
[ 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, 4, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 17, 41, 1...
[ [ 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 ], [ 12, 14 ],...
[ "\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint array[] = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tarray[i] = sc.nextInt();\n\t\t}\n\t\tselectionSort(array, n);\n\t}\n\n\tpubl...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int array[] = new int[n]; for (int i = 0; i < n; i++) { array[i] = sc.nextInt(); } selectionSort(array, n); } public static void selectionSort(int array...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 17, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, ...
[ [ 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 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N[] = new int[100];\n int n = sc.nextInt();\n int m = 0;\n for (int i = 0; i < n; i++) N[i] = sc.nextInt();\n for (int i = 0; i < n-1; i++) {\n int min ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N[] = new int[100]; int n = sc.nextInt(); int m = 0; for (int i = 0; i < n; i++) N[i] = sc.nextInt(); for (int i = 0; i < n-1; i++) { int min = i; fo...
[ 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, 41, 13, 17, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 186, 11 ], [ 186, 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 NumberFormatException, IOException {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integ...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; 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...
[ 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 ], [ 279, 11 ], [ 279, 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 NumberFormatException, IOException {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tBufferedReader br = new BufferedReader(new In...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws NumberFormatException, IOException { // TODO ????????????????????????????????????????????? BufferedReader br = new BufferedReader(new InputStreamReader(Sy...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 13, 11, 1, 41, 13, 13, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 18, 13, 13, 18, 13, 13, 30, 0, 13, 13, 14, 2,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 172, 5 ], [ 172, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ],...
[ "import java.util.*;\n\npublic class Main{\n\n public static int select(int A[],int N){\n int cnt=0;\n for(int i=0;i<N;i++){\n int minj=i;\n for(int j=i;j<N;j++){\n if(A[j]<A[minj]){\n minj = j;\n }\n }\n i...
import java.util.*; public class Main{ public static int select(int A[],int N){ int cnt=0; for(int i=0;i<N;i++){ int minj=i; for(int j=i;j<N;j++){ if(A[j]<A[minj]){ minj = j; } } if(minj!=i){ ...
[ 7, 15, 13, 17, 6, 13, 41, 13, 12, 13, 30, 0, 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, 13, 13, 13, 4, 13, 13, 13, 4, 18, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 182, 5 ], [ 182, 6 ], [ 6, 7 ], [ 182, 8 ], [ 8, 9 ], [ 8, 10 ], [ 10, 11 ], [ 11, 12 ], [ 11, 13 ], [ 10, 14 ...
[ "import java.util.Scanner;\n\npublic class Main {\n\tprivate static Scanner sc;\n\tpublic static void main(String[] args){\n\t\tsc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint[] a=new int[n];\n\t\tfor(int i=0;i<n;i++){\n\t\t\ta[i]=sc.nextInt();\n\t\t}\n\t\tint ans=selectionSort(a,n);\n\t\twrite(a,n);\n...
import java.util.Scanner; public class Main { private static Scanner sc; public static void main(String[] args){ sc=new Scanner(System.in); int n=sc.nextInt(); int[] a=new int[n]; for(int i=0;i<n;i++){ a[i]=sc.nextInt(); } int ans=selectionSort(a,n); write(a,n); System.out.println(ans); } static...
[ 7, 15, 13, 17, 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, 11, 1, 41, 13, 17, 2, 13, 2,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 172, 8 ], [ 172, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.io.*;\nimport java.util.*;\n \npublic class Main {\n public static void main(String[] args) throws Exception {\n int count = 0;\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n \n int[] array = new int[n];\n for(int i = 0; i<n; i++){\n...
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws Exception { int count = 0; Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] array = new int[n]; for(int i = 0; i<n; i++){ ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 40, 17, 11, 1, 41, 13, 17, 2, 13...
[ [ 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 int res = 0;\n for (int i = 0; i < n; i++) {\n ary[i] = sc.nextInt...
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]; int res = 0; for (int i = 0; i < n; i++) { ary[i] = sc.nextInt(); } ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 17, 41, 13, 20, 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, 4, 13, 13, 13, 4...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 171, 8 ], [ 171, 9 ], [ 9, 10 ], [ 9, 11 ], [ 171, 12 ], [ 12, 13 ], [ 12, 14 ...
[ "\nimport java.io.PrintWriter;\nimport java.util.Scanner;\n\npublic class Main {\n\tstatic int cnt = 0;\n\tstatic PrintWriter out =new PrintWriter(System.out);\n public static void main(String[] args) {\n \tScanner sc = new Scanner(System.in);\n \t\n \tint n = sc.nextInt();\n \tint array[] = new int[...
import java.io.PrintWriter; import java.util.Scanner; public class Main { static int cnt = 0; static PrintWriter out =new PrintWriter(System.out); public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int array[] = new int[n]; for(int i=0;i...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 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, 11, 1, 41, 13, 17, 2, 13, 2, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 160, 5 ], [ 160, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint n ;\n\t\tint countOfExc = 0;\n\t\tn = 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();\n\t\t}\n\t\tfor(int i = 0;i<n-1;i++)...
import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner in = new Scanner(System.in); int n ; int countOfExc = 0; n = in.nextInt(); int[] a = new int[n]; for(int i = 0;i<n;i++){ a[i] = in.nextInt(); } for(int i = 0;i<n-1;i++){ int min = i; for(int j = i+1;...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 17, 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 java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.Scanner;\nimport java.util.Arrays;\n\nclass Main{\n\tpublic static void main(String[] args)throws Exception{\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint n = scanner.nextInt();\n\t\tint[] numbers = new int[n];\n\t\tfor(i...
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Scanner; import java.util.Arrays; class Main{ public static void main(String[] args)throws Exception{ Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int[] numbers = new int[n]; for(int i = 0; i < n; 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, 4, 18, 13, 41, 13, 20, 13, 41, 13, 20, 13, 0, 13, 4, 18, 4, 18, 13, 17, 11, 1, 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 java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\nimport java.util.Scanner;\nimport java.util.Deque;\nimport java.util.ArrayDeque;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new Inp...
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.util.Scanner; import java.util.Deque; import java.util.ArrayDeque; public class Main { public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(Sys...
[ 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, 4, 18, 13, 41, 13, 20, 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 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.FileNotFoundException;\nimport java.io.FileReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\npublic class Main{\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBuf...
import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main{ public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br = 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, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 11, 1,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 173, 8 ], [ 173, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.util.Scanner;\nimport java.util.StringJoiner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int size = Integer.parseInt(scanner.next());\n int[] array = new int[size];\n for (int i = 0; i < size; i++) {\n ...
import java.util.Scanner; import java.util.StringJoiner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int size = Integer.parseInt(scanner.next()); int[] array = new int[size]; for (int i = 0; i < size; i++) { arra...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 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, 17, 11, 1, 41, 13, 17, 2...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 188, 5 ], [ 188, 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 StringBuilder build = new StringBuilder();\n int z = sc.nextInt();\n int[] ary = new int[z];\n for(int i = 0 ; i < ary.length; i++){\n a...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc =new Scanner(System.in); StringBuilder build = new StringBuilder(); int z = sc.nextInt(); int[] ary = new int[z]; for(int i = 0 ; i < ary.length; i++){ ary[i] = 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, 4, 13, 13, 23, 13, 12, 13, 30, 41, 13, 17, 11, 1, 41...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 177, 5 ], [ 177, 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 Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] array = new int[n];\n\n for(int i = 0; i < n; i++) {\n \tarray[i] = sc.nextInt();\n }\n\n selectio...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] array = new int[n]; for(int i = 0; i < n; i++) { array[i] = sc.nextInt(); } selectionSort(array); } 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, 0, 18, 13, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30,...
[ [ 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\npublic class Main{\n\tpublic static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n int A[] = new int[N];\n for(int i = 0; i < N; i++) A[i] = sc.nextInt();\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[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int A[] = new int[N]; for(int i = 0; i < N; i++) A[i] = sc.nextInt(); int sum = 0; for(int i = 0; i < N; i++){ i...
[ 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, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 161, 5 ], [ 161, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint A[] = new int[N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tint count = 0;\n\t\tfor (int i = 0; i < N; i++) {\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 A[] = new int[N]; for (int i = 0; i < N; i++) { A[i] = sc.nextInt(); } int count = 0; for (int i = 0; i < N; i++) { int min = i; for (int j = i; ...
[ 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, 17, 41, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 156, 5 ], [ 156, 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[] input = new int[n];\n\n for (int i = 0; i < n; i++) {\n input[i] = sc.nextInt();\n }\n\n int count = 0...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] input = new int[n]; for (int i = 0; i < n; i++) { input[i] = sc.nextInt(); } int count = 0; int min...
[ 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, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 157, 5 ], [ 157, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "\n\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\t// 入力の受け取り\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint[] A = new int[N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\n\t\t// 解法\n\t\t// Selection sort,...
import java.util.Scanner; public class Main { public static void main(String[] args) { // 入力の受け取り Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int[] A = new int[N]; for (int i = 0; i < N; i++) { A[i] = sc.nextInt(); } // 解法 // Selection sort, cntは交換回数 int cnt = 0; for (int i = ...
[ 7, 15, 13, 17, 6, 13, 41, 13, 12, 13, 30, 0, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 160, 5 ], [ 160, 6 ], [ 6, 7 ], [ 160, 8 ], [ 8, 9 ], [ 8, 10 ], [ 10, 11 ], [ 11, 12 ], [ 11, 13 ], [ 10, 14 ...
[ "import java.util.Scanner;\n\tpublic class Main {\n\tprivate static Scanner scanner;\n\tpublic static void main(String args[]) {\n\n\t\tscanner = new Scanner(System.in);\n\t\tint a = scanner.nextInt();\n\t\tint[] b = new int[a];\n\t\tint minj,count = 0;\n\t\tfor(int i=0;i < a;i++) b[i] = scanner.nextInt();\n\n\t\tf...
import java.util.Scanner; public class Main { private static Scanner scanner; public static void main(String args[]) { scanner = new Scanner(System.in); int a = scanner.nextInt(); int[] b = new int[a]; int minj,count = 0; for(int i=0;i < a;i++) b[i] = scanner.nextInt(); for(int i = 0;i < a;i++) { mi...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 146, 5 ], [ 146, 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> arr = new ArrayList<>();\n int count = 0;\n for(int i = 0; i < n; i++) {\n arr.add(sc.nextInt());\n }\n for(int i = 0; i < ...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); List<Integer> arr = new ArrayList<>(); int count = 0; for(int i = 0; i < n; i++) { arr.add(sc.nextInt()); } for(int i = 0; i < n - 1; i++) { ...
[ 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, 4, 13, 13, 4, 18, 13, 23, 13, 12, 13, 30, 41, 13, 41...
[ [ 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\tpublic static void main(String args[]) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint[] c = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tc[i] = in.nextInt();\n\t\t}\n\t\tselectionSort(c);\n\t\tin.close();\n\t}\n\n\tprivate stati...
import java.util.Scanner; class Main { public static void main(String args[]) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int[] c = new int[n]; for (int i = 0; i < n; i++) { c[i] = in.nextInt(); } selectionSort(c); in.close(); } private static void selectionSort(int[] A) { int m...
[ 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 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\nclass Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint n = Integer.parseInt(br.readLine());\n\n\t\tStr...
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[] s = br.readLine()....
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 0, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 0, 13, 4, 18, 13, 41, 13, 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 ], [ 0, 7 ], [ 189, 8 ], [ 189, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.io.*;\nimport java.util.*;\n\n\n\npublic class Main{\n public static void main(String[] args)throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String str;\n \n str = br.readLine();\n int N = Integer.parseI...
import java.io.*; import java.util.*; public class Main{ public static void main(String[] args)throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str; str = br.readLine(); int N = Integer.parseInt(str); ...
[ 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, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1,...
[ [ 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 ], ...
[ "/* ALDS1_2_B */\nimport java.io.*;\n\nclass Main\n{\n public static void main(String[] args)\n {\n try{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n String[] str = br.readLine().split(\" \");\n int[] array = new in...
/* ALDS1_2_B */ import java.io.*; class Main { public static void main(String[] args) { try{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); String[] str = br.readLine().split(" "); int[] array = new int[n]; Select...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 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, 17, 41, 13, 17, 41, 13, 11, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 172, 5 ], [ 172, 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 public static void main(String[] args){\n int i,j;\n Scanner sc= new Scanner(System.in);\n\n int n= sc.nextInt();\n int intarr[]=new int[n];\n for(i=0;i<n;i++){\n intarr[i]=sc.nextInt(); \n }\n int pivo...
import java.util.Scanner; public class Main{ public static void main(String[] args){ int i,j; Scanner sc= new Scanner(System.in); int n= sc.nextInt(); int intarr[]=new int[n]; for(i=0;i<n;i++){ intarr[i]=sc.nextInt(); } int pivot=0; int ...
[ 7, 15, 13, 17, 6, 13, 41, 13, 17, 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, 4, 18, 13, 4, 13, 13, 13, 4, 13, 13, 4, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 197, 5 ], [ 197, 6 ], [ 6, 7 ], [ 6, 8 ], [ 197, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ...
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static int count = 0;\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint length = scanner.nextInt();\n\t\tint[] array = new int[length];\n\t\tfor (int i=0; i<length; i++) {\n\t\t\tarray[i] = scanner.next...
import java.util.Scanner; public class Main { public static int count = 0; public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int length = scanner.nextInt(); int[] array = new int[length]; for (int i=0; i<length; i++) { array[i] = scanner.nextInt(); } scanner.close();...
[ 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, 4, 13, 13, 23, 13, 12, 13, 30, 41, 13, 17, 11, 1, 41...
[ [ 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.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int count = sc.nextInt();\n int[] s = new int[count];\n for (int i = 0; i < count; i++) {\n s[i] = sc.nextInt();\n }\n selec...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int count = sc.nextInt(); int[] s = new int[count]; for (int i = 0; i < count; i++) { s[i] = sc.nextInt(); } selectionSort(s); ...
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 41, 13, 12, 13, 30, 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, 17, 11, 1, 41, 13, 17, 2, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 166, 5 ], [ 166, 6 ], [ 6, 7 ], [ 6, 8 ], [ 166, 9 ], [ 9, 10 ], [ 166, 11 ], [ 11, 12 ], [ 11, 13 ], [ 13, 14...
[ "import java.util.Scanner;\n\npublic class Main {\n\tScanner sc = new Scanner(System.in);\n\tStringBuilder out;\n\n\tvoid run() {\n\t\tint N = sc.nextInt();\n\t\tint[] A = new int[N];\n\t\tfor (int i = 0; i < A.length; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\n\t\tint cnt = 0;\n\t\tfor (int i = 0; i < N; i++) {\...
import java.util.Scanner; public class Main { Scanner sc = new Scanner(System.in); StringBuilder out; void run() { int N = sc.nextInt(); int[] A = new int[N]; for (int i = 0; i < A.length; i++) { A[i] = sc.nextInt(); } int cnt = 0; for (int i = 0; i < N; i++) { boolean swap = false; int min =...
[ 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, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 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 public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int[] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = scanner.nextInt();\n }\n int ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int[] a = new int[n]; for (int i = 0; i < n; i++) { a[i] = scanner.nextInt(); } int swap = 0; ...
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 17, 12, 13, 30, 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, 12, 13, 30...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 183, 5 ], [ 183, 6 ], [ 6, 7 ], [ 6, 8 ], [ 183, 9 ], [ 9, 10 ], [ 183, 11 ], [ 11, 12 ], [ 183, 13 ], [ 13, 1...
[ "import java.util.*;\npublic class Main {\n\tScanner sc = new Scanner(System.in);\n\tint N;\n\tint[] A;\n\tint minj,key;\n\tint count=0;\n\t\n\tpublic void input(){\n\t\tN=sc.nextInt();\n\t\tA = new int[N];\n\t\tfor(int i=0; i<N; i++){\n\t\t\tA[i]=sc.nextInt();\n\t\t}\n\t}\n\t\n\tpublic void selectionsort(){\n\t\tf...
import java.util.*; public class Main { Scanner sc = new Scanner(System.in); int N; int[] A; int minj,key; int count=0; public void input(){ N=sc.nextInt(); A = new int[N]; for(int i=0; i<N; i++){ A[i]=sc.nextInt(); } } public void selectionsort(){ for(int i=0; i<N-1; i++){ minj=i; for(in...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 17, 41, 13, 41, 13, 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, 11, 1, 0,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 179, 5 ], [ 179, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int i,j;\n int count = 0;\n int min;\n int minnum;\n int n = sc.nextInt();\n int A[] = new int[n];\n for(i=0;i<n;i++){\n ...
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int i,j; int count = 0; int min; int minnum; int n = sc.nextInt(); int A[] = new int[n]; for(i=0;i<n;i++){ A[i] = sc...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 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, 41, 13, 4, 18, 13, 0, 18, 13, 13, 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.Scanner;\n\nclass Main{\n public static void main(String[] args){\n\tint i;\n\tint j;\n\tint minj;\n\tint v;\n\tint count = 0;\n\tScanner scan = new Scanner(System.in);\n\tint n = scan.nextInt();\n\tint A[] = new int[n];\n\n\t//Initialize data\n for(i=0 ; i<n ; i++){\n int num...
import java.util.Scanner; class Main{ public static void main(String[] args){ int i; int j; int minj; int v; int count = 0; Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int A[] = new int[n]; //Initialize data for(i=0 ; i<n ; i++){ int num = scan.nextInt(); ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 17, 41, 13, 17, 41, 13, 17, 41, 13, 17, 41, 13, 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...
[ [ 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\n/**\n * \n */\n\n/**\n * @author kawakami\n *\n */\nclass Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tStringBuilder sb = new StringBuilder();\n\t\tScanner as = new Scanner(System.in);\n\t\t\n\t\tint N...
import java.util.Scanner; /** * */ /** * @author kawakami * */ class Main { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub StringBuilder sb = new StringBuilder(); Scanner as = new Scanner(System.in); int N = 0; int tre = 0; int count = 0; ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 4, 18, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 204, 5 ], [ 204, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tsc.useDelimiter(System.getProperty(\"line.separator\"));\n int n = sc.nextInt();\n String data = sc.next();\n\n //String???Int????????????\n Stri...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); sc.useDelimiter(System.getProperty("line.separator")); int n = sc.nextInt(); String data = sc.next(); //String???Int???????????? String[] datas = data.split...
[ 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, 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, 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.InputStreamReader;\nimport java.io.IOException;\n\npublic class Main{\n\n public static void main(String[] args)throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\...
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; public class Main{ public static void main(String[] args)throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); int[]...
[ 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, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 211, 5 ], [ 211, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\n/**\n * ZAKIREN第5章\n *\n * @author K.Yamauchi\n *\n */\npublic class Main {\n\n\t/**\n\t *\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in); // 入力\n\t\tint n = Integer.parseInt(scan.nextLine()); // 要素数\n\n\t\t// ソート対象配列の読...
import java.util.Scanner; /** * ZAKIREN第5章 * * @author K.Yamauchi * */ public class Main { /** * * @param args */ public static void main(String[] args) { Scanner scan = new Scanner(System.in); // 入力 int n = Integer.parseInt(scan.nextLine()); // 要素数 // ソート対象配列の読み込み String[] targetArrayStr = sca...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 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, 13, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 9, 10 ], [ 7, 11 ], [ 11, 12 ], [ 7, 13 ], [ 13, 14 ], [...
[ "import java.io.*;\nimport java.util.*;\n\n\n\nclass Main{\n //読み込みのテンプレ(stringオブジェクトまで)\n \n static int N;\n static int[] sequence;\n static int count;\n \n public static void main(String[] args) throws IOException{\n Scanner scanner = new Scanner(System.in);\n int N = scanner.ne...
import java.io.*; import java.util.*; class Main{ //読み込みのテンプレ(stringオブジェクトまで) static int N; static int[] sequence; static int count; public static void main(String[] args) throws IOException{ Scanner scanner = new Scanner(System.in); int N = scanner.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, 0, 18, 13, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 162, 8 ], [ 162, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.io.*;\nimport 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 []array=new int[N];\n for(int i=0;i<N;i++)array[i]=sc.nextInt();\n int num=0;\n for(int i=0;i<N;i++)...
import java.io.*; import java.util.Scanner; public class Main{ public static void main(String args[]){ Scanner sc=new Scanner(System.in); int N=sc.nextInt(); int []array=new int[N]; for(int i=0;i<N;i++)array[i]=sc.nextInt(); int num=0; for(int i=0;i<N;i++){ ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 192, 5 ], [ 192, 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\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line1 = sc.nextLine();\n\t\tint n = Integer.parseInt(line1);\n\n\t\tString line2 = sc.nextLine();\n\t\tStri...
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO ????????????????????????????????????????????? Scanner sc = new Scanner(System.in); String line1 = sc.nextLine(); int n = Integer.parseInt(line1); String line2 = sc.nextLine(); String[] kari = line2.split(" ");...
[ 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, 4, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 17, 11, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 172, 5 ], [ 172, 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 sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tfor(int i = 0 ; i < n ; i++) {\n\t\t\ta[i] = sc.nextInt();\n\t\t}\n\t\tselectionSort(a, n);\n\t}\n\n\tstatic void selecti...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] a = new int[n]; for(int i = 0 ; i < n ; i++) { a[i] = sc.nextInt(); } selectionSort(a, n); } static void selectionSort(int[] a, int n) { int cnt =...
[ 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, 4, 13, 13, 13, 4, 18, 13, 23, 13, 12, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 172, 8 ], [ 172, 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\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint[] A = new int[N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tA[i] = scan.nextInt();\n\t\t}\n\t\tselectionSrot...
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[] A = new int[N]; for (int i = 0; i < N; i++) { A[i] = scan.nextInt(); } selectionSrot(A, N); scan.close(); } public...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 38, 5, 13, 30, 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, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 168, 5 ], [ 168, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 10, 11 ], [ 10, 12 ], [ 9, 13 ], [ 13, 14 ]...
[ "import java.io.*;\n\npublic class Main {\n public static void main(String[] args) {\n try {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n int count = Integer.parseInt(in.readLine());\n int[] iArr = new int[count];\n String[] sArr = in.readLine().split(\" \");...
import java.io.*; public class Main { public static void main(String[] args) { try { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); int count = Integer.parseInt(in.readLine()); int[] iArr = new int[count]; String[] sArr = in.readLine().split(" "); for(int ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 41, 13, 17, 41, 13, 41, 13, 17, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 41, 13, 0, 13, 20, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 20, 17, ...
[ [ 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.*;\nimport java.util.*;\n\nclass Main{\n public static void main(String[] args) throws Exception{\n\tint i=0;\n\tint j=0;\n\tint tmp;\n\tint Count_Sort = 0;\n\t\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\tString N_str = br.readLine();\n\tint N = Integer.parse...
import java.io.*; import java.util.*; class Main{ public static void main(String[] args) throws Exception{ int i=0; int j=0; int tmp; int Count_Sort = 0; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String N_str = br.readLine(); int N = Integer.parseInt(N_str); int[] A; A...
[ 7, 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, 11, 1, 41, 13, 17, 2, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 166, 5 ], [ 166, 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 public static void main(String[] args){\n Scanner scan=new Scanner(System.in);\n int n,minN,q=0;\n n=scan.nextInt();\n int[] sort=new int[n];\n for(int i=0; i<n; i++){\n sort[i]=scan.nextInt();\n }\n //System...
import java.util.*; public class Main{ public static void main(String[] args){ Scanner scan=new Scanner(System.in); int n,minN,q=0; n=scan.nextInt(); int[] sort=new int[n]; for(int i=0; i<n; i++){ sort[i]=scan.nextInt(); } //System.out.println(Arr...
[ 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\nclass Main{\n public static void main(String args[]) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n int n = Integer.parseInt( br.readLine() );\n String[] s...
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= br.read...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 41, 13, 12, 13, 30, 4, 18, 20, 23, 13, 12, 13, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 0, 13, 20, 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 ], [ 187, 8 ], [ 187, 9 ], [ 9, 10 ], [ 9, 11 ], [ 187, 12 ], [ 12, 13 ], [ 187, 14 ...
[ "import java.io.*;\nimport java.util.*;\n\npublic class Main {\n\n private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); \n private static StringTokenizer st;\n\n public static void main ( String [] args ) throws IOException\n {\n\tnew Main().cal();\n }\n\n \n ...
import java.io.*; import java.util.*; public class Main { private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); private static StringTokenizer st; public static void main ( String [] args ) throws IOException { new Main().cal(); } private void cal() ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 14, 2, 13, 13, 30, 29, 13, 30, 29, 13, 23, 13, 23, 13, 12, 13, 30, 14, 2, 13, 13, 30, 29, 13, 30, 29, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 38, 5, 13, 30, 4, 18, 18, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 10, 11 ], [ 10, 12 ], [ 9, 13 ], [ 13, 14 ], ...
[ "import java.io.*;\n\nclass Main{\n \n public static int maxv(int x, int y){\n if(x >= y){\n return x;\n }else{\n return y;\n }\n }\n\n public static int minv(int x, int y){\n if(x <= y){\n return x;\n ...
import java.io.*; class Main{ public static int maxv(int x, int y){ if(x >= y){ return x; }else{ return y; } } public static int minv(int x, int y){ if(x <= y){ return x; }else{ ...
[ 7, 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, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 4, 18, 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\t\tScanner sc = new Scanner(System.in);\n\t\tint N = Integer.parseInt(sc.next());\n\t\tint A[] = new int[N];\n\t\tfor(int i=0;i<N;i++){\n\t\t\tA[i]=Integer.parseInt(sc.next());\n\t\t}\n\t\tsc.close();\n\t\t\n\t\tint co...
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()); int A[] = new int[N]; for(int i=0;i<N;i++){ A[i]=Integer.parseInt(sc.next()); } sc.close(); int count=0; for(int i=0;i<N-1;i++){ in...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 41, 13, 41, 13, 17, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 11, 1, 41, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 168, 8 ], [ 168, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.util.Scanner;\nimport java.lang.Math;\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 minj,z,cnt=0;\n int a[] = new int[n];\n for(int i = 0; i < n; i++){\n ...
import java.util.Scanner; import java.lang.Math; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int minj,z,cnt=0; int a[] = new int[n]; for(int i = 0; i < n; i++){ a[i] = sc....
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 17, 41, 13, 4, 18, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 17, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 18, 13, 11, 1, 0, 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.Scanner;\n\nclass Main{\n\tpublic static void main(String[] args){\n\t\tScanner stdIn=new Scanner(System.in);\n\t\tint a[]=new int[100],n=stdIn.nextInt(),i,j,m,t,s=0;\n\t\tfor(i=0;i<n;i++)a[i]=stdIn.nextInt();\n\t\tfor(i=0;i<n;i++){\n\t\t\tm=i;\n\t\t\tfor(j=i;j<n;j++)if(a[m]>a[j])m=j;\n\t\t\tif(a[...
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner stdIn=new Scanner(System.in); int a[]=new int[100],n=stdIn.nextInt(),i,j,m,t,s=0; for(i=0;i<n;i++)a[i]=stdIn.nextInt(); for(i=0;i<n;i++){ m=i; for(j=i;j<n;j++)if(a[m]>a[j])m=j; if(a[i]!=a[m])s++; t=a[i]; a[i]=...
[ 7, 15, 13, 17, 6, 13, 41, 13, 17, 12, 13, 30, 14, 2, 2, 13, 17, 2, 18, 13, 13, 17, 30, 29, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 41, 13, 13, 11, 1, 41, 13, 13, 2, 13, 18, 13, 13, 1, 40, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 204, 5 ], [ 204, 6 ], [ 6, 7 ], [ 6, 8 ], [ 204, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 13, 14 ...
[ "import java.util.Scanner;\n\npublic class Main {\n static int cnt =0;\n public static void selectSort(int arr[]) {\n if (arr == null || arr.length < 2){\n return;\n }\n\n for (int i = 0; i < arr.length; i++){\n int minIdex = i;\n ...
import java.util.Scanner; public class Main { static int cnt =0; public static void selectSort(int arr[]) { if (arr == null || arr.length < 2){ return; } for (int i = 0; i < arr.length; i++){ int minIdex = i; for (int...
[ 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, 13, 13, 13, 4, 18, 18, 13, 13, 18, 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\n\t// private static int count = 0;\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint num = scan.nextInt();\n\t\tint[] sort_before = new int[num];\n\n\t\tfor (int i = 0; i < num; i++) {\n\t\t\tsort_before[i] = scan....
import java.util.Scanner; public class Main { // private static int count = 0; public static void main(String[] args) { Scanner scan = new Scanner(System.in); int num = scan.nextInt(); int[] sort_before = new int[num]; for (int i = 0; i < num; i++) { sort_before[i] = scan.nextInt(); } // selection...
[ 7, 15, 13, 17, 6, 13, 41, 13, 17, 12, 13, 30, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 13, 11, 1, 41, 13, 13, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 14, 2, 18, 13, 13, 18, 13, 13, 0, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 212, 5 ], [ 212, 6 ], [ 6, 7 ], [ 6, 8 ], [ 212, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 13, 14 ...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\t\t// define variables & initialize\n\tprivate static int cnt = 0;\t// how many bubbleSort is used\n\t\n\t// sort method :: sort given array using insertion Sort\n\tpublic static void sort(int[] _A, int _n) {\n\t\tfor (int i = 0; i <= _n - 1; ++i) {\n\t\t\tint p...
import java.util.Scanner; public class Main { // define variables & initialize private static int cnt = 0; // how many bubbleSort is used // sort method :: sort given array using insertion Sort public static void sort(int[] _A, int _n) { for (int i = 0; i <= _n - 1; ++i) { int p_min = i; for (int j = i...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 13, 11, 1, 41, 13, 13, 2, 13, 13, 1, 40, 13, 30, 14, 2, 18, 13, 13, 18, 13, 13, 0, 13, 13, 41, 13, 18, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 167, 5 ], [ 167, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n static int selectionSort(int[] a, int n) {\n int sw = 0;\n for (int i = 0; i < n; i++) {\n int minj = i;\n for (int j = i; j < n; j++) \n if (a[j] < a[minj]) \n minj = j;\n int t = a[i];\n a[i] = a[minj];\n a[minj] =...
import java.util.Scanner; public class Main { static int selectionSort(int[] a, int n) { int sw = 0; for (int i = 0; i < n; i++) { int minj = i; for (int j = i; j < n; j++) if (a[j] < a[minj]) minj = j; int t = a[i]; a[i] = a[minj]; a[minj] = t; if (min...
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 41, 13, 20, 17, 41, 13, 12, 13, 30, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 4, 9 ], [ 9, 10 ], [ 9, 11 ], [ 4, 13 ], [ 13, 14 ], [ 4, 15 ], [ ...
[ "import java.util.*;\nclass Main{\n\tScanner sc=new Scanner(System.in);\n\tint[] su=new int[100];\n\tint sum;\n\tvoid go(){\n\t\tint n=sc.nextInt();\n\t\tfor(int i=0; i<n; i++)su[i]=sc.nextInt();\n\t\tfor(int i=0; i<n-1; i++){\n\t\t\tint min=100;\n\t\t\tint mindex=0;\n\t\t\tfor(int j=i+1; j<n; j++){\n\t\t\t\tif(min...
import java.util.*; class Main{ Scanner sc=new Scanner(System.in); int[] su=new int[100]; int sum; void go(){ int n=sc.nextInt(); for(int i=0; i<n; i++)su[i]=sc.nextInt(); for(int i=0; i<n-1; i++){ int min=100; int mindex=0; for(int j=i+1; j<n; j++){ if(min>su[j]){ min=su[j]; mindex=j; ...
[ 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, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 177, 5 ], [ 177, 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 scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int[] A = new int[N];\n for (int i = 0; i < N; i++) {\n A[i] = scanner.nextInt();\n }\n int ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int N = scanner.nextInt(); int[] A = new int[N]; for (int i = 0; i < N; i++) { A[i] = scanner.nextInt(); } int cnt = sort(A); ...
[ 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, 30, 0, 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 ], [ 13, 14 ], ...
[ "import java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Arrays;\nimport java.util.InputMismatchException;\nimport java.util.LinkedList;\nimport java.util.PriorityQueue;\n\n \npublic class Main {\n public static void main(String[] args) {\n InputReader sc = new In...
import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.InputMismatchException; import java.util.LinkedList; import java.util.PriorityQueue; public class Main { public static void main(String[] args) { InputReader sc = new InputReader(System...
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 11, 1, 0, 13, 17, 2, 13, 2, 18, 13, 13, 17, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 2, 18, 13, 13, 17, 4, 18, 18, 13, 13, 18, 13, 13, 4, 18, 18, 13, 13, 23,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 225, 5 ], [ 225, 6 ], [ 6, 7 ], [ 6, 8 ], [ 225, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 11, 14 ...
[ "import java.util.Scanner;\n\npublic class Main {\n\n static Scanner sc = new Scanner(System.in);\n\n static void checkArray(int[] a){\n int i ;\n for( i = 0; i < a.length -1; i++){\n System.out.print(a[i] +\" \");\n }\n System.out.print(a[i]);\n System.out.pr...
import java.util.Scanner; public class Main { static Scanner sc = new Scanner(System.in); static void checkArray(int[] a){ int i ; for( i = 0; i < a.length -1; i++){ System.out.print(a[i] +" "); } System.out.print(a[i]); System.out.println(); } ...
[ 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, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 163, 5 ], [ 163, 6 ], [ 6, 7 ], [ 6, 8 ], [ 163, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ...
[ "import java.util.*;\n\npublic class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\tint n = sc.nextInt();\n\t\tint[] ints = new int[n];\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tints[i] = sc.nextInt();\n\t\t}\n\n\t\tint count = 0;\n\t\tfor (int i=0; i<n; i++) {\n\...
import java.util.*; public class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int n = sc.nextInt(); int[] ints = new int[n]; for (int i=0; i<n; i++) { ints[i] = sc.nextInt(); } int count = 0; for (int i=0; i<n; i++) { int minj = i; boolean flag = f...
[ 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, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 153, 5 ], [ 153, 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 public static void main(String[] args)\n {\n\tScanner In = new Scanner(System.in);\n\n\tint n = In.nextInt();\n\n\tint []a = new int[n];\n\n\tfor(int i = 0; i < n; i++)\n\t a[i] = In.nextInt();\n\n\n\tint count = 0;\n\n\tfor(int i = 0; i < n - 1; i++)\n...
import java.util.Scanner; public class Main { public static void main(String[] args) { 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 count = 0; for(int i = 0; i < n - 1; i++) { int minj = i; for(i...
[ 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, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 161, 5 ], [ 161, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int a[] = new int[n];\n for (int i = 0; i < a.length; i++) {\n a[i] = sc.nextInt();\n }\n int sum = 0;...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int a[] = new int[n]; for (int i = 0; i < a.length; i++) { a[i] = sc.nextInt(); } int sum = 0; for (i...
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 13, 13, 4, 13, 13, 4, 18, 13, 23, 13, 12, 13, 30, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 18, 13, 13, 17, 1, 40, 13, 30, 30, 41, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 192, 5 ], [ 192, 6 ], [ 6, 7 ], [ 6, 8 ], [ 192, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\tint n = sc.nextInt();\n\t\tint[] A = inpNum(n);\n\n\t\tselectionSort(A);\n\t\tsc.close();\n\n\t}\n\n\tprivate static void selectionSort(int[] A) {\n\t\tint cnt = 0;\n\n...
import java.util.Scanner; public class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int n = sc.nextInt(); int[] A = inpNum(n); selectionSort(A); sc.close(); } private static void selectionSort(int[] A) { int cnt = 0; for (int i = 0; i < A.length - 1; ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 17, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 11, 1, 0,...
[ [ 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\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint A[] = new int[N];\n\t\tint i, j, min, w, cnt=0;\n\t\tfor(i=0; i<N; i++){\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tfor(i=0; i<N-1; i++){\n\t\t\tmin = i;\n\...
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int A[] = new int[N]; int i, j, min, w, cnt=0; for(i=0; i<N; i++){ A[i] = sc.nextInt(); } for(i=0; i<N-1; i++){ min = i; for(j=i+1; j<N; j++){ if(A[min]>A...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 41, 13, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 11, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 187, 5 ], [ 187, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint array[] = new int[N];\n\t\tint minj, tmp, pointer = 0, count = 0;\n\n\t\tfor(int i = 0; i < array.length; i ++){\...
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int array[] = new int[N]; int minj, tmp, pointer = 0, count = 0; for(int i = 0; i < array.length; i ++){ array[i] = sc.nextInt(); ...
[ 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, 30, 0, 18, 13, 13, 4, 18, 13, 18, 13, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 177, 5 ], [ 177, 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\n Scanner sc = new Scanner(System.in);\n int num = Integer.parseInt(sc.nextLine());\n\n String[] a = sc.nextLine().split(\" \");\n int[] array = new int[num];\n for (int i = 0; i < ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num = Integer.parseInt(sc.nextLine()); String[] a = sc.nextLine().split(" "); int[] array = new int[num]; for (int i = 0; i < num; i++) { ...
[ 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.io.BufferedReader;\nimport java.io.InputStreamReader;\n\nclass Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint count = Integer.parseInt(br.readLine());\n\n\t\tString[] str = br.readLine().split(\...
import java.io.BufferedReader; import java.io.InputStreamReader; class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int count = Integer.parseInt(br.readLine()); String[] str = br.readLine().split(" "); int[] numList...
[ 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, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13,...
[ [ 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[]argc){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int[] A = new int[N];\n for(int i=0;i<N;i++){\n A[i] = sc.nextInt();\n }\n int count=0;\n for(int ...
import java.util.Scanner; public class Main{ public static void main(String[]argc){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int[] A = new int[N]; for(int i=0;i<N;i++){ A[i] = sc.nextInt(); } int count=0; for(int j=0;j<N;j++){ ...
[ 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, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 18,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 142, 8 ], [ 142, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n String[] array = br...
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); String[] array = br.readLine().s...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 20, 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, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 18, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 167, 5 ], [ 167, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 8, 11 ], [ 11, 12 ], [ 11, 13 ], [ 8, 14 ],...
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n int total;\n\n Scanner inp = new Scanner(System.in);\n total = inp.nextInt();\n\n int[] a = new int[total];\n\n for (int k = 0; k < total; k++) {\n a[k] = inp.nextInt();\n ...
import java.util.*; public class Main { public static void main(String[] args) { int total; Scanner inp = new Scanner(System.in); total = inp.nextInt(); int[] a = new int[total]; for (int k = 0; k < total; k++) { a[k] = inp.nextInt(); } int sw...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 13, 11, 1, 41, 13, 13, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 18, 13, 13, 18, 13, 13, 30, 0, 13, 13, 14, 2,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 172, 5 ], [ 172, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main\n{\n\tstatic int selectionSort(int A[], int n)\n\t{\n\t\tint ret = 0;\n\t\tfor (int i = 0; i < n; i++)\n\t\t{\n\t\t\tint minj = i;\n\t\t\tfor (int j = i; j < n; j++)\n\t\t\t{\n\t\t\t\tif(A[j] < A[minj])\n\t\t\t\t{\n\t\t\t\t\tminj = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(min...
import java.util.Scanner; public class Main { static int selectionSort(int A[], int n) { int ret = 0; for (int i = 0; i < n; i++) { int minj = i; for (int j = i; j < n; j++) { if(A[j] < A[minj]) { minj = j; } } if(minj != i) { int temp = A[i]; A[i] = A[minj]; A[mi...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 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, 17, 11, 1, 41, 13, 17, 2,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 180, 5 ], [ 180, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ],...
[ "import java.util.Scanner;\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\twhile(scan.hasNext()){\n\t\t\tint n = scan.nextInt();\n\t\t\tint[] sSort = new int[n];\n\t\t\tfor(int i = 0;i < n;i++){\n\t\t\t\tsSort[i] = scan.nextInt();\n\t\t\t}\n\t\t\tint c...
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); while(scan.hasNext()){ int n = scan.nextInt(); int[] sSort = new int[n]; for(int i = 0;i < n;i++){ sSort[i] = scan.nextInt(); } int count = 0; for(int i = 0;i < n;i++){ ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 4, 18, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 17, 1...
[ [ 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 ], [ 13, 14 ],...
[ "import java.util.*;\n\npublic class Main {\n \n public static void main(String[] args) {\n Main main = new Main();\n main.solv();\n }\n \n private void solv() {\n Scanner input = new Scanner(System.in);\n int n = input.nextInt();\n int[] xs = new int[n];\n f...
import java.util.*; public class Main { public static void main(String[] args) { Main main = new Main(); main.solv(); } private void solv() { Scanner input = new Scanner(System.in); int n = input.nextInt(); int[] xs = new int[n]; for (int i = 0; i <...
[ 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, 4, 13, 13, 13, 4, 18, 13, 23, 13, 12, 13, 30, 41, 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.Scanner;\n\nclass Main {\n\tpublic static void main(String args[]) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint num = scanner.nextInt();//要素数\n\t\tint array[] = new int[num];\n\t\t\n\t\tfor(int i = 0; i < num; i ++ ){\n\t\t\tarray[i] = scanner.nextInt();\n\t\t}\n\t\t\n\t\tselectionSo...
import java.util.Scanner; class Main { public static void main(String args[]) { Scanner scanner = new Scanner(System.in); int num = scanner.nextInt();//要素数 int array[] = new int[num]; for(int i = 0; i < num; i ++ ){ array[i] = scanner.nextInt(); } selectionSort(array, num); scanner.close();...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 42, 2, 13, 18, 13, 13, 30, 4, 18, 18, 13, 13, 18, 13, 13, 14, 2, 13, 2, 18, 13, 13, 17, 30, 4, 18, 18, 13, 13, 17, 30, 4, 18, 18, 13, 13, 17, 40, 13, 23, 13, 12, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 188, 5 ], [ 188, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ],...
[ "import java.util.Scanner;\n\n//implement the selection sort\npublic class Main {\n\t//helper functions\n\tpublic static void print_arr(int[] arr) {\n\t\tint i = 0;\n\t\twhile(i < arr.length) {\n\t\t\tSystem.out.print(arr[i]);\n\t\t\tif(i < arr.length - 1) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}else {\n\t\t\t\...
import java.util.Scanner; //implement the selection sort public class Main { //helper functions public static void print_arr(int[] arr) { int i = 0; while(i < arr.length) { System.out.print(arr[i]); if(i < arr.length - 1) { System.out.print(" "); }else { System.out.print("\n"); } i++; } ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 41, 13, 17, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 163, 5 ], [ 163, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.*;\n\n/**\n * B\n */\npublic class Main {\n public static void main(String[] args) {\n \n Scanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n int min_j, count=0;\n int array[] = new int[n];\n\n for (int i = 0; i < n; i++) {\n array[i] = sc.next...
import java.util.*; /** * B */ public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int min_j, count=0; int array[] = new int[n]; for (int i = 0; i < n; i++) { array[i] = sc.nextInt(); } sc...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 13, 11, 1, 41, 13, 13, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 18, 13, 13, 18, 13, 13, 30, 0, 13, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 175, 5 ], [ 175, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\n static int selectionSort(int A[],int N){\n int count = 0;\n for (int i = 0; i<N-1;i++){\n int minj = i;\n for (int j = i;j<N;j++){\n if (A[j]<A[minj])\n {\n minj = j;\n ...
import java.util.Scanner; public class Main { static int selectionSort(int A[],int N){ int count = 0; for (int i = 0; i<N-1;i++){ int minj = i; for (int j = i;j<N;j++){ if (A[j]<A[minj]) { minj = j; } ...
[ 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, 2, 13, 17, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 161, 5 ], [ 161, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int a[] = new int[N];\n for(int i=0;i<=N-1;i++){\n a[i] = sc.nextInt();\n }\n int count = 0;\n fo...
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int a[] = new int[N]; for(int i=0;i<=N-1;i++){ a[i] = sc.nextInt(); } int count = 0; for(int i=0;i<N-1;...
[ 7, 15, 13, 17, 6, 13, 41, 13, 17, 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, 4, 13, 13, 11, 1, 41, 13, 17, 2, 13, 18,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 182, 5 ], [ 182, 6 ], [ 6, 7 ], [ 6, 8 ], [ 182, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ...
[ "import java.util.*;\npublic class Main {\n\tstatic int count = 0;\n\tpublic static void main(String args[]){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n =sc.nextInt();\n\t\tint[] nums =new int[n];\n\t\tfor(int i=0;i<n;i++){\n\t\t\tnums[i] = sc.nextInt();\n\t\t}\n\t\tselectionSort(nums);\n\t\tfor(int i=0;...
import java.util.*; public class Main { static int count = 0; public static void main(String args[]){ Scanner sc = new Scanner(System.in); int n =sc.nextInt(); int[] nums =new int[n]; for(int i=0;i<n;i++){ nums[i] = sc.nextInt(); } selectionSort(nums); for(int i=0;i<nums.length;i++){ if(i>0)Syste...
[ 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, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 166, 5 ], [ 166, 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\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] nums = new int[n];\n\t\tfor(int arrayIndex = 0; arrayIndex < n; arrayIndex++) {\n\t\t\tnums[arrayIndex] = sc.nextInt();\n\t\t}\n\t\tint swap...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] nums = new int[n]; for(int arrayIndex = 0; arrayIndex < n; arrayIndex++) { nums[arrayIndex] = sc.nextInt(); } int swapCount = 0; for(int index = 0; ...
[ 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, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 182, 5 ], [ 182, 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 int N = sc.nextInt();\n int[] A = new int[N];\n for(int i = 0; i < N; i++){\n A[i] = sc.nextInt();\n }\n int count = SelectionS...
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int[] A = new int[N]; for(int i = 0; i < N; i++){ A[i] = sc.nextInt(); } int count = SelectionSort(A, N); ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 18, 13, 13, 41, 13, 17, 41, 13, 41, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 0, 13, 13, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 181, 5 ], [ 181, 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\n\tpublic static void SelectionSort(int[] array){\n\t\tint len=array.length;\n\t\tint cnt=0;\n\t\tint min;\n\t\tint swap;\n\t\tfor(int i=0;i<len-1;i++){\n\t\t\tmin=i;\n\t\t\tfor(int j=i+1;j<len;j++){\n\t\t\tif(array[min]>array[j])min=j;\n\t\t\t}\n\t\t\tif(min!=i)...
import java.util.Scanner; public class Main{ public static void SelectionSort(int[] array){ int len=array.length; int cnt=0; int min; int swap; for(int i=0;i<len-1;i++){ min=i; for(int j=i+1;j<len;j++){ if(array[min]>array[j])min=j; } if(min!=i){ cnt++; swap=array[i];array[i]=array[...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 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, 13, 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 ], [ 178, 14 ], ...
[ "import java.util.*;\nimport java.math.*;\nimport java.awt.geom.*;\nimport java.io.*;\n \n \npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\ta[i] = sc.next...
import java.util.*; import java.math.*; import java.awt.geom.*; import java.io.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] a = new int[n]; for(int i = 0; i < n; i++) { a[i] = sc.nextInt(); } int ans = selecti...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 13, 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, 18, 13, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 375, 8 ], [ 375, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n BufferedReader r = new BufferedReader(new InputStreamReader(System.in));\n int N = readInt(r);\n String[] numStrings = r.readLine().split(\"...
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { BufferedReader r = new BufferedReader(new InputStreamReader(System.in)); int N = readInt(r); String[] numStrings = r.readLine().split(" "); ...
[ 7, 6, 13, 12, 13, 30, 41, 13, 20, 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, 4, 18, 13, 0, 13, 17, ...
[ [ 0, 1 ], [ 186, 2 ], [ 186, 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;\n int[] a;\n int i, j, count, tmp, min;\n\n n = sc.nextInt();\n a = new int[n];\n for(i = 0;i < n;i++){\n a[i] = sc.nextInt();\n...
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; int[] a; int i, j, count, tmp, min; n = sc.nextInt(); a = new int[n]; for(i = 0;i < n;i++){ a[i] = sc.nextInt(); } count ...
[ 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, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13,...
[ [ 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\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint N = sc.nextInt();\n\t\tint[] A = new int[N];\n\t\tfor (int i=0; i<N; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\n\t\tint count = 0;\n\t\tfor (int i=0; i<N; i++) {\n\t...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int[] A = new int[N]; for (int i=0; i<N; i++) { A[i] = sc.nextInt(); } int count = 0; for (int i=0; i<N; i++) { int minj = i; for (int j=i; j<N; j...
[ 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, 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, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 178, 11 ], [ 178, 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\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tin...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main (String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); int[] a = new int[n]; ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 17, 12, 13, 30, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 13, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 18, 13, 13, 18...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 155, 8 ], [ 155, 9 ], [ 9, 10 ], [ 9, 11 ], [ 155, 12 ], [ 12, 13 ], [ 12, 14 ...
[ "import java.util.*;\nimport java.io.*;\npublic class Main {\n\tstatic int n = 0;\n\t\n\tpublic static void selection_sort(int[] a) {\n\t\t\n\t\t// init swap count\n\t\tint swapCount = 0;\n\t\t\n\t\t// start from left to right\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\n\t\t\t// find the ith minimum element\n\t\t\t...
import java.util.*; import java.io.*; public class Main { static int n = 0; public static void selection_sort(int[] a) { // init swap count int swapCount = 0; // start from left to right for (int i = 0; i < n; i++) { // find the ith minimum element // assume that a[i] is the minimum val...
[ 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, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13,...
[ [ 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\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in); \n\n\t\tint n = sc.nextInt();\n\t\tint[] data = new int[n];\n \tfor (int i = 0; i < n; i++) {\n \t\tdata[i] = sc.nextInt();\n \t}\n\n \tint count = 0;\n \tfor (int...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] data = new int[n]; for (int i = 0; i < n; i++) { data[i] = sc.nextInt(); } int count = 0; for (int i = 0; i < n; i++) { int ...
[ 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, 13, 13, 11, 1, 41, 13, 17, 2, 13, 2, 18, 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 ], [...
[ "\n\nimport java.util.Scanner;\n\nclass Main {\n\tpublic static void main(String[] args){\n\t\tScanner input=new Scanner(System.in);\n\t\tint sortLong=input.nextInt();\n\t\t\n\t\tint[] sortNumber=new int[sortLong];\n\t\t\n\t\tfor(int i=0;i<sortLong;i++)\n\t\t\tsortNumber[i]=input.nextInt();\n\t\t\n\t\tint number=so...
import java.util.Scanner; class Main { public static void main(String[] args){ Scanner input=new Scanner(System.in); int sortLong=input.nextInt(); int[] sortNumber=new int[sortLong]; for(int i=0;i<sortLong;i++) sortNumber[i]=input.nextInt(); int number=sort(sortNumber); for(int i=0;i<sortNum...
[ 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, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 178, 11 ], [ 178, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.*;\n\npublic class Main {\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\tString[] str =...
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.*; 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[] str = (br.readLine()).spl...
[ 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, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 156, 5 ], [ 156, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.*;\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int A[] = new int[N];\n for(int i=0;i<N;i++){\n A[i] = sc.nextInt();\n }\n int ans=0;\n for(int i=0;i<N;i++){\n int minj = i;\n for...
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int A[] = new int[N]; for(int i=0;i<N;i++){ A[i] = sc.nextInt(); } int ans=0; for(int i=0;i<N;i++){ int minj = i; for(int j=i;j<N;j++)...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 41, 13, 20, 4, 18, 13, 4, 18, 13, 4, 18, 13, 4, 18, 18, 13, 13, 2, 17, 18, 13, 13, 23, 13, 12, 13, 30, 41, 13, 20, 0, 13, 4, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 330, 11 ], [ 330, 12 ], [ 12, 13 ], [ 330, 14 ]...
[ "import java.io.*;\nimport java.util.List;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\n int[] arr;\n\n int size;\n\n int swaps;\n\n public static void main(String[] args)\n {\n\n Main g = new Main();\n\n g.readArray();\n\n g.selectionSort();\n\n g.printArr...
import java.io.*; import java.util.List; import java.util.StringTokenizer; public class Main { int[] arr; int size; int swaps; public static void main(String[] args) { Main g = new Main(); g.readArray(); g.selectionSort(); g.printArray(); System.out....
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 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, 17, 11, 1, 41, 13, 17, 2...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 171, 5 ], [ 171, 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 StringBuilder build = new StringBuilder();\n int z = sc.nextInt();\n int[] ary = new int[z];\n for(int i = 0 ; i < ary.length; i++){\n a...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc =new Scanner(System.in); StringBuilder build = new StringBuilder(); int z = sc.nextInt(); int[] ary = new int[z]; for(int i = 0 ; i < ary.length; i++){ ary[i] = sc.ne...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30,...
[ [ 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 ],...
[ "import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int N=sc.nextInt();\n int array[]=new int[N];\n int count=0;\n for(int i=0;i<N;i++) array[i]=sc.nextInt();\n for(int i=0;i<N;i++){\n int minj=i;\n for(int ...
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N=sc.nextInt(); int array[]=new int[N]; int count=0; for(int i=0;i<N;i++) array[i]=sc.nextInt(); for(int i=0;i<N;i++){ int minj=i; for(int j=i;j<N;j++){ ...
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 4, 13, 23, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 0, 13, 4, 18, 13, 41, 13, 20, 13, 0, 13, 17, 0, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 179, 5 ], [ 179, 6 ], [ 6, 7 ], [ 6, 8 ], [ 179, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 9, 14 ...
[ "import java.util.Scanner;\n\npublic class Main {\n\tstatic Scanner scan = new Scanner (System.in);\n\tpublic static void main(String args[]){\n\t\trun();\n\t}\n\tstatic void run(){\n\t\tint n, minJ, tmp, count;\n\t\tboolean judge;\n\t\t\n\t\tn = scan.nextInt();\n\t\t\n\t\tint[] a = new int[n];\n\t\t\n\t\tcount = 0...
import java.util.Scanner; public class Main { static Scanner scan = new Scanner (System.in); public static void main(String args[]){ run(); } static void run(){ int n, minJ, tmp, count; boolean judge; n = scan.nextInt(); int[] a = new int[n]; count = 0; judge = false; for(int i = 0; ...
[ 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, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 171, 5 ], [ 171, 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 a = new Scanner(System.in);\n int n = a.nextInt();\n int A[] = new int[n];\n for(int i=0; i<n; i++){\n A[i] = a.nextInt();\n }\n int minj;\n int count = 0;\n ...
import java.util.*; public class Main{ public static void main(String[] args){ Scanner a = new Scanner(System.in); int n = a.nextInt(); int A[] = new int[n]; for(int i=0; i<n; i++){ A[i] = a.nextInt(); } int minj; int count = 0; for(int i=...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 41, 13, 13, 11, 1, 41, 13, 13, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 2, 18, 13, 13, 18, 13, 13, 0, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 179, 5 ], [ 179, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void selection_sort(int[] a) {\n\t\tint num_swaps = 0;\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\tint mini = i;\n\t\t\tfor (int j = i; j < a.length; j++) {\n\t\t\t\tif (a[j] < a[mini])\n\t\t\t\t\tmini = j;\n\t\t\t}\n\t\t\t// swap\n\t\t\tint ...
import java.util.Scanner; public class Main { public static void selection_sort(int[] a) { int num_swaps = 0; for (int i = 0; i < a.length; i++) { int mini = i; for (int j = i; j < a.length; j++) { if (a[j] < a[mini]) mini = j; } // swap int tmp = a[i]; a[i] = a[mini]; a[mini] = tmp...