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,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
4,
18,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
190,
11
],
[
190,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tBufferedReader br = new BufferedReader(new In... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws NumberFormatException, IOException {
// TODO ?????????????????????????????????????????????
BufferedReader br = new BufferedReader(new InputStreamReader(Sy... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
41,
13,
20,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
0,
13,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30... | [
[
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
],... | [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n \tScanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n int number = Integer.parseInt(line);\n \n int[] array = new int[number];\n String line2 = sc.nextLine();\n ... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String line = sc.nextLine();
int number = Integer.parseInt(line);
int[] array = new int[number];
String line2 = sc.nextLine();
String[] line2sp... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
42,
13,
30,
0,
13,
1... | [
[
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;\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int A[] = new int[N];\n for(int i=0;i<A.length;i++){\n A[i] = sc.nextInt();\n }\n int count = 0;\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<A.length;i++){
A[i] = sc.nextInt();
}
int count = 0;
boolean flag =... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
42,
13,
30,
0,
13,
17,
11,
1... | [
[
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.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] a = new int[n];\n int ans = 0;\n for(int i = 0; i < n; i++){\n a[i] = sc.nextInt();\n ... | import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] a = new int[n];
int ans = 0;
for(int i = 0; i < n; i++){
a[i] = sc.nextInt();
}
bool... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
155,
5
],
[
155,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int a[] = new int[N];\n for(int i=0;i<=N-1;i++){\n a[i] = sc.nextInt();\n }\n int count = 0;\n fo... | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int a[] = new int[N];
for(int i=0;i<=N-1;i++){
a[i] = sc.nextInt();
}
int count = 0;
for(int i=0;i<N-1;... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
20,
17,
41,
13,
41,
13,
41,
13,
41,
13,
17,
0,
13,
4,
18,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
0,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
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 n,a[]=new int[100],i,j,t,s=0;\n\t\tn=stdIn.nextInt();\n\t\tfor(i=0;i<n;i++)a[i]=stdIn.nextInt();\n\t\tfor(i=0;i<n-1;i++){\n\t\t\tfor(j=n-1;j>i;j--){\n\t\t\t\tif(a[j-1]>a[j]){\n\t\... | import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner stdIn=new Scanner(System.in);
int n,a[]=new int[100],i,j,t,s=0;
n=stdIn.nextInt();
for(i=0;i<n;i++)a[i]=stdIn.nextInt();
for(i=0;i<n-1;i++){
for(j=n-1;j>i;j--){
if(a[j-1]>a[j]){
t=a[j-1];
a[j-1]=a[j];
... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
42,
17,
30,
41,
13,
17,
11,
1,
41,
13,
2,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
18,
13,
2,
13,
17,
30,
41,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
177,
14
],
... | [
"import java.util.Arrays;\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.Scanner;\n\npublic class Main {\n\t\n\tpublic static int BubbleSort(final int N, int[] A){\n\t\t\n\t\tint count = 0;\n\t\twhile(true){\n\t\t\tboolean update = false;\n\t\t\t\n\t\t\tfor(int i = N - 1; i >= 1; i--){\n\t\t\t\... | import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class Main {
public static int BubbleSort(final int N, int[] A){
int count = 0;
while(true){
boolean update = false;
for(int i = N - 1; i >= 1; i--){
if(A[i] < A[i - 1]){
int tmp = A[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,
0,
13,
17,
11,
1,
... | [
[
0,
1
],
[
182,
2
],
[
182,
3
],
[
3,
4
],
[
3,
5
],
[
5,
6
],
[
6,
7
],
[
6,
8
],
[
5,
9
],
[
9,
10
],
[
5,
11
],
[
11,
12
],
[
5,
13
],
[
13,
14
],... | [
"public class Main{\n public void run(java.io.InputStream in, java.io.PrintStream out){\n java.util.Scanner sc = new java.util.Scanner(in);\n/*answer*/\n int n;\n int[] a;\n int i, j, count, tmp;\n\n n = sc.nextInt();\n a = new int[n];\n for(i = 0;i < n;i++){\n a[i] = sc.nextInt();\n }... | public class Main{
public void run(java.io.InputStream in, java.io.PrintStream out){
java.util.Scanner sc = new java.util.Scanner(in);
/*answer*/
int n;
int[] a;
int i, j, count, tmp;
n = sc.nextInt();
a = new int[n];
for(i = 0;i < n;i++){
a[i] = sc.nextInt();
}
count = 0;
... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
14,
2,
13,
13,
30,
29,
13,
30,
29,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
13,
30,
29,
13,
30,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
4,
18,
18,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
10,
12
],
[
9,
13
],
[
13,
14
],
... | [
"import java.io.*;\n\nclass Main{\n \n public static int maxv(int x, int y){\n if(x >= y){\n return x;\n }else{\n return y;\n }\n }\n\n public static int minv(int x, int y){\n if(x <= y){\n return x;\n ... | import java.io.*;
class Main{
public static int maxv(int x, int y){
if(x >= y){
return x;
}else{
return y;
}
}
public static int minv(int x, int y){
if(x <= y){
return x;
}else{
... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
17,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
173,
5
],
[
173,
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\n\tpublic static void main(String[] args) {\n\t\tint m,i,j,big,k;\n\t\tint count = 0;\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = Integer.parseInt(in.nextLine());\n\t\tint array[] = new int[n];\n\n\t\tfor(m=0;m<n;m++)array[m] = Integer.parseInt(in.next(... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int m,i,j,big,k;
int count = 0;
Scanner in = new Scanner(System.in);
int n = Integer.parseInt(in.nextLine());
int array[] = new int[n];
for(m=0;m<n;m++)array[m] = Integer.parseInt(in.next());
for (i=0; i<n-1; i++){ ... |
[
7,
15,
13,
17,
6,
13,
41,
13,
17,
12,
13,
30,
41,
13,
17,
42,
13,
30,
0,
13,
17,
11,
1,
41,
13,
2,
18,
13,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
18,
13,
2,
13,
17,
30,
41,
13,
18,
13,
13,
0... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
173,
5
],
[
173,
6
],
[
6,
7
],
[
6,
8
],
[
173,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
... | [
"import java.util.*;\n\npublic class Main {\n\t\n\tint count = 0;\n\t\n\tvoid bubbleSort(int[] A) {\n\t\tboolean f = true;\n\t\twhile (f) {\n\t\t\tf = false;\n\t\t\tfor (int i = A.length - 1; i >= 1; i--) {\n\t\t\t\tif (A[i] < A[i-1]) {\n\t\t\t\t\tint tmp = A[i];\n\t\t\t\t\tA[i] = A[i-1];\n\t\t\t\t\tA[i-1] = tmp;\n... | import java.util.*;
public class Main {
int count = 0;
void bubbleSort(int[] A) {
boolean f = true;
while (f) {
f = false;
for (int i = A.length - 1; i >= 1; i--) {
if (A[i] < A[i-1]) {
int tmp = A[i];
A[i] = A[i-1];
A[i-1] = tmp;
f = true;
count++;
}
}
}
}
void... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
17,
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,
3... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
206,
11
],
[
206,
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 count=0;\n int n = Inte... | 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 count=0;
int n = Integer.parseInt(br.... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
42,
13,
30,
0,
13,
17,
11,
1... | [
[
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.*;\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int A[] = new int[N];\n for(int i=0;i<N;i++){\n A[i] = sc.nextInt();\n }\n boolean flag = true;\n int ans = 0;\n while(flag){\n flag ... | 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();
}
boolean flag = true;
int ans = 0;
while(flag){
flag = false;
fo... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
42,
2,
2,
17,
13,
2,
13,
17,
30,
0,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
41,
... | [
[
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
],
[
8,
14
],
... | [
"import java.util.Scanner;\n\npublic class Main\n{\n public static void main(String[] args)\n {\n\tScanner In = new Scanner(System.in);\n\n\tint n;\n\n\tdo\n\t {\n\t\tn = In.nextInt();\n\t }while(1 >= n && n >= 100);\n\n\tint []a = new int[n];\n\n\tfor(int i = 0; i < n; i++)\n\t a[i] = In.nextInt();\... | import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner In = new Scanner(System.in);
int n;
do
{
n = In.nextInt();
}while(1 >= n && n >= 100);
int []a = new int[n];
for(int i = 0; i < n; i++)
a[i] = In.nextInt();
int h = 0;
int count = 0;
... |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
42,
17,
30,
41,
13,
17,
11,
1,
41,
13,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
156,
5
],
[
156,
6
],
[
6,
7
],
[
6,
8
],
[
156,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
... | [
"import java.util.*;\n\npublic class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\tint n = sc.nextInt();\n\t\tint[] ints = new int[n];\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tints[i] = sc.nextInt();\n\t\t}\n\t\t\n\t\tint count = 0;\n\t\twhile (true) {\n\t\t\tbo... | import java.util.*;
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
int n = sc.nextInt();
int[] ints = new int[n];
for (int i=0; i<n; i++) {
ints[i] = sc.nextInt();
}
int count = 0;
while (true) {
boolean flag = false;
for (int i=0; i<n... |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
4,
13,
4,
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,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
167,
5
],
[
167,
6
],
[
6,
7
],
[
6,
8
],
[
167,
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 System.out.println(bubbleSort(createArray(n)));\n }\n \n private static int[] createArray(int n) {\n ... | 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();
System.out.println(bubbleSort(createArray(n)));
}
private static int[] createArray(int n) {
int[] ary = ne... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
41,
13,
17,
42,
13,
30,
0,
13,
17,
11,
1,
41,
13,
2,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
18,
13,
2,
13,
17,
30,
0,
13,
18,
13,
13,
0,... | [
[
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
],
[
8,
14
],
... | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void bubbleSort(int[] array, int n) {\n\t\tboolean flag = true;\n\t\tint tmp, count = 0;\n\t\twhile (flag) {\n\t\t\tflag = false;\n\t\t\tfor (int j = n - 1; j > 0; j--) {\n\t\t\t\tif (array[j] < array[j-1]) {\n\t\t\t\t\ttmp = array[j]; array[j] = ar... | import java.util.Scanner;
public class Main {
public static void bubbleSort(int[] array, int n) {
boolean flag = true;
int tmp, count = 0;
while (flag) {
flag = false;
for (int j = n - 1; j > 0; j--) {
if (array[j] < array[j-1]) {
tmp = array[j]; array[j] = array[j-1]; array[j-1] = tmp;
coun... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
156,
5
],
[
156,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.*;\npublic class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tInteger length = s.nextInt();\n\t\tInteger[] seq = new Integer[length];\n\t\tfor(int i = 0; i < length; i++){\n\t\t\tseq[i] = s.nextInt();\n\t\t}\n\t\... | import java.util.*;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
Integer length = s.nextInt();
Integer[] seq = new Integer[length];
for(int i = 0; i < length; i++){
seq[i] = s.nextInt();
}
Integer count = 0;
for(int i = 0; ... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
13,
2,
13,
17,
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 public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int tmp;\n int[] A = new int[N];\n for(int i=0;i<N;i++){\n A[i] = sc.nextInt();\n }\n int change = 0;\n... | import java.util.Scanner;
class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int tmp;
int[] A = new int[N];
for(int i=0;i<N;i++){
A[i] = sc.nextInt();
}
int change = 0;
for(int i... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
42,
13,
30,
0,
13,
17,
41,
1... | [
[
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 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\tboolean flag = true;\n\t\tint count = 0;\n\t\twhile... | 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();
}
boolean flag = true;
int count = 0;
while (flag) {
flag = false;
int tem... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
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\npublic class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] ary = new int[n];\n int res = 0;\n for (int i = 0; i < n; i++) {\n ary[i] = sc.nextInt... | import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] ary = new int[n];
int res = 0;
for (int i = 0; i < n; i++) {
ary[i] = sc.nextInt();
}
... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2... | [
[
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;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t int length = scanner.nextInt();\n\t\tint A[] = new int[length];\n for(int i = 0; i < length; i++)\n \tA[i] = scanner.nextInt();\n \n int key... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int length = scanner.nextInt();
int A[] = new int[length];
for(int i = 0; i < length; i++)
A[i] = scanner.nextInt();
int key = 1000;
int j = 100... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
4,
18,
13,
0,
13,
4,
18,
4,
18,
13,
17,
14,
2,
13,
17,
4,
18,
13,
17,
0,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.io.*;\nimport java.util.Arrays;\n\nclass Main{\n public static void main(String[] args){\n\tBufferedReader br\n\t = new BufferedReader(new InputStreamReader(System.in), 1);\n\tint n;\n\tint[] array;\n\tString[] tmp = null;\n\n\ttry{\n\t n = Integer.parseInt(br.readLine());\n\t tmp = br.read... | import java.io.*;
import java.util.Arrays;
class Main{
public static void main(String[] args){
BufferedReader br
= new BufferedReader(new InputStreamReader(System.in), 1);
int n;
int[] array;
String[] tmp = null;
try{
n = Integer.parseInt(br.readLine());
tmp = br.readLine().split(" ");
}catch... |
[
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[] num = 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[] num = new int[n];
String[] str = (br.readLine()).... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
... | [
[
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.awt.geom.Point2D;\nimport java.io.*;\nimport java.math.BigInteger;\nimport java.util.ArrayDeque;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.Comparator;\nimport java.util.Deque;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport j... |
import java.awt.geom.Point2D;
import java.io.*;
import java.math.BigInteger;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
im... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
41,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
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\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\tbubbleSort(a, n);\n\t}\n\n\tstatic void bubbleSort... | 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();
}
bubbleSort(a, n);
}
static void bubbleSort(int[] a, int n) {
boolean flg = t... |
[
7,
15,
13,
17,
6,
13,
41,
13,
17,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
4,
13,
13,
13,
4,
13,
13,
4,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
198,
5
],
[
198,
6
],
[
6,
7
],
[
6,
8
],
[
198,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
... | [
"\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static int count = 0;\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint length = scanner.nextInt();\n\t\tint[] array = new int[length];\n\t\tfor (int i=0; i<length; i++) {\n\t\t\tarray[i] = scanner.... |
import java.util.Scanner;
public class Main {
public static int count = 0;
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int length = scanner.nextInt();
int[] array = new int[length];
for (int i=0; i<length; i++) {
array[i] = scanner.nextInt();
}
scanner.close(... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
4,
13,
13,
13,
4,
18,
18,
13,
13,
18,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
171,
5
],
[
171,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\t\n\t\tint n = stdIn.nextInt();\n\t\tint[] a = new int[n];\n\t\tint i;\n\t\t\n\t\tfor (i = 0; i < n; i++)\n\t\t\ta[i] =stdIn.nextInt();\n\t\t\n\t\tint count = BubbleSort(a, ... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
int n = stdIn.nextInt();
int[] a = new int[n];
int i;
for (i = 0; i < n; i++)
a[i] =stdIn.nextInt();
int count = BubbleSort(a, n);
System.out.print(a[0]);
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,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
152,
5
],
[
152,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] arr = new int[n];\n for (int i = 0; i < n; i++) {\n arr[i] = sc.nextInt();\n }\n int count = 0;\n ... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] arr = new int[n];
for (int i = 0; i < n; i++) {
arr[i] = sc.nextInt();
}
int count = 0;
for (int i = ... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
4,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
2,
18,
13,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
18,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
192,
5
],
[
192,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
8,
13
],
[
13,
14
],... | [
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String args[]) {\n\n int[] inputs = input();\n// int[] inputs = mockup();\n int swapCount = 0;\n\n for (int i = 0; i < inputs.length; i++) {\n for (int j = inputs.length - 1; j > i; j--) {\n ... | import java.util.Scanner;
public class Main {
public static void main(String args[]) {
int[] inputs = input();
// int[] inputs = mockup();
int swapCount = 0;
for (int i = 0; i < inputs.length; i++) {
for (int j = inputs.length - 1; j > i; j--) {
if (inp... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
41,
13,
41,
13,
41,
13,
17,
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
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[... | [
"import java.util.Scanner;\n\nclass Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint A[] = new int[N];\n\t\tint i, j, w, cnt=0;\n\t\tfor(i=0; i<N; i++){\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tfor(i=0; i<N-1; i++){\n\t\t\tfor(j=N-1; j>=i+... | import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int A[] = new int[N];
int i, j, w, cnt=0;
for(i=0; i<N; i++){
A[i] = sc.nextInt();
}
for(i=0; i<N-1; i++){
for(j=N-1; j>=i+1; j--){
if(A[j]<A[j-1]){
w ... |
[
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,
17,
41,
13,
41,
13,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
42,
13,
30,
0... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
157,
5
],
[
157,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.*;\n//import java.util.Math.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int A[] = new int[n];\n int i;\n boolean flag = true;\n int tmp;\n int count = 0;\n \n ... | import java.util.*;
//import java.util.Math.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int A[] = new int[n];
int i;
boolean flag = true;
int tmp;
int count = 0;
for(i = 0; i < n; i... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
20,
0,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
0,
13,
17,
11,... | [
[
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;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tint i,j,N,tmp,cnt;\n\t\tScanner sc = new Scanner(System.in);\n\t\tN = sc.nextInt();\n\t\n\t\tint [] A = new int [N];\n\t\t\n\t\tfor(i=0; i<N; i++){\n\t\t\tA[i] =sc.nextInt();\n\... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
int i,j,N,tmp,cnt;
Scanner sc = new Scanner(System.in);
N = sc.nextInt();
int [] A = new int [N];
for(i=0; i<N; i++){
A[i] =sc.nextInt();
}
cnt =0;
for(i=0;i<N-1;i++){
... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
4,
13,
41,
13,
4,
13,
41,
13,
4,
13,
13,
41,
13,
4,
18,
13,
17,
13,
4,
18,
18,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
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
],
[
175,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.*;\nimport java.util.*;\n\npublic class Main{\n private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n public static void main(String[] args) throws IOException{\n //キー入力\n ge... | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.*;
import java.util.*;
public class Main{
private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
public static void main(String[] args) throws IOException{
//キー入力
getLine();
... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
41,
13,
41,
13,
41,
13,
17,
41,
13,
20,
0,
13,
4,
18,
13,
41,
13,
0,
13,
20,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
157,
5
],
[
157,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
... | [
"import java.util.Scanner;\n\npublic class Main{\n public static void main(String args[]){\n int flag=1,i,j,N,cnt=0;\n \n //scanf N\n Scanner scan = new Scanner(System.in);\n N = scan.nextInt();\n \n //making array\n int[] A;\n A = new int[N];\n \n //complete array\n for(i=0;i<N... | import java.util.Scanner;
public class Main{
public static void main(String args[]){
int flag=1,i,j,N,cnt=0;
//scanf N
Scanner scan = new Scanner(System.in);
N = scan.nextInt();
//making array
int[] A;
A = new int[N];
//complete array
for(i=0;i<N;i++){
A[i] = ... |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
11,
1,
0,
13,
17,
2,
13,
2,
18,
13,
13,
17,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
2,
18,
13,
13,
17,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
18,
13,
13,
23,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
188,
5
],
[
188,
6
],
[
6,
7
],
[
6,
8
],
[
188,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
11,
14
... | [
"import java.util.Scanner;\n\npublic class Main {\n\n static Scanner sc = new Scanner(System.in);\n\n static void checkArray(int[] a){\n int i ;\n for( i = 0; i < a.length -1; i++){\n System.out.print(a[i] +\" \");\n }\n System.out.print(a[i]);\n System.out.pr... | import java.util.Scanner;
public class Main {
static Scanner sc = new Scanner(System.in);
static void checkArray(int[] a){
int i ;
for( i = 0; i < a.length -1; i++){
System.out.print(a[i] +" ");
}
System.out.print(a[i]);
System.out.println();
}
... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
17,
0,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
165,
5
],
[
165,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
... | [
"import java.util.*;\n\npublic class Main{\n public static void main(String[] args){\n Scanner scan=new Scanner(System.in);\n int n,p,q=0;\n n=scan.nextInt();\n int[] sort=new int[n];\n for(int i=0; i<n; i++){\n sort[i]=scan.nextInt();\n }\n \n f... | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
int n,p,q=0;
n=scan.nextInt();
int[] sort=new int[n];
for(int i=0; i<n; i++){
sort[i]=scan.nextInt();
}
for(int i=0; i<n-1... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
42,
13,
30,
0,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
156,
5
],
[
156,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.*;\n\n/**\n * A\n */\n\n// bubble sort\n\npublic class Main {\n public static void main(String[] args) {\n \n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n int count=0;\n int array[] = new int[n];\n\n for(int i=0; i<n; i++) {\n ... | import java.util.*;
/**
* A
*/
// bubble sort
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int count=0;
int array[] = new int[n];
for(int i=0; i<n; i++) {
array[i] = sc.nex... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
17,
0,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
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\t\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint n ;\n\t\tint count = 0;\n\t\tn = in.nextInt();\n\t\tint[] a = new int[n];\n\t\tfor(int i = 0;i<n;i++){\n\t\t\ta[i] = in.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i=0;i<n-1;i++){\n\... | import java.util.Scanner;
class Main{
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n ;
int count = 0;
n = in.nextInt();
int[] a = new int[n];
for(int i = 0;i<n;i++){
a[i] = in.nextInt();
}
for(int i=0;i<n-1;i++){
for(int j = n-1;j>i;j--){
if(a[j] <a[... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
17,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
157,
5
],
[
157,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N[] = new int[100];\n int n = sc.nextInt();\n int m = 0;\n for (int i = 0; i < n; i++) N[i] = sc.nextInt();\n for (int i = 0; i < (n - 1); i++) {\n for (i... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N[] = new int[100];
int n = sc.nextInt();
int m = 0;
for (int i = 0; i < n; i++) N[i] = sc.nextInt();
for (int i = 0; i < (n - 1); i++) {
for (int j = (n - 1);... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
20,
0,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
176,
5
],
[
176,
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\n\tpublic static void main(String args[]){\n\t\tint i,j,k,n,c,count;\n\t\tScanner sc=new Scanner(System.in);\n\t\tn=Integer.parseInt(sc.next());\n\t\tint a[]=new int[n+1];\n\t\tfor(i=0;i<n;i++){\n\t\t\ta[i]=Integer.parseInt(sc.next());\n\t\t}\n\t\t\n\t\tcount=0;\n\... | import java.util.Scanner;
public class Main{
public static void main(String args[]){
int i,j,k,n,c,count;
Scanner sc=new Scanner(System.in);
n=Integer.parseInt(sc.next());
int a[]=new int[n+1];
for(i=0;i<n;i++){
a[i]=Integer.parseInt(sc.next());
}
count=0;
for(i=0;i<n;i++){
for(j=n-1;j>0;j-... |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
42,
13,
30,
0,
13,
17,
11,
1,
41... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
146,
5
],
[
146,
6
],
[
6,
7
],
[
6,
8
],
[
146,
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 boolean flag=true;\n int counter=0;\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();
boolean flag=true;
int counter=0;
while(flag){
... |
[
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,
23,
13,
12,
13,
30,
41,
13,
17,
4... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
168,
5
],
[
168,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.Scanner;\n\n\npublic class Main{\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner s = new Scanner(System.in);\n\t\tint a = s.nextInt();\n\t\tint[] values = new int[a];\n\t\tfor(int i=0 ; i<values.length ; i++) {\n\t\t\tvalues[i] = s.nextInt();\n\t\t}\n\t\tsolve(values);\n\t}\n\n\tpubli... | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int a = s.nextInt();
int[] values = new int[a];
for(int i=0 ; i<values.length ; i++) {
values[i] = s.nextInt();
}
solve(values);
}
public static void solve(int[] values) {
b... |
[
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,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
42,
13,
30,
0,
13,
17,
11,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
162,
5
],
[
162,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] nums = new int[n];\n\t\tfor(int arrayIndex = 0; arrayIndex < n; arrayIndex++) {\n\t\t\tnums[arrayIndex] = sc.nextInt();\n\t\t}\n\t\tboolean ... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] nums = new int[n];
for(int arrayIndex = 0; arrayIndex < n; arrayIndex++) {
nums[arrayIndex] = sc.nextInt();
}
boolean flag = true;
int swapCount = 0... |
[
7,
15,
13,
17,
6,
13,
41,
13,
12,
13,
30,
0,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
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,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
158,
5
],
[
158,
6
],
[
6,
7
],
[
158,
8
],
[
8,
9
],
[
8,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
... | [
"import java.util.Scanner;\npublic class Main{\nprivate static Scanner scanner;\npublic static void main(String args[]) {\n\tscanner = new Scanner(System.in);\n\tint a = scanner.nextInt();\n\tint[] b = new int[a];\n\tint count = 0;\n\t//int flag = 1;\n\tfor(int i = 0;i < a;i++) {\n\t\tb[i] = scanner.nextInt();\n\t}... | import java.util.Scanner;
public class Main{
private static Scanner scanner;
public static void main(String args[]) {
scanner = new Scanner(System.in);
int a = scanner.nextInt();
int[] b = new int[a];
int count = 0;
//int flag = 1;
for(int i = 0;i < a;i++) {
b[i] = scanner.nextInt();
}
for(int i = 0;i < a;i++... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
42,
13,
30,
0,
13,
17,
11,
1,
41,
13,
2,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
18,
13,
2,
13,
17,
18,
13,
13,
30,
41,
13,
18,
13,
13,
0,
18,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[... | [
"import java.util.Scanner;\n\nclass Main{\n\n static int bubbleSort(int[] a, int n){\n boolean flag = true;\n int cnt = 0;\n while(flag){\n flag = false;\n for(int j = n - 1; j >= 1; j--){\n if(a[j-1] > a[j]){\n int tmp = a[j];\n ... | import java.util.Scanner;
class Main{
static int bubbleSort(int[] a, int n){
boolean flag = true;
int cnt = 0;
while(flag){
flag = false;
for(int j = n - 1; j >= 1; j--){
if(a[j-1] > a[j]){
int tmp = a[j];
a[j]... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
164,
5
],
[
164,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.Scanner;\n\npublic class Main {\n 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 bubbleSort(a... | 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();
}
bubbleSort(a, n);
}
... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
4... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\n\nclass Main {\n public static void main(String[] args) {\n // 標準入力の読み込み開始\n Scanner scanner = new Scanner(System.in);\n\n // 数列の長さ\n int n = scanner.nextInt();\n\n // 数列\n List<Integer> num... | import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
class Main {
public static void main(String[] args) {
// 標準入力の読み込み開始
Scanner scanner = new Scanner(System.in);
// 数列の長さ
int n = scanner.nextInt();
// 数列
List<Integer> numList = new ArrayLi... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
17,
41,
13,
20,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
160,
5
],
[
160,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
... | [
"import java.util.*;\n\npublic class Main{\n\tpublic static void main(String args[]){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n, temp, cnt = 0;\n\t\tArrayList<Integer> A = new ArrayList<Integer>();\n\t\t\n\t\tn = sc.nextInt();\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tA.add(sc.nextInt());\n\t\t}\n\t\t\n\t\... | import java.util.*;
public class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int n, temp, cnt = 0;
ArrayList<Integer> A = new ArrayList<Integer>();
n = sc.nextInt();
for(int i = 0; i < n; i++){
A.add(sc.nextInt());
}
for(int i = 0; i < n - 1; i++){
for(... |
[
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_2_A Bubble 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[] inputA... | // ALDS1_2_A Bubble 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[] inputAry = br.readLin... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
154,
5
],
[
154,
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 sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint[] A = new int[N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tint ct = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\... |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int[] A = new int[N];
for (int i = 0; i < N; i++) {
A[i] = sc.nextInt();
}
int ct = 0;
for (int i = 0; i < N; i++) {
for (int j = N - 1; j > 0; j--) {
... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
42,
2,
13,
18,
13,
13,
30,
4,
18,
18,
13,
13,
18,
13,
13,
14,
2,
13,
2,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
40,
13,
23,
13,
12,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
184,
5
],
[
184,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],... | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void print_arr(int[] arr) {\n\t\tint i = 0;\n\t\twhile(i < arr.length) {\n\t\t\tSystem.out.print(arr[i]);\n\t\t\tif(i < arr.length - 1) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}else {\n\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t}\n\t\t\ti++;\n\t\t... | import java.util.Scanner;
public class Main {
public static void print_arr(int[] arr) {
int i = 0;
while(i < arr.length) {
System.out.print(arr[i]);
if(i < arr.length - 1) {
System.out.print(" ");
}else {
System.out.print("\n");
}
i++;
}
}
public static int bubble_sort(int[] arr) {
in... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
17,
41,
13,
20,
17,
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,
0,
13,
4,
13,
13,
13,
4,
13,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
187,
5
],
[
187,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
8,
11
],
[
11,
12
],
[
11,
13
],
[
8,
14
],... | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tint N, k = 0;\n\t\tint[] A = new int[100];\n\t\tScanner stdIn = new Scanner(System.in);\n\n\t\tN = stdIn.nextInt();\n\n\t\tfor(int i = 0; i < N; i++){\n\t\t\tA[i] = stdIn.nextInt();\n\t\t}\n\n\t\tk = bubbleSort(N, A);\... | import java.util.Scanner;
public class Main {
public static void main(String[] args){
int N, k = 0;
int[] A = new int[100];
Scanner stdIn = new Scanner(System.in);
N = stdIn.nextInt();
for(int i = 0; i < N; i++){
A[i] = stdIn.nextInt();
}
k = bubbleSort(N, A);
trace(N, A, k);
}
public static ... |
[
7,
15,
13,
17,
6,
13,
41,
13,
17,
12,
13,
30,
41,
13,
17,
42,
2,
13,
17,
30,
0,
13,
17,
11,
1,
41,
13,
2,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
18,
13,
2,
13,
17,
30,
0,
18,
13,
13,
2,
18,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
211,
5
],
[
211,
6
],
[
6,
7
],
[
6,
8
],
[
211,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
... | [
"import java.util.Scanner;\n\npublic class Main {\n\n\t// define variables & initialize\n\tprivate static int cnt = 0;\t// how many bubbleSort is used\n\t\n\t// sort method :: sort given array using insertion Sort\n\tpublic static void sort(int[] _A, int _n) {\n\t\tint flg = 1;\n\t\twhile (flg != 0) {\n\t\t\tflg = ... | import java.util.Scanner;
public class Main {
// define variables & initialize
private static int cnt = 0; // how many bubbleSort is used
// sort method :: sort given array using insertion Sort
public static void sort(int[] _A, int _n) {
int flg = 1;
while (flg != 0) {
flg = 0;
for (int i = _n - 1; i ... |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
4,
13,
23,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
41,
13,
20,
17,
41,
13,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
166,
5
],
[
166,
6
],
[
6,
7
],
[
6,
8
],
[
166,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
9,
14
... | [
"import java.util.Scanner;\n\npublic class Main {\n\tstatic Scanner scan = new Scanner(System.in);\n\tpublic static void main(String args[]){\n\t\trun();\n\t}\n\tstatic void run(){\n\t\t\n\t\tint n, tmp, count;\n\t\tint[] a = new int[100];\n\t\t\n\t\tboolean flag;\n\t\t\n\t\tn = scan.nextInt();\n\t\t\n\t\tfor(int i... | import java.util.Scanner;
public class Main {
static Scanner scan = new Scanner(System.in);
public static void main(String args[]){
run();
}
static void run(){
int n, tmp, count;
int[] a = new int[100];
boolean flag;
n = scan.nextInt();
for(int i = 0; i < n; i++){
a[i] = scan.nextInt();
... |
[
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,
17,
41,
13,
17,
41,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
195,
5
],
[
195,
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 data[] = new int[n];\n\t\tint min, mini = 0, count = 0, a;\n\t\t\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tdata[i] = scan.nextInt();\n\t\... | import java.util.Scanner;
public class Main {
public static void main (String [] args) {
Scanner scan = new Scanner (System.in);
int n = scan.nextInt();
int data[] = new int[n];
int min, mini = 0, count = 0, a;
for (int i = 0; i < n; i++) {
data[i] = scan.nextInt();
}
scan.close();
for (int i... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
41,
13,
41,
13,
17,
42,
2,
13,
17,
30,
0... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[... | [
"import java.util.Scanner;\n\nclass Main{\n public static void main(String[] args) {\n\tScanner sc = new Scanner(System.in);\n\tint N = sc.nextInt();\n\tint A[] = new int[N];\n\tfor(int i = 0;i < N;i++){\n\t A[i] = sc.nextInt();\n\t}\n\tint flag = 1;\n\tint tmp, time = 0;\n\twhile(flag == 1){\n\t flag = 0;... | import java.util.Scanner;
class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int A[] = new int[N];
for(int i = 0;i < N;i++){
A[i] = sc.nextInt();
}
int flag = 1;
int tmp, time = 0;
while(flag == 1){
flag = 0;
for(int j = N - 1;j >=... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
11,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
180,
5
],
[
180,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"\nimport java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int[] A = new int[N];\n for(int i=0;i<N;i++){\n A[i]=scanner.nextInt();\n }\n bubbleSort(A,N... |
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
int N = scanner.nextInt();
int[] A = new int[N];
for(int i=0;i<N;i++){
A[i]=scanner.nextInt();
}
bubbleSort(A,N);
}
... |
[
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,
20,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
173,
8
],
[
173,
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);
int[] a = ... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
13,
13,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
13,
13,
4,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
41,
13,
17,
42,
13,
30,
0,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
215,
8
],
[
215,
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\tBufferedReader r = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint n = readInt(r);\n\t\tString[] numArrayStr = r.readLine().split(\" \");\n\n... | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
int n = readInt(r);
String[] numArrayStr = r.readLine().split(" ");
int[] numArrayInt = con... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
2,
13,
17,
2,
13,
17,
1,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
169,
5
],
[
169,
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\tint count = 0;\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ta[i] = sc.nextInt();\n\t\t}\n\n\t\tfor (int i = n-1; i >= 0;... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int count = 0;
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 = n-1; i >= 0; i--) {
for (int j = n-1; j > 0; j... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
0,
13,
20,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
171,
5
],
[
171,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] A;\n A = new int[n];\n int count = 0;\n for(int i=0;i<n;++i){\n A[i] = sc.nextInt();\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;
A = new int[n];
int count = 0;
for(int i=0;i<n;++i){
A[i] = sc.nextInt();
}
for(int... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
0,
13,
4,
18,
4,
18,
13,
17,
11,
1,
41,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\n\nimport java.util.Scanner;\nimport java.util.ArrayDeque;\nimport java.util.Deque;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new Inp... | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Scanner;
import java.util.ArrayDeque;
import java.util.Deque;
public class Main {
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(Sys... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
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
],
[
172,
11
],
[
172,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\n\n/**\n *\n * @author Y\n */\npublic class Main {\n public static void main(String[]args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int N = Intege... | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
/**
*
* @author Y
*/
public class Main {
public static void main(String[]args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int N = Integer.parseInt(br.re... |
[
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\n\tpublic static void main (String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tin... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main (String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
int[] a = new int[n];
... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
18,
13,
13,
41,
13,
17,
41,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
11,
1,
41,
13,
2,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
18,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
175,
5
],
[
175,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
11,
13
],
[
8,
14
],... | [
"import java.util.Scanner;\n\npublic class Main{\n\n\n\tpublic static void BubbleSort(int[] array){\n\t\tint len=array.length;\n\t\tint cnt=0;\n\t\tint swap;\n\t\tfor(int i=0;i<len-1;i++){\n\t\t\tfor(int j=len-1;i<j;j--){\n\t\t\t\tif(array[j]<array[j-1]){\n\t\t\t\t\tcnt++;\n\t\t\t\t\tswap=array[j];array[j]=array[j-... | import java.util.Scanner;
public class Main{
public static void BubbleSort(int[] array){
int len=array.length;
int cnt=0;
int swap;
for(int i=0;i<len-1;i++){
for(int j=len-1;i<j;j--){
if(array[j]<array[j-1]){
cnt++;
swap=array[j];array[j]=array[j-1];array[j-1]=swap;
}
}
}
for(int... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
125,
8
],
[
125,
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,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
162,
5
],
[
162,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint []A = new int [N];\n\t\tint i, j, t, k, l;\n\t\tint count = 0;\n\t\t\n\t\tfor (i = 0; i < N; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\n\t\... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int []A = new int [N];
int i, j, t, k, l;
int count = 0;
for (i = 0; i < N; i++) {
A[i] = sc.nextInt();
}
for(j = 0; j <= N-1; j++) {
for(k = 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,
41,
13,
4,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,... | [
[
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\n public static void main(String[] args) {\n // write your code here\n Scanner scanner=new Scanner(System.in);\n int n=scanner.nextInt();\n int[] ints=new int[n];\n for(int i=0;i<n;i++){\n ints[i]=scanner.nextInt(... |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// write your code here
Scanner scanner=new Scanner(System.in);
int n=scanner.nextInt();
int[] ints=new int[n];
for(int i=0;i<n;i++){
ints[i]=scanner.nextInt();
}
... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
... | [
[
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;\npublic class Main {\n\n\tpublic static void main(String [] args) {\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\tint numSwaps = 0;\n\t\t\n\t\tint n = in.nextInt();\n\t\tint [] arr = new int [n];\n\t\t\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tarr[i] = in.nextInt();\n\t\t}\n\t\t\n\t... | import java.util.Scanner;
public class Main {
public static void main(String [] args) {
Scanner in = new Scanner(System.in);
int numSwaps = 0;
int n = in.nextInt();
int [] arr = new int [n];
for(int i = 0; i < n; i++) {
arr[i] = in.nextInt();
}
for(int j = 0; j < n - 1; j++) {
... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
41,
13,
17,
42,
13,
30,
0,
13,
17,
11,
1,
41,
13,
2,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
18,
13,
2,
13,
17,
30,
0,
13,
18,
13,
13,
0,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
171,
5
],
[
171,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
... | [
"import java.util.Scanner;\n\n// ALDS1_2_A\npublic class Main {\n\tvoid bubbleSort(int[] array, int n) {\n\t\tboolean flag = true;\n\t\tint tmp, count = 0;\n\t\twhile (flag) {\n\t\t\tflag = false;\n\t\t\tfor (int j = n - 1; j > 0; j--) {\n\t\t\t\tif (array[j] < array[j-1]) {\n\t\t\t\t\ttmp = array[j]; array[j] = ar... | import java.util.Scanner;
// ALDS1_2_A
public class Main {
void bubbleSort(int[] array, int n) {
boolean flag = true;
int tmp, count = 0;
while (flag) {
flag = false;
for (int j = n - 1; j > 0; j--) {
if (array[j] < array[j-1]) {
tmp = array[j]; array[j] = array[j-1]; array[j-1] = tmp;
count... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
4,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
41... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
162,
5
],
[
162,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
6,
11
],
[
11,
12
],
[
162,
13
],
[
13,
14
... | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tsolve();\n\t}\n\n\tprivate static void solve() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[n];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ta[i] = sc.nextInt();\n\t\t}\... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
solve();
}
private static void solve() {
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();
}
sc.close();
int count = 0;
bo... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
20,
0,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
162,
5
],
[
162,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
8,
11
],
[
11,
12
],
[
11,
13
],
[
8,
14
],... | [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n int total;\n\n Scanner inp = new Scanner(System.in);\n total = inp.nextInt();\n\n int[] a = new int[total];\n\n for (int k = 0; k < total; k++) {\n a[k] = inp.nextInt();\n ... | import java.util.*;
public class Main {
public static void main(String[] args) {
int total;
Scanner inp = new Scanner(System.in);
total = inp.nextInt();
int[] a = new int[total];
for (int k = 0; k < total; k++) {
a[k] = inp.nextInt();
}
int sw... |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
41,
13,
41,
13,
17,
12,
13,
30,
4,
13,
4,
13,
4,
13,
23,
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,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
176,
5
],
[
176,
6
],
[
6,
7
],
[
6,
8
],
[
176,
9
],
[
9,
10
],
[
176,
11
],
[
11,
12
],
[
176,
13
],
[
13,
1... | [
"import java.util.Scanner;\n\npublic class Main {\n static Scanner sc = new Scanner(System.in);\n static int n;\n static int a[];\n static int count = 0;\n\n public static void main(String[] args) {\n read();\n solve();\n output();\n }\n\n public static void read() {\n ... | import java.util.Scanner;
public class Main {
static Scanner sc = new Scanner(System.in);
static int n;
static int a[];
static int count = 0;
public static void main(String[] args) {
read();
solve();
output();
}
public static void read() {
n = sc.nextInt();... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
171,
5
],
[
171,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in); \n\n\t\tint n = sc.nextInt();\n\t\tint[] data = new int[n];\n \tfor (int i = 0; i < n; i++) {\n \t\tdata[i] = sc.nextInt();\n \t}\n\n \tint count = 0;\n \tfor (int... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] data = new int[n];
for (int i = 0; i < n; i++) {
data[i] = sc.nextInt();
}
int count = 0;
for (int i = 0; i < n; i++) {
for ... |
[
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,
41,
13,
4,
18,
13,
13,
13,
11,
1,
41,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
186,
5
],
[
186,
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\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ta[i] = sc.nextInt();\n\t\t}\n\n\t\tMain main = new Main();\n\t\tint ans = main... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] a = new int[n];
for (int i = 0; i < n; i++) {
a[i] = sc.nextInt();
}
Main main = new Main();
int ans = main.bubbleSort(a, n);
for (int i = 0; ... |
[
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
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[... | [
"import java.util.Scanner;\n\nclass Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int n = Integer.parseInt(sc.nextLine());\n int[] array = new int[n];\n String[] input = sc.nextLine().split(\" \");\n \n for(int i = 0; i < n; i... | import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.nextLine());
int[] array = new int[n];
String[] input = sc.nextLine().split(" ");
for(int i = 0; i < n; i++){
... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
4,
13,
41,
13,
4,
13,
13,
41,
13,
4,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
2,
13,
17,
2,
13,
13,
1,
40,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
304,
8
],
[
304,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
]... | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader breader = getReader();\n\t\tint n = getInt(breader);\n\t\tint[] num = getAry(breader);\n\t\tint snum = 0;\n\t\tfor(int i = 0; i < n ; i++ ) {... | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader breader = getReader();
int n = getInt(breader);
int[] num = getAry(breader);
int snum = 0;
for(int i = 0; i < n ; i++ ) {
for( int j = n-1 ; j > ... |
[
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 trace(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 trace(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[] = ne... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
12,
13,
30,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
41,
13,
20,
4,
18,
13,
13,
41,
13,
4,
18,
4,
18,
13,
17,
11,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
198,
11
],
[
198,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic void Sort(){\n\n\t}\n\n\tpublic void maain(){\n\n\t}\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t// TODO ?????????????????????????????????????????????\n\n\t\t/... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public void Sort(){
}
public void maain(){
}
public static void main(String[] args) throws IOException {
// TODO ?????????????????????????????????????????????
//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,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
42,
13,
30,
0,
13,
17,
11,
1,
41... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[... | [
"import java.util.Scanner;\n\nclass Main {\n\tpublic static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint a[] = new int[n];\n\t\tfor(int i = 0; i < n; i++) a[i] = sc.nextInt();\n\t\t\n\t\tint chtimes = 0;\n\t\tboolean flag = true;\n\t\twhile(flag) {\n... | import java.util.Scanner;
class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int a[] = new int[n];
for(int i = 0; i < n; i++) a[i] = sc.nextInt();
int chtimes = 0;
boolean flag = true;
while(flag) {
flag = false;
for(int j = n-1; ... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
2,
18,
13,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
18,
13,
2,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
180,
5
],
[
180,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],... | [
"import java.util.Scanner;\n\npublic class Main {\n\n\n\n\tpublic static void bubble_sort(int[] a) {\n\t\tint num_swaps = 0;\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\tfor (int j = a.length - 1; j >= i+1; j--) {\n\t\t\t\tif (a[j] < a[j-1]) {\n\t\t\t\t\tint tmp = a[j];\n\t\t\t\t\ta[j] = a[j-1];\n\t\t\t\t\ta[j-... | import java.util.Scanner;
public class Main {
public static void bubble_sort(int[] a) {
int num_swaps = 0;
for (int i = 0; i < a.length; i++) {
for (int j = a.length - 1; j >= i+1; j--) {
if (a[j] < a[j-1]) {
int tmp = a[j];
a[j] = a[j-1];
a[j-1] = tmp;
num_swaps++;
}
}
}
... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
17,
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,
3... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
182,
11
],
[
182,
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 count=0;\n int n = Inte... | 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 count=0;
int n = Integer.parseInt(br.... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
41,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
156,
5
],
[
156,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=Integer.valueOf(sc.next());\n\t\tint[] arr= new int[n];\n\t\tfor(int i=0;i<n;i++){\n\t\t\tarr[i]=Integer.valueOf(sc.next());\n\t\t}\n\t\tsc.close();\n\t\t\n\t\tint count... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int n=Integer.valueOf(sc.next());
int[] arr= new int[n];
for(int i=0;i<n;i++){
arr[i]=Integer.valueOf(sc.next());
}
sc.close();
int count=0;
boolean f=true;
while(f){
f... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
4,
18,
13,
5,
13,
30,
4,
18,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
20,
18,
13,
13,
11... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
195,
11
],
[
195,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t \n\t\ttry {\n\t\t\tint lim = Integer.parseInt(in.readLine());\n\n\t... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
try {
int lim = Integer.parseInt(in.readLine());
String[] nums = in.readL... |
[
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
],
[
205,
5
],
[
205,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.Scanner;\n\n/**\n * ZAKIREN第5章\n *\n * @author K.Yamauchi\n *\n */\npublic class Main {\n\n\t/**\n\t *\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in); // 入力\n\t\tint n = Integer.parseInt(scan.nextLine()); // 要素数\n\n\t\t// ソート対象配列の読... | import java.util.Scanner;
/**
* ZAKIREN第5章
*
* @author K.Yamauchi
*
*/
public class Main {
/**
*
* @param args
*/
public static void main(String[] args) {
Scanner scan = new Scanner(System.in); // 入力
int n = Integer.parseInt(scan.nextLine()); // 要素数
// ソート対象配列の読み込み
String[] targetArrayStr = sca... |
[
7,
6,
13,
41,
13,
17,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
0,
13,
4,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
3,
4
],
[
3,
5
],
[
1,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[... | [
"class Main\n{\n\tstatic int count = 0;\n\tpublic static void main( String[] args )\n\t{\n\t\tjava.util.Scanner sc = new java.util.Scanner( System.in );\n\t\tint n = sc.nextInt();\n\t\tint[] data = new int[n];\n\t\tfor( int i = 0 ; i < n ; i++ )\n\t\t\tdata[i] = sc.nextInt();\n\t\tdata = bubbleSort( data, n );\n\t\... | class Main
{
static int count = 0;
public static void main( String[] args )
{
java.util.Scanner sc = new java.util.Scanner( System.in );
int n = sc.nextInt();
int[] data = new int[n];
for( int i = 0 ; i < n ; i++ )
data[i] = sc.nextInt();
data = bubbleSort( data, n );
for( int i = 0 ; i < n-1 ; i++ )
... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
41,
13,
20,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
13,
13,
4,
18... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
166,
8
],
[
166,
9
],
[
9,
10
],
[
9,
11
],
[
166,
12
],
[
12,
13
],
[
12,
14
... | [
"\nimport java.io.PrintWriter;\nimport java.util.Scanner;\n\npublic class Main {\n\tstatic int cnt = 0;\n\tstatic PrintWriter out =new PrintWriter(System.out);\n public static void main(String[] args) {\n \tScanner sc = new Scanner(System.in);\n \t\n \tint n = sc.nextInt();\n \tint array[] = new int[... |
import java.io.PrintWriter;
import java.util.Scanner;
public class Main {
static int cnt = 0;
static PrintWriter out =new PrintWriter(System.out);
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int array[] = new int[n];
for(int i=0;i... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
41,
13,
20,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
13,
14,
2,
2,
13,
17,
2,
17,
13,
30,
29,
0,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
198,
5
],
[
198,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
8,
11
],
[
11,
12
],
[
8,
13
],
[
13,
14
],... | [
"import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n int N;\n int num[];\n String line;\n\n Scanner scan=new Scanner(System.in);\n\n line=scan.next();\n N=Integer.parseInt(line);\n\n if(N<1||100<N){\n return;\n ... | import java.util.Scanner;
public class Main{
public static void main(String[] args){
int N;
int num[];
String line;
Scanner scan=new Scanner(System.in);
line=scan.next();
N=Integer.parseInt(line);
if(N<1||100<N){
return;
}
... |
[
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,
17,
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
],
[
300,
11
],
[
300,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\n/**\n * Created by hwzheng on 2017/3/27.\n */\npublic class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader Reader = new BufferedReader (new InputStreamReader(System.in)... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
* Created by hwzheng on 2017/3/27.
*/
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader Reader = new BufferedReader (new InputStreamReader(System.in));
int... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
17... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[... | [
"import java.util.Scanner;\n\nclass Main {\n\tpublic static void main(String args[]) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint[] c = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tc[i] = in.nextInt();\n\t\t}\n\t\tbubbleSort(c);\n\t\tin.close();\n\t}\n\n\tprivate static v... | import java.util.Scanner;
class Main {
public static void main(String args[]) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int[] c = new int[n];
for (int i = 0; i < n; i++) {
c[i] = in.nextInt();
}
bubbleSort(c);
in.close();
}
private static void bubbleSort(int[] A) {
int flg = 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,
4,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
41,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
168,
5
],
[
168,
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\tbubbleSort(a, n);\n\t}\n\n\tstatic int[] bubbleSor... | 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();
}
bubbleSort(a, n);
}
static int[] bubbleSort(int[] a, int n) {
int flg = 1;
... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
18,
13,
13,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
13,
14
],
... | [
"\n\nimport java.io.*;\n\nclass Main\n{\n \n public static void main(String[] args)\n {\n try{\n \t// ??\\???????????????\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n // ????????°???????????????\n int n = Integer.parseInt(br.readLine());\n String[] str = ... |
import java.io.*;
class Main
{
public static void main(String[] args)
{
try{
// ??\???????????????
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
// ????????°???????????????
int n = Integer.parseInt(br.readLine());
String[] str = br.readLine().split("... |
[
7,
6,
13,
41,
13,
12,
13,
30,
41,
13,
41,
13,
11,
1,
0,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
11,
1,
0,
13,
17,
2,
13,
2,
18,
13,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
18,
13,
2,
13,
17,
4,
... | [
[
0,
1
],
[
203,
2
],
[
203,
3
],
[
3,
4
],
[
203,
5
],
[
5,
6
],
[
5,
7
],
[
7,
8
],
[
8,
9
],
[
7,
10
],
[
10,
11
],
[
7,
12
],
[
12,
13
],
[
13,
14
... | [
"public class\nMain\n{\n private int swc;\n\n private void\n sort (\n int[ ] a\n )\n {\n int i, j;\n\n for ( i = 0; i < a.length; ++i )\n {\n for ( j = 1; j < a.length - i; ++j )\n {\n if ( a[ j ] < a[ j - 1 ] )\n swap ( a, j - 1, j );\n }\n }\n }\n \n private... | public class
Main
{
private int swc;
private void
sort (
int[ ] a
)
{
int i, j;
for ( i = 0; i < a.length; ++i )
{
for ( j = 1; j < a.length - i; ++j )
{
if ( a[ j ] < a[ j - 1 ] )
swap ( a, j - 1, j );
}
}
}
private void
swap (
int[ ] a... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
41,
13,
20,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
169,
5
],
[
169,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int bigger ;\n int a[] = new int[N];\n int i,j,k,x ;\n int count =0;\n for (x =0 ; x < N ; x++){\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 bigger ;
int a[] = new int[N];
int i,j,k,x ;
int count =0;
for (x =0 ; x < N ; x++){
a[x] = sc.ne... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
4,
18,
13,
17,
13,
13,
4,
18... | [
[
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.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.StringTokenizer;\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n public static void main(String[] args) {\n InputStream inputSt... | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.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,
17,
11,
1,
41... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
181,
5
],
[
181,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.*;\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[] nums = new int[n];\n\t\tfor(int i=0;i<n;i++){\n\t\t\tnums[i] = sc.nextInt();\n\t\t}\n\t\tBubbleSort(nums);\n\t\t\n\t\t\n\t}\n\tpublic static void Bubb... | import java.util.*;
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();
}
BubbleSort(nums);
}
public static void BubbleSort(int[] nums){
int swap_count =0;... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
41,
13,
17,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
42,
13,
30,
0,
13,
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
],
[
8,
14
],
[
... | [
"import java.util.*;\nclass Main{\n public static void main(String args[]){\n boolean flag = true;\n int tmp;\n int count = 0;\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int Array [] = new int[n];\n //input\n for(int i = 0; i<n; i++){\n Array[i] = sc.nextInt();\n ... | import java.util.*;
class Main{
public static void main(String args[]){
boolean flag = true;
int tmp;
int count = 0;
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int Array [] = new int[n];
//input
for(int i = 0; i<n; i++){
Array[i] = sc.nextInt();
}
//bubble... |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
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,
18,
13,
13,
4,
18,
13,
4,
13,
13,
13,
23,
13,
12,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
179,
5
],
[
179,
6
],
[
6,
7
],
[
6,
8
],
[
179,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
11,
14
... | [
"import java.util.Scanner;\npublic class Main {\n\tpublic static Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\tint i, j, k;\n\t\tint n = sc.nextInt();\n\t\tint a[] = new int[n];\n\t\t\n\t\tfor(i = 0; i < n; i++){\n\t\t\ta[i] = sc.nextInt();\n\t\t}\n\t\t\n\t\tbubblesort(n, a);... | import java.util.Scanner;
public class Main {
public static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
int i, j, k;
int n = sc.nextInt();
int a[] = new int[n];
for(i = 0; i < n; i++){
a[i] = sc.nextInt();
}
bubblesort(n, a);
}
public static void bubblesort(int... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.