node_ids listlengths 4 1.4k | edge_index listlengths 1 2.22k | text listlengths 4 1.4k | source stringlengths 14 427k |
|---|---|---|---|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
0,
13,
20,
41,
13,
20,
4,
18,
13,
4,
18,
13,
23,
13,
6,
13,
12,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\nimport java.util.Scanner;\nimport java.util.StringTokenizer;\nimport java.math.BigDecimal;\n\npublic class Main {\n static InputReader in;\n static PrintWriter... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.math.BigDecimal;
public class Main {
static InputReader in;
static PrintWriter out;
static ... |
[
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
],
[
214,
5
],
[
214,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"\nimport java.util.Scanner;\n\n/**\n * ZAKIREN第5章\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 = scan.... |
[
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,
4,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
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
],
[
12,
14
],... | [
"import java.util.Scanner;\npublic class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int[] a = new int[x];\n for(int i = 0; i < a.length; i++){\n a[i] = sc.nextInt();\n }\n build(a);\n ... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int[] a = new int[x];
for(int i = 0; i < a.length; i++){
a[i] = sc.nextInt();
}
build(a);
for(int i =... |
[
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,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
210,
8
],
[
210,
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,
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,
11,
1,
41,
13,
17,
2,
13,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
141,
11
],
[
141,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.io.File;\nimport java.io.InputStreamReader;\nimport java.util.*;\n\npublic class Main {\n public static void main(String[] args){\n // write your code here\n Scanner scan = new Scanner(System.in);\n int index = scan.nextInt();\n int[] arr = new int[index];\n ... | import java.io.File;
import java.io.InputStreamReader;
import java.util.*;
public class Main {
public static void main(String[] args){
// write your code here
Scanner scan = new Scanner(System.in);
int index = scan.nextInt();
int[] arr = new int[index];
for(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,
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,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
157,
8
],
[
157,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
]... | [
"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,
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
],
[
136,
5
],
[
136,
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\tScanner in = new Scanner(System.in);\n\tStringBuilder sb = new StringBuilder();\n\tint n = in.nextInt();\n\tInteger[] a = new Integer[n];\n\tfor (int i = 0; i < n; i++) {\n\t a[i] = in.nextInt();\n\t}\n\tfor (int i... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
StringBuilder sb = new StringBuilder();
int n = in.nextInt();
Integer[] a = new Integer[n];
for (int i = 0; i < n; i++) {
a[i] = in.nextInt();
}
for (int i = 0; i < n; i++) {
... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
18,
13,
13,
11,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
194,
5
],
[
194,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.Scanner;\n\npublic class Main{\n\tpublic static void main(String [] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint length = Integer.parseInt(scan.nextLine());\n\t\tString[] numStrings = scan.nextLine().split(\" \");\n\t\tint[] nums = new int[length];\n\t\tfor(int i = 0; i < length; i... | import java.util.Scanner;
public class Main{
public static void main(String [] args) {
Scanner scan = new Scanner(System.in);
int length = Integer.parseInt(scan.nextLine());
String[] numStrings = scan.nextLine().split(" ");
int[] nums = new int[length];
for(int i = 0; i < length; i++)
nums[i] = Integer.p... |
[
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,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
149,
5
],
[
149,
6
],
[
6,
7
],
[
6,
8
],
[
149,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
... | [
"import java.util.Scanner;\n\npublic class Main{\n\tstatic Scanner in = new Scanner(System.in);\n public static void main(String[] args) {\n \t\n \tint a = in.nextInt();\n \tint[] ints = new int[a];\n \t\n \tfor (int i=0; i<a; i++) {\n ints[i] = in.nextInt();\n }\n \tint MyArr... | import java.util.Scanner;
public class Main{
static Scanner in = new Scanner(System.in);
public static void main(String[] args) {
int a = in.nextInt();
int[] ints = new int[a];
for (int i=0; i<a; i++) {
ints[i] = in.nextInt();
}
int MyArray;
for (int i=0; i... |
[
7,
6,
13,
12,
13,
30,
41,
13,
20,
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,
11,
1,
0,
13,
17,
... | [
[
0,
1
],
[
181,
2
],
[
181,
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, k, tmp;\n\n n = sc.nextInt();\n a = new int[n];\n\n for(i = 0;i < n;i++){\n a[i] = sc.nextInt();\n }\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, k, tmp;
n = sc.nextInt();
a = new int[n];
for(i = 0;i < n;i++){
a[i] = sc.nextInt();
}
for(i = 0;i < ... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
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,
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,
4,
13,
13,
4,
13,
13,
23,
13,
12,
13,
30,
11,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
243,
5
],
[
243,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
8,
11
],
[
11,
12
],
[
11,
13
],
[
8,
14
],... | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tint n;\n\t\tScanner sc = new Scanner(System.in);\n\t\tn = 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\tprint(a);\n\t\tinsertionSort2(a);\n\n... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int n;
Scanner sc = new Scanner(System.in);
n = sc.nextInt();
int[] a = new int[n];
for (int i = 0; i < n; i++) {
a[i] = sc.nextInt();
}
print(a);
insertionSort2(a);
}
static void print(int[] a) {
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,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
13,
13,
40,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
147,
5
],
[
147,
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{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] ar = new int[n];\n\t\tfor(int i=0 ; i<n ; i++ )\n\t\t{\n\t\t\tar[i] = sc.nextInt();\n\t\t}\n\t\tprintAr(ar,-1);\n\t\tfor(int j = 1; j < n ;j... | import java.util.Scanner;
public class Main{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] ar = new int[n];
for(int i=0 ; i<n ; i++ )
{
ar[i] = sc.nextInt();
}
printAr(ar,-1);
for(int j = 1; j < n ;j++)
{
int tar = ar[j];
int k = ... |
[
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,
18,
13,
4,
13,
13,
13,
23,
13,
12,
13,
30,
4,
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\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 j = 0; j < n; j++){\n\t\t\ta[j] = scan.nextInt();\n\t\t}\n\t\tscan.close();\n\t\tInsertionSort(a, n);\n\t}\n\... | 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 j = 0; j < n; j++){
a[j] = scan.nextInt();
}
scan.close();
InsertionSort(a, n);
}
static void InsertionSort(int A[], i... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
17,
41,
13,
17,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
0,
18,
13,
13,
13,
40,
13,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
18,
13,
17,
17,
41,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
207,
5
],
[
207,
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\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n String[] str = new String[2];\n int count = 0;\n while(in.hasNext()) {\n String buf = in.nextLine();\n str[count] = buf;\n count... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String[] str = new String[2];
int count = 0;
while(in.hasNext()) {
String buf = in.nextLine();
str[count] = buf;
count++;
}
... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
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,
13,
4,... | [
[
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.io.*;\npublic class Main {\n public static void main(String[] args) throws IOException{\n BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));\n StringBuilder stb=new StringBuilder();\n int a=Integer.parseInt(buf.readLine());\n int[] h=new int[a];\n ... | import java.io.*;
public class Main {
public static void main(String[] args) throws IOException{
BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));
StringBuilder stb=new StringBuilder();
int a=Integer.parseInt(buf.readLine());
int[] h=new int[a];
String[... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
20,
0,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
11,
1,
0,
13,
17,
2,
13,
18,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
... | [
"import java.util.*;\nimport java.io.*;\nimport static java.util.Arrays.*;\nimport static java.util.Collections.*;\nimport static java.lang.Math.*;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n int n,i,j,v;\n Scanner s... | import java.util.*;
import java.io.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static java.lang.Math.*;
public class Main {
public static void main(String[] args) {
// TODO ?????????????????????????????????????????????
int n,i,j,v;
Scanner scan=new Scanner(Sys... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
4,
18,
13,
41,
13,
20,
41,
13,
17,
42,
4,
18,
13,
30,
0,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
211,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n \n \npublic class Main {\n \n static int len;\n static int[] arr;\n \n /**\n * @param args\n * @throws IOException \n */\n public static void main(String[]... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
static int len;
static int[] arr;
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOExce... |
[
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,
4,
13,
13,
4,
13,
13,
13,
23,
13,
12,
13,
30... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
137,
8
],
[
137,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
]... | [
"import java.util.Arrays;\nimport java.util.Scanner;\n\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n int[] nums = new int[n];\n for (int i = 0; i < n; i++) nums[i] = sc.nextInt();\n\n trace... | import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] nums = new int[n];
for (int i = 0; i < n; i++) nums[i] = sc.nextInt();
trace(nums);
in... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
4,
13,
13,
23,
13,
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,
11,
1,
41,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
167,
5
],
[
167,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
... | [
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n try (Scanner in = new Scanner(System.in)) {\n solve(in);\n }\n }\n\n private static void solve(Scanner in) {\n final int N = in.nextInt();\n final int[] A = new int[N];\n ... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner in = new Scanner(System.in)) {
solve(in);
}
}
private static void solve(Scanner in) {
final int N = in.nextInt();
final int[] A = new int[N];
for (int i ... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
14,
2,
13,
2,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
23,
13,
12... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
158,
5
],
[
158,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
9,
14
]... | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tstatic void printArray(int[] a) {\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\tSystem.out.print(a[i]);\n\n\t\t\tif (i != a.length - 1) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t}\n\n\tpublic static void main(String[] ... | import java.util.Scanner;
public class Main {
static void printArray(int[] a) {
for (int i = 0; i < a.length; i++) {
System.out.print(a[i]);
if (i != a.length - 1) {
System.out.print(" ");
}
}
System.out.println();
}
public static void main(String[] args) {
Scanner scan = new Scanner(System.... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
20,
2,
13,
17,
41,
13,
20,
0,
13,
4,
18,
13,
4,
18,
13,
11,
1,
0,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
... | [
"import java.util.*;\nimport java.io.*;\nimport static java.util.Arrays.*;\nimport static java.util.Collections.*;\nimport static java.lang.Math.*;\n\n\npublic class Main{\n\n\tpublic static void main(String args[]){\n\t\tint n=100;\n\t\tint i,j,k,v,l;\n\t\tint a[]=new int[n+1];\n\t\t Scanner sc = new Scanner(Syste... | import java.util.*;
import java.io.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static java.lang.Math.*;
public class Main{
public static void main(String args[]){
int n=100;
int i,j,k,v,l;
int a[]=new int[n+1];
Scanner sc = new Scanner(System.in);
k=Integer.parseInt... |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
4,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
144,
5
],
[
144,
6
],
[
6,
7
],
[
6,
8
],
[
144,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
... | [
"import java.util.Scanner;\n\npublic class Main {\n private static Scanner sc=new Scanner(System.in);\n public static void main(String[] args){\n int n=sc.nextInt();\n int[] a=new int[n];\n for(int i=0;i<n;i++) a[i]=sc.nextInt();\n print(a);\n for(int i=1;i<n;i++){\n ... | import java.util.Scanner;
public class Main {
private static Scanner sc=new Scanner(System.in);
public static void main(String[] args){
int n=sc.nextInt();
int[] a=new int[n];
for(int i=0;i<n;i++) a[i]=sc.nextInt();
print(a);
for(int i=1;i<n;i++){
int t=a[i];... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
... | [
[
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.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int A[] = new int[100];\n\n for(int i=0;i<n;i++){\n A[i] = scan.nextInt();\n }\n\n for(int i=1;i<n;i... | 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[100];
for(int i=0;i<n;i++){
A[i] = scan.nextInt();
}
for(int i=1;i<n;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,
23,
13,
12,
13,
30,
41,
13,
41,
13,
11,
1... | [
[
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
],
[
12,
14
],... | [
"import java.util.Scanner;\n\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[] num = new int[n];\n\t\tfor(int i=0;i<n;i++){\n\t\t\tnum[i] = sc.nextInt();\n\t\t}\n\t\tSort(num);\n\n\t}\n\tstatic void Sort(int[] num){\n\t\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[] num = new int[n];
for(int i=0;i<n;i++){
num[i] = sc.nextInt();
}
Sort(num);
}
static void Sort(int[] num){
int v,j;
for(int i=0;i<num.length;i++)... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
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,
13,
4,
18,
13,
0,
18,
13,
13,
13,
11,
1,
0,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
185,
5
],
[
185,
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 \t\n \tScanner sc = new Scanner(System.in);\n int i, j, k, l;\n int N = sc.nextInt();\n int A[] = new int[N];\n \n for(i = 0; i < N; i++){\n j = sc.nextInt();\n ... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int i, j, k, l;
int N = sc.nextInt();
int A[] = new int[N];
for(i = 0; i < N; i++){
j = sc.nextInt();
A[i] =j;
... |
[
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,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
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.IOException;\nimport java.util.Scanner;\nclass Main{\n\tpublic static void main(String[] args)throws NumberFormatException, IOException{\n//\t\tSystem.out.println(\" \");\n\t\tScanner scan = new Scanner(System.in);\n\t\tint nagasa = scan.nextInt();\n\t\tint[] num = new int[nagasa];\n\t\tfor(int i=0;... | import java.io.IOException;
import java.util.Scanner;
class Main{
public static void main(String[] args)throws NumberFormatException, IOException{
// System.out.println(" ");
Scanner scan = new Scanner(System.in);
int nagasa = scan.nextInt();
int[] num = new int[nagasa];
for(int i=0;i<nagasa;i++){
num[i] =... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
2,
13,
17,
4,
18,
18,
13,
13,
2,
18,
13,
13,
17,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
23,
13,
12,
13,
30,
11,
1,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
9,
14
],
... | [
"\nimport java.util.Scanner;\nclass Main {\n\n\tpublic static void printarray(int[] a,int n){\n \tfor(int f=0;f<n;f++){\n \t\tif(f<n-1)System.out.print(a[f]+\" \");\n \t\telse System.out.println(a[f]);\n \t}\n\t}\n\n\tpublic static void scanarray(int[] a,int n, Scanner s){\n \tfor(int i=0;i<n;i++){\n... |
import java.util.Scanner;
class Main {
public static void printarray(int[] a,int n){
for(int f=0;f<n;f++){
if(f<n-1)System.out.print(a[f]+" ");
else System.out.println(a[f]);
}
}
public static void scanarray(int[] a,int n, Scanner s){
for(int i=0;i<n;i++){
a[i] = s.nextInt();
... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
41,
13,
17,
41,
13,
18,
13,
13,
41,
13,
20,
17,
41,
13,
17,
41,
13,
17,
12,
13,
30,
41,
13,
4,
13,
41,
13,
20,
11,
1,
41,
13,
17... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
7,
11
],
[
11,
12
],
[
11,
13
],
[
13,
14
],
... | [
"import java.util.*;\nimport java.io.*;\n\nclass Main {\n\tvoid solve () {\n\t\t\n\t\tint n = nextInt();\n\t\tArrayList<Integer> list = new ArrayList<>();\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tlist.add(nextInt());\n\t\t}\n\t\t\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tfor (int j=0; j<=i; j++) {\n\t\t\t\tif (list.get(i)... | import java.util.*;
import java.io.*;
class Main {
void solve () {
int n = nextInt();
ArrayList<Integer> list = new ArrayList<>();
for (int i=0; i<n; i++) {
list.add(nextInt());
}
for (int i=0; i<n; i++) {
for (int j=0; j<=i; j++) {
if (list.get(i) <= list.get(j)) {
Collections.swap(lis... |
[
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\tinsertionSo... | 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();
}
insertionSort(array, num);
scanner.close();... |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
11,
1,
41,
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,
2,
18,
13,
13,
17,
23,
13,
12,
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
],
[
13,
14
... | [
"import java.util.*;\n\npublic class Main\n{\n\n public static Scanner in = new Scanner(System.in);\n\n public void print(int[] a)\n {\n for (int i = 0; i <a.length-1 ; i++)\n {\n System.out.print(a[i]+\" \");\n }\n System.out.println(a[a.length-1]);\n }\n\n pub... | import java.util.*;
public class Main
{
public static Scanner in = new Scanner(System.in);
public void print(int[] a)
{
for (int i = 0; i <a.length-1 ; i++)
{
System.out.print(a[i]+" ");
}
System.out.println(a[a.length-1]);
}
public int[] insert(int[] ... |
[
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
],
[
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 public static void main(String[] args) throws IOException{\n BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));\n int a=Integer.parseInt(bf.readLine());\n ... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException{
BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
int a=Integer.parseInt(bf.readLine());
int[] h=... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
11,
1,
0,
13,
17,
2,
13,
2,
18,
13,
13,
17,
1,
40,
13,
30,
4,
18,
18,
13,
13,
2,
18,
13,
13,
17,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
8,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
... | [
"import java.util.Scanner;\n\nclass Main{\n static void output(int[] a){\n int i;\n for(i = 0; i < a.length - 1; i++)\n System.out.print(a[i] + \" \");\n System.out.println(a[i]);\n }\n\n public static void main(String[] args){\n Scanner stdIn = new Scanner(System.in);\n int n = stdIn.nextInt... | import java.util.Scanner;
class Main{
static void output(int[] a){
int i;
for(i = 0; i < a.length - 1; i++)
System.out.print(a[i] + " ");
System.out.println(a[i]);
}
public static void main(String[] args){
Scanner stdIn = new Scanner(System.in);
int n = stdIn.nextInt();
int a[] = n... |
[
7,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
20,
0,
13,
4,
18,
13,
0,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
4,
13,
11,
1,
41,
13,
17,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
152,
5
],
[
152,
6
],
[
6,
7
],
[
152,
8
],
[
8,
9
],
[
152,
10
],
[
10,
11
],
[
152,
12
],
[
12,
13
],
[
152,
... | [
"import java.util.Scanner;\npublic class Main{\n\n int n,v,j;\n int[] A;\n public void run(){\n Scanner sc = new Scanner(System.in);\n n = sc.nextInt();\n A = new int[n];\n \n for(int i=0; i < n; i++) A[i] = sc.nextInt();\n \n tr... | import java.util.Scanner;
public class Main{
int n,v,j;
int[] A;
public void run(){
Scanner sc = new Scanner(System.in);
n = sc.nextInt();
A = new int[n];
for(int i=0; i < n; i++) A[i] = sc.nextInt();
trace();
... |
[
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,
11,
1,
41,
13,
17,
2,
13,
2,
18,
13,
13,
17,
1,
40,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
178,
5
],
[
178,
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\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\t\n\t\tint N = in.nextInt();\n\t\tint[] A = new int[N];\n\t\t\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tA[i] = in.nextInt();\n\t\t}\n\t\t\n\t\tfor (int k = 0; k < A.length-1; k++... |
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();
}
for (int k = 0; k < A.length-1; k++) {
System.out.print(A[k] + " "); ... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
17,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
4,
13,
13,
13,
4,
13,
13,
13,
23,
13,
12,
13,
30,
11,
1,... | [
[
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[] array = new int[100];\n\t\t\n\t\tint n = sc.nextInt();\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tarray[i] = sc.nextInt();\n\t\t\n\t\tdoInsertionSort(array, n);\n\t\t\n\t\tprintAr... | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int[] array = new int[100];
int n = sc.nextInt();
for (int i = 0; i < n; i++)
array[i] = sc.nextInt();
doInsertionSort(array, n);
printArray(array, n);
}
public static void ... |
[
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,
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,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
154,
5
],
[
154,
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 ary[]= new int[n];\n\t\tint a,b;\n\t\tfor (int i=0;i<n;++i){\n\t\t\tary[i]=sc.nextInt();\n\t\t}\n\n\t\tfor (int i=0;i<n;++i){\n\t\t\tfor (int j=i;j>... | import java.util.Scanner;
public class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int n=sc.nextInt();
int ary[]= new int[n];
int a,b;
for (int i=0;i<n;++i){
ary[i]=sc.nextInt();
}
for (int i=0;i<n;++i){
for (int j=i;j>0;--j){
a= Math.min(ary[j],ary[j-1]... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
20,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
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\tStringBuilder buider = new StringBuilder();\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\t... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main {
public static void main(String[] args) throws IOException {
StringBuilder buider = new StringBuilder();
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String n = br.readLine()... |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
4,
18,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
18,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
4,
9
],
[
9,
10
],
[
9,
11
],
[
4,
12
],
[
12,
13
],
[
12,
14
],
[... | [
"import java.io.*;\n \nclass Main {\n static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n static StringBuilder out = new StringBuilder();\n \n public static void main(String[] args) throws IOException {\n int n = Integer.parseInt(br.readLine());\n int[] A = new ... | import java.io.*;
class Main {
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
static StringBuilder out = new StringBuilder();
public static void main(String[] args) throws IOException {
int n = Integer.parseInt(br.readLine());
int[] A = new int[n];
... |
[
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,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
209,
5
],
[
209,
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\tfor(int k = 0 ; k < n ; k++) {\n\t\t\tif(k != 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();
}
for(int k = 0 ; k < n ; k++) {
if(k != n - 1) {
System.out.print(a[k] + " ... |
[
7,
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,
4,
18,
13,
18,
13,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
165,
5
],
[
165,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n int size = Integer.parseInt(sc.nextLine());\n int[] arr = new int[size];\n \n String[] input = sc.nextLine().split(\" \");\n \n for(int i = 0; ... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int size = Integer.parseInt(sc.nextLine());
int[] arr = new int[size];
String[] input = sc.nextLine().split(" ");
for(int i = 0; i < size; i ++) {
... |
[
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,
41,
13,
17,
11,
1,
41,
13,
17,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
173,
5
],
[
173,
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\tpublic static void main(String[] args){\n\t\tScanner std = new Scanner(System.in);\n\t\tint n = Integer.parseInt(std.next());\n\t\tint array[] = new int[n];\n\n\t\tfor (int i=0; i<n; i++){\n\t\t\tarray[i] = Integer.parseInt(std.next());\n\t\t}\n\t\tString outsd... |
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner std = new Scanner(System.in);
int n = Integer.parseInt(std.next());
int array[] = new int[n];
for (int i=0; i<n; i++){
array[i] = Integer.parseInt(std.next());
}
String outsd = "";
for (int i=1; i<n; 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,
17,
41,
13,
17,
4,
18,
18,
13,
13,
4,
18,
13,
17,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
116,
8
],
[
116,
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\tpublic static void main (String[] args) throws Exception\n\t{\n\t\tBufferedReader stdReader =\n\t\tnew BufferedReader(new InputStreamReader(System.in));\n\t\tint N = Integer.parseInt(stdReader.readLine());\n\t\tString A[]... | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main
{
public static void main (String[] args) throws Exception
{
BufferedReader stdReader =
new BufferedReader(new InputStreamReader(System.in));
int N = Integer.parseInt(stdReader.readLine());
String A[] = stdReader.readLine().s... |
[
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
],
[
179,
11
],
[
179,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n \npublic class Main {\n \n public static void main(String[] args)throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLi... | 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());
... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
18,
13,
13,
4,
18,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
13,
41,
13,
20,
4,
18,
18,
13,
13,
13,
41,
13,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
135,
5
],
[
135,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
10,
12
],
[
12,
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 String count = new String(in.readLine());\n int nCount = Integer.parseInt(count);\n String s = new String(in.readLine())... | import java.io.*;
public class Main {
public static void main(String[] args) {
try {
BufferedReader in = new BufferedReader( new InputStreamReader(System.in));
String count = new String(in.readLine());
int nCount = Integer.parseInt(count);
String s = new String(in.readLine());
Syste... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
4,
18,
13,
41,
13,
20,
41,
13,
17,
42,
4,
18,
13,
30,
0,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\n\nclass Main{\n\n\tstatic int len;\n\tstatic int[] arr;\n\n\t//メインメソッド\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader reader = new BufferedReader(n... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
class Main{
static int len;
static int[] arr;
//メインメソッド
public static void main(String[] args) throws IOException{
BufferedReader reader = new BufferedReader(new InputStreamReader(Sys... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
4,
18,
13,
11,
1,
41,
13,
17,
41,
13,
18,
13,
13,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
4,
13,
13,
4,
13,
13,
4,
18,
13,
23,
13,
12,
13,... | [
[
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 public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int[] a = new int[sc.nextInt()];\n for(int i = 0,n = a.length;i < n;i++) a[i] = sc.nextInt();\n print(a);\n insertSort(a);\n sc.close();... | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int[] a = new int[sc.nextInt()];
for(int i = 0,n = a.length;i < n;i++) a[i] = sc.nextInt();
print(a);
insertSort(a);
sc.close();
}
pri... |
[
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,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
... | [
[
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
],... | [
"\nimport java.util.Scanner;\n\n/**\n * Created by sd on 2016/11/22.\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 ... |
import java.util.Scanner;
/**
* Created by sd on 2016/11/22.
*/
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();
}
... |
[
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
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.io.*;\nimport java.util.Arrays;\nimport java.util.Scanner;\n\nclass Main{\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint[] rank = new int[n];\n\t\tString[... | import java.io.*;
import java.util.Arrays;
import java.util.Scanner;
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[] rank = new int[n];
String[] str = (br.readLine())... |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
4,
13,
4,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
29,
13,
23... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
151,
5
],
[
151,
6
],
[
6,
7
],
[
6,
8
],
[
151,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
... | [
"import java.util.*;\n\npublic class Main {\n private static final Scanner scn = new Scanner(System.in);\n \n public static void main(String[] args) {\n int n = scn.nextInt();\n insertionSort(createArray(n), n);\n }\n \n private static int[] createArray(int n) {\n int[] ary = ... | import java.util.*;
public class Main {
private static final Scanner scn = new Scanner(System.in);
public static void main(String[] args) {
int n = scn.nextInt();
insertionSort(createArray(n), n);
}
private static int[] createArray(int n) {
int[] ary = new int[n];
... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
4,
18,
13,
17,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
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.InputStreamReader;\nimport java.io.IOException;\nimport java.io.BufferedReader;\n\npublic class 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());... | import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
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());
Stri... |
[
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,
41,
13,
4,
18,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
177,
5
],
[
177,
6
],
[
6,
7
],
[
6,
8
],
[
177,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
... | [
"import java.util.*;\n\npublic class Main{\n\tprivate static final Scanner scan = new Scanner(System.in);\n\n\tpublic static void main(String[] args){\n\n\t\tint N = scan.nextInt();\n\t\tint[] arr = new int[N];\n\t\tfor(int i = 0; i < N; i++){\n\t\t\tint num = scan.nextInt();\n\t\t\tarr[i] = num;\n\t\t}\n\t\t\n\t\t... | import java.util.*;
public class Main{
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args){
int N = scan.nextInt();
int[] arr = new int[N];
for(int i = 0; i < N; i++){
int num = scan.nextInt();
arr[i] = num;
}
for(int i = 0; i < N; i++){
if(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,
4,
18,
13,
4,
18,
4,
18,
4,
18,
13,
17,
41,
13,
20,
28,
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
],
[
0,
13
],
[
13,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Iterator;\nimport java.util.List;\n\npublic class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStrea... | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
41,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
170,
5
],
[
170,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"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 s = sc.nextInt();\n\t\tint[] n = new int[s];\n\t\t\n\t\tfor(int i= 0; i < s; i++){\n\t\t\tn[i] = sc.nextInt();\n\t\t}\n\n\t\tint b,c;\n\n\t\tfor(int i = 1; i < s; i++){\n\... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int s = sc.nextInt();
int[] n = new int[s];
for(int i= 0; i < s; i++){
n[i] = sc.nextInt();
}
int b,c;
for(int i = 1; i < s; i++){
for(int k = 0; k < s-1; k++){
Syst... |
[
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
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\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\t\tint num = Integer.parseInt(br.readLine());\n\t\tint[] d... | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int num = Integer.parseInt(br.readLine());
int[] data = new int[num];
... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
4,
18,
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,... | [
[
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 Scanner cin = new Scanner(System.in);\n int n = Integer.parseInt(cin.next());\n int[] array = new int [n];\n cin.nextLine();\n for (int i = 0; i < n; i++)\n {\n ... | import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner cin = new Scanner(System.in);
int n = Integer.parseInt(cin.next());
int[] array = new int [n];
cin.nextLine();
for (int i = 0; i < n; i++)
{
array[i] = cin.... |
[
7,
15,
13,
17,
6,
13,
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,
13,
12,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
151,
5
],
[
151,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
8,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
]... | [
"import java.util.Scanner;\n\npublic class Main {\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.println();\n }\n \n public static void main(St... | import java.util.Scanner;
public class Main {
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();
}
public static void main(String[] args) {
... |
[
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,
11,
1,
41,
13,
17,
2,
13,
18,
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;\npublic class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint len = scanner.nextInt();\n\t\tint nums[] = new int[len] ;\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tnums[i] = scanner.nextInt();\n\t\t}\n\t\t\n\t\tfor (int i = 1; i < ... | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int len = scanner.nextInt();
int nums[] = new int[len] ;
for (int i = 0; i < len; i++) {
nums[i] = scanner.nextInt();
}
for (int i = 1; i < nums.length; i++) {
new Main()... |
[
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,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
139,
5
],
[
139,
6
],
[
6,
7
],
[
139,
8
],
[
8,
9
],
[
8,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
... | [
"import java.util.Scanner;\npublic class Main{\n\nprivate static Scanner scanner;\n\npublic static void main(String args[])\n{\n\tscanner = new Scanner(System.in);\n\tint a = scanner.nextInt();\n\tint[] b = new int[a];\n\tfor(int i = 0;i < a;i++) {\n\t\tb[i] = scanner.nextInt();\n\n\t}\n\tfor(int i = 0;i < a;i++) {... | 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];
for(int i = 0;i < a;i++) {
b[i] = scanner.nextInt();
}
for(int i = 0;i < a;i++) {
int v = b[i];
int j = ... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
0,
13,
2,
13,
17,
42,
2,
2,
13,
17,
2,
18,
13,
13,
13,
30,
0,
18,
13,
2,
13,
17,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
162,
5
],
[
162,
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\tstatic int[] insertSort(int[] x) {\n\t\tint v,j;\n\t\tfor(int i = 0;i < x.length;i++) {\n\t\t\tv = x[i];\n\t\t\tj = i - 1;\n\t\t\twhile(j >= 0 && x[j] > v) {\n\t\t\t\tx[j + 1] = x[j];\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tx[j + 1] = v;\n\t\t\tshow(x);\n\t\t}\n\t\treturn ... | import java.util.Scanner;
public class Main {
static int[] insertSort(int[] x) {
int v,j;
for(int i = 0;i < x.length;i++) {
v = x[i];
j = i - 1;
while(j >= 0 && x[j] > v) {
x[j + 1] = x[j];
j--;
}
x[j + 1] = v;
show(x);
}
return x;
}
static void show(int[] x) {
for(int i = 0;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,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
18,
13,
13,
41,
13,
2,
13,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
161,
5
],
[
161,
6
],
[
6,
7
],
[
6,
8
],
[
161,
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\tinsertionSort(A);\n\n\t}\n\n\tprivate static void insertionSort(int[] A) {\n\t\tfor (int i = 0; i < A.length; i++... | 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);
insertionSort(A);
}
private static void insertionSort(int[] A) {
for (int i = 0; i < A.length; i++ ) {
int v = A[i];
int 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
],
[
220,
11
],
[
220,
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,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
18,
13,
13,
23,
13,
23,
13,
12,
13,
30,
11,
1,
41... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
158,
5
],
[
158,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
9,
14
]... | [
"import java.util.Scanner;\n\npublic class Main{\n\n static void trace(int A[],int N){\n for (int i = 0; i<N;i++){\n if (i>0) System.out.print(\" \");\n System.out.print(A[i]);\n }\n System.out.println();\n }\n static void insertionsort(int A[],int N){\n for ... | import java.util.Scanner;
public class Main{
static void trace(int A[],int N){
for (int i = 0; i<N;i++){
if (i>0) System.out.print(" ");
System.out.print(A[i]);
}
System.out.println();
}
static void insertionsort(int A[],int N){
for (int i = 1; i<N;i++... |
[
7,
15,
13,
17,
6,
13,
41,
13,
41,
13,
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,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
2,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
161,
5
],
[
161,
6
],
[
6,
7
],
[
161,
8
],
[
8,
9
],
[
161,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
13,
1... | [
"import java.util.Scanner;\n\n/**\n * Created by zhangrunfeng on 2019-04-30\n */\npublic class Main {\n\n private int N;\n private int[] array;\n\n public void init(Scanner sc) {\n N = sc.nextInt();\n array = new int[N];\n for (int idx = 0; idx < N; idx++) {\n array[idx] = s... | import java.util.Scanner;
/**
* Created by zhangrunfeng on 2019-04-30
*/
public class Main {
private int N;
private int[] array;
public void init(Scanner sc) {
N = sc.nextInt();
array = new int[N];
for (int idx = 0; idx < N; idx++) {
array[idx] = sc.nextInt();
... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
17,
41,
13,
41,
13,
41,
13,
41,
13,
0,
13,
4,
18,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
0,
13,
17,
2,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
151,
5
],
[
151,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.Scanner;\n\npublic class Main\n{\n\tpublic static void main(String args[])\n\t{\n\t\tScanner input = new Scanner(System.in);\n\t\tint[] A = new int[1001];\n\t\tint n, i, j, key;\n\t\tn = input.nextInt();\n\t\tfor(i = 1; i <=n; i++)\n\t\t{\n\t\t\tA[i]=input.nextInt();\n\t\t}\n\t\tfor(i = 1; i <= n;... | import java.util.Scanner;
public class Main
{
public static void main(String args[])
{
Scanner input = new Scanner(System.in);
int[] A = new int[1001];
int n, i, j, key;
n = input.nextInt();
for(i = 1; i <=n; i++)
{
A[i]=input.nextInt();
}
for(i = 1; i <= n; i++){
key = A[i];
j = i - 1;
... |
[
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,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
197,
5
],
[
197,
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\tfor (int k = 0; k < n; k++) {\n\t\t\tif (k != n - 1... | 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();
}
for (int k = 0; k < n; k++) {
if (k != n - 1) {
System.out.print(a[k]);
... |
[
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
],
... | [
"//Getting Started - Insertion Sort\nimport 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 in = new BufferedReader(new InputStreamReader(System.in));\n\n\t\t int n =Integer... | //Getting Started - Insertion Sort
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int n =Integer.parseInt(in.readLine... |
[
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,
11,
1,
41,
13,
17,
2,
13,
2,
18,
13,
13,
17,... | [
[
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 < a.length; i++) {\n a[i] = sc.nextInt();\n }\n for (int m =... | 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();
}
for (int m = 0; m < a.lengt... |
[
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,
18,
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
],
[
191,
11
],
[
191,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\t\n\tvoid run() throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint N = Integer.parseInt(br.readLine());\n\t\tString[] stringArray = br.re... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
void run() throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int N = Integer.parseInt(br.readLine());
String[] stringArray = br.readLine().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,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
149,
5
],
[
149,
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\n for (int i = 0; i < N; i++) {\n A[i] = sc.nextInt();\n }\n\n for (int i = 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 < N; i++) {
A[i] = sc.nextInt();
}
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,
42,
2,
13,
13,
30,
0,
18,
13,
13,
4,
18,
13,
40,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
4,
18,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
176,
5
],
[
176,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.*;\n\t\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint a = in.nextInt();\n\t\tint[] A = new int[a];\n\t\tint m =0;\n\t\twhile (m<a) {\n\t\t\tA[m]= in.nextInt();\n\t\t\tm++;\n\t\t}\n\t\tfor (int i=0;i<a-1;i++) {\n\t\t\tSystem.out.p... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int a = in.nextInt();
int[] A = new int[a];
int m =0;
while (m<a) {
A[m]= in.nextInt();
m++;
}
for (int i=0;i<a-1;i++) {
System.out.print(A[i]+" ");
}
System.out.print(A[a-... |
[
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,
11,
1,
41,
13,
17... | [
[
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\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint[] temoti = new int[N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\ttemoti[i] = scan.nextInt();\n\t\t}\n\t\tinsertionSort(temoti, N);\n\t}\n\n... | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int N = scan.nextInt();
int[] temoti = new int[N];
for (int i = 0; i < N; i++) {
temoti[i] = scan.nextInt();
}
insertionSort(temoti, N);
}
public static void insertionSort(in... |
[
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
],
[
167,
5
],
[
167,
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,
4,
18,
20,
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,
30,
0,
18,
13,
13,
4,
18,
13,
0,
13,
4,
13,
13,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
251,
5
],
[
251,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
6,
12
],
[
12,
13
],
[
251,
14
... | [
"\n\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tnew Main().start();\n\t}\n\tvoid start(){\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint[] a = new int[n];\n\t\tfor(int i... |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO ?????????????????????????????????????????????
new Main().start();
}
void start(){
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.ne... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
18,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
8,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
... | [
"import java.util.Scanner;\n\n class Main{\n\npublic static void f(int A[],int N){\nint i;\nfor(i=0;i<N;i++){\n\tif(i>0)\n\t\tSystem.out.print(\" \");\n System.out.print(A[i]);\n}\n System.out.println();\n}\n \n \n \npublic static void insertionSort(int A[],int N){\n int i,j,v;\n for(i=1;i<N;i++){\n ... | import java.util.Scanner;
class Main{
public static void f(int A[],int N){
int i;
for(i=0;i<N;i++){
if(i>0)
System.out.print(" ");
System.out.print(A[i]);
}
System.out.println();
}
public static void insertionSort(int A[],int N){
int i,j,v;
for(i=1;i<N;i++){
v=A[i];
j=i-1;
wh... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
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,
0,
18... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
155,
8
],
[
155,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
]... | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args)throws Exception{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String line = br.readLine();\n int n = Integer.parseInt(line);\n ... | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args)throws Exception{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = br.readLine();
int n = Integer.parseInt(line);
String lin... |
[
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,
4,
13,
13,
4,
13,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
154,
5
],
[
154,
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\n\tpublic static void main(String[] args) {\n\t\tScanner in=new Scanner(System.in);\n\t\tint n=in.nextInt(), A[]=new int[n];\n\t\tfor(int i=0;i<n;i++)A[i]=in.nextInt();\n\t\ttrace(A);\n\t\tinsertSort(A);\n\t}\n\t\n\tstatic void insertSort(int[] A) {\n\t\tfor(int i=1;i<A... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
int n=in.nextInt(), A[]=new int[n];
for(int i=0;i<n;i++)A[i]=in.nextInt();
trace(A);
insertSort(A);
}
static void insertSort(int[] A) {
for(int i=1;i<A.length;i++) {
int v=A[i], j=i-... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
4,
18,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
4,
18,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
... | [
[
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
],
[
13,
14
],
[... | [
"// ALDS1_01 Insertion Sort\nimport java.io.*;\n\nclass Main {\n public static void main(String[] args) {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n try { \n int N = Integer.parseInt(br.readLine());\n int[] A = new int[N];\n String[] input = b... | // ALDS1_01 Insertion Sort
import java.io.*;
class Main {
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
try {
int N = Integer.parseInt(br.readLine());
int[] A = new int[N];
String[] input = br.readLine().sp... |
[
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,
13,
13,
13,
4,
18,
13,
23,
13,
12,... | [
[
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.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint[] 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\toutput(A, N);\n\t\tinsertionSort(A, N);\n\t\tsc... | 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();
}
output(A, N);
insertionSort(A, N);
sc.close();
}
public static void inser... |
[
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,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
4,
18,
13,
17,
13,
11,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
120,
8
],
[
120,
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,
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,
13,
1,
40,
13,
30,
30,
11,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[... | [
"import java.util.*;\n\nclass Main{\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int a[] = new int[n];\n\tfor(int i = 0; i < n; i++){\n\t\ta[i] = sc.nextInt();\n\t}\n for(int i = 1; i < n; i++){\n for(int k = 0; k < n-1; k++){\n \t... | import java.util.*;
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();
}
for(int i = 1; i < n; i++){
for(int k = 0; k < n-1; k++){
System.out.print(a[k] ... |
[
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,
20,
0,
13,
4,
18,
13,
13,
23,
13,
6,
13,
12,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[... | [
"import java.util.*;\n\nclass Main{\n\tpublic static void main(String args[]){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint[] arr = new int[n];\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tarr[i] = scan.nextInt();\n\t\t}\n\t\tSort sort = new Sort();\n\t\tarr = sort.insertion(arr);\n\t}\... | import java.util.*;
class Main{
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int[] arr = new int[n];
for(int i=0; i<n; i++) {
arr[i] = scan.nextInt();
}
Sort sort = new Sort();
arr = sort.insertion(arr);
}
}
class Sort{
public int[] inserti... |
[
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,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
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;\nclass Main{\n public static void main(String[]arge){\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 \n for(int i=0; i<n; i++){\n ... | import java.util.Scanner;
class Main{
public static void main(String[]arge){
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();
}
for(int i=0; i<n; i++){
int v=A[i];
... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
4,
18,
13,
17,
18,
13,
13,
8,
2,
13,
2,
13,
17,
17,
17,
4,
18,
18,
13,
13,
17,
11,
1,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
11,
13
],
[
8,
14
],
[... | [
"import java.util.Scanner;\n\nclass Main {\n\tpublic static void bubble(int[] A) {\n\t\tint N = A.length;\n for(int k=0;k<N;k++) {\n System.out.print(String.format(\"%d%s\", A[k], (k==N-1 ? \"\" : \" \")));\n }\n\t\tSystem.out.println(\"\");\n\t\tfor(int i=1;i<N;i++) {\n\t\t\tint v = A[i];\... | import java.util.Scanner;
class Main {
public static void bubble(int[] A) {
int N = A.length;
for(int k=0;k<N;k++) {
System.out.print(String.format("%d%s", A[k], (k==N-1 ? "" : " ")));
}
System.out.println("");
for(int i=1;i<N;i++) {
int v = A[i];
int j = i - 1;
while (j >= ... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
4,
13,
13,
13,
4,
13,
13,
13,
23,
13,
12,
13,
30... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
164,
8
],
[
164,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
]... | [
"import java.util.ArrayList;\nimport java.util.Scanner;\n\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tArrayList<Integer> A = new ArrayList<Integer>();\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint N = scanner.nextInt();\n\n\t\tfor(int i=0;i<N;i++){\n\t\t\tA.add(scanner.nextInt());\... | import java.util.ArrayList;
import java.util.Scanner;
public class Main{
public static void main(String[] args){
ArrayList<Integer> A = new ArrayList<Integer>();
Scanner scanner = new Scanner(System.in);
int N = scanner.nextInt();
for(int i=0;i<N;i++){
A.add(scanner.nextInt());
}
printList(A,N);
ins... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
17,
41,
13,
41,
13,
20,
0,
13,
4,
18,
13,
4,
18,
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,
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
],
... | [
"\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\nclass Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tint input[] = new int[100];\n\t\tint numOfInput;... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main {
public static void main(String[] args) throws NumberFormatException, IOException {
// TODO ?????????????????????????????????????????????
int input[] = new int[100];
int numOfInput;
BufferedReader br =... |
[
7,
15,
13,
17,
6,
13,
41,
13,
17,
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,
0,
18,
13,
13,
4,
18,
13,
4,
13,
13,
41,
13,
41,
13,
11,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
155,
5
],
[
155,
6
],
[
6,
7
],
[
6,
8
],
[
155,
9
],
[
9,
10
],
[
9,
11
],
[
155,
12
],
[
12,
13
],
[
12,
14
... | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static final int BIG_NUM = 2000000000;\n\tpublic static final int MOD = 1000000007;\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint N = scanner.nextInt();\n\n\t\tint array[] = new int[N];\n\t\tfor... | import java.util.Scanner;
public class Main {
public static final int BIG_NUM = 2000000000;
public static final int MOD = 1000000007;
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int N = scanner.nextInt();
int array[] = new int[N];
for(int i = 0; i < N; i++)array[... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
0,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
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
],
[
8,
14
],
[
... | [
"import java.util.Scanner;\n\nclass Main {\n\n\tpublic static void main(String args[]) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint num;\n\t\tnum = scan.nextInt();\n\t\tint[] array = new int[num];\n\t\tfor (int i = 0; i < num; i++) {\n\t\t\tarray[i] = scan.nextInt();\n\t\t}\n\t\tinsertionSort(array);\n\t\... | import java.util.Scanner;
class Main {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
int num;
num = scan.nextInt();
int[] array = new int[num];
for (int i = 0; i < num; i++) {
array[i] = scan.nextInt();
}
insertionSort(array);
scan.close();
}
private static vo... |
[
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,
4,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
164,
5
],
[
164,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.*;\n \npublic class Main {\n\t\n\t\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint[] A = new int[N];\n\t\tfor(int i=0;i<N;i++) A[i] = sc.nextInt();\n\t\tshow(A);\n\t\tfor(int i=1;i<N;i++){\n\t\t\tint v = A[i];\n\t\t\tint... | 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();
show(A);
for(int i=1;i<N;i++){
int v = A[i];
int j = i-1;
while(j>=0 && A[j]>v){
A... |
[
7,
15,
13,
17,
6,
13,
41,
13,
41,
13,
20,
17,
12,
13,
30,
41,
13,
20,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
14,
2,
13,
2,
13,
17,
4,
18,
18,
13,
13,
2,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
193,
5
],
[
193,
6
],
[
6,
7
],
[
193,
8
],
[
8,
9
],
[
8,
10
],
[
193,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15... | [
"import java.util.Scanner;\n\npublic class Main\n{\n\n public static int number;\n public static int[] A=new int[1000];\n\n public static void main(String[] args)\n {\n \n Scanner scan=new Scanner(System.in);\n number=scan.nextInt();\n\n for(int i=0;i<number;i++){\n ... | import java.util.Scanner;
public class Main
{
public static int number;
public static int[] A=new int[1000];
public static void main(String[] args)
{
Scanner scan=new Scanner(System.in);
number=scan.nextInt();
for(int i=0;i<number;i++){
A[i]=scan.nextInt(... |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
141,
5
],
[
141,
6
],
[
6,
7
],
[
6,
8
],
[
141,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
... | [
"import java.util.Scanner;\n\npublic class Main{\n\tstatic Scanner in = new Scanner(System.in);\n public static void main(String[] args) {\n \t\n \tint a = in.nextInt();\n \tint[] ints = new int[a];\n \t\n \tfor (int i=0; i<a; i++) {\n ints[i] = in.nextInt();\n }\n \tint MyArr... | import java.util.Scanner;
public class Main{
static Scanner in = new Scanner(System.in);
public static void main(String[] args) {
int a = in.nextInt();
int[] ints = new int[a];
for (int i=0; i<a; i++) {
ints[i] = in.nextInt();
}
int MyArray;
for (int i=0; i... |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
4,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.util.*;\n\nclass Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String args[]) {\n\t\t\n\t\tint n = sc.nextInt();\n\t\tArrayList<Integer> list = new ArrayList<>();\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tlist.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tfor (int i=0; i<n; i++) {... | import java.util.*;
class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String args[]) {
int n = sc.nextInt();
ArrayList<Integer> list = new ArrayList<>();
for (int i=0; i<n; i++) {
list.add(sc.nextInt());
}
for (int i=0; i<n; i++) {
for (int j=0; j<=i; j++) {
... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
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... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
192,
11
],
[
192,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n public static void main(String[] args) throws IOException {\n \n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n int n = Integer.parseInt( br.rea... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
int n = Integer.parseInt( br.readLine() );
... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
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,
13,
1,
40,
13,
30,
30,
4,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[... | [
"import java.util.*;\n\nclass Main {\n public static void main(String args[]) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int[] A = new int[N];\n for (int i = 0; i < N; i++) {\n A[i] = sc.nextInt();\n ... | import java.util.*;
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();
}... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
0,
13,
20,
0,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
4,
18,
13,
17,
0,
13,
20,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
... | [
"\nimport java.io.BufferedReader;\nimport java.io.BufferedWriter;\nimport java.io.InputStreamReader;\nimport java.io.OutputStreamWriter;\nimport java.io.IOException;\n\npublic class Main {\n\n static int n;\n static int[] data;\n static BufferedReader br;\n static BufferedWriter bw;\n\n public static... |
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.IOException;
public class Main {
static int n;
static int[] data;
static BufferedReader br;
static BufferedWriter bw;
public static void main(String a... |
[
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,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
170,
5
],
[
170,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint N = sc.nextInt();\n\t\t\n\t\tint[] A = new int[N];\n\t\t\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\t\n\t\tint tmp, k;\n\t\t\n\t\tfor(int i =... | 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 tmp, k;
for(int i = 1; i < N; i++) {
for(int j = 0; j < N - 1; j+... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
17,
4,
18,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
18,
13,
13,
2,
17,
4,
18,
18,
13,
13,
4,
18,
18,
13,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
177,
5
],
[
177,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
9,
14
]... | [
"\nimport java.util.Scanner;\n\n/**\n * Created by ??\\??? on 2016/12/2.\n */\npublic class Main {\n static void print(Object[] array)\n {\n for(int i = 0;i<array.length;i++)\n {\n if(i==0)\n System.out.print(array[i].toString());\n else\n Syst... |
import java.util.Scanner;
/**
* Created by ??\??? on 2016/12/2.
*/
public class Main {
static void print(Object[] array)
{
for(int i = 0;i<array.length;i++)
{
if(i==0)
System.out.print(array[i].toString());
else
System.out.print(" "+arr... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
4,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
18,
13,
13,
41,
13,
2,
13,
17,
42,
2,
2,
13,
17,
2,
18,
13,
13,
13,
30,
0,
18,
13,
2,
13,
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.util.Scanner;\n\nimport java.lang.StringBuilder;\n\nclass Main{\n\n public void insertionSort(int n,int[] numbers){\n\n toString(numbers);\n\n for (int i = 1; i < n; i++) {\n int key = numbers[i];\n /* insert A[i] into the sorted sequence A[0,...,j-1] */\n ... | import java.util.Scanner;
import java.lang.StringBuilder;
class Main{
public void insertionSort(int n,int[] numbers){
toString(numbers);
for (int i = 1; i < n; i++) {
int key = numbers[i];
/* insert A[i] into the sorted sequence A[0,...,j-1] */
int j = i - 1;... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
13,
0,
13,
13,
42,
2,
13,
17,
30,
0,
13,
2,
13,
13,
0,
13,
13,
0,
13,
13,
4,
... | [
[
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 x=stdIn.nextInt(),y=stdIn.nextInt(),d;\n\t\tif(y>x){\n\t\t\td=x;\n\t\t\tx=y;\n\t\t\ty=d;\n\t\t}\n\t\twhile(y>0){\n\t\t\td=x%y;\n\t\t\tx=y;\n\t\t\ty=d;\n\t\t}\n\t\tSystem.out.print... | import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner stdIn=new Scanner(System.in);
int x=stdIn.nextInt(),y=stdIn.nextInt(),d;
if(y>x){
d=x;
x=y;
y=d;
}
while(y>0){
d=x%y;
x=y;
y=d;
}
System.out.println(x);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
13,
41,
13,
4,
18,
13,
13,
13,
11,
1,
41,
13,
2,
13,
13,
2,
13,
17,
1,
0,
13,
13,
0,
13,
13,
0,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
72,
5
],
[
72,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
... | [
"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 a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\t\n\t\tint x = Math.max(a, b);\n\t\tint y = Math.min(a, b);\n\t\t\n\t\tfor (int mod = x % y; mod != 0; x = y, y = mod... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int x = Math.max(a, b);
int y = Math.min(a, b);
for (int mod = x % y; mod != 0; x = y, y = mod, mod = x % y) {
}
Sy... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.