node_ids
sequencelengths 4
1.4k
| edge_index
sequencelengths 1
2.22k
| text
sequencelengths 4
1.4k
| source
stringlengths 14
427k
|
---|---|---|---|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
130,
5
],
[
130,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
42,
44
],
[
8,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
50,
51
],
[
50,
52
],
[
45,
53
],
[
53,
54
],
[
54,
55
],
[
45,
56
],
[
57,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
57,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
57,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
75,
76
],
[
75,
77
],
[
71,
78
],
[
57,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
85,
86
],
[
85,
87
],
[
81,
88
],
[
57,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
91,
93
],
[
57,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
98,
99
],
[
98,
100
],
[
57,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
8,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
106,
111
],
[
111,
112
],
[
111,
113
],
[
106,
114
],
[
114,
115
],
[
115,
116
],
[
106,
117
],
[
118,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
119,
124
],
[
124,
125
],
[
124,
126
],
[
6,
127
],
[
127,
128
],
[
0,
129
],
[
129,
130
],
[
129,
131
]
] | [
"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 sousuu = sc.nextInt(),henkan_suu = sc.nextInt();\n\t\tint[] jyun = new int[sousuu];\n\t\tfor(int i=0;i<sousuu;i++) jyun[i]=i+1;\n\n\t\tfor(int i=0;i<henkan_suu;i++){\n\t\t\tString s = sc.next();\n\t\t\tString[] ab = s.split(\",\");\n\t\t\tint ichi = Integer.parseInt(ab[0])-1;\n\t\t\tint ni = Integer.parseInt(ab[1])-1;\n\t\t\tint temp = jyun[ichi];\n\t\t\tjyun[ichi] = jyun[ni];\n\t\t\tjyun[ni] = temp;\n\t\t}\n\n\t\tfor(int i=0;i<sousuu;i++){\n\t\t\tSystem.out.println(jyun[i]);\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint sousuu = sc.nextInt(),henkan_suu = sc.nextInt();\n\t\tint[] jyun = new int[sousuu];\n\t\tfor(int i=0;i<sousuu;i++) jyun[i]=i+1;\n\n\t\tfor(int i=0;i<henkan_suu;i++){\n\t\t\tString s = sc.next();\n\t\t\tString[] ab = s.split(\",\");\n\t\t\tint ichi = Integer.parseInt(ab[0])-1;\n\t\t\tint ni = Integer.parseInt(ab[1])-1;\n\t\t\tint temp = jyun[ichi];\n\t\t\tjyun[ichi] = jyun[ni];\n\t\t\tjyun[ni] = temp;\n\t\t}\n\n\t\tfor(int i=0;i<sousuu;i++){\n\t\t\tSystem.out.println(jyun[i]);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint sousuu = sc.nextInt(),henkan_suu = sc.nextInt();\n\t\tint[] jyun = new int[sousuu];\n\t\tfor(int i=0;i<sousuu;i++) jyun[i]=i+1;\n\n\t\tfor(int i=0;i<henkan_suu;i++){\n\t\t\tString s = sc.next();\n\t\t\tString[] ab = s.split(\",\");\n\t\t\tint ichi = Integer.parseInt(ab[0])-1;\n\t\t\tint ni = Integer.parseInt(ab[1])-1;\n\t\t\tint temp = jyun[ichi];\n\t\t\tjyun[ichi] = jyun[ni];\n\t\t\tjyun[ni] = temp;\n\t\t}\n\n\t\tfor(int i=0;i<sousuu;i++){\n\t\t\tSystem.out.println(jyun[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint sousuu = sc.nextInt(),henkan_suu = sc.nextInt();\n\t\tint[] jyun = new int[sousuu];\n\t\tfor(int i=0;i<sousuu;i++) jyun[i]=i+1;\n\n\t\tfor(int i=0;i<henkan_suu;i++){\n\t\t\tString s = sc.next();\n\t\t\tString[] ab = s.split(\",\");\n\t\t\tint ichi = Integer.parseInt(ab[0])-1;\n\t\t\tint ni = Integer.parseInt(ab[1])-1;\n\t\t\tint temp = jyun[ichi];\n\t\t\tjyun[ichi] = jyun[ni];\n\t\t\tjyun[ni] = temp;\n\t\t}\n\n\t\tfor(int i=0;i<sousuu;i++){\n\t\t\tSystem.out.println(jyun[i]);\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int sousuu = sc.nextInt()",
"sousuu",
"sc.nextInt()",
"sc.nextInt",
"sc",
"henkan_suu = sc.nextInt();",
"henkan_suu",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] jyun = new int[sousuu];",
"jyun",
"new int[sousuu]",
"sousuu",
"for(int i=0;i<sousuu;i++) jyun[i]=i+1;",
"int i=0;",
"int i=0;",
"i",
"0",
"i<sousuu",
"i",
"sousuu",
"i++",
"i++",
"i",
"jyun[i]=i+1;",
"jyun[i]=i+1",
"jyun[i]",
"jyun",
"i",
"i+1",
"i",
"1",
"for(int i=0;i<henkan_suu;i++){\n\t\t\tString s = sc.next();\n\t\t\tString[] ab = s.split(\",\");\n\t\t\tint ichi = Integer.parseInt(ab[0])-1;\n\t\t\tint ni = Integer.parseInt(ab[1])-1;\n\t\t\tint temp = jyun[ichi];\n\t\t\tjyun[ichi] = jyun[ni];\n\t\t\tjyun[ni] = temp;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<henkan_suu",
"i",
"henkan_suu",
"i++",
"i++",
"i",
"{\n\t\t\tString s = sc.next();\n\t\t\tString[] ab = s.split(\",\");\n\t\t\tint ichi = Integer.parseInt(ab[0])-1;\n\t\t\tint ni = Integer.parseInt(ab[1])-1;\n\t\t\tint temp = jyun[ichi];\n\t\t\tjyun[ichi] = jyun[ni];\n\t\t\tjyun[ni] = temp;\n\t\t}",
"{\n\t\t\tString s = sc.next();\n\t\t\tString[] ab = s.split(\",\");\n\t\t\tint ichi = Integer.parseInt(ab[0])-1;\n\t\t\tint ni = Integer.parseInt(ab[1])-1;\n\t\t\tint temp = jyun[ichi];\n\t\t\tjyun[ichi] = jyun[ni];\n\t\t\tjyun[ni] = temp;\n\t\t}",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String[] ab = s.split(\",\");",
"ab",
"s.split(\",\")",
"s.split",
"s",
"\",\"",
"int ichi = Integer.parseInt(ab[0])-1;",
"ichi",
"Integer.parseInt(ab[0])-1",
"Integer.parseInt(ab[0])",
"Integer.parseInt",
"Integer",
"ab[0]",
"ab",
"0",
"1",
"int ni = Integer.parseInt(ab[1])-1;",
"ni",
"Integer.parseInt(ab[1])-1",
"Integer.parseInt(ab[1])",
"Integer.parseInt",
"Integer",
"ab[1]",
"ab",
"1",
"1",
"int temp = jyun[ichi];",
"temp",
"jyun[ichi]",
"jyun",
"ichi",
"jyun[ichi] = jyun[ni]",
"jyun[ichi]",
"jyun",
"ichi",
"jyun[ni]",
"jyun",
"ni",
"jyun[ni] = temp",
"jyun[ni]",
"jyun",
"ni",
"temp",
"for(int i=0;i<sousuu;i++){\n\t\t\tSystem.out.println(jyun[i]);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<sousuu",
"i",
"sousuu",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(jyun[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(jyun[i]);\n\t\t}",
"System.out.println(jyun[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"jyun[i]",
"jyun",
"i",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint sousuu = sc.nextInt(),henkan_suu = sc.nextInt();\n\t\tint[] jyun = new int[sousuu];\n\t\tfor(int i=0;i<sousuu;i++) jyun[i]=i+1;\n\n\t\tfor(int i=0;i<henkan_suu;i++){\n\t\t\tString s = sc.next();\n\t\t\tString[] ab = s.split(\",\");\n\t\t\tint ichi = Integer.parseInt(ab[0])-1;\n\t\t\tint ni = Integer.parseInt(ab[1])-1;\n\t\t\tint temp = jyun[ichi];\n\t\t\tjyun[ichi] = jyun[ni];\n\t\t\tjyun[ni] = temp;\n\t\t}\n\n\t\tfor(int i=0;i<sousuu;i++){\n\t\t\tSystem.out.println(jyun[i]);\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint sousuu = sc.nextInt(),henkan_suu = sc.nextInt();\n\t\tint[] jyun = new int[sousuu];\n\t\tfor(int i=0;i<sousuu;i++) jyun[i]=i+1;\n\n\t\tfor(int i=0;i<henkan_suu;i++){\n\t\t\tString s = sc.next();\n\t\t\tString[] ab = s.split(\",\");\n\t\t\tint ichi = Integer.parseInt(ab[0])-1;\n\t\t\tint ni = Integer.parseInt(ab[1])-1;\n\t\t\tint temp = jyun[ichi];\n\t\t\tjyun[ichi] = jyun[ni];\n\t\t\tjyun[ni] = temp;\n\t\t}\n\n\t\tfor(int i=0;i<sousuu;i++){\n\t\t\tSystem.out.println(jyun[i]);\n\t\t}\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int sousuu = sc.nextInt(),henkan_suu = sc.nextInt();
int[] jyun = new int[sousuu];
for(int i=0;i<sousuu;i++) jyun[i]=i+1;
for(int i=0;i<henkan_suu;i++){
String s = sc.next();
String[] ab = s.split(",");
int ichi = Integer.parseInt(ab[0])-1;
int ni = Integer.parseInt(ab[1])-1;
int temp = jyun[ichi];
jyun[ichi] = jyun[ni];
jyun[ni] = temp;
}
for(int i=0;i<sousuu;i++){
System.out.println(jyun[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
4,
18,
20,
17,
41,
13,
41,
13,
41,
13,
41,
13,
4,
18,
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,
2,
13,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
41,
13,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
127,
5
],
[
127,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
11,
14
],
[
8,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
8,
19
],
[
19,
20
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
8,
31
],
[
31,
32
],
[
31,
33
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
47,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
52,
54
],
[
8,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
60,
61
],
[
60,
62
],
[
55,
63
],
[
63,
64
],
[
64,
65
],
[
55,
66
],
[
67,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
67,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
67,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
82,
84
],
[
67,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
88,
90
],
[
85,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
93,
95
],
[
67,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
99,
101
],
[
96,
102
],
[
8,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
103,
108
],
[
108,
109
],
[
108,
110
],
[
103,
111
],
[
111,
112
],
[
112,
113
],
[
103,
114
],
[
115,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
116,
121
],
[
121,
122
],
[
121,
123
],
[
6,
124
],
[
124,
125
],
[
0,
126
],
[
126,
127
],
[
126,
128
]
] | [
"import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in).useDelimiter(\"\\\\D\");\n\t\tint ax, by, i;\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] tate = new int[w];\n\t\tfor (i = 0; i < w; i++) {\n\t\t\ttate[i] = i + 1;\n\t\t}\n\t\tfor (i = 0; i < n; i++) {\n\t\t\tax = sc.nextInt();\n\t\t\tby = sc.nextInt();\n\t\t\tint sub = tate[ax - 1];\n\t\t\ttate[ax - 1] = tate[by - 1];\n\t\t\ttate[by - 1] = sub;\n\t\t}\n\t\tfor (i = 0; i < w; i++) {\n\t\t\tSystem.out.println(tate[i]);\n\t\t}\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in).useDelimiter(\"\\\\D\");\n\t\tint ax, by, i;\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] tate = new int[w];\n\t\tfor (i = 0; i < w; i++) {\n\t\t\ttate[i] = i + 1;\n\t\t}\n\t\tfor (i = 0; i < n; i++) {\n\t\t\tax = sc.nextInt();\n\t\t\tby = sc.nextInt();\n\t\t\tint sub = tate[ax - 1];\n\t\t\ttate[ax - 1] = tate[by - 1];\n\t\t\ttate[by - 1] = sub;\n\t\t}\n\t\tfor (i = 0; i < w; i++) {\n\t\t\tSystem.out.println(tate[i]);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in).useDelimiter(\"\\\\D\");\n\t\tint ax, by, i;\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] tate = new int[w];\n\t\tfor (i = 0; i < w; i++) {\n\t\t\ttate[i] = i + 1;\n\t\t}\n\t\tfor (i = 0; i < n; i++) {\n\t\t\tax = sc.nextInt();\n\t\t\tby = sc.nextInt();\n\t\t\tint sub = tate[ax - 1];\n\t\t\ttate[ax - 1] = tate[by - 1];\n\t\t\ttate[by - 1] = sub;\n\t\t}\n\t\tfor (i = 0; i < w; i++) {\n\t\t\tSystem.out.println(tate[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in).useDelimiter(\"\\\\D\");\n\t\tint ax, by, i;\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] tate = new int[w];\n\t\tfor (i = 0; i < w; i++) {\n\t\t\ttate[i] = i + 1;\n\t\t}\n\t\tfor (i = 0; i < n; i++) {\n\t\t\tax = sc.nextInt();\n\t\t\tby = sc.nextInt();\n\t\t\tint sub = tate[ax - 1];\n\t\t\ttate[ax - 1] = tate[by - 1];\n\t\t\ttate[by - 1] = sub;\n\t\t}\n\t\tfor (i = 0; i < w; i++) {\n\t\t\tSystem.out.println(tate[i]);\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in).useDelimiter(\"\\\\D\");",
"sc",
"new Scanner(System.in).useDelimiter(\"\\\\D\")",
"new Scanner(System.in).useDelimiter",
"new Scanner(System.in)",
"\"\\\\D\"",
"int ax",
"ax",
"by",
"by",
"i;",
"i",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] tate = new int[w];",
"tate",
"new int[w]",
"w",
"for (i = 0; i < w; i++) {\n\t\t\ttate[i] = i + 1;\n\t\t}",
"i = 0;",
"i = 0",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\ttate[i] = i + 1;\n\t\t}",
"{\n\t\t\ttate[i] = i + 1;\n\t\t}",
"tate[i] = i + 1",
"tate[i]",
"tate",
"i",
"i + 1",
"i",
"1",
"for (i = 0; i < n; i++) {\n\t\t\tax = sc.nextInt();\n\t\t\tby = sc.nextInt();\n\t\t\tint sub = tate[ax - 1];\n\t\t\ttate[ax - 1] = tate[by - 1];\n\t\t\ttate[by - 1] = sub;\n\t\t}",
"i = 0;",
"i = 0",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tax = sc.nextInt();\n\t\t\tby = sc.nextInt();\n\t\t\tint sub = tate[ax - 1];\n\t\t\ttate[ax - 1] = tate[by - 1];\n\t\t\ttate[by - 1] = sub;\n\t\t}",
"{\n\t\t\tax = sc.nextInt();\n\t\t\tby = sc.nextInt();\n\t\t\tint sub = tate[ax - 1];\n\t\t\ttate[ax - 1] = tate[by - 1];\n\t\t\ttate[by - 1] = sub;\n\t\t}",
"ax = sc.nextInt()",
"ax",
"sc.nextInt()",
"sc.nextInt",
"sc",
"by = sc.nextInt()",
"by",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int sub = tate[ax - 1];",
"sub",
"tate[ax - 1]",
"tate",
"ax - 1",
"ax",
"1",
"tate[ax - 1] = tate[by - 1]",
"tate[ax - 1]",
"tate",
"ax - 1",
"ax",
"1",
"tate[by - 1]",
"tate",
"by - 1",
"by",
"1",
"tate[by - 1] = sub",
"tate[by - 1]",
"tate",
"by - 1",
"by",
"1",
"sub",
"for (i = 0; i < w; i++) {\n\t\t\tSystem.out.println(tate[i]);\n\t\t}",
"i = 0;",
"i = 0",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(tate[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(tate[i]);\n\t\t}",
"System.out.println(tate[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"tate[i]",
"tate",
"i",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in).useDelimiter(\"\\\\D\");\n\t\tint ax, by, i;\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] tate = new int[w];\n\t\tfor (i = 0; i < w; i++) {\n\t\t\ttate[i] = i + 1;\n\t\t}\n\t\tfor (i = 0; i < n; i++) {\n\t\t\tax = sc.nextInt();\n\t\t\tby = sc.nextInt();\n\t\t\tint sub = tate[ax - 1];\n\t\t\ttate[ax - 1] = tate[by - 1];\n\t\t\ttate[by - 1] = sub;\n\t\t}\n\t\tfor (i = 0; i < w; i++) {\n\t\t\tSystem.out.println(tate[i]);\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in).useDelimiter(\"\\\\D\");\n\t\tint ax, by, i;\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] tate = new int[w];\n\t\tfor (i = 0; i < w; i++) {\n\t\t\ttate[i] = i + 1;\n\t\t}\n\t\tfor (i = 0; i < n; i++) {\n\t\t\tax = sc.nextInt();\n\t\t\tby = sc.nextInt();\n\t\t\tint sub = tate[ax - 1];\n\t\t\ttate[ax - 1] = tate[by - 1];\n\t\t\ttate[by - 1] = sub;\n\t\t}\n\t\tfor (i = 0; i < w; i++) {\n\t\t\tSystem.out.println(tate[i]);\n\t\t}\n\t}\n}",
"Main"
] | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in).useDelimiter("\\D");
int ax, by, i;
int w = sc.nextInt();
int n = sc.nextInt();
int[] tate = new int[w];
for (i = 0; i < w; i++) {
tate[i] = i + 1;
}
for (i = 0; i < n; i++) {
ax = sc.nextInt();
by = sc.nextInt();
int sub = tate[ax - 1];
tate[ax - 1] = tate[by - 1];
tate[by - 1] = sub;
}
for (i = 0; i < w; i++) {
System.out.println(tate[i]);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
0,
13,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
142,
5
],
[
142,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
37,
38
],
[
37,
39
],
[
32,
40
],
[
40,
41
],
[
41,
42
],
[
32,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
48,
50
],
[
8,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
56,
58
],
[
51,
59
],
[
59,
60
],
[
60,
61
],
[
51,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
63,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
63,
75
],
[
75,
76
],
[
63,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
82,
83
],
[
82,
84
],
[
63,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
90,
91
],
[
90,
92
],
[
63,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
97,
99
],
[
63,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
103,
105
],
[
100,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
108,
110
],
[
63,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
114,
116
],
[
111,
117
],
[
8,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
118,
123
],
[
123,
124
],
[
123,
125
],
[
118,
126
],
[
126,
127
],
[
127,
128
],
[
118,
129
],
[
130,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
131,
136
],
[
136,
137
],
[
136,
138
],
[
6,
139
],
[
139,
140
],
[
0,
141
],
[
141,
142
],
[
141,
143
]
] | [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int w, n;\n int[] amida;\n\n w = sc.nextInt();\n n = sc.nextInt();\n amida = new int[w];\n for(int j=0;j<w;j++)\n amida[j]=j+1;\n for(int i=0;i<n;i++){\n String s = sc.next();\n String[] sp = s.split(\",\");\n int c;\n int a=Integer.parseInt(sp[0]);\n int b=Integer.parseInt(sp[1]);\n c = amida[a-1];\n amida[a-1]=amida[b-1];\n amida[b-1]=c;\n }\n for(int k=0;k<w;k++){\n System.out.println(amida[k]);\n }\n\n\n }\n}\n",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int w, n;\n int[] amida;\n\n w = sc.nextInt();\n n = sc.nextInt();\n amida = new int[w];\n for(int j=0;j<w;j++)\n amida[j]=j+1;\n for(int i=0;i<n;i++){\n String s = sc.next();\n String[] sp = s.split(\",\");\n int c;\n int a=Integer.parseInt(sp[0]);\n int b=Integer.parseInt(sp[1]);\n c = amida[a-1];\n amida[a-1]=amida[b-1];\n amida[b-1]=c;\n }\n for(int k=0;k<w;k++){\n System.out.println(amida[k]);\n }\n\n\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int w, n;\n int[] amida;\n\n w = sc.nextInt();\n n = sc.nextInt();\n amida = new int[w];\n for(int j=0;j<w;j++)\n amida[j]=j+1;\n for(int i=0;i<n;i++){\n String s = sc.next();\n String[] sp = s.split(\",\");\n int c;\n int a=Integer.parseInt(sp[0]);\n int b=Integer.parseInt(sp[1]);\n c = amida[a-1];\n amida[a-1]=amida[b-1];\n amida[b-1]=c;\n }\n for(int k=0;k<w;k++){\n System.out.println(amida[k]);\n }\n\n\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int w, n;\n int[] amida;\n\n w = sc.nextInt();\n n = sc.nextInt();\n amida = new int[w];\n for(int j=0;j<w;j++)\n amida[j]=j+1;\n for(int i=0;i<n;i++){\n String s = sc.next();\n String[] sp = s.split(\",\");\n int c;\n int a=Integer.parseInt(sp[0]);\n int b=Integer.parseInt(sp[1]);\n c = amida[a-1];\n amida[a-1]=amida[b-1];\n amida[b-1]=c;\n }\n for(int k=0;k<w;k++){\n System.out.println(amida[k]);\n }\n\n\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w",
"w",
"n;",
"n",
"int[] amida;",
"amida",
"w = sc.nextInt()",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"amida = new int[w]",
"amida",
"new int[w]",
"w",
"for(int j=0;j<w;j++)\n amida[j]=j+1;",
"int j=0;",
"int j=0;",
"j",
"0",
"j<w",
"j",
"w",
"j++",
"j++",
"j",
"amida[j]=j+1;",
"amida[j]=j+1",
"amida[j]",
"amida",
"j",
"j+1",
"j",
"1",
"for(int i=0;i<n;i++){\n String s = sc.next();\n String[] sp = s.split(\",\");\n int c;\n int a=Integer.parseInt(sp[0]);\n int b=Integer.parseInt(sp[1]);\n c = amida[a-1];\n amida[a-1]=amida[b-1];\n amida[b-1]=c;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String s = sc.next();\n String[] sp = s.split(\",\");\n int c;\n int a=Integer.parseInt(sp[0]);\n int b=Integer.parseInt(sp[1]);\n c = amida[a-1];\n amida[a-1]=amida[b-1];\n amida[b-1]=c;\n }",
"{\n String s = sc.next();\n String[] sp = s.split(\",\");\n int c;\n int a=Integer.parseInt(sp[0]);\n int b=Integer.parseInt(sp[1]);\n c = amida[a-1];\n amida[a-1]=amida[b-1];\n amida[b-1]=c;\n }",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String[] sp = s.split(\",\");",
"sp",
"s.split(\",\")",
"s.split",
"s",
"\",\"",
"int c;",
"c",
"int a=Integer.parseInt(sp[0]);",
"a",
"Integer.parseInt(sp[0])",
"Integer.parseInt",
"Integer",
"sp[0]",
"sp",
"0",
"int b=Integer.parseInt(sp[1]);",
"b",
"Integer.parseInt(sp[1])",
"Integer.parseInt",
"Integer",
"sp[1]",
"sp",
"1",
"c = amida[a-1]",
"c",
"amida[a-1]",
"amida",
"a-1",
"a",
"1",
"amida[a-1]=amida[b-1]",
"amida[a-1]",
"amida",
"a-1",
"a",
"1",
"amida[b-1]",
"amida",
"b-1",
"b",
"1",
"amida[b-1]=c",
"amida[b-1]",
"amida",
"b-1",
"b",
"1",
"c",
"for(int k=0;k<w;k++){\n System.out.println(amida[k]);\n }",
"int k=0;",
"int k=0;",
"k",
"0",
"k<w",
"k",
"w",
"k++",
"k++",
"k",
"{\n System.out.println(amida[k]);\n }",
"{\n System.out.println(amida[k]);\n }",
"System.out.println(amida[k])",
"System.out.println",
"System.out",
"System",
"System.out",
"amida[k]",
"amida",
"k",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int w, n;\n int[] amida;\n\n w = sc.nextInt();\n n = sc.nextInt();\n amida = new int[w];\n for(int j=0;j<w;j++)\n amida[j]=j+1;\n for(int i=0;i<n;i++){\n String s = sc.next();\n String[] sp = s.split(\",\");\n int c;\n int a=Integer.parseInt(sp[0]);\n int b=Integer.parseInt(sp[1]);\n c = amida[a-1];\n amida[a-1]=amida[b-1];\n amida[b-1]=c;\n }\n for(int k=0;k<w;k++){\n System.out.println(amida[k]);\n }\n\n\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int w, n;\n int[] amida;\n\n w = sc.nextInt();\n n = sc.nextInt();\n amida = new int[w];\n for(int j=0;j<w;j++)\n amida[j]=j+1;\n for(int i=0;i<n;i++){\n String s = sc.next();\n String[] sp = s.split(\",\");\n int c;\n int a=Integer.parseInt(sp[0]);\n int b=Integer.parseInt(sp[1]);\n c = amida[a-1];\n amida[a-1]=amida[b-1];\n amida[b-1]=c;\n }\n for(int k=0;k<w;k++){\n System.out.println(amida[k]);\n }\n\n\n }\n}",
"Main"
] | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int w, n;
int[] amida;
w = sc.nextInt();
n = sc.nextInt();
amida = new int[w];
for(int j=0;j<w;j++)
amida[j]=j+1;
for(int i=0;i<n;i++){
String s = sc.next();
String[] sp = s.split(",");
int c;
int a=Integer.parseInt(sp[0]);
int b=Integer.parseInt(sp[1]);
c = amida[a-1];
amida[a-1]=amida[b-1];
amida[b-1]=c;
}
for(int k=0;k<w;k++){
System.out.println(amida[k]);
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
13,
4,
18,
13,
17,
17,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
12,
13,
30,
41,
13,
20,
4,
18,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
143,
11
],
[
143,
12
],
[
12,
13
],
[
12,
14
],
[
143,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
17,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
17,
28
],
[
28,
29
],
[
28,
30
],
[
31,
32
],
[
31,
33
],
[
17,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
41,
43
],
[
34,
44
],
[
44,
45
],
[
45,
46
],
[
34,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
17,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
58,
59
],
[
58,
60
],
[
53,
61
],
[
61,
62
],
[
62,
63
],
[
53,
64
],
[
65,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
65,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
73,
77
],
[
65,
78
],
[
78,
79
],
[
78,
80
],
[
65,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
84,
85
],
[
65,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
65,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
93,
95
],
[
65,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
100,
101
],
[
100,
102
],
[
65,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
17,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
108,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
115,
117
],
[
108,
118
],
[
118,
119
],
[
119,
120
],
[
108,
121
],
[
122,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
123,
128
],
[
128,
129
],
[
128,
130
],
[
143,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
133,
137
],
[
137,
138
],
[
138,
139
],
[
131,
140
],
[
140,
141
],
[
0,
142
],
[
142,
143
],
[
142,
144
]
] | [
"import java.util.*;\nimport java.lang.*;\nimport java.math.*;\n\npublic class Main {\n\tScanner sc = new Scanner(System.in);\n\tvoid run(){\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] ret = new int[w+1];\n\t\tfor(int i =0 ; i < w+1; i++) ret[i] = i;\n\t\tfor(int k = 0; k< n ; k++){\n\t\t\tString ts = sc.next();\n\t\t\tts = ts.replace(',', ' ');\n\t\t\tScanner str = new Scanner(ts);\n\t\t\tint d1 =str.nextInt();\n\t\t\tint d2 =str.nextInt();\n\t\t\tint temp = ret[d1];\n\t\t\tret[d1] = ret[d2];\n\t\t\tret[d2] = temp;\n\t\t}\n\t\tfor(int i = 1;i < w+1;i++){\n\t\t\tSystem.out.println(ret[i]);\n\t\t}\n\t}\n\tpublic static void main(String[] args){\n\t\tMain m = new Main();\n\t\tm.run();\n\t\t\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"import java.math.*;",
"math.*",
"java",
"public class Main {\n\tScanner sc = new Scanner(System.in);\n\tvoid run(){\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] ret = new int[w+1];\n\t\tfor(int i =0 ; i < w+1; i++) ret[i] = i;\n\t\tfor(int k = 0; k< n ; k++){\n\t\t\tString ts = sc.next();\n\t\t\tts = ts.replace(',', ' ');\n\t\t\tScanner str = new Scanner(ts);\n\t\t\tint d1 =str.nextInt();\n\t\t\tint d2 =str.nextInt();\n\t\t\tint temp = ret[d1];\n\t\t\tret[d1] = ret[d2];\n\t\t\tret[d2] = temp;\n\t\t}\n\t\tfor(int i = 1;i < w+1;i++){\n\t\t\tSystem.out.println(ret[i]);\n\t\t}\n\t}\n\tpublic static void main(String[] args){\n\t\tMain m = new Main();\n\t\tm.run();\n\t\t\n\t}\n}",
"Main",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"void run(){\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] ret = new int[w+1];\n\t\tfor(int i =0 ; i < w+1; i++) ret[i] = i;\n\t\tfor(int k = 0; k< n ; k++){\n\t\t\tString ts = sc.next();\n\t\t\tts = ts.replace(',', ' ');\n\t\t\tScanner str = new Scanner(ts);\n\t\t\tint d1 =str.nextInt();\n\t\t\tint d2 =str.nextInt();\n\t\t\tint temp = ret[d1];\n\t\t\tret[d1] = ret[d2];\n\t\t\tret[d2] = temp;\n\t\t}\n\t\tfor(int i = 1;i < w+1;i++){\n\t\t\tSystem.out.println(ret[i]);\n\t\t}\n\t}",
"run",
"{\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] ret = new int[w+1];\n\t\tfor(int i =0 ; i < w+1; i++) ret[i] = i;\n\t\tfor(int k = 0; k< n ; k++){\n\t\t\tString ts = sc.next();\n\t\t\tts = ts.replace(',', ' ');\n\t\t\tScanner str = new Scanner(ts);\n\t\t\tint d1 =str.nextInt();\n\t\t\tint d2 =str.nextInt();\n\t\t\tint temp = ret[d1];\n\t\t\tret[d1] = ret[d2];\n\t\t\tret[d2] = temp;\n\t\t}\n\t\tfor(int i = 1;i < w+1;i++){\n\t\t\tSystem.out.println(ret[i]);\n\t\t}\n\t}",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] ret = new int[w+1];",
"ret",
"new int[w+1]",
"w+1",
"w",
"1",
"for(int i =0 ; i < w+1; i++) ret[i] = i;",
"int i =0 ;",
"int i =0 ;",
"i",
"0",
"i < w+1",
"i",
"w+1",
"w",
"1",
"i++",
"i++",
"i",
"ret[i] = i;",
"ret[i] = i",
"ret[i]",
"ret",
"i",
"i",
"for(int k = 0; k< n ; k++){\n\t\t\tString ts = sc.next();\n\t\t\tts = ts.replace(',', ' ');\n\t\t\tScanner str = new Scanner(ts);\n\t\t\tint d1 =str.nextInt();\n\t\t\tint d2 =str.nextInt();\n\t\t\tint temp = ret[d1];\n\t\t\tret[d1] = ret[d2];\n\t\t\tret[d2] = temp;\n\t\t}",
"int k = 0;",
"int k = 0;",
"k",
"0",
"k< n",
"k",
"n",
"k++",
"k++",
"k",
"{\n\t\t\tString ts = sc.next();\n\t\t\tts = ts.replace(',', ' ');\n\t\t\tScanner str = new Scanner(ts);\n\t\t\tint d1 =str.nextInt();\n\t\t\tint d2 =str.nextInt();\n\t\t\tint temp = ret[d1];\n\t\t\tret[d1] = ret[d2];\n\t\t\tret[d2] = temp;\n\t\t}",
"{\n\t\t\tString ts = sc.next();\n\t\t\tts = ts.replace(',', ' ');\n\t\t\tScanner str = new Scanner(ts);\n\t\t\tint d1 =str.nextInt();\n\t\t\tint d2 =str.nextInt();\n\t\t\tint temp = ret[d1];\n\t\t\tret[d1] = ret[d2];\n\t\t\tret[d2] = temp;\n\t\t}",
"String ts = sc.next();",
"ts",
"sc.next()",
"sc.next",
"sc",
"ts = ts.replace(',', ' ')",
"ts",
"ts.replace(',', ' ')",
"ts.replace",
"ts",
"','",
"' '",
"Scanner str = new Scanner(ts);",
"str",
"new Scanner(ts)",
"int d1 =str.nextInt();",
"d1",
"str.nextInt()",
"str.nextInt",
"str",
"int d2 =str.nextInt();",
"d2",
"str.nextInt()",
"str.nextInt",
"str",
"int temp = ret[d1];",
"temp",
"ret[d1]",
"ret",
"d1",
"ret[d1] = ret[d2]",
"ret[d1]",
"ret",
"d1",
"ret[d2]",
"ret",
"d2",
"ret[d2] = temp",
"ret[d2]",
"ret",
"d2",
"temp",
"for(int i = 1;i < w+1;i++){\n\t\t\tSystem.out.println(ret[i]);\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < w+1",
"i",
"w+1",
"w",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(ret[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(ret[i]);\n\t\t}",
"System.out.println(ret[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"ret[i]",
"ret",
"i",
"public static void main(String[] args){\n\t\tMain m = new Main();\n\t\tm.run();\n\t\t\n\t}",
"main",
"{\n\t\tMain m = new Main();\n\t\tm.run();\n\t\t\n\t}",
"Main m = new Main();",
"m",
"new Main()",
"m.run()",
"m.run",
"m",
"String[] args",
"args",
"public class Main {\n\tScanner sc = new Scanner(System.in);\n\tvoid run(){\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] ret = new int[w+1];\n\t\tfor(int i =0 ; i < w+1; i++) ret[i] = i;\n\t\tfor(int k = 0; k< n ; k++){\n\t\t\tString ts = sc.next();\n\t\t\tts = ts.replace(',', ' ');\n\t\t\tScanner str = new Scanner(ts);\n\t\t\tint d1 =str.nextInt();\n\t\t\tint d2 =str.nextInt();\n\t\t\tint temp = ret[d1];\n\t\t\tret[d1] = ret[d2];\n\t\t\tret[d2] = temp;\n\t\t}\n\t\tfor(int i = 1;i < w+1;i++){\n\t\t\tSystem.out.println(ret[i]);\n\t\t}\n\t}\n\tpublic static void main(String[] args){\n\t\tMain m = new Main();\n\t\tm.run();\n\t\t\n\t}\n}",
"public class Main {\n\tScanner sc = new Scanner(System.in);\n\tvoid run(){\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] ret = new int[w+1];\n\t\tfor(int i =0 ; i < w+1; i++) ret[i] = i;\n\t\tfor(int k = 0; k< n ; k++){\n\t\t\tString ts = sc.next();\n\t\t\tts = ts.replace(',', ' ');\n\t\t\tScanner str = new Scanner(ts);\n\t\t\tint d1 =str.nextInt();\n\t\t\tint d2 =str.nextInt();\n\t\t\tint temp = ret[d1];\n\t\t\tret[d1] = ret[d2];\n\t\t\tret[d2] = temp;\n\t\t}\n\t\tfor(int i = 1;i < w+1;i++){\n\t\t\tSystem.out.println(ret[i]);\n\t\t}\n\t}\n\tpublic static void main(String[] args){\n\t\tMain m = new Main();\n\t\tm.run();\n\t\t\n\t}\n}",
"Main"
] | import java.util.*;
import java.lang.*;
import java.math.*;
public class Main {
Scanner sc = new Scanner(System.in);
void run(){
int w = sc.nextInt();
int n = sc.nextInt();
int[] ret = new int[w+1];
for(int i =0 ; i < w+1; i++) ret[i] = i;
for(int k = 0; k< n ; k++){
String ts = sc.next();
ts = ts.replace(',', ' ');
Scanner str = new Scanner(ts);
int d1 =str.nextInt();
int d2 =str.nextInt();
int temp = ret[d1];
ret[d1] = ret[d2];
ret[d2] = temp;
}
for(int i = 1;i < w+1;i++){
System.out.println(ret[i]);
}
}
public static void main(String[] args){
Main m = new Main();
m.run();
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
0,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
13,
41,
13,
41,
13,
41,
13,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
23,
24
],
[
23,
25
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
8,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
8,
49
],
[
49,
50
],
[
8,
51
],
[
51,
52
],
[
8,
53
],
[
53,
54
],
[
8,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
60,
61
],
[
61,
62
],
[
8,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
68,
69
],
[
68,
70
],
[
63,
71
],
[
71,
72
],
[
72,
73
],
[
63,
74
],
[
75,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
78,
83
],
[
75,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
89,
90
],
[
89,
91
],
[
75,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
97,
98
],
[
97,
99
],
[
75,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
102,
104
],
[
75,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
105,
109
],
[
109,
110
],
[
109,
111
],
[
75,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
112,
116
],
[
8,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
117,
122
],
[
122,
123
],
[
122,
124
],
[
117,
125
],
[
125,
126
],
[
126,
127
],
[
117,
128
],
[
129,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
130,
135
],
[
135,
136
],
[
135,
137
],
[
6,
138
],
[
138,
139
]
] | [
"import java.io.*;\n\nclass Main {\n public static void main(String[] args)throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \n \n int w = Integer.parseInt(br.readLine());\n int[] amida = new int[w+1];\n amida[0]=0;\n for(int i=0; i<=w; i++){\n amida[i] = i; \n }\n int a,b;\n int temp;\n int n = Integer.parseInt(br.readLine());\n for(int i=0; i<n; i++){\n String[] values = br.readLine().split(\",\");\n a = Integer.parseInt(values[0]);\n b = Integer.parseInt(values[1]);\n \n temp = amida[a];\n amida[a] = amida[b];\n amida[b] = temp;\n }\n \n for(int i=1; i<=w; i++){\n System.out.println(amida[i]);\n }\n \n \n \n }\n}",
"import java.io.*;",
"io.*",
"java",
"class Main {\n public static void main(String[] args)throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \n \n int w = Integer.parseInt(br.readLine());\n int[] amida = new int[w+1];\n amida[0]=0;\n for(int i=0; i<=w; i++){\n amida[i] = i; \n }\n int a,b;\n int temp;\n int n = Integer.parseInt(br.readLine());\n for(int i=0; i<n; i++){\n String[] values = br.readLine().split(\",\");\n a = Integer.parseInt(values[0]);\n b = Integer.parseInt(values[1]);\n \n temp = amida[a];\n amida[a] = amida[b];\n amida[b] = temp;\n }\n \n for(int i=1; i<=w; i++){\n System.out.println(amida[i]);\n }\n \n \n \n }\n}",
"Main",
"public static void main(String[] args)throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \n \n int w = Integer.parseInt(br.readLine());\n int[] amida = new int[w+1];\n amida[0]=0;\n for(int i=0; i<=w; i++){\n amida[i] = i; \n }\n int a,b;\n int temp;\n int n = Integer.parseInt(br.readLine());\n for(int i=0; i<n; i++){\n String[] values = br.readLine().split(\",\");\n a = Integer.parseInt(values[0]);\n b = Integer.parseInt(values[1]);\n \n temp = amida[a];\n amida[a] = amida[b];\n amida[b] = temp;\n }\n \n for(int i=1; i<=w; i++){\n System.out.println(amida[i]);\n }\n \n \n \n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \n \n int w = Integer.parseInt(br.readLine());\n int[] amida = new int[w+1];\n amida[0]=0;\n for(int i=0; i<=w; i++){\n amida[i] = i; \n }\n int a,b;\n int temp;\n int n = Integer.parseInt(br.readLine());\n for(int i=0; i<n; i++){\n String[] values = br.readLine().split(\",\");\n a = Integer.parseInt(values[0]);\n b = Integer.parseInt(values[1]);\n \n temp = amida[a];\n amida[a] = amida[b];\n amida[b] = temp;\n }\n \n for(int i=1; i<=w; i++){\n System.out.println(amida[i]);\n }\n \n \n \n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int w = Integer.parseInt(br.readLine());",
"w",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int[] amida = new int[w+1];",
"amida",
"new int[w+1]",
"w+1",
"w",
"1",
"amida[0]=0",
"amida[0]",
"amida",
"0",
"0",
"for(int i=0; i<=w; i++){\n amida[i] = i; \n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<=w",
"i",
"w",
"i++",
"i++",
"i",
"{\n amida[i] = i; \n }",
"{\n amida[i] = i; \n }",
"amida[i] = i",
"amida[i]",
"amida",
"i",
"i",
"int a",
"a",
"b;",
"b",
"int temp;",
"temp",
"int n = Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"for(int i=0; i<n; i++){\n String[] values = br.readLine().split(\",\");\n a = Integer.parseInt(values[0]);\n b = Integer.parseInt(values[1]);\n \n temp = amida[a];\n amida[a] = amida[b];\n amida[b] = temp;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String[] values = br.readLine().split(\",\");\n a = Integer.parseInt(values[0]);\n b = Integer.parseInt(values[1]);\n \n temp = amida[a];\n amida[a] = amida[b];\n amida[b] = temp;\n }",
"{\n String[] values = br.readLine().split(\",\");\n a = Integer.parseInt(values[0]);\n b = Integer.parseInt(values[1]);\n \n temp = amida[a];\n amida[a] = amida[b];\n amida[b] = temp;\n }",
"String[] values = br.readLine().split(\",\");",
"values",
"br.readLine().split(\",\")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\",\"",
"a = Integer.parseInt(values[0])",
"a",
"Integer.parseInt(values[0])",
"Integer.parseInt",
"Integer",
"values[0]",
"values",
"0",
"b = Integer.parseInt(values[1])",
"b",
"Integer.parseInt(values[1])",
"Integer.parseInt",
"Integer",
"values[1]",
"values",
"1",
"temp = amida[a]",
"temp",
"amida[a]",
"amida",
"a",
"amida[a] = amida[b]",
"amida[a]",
"amida",
"a",
"amida[b]",
"amida",
"b",
"amida[b] = temp",
"amida[b]",
"amida",
"b",
"temp",
"for(int i=1; i<=w; i++){\n System.out.println(amida[i]);\n }",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=w",
"i",
"w",
"i++",
"i++",
"i",
"{\n System.out.println(amida[i]);\n }",
"{\n System.out.println(amida[i]);\n }",
"System.out.println(amida[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"amida[i]",
"amida",
"i",
"String[] args",
"args"
] | import java.io.*;
class Main {
public static void main(String[] args)throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int w = Integer.parseInt(br.readLine());
int[] amida = new int[w+1];
amida[0]=0;
for(int i=0; i<=w; i++){
amida[i] = i;
}
int a,b;
int temp;
int n = Integer.parseInt(br.readLine());
for(int i=0; i<n; i++){
String[] values = br.readLine().split(",");
a = Integer.parseInt(values[0]);
b = Integer.parseInt(values[1]);
temp = amida[a];
amida[a] = amida[b];
amida[b] = temp;
}
for(int i=1; i<=w; i++){
System.out.println(amida[i]);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
4,
18,
18,
13,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
13,
0,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
2,
13,
17,
41,
13,
4,
18,
13,
2,
13,
17,
4,
18,
13,
2,
13,
17,
13,
4,
18,
13,
2,
13,
17,
13,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
154,
14
],
[
154,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
21,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
30,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
30,
42
],
[
42,
43
],
[
42,
44
],
[
30,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
50,
51
],
[
50,
52
],
[
45,
53
],
[
53,
54
],
[
54,
55
],
[
45,
56
],
[
57,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
30,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
30,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
30,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
78,
79
],
[
78,
80
],
[
73,
81
],
[
81,
82
],
[
82,
83
],
[
73,
84
],
[
85,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
85,
91
],
[
91,
92
],
[
91,
93
],
[
85,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
97,
98
],
[
96,
99
],
[
99,
100
],
[
100,
101
],
[
85,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
104,
107
],
[
107,
108
],
[
108,
109
],
[
85,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
113,
114
],
[
112,
115
],
[
115,
116
],
[
115,
117
],
[
85,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
121,
122
],
[
120,
123
],
[
123,
124
],
[
123,
125
],
[
85,
126
],
[
126,
127
],
[
127,
128
],
[
126,
129
],
[
129,
130
],
[
129,
131
],
[
126,
132
],
[
85,
133
],
[
133,
134
],
[
134,
135
],
[
133,
136
],
[
136,
137
],
[
136,
138
],
[
133,
139
],
[
30,
140
],
[
140,
141
],
[
140,
142
],
[
140,
143
],
[
144,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
145,
150
],
[
15,
151
],
[
151,
152
],
[
0,
153
],
[
153,
154
],
[
153,
155
]
] | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n String line = br.readLine();\n int w = Integer.parseInt(line);\n ArrayList<Integer> vline = new ArrayList<>();\n for(int i=1 ; i<=w ;i++){\n vline.add(i);\n }\n line = br.readLine();\n int n = Integer.parseInt(line);\n for (int i = 0; i < n; i++) {\n line = br.readLine();\n StringTokenizer st = new StringTokenizer(line, \",\");\n int vNum1 = Integer.parseInt(st.nextToken());\n int vNum2 = Integer.parseInt(st.nextToken());\n int originalNum1 = vline.get(vNum1 -1);\n int originalNum2 = vline.get(vNum2 -1);\n vline.set(vNum1 -1,originalNum2);\n vline.set(vNum2 - 1,originalNum1);\n }\n for(int i:vline){\n System.out.println(i);\n }\n } catch (Exception e) {\n System.err.println();\n }\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main {\n\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n String line = br.readLine();\n int w = Integer.parseInt(line);\n ArrayList<Integer> vline = new ArrayList<>();\n for(int i=1 ; i<=w ;i++){\n vline.add(i);\n }\n line = br.readLine();\n int n = Integer.parseInt(line);\n for (int i = 0; i < n; i++) {\n line = br.readLine();\n StringTokenizer st = new StringTokenizer(line, \",\");\n int vNum1 = Integer.parseInt(st.nextToken());\n int vNum2 = Integer.parseInt(st.nextToken());\n int originalNum1 = vline.get(vNum1 -1);\n int originalNum2 = vline.get(vNum2 -1);\n vline.set(vNum1 -1,originalNum2);\n vline.set(vNum2 - 1,originalNum1);\n }\n for(int i:vline){\n System.out.println(i);\n }\n } catch (Exception e) {\n System.err.println();\n }\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n String line = br.readLine();\n int w = Integer.parseInt(line);\n ArrayList<Integer> vline = new ArrayList<>();\n for(int i=1 ; i<=w ;i++){\n vline.add(i);\n }\n line = br.readLine();\n int n = Integer.parseInt(line);\n for (int i = 0; i < n; i++) {\n line = br.readLine();\n StringTokenizer st = new StringTokenizer(line, \",\");\n int vNum1 = Integer.parseInt(st.nextToken());\n int vNum2 = Integer.parseInt(st.nextToken());\n int originalNum1 = vline.get(vNum1 -1);\n int originalNum2 = vline.get(vNum2 -1);\n vline.set(vNum1 -1,originalNum2);\n vline.set(vNum2 - 1,originalNum1);\n }\n for(int i:vline){\n System.out.println(i);\n }\n } catch (Exception e) {\n System.err.println();\n }\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n String line = br.readLine();\n int w = Integer.parseInt(line);\n ArrayList<Integer> vline = new ArrayList<>();\n for(int i=1 ; i<=w ;i++){\n vline.add(i);\n }\n line = br.readLine();\n int n = Integer.parseInt(line);\n for (int i = 0; i < n; i++) {\n line = br.readLine();\n StringTokenizer st = new StringTokenizer(line, \",\");\n int vNum1 = Integer.parseInt(st.nextToken());\n int vNum2 = Integer.parseInt(st.nextToken());\n int originalNum1 = vline.get(vNum1 -1);\n int originalNum2 = vline.get(vNum2 -1);\n vline.set(vNum1 -1,originalNum2);\n vline.set(vNum2 - 1,originalNum1);\n }\n for(int i:vline){\n System.out.println(i);\n }\n } catch (Exception e) {\n System.err.println();\n }\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"try {\n String line = br.readLine();\n int w = Integer.parseInt(line);\n ArrayList<Integer> vline = new ArrayList<>();\n for(int i=1 ; i<=w ;i++){\n vline.add(i);\n }\n line = br.readLine();\n int n = Integer.parseInt(line);\n for (int i = 0; i < n; i++) {\n line = br.readLine();\n StringTokenizer st = new StringTokenizer(line, \",\");\n int vNum1 = Integer.parseInt(st.nextToken());\n int vNum2 = Integer.parseInt(st.nextToken());\n int originalNum1 = vline.get(vNum1 -1);\n int originalNum2 = vline.get(vNum2 -1);\n vline.set(vNum1 -1,originalNum2);\n vline.set(vNum2 - 1,originalNum1);\n }\n for(int i:vline){\n System.out.println(i);\n }\n } catch (Exception e) {\n System.err.println();\n }",
"catch (Exception e) {\n System.err.println();\n }",
"Exception e",
"{\n System.err.println();\n }",
"System.err.println()",
"System.err.println",
"System.err",
"System",
"System.err",
"{\n String line = br.readLine();\n int w = Integer.parseInt(line);\n ArrayList<Integer> vline = new ArrayList<>();\n for(int i=1 ; i<=w ;i++){\n vline.add(i);\n }\n line = br.readLine();\n int n = Integer.parseInt(line);\n for (int i = 0; i < n; i++) {\n line = br.readLine();\n StringTokenizer st = new StringTokenizer(line, \",\");\n int vNum1 = Integer.parseInt(st.nextToken());\n int vNum2 = Integer.parseInt(st.nextToken());\n int originalNum1 = vline.get(vNum1 -1);\n int originalNum2 = vline.get(vNum2 -1);\n vline.set(vNum1 -1,originalNum2);\n vline.set(vNum2 - 1,originalNum1);\n }\n for(int i:vline){\n System.out.println(i);\n }\n }",
"String line = br.readLine();",
"line",
"br.readLine()",
"br.readLine",
"br",
"int w = Integer.parseInt(line);",
"w",
"Integer.parseInt(line)",
"Integer.parseInt",
"Integer",
"line",
"ArrayList<Integer> vline = new ArrayList<>();",
"vline",
"new ArrayList<>()",
"for(int i=1 ; i<=w ;i++){\n vline.add(i);\n }",
"int i=1 ;",
"int i=1 ;",
"i",
"1",
"i<=w",
"i",
"w",
"i++",
"i++",
"i",
"{\n vline.add(i);\n }",
"{\n vline.add(i);\n }",
"vline.add(i)",
"vline.add",
"vline",
"i",
"line = br.readLine()",
"line",
"br.readLine()",
"br.readLine",
"br",
"int n = Integer.parseInt(line);",
"n",
"Integer.parseInt(line)",
"Integer.parseInt",
"Integer",
"line",
"for (int i = 0; i < n; i++) {\n line = br.readLine();\n StringTokenizer st = new StringTokenizer(line, \",\");\n int vNum1 = Integer.parseInt(st.nextToken());\n int vNum2 = Integer.parseInt(st.nextToken());\n int originalNum1 = vline.get(vNum1 -1);\n int originalNum2 = vline.get(vNum2 -1);\n vline.set(vNum1 -1,originalNum2);\n vline.set(vNum2 - 1,originalNum1);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n line = br.readLine();\n StringTokenizer st = new StringTokenizer(line, \",\");\n int vNum1 = Integer.parseInt(st.nextToken());\n int vNum2 = Integer.parseInt(st.nextToken());\n int originalNum1 = vline.get(vNum1 -1);\n int originalNum2 = vline.get(vNum2 -1);\n vline.set(vNum1 -1,originalNum2);\n vline.set(vNum2 - 1,originalNum1);\n }",
"{\n line = br.readLine();\n StringTokenizer st = new StringTokenizer(line, \",\");\n int vNum1 = Integer.parseInt(st.nextToken());\n int vNum2 = Integer.parseInt(st.nextToken());\n int originalNum1 = vline.get(vNum1 -1);\n int originalNum2 = vline.get(vNum2 -1);\n vline.set(vNum1 -1,originalNum2);\n vline.set(vNum2 - 1,originalNum1);\n }",
"line = br.readLine()",
"line",
"br.readLine()",
"br.readLine",
"br",
"StringTokenizer st = new StringTokenizer(line, \",\");",
"st",
"new StringTokenizer(line, \",\")",
"int vNum1 = Integer.parseInt(st.nextToken());",
"vNum1",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"int vNum2 = Integer.parseInt(st.nextToken());",
"vNum2",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"int originalNum1 = vline.get(vNum1 -1);",
"originalNum1",
"vline.get(vNum1 -1)",
"vline.get",
"vline",
"vNum1 -1",
"vNum1",
"1",
"int originalNum2 = vline.get(vNum2 -1);",
"originalNum2",
"vline.get(vNum2 -1)",
"vline.get",
"vline",
"vNum2 -1",
"vNum2",
"1",
"vline.set(vNum1 -1,originalNum2)",
"vline.set",
"vline",
"vNum1 -1",
"vNum1",
"1",
"originalNum2",
"vline.set(vNum2 - 1,originalNum1)",
"vline.set",
"vline",
"vNum2 - 1",
"vNum2",
"1",
"originalNum1",
"for(int i:vline){\n System.out.println(i);\n }",
"int i",
"vline",
"{\n System.out.println(i);\n }",
"{\n System.out.println(i);\n }",
"System.out.println(i)",
"System.out.println",
"System.out",
"System",
"System.out",
"i",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n String line = br.readLine();\n int w = Integer.parseInt(line);\n ArrayList<Integer> vline = new ArrayList<>();\n for(int i=1 ; i<=w ;i++){\n vline.add(i);\n }\n line = br.readLine();\n int n = Integer.parseInt(line);\n for (int i = 0; i < n; i++) {\n line = br.readLine();\n StringTokenizer st = new StringTokenizer(line, \",\");\n int vNum1 = Integer.parseInt(st.nextToken());\n int vNum2 = Integer.parseInt(st.nextToken());\n int originalNum1 = vline.get(vNum1 -1);\n int originalNum2 = vline.get(vNum2 -1);\n vline.set(vNum1 -1,originalNum2);\n vline.set(vNum2 - 1,originalNum1);\n }\n for(int i:vline){\n System.out.println(i);\n }\n } catch (Exception e) {\n System.err.println();\n }\n }\n}",
"public class Main {\n\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n String line = br.readLine();\n int w = Integer.parseInt(line);\n ArrayList<Integer> vline = new ArrayList<>();\n for(int i=1 ; i<=w ;i++){\n vline.add(i);\n }\n line = br.readLine();\n int n = Integer.parseInt(line);\n for (int i = 0; i < n; i++) {\n line = br.readLine();\n StringTokenizer st = new StringTokenizer(line, \",\");\n int vNum1 = Integer.parseInt(st.nextToken());\n int vNum2 = Integer.parseInt(st.nextToken());\n int originalNum1 = vline.get(vNum1 -1);\n int originalNum2 = vline.get(vNum2 -1);\n vline.set(vNum1 -1,originalNum2);\n vline.set(vNum2 - 1,originalNum1);\n }\n for(int i:vline){\n System.out.println(i);\n }\n } catch (Exception e) {\n System.err.println();\n }\n }\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
try {
String line = br.readLine();
int w = Integer.parseInt(line);
ArrayList<Integer> vline = new ArrayList<>();
for(int i=1 ; i<=w ;i++){
vline.add(i);
}
line = br.readLine();
int n = Integer.parseInt(line);
for (int i = 0; i < n; i++) {
line = br.readLine();
StringTokenizer st = new StringTokenizer(line, ",");
int vNum1 = Integer.parseInt(st.nextToken());
int vNum2 = Integer.parseInt(st.nextToken());
int originalNum1 = vline.get(vNum1 -1);
int originalNum2 = vline.get(vNum2 -1);
vline.set(vNum1 -1,originalNum2);
vline.set(vNum2 - 1,originalNum1);
}
for(int i:vline){
System.out.println(i);
}
} catch (Exception e) {
System.err.println();
}
}
} |
[
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,
2,
13,
17,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
13,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
12,
13,
30,
0,
13,
17,
0,
13,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
29,
13,
23,
13,
23,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
151,
5
],
[
151,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
26,
27
],
[
26,
28
],
[
21,
29
],
[
29,
30
],
[
30,
31
],
[
21,
32
],
[
33,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
38,
39
],
[
38,
40
],
[
8,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
8,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
58,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
58,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
75,
76
],
[
75,
77
],
[
58,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
83,
84
],
[
83,
85
],
[
58,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
88,
90
],
[
88,
91
],
[
88,
92
],
[
8,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
98,
99
],
[
98,
100
],
[
93,
101
],
[
101,
102
],
[
102,
103
],
[
93,
104
],
[
105,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
106,
111
],
[
111,
112
],
[
111,
113
],
[
6,
114
],
[
114,
115
],
[
151,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
118,
122
],
[
122,
123
],
[
122,
124
],
[
118,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
127,
129
],
[
118,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
130,
134
],
[
134,
135
],
[
134,
136
],
[
118,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
137,
141
],
[
118,
142
],
[
142,
143
],
[
116,
144
],
[
144,
145
],
[
116,
146
],
[
146,
147
],
[
116,
148
],
[
148,
149
],
[
0,
150
],
[
150,
151
],
[
150,
152
]
] | [
"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 w = sc.nextInt();\n\t\tint[] nums = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tnums[i] = i+1;\t\n\t\t}\n\t\tint n = sc.nextInt();\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString input = sc.next();\n\t\t\tString[] resultInput = input.split(\",\");\n\t\t\tint a = Integer.parseInt(resultInput[0]);\n\t\t\tint b = Integer.parseInt(resultInput[1]);\n\t\t\tnums = swap(nums, a, b);\n\t\t}\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(nums[i]);\n\t\t}\n\t}\n\n\tpublic static int[] swap(int[] nums, int a, int b){\n\t\ta -= 1;\n\t\tb -= 1;\n\t\tint tmp = nums[a];\n\t\tnums[a] = nums[b];\n\t\tnums[b] = tmp;\n\t\treturn nums;\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\tpublic static void main(String args[]){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint[] nums = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tnums[i] = i+1;\t\n\t\t}\n\t\tint n = sc.nextInt();\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString input = sc.next();\n\t\t\tString[] resultInput = input.split(\",\");\n\t\t\tint a = Integer.parseInt(resultInput[0]);\n\t\t\tint b = Integer.parseInt(resultInput[1]);\n\t\t\tnums = swap(nums, a, b);\n\t\t}\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(nums[i]);\n\t\t}\n\t}\n\n\tpublic static int[] swap(int[] nums, int a, int b){\n\t\ta -= 1;\n\t\tb -= 1;\n\t\tint tmp = nums[a];\n\t\tnums[a] = nums[b];\n\t\tnums[b] = tmp;\n\t\treturn nums;\n\t}\n}",
"Main",
"public static void main(String args[]){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint[] nums = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tnums[i] = i+1;\t\n\t\t}\n\t\tint n = sc.nextInt();\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString input = sc.next();\n\t\t\tString[] resultInput = input.split(\",\");\n\t\t\tint a = Integer.parseInt(resultInput[0]);\n\t\t\tint b = Integer.parseInt(resultInput[1]);\n\t\t\tnums = swap(nums, a, b);\n\t\t}\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(nums[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint[] nums = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tnums[i] = i+1;\t\n\t\t}\n\t\tint n = sc.nextInt();\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString input = sc.next();\n\t\t\tString[] resultInput = input.split(\",\");\n\t\t\tint a = Integer.parseInt(resultInput[0]);\n\t\t\tint b = Integer.parseInt(resultInput[1]);\n\t\t\tnums = swap(nums, a, b);\n\t\t}\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(nums[i]);\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] nums = new int[w];",
"nums",
"new int[w]",
"w",
"for(int i = 0; i < w; i++){\n\t\t\tnums[i] = i+1;\t\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tnums[i] = i+1;\t\n\t\t}",
"{\n\t\t\tnums[i] = i+1;\t\n\t\t}",
"nums[i] = i+1",
"nums[i]",
"nums",
"i",
"i+1",
"i",
"1",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i = 0; i < n; i++){\n\t\t\tString input = sc.next();\n\t\t\tString[] resultInput = input.split(\",\");\n\t\t\tint a = Integer.parseInt(resultInput[0]);\n\t\t\tint b = Integer.parseInt(resultInput[1]);\n\t\t\tnums = swap(nums, a, b);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString input = sc.next();\n\t\t\tString[] resultInput = input.split(\",\");\n\t\t\tint a = Integer.parseInt(resultInput[0]);\n\t\t\tint b = Integer.parseInt(resultInput[1]);\n\t\t\tnums = swap(nums, a, b);\n\t\t}",
"{\n\t\t\tString input = sc.next();\n\t\t\tString[] resultInput = input.split(\",\");\n\t\t\tint a = Integer.parseInt(resultInput[0]);\n\t\t\tint b = Integer.parseInt(resultInput[1]);\n\t\t\tnums = swap(nums, a, b);\n\t\t}",
"String input = sc.next();",
"input",
"sc.next()",
"sc.next",
"sc",
"String[] resultInput = input.split(\",\");",
"resultInput",
"input.split(\",\")",
"input.split",
"input",
"\",\"",
"int a = Integer.parseInt(resultInput[0]);",
"a",
"Integer.parseInt(resultInput[0])",
"Integer.parseInt",
"Integer",
"resultInput[0]",
"resultInput",
"0",
"int b = Integer.parseInt(resultInput[1]);",
"b",
"Integer.parseInt(resultInput[1])",
"Integer.parseInt",
"Integer",
"resultInput[1]",
"resultInput",
"1",
"nums = swap(nums, a, b)",
"nums",
"swap(nums, a, b)",
"swap",
"nums",
"a",
"b",
"for(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(nums[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(nums[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(nums[i]);\n\t\t}",
"System.out.println(nums[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"nums[i]",
"nums",
"i",
"String args[]",
"args",
"public static int[] swap(int[] nums, int a, int b){\n\t\ta -= 1;\n\t\tb -= 1;\n\t\tint tmp = nums[a];\n\t\tnums[a] = nums[b];\n\t\tnums[b] = tmp;\n\t\treturn nums;\n\t}",
"swap",
"{\n\t\ta -= 1;\n\t\tb -= 1;\n\t\tint tmp = nums[a];\n\t\tnums[a] = nums[b];\n\t\tnums[b] = tmp;\n\t\treturn nums;\n\t}",
"a -= 1",
"a",
"1",
"b -= 1",
"b",
"1",
"int tmp = nums[a];",
"tmp",
"nums[a]",
"nums",
"a",
"nums[a] = nums[b]",
"nums[a]",
"nums",
"a",
"nums[b]",
"nums",
"b",
"nums[b] = tmp",
"nums[b]",
"nums",
"b",
"tmp",
"return nums;",
"nums",
"int[] nums",
"nums",
"int a",
"a",
"int b",
"b",
"public class Main{\n\tpublic static void main(String args[]){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint[] nums = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tnums[i] = i+1;\t\n\t\t}\n\t\tint n = sc.nextInt();\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString input = sc.next();\n\t\t\tString[] resultInput = input.split(\",\");\n\t\t\tint a = Integer.parseInt(resultInput[0]);\n\t\t\tint b = Integer.parseInt(resultInput[1]);\n\t\t\tnums = swap(nums, a, b);\n\t\t}\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(nums[i]);\n\t\t}\n\t}\n\n\tpublic static int[] swap(int[] nums, int a, int b){\n\t\ta -= 1;\n\t\tb -= 1;\n\t\tint tmp = nums[a];\n\t\tnums[a] = nums[b];\n\t\tnums[b] = tmp;\n\t\treturn nums;\n\t}\n}",
"public class Main{\n\tpublic static void main(String args[]){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint[] nums = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tnums[i] = i+1;\t\n\t\t}\n\t\tint n = sc.nextInt();\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString input = sc.next();\n\t\t\tString[] resultInput = input.split(\",\");\n\t\t\tint a = Integer.parseInt(resultInput[0]);\n\t\t\tint b = Integer.parseInt(resultInput[1]);\n\t\t\tnums = swap(nums, a, b);\n\t\t}\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(nums[i]);\n\t\t}\n\t}\n\n\tpublic static int[] swap(int[] nums, int a, int b){\n\t\ta -= 1;\n\t\tb -= 1;\n\t\tint tmp = nums[a];\n\t\tnums[a] = nums[b];\n\t\tnums[b] = tmp;\n\t\treturn nums;\n\t}\n}",
"Main"
] | import java.util.*;
public class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int w = sc.nextInt();
int[] nums = new int[w];
for(int i = 0; i < w; i++){
nums[i] = i+1;
}
int n = sc.nextInt();
for(int i = 0; i < n; i++){
String input = sc.next();
String[] resultInput = input.split(",");
int a = Integer.parseInt(resultInput[0]);
int b = Integer.parseInt(resultInput[1]);
nums = swap(nums, a, b);
}
for(int i = 0; i < w; i++){
System.out.println(nums[i]);
}
}
public static int[] swap(int[] nums, int a, int b){
a -= 1;
b -= 1;
int tmp = nums[a];
nums[a] = nums[b];
nums[b] = tmp;
return nums;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
0,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
43,
45
],
[
8,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
58,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
58,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
76,
77
],
[
76,
78
],
[
72,
79
],
[
58,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
86,
87
],
[
86,
88
],
[
82,
89
],
[
58,
90
],
[
90,
91
],
[
58,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
94,
96
],
[
58,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
101,
102
],
[
101,
103
],
[
58,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
8,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
109,
114
],
[
114,
115
],
[
114,
116
],
[
109,
117
],
[
117,
118
],
[
118,
119
],
[
109,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
121,
126
],
[
126,
127
],
[
126,
128
],
[
6,
129
],
[
129,
130
]
] | [
"import java.util.Scanner;\n\nclass Main {\n/*\n static int DrawingLots(int j, int i, int[][] ab, int n) {\n for (; j < n; j++) {\n if (ab[j][0] == i) return DrawingLots(j+1, ab[j][1], ab, n);\n else if (ab[j][1] == i) return DrawingLots(j+1, ab[j][0], ab, n);\n }\n return i;\n }\n*/\npublic static void main(String[] args) {\n Scanner stdIn = new Scanner(System.in);\n\n int w = stdIn.nextInt(); int[] ans = new int[w];\n int n = stdIn.nextInt(); \n\n for (int i = 0; i < w; i++) {\n ans[i] = i+1;\n }\n for (int i = 0; i < n; i++) {\n String tmp = stdIn.next();\n String[] ab = tmp.split(\",\");\n int a = Integer.parseInt(ab[0]) - 1;\n int b = Integer.parseInt(ab[1]) - 1;\n int tmpnum;\n tmpnum = ans[a];\n ans[a] = ans[b];\n ans[b] = tmpnum;\n }\n/*\n for (int i = 1; i < w+1; i++) {\n int j = 0;\n ans[i] = DrawingLots(j, i, ab, n);\n } \n*/\n/*\n for (int i = 1; i < w+1; i++) {\n for (int j = 1; j < w+1; j++)\n if (ans[j] == i)\n System.out.println(j);\n }\n*/\n for (int i=0; i < w; i++)\n System.out.println(ans[i]);\n }\n \n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n/*\n static int DrawingLots(int j, int i, int[][] ab, int n) {\n for (; j < n; j++) {\n if (ab[j][0] == i) return DrawingLots(j+1, ab[j][1], ab, n);\n else if (ab[j][1] == i) return DrawingLots(j+1, ab[j][0], ab, n);\n }\n return i;\n }\n*/\npublic static void main(String[] args) {\n Scanner stdIn = new Scanner(System.in);\n\n int w = stdIn.nextInt(); int[] ans = new int[w];\n int n = stdIn.nextInt(); \n\n for (int i = 0; i < w; i++) {\n ans[i] = i+1;\n }\n for (int i = 0; i < n; i++) {\n String tmp = stdIn.next();\n String[] ab = tmp.split(\",\");\n int a = Integer.parseInt(ab[0]) - 1;\n int b = Integer.parseInt(ab[1]) - 1;\n int tmpnum;\n tmpnum = ans[a];\n ans[a] = ans[b];\n ans[b] = tmpnum;\n }\n/*\n for (int i = 1; i < w+1; i++) {\n int j = 0;\n ans[i] = DrawingLots(j, i, ab, n);\n } \n*/\n/*\n for (int i = 1; i < w+1; i++) {\n for (int j = 1; j < w+1; j++)\n if (ans[j] == i)\n System.out.println(j);\n }\n*/\n for (int i=0; i < w; i++)\n System.out.println(ans[i]);\n }\n \n}",
"Main",
"/*\n static int DrawingLots(int j, int i, int[][] ab, int n) {\n for (; j < n; j++) {\n if (ab[j][0] == i) return DrawingLots(j+1, ab[j][1], ab, n);\n else if (ab[j][1] == i) return DrawingLots(j+1, ab[j][0], ab, n);\n }\n return i;\n }\n*/\npublic static void main(String[] args) {\n Scanner stdIn = new Scanner(System.in);\n\n int w = stdIn.nextInt(); int[] ans = new int[w];\n int n = stdIn.nextInt(); \n\n for (int i = 0; i < w; i++) {\n ans[i] = i+1;\n }\n for (int i = 0; i < n; i++) {\n String tmp = stdIn.next();\n String[] ab = tmp.split(\",\");\n int a = Integer.parseInt(ab[0]) - 1;\n int b = Integer.parseInt(ab[1]) - 1;\n int tmpnum;\n tmpnum = ans[a];\n ans[a] = ans[b];\n ans[b] = tmpnum;\n }\n/*\n for (int i = 1; i < w+1; i++) {\n int j = 0;\n ans[i] = DrawingLots(j, i, ab, n);\n } \n*/\n/*\n for (int i = 1; i < w+1; i++) {\n for (int j = 1; j < w+1; j++)\n if (ans[j] == i)\n System.out.println(j);\n }\n*/\n for (int i=0; i < w; i++)\n System.out.println(ans[i]);\n }",
"main",
"{\n Scanner stdIn = new Scanner(System.in);\n\n int w = stdIn.nextInt(); int[] ans = new int[w];\n int n = stdIn.nextInt(); \n\n for (int i = 0; i < w; i++) {\n ans[i] = i+1;\n }\n for (int i = 0; i < n; i++) {\n String tmp = stdIn.next();\n String[] ab = tmp.split(\",\");\n int a = Integer.parseInt(ab[0]) - 1;\n int b = Integer.parseInt(ab[1]) - 1;\n int tmpnum;\n tmpnum = ans[a];\n ans[a] = ans[b];\n ans[b] = tmpnum;\n }\n/*\n for (int i = 1; i < w+1; i++) {\n int j = 0;\n ans[i] = DrawingLots(j, i, ab, n);\n } \n*/\n/*\n for (int i = 1; i < w+1; i++) {\n for (int j = 1; j < w+1; j++)\n if (ans[j] == i)\n System.out.println(j);\n }\n*/\n for (int i=0; i < w; i++)\n System.out.println(ans[i]);\n }",
"Scanner stdIn = new Scanner(System.in);",
"stdIn",
"new Scanner(System.in)",
"int w = stdIn.nextInt();",
"w",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"int[] ans = new int[w];",
"ans",
"new int[w]",
"w",
"int n = stdIn.nextInt();",
"n",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"for (int i = 0; i < w; i++) {\n ans[i] = i+1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n ans[i] = i+1;\n }",
"{\n ans[i] = i+1;\n }",
"ans[i] = i+1",
"ans[i]",
"ans",
"i",
"i+1",
"i",
"1",
"for (int i = 0; i < n; i++) {\n String tmp = stdIn.next();\n String[] ab = tmp.split(\",\");\n int a = Integer.parseInt(ab[0]) - 1;\n int b = Integer.parseInt(ab[1]) - 1;\n int tmpnum;\n tmpnum = ans[a];\n ans[a] = ans[b];\n ans[b] = tmpnum;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String tmp = stdIn.next();\n String[] ab = tmp.split(\",\");\n int a = Integer.parseInt(ab[0]) - 1;\n int b = Integer.parseInt(ab[1]) - 1;\n int tmpnum;\n tmpnum = ans[a];\n ans[a] = ans[b];\n ans[b] = tmpnum;\n }",
"{\n String tmp = stdIn.next();\n String[] ab = tmp.split(\",\");\n int a = Integer.parseInt(ab[0]) - 1;\n int b = Integer.parseInt(ab[1]) - 1;\n int tmpnum;\n tmpnum = ans[a];\n ans[a] = ans[b];\n ans[b] = tmpnum;\n }",
"String tmp = stdIn.next();",
"tmp",
"stdIn.next()",
"stdIn.next",
"stdIn",
"String[] ab = tmp.split(\",\");",
"ab",
"tmp.split(\",\")",
"tmp.split",
"tmp",
"\",\"",
"int a = Integer.parseInt(ab[0]) - 1;",
"a",
"Integer.parseInt(ab[0]) - 1",
"Integer.parseInt(ab[0])",
"Integer.parseInt",
"Integer",
"ab[0]",
"ab",
"0",
"1",
"int b = Integer.parseInt(ab[1]) - 1;",
"b",
"Integer.parseInt(ab[1]) - 1",
"Integer.parseInt(ab[1])",
"Integer.parseInt",
"Integer",
"ab[1]",
"ab",
"1",
"1",
"int tmpnum;",
"tmpnum",
"tmpnum = ans[a]",
"tmpnum",
"ans[a]",
"ans",
"a",
"ans[a] = ans[b]",
"ans[a]",
"ans",
"a",
"ans[b]",
"ans",
"b",
"ans[b] = tmpnum",
"ans[b]",
"ans",
"b",
"tmpnum",
"for (int i=0; i < w; i++)\n System.out.println(ans[i]);",
"int i=0;",
"int i=0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"System.out.println(ans[i]);",
"System.out.println(ans[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"ans[i]",
"ans",
"i",
"String[] args",
"args"
] | import java.util.Scanner;
class Main {
/*
static int DrawingLots(int j, int i, int[][] ab, int n) {
for (; j < n; j++) {
if (ab[j][0] == i) return DrawingLots(j+1, ab[j][1], ab, n);
else if (ab[j][1] == i) return DrawingLots(j+1, ab[j][0], ab, n);
}
return i;
}
*/
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
int w = stdIn.nextInt(); int[] ans = new int[w];
int n = stdIn.nextInt();
for (int i = 0; i < w; i++) {
ans[i] = i+1;
}
for (int i = 0; i < n; i++) {
String tmp = stdIn.next();
String[] ab = tmp.split(",");
int a = Integer.parseInt(ab[0]) - 1;
int b = Integer.parseInt(ab[1]) - 1;
int tmpnum;
tmpnum = ans[a];
ans[a] = ans[b];
ans[b] = tmpnum;
}
/*
for (int i = 1; i < w+1; i++) {
int j = 0;
ans[i] = DrawingLots(j, i, ab, n);
}
*/
/*
for (int i = 1; i < w+1; i++) {
for (int j = 1; j < w+1; j++)
if (ans[j] == i)
System.out.println(j);
}
*/
for (int i=0; i < w; i++)
System.out.println(ans[i]);
}
}
|
[
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,
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,
2,
13,
17,
41,
13,
41,
13,
41,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
4,
18,
13,
17,
0,
13,
2,
4,
18,
13,
18,
13,
17,
17,
0,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
150,
11
],
[
150,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
20,
23
],
[
23,
24
],
[
24,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
31,
32
],
[
32,
33
],
[
14,
34
],
[
34,
35
],
[
34,
36
],
[
14,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
45,
47
],
[
38,
48
],
[
48,
49
],
[
49,
50
],
[
38,
51
],
[
52,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
57,
58
],
[
57,
59
],
[
14,
60
],
[
60,
61
],
[
14,
62
],
[
62,
63
],
[
14,
64
],
[
64,
65
],
[
14,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
71,
72
],
[
71,
73
],
[
66,
74
],
[
74,
75
],
[
75,
76
],
[
66,
77
],
[
78,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
81,
86
],
[
78,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
93,
94
],
[
93,
95
],
[
89,
96
],
[
78,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
100,
103
],
[
103,
104
],
[
103,
105
],
[
99,
106
],
[
78,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
109,
111
],
[
78,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
112,
116
],
[
116,
117
],
[
116,
118
],
[
78,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
119,
123
],
[
14,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
124,
129
],
[
129,
130
],
[
129,
131
],
[
131,
132
],
[
131,
133
],
[
124,
134
],
[
134,
135
],
[
135,
136
],
[
124,
137
],
[
138,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
139,
144
],
[
144,
145
],
[
144,
146
],
[
12,
147
],
[
147,
148
],
[
0,
149
],
[
149,
150
],
[
149,
151
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint w = Integer.parseInt(br.readLine());\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint[] lots = new int[w];\n\t\tfor(int i = 0;i < lots.length;i++){\n\t\t\tlots[i] = i + 1;\n\t\t}\n\t\tString[] buf;\n\t\tint leader, trailer;\n\t\tfor(int i = 0;i < n;i++){\n\t\t\tbuf = br.readLine().split(\",\");\n\t\t\tleader = Integer.parseInt(buf[0]) - 1;\n\t\t\ttrailer = Integer.parseInt(buf[1]) - 1;\n\t\t\tint tmp = lots[leader];\n\t\t\tlots[leader] = lots[trailer];\n\t\t\tlots[trailer] = tmp;\n\t\t}\n\t\tfor(int i = 0;i < lots.length;i++){\n\t\t\tSystem.out.println(lots[i]);\n\t\t}\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint w = Integer.parseInt(br.readLine());\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint[] lots = new int[w];\n\t\tfor(int i = 0;i < lots.length;i++){\n\t\t\tlots[i] = i + 1;\n\t\t}\n\t\tString[] buf;\n\t\tint leader, trailer;\n\t\tfor(int i = 0;i < n;i++){\n\t\t\tbuf = br.readLine().split(\",\");\n\t\t\tleader = Integer.parseInt(buf[0]) - 1;\n\t\t\ttrailer = Integer.parseInt(buf[1]) - 1;\n\t\t\tint tmp = lots[leader];\n\t\t\tlots[leader] = lots[trailer];\n\t\t\tlots[trailer] = tmp;\n\t\t}\n\t\tfor(int i = 0;i < lots.length;i++){\n\t\t\tSystem.out.println(lots[i]);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint w = Integer.parseInt(br.readLine());\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint[] lots = new int[w];\n\t\tfor(int i = 0;i < lots.length;i++){\n\t\t\tlots[i] = i + 1;\n\t\t}\n\t\tString[] buf;\n\t\tint leader, trailer;\n\t\tfor(int i = 0;i < n;i++){\n\t\t\tbuf = br.readLine().split(\",\");\n\t\t\tleader = Integer.parseInt(buf[0]) - 1;\n\t\t\ttrailer = Integer.parseInt(buf[1]) - 1;\n\t\t\tint tmp = lots[leader];\n\t\t\tlots[leader] = lots[trailer];\n\t\t\tlots[trailer] = tmp;\n\t\t}\n\t\tfor(int i = 0;i < lots.length;i++){\n\t\t\tSystem.out.println(lots[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint w = Integer.parseInt(br.readLine());\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint[] lots = new int[w];\n\t\tfor(int i = 0;i < lots.length;i++){\n\t\t\tlots[i] = i + 1;\n\t\t}\n\t\tString[] buf;\n\t\tint leader, trailer;\n\t\tfor(int i = 0;i < n;i++){\n\t\t\tbuf = br.readLine().split(\",\");\n\t\t\tleader = Integer.parseInt(buf[0]) - 1;\n\t\t\ttrailer = Integer.parseInt(buf[1]) - 1;\n\t\t\tint tmp = lots[leader];\n\t\t\tlots[leader] = lots[trailer];\n\t\t\tlots[trailer] = tmp;\n\t\t}\n\t\tfor(int i = 0;i < lots.length;i++){\n\t\t\tSystem.out.println(lots[i]);\n\t\t}\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int w = Integer.parseInt(br.readLine());",
"w",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int n = Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int[] lots = new int[w];",
"lots",
"new int[w]",
"w",
"for(int i = 0;i < lots.length;i++){\n\t\t\tlots[i] = i + 1;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < lots.length",
"i",
"lots.length",
"lots",
"lots.length",
"i++",
"i++",
"i",
"{\n\t\t\tlots[i] = i + 1;\n\t\t}",
"{\n\t\t\tlots[i] = i + 1;\n\t\t}",
"lots[i] = i + 1",
"lots[i]",
"lots",
"i",
"i + 1",
"i",
"1",
"String[] buf;",
"buf",
"int leader",
"leader",
"trailer;",
"trailer",
"for(int i = 0;i < n;i++){\n\t\t\tbuf = br.readLine().split(\",\");\n\t\t\tleader = Integer.parseInt(buf[0]) - 1;\n\t\t\ttrailer = Integer.parseInt(buf[1]) - 1;\n\t\t\tint tmp = lots[leader];\n\t\t\tlots[leader] = lots[trailer];\n\t\t\tlots[trailer] = tmp;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tbuf = br.readLine().split(\",\");\n\t\t\tleader = Integer.parseInt(buf[0]) - 1;\n\t\t\ttrailer = Integer.parseInt(buf[1]) - 1;\n\t\t\tint tmp = lots[leader];\n\t\t\tlots[leader] = lots[trailer];\n\t\t\tlots[trailer] = tmp;\n\t\t}",
"{\n\t\t\tbuf = br.readLine().split(\",\");\n\t\t\tleader = Integer.parseInt(buf[0]) - 1;\n\t\t\ttrailer = Integer.parseInt(buf[1]) - 1;\n\t\t\tint tmp = lots[leader];\n\t\t\tlots[leader] = lots[trailer];\n\t\t\tlots[trailer] = tmp;\n\t\t}",
"buf = br.readLine().split(\",\")",
"buf",
"br.readLine().split(\",\")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\",\"",
"leader = Integer.parseInt(buf[0]) - 1",
"leader",
"Integer.parseInt(buf[0]) - 1",
"Integer.parseInt(buf[0])",
"Integer.parseInt",
"Integer",
"buf[0]",
"buf",
"0",
"1",
"trailer = Integer.parseInt(buf[1]) - 1",
"trailer",
"Integer.parseInt(buf[1]) - 1",
"Integer.parseInt(buf[1])",
"Integer.parseInt",
"Integer",
"buf[1]",
"buf",
"1",
"1",
"int tmp = lots[leader];",
"tmp",
"lots[leader]",
"lots",
"leader",
"lots[leader] = lots[trailer]",
"lots[leader]",
"lots",
"leader",
"lots[trailer]",
"lots",
"trailer",
"lots[trailer] = tmp",
"lots[trailer]",
"lots",
"trailer",
"tmp",
"for(int i = 0;i < lots.length;i++){\n\t\t\tSystem.out.println(lots[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < lots.length",
"i",
"lots.length",
"lots",
"lots.length",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(lots[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(lots[i]);\n\t\t}",
"System.out.println(lots[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"lots[i]",
"lots",
"i",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint w = Integer.parseInt(br.readLine());\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint[] lots = new int[w];\n\t\tfor(int i = 0;i < lots.length;i++){\n\t\t\tlots[i] = i + 1;\n\t\t}\n\t\tString[] buf;\n\t\tint leader, trailer;\n\t\tfor(int i = 0;i < n;i++){\n\t\t\tbuf = br.readLine().split(\",\");\n\t\t\tleader = Integer.parseInt(buf[0]) - 1;\n\t\t\ttrailer = Integer.parseInt(buf[1]) - 1;\n\t\t\tint tmp = lots[leader];\n\t\t\tlots[leader] = lots[trailer];\n\t\t\tlots[trailer] = tmp;\n\t\t}\n\t\tfor(int i = 0;i < lots.length;i++){\n\t\t\tSystem.out.println(lots[i]);\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint w = Integer.parseInt(br.readLine());\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint[] lots = new int[w];\n\t\tfor(int i = 0;i < lots.length;i++){\n\t\t\tlots[i] = i + 1;\n\t\t}\n\t\tString[] buf;\n\t\tint leader, trailer;\n\t\tfor(int i = 0;i < n;i++){\n\t\t\tbuf = br.readLine().split(\",\");\n\t\t\tleader = Integer.parseInt(buf[0]) - 1;\n\t\t\ttrailer = Integer.parseInt(buf[1]) - 1;\n\t\t\tint tmp = lots[leader];\n\t\t\tlots[leader] = lots[trailer];\n\t\t\tlots[trailer] = tmp;\n\t\t}\n\t\tfor(int i = 0;i < lots.length;i++){\n\t\t\tSystem.out.println(lots[i]);\n\t\t}\n\t}\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws NumberFormatException, IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int w = Integer.parseInt(br.readLine());
int n = Integer.parseInt(br.readLine());
int[] lots = new int[w];
for(int i = 0;i < lots.length;i++){
lots[i] = i + 1;
}
String[] buf;
int leader, trailer;
for(int i = 0;i < n;i++){
buf = br.readLine().split(",");
leader = Integer.parseInt(buf[0]) - 1;
trailer = Integer.parseInt(buf[1]) - 1;
int tmp = lots[leader];
lots[leader] = lots[trailer];
lots[trailer] = tmp;
}
for(int i = 0;i < lots.length;i++){
System.out.println(lots[i]);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
4,
18,
20,
17,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
0,
13,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
127,
5
],
[
127,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
11,
14
],
[
8,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
8,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
46,
48
],
[
8,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
54,
55
],
[
54,
56
],
[
49,
57
],
[
57,
58
],
[
58,
59
],
[
49,
60
],
[
61,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
61,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
61,
72
],
[
72,
73
],
[
72,
74
],
[
61,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
79,
81
],
[
61,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
85,
87
],
[
82,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
90,
92
],
[
61,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
96,
98
],
[
93,
99
],
[
8,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
100,
105
],
[
105,
106
],
[
105,
107
],
[
100,
108
],
[
108,
109
],
[
109,
110
],
[
100,
111
],
[
112,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
113,
118
],
[
118,
119
],
[
118,
120
],
[
8,
121
],
[
121,
122
],
[
122,
123
],
[
6,
124
],
[
124,
125
],
[
0,
126
],
[
126,
127
],
[
126,
128
]
] | [
"import java.util.Scanner;\npublic class Main {\n public static void main(String[] arg){\n Scanner sc = new Scanner(System.in).useDelimiter(\"[,\\n]\");\n int w = sc.nextInt();\n int n = sc.nextInt();\n int num[] = new int[w];\n for(int i=0;i<w;i++){\n num[i]=i+1;\n }\n for(int i=0;i<n;i++){\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = 0;\n c=num[a-1];\n num[a-1]=num[b-1];\n num[b-1]=c;\n }\n for(int i=0;i<w;i++){\n System.out.println(num[i]);\n }\n sc.close();\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] arg){\n Scanner sc = new Scanner(System.in).useDelimiter(\"[,\\n]\");\n int w = sc.nextInt();\n int n = sc.nextInt();\n int num[] = new int[w];\n for(int i=0;i<w;i++){\n num[i]=i+1;\n }\n for(int i=0;i<n;i++){\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = 0;\n c=num[a-1];\n num[a-1]=num[b-1];\n num[b-1]=c;\n }\n for(int i=0;i<w;i++){\n System.out.println(num[i]);\n }\n sc.close();\n }\n}",
"Main",
"public static void main(String[] arg){\n Scanner sc = new Scanner(System.in).useDelimiter(\"[,\\n]\");\n int w = sc.nextInt();\n int n = sc.nextInt();\n int num[] = new int[w];\n for(int i=0;i<w;i++){\n num[i]=i+1;\n }\n for(int i=0;i<n;i++){\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = 0;\n c=num[a-1];\n num[a-1]=num[b-1];\n num[b-1]=c;\n }\n for(int i=0;i<w;i++){\n System.out.println(num[i]);\n }\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in).useDelimiter(\"[,\\n]\");\n int w = sc.nextInt();\n int n = sc.nextInt();\n int num[] = new int[w];\n for(int i=0;i<w;i++){\n num[i]=i+1;\n }\n for(int i=0;i<n;i++){\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = 0;\n c=num[a-1];\n num[a-1]=num[b-1];\n num[b-1]=c;\n }\n for(int i=0;i<w;i++){\n System.out.println(num[i]);\n }\n sc.close();\n }",
"Scanner sc = new Scanner(System.in).useDelimiter(\"[,\\n]\");",
"sc",
"new Scanner(System.in).useDelimiter(\"[,\\n]\")",
"new Scanner(System.in).useDelimiter",
"new Scanner(System.in)",
"\"[,\\n]\"",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int num[] = new int[w];",
"num",
"new int[w]",
"w",
"for(int i=0;i<w;i++){\n num[i]=i+1;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"{\n num[i]=i+1;\n }",
"{\n num[i]=i+1;\n }",
"num[i]=i+1",
"num[i]",
"num",
"i",
"i+1",
"i",
"1",
"for(int i=0;i<n;i++){\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = 0;\n c=num[a-1];\n num[a-1]=num[b-1];\n num[b-1]=c;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = 0;\n c=num[a-1];\n num[a-1]=num[b-1];\n num[b-1]=c;\n }",
"{\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = 0;\n c=num[a-1];\n num[a-1]=num[b-1];\n num[b-1]=c;\n }",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int c = 0;",
"c",
"0",
"c=num[a-1]",
"c",
"num[a-1]",
"num",
"a-1",
"a",
"1",
"num[a-1]=num[b-1]",
"num[a-1]",
"num",
"a-1",
"a",
"1",
"num[b-1]",
"num",
"b-1",
"b",
"1",
"num[b-1]=c",
"num[b-1]",
"num",
"b-1",
"b",
"1",
"c",
"for(int i=0;i<w;i++){\n System.out.println(num[i]);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"{\n System.out.println(num[i]);\n }",
"{\n System.out.println(num[i]);\n }",
"System.out.println(num[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"num[i]",
"num",
"i",
"sc.close()",
"sc.close",
"sc",
"String[] arg",
"arg",
"public class Main {\n public static void main(String[] arg){\n Scanner sc = new Scanner(System.in).useDelimiter(\"[,\\n]\");\n int w = sc.nextInt();\n int n = sc.nextInt();\n int num[] = new int[w];\n for(int i=0;i<w;i++){\n num[i]=i+1;\n }\n for(int i=0;i<n;i++){\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = 0;\n c=num[a-1];\n num[a-1]=num[b-1];\n num[b-1]=c;\n }\n for(int i=0;i<w;i++){\n System.out.println(num[i]);\n }\n sc.close();\n }\n}",
"public class Main {\n public static void main(String[] arg){\n Scanner sc = new Scanner(System.in).useDelimiter(\"[,\\n]\");\n int w = sc.nextInt();\n int n = sc.nextInt();\n int num[] = new int[w];\n for(int i=0;i<w;i++){\n num[i]=i+1;\n }\n for(int i=0;i<n;i++){\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = 0;\n c=num[a-1];\n num[a-1]=num[b-1];\n num[b-1]=c;\n }\n for(int i=0;i<w;i++){\n System.out.println(num[i]);\n }\n sc.close();\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] arg){
Scanner sc = new Scanner(System.in).useDelimiter("[,\n]");
int w = sc.nextInt();
int n = sc.nextInt();
int num[] = new int[w];
for(int i=0;i<w;i++){
num[i]=i+1;
}
for(int i=0;i<n;i++){
int a = sc.nextInt();
int b = sc.nextInt();
int c = 0;
c=num[a-1];
num[a-1]=num[b-1];
num[b-1]=c;
}
for(int i=0;i<w;i++){
System.out.println(num[i]);
}
sc.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
2,
13,
17,
41,
13,
4,
18,
13,
2,
13,
17,
4,
18,
13,
2,
13,
17,
13,
4,
18,
13,
2,
13,
17,
13,
4,
13,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
148,
8
],
[
148,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
11,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
44,
45
],
[
44,
46
],
[
11,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
52,
53
],
[
52,
54
],
[
47,
55
],
[
55,
56
],
[
56,
57
],
[
47,
58
],
[
59,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
62,
67
],
[
59,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
73,
74
],
[
73,
75
],
[
59,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
81,
82
],
[
81,
83
],
[
59,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
89,
90
],
[
89,
91
],
[
59,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
97,
98
],
[
97,
99
],
[
59,
100
],
[
100,
101
],
[
101,
102
],
[
100,
103
],
[
103,
104
],
[
103,
105
],
[
100,
106
],
[
59,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
110,
111
],
[
110,
112
],
[
107,
113
],
[
11,
114
],
[
114,
115
],
[
114,
116
],
[
9,
117
],
[
117,
118
],
[
148,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
122,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
130,
131
],
[
122,
132
],
[
132,
133
],
[
133,
134
],
[
122,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
136,
141
],
[
141,
142
],
[
142,
143
],
[
141,
144
],
[
119,
145
],
[
145,
146
],
[
0,
147
],
[
147,
148
],
[
147,
149
]
] | [
"import java.util.ArrayList;\nimport java.util.Scanner;\n\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tArrayList<Integer> w_list = new ArrayList<Integer>();\n\t\t\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tw_list.add(i + 1);\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString[] str = sc.next().split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\t\t\t\n\t\t\tint tmp_a = w_list.get(a - 1);\n\t\t\tint tmp_b = w_list.get(b - 1);\n\t\t\t\n\t\t\tw_list.set(a - 1, tmp_b);\n\t\t\tw_list.set(b - 1, tmp_a);\n\t\t}\n\t\t\n\t\tprint(w_list);\n\t}\n\t\n\tpublic static void print(ArrayList<Integer> a) {\n\t\tfor(int i = 0; i < a.size(); i++)\n\t\t\tSystem.out.println(a.get(i));\n\t}\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tArrayList<Integer> w_list = new ArrayList<Integer>();\n\t\t\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tw_list.add(i + 1);\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString[] str = sc.next().split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\t\t\t\n\t\t\tint tmp_a = w_list.get(a - 1);\n\t\t\tint tmp_b = w_list.get(b - 1);\n\t\t\t\n\t\t\tw_list.set(a - 1, tmp_b);\n\t\t\tw_list.set(b - 1, tmp_a);\n\t\t}\n\t\t\n\t\tprint(w_list);\n\t}\n\t\n\tpublic static void print(ArrayList<Integer> a) {\n\t\tfor(int i = 0; i < a.size(); i++)\n\t\t\tSystem.out.println(a.get(i));\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tArrayList<Integer> w_list = new ArrayList<Integer>();\n\t\t\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tw_list.add(i + 1);\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString[] str = sc.next().split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\t\t\t\n\t\t\tint tmp_a = w_list.get(a - 1);\n\t\t\tint tmp_b = w_list.get(b - 1);\n\t\t\t\n\t\t\tw_list.set(a - 1, tmp_b);\n\t\t\tw_list.set(b - 1, tmp_a);\n\t\t}\n\t\t\n\t\tprint(w_list);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tArrayList<Integer> w_list = new ArrayList<Integer>();\n\t\t\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tw_list.add(i + 1);\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString[] str = sc.next().split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\t\t\t\n\t\t\tint tmp_a = w_list.get(a - 1);\n\t\t\tint tmp_b = w_list.get(b - 1);\n\t\t\t\n\t\t\tw_list.set(a - 1, tmp_b);\n\t\t\tw_list.set(b - 1, tmp_a);\n\t\t}\n\t\t\n\t\tprint(w_list);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"ArrayList<Integer> w_list = new ArrayList<Integer>();",
"w_list",
"new ArrayList<Integer>()",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i = 0; i < w; i++){\n\t\t\tw_list.add(i + 1);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tw_list.add(i + 1);\n\t\t}",
"{\n\t\t\tw_list.add(i + 1);\n\t\t}",
"w_list.add(i + 1)",
"w_list.add",
"w_list",
"i + 1",
"i",
"1",
"for(int i = 0; i < n; i++){\n\t\t\tString[] str = sc.next().split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\t\t\t\n\t\t\tint tmp_a = w_list.get(a - 1);\n\t\t\tint tmp_b = w_list.get(b - 1);\n\t\t\t\n\t\t\tw_list.set(a - 1, tmp_b);\n\t\t\tw_list.set(b - 1, tmp_a);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString[] str = sc.next().split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\t\t\t\n\t\t\tint tmp_a = w_list.get(a - 1);\n\t\t\tint tmp_b = w_list.get(b - 1);\n\t\t\t\n\t\t\tw_list.set(a - 1, tmp_b);\n\t\t\tw_list.set(b - 1, tmp_a);\n\t\t}",
"{\n\t\t\tString[] str = sc.next().split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\t\t\t\n\t\t\tint tmp_a = w_list.get(a - 1);\n\t\t\tint tmp_b = w_list.get(b - 1);\n\t\t\t\n\t\t\tw_list.set(a - 1, tmp_b);\n\t\t\tw_list.set(b - 1, tmp_a);\n\t\t}",
"String[] str = sc.next().split(\",\");",
"str",
"sc.next().split(\",\")",
"sc.next().split",
"sc.next()",
"sc.next",
"sc",
"\",\"",
"int a = Integer.parseInt(str[0]);",
"a",
"Integer.parseInt(str[0])",
"Integer.parseInt",
"Integer",
"str[0]",
"str",
"0",
"int b = Integer.parseInt(str[1]);",
"b",
"Integer.parseInt(str[1])",
"Integer.parseInt",
"Integer",
"str[1]",
"str",
"1",
"int tmp_a = w_list.get(a - 1);",
"tmp_a",
"w_list.get(a - 1)",
"w_list.get",
"w_list",
"a - 1",
"a",
"1",
"int tmp_b = w_list.get(b - 1);",
"tmp_b",
"w_list.get(b - 1)",
"w_list.get",
"w_list",
"b - 1",
"b",
"1",
"w_list.set(a - 1, tmp_b)",
"w_list.set",
"w_list",
"a - 1",
"a",
"1",
"tmp_b",
"w_list.set(b - 1, tmp_a)",
"w_list.set",
"w_list",
"b - 1",
"b",
"1",
"tmp_a",
"print(w_list)",
"print",
"w_list",
"String[] args",
"args",
"public static void print(ArrayList<Integer> a) {\n\t\tfor(int i = 0; i < a.size(); i++)\n\t\t\tSystem.out.println(a.get(i));\n\t}",
"print",
"{\n\t\tfor(int i = 0; i < a.size(); i++)\n\t\t\tSystem.out.println(a.get(i));\n\t}",
"for(int i = 0; i < a.size(); i++)\n\t\t\tSystem.out.println(a.get(i));",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < a.size()",
"i",
"a.size()",
"a.size",
"a",
"i++",
"i++",
"i",
"System.out.println(a.get(i));",
"System.out.println(a.get(i))",
"System.out.println",
"System.out",
"System",
"System.out",
"a.get(i)",
"a.get",
"a",
"i",
"ArrayList<Integer> a",
"a",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tArrayList<Integer> w_list = new ArrayList<Integer>();\n\t\t\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tw_list.add(i + 1);\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString[] str = sc.next().split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\t\t\t\n\t\t\tint tmp_a = w_list.get(a - 1);\n\t\t\tint tmp_b = w_list.get(b - 1);\n\t\t\t\n\t\t\tw_list.set(a - 1, tmp_b);\n\t\t\tw_list.set(b - 1, tmp_a);\n\t\t}\n\t\t\n\t\tprint(w_list);\n\t}\n\t\n\tpublic static void print(ArrayList<Integer> a) {\n\t\tfor(int i = 0; i < a.size(); i++)\n\t\t\tSystem.out.println(a.get(i));\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tArrayList<Integer> w_list = new ArrayList<Integer>();\n\t\t\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tw_list.add(i + 1);\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString[] str = sc.next().split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\t\t\t\n\t\t\tint tmp_a = w_list.get(a - 1);\n\t\t\tint tmp_b = w_list.get(b - 1);\n\t\t\t\n\t\t\tw_list.set(a - 1, tmp_b);\n\t\t\tw_list.set(b - 1, tmp_a);\n\t\t}\n\t\t\n\t\tprint(w_list);\n\t}\n\t\n\tpublic static void print(ArrayList<Integer> a) {\n\t\tfor(int i = 0; i < a.size(); i++)\n\t\t\tSystem.out.println(a.get(i));\n\t}\n}",
"Main"
] | import java.util.ArrayList;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
ArrayList<Integer> w_list = new ArrayList<Integer>();
int w = sc.nextInt();
int n = sc.nextInt();
for(int i = 0; i < w; i++){
w_list.add(i + 1);
}
for(int i = 0; i < n; i++){
String[] str = sc.next().split(",");
int a = Integer.parseInt(str[0]);
int b = Integer.parseInt(str[1]);
int tmp_a = w_list.get(a - 1);
int tmp_b = w_list.get(b - 1);
w_list.set(a - 1, tmp_b);
w_list.set(b - 1, tmp_a);
}
print(w_list);
}
public static void print(ArrayList<Integer> a) {
for(int i = 0; i < a.size(); i++)
System.out.println(a.get(i));
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
0,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
29,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
2,
4,
18,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
20,
0,
13,
4,
13,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
28,
13,
13,
30,
30,
14,
2,
13,
17,
9,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
137,
8
],
[
137,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
17,
19
],
[
11,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
11,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
27,
31
],
[
11,
32
],
[
32,
33
],
[
9,
34
],
[
34,
35
],
[
9,
36
],
[
36,
37
],
[
9,
38
],
[
38,
39
],
[
137,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
46,
48
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
53,
54
],
[
54,
55
],
[
49,
56
],
[
42,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
62,
63
],
[
63,
64
],
[
42,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
72,
74
],
[
65,
75
],
[
75,
76
],
[
76,
77
],
[
65,
78
],
[
79,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
42,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
85,
90
],
[
90,
91
],
[
90,
92
],
[
85,
93
],
[
93,
94
],
[
94,
95
],
[
85,
96
],
[
97,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
103,
105
],
[
103,
106
],
[
106,
107
],
[
107,
108
],
[
106,
109
],
[
109,
110
],
[
110,
111
],
[
103,
112
],
[
112,
113
],
[
113,
114
],
[
112,
115
],
[
115,
116
],
[
116,
117
],
[
42,
118
],
[
118,
119
],
[
118,
120
],
[
118,
121
],
[
122,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
123,
127
],
[
122,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
128,
133
],
[
40,
134
],
[
134,
135
],
[
0,
136
],
[
136,
137
],
[
136,
138
]
] | [
"import java.io.*;\nimport java.util.*;\n\npublic class Main {\n\t\n\tpublic static int[] swap (int[] sticks, int s, int g) {\n\t\t\n\t\tint work = 0;\n\t\t\n\t\twork = sticks[g];\n\t\tsticks[g] = sticks[s];\n\t\tsticks[s] = work;\n\t\t\n\t\treturn sticks;\n\t\t\n\t}\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\t\n\t\tBufferedReader br = \n\t\t\tnew BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tint[] sticks = new int[Integer.parseInt(br.readLine()) + 1];\n\t\tint n = Integer.parseInt(br.readLine());\n\t\t\n\t\tfor (int i = 1; i < sticks.length; i++) {\n\t\t\tsticks[i] = i;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\n\t\t\tStringTokenizer st = new StringTokenizer(br.readLine(),\",\");\n\t\t\tsticks = swap(sticks,Integer.parseInt(st.nextToken()),Integer.parseInt(st.nextToken()));\n\t\t\t\n\t\t}\n\t\t\n\t\tfor (int s : sticks) {\n\t\t\tif (s == 0) continue;\n\t\t\tSystem.out.println(s);\n\t\t}\n\t\t\n\t}\n\t\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\t\n\tpublic static int[] swap (int[] sticks, int s, int g) {\n\t\t\n\t\tint work = 0;\n\t\t\n\t\twork = sticks[g];\n\t\tsticks[g] = sticks[s];\n\t\tsticks[s] = work;\n\t\t\n\t\treturn sticks;\n\t\t\n\t}\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\t\n\t\tBufferedReader br = \n\t\t\tnew BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tint[] sticks = new int[Integer.parseInt(br.readLine()) + 1];\n\t\tint n = Integer.parseInt(br.readLine());\n\t\t\n\t\tfor (int i = 1; i < sticks.length; i++) {\n\t\t\tsticks[i] = i;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\n\t\t\tStringTokenizer st = new StringTokenizer(br.readLine(),\",\");\n\t\t\tsticks = swap(sticks,Integer.parseInt(st.nextToken()),Integer.parseInt(st.nextToken()));\n\t\t\t\n\t\t}\n\t\t\n\t\tfor (int s : sticks) {\n\t\t\tif (s == 0) continue;\n\t\t\tSystem.out.println(s);\n\t\t}\n\t\t\n\t}\n\t\n}",
"Main",
"public static int[] swap (int[] sticks, int s, int g) {\n\t\t\n\t\tint work = 0;\n\t\t\n\t\twork = sticks[g];\n\t\tsticks[g] = sticks[s];\n\t\tsticks[s] = work;\n\t\t\n\t\treturn sticks;\n\t\t\n\t}",
"swap",
"{\n\t\t\n\t\tint work = 0;\n\t\t\n\t\twork = sticks[g];\n\t\tsticks[g] = sticks[s];\n\t\tsticks[s] = work;\n\t\t\n\t\treturn sticks;\n\t\t\n\t}",
"int work = 0;",
"work",
"0",
"work = sticks[g]",
"work",
"sticks[g]",
"sticks",
"g",
"sticks[g] = sticks[s]",
"sticks[g]",
"sticks",
"g",
"sticks[s]",
"sticks",
"s",
"sticks[s] = work",
"sticks[s]",
"sticks",
"s",
"work",
"return sticks;",
"sticks",
"int[] sticks",
"sticks",
"int s",
"s",
"int g",
"g",
"public static void main(String[] args) throws IOException {\n\t\t\n\t\tBufferedReader br = \n\t\t\tnew BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tint[] sticks = new int[Integer.parseInt(br.readLine()) + 1];\n\t\tint n = Integer.parseInt(br.readLine());\n\t\t\n\t\tfor (int i = 1; i < sticks.length; i++) {\n\t\t\tsticks[i] = i;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\n\t\t\tStringTokenizer st = new StringTokenizer(br.readLine(),\",\");\n\t\t\tsticks = swap(sticks,Integer.parseInt(st.nextToken()),Integer.parseInt(st.nextToken()));\n\t\t\t\n\t\t}\n\t\t\n\t\tfor (int s : sticks) {\n\t\t\tif (s == 0) continue;\n\t\t\tSystem.out.println(s);\n\t\t}\n\t\t\n\t}",
"main",
"{\n\t\t\n\t\tBufferedReader br = \n\t\t\tnew BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tint[] sticks = new int[Integer.parseInt(br.readLine()) + 1];\n\t\tint n = Integer.parseInt(br.readLine());\n\t\t\n\t\tfor (int i = 1; i < sticks.length; i++) {\n\t\t\tsticks[i] = i;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\n\t\t\tStringTokenizer st = new StringTokenizer(br.readLine(),\",\");\n\t\t\tsticks = swap(sticks,Integer.parseInt(st.nextToken()),Integer.parseInt(st.nextToken()));\n\t\t\t\n\t\t}\n\t\t\n\t\tfor (int s : sticks) {\n\t\t\tif (s == 0) continue;\n\t\t\tSystem.out.println(s);\n\t\t}\n\t\t\n\t}",
"BufferedReader br = \n\t\t\tnew BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int[] sticks = new int[Integer.parseInt(br.readLine()) + 1];",
"sticks",
"new int[Integer.parseInt(br.readLine()) + 1]",
"Integer.parseInt(br.readLine()) + 1",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"1",
"int n = Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"for (int i = 1; i < sticks.length; i++) {\n\t\t\tsticks[i] = i;\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < sticks.length",
"i",
"sticks.length",
"sticks",
"sticks.length",
"i++",
"i++",
"i",
"{\n\t\t\tsticks[i] = i;\n\t\t}",
"{\n\t\t\tsticks[i] = i;\n\t\t}",
"sticks[i] = i",
"sticks[i]",
"sticks",
"i",
"i",
"for (int i = 0; i < n; i++) {\n\t\t\t\n\t\t\tStringTokenizer st = new StringTokenizer(br.readLine(),\",\");\n\t\t\tsticks = swap(sticks,Integer.parseInt(st.nextToken()),Integer.parseInt(st.nextToken()));\n\t\t\t\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\n\t\t\tStringTokenizer st = new StringTokenizer(br.readLine(),\",\");\n\t\t\tsticks = swap(sticks,Integer.parseInt(st.nextToken()),Integer.parseInt(st.nextToken()));\n\t\t\t\n\t\t}",
"{\n\t\t\t\n\t\t\tStringTokenizer st = new StringTokenizer(br.readLine(),\",\");\n\t\t\tsticks = swap(sticks,Integer.parseInt(st.nextToken()),Integer.parseInt(st.nextToken()));\n\t\t\t\n\t\t}",
"StringTokenizer st = new StringTokenizer(br.readLine(),\",\");",
"st",
"new StringTokenizer(br.readLine(),\",\")",
"sticks = swap(sticks,Integer.parseInt(st.nextToken()),Integer.parseInt(st.nextToken()))",
"sticks",
"swap(sticks,Integer.parseInt(st.nextToken()),Integer.parseInt(st.nextToken()))",
"swap",
"sticks",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"for (int s : sticks) {\n\t\t\tif (s == 0) continue;\n\t\t\tSystem.out.println(s);\n\t\t}",
"int s",
"sticks",
"{\n\t\t\tif (s == 0) continue;\n\t\t\tSystem.out.println(s);\n\t\t}",
"{\n\t\t\tif (s == 0) continue;\n\t\t\tSystem.out.println(s);\n\t\t}",
"if (s == 0) continue;",
"s == 0",
"s",
"0",
"continue;",
"System.out.println(s)",
"System.out.println",
"System.out",
"System",
"System.out",
"s",
"String[] args",
"args",
"public class Main {\n\t\n\tpublic static int[] swap (int[] sticks, int s, int g) {\n\t\t\n\t\tint work = 0;\n\t\t\n\t\twork = sticks[g];\n\t\tsticks[g] = sticks[s];\n\t\tsticks[s] = work;\n\t\t\n\t\treturn sticks;\n\t\t\n\t}\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\t\n\t\tBufferedReader br = \n\t\t\tnew BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tint[] sticks = new int[Integer.parseInt(br.readLine()) + 1];\n\t\tint n = Integer.parseInt(br.readLine());\n\t\t\n\t\tfor (int i = 1; i < sticks.length; i++) {\n\t\t\tsticks[i] = i;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\n\t\t\tStringTokenizer st = new StringTokenizer(br.readLine(),\",\");\n\t\t\tsticks = swap(sticks,Integer.parseInt(st.nextToken()),Integer.parseInt(st.nextToken()));\n\t\t\t\n\t\t}\n\t\t\n\t\tfor (int s : sticks) {\n\t\t\tif (s == 0) continue;\n\t\t\tSystem.out.println(s);\n\t\t}\n\t\t\n\t}\n\t\n}",
"public class Main {\n\t\n\tpublic static int[] swap (int[] sticks, int s, int g) {\n\t\t\n\t\tint work = 0;\n\t\t\n\t\twork = sticks[g];\n\t\tsticks[g] = sticks[s];\n\t\tsticks[s] = work;\n\t\t\n\t\treturn sticks;\n\t\t\n\t}\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\t\n\t\tBufferedReader br = \n\t\t\tnew BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tint[] sticks = new int[Integer.parseInt(br.readLine()) + 1];\n\t\tint n = Integer.parseInt(br.readLine());\n\t\t\n\t\tfor (int i = 1; i < sticks.length; i++) {\n\t\t\tsticks[i] = i;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\n\t\t\tStringTokenizer st = new StringTokenizer(br.readLine(),\",\");\n\t\t\tsticks = swap(sticks,Integer.parseInt(st.nextToken()),Integer.parseInt(st.nextToken()));\n\t\t\t\n\t\t}\n\t\t\n\t\tfor (int s : sticks) {\n\t\t\tif (s == 0) continue;\n\t\t\tSystem.out.println(s);\n\t\t}\n\t\t\n\t}\n\t\n}",
"Main"
] | import java.io.*;
import java.util.*;
public class Main {
public static int[] swap (int[] sticks, int s, int g) {
int work = 0;
work = sticks[g];
sticks[g] = sticks[s];
sticks[s] = work;
return sticks;
}
public static void main(String[] args) throws IOException {
BufferedReader br =
new BufferedReader(new InputStreamReader(System.in));
int[] sticks = new int[Integer.parseInt(br.readLine()) + 1];
int n = Integer.parseInt(br.readLine());
for (int i = 1; i < sticks.length; i++) {
sticks[i] = i;
}
for (int i = 0; i < n; i++) {
StringTokenizer st = new StringTokenizer(br.readLine(),",");
sticks = swap(sticks,Integer.parseInt(st.nextToken()),Integer.parseInt(st.nextToken()));
}
for (int s : sticks) {
if (s == 0) continue;
System.out.println(s);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
41,
13,
17,
0,
13,
4,
18,
13,
4,
18,
13,
42,
2,
40,
13,
17,
30,
41,
13,
4,
18,
4,
18,
13,
17,
4,
13,
13,
2,
4,
18,
13,
18,
13,
17,
17,
2,
4,
18,
13,
18,
13,
17,
17,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
23,
13,
23,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
130,
8
],
[
130,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
18,
19
],
[
19,
20
],
[
18,
21
],
[
21,
22
],
[
22,
23
],
[
11,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
24,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
31,
33
],
[
24,
34
],
[
34,
35
],
[
35,
36
],
[
24,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
43,
45
],
[
11,
46
],
[
46,
47
],
[
46,
48
],
[
11,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
54,
55
],
[
55,
56
],
[
11,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
57,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
65,
70
],
[
62,
71
],
[
71,
72
],
[
71,
73
],
[
71,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
78,
79
],
[
78,
80
],
[
74,
81
],
[
71,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
86,
87
],
[
86,
88
],
[
82,
89
],
[
11,
90
],
[
90,
91
],
[
90,
92
],
[
90,
93
],
[
94,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
95,
100
],
[
9,
101
],
[
101,
102
],
[
130,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
108,
110
],
[
105,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
111,
115
],
[
115,
116
],
[
115,
117
],
[
105,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
118,
122
],
[
103,
123
],
[
123,
124
],
[
103,
125
],
[
125,
126
],
[
103,
127
],
[
127,
128
],
[
0,
129
],
[
129,
130
],
[
129,
131
]
] | [
"\nimport java.io.*;\nimport java.util.*;\n\npublic class Main {\n\n public static void main(String[] argv) throws IOException {\n //*\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\n int[] lines = new int[Integer.parseInt(in.readLine())];\n for (int i = 0; i < lines.length; i++) {\n lines[i] = i + 1;\n }\n\n int count = 1;\n count = Integer.parseInt(in.readLine());\n\n while (count-- > 0) {\n String[] s = in.readLine().split(\",\");\n swap(lines, Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1);\n }\n for (int i : lines) {\n System.out.println(i);\n }\n //*/\n }\n\n private static void swap(int[] lines, int a, int b) {\n int temp = lines[a];\n lines[a] = lines[b];\n lines[b] = temp;\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n public static void main(String[] argv) throws IOException {\n //*\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\n int[] lines = new int[Integer.parseInt(in.readLine())];\n for (int i = 0; i < lines.length; i++) {\n lines[i] = i + 1;\n }\n\n int count = 1;\n count = Integer.parseInt(in.readLine());\n\n while (count-- > 0) {\n String[] s = in.readLine().split(\",\");\n swap(lines, Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1);\n }\n for (int i : lines) {\n System.out.println(i);\n }\n //*/\n }\n\n private static void swap(int[] lines, int a, int b) {\n int temp = lines[a];\n lines[a] = lines[b];\n lines[b] = temp;\n }\n}",
"Main",
"public static void main(String[] argv) throws IOException {\n //*\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\n int[] lines = new int[Integer.parseInt(in.readLine())];\n for (int i = 0; i < lines.length; i++) {\n lines[i] = i + 1;\n }\n\n int count = 1;\n count = Integer.parseInt(in.readLine());\n\n while (count-- > 0) {\n String[] s = in.readLine().split(\",\");\n swap(lines, Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1);\n }\n for (int i : lines) {\n System.out.println(i);\n }\n //*/\n }",
"main",
"{\n //*\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\n int[] lines = new int[Integer.parseInt(in.readLine())];\n for (int i = 0; i < lines.length; i++) {\n lines[i] = i + 1;\n }\n\n int count = 1;\n count = Integer.parseInt(in.readLine());\n\n while (count-- > 0) {\n String[] s = in.readLine().split(\",\");\n swap(lines, Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1);\n }\n for (int i : lines) {\n System.out.println(i);\n }\n //*/\n }",
"BufferedReader in = new BufferedReader(new InputStreamReader(System.in));",
"in",
"new BufferedReader(new InputStreamReader(System.in))",
"int[] lines = new int[Integer.parseInt(in.readLine())];",
"lines",
"new int[Integer.parseInt(in.readLine())]",
"Integer.parseInt(in.readLine())",
"Integer.parseInt",
"Integer",
"in.readLine()",
"in.readLine",
"in",
"for (int i = 0; i < lines.length; i++) {\n lines[i] = i + 1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < lines.length",
"i",
"lines.length",
"lines",
"lines.length",
"i++",
"i++",
"i",
"{\n lines[i] = i + 1;\n }",
"{\n lines[i] = i + 1;\n }",
"lines[i] = i + 1",
"lines[i]",
"lines",
"i",
"i + 1",
"i",
"1",
"int count = 1;",
"count",
"1",
"count = Integer.parseInt(in.readLine())",
"count",
"Integer.parseInt(in.readLine())",
"Integer.parseInt",
"Integer",
"in.readLine()",
"in.readLine",
"in",
"while (count-- > 0) {\n String[] s = in.readLine().split(\",\");\n swap(lines, Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1);\n }",
"count-- > 0",
"count--",
"count",
"0",
"{\n String[] s = in.readLine().split(\",\");\n swap(lines, Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1);\n }",
"String[] s = in.readLine().split(\",\");",
"s",
"in.readLine().split(\",\")",
"in.readLine().split",
"in.readLine()",
"in.readLine",
"in",
"\",\"",
"swap(lines, Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1)",
"swap",
"lines",
"Integer.parseInt(s[0]) - 1",
"Integer.parseInt(s[0])",
"Integer.parseInt",
"Integer",
"s[0]",
"s",
"0",
"1",
"Integer.parseInt(s[1]) - 1",
"Integer.parseInt(s[1])",
"Integer.parseInt",
"Integer",
"s[1]",
"s",
"1",
"1",
"for (int i : lines) {\n System.out.println(i);\n }",
"int i",
"lines",
"{\n System.out.println(i);\n }",
"{\n System.out.println(i);\n }",
"System.out.println(i)",
"System.out.println",
"System.out",
"System",
"System.out",
"i",
"String[] argv",
"argv",
"private static void swap(int[] lines, int a, int b) {\n int temp = lines[a];\n lines[a] = lines[b];\n lines[b] = temp;\n }",
"swap",
"{\n int temp = lines[a];\n lines[a] = lines[b];\n lines[b] = temp;\n }",
"int temp = lines[a];",
"temp",
"lines[a]",
"lines",
"a",
"lines[a] = lines[b]",
"lines[a]",
"lines",
"a",
"lines[b]",
"lines",
"b",
"lines[b] = temp",
"lines[b]",
"lines",
"b",
"temp",
"int[] lines",
"lines",
"int a",
"a",
"int b",
"b",
"public class Main {\n\n public static void main(String[] argv) throws IOException {\n //*\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\n int[] lines = new int[Integer.parseInt(in.readLine())];\n for (int i = 0; i < lines.length; i++) {\n lines[i] = i + 1;\n }\n\n int count = 1;\n count = Integer.parseInt(in.readLine());\n\n while (count-- > 0) {\n String[] s = in.readLine().split(\",\");\n swap(lines, Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1);\n }\n for (int i : lines) {\n System.out.println(i);\n }\n //*/\n }\n\n private static void swap(int[] lines, int a, int b) {\n int temp = lines[a];\n lines[a] = lines[b];\n lines[b] = temp;\n }\n}",
"public class Main {\n\n public static void main(String[] argv) throws IOException {\n //*\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\n int[] lines = new int[Integer.parseInt(in.readLine())];\n for (int i = 0; i < lines.length; i++) {\n lines[i] = i + 1;\n }\n\n int count = 1;\n count = Integer.parseInt(in.readLine());\n\n while (count-- > 0) {\n String[] s = in.readLine().split(\",\");\n swap(lines, Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1);\n }\n for (int i : lines) {\n System.out.println(i);\n }\n //*/\n }\n\n private static void swap(int[] lines, int a, int b) {\n int temp = lines[a];\n lines[a] = lines[b];\n lines[b] = temp;\n }\n}",
"Main"
] |
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] argv) throws IOException {
//*
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int[] lines = new int[Integer.parseInt(in.readLine())];
for (int i = 0; i < lines.length; i++) {
lines[i] = i + 1;
}
int count = 1;
count = Integer.parseInt(in.readLine());
while (count-- > 0) {
String[] s = in.readLine().split(",");
swap(lines, Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1);
}
for (int i : lines) {
System.out.println(i);
}
//*/
}
private static void swap(int[] lines, int a, int b) {
int temp = lines[a];
lines[a] = lines[b];
lines[b] = temp;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
0,
13,
4,
18,
13,
4,
18,
13,
0,
13,
4,
18,
13,
4,
18,
13,
0,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
4,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
144,
5
],
[
144,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
8,
24
],
[
24,
25
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
31,
32
],
[
32,
33
],
[
8,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
39,
40
],
[
40,
41
],
[
8,
42
],
[
42,
43
],
[
42,
44
],
[
45,
46
],
[
45,
47
],
[
8,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
53,
54
],
[
53,
55
],
[
48,
56
],
[
56,
57
],
[
57,
58
],
[
48,
59
],
[
60,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
8,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
71,
72
],
[
71,
73
],
[
66,
74
],
[
74,
75
],
[
75,
76
],
[
66,
77
],
[
78,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
81,
86
],
[
78,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
92,
93
],
[
92,
94
],
[
78,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
100,
101
],
[
100,
102
],
[
78,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
105,
107
],
[
78,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
112,
113
],
[
112,
114
],
[
78,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
115,
119
],
[
8,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
120,
125
],
[
125,
126
],
[
125,
127
],
[
120,
128
],
[
128,
129
],
[
129,
130
],
[
120,
131
],
[
132,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
133,
138
],
[
138,
139
],
[
138,
140
],
[
6,
141
],
[
141,
142
],
[
0,
143
],
[
143,
144
],
[
143,
145
]
] | [
"import java.util.Scanner;\npublic class Main {\n public static void main (String[] args) {\n\tScanner scan = new Scanner(System.in);\n\tint w, n, a, b, tmp;\n\tint[] lots;\n\tString[] input;\n\tw = Integer.parseInt(scan.nextLine());\n\tn = Integer.parseInt(scan.nextLine());\n\tlots = new int[w + 1];\n\tfor (int i = 1; i <= w; i++) {\n\t lots[i] = i;\n\t}\n\tfor (int i = 0; i < n; i++) {\n\t input = scan.nextLine().split(\",\");\n\t a = Integer.parseInt(input[0]);\n\t b = Integer.parseInt(input[1]);\n\t tmp = lots[a];\n\t lots[a] = lots[b];\n\t lots[b] = tmp;\n\t}\n\tfor (int i = 1; i <= w; i++) {\n\t System.out.println(lots[i]);\n\t}\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main (String[] args) {\n\tScanner scan = new Scanner(System.in);\n\tint w, n, a, b, tmp;\n\tint[] lots;\n\tString[] input;\n\tw = Integer.parseInt(scan.nextLine());\n\tn = Integer.parseInt(scan.nextLine());\n\tlots = new int[w + 1];\n\tfor (int i = 1; i <= w; i++) {\n\t lots[i] = i;\n\t}\n\tfor (int i = 0; i < n; i++) {\n\t input = scan.nextLine().split(\",\");\n\t a = Integer.parseInt(input[0]);\n\t b = Integer.parseInt(input[1]);\n\t tmp = lots[a];\n\t lots[a] = lots[b];\n\t lots[b] = tmp;\n\t}\n\tfor (int i = 1; i <= w; i++) {\n\t System.out.println(lots[i]);\n\t}\n }\n}",
"Main",
"public static void main (String[] args) {\n\tScanner scan = new Scanner(System.in);\n\tint w, n, a, b, tmp;\n\tint[] lots;\n\tString[] input;\n\tw = Integer.parseInt(scan.nextLine());\n\tn = Integer.parseInt(scan.nextLine());\n\tlots = new int[w + 1];\n\tfor (int i = 1; i <= w; i++) {\n\t lots[i] = i;\n\t}\n\tfor (int i = 0; i < n; i++) {\n\t input = scan.nextLine().split(\",\");\n\t a = Integer.parseInt(input[0]);\n\t b = Integer.parseInt(input[1]);\n\t tmp = lots[a];\n\t lots[a] = lots[b];\n\t lots[b] = tmp;\n\t}\n\tfor (int i = 1; i <= w; i++) {\n\t System.out.println(lots[i]);\n\t}\n }",
"main",
"{\n\tScanner scan = new Scanner(System.in);\n\tint w, n, a, b, tmp;\n\tint[] lots;\n\tString[] input;\n\tw = Integer.parseInt(scan.nextLine());\n\tn = Integer.parseInt(scan.nextLine());\n\tlots = new int[w + 1];\n\tfor (int i = 1; i <= w; i++) {\n\t lots[i] = i;\n\t}\n\tfor (int i = 0; i < n; i++) {\n\t input = scan.nextLine().split(\",\");\n\t a = Integer.parseInt(input[0]);\n\t b = Integer.parseInt(input[1]);\n\t tmp = lots[a];\n\t lots[a] = lots[b];\n\t lots[b] = tmp;\n\t}\n\tfor (int i = 1; i <= w; i++) {\n\t System.out.println(lots[i]);\n\t}\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int w",
"w",
"n",
"n",
"a",
"a",
"b",
"b",
"tmp;",
"tmp",
"int[] lots;",
"lots",
"String[] input;",
"input",
"w = Integer.parseInt(scan.nextLine())",
"w",
"Integer.parseInt(scan.nextLine())",
"Integer.parseInt",
"Integer",
"scan.nextLine()",
"scan.nextLine",
"scan",
"n = Integer.parseInt(scan.nextLine())",
"n",
"Integer.parseInt(scan.nextLine())",
"Integer.parseInt",
"Integer",
"scan.nextLine()",
"scan.nextLine",
"scan",
"lots = new int[w + 1]",
"lots",
"new int[w + 1]",
"w + 1",
"w",
"1",
"for (int i = 1; i <= w; i++) {\n\t lots[i] = i;\n\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t lots[i] = i;\n\t}",
"{\n\t lots[i] = i;\n\t}",
"lots[i] = i",
"lots[i]",
"lots",
"i",
"i",
"for (int i = 0; i < n; i++) {\n\t input = scan.nextLine().split(\",\");\n\t a = Integer.parseInt(input[0]);\n\t b = Integer.parseInt(input[1]);\n\t tmp = lots[a];\n\t lots[a] = lots[b];\n\t lots[b] = tmp;\n\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t input = scan.nextLine().split(\",\");\n\t a = Integer.parseInt(input[0]);\n\t b = Integer.parseInt(input[1]);\n\t tmp = lots[a];\n\t lots[a] = lots[b];\n\t lots[b] = tmp;\n\t}",
"{\n\t input = scan.nextLine().split(\",\");\n\t a = Integer.parseInt(input[0]);\n\t b = Integer.parseInt(input[1]);\n\t tmp = lots[a];\n\t lots[a] = lots[b];\n\t lots[b] = tmp;\n\t}",
"input = scan.nextLine().split(\",\")",
"input",
"scan.nextLine().split(\",\")",
"scan.nextLine().split",
"scan.nextLine()",
"scan.nextLine",
"scan",
"\",\"",
"a = Integer.parseInt(input[0])",
"a",
"Integer.parseInt(input[0])",
"Integer.parseInt",
"Integer",
"input[0]",
"input",
"0",
"b = Integer.parseInt(input[1])",
"b",
"Integer.parseInt(input[1])",
"Integer.parseInt",
"Integer",
"input[1]",
"input",
"1",
"tmp = lots[a]",
"tmp",
"lots[a]",
"lots",
"a",
"lots[a] = lots[b]",
"lots[a]",
"lots",
"a",
"lots[b]",
"lots",
"b",
"lots[b] = tmp",
"lots[b]",
"lots",
"b",
"tmp",
"for (int i = 1; i <= w; i++) {\n\t System.out.println(lots[i]);\n\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t System.out.println(lots[i]);\n\t}",
"{\n\t System.out.println(lots[i]);\n\t}",
"System.out.println(lots[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"lots[i]",
"lots",
"i",
"String[] args",
"args",
"public class Main {\n public static void main (String[] args) {\n\tScanner scan = new Scanner(System.in);\n\tint w, n, a, b, tmp;\n\tint[] lots;\n\tString[] input;\n\tw = Integer.parseInt(scan.nextLine());\n\tn = Integer.parseInt(scan.nextLine());\n\tlots = new int[w + 1];\n\tfor (int i = 1; i <= w; i++) {\n\t lots[i] = i;\n\t}\n\tfor (int i = 0; i < n; i++) {\n\t input = scan.nextLine().split(\",\");\n\t a = Integer.parseInt(input[0]);\n\t b = Integer.parseInt(input[1]);\n\t tmp = lots[a];\n\t lots[a] = lots[b];\n\t lots[b] = tmp;\n\t}\n\tfor (int i = 1; i <= w; i++) {\n\t System.out.println(lots[i]);\n\t}\n }\n}",
"public class Main {\n public static void main (String[] args) {\n\tScanner scan = new Scanner(System.in);\n\tint w, n, a, b, tmp;\n\tint[] lots;\n\tString[] input;\n\tw = Integer.parseInt(scan.nextLine());\n\tn = Integer.parseInt(scan.nextLine());\n\tlots = new int[w + 1];\n\tfor (int i = 1; i <= w; i++) {\n\t lots[i] = i;\n\t}\n\tfor (int i = 0; i < n; i++) {\n\t input = scan.nextLine().split(\",\");\n\t a = Integer.parseInt(input[0]);\n\t b = Integer.parseInt(input[1]);\n\t tmp = lots[a];\n\t lots[a] = lots[b];\n\t lots[b] = tmp;\n\t}\n\tfor (int i = 1; i <= w; i++) {\n\t System.out.println(lots[i]);\n\t}\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main (String[] args) {
Scanner scan = new Scanner(System.in);
int w, n, a, b, tmp;
int[] lots;
String[] input;
w = Integer.parseInt(scan.nextLine());
n = Integer.parseInt(scan.nextLine());
lots = new int[w + 1];
for (int i = 1; i <= w; i++) {
lots[i] = i;
}
for (int i = 0; i < n; i++) {
input = scan.nextLine().split(",");
a = Integer.parseInt(input[0]);
b = Integer.parseInt(input[1]);
tmp = lots[a];
lots[a] = lots[b];
lots[b] = tmp;
}
for (int i = 1; i <= w; i++) {
System.out.println(lots[i]);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
11,
1,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
13,
17,
30,
40,
13,
3,
30,
0,
13,
17,
0,
13,
4,
18,
13,
2,
17,
4,
18,
13,
13,
11,
1,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
13,
17,
0,
13,
4,
18,
13,
2,
17,
4,
18,
13,
13,
40,
13,
40,
13,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
0,
18,
13,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
2,
18,
13,
13,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
188,
8
],
[
188,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
11,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
52,
53
],
[
52,
54
],
[
47,
55
],
[
55,
56
],
[
56,
57
],
[
47,
58
],
[
59,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
59,
65
],
[
65,
66
],
[
65,
67
],
[
59,
68
],
[
68,
69
],
[
68,
70
],
[
59,
71
],
[
71,
72
],
[
71,
73
],
[
59,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
74,
81
],
[
81,
82
],
[
82,
83
],
[
74,
84
],
[
85,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
87,
92
],
[
86,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
86,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
109,
110
],
[
108,
111
],
[
59,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
117,
118
],
[
112,
119
],
[
119,
120
],
[
120,
121
],
[
112,
122
],
[
123,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
123,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
130,
131
],
[
129,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
135,
136
],
[
134,
137
],
[
59,
138
],
[
138,
139
],
[
59,
140
],
[
140,
141
],
[
59,
142
],
[
142,
143
],
[
142,
144
],
[
144,
145
],
[
144,
146
],
[
59,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
149,
151
],
[
59,
152
],
[
152,
153
],
[
153,
154
],
[
153,
155
],
[
152,
156
],
[
59,
157
],
[
157,
158
],
[
158,
159
],
[
158,
160
],
[
157,
161
],
[
11,
162
],
[
162,
163
],
[
163,
164
],
[
164,
165
],
[
164,
166
],
[
162,
167
],
[
167,
168
],
[
167,
169
],
[
162,
170
],
[
170,
171
],
[
171,
172
],
[
162,
173
],
[
174,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
177,
178
],
[
177,
179
],
[
175,
180
],
[
180,
181
],
[
181,
182
],
[
181,
183
],
[
180,
184
],
[
9,
185
],
[
185,
186
],
[
0,
187
],
[
187,
188
],
[
187,
189
]
] | [
"import java.util.*;\nimport java.math.*;\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n \n int stick = sc.nextInt();\n int bar = sc.nextInt();\n\n int[] amida = new int[stick];\n\n for(int i = 0; i < stick; i++){\n amida[i] = i;\n }\n\n for(int i = 0; i < bar; i++){\n String line = sc.next();\n\n int a = 0;\n int b = 0;\n\n int index = 0;\n for(; index < line.length(); index++){\n if(line.charAt(index) == ','){\n index++;\n break;\n }else{\n a *= 10;\n a += Integer.parseInt(\"\" + line.charAt(index));\n }\n }\n\n for(; index < line.length(); index++){\n b *= 10;\n b += Integer.parseInt(\"\" + line.charAt(index));\n }\n\n a--;\n b--;\n\n int c = amida[a];\n int d = amida[b];\n\n amida[a] = d;\n amida[b] = c;\n }\n\n for(int i = 0; i < stick; i++){\n System.out.println(amida[i]+1);\n }\n \n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.math.*;",
"math.*",
"java",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n \n int stick = sc.nextInt();\n int bar = sc.nextInt();\n\n int[] amida = new int[stick];\n\n for(int i = 0; i < stick; i++){\n amida[i] = i;\n }\n\n for(int i = 0; i < bar; i++){\n String line = sc.next();\n\n int a = 0;\n int b = 0;\n\n int index = 0;\n for(; index < line.length(); index++){\n if(line.charAt(index) == ','){\n index++;\n break;\n }else{\n a *= 10;\n a += Integer.parseInt(\"\" + line.charAt(index));\n }\n }\n\n for(; index < line.length(); index++){\n b *= 10;\n b += Integer.parseInt(\"\" + line.charAt(index));\n }\n\n a--;\n b--;\n\n int c = amida[a];\n int d = amida[b];\n\n amida[a] = d;\n amida[b] = c;\n }\n\n for(int i = 0; i < stick; i++){\n System.out.println(amida[i]+1);\n }\n \n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n \n int stick = sc.nextInt();\n int bar = sc.nextInt();\n\n int[] amida = new int[stick];\n\n for(int i = 0; i < stick; i++){\n amida[i] = i;\n }\n\n for(int i = 0; i < bar; i++){\n String line = sc.next();\n\n int a = 0;\n int b = 0;\n\n int index = 0;\n for(; index < line.length(); index++){\n if(line.charAt(index) == ','){\n index++;\n break;\n }else{\n a *= 10;\n a += Integer.parseInt(\"\" + line.charAt(index));\n }\n }\n\n for(; index < line.length(); index++){\n b *= 10;\n b += Integer.parseInt(\"\" + line.charAt(index));\n }\n\n a--;\n b--;\n\n int c = amida[a];\n int d = amida[b];\n\n amida[a] = d;\n amida[b] = c;\n }\n\n for(int i = 0; i < stick; i++){\n System.out.println(amida[i]+1);\n }\n \n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n \n int stick = sc.nextInt();\n int bar = sc.nextInt();\n\n int[] amida = new int[stick];\n\n for(int i = 0; i < stick; i++){\n amida[i] = i;\n }\n\n for(int i = 0; i < bar; i++){\n String line = sc.next();\n\n int a = 0;\n int b = 0;\n\n int index = 0;\n for(; index < line.length(); index++){\n if(line.charAt(index) == ','){\n index++;\n break;\n }else{\n a *= 10;\n a += Integer.parseInt(\"\" + line.charAt(index));\n }\n }\n\n for(; index < line.length(); index++){\n b *= 10;\n b += Integer.parseInt(\"\" + line.charAt(index));\n }\n\n a--;\n b--;\n\n int c = amida[a];\n int d = amida[b];\n\n amida[a] = d;\n amida[b] = c;\n }\n\n for(int i = 0; i < stick; i++){\n System.out.println(amida[i]+1);\n }\n \n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int stick = sc.nextInt();",
"stick",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int bar = sc.nextInt();",
"bar",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] amida = new int[stick];",
"amida",
"new int[stick]",
"stick",
"for(int i = 0; i < stick; i++){\n amida[i] = i;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < stick",
"i",
"stick",
"i++",
"i++",
"i",
"{\n amida[i] = i;\n }",
"{\n amida[i] = i;\n }",
"amida[i] = i",
"amida[i]",
"amida",
"i",
"i",
"for(int i = 0; i < bar; i++){\n String line = sc.next();\n\n int a = 0;\n int b = 0;\n\n int index = 0;\n for(; index < line.length(); index++){\n if(line.charAt(index) == ','){\n index++;\n break;\n }else{\n a *= 10;\n a += Integer.parseInt(\"\" + line.charAt(index));\n }\n }\n\n for(; index < line.length(); index++){\n b *= 10;\n b += Integer.parseInt(\"\" + line.charAt(index));\n }\n\n a--;\n b--;\n\n int c = amida[a];\n int d = amida[b];\n\n amida[a] = d;\n amida[b] = c;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < bar",
"i",
"bar",
"i++",
"i++",
"i",
"{\n String line = sc.next();\n\n int a = 0;\n int b = 0;\n\n int index = 0;\n for(; index < line.length(); index++){\n if(line.charAt(index) == ','){\n index++;\n break;\n }else{\n a *= 10;\n a += Integer.parseInt(\"\" + line.charAt(index));\n }\n }\n\n for(; index < line.length(); index++){\n b *= 10;\n b += Integer.parseInt(\"\" + line.charAt(index));\n }\n\n a--;\n b--;\n\n int c = amida[a];\n int d = amida[b];\n\n amida[a] = d;\n amida[b] = c;\n }",
"{\n String line = sc.next();\n\n int a = 0;\n int b = 0;\n\n int index = 0;\n for(; index < line.length(); index++){\n if(line.charAt(index) == ','){\n index++;\n break;\n }else{\n a *= 10;\n a += Integer.parseInt(\"\" + line.charAt(index));\n }\n }\n\n for(; index < line.length(); index++){\n b *= 10;\n b += Integer.parseInt(\"\" + line.charAt(index));\n }\n\n a--;\n b--;\n\n int c = amida[a];\n int d = amida[b];\n\n amida[a] = d;\n amida[b] = c;\n }",
"String line = sc.next();",
"line",
"sc.next()",
"sc.next",
"sc",
"int a = 0;",
"a",
"0",
"int b = 0;",
"b",
"0",
"int index = 0;",
"index",
"0",
"for(; index < line.length(); index++){\n if(line.charAt(index) == ','){\n index++;\n break;\n }else{\n a *= 10;\n a += Integer.parseInt(\"\" + line.charAt(index));\n }\n }",
";",
"index < line.length()",
"index",
"line.length()",
"line.length",
"line",
"index++",
"index++",
"index",
"{\n if(line.charAt(index) == ','){\n index++;\n break;\n }else{\n a *= 10;\n a += Integer.parseInt(\"\" + line.charAt(index));\n }\n }",
"{\n if(line.charAt(index) == ','){\n index++;\n break;\n }else{\n a *= 10;\n a += Integer.parseInt(\"\" + line.charAt(index));\n }\n }",
"if(line.charAt(index) == ','){\n index++;\n break;\n }else{\n a *= 10;\n a += Integer.parseInt(\"\" + line.charAt(index));\n }",
"line.charAt(index) == ','",
"line.charAt(index)",
"line.charAt",
"line",
"index",
"','",
"{\n index++;\n break;\n }",
"index++",
"index",
"break;",
"{\n a *= 10;\n a += Integer.parseInt(\"\" + line.charAt(index));\n }",
"a *= 10",
"a",
"10",
"a += Integer.parseInt(\"\" + line.charAt(index))",
"a",
"Integer.parseInt(\"\" + line.charAt(index))",
"Integer.parseInt",
"Integer",
"\"\" + line.charAt(index)",
"\"\"",
"line.charAt(index)",
"line.charAt",
"line",
"index",
"for(; index < line.length(); index++){\n b *= 10;\n b += Integer.parseInt(\"\" + line.charAt(index));\n }",
";",
"index < line.length()",
"index",
"line.length()",
"line.length",
"line",
"index++",
"index++",
"index",
"{\n b *= 10;\n b += Integer.parseInt(\"\" + line.charAt(index));\n }",
"{\n b *= 10;\n b += Integer.parseInt(\"\" + line.charAt(index));\n }",
"b *= 10",
"b",
"10",
"b += Integer.parseInt(\"\" + line.charAt(index))",
"b",
"Integer.parseInt(\"\" + line.charAt(index))",
"Integer.parseInt",
"Integer",
"\"\" + line.charAt(index)",
"\"\"",
"line.charAt(index)",
"line.charAt",
"line",
"index",
"a--",
"a",
"b--",
"b",
"int c = amida[a];",
"c",
"amida[a]",
"amida",
"a",
"int d = amida[b];",
"d",
"amida[b]",
"amida",
"b",
"amida[a] = d",
"amida[a]",
"amida",
"a",
"d",
"amida[b] = c",
"amida[b]",
"amida",
"b",
"c",
"for(int i = 0; i < stick; i++){\n System.out.println(amida[i]+1);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < stick",
"i",
"stick",
"i++",
"i++",
"i",
"{\n System.out.println(amida[i]+1);\n }",
"{\n System.out.println(amida[i]+1);\n }",
"System.out.println(amida[i]+1)",
"System.out.println",
"System.out",
"System",
"System.out",
"amida[i]+1",
"amida[i]",
"amida",
"i",
"1",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n \n int stick = sc.nextInt();\n int bar = sc.nextInt();\n\n int[] amida = new int[stick];\n\n for(int i = 0; i < stick; i++){\n amida[i] = i;\n }\n\n for(int i = 0; i < bar; i++){\n String line = sc.next();\n\n int a = 0;\n int b = 0;\n\n int index = 0;\n for(; index < line.length(); index++){\n if(line.charAt(index) == ','){\n index++;\n break;\n }else{\n a *= 10;\n a += Integer.parseInt(\"\" + line.charAt(index));\n }\n }\n\n for(; index < line.length(); index++){\n b *= 10;\n b += Integer.parseInt(\"\" + line.charAt(index));\n }\n\n a--;\n b--;\n\n int c = amida[a];\n int d = amida[b];\n\n amida[a] = d;\n amida[b] = c;\n }\n\n for(int i = 0; i < stick; i++){\n System.out.println(amida[i]+1);\n }\n \n }\n}",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n \n int stick = sc.nextInt();\n int bar = sc.nextInt();\n\n int[] amida = new int[stick];\n\n for(int i = 0; i < stick; i++){\n amida[i] = i;\n }\n\n for(int i = 0; i < bar; i++){\n String line = sc.next();\n\n int a = 0;\n int b = 0;\n\n int index = 0;\n for(; index < line.length(); index++){\n if(line.charAt(index) == ','){\n index++;\n break;\n }else{\n a *= 10;\n a += Integer.parseInt(\"\" + line.charAt(index));\n }\n }\n\n for(; index < line.length(); index++){\n b *= 10;\n b += Integer.parseInt(\"\" + line.charAt(index));\n }\n\n a--;\n b--;\n\n int c = amida[a];\n int d = amida[b];\n\n amida[a] = d;\n amida[b] = c;\n }\n\n for(int i = 0; i < stick; i++){\n System.out.println(amida[i]+1);\n }\n \n }\n}",
"Main"
] | import java.util.*;
import java.math.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int stick = sc.nextInt();
int bar = sc.nextInt();
int[] amida = new int[stick];
for(int i = 0; i < stick; i++){
amida[i] = i;
}
for(int i = 0; i < bar; i++){
String line = sc.next();
int a = 0;
int b = 0;
int index = 0;
for(; index < line.length(); index++){
if(line.charAt(index) == ','){
index++;
break;
}else{
a *= 10;
a += Integer.parseInt("" + line.charAt(index));
}
}
for(; index < line.length(); index++){
b *= 10;
b += Integer.parseInt("" + line.charAt(index));
}
a--;
b--;
int c = amida[a];
int d = amida[b];
amida[a] = d;
amida[b] = c;
}
for(int i = 0; i < stick; i++){
System.out.println(amida[i]+1);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
2,
40,
13,
13,
30,
4,
18,
13,
13,
11,
1,
0,
13,
4,
18,
13,
4,
18,
13,
2,
40,
13,
17,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
4,
18,
13,
13,
2,
20,
17,
2,
20,
17,
28,
13,
13,
30,
4,
18,
18,
13,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
23,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
8,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
35,
41
],
[
41,
42
],
[
42,
43
],
[
34,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
34,
48
],
[
49,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
52,
57
],
[
49,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
58,
62
],
[
62,
63
],
[
62,
64
],
[
58,
65
],
[
65,
66
],
[
65,
67
],
[
8,
68
],
[
68,
69
],
[
68,
70
],
[
68,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
6,
78
],
[
78,
79
]
] | [
"import java.util.*;class Main{public static void main(String[] a){Scanner s=new Scanner(System.in);List<Integer>l=new ArrayList<Integer>();int t=s.nextInt(),i=0;for(;i++<t;)l.add(i);for(t=s.nextInt(),s.nextLine();t-->0;){String[]e=s.nextLine().split(\",\");Collections.swap(l, new Integer(e[0])-1, new Integer(e[1])-1);}for(int e:l)System.out.println(e);}}",
"import java.util.*;",
"util.*",
"java",
"class Main{public static void main(String[] a){Scanner s=new Scanner(System.in);List<Integer>l=new ArrayList<Integer>();int t=s.nextInt(),i=0;for(;i++<t;)l.add(i);for(t=s.nextInt(),s.nextLine();t-->0;){String[]e=s.nextLine().split(\",\");Collections.swap(l, new Integer(e[0])-1, new Integer(e[1])-1);}for(int e:l)System.out.println(e);}}",
"Main",
"public static void main(String[] a){Scanner s=new Scanner(System.in);List<Integer>l=new ArrayList<Integer>();int t=s.nextInt(),i=0;for(;i++<t;)l.add(i);for(t=s.nextInt(),s.nextLine();t-->0;){String[]e=s.nextLine().split(\",\");Collections.swap(l, new Integer(e[0])-1, new Integer(e[1])-1);}for(int e:l)System.out.println(e);}",
"main",
"{Scanner s=new Scanner(System.in);List<Integer>l=new ArrayList<Integer>();int t=s.nextInt(),i=0;for(;i++<t;)l.add(i);for(t=s.nextInt(),s.nextLine();t-->0;){String[]e=s.nextLine().split(\",\");Collections.swap(l, new Integer(e[0])-1, new Integer(e[1])-1);}for(int e:l)System.out.println(e);}",
"Scanner s=new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"List<Integer>l=new ArrayList<Integer>();",
"l",
"new ArrayList<Integer>()",
"int t=s.nextInt()",
"t",
"s.nextInt()",
"s.nextInt",
"s",
"i=0;",
"i",
"0",
"for(;i++<t;)l.add(i);",
";",
"i++<t",
"i++",
"i",
"t",
"l.add(i);",
"l.add(i)",
"l.add",
"l",
"i",
"for(t=s.nextInt(),s.nextLine();t-->0;){String[]e=s.nextLine().split(\",\");Collections.swap(l, new Integer(e[0])-1, new Integer(e[1])-1);}",
"t=s.nextInt(),s.nextLine();",
"t=s.nextInt()",
"t",
"s.nextInt()",
"s.nextInt",
"s",
"s.nextLine()",
"s.nextLine",
"s",
"t-->0",
"t--",
"t",
"0",
"{String[]e=s.nextLine().split(\",\");Collections.swap(l, new Integer(e[0])-1, new Integer(e[1])-1);}",
"{String[]e=s.nextLine().split(\",\");Collections.swap(l, new Integer(e[0])-1, new Integer(e[1])-1);}",
"String[]e=s.nextLine().split(\",\");",
"e",
"s.nextLine().split(\",\")",
"s.nextLine().split",
"s.nextLine()",
"s.nextLine",
"s",
"\",\"",
"Collections.swap(l, new Integer(e[0])-1, new Integer(e[1])-1)",
"Collections.swap",
"Collections",
"l",
"new Integer(e[0])-1",
"new Integer(e[0])",
"1",
"new Integer(e[1])-1",
"new Integer(e[1])",
"1",
"for(int e:l)System.out.println(e);",
"int e",
"l",
"System.out.println(e);",
"System.out.println(e)",
"System.out.println",
"System.out",
"System",
"System.out",
"e",
"String[] a",
"a"
] | import java.util.*;class Main{public static void main(String[] a){Scanner s=new Scanner(System.in);List<Integer>l=new ArrayList<Integer>();int t=s.nextInt(),i=0;for(;i++<t;)l.add(i);for(t=s.nextInt(),s.nextLine();t-->0;){String[]e=s.nextLine().split(",");Collections.swap(l, new Integer(e[0])-1, new Integer(e[1])-1);}for(int e:l)System.out.println(e);}} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
0,
13,
4,
18,
13,
41,
13,
20,
13,
0,
13,
4,
18,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
40,
13,
40,
13,
0,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
2,
18,
13,
13,
17,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
8,
24
],
[
24,
25
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
8,
31
],
[
31,
32
],
[
31,
33
],
[
8,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
8,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
45,
46
],
[
45,
47
],
[
40,
48
],
[
48,
49
],
[
49,
50
],
[
40,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
8,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
62,
63
],
[
62,
64
],
[
57,
65
],
[
65,
66
],
[
66,
67
],
[
57,
68
],
[
69,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
69,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
77,
81
],
[
69,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
87,
88
],
[
87,
89
],
[
69,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
95,
96
],
[
95,
97
],
[
69,
98
],
[
98,
99
],
[
69,
100
],
[
100,
101
],
[
69,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
104,
106
],
[
69,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
107,
111
],
[
111,
112
],
[
111,
113
],
[
69,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
8,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
119,
124
],
[
124,
125
],
[
124,
126
],
[
119,
127
],
[
127,
128
],
[
128,
129
],
[
119,
130
],
[
131,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
132,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
137,
141
],
[
6,
142
],
[
142,
143
]
] | [
"import java.util.Scanner;\nclass Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint w, n, a, b, i, swap;\n\t\tString str;\n\t\tw = scan.nextInt();\n\t\tint[] amidakuji = new int[w];\n\t\tn = scan.nextInt();\n\t\tfor (i = 0; i < w; i ++) amidakuji[i] = i;\n\t\tfor (i = 0; i < n; i ++) {\n\t\t\tstr = scan.next();\n//\t\t\ta = scan.nextInt();\n//\t\t\tb = scan.nextInt();\n\t\t\tString[] seisuu = str.split(\",\", 0);\n\t\t\ta = Integer.parseInt(seisuu[0]);\n\t\t\tb = Integer.parseInt(seisuu[1]);\n\t\t\ta --; b --;\n\t\t\tswap = amidakuji[a]; amidakuji[a] = amidakuji[b]; amidakuji[b] = swap;\n\t\t}\n\t\tfor (i = 0; i < w; i ++) {\n\t\t\tSystem.out.println(amidakuji[i] + 1);\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint w, n, a, b, i, swap;\n\t\tString str;\n\t\tw = scan.nextInt();\n\t\tint[] amidakuji = new int[w];\n\t\tn = scan.nextInt();\n\t\tfor (i = 0; i < w; i ++) amidakuji[i] = i;\n\t\tfor (i = 0; i < n; i ++) {\n\t\t\tstr = scan.next();\n//\t\t\ta = scan.nextInt();\n//\t\t\tb = scan.nextInt();\n\t\t\tString[] seisuu = str.split(\",\", 0);\n\t\t\ta = Integer.parseInt(seisuu[0]);\n\t\t\tb = Integer.parseInt(seisuu[1]);\n\t\t\ta --; b --;\n\t\t\tswap = amidakuji[a]; amidakuji[a] = amidakuji[b]; amidakuji[b] = swap;\n\t\t}\n\t\tfor (i = 0; i < w; i ++) {\n\t\t\tSystem.out.println(amidakuji[i] + 1);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint w, n, a, b, i, swap;\n\t\tString str;\n\t\tw = scan.nextInt();\n\t\tint[] amidakuji = new int[w];\n\t\tn = scan.nextInt();\n\t\tfor (i = 0; i < w; i ++) amidakuji[i] = i;\n\t\tfor (i = 0; i < n; i ++) {\n\t\t\tstr = scan.next();\n//\t\t\ta = scan.nextInt();\n//\t\t\tb = scan.nextInt();\n\t\t\tString[] seisuu = str.split(\",\", 0);\n\t\t\ta = Integer.parseInt(seisuu[0]);\n\t\t\tb = Integer.parseInt(seisuu[1]);\n\t\t\ta --; b --;\n\t\t\tswap = amidakuji[a]; amidakuji[a] = amidakuji[b]; amidakuji[b] = swap;\n\t\t}\n\t\tfor (i = 0; i < w; i ++) {\n\t\t\tSystem.out.println(amidakuji[i] + 1);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint w, n, a, b, i, swap;\n\t\tString str;\n\t\tw = scan.nextInt();\n\t\tint[] amidakuji = new int[w];\n\t\tn = scan.nextInt();\n\t\tfor (i = 0; i < w; i ++) amidakuji[i] = i;\n\t\tfor (i = 0; i < n; i ++) {\n\t\t\tstr = scan.next();\n//\t\t\ta = scan.nextInt();\n//\t\t\tb = scan.nextInt();\n\t\t\tString[] seisuu = str.split(\",\", 0);\n\t\t\ta = Integer.parseInt(seisuu[0]);\n\t\t\tb = Integer.parseInt(seisuu[1]);\n\t\t\ta --; b --;\n\t\t\tswap = amidakuji[a]; amidakuji[a] = amidakuji[b]; amidakuji[b] = swap;\n\t\t}\n\t\tfor (i = 0; i < w; i ++) {\n\t\t\tSystem.out.println(amidakuji[i] + 1);\n\t\t}\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int w",
"w",
"n",
"n",
"a",
"a",
"b",
"b",
"i",
"i",
"swap;",
"swap",
"String str;",
"str",
"w = scan.nextInt()",
"w",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int[] amidakuji = new int[w];",
"amidakuji",
"new int[w]",
"w",
"n = scan.nextInt()",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for (i = 0; i < w; i ++) amidakuji[i] = i;",
"i = 0;",
"i = 0",
"i",
"0",
"i < w",
"i",
"w",
"i ++",
"i ++",
"i",
"amidakuji[i] = i;",
"amidakuji[i] = i",
"amidakuji[i]",
"amidakuji",
"i",
"i",
"for (i = 0; i < n; i ++) {\n\t\t\tstr = scan.next();\n//\t\t\ta = scan.nextInt();\n//\t\t\tb = scan.nextInt();\n\t\t\tString[] seisuu = str.split(\",\", 0);\n\t\t\ta = Integer.parseInt(seisuu[0]);\n\t\t\tb = Integer.parseInt(seisuu[1]);\n\t\t\ta --; b --;\n\t\t\tswap = amidakuji[a]; amidakuji[a] = amidakuji[b]; amidakuji[b] = swap;\n\t\t}",
"i = 0;",
"i = 0",
"i",
"0",
"i < n",
"i",
"n",
"i ++",
"i ++",
"i",
"{\n\t\t\tstr = scan.next();\n//\t\t\ta = scan.nextInt();\n//\t\t\tb = scan.nextInt();\n\t\t\tString[] seisuu = str.split(\",\", 0);\n\t\t\ta = Integer.parseInt(seisuu[0]);\n\t\t\tb = Integer.parseInt(seisuu[1]);\n\t\t\ta --; b --;\n\t\t\tswap = amidakuji[a]; amidakuji[a] = amidakuji[b]; amidakuji[b] = swap;\n\t\t}",
"{\n\t\t\tstr = scan.next();\n//\t\t\ta = scan.nextInt();\n//\t\t\tb = scan.nextInt();\n\t\t\tString[] seisuu = str.split(\",\", 0);\n\t\t\ta = Integer.parseInt(seisuu[0]);\n\t\t\tb = Integer.parseInt(seisuu[1]);\n\t\t\ta --; b --;\n\t\t\tswap = amidakuji[a]; amidakuji[a] = amidakuji[b]; amidakuji[b] = swap;\n\t\t}",
"str = scan.next()",
"str",
"scan.next()",
"scan.next",
"scan",
"String[] seisuu = str.split(\",\", 0);",
"seisuu",
"str.split(\",\", 0)",
"str.split",
"str",
"\",\"",
"0",
"a = Integer.parseInt(seisuu[0])",
"a",
"Integer.parseInt(seisuu[0])",
"Integer.parseInt",
"Integer",
"seisuu[0]",
"seisuu",
"0",
"b = Integer.parseInt(seisuu[1])",
"b",
"Integer.parseInt(seisuu[1])",
"Integer.parseInt",
"Integer",
"seisuu[1]",
"seisuu",
"1",
"a --",
"a",
"b --",
"b",
"swap = amidakuji[a]",
"swap",
"amidakuji[a]",
"amidakuji",
"a",
"amidakuji[a] = amidakuji[b]",
"amidakuji[a]",
"amidakuji",
"a",
"amidakuji[b]",
"amidakuji",
"b",
"amidakuji[b] = swap",
"amidakuji[b]",
"amidakuji",
"b",
"swap",
"for (i = 0; i < w; i ++) {\n\t\t\tSystem.out.println(amidakuji[i] + 1);\n\t\t}",
"i = 0;",
"i = 0",
"i",
"0",
"i < w",
"i",
"w",
"i ++",
"i ++",
"i",
"{\n\t\t\tSystem.out.println(amidakuji[i] + 1);\n\t\t}",
"{\n\t\t\tSystem.out.println(amidakuji[i] + 1);\n\t\t}",
"System.out.println(amidakuji[i] + 1)",
"System.out.println",
"System.out",
"System",
"System.out",
"amidakuji[i] + 1",
"amidakuji[i]",
"amidakuji",
"i",
"1",
"String[] args",
"args"
] | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int w, n, a, b, i, swap;
String str;
w = scan.nextInt();
int[] amidakuji = new int[w];
n = scan.nextInt();
for (i = 0; i < w; i ++) amidakuji[i] = i;
for (i = 0; i < n; i ++) {
str = scan.next();
// a = scan.nextInt();
// b = scan.nextInt();
String[] seisuu = str.split(",", 0);
a = Integer.parseInt(seisuu[0]);
b = Integer.parseInt(seisuu[1]);
a --; b --;
swap = amidakuji[a]; amidakuji[a] = amidakuji[b]; amidakuji[b] = swap;
}
for (i = 0; i < w; i ++) {
System.out.println(amidakuji[i] + 1);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
13,
4,
18,
13,
17,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
8,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
37,
39
],
[
30,
40
],
[
40,
41
],
[
41,
42
],
[
30,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
48,
50
],
[
8,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
56,
58
],
[
51,
59
],
[
59,
60
],
[
60,
61
],
[
51,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
63,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
71,
75
],
[
63,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
82,
83
],
[
82,
84
],
[
78,
85
],
[
63,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
92,
93
],
[
92,
94
],
[
88,
95
],
[
63,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
98,
100
],
[
63,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
105,
106
],
[
105,
107
],
[
63,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
8,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
113,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
120,
122
],
[
113,
123
],
[
123,
124
],
[
124,
125
],
[
113,
126
],
[
127,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
128,
133
],
[
133,
134
],
[
133,
135
],
[
6,
136
],
[
136,
137
]
] | [
"import java.util.*;\n\nclass Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[w];\n\t\tString[] st = new String[2];\n\t\tfor(int i = 0; i < a.length; i++)\n\t\t\ta[i] = i + 1;\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString str = sc.next();\n\t\t\tst = str.split(\",\",0);\n\t\t\tint x = Integer.parseInt(st[0])-1;\n\t\t\tint y = Integer.parseInt(st[1])-1;\n\t\t\tint t = a[x];\n\t\t\ta[x] = a[y];\n\t\t\ta[y] = t;\n\t\t}\n\t\tfor(int i = 0; i < a.length; i++){\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[w];\n\t\tString[] st = new String[2];\n\t\tfor(int i = 0; i < a.length; i++)\n\t\t\ta[i] = i + 1;\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString str = sc.next();\n\t\t\tst = str.split(\",\",0);\n\t\t\tint x = Integer.parseInt(st[0])-1;\n\t\t\tint y = Integer.parseInt(st[1])-1;\n\t\t\tint t = a[x];\n\t\t\ta[x] = a[y];\n\t\t\ta[y] = t;\n\t\t}\n\t\tfor(int i = 0; i < a.length; i++){\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[w];\n\t\tString[] st = new String[2];\n\t\tfor(int i = 0; i < a.length; i++)\n\t\t\ta[i] = i + 1;\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString str = sc.next();\n\t\t\tst = str.split(\",\",0);\n\t\t\tint x = Integer.parseInt(st[0])-1;\n\t\t\tint y = Integer.parseInt(st[1])-1;\n\t\t\tint t = a[x];\n\t\t\ta[x] = a[y];\n\t\t\ta[y] = t;\n\t\t}\n\t\tfor(int i = 0; i < a.length; i++){\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[w];\n\t\tString[] st = new String[2];\n\t\tfor(int i = 0; i < a.length; i++)\n\t\t\ta[i] = i + 1;\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString str = sc.next();\n\t\t\tst = str.split(\",\",0);\n\t\t\tint x = Integer.parseInt(st[0])-1;\n\t\t\tint y = Integer.parseInt(st[1])-1;\n\t\t\tint t = a[x];\n\t\t\ta[x] = a[y];\n\t\t\ta[y] = t;\n\t\t}\n\t\tfor(int i = 0; i < a.length; i++){\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] a = new int[w];",
"a",
"new int[w]",
"w",
"String[] st = new String[2];",
"st",
"new String[2]",
"2",
"for(int i = 0; i < a.length; i++)\n\t\t\ta[i] = i + 1;",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < a.length",
"i",
"a.length",
"a",
"a.length",
"i++",
"i++",
"i",
"a[i] = i + 1;",
"a[i] = i + 1",
"a[i]",
"a",
"i",
"i + 1",
"i",
"1",
"for(int i = 0; i < n; i++){\n\t\t\tString str = sc.next();\n\t\t\tst = str.split(\",\",0);\n\t\t\tint x = Integer.parseInt(st[0])-1;\n\t\t\tint y = Integer.parseInt(st[1])-1;\n\t\t\tint t = a[x];\n\t\t\ta[x] = a[y];\n\t\t\ta[y] = t;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString str = sc.next();\n\t\t\tst = str.split(\",\",0);\n\t\t\tint x = Integer.parseInt(st[0])-1;\n\t\t\tint y = Integer.parseInt(st[1])-1;\n\t\t\tint t = a[x];\n\t\t\ta[x] = a[y];\n\t\t\ta[y] = t;\n\t\t}",
"{\n\t\t\tString str = sc.next();\n\t\t\tst = str.split(\",\",0);\n\t\t\tint x = Integer.parseInt(st[0])-1;\n\t\t\tint y = Integer.parseInt(st[1])-1;\n\t\t\tint t = a[x];\n\t\t\ta[x] = a[y];\n\t\t\ta[y] = t;\n\t\t}",
"String str = sc.next();",
"str",
"sc.next()",
"sc.next",
"sc",
"st = str.split(\",\",0)",
"st",
"str.split(\",\",0)",
"str.split",
"str",
"\",\"",
"0",
"int x = Integer.parseInt(st[0])-1;",
"x",
"Integer.parseInt(st[0])-1",
"Integer.parseInt(st[0])",
"Integer.parseInt",
"Integer",
"st[0]",
"st",
"0",
"1",
"int y = Integer.parseInt(st[1])-1;",
"y",
"Integer.parseInt(st[1])-1",
"Integer.parseInt(st[1])",
"Integer.parseInt",
"Integer",
"st[1]",
"st",
"1",
"1",
"int t = a[x];",
"t",
"a[x]",
"a",
"x",
"a[x] = a[y]",
"a[x]",
"a",
"x",
"a[y]",
"a",
"y",
"a[y] = t",
"a[y]",
"a",
"y",
"t",
"for(int i = 0; i < a.length; i++){\n\t\t\tSystem.out.println(a[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < a.length",
"i",
"a.length",
"a",
"a.length",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(a[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(a[i]);\n\t\t}",
"System.out.println(a[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"a[i]",
"a",
"i",
"String[] args",
"args"
] | import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int w = sc.nextInt();
int n = sc.nextInt();
int[] a = new int[w];
String[] st = new String[2];
for(int i = 0; i < a.length; i++)
a[i] = i + 1;
for(int i = 0; i < n; i++){
String str = sc.next();
st = str.split(",",0);
int x = Integer.parseInt(st[0])-1;
int y = Integer.parseInt(st[1])-1;
int t = a[x];
a[x] = a[y];
a[y] = t;
}
for(int i = 0; i < a.length; i++){
System.out.println(a[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,
2,
13,
17,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
134,
5
],
[
134,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
26,
27
],
[
26,
28
],
[
21,
29
],
[
29,
30
],
[
30,
31
],
[
21,
32
],
[
33,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
38,
39
],
[
38,
40
],
[
8,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
8,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
58,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
58,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
76,
77
],
[
76,
78
],
[
72,
79
],
[
58,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
86,
87
],
[
86,
88
],
[
82,
89
],
[
58,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
92,
94
],
[
58,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
99,
101
],
[
58,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
8,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
107,
112
],
[
112,
113
],
[
112,
114
],
[
107,
115
],
[
115,
116
],
[
116,
117
],
[
107,
118
],
[
119,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
120,
125
],
[
125,
126
],
[
125,
127
],
[
8,
128
],
[
128,
129
],
[
129,
130
],
[
6,
131
],
[
131,
132
],
[
0,
133
],
[
133,
134
],
[
133,
135
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] arg){\n Scanner sc = new Scanner(System.in);\n int z = sc.nextInt();\n int[] w = new int[z];\n for(int i = 0; i < z; i++){\n w[i] = i+1;\n }\n int n = sc.nextInt();\n for(int j = 0; j<n; j++){\n String s = sc.next();\n String[] ab = s.split(\",\");\n int a = Integer.parseInt(ab[0])-1;\n int b = Integer.parseInt(ab[1])-1;\n int c = w[a];\n w[a] = w[b];\n w[b] = c;\n }\n for(int k = 0; k < z; k++){\n System.out.println(w[k]);\n }\n sc.close();\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] arg){\n Scanner sc = new Scanner(System.in);\n int z = sc.nextInt();\n int[] w = new int[z];\n for(int i = 0; i < z; i++){\n w[i] = i+1;\n }\n int n = sc.nextInt();\n for(int j = 0; j<n; j++){\n String s = sc.next();\n String[] ab = s.split(\",\");\n int a = Integer.parseInt(ab[0])-1;\n int b = Integer.parseInt(ab[1])-1;\n int c = w[a];\n w[a] = w[b];\n w[b] = c;\n }\n for(int k = 0; k < z; k++){\n System.out.println(w[k]);\n }\n sc.close();\n }\n}",
"Main",
"public static void main(String[] arg){\n Scanner sc = new Scanner(System.in);\n int z = sc.nextInt();\n int[] w = new int[z];\n for(int i = 0; i < z; i++){\n w[i] = i+1;\n }\n int n = sc.nextInt();\n for(int j = 0; j<n; j++){\n String s = sc.next();\n String[] ab = s.split(\",\");\n int a = Integer.parseInt(ab[0])-1;\n int b = Integer.parseInt(ab[1])-1;\n int c = w[a];\n w[a] = w[b];\n w[b] = c;\n }\n for(int k = 0; k < z; k++){\n System.out.println(w[k]);\n }\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int z = sc.nextInt();\n int[] w = new int[z];\n for(int i = 0; i < z; i++){\n w[i] = i+1;\n }\n int n = sc.nextInt();\n for(int j = 0; j<n; j++){\n String s = sc.next();\n String[] ab = s.split(\",\");\n int a = Integer.parseInt(ab[0])-1;\n int b = Integer.parseInt(ab[1])-1;\n int c = w[a];\n w[a] = w[b];\n w[b] = c;\n }\n for(int k = 0; k < z; k++){\n System.out.println(w[k]);\n }\n sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int z = sc.nextInt();",
"z",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] w = new int[z];",
"w",
"new int[z]",
"z",
"for(int i = 0; i < z; i++){\n w[i] = i+1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < z",
"i",
"z",
"i++",
"i++",
"i",
"{\n w[i] = i+1;\n }",
"{\n w[i] = i+1;\n }",
"w[i] = i+1",
"w[i]",
"w",
"i",
"i+1",
"i",
"1",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int j = 0; j<n; j++){\n String s = sc.next();\n String[] ab = s.split(\",\");\n int a = Integer.parseInt(ab[0])-1;\n int b = Integer.parseInt(ab[1])-1;\n int c = w[a];\n w[a] = w[b];\n w[b] = c;\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j<n",
"j",
"n",
"j++",
"j++",
"j",
"{\n String s = sc.next();\n String[] ab = s.split(\",\");\n int a = Integer.parseInt(ab[0])-1;\n int b = Integer.parseInt(ab[1])-1;\n int c = w[a];\n w[a] = w[b];\n w[b] = c;\n }",
"{\n String s = sc.next();\n String[] ab = s.split(\",\");\n int a = Integer.parseInt(ab[0])-1;\n int b = Integer.parseInt(ab[1])-1;\n int c = w[a];\n w[a] = w[b];\n w[b] = c;\n }",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String[] ab = s.split(\",\");",
"ab",
"s.split(\",\")",
"s.split",
"s",
"\",\"",
"int a = Integer.parseInt(ab[0])-1;",
"a",
"Integer.parseInt(ab[0])-1",
"Integer.parseInt(ab[0])",
"Integer.parseInt",
"Integer",
"ab[0]",
"ab",
"0",
"1",
"int b = Integer.parseInt(ab[1])-1;",
"b",
"Integer.parseInt(ab[1])-1",
"Integer.parseInt(ab[1])",
"Integer.parseInt",
"Integer",
"ab[1]",
"ab",
"1",
"1",
"int c = w[a];",
"c",
"w[a]",
"w",
"a",
"w[a] = w[b]",
"w[a]",
"w",
"a",
"w[b]",
"w",
"b",
"w[b] = c",
"w[b]",
"w",
"b",
"c",
"for(int k = 0; k < z; k++){\n System.out.println(w[k]);\n }",
"int k = 0;",
"int k = 0;",
"k",
"0",
"k < z",
"k",
"z",
"k++",
"k++",
"k",
"{\n System.out.println(w[k]);\n }",
"{\n System.out.println(w[k]);\n }",
"System.out.println(w[k])",
"System.out.println",
"System.out",
"System",
"System.out",
"w[k]",
"w",
"k",
"sc.close()",
"sc.close",
"sc",
"String[] arg",
"arg",
"public class Main {\n public static void main(String[] arg){\n Scanner sc = new Scanner(System.in);\n int z = sc.nextInt();\n int[] w = new int[z];\n for(int i = 0; i < z; i++){\n w[i] = i+1;\n }\n int n = sc.nextInt();\n for(int j = 0; j<n; j++){\n String s = sc.next();\n String[] ab = s.split(\",\");\n int a = Integer.parseInt(ab[0])-1;\n int b = Integer.parseInt(ab[1])-1;\n int c = w[a];\n w[a] = w[b];\n w[b] = c;\n }\n for(int k = 0; k < z; k++){\n System.out.println(w[k]);\n }\n sc.close();\n }\n}",
"public class Main {\n public static void main(String[] arg){\n Scanner sc = new Scanner(System.in);\n int z = sc.nextInt();\n int[] w = new int[z];\n for(int i = 0; i < z; i++){\n w[i] = i+1;\n }\n int n = sc.nextInt();\n for(int j = 0; j<n; j++){\n String s = sc.next();\n String[] ab = s.split(\",\");\n int a = Integer.parseInt(ab[0])-1;\n int b = Integer.parseInt(ab[1])-1;\n int c = w[a];\n w[a] = w[b];\n w[b] = c;\n }\n for(int k = 0; k < z; k++){\n System.out.println(w[k]);\n }\n sc.close();\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] arg){
Scanner sc = new Scanner(System.in);
int z = sc.nextInt();
int[] w = new int[z];
for(int i = 0; i < z; i++){
w[i] = i+1;
}
int n = sc.nextInt();
for(int j = 0; j<n; j++){
String s = sc.next();
String[] ab = s.split(",");
int a = Integer.parseInt(ab[0])-1;
int b = Integer.parseInt(ab[1])-1;
int c = w[a];
w[a] = w[b];
w[b] = c;
}
for(int k = 0; k < z; k++){
System.out.println(w[k]);
}
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
2,
18,
13,
13,
17,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
8,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
44,
52
],
[
52,
53
],
[
53,
54
],
[
44,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
59,
64
],
[
56,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
71,
72
],
[
71,
73
],
[
67,
74
],
[
56,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
81,
82
],
[
81,
83
],
[
77,
84
],
[
56,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
87,
89
],
[
56,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
94,
95
],
[
94,
96
],
[
56,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
8,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
102,
107
],
[
107,
108
],
[
107,
109
],
[
102,
110
],
[
110,
111
],
[
111,
112
],
[
102,
113
],
[
114,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
115,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
120,
124
],
[
6,
125
],
[
125,
126
]
] | [
"import java.util.*;\n\nclass Main {\n public static void main (String [] args) {\n\n Scanner sc = new Scanner(System.in);\n\n int w = sc.nextInt();\n int n = sc.nextInt();\n\n int[] member = new int[w];\n for (int m = 0; m < w; m++) {\n member[m] = m;\n }\n\n for (int t = 0; t < n; t++) {\n String[] bar = sc.next().split(\",\");\n int a = Integer.parseInt(bar[0]) - 1;\n int b = Integer.parseInt(bar[1]) - 1;\n\n int tmp = member[b];\n member[b] = member[a];\n member[a] = tmp;\n }\n\n for (int m = 0; m < w; m++) {\n System.out.println(member[m] + 1);\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"class Main {\n public static void main (String [] args) {\n\n Scanner sc = new Scanner(System.in);\n\n int w = sc.nextInt();\n int n = sc.nextInt();\n\n int[] member = new int[w];\n for (int m = 0; m < w; m++) {\n member[m] = m;\n }\n\n for (int t = 0; t < n; t++) {\n String[] bar = sc.next().split(\",\");\n int a = Integer.parseInt(bar[0]) - 1;\n int b = Integer.parseInt(bar[1]) - 1;\n\n int tmp = member[b];\n member[b] = member[a];\n member[a] = tmp;\n }\n\n for (int m = 0; m < w; m++) {\n System.out.println(member[m] + 1);\n }\n }\n}",
"Main",
"public static void main (String [] args) {\n\n Scanner sc = new Scanner(System.in);\n\n int w = sc.nextInt();\n int n = sc.nextInt();\n\n int[] member = new int[w];\n for (int m = 0; m < w; m++) {\n member[m] = m;\n }\n\n for (int t = 0; t < n; t++) {\n String[] bar = sc.next().split(\",\");\n int a = Integer.parseInt(bar[0]) - 1;\n int b = Integer.parseInt(bar[1]) - 1;\n\n int tmp = member[b];\n member[b] = member[a];\n member[a] = tmp;\n }\n\n for (int m = 0; m < w; m++) {\n System.out.println(member[m] + 1);\n }\n }",
"main",
"{\n\n Scanner sc = new Scanner(System.in);\n\n int w = sc.nextInt();\n int n = sc.nextInt();\n\n int[] member = new int[w];\n for (int m = 0; m < w; m++) {\n member[m] = m;\n }\n\n for (int t = 0; t < n; t++) {\n String[] bar = sc.next().split(\",\");\n int a = Integer.parseInt(bar[0]) - 1;\n int b = Integer.parseInt(bar[1]) - 1;\n\n int tmp = member[b];\n member[b] = member[a];\n member[a] = tmp;\n }\n\n for (int m = 0; m < w; m++) {\n System.out.println(member[m] + 1);\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] member = new int[w];",
"member",
"new int[w]",
"w",
"for (int m = 0; m < w; m++) {\n member[m] = m;\n }",
"int m = 0;",
"int m = 0;",
"m",
"0",
"m < w",
"m",
"w",
"m++",
"m++",
"m",
"{\n member[m] = m;\n }",
"{\n member[m] = m;\n }",
"member[m] = m",
"member[m]",
"member",
"m",
"m",
"for (int t = 0; t < n; t++) {\n String[] bar = sc.next().split(\",\");\n int a = Integer.parseInt(bar[0]) - 1;\n int b = Integer.parseInt(bar[1]) - 1;\n\n int tmp = member[b];\n member[b] = member[a];\n member[a] = tmp;\n }",
"int t = 0;",
"int t = 0;",
"t",
"0",
"t < n",
"t",
"n",
"t++",
"t++",
"t",
"{\n String[] bar = sc.next().split(\",\");\n int a = Integer.parseInt(bar[0]) - 1;\n int b = Integer.parseInt(bar[1]) - 1;\n\n int tmp = member[b];\n member[b] = member[a];\n member[a] = tmp;\n }",
"{\n String[] bar = sc.next().split(\",\");\n int a = Integer.parseInt(bar[0]) - 1;\n int b = Integer.parseInt(bar[1]) - 1;\n\n int tmp = member[b];\n member[b] = member[a];\n member[a] = tmp;\n }",
"String[] bar = sc.next().split(\",\");",
"bar",
"sc.next().split(\",\")",
"sc.next().split",
"sc.next()",
"sc.next",
"sc",
"\",\"",
"int a = Integer.parseInt(bar[0]) - 1;",
"a",
"Integer.parseInt(bar[0]) - 1",
"Integer.parseInt(bar[0])",
"Integer.parseInt",
"Integer",
"bar[0]",
"bar",
"0",
"1",
"int b = Integer.parseInt(bar[1]) - 1;",
"b",
"Integer.parseInt(bar[1]) - 1",
"Integer.parseInt(bar[1])",
"Integer.parseInt",
"Integer",
"bar[1]",
"bar",
"1",
"1",
"int tmp = member[b];",
"tmp",
"member[b]",
"member",
"b",
"member[b] = member[a]",
"member[b]",
"member",
"b",
"member[a]",
"member",
"a",
"member[a] = tmp",
"member[a]",
"member",
"a",
"tmp",
"for (int m = 0; m < w; m++) {\n System.out.println(member[m] + 1);\n }",
"int m = 0;",
"int m = 0;",
"m",
"0",
"m < w",
"m",
"w",
"m++",
"m++",
"m",
"{\n System.out.println(member[m] + 1);\n }",
"{\n System.out.println(member[m] + 1);\n }",
"System.out.println(member[m] + 1)",
"System.out.println",
"System.out",
"System",
"System.out",
"member[m] + 1",
"member[m]",
"member",
"m",
"1",
"String [] args",
"args"
] | import java.util.*;
class Main {
public static void main (String [] args) {
Scanner sc = new Scanner(System.in);
int w = sc.nextInt();
int n = sc.nextInt();
int[] member = new int[w];
for (int m = 0; m < w; m++) {
member[m] = m;
}
for (int t = 0; t < n; t++) {
String[] bar = sc.next().split(",");
int a = Integer.parseInt(bar[0]) - 1;
int b = Integer.parseInt(bar[1]) - 1;
int tmp = member[b];
member[b] = member[a];
member[a] = tmp;
}
for (int m = 0; m < w; m++) {
System.out.println(member[m] + 1);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
2,
13,
17,
13,
42,
2,
17,
40,
13,
30,
41,
13,
4,
18,
4,
18,
13,
17,
4,
13,
13,
2,
4,
18,
13,
18,
13,
17,
17,
2,
4,
18,
13,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
4,
18,
13,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
23,
13,
23,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
137,
5
],
[
137,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
16,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
16,
27
],
[
27,
28
],
[
27,
29
],
[
16,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
47,
49
],
[
44,
50
],
[
16,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
51,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
59,
64
],
[
56,
65
],
[
65,
66
],
[
65,
67
],
[
65,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
72,
73
],
[
72,
74
],
[
68,
75
],
[
65,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
80,
81
],
[
80,
82
],
[
76,
83
],
[
16,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
89,
90
],
[
89,
91
],
[
84,
92
],
[
92,
93
],
[
93,
94
],
[
84,
95
],
[
96,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
102,
103
],
[
103,
104
],
[
102,
105
],
[
105,
106
],
[
105,
107
],
[
6,
108
],
[
108,
109
],
[
137,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
115,
117
],
[
112,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
118,
122
],
[
122,
123
],
[
122,
124
],
[
112,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
125,
129
],
[
110,
130
],
[
130,
131
],
[
110,
132
],
[
132,
133
],
[
110,
134
],
[
134,
135
],
[
0,
136
],
[
136,
137
],
[
136,
138
]
] | [
"import java.util.*;\n\npublic class Main\n{\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\n\twhile(sc.hasNext()){\n\t int w = sc.nextInt();\n\t int n = sc.nextInt();\n\n\t int[] lots = new int[w];\n\t for(int i = 1; i <= w; ++i){\n\t\tlots[i-1] = i;\n\t }\n\n\t while(0 < n--){\n\t\tString[] horizontal_line = sc.next().split(\",\");\n\t\tswapVerticalLines(lots, Integer.parseInt(horizontal_line[0])-1, Integer.parseInt(horizontal_line[1])-1);\n\t }\n\n\t for(int i = 0; i < w; ++i){\n\t\tSystem.out.println(String.valueOf(lots[i]));\n\t }\n\t}\n }\n\n private static void swapVerticalLines(int[] lots, int line1, int line2){\n\tint tmp = lots[line1];\n\tlots[line1] = lots[line2];\n\tlots[line2] = tmp;\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main\n{\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\n\twhile(sc.hasNext()){\n\t int w = sc.nextInt();\n\t int n = sc.nextInt();\n\n\t int[] lots = new int[w];\n\t for(int i = 1; i <= w; ++i){\n\t\tlots[i-1] = i;\n\t }\n\n\t while(0 < n--){\n\t\tString[] horizontal_line = sc.next().split(\",\");\n\t\tswapVerticalLines(lots, Integer.parseInt(horizontal_line[0])-1, Integer.parseInt(horizontal_line[1])-1);\n\t }\n\n\t for(int i = 0; i < w; ++i){\n\t\tSystem.out.println(String.valueOf(lots[i]));\n\t }\n\t}\n }\n\n private static void swapVerticalLines(int[] lots, int line1, int line2){\n\tint tmp = lots[line1];\n\tlots[line1] = lots[line2];\n\tlots[line2] = tmp;\n }\n}",
"Main",
"public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\n\twhile(sc.hasNext()){\n\t int w = sc.nextInt();\n\t int n = sc.nextInt();\n\n\t int[] lots = new int[w];\n\t for(int i = 1; i <= w; ++i){\n\t\tlots[i-1] = i;\n\t }\n\n\t while(0 < n--){\n\t\tString[] horizontal_line = sc.next().split(\",\");\n\t\tswapVerticalLines(lots, Integer.parseInt(horizontal_line[0])-1, Integer.parseInt(horizontal_line[1])-1);\n\t }\n\n\t for(int i = 0; i < w; ++i){\n\t\tSystem.out.println(String.valueOf(lots[i]));\n\t }\n\t}\n }",
"main",
"{\n\tScanner sc = new Scanner(System.in);\n\n\twhile(sc.hasNext()){\n\t int w = sc.nextInt();\n\t int n = sc.nextInt();\n\n\t int[] lots = new int[w];\n\t for(int i = 1; i <= w; ++i){\n\t\tlots[i-1] = i;\n\t }\n\n\t while(0 < n--){\n\t\tString[] horizontal_line = sc.next().split(\",\");\n\t\tswapVerticalLines(lots, Integer.parseInt(horizontal_line[0])-1, Integer.parseInt(horizontal_line[1])-1);\n\t }\n\n\t for(int i = 0; i < w; ++i){\n\t\tSystem.out.println(String.valueOf(lots[i]));\n\t }\n\t}\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(sc.hasNext()){\n\t int w = sc.nextInt();\n\t int n = sc.nextInt();\n\n\t int[] lots = new int[w];\n\t for(int i = 1; i <= w; ++i){\n\t\tlots[i-1] = i;\n\t }\n\n\t while(0 < n--){\n\t\tString[] horizontal_line = sc.next().split(\",\");\n\t\tswapVerticalLines(lots, Integer.parseInt(horizontal_line[0])-1, Integer.parseInt(horizontal_line[1])-1);\n\t }\n\n\t for(int i = 0; i < w; ++i){\n\t\tSystem.out.println(String.valueOf(lots[i]));\n\t }\n\t}",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n\t int w = sc.nextInt();\n\t int n = sc.nextInt();\n\n\t int[] lots = new int[w];\n\t for(int i = 1; i <= w; ++i){\n\t\tlots[i-1] = i;\n\t }\n\n\t while(0 < n--){\n\t\tString[] horizontal_line = sc.next().split(\",\");\n\t\tswapVerticalLines(lots, Integer.parseInt(horizontal_line[0])-1, Integer.parseInt(horizontal_line[1])-1);\n\t }\n\n\t for(int i = 0; i < w; ++i){\n\t\tSystem.out.println(String.valueOf(lots[i]));\n\t }\n\t}",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] lots = new int[w];",
"lots",
"new int[w]",
"w",
"for(int i = 1; i <= w; ++i){\n\t\tlots[i-1] = i;\n\t }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= w",
"i",
"w",
"++i",
"++i",
"i",
"{\n\t\tlots[i-1] = i;\n\t }",
"{\n\t\tlots[i-1] = i;\n\t }",
"lots[i-1] = i",
"lots[i-1]",
"lots",
"i-1",
"i",
"1",
"i",
"while(0 < n--){\n\t\tString[] horizontal_line = sc.next().split(\",\");\n\t\tswapVerticalLines(lots, Integer.parseInt(horizontal_line[0])-1, Integer.parseInt(horizontal_line[1])-1);\n\t }",
"0 < n--",
"0",
"n--",
"n",
"{\n\t\tString[] horizontal_line = sc.next().split(\",\");\n\t\tswapVerticalLines(lots, Integer.parseInt(horizontal_line[0])-1, Integer.parseInt(horizontal_line[1])-1);\n\t }",
"String[] horizontal_line = sc.next().split(\",\");",
"horizontal_line",
"sc.next().split(\",\")",
"sc.next().split",
"sc.next()",
"sc.next",
"sc",
"\",\"",
"swapVerticalLines(lots, Integer.parseInt(horizontal_line[0])-1, Integer.parseInt(horizontal_line[1])-1)",
"swapVerticalLines",
"lots",
"Integer.parseInt(horizontal_line[0])-1",
"Integer.parseInt(horizontal_line[0])",
"Integer.parseInt",
"Integer",
"horizontal_line[0]",
"horizontal_line",
"0",
"1",
"Integer.parseInt(horizontal_line[1])-1",
"Integer.parseInt(horizontal_line[1])",
"Integer.parseInt",
"Integer",
"horizontal_line[1]",
"horizontal_line",
"1",
"1",
"for(int i = 0; i < w; ++i){\n\t\tSystem.out.println(String.valueOf(lots[i]));\n\t }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"++i",
"++i",
"i",
"{\n\t\tSystem.out.println(String.valueOf(lots[i]));\n\t }",
"{\n\t\tSystem.out.println(String.valueOf(lots[i]));\n\t }",
"System.out.println(String.valueOf(lots[i]))",
"System.out.println",
"System.out",
"System",
"System.out",
"String.valueOf(lots[i])",
"String.valueOf",
"String",
"lots[i]",
"lots",
"i",
"String[] args",
"args",
"private static void swapVerticalLines(int[] lots, int line1, int line2){\n\tint tmp = lots[line1];\n\tlots[line1] = lots[line2];\n\tlots[line2] = tmp;\n }",
"swapVerticalLines",
"{\n\tint tmp = lots[line1];\n\tlots[line1] = lots[line2];\n\tlots[line2] = tmp;\n }",
"int tmp = lots[line1];",
"tmp",
"lots[line1]",
"lots",
"line1",
"lots[line1] = lots[line2]",
"lots[line1]",
"lots",
"line1",
"lots[line2]",
"lots",
"line2",
"lots[line2] = tmp",
"lots[line2]",
"lots",
"line2",
"tmp",
"int[] lots",
"lots",
"int line1",
"line1",
"int line2",
"line2",
"public class Main\n{\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\n\twhile(sc.hasNext()){\n\t int w = sc.nextInt();\n\t int n = sc.nextInt();\n\n\t int[] lots = new int[w];\n\t for(int i = 1; i <= w; ++i){\n\t\tlots[i-1] = i;\n\t }\n\n\t while(0 < n--){\n\t\tString[] horizontal_line = sc.next().split(\",\");\n\t\tswapVerticalLines(lots, Integer.parseInt(horizontal_line[0])-1, Integer.parseInt(horizontal_line[1])-1);\n\t }\n\n\t for(int i = 0; i < w; ++i){\n\t\tSystem.out.println(String.valueOf(lots[i]));\n\t }\n\t}\n }\n\n private static void swapVerticalLines(int[] lots, int line1, int line2){\n\tint tmp = lots[line1];\n\tlots[line1] = lots[line2];\n\tlots[line2] = tmp;\n }\n}",
"public class Main\n{\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\n\twhile(sc.hasNext()){\n\t int w = sc.nextInt();\n\t int n = sc.nextInt();\n\n\t int[] lots = new int[w];\n\t for(int i = 1; i <= w; ++i){\n\t\tlots[i-1] = i;\n\t }\n\n\t while(0 < n--){\n\t\tString[] horizontal_line = sc.next().split(\",\");\n\t\tswapVerticalLines(lots, Integer.parseInt(horizontal_line[0])-1, Integer.parseInt(horizontal_line[1])-1);\n\t }\n\n\t for(int i = 0; i < w; ++i){\n\t\tSystem.out.println(String.valueOf(lots[i]));\n\t }\n\t}\n }\n\n private static void swapVerticalLines(int[] lots, int line1, int line2){\n\tint tmp = lots[line1];\n\tlots[line1] = lots[line2];\n\tlots[line2] = tmp;\n }\n}",
"Main"
] | import java.util.*;
public class Main
{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
int w = sc.nextInt();
int n = sc.nextInt();
int[] lots = new int[w];
for(int i = 1; i <= w; ++i){
lots[i-1] = i;
}
while(0 < n--){
String[] horizontal_line = sc.next().split(",");
swapVerticalLines(lots, Integer.parseInt(horizontal_line[0])-1, Integer.parseInt(horizontal_line[1])-1);
}
for(int i = 0; i < w; ++i){
System.out.println(String.valueOf(lots[i]));
}
}
}
private static void swapVerticalLines(int[] lots, int line1, int line2){
int tmp = lots[line1];
lots[line1] = lots[line2];
lots[line2] = tmp;
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
4,
18,
20,
23,
13,
12,
13,
30,
41,
13,
4,
13,
4,
13,
4,
18,
13,
41,
13,
4,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
13,
4,
18,
4,
18,
13,
17,
13,
28,
13,
13,
30,
30,
4,
18,
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,
2,
13,
17,
29,
13,
23,
13,
12,
13,
30,
41,
13,
2,
4,
13,
18,
13,
17,
17,
41,
13,
2,
4,
13,
18,
13,
17,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
23,
13,
23,
13,
13,
6,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
41,
13,
20,
4,
13,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
41,
13,
20,
4,
13,
13,
23,
13,
12,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
192,
14
],
[
192,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
15,
21
],
[
21,
22
],
[
192,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
25,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
25,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
47,
48
],
[
47,
49
],
[
42,
50
],
[
50,
51
],
[
51,
52
],
[
42,
53
],
[
54,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
57,
62
],
[
55,
63
],
[
25,
64
],
[
64,
65
],
[
64,
66
],
[
64,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
23,
73
],
[
73,
74
],
[
192,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
82,
87
],
[
87,
88
],
[
87,
89
],
[
82,
90
],
[
90,
91
],
[
91,
92
],
[
82,
93
],
[
94,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
99,
101
],
[
77,
102
],
[
102,
103
],
[
75,
104
],
[
104,
105
],
[
192,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
114,
116
],
[
111,
117
],
[
108,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
123,
125
],
[
120,
126
],
[
108,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
129,
131
],
[
108,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
132,
136
],
[
136,
137
],
[
136,
138
],
[
108,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
139,
143
],
[
106,
144
],
[
144,
145
],
[
106,
146
],
[
146,
147
],
[
192,
148
],
[
0,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
151,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
155,
157
],
[
157,
158
],
[
158,
159
],
[
159,
160
],
[
154,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
161,
165
],
[
165,
166
],
[
165,
167
],
[
149,
168
],
[
168,
169
],
[
168,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
172,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
171,
178
],
[
178,
179
],
[
179,
180
],
[
179,
181
],
[
178,
182
],
[
182,
183
],
[
182,
184
],
[
168,
185
],
[
185,
186
],
[
149,
187
],
[
187,
188
],
[
187,
189
],
[
189,
190
],
[
0,
191
],
[
191,
192
],
[
191,
193
]
] | [
"import static java.lang.Integer.parseInt;\nimport static java.lang.System.out;\nimport java.io.File;\nimport java.util.Scanner;\n\npublic class Main extends BaseExe {\n\n public static void main(String[] args) {\n new Main().exeSysIn();\n }\n\n @Override\n protected void execute(Scanner scan) {\n int[] lots = getLots(parseInt(scan.nextLine()));\n int crossCount = parseInt(scan.nextLine());\n for (int chageCount = 0; chageCount < crossCount; chageCount++) {\n changeLot(scan.nextLine().split(\",\"), lots);\n }\n for (int lot : lots) {\n out.println(lot);\n }\n }\n\n private int[] getLots(int count) {\n int[] lots = new int[count];\n for (int lotIndex = 0; lotIndex < count; lotIndex++) {\n lots[lotIndex] = lotIndex + 1;\n }\n return lots;\n }\n\n private void changeLot(String[] changeNumbers, int[] lots) {\n int beforeIndex = parseInt(changeNumbers[0]) - 1;\n int afterIndex = parseInt(changeNumbers[1]) - 1;\n int tmp = lots[beforeIndex];\n lots[beforeIndex] = lots[afterIndex];\n lots[afterIndex] = tmp;\n }\n}\n\nabstract class BaseExe {\n\n public void exeSysIn() {\n try (Scanner scan = new Scanner(System.in)) {\n execute(scan);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n public void exeFileIn(String inDataPath) {\n try (Scanner scan = new Scanner(new File(inDataPath))) {\n execute(scan);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n protected abstract void execute(Scanner scan);\n}",
"import static java.lang.Integer.parseInt;",
"import static java.lang.Integer.parseInt;",
"import static java.lang.Integer.parseInt;",
"import static java.lang.System.out;",
"import static java.lang.System.out;",
"import static java.lang.System.out;",
"import java.io.File;",
"File",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main extends BaseExe {\n\n public static void main(String[] args) {\n new Main().exeSysIn();\n }\n\n @Override\n protected void execute(Scanner scan) {\n int[] lots = getLots(parseInt(scan.nextLine()));\n int crossCount = parseInt(scan.nextLine());\n for (int chageCount = 0; chageCount < crossCount; chageCount++) {\n changeLot(scan.nextLine().split(\",\"), lots);\n }\n for (int lot : lots) {\n out.println(lot);\n }\n }\n\n private int[] getLots(int count) {\n int[] lots = new int[count];\n for (int lotIndex = 0; lotIndex < count; lotIndex++) {\n lots[lotIndex] = lotIndex + 1;\n }\n return lots;\n }\n\n private void changeLot(String[] changeNumbers, int[] lots) {\n int beforeIndex = parseInt(changeNumbers[0]) - 1;\n int afterIndex = parseInt(changeNumbers[1]) - 1;\n int tmp = lots[beforeIndex];\n lots[beforeIndex] = lots[afterIndex];\n lots[afterIndex] = tmp;\n }\n}",
"Main",
"public static void main(String[] args) {\n new Main().exeSysIn();\n }",
"main",
"{\n new Main().exeSysIn();\n }",
"new Main().exeSysIn()",
"new Main().exeSysIn",
"new Main()",
"String[] args",
"args",
"@Override\n protected void execute(Scanner scan) {\n int[] lots = getLots(parseInt(scan.nextLine()));\n int crossCount = parseInt(scan.nextLine());\n for (int chageCount = 0; chageCount < crossCount; chageCount++) {\n changeLot(scan.nextLine().split(\",\"), lots);\n }\n for (int lot : lots) {\n out.println(lot);\n }\n }",
"execute",
"{\n int[] lots = getLots(parseInt(scan.nextLine()));\n int crossCount = parseInt(scan.nextLine());\n for (int chageCount = 0; chageCount < crossCount; chageCount++) {\n changeLot(scan.nextLine().split(\",\"), lots);\n }\n for (int lot : lots) {\n out.println(lot);\n }\n }",
"int[] lots = getLots(parseInt(scan.nextLine()));",
"lots",
"getLots(parseInt(scan.nextLine()))",
"getLots",
"parseInt(scan.nextLine())",
"parseInt",
"scan.nextLine()",
"scan.nextLine",
"scan",
"int crossCount = parseInt(scan.nextLine());",
"crossCount",
"parseInt(scan.nextLine())",
"parseInt",
"scan.nextLine()",
"scan.nextLine",
"scan",
"for (int chageCount = 0; chageCount < crossCount; chageCount++) {\n changeLot(scan.nextLine().split(\",\"), lots);\n }",
"int chageCount = 0;",
"int chageCount = 0;",
"chageCount",
"0",
"chageCount < crossCount",
"chageCount",
"crossCount",
"chageCount++",
"chageCount++",
"chageCount",
"{\n changeLot(scan.nextLine().split(\",\"), lots);\n }",
"{\n changeLot(scan.nextLine().split(\",\"), lots);\n }",
"changeLot(scan.nextLine().split(\",\"), lots)",
"changeLot",
"scan.nextLine().split(\",\")",
"scan.nextLine().split",
"scan.nextLine()",
"scan.nextLine",
"scan",
"\",\"",
"lots",
"for (int lot : lots) {\n out.println(lot);\n }",
"int lot",
"lots",
"{\n out.println(lot);\n }",
"{\n out.println(lot);\n }",
"out.println(lot)",
"out.println",
"out",
"lot",
"Scanner scan",
"scan",
"private int[] getLots(int count) {\n int[] lots = new int[count];\n for (int lotIndex = 0; lotIndex < count; lotIndex++) {\n lots[lotIndex] = lotIndex + 1;\n }\n return lots;\n }",
"getLots",
"{\n int[] lots = new int[count];\n for (int lotIndex = 0; lotIndex < count; lotIndex++) {\n lots[lotIndex] = lotIndex + 1;\n }\n return lots;\n }",
"int[] lots = new int[count];",
"lots",
"new int[count]",
"count",
"for (int lotIndex = 0; lotIndex < count; lotIndex++) {\n lots[lotIndex] = lotIndex + 1;\n }",
"int lotIndex = 0;",
"int lotIndex = 0;",
"lotIndex",
"0",
"lotIndex < count",
"lotIndex",
"count",
"lotIndex++",
"lotIndex++",
"lotIndex",
"{\n lots[lotIndex] = lotIndex + 1;\n }",
"{\n lots[lotIndex] = lotIndex + 1;\n }",
"lots[lotIndex] = lotIndex + 1",
"lots[lotIndex]",
"lots",
"lotIndex",
"lotIndex + 1",
"lotIndex",
"1",
"return lots;",
"lots",
"int count",
"count",
"private void changeLot(String[] changeNumbers, int[] lots) {\n int beforeIndex = parseInt(changeNumbers[0]) - 1;\n int afterIndex = parseInt(changeNumbers[1]) - 1;\n int tmp = lots[beforeIndex];\n lots[beforeIndex] = lots[afterIndex];\n lots[afterIndex] = tmp;\n }",
"changeLot",
"{\n int beforeIndex = parseInt(changeNumbers[0]) - 1;\n int afterIndex = parseInt(changeNumbers[1]) - 1;\n int tmp = lots[beforeIndex];\n lots[beforeIndex] = lots[afterIndex];\n lots[afterIndex] = tmp;\n }",
"int beforeIndex = parseInt(changeNumbers[0]) - 1;",
"beforeIndex",
"parseInt(changeNumbers[0]) - 1",
"parseInt(changeNumbers[0])",
"parseInt",
"changeNumbers[0]",
"changeNumbers",
"0",
"1",
"int afterIndex = parseInt(changeNumbers[1]) - 1;",
"afterIndex",
"parseInt(changeNumbers[1]) - 1",
"parseInt(changeNumbers[1])",
"parseInt",
"changeNumbers[1]",
"changeNumbers",
"1",
"1",
"int tmp = lots[beforeIndex];",
"tmp",
"lots[beforeIndex]",
"lots",
"beforeIndex",
"lots[beforeIndex] = lots[afterIndex]",
"lots[beforeIndex]",
"lots",
"beforeIndex",
"lots[afterIndex]",
"lots",
"afterIndex",
"lots[afterIndex] = tmp",
"lots[afterIndex]",
"lots",
"afterIndex",
"tmp",
"String[] changeNumbers",
"changeNumbers",
"int[] lots",
"lots",
"BaseExe",
"abstract class BaseExe {\n\n public void exeSysIn() {\n try (Scanner scan = new Scanner(System.in)) {\n execute(scan);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n public void exeFileIn(String inDataPath) {\n try (Scanner scan = new Scanner(new File(inDataPath))) {\n execute(scan);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n protected abstract void execute(Scanner scan);\n}",
"BaseExe",
"public void exeSysIn() {\n try (Scanner scan = new Scanner(System.in)) {\n execute(scan);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"exeSysIn",
"{\n try (Scanner scan = new Scanner(System.in)) {\n execute(scan);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"try (Scanner scan = new Scanner(System.in)) {\n execute(scan);\n } catch (Exception e) {\n e.printStackTrace();\n }",
"catch (Exception e) {\n e.printStackTrace();\n }",
"Exception e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n execute(scan);\n }",
"Scanner scan = new Scanner(System.in)",
"Scanner scan = new Scanner(System.in)",
"new Scanner(System.in)",
"execute(scan)",
"execute",
"scan",
"public void exeFileIn(String inDataPath) {\n try (Scanner scan = new Scanner(new File(inDataPath))) {\n execute(scan);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"exeFileIn",
"{\n try (Scanner scan = new Scanner(new File(inDataPath))) {\n execute(scan);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"try (Scanner scan = new Scanner(new File(inDataPath))) {\n execute(scan);\n } catch (Exception e) {\n e.printStackTrace();\n }",
"catch (Exception e) {\n e.printStackTrace();\n }",
"Exception e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n execute(scan);\n }",
"Scanner scan = new Scanner(new File(inDataPath))",
"Scanner scan = new Scanner(new File(inDataPath))",
"new Scanner(new File(inDataPath))",
"execute(scan)",
"execute",
"scan",
"String inDataPath",
"inDataPath",
"protected abstract void execute(Scanner scan);",
"execute",
"Scanner scan",
"scan",
"public class Main extends BaseExe {\n\n public static void main(String[] args) {\n new Main().exeSysIn();\n }\n\n @Override\n protected void execute(Scanner scan) {\n int[] lots = getLots(parseInt(scan.nextLine()));\n int crossCount = parseInt(scan.nextLine());\n for (int chageCount = 0; chageCount < crossCount; chageCount++) {\n changeLot(scan.nextLine().split(\",\"), lots);\n }\n for (int lot : lots) {\n out.println(lot);\n }\n }\n\n private int[] getLots(int count) {\n int[] lots = new int[count];\n for (int lotIndex = 0; lotIndex < count; lotIndex++) {\n lots[lotIndex] = lotIndex + 1;\n }\n return lots;\n }\n\n private void changeLot(String[] changeNumbers, int[] lots) {\n int beforeIndex = parseInt(changeNumbers[0]) - 1;\n int afterIndex = parseInt(changeNumbers[1]) - 1;\n int tmp = lots[beforeIndex];\n lots[beforeIndex] = lots[afterIndex];\n lots[afterIndex] = tmp;\n }\n}",
"public class Main extends BaseExe {\n\n public static void main(String[] args) {\n new Main().exeSysIn();\n }\n\n @Override\n protected void execute(Scanner scan) {\n int[] lots = getLots(parseInt(scan.nextLine()));\n int crossCount = parseInt(scan.nextLine());\n for (int chageCount = 0; chageCount < crossCount; chageCount++) {\n changeLot(scan.nextLine().split(\",\"), lots);\n }\n for (int lot : lots) {\n out.println(lot);\n }\n }\n\n private int[] getLots(int count) {\n int[] lots = new int[count];\n for (int lotIndex = 0; lotIndex < count; lotIndex++) {\n lots[lotIndex] = lotIndex + 1;\n }\n return lots;\n }\n\n private void changeLot(String[] changeNumbers, int[] lots) {\n int beforeIndex = parseInt(changeNumbers[0]) - 1;\n int afterIndex = parseInt(changeNumbers[1]) - 1;\n int tmp = lots[beforeIndex];\n lots[beforeIndex] = lots[afterIndex];\n lots[afterIndex] = tmp;\n }\n}",
"Main"
] | import static java.lang.Integer.parseInt;
import static java.lang.System.out;
import java.io.File;
import java.util.Scanner;
public class Main extends BaseExe {
public static void main(String[] args) {
new Main().exeSysIn();
}
@Override
protected void execute(Scanner scan) {
int[] lots = getLots(parseInt(scan.nextLine()));
int crossCount = parseInt(scan.nextLine());
for (int chageCount = 0; chageCount < crossCount; chageCount++) {
changeLot(scan.nextLine().split(","), lots);
}
for (int lot : lots) {
out.println(lot);
}
}
private int[] getLots(int count) {
int[] lots = new int[count];
for (int lotIndex = 0; lotIndex < count; lotIndex++) {
lots[lotIndex] = lotIndex + 1;
}
return lots;
}
private void changeLot(String[] changeNumbers, int[] lots) {
int beforeIndex = parseInt(changeNumbers[0]) - 1;
int afterIndex = parseInt(changeNumbers[1]) - 1;
int tmp = lots[beforeIndex];
lots[beforeIndex] = lots[afterIndex];
lots[afterIndex] = tmp;
}
}
abstract class BaseExe {
public void exeSysIn() {
try (Scanner scan = new Scanner(System.in)) {
execute(scan);
} catch (Exception e) {
e.printStackTrace();
}
}
public void exeFileIn(String inDataPath) {
try (Scanner scan = new Scanner(new File(inDataPath))) {
execute(scan);
} catch (Exception e) {
e.printStackTrace();
}
}
protected abstract void execute(Scanner scan);
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
2,
13,
17,
41,
13,
4,
18,
13,
2,
13,
17,
4,
18,
13,
2,
13,
17,
13,
4,
18,
13,
2,
13,
17,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
137,
8
],
[
137,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
11,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
50,
51
],
[
50,
52
],
[
45,
53
],
[
53,
54
],
[
54,
55
],
[
45,
56
],
[
57,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
60,
65
],
[
57,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
71,
72
],
[
71,
73
],
[
57,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
79,
80
],
[
79,
81
],
[
57,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
87,
88
],
[
87,
89
],
[
57,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
95,
96
],
[
95,
97
],
[
57,
98
],
[
98,
99
],
[
99,
100
],
[
98,
101
],
[
101,
102
],
[
101,
103
],
[
98,
104
],
[
57,
105
],
[
105,
106
],
[
106,
107
],
[
105,
108
],
[
108,
109
],
[
108,
110
],
[
105,
111
],
[
11,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
112,
117
],
[
117,
118
],
[
117,
119
],
[
112,
120
],
[
120,
121
],
[
121,
122
],
[
112,
123
],
[
124,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
125,
130
],
[
130,
131
],
[
131,
132
],
[
130,
133
],
[
9,
134
],
[
134,
135
],
[
0,
136
],
[
136,
137
],
[
136,
138
]
] | [
"import java.util.ArrayList;\nimport java.util.Scanner;\n\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t//.useDelimiter\n\t\t\n\t\tint w = sc.nextInt();\t\t\n\t\tint n = sc.nextInt();\n\t\t\n\t\tArrayList<Integer> line_number = new ArrayList<Integer>();\n\t\t\n\t\tfor(int i=1; i<=w; i++){\n\t\t\tline_number.add(i);\n\t\t}\n\t\t\n\t\tfor(int i=1; i<=n; i++){\n\t\t\tString[] str = sc.next().split(\",\");\n\t \tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\t\t\t\n\t\t\tint temp_1 = line_number.get(a-1);\n\t\t\tint temp_2 = line_number.get(b-1);\n\t\t\t\n\t\t\tline_number.set(a-1,temp_2);\n\t\t\tline_number.set(b-1,temp_1);\n\t\t}\n\t\tfor(int j=0; j<w; j++){\n\t\t\tSystem.out.println(line_number.get(j));\n\t\t}\n\t}\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t//.useDelimiter\n\t\t\n\t\tint w = sc.nextInt();\t\t\n\t\tint n = sc.nextInt();\n\t\t\n\t\tArrayList<Integer> line_number = new ArrayList<Integer>();\n\t\t\n\t\tfor(int i=1; i<=w; i++){\n\t\t\tline_number.add(i);\n\t\t}\n\t\t\n\t\tfor(int i=1; i<=n; i++){\n\t\t\tString[] str = sc.next().split(\",\");\n\t \tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\t\t\t\n\t\t\tint temp_1 = line_number.get(a-1);\n\t\t\tint temp_2 = line_number.get(b-1);\n\t\t\t\n\t\t\tline_number.set(a-1,temp_2);\n\t\t\tline_number.set(b-1,temp_1);\n\t\t}\n\t\tfor(int j=0; j<w; j++){\n\t\t\tSystem.out.println(line_number.get(j));\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t//.useDelimiter\n\t\t\n\t\tint w = sc.nextInt();\t\t\n\t\tint n = sc.nextInt();\n\t\t\n\t\tArrayList<Integer> line_number = new ArrayList<Integer>();\n\t\t\n\t\tfor(int i=1; i<=w; i++){\n\t\t\tline_number.add(i);\n\t\t}\n\t\t\n\t\tfor(int i=1; i<=n; i++){\n\t\t\tString[] str = sc.next().split(\",\");\n\t \tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\t\t\t\n\t\t\tint temp_1 = line_number.get(a-1);\n\t\t\tint temp_2 = line_number.get(b-1);\n\t\t\t\n\t\t\tline_number.set(a-1,temp_2);\n\t\t\tline_number.set(b-1,temp_1);\n\t\t}\n\t\tfor(int j=0; j<w; j++){\n\t\t\tSystem.out.println(line_number.get(j));\n\t\t}\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t//.useDelimiter\n\t\t\n\t\tint w = sc.nextInt();\t\t\n\t\tint n = sc.nextInt();\n\t\t\n\t\tArrayList<Integer> line_number = new ArrayList<Integer>();\n\t\t\n\t\tfor(int i=1; i<=w; i++){\n\t\t\tline_number.add(i);\n\t\t}\n\t\t\n\t\tfor(int i=1; i<=n; i++){\n\t\t\tString[] str = sc.next().split(\",\");\n\t \tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\t\t\t\n\t\t\tint temp_1 = line_number.get(a-1);\n\t\t\tint temp_2 = line_number.get(b-1);\n\t\t\t\n\t\t\tline_number.set(a-1,temp_2);\n\t\t\tline_number.set(b-1,temp_1);\n\t\t}\n\t\tfor(int j=0; j<w; j++){\n\t\t\tSystem.out.println(line_number.get(j));\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"ArrayList<Integer> line_number = new ArrayList<Integer>();",
"line_number",
"new ArrayList<Integer>()",
"for(int i=1; i<=w; i++){\n\t\t\tline_number.add(i);\n\t\t}",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tline_number.add(i);\n\t\t}",
"{\n\t\t\tline_number.add(i);\n\t\t}",
"line_number.add(i)",
"line_number.add",
"line_number",
"i",
"for(int i=1; i<=n; i++){\n\t\t\tString[] str = sc.next().split(\",\");\n\t \tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\t\t\t\n\t\t\tint temp_1 = line_number.get(a-1);\n\t\t\tint temp_2 = line_number.get(b-1);\n\t\t\t\n\t\t\tline_number.set(a-1,temp_2);\n\t\t\tline_number.set(b-1,temp_1);\n\t\t}",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString[] str = sc.next().split(\",\");\n\t \tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\t\t\t\n\t\t\tint temp_1 = line_number.get(a-1);\n\t\t\tint temp_2 = line_number.get(b-1);\n\t\t\t\n\t\t\tline_number.set(a-1,temp_2);\n\t\t\tline_number.set(b-1,temp_1);\n\t\t}",
"{\n\t\t\tString[] str = sc.next().split(\",\");\n\t \tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\t\t\t\n\t\t\tint temp_1 = line_number.get(a-1);\n\t\t\tint temp_2 = line_number.get(b-1);\n\t\t\t\n\t\t\tline_number.set(a-1,temp_2);\n\t\t\tline_number.set(b-1,temp_1);\n\t\t}",
"String[] str = sc.next().split(\",\");",
"str",
"sc.next().split(\",\")",
"sc.next().split",
"sc.next()",
"sc.next",
"sc",
"\",\"",
"int a = Integer.parseInt(str[0]);",
"a",
"Integer.parseInt(str[0])",
"Integer.parseInt",
"Integer",
"str[0]",
"str",
"0",
"int b = Integer.parseInt(str[1]);",
"b",
"Integer.parseInt(str[1])",
"Integer.parseInt",
"Integer",
"str[1]",
"str",
"1",
"int temp_1 = line_number.get(a-1);",
"temp_1",
"line_number.get(a-1)",
"line_number.get",
"line_number",
"a-1",
"a",
"1",
"int temp_2 = line_number.get(b-1);",
"temp_2",
"line_number.get(b-1)",
"line_number.get",
"line_number",
"b-1",
"b",
"1",
"line_number.set(a-1,temp_2)",
"line_number.set",
"line_number",
"a-1",
"a",
"1",
"temp_2",
"line_number.set(b-1,temp_1)",
"line_number.set",
"line_number",
"b-1",
"b",
"1",
"temp_1",
"for(int j=0; j<w; j++){\n\t\t\tSystem.out.println(line_number.get(j));\n\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<w",
"j",
"w",
"j++",
"j++",
"j",
"{\n\t\t\tSystem.out.println(line_number.get(j));\n\t\t}",
"{\n\t\t\tSystem.out.println(line_number.get(j));\n\t\t}",
"System.out.println(line_number.get(j))",
"System.out.println",
"System.out",
"System",
"System.out",
"line_number.get(j)",
"line_number.get",
"line_number",
"j",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t//.useDelimiter\n\t\t\n\t\tint w = sc.nextInt();\t\t\n\t\tint n = sc.nextInt();\n\t\t\n\t\tArrayList<Integer> line_number = new ArrayList<Integer>();\n\t\t\n\t\tfor(int i=1; i<=w; i++){\n\t\t\tline_number.add(i);\n\t\t}\n\t\t\n\t\tfor(int i=1; i<=n; i++){\n\t\t\tString[] str = sc.next().split(\",\");\n\t \tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\t\t\t\n\t\t\tint temp_1 = line_number.get(a-1);\n\t\t\tint temp_2 = line_number.get(b-1);\n\t\t\t\n\t\t\tline_number.set(a-1,temp_2);\n\t\t\tline_number.set(b-1,temp_1);\n\t\t}\n\t\tfor(int j=0; j<w; j++){\n\t\t\tSystem.out.println(line_number.get(j));\n\t\t}\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t//.useDelimiter\n\t\t\n\t\tint w = sc.nextInt();\t\t\n\t\tint n = sc.nextInt();\n\t\t\n\t\tArrayList<Integer> line_number = new ArrayList<Integer>();\n\t\t\n\t\tfor(int i=1; i<=w; i++){\n\t\t\tline_number.add(i);\n\t\t}\n\t\t\n\t\tfor(int i=1; i<=n; i++){\n\t\t\tString[] str = sc.next().split(\",\");\n\t \tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\t\t\t\n\t\t\tint temp_1 = line_number.get(a-1);\n\t\t\tint temp_2 = line_number.get(b-1);\n\t\t\t\n\t\t\tline_number.set(a-1,temp_2);\n\t\t\tline_number.set(b-1,temp_1);\n\t\t}\n\t\tfor(int j=0; j<w; j++){\n\t\t\tSystem.out.println(line_number.get(j));\n\t\t}\n\t}\n}",
"Main"
] | import java.util.ArrayList;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner sc = new Scanner(System.in);
//.useDelimiter
int w = sc.nextInt();
int n = sc.nextInt();
ArrayList<Integer> line_number = new ArrayList<Integer>();
for(int i=1; i<=w; i++){
line_number.add(i);
}
for(int i=1; i<=n; i++){
String[] str = sc.next().split(",");
int a = Integer.parseInt(str[0]);
int b = Integer.parseInt(str[1]);
int temp_1 = line_number.get(a-1);
int temp_2 = line_number.get(b-1);
line_number.set(a-1,temp_2);
line_number.set(b-1,temp_1);
}
for(int j=0; j<w; j++){
System.out.println(line_number.get(j));
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
133,
5
],
[
133,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
43,
45
],
[
8,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
58,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
58,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
76,
77
],
[
76,
78
],
[
72,
79
],
[
58,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
86,
87
],
[
86,
88
],
[
82,
89
],
[
58,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
92,
94
],
[
58,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
99,
101
],
[
58,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
8,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
107,
112
],
[
112,
113
],
[
112,
114
],
[
107,
115
],
[
115,
116
],
[
116,
117
],
[
107,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
119,
124
],
[
124,
125
],
[
124,
126
],
[
8,
127
],
[
127,
128
],
[
128,
129
],
[
6,
130
],
[
130,
131
],
[
0,
132
],
[
132,
133
],
[
132,
134
]
] | [
"import java.util.Scanner;\n\npublic class Main{\n public static void main (String[] args) {\n Scanner sc =new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] a = new int[w];\n for(int i=0;i<w;i++){\n a[i]=i+1;\n }\n for(int i=0;i<n;i++){\n String line = sc.next();\n String[] ml =line.split(\",\");\n int m = Integer.parseInt(ml[0]) -1;\n int l = Integer.parseInt(ml[1]) -1;\n int k = a[m];\n a[m] = a[l];\n a[l] = k;\n }\n for(int i=0;i<w;i++)\n System.out.println(a[i]);\n sc.close();\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main (String[] args) {\n Scanner sc =new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] a = new int[w];\n for(int i=0;i<w;i++){\n a[i]=i+1;\n }\n for(int i=0;i<n;i++){\n String line = sc.next();\n String[] ml =line.split(\",\");\n int m = Integer.parseInt(ml[0]) -1;\n int l = Integer.parseInt(ml[1]) -1;\n int k = a[m];\n a[m] = a[l];\n a[l] = k;\n }\n for(int i=0;i<w;i++)\n System.out.println(a[i]);\n sc.close();\n }\n}",
"Main",
"public static void main (String[] args) {\n Scanner sc =new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] a = new int[w];\n for(int i=0;i<w;i++){\n a[i]=i+1;\n }\n for(int i=0;i<n;i++){\n String line = sc.next();\n String[] ml =line.split(\",\");\n int m = Integer.parseInt(ml[0]) -1;\n int l = Integer.parseInt(ml[1]) -1;\n int k = a[m];\n a[m] = a[l];\n a[l] = k;\n }\n for(int i=0;i<w;i++)\n System.out.println(a[i]);\n sc.close();\n }",
"main",
"{\n Scanner sc =new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] a = new int[w];\n for(int i=0;i<w;i++){\n a[i]=i+1;\n }\n for(int i=0;i<n;i++){\n String line = sc.next();\n String[] ml =line.split(\",\");\n int m = Integer.parseInt(ml[0]) -1;\n int l = Integer.parseInt(ml[1]) -1;\n int k = a[m];\n a[m] = a[l];\n a[l] = k;\n }\n for(int i=0;i<w;i++)\n System.out.println(a[i]);\n sc.close();\n }",
"Scanner sc =new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] a = new int[w];",
"a",
"new int[w]",
"w",
"for(int i=0;i<w;i++){\n a[i]=i+1;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"{\n a[i]=i+1;\n }",
"{\n a[i]=i+1;\n }",
"a[i]=i+1",
"a[i]",
"a",
"i",
"i+1",
"i",
"1",
"for(int i=0;i<n;i++){\n String line = sc.next();\n String[] ml =line.split(\",\");\n int m = Integer.parseInt(ml[0]) -1;\n int l = Integer.parseInt(ml[1]) -1;\n int k = a[m];\n a[m] = a[l];\n a[l] = k;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String line = sc.next();\n String[] ml =line.split(\",\");\n int m = Integer.parseInt(ml[0]) -1;\n int l = Integer.parseInt(ml[1]) -1;\n int k = a[m];\n a[m] = a[l];\n a[l] = k;\n }",
"{\n String line = sc.next();\n String[] ml =line.split(\",\");\n int m = Integer.parseInt(ml[0]) -1;\n int l = Integer.parseInt(ml[1]) -1;\n int k = a[m];\n a[m] = a[l];\n a[l] = k;\n }",
"String line = sc.next();",
"line",
"sc.next()",
"sc.next",
"sc",
"String[] ml =line.split(\",\");",
"ml",
"line.split(\",\")",
"line.split",
"line",
"\",\"",
"int m = Integer.parseInt(ml[0]) -1;",
"m",
"Integer.parseInt(ml[0]) -1",
"Integer.parseInt(ml[0])",
"Integer.parseInt",
"Integer",
"ml[0]",
"ml",
"0",
"1",
"int l = Integer.parseInt(ml[1]) -1;",
"l",
"Integer.parseInt(ml[1]) -1",
"Integer.parseInt(ml[1])",
"Integer.parseInt",
"Integer",
"ml[1]",
"ml",
"1",
"1",
"int k = a[m];",
"k",
"a[m]",
"a",
"m",
"a[m] = a[l]",
"a[m]",
"a",
"m",
"a[l]",
"a",
"l",
"a[l] = k",
"a[l]",
"a",
"l",
"k",
"for(int i=0;i<w;i++)\n System.out.println(a[i]);",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"System.out.println(a[i]);",
"System.out.println(a[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"a[i]",
"a",
"i",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main{\n public static void main (String[] args) {\n Scanner sc =new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] a = new int[w];\n for(int i=0;i<w;i++){\n a[i]=i+1;\n }\n for(int i=0;i<n;i++){\n String line = sc.next();\n String[] ml =line.split(\",\");\n int m = Integer.parseInt(ml[0]) -1;\n int l = Integer.parseInt(ml[1]) -1;\n int k = a[m];\n a[m] = a[l];\n a[l] = k;\n }\n for(int i=0;i<w;i++)\n System.out.println(a[i]);\n sc.close();\n }\n}",
"public class Main{\n public static void main (String[] args) {\n Scanner sc =new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] a = new int[w];\n for(int i=0;i<w;i++){\n a[i]=i+1;\n }\n for(int i=0;i<n;i++){\n String line = sc.next();\n String[] ml =line.split(\",\");\n int m = Integer.parseInt(ml[0]) -1;\n int l = Integer.parseInt(ml[1]) -1;\n int k = a[m];\n a[m] = a[l];\n a[l] = k;\n }\n for(int i=0;i<w;i++)\n System.out.println(a[i]);\n sc.close();\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main (String[] args) {
Scanner sc =new Scanner(System.in);
int w = sc.nextInt();
int n = sc.nextInt();
int[] a = new int[w];
for(int i=0;i<w;i++){
a[i]=i+1;
}
for(int i=0;i<n;i++){
String line = sc.next();
String[] ml =line.split(",");
int m = Integer.parseInt(ml[0]) -1;
int l = Integer.parseInt(ml[1]) -1;
int k = a[m];
a[m] = a[l];
a[l] = k;
}
for(int i=0;i<w;i++)
System.out.println(a[i]);
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
0,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
13,
0,
13,
20,
13,
0,
13,
20,
13,
41,
13,
20,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
4,
18,
13,
17,
0,
18,
13,
13,
4,
18,
13,
18,
13,
17,
0,
18,
13,
13,
4,
18,
13,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
18,
13,
18,
13,
13,
0,
18,
13,
18,
13,
13,
18,
13,
18,
13,
13,
0,
18,
13,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
13,
12,
13,
30,
4,
18,
20,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
176,
5
],
[
176,
6
],
[
6,
7
],
[
176,
8
],
[
8,
9
],
[
176,
10
],
[
10,
11
],
[
176,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
31,
32
],
[
31,
33
],
[
14,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
34,
42
],
[
42,
43
],
[
43,
44
],
[
34,
45
],
[
46,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
14,
52
],
[
52,
53
],
[
52,
54
],
[
14,
56
],
[
56,
57
],
[
56,
58
],
[
14,
60
],
[
60,
61
],
[
60,
62
],
[
14,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
69,
70
],
[
69,
71
],
[
64,
72
],
[
72,
73
],
[
73,
74
],
[
64,
75
],
[
76,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
79,
84
],
[
76,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
92,
93
],
[
92,
94
],
[
76,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
102,
103
],
[
102,
104
],
[
14,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
110,
111
],
[
110,
112
],
[
105,
113
],
[
113,
114
],
[
114,
115
],
[
105,
116
],
[
117,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
122,
124
],
[
117,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
128,
130
],
[
125,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
133,
135
],
[
117,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
139,
141
],
[
136,
142
],
[
14,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
143,
148
],
[
148,
149
],
[
148,
150
],
[
143,
151
],
[
151,
152
],
[
152,
153
],
[
143,
154
],
[
155,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
158,
159
],
[
158,
160
],
[
156,
161
],
[
161,
162
],
[
161,
163
],
[
14,
164
],
[
164,
165
],
[
165,
166
],
[
176,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
170,
171
],
[
171,
172
],
[
167,
173
],
[
173,
174
],
[
0,
175
],
[
175,
176
],
[
175,
177
]
] | [
"\n\nimport java.util.Scanner;\n\npublic class Main {\n\n\tint[] a;\n\tint[] x;\n\tint[] y;\n\n\tpublic void run() {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\n\t\ta = new int[w + 1];\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\ta[i] = i;\n\t\t}\n\n\t\tx = new int[n];\n\t\ty = new int[n];\n\n\t\tString[] str = new String[2];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tstr = sc.next().split(\",\");\n\t\t\tx[i] = Integer.parseInt(str[0]);\n\t\t\ty[i] = Integer.parseInt(str[1]);\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint tmp = a[x[i]];\n\t\t\ta[x[i]] = a[y[i]];\n\t\t\ta[y[i]] = tmp;\n\t\t}\n\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\n\t\tsc.close();\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tint[] a;\n\tint[] x;\n\tint[] y;\n\n\tpublic void run() {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\n\t\ta = new int[w + 1];\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\ta[i] = i;\n\t\t}\n\n\t\tx = new int[n];\n\t\ty = new int[n];\n\n\t\tString[] str = new String[2];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tstr = sc.next().split(\",\");\n\t\t\tx[i] = Integer.parseInt(str[0]);\n\t\t\ty[i] = Integer.parseInt(str[1]);\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint tmp = a[x[i]];\n\t\t\ta[x[i]] = a[y[i]];\n\t\t\ta[y[i]] = tmp;\n\t\t}\n\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\n\t\tsc.close();\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n\n}",
"Main",
"int[] a;",
"a",
"int[] x;",
"x",
"int[] y;",
"y",
"public void run() {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\n\t\ta = new int[w + 1];\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\ta[i] = i;\n\t\t}\n\n\t\tx = new int[n];\n\t\ty = new int[n];\n\n\t\tString[] str = new String[2];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tstr = sc.next().split(\",\");\n\t\t\tx[i] = Integer.parseInt(str[0]);\n\t\t\ty[i] = Integer.parseInt(str[1]);\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint tmp = a[x[i]];\n\t\t\ta[x[i]] = a[y[i]];\n\t\t\ta[y[i]] = tmp;\n\t\t}\n\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\n\t\tsc.close();\n\t}",
"run",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\n\t\ta = new int[w + 1];\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\ta[i] = i;\n\t\t}\n\n\t\tx = new int[n];\n\t\ty = new int[n];\n\n\t\tString[] str = new String[2];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tstr = sc.next().split(\",\");\n\t\t\tx[i] = Integer.parseInt(str[0]);\n\t\t\ty[i] = Integer.parseInt(str[1]);\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint tmp = a[x[i]];\n\t\t\ta[x[i]] = a[y[i]];\n\t\t\ta[y[i]] = tmp;\n\t\t}\n\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\n\t\tsc.close();\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"a = new int[w + 1]",
"a",
"new int[w + 1]",
"w + 1",
"w",
"1",
"for (int i = 1; i <= w; i++) {\n\t\t\ta[i] = i;\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\ta[i] = i;\n\t\t}",
"{\n\t\t\ta[i] = i;\n\t\t}",
"a[i] = i",
"a[i]",
"a",
"i",
"i",
"x = new int[n]",
"x",
"new int[n]",
"n",
"y = new int[n]",
"y",
"new int[n]",
"n",
"String[] str = new String[2];",
"str",
"new String[2]",
"2",
"for (int i = 0; i < n; i++) {\n\t\t\tstr = sc.next().split(\",\");\n\t\t\tx[i] = Integer.parseInt(str[0]);\n\t\t\ty[i] = Integer.parseInt(str[1]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tstr = sc.next().split(\",\");\n\t\t\tx[i] = Integer.parseInt(str[0]);\n\t\t\ty[i] = Integer.parseInt(str[1]);\n\t\t}",
"{\n\t\t\tstr = sc.next().split(\",\");\n\t\t\tx[i] = Integer.parseInt(str[0]);\n\t\t\ty[i] = Integer.parseInt(str[1]);\n\t\t}",
"str = sc.next().split(\",\")",
"str",
"sc.next().split(\",\")",
"sc.next().split",
"sc.next()",
"sc.next",
"sc",
"\",\"",
"x[i] = Integer.parseInt(str[0])",
"x[i]",
"x",
"i",
"Integer.parseInt(str[0])",
"Integer.parseInt",
"Integer",
"str[0]",
"str",
"0",
"y[i] = Integer.parseInt(str[1])",
"y[i]",
"y",
"i",
"Integer.parseInt(str[1])",
"Integer.parseInt",
"Integer",
"str[1]",
"str",
"1",
"for (int i = 0; i < n; i++) {\n\t\t\tint tmp = a[x[i]];\n\t\t\ta[x[i]] = a[y[i]];\n\t\t\ta[y[i]] = tmp;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint tmp = a[x[i]];\n\t\t\ta[x[i]] = a[y[i]];\n\t\t\ta[y[i]] = tmp;\n\t\t}",
"{\n\t\t\tint tmp = a[x[i]];\n\t\t\ta[x[i]] = a[y[i]];\n\t\t\ta[y[i]] = tmp;\n\t\t}",
"int tmp = a[x[i]];",
"tmp",
"a[x[i]]",
"a",
"x[i]",
"x",
"i",
"a[x[i]] = a[y[i]]",
"a[x[i]]",
"a",
"x[i]",
"x",
"i",
"a[y[i]]",
"a",
"y[i]",
"y",
"i",
"a[y[i]] = tmp",
"a[y[i]]",
"a",
"y[i]",
"y",
"i",
"tmp",
"for (int i = 1; i <= w; i++) {\n\t\t\tSystem.out.println(a[i]);\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(a[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(a[i]);\n\t\t}",
"System.out.println(a[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"a[i]",
"a",
"i",
"sc.close()",
"sc.close",
"sc",
"public static void main(String[] args) {\n\t\tnew Main().run();\n\t}",
"main",
"{\n\t\tnew Main().run();\n\t}",
"new Main().run()",
"new Main().run",
"new Main()",
"String[] args",
"args",
"public class Main {\n\n\tint[] a;\n\tint[] x;\n\tint[] y;\n\n\tpublic void run() {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\n\t\ta = new int[w + 1];\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\ta[i] = i;\n\t\t}\n\n\t\tx = new int[n];\n\t\ty = new int[n];\n\n\t\tString[] str = new String[2];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tstr = sc.next().split(\",\");\n\t\t\tx[i] = Integer.parseInt(str[0]);\n\t\t\ty[i] = Integer.parseInt(str[1]);\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint tmp = a[x[i]];\n\t\t\ta[x[i]] = a[y[i]];\n\t\t\ta[y[i]] = tmp;\n\t\t}\n\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\n\t\tsc.close();\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n\n}",
"public class Main {\n\n\tint[] a;\n\tint[] x;\n\tint[] y;\n\n\tpublic void run() {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\n\t\ta = new int[w + 1];\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\ta[i] = i;\n\t\t}\n\n\t\tx = new int[n];\n\t\ty = new int[n];\n\n\t\tString[] str = new String[2];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tstr = sc.next().split(\",\");\n\t\t\tx[i] = Integer.parseInt(str[0]);\n\t\t\ty[i] = Integer.parseInt(str[1]);\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint tmp = a[x[i]];\n\t\t\ta[x[i]] = a[y[i]];\n\t\t\ta[y[i]] = tmp;\n\t\t}\n\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\n\t\tsc.close();\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
int[] a;
int[] x;
int[] y;
public void run() {
Scanner sc = new Scanner(System.in);
int w = sc.nextInt();
int n = sc.nextInt();
a = new int[w + 1];
for (int i = 1; i <= w; i++) {
a[i] = i;
}
x = new int[n];
y = new int[n];
String[] str = new String[2];
for (int i = 0; i < n; i++) {
str = sc.next().split(",");
x[i] = Integer.parseInt(str[0]);
y[i] = Integer.parseInt(str[1]);
}
for (int i = 0; i < n; i++) {
int tmp = a[x[i]];
a[x[i]] = a[y[i]];
a[y[i]] = tmp;
}
for (int i = 1; i <= w; i++) {
System.out.println(a[i]);
}
sc.close();
}
public static void main(String[] args) {
new Main().run();
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
13,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
130,
5
],
[
130,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
33,
35
],
[
26,
36
],
[
36,
37
],
[
37,
38
],
[
26,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
45,
46
],
[
45,
47
],
[
8,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
53,
54
],
[
53,
55
],
[
48,
56
],
[
56,
57
],
[
57,
58
],
[
48,
59
],
[
60,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
60,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
60,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
77,
78
],
[
77,
79
],
[
60,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
85,
86
],
[
85,
87
],
[
60,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
92,
94
],
[
60,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
98,
100
],
[
95,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
103,
105
],
[
60,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
109,
111
],
[
106,
112
],
[
8,
113
],
[
113,
114
],
[
113,
115
],
[
113,
116
],
[
117,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
118,
123
],
[
8,
124
],
[
124,
125
],
[
125,
126
],
[
6,
127
],
[
127,
128
],
[
0,
129
],
[
129,
130
],
[
129,
131
]
] | [
"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 w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[w];\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\ta[i] = i+1;\n\t\t}\n\t\t\n\t\tfor (int i = 0 ; i < n ; i++){\n\t\t\tString str = sc.next();\n\t\t\tString[] stra = str.split(\",\");\n\t\t\tint x = Integer.parseInt(stra[0]);\n\t\t\tint y = Integer.parseInt(stra[1]);\n\t\t\tint swap = a[x-1];\n\t\t\ta[x-1] = a[y-1];\n\t\t\ta[y-1] = swap;\n\t\t}\n\t\tfor(int z : a){\n\t\t\tSystem.out.println(z);\n\t\t}\n\t\tsc.close();\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[w];\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\ta[i] = i+1;\n\t\t}\n\t\t\n\t\tfor (int i = 0 ; i < n ; i++){\n\t\t\tString str = sc.next();\n\t\t\tString[] stra = str.split(\",\");\n\t\t\tint x = Integer.parseInt(stra[0]);\n\t\t\tint y = Integer.parseInt(stra[1]);\n\t\t\tint swap = a[x-1];\n\t\t\ta[x-1] = a[y-1];\n\t\t\ta[y-1] = swap;\n\t\t}\n\t\tfor(int z : a){\n\t\t\tSystem.out.println(z);\n\t\t}\n\t\tsc.close();\n\t}\n\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[w];\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\ta[i] = i+1;\n\t\t}\n\t\t\n\t\tfor (int i = 0 ; i < n ; i++){\n\t\t\tString str = sc.next();\n\t\t\tString[] stra = str.split(\",\");\n\t\t\tint x = Integer.parseInt(stra[0]);\n\t\t\tint y = Integer.parseInt(stra[1]);\n\t\t\tint swap = a[x-1];\n\t\t\ta[x-1] = a[y-1];\n\t\t\ta[y-1] = swap;\n\t\t}\n\t\tfor(int z : a){\n\t\t\tSystem.out.println(z);\n\t\t}\n\t\tsc.close();\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[w];\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\ta[i] = i+1;\n\t\t}\n\t\t\n\t\tfor (int i = 0 ; i < n ; i++){\n\t\t\tString str = sc.next();\n\t\t\tString[] stra = str.split(\",\");\n\t\t\tint x = Integer.parseInt(stra[0]);\n\t\t\tint y = Integer.parseInt(stra[1]);\n\t\t\tint swap = a[x-1];\n\t\t\ta[x-1] = a[y-1];\n\t\t\ta[y-1] = swap;\n\t\t}\n\t\tfor(int z : a){\n\t\t\tSystem.out.println(z);\n\t\t}\n\t\tsc.close();\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] a = new int[w];",
"a",
"new int[w]",
"w",
"for(int i = 0 ; i < a.length ; i++){\n\t\t\ta[i] = i+1;\n\t\t}",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < a.length",
"i",
"a.length",
"a",
"a.length",
"i++",
"i++",
"i",
"{\n\t\t\ta[i] = i+1;\n\t\t}",
"{\n\t\t\ta[i] = i+1;\n\t\t}",
"a[i] = i+1",
"a[i]",
"a",
"i",
"i+1",
"i",
"1",
"for (int i = 0 ; i < n ; i++){\n\t\t\tString str = sc.next();\n\t\t\tString[] stra = str.split(\",\");\n\t\t\tint x = Integer.parseInt(stra[0]);\n\t\t\tint y = Integer.parseInt(stra[1]);\n\t\t\tint swap = a[x-1];\n\t\t\ta[x-1] = a[y-1];\n\t\t\ta[y-1] = swap;\n\t\t}",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString str = sc.next();\n\t\t\tString[] stra = str.split(\",\");\n\t\t\tint x = Integer.parseInt(stra[0]);\n\t\t\tint y = Integer.parseInt(stra[1]);\n\t\t\tint swap = a[x-1];\n\t\t\ta[x-1] = a[y-1];\n\t\t\ta[y-1] = swap;\n\t\t}",
"{\n\t\t\tString str = sc.next();\n\t\t\tString[] stra = str.split(\",\");\n\t\t\tint x = Integer.parseInt(stra[0]);\n\t\t\tint y = Integer.parseInt(stra[1]);\n\t\t\tint swap = a[x-1];\n\t\t\ta[x-1] = a[y-1];\n\t\t\ta[y-1] = swap;\n\t\t}",
"String str = sc.next();",
"str",
"sc.next()",
"sc.next",
"sc",
"String[] stra = str.split(\",\");",
"stra",
"str.split(\",\")",
"str.split",
"str",
"\",\"",
"int x = Integer.parseInt(stra[0]);",
"x",
"Integer.parseInt(stra[0])",
"Integer.parseInt",
"Integer",
"stra[0]",
"stra",
"0",
"int y = Integer.parseInt(stra[1]);",
"y",
"Integer.parseInt(stra[1])",
"Integer.parseInt",
"Integer",
"stra[1]",
"stra",
"1",
"int swap = a[x-1];",
"swap",
"a[x-1]",
"a",
"x-1",
"x",
"1",
"a[x-1] = a[y-1]",
"a[x-1]",
"a",
"x-1",
"x",
"1",
"a[y-1]",
"a",
"y-1",
"y",
"1",
"a[y-1] = swap",
"a[y-1]",
"a",
"y-1",
"y",
"1",
"swap",
"for(int z : a){\n\t\t\tSystem.out.println(z);\n\t\t}",
"int z",
"a",
"{\n\t\t\tSystem.out.println(z);\n\t\t}",
"{\n\t\t\tSystem.out.println(z);\n\t\t}",
"System.out.println(z)",
"System.out.println",
"System.out",
"System",
"System.out",
"z",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[w];\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\ta[i] = i+1;\n\t\t}\n\t\t\n\t\tfor (int i = 0 ; i < n ; i++){\n\t\t\tString str = sc.next();\n\t\t\tString[] stra = str.split(\",\");\n\t\t\tint x = Integer.parseInt(stra[0]);\n\t\t\tint y = Integer.parseInt(stra[1]);\n\t\t\tint swap = a[x-1];\n\t\t\ta[x-1] = a[y-1];\n\t\t\ta[y-1] = swap;\n\t\t}\n\t\tfor(int z : a){\n\t\t\tSystem.out.println(z);\n\t\t}\n\t\tsc.close();\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[w];\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\ta[i] = i+1;\n\t\t}\n\t\t\n\t\tfor (int i = 0 ; i < n ; i++){\n\t\t\tString str = sc.next();\n\t\t\tString[] stra = str.split(\",\");\n\t\t\tint x = Integer.parseInt(stra[0]);\n\t\t\tint y = Integer.parseInt(stra[1]);\n\t\t\tint swap = a[x-1];\n\t\t\ta[x-1] = a[y-1];\n\t\t\ta[y-1] = swap;\n\t\t}\n\t\tfor(int z : a){\n\t\t\tSystem.out.println(z);\n\t\t}\n\t\tsc.close();\n\t}\n\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int w = sc.nextInt();
int n = sc.nextInt();
int[] a = new int[w];
for(int i = 0 ; i < a.length ; i++){
a[i] = i+1;
}
for (int i = 0 ; i < n ; i++){
String str = sc.next();
String[] stra = str.split(",");
int x = Integer.parseInt(stra[0]);
int y = Integer.parseInt(stra[1]);
int swap = a[x-1];
a[x-1] = a[y-1];
a[y-1] = swap;
}
for(int z : a){
System.out.println(z);
}
sc.close();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
4,
18,
20,
17,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
11,
28
],
[
28,
29
],
[
28,
30
],
[
31,
32
],
[
31,
33
],
[
11,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
34,
42
],
[
42,
43
],
[
43,
44
],
[
34,
45
],
[
46,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
11,
52
],
[
52,
53
],
[
53,
54
],
[
11,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
60,
61
],
[
60,
62
],
[
55,
63
],
[
63,
64
],
[
64,
65
],
[
55,
66
],
[
67,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
67,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
67,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
80,
82
],
[
67,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
87,
88
],
[
87,
89
],
[
67,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
11,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
95,
100
],
[
100,
101
],
[
100,
102
],
[
95,
103
],
[
103,
104
],
[
104,
105
],
[
95,
106
],
[
107,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
108,
113
],
[
113,
114
],
[
113,
115
],
[
9,
116
],
[
116,
117
]
] | [
"import java.util.Scanner;\nimport java.util.regex.*;\n\nclass Main {\n\n public static void main(String[] args){\n\n\tScanner stdin = new Scanner(System.in).useDelimiter(\"[ \\t,\\n]\");\n\tint n = stdin.nextInt();\n\tint line = stdin.nextInt();\n\n\tint[] nums = new int[n + 1];\n\tfor(int i = 1; i <= n; i++){\n\t nums[i] = i;\n\t}\n\tstdin.nextLine();\n\tfor(int i = 0; i < line; i++){\n\t int sw1 = stdin.nextInt();\n\t int sw2 = stdin.nextInt();\n\t int temp = nums[sw1];\n\t nums[sw1] = nums[sw2];\n\t nums[sw2] = temp;\n\t}\n\tfor(int i = 1; i <= n; i++){\n\t System.out.println(nums[i]);\n\t}\n }\n}\n\t\n\t",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.regex.*;",
"regex.*",
"java.util",
"class Main {\n\n public static void main(String[] args){\n\n\tScanner stdin = new Scanner(System.in).useDelimiter(\"[ \\t,\\n]\");\n\tint n = stdin.nextInt();\n\tint line = stdin.nextInt();\n\n\tint[] nums = new int[n + 1];\n\tfor(int i = 1; i <= n; i++){\n\t nums[i] = i;\n\t}\n\tstdin.nextLine();\n\tfor(int i = 0; i < line; i++){\n\t int sw1 = stdin.nextInt();\n\t int sw2 = stdin.nextInt();\n\t int temp = nums[sw1];\n\t nums[sw1] = nums[sw2];\n\t nums[sw2] = temp;\n\t}\n\tfor(int i = 1; i <= n; i++){\n\t System.out.println(nums[i]);\n\t}\n }\n}",
"Main",
"public static void main(String[] args){\n\n\tScanner stdin = new Scanner(System.in).useDelimiter(\"[ \\t,\\n]\");\n\tint n = stdin.nextInt();\n\tint line = stdin.nextInt();\n\n\tint[] nums = new int[n + 1];\n\tfor(int i = 1; i <= n; i++){\n\t nums[i] = i;\n\t}\n\tstdin.nextLine();\n\tfor(int i = 0; i < line; i++){\n\t int sw1 = stdin.nextInt();\n\t int sw2 = stdin.nextInt();\n\t int temp = nums[sw1];\n\t nums[sw1] = nums[sw2];\n\t nums[sw2] = temp;\n\t}\n\tfor(int i = 1; i <= n; i++){\n\t System.out.println(nums[i]);\n\t}\n }",
"main",
"{\n\n\tScanner stdin = new Scanner(System.in).useDelimiter(\"[ \\t,\\n]\");\n\tint n = stdin.nextInt();\n\tint line = stdin.nextInt();\n\n\tint[] nums = new int[n + 1];\n\tfor(int i = 1; i <= n; i++){\n\t nums[i] = i;\n\t}\n\tstdin.nextLine();\n\tfor(int i = 0; i < line; i++){\n\t int sw1 = stdin.nextInt();\n\t int sw2 = stdin.nextInt();\n\t int temp = nums[sw1];\n\t nums[sw1] = nums[sw2];\n\t nums[sw2] = temp;\n\t}\n\tfor(int i = 1; i <= n; i++){\n\t System.out.println(nums[i]);\n\t}\n }",
"Scanner stdin = new Scanner(System.in).useDelimiter(\"[ \\t,\\n]\");",
"stdin",
"new Scanner(System.in).useDelimiter(\"[ \\t,\\n]\")",
"new Scanner(System.in).useDelimiter",
"new Scanner(System.in)",
"\"[ \\t,\\n]\"",
"int n = stdin.nextInt();",
"n",
"stdin.nextInt()",
"stdin.nextInt",
"stdin",
"int line = stdin.nextInt();",
"line",
"stdin.nextInt()",
"stdin.nextInt",
"stdin",
"int[] nums = new int[n + 1];",
"nums",
"new int[n + 1]",
"n + 1",
"n",
"1",
"for(int i = 1; i <= n; i++){\n\t nums[i] = i;\n\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t nums[i] = i;\n\t}",
"{\n\t nums[i] = i;\n\t}",
"nums[i] = i",
"nums[i]",
"nums",
"i",
"i",
"stdin.nextLine()",
"stdin.nextLine",
"stdin",
"for(int i = 0; i < line; i++){\n\t int sw1 = stdin.nextInt();\n\t int sw2 = stdin.nextInt();\n\t int temp = nums[sw1];\n\t nums[sw1] = nums[sw2];\n\t nums[sw2] = temp;\n\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < line",
"i",
"line",
"i++",
"i++",
"i",
"{\n\t int sw1 = stdin.nextInt();\n\t int sw2 = stdin.nextInt();\n\t int temp = nums[sw1];\n\t nums[sw1] = nums[sw2];\n\t nums[sw2] = temp;\n\t}",
"{\n\t int sw1 = stdin.nextInt();\n\t int sw2 = stdin.nextInt();\n\t int temp = nums[sw1];\n\t nums[sw1] = nums[sw2];\n\t nums[sw2] = temp;\n\t}",
"int sw1 = stdin.nextInt();",
"sw1",
"stdin.nextInt()",
"stdin.nextInt",
"stdin",
"int sw2 = stdin.nextInt();",
"sw2",
"stdin.nextInt()",
"stdin.nextInt",
"stdin",
"int temp = nums[sw1];",
"temp",
"nums[sw1]",
"nums",
"sw1",
"nums[sw1] = nums[sw2]",
"nums[sw1]",
"nums",
"sw1",
"nums[sw2]",
"nums",
"sw2",
"nums[sw2] = temp",
"nums[sw2]",
"nums",
"sw2",
"temp",
"for(int i = 1; i <= n; i++){\n\t System.out.println(nums[i]);\n\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t System.out.println(nums[i]);\n\t}",
"{\n\t System.out.println(nums[i]);\n\t}",
"System.out.println(nums[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"nums[i]",
"nums",
"i",
"String[] args",
"args"
] | import java.util.Scanner;
import java.util.regex.*;
class Main {
public static void main(String[] args){
Scanner stdin = new Scanner(System.in).useDelimiter("[ \t,\n]");
int n = stdin.nextInt();
int line = stdin.nextInt();
int[] nums = new int[n + 1];
for(int i = 1; i <= n; i++){
nums[i] = i;
}
stdin.nextLine();
for(int i = 0; i < line; i++){
int sw1 = stdin.nextInt();
int sw2 = stdin.nextInt();
int temp = nums[sw1];
nums[sw1] = nums[sw2];
nums[sw2] = temp;
}
for(int i = 1; i <= n; i++){
System.out.println(nums[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
23,
31
],
[
31,
32
],
[
32,
33
],
[
23,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
8,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
8,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
8,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
56,
58
],
[
51,
59
],
[
59,
60
],
[
60,
61
],
[
51,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
63,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
63,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
80,
81
],
[
80,
82
],
[
63,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
88,
89
],
[
88,
90
],
[
63,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
93,
95
],
[
63,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
100,
101
],
[
100,
102
],
[
63,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
8,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
108,
113
],
[
113,
114
],
[
113,
115
],
[
108,
116
],
[
116,
117
],
[
117,
118
],
[
108,
119
],
[
120,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
121,
126
],
[
126,
127
],
[
126,
128
],
[
6,
129
],
[
129,
130
]
] | [
"import java.util.Scanner;\n\nclass Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int[] arr = new int[w+1];\n for(int i=0; i<=w; i++) {\n arr[i] = i;\n }\n int n = sc.nextInt();\n String drop = sc.nextLine();\n for(int i=0; i<n; i++) {\n String line = sc.nextLine();\n String[] tmp = line.split(\",\");\n int a = Integer.parseInt(tmp[0]);\n int b = Integer.parseInt(tmp[1]);\n int c = arr[a];\n arr[a] = arr[b];\n arr[b] = c;\n }\n for(int i=1; i<=w; i++) {\n System.out.println(arr[i]);\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int[] arr = new int[w+1];\n for(int i=0; i<=w; i++) {\n arr[i] = i;\n }\n int n = sc.nextInt();\n String drop = sc.nextLine();\n for(int i=0; i<n; i++) {\n String line = sc.nextLine();\n String[] tmp = line.split(\",\");\n int a = Integer.parseInt(tmp[0]);\n int b = Integer.parseInt(tmp[1]);\n int c = arr[a];\n arr[a] = arr[b];\n arr[b] = c;\n }\n for(int i=1; i<=w; i++) {\n System.out.println(arr[i]);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int[] arr = new int[w+1];\n for(int i=0; i<=w; i++) {\n arr[i] = i;\n }\n int n = sc.nextInt();\n String drop = sc.nextLine();\n for(int i=0; i<n; i++) {\n String line = sc.nextLine();\n String[] tmp = line.split(\",\");\n int a = Integer.parseInt(tmp[0]);\n int b = Integer.parseInt(tmp[1]);\n int c = arr[a];\n arr[a] = arr[b];\n arr[b] = c;\n }\n for(int i=1; i<=w; i++) {\n System.out.println(arr[i]);\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int[] arr = new int[w+1];\n for(int i=0; i<=w; i++) {\n arr[i] = i;\n }\n int n = sc.nextInt();\n String drop = sc.nextLine();\n for(int i=0; i<n; i++) {\n String line = sc.nextLine();\n String[] tmp = line.split(\",\");\n int a = Integer.parseInt(tmp[0]);\n int b = Integer.parseInt(tmp[1]);\n int c = arr[a];\n arr[a] = arr[b];\n arr[b] = c;\n }\n for(int i=1; i<=w; i++) {\n System.out.println(arr[i]);\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] arr = new int[w+1];",
"arr",
"new int[w+1]",
"w+1",
"w",
"1",
"for(int i=0; i<=w; i++) {\n arr[i] = i;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<=w",
"i",
"w",
"i++",
"i++",
"i",
"{\n arr[i] = i;\n }",
"{\n arr[i] = i;\n }",
"arr[i] = i",
"arr[i]",
"arr",
"i",
"i",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String drop = sc.nextLine();",
"drop",
"sc.nextLine()",
"sc.nextLine",
"sc",
"for(int i=0; i<n; i++) {\n String line = sc.nextLine();\n String[] tmp = line.split(\",\");\n int a = Integer.parseInt(tmp[0]);\n int b = Integer.parseInt(tmp[1]);\n int c = arr[a];\n arr[a] = arr[b];\n arr[b] = c;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String line = sc.nextLine();\n String[] tmp = line.split(\",\");\n int a = Integer.parseInt(tmp[0]);\n int b = Integer.parseInt(tmp[1]);\n int c = arr[a];\n arr[a] = arr[b];\n arr[b] = c;\n }",
"{\n String line = sc.nextLine();\n String[] tmp = line.split(\",\");\n int a = Integer.parseInt(tmp[0]);\n int b = Integer.parseInt(tmp[1]);\n int c = arr[a];\n arr[a] = arr[b];\n arr[b] = c;\n }",
"String line = sc.nextLine();",
"line",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String[] tmp = line.split(\",\");",
"tmp",
"line.split(\",\")",
"line.split",
"line",
"\",\"",
"int a = Integer.parseInt(tmp[0]);",
"a",
"Integer.parseInt(tmp[0])",
"Integer.parseInt",
"Integer",
"tmp[0]",
"tmp",
"0",
"int b = Integer.parseInt(tmp[1]);",
"b",
"Integer.parseInt(tmp[1])",
"Integer.parseInt",
"Integer",
"tmp[1]",
"tmp",
"1",
"int c = arr[a];",
"c",
"arr[a]",
"arr",
"a",
"arr[a] = arr[b]",
"arr[a]",
"arr",
"a",
"arr[b]",
"arr",
"b",
"arr[b] = c",
"arr[b]",
"arr",
"b",
"c",
"for(int i=1; i<=w; i++) {\n System.out.println(arr[i]);\n }",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=w",
"i",
"w",
"i++",
"i++",
"i",
"{\n System.out.println(arr[i]);\n }",
"{\n System.out.println(arr[i]);\n }",
"System.out.println(arr[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"arr[i]",
"arr",
"i",
"String[] args",
"args"
] | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int w = sc.nextInt();
int[] arr = new int[w+1];
for(int i=0; i<=w; i++) {
arr[i] = i;
}
int n = sc.nextInt();
String drop = sc.nextLine();
for(int i=0; i<n; i++) {
String line = sc.nextLine();
String[] tmp = line.split(",");
int a = Integer.parseInt(tmp[0]);
int b = Integer.parseInt(tmp[1]);
int c = arr[a];
arr[a] = arr[b];
arr[b] = c;
}
for(int i=1; i<=w; i++) {
System.out.println(arr[i]);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
4,
13,
13,
18,
13,
13,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
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,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
18,
13,
13,
23,
13,
23,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
21,
24
],
[
24,
25
],
[
24,
26
],
[
21,
27
],
[
27,
28
],
[
27,
29
],
[
18,
30
],
[
30,
31
],
[
16,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
43,
44
],
[
44,
45
],
[
34,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
51,
52
],
[
52,
53
],
[
34,
54
],
[
54,
55
],
[
54,
56
],
[
34,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
63,
64
],
[
63,
65
],
[
58,
66
],
[
66,
67
],
[
67,
68
],
[
58,
69
],
[
70,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
75,
76
],
[
75,
77
],
[
34,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
83,
84
],
[
83,
85
],
[
78,
86
],
[
86,
87
],
[
87,
88
],
[
78,
89
],
[
90,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
93,
98
],
[
90,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
102,
103
],
[
101,
104
],
[
104,
105
],
[
104,
106
],
[
90,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
110,
111
],
[
109,
112
],
[
112,
113
],
[
112,
114
],
[
90,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
119,
121
],
[
90,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
125,
127
],
[
122,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
130,
132
],
[
90,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
136,
137
],
[
136,
138
],
[
133,
139
],
[
34,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
142,
144
],
[
140,
145
],
[
145,
146
],
[
145,
147
],
[
140,
148
],
[
148,
149
],
[
149,
150
],
[
140,
151
],
[
152,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
153,
156
],
[
156,
157
],
[
156,
158
],
[
32,
159
],
[
159,
160
],
[
32,
161
],
[
161,
162
],
[
32,
163
],
[
163,
164
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.io.PrintStream;\n\nclass Main {\n\n public static void main(String[] args) throws IOException {\n doit(args, System.in, System.out);\n }\n\n static void doit(String[] args, InputStream in, PrintStream out) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n int w = Integer.parseInt(reader.readLine());\n int n = Integer.parseInt(reader.readLine());\n int[] numbers = new int[w];\n for (int i = 0; i < w; i++) {\n numbers[i] = i + 1;\n }\n for (int i = 0; i < n; i++) {\n String[] values = reader.readLine().split(\",\");\n int a = Integer.parseInt(values[0]);\n int b = Integer.parseInt(values[1]);\n int tmp = numbers[a - 1];\n numbers[a - 1] = numbers[b - 1];\n numbers[b - 1] = tmp;\n }\n for (int i = 0; i < w; i++) {\n out.println(numbers[i]);\n }\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.PrintStream;",
"PrintStream",
"java.io",
"class Main {\n\n public static void main(String[] args) throws IOException {\n doit(args, System.in, System.out);\n }\n\n static void doit(String[] args, InputStream in, PrintStream out) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n int w = Integer.parseInt(reader.readLine());\n int n = Integer.parseInt(reader.readLine());\n int[] numbers = new int[w];\n for (int i = 0; i < w; i++) {\n numbers[i] = i + 1;\n }\n for (int i = 0; i < n; i++) {\n String[] values = reader.readLine().split(\",\");\n int a = Integer.parseInt(values[0]);\n int b = Integer.parseInt(values[1]);\n int tmp = numbers[a - 1];\n numbers[a - 1] = numbers[b - 1];\n numbers[b - 1] = tmp;\n }\n for (int i = 0; i < w; i++) {\n out.println(numbers[i]);\n }\n }\n}",
"Main",
"public static void main(String[] args) throws IOException {\n doit(args, System.in, System.out);\n }",
"main",
"{\n doit(args, System.in, System.out);\n }",
"doit(args, System.in, System.out)",
"doit",
"args",
"System.in",
"System",
"System.in",
"System.out",
"System",
"System.out",
"String[] args",
"args",
"static void doit(String[] args, InputStream in, PrintStream out) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n int w = Integer.parseInt(reader.readLine());\n int n = Integer.parseInt(reader.readLine());\n int[] numbers = new int[w];\n for (int i = 0; i < w; i++) {\n numbers[i] = i + 1;\n }\n for (int i = 0; i < n; i++) {\n String[] values = reader.readLine().split(\",\");\n int a = Integer.parseInt(values[0]);\n int b = Integer.parseInt(values[1]);\n int tmp = numbers[a - 1];\n numbers[a - 1] = numbers[b - 1];\n numbers[b - 1] = tmp;\n }\n for (int i = 0; i < w; i++) {\n out.println(numbers[i]);\n }\n }",
"doit",
"{\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n int w = Integer.parseInt(reader.readLine());\n int n = Integer.parseInt(reader.readLine());\n int[] numbers = new int[w];\n for (int i = 0; i < w; i++) {\n numbers[i] = i + 1;\n }\n for (int i = 0; i < n; i++) {\n String[] values = reader.readLine().split(\",\");\n int a = Integer.parseInt(values[0]);\n int b = Integer.parseInt(values[1]);\n int tmp = numbers[a - 1];\n numbers[a - 1] = numbers[b - 1];\n numbers[b - 1] = tmp;\n }\n for (int i = 0; i < w; i++) {\n out.println(numbers[i]);\n }\n }",
"BufferedReader reader = new BufferedReader(new InputStreamReader(in));",
"reader",
"new BufferedReader(new InputStreamReader(in))",
"int w = Integer.parseInt(reader.readLine());",
"w",
"Integer.parseInt(reader.readLine())",
"Integer.parseInt",
"Integer",
"reader.readLine()",
"reader.readLine",
"reader",
"int n = Integer.parseInt(reader.readLine());",
"n",
"Integer.parseInt(reader.readLine())",
"Integer.parseInt",
"Integer",
"reader.readLine()",
"reader.readLine",
"reader",
"int[] numbers = new int[w];",
"numbers",
"new int[w]",
"w",
"for (int i = 0; i < w; i++) {\n numbers[i] = i + 1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n numbers[i] = i + 1;\n }",
"{\n numbers[i] = i + 1;\n }",
"numbers[i] = i + 1",
"numbers[i]",
"numbers",
"i",
"i + 1",
"i",
"1",
"for (int i = 0; i < n; i++) {\n String[] values = reader.readLine().split(\",\");\n int a = Integer.parseInt(values[0]);\n int b = Integer.parseInt(values[1]);\n int tmp = numbers[a - 1];\n numbers[a - 1] = numbers[b - 1];\n numbers[b - 1] = tmp;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String[] values = reader.readLine().split(\",\");\n int a = Integer.parseInt(values[0]);\n int b = Integer.parseInt(values[1]);\n int tmp = numbers[a - 1];\n numbers[a - 1] = numbers[b - 1];\n numbers[b - 1] = tmp;\n }",
"{\n String[] values = reader.readLine().split(\",\");\n int a = Integer.parseInt(values[0]);\n int b = Integer.parseInt(values[1]);\n int tmp = numbers[a - 1];\n numbers[a - 1] = numbers[b - 1];\n numbers[b - 1] = tmp;\n }",
"String[] values = reader.readLine().split(\",\");",
"values",
"reader.readLine().split(\",\")",
"reader.readLine().split",
"reader.readLine()",
"reader.readLine",
"reader",
"\",\"",
"int a = Integer.parseInt(values[0]);",
"a",
"Integer.parseInt(values[0])",
"Integer.parseInt",
"Integer",
"values[0]",
"values",
"0",
"int b = Integer.parseInt(values[1]);",
"b",
"Integer.parseInt(values[1])",
"Integer.parseInt",
"Integer",
"values[1]",
"values",
"1",
"int tmp = numbers[a - 1];",
"tmp",
"numbers[a - 1]",
"numbers",
"a - 1",
"a",
"1",
"numbers[a - 1] = numbers[b - 1]",
"numbers[a - 1]",
"numbers",
"a - 1",
"a",
"1",
"numbers[b - 1]",
"numbers",
"b - 1",
"b",
"1",
"numbers[b - 1] = tmp",
"numbers[b - 1]",
"numbers",
"b - 1",
"b",
"1",
"tmp",
"for (int i = 0; i < w; i++) {\n out.println(numbers[i]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n out.println(numbers[i]);\n }",
"{\n out.println(numbers[i]);\n }",
"out.println(numbers[i])",
"out.println",
"out",
"numbers[i]",
"numbers",
"i",
"String[] args",
"args",
"InputStream in",
"in",
"PrintStream out",
"out"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintStream;
class Main {
public static void main(String[] args) throws IOException {
doit(args, System.in, System.out);
}
static void doit(String[] args, InputStream in, PrintStream out) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
int w = Integer.parseInt(reader.readLine());
int n = Integer.parseInt(reader.readLine());
int[] numbers = new int[w];
for (int i = 0; i < w; i++) {
numbers[i] = i + 1;
}
for (int i = 0; i < n; i++) {
String[] values = reader.readLine().split(",");
int a = Integer.parseInt(values[0]);
int b = Integer.parseInt(values[1]);
int tmp = numbers[a - 1];
numbers[a - 1] = numbers[b - 1];
numbers[b - 1] = tmp;
}
for (int i = 0; i < w; i++) {
out.println(numbers[i]);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
42,
2,
40,
13,
17,
30,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
13,
12,
13,
30,
41,
13,
4,
18,
13,
4,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
23,
13,
12,
13,
30,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
161,
14
],
[
161,
15
],
[
15,
16
],
[
15,
17
],
[
161,
18
],
[
18,
19
],
[
18,
20
],
[
161,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
23,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
23,
34
],
[
34,
35
],
[
34,
36
],
[
23,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
43,
44
],
[
43,
45
],
[
38,
46
],
[
46,
47
],
[
47,
48
],
[
38,
49
],
[
50,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
55,
57
],
[
23,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
58,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
66,
71
],
[
63,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
78,
79
],
[
78,
80
],
[
74,
81
],
[
63,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
88,
89
],
[
88,
90
],
[
84,
91
],
[
63,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
94,
96
],
[
63,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
101,
102
],
[
101,
103
],
[
63,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
23,
109
],
[
109,
110
],
[
109,
111
],
[
109,
112
],
[
113,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
114,
119
],
[
161,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
126,
127
],
[
122,
128
],
[
128,
129
],
[
122,
130
],
[
130,
131
],
[
131,
132
],
[
122,
133
],
[
133,
134
],
[
133,
135
],
[
135,
136
],
[
136,
137
],
[
122,
138
],
[
138,
139
],
[
139,
140
],
[
122,
141
],
[
141,
142
],
[
142,
143
],
[
120,
144
],
[
144,
145
],
[
161,
146
],
[
146,
147
],
[
146,
148
],
[
148,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
149,
154
],
[
154,
155
],
[
155,
156
],
[
154,
157
],
[
146,
158
],
[
158,
159
],
[
0,
160
],
[
160,
161
],
[
160,
162
]
] | [
"import java.util.*;\nimport java.io.*;\nimport java.awt.geom.*;\nimport java.math.*;\n\npublic class Main {\n\n\tstatic final Scanner in = new Scanner(System.in);\n\tstatic final PrintWriter out = new PrintWriter(System.out,false);\n\n\tstatic void solve() {\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\n\t\tint[] x = new int[w];\n\t\tfor (int i=0; i<w; i++) {\n\t\t\tx[i] = i + 1;\n\t\t}\n\n\t\twhile (n-- > 0) {\n\t\t\tString[] str = in.next().split(\",\");\n\t\t\tint a = Integer.parseInt(str[0]) - 1;\n\t\t\tint b = Integer.parseInt(str[1]) - 1;\n\n\t\t\tint t = x[a];\n\t\t\tx[a] = x[b];\n\t\t\tx[b] = t;\n\t\t}\n\n\t\tfor (int ans : x) {\n\t\t\tSystem.out.println(ans);\n\t\t}\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tlong start = System.currentTimeMillis();\n\n\t\tsolve();\n\t\tout.flush();\n\n\t\tlong end = System.currentTimeMillis();\n\t\t//trace(end-start + \"ms\");\n\t\tin.close();\n\t\tout.close();\n\t}\n\n\tstatic void trace(Object... o) { System.out.println(Arrays.deepToString(o));}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import java.awt.geom.*;",
"geom.*",
"java.awt",
"import java.math.*;",
"math.*",
"java",
"public class Main {\n\n\tstatic final Scanner in = new Scanner(System.in);\n\tstatic final PrintWriter out = new PrintWriter(System.out,false);\n\n\tstatic void solve() {\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\n\t\tint[] x = new int[w];\n\t\tfor (int i=0; i<w; i++) {\n\t\t\tx[i] = i + 1;\n\t\t}\n\n\t\twhile (n-- > 0) {\n\t\t\tString[] str = in.next().split(\",\");\n\t\t\tint a = Integer.parseInt(str[0]) - 1;\n\t\t\tint b = Integer.parseInt(str[1]) - 1;\n\n\t\t\tint t = x[a];\n\t\t\tx[a] = x[b];\n\t\t\tx[b] = t;\n\t\t}\n\n\t\tfor (int ans : x) {\n\t\t\tSystem.out.println(ans);\n\t\t}\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tlong start = System.currentTimeMillis();\n\n\t\tsolve();\n\t\tout.flush();\n\n\t\tlong end = System.currentTimeMillis();\n\t\t//trace(end-start + \"ms\");\n\t\tin.close();\n\t\tout.close();\n\t}\n\n\tstatic void trace(Object... o) { System.out.println(Arrays.deepToString(o));}\n}",
"Main",
"static final Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"static final PrintWriter out = new PrintWriter(System.out,false);",
"out",
"new PrintWriter(System.out,false)",
"static void solve() {\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\n\t\tint[] x = new int[w];\n\t\tfor (int i=0; i<w; i++) {\n\t\t\tx[i] = i + 1;\n\t\t}\n\n\t\twhile (n-- > 0) {\n\t\t\tString[] str = in.next().split(\",\");\n\t\t\tint a = Integer.parseInt(str[0]) - 1;\n\t\t\tint b = Integer.parseInt(str[1]) - 1;\n\n\t\t\tint t = x[a];\n\t\t\tx[a] = x[b];\n\t\t\tx[b] = t;\n\t\t}\n\n\t\tfor (int ans : x) {\n\t\t\tSystem.out.println(ans);\n\t\t}\n\t}",
"solve",
"{\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\n\t\tint[] x = new int[w];\n\t\tfor (int i=0; i<w; i++) {\n\t\t\tx[i] = i + 1;\n\t\t}\n\n\t\twhile (n-- > 0) {\n\t\t\tString[] str = in.next().split(\",\");\n\t\t\tint a = Integer.parseInt(str[0]) - 1;\n\t\t\tint b = Integer.parseInt(str[1]) - 1;\n\n\t\t\tint t = x[a];\n\t\t\tx[a] = x[b];\n\t\t\tx[b] = t;\n\t\t}\n\n\t\tfor (int ans : x) {\n\t\t\tSystem.out.println(ans);\n\t\t}\n\t}",
"int w = in.nextInt();",
"w",
"in.nextInt()",
"in.nextInt",
"in",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int[] x = new int[w];",
"x",
"new int[w]",
"w",
"for (int i=0; i<w; i++) {\n\t\t\tx[i] = i + 1;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tx[i] = i + 1;\n\t\t}",
"{\n\t\t\tx[i] = i + 1;\n\t\t}",
"x[i] = i + 1",
"x[i]",
"x",
"i",
"i + 1",
"i",
"1",
"while (n-- > 0) {\n\t\t\tString[] str = in.next().split(\",\");\n\t\t\tint a = Integer.parseInt(str[0]) - 1;\n\t\t\tint b = Integer.parseInt(str[1]) - 1;\n\n\t\t\tint t = x[a];\n\t\t\tx[a] = x[b];\n\t\t\tx[b] = t;\n\t\t}",
"n-- > 0",
"n--",
"n",
"0",
"{\n\t\t\tString[] str = in.next().split(\",\");\n\t\t\tint a = Integer.parseInt(str[0]) - 1;\n\t\t\tint b = Integer.parseInt(str[1]) - 1;\n\n\t\t\tint t = x[a];\n\t\t\tx[a] = x[b];\n\t\t\tx[b] = t;\n\t\t}",
"String[] str = in.next().split(\",\");",
"str",
"in.next().split(\",\")",
"in.next().split",
"in.next()",
"in.next",
"in",
"\",\"",
"int a = Integer.parseInt(str[0]) - 1;",
"a",
"Integer.parseInt(str[0]) - 1",
"Integer.parseInt(str[0])",
"Integer.parseInt",
"Integer",
"str[0]",
"str",
"0",
"1",
"int b = Integer.parseInt(str[1]) - 1;",
"b",
"Integer.parseInt(str[1]) - 1",
"Integer.parseInt(str[1])",
"Integer.parseInt",
"Integer",
"str[1]",
"str",
"1",
"1",
"int t = x[a];",
"t",
"x[a]",
"x",
"a",
"x[a] = x[b]",
"x[a]",
"x",
"a",
"x[b]",
"x",
"b",
"x[b] = t",
"x[b]",
"x",
"b",
"t",
"for (int ans : x) {\n\t\t\tSystem.out.println(ans);\n\t\t}",
"int ans",
"x",
"{\n\t\t\tSystem.out.println(ans);\n\t\t}",
"{\n\t\t\tSystem.out.println(ans);\n\t\t}",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"public static void main(String[] args) {\n\t\tlong start = System.currentTimeMillis();\n\n\t\tsolve();\n\t\tout.flush();\n\n\t\tlong end = System.currentTimeMillis();\n\t\t//trace(end-start + \"ms\");\n\t\tin.close();\n\t\tout.close();\n\t}",
"main",
"{\n\t\tlong start = System.currentTimeMillis();\n\n\t\tsolve();\n\t\tout.flush();\n\n\t\tlong end = System.currentTimeMillis();\n\t\t//trace(end-start + \"ms\");\n\t\tin.close();\n\t\tout.close();\n\t}",
"long start = System.currentTimeMillis();",
"start",
"System.currentTimeMillis()",
"System.currentTimeMillis",
"System",
"solve()",
"solve",
"out.flush()",
"out.flush",
"out",
"long end = System.currentTimeMillis();",
"end",
"System.currentTimeMillis()",
"System.currentTimeMillis",
"System",
"in.close()",
"in.close",
"in",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static void trace(Object... o) { System.out.println(Arrays.deepToString(o));}",
"trace",
"{ System.out.println(Arrays.deepToString(o));}",
"System.out.println(Arrays.deepToString(o))",
"System.out.println",
"System.out",
"System",
"System.out",
"Arrays.deepToString(o)",
"Arrays.deepToString",
"Arrays",
"o",
"Object... o",
"o",
"public class Main {\n\n\tstatic final Scanner in = new Scanner(System.in);\n\tstatic final PrintWriter out = new PrintWriter(System.out,false);\n\n\tstatic void solve() {\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\n\t\tint[] x = new int[w];\n\t\tfor (int i=0; i<w; i++) {\n\t\t\tx[i] = i + 1;\n\t\t}\n\n\t\twhile (n-- > 0) {\n\t\t\tString[] str = in.next().split(\",\");\n\t\t\tint a = Integer.parseInt(str[0]) - 1;\n\t\t\tint b = Integer.parseInt(str[1]) - 1;\n\n\t\t\tint t = x[a];\n\t\t\tx[a] = x[b];\n\t\t\tx[b] = t;\n\t\t}\n\n\t\tfor (int ans : x) {\n\t\t\tSystem.out.println(ans);\n\t\t}\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tlong start = System.currentTimeMillis();\n\n\t\tsolve();\n\t\tout.flush();\n\n\t\tlong end = System.currentTimeMillis();\n\t\t//trace(end-start + \"ms\");\n\t\tin.close();\n\t\tout.close();\n\t}\n\n\tstatic void trace(Object... o) { System.out.println(Arrays.deepToString(o));}\n}",
"public class Main {\n\n\tstatic final Scanner in = new Scanner(System.in);\n\tstatic final PrintWriter out = new PrintWriter(System.out,false);\n\n\tstatic void solve() {\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\n\t\tint[] x = new int[w];\n\t\tfor (int i=0; i<w; i++) {\n\t\t\tx[i] = i + 1;\n\t\t}\n\n\t\twhile (n-- > 0) {\n\t\t\tString[] str = in.next().split(\",\");\n\t\t\tint a = Integer.parseInt(str[0]) - 1;\n\t\t\tint b = Integer.parseInt(str[1]) - 1;\n\n\t\t\tint t = x[a];\n\t\t\tx[a] = x[b];\n\t\t\tx[b] = t;\n\t\t}\n\n\t\tfor (int ans : x) {\n\t\t\tSystem.out.println(ans);\n\t\t}\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tlong start = System.currentTimeMillis();\n\n\t\tsolve();\n\t\tout.flush();\n\n\t\tlong end = System.currentTimeMillis();\n\t\t//trace(end-start + \"ms\");\n\t\tin.close();\n\t\tout.close();\n\t}\n\n\tstatic void trace(Object... o) { System.out.println(Arrays.deepToString(o));}\n}",
"Main"
] | import java.util.*;
import java.io.*;
import java.awt.geom.*;
import java.math.*;
public class Main {
static final Scanner in = new Scanner(System.in);
static final PrintWriter out = new PrintWriter(System.out,false);
static void solve() {
int w = in.nextInt();
int n = in.nextInt();
int[] x = new int[w];
for (int i=0; i<w; i++) {
x[i] = i + 1;
}
while (n-- > 0) {
String[] str = in.next().split(",");
int a = Integer.parseInt(str[0]) - 1;
int b = Integer.parseInt(str[1]) - 1;
int t = x[a];
x[a] = x[b];
x[b] = t;
}
for (int ans : x) {
System.out.println(ans);
}
}
public static void main(String[] args) {
long start = System.currentTimeMillis();
solve();
out.flush();
long end = System.currentTimeMillis();
//trace(end-start + "ms");
in.close();
out.close();
}
static void trace(Object... o) { System.out.println(Arrays.deepToString(o));}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
0,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
138,
5
],
[
138,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
16,
22
],
[
22,
23
],
[
22,
24
],
[
16,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
43,
45
],
[
16,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
16,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
56,
58
],
[
51,
59
],
[
59,
60
],
[
60,
61
],
[
51,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
63,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
63,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
81,
82
],
[
81,
83
],
[
77,
84
],
[
63,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
91,
92
],
[
91,
93
],
[
87,
94
],
[
63,
95
],
[
95,
96
],
[
63,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
99,
101
],
[
63,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
106,
107
],
[
106,
108
],
[
63,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
16,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
114,
119
],
[
119,
120
],
[
119,
121
],
[
114,
122
],
[
122,
123
],
[
123,
124
],
[
114,
125
],
[
126,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
127,
132
],
[
132,
133
],
[
132,
134
],
[
6,
135
],
[
135,
136
],
[
0,
137
],
[
137,
138
],
[
137,
139
]
] | [
"import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(sc.hasNext()) {\n\t\tint b=sc.nextInt();\n\t\tint []a=new int[b];\n\t\tfor(int i=0;i<b;i++) {\n\t\t\ta[i]=i+1;\n\t\t\t//System.out.print(a[i]);\n\t\t}//\n\t\tint s=sc.nextInt();\n\t\tfor(int i=0;i<s;i++) {\n\t\t\t String str = sc.next();\n\t\t\t String Str[] = str.split(\",\");\n\t\t\t\t int p=Integer.parseInt(Str[0])-1;\n\t\t\t\t int q=Integer.parseInt(Str[1])-1;\t\n\t\t\t\tint temp;\n\t\t\t\ttemp=a[p];\n\t\t\t\ta[p]=a[q];\n\t\t\t\ta[q]=temp;\n\t\t}\n\t\t\tfor(int j=0;j<b;j++) {\n\t\t\t\tSystem.out.println(a[j]);\n\t\t\t}\n\t}\n\t}\n\t}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(sc.hasNext()) {\n\t\tint b=sc.nextInt();\n\t\tint []a=new int[b];\n\t\tfor(int i=0;i<b;i++) {\n\t\t\ta[i]=i+1;\n\t\t\t//System.out.print(a[i]);\n\t\t}//\n\t\tint s=sc.nextInt();\n\t\tfor(int i=0;i<s;i++) {\n\t\t\t String str = sc.next();\n\t\t\t String Str[] = str.split(\",\");\n\t\t\t\t int p=Integer.parseInt(Str[0])-1;\n\t\t\t\t int q=Integer.parseInt(Str[1])-1;\t\n\t\t\t\tint temp;\n\t\t\t\ttemp=a[p];\n\t\t\t\ta[p]=a[q];\n\t\t\t\ta[q]=temp;\n\t\t}\n\t\t\tfor(int j=0;j<b;j++) {\n\t\t\t\tSystem.out.println(a[j]);\n\t\t\t}\n\t}\n\t}\n\t}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(sc.hasNext()) {\n\t\tint b=sc.nextInt();\n\t\tint []a=new int[b];\n\t\tfor(int i=0;i<b;i++) {\n\t\t\ta[i]=i+1;\n\t\t\t//System.out.print(a[i]);\n\t\t}//\n\t\tint s=sc.nextInt();\n\t\tfor(int i=0;i<s;i++) {\n\t\t\t String str = sc.next();\n\t\t\t String Str[] = str.split(\",\");\n\t\t\t\t int p=Integer.parseInt(Str[0])-1;\n\t\t\t\t int q=Integer.parseInt(Str[1])-1;\t\n\t\t\t\tint temp;\n\t\t\t\ttemp=a[p];\n\t\t\t\ta[p]=a[q];\n\t\t\t\ta[q]=temp;\n\t\t}\n\t\t\tfor(int j=0;j<b;j++) {\n\t\t\t\tSystem.out.println(a[j]);\n\t\t\t}\n\t}\n\t}",
"main",
"{\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(sc.hasNext()) {\n\t\tint b=sc.nextInt();\n\t\tint []a=new int[b];\n\t\tfor(int i=0;i<b;i++) {\n\t\t\ta[i]=i+1;\n\t\t\t//System.out.print(a[i]);\n\t\t}//\n\t\tint s=sc.nextInt();\n\t\tfor(int i=0;i<s;i++) {\n\t\t\t String str = sc.next();\n\t\t\t String Str[] = str.split(\",\");\n\t\t\t\t int p=Integer.parseInt(Str[0])-1;\n\t\t\t\t int q=Integer.parseInt(Str[1])-1;\t\n\t\t\t\tint temp;\n\t\t\t\ttemp=a[p];\n\t\t\t\ta[p]=a[q];\n\t\t\t\ta[q]=temp;\n\t\t}\n\t\t\tfor(int j=0;j<b;j++) {\n\t\t\t\tSystem.out.println(a[j]);\n\t\t\t}\n\t}\n\t}",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(sc.hasNext()) {\n\t\tint b=sc.nextInt();\n\t\tint []a=new int[b];\n\t\tfor(int i=0;i<b;i++) {\n\t\t\ta[i]=i+1;\n\t\t\t//System.out.print(a[i]);\n\t\t}//\n\t\tint s=sc.nextInt();\n\t\tfor(int i=0;i<s;i++) {\n\t\t\t String str = sc.next();\n\t\t\t String Str[] = str.split(\",\");\n\t\t\t\t int p=Integer.parseInt(Str[0])-1;\n\t\t\t\t int q=Integer.parseInt(Str[1])-1;\t\n\t\t\t\tint temp;\n\t\t\t\ttemp=a[p];\n\t\t\t\ta[p]=a[q];\n\t\t\t\ta[q]=temp;\n\t\t}\n\t\t\tfor(int j=0;j<b;j++) {\n\t\t\t\tSystem.out.println(a[j]);\n\t\t\t}\n\t}",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n\t\tint b=sc.nextInt();\n\t\tint []a=new int[b];\n\t\tfor(int i=0;i<b;i++) {\n\t\t\ta[i]=i+1;\n\t\t\t//System.out.print(a[i]);\n\t\t}//\n\t\tint s=sc.nextInt();\n\t\tfor(int i=0;i<s;i++) {\n\t\t\t String str = sc.next();\n\t\t\t String Str[] = str.split(\",\");\n\t\t\t\t int p=Integer.parseInt(Str[0])-1;\n\t\t\t\t int q=Integer.parseInt(Str[1])-1;\t\n\t\t\t\tint temp;\n\t\t\t\ttemp=a[p];\n\t\t\t\ta[p]=a[q];\n\t\t\t\ta[q]=temp;\n\t\t}\n\t\t\tfor(int j=0;j<b;j++) {\n\t\t\t\tSystem.out.println(a[j]);\n\t\t\t}\n\t}",
"int b=sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int []a=new int[b];",
"a",
"new int[b]",
"b",
"for(int i=0;i<b;i++) {\n\t\t\ta[i]=i+1;\n\t\t\t//System.out.print(a[i]);\n\t\t}//",
"int i=0;",
"int i=0;",
"i",
"0",
"i<b",
"i",
"b",
"i++",
"i++",
"i",
"{\n\t\t\ta[i]=i+1;\n\t\t\t//System.out.print(a[i]);\n\t\t}//",
"{\n\t\t\ta[i]=i+1;\n\t\t\t//System.out.print(a[i]);\n\t\t}",
"a[i]=i+1",
"a[i]",
"a",
"i",
"i+1",
"i",
"1",
"int s=sc.nextInt();",
"s",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0;i<s;i++) {\n\t\t\t String str = sc.next();\n\t\t\t String Str[] = str.split(\",\");\n\t\t\t\t int p=Integer.parseInt(Str[0])-1;\n\t\t\t\t int q=Integer.parseInt(Str[1])-1;\t\n\t\t\t\tint temp;\n\t\t\t\ttemp=a[p];\n\t\t\t\ta[p]=a[q];\n\t\t\t\ta[q]=temp;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<s",
"i",
"s",
"i++",
"i++",
"i",
"{\n\t\t\t String str = sc.next();\n\t\t\t String Str[] = str.split(\",\");\n\t\t\t\t int p=Integer.parseInt(Str[0])-1;\n\t\t\t\t int q=Integer.parseInt(Str[1])-1;\t\n\t\t\t\tint temp;\n\t\t\t\ttemp=a[p];\n\t\t\t\ta[p]=a[q];\n\t\t\t\ta[q]=temp;\n\t\t}",
"{\n\t\t\t String str = sc.next();\n\t\t\t String Str[] = str.split(\",\");\n\t\t\t\t int p=Integer.parseInt(Str[0])-1;\n\t\t\t\t int q=Integer.parseInt(Str[1])-1;\t\n\t\t\t\tint temp;\n\t\t\t\ttemp=a[p];\n\t\t\t\ta[p]=a[q];\n\t\t\t\ta[q]=temp;\n\t\t}",
"String str = sc.next();",
"str",
"sc.next()",
"sc.next",
"sc",
"String Str[] = str.split(\",\");",
"Str",
"str.split(\",\")",
"str.split",
"str",
"\",\"",
"int p=Integer.parseInt(Str[0])-1;",
"p",
"Integer.parseInt(Str[0])-1",
"Integer.parseInt(Str[0])",
"Integer.parseInt",
"Integer",
"Str[0]",
"Str",
"0",
"1",
"int q=Integer.parseInt(Str[1])-1;",
"q",
"Integer.parseInt(Str[1])-1",
"Integer.parseInt(Str[1])",
"Integer.parseInt",
"Integer",
"Str[1]",
"Str",
"1",
"1",
"int temp;",
"temp",
"temp=a[p]",
"temp",
"a[p]",
"a",
"p",
"a[p]=a[q]",
"a[p]",
"a",
"p",
"a[q]",
"a",
"q",
"a[q]=temp",
"a[q]",
"a",
"q",
"temp",
"for(int j=0;j<b;j++) {\n\t\t\t\tSystem.out.println(a[j]);\n\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<b",
"j",
"b",
"j++",
"j++",
"j",
"{\n\t\t\t\tSystem.out.println(a[j]);\n\t\t\t}",
"{\n\t\t\t\tSystem.out.println(a[j]);\n\t\t\t}",
"System.out.println(a[j])",
"System.out.println",
"System.out",
"System",
"System.out",
"a[j]",
"a",
"j",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(sc.hasNext()) {\n\t\tint b=sc.nextInt();\n\t\tint []a=new int[b];\n\t\tfor(int i=0;i<b;i++) {\n\t\t\ta[i]=i+1;\n\t\t\t//System.out.print(a[i]);\n\t\t}//\n\t\tint s=sc.nextInt();\n\t\tfor(int i=0;i<s;i++) {\n\t\t\t String str = sc.next();\n\t\t\t String Str[] = str.split(\",\");\n\t\t\t\t int p=Integer.parseInt(Str[0])-1;\n\t\t\t\t int q=Integer.parseInt(Str[1])-1;\t\n\t\t\t\tint temp;\n\t\t\t\ttemp=a[p];\n\t\t\t\ta[p]=a[q];\n\t\t\t\ta[q]=temp;\n\t\t}\n\t\t\tfor(int j=0;j<b;j++) {\n\t\t\t\tSystem.out.println(a[j]);\n\t\t\t}\n\t}\n\t}\n\t}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(sc.hasNext()) {\n\t\tint b=sc.nextInt();\n\t\tint []a=new int[b];\n\t\tfor(int i=0;i<b;i++) {\n\t\t\ta[i]=i+1;\n\t\t\t//System.out.print(a[i]);\n\t\t}//\n\t\tint s=sc.nextInt();\n\t\tfor(int i=0;i<s;i++) {\n\t\t\t String str = sc.next();\n\t\t\t String Str[] = str.split(\",\");\n\t\t\t\t int p=Integer.parseInt(Str[0])-1;\n\t\t\t\t int q=Integer.parseInt(Str[1])-1;\t\n\t\t\t\tint temp;\n\t\t\t\ttemp=a[p];\n\t\t\t\ta[p]=a[q];\n\t\t\t\ta[q]=temp;\n\t\t}\n\t\t\tfor(int j=0;j<b;j++) {\n\t\t\t\tSystem.out.println(a[j]);\n\t\t\t}\n\t}\n\t}\n\t}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
while(sc.hasNext()) {
int b=sc.nextInt();
int []a=new int[b];
for(int i=0;i<b;i++) {
a[i]=i+1;
//System.out.print(a[i]);
}//
int s=sc.nextInt();
for(int i=0;i<s;i++) {
String str = sc.next();
String Str[] = str.split(",");
int p=Integer.parseInt(Str[0])-1;
int q=Integer.parseInt(Str[1])-1;
int temp;
temp=a[p];
a[p]=a[q];
a[q]=temp;
}
for(int j=0;j<b;j++) {
System.out.println(a[j]);
}
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
13,
41,
13,
4,
18,
13,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
112,
5
],
[
112,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
23,
31
],
[
31,
32
],
[
32,
33
],
[
23,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
8,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
8,
45
],
[
45,
46
],
[
46,
47
],
[
45,
48
],
[
8,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
54,
55
],
[
54,
56
],
[
49,
57
],
[
57,
58
],
[
58,
59
],
[
49,
60
],
[
61,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
61,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
61,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
74,
76
],
[
61,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
81
],
[
81,
82
],
[
81,
83
],
[
61,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
8,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
94,
95
],
[
94,
96
],
[
89,
97
],
[
97,
98
],
[
98,
99
],
[
89,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
101,
106
],
[
106,
107
],
[
106,
108
],
[
6,
109
],
[
109,
110
],
[
0,
111
],
[
111,
112
],
[
111,
113
]
] | [
"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 w = sc.nextInt();\n\t\tint points[] = new int[w + 1];\n\t\tfor (int i = 1; i <= w; ++i)\n\t\t\tpoints[i] = i;\n\t\tint n = sc.nextInt();\n\t\tsc.useDelimiter(\",|\\n\");\n\t\tfor (int i = 0; i < n; ++i) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tint tmp = points[a];\n\t\t\tpoints[a] = points[b];\n\t\t\tpoints[b] = tmp;\n\t\t}\n\t\tfor (int i = 1; i <= w; ++i)\n\t\t\tSystem.out.println(points[i]);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint points[] = new int[w + 1];\n\t\tfor (int i = 1; i <= w; ++i)\n\t\t\tpoints[i] = i;\n\t\tint n = sc.nextInt();\n\t\tsc.useDelimiter(\",|\\n\");\n\t\tfor (int i = 0; i < n; ++i) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tint tmp = points[a];\n\t\t\tpoints[a] = points[b];\n\t\t\tpoints[b] = tmp;\n\t\t}\n\t\tfor (int i = 1; i <= w; ++i)\n\t\t\tSystem.out.println(points[i]);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint points[] = new int[w + 1];\n\t\tfor (int i = 1; i <= w; ++i)\n\t\t\tpoints[i] = i;\n\t\tint n = sc.nextInt();\n\t\tsc.useDelimiter(\",|\\n\");\n\t\tfor (int i = 0; i < n; ++i) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tint tmp = points[a];\n\t\t\tpoints[a] = points[b];\n\t\t\tpoints[b] = tmp;\n\t\t}\n\t\tfor (int i = 1; i <= w; ++i)\n\t\t\tSystem.out.println(points[i]);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint points[] = new int[w + 1];\n\t\tfor (int i = 1; i <= w; ++i)\n\t\t\tpoints[i] = i;\n\t\tint n = sc.nextInt();\n\t\tsc.useDelimiter(\",|\\n\");\n\t\tfor (int i = 0; i < n; ++i) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tint tmp = points[a];\n\t\t\tpoints[a] = points[b];\n\t\t\tpoints[b] = tmp;\n\t\t}\n\t\tfor (int i = 1; i <= w; ++i)\n\t\t\tSystem.out.println(points[i]);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int points[] = new int[w + 1];",
"points",
"new int[w + 1]",
"w + 1",
"w",
"1",
"for (int i = 1; i <= w; ++i)\n\t\t\tpoints[i] = i;",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= w",
"i",
"w",
"++i",
"++i",
"i",
"points[i] = i;",
"points[i] = i",
"points[i]",
"points",
"i",
"i",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sc.useDelimiter(\",|\\n\")",
"sc.useDelimiter",
"sc",
"\",|\\n\"",
"for (int i = 0; i < n; ++i) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tint tmp = points[a];\n\t\t\tpoints[a] = points[b];\n\t\t\tpoints[b] = tmp;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"++i",
"++i",
"i",
"{\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tint tmp = points[a];\n\t\t\tpoints[a] = points[b];\n\t\t\tpoints[b] = tmp;\n\t\t}",
"{\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tint tmp = points[a];\n\t\t\tpoints[a] = points[b];\n\t\t\tpoints[b] = tmp;\n\t\t}",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int tmp = points[a];",
"tmp",
"points[a]",
"points",
"a",
"points[a] = points[b]",
"points[a]",
"points",
"a",
"points[b]",
"points",
"b",
"points[b] = tmp",
"points[b]",
"points",
"b",
"tmp",
"for (int i = 1; i <= w; ++i)\n\t\t\tSystem.out.println(points[i]);",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= w",
"i",
"w",
"++i",
"++i",
"i",
"System.out.println(points[i]);",
"System.out.println(points[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"points[i]",
"points",
"i",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint points[] = new int[w + 1];\n\t\tfor (int i = 1; i <= w; ++i)\n\t\t\tpoints[i] = i;\n\t\tint n = sc.nextInt();\n\t\tsc.useDelimiter(\",|\\n\");\n\t\tfor (int i = 0; i < n; ++i) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tint tmp = points[a];\n\t\t\tpoints[a] = points[b];\n\t\t\tpoints[b] = tmp;\n\t\t}\n\t\tfor (int i = 1; i <= w; ++i)\n\t\t\tSystem.out.println(points[i]);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint points[] = new int[w + 1];\n\t\tfor (int i = 1; i <= w; ++i)\n\t\t\tpoints[i] = i;\n\t\tint n = sc.nextInt();\n\t\tsc.useDelimiter(\",|\\n\");\n\t\tfor (int i = 0; i < n; ++i) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tint tmp = points[a];\n\t\t\tpoints[a] = points[b];\n\t\t\tpoints[b] = tmp;\n\t\t}\n\t\tfor (int i = 1; i <= w; ++i)\n\t\t\tSystem.out.println(points[i]);\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int w = sc.nextInt();
int points[] = new int[w + 1];
for (int i = 1; i <= w; ++i)
points[i] = i;
int n = sc.nextInt();
sc.useDelimiter(",|\n");
for (int i = 0; i < n; ++i) {
int a = sc.nextInt();
int b = sc.nextInt();
int tmp = points[a];
points[a] = points[b];
points[b] = tmp;
}
for (int i = 1; i <= w; ++i)
System.out.println(points[i]);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
4,
18,
13,
17,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
2,
13,
17,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
41,
13,
17,
41,
13,
17,
42,
2,
13,
13,
30,
0,
18,
13,
13,
4,
18,
13,
0,
18,
13,
13,
4,
18,
13,
0,
13,
18,
13,
2,
18,
13,
13,
17,
0,
18,
13,
2,
18,
13,
13,
17,
18,
13,
2,
18,
13,
13,
17,
0,
18,
13,
2,
18,
13,
13,
17,
13,
40,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
140,
5
],
[
140,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
12,
15
],
[
8,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
25,
33
],
[
33,
34
],
[
34,
35
],
[
25,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
41,
42
],
[
41,
43
],
[
8,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
8,
49
],
[
49,
50
],
[
49,
51
],
[
8,
53
],
[
53,
54
],
[
53,
55
],
[
8,
57
],
[
57,
58
],
[
57,
59
],
[
8,
60
],
[
60,
61
],
[
60,
62
],
[
8,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
72,
73
],
[
73,
74
],
[
67,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
79,
80
],
[
80,
81
],
[
67,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
67,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
91,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
67,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
106,
114
],
[
67,
115
],
[
115,
116
],
[
8,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
117,
122
],
[
122,
123
],
[
122,
124
],
[
117,
125
],
[
125,
126
],
[
126,
127
],
[
117,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
129,
134
],
[
134,
135
],
[
134,
136
],
[
6,
137
],
[
137,
138
],
[
0,
139
],
[
139,
140
],
[
139,
141
]
] | [
"import java.util.*;\n\npublic class Main{\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n sc.useDelimiter(\",|\\n\");\n\n int w=sc.nextInt();\n int string[] = new int[w];\n\n for(int i=0; i<w; i++) string[i] = i+1;\n\n int n=sc.nextInt();\n int a[] = new int [n];\n int b[] = new int [n];\n int times=0;\n int chg=0;\n\n while(times<n){\n a[times]=sc.nextInt();\n b[times]=sc.nextInt();\n\n chg=string[(a[times]-1)];\n string[(a[times]-1)]=string[(b[times]-1)];\n string[(b[times]-1)]=chg;\n\n times++;\n }\n\n for(int i=0; i<w; i++) System.out.println(string[i]);\n }\n}\n",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n sc.useDelimiter(\",|\\n\");\n\n int w=sc.nextInt();\n int string[] = new int[w];\n\n for(int i=0; i<w; i++) string[i] = i+1;\n\n int n=sc.nextInt();\n int a[] = new int [n];\n int b[] = new int [n];\n int times=0;\n int chg=0;\n\n while(times<n){\n a[times]=sc.nextInt();\n b[times]=sc.nextInt();\n\n chg=string[(a[times]-1)];\n string[(a[times]-1)]=string[(b[times]-1)];\n string[(b[times]-1)]=chg;\n\n times++;\n }\n\n for(int i=0; i<w; i++) System.out.println(string[i]);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n sc.useDelimiter(\",|\\n\");\n\n int w=sc.nextInt();\n int string[] = new int[w];\n\n for(int i=0; i<w; i++) string[i] = i+1;\n\n int n=sc.nextInt();\n int a[] = new int [n];\n int b[] = new int [n];\n int times=0;\n int chg=0;\n\n while(times<n){\n a[times]=sc.nextInt();\n b[times]=sc.nextInt();\n\n chg=string[(a[times]-1)];\n string[(a[times]-1)]=string[(b[times]-1)];\n string[(b[times]-1)]=chg;\n\n times++;\n }\n\n for(int i=0; i<w; i++) System.out.println(string[i]);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n sc.useDelimiter(\",|\\n\");\n\n int w=sc.nextInt();\n int string[] = new int[w];\n\n for(int i=0; i<w; i++) string[i] = i+1;\n\n int n=sc.nextInt();\n int a[] = new int [n];\n int b[] = new int [n];\n int times=0;\n int chg=0;\n\n while(times<n){\n a[times]=sc.nextInt();\n b[times]=sc.nextInt();\n\n chg=string[(a[times]-1)];\n string[(a[times]-1)]=string[(b[times]-1)];\n string[(b[times]-1)]=chg;\n\n times++;\n }\n\n for(int i=0; i<w; i++) System.out.println(string[i]);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"sc.useDelimiter(\",|\\n\")",
"sc.useDelimiter",
"sc",
"\",|\\n\"",
"int w=sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int string[] = new int[w];",
"string",
"new int[w]",
"w",
"for(int i=0; i<w; i++) string[i] = i+1;",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"string[i] = i+1;",
"string[i] = i+1",
"string[i]",
"string",
"i",
"i+1",
"i",
"1",
"int n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int a[] = new int [n];",
"a",
"new int [n]",
"n",
"int b[] = new int [n];",
"b",
"new int [n]",
"n",
"int times=0;",
"times",
"0",
"int chg=0;",
"chg",
"0",
"while(times<n){\n a[times]=sc.nextInt();\n b[times]=sc.nextInt();\n\n chg=string[(a[times]-1)];\n string[(a[times]-1)]=string[(b[times]-1)];\n string[(b[times]-1)]=chg;\n\n times++;\n }",
"times<n",
"times",
"n",
"{\n a[times]=sc.nextInt();\n b[times]=sc.nextInt();\n\n chg=string[(a[times]-1)];\n string[(a[times]-1)]=string[(b[times]-1)];\n string[(b[times]-1)]=chg;\n\n times++;\n }",
"a[times]=sc.nextInt()",
"a[times]",
"a",
"times",
"sc.nextInt()",
"sc.nextInt",
"sc",
"b[times]=sc.nextInt()",
"b[times]",
"b",
"times",
"sc.nextInt()",
"sc.nextInt",
"sc",
"chg=string[(a[times]-1)]",
"chg",
"string[(a[times]-1)]",
"string",
"(a[times]-1)",
"a[times]",
"a",
"times",
"1",
"string[(a[times]-1)]=string[(b[times]-1)]",
"string[(a[times]-1)]",
"string",
"(a[times]-1)",
"a[times]",
"a",
"times",
"1",
"string[(b[times]-1)]",
"string",
"(b[times]-1)",
"b[times]",
"b",
"times",
"1",
"string[(b[times]-1)]=chg",
"string[(b[times]-1)]",
"string",
"(b[times]-1)",
"b[times]",
"b",
"times",
"1",
"chg",
"times++",
"times",
"for(int i=0; i<w; i++) System.out.println(string[i]);",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"System.out.println(string[i]);",
"System.out.println(string[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"string[i]",
"string",
"i",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n sc.useDelimiter(\",|\\n\");\n\n int w=sc.nextInt();\n int string[] = new int[w];\n\n for(int i=0; i<w; i++) string[i] = i+1;\n\n int n=sc.nextInt();\n int a[] = new int [n];\n int b[] = new int [n];\n int times=0;\n int chg=0;\n\n while(times<n){\n a[times]=sc.nextInt();\n b[times]=sc.nextInt();\n\n chg=string[(a[times]-1)];\n string[(a[times]-1)]=string[(b[times]-1)];\n string[(b[times]-1)]=chg;\n\n times++;\n }\n\n for(int i=0; i<w; i++) System.out.println(string[i]);\n }\n}",
"public class Main{\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n sc.useDelimiter(\",|\\n\");\n\n int w=sc.nextInt();\n int string[] = new int[w];\n\n for(int i=0; i<w; i++) string[i] = i+1;\n\n int n=sc.nextInt();\n int a[] = new int [n];\n int b[] = new int [n];\n int times=0;\n int chg=0;\n\n while(times<n){\n a[times]=sc.nextInt();\n b[times]=sc.nextInt();\n\n chg=string[(a[times]-1)];\n string[(a[times]-1)]=string[(b[times]-1)];\n string[(b[times]-1)]=chg;\n\n times++;\n }\n\n for(int i=0; i<w; i++) System.out.println(string[i]);\n }\n}",
"Main"
] | import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
sc.useDelimiter(",|\n");
int w=sc.nextInt();
int string[] = new int[w];
for(int i=0; i<w; i++) string[i] = i+1;
int n=sc.nextInt();
int a[] = new int [n];
int b[] = new int [n];
int times=0;
int chg=0;
while(times<n){
a[times]=sc.nextInt();
b[times]=sc.nextInt();
chg=string[(a[times]-1)];
string[(a[times]-1)]=string[(b[times]-1)];
string[(b[times]-1)]=chg;
times++;
}
for(int i=0; i<w; i++) System.out.println(string[i]);
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
20,
17,
41,
13,
20,
17,
41,
13,
20,
17,
12,
13,
30,
42,
4,
13,
30,
4,
13,
23,
13,
12,
13,
30,
14,
40,
4,
18,
13,
29,
17,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
4,
18,
13,
17,
0,
18,
13,
13,
4,
18,
13,
18,
13,
17,
0,
18,
13,
13,
4,
18,
13,
18,
13,
17,
29,
17,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
2,
18,
13,
13,
17,
0,
18,
13,
2,
18,
13,
13,
17,
18,
13,
2,
18,
13,
13,
17,
0,
18,
13,
2,
18,
13,
13,
17,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
196,
5
],
[
196,
6
],
[
6,
7
],
[
6,
8
],
[
196,
9
],
[
9,
10
],
[
196,
11
],
[
11,
12
],
[
196,
13
],
[
13,
14
],
[
196,
15
],
[
15,
16
],
[
196,
17
],
[
17,
18
],
[
196,
19
],
[
19,
20
],
[
19,
21
],
[
196,
23
],
[
23,
24
],
[
23,
25
],
[
196,
27
],
[
27,
28
],
[
27,
29
],
[
196,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
37,
38
],
[
38,
39
],
[
31,
40
],
[
40,
41
],
[
196,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
45,
50
],
[
50,
51
],
[
44,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
44,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
44,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
67,
68
],
[
67,
69
],
[
62,
70
],
[
70,
71
],
[
71,
72
],
[
62,
73
],
[
74,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
77,
82
],
[
74,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
90,
91
],
[
90,
92
],
[
74,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
100,
101
],
[
100,
102
],
[
44,
103
],
[
103,
104
],
[
196,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
108,
113
],
[
113,
114
],
[
113,
115
],
[
108,
116
],
[
116,
117
],
[
117,
118
],
[
108,
119
],
[
120,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
121,
125
],
[
125,
126
],
[
125,
127
],
[
107,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
128,
133
],
[
133,
134
],
[
133,
135
],
[
128,
136
],
[
136,
137
],
[
137,
138
],
[
128,
139
],
[
140,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
143,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
145,
149
],
[
140,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
153,
154
],
[
154,
155
],
[
154,
156
],
[
153,
157
],
[
150,
158
],
[
158,
159
],
[
158,
160
],
[
160,
161
],
[
161,
162
],
[
161,
163
],
[
160,
164
],
[
140,
165
],
[
165,
166
],
[
166,
167
],
[
166,
168
],
[
168,
169
],
[
169,
170
],
[
169,
171
],
[
168,
172
],
[
165,
173
],
[
107,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
174,
179
],
[
179,
180
],
[
179,
181
],
[
174,
182
],
[
182,
183
],
[
183,
184
],
[
174,
185
],
[
186,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
189,
191
],
[
187,
192
],
[
192,
193
],
[
192,
194
],
[
0,
195
],
[
195,
196
],
[
195,
197
]
] | [
"import java.util.Scanner;\n\n\npublic class Main{\n\n\tstatic Scanner sc = new Scanner(System.in);\n\t\n\tstatic int tmp, n, w, com;\n\tstatic String str[];\n\tstatic int a[] = new int[30], b[] = new int[30], line[] = new int[30];\n\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\twhile(read()){\n\t\t\tsolve();\n\t\t}\n\n\t}\n\t\n\tpublic static boolean read(){\n\t\tif(!sc.hasNext()) return false;\n\t\t\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tstr = sc.next().split(\",\");\n\t\t\t\n\t\t\ta[i] = Integer.parseInt(str[0]);\n\t\t\tb[i] = Integer.parseInt(str[1]);\n\t\t}\n\t\t\n\t\treturn true;\n\t}\n\t\n\tpublic static void solve(){\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tline[i] = i + 1;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\ttmp = line[a[i]-1];\n\t\t\tline[a[i]-1] = line[b[i]-1];\n\t\t\tline[b[i]-1] = tmp;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(line[i]);\n\t\t}\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\n\tstatic Scanner sc = new Scanner(System.in);\n\t\n\tstatic int tmp, n, w, com;\n\tstatic String str[];\n\tstatic int a[] = new int[30], b[] = new int[30], line[] = new int[30];\n\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\twhile(read()){\n\t\t\tsolve();\n\t\t}\n\n\t}\n\t\n\tpublic static boolean read(){\n\t\tif(!sc.hasNext()) return false;\n\t\t\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tstr = sc.next().split(\",\");\n\t\t\t\n\t\t\ta[i] = Integer.parseInt(str[0]);\n\t\t\tb[i] = Integer.parseInt(str[1]);\n\t\t}\n\t\t\n\t\treturn true;\n\t}\n\t\n\tpublic static void solve(){\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tline[i] = i + 1;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\ttmp = line[a[i]-1];\n\t\t\tline[a[i]-1] = line[b[i]-1];\n\t\t\tline[b[i]-1] = tmp;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(line[i]);\n\t\t}\n\t}\n\n}",
"Main",
"static Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"static int tmp",
"tmp",
"n",
"n",
"w",
"w",
"com;",
"com",
"static String str[];",
"str",
"static int a[] = new int[30]",
"a",
"new int[30]",
"30",
"b[] = new int[30]",
"b",
"new int[30]",
"30",
"line[] = new int[30];",
"line",
"new int[30]",
"30",
"public static void main(String[] args) {\n\t\t\n\t\twhile(read()){\n\t\t\tsolve();\n\t\t}\n\n\t}",
"main",
"{\n\t\t\n\t\twhile(read()){\n\t\t\tsolve();\n\t\t}\n\n\t}",
"while(read()){\n\t\t\tsolve();\n\t\t}",
"read()",
"read",
"{\n\t\t\tsolve();\n\t\t}",
"solve()",
"solve",
"String[] args",
"args",
"public static boolean read(){\n\t\tif(!sc.hasNext()) return false;\n\t\t\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tstr = sc.next().split(\",\");\n\t\t\t\n\t\t\ta[i] = Integer.parseInt(str[0]);\n\t\t\tb[i] = Integer.parseInt(str[1]);\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"read",
"{\n\t\tif(!sc.hasNext()) return false;\n\t\t\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tstr = sc.next().split(\",\");\n\t\t\t\n\t\t\ta[i] = Integer.parseInt(str[0]);\n\t\t\tb[i] = Integer.parseInt(str[1]);\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"if(!sc.hasNext()) return false;",
"!sc.hasNext()",
"sc.hasNext()",
"sc.hasNext",
"sc",
"return false;",
"false",
"w = sc.nextInt()",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i = 0; i < n; i++){\n\t\t\tstr = sc.next().split(\",\");\n\t\t\t\n\t\t\ta[i] = Integer.parseInt(str[0]);\n\t\t\tb[i] = Integer.parseInt(str[1]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tstr = sc.next().split(\",\");\n\t\t\t\n\t\t\ta[i] = Integer.parseInt(str[0]);\n\t\t\tb[i] = Integer.parseInt(str[1]);\n\t\t}",
"{\n\t\t\tstr = sc.next().split(\",\");\n\t\t\t\n\t\t\ta[i] = Integer.parseInt(str[0]);\n\t\t\tb[i] = Integer.parseInt(str[1]);\n\t\t}",
"str = sc.next().split(\",\")",
"str",
"sc.next().split(\",\")",
"sc.next().split",
"sc.next()",
"sc.next",
"sc",
"\",\"",
"a[i] = Integer.parseInt(str[0])",
"a[i]",
"a",
"i",
"Integer.parseInt(str[0])",
"Integer.parseInt",
"Integer",
"str[0]",
"str",
"0",
"b[i] = Integer.parseInt(str[1])",
"b[i]",
"b",
"i",
"Integer.parseInt(str[1])",
"Integer.parseInt",
"Integer",
"str[1]",
"str",
"1",
"return true;",
"true",
"public static void solve(){\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tline[i] = i + 1;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\ttmp = line[a[i]-1];\n\t\t\tline[a[i]-1] = line[b[i]-1];\n\t\t\tline[b[i]-1] = tmp;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(line[i]);\n\t\t}\n\t}",
"solve",
"{\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tline[i] = i + 1;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\ttmp = line[a[i]-1];\n\t\t\tline[a[i]-1] = line[b[i]-1];\n\t\t\tline[b[i]-1] = tmp;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(line[i]);\n\t\t}\n\t}",
"for(int i = 0; i < w; i++){\n\t\t\tline[i] = i + 1;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tline[i] = i + 1;\n\t\t}",
"{\n\t\t\tline[i] = i + 1;\n\t\t}",
"line[i] = i + 1",
"line[i]",
"line",
"i",
"i + 1",
"i",
"1",
"for(int i = 0; i < n; i++){\n\t\t\ttmp = line[a[i]-1];\n\t\t\tline[a[i]-1] = line[b[i]-1];\n\t\t\tline[b[i]-1] = tmp;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\ttmp = line[a[i]-1];\n\t\t\tline[a[i]-1] = line[b[i]-1];\n\t\t\tline[b[i]-1] = tmp;\n\t\t}",
"{\n\t\t\ttmp = line[a[i]-1];\n\t\t\tline[a[i]-1] = line[b[i]-1];\n\t\t\tline[b[i]-1] = tmp;\n\t\t}",
"tmp = line[a[i]-1]",
"tmp",
"line[a[i]-1]",
"line",
"a[i]-1",
"a[i]",
"a",
"i",
"1",
"line[a[i]-1] = line[b[i]-1]",
"line[a[i]-1]",
"line",
"a[i]-1",
"a[i]",
"a",
"i",
"1",
"line[b[i]-1]",
"line",
"b[i]-1",
"b[i]",
"b",
"i",
"1",
"line[b[i]-1] = tmp",
"line[b[i]-1]",
"line",
"b[i]-1",
"b[i]",
"b",
"i",
"1",
"tmp",
"for(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(line[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(line[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(line[i]);\n\t\t}",
"System.out.println(line[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"line[i]",
"line",
"i",
"public class Main{\n\n\tstatic Scanner sc = new Scanner(System.in);\n\t\n\tstatic int tmp, n, w, com;\n\tstatic String str[];\n\tstatic int a[] = new int[30], b[] = new int[30], line[] = new int[30];\n\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\twhile(read()){\n\t\t\tsolve();\n\t\t}\n\n\t}\n\t\n\tpublic static boolean read(){\n\t\tif(!sc.hasNext()) return false;\n\t\t\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tstr = sc.next().split(\",\");\n\t\t\t\n\t\t\ta[i] = Integer.parseInt(str[0]);\n\t\t\tb[i] = Integer.parseInt(str[1]);\n\t\t}\n\t\t\n\t\treturn true;\n\t}\n\t\n\tpublic static void solve(){\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tline[i] = i + 1;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\ttmp = line[a[i]-1];\n\t\t\tline[a[i]-1] = line[b[i]-1];\n\t\t\tline[b[i]-1] = tmp;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(line[i]);\n\t\t}\n\t}\n\n}",
"public class Main{\n\n\tstatic Scanner sc = new Scanner(System.in);\n\t\n\tstatic int tmp, n, w, com;\n\tstatic String str[];\n\tstatic int a[] = new int[30], b[] = new int[30], line[] = new int[30];\n\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\twhile(read()){\n\t\t\tsolve();\n\t\t}\n\n\t}\n\t\n\tpublic static boolean read(){\n\t\tif(!sc.hasNext()) return false;\n\t\t\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tstr = sc.next().split(\",\");\n\t\t\t\n\t\t\ta[i] = Integer.parseInt(str[0]);\n\t\t\tb[i] = Integer.parseInt(str[1]);\n\t\t}\n\t\t\n\t\treturn true;\n\t}\n\t\n\tpublic static void solve(){\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tline[i] = i + 1;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\ttmp = line[a[i]-1];\n\t\t\tline[a[i]-1] = line[b[i]-1];\n\t\t\tline[b[i]-1] = tmp;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(line[i]);\n\t\t}\n\t}\n\n}",
"Main"
] | import java.util.Scanner;
public class Main{
static Scanner sc = new Scanner(System.in);
static int tmp, n, w, com;
static String str[];
static int a[] = new int[30], b[] = new int[30], line[] = new int[30];
public static void main(String[] args) {
while(read()){
solve();
}
}
public static boolean read(){
if(!sc.hasNext()) return false;
w = sc.nextInt();
n = sc.nextInt();
for(int i = 0; i < n; i++){
str = sc.next().split(",");
a[i] = Integer.parseInt(str[0]);
b[i] = Integer.parseInt(str[1]);
}
return true;
}
public static void solve(){
for(int i = 0; i < w; i++){
line[i] = i + 1;
}
for(int i = 0; i < n; i++){
tmp = line[a[i]-1];
line[a[i]-1] = line[b[i]-1];
line[b[i]-1] = tmp;
}
for(int i = 0; i < w; i++){
System.out.println(line[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,
2,
13,
17,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
26,
27
],
[
26,
28
],
[
21,
29
],
[
29,
30
],
[
30,
31
],
[
21,
32
],
[
33,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
38,
39
],
[
38,
40
],
[
8,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
8,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
58,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
58,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
76,
77
],
[
76,
78
],
[
72,
79
],
[
58,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
86,
87
],
[
86,
88
],
[
82,
89
],
[
58,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
92,
94
],
[
58,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
99,
101
],
[
58,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
8,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
107,
112
],
[
112,
113
],
[
112,
114
],
[
107,
115
],
[
115,
116
],
[
116,
117
],
[
107,
118
],
[
119,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
120,
125
],
[
125,
126
],
[
125,
127
],
[
6,
128
],
[
128,
129
]
] | [
"import java.util.Scanner;\nclass Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint w = scan.nextInt();\n\t\tint[] x = new int[w];\n\t\tfor(int i = 0;i < w;i++){\n\t\t\tx[i] = i+1;\n\t\t}\n\t\tint n = scan.nextInt();\n\t\tfor(int i = 0;i < n;i++){\n\t\t\tString str = scan.next();\n\t\t\tString[] strAry = str.split(\",\"); \n\t\t\tint a = Integer.parseInt(strAry[0]) - 1;\n\t\t\tint b = Integer.parseInt(strAry[1]) - 1;\n\t\t\tint t = x[a];\n\t\t\tx[a] = x[b];\n\t\t\tx[b] = t;\n\t\t}\n\t\tfor(int i = 0;i < w;i++){\n\t\t\tSystem.out.println(x[i]);\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint w = scan.nextInt();\n\t\tint[] x = new int[w];\n\t\tfor(int i = 0;i < w;i++){\n\t\t\tx[i] = i+1;\n\t\t}\n\t\tint n = scan.nextInt();\n\t\tfor(int i = 0;i < n;i++){\n\t\t\tString str = scan.next();\n\t\t\tString[] strAry = str.split(\",\"); \n\t\t\tint a = Integer.parseInt(strAry[0]) - 1;\n\t\t\tint b = Integer.parseInt(strAry[1]) - 1;\n\t\t\tint t = x[a];\n\t\t\tx[a] = x[b];\n\t\t\tx[b] = t;\n\t\t}\n\t\tfor(int i = 0;i < w;i++){\n\t\t\tSystem.out.println(x[i]);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint w = scan.nextInt();\n\t\tint[] x = new int[w];\n\t\tfor(int i = 0;i < w;i++){\n\t\t\tx[i] = i+1;\n\t\t}\n\t\tint n = scan.nextInt();\n\t\tfor(int i = 0;i < n;i++){\n\t\t\tString str = scan.next();\n\t\t\tString[] strAry = str.split(\",\"); \n\t\t\tint a = Integer.parseInt(strAry[0]) - 1;\n\t\t\tint b = Integer.parseInt(strAry[1]) - 1;\n\t\t\tint t = x[a];\n\t\t\tx[a] = x[b];\n\t\t\tx[b] = t;\n\t\t}\n\t\tfor(int i = 0;i < w;i++){\n\t\t\tSystem.out.println(x[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint w = scan.nextInt();\n\t\tint[] x = new int[w];\n\t\tfor(int i = 0;i < w;i++){\n\t\t\tx[i] = i+1;\n\t\t}\n\t\tint n = scan.nextInt();\n\t\tfor(int i = 0;i < n;i++){\n\t\t\tString str = scan.next();\n\t\t\tString[] strAry = str.split(\",\"); \n\t\t\tint a = Integer.parseInt(strAry[0]) - 1;\n\t\t\tint b = Integer.parseInt(strAry[1]) - 1;\n\t\t\tint t = x[a];\n\t\t\tx[a] = x[b];\n\t\t\tx[b] = t;\n\t\t}\n\t\tfor(int i = 0;i < w;i++){\n\t\t\tSystem.out.println(x[i]);\n\t\t}\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int w = scan.nextInt();",
"w",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int[] x = new int[w];",
"x",
"new int[w]",
"w",
"for(int i = 0;i < w;i++){\n\t\t\tx[i] = i+1;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tx[i] = i+1;\n\t\t}",
"{\n\t\t\tx[i] = i+1;\n\t\t}",
"x[i] = i+1",
"x[i]",
"x",
"i",
"i+1",
"i",
"1",
"int n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(int i = 0;i < n;i++){\n\t\t\tString str = scan.next();\n\t\t\tString[] strAry = str.split(\",\"); \n\t\t\tint a = Integer.parseInt(strAry[0]) - 1;\n\t\t\tint b = Integer.parseInt(strAry[1]) - 1;\n\t\t\tint t = x[a];\n\t\t\tx[a] = x[b];\n\t\t\tx[b] = t;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString str = scan.next();\n\t\t\tString[] strAry = str.split(\",\"); \n\t\t\tint a = Integer.parseInt(strAry[0]) - 1;\n\t\t\tint b = Integer.parseInt(strAry[1]) - 1;\n\t\t\tint t = x[a];\n\t\t\tx[a] = x[b];\n\t\t\tx[b] = t;\n\t\t}",
"{\n\t\t\tString str = scan.next();\n\t\t\tString[] strAry = str.split(\",\"); \n\t\t\tint a = Integer.parseInt(strAry[0]) - 1;\n\t\t\tint b = Integer.parseInt(strAry[1]) - 1;\n\t\t\tint t = x[a];\n\t\t\tx[a] = x[b];\n\t\t\tx[b] = t;\n\t\t}",
"String str = scan.next();",
"str",
"scan.next()",
"scan.next",
"scan",
"String[] strAry = str.split(\",\");",
"strAry",
"str.split(\",\")",
"str.split",
"str",
"\",\"",
"int a = Integer.parseInt(strAry[0]) - 1;",
"a",
"Integer.parseInt(strAry[0]) - 1",
"Integer.parseInt(strAry[0])",
"Integer.parseInt",
"Integer",
"strAry[0]",
"strAry",
"0",
"1",
"int b = Integer.parseInt(strAry[1]) - 1;",
"b",
"Integer.parseInt(strAry[1]) - 1",
"Integer.parseInt(strAry[1])",
"Integer.parseInt",
"Integer",
"strAry[1]",
"strAry",
"1",
"1",
"int t = x[a];",
"t",
"x[a]",
"x",
"a",
"x[a] = x[b]",
"x[a]",
"x",
"a",
"x[b]",
"x",
"b",
"x[b] = t",
"x[b]",
"x",
"b",
"t",
"for(int i = 0;i < w;i++){\n\t\t\tSystem.out.println(x[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(x[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(x[i]);\n\t\t}",
"System.out.println(x[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"x[i]",
"x",
"i",
"String[] args",
"args"
] | import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int w = scan.nextInt();
int[] x = new int[w];
for(int i = 0;i < w;i++){
x[i] = i+1;
}
int n = scan.nextInt();
for(int i = 0;i < n;i++){
String str = scan.next();
String[] strAry = str.split(",");
int a = Integer.parseInt(strAry[0]) - 1;
int b = Integer.parseInt(strAry[1]) - 1;
int t = x[a];
x[a] = x[b];
x[b] = t;
}
for(int i = 0;i < w;i++){
System.out.println(x[i]);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
23,
31
],
[
31,
32
],
[
32,
33
],
[
23,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
8,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
8,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
58,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
58,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
75,
76
],
[
75,
77
],
[
58,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
83,
84
],
[
83,
85
],
[
58,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
88,
90
],
[
58,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
95,
96
],
[
95,
97
],
[
58,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
8,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
103,
108
],
[
108,
109
],
[
108,
110
],
[
103,
111
],
[
111,
112
],
[
112,
113
],
[
103,
114
],
[
115,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
116,
121
],
[
121,
122
],
[
121,
123
],
[
6,
124
],
[
124,
125
]
] | [
"import java.util.Scanner;\nclass Main{\n public static void main(String[] a){\n Scanner stdin = new Scanner(System.in);\n int lt = stdin.nextInt();\n int[] line = new int[lt + 1];\n for(int i = 1; i <= lt; i++){\n line[i] = i;\n }\n int n = stdin.nextInt();\n for(int i = 0; i < n; i++){\n String str = stdin.next();\n String[] spl = str.split(\",\");\n int num1 = Integer.parseInt(spl[0]);\n int num2 = Integer.parseInt(spl[1]);\n int sum = line[num1];\n line[num1] = line[num2];\n line[num2] = sum;\n }\n for(int i = 1; i <= lt; i++){\n System.out.println(line[i]);\n }\n }\n}\n ",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n public static void main(String[] a){\n Scanner stdin = new Scanner(System.in);\n int lt = stdin.nextInt();\n int[] line = new int[lt + 1];\n for(int i = 1; i <= lt; i++){\n line[i] = i;\n }\n int n = stdin.nextInt();\n for(int i = 0; i < n; i++){\n String str = stdin.next();\n String[] spl = str.split(\",\");\n int num1 = Integer.parseInt(spl[0]);\n int num2 = Integer.parseInt(spl[1]);\n int sum = line[num1];\n line[num1] = line[num2];\n line[num2] = sum;\n }\n for(int i = 1; i <= lt; i++){\n System.out.println(line[i]);\n }\n }\n}",
"Main",
"public static void main(String[] a){\n Scanner stdin = new Scanner(System.in);\n int lt = stdin.nextInt();\n int[] line = new int[lt + 1];\n for(int i = 1; i <= lt; i++){\n line[i] = i;\n }\n int n = stdin.nextInt();\n for(int i = 0; i < n; i++){\n String str = stdin.next();\n String[] spl = str.split(\",\");\n int num1 = Integer.parseInt(spl[0]);\n int num2 = Integer.parseInt(spl[1]);\n int sum = line[num1];\n line[num1] = line[num2];\n line[num2] = sum;\n }\n for(int i = 1; i <= lt; i++){\n System.out.println(line[i]);\n }\n }",
"main",
"{\n Scanner stdin = new Scanner(System.in);\n int lt = stdin.nextInt();\n int[] line = new int[lt + 1];\n for(int i = 1; i <= lt; i++){\n line[i] = i;\n }\n int n = stdin.nextInt();\n for(int i = 0; i < n; i++){\n String str = stdin.next();\n String[] spl = str.split(\",\");\n int num1 = Integer.parseInt(spl[0]);\n int num2 = Integer.parseInt(spl[1]);\n int sum = line[num1];\n line[num1] = line[num2];\n line[num2] = sum;\n }\n for(int i = 1; i <= lt; i++){\n System.out.println(line[i]);\n }\n }",
"Scanner stdin = new Scanner(System.in);",
"stdin",
"new Scanner(System.in)",
"int lt = stdin.nextInt();",
"lt",
"stdin.nextInt()",
"stdin.nextInt",
"stdin",
"int[] line = new int[lt + 1];",
"line",
"new int[lt + 1]",
"lt + 1",
"lt",
"1",
"for(int i = 1; i <= lt; i++){\n line[i] = i;\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= lt",
"i",
"lt",
"i++",
"i++",
"i",
"{\n line[i] = i;\n }",
"{\n line[i] = i;\n }",
"line[i] = i",
"line[i]",
"line",
"i",
"i",
"int n = stdin.nextInt();",
"n",
"stdin.nextInt()",
"stdin.nextInt",
"stdin",
"for(int i = 0; i < n; i++){\n String str = stdin.next();\n String[] spl = str.split(\",\");\n int num1 = Integer.parseInt(spl[0]);\n int num2 = Integer.parseInt(spl[1]);\n int sum = line[num1];\n line[num1] = line[num2];\n line[num2] = sum;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String str = stdin.next();\n String[] spl = str.split(\",\");\n int num1 = Integer.parseInt(spl[0]);\n int num2 = Integer.parseInt(spl[1]);\n int sum = line[num1];\n line[num1] = line[num2];\n line[num2] = sum;\n }",
"{\n String str = stdin.next();\n String[] spl = str.split(\",\");\n int num1 = Integer.parseInt(spl[0]);\n int num2 = Integer.parseInt(spl[1]);\n int sum = line[num1];\n line[num1] = line[num2];\n line[num2] = sum;\n }",
"String str = stdin.next();",
"str",
"stdin.next()",
"stdin.next",
"stdin",
"String[] spl = str.split(\",\");",
"spl",
"str.split(\",\")",
"str.split",
"str",
"\",\"",
"int num1 = Integer.parseInt(spl[0]);",
"num1",
"Integer.parseInt(spl[0])",
"Integer.parseInt",
"Integer",
"spl[0]",
"spl",
"0",
"int num2 = Integer.parseInt(spl[1]);",
"num2",
"Integer.parseInt(spl[1])",
"Integer.parseInt",
"Integer",
"spl[1]",
"spl",
"1",
"int sum = line[num1];",
"sum",
"line[num1]",
"line",
"num1",
"line[num1] = line[num2]",
"line[num1]",
"line",
"num1",
"line[num2]",
"line",
"num2",
"line[num2] = sum",
"line[num2]",
"line",
"num2",
"sum",
"for(int i = 1; i <= lt; i++){\n System.out.println(line[i]);\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= lt",
"i",
"lt",
"i++",
"i++",
"i",
"{\n System.out.println(line[i]);\n }",
"{\n System.out.println(line[i]);\n }",
"System.out.println(line[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"line[i]",
"line",
"i",
"String[] a",
"a"
] | import java.util.Scanner;
class Main{
public static void main(String[] a){
Scanner stdin = new Scanner(System.in);
int lt = stdin.nextInt();
int[] line = new int[lt + 1];
for(int i = 1; i <= lt; i++){
line[i] = i;
}
int n = stdin.nextInt();
for(int i = 0; i < n; i++){
String str = stdin.next();
String[] spl = str.split(",");
int num1 = Integer.parseInt(spl[0]);
int num2 = Integer.parseInt(spl[1]);
int sum = line[num1];
line[num1] = line[num2];
line[num2] = sum;
}
for(int i = 1; i <= lt; i++){
System.out.println(line[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
20,
0,
18,
13,
13,
4,
18,
13,
18,
13,
17,
0,
18,
13,
13,
4,
18,
13,
18,
13,
17,
4,
18,
13,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
4,
18,
13,
13,
13,
13,
30,
0,
13,
18,
4,
18,
13,
13,
13,
14,
2,
18,
4,
18,
13,
13,
13,
13,
30,
0,
13,
18,
4,
18,
13,
13,
13,
4,
18,
13,
2,
13,
17,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
6,
13,
41,
13,
41,
13,
10,
6,
13
] | [
[
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
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
25,
33
],
[
33,
34
],
[
34,
35
],
[
25,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
37,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
45,
48
],
[
37,
49
],
[
49,
50
],
[
49,
51
],
[
37,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
59,
60
],
[
59,
61
],
[
37,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
62,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
69,
70
],
[
69,
71
],
[
37,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
8,
76
],
[
76,
77
],
[
76,
78
],
[
8,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
84,
85
],
[
84,
86
],
[
79,
87
],
[
87,
88
],
[
88,
89
],
[
79,
90
],
[
91,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
95,
96
],
[
95,
97
],
[
8,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
98,
103
],
[
103,
104
],
[
103,
105
],
[
98,
106
],
[
106,
107
],
[
107,
108
],
[
98,
109
],
[
110,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
113,
115
],
[
110,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
116,
121
],
[
121,
122
],
[
121,
123
],
[
116,
124
],
[
124,
125
],
[
125,
126
],
[
116,
127
],
[
128,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
132,
135
],
[
131,
136
],
[
130,
137
],
[
129,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
142,
145
],
[
141,
146
],
[
129,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
150,
153
],
[
149,
154
],
[
148,
155
],
[
147,
156
],
[
156,
157
],
[
157,
158
],
[
157,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
160,
163
],
[
159,
164
],
[
110,
165
],
[
165,
166
],
[
166,
167
],
[
165,
168
],
[
168,
169
],
[
168,
170
],
[
165,
171
],
[
171,
172
],
[
171,
173
],
[
8,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
174,
179
],
[
179,
180
],
[
179,
181
],
[
174,
182
],
[
182,
183
],
[
183,
184
],
[
174,
185
],
[
186,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
189,
191
],
[
187,
192
],
[
192,
193
],
[
193,
194
],
[
192,
195
],
[
6,
196
],
[
196,
197
],
[
0,
198
],
[
198,
199
],
[
198,
200
],
[
200,
201
],
[
198,
202
],
[
202,
203
],
[
0,
204
],
[
204,
205
],
[
204,
206
]
] | [
"import java.util.*;\npublic class Main \n{\n\tpublic static void main(String[] args) \n\t{\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint w = stdIn.nextInt();\n\t\tint n = stdIn.nextInt();\n\t\tList<Pair> list = new ArrayList<Pair>();\n\t\tfor (int i = 0; i < n; i++) \n\t\t{\n\t\t\tString str = stdIn.next();\n\t\t\tString[] arr = str.split(\",\");\n\t\t\tPair p = new Pair();\n\t\t\tp.first = Integer.parseInt(arr[0]);\n\t\t\tp.second = Integer.parseInt(arr[1]);\n\t\t\tlist.add(p);\n\t\t}\n\t\tList<Integer> pos = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tpos.add(i + 1);\n\t\t}\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tint ans = i + 1;\n\t\t\tfor(int j = 0; j < n; ++j)\n\t\t\t{\n\t\t\t\tif(list.get(j).first == ans)\n\t\t\t\t{\n\t\t\t\t\tans = list.get(j).second;\n\t\t\t\t}\n\t\t\t\telse if(list.get(j).second == ans)\n\t\t\t\t{\n\t\t\t\t\tans = list.get(j).first;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpos.set(ans - 1, i + 1);\n\t\t}\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tSystem.out.println(pos.get(i));\n\t\t}\n\t}\n}\n\nclass Pair\n{\n\tint first;\n\tint second;\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main \n{\n\tpublic static void main(String[] args) \n\t{\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint w = stdIn.nextInt();\n\t\tint n = stdIn.nextInt();\n\t\tList<Pair> list = new ArrayList<Pair>();\n\t\tfor (int i = 0; i < n; i++) \n\t\t{\n\t\t\tString str = stdIn.next();\n\t\t\tString[] arr = str.split(\",\");\n\t\t\tPair p = new Pair();\n\t\t\tp.first = Integer.parseInt(arr[0]);\n\t\t\tp.second = Integer.parseInt(arr[1]);\n\t\t\tlist.add(p);\n\t\t}\n\t\tList<Integer> pos = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tpos.add(i + 1);\n\t\t}\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tint ans = i + 1;\n\t\t\tfor(int j = 0; j < n; ++j)\n\t\t\t{\n\t\t\t\tif(list.get(j).first == ans)\n\t\t\t\t{\n\t\t\t\t\tans = list.get(j).second;\n\t\t\t\t}\n\t\t\t\telse if(list.get(j).second == ans)\n\t\t\t\t{\n\t\t\t\t\tans = list.get(j).first;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpos.set(ans - 1, i + 1);\n\t\t}\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tSystem.out.println(pos.get(i));\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) \n\t{\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint w = stdIn.nextInt();\n\t\tint n = stdIn.nextInt();\n\t\tList<Pair> list = new ArrayList<Pair>();\n\t\tfor (int i = 0; i < n; i++) \n\t\t{\n\t\t\tString str = stdIn.next();\n\t\t\tString[] arr = str.split(\",\");\n\t\t\tPair p = new Pair();\n\t\t\tp.first = Integer.parseInt(arr[0]);\n\t\t\tp.second = Integer.parseInt(arr[1]);\n\t\t\tlist.add(p);\n\t\t}\n\t\tList<Integer> pos = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tpos.add(i + 1);\n\t\t}\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tint ans = i + 1;\n\t\t\tfor(int j = 0; j < n; ++j)\n\t\t\t{\n\t\t\t\tif(list.get(j).first == ans)\n\t\t\t\t{\n\t\t\t\t\tans = list.get(j).second;\n\t\t\t\t}\n\t\t\t\telse if(list.get(j).second == ans)\n\t\t\t\t{\n\t\t\t\t\tans = list.get(j).first;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpos.set(ans - 1, i + 1);\n\t\t}\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tSystem.out.println(pos.get(i));\n\t\t}\n\t}",
"main",
"{\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint w = stdIn.nextInt();\n\t\tint n = stdIn.nextInt();\n\t\tList<Pair> list = new ArrayList<Pair>();\n\t\tfor (int i = 0; i < n; i++) \n\t\t{\n\t\t\tString str = stdIn.next();\n\t\t\tString[] arr = str.split(\",\");\n\t\t\tPair p = new Pair();\n\t\t\tp.first = Integer.parseInt(arr[0]);\n\t\t\tp.second = Integer.parseInt(arr[1]);\n\t\t\tlist.add(p);\n\t\t}\n\t\tList<Integer> pos = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tpos.add(i + 1);\n\t\t}\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tint ans = i + 1;\n\t\t\tfor(int j = 0; j < n; ++j)\n\t\t\t{\n\t\t\t\tif(list.get(j).first == ans)\n\t\t\t\t{\n\t\t\t\t\tans = list.get(j).second;\n\t\t\t\t}\n\t\t\t\telse if(list.get(j).second == ans)\n\t\t\t\t{\n\t\t\t\t\tans = list.get(j).first;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpos.set(ans - 1, i + 1);\n\t\t}\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tSystem.out.println(pos.get(i));\n\t\t}\n\t}",
"Scanner stdIn = new Scanner(System.in);",
"stdIn",
"new Scanner(System.in)",
"int w = stdIn.nextInt();",
"w",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"int n = stdIn.nextInt();",
"n",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"List<Pair> list = new ArrayList<Pair>();",
"list",
"new ArrayList<Pair>()",
"for (int i = 0; i < n; i++) \n\t\t{\n\t\t\tString str = stdIn.next();\n\t\t\tString[] arr = str.split(\",\");\n\t\t\tPair p = new Pair();\n\t\t\tp.first = Integer.parseInt(arr[0]);\n\t\t\tp.second = Integer.parseInt(arr[1]);\n\t\t\tlist.add(p);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString str = stdIn.next();\n\t\t\tString[] arr = str.split(\",\");\n\t\t\tPair p = new Pair();\n\t\t\tp.first = Integer.parseInt(arr[0]);\n\t\t\tp.second = Integer.parseInt(arr[1]);\n\t\t\tlist.add(p);\n\t\t}",
"{\n\t\t\tString str = stdIn.next();\n\t\t\tString[] arr = str.split(\",\");\n\t\t\tPair p = new Pair();\n\t\t\tp.first = Integer.parseInt(arr[0]);\n\t\t\tp.second = Integer.parseInt(arr[1]);\n\t\t\tlist.add(p);\n\t\t}",
"String str = stdIn.next();",
"str",
"stdIn.next()",
"stdIn.next",
"stdIn",
"String[] arr = str.split(\",\");",
"arr",
"str.split(\",\")",
"str.split",
"str",
"\",\"",
"Pair p = new Pair();",
"p",
"new Pair()",
"p.first = Integer.parseInt(arr[0])",
"p.first",
"p",
"p.first",
"Integer.parseInt(arr[0])",
"Integer.parseInt",
"Integer",
"arr[0]",
"arr",
"0",
"p.second = Integer.parseInt(arr[1])",
"p.second",
"p",
"p.second",
"Integer.parseInt(arr[1])",
"Integer.parseInt",
"Integer",
"arr[1]",
"arr",
"1",
"list.add(p)",
"list.add",
"list",
"p",
"List<Integer> pos = new ArrayList<Integer>();",
"pos",
"new ArrayList<Integer>()",
"for(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tpos.add(i + 1);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"++i",
"++i",
"i",
"{\n\t\t\tpos.add(i + 1);\n\t\t}",
"{\n\t\t\tpos.add(i + 1);\n\t\t}",
"pos.add(i + 1)",
"pos.add",
"pos",
"i + 1",
"i",
"1",
"for(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tint ans = i + 1;\n\t\t\tfor(int j = 0; j < n; ++j)\n\t\t\t{\n\t\t\t\tif(list.get(j).first == ans)\n\t\t\t\t{\n\t\t\t\t\tans = list.get(j).second;\n\t\t\t\t}\n\t\t\t\telse if(list.get(j).second == ans)\n\t\t\t\t{\n\t\t\t\t\tans = list.get(j).first;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpos.set(ans - 1, i + 1);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"++i",
"++i",
"i",
"{\n\t\t\tint ans = i + 1;\n\t\t\tfor(int j = 0; j < n; ++j)\n\t\t\t{\n\t\t\t\tif(list.get(j).first == ans)\n\t\t\t\t{\n\t\t\t\t\tans = list.get(j).second;\n\t\t\t\t}\n\t\t\t\telse if(list.get(j).second == ans)\n\t\t\t\t{\n\t\t\t\t\tans = list.get(j).first;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpos.set(ans - 1, i + 1);\n\t\t}",
"{\n\t\t\tint ans = i + 1;\n\t\t\tfor(int j = 0; j < n; ++j)\n\t\t\t{\n\t\t\t\tif(list.get(j).first == ans)\n\t\t\t\t{\n\t\t\t\t\tans = list.get(j).second;\n\t\t\t\t}\n\t\t\t\telse if(list.get(j).second == ans)\n\t\t\t\t{\n\t\t\t\t\tans = list.get(j).first;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpos.set(ans - 1, i + 1);\n\t\t}",
"int ans = i + 1;",
"ans",
"i + 1",
"i",
"1",
"for(int j = 0; j < n; ++j)\n\t\t\t{\n\t\t\t\tif(list.get(j).first == ans)\n\t\t\t\t{\n\t\t\t\t\tans = list.get(j).second;\n\t\t\t\t}\n\t\t\t\telse if(list.get(j).second == ans)\n\t\t\t\t{\n\t\t\t\t\tans = list.get(j).first;\n\t\t\t\t}\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < n",
"j",
"n",
"++j",
"++j",
"j",
"{\n\t\t\t\tif(list.get(j).first == ans)\n\t\t\t\t{\n\t\t\t\t\tans = list.get(j).second;\n\t\t\t\t}\n\t\t\t\telse if(list.get(j).second == ans)\n\t\t\t\t{\n\t\t\t\t\tans = list.get(j).first;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(list.get(j).first == ans)\n\t\t\t\t{\n\t\t\t\t\tans = list.get(j).second;\n\t\t\t\t}\n\t\t\t\telse if(list.get(j).second == ans)\n\t\t\t\t{\n\t\t\t\t\tans = list.get(j).first;\n\t\t\t\t}\n\t\t\t}",
"if(list.get(j).first == ans)\n\t\t\t\t{\n\t\t\t\t\tans = list.get(j).second;\n\t\t\t\t}\n\t\t\t\telse if(list.get(j).second == ans)\n\t\t\t\t{\n\t\t\t\t\tans = list.get(j).first;\n\t\t\t\t}",
"list.get(j).first == ans",
"list.get(j).first",
"list.get(j)",
"list.get",
"list",
"j",
"list.get(j).first",
"ans",
"{\n\t\t\t\t\tans = list.get(j).second;\n\t\t\t\t}",
"ans = list.get(j).second",
"ans",
"list.get(j).second",
"list.get(j)",
"list.get",
"list",
"j",
"list.get(j).second",
"if(list.get(j).second == ans)\n\t\t\t\t{\n\t\t\t\t\tans = list.get(j).first;\n\t\t\t\t}",
"list.get(j).second == ans",
"list.get(j).second",
"list.get(j)",
"list.get",
"list",
"j",
"list.get(j).second",
"ans",
"{\n\t\t\t\t\tans = list.get(j).first;\n\t\t\t\t}",
"ans = list.get(j).first",
"ans",
"list.get(j).first",
"list.get(j)",
"list.get",
"list",
"j",
"list.get(j).first",
"pos.set(ans - 1, i + 1)",
"pos.set",
"pos",
"ans - 1",
"ans",
"1",
"i + 1",
"i",
"1",
"for(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tSystem.out.println(pos.get(i));\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"++i",
"++i",
"i",
"{\n\t\t\tSystem.out.println(pos.get(i));\n\t\t}",
"{\n\t\t\tSystem.out.println(pos.get(i));\n\t\t}",
"System.out.println(pos.get(i))",
"System.out.println",
"System.out",
"System",
"System.out",
"pos.get(i)",
"pos.get",
"pos",
"i",
"String[] args",
"args",
"class Pair\n{\n\tint first;\n\tint second;\n}",
"Pair",
"int first;",
"first",
"int second;",
"second",
"public class Main \n{\n\tpublic static void main(String[] args) \n\t{\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint w = stdIn.nextInt();\n\t\tint n = stdIn.nextInt();\n\t\tList<Pair> list = new ArrayList<Pair>();\n\t\tfor (int i = 0; i < n; i++) \n\t\t{\n\t\t\tString str = stdIn.next();\n\t\t\tString[] arr = str.split(\",\");\n\t\t\tPair p = new Pair();\n\t\t\tp.first = Integer.parseInt(arr[0]);\n\t\t\tp.second = Integer.parseInt(arr[1]);\n\t\t\tlist.add(p);\n\t\t}\n\t\tList<Integer> pos = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tpos.add(i + 1);\n\t\t}\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tint ans = i + 1;\n\t\t\tfor(int j = 0; j < n; ++j)\n\t\t\t{\n\t\t\t\tif(list.get(j).first == ans)\n\t\t\t\t{\n\t\t\t\t\tans = list.get(j).second;\n\t\t\t\t}\n\t\t\t\telse if(list.get(j).second == ans)\n\t\t\t\t{\n\t\t\t\t\tans = list.get(j).first;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpos.set(ans - 1, i + 1);\n\t\t}\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tSystem.out.println(pos.get(i));\n\t\t}\n\t}\n}",
"public class Main \n{\n\tpublic static void main(String[] args) \n\t{\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint w = stdIn.nextInt();\n\t\tint n = stdIn.nextInt();\n\t\tList<Pair> list = new ArrayList<Pair>();\n\t\tfor (int i = 0; i < n; i++) \n\t\t{\n\t\t\tString str = stdIn.next();\n\t\t\tString[] arr = str.split(\",\");\n\t\t\tPair p = new Pair();\n\t\t\tp.first = Integer.parseInt(arr[0]);\n\t\t\tp.second = Integer.parseInt(arr[1]);\n\t\t\tlist.add(p);\n\t\t}\n\t\tList<Integer> pos = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tpos.add(i + 1);\n\t\t}\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tint ans = i + 1;\n\t\t\tfor(int j = 0; j < n; ++j)\n\t\t\t{\n\t\t\t\tif(list.get(j).first == ans)\n\t\t\t\t{\n\t\t\t\t\tans = list.get(j).second;\n\t\t\t\t}\n\t\t\t\telse if(list.get(j).second == ans)\n\t\t\t\t{\n\t\t\t\t\tans = list.get(j).first;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpos.set(ans - 1, i + 1);\n\t\t}\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tSystem.out.println(pos.get(i));\n\t\t}\n\t}\n}",
"Main"
] | import java.util.*;
public class Main
{
public static void main(String[] args)
{
Scanner stdIn = new Scanner(System.in);
int w = stdIn.nextInt();
int n = stdIn.nextInt();
List<Pair> list = new ArrayList<Pair>();
for (int i = 0; i < n; i++)
{
String str = stdIn.next();
String[] arr = str.split(",");
Pair p = new Pair();
p.first = Integer.parseInt(arr[0]);
p.second = Integer.parseInt(arr[1]);
list.add(p);
}
List<Integer> pos = new ArrayList<Integer>();
for(int i = 0; i < w; ++i)
{
pos.add(i + 1);
}
for(int i = 0; i < w; ++i)
{
int ans = i + 1;
for(int j = 0; j < n; ++j)
{
if(list.get(j).first == ans)
{
ans = list.get(j).second;
}
else if(list.get(j).second == ans)
{
ans = list.get(j).first;
}
}
pos.set(ans - 1, i + 1);
}
for(int i = 0; i < w; ++i)
{
System.out.println(pos.get(i));
}
}
}
class Pair
{
int first;
int second;
} |
[
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,
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,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
2,
4,
18,
13,
18,
4,
18,
13,
17,
17,
17,
41,
13,
2,
4,
18,
13,
18,
4,
18,
13,
17,
17,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
143,
11
],
[
143,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
20,
23
],
[
23,
24
],
[
24,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
31,
32
],
[
32,
33
],
[
14,
34
],
[
34,
35
],
[
34,
36
],
[
14,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
43,
44
],
[
43,
45
],
[
38,
46
],
[
46,
47
],
[
47,
48
],
[
38,
49
],
[
50,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
55,
57
],
[
14,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
63,
64
],
[
63,
65
],
[
58,
66
],
[
66,
67
],
[
67,
68
],
[
58,
69
],
[
70,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
70,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
82,
87
],
[
78,
88
],
[
70,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
96,
99
],
[
95,
100
],
[
91,
101
],
[
70,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
104,
106
],
[
70,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
107,
111
],
[
111,
112
],
[
111,
113
],
[
70,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
14,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
119,
124
],
[
124,
125
],
[
124,
126
],
[
119,
127
],
[
127,
128
],
[
128,
129
],
[
119,
130
],
[
131,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
132,
137
],
[
137,
138
],
[
137,
139
],
[
12,
140
],
[
140,
141
],
[
0,
142
],
[
142,
143
],
[
142,
144
]
] | [
"import java.io.InputStreamReader;\nimport java.io.BufferedReader;\nimport java.io.IOException;\n\npublic class Main {\n public static void main(String args[] ) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int w = Integer.parseInt(br.readLine());\n int n = Integer.parseInt(br.readLine());\n\n int list[] = new int[w];\n\n for (int i = 0; i < w; i++) {\n list[i] = i + 1;\n }\n\n for (int i = 0; i < n; i++) {\n String s = br.readLine();\n int a = (Integer.parseInt(s.split(\",\")[0])-1);\n int b = (Integer.parseInt(s.split(\",\")[1])-1);\n\n int t = list[a];\n list[a] = list[b];\n list[b] = t;\n }\n\n for (int i = 0; i < w; i++) {\n System.out.println(list[i]);\n }\n }\n}",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"public class Main {\n public static void main(String args[] ) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int w = Integer.parseInt(br.readLine());\n int n = Integer.parseInt(br.readLine());\n\n int list[] = new int[w];\n\n for (int i = 0; i < w; i++) {\n list[i] = i + 1;\n }\n\n for (int i = 0; i < n; i++) {\n String s = br.readLine();\n int a = (Integer.parseInt(s.split(\",\")[0])-1);\n int b = (Integer.parseInt(s.split(\",\")[1])-1);\n\n int t = list[a];\n list[a] = list[b];\n list[b] = t;\n }\n\n for (int i = 0; i < w; i++) {\n System.out.println(list[i]);\n }\n }\n}",
"Main",
"public static void main(String args[] ) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int w = Integer.parseInt(br.readLine());\n int n = Integer.parseInt(br.readLine());\n\n int list[] = new int[w];\n\n for (int i = 0; i < w; i++) {\n list[i] = i + 1;\n }\n\n for (int i = 0; i < n; i++) {\n String s = br.readLine();\n int a = (Integer.parseInt(s.split(\",\")[0])-1);\n int b = (Integer.parseInt(s.split(\",\")[1])-1);\n\n int t = list[a];\n list[a] = list[b];\n list[b] = t;\n }\n\n for (int i = 0; i < w; i++) {\n System.out.println(list[i]);\n }\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int w = Integer.parseInt(br.readLine());\n int n = Integer.parseInt(br.readLine());\n\n int list[] = new int[w];\n\n for (int i = 0; i < w; i++) {\n list[i] = i + 1;\n }\n\n for (int i = 0; i < n; i++) {\n String s = br.readLine();\n int a = (Integer.parseInt(s.split(\",\")[0])-1);\n int b = (Integer.parseInt(s.split(\",\")[1])-1);\n\n int t = list[a];\n list[a] = list[b];\n list[b] = t;\n }\n\n for (int i = 0; i < w; i++) {\n System.out.println(list[i]);\n }\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int w = Integer.parseInt(br.readLine());",
"w",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int n = Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int list[] = new int[w];",
"list",
"new int[w]",
"w",
"for (int i = 0; i < w; i++) {\n list[i] = i + 1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n list[i] = i + 1;\n }",
"{\n list[i] = i + 1;\n }",
"list[i] = i + 1",
"list[i]",
"list",
"i",
"i + 1",
"i",
"1",
"for (int i = 0; i < n; i++) {\n String s = br.readLine();\n int a = (Integer.parseInt(s.split(\",\")[0])-1);\n int b = (Integer.parseInt(s.split(\",\")[1])-1);\n\n int t = list[a];\n list[a] = list[b];\n list[b] = t;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String s = br.readLine();\n int a = (Integer.parseInt(s.split(\",\")[0])-1);\n int b = (Integer.parseInt(s.split(\",\")[1])-1);\n\n int t = list[a];\n list[a] = list[b];\n list[b] = t;\n }",
"{\n String s = br.readLine();\n int a = (Integer.parseInt(s.split(\",\")[0])-1);\n int b = (Integer.parseInt(s.split(\",\")[1])-1);\n\n int t = list[a];\n list[a] = list[b];\n list[b] = t;\n }",
"String s = br.readLine();",
"s",
"br.readLine()",
"br.readLine",
"br",
"int a = (Integer.parseInt(s.split(\",\")[0])-1);",
"a",
"(Integer.parseInt(s.split(\",\")[0])-1)",
"Integer.parseInt(s.split(\",\")[0])",
"Integer.parseInt",
"Integer",
"s.split(\",\")[0]",
"s.split(\",\")",
"s.split",
"s",
"\",\"",
"0",
"1",
"int b = (Integer.parseInt(s.split(\",\")[1])-1);",
"b",
"(Integer.parseInt(s.split(\",\")[1])-1)",
"Integer.parseInt(s.split(\",\")[1])",
"Integer.parseInt",
"Integer",
"s.split(\",\")[1]",
"s.split(\",\")",
"s.split",
"s",
"\",\"",
"1",
"1",
"int t = list[a];",
"t",
"list[a]",
"list",
"a",
"list[a] = list[b]",
"list[a]",
"list",
"a",
"list[b]",
"list",
"b",
"list[b] = t",
"list[b]",
"list",
"b",
"t",
"for (int i = 0; i < w; i++) {\n System.out.println(list[i]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n System.out.println(list[i]);\n }",
"{\n System.out.println(list[i]);\n }",
"System.out.println(list[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"list[i]",
"list",
"i",
"String args[]",
"args",
"public class Main {\n public static void main(String args[] ) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int w = Integer.parseInt(br.readLine());\n int n = Integer.parseInt(br.readLine());\n\n int list[] = new int[w];\n\n for (int i = 0; i < w; i++) {\n list[i] = i + 1;\n }\n\n for (int i = 0; i < n; i++) {\n String s = br.readLine();\n int a = (Integer.parseInt(s.split(\",\")[0])-1);\n int b = (Integer.parseInt(s.split(\",\")[1])-1);\n\n int t = list[a];\n list[a] = list[b];\n list[b] = t;\n }\n\n for (int i = 0; i < w; i++) {\n System.out.println(list[i]);\n }\n }\n}",
"public class Main {\n public static void main(String args[] ) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int w = Integer.parseInt(br.readLine());\n int n = Integer.parseInt(br.readLine());\n\n int list[] = new int[w];\n\n for (int i = 0; i < w; i++) {\n list[i] = i + 1;\n }\n\n for (int i = 0; i < n; i++) {\n String s = br.readLine();\n int a = (Integer.parseInt(s.split(\",\")[0])-1);\n int b = (Integer.parseInt(s.split(\",\")[1])-1);\n\n int t = list[a];\n list[a] = list[b];\n list[b] = t;\n }\n\n for (int i = 0; i < w; i++) {\n System.out.println(list[i]);\n }\n }\n}",
"Main"
] | import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.IOException;
public class Main {
public static void main(String args[] ) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int w = Integer.parseInt(br.readLine());
int n = Integer.parseInt(br.readLine());
int list[] = new int[w];
for (int i = 0; i < w; i++) {
list[i] = i + 1;
}
for (int i = 0; i < n; i++) {
String s = br.readLine();
int a = (Integer.parseInt(s.split(",")[0])-1);
int b = (Integer.parseInt(s.split(",")[1])-1);
int t = list[a];
list[a] = list[b];
list[b] = t;
}
for (int i = 0; i < w; i++) {
System.out.println(list[i]);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
41,
13,
41,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
0,
13,
2,
4,
18,
13,
18,
13,
17,
17,
0,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
139,
5
],
[
139,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
33,
35
],
[
26,
36
],
[
36,
37
],
[
37,
38
],
[
26,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
45,
46
],
[
45,
47
],
[
8,
48
],
[
48,
49
],
[
8,
50
],
[
50,
51
],
[
8,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
52,
60
],
[
60,
61
],
[
61,
62
],
[
52,
63
],
[
64,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
64,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
64,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
82,
83
],
[
82,
84
],
[
78,
85
],
[
64,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
92,
93
],
[
92,
94
],
[
88,
95
],
[
64,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
98,
100
],
[
64,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
105,
106
],
[
105,
107
],
[
64,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
8,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
113,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
120,
122
],
[
113,
123
],
[
123,
124
],
[
124,
125
],
[
113,
126
],
[
127,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
128,
133
],
[
133,
134
],
[
133,
135
],
[
6,
136
],
[
136,
137
],
[
0,
138
],
[
138,
139
],
[
138,
140
]
] | [
"import java.util.Scanner;\npublic class Main{\n \n public static void main(String[] args){\n\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] stick = new int[w];\n for(int i = 0; i < stick.length; i++){\n stick[i] = i + 1;\n }\n \n int a, b;\n \n for(int i = 0; i < n; i++){\n String line = sc.next();\n String[] num = line.split(\",\");\n a = Integer.parseInt(num[0])-1;\n b = Integer.parseInt(num[1])-1;\n int tmp = stick[a];\n stick[a] = stick[b];\n stick[b] = tmp;\n }\n\n for(int i = 0; i < stick.length; i++){\n System.out.println(stick[i]);\n }\n \n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n \n public static void main(String[] args){\n\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] stick = new int[w];\n for(int i = 0; i < stick.length; i++){\n stick[i] = i + 1;\n }\n \n int a, b;\n \n for(int i = 0; i < n; i++){\n String line = sc.next();\n String[] num = line.split(\",\");\n a = Integer.parseInt(num[0])-1;\n b = Integer.parseInt(num[1])-1;\n int tmp = stick[a];\n stick[a] = stick[b];\n stick[b] = tmp;\n }\n\n for(int i = 0; i < stick.length; i++){\n System.out.println(stick[i]);\n }\n \n }\n}",
"Main",
"public static void main(String[] args){\n\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] stick = new int[w];\n for(int i = 0; i < stick.length; i++){\n stick[i] = i + 1;\n }\n \n int a, b;\n \n for(int i = 0; i < n; i++){\n String line = sc.next();\n String[] num = line.split(\",\");\n a = Integer.parseInt(num[0])-1;\n b = Integer.parseInt(num[1])-1;\n int tmp = stick[a];\n stick[a] = stick[b];\n stick[b] = tmp;\n }\n\n for(int i = 0; i < stick.length; i++){\n System.out.println(stick[i]);\n }\n \n }",
"main",
"{\n\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] stick = new int[w];\n for(int i = 0; i < stick.length; i++){\n stick[i] = i + 1;\n }\n \n int a, b;\n \n for(int i = 0; i < n; i++){\n String line = sc.next();\n String[] num = line.split(\",\");\n a = Integer.parseInt(num[0])-1;\n b = Integer.parseInt(num[1])-1;\n int tmp = stick[a];\n stick[a] = stick[b];\n stick[b] = tmp;\n }\n\n for(int i = 0; i < stick.length; i++){\n System.out.println(stick[i]);\n }\n \n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] stick = new int[w];",
"stick",
"new int[w]",
"w",
"for(int i = 0; i < stick.length; i++){\n stick[i] = i + 1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < stick.length",
"i",
"stick.length",
"stick",
"stick.length",
"i++",
"i++",
"i",
"{\n stick[i] = i + 1;\n }",
"{\n stick[i] = i + 1;\n }",
"stick[i] = i + 1",
"stick[i]",
"stick",
"i",
"i + 1",
"i",
"1",
"int a",
"a",
"b;",
"b",
"for(int i = 0; i < n; i++){\n String line = sc.next();\n String[] num = line.split(\",\");\n a = Integer.parseInt(num[0])-1;\n b = Integer.parseInt(num[1])-1;\n int tmp = stick[a];\n stick[a] = stick[b];\n stick[b] = tmp;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String line = sc.next();\n String[] num = line.split(\",\");\n a = Integer.parseInt(num[0])-1;\n b = Integer.parseInt(num[1])-1;\n int tmp = stick[a];\n stick[a] = stick[b];\n stick[b] = tmp;\n }",
"{\n String line = sc.next();\n String[] num = line.split(\",\");\n a = Integer.parseInt(num[0])-1;\n b = Integer.parseInt(num[1])-1;\n int tmp = stick[a];\n stick[a] = stick[b];\n stick[b] = tmp;\n }",
"String line = sc.next();",
"line",
"sc.next()",
"sc.next",
"sc",
"String[] num = line.split(\",\");",
"num",
"line.split(\",\")",
"line.split",
"line",
"\",\"",
"a = Integer.parseInt(num[0])-1",
"a",
"Integer.parseInt(num[0])-1",
"Integer.parseInt(num[0])",
"Integer.parseInt",
"Integer",
"num[0]",
"num",
"0",
"1",
"b = Integer.parseInt(num[1])-1",
"b",
"Integer.parseInt(num[1])-1",
"Integer.parseInt(num[1])",
"Integer.parseInt",
"Integer",
"num[1]",
"num",
"1",
"1",
"int tmp = stick[a];",
"tmp",
"stick[a]",
"stick",
"a",
"stick[a] = stick[b]",
"stick[a]",
"stick",
"a",
"stick[b]",
"stick",
"b",
"stick[b] = tmp",
"stick[b]",
"stick",
"b",
"tmp",
"for(int i = 0; i < stick.length; i++){\n System.out.println(stick[i]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < stick.length",
"i",
"stick.length",
"stick",
"stick.length",
"i++",
"i++",
"i",
"{\n System.out.println(stick[i]);\n }",
"{\n System.out.println(stick[i]);\n }",
"System.out.println(stick[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"stick[i]",
"stick",
"i",
"String[] args",
"args",
"public class Main{\n \n public static void main(String[] args){\n\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] stick = new int[w];\n for(int i = 0; i < stick.length; i++){\n stick[i] = i + 1;\n }\n \n int a, b;\n \n for(int i = 0; i < n; i++){\n String line = sc.next();\n String[] num = line.split(\",\");\n a = Integer.parseInt(num[0])-1;\n b = Integer.parseInt(num[1])-1;\n int tmp = stick[a];\n stick[a] = stick[b];\n stick[b] = tmp;\n }\n\n for(int i = 0; i < stick.length; i++){\n System.out.println(stick[i]);\n }\n \n }\n}",
"public class Main{\n \n public static void main(String[] args){\n\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] stick = new int[w];\n for(int i = 0; i < stick.length; i++){\n stick[i] = i + 1;\n }\n \n int a, b;\n \n for(int i = 0; i < n; i++){\n String line = sc.next();\n String[] num = line.split(\",\");\n a = Integer.parseInt(num[0])-1;\n b = Integer.parseInt(num[1])-1;\n int tmp = stick[a];\n stick[a] = stick[b];\n stick[b] = tmp;\n }\n\n for(int i = 0; i < stick.length; i++){\n System.out.println(stick[i]);\n }\n \n }\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int w = sc.nextInt();
int n = sc.nextInt();
int[] stick = new int[w];
for(int i = 0; i < stick.length; i++){
stick[i] = i + 1;
}
int a, b;
for(int i = 0; i < n; i++){
String line = sc.next();
String[] num = line.split(",");
a = Integer.parseInt(num[0])-1;
b = Integer.parseInt(num[1])-1;
int tmp = stick[a];
stick[a] = stick[b];
stick[b] = tmp;
}
for(int i = 0; i < stick.length; i++){
System.out.println(stick[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
2,
17,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
147,
5
],
[
147,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
8,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
8,
34
],
[
34,
35
],
[
8,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
41,
42
],
[
41,
43
],
[
36,
44
],
[
44,
45
],
[
45,
46
],
[
36,
47
],
[
48,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
53,
55
],
[
8,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
56,
64
],
[
64,
65
],
[
65,
66
],
[
56,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
68,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
68,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
85,
86
],
[
85,
87
],
[
68,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
93,
94
],
[
93,
95
],
[
68,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
100,
102
],
[
68,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
106,
108
],
[
103,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
111,
113
],
[
68,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
117,
119
],
[
114,
120
],
[
8,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
121,
126
],
[
126,
127
],
[
126,
128
],
[
121,
129
],
[
129,
130
],
[
130,
131
],
[
121,
132
],
[
133,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
134,
139
],
[
139,
140
],
[
139,
141
],
[
141,
142
],
[
141,
143
],
[
6,
144
],
[
144,
145
],
[
0,
146
],
[
146,
147
],
[
146,
148
]
] | [
"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 w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint lot[] = new int[w];\n\n\t\tString bar;\n\t\tString s[];\n\t\tint a;\n\t\tint b;\n\t\tint save;\n\n\t\tfor (int i = 0; i < w; i++){\n\t\t\tlot[i] = i + 1;\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++){\n\t\t\tbar = sc.next();\n\t\t\ts = bar.split(\",\");\n\t\t\ta = Integer.parseInt(s[0]);\n\t\t\tb = Integer.parseInt(s[1]);\n\n\t\t\tsave = lot[b-1];\n\t\t\tlot[b-1] = lot[a-1];\n\t\t\tlot[a-1] = save;\n\t\t}\n\n\t\tfor (int i = 0; i < w; i++){\n\t\tSystem.out.println(\"\" + lot[i]);\n\t\t}\n\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint lot[] = new int[w];\n\n\t\tString bar;\n\t\tString s[];\n\t\tint a;\n\t\tint b;\n\t\tint save;\n\n\t\tfor (int i = 0; i < w; i++){\n\t\t\tlot[i] = i + 1;\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++){\n\t\t\tbar = sc.next();\n\t\t\ts = bar.split(\",\");\n\t\t\ta = Integer.parseInt(s[0]);\n\t\t\tb = Integer.parseInt(s[1]);\n\n\t\t\tsave = lot[b-1];\n\t\t\tlot[b-1] = lot[a-1];\n\t\t\tlot[a-1] = save;\n\t\t}\n\n\t\tfor (int i = 0; i < w; i++){\n\t\tSystem.out.println(\"\" + lot[i]);\n\t\t}\n\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint lot[] = new int[w];\n\n\t\tString bar;\n\t\tString s[];\n\t\tint a;\n\t\tint b;\n\t\tint save;\n\n\t\tfor (int i = 0; i < w; i++){\n\t\t\tlot[i] = i + 1;\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++){\n\t\t\tbar = sc.next();\n\t\t\ts = bar.split(\",\");\n\t\t\ta = Integer.parseInt(s[0]);\n\t\t\tb = Integer.parseInt(s[1]);\n\n\t\t\tsave = lot[b-1];\n\t\t\tlot[b-1] = lot[a-1];\n\t\t\tlot[a-1] = save;\n\t\t}\n\n\t\tfor (int i = 0; i < w; i++){\n\t\tSystem.out.println(\"\" + lot[i]);\n\t\t}\n\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint lot[] = new int[w];\n\n\t\tString bar;\n\t\tString s[];\n\t\tint a;\n\t\tint b;\n\t\tint save;\n\n\t\tfor (int i = 0; i < w; i++){\n\t\t\tlot[i] = i + 1;\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++){\n\t\t\tbar = sc.next();\n\t\t\ts = bar.split(\",\");\n\t\t\ta = Integer.parseInt(s[0]);\n\t\t\tb = Integer.parseInt(s[1]);\n\n\t\t\tsave = lot[b-1];\n\t\t\tlot[b-1] = lot[a-1];\n\t\t\tlot[a-1] = save;\n\t\t}\n\n\t\tfor (int i = 0; i < w; i++){\n\t\tSystem.out.println(\"\" + lot[i]);\n\t\t}\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int lot[] = new int[w];",
"lot",
"new int[w]",
"w",
"String bar;",
"bar",
"String s[];",
"s",
"int a;",
"a",
"int b;",
"b",
"int save;",
"save",
"for (int i = 0; i < w; i++){\n\t\t\tlot[i] = i + 1;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tlot[i] = i + 1;\n\t\t}",
"{\n\t\t\tlot[i] = i + 1;\n\t\t}",
"lot[i] = i + 1",
"lot[i]",
"lot",
"i",
"i + 1",
"i",
"1",
"for (int i = 0; i < n; i++){\n\t\t\tbar = sc.next();\n\t\t\ts = bar.split(\",\");\n\t\t\ta = Integer.parseInt(s[0]);\n\t\t\tb = Integer.parseInt(s[1]);\n\n\t\t\tsave = lot[b-1];\n\t\t\tlot[b-1] = lot[a-1];\n\t\t\tlot[a-1] = save;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tbar = sc.next();\n\t\t\ts = bar.split(\",\");\n\t\t\ta = Integer.parseInt(s[0]);\n\t\t\tb = Integer.parseInt(s[1]);\n\n\t\t\tsave = lot[b-1];\n\t\t\tlot[b-1] = lot[a-1];\n\t\t\tlot[a-1] = save;\n\t\t}",
"{\n\t\t\tbar = sc.next();\n\t\t\ts = bar.split(\",\");\n\t\t\ta = Integer.parseInt(s[0]);\n\t\t\tb = Integer.parseInt(s[1]);\n\n\t\t\tsave = lot[b-1];\n\t\t\tlot[b-1] = lot[a-1];\n\t\t\tlot[a-1] = save;\n\t\t}",
"bar = sc.next()",
"bar",
"sc.next()",
"sc.next",
"sc",
"s = bar.split(\",\")",
"s",
"bar.split(\",\")",
"bar.split",
"bar",
"\",\"",
"a = Integer.parseInt(s[0])",
"a",
"Integer.parseInt(s[0])",
"Integer.parseInt",
"Integer",
"s[0]",
"s",
"0",
"b = Integer.parseInt(s[1])",
"b",
"Integer.parseInt(s[1])",
"Integer.parseInt",
"Integer",
"s[1]",
"s",
"1",
"save = lot[b-1]",
"save",
"lot[b-1]",
"lot",
"b-1",
"b",
"1",
"lot[b-1] = lot[a-1]",
"lot[b-1]",
"lot",
"b-1",
"b",
"1",
"lot[a-1]",
"lot",
"a-1",
"a",
"1",
"lot[a-1] = save",
"lot[a-1]",
"lot",
"a-1",
"a",
"1",
"save",
"for (int i = 0; i < w; i++){\n\t\tSystem.out.println(\"\" + lot[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\tSystem.out.println(\"\" + lot[i]);\n\t\t}",
"{\n\t\tSystem.out.println(\"\" + lot[i]);\n\t\t}",
"System.out.println(\"\" + lot[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"\"\" + lot[i]",
"\"\"",
"lot[i]",
"lot",
"i",
"String[] args",
"args",
"public class Main{\n\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint lot[] = new int[w];\n\n\t\tString bar;\n\t\tString s[];\n\t\tint a;\n\t\tint b;\n\t\tint save;\n\n\t\tfor (int i = 0; i < w; i++){\n\t\t\tlot[i] = i + 1;\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++){\n\t\t\tbar = sc.next();\n\t\t\ts = bar.split(\",\");\n\t\t\ta = Integer.parseInt(s[0]);\n\t\t\tb = Integer.parseInt(s[1]);\n\n\t\t\tsave = lot[b-1];\n\t\t\tlot[b-1] = lot[a-1];\n\t\t\tlot[a-1] = save;\n\t\t}\n\n\t\tfor (int i = 0; i < w; i++){\n\t\tSystem.out.println(\"\" + lot[i]);\n\t\t}\n\n\t}\n}",
"public class Main{\n\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint lot[] = new int[w];\n\n\t\tString bar;\n\t\tString s[];\n\t\tint a;\n\t\tint b;\n\t\tint save;\n\n\t\tfor (int i = 0; i < w; i++){\n\t\t\tlot[i] = i + 1;\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++){\n\t\t\tbar = sc.next();\n\t\t\ts = bar.split(\",\");\n\t\t\ta = Integer.parseInt(s[0]);\n\t\t\tb = Integer.parseInt(s[1]);\n\n\t\t\tsave = lot[b-1];\n\t\t\tlot[b-1] = lot[a-1];\n\t\t\tlot[a-1] = save;\n\t\t}\n\n\t\tfor (int i = 0; i < w; i++){\n\t\tSystem.out.println(\"\" + lot[i]);\n\t\t}\n\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int w = sc.nextInt();
int n = sc.nextInt();
int lot[] = new int[w];
String bar;
String s[];
int a;
int b;
int save;
for (int i = 0; i < w; i++){
lot[i] = i + 1;
}
for (int i = 0; i < n; i++){
bar = sc.next();
s = bar.split(",");
a = Integer.parseInt(s[0]);
b = Integer.parseInt(s[1]);
save = lot[b-1];
lot[b-1] = lot[a-1];
lot[a-1] = save;
}
for (int i = 0; i < w; i++){
System.out.println("" + lot[i]);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
18,
13,
2,
4,
18,
13,
18,
13,
17,
17,
0,
18,
13,
2,
4,
18,
13,
18,
13,
17,
17,
18,
13,
2,
4,
18,
13,
18,
13,
17,
17,
0,
18,
13,
2,
4,
18,
13,
18,
13,
17,
17,
13,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
24,
29
],
[
29,
30
],
[
29,
31
],
[
24,
32
],
[
32,
33
],
[
33,
34
],
[
24,
35
],
[
36,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
41,
42
],
[
41,
43
],
[
8,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
49,
50
],
[
50,
51
],
[
8,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
52,
60
],
[
60,
61
],
[
61,
62
],
[
52,
63
],
[
64,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
67,
72
],
[
64,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
81,
82
],
[
81,
83
],
[
77,
84
],
[
64,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
92,
93
],
[
92,
94
],
[
88,
95
],
[
85,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
102,
103
],
[
102,
104
],
[
98,
105
],
[
64,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
110,
113
],
[
113,
114
],
[
113,
115
],
[
109,
116
],
[
106,
117
],
[
8,
118
],
[
118,
119
],
[
118,
120
],
[
118,
121
],
[
122,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
123,
128
],
[
6,
129
],
[
129,
130
]
] | [
"import java.io.*;\n\nclass Main{\n\tpublic static void main(String[] argv) throws IOException, NumberFormatException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tint lineNum = Integer.parseInt(br.readLine());\n\t\tint[] lines = new int[lineNum];\n\t\tfor(int i=0; i<lineNum; i++){\n\t\t\tlines[i] = i+1;\n\t\t}\n\t\t\n\t\tint excNum = Integer.parseInt(br.readLine());\n\t\tfor(int i=0; i<excNum; i++){\n\t\t\tString[] e = br.readLine().split(\",\");\n\t\t\tint tmp = lines[Integer.parseInt(e[0])-1];\n\t\t\tlines[Integer.parseInt(e[0])-1] = lines[Integer.parseInt(e[1])-1];\n\t\t\tlines[Integer.parseInt(e[1])-1] = tmp;\n\t\t}\n\t\t\n\t\tfor(int i : lines){\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"class Main{\n\tpublic static void main(String[] argv) throws IOException, NumberFormatException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tint lineNum = Integer.parseInt(br.readLine());\n\t\tint[] lines = new int[lineNum];\n\t\tfor(int i=0; i<lineNum; i++){\n\t\t\tlines[i] = i+1;\n\t\t}\n\t\t\n\t\tint excNum = Integer.parseInt(br.readLine());\n\t\tfor(int i=0; i<excNum; i++){\n\t\t\tString[] e = br.readLine().split(\",\");\n\t\t\tint tmp = lines[Integer.parseInt(e[0])-1];\n\t\t\tlines[Integer.parseInt(e[0])-1] = lines[Integer.parseInt(e[1])-1];\n\t\t\tlines[Integer.parseInt(e[1])-1] = tmp;\n\t\t}\n\t\t\n\t\tfor(int i : lines){\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] argv) throws IOException, NumberFormatException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tint lineNum = Integer.parseInt(br.readLine());\n\t\tint[] lines = new int[lineNum];\n\t\tfor(int i=0; i<lineNum; i++){\n\t\t\tlines[i] = i+1;\n\t\t}\n\t\t\n\t\tint excNum = Integer.parseInt(br.readLine());\n\t\tfor(int i=0; i<excNum; i++){\n\t\t\tString[] e = br.readLine().split(\",\");\n\t\t\tint tmp = lines[Integer.parseInt(e[0])-1];\n\t\t\tlines[Integer.parseInt(e[0])-1] = lines[Integer.parseInt(e[1])-1];\n\t\t\tlines[Integer.parseInt(e[1])-1] = tmp;\n\t\t}\n\t\t\n\t\tfor(int i : lines){\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tint lineNum = Integer.parseInt(br.readLine());\n\t\tint[] lines = new int[lineNum];\n\t\tfor(int i=0; i<lineNum; i++){\n\t\t\tlines[i] = i+1;\n\t\t}\n\t\t\n\t\tint excNum = Integer.parseInt(br.readLine());\n\t\tfor(int i=0; i<excNum; i++){\n\t\t\tString[] e = br.readLine().split(\",\");\n\t\t\tint tmp = lines[Integer.parseInt(e[0])-1];\n\t\t\tlines[Integer.parseInt(e[0])-1] = lines[Integer.parseInt(e[1])-1];\n\t\t\tlines[Integer.parseInt(e[1])-1] = tmp;\n\t\t}\n\t\t\n\t\tfor(int i : lines){\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int lineNum = Integer.parseInt(br.readLine());",
"lineNum",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int[] lines = new int[lineNum];",
"lines",
"new int[lineNum]",
"lineNum",
"for(int i=0; i<lineNum; i++){\n\t\t\tlines[i] = i+1;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<lineNum",
"i",
"lineNum",
"i++",
"i++",
"i",
"{\n\t\t\tlines[i] = i+1;\n\t\t}",
"{\n\t\t\tlines[i] = i+1;\n\t\t}",
"lines[i] = i+1",
"lines[i]",
"lines",
"i",
"i+1",
"i",
"1",
"int excNum = Integer.parseInt(br.readLine());",
"excNum",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"for(int i=0; i<excNum; i++){\n\t\t\tString[] e = br.readLine().split(\",\");\n\t\t\tint tmp = lines[Integer.parseInt(e[0])-1];\n\t\t\tlines[Integer.parseInt(e[0])-1] = lines[Integer.parseInt(e[1])-1];\n\t\t\tlines[Integer.parseInt(e[1])-1] = tmp;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<excNum",
"i",
"excNum",
"i++",
"i++",
"i",
"{\n\t\t\tString[] e = br.readLine().split(\",\");\n\t\t\tint tmp = lines[Integer.parseInt(e[0])-1];\n\t\t\tlines[Integer.parseInt(e[0])-1] = lines[Integer.parseInt(e[1])-1];\n\t\t\tlines[Integer.parseInt(e[1])-1] = tmp;\n\t\t}",
"{\n\t\t\tString[] e = br.readLine().split(\",\");\n\t\t\tint tmp = lines[Integer.parseInt(e[0])-1];\n\t\t\tlines[Integer.parseInt(e[0])-1] = lines[Integer.parseInt(e[1])-1];\n\t\t\tlines[Integer.parseInt(e[1])-1] = tmp;\n\t\t}",
"String[] e = br.readLine().split(\",\");",
"e",
"br.readLine().split(\",\")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\",\"",
"int tmp = lines[Integer.parseInt(e[0])-1];",
"tmp",
"lines[Integer.parseInt(e[0])-1]",
"lines",
"Integer.parseInt(e[0])-1",
"Integer.parseInt(e[0])",
"Integer.parseInt",
"Integer",
"e[0]",
"e",
"0",
"1",
"lines[Integer.parseInt(e[0])-1] = lines[Integer.parseInt(e[1])-1]",
"lines[Integer.parseInt(e[0])-1]",
"lines",
"Integer.parseInt(e[0])-1",
"Integer.parseInt(e[0])",
"Integer.parseInt",
"Integer",
"e[0]",
"e",
"0",
"1",
"lines[Integer.parseInt(e[1])-1]",
"lines",
"Integer.parseInt(e[1])-1",
"Integer.parseInt(e[1])",
"Integer.parseInt",
"Integer",
"e[1]",
"e",
"1",
"1",
"lines[Integer.parseInt(e[1])-1] = tmp",
"lines[Integer.parseInt(e[1])-1]",
"lines",
"Integer.parseInt(e[1])-1",
"Integer.parseInt(e[1])",
"Integer.parseInt",
"Integer",
"e[1]",
"e",
"1",
"1",
"tmp",
"for(int i : lines){\n\t\t\tSystem.out.println(i);\n\t\t}",
"int i",
"lines",
"{\n\t\t\tSystem.out.println(i);\n\t\t}",
"{\n\t\t\tSystem.out.println(i);\n\t\t}",
"System.out.println(i)",
"System.out.println",
"System.out",
"System",
"System.out",
"i",
"String[] argv",
"argv"
] | import java.io.*;
class Main{
public static void main(String[] argv) throws IOException, NumberFormatException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int lineNum = Integer.parseInt(br.readLine());
int[] lines = new int[lineNum];
for(int i=0; i<lineNum; i++){
lines[i] = i+1;
}
int excNum = Integer.parseInt(br.readLine());
for(int i=0; i<excNum; i++){
String[] e = br.readLine().split(",");
int tmp = lines[Integer.parseInt(e[0])-1];
lines[Integer.parseInt(e[0])-1] = lines[Integer.parseInt(e[1])-1];
lines[Integer.parseInt(e[1])-1] = tmp;
}
for(int i : lines){
System.out.println(i);
}
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
0,
18,
36,
13,
13,
23,
13,
23,
13,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
0,
18,
13,
13,
20,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
18,
18,
13,
13,
13,
0,
13,
18,
18,
13,
13,
13,
14,
2,
13,
18,
18,
13,
13,
13,
0,
13,
18,
18,
13,
13,
13,
0,
18,
13,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
4,
8
],
[
8,
9
],
[
4,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
14,
16
],
[
13,
17
],
[
12,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
18,
22
],
[
10,
23
],
[
23,
24
],
[
10,
25
],
[
25,
26
],
[
0,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
31,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
31,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
31,
45
],
[
45,
46
],
[
45,
47
],
[
31,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
54,
55
],
[
54,
56
],
[
49,
57
],
[
57,
58
],
[
58,
59
],
[
49,
60
],
[
61,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
64,
69
],
[
61,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
31,
75
],
[
75,
76
],
[
75,
77
],
[
31,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
84,
85
],
[
84,
86
],
[
79,
87
],
[
87,
88
],
[
88,
89
],
[
79,
90
],
[
91,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
95,
100
],
[
100,
101
],
[
100,
102
],
[
95,
103
],
[
103,
104
],
[
104,
105
],
[
95,
106
],
[
107,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
111,
115
],
[
108,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
118,
122
],
[
108,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
126,
130
],
[
123,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
133,
137
],
[
91,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
138,
142
],
[
142,
143
],
[
142,
144
],
[
31,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
145,
150
],
[
150,
151
],
[
150,
152
],
[
145,
153
],
[
153,
154
],
[
154,
155
],
[
145,
156
],
[
156,
157
],
[
157,
158
],
[
158,
159
],
[
159,
160
],
[
159,
161
],
[
157,
162
],
[
162,
163
],
[
162,
164
],
[
29,
165
],
[
165,
166
]
] | [
"import java.util.*;\n\nclass Pair {\n\tpublic Pair(int f, int s) {\n\t\tthis.f = f;\n\t\tthis.s = s;\n\t}\n\tpublic int f, s;\n}\n\nclass Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint w = scanner.nextInt();\n\t\tint n = scanner.nextInt();\n\t\tPair[] pairs = new Pair[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString[] s = scanner.next().split(\",\");\n\t\t\tpairs[i] = new Pair(Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1);\n\t\t}\n\t\tint[] result = new int[w];\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\tint finger = i;\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tif (finger == pairs[j].f) finger = pairs[j].s;\n\t\t\t\telse if (finger == pairs[j].s) finger = pairs[j].f;\n\t\t\t}\n\t\t\tresult[finger] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < w; i++) System.out.println(result[i]);\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"class Pair {\n\tpublic Pair(int f, int s) {\n\t\tthis.f = f;\n\t\tthis.s = s;\n\t}\n\tpublic int f, s;\n}",
"Pair",
"public int f",
"f",
"s;",
"s",
"public Pair(int f, int s) {\n\t\tthis.f = f;\n\t\tthis.s = s;\n\t}",
"Pair",
"{\n\t\tthis.f = f;\n\t\tthis.s = s;\n\t}",
"this.f = f",
"this.f",
"this",
"this.f",
"f",
"this.s = s",
"this.s",
"this",
"this.s",
"s",
"int f",
"f",
"int s",
"s",
"class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint w = scanner.nextInt();\n\t\tint n = scanner.nextInt();\n\t\tPair[] pairs = new Pair[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString[] s = scanner.next().split(\",\");\n\t\t\tpairs[i] = new Pair(Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1);\n\t\t}\n\t\tint[] result = new int[w];\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\tint finger = i;\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tif (finger == pairs[j].f) finger = pairs[j].s;\n\t\t\t\telse if (finger == pairs[j].s) finger = pairs[j].f;\n\t\t\t}\n\t\t\tresult[finger] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < w; i++) System.out.println(result[i]);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint w = scanner.nextInt();\n\t\tint n = scanner.nextInt();\n\t\tPair[] pairs = new Pair[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString[] s = scanner.next().split(\",\");\n\t\t\tpairs[i] = new Pair(Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1);\n\t\t}\n\t\tint[] result = new int[w];\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\tint finger = i;\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tif (finger == pairs[j].f) finger = pairs[j].s;\n\t\t\t\telse if (finger == pairs[j].s) finger = pairs[j].f;\n\t\t\t}\n\t\t\tresult[finger] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < w; i++) System.out.println(result[i]);\n\t}",
"main",
"{\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint w = scanner.nextInt();\n\t\tint n = scanner.nextInt();\n\t\tPair[] pairs = new Pair[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString[] s = scanner.next().split(\",\");\n\t\t\tpairs[i] = new Pair(Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1);\n\t\t}\n\t\tint[] result = new int[w];\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\tint finger = i;\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tif (finger == pairs[j].f) finger = pairs[j].s;\n\t\t\t\telse if (finger == pairs[j].s) finger = pairs[j].f;\n\t\t\t}\n\t\t\tresult[finger] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < w; i++) System.out.println(result[i]);\n\t}",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int w = scanner.nextInt();",
"w",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int n = scanner.nextInt();",
"n",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"Pair[] pairs = new Pair[n];",
"pairs",
"new Pair[n]",
"n",
"for (int i = 0; i < n; i++) {\n\t\t\tString[] s = scanner.next().split(\",\");\n\t\t\tpairs[i] = new Pair(Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString[] s = scanner.next().split(\",\");\n\t\t\tpairs[i] = new Pair(Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1);\n\t\t}",
"{\n\t\t\tString[] s = scanner.next().split(\",\");\n\t\t\tpairs[i] = new Pair(Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1);\n\t\t}",
"String[] s = scanner.next().split(\",\");",
"s",
"scanner.next().split(\",\")",
"scanner.next().split",
"scanner.next()",
"scanner.next",
"scanner",
"\",\"",
"pairs[i] = new Pair(Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1)",
"pairs[i]",
"pairs",
"i",
"new Pair(Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1)",
"int[] result = new int[w];",
"result",
"new int[w]",
"w",
"for (int i = 0; i < w; i++) {\n\t\t\tint finger = i;\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tif (finger == pairs[j].f) finger = pairs[j].s;\n\t\t\t\telse if (finger == pairs[j].s) finger = pairs[j].f;\n\t\t\t}\n\t\t\tresult[finger] = i + 1;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tint finger = i;\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tif (finger == pairs[j].f) finger = pairs[j].s;\n\t\t\t\telse if (finger == pairs[j].s) finger = pairs[j].f;\n\t\t\t}\n\t\t\tresult[finger] = i + 1;\n\t\t}",
"{\n\t\t\tint finger = i;\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tif (finger == pairs[j].f) finger = pairs[j].s;\n\t\t\t\telse if (finger == pairs[j].s) finger = pairs[j].f;\n\t\t\t}\n\t\t\tresult[finger] = i + 1;\n\t\t}",
"int finger = i;",
"finger",
"i",
"for (int j = 0; j < n; j++) {\n\t\t\t\tif (finger == pairs[j].f) finger = pairs[j].s;\n\t\t\t\telse if (finger == pairs[j].s) finger = pairs[j].f;\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < n",
"j",
"n",
"j++",
"j++",
"j",
"{\n\t\t\t\tif (finger == pairs[j].f) finger = pairs[j].s;\n\t\t\t\telse if (finger == pairs[j].s) finger = pairs[j].f;\n\t\t\t}",
"{\n\t\t\t\tif (finger == pairs[j].f) finger = pairs[j].s;\n\t\t\t\telse if (finger == pairs[j].s) finger = pairs[j].f;\n\t\t\t}",
"if (finger == pairs[j].f) finger = pairs[j].s;\n\t\t\t\telse if (finger == pairs[j].s) finger = pairs[j].f;",
"finger == pairs[j].f",
"finger",
"pairs[j].f",
"pairs[j]",
"pairs",
"j",
"pairs[j].f",
"finger = pairs[j].s",
"finger",
"pairs[j].s",
"pairs[j]",
"pairs",
"j",
"pairs[j].s",
"if (finger == pairs[j].s) finger = pairs[j].f;",
"finger == pairs[j].s",
"finger",
"pairs[j].s",
"pairs[j]",
"pairs",
"j",
"pairs[j].s",
"finger = pairs[j].f",
"finger",
"pairs[j].f",
"pairs[j]",
"pairs",
"j",
"pairs[j].f",
"result[finger] = i + 1",
"result[finger]",
"result",
"finger",
"i + 1",
"i",
"1",
"for (int i = 0; i < w; i++) System.out.println(result[i]);",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"System.out.println(result[i]);",
"System.out.println(result[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"result[i]",
"result",
"i",
"String[] args",
"args"
] | import java.util.*;
class Pair {
public Pair(int f, int s) {
this.f = f;
this.s = s;
}
public int f, s;
}
class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int w = scanner.nextInt();
int n = scanner.nextInt();
Pair[] pairs = new Pair[n];
for (int i = 0; i < n; i++) {
String[] s = scanner.next().split(",");
pairs[i] = new Pair(Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1);
}
int[] result = new int[w];
for (int i = 0; i < w; i++) {
int finger = i;
for (int j = 0; j < n; j++) {
if (finger == pairs[j].f) finger = pairs[j].s;
else if (finger == pairs[j].s) finger = pairs[j].f;
}
result[finger] = i + 1;
}
for (int i = 0; i < w; i++) System.out.println(result[i]);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
20,
4,
13,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
18,
13,
4,
18,
13,
13,
0,
18,
13,
4,
18,
13,
13,
18,
13,
4,
18,
13,
13,
0,
18,
13,
4,
18,
13,
13,
13,
23,
13,
23,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
141,
8
],
[
141,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
28,
29
],
[
28,
30
],
[
11,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
11,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
54,
55
],
[
54,
56
],
[
49,
57
],
[
57,
58
],
[
58,
59
],
[
49,
60
],
[
61,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
61,
67
],
[
67,
68
],
[
67,
69
],
[
61,
70
],
[
70,
71
],
[
70,
72
],
[
70,
73
],
[
73,
74
],
[
74,
75
],
[
70,
76
],
[
76,
77
],
[
77,
78
],
[
11,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
84,
85
],
[
84,
86
],
[
79,
87
],
[
87,
88
],
[
88,
89
],
[
79,
90
],
[
91,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
92,
97
],
[
97,
98
],
[
97,
99
],
[
9,
100
],
[
100,
101
],
[
141,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
110,
111
],
[
109,
112
],
[
104,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
117,
118
],
[
116,
119
],
[
113,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
123,
124
],
[
122,
125
],
[
104,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
130,
131
],
[
129,
132
],
[
126,
133
],
[
102,
134
],
[
134,
135
],
[
102,
136
],
[
136,
137
],
[
102,
138
],
[
138,
139
],
[
0,
140
],
[
140,
141
],
[
140,
142
]
] | [
"import java.util.Scanner;\nimport java.util.StringTokenizer;\n\npublic class Main\n{\n\tpublic static void main(String arg[])\n\t{\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tint ans[]= new int[w+1];\n\t\tfor(int i = 1; i <= w; i++)\n\t\t{\n\t\t\tans [i]= i;\n\t\t}\n\n\t\tfor(int i=0; i < n; i++)\n\t\t{\n\t\t\t\n\t\t\tString str = scan.next();\n\t\t\tStringTokenizer st = new StringTokenizer(str, \",\");\n\t\t\tswap(ans, st.nextToken(),st.nextToken());\n\t\t}\n\n\t\tfor(int i = 1; i <= w; i++)\n\t\t{\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n\t}\n\n\tpublic static void swap(int a[], String b, String c)\n\t{\n\t int tmp = a[Integer.valueOf(b)];\n\t\ta[Integer.valueOf(b)] = a[Integer.valueOf(c)];\n\t\ta[Integer.valueOf(c)] = tmp;\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main\n{\n\tpublic static void main(String arg[])\n\t{\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tint ans[]= new int[w+1];\n\t\tfor(int i = 1; i <= w; i++)\n\t\t{\n\t\t\tans [i]= i;\n\t\t}\n\n\t\tfor(int i=0; i < n; i++)\n\t\t{\n\t\t\t\n\t\t\tString str = scan.next();\n\t\t\tStringTokenizer st = new StringTokenizer(str, \",\");\n\t\t\tswap(ans, st.nextToken(),st.nextToken());\n\t\t}\n\n\t\tfor(int i = 1; i <= w; i++)\n\t\t{\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n\t}\n\n\tpublic static void swap(int a[], String b, String c)\n\t{\n\t int tmp = a[Integer.valueOf(b)];\n\t\ta[Integer.valueOf(b)] = a[Integer.valueOf(c)];\n\t\ta[Integer.valueOf(c)] = tmp;\n\t}\n\n}",
"Main",
"public static void main(String arg[])\n\t{\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tint ans[]= new int[w+1];\n\t\tfor(int i = 1; i <= w; i++)\n\t\t{\n\t\t\tans [i]= i;\n\t\t}\n\n\t\tfor(int i=0; i < n; i++)\n\t\t{\n\t\t\t\n\t\t\tString str = scan.next();\n\t\t\tStringTokenizer st = new StringTokenizer(str, \",\");\n\t\t\tswap(ans, st.nextToken(),st.nextToken());\n\t\t}\n\n\t\tfor(int i = 1; i <= w; i++)\n\t\t{\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tint ans[]= new int[w+1];\n\t\tfor(int i = 1; i <= w; i++)\n\t\t{\n\t\t\tans [i]= i;\n\t\t}\n\n\t\tfor(int i=0; i < n; i++)\n\t\t{\n\t\t\t\n\t\t\tString str = scan.next();\n\t\t\tStringTokenizer st = new StringTokenizer(str, \",\");\n\t\t\tswap(ans, st.nextToken(),st.nextToken());\n\t\t}\n\n\t\tfor(int i = 1; i <= w; i++)\n\t\t{\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int w = scan.nextInt();",
"w",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int ans[]= new int[w+1];",
"ans",
"new int[w+1]",
"w+1",
"w",
"1",
"for(int i = 1; i <= w; i++)\n\t\t{\n\t\t\tans [i]= i;\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tans [i]= i;\n\t\t}",
"{\n\t\t\tans [i]= i;\n\t\t}",
"ans [i]= i",
"ans [i]",
"ans",
"i",
"i",
"for(int i=0; i < n; i++)\n\t\t{\n\t\t\t\n\t\t\tString str = scan.next();\n\t\t\tStringTokenizer st = new StringTokenizer(str, \",\");\n\t\t\tswap(ans, st.nextToken(),st.nextToken());\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\n\t\t\tString str = scan.next();\n\t\t\tStringTokenizer st = new StringTokenizer(str, \",\");\n\t\t\tswap(ans, st.nextToken(),st.nextToken());\n\t\t}",
"{\n\t\t\t\n\t\t\tString str = scan.next();\n\t\t\tStringTokenizer st = new StringTokenizer(str, \",\");\n\t\t\tswap(ans, st.nextToken(),st.nextToken());\n\t\t}",
"String str = scan.next();",
"str",
"scan.next()",
"scan.next",
"scan",
"StringTokenizer st = new StringTokenizer(str, \",\");",
"st",
"new StringTokenizer(str, \",\")",
"swap(ans, st.nextToken(),st.nextToken())",
"swap",
"ans",
"st.nextToken()",
"st.nextToken",
"st",
"st.nextToken()",
"st.nextToken",
"st",
"for(int i = 1; i <= w; i++)\n\t\t{\n\t\t\tSystem.out.println(ans[i]);\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(ans[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(ans[i]);\n\t\t}",
"System.out.println(ans[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"ans[i]",
"ans",
"i",
"String arg[]",
"arg",
"public static void swap(int a[], String b, String c)\n\t{\n\t int tmp = a[Integer.valueOf(b)];\n\t\ta[Integer.valueOf(b)] = a[Integer.valueOf(c)];\n\t\ta[Integer.valueOf(c)] = tmp;\n\t}",
"swap",
"{\n\t int tmp = a[Integer.valueOf(b)];\n\t\ta[Integer.valueOf(b)] = a[Integer.valueOf(c)];\n\t\ta[Integer.valueOf(c)] = tmp;\n\t}",
"int tmp = a[Integer.valueOf(b)];",
"tmp",
"a[Integer.valueOf(b)]",
"a",
"Integer.valueOf(b)",
"Integer.valueOf",
"Integer",
"b",
"a[Integer.valueOf(b)] = a[Integer.valueOf(c)]",
"a[Integer.valueOf(b)]",
"a",
"Integer.valueOf(b)",
"Integer.valueOf",
"Integer",
"b",
"a[Integer.valueOf(c)]",
"a",
"Integer.valueOf(c)",
"Integer.valueOf",
"Integer",
"c",
"a[Integer.valueOf(c)] = tmp",
"a[Integer.valueOf(c)]",
"a",
"Integer.valueOf(c)",
"Integer.valueOf",
"Integer",
"c",
"tmp",
"int a[]",
"a",
"String b",
"b",
"String c",
"c",
"public class Main\n{\n\tpublic static void main(String arg[])\n\t{\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tint ans[]= new int[w+1];\n\t\tfor(int i = 1; i <= w; i++)\n\t\t{\n\t\t\tans [i]= i;\n\t\t}\n\n\t\tfor(int i=0; i < n; i++)\n\t\t{\n\t\t\t\n\t\t\tString str = scan.next();\n\t\t\tStringTokenizer st = new StringTokenizer(str, \",\");\n\t\t\tswap(ans, st.nextToken(),st.nextToken());\n\t\t}\n\n\t\tfor(int i = 1; i <= w; i++)\n\t\t{\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n\t}\n\n\tpublic static void swap(int a[], String b, String c)\n\t{\n\t int tmp = a[Integer.valueOf(b)];\n\t\ta[Integer.valueOf(b)] = a[Integer.valueOf(c)];\n\t\ta[Integer.valueOf(c)] = tmp;\n\t}\n\n}",
"public class Main\n{\n\tpublic static void main(String arg[])\n\t{\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tint ans[]= new int[w+1];\n\t\tfor(int i = 1; i <= w; i++)\n\t\t{\n\t\t\tans [i]= i;\n\t\t}\n\n\t\tfor(int i=0; i < n; i++)\n\t\t{\n\t\t\t\n\t\t\tString str = scan.next();\n\t\t\tStringTokenizer st = new StringTokenizer(str, \",\");\n\t\t\tswap(ans, st.nextToken(),st.nextToken());\n\t\t}\n\n\t\tfor(int i = 1; i <= w; i++)\n\t\t{\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n\t}\n\n\tpublic static void swap(int a[], String b, String c)\n\t{\n\t int tmp = a[Integer.valueOf(b)];\n\t\ta[Integer.valueOf(b)] = a[Integer.valueOf(c)];\n\t\ta[Integer.valueOf(c)] = tmp;\n\t}\n\n}",
"Main"
] | import java.util.Scanner;
import java.util.StringTokenizer;
public class Main
{
public static void main(String arg[])
{
Scanner scan = new Scanner(System.in);
int w = scan.nextInt();
int n = scan.nextInt();
int ans[]= new int[w+1];
for(int i = 1; i <= w; i++)
{
ans [i]= i;
}
for(int i=0; i < n; i++)
{
String str = scan.next();
StringTokenizer st = new StringTokenizer(str, ",");
swap(ans, st.nextToken(),st.nextToken());
}
for(int i = 1; i <= w; i++)
{
System.out.println(ans[i]);
}
}
public static void swap(int a[], String b, String c)
{
int tmp = a[Integer.valueOf(b)];
a[Integer.valueOf(b)] = a[Integer.valueOf(c)];
a[Integer.valueOf(c)] = tmp;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
4,
18,
18,
13,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
13,
4,
18,
13,
18,
13,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
18,
18,
13,
13,
17,
18,
13,
13,
2,
18,
18,
13,
13,
17,
18,
13,
13,
30,
14,
2,
18,
18,
13,
13,
17,
18,
13,
13,
30,
0,
18,
13,
13,
18,
18,
13,
13,
17,
30,
0,
18,
13,
13,
18,
18,
13,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
2,
18,
13,
13,
17,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
225,
5
],
[
225,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
8,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
49,
50
],
[
43,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
53,
59
],
[
43,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
65,
66
],
[
65,
67
],
[
60,
68
],
[
68,
69
],
[
69,
70
],
[
60,
71
],
[
72,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
73,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
82,
83
],
[
82,
84
],
[
8,
85
],
[
85,
86
],
[
85,
87
],
[
8,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
94,
95
],
[
94,
96
],
[
89,
97
],
[
97,
98
],
[
98,
99
],
[
89,
100
],
[
101,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
106,
107
],
[
106,
108
],
[
101,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
109,
114
],
[
114,
115
],
[
114,
116
],
[
109,
117
],
[
117,
118
],
[
118,
119
],
[
109,
120
],
[
121,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
125,
129
],
[
124,
130
],
[
130,
131
],
[
130,
132
],
[
123,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
134,
138
],
[
133,
139
],
[
139,
140
],
[
139,
141
],
[
122,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
145,
149
],
[
144,
150
],
[
150,
151
],
[
150,
152
],
[
143,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
155,
157
],
[
154,
158
],
[
158,
159
],
[
159,
160
],
[
159,
161
],
[
158,
162
],
[
143,
163
],
[
163,
164
],
[
164,
165
],
[
165,
166
],
[
165,
167
],
[
164,
168
],
[
168,
169
],
[
169,
170
],
[
169,
171
],
[
168,
172
],
[
8,
173
],
[
173,
174
],
[
173,
175
],
[
8,
177
],
[
177,
178
],
[
178,
179
],
[
179,
180
],
[
179,
181
],
[
177,
182
],
[
182,
183
],
[
182,
184
],
[
177,
185
],
[
185,
186
],
[
186,
187
],
[
177,
188
],
[
189,
189
],
[
189,
190
],
[
190,
191
],
[
191,
192
],
[
191,
193
],
[
193,
194
],
[
194,
195
],
[
194,
196
],
[
193,
197
],
[
190,
198
],
[
198,
199
],
[
198,
200
],
[
8,
201
],
[
201,
202
],
[
202,
203
],
[
203,
204
],
[
203,
205
],
[
201,
206
],
[
206,
207
],
[
206,
208
],
[
201,
209
],
[
209,
210
],
[
210,
211
],
[
201,
212
],
[
213,
213
],
[
213,
214
],
[
214,
215
],
[
215,
216
],
[
216,
217
],
[
216,
218
],
[
214,
219
],
[
219,
220
],
[
219,
221
],
[
6,
222
],
[
222,
223
],
[
0,
224
],
[
224,
225
],
[
224,
226
]
] | [
"import java.util.Scanner;\n//import java.io.*;\n//import java.util.Arrays;\npublic class Main {\n\tpublic static void main(String[] args) throws java.io.IOException {\n\t\tScanner scan = new Scanner(System.in);\n\t\t//InputStreamReader is = new InputStreamReader(System.in);\n\t\t//BufferedReader br = new BufferedReader(is);\n\t\t//String text = scan.next();\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tString a[] = new String[n];\n\t\tint line[][] = new int[n][2];\n\t\tfor(int i = 0 ; i< n ; i++){\n\t\t\ta[i] = scan.next();\n\t\t\tString mozi[] = a[i].split(\",\", 0);\n\t\t\tfor(int j = 0 ; j < 2 ; j++){\n\t\t\t\tline[i][j] = Integer.parseInt(mozi[j]);\n\t\t\t}\n\t\t}\n\t\tint answer[] = new int[w];\n\t\tfor(int i = 0 ; i < w ; i++){\n\t\t\tanswer[i] = i+1;\n\t\t\tfor(int j = 0 ; j < n ; j++){\n\t\t\t\tif(line[j][0] == answer[i] || line[j][1] == answer[i]){\n\t\t\t\t\tif(line[j][0] == answer[i]){\n\t\t\t\t\t\tanswer[i] = line[j][1];\n\t\t\t\t\t}else{\n\t\t\t\t\t\tanswer[i] = line[j][0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint goal[] = new int[w];\n\t\tfor(int i = 0 ; i < w ; i++){\n\t\t\tgoal[answer[i]-1] = i+1;\n\t\t}\n\t\tfor(int i = 0 ; i < w ; i++){\n\t\t\tSystem.out.println(goal[i]);\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) throws java.io.IOException {\n\t\tScanner scan = new Scanner(System.in);\n\t\t//InputStreamReader is = new InputStreamReader(System.in);\n\t\t//BufferedReader br = new BufferedReader(is);\n\t\t//String text = scan.next();\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tString a[] = new String[n];\n\t\tint line[][] = new int[n][2];\n\t\tfor(int i = 0 ; i< n ; i++){\n\t\t\ta[i] = scan.next();\n\t\t\tString mozi[] = a[i].split(\",\", 0);\n\t\t\tfor(int j = 0 ; j < 2 ; j++){\n\t\t\t\tline[i][j] = Integer.parseInt(mozi[j]);\n\t\t\t}\n\t\t}\n\t\tint answer[] = new int[w];\n\t\tfor(int i = 0 ; i < w ; i++){\n\t\t\tanswer[i] = i+1;\n\t\t\tfor(int j = 0 ; j < n ; j++){\n\t\t\t\tif(line[j][0] == answer[i] || line[j][1] == answer[i]){\n\t\t\t\t\tif(line[j][0] == answer[i]){\n\t\t\t\t\t\tanswer[i] = line[j][1];\n\t\t\t\t\t}else{\n\t\t\t\t\t\tanswer[i] = line[j][0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint goal[] = new int[w];\n\t\tfor(int i = 0 ; i < w ; i++){\n\t\t\tgoal[answer[i]-1] = i+1;\n\t\t}\n\t\tfor(int i = 0 ; i < w ; i++){\n\t\t\tSystem.out.println(goal[i]);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) throws java.io.IOException {\n\t\tScanner scan = new Scanner(System.in);\n\t\t//InputStreamReader is = new InputStreamReader(System.in);\n\t\t//BufferedReader br = new BufferedReader(is);\n\t\t//String text = scan.next();\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tString a[] = new String[n];\n\t\tint line[][] = new int[n][2];\n\t\tfor(int i = 0 ; i< n ; i++){\n\t\t\ta[i] = scan.next();\n\t\t\tString mozi[] = a[i].split(\",\", 0);\n\t\t\tfor(int j = 0 ; j < 2 ; j++){\n\t\t\t\tline[i][j] = Integer.parseInt(mozi[j]);\n\t\t\t}\n\t\t}\n\t\tint answer[] = new int[w];\n\t\tfor(int i = 0 ; i < w ; i++){\n\t\t\tanswer[i] = i+1;\n\t\t\tfor(int j = 0 ; j < n ; j++){\n\t\t\t\tif(line[j][0] == answer[i] || line[j][1] == answer[i]){\n\t\t\t\t\tif(line[j][0] == answer[i]){\n\t\t\t\t\t\tanswer[i] = line[j][1];\n\t\t\t\t\t}else{\n\t\t\t\t\t\tanswer[i] = line[j][0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint goal[] = new int[w];\n\t\tfor(int i = 0 ; i < w ; i++){\n\t\t\tgoal[answer[i]-1] = i+1;\n\t\t}\n\t\tfor(int i = 0 ; i < w ; i++){\n\t\t\tSystem.out.println(goal[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\t//InputStreamReader is = new InputStreamReader(System.in);\n\t\t//BufferedReader br = new BufferedReader(is);\n\t\t//String text = scan.next();\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tString a[] = new String[n];\n\t\tint line[][] = new int[n][2];\n\t\tfor(int i = 0 ; i< n ; i++){\n\t\t\ta[i] = scan.next();\n\t\t\tString mozi[] = a[i].split(\",\", 0);\n\t\t\tfor(int j = 0 ; j < 2 ; j++){\n\t\t\t\tline[i][j] = Integer.parseInt(mozi[j]);\n\t\t\t}\n\t\t}\n\t\tint answer[] = new int[w];\n\t\tfor(int i = 0 ; i < w ; i++){\n\t\t\tanswer[i] = i+1;\n\t\t\tfor(int j = 0 ; j < n ; j++){\n\t\t\t\tif(line[j][0] == answer[i] || line[j][1] == answer[i]){\n\t\t\t\t\tif(line[j][0] == answer[i]){\n\t\t\t\t\t\tanswer[i] = line[j][1];\n\t\t\t\t\t}else{\n\t\t\t\t\t\tanswer[i] = line[j][0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint goal[] = new int[w];\n\t\tfor(int i = 0 ; i < w ; i++){\n\t\t\tgoal[answer[i]-1] = i+1;\n\t\t}\n\t\tfor(int i = 0 ; i < w ; i++){\n\t\t\tSystem.out.println(goal[i]);\n\t\t}\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int w = scan.nextInt();",
"w",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"String a[] = new String[n];",
"a",
"new String[n]",
"n",
"int line[][] = new int[n][2];",
"line",
"new int[n][2]",
"n",
"2",
"for(int i = 0 ; i< n ; i++){\n\t\t\ta[i] = scan.next();\n\t\t\tString mozi[] = a[i].split(\",\", 0);\n\t\t\tfor(int j = 0 ; j < 2 ; j++){\n\t\t\t\tline[i][j] = Integer.parseInt(mozi[j]);\n\t\t\t}\n\t\t}",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i< n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\ta[i] = scan.next();\n\t\t\tString mozi[] = a[i].split(\",\", 0);\n\t\t\tfor(int j = 0 ; j < 2 ; j++){\n\t\t\t\tline[i][j] = Integer.parseInt(mozi[j]);\n\t\t\t}\n\t\t}",
"{\n\t\t\ta[i] = scan.next();\n\t\t\tString mozi[] = a[i].split(\",\", 0);\n\t\t\tfor(int j = 0 ; j < 2 ; j++){\n\t\t\t\tline[i][j] = Integer.parseInt(mozi[j]);\n\t\t\t}\n\t\t}",
"a[i] = scan.next()",
"a[i]",
"a",
"i",
"scan.next()",
"scan.next",
"scan",
"String mozi[] = a[i].split(\",\", 0);",
"mozi",
"a[i].split(\",\", 0)",
"a[i].split",
"a[i]",
"a",
"i",
"\",\"",
"0",
"for(int j = 0 ; j < 2 ; j++){\n\t\t\t\tline[i][j] = Integer.parseInt(mozi[j]);\n\t\t\t}",
"int j = 0 ;",
"int j = 0 ;",
"j",
"0",
"j < 2",
"j",
"2",
"j++",
"j++",
"j",
"{\n\t\t\t\tline[i][j] = Integer.parseInt(mozi[j]);\n\t\t\t}",
"{\n\t\t\t\tline[i][j] = Integer.parseInt(mozi[j]);\n\t\t\t}",
"line[i][j] = Integer.parseInt(mozi[j])",
"line[i][j]",
"line[i]",
"line",
"i",
"j",
"Integer.parseInt(mozi[j])",
"Integer.parseInt",
"Integer",
"mozi[j]",
"mozi",
"j",
"int answer[] = new int[w];",
"answer",
"new int[w]",
"w",
"for(int i = 0 ; i < w ; i++){\n\t\t\tanswer[i] = i+1;\n\t\t\tfor(int j = 0 ; j < n ; j++){\n\t\t\t\tif(line[j][0] == answer[i] || line[j][1] == answer[i]){\n\t\t\t\t\tif(line[j][0] == answer[i]){\n\t\t\t\t\t\tanswer[i] = line[j][1];\n\t\t\t\t\t}else{\n\t\t\t\t\t\tanswer[i] = line[j][0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tanswer[i] = i+1;\n\t\t\tfor(int j = 0 ; j < n ; j++){\n\t\t\t\tif(line[j][0] == answer[i] || line[j][1] == answer[i]){\n\t\t\t\t\tif(line[j][0] == answer[i]){\n\t\t\t\t\t\tanswer[i] = line[j][1];\n\t\t\t\t\t}else{\n\t\t\t\t\t\tanswer[i] = line[j][0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"{\n\t\t\tanswer[i] = i+1;\n\t\t\tfor(int j = 0 ; j < n ; j++){\n\t\t\t\tif(line[j][0] == answer[i] || line[j][1] == answer[i]){\n\t\t\t\t\tif(line[j][0] == answer[i]){\n\t\t\t\t\t\tanswer[i] = line[j][1];\n\t\t\t\t\t}else{\n\t\t\t\t\t\tanswer[i] = line[j][0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"answer[i] = i+1",
"answer[i]",
"answer",
"i",
"i+1",
"i",
"1",
"for(int j = 0 ; j < n ; j++){\n\t\t\t\tif(line[j][0] == answer[i] || line[j][1] == answer[i]){\n\t\t\t\t\tif(line[j][0] == answer[i]){\n\t\t\t\t\t\tanswer[i] = line[j][1];\n\t\t\t\t\t}else{\n\t\t\t\t\t\tanswer[i] = line[j][0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"int j = 0 ;",
"int j = 0 ;",
"j",
"0",
"j < n",
"j",
"n",
"j++",
"j++",
"j",
"{\n\t\t\t\tif(line[j][0] == answer[i] || line[j][1] == answer[i]){\n\t\t\t\t\tif(line[j][0] == answer[i]){\n\t\t\t\t\t\tanswer[i] = line[j][1];\n\t\t\t\t\t}else{\n\t\t\t\t\t\tanswer[i] = line[j][0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(line[j][0] == answer[i] || line[j][1] == answer[i]){\n\t\t\t\t\tif(line[j][0] == answer[i]){\n\t\t\t\t\t\tanswer[i] = line[j][1];\n\t\t\t\t\t}else{\n\t\t\t\t\t\tanswer[i] = line[j][0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"if(line[j][0] == answer[i] || line[j][1] == answer[i]){\n\t\t\t\t\tif(line[j][0] == answer[i]){\n\t\t\t\t\t\tanswer[i] = line[j][1];\n\t\t\t\t\t}else{\n\t\t\t\t\t\tanswer[i] = line[j][0];\n\t\t\t\t\t}\n\t\t\t\t}",
"line[j][0] == answer[i] || line[j][1] == answer[i]",
"line[j][0] == answer[i]",
"line[j][0]",
"line[j]",
"line",
"j",
"0",
"answer[i]",
"answer",
"i",
"line[j][1] == answer[i]",
"line[j][1]",
"line[j]",
"line",
"j",
"1",
"answer[i]",
"answer",
"i",
"{\n\t\t\t\t\tif(line[j][0] == answer[i]){\n\t\t\t\t\t\tanswer[i] = line[j][1];\n\t\t\t\t\t}else{\n\t\t\t\t\t\tanswer[i] = line[j][0];\n\t\t\t\t\t}\n\t\t\t\t}",
"if(line[j][0] == answer[i]){\n\t\t\t\t\t\tanswer[i] = line[j][1];\n\t\t\t\t\t}else{\n\t\t\t\t\t\tanswer[i] = line[j][0];\n\t\t\t\t\t}",
"line[j][0] == answer[i]",
"line[j][0]",
"line[j]",
"line",
"j",
"0",
"answer[i]",
"answer",
"i",
"{\n\t\t\t\t\t\tanswer[i] = line[j][1];\n\t\t\t\t\t}",
"answer[i] = line[j][1]",
"answer[i]",
"answer",
"i",
"line[j][1]",
"line[j]",
"line",
"j",
"1",
"{\n\t\t\t\t\t\tanswer[i] = line[j][0];\n\t\t\t\t\t}",
"answer[i] = line[j][0]",
"answer[i]",
"answer",
"i",
"line[j][0]",
"line[j]",
"line",
"j",
"0",
"int goal[] = new int[w];",
"goal",
"new int[w]",
"w",
"for(int i = 0 ; i < w ; i++){\n\t\t\tgoal[answer[i]-1] = i+1;\n\t\t}",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tgoal[answer[i]-1] = i+1;\n\t\t}",
"{\n\t\t\tgoal[answer[i]-1] = i+1;\n\t\t}",
"goal[answer[i]-1] = i+1",
"goal[answer[i]-1]",
"goal",
"answer[i]-1",
"answer[i]",
"answer",
"i",
"1",
"i+1",
"i",
"1",
"for(int i = 0 ; i < w ; i++){\n\t\t\tSystem.out.println(goal[i]);\n\t\t}",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(goal[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(goal[i]);\n\t\t}",
"System.out.println(goal[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"goal[i]",
"goal",
"i",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) throws java.io.IOException {\n\t\tScanner scan = new Scanner(System.in);\n\t\t//InputStreamReader is = new InputStreamReader(System.in);\n\t\t//BufferedReader br = new BufferedReader(is);\n\t\t//String text = scan.next();\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tString a[] = new String[n];\n\t\tint line[][] = new int[n][2];\n\t\tfor(int i = 0 ; i< n ; i++){\n\t\t\ta[i] = scan.next();\n\t\t\tString mozi[] = a[i].split(\",\", 0);\n\t\t\tfor(int j = 0 ; j < 2 ; j++){\n\t\t\t\tline[i][j] = Integer.parseInt(mozi[j]);\n\t\t\t}\n\t\t}\n\t\tint answer[] = new int[w];\n\t\tfor(int i = 0 ; i < w ; i++){\n\t\t\tanswer[i] = i+1;\n\t\t\tfor(int j = 0 ; j < n ; j++){\n\t\t\t\tif(line[j][0] == answer[i] || line[j][1] == answer[i]){\n\t\t\t\t\tif(line[j][0] == answer[i]){\n\t\t\t\t\t\tanswer[i] = line[j][1];\n\t\t\t\t\t}else{\n\t\t\t\t\t\tanswer[i] = line[j][0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint goal[] = new int[w];\n\t\tfor(int i = 0 ; i < w ; i++){\n\t\t\tgoal[answer[i]-1] = i+1;\n\t\t}\n\t\tfor(int i = 0 ; i < w ; i++){\n\t\t\tSystem.out.println(goal[i]);\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) throws java.io.IOException {\n\t\tScanner scan = new Scanner(System.in);\n\t\t//InputStreamReader is = new InputStreamReader(System.in);\n\t\t//BufferedReader br = new BufferedReader(is);\n\t\t//String text = scan.next();\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tString a[] = new String[n];\n\t\tint line[][] = new int[n][2];\n\t\tfor(int i = 0 ; i< n ; i++){\n\t\t\ta[i] = scan.next();\n\t\t\tString mozi[] = a[i].split(\",\", 0);\n\t\t\tfor(int j = 0 ; j < 2 ; j++){\n\t\t\t\tline[i][j] = Integer.parseInt(mozi[j]);\n\t\t\t}\n\t\t}\n\t\tint answer[] = new int[w];\n\t\tfor(int i = 0 ; i < w ; i++){\n\t\t\tanswer[i] = i+1;\n\t\t\tfor(int j = 0 ; j < n ; j++){\n\t\t\t\tif(line[j][0] == answer[i] || line[j][1] == answer[i]){\n\t\t\t\t\tif(line[j][0] == answer[i]){\n\t\t\t\t\t\tanswer[i] = line[j][1];\n\t\t\t\t\t}else{\n\t\t\t\t\t\tanswer[i] = line[j][0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint goal[] = new int[w];\n\t\tfor(int i = 0 ; i < w ; i++){\n\t\t\tgoal[answer[i]-1] = i+1;\n\t\t}\n\t\tfor(int i = 0 ; i < w ; i++){\n\t\t\tSystem.out.println(goal[i]);\n\t\t}\n\t}\n}",
"Main"
] | import java.util.Scanner;
//import java.io.*;
//import java.util.Arrays;
public class Main {
public static void main(String[] args) throws java.io.IOException {
Scanner scan = new Scanner(System.in);
//InputStreamReader is = new InputStreamReader(System.in);
//BufferedReader br = new BufferedReader(is);
//String text = scan.next();
int w = scan.nextInt();
int n = scan.nextInt();
String a[] = new String[n];
int line[][] = new int[n][2];
for(int i = 0 ; i< n ; i++){
a[i] = scan.next();
String mozi[] = a[i].split(",", 0);
for(int j = 0 ; j < 2 ; j++){
line[i][j] = Integer.parseInt(mozi[j]);
}
}
int answer[] = new int[w];
for(int i = 0 ; i < w ; i++){
answer[i] = i+1;
for(int j = 0 ; j < n ; j++){
if(line[j][0] == answer[i] || line[j][1] == answer[i]){
if(line[j][0] == answer[i]){
answer[i] = line[j][1];
}else{
answer[i] = line[j][0];
}
}
}
}
int goal[] = new int[w];
for(int i = 0 ; i < w ; i++){
goal[answer[i]-1] = i+1;
}
for(int i = 0 ; i < w ; i++){
System.out.println(goal[i]);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
2,
13,
17,
41,
13,
4,
18,
13,
2,
13,
17,
4,
18,
13,
2,
13,
17,
13,
4,
18,
13,
2,
13,
17,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
140,
8
],
[
140,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
11,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
11,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
50,
51
],
[
50,
52
],
[
45,
53
],
[
53,
54
],
[
54,
55
],
[
45,
56
],
[
57,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
60,
65
],
[
57,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
71,
72
],
[
71,
73
],
[
57,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
79,
80
],
[
79,
81
],
[
57,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
87,
88
],
[
87,
89
],
[
57,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
95,
96
],
[
95,
97
],
[
57,
98
],
[
98,
99
],
[
99,
100
],
[
98,
101
],
[
101,
102
],
[
101,
103
],
[
98,
104
],
[
57,
105
],
[
105,
106
],
[
106,
107
],
[
105,
108
],
[
108,
109
],
[
108,
110
],
[
105,
111
],
[
11,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
112,
117
],
[
117,
118
],
[
117,
119
],
[
112,
120
],
[
120,
121
],
[
121,
122
],
[
112,
123
],
[
124,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
128,
129
],
[
127,
130
],
[
124,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
131,
136
],
[
9,
137
],
[
137,
138
],
[
0,
139
],
[
139,
140
],
[
139,
141
]
] | [
"import java.util.Scanner;\nimport java.util.ArrayList;\n\npublic class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner in = new Scanner(System.in);\n\t\tArrayList<Integer> array = new ArrayList<Integer>();\n\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tarray.add(i);\n\t\t}\n\n\t\t//System.out.println(array);\n\t\tfor (int j = 1; j <= n; j++) {\n\t\t\tString[] values = in.next().split(\",\");\n\t\t\tint a = Integer.parseInt(values[0]);\n\t\t\tint b = Integer.parseInt(values[1]);\n\t\t\tint c = array.get(a - 1);\n\t\t\tint d = array.get(b - 1);\n\n\t\t\tarray.set(a - 1, d);\n\t\t\tarray.set(b - 1, c);\n\t\t}\n\n\t\tfor (int k = 0; k < w; k++) {\n\t\t\tint amida = array.get(k);\n\t\t\tSystem.out.println(amida);\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"public class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner in = new Scanner(System.in);\n\t\tArrayList<Integer> array = new ArrayList<Integer>();\n\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tarray.add(i);\n\t\t}\n\n\t\t//System.out.println(array);\n\t\tfor (int j = 1; j <= n; j++) {\n\t\t\tString[] values = in.next().split(\",\");\n\t\t\tint a = Integer.parseInt(values[0]);\n\t\t\tint b = Integer.parseInt(values[1]);\n\t\t\tint c = array.get(a - 1);\n\t\t\tint d = array.get(b - 1);\n\n\t\t\tarray.set(a - 1, d);\n\t\t\tarray.set(b - 1, c);\n\t\t}\n\n\t\tfor (int k = 0; k < w; k++) {\n\t\t\tint amida = array.get(k);\n\t\t\tSystem.out.println(amida);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String args[]) {\n\t\tScanner in = new Scanner(System.in);\n\t\tArrayList<Integer> array = new ArrayList<Integer>();\n\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tarray.add(i);\n\t\t}\n\n\t\t//System.out.println(array);\n\t\tfor (int j = 1; j <= n; j++) {\n\t\t\tString[] values = in.next().split(\",\");\n\t\t\tint a = Integer.parseInt(values[0]);\n\t\t\tint b = Integer.parseInt(values[1]);\n\t\t\tint c = array.get(a - 1);\n\t\t\tint d = array.get(b - 1);\n\n\t\t\tarray.set(a - 1, d);\n\t\t\tarray.set(b - 1, c);\n\t\t}\n\n\t\tfor (int k = 0; k < w; k++) {\n\t\t\tint amida = array.get(k);\n\t\t\tSystem.out.println(amida);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner in = new Scanner(System.in);\n\t\tArrayList<Integer> array = new ArrayList<Integer>();\n\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tarray.add(i);\n\t\t}\n\n\t\t//System.out.println(array);\n\t\tfor (int j = 1; j <= n; j++) {\n\t\t\tString[] values = in.next().split(\",\");\n\t\t\tint a = Integer.parseInt(values[0]);\n\t\t\tint b = Integer.parseInt(values[1]);\n\t\t\tint c = array.get(a - 1);\n\t\t\tint d = array.get(b - 1);\n\n\t\t\tarray.set(a - 1, d);\n\t\t\tarray.set(b - 1, c);\n\t\t}\n\n\t\tfor (int k = 0; k < w; k++) {\n\t\t\tint amida = array.get(k);\n\t\t\tSystem.out.println(amida);\n\t\t}\n\t}",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"ArrayList<Integer> array = new ArrayList<Integer>();",
"array",
"new ArrayList<Integer>()",
"int w = in.nextInt();",
"w",
"in.nextInt()",
"in.nextInt",
"in",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"for (int i = 1; i <= w; i++) {\n\t\t\tarray.add(i);\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tarray.add(i);\n\t\t}",
"{\n\t\t\tarray.add(i);\n\t\t}",
"array.add(i)",
"array.add",
"array",
"i",
"for (int j = 1; j <= n; j++) {\n\t\t\tString[] values = in.next().split(\",\");\n\t\t\tint a = Integer.parseInt(values[0]);\n\t\t\tint b = Integer.parseInt(values[1]);\n\t\t\tint c = array.get(a - 1);\n\t\t\tint d = array.get(b - 1);\n\n\t\t\tarray.set(a - 1, d);\n\t\t\tarray.set(b - 1, c);\n\t\t}",
"int j = 1;",
"int j = 1;",
"j",
"1",
"j <= n",
"j",
"n",
"j++",
"j++",
"j",
"{\n\t\t\tString[] values = in.next().split(\",\");\n\t\t\tint a = Integer.parseInt(values[0]);\n\t\t\tint b = Integer.parseInt(values[1]);\n\t\t\tint c = array.get(a - 1);\n\t\t\tint d = array.get(b - 1);\n\n\t\t\tarray.set(a - 1, d);\n\t\t\tarray.set(b - 1, c);\n\t\t}",
"{\n\t\t\tString[] values = in.next().split(\",\");\n\t\t\tint a = Integer.parseInt(values[0]);\n\t\t\tint b = Integer.parseInt(values[1]);\n\t\t\tint c = array.get(a - 1);\n\t\t\tint d = array.get(b - 1);\n\n\t\t\tarray.set(a - 1, d);\n\t\t\tarray.set(b - 1, c);\n\t\t}",
"String[] values = in.next().split(\",\");",
"values",
"in.next().split(\",\")",
"in.next().split",
"in.next()",
"in.next",
"in",
"\",\"",
"int a = Integer.parseInt(values[0]);",
"a",
"Integer.parseInt(values[0])",
"Integer.parseInt",
"Integer",
"values[0]",
"values",
"0",
"int b = Integer.parseInt(values[1]);",
"b",
"Integer.parseInt(values[1])",
"Integer.parseInt",
"Integer",
"values[1]",
"values",
"1",
"int c = array.get(a - 1);",
"c",
"array.get(a - 1)",
"array.get",
"array",
"a - 1",
"a",
"1",
"int d = array.get(b - 1);",
"d",
"array.get(b - 1)",
"array.get",
"array",
"b - 1",
"b",
"1",
"array.set(a - 1, d)",
"array.set",
"array",
"a - 1",
"a",
"1",
"d",
"array.set(b - 1, c)",
"array.set",
"array",
"b - 1",
"b",
"1",
"c",
"for (int k = 0; k < w; k++) {\n\t\t\tint amida = array.get(k);\n\t\t\tSystem.out.println(amida);\n\t\t}",
"int k = 0;",
"int k = 0;",
"k",
"0",
"k < w",
"k",
"w",
"k++",
"k++",
"k",
"{\n\t\t\tint amida = array.get(k);\n\t\t\tSystem.out.println(amida);\n\t\t}",
"{\n\t\t\tint amida = array.get(k);\n\t\t\tSystem.out.println(amida);\n\t\t}",
"int amida = array.get(k);",
"amida",
"array.get(k)",
"array.get",
"array",
"k",
"System.out.println(amida)",
"System.out.println",
"System.out",
"System",
"System.out",
"amida",
"String args[]",
"args",
"public class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner in = new Scanner(System.in);\n\t\tArrayList<Integer> array = new ArrayList<Integer>();\n\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tarray.add(i);\n\t\t}\n\n\t\t//System.out.println(array);\n\t\tfor (int j = 1; j <= n; j++) {\n\t\t\tString[] values = in.next().split(\",\");\n\t\t\tint a = Integer.parseInt(values[0]);\n\t\t\tint b = Integer.parseInt(values[1]);\n\t\t\tint c = array.get(a - 1);\n\t\t\tint d = array.get(b - 1);\n\n\t\t\tarray.set(a - 1, d);\n\t\t\tarray.set(b - 1, c);\n\t\t}\n\n\t\tfor (int k = 0; k < w; k++) {\n\t\t\tint amida = array.get(k);\n\t\t\tSystem.out.println(amida);\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner in = new Scanner(System.in);\n\t\tArrayList<Integer> array = new ArrayList<Integer>();\n\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tarray.add(i);\n\t\t}\n\n\t\t//System.out.println(array);\n\t\tfor (int j = 1; j <= n; j++) {\n\t\t\tString[] values = in.next().split(\",\");\n\t\t\tint a = Integer.parseInt(values[0]);\n\t\t\tint b = Integer.parseInt(values[1]);\n\t\t\tint c = array.get(a - 1);\n\t\t\tint d = array.get(b - 1);\n\n\t\t\tarray.set(a - 1, d);\n\t\t\tarray.set(b - 1, c);\n\t\t}\n\n\t\tfor (int k = 0; k < w; k++) {\n\t\t\tint amida = array.get(k);\n\t\t\tSystem.out.println(amida);\n\t\t}\n\t}\n}",
"Main"
] | import java.util.Scanner;
import java.util.ArrayList;
public class Main {
public static void main(String args[]) {
Scanner in = new Scanner(System.in);
ArrayList<Integer> array = new ArrayList<Integer>();
int w = in.nextInt();
int n = in.nextInt();
for (int i = 1; i <= w; i++) {
array.add(i);
}
//System.out.println(array);
for (int j = 1; j <= n; j++) {
String[] values = in.next().split(",");
int a = Integer.parseInt(values[0]);
int b = Integer.parseInt(values[1]);
int c = array.get(a - 1);
int d = array.get(b - 1);
array.set(a - 1, d);
array.set(b - 1, c);
}
for (int k = 0; k < w; k++) {
int amida = array.get(k);
System.out.println(amida);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
4,
18,
13,
18,
13,
17,
17,
0,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
0,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
159,
5
],
[
159,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
16,
22
],
[
22,
23
],
[
22,
24
],
[
16,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
43,
45
],
[
16,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
16,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
56,
58
],
[
51,
59
],
[
59,
60
],
[
60,
61
],
[
51,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
63,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
63,
75
],
[
75,
76
],
[
75,
77
],
[
63,
78
],
[
78,
79
],
[
78,
80
],
[
63,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
81,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
88,
90
],
[
81,
91
],
[
91,
92
],
[
92,
93
],
[
81,
94
],
[
95,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
102,
103
],
[
102,
104
],
[
98,
105
],
[
95,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
109,
112
],
[
112,
113
],
[
112,
114
],
[
108,
115
],
[
63,
116
],
[
116,
117
],
[
63,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
120,
122
],
[
63,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
123,
127
],
[
127,
128
],
[
127,
129
],
[
63,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
130,
134
],
[
16,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
135,
140
],
[
140,
141
],
[
140,
142
],
[
135,
143
],
[
143,
144
],
[
144,
145
],
[
135,
146
],
[
147,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
150,
151
],
[
150,
152
],
[
148,
153
],
[
153,
154
],
[
153,
155
],
[
6,
156
],
[
156,
157
],
[
0,
158
],
[
158,
159
],
[
158,
160
]
] | [
"import java.util.Scanner;\npublic class Main {\npublic static void main(String[] args) {\n\tScanner sc=new Scanner(System.in);\n\twhile(sc.hasNext()) {\n\tint b=sc.nextInt();\n\tint []a=new int[b];\n\tfor(int i=0;i<b;i++) {\n\t\ta[i]=i+1;\n\t}\n\tint s=sc.nextInt();\n\tfor(int i=0;i<s;i++) {\n\t\t String str = sc.next();\n\t\t String Str[] = str.split(\",\");\n\t\t int p = 0,q = 0;\n\t\t for(int l =0;l<Str.length;l++) {\n\t\t\t p=Integer.parseInt(Str[0])-1;\n\t\t\t q=Integer.parseInt(Str[1])-1;\n\t\t\t// System.out.println(p);\n\t\t\t // System.out.println(q);\n\t\t }\n\t\t\tint temp;\n\t\t\ttemp=a[p];\n\t\t\ta[p]=a[q];\n\t\t\ta[q]=temp;\n\n\t/*\tfor(int k=0;k<b;k++) {\n\t\t\tSystem.out.println(a[k]);\n\t\t}*/\n\t}\n\tfor(int i=0;i<b;i++) {\n\t\tSystem.out.println(a[i]);\n\t}\n}\n}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\npublic static void main(String[] args) {\n\tScanner sc=new Scanner(System.in);\n\twhile(sc.hasNext()) {\n\tint b=sc.nextInt();\n\tint []a=new int[b];\n\tfor(int i=0;i<b;i++) {\n\t\ta[i]=i+1;\n\t}\n\tint s=sc.nextInt();\n\tfor(int i=0;i<s;i++) {\n\t\t String str = sc.next();\n\t\t String Str[] = str.split(\",\");\n\t\t int p = 0,q = 0;\n\t\t for(int l =0;l<Str.length;l++) {\n\t\t\t p=Integer.parseInt(Str[0])-1;\n\t\t\t q=Integer.parseInt(Str[1])-1;\n\t\t\t// System.out.println(p);\n\t\t\t // System.out.println(q);\n\t\t }\n\t\t\tint temp;\n\t\t\ttemp=a[p];\n\t\t\ta[p]=a[q];\n\t\t\ta[q]=temp;\n\n\t/*\tfor(int k=0;k<b;k++) {\n\t\t\tSystem.out.println(a[k]);\n\t\t}*/\n\t}\n\tfor(int i=0;i<b;i++) {\n\t\tSystem.out.println(a[i]);\n\t}\n}\n}\n}",
"Main",
"public static void main(String[] args) {\n\tScanner sc=new Scanner(System.in);\n\twhile(sc.hasNext()) {\n\tint b=sc.nextInt();\n\tint []a=new int[b];\n\tfor(int i=0;i<b;i++) {\n\t\ta[i]=i+1;\n\t}\n\tint s=sc.nextInt();\n\tfor(int i=0;i<s;i++) {\n\t\t String str = sc.next();\n\t\t String Str[] = str.split(\",\");\n\t\t int p = 0,q = 0;\n\t\t for(int l =0;l<Str.length;l++) {\n\t\t\t p=Integer.parseInt(Str[0])-1;\n\t\t\t q=Integer.parseInt(Str[1])-1;\n\t\t\t// System.out.println(p);\n\t\t\t // System.out.println(q);\n\t\t }\n\t\t\tint temp;\n\t\t\ttemp=a[p];\n\t\t\ta[p]=a[q];\n\t\t\ta[q]=temp;\n\n\t/*\tfor(int k=0;k<b;k++) {\n\t\t\tSystem.out.println(a[k]);\n\t\t}*/\n\t}\n\tfor(int i=0;i<b;i++) {\n\t\tSystem.out.println(a[i]);\n\t}\n}\n}",
"main",
"{\n\tScanner sc=new Scanner(System.in);\n\twhile(sc.hasNext()) {\n\tint b=sc.nextInt();\n\tint []a=new int[b];\n\tfor(int i=0;i<b;i++) {\n\t\ta[i]=i+1;\n\t}\n\tint s=sc.nextInt();\n\tfor(int i=0;i<s;i++) {\n\t\t String str = sc.next();\n\t\t String Str[] = str.split(\",\");\n\t\t int p = 0,q = 0;\n\t\t for(int l =0;l<Str.length;l++) {\n\t\t\t p=Integer.parseInt(Str[0])-1;\n\t\t\t q=Integer.parseInt(Str[1])-1;\n\t\t\t// System.out.println(p);\n\t\t\t // System.out.println(q);\n\t\t }\n\t\t\tint temp;\n\t\t\ttemp=a[p];\n\t\t\ta[p]=a[q];\n\t\t\ta[q]=temp;\n\n\t/*\tfor(int k=0;k<b;k++) {\n\t\t\tSystem.out.println(a[k]);\n\t\t}*/\n\t}\n\tfor(int i=0;i<b;i++) {\n\t\tSystem.out.println(a[i]);\n\t}\n}\n}",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(sc.hasNext()) {\n\tint b=sc.nextInt();\n\tint []a=new int[b];\n\tfor(int i=0;i<b;i++) {\n\t\ta[i]=i+1;\n\t}\n\tint s=sc.nextInt();\n\tfor(int i=0;i<s;i++) {\n\t\t String str = sc.next();\n\t\t String Str[] = str.split(\",\");\n\t\t int p = 0,q = 0;\n\t\t for(int l =0;l<Str.length;l++) {\n\t\t\t p=Integer.parseInt(Str[0])-1;\n\t\t\t q=Integer.parseInt(Str[1])-1;\n\t\t\t// System.out.println(p);\n\t\t\t // System.out.println(q);\n\t\t }\n\t\t\tint temp;\n\t\t\ttemp=a[p];\n\t\t\ta[p]=a[q];\n\t\t\ta[q]=temp;\n\n\t/*\tfor(int k=0;k<b;k++) {\n\t\t\tSystem.out.println(a[k]);\n\t\t}*/\n\t}\n\tfor(int i=0;i<b;i++) {\n\t\tSystem.out.println(a[i]);\n\t}\n}",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n\tint b=sc.nextInt();\n\tint []a=new int[b];\n\tfor(int i=0;i<b;i++) {\n\t\ta[i]=i+1;\n\t}\n\tint s=sc.nextInt();\n\tfor(int i=0;i<s;i++) {\n\t\t String str = sc.next();\n\t\t String Str[] = str.split(\",\");\n\t\t int p = 0,q = 0;\n\t\t for(int l =0;l<Str.length;l++) {\n\t\t\t p=Integer.parseInt(Str[0])-1;\n\t\t\t q=Integer.parseInt(Str[1])-1;\n\t\t\t// System.out.println(p);\n\t\t\t // System.out.println(q);\n\t\t }\n\t\t\tint temp;\n\t\t\ttemp=a[p];\n\t\t\ta[p]=a[q];\n\t\t\ta[q]=temp;\n\n\t/*\tfor(int k=0;k<b;k++) {\n\t\t\tSystem.out.println(a[k]);\n\t\t}*/\n\t}\n\tfor(int i=0;i<b;i++) {\n\t\tSystem.out.println(a[i]);\n\t}\n}",
"int b=sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int []a=new int[b];",
"a",
"new int[b]",
"b",
"for(int i=0;i<b;i++) {\n\t\ta[i]=i+1;\n\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<b",
"i",
"b",
"i++",
"i++",
"i",
"{\n\t\ta[i]=i+1;\n\t}",
"{\n\t\ta[i]=i+1;\n\t}",
"a[i]=i+1",
"a[i]",
"a",
"i",
"i+1",
"i",
"1",
"int s=sc.nextInt();",
"s",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0;i<s;i++) {\n\t\t String str = sc.next();\n\t\t String Str[] = str.split(\",\");\n\t\t int p = 0,q = 0;\n\t\t for(int l =0;l<Str.length;l++) {\n\t\t\t p=Integer.parseInt(Str[0])-1;\n\t\t\t q=Integer.parseInt(Str[1])-1;\n\t\t\t// System.out.println(p);\n\t\t\t // System.out.println(q);\n\t\t }\n\t\t\tint temp;\n\t\t\ttemp=a[p];\n\t\t\ta[p]=a[q];\n\t\t\ta[q]=temp;\n\n\t/*\tfor(int k=0;k<b;k++) {\n\t\t\tSystem.out.println(a[k]);\n\t\t}*/\n\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<s",
"i",
"s",
"i++",
"i++",
"i",
"{\n\t\t String str = sc.next();\n\t\t String Str[] = str.split(\",\");\n\t\t int p = 0,q = 0;\n\t\t for(int l =0;l<Str.length;l++) {\n\t\t\t p=Integer.parseInt(Str[0])-1;\n\t\t\t q=Integer.parseInt(Str[1])-1;\n\t\t\t// System.out.println(p);\n\t\t\t // System.out.println(q);\n\t\t }\n\t\t\tint temp;\n\t\t\ttemp=a[p];\n\t\t\ta[p]=a[q];\n\t\t\ta[q]=temp;\n\n\t/*\tfor(int k=0;k<b;k++) {\n\t\t\tSystem.out.println(a[k]);\n\t\t}*/\n\t}",
"{\n\t\t String str = sc.next();\n\t\t String Str[] = str.split(\",\");\n\t\t int p = 0,q = 0;\n\t\t for(int l =0;l<Str.length;l++) {\n\t\t\t p=Integer.parseInt(Str[0])-1;\n\t\t\t q=Integer.parseInt(Str[1])-1;\n\t\t\t// System.out.println(p);\n\t\t\t // System.out.println(q);\n\t\t }\n\t\t\tint temp;\n\t\t\ttemp=a[p];\n\t\t\ta[p]=a[q];\n\t\t\ta[q]=temp;\n\n\t/*\tfor(int k=0;k<b;k++) {\n\t\t\tSystem.out.println(a[k]);\n\t\t}*/\n\t}",
"String str = sc.next();",
"str",
"sc.next()",
"sc.next",
"sc",
"String Str[] = str.split(\",\");",
"Str",
"str.split(\",\")",
"str.split",
"str",
"\",\"",
"int p = 0",
"p",
"0",
"q = 0;",
"q",
"0",
"for(int l =0;l<Str.length;l++) {\n\t\t\t p=Integer.parseInt(Str[0])-1;\n\t\t\t q=Integer.parseInt(Str[1])-1;\n\t\t\t// System.out.println(p);\n\t\t\t // System.out.println(q);\n\t\t }",
"int l =0;",
"int l =0;",
"l",
"0",
"l<Str.length",
"l",
"Str.length",
"Str",
"Str.length",
"l++",
"l++",
"l",
"{\n\t\t\t p=Integer.parseInt(Str[0])-1;\n\t\t\t q=Integer.parseInt(Str[1])-1;\n\t\t\t// System.out.println(p);\n\t\t\t // System.out.println(q);\n\t\t }",
"{\n\t\t\t p=Integer.parseInt(Str[0])-1;\n\t\t\t q=Integer.parseInt(Str[1])-1;\n\t\t\t// System.out.println(p);\n\t\t\t // System.out.println(q);\n\t\t }",
"p=Integer.parseInt(Str[0])-1",
"p",
"Integer.parseInt(Str[0])-1",
"Integer.parseInt(Str[0])",
"Integer.parseInt",
"Integer",
"Str[0]",
"Str",
"0",
"1",
"q=Integer.parseInt(Str[1])-1",
"q",
"Integer.parseInt(Str[1])-1",
"Integer.parseInt(Str[1])",
"Integer.parseInt",
"Integer",
"Str[1]",
"Str",
"1",
"1",
"int temp;",
"temp",
"temp=a[p]",
"temp",
"a[p]",
"a",
"p",
"a[p]=a[q]",
"a[p]",
"a",
"p",
"a[q]",
"a",
"q",
"a[q]=temp",
"a[q]",
"a",
"q",
"temp",
"for(int i=0;i<b;i++) {\n\t\tSystem.out.println(a[i]);\n\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<b",
"i",
"b",
"i++",
"i++",
"i",
"{\n\t\tSystem.out.println(a[i]);\n\t}",
"{\n\t\tSystem.out.println(a[i]);\n\t}",
"System.out.println(a[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"a[i]",
"a",
"i",
"String[] args",
"args",
"public class Main {\npublic static void main(String[] args) {\n\tScanner sc=new Scanner(System.in);\n\twhile(sc.hasNext()) {\n\tint b=sc.nextInt();\n\tint []a=new int[b];\n\tfor(int i=0;i<b;i++) {\n\t\ta[i]=i+1;\n\t}\n\tint s=sc.nextInt();\n\tfor(int i=0;i<s;i++) {\n\t\t String str = sc.next();\n\t\t String Str[] = str.split(\",\");\n\t\t int p = 0,q = 0;\n\t\t for(int l =0;l<Str.length;l++) {\n\t\t\t p=Integer.parseInt(Str[0])-1;\n\t\t\t q=Integer.parseInt(Str[1])-1;\n\t\t\t// System.out.println(p);\n\t\t\t // System.out.println(q);\n\t\t }\n\t\t\tint temp;\n\t\t\ttemp=a[p];\n\t\t\ta[p]=a[q];\n\t\t\ta[q]=temp;\n\n\t/*\tfor(int k=0;k<b;k++) {\n\t\t\tSystem.out.println(a[k]);\n\t\t}*/\n\t}\n\tfor(int i=0;i<b;i++) {\n\t\tSystem.out.println(a[i]);\n\t}\n}\n}\n}",
"public class Main {\npublic static void main(String[] args) {\n\tScanner sc=new Scanner(System.in);\n\twhile(sc.hasNext()) {\n\tint b=sc.nextInt();\n\tint []a=new int[b];\n\tfor(int i=0;i<b;i++) {\n\t\ta[i]=i+1;\n\t}\n\tint s=sc.nextInt();\n\tfor(int i=0;i<s;i++) {\n\t\t String str = sc.next();\n\t\t String Str[] = str.split(\",\");\n\t\t int p = 0,q = 0;\n\t\t for(int l =0;l<Str.length;l++) {\n\t\t\t p=Integer.parseInt(Str[0])-1;\n\t\t\t q=Integer.parseInt(Str[1])-1;\n\t\t\t// System.out.println(p);\n\t\t\t // System.out.println(q);\n\t\t }\n\t\t\tint temp;\n\t\t\ttemp=a[p];\n\t\t\ta[p]=a[q];\n\t\t\ta[q]=temp;\n\n\t/*\tfor(int k=0;k<b;k++) {\n\t\t\tSystem.out.println(a[k]);\n\t\t}*/\n\t}\n\tfor(int i=0;i<b;i++) {\n\t\tSystem.out.println(a[i]);\n\t}\n}\n}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
while(sc.hasNext()) {
int b=sc.nextInt();
int []a=new int[b];
for(int i=0;i<b;i++) {
a[i]=i+1;
}
int s=sc.nextInt();
for(int i=0;i<s;i++) {
String str = sc.next();
String Str[] = str.split(",");
int p = 0,q = 0;
for(int l =0;l<Str.length;l++) {
p=Integer.parseInt(Str[0])-1;
q=Integer.parseInt(Str[1])-1;
// System.out.println(p);
// System.out.println(q);
}
int temp;
temp=a[p];
a[p]=a[q];
a[q]=temp;
/* for(int k=0;k<b;k++) {
System.out.println(a[k]);
}*/
}
for(int i=0;i<b;i++) {
System.out.println(a[i]);
}
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
41,
13,
41,
13,
2,
17,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
4,
18,
13,
4,
18,
13,
42,
2,
13,
13,
0,
18,
13,
13,
40,
13,
11,
1,
2,
40,
13,
17,
1,
0,
18,
13,
13,
13,
30,
30,
0,
13,
4,
18,
4,
18,
13,
17,
0,
13,
18,
13,
0,
13,
4,
18,
13,
18,
13,
17,
0,
18,
13,
13,
18,
13,
0,
13,
4,
18,
13,
18,
13,
17,
11,
1,
0,
13,
17,
2,
40,
13,
13,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
8,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
23,
26
],
[
26,
27
],
[
27,
28
],
[
8,
29
],
[
29,
30
],
[
29,
31
],
[
8,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
38,
39
],
[
39,
40
],
[
8,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
8,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
51,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
51,
63
],
[
64,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
67,
72
],
[
64,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
82,
83
],
[
82,
84
],
[
64,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
96,
97
],
[
96,
98
],
[
8,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
99,
104
],
[
104,
105
],
[
105,
106
],
[
104,
107
],
[
99,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
109,
114
],
[
114,
115
],
[
114,
116
],
[
6,
117
],
[
117,
118
]
] | [
"import java.io.*;class Main{public static void main(String[]g)throws Exception{BufferedReader B=new BufferedReader(new InputStreamReader(System.in));Integer i=0,o,m,l=1+i.valueOf(B.readLine()),w[]=new Integer[l],n=i.valueOf(B.readLine());while(i<l)w[i]=i++;for(;n-->0;w[m]=i){g=B.readLine().split(\",\");i=w[o=i.valueOf(g[0])];w[o]=w[m=i.valueOf(g[1])];}for(i=0;++i<l;)System.out.println(w[i]);}}",
"import java.io.*;",
"io.*",
"java",
"class Main{public static void main(String[]g)throws Exception{BufferedReader B=new BufferedReader(new InputStreamReader(System.in));Integer i=0,o,m,l=1+i.valueOf(B.readLine()),w[]=new Integer[l],n=i.valueOf(B.readLine());while(i<l)w[i]=i++;for(;n-->0;w[m]=i){g=B.readLine().split(\",\");i=w[o=i.valueOf(g[0])];w[o]=w[m=i.valueOf(g[1])];}for(i=0;++i<l;)System.out.println(w[i]);}}",
"Main",
"public static void main(String[]g)throws Exception{BufferedReader B=new BufferedReader(new InputStreamReader(System.in));Integer i=0,o,m,l=1+i.valueOf(B.readLine()),w[]=new Integer[l],n=i.valueOf(B.readLine());while(i<l)w[i]=i++;for(;n-->0;w[m]=i){g=B.readLine().split(\",\");i=w[o=i.valueOf(g[0])];w[o]=w[m=i.valueOf(g[1])];}for(i=0;++i<l;)System.out.println(w[i]);}",
"main",
"{BufferedReader B=new BufferedReader(new InputStreamReader(System.in));Integer i=0,o,m,l=1+i.valueOf(B.readLine()),w[]=new Integer[l],n=i.valueOf(B.readLine());while(i<l)w[i]=i++;for(;n-->0;w[m]=i){g=B.readLine().split(\",\");i=w[o=i.valueOf(g[0])];w[o]=w[m=i.valueOf(g[1])];}for(i=0;++i<l;)System.out.println(w[i]);}",
"BufferedReader B=new BufferedReader(new InputStreamReader(System.in));",
"B",
"new BufferedReader(new InputStreamReader(System.in))",
"Integer i=0",
"i",
"0",
"o",
"o",
"m",
"m",
"l=1+i.valueOf(B.readLine())",
"l",
"1+i.valueOf(B.readLine())",
"1",
"i.valueOf(B.readLine())",
"i.valueOf",
"i",
"B.readLine()",
"B.readLine",
"B",
"w[]=new Integer[l]",
"w",
"new Integer[l]",
"l",
"n=i.valueOf(B.readLine());",
"n",
"i.valueOf(B.readLine())",
"i.valueOf",
"i",
"B.readLine()",
"B.readLine",
"B",
"while(i<l)w[i]=i++;",
"i<l",
"i",
"l",
"w[i]=i++",
"w[i]",
"w",
"i",
"i++",
"i",
"for(;n-->0;w[m]=i){g=B.readLine().split(\",\");i=w[o=i.valueOf(g[0])];w[o]=w[m=i.valueOf(g[1])];}",
";",
"n-->0",
"n--",
"n",
"0",
"w[m]=i",
"w[m]=i",
"w[m]",
"w",
"m",
"i",
"{g=B.readLine().split(\",\");i=w[o=i.valueOf(g[0])];w[o]=w[m=i.valueOf(g[1])];}",
"{g=B.readLine().split(\",\");i=w[o=i.valueOf(g[0])];w[o]=w[m=i.valueOf(g[1])];}",
"g=B.readLine().split(\",\")",
"g",
"B.readLine().split(\",\")",
"B.readLine().split",
"B.readLine()",
"B.readLine",
"B",
"\",\"",
"i=w[o=i.valueOf(g[0])]",
"i",
"w[o=i.valueOf(g[0])]",
"w",
"o=i.valueOf(g[0])",
"o",
"i.valueOf(g[0])",
"i.valueOf",
"i",
"g[0]",
"g",
"0",
"w[o]=w[m=i.valueOf(g[1])]",
"w[o]",
"w",
"o",
"w[m=i.valueOf(g[1])]",
"w",
"m=i.valueOf(g[1])",
"m",
"i.valueOf(g[1])",
"i.valueOf",
"i",
"g[1]",
"g",
"1",
"for(i=0;++i<l;)System.out.println(w[i]);",
"i=0;",
"i=0",
"i",
"0",
"++i<l",
"++i",
"i",
"l",
"System.out.println(w[i]);",
"System.out.println(w[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"w[i]",
"w",
"i",
"String[]g",
"g"
] | import java.io.*;class Main{public static void main(String[]g)throws Exception{BufferedReader B=new BufferedReader(new InputStreamReader(System.in));Integer i=0,o,m,l=1+i.valueOf(B.readLine()),w[]=new Integer[l],n=i.valueOf(B.readLine());while(i<l)w[i]=i++;for(;n-->0;w[m]=i){g=B.readLine().split(",");i=w[o=i.valueOf(g[0])];w[o]=w[m=i.valueOf(g[1])];}for(i=0;++i<l;)System.out.println(w[i]);}}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
12,
13,
30,
4,
13,
4,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
4,
18,
4,
18,
13,
13,
30,
0,
13,
4,
18,
4,
18,
13,
13,
14,
2,
13,
4,
18,
4,
18,
13,
13,
30,
0,
13,
4,
18,
4,
18,
13,
13,
0,
18,
13,
2,
13,
17,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
4,
18,
13,
20,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
0,
18,
36,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
13,
12,
13,
30,
29,
13,
12,
13,
30,
0,
18,
36,
13,
13,
23,
13,
12,
13,
30,
0,
18,
36,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
222,
8
],
[
222,
9
],
[
9,
10
],
[
9,
11
],
[
222,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
18,
19
],
[
222,
20
],
[
20,
21
],
[
20,
22
],
[
222,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
26,
29
],
[
29,
30
],
[
30,
31
],
[
222,
32
],
[
32,
33
],
[
32,
34
],
[
222,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
37,
40
],
[
40,
41
],
[
35,
42
],
[
42,
43
],
[
222,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
52,
53
],
[
52,
54
],
[
47,
55
],
[
55,
56
],
[
56,
57
],
[
47,
58
],
[
59,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
68,
69
],
[
68,
70
],
[
63,
71
],
[
71,
72
],
[
72,
73
],
[
63,
74
],
[
75,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
76,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
76,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
94,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
108,
111
],
[
59,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
115,
117
],
[
112,
118
],
[
46,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
119,
124
],
[
124,
125
],
[
124,
126
],
[
119,
127
],
[
127,
128
],
[
128,
129
],
[
119,
130
],
[
131,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
132,
137
],
[
137,
138
],
[
137,
139
],
[
222,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
143,
148
],
[
148,
149
],
[
148,
150
],
[
143,
151
],
[
151,
152
],
[
152,
153
],
[
143,
154
],
[
155,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
158,
163
],
[
155,
164
],
[
164,
165
],
[
165,
166
],
[
164,
167
],
[
0,
168
],
[
168,
169
],
[
168,
170
],
[
170,
171
],
[
168,
172
],
[
172,
173
],
[
168,
174
],
[
174,
175
],
[
174,
176
],
[
176,
177
],
[
177,
178
],
[
178,
179
],
[
178,
180
],
[
177,
181
],
[
176,
182
],
[
182,
183
],
[
183,
184
],
[
183,
185
],
[
182,
186
],
[
174,
187
],
[
187,
188
],
[
174,
189
],
[
189,
190
],
[
168,
191
],
[
191,
192
],
[
191,
193
],
[
193,
194
],
[
194,
195
],
[
168,
196
],
[
196,
197
],
[
196,
198
],
[
198,
199
],
[
199,
200
],
[
168,
201
],
[
201,
202
],
[
201,
203
],
[
203,
204
],
[
204,
205
],
[
205,
206
],
[
205,
207
],
[
204,
208
],
[
201,
209
],
[
209,
210
],
[
168,
211
],
[
211,
212
],
[
211,
213
],
[
213,
214
],
[
214,
215
],
[
215,
216
],
[
215,
217
],
[
214,
218
],
[
211,
219
],
[
219,
220
],
[
0,
221
],
[
221,
222
],
[
221,
223
]
] | [
"import java.util.ArrayList;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tstatic Scanner sc = new Scanner(System.in);\n\tstatic int w = Integer.parseInt(sc.nextLine());\n\tstatic int[] res = new int[w];\n\tstatic int n = Integer.parseInt(sc.nextLine());\n\tstatic ArrayList<HorizLine> hL = new ArrayList<HorizLine>();\n\n\tpublic static void main(String[] args) {\n\t\tsetHorizLine();\n\t\tdrawLot();\n\t}\n\n\tprivate static void drawLot() {\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tint p = i;\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\t\tif (p == hL.get(j).getPointL() ) {\n\t\t\t\t\t\tp = hL.get(j).getPointR();\n\t\t\t\t\t} else if (p == hL.get(j).getPointR()) {\n\t\t\t\t\t\tp = hL.get(j).getPointL();\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\tres[p - 1] = i;\n\t\t}\n\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\tSystem.out.println(res[i]);\n\t\t}\n\n\t}\n\n\tprivate static void setHorizLine() {\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString[] pt = sc.nextLine().split(\",\");\n\t\t\thL.add(new HorizLine( Integer.parseInt(pt[0]), Integer.parseInt(pt[1]) ));\n\t\t}\n\n\t}\n\n\n\n}\n\n class HorizLine {\n\tprivate int pointL;\n\tprivate int pointR;\n\n\tHorizLine(int pointL, int pointR) {\n\t\tthis.pointL = pointL;\n\t\tthis.pointR = pointR;\n\t}\n\n\tpublic int getPointL() {\n\t\treturn pointL;\n\t}\n\tpublic int getPointR() {\n\t\treturn pointR;\n\t}\n\tpublic void setPointL(int pointL) {\n\t\tthis.pointL = pointL;\n\t}\n\tpublic void setPointR(int pointR) {\n\t\tthis.pointR = pointR;\n\t}\n\n\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tstatic Scanner sc = new Scanner(System.in);\n\tstatic int w = Integer.parseInt(sc.nextLine());\n\tstatic int[] res = new int[w];\n\tstatic int n = Integer.parseInt(sc.nextLine());\n\tstatic ArrayList<HorizLine> hL = new ArrayList<HorizLine>();\n\n\tpublic static void main(String[] args) {\n\t\tsetHorizLine();\n\t\tdrawLot();\n\t}\n\n\tprivate static void drawLot() {\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tint p = i;\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\t\tif (p == hL.get(j).getPointL() ) {\n\t\t\t\t\t\tp = hL.get(j).getPointR();\n\t\t\t\t\t} else if (p == hL.get(j).getPointR()) {\n\t\t\t\t\t\tp = hL.get(j).getPointL();\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\tres[p - 1] = i;\n\t\t}\n\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\tSystem.out.println(res[i]);\n\t\t}\n\n\t}\n\n\tprivate static void setHorizLine() {\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString[] pt = sc.nextLine().split(\",\");\n\t\t\thL.add(new HorizLine( Integer.parseInt(pt[0]), Integer.parseInt(pt[1]) ));\n\t\t}\n\n\t}\n\n\n\n}",
"Main",
"static Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"static int w = Integer.parseInt(sc.nextLine());",
"w",
"Integer.parseInt(sc.nextLine())",
"Integer.parseInt",
"Integer",
"sc.nextLine()",
"sc.nextLine",
"sc",
"static int[] res = new int[w];",
"res",
"new int[w]",
"w",
"static int n = Integer.parseInt(sc.nextLine());",
"n",
"Integer.parseInt(sc.nextLine())",
"Integer.parseInt",
"Integer",
"sc.nextLine()",
"sc.nextLine",
"sc",
"static ArrayList<HorizLine> hL = new ArrayList<HorizLine>();",
"hL",
"new ArrayList<HorizLine>()",
"public static void main(String[] args) {\n\t\tsetHorizLine();\n\t\tdrawLot();\n\t}",
"main",
"{\n\t\tsetHorizLine();\n\t\tdrawLot();\n\t}",
"setHorizLine()",
"setHorizLine",
"drawLot()",
"drawLot",
"String[] args",
"args",
"private static void drawLot() {\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tint p = i;\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\t\tif (p == hL.get(j).getPointL() ) {\n\t\t\t\t\t\tp = hL.get(j).getPointR();\n\t\t\t\t\t} else if (p == hL.get(j).getPointR()) {\n\t\t\t\t\t\tp = hL.get(j).getPointL();\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\tres[p - 1] = i;\n\t\t}\n\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\tSystem.out.println(res[i]);\n\t\t}\n\n\t}",
"drawLot",
"{\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tint p = i;\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\t\tif (p == hL.get(j).getPointL() ) {\n\t\t\t\t\t\tp = hL.get(j).getPointR();\n\t\t\t\t\t} else if (p == hL.get(j).getPointR()) {\n\t\t\t\t\t\tp = hL.get(j).getPointL();\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\tres[p - 1] = i;\n\t\t}\n\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\tSystem.out.println(res[i]);\n\t\t}\n\n\t}",
"for (int i = 1; i <= w; i++) {\n\t\t\tint p = i;\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\t\tif (p == hL.get(j).getPointL() ) {\n\t\t\t\t\t\tp = hL.get(j).getPointR();\n\t\t\t\t\t} else if (p == hL.get(j).getPointR()) {\n\t\t\t\t\t\tp = hL.get(j).getPointL();\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\tres[p - 1] = i;\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tint p = i;\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\t\tif (p == hL.get(j).getPointL() ) {\n\t\t\t\t\t\tp = hL.get(j).getPointR();\n\t\t\t\t\t} else if (p == hL.get(j).getPointR()) {\n\t\t\t\t\t\tp = hL.get(j).getPointL();\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\tres[p - 1] = i;\n\t\t}",
"{\n\t\t\tint p = i;\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\t\tif (p == hL.get(j).getPointL() ) {\n\t\t\t\t\t\tp = hL.get(j).getPointR();\n\t\t\t\t\t} else if (p == hL.get(j).getPointR()) {\n\t\t\t\t\t\tp = hL.get(j).getPointL();\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\tres[p - 1] = i;\n\t\t}",
"int p = i;",
"p",
"i",
"for (int j = 0; j < n; j++) {\n\t\t\t\t\tif (p == hL.get(j).getPointL() ) {\n\t\t\t\t\t\tp = hL.get(j).getPointR();\n\t\t\t\t\t} else if (p == hL.get(j).getPointR()) {\n\t\t\t\t\t\tp = hL.get(j).getPointL();\n\t\t\t\t\t}\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < n",
"j",
"n",
"j++",
"j++",
"j",
"{\n\t\t\t\t\tif (p == hL.get(j).getPointL() ) {\n\t\t\t\t\t\tp = hL.get(j).getPointR();\n\t\t\t\t\t} else if (p == hL.get(j).getPointR()) {\n\t\t\t\t\t\tp = hL.get(j).getPointL();\n\t\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\t\tif (p == hL.get(j).getPointL() ) {\n\t\t\t\t\t\tp = hL.get(j).getPointR();\n\t\t\t\t\t} else if (p == hL.get(j).getPointR()) {\n\t\t\t\t\t\tp = hL.get(j).getPointL();\n\t\t\t\t\t}\n\t\t\t}",
"if (p == hL.get(j).getPointL() ) {\n\t\t\t\t\t\tp = hL.get(j).getPointR();\n\t\t\t\t\t} else if (p == hL.get(j).getPointR()) {\n\t\t\t\t\t\tp = hL.get(j).getPointL();\n\t\t\t\t\t}",
"p == hL.get(j).getPointL()",
"p",
"hL.get(j).getPointL()",
"hL.get(j).getPointL",
"hL.get(j)",
"hL.get",
"hL",
"j",
"{\n\t\t\t\t\t\tp = hL.get(j).getPointR();\n\t\t\t\t\t}",
"p = hL.get(j).getPointR()",
"p",
"hL.get(j).getPointR()",
"hL.get(j).getPointR",
"hL.get(j)",
"hL.get",
"hL",
"j",
"if (p == hL.get(j).getPointR()) {\n\t\t\t\t\t\tp = hL.get(j).getPointL();\n\t\t\t\t\t}",
"p == hL.get(j).getPointR()",
"p",
"hL.get(j).getPointR()",
"hL.get(j).getPointR",
"hL.get(j)",
"hL.get",
"hL",
"j",
"{\n\t\t\t\t\t\tp = hL.get(j).getPointL();\n\t\t\t\t\t}",
"p = hL.get(j).getPointL()",
"p",
"hL.get(j).getPointL()",
"hL.get(j).getPointL",
"hL.get(j)",
"hL.get",
"hL",
"j",
"res[p - 1] = i",
"res[p - 1]",
"res",
"p - 1",
"p",
"1",
"i",
"for (int i = 0; i < w; i++) {\n\t\t\tSystem.out.println(res[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(res[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(res[i]);\n\t\t}",
"System.out.println(res[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"res[i]",
"res",
"i",
"private static void setHorizLine() {\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString[] pt = sc.nextLine().split(\",\");\n\t\t\thL.add(new HorizLine( Integer.parseInt(pt[0]), Integer.parseInt(pt[1]) ));\n\t\t}\n\n\t}",
"setHorizLine",
"{\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString[] pt = sc.nextLine().split(\",\");\n\t\t\thL.add(new HorizLine( Integer.parseInt(pt[0]), Integer.parseInt(pt[1]) ));\n\t\t}\n\n\t}",
"for (int i = 0; i < n; i++) {\n\t\t\tString[] pt = sc.nextLine().split(\",\");\n\t\t\thL.add(new HorizLine( Integer.parseInt(pt[0]), Integer.parseInt(pt[1]) ));\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString[] pt = sc.nextLine().split(\",\");\n\t\t\thL.add(new HorizLine( Integer.parseInt(pt[0]), Integer.parseInt(pt[1]) ));\n\t\t}",
"{\n\t\t\tString[] pt = sc.nextLine().split(\",\");\n\t\t\thL.add(new HorizLine( Integer.parseInt(pt[0]), Integer.parseInt(pt[1]) ));\n\t\t}",
"String[] pt = sc.nextLine().split(\",\");",
"pt",
"sc.nextLine().split(\",\")",
"sc.nextLine().split",
"sc.nextLine()",
"sc.nextLine",
"sc",
"\",\"",
"hL.add(new HorizLine( Integer.parseInt(pt[0]), Integer.parseInt(pt[1]) ))",
"hL.add",
"hL",
"new HorizLine( Integer.parseInt(pt[0]), Integer.parseInt(pt[1]) )",
"class HorizLine {\n\tprivate int pointL;\n\tprivate int pointR;\n\n\tHorizLine(int pointL, int pointR) {\n\t\tthis.pointL = pointL;\n\t\tthis.pointR = pointR;\n\t}\n\n\tpublic int getPointL() {\n\t\treturn pointL;\n\t}\n\tpublic int getPointR() {\n\t\treturn pointR;\n\t}\n\tpublic void setPointL(int pointL) {\n\t\tthis.pointL = pointL;\n\t}\n\tpublic void setPointR(int pointR) {\n\t\tthis.pointR = pointR;\n\t}\n\n\n}",
"HorizLine",
"private int pointL;",
"pointL",
"private int pointR;",
"pointR",
"HorizLine(int pointL, int pointR) {\n\t\tthis.pointL = pointL;\n\t\tthis.pointR = pointR;\n\t}",
"HorizLine",
"{\n\t\tthis.pointL = pointL;\n\t\tthis.pointR = pointR;\n\t}",
"this.pointL = pointL",
"this.pointL",
"this",
"this.pointL",
"pointL",
"this.pointR = pointR",
"this.pointR",
"this",
"this.pointR",
"pointR",
"int pointL",
"pointL",
"int pointR",
"pointR",
"public int getPointL() {\n\t\treturn pointL;\n\t}",
"getPointL",
"{\n\t\treturn pointL;\n\t}",
"return pointL;",
"pointL",
"public int getPointR() {\n\t\treturn pointR;\n\t}",
"getPointR",
"{\n\t\treturn pointR;\n\t}",
"return pointR;",
"pointR",
"public void setPointL(int pointL) {\n\t\tthis.pointL = pointL;\n\t}",
"setPointL",
"{\n\t\tthis.pointL = pointL;\n\t}",
"this.pointL = pointL",
"this.pointL",
"this",
"this.pointL",
"pointL",
"int pointL",
"pointL",
"public void setPointR(int pointR) {\n\t\tthis.pointR = pointR;\n\t}",
"setPointR",
"{\n\t\tthis.pointR = pointR;\n\t}",
"this.pointR = pointR",
"this.pointR",
"this",
"this.pointR",
"pointR",
"int pointR",
"pointR",
"public class Main {\n\n\tstatic Scanner sc = new Scanner(System.in);\n\tstatic int w = Integer.parseInt(sc.nextLine());\n\tstatic int[] res = new int[w];\n\tstatic int n = Integer.parseInt(sc.nextLine());\n\tstatic ArrayList<HorizLine> hL = new ArrayList<HorizLine>();\n\n\tpublic static void main(String[] args) {\n\t\tsetHorizLine();\n\t\tdrawLot();\n\t}\n\n\tprivate static void drawLot() {\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tint p = i;\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\t\tif (p == hL.get(j).getPointL() ) {\n\t\t\t\t\t\tp = hL.get(j).getPointR();\n\t\t\t\t\t} else if (p == hL.get(j).getPointR()) {\n\t\t\t\t\t\tp = hL.get(j).getPointL();\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\tres[p - 1] = i;\n\t\t}\n\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\tSystem.out.println(res[i]);\n\t\t}\n\n\t}\n\n\tprivate static void setHorizLine() {\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString[] pt = sc.nextLine().split(\",\");\n\t\t\thL.add(new HorizLine( Integer.parseInt(pt[0]), Integer.parseInt(pt[1]) ));\n\t\t}\n\n\t}\n\n\n\n}",
"public class Main {\n\n\tstatic Scanner sc = new Scanner(System.in);\n\tstatic int w = Integer.parseInt(sc.nextLine());\n\tstatic int[] res = new int[w];\n\tstatic int n = Integer.parseInt(sc.nextLine());\n\tstatic ArrayList<HorizLine> hL = new ArrayList<HorizLine>();\n\n\tpublic static void main(String[] args) {\n\t\tsetHorizLine();\n\t\tdrawLot();\n\t}\n\n\tprivate static void drawLot() {\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tint p = i;\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\t\tif (p == hL.get(j).getPointL() ) {\n\t\t\t\t\t\tp = hL.get(j).getPointR();\n\t\t\t\t\t} else if (p == hL.get(j).getPointR()) {\n\t\t\t\t\t\tp = hL.get(j).getPointL();\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\tres[p - 1] = i;\n\t\t}\n\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\tSystem.out.println(res[i]);\n\t\t}\n\n\t}\n\n\tprivate static void setHorizLine() {\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString[] pt = sc.nextLine().split(\",\");\n\t\t\thL.add(new HorizLine( Integer.parseInt(pt[0]), Integer.parseInt(pt[1]) ));\n\t\t}\n\n\t}\n\n\n\n}",
"Main"
] | import java.util.ArrayList;
import java.util.Scanner;
public class Main {
static Scanner sc = new Scanner(System.in);
static int w = Integer.parseInt(sc.nextLine());
static int[] res = new int[w];
static int n = Integer.parseInt(sc.nextLine());
static ArrayList<HorizLine> hL = new ArrayList<HorizLine>();
public static void main(String[] args) {
setHorizLine();
drawLot();
}
private static void drawLot() {
for (int i = 1; i <= w; i++) {
int p = i;
for (int j = 0; j < n; j++) {
if (p == hL.get(j).getPointL() ) {
p = hL.get(j).getPointR();
} else if (p == hL.get(j).getPointR()) {
p = hL.get(j).getPointL();
}
}
res[p - 1] = i;
}
for (int i = 0; i < w; i++) {
System.out.println(res[i]);
}
}
private static void setHorizLine() {
for (int i = 0; i < n; i++) {
String[] pt = sc.nextLine().split(",");
hL.add(new HorizLine( Integer.parseInt(pt[0]), Integer.parseInt(pt[1]) ));
}
}
}
class HorizLine {
private int pointL;
private int pointR;
HorizLine(int pointL, int pointR) {
this.pointL = pointL;
this.pointR = pointR;
}
public int getPointL() {
return pointL;
}
public int getPointR() {
return pointR;
}
public void setPointL(int pointL) {
this.pointL = pointL;
}
public void setPointR(int pointR) {
this.pointR = pointR;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
4,
18,
13,
0,
13,
20,
2,
13,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
2,
13,
17,
2,
13,
17,
41,
13,
4,
18,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
0,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
18,
18,
13,
13,
18,
13,
2,
13,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
135,
5
],
[
135,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
26,
27
],
[
26,
28
],
[
8,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
44,
46
],
[
41,
47
],
[
47,
48
],
[
47,
49
],
[
8,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
8,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
60,
61
],
[
60,
62
],
[
55,
63
],
[
63,
64
],
[
64,
65
],
[
55,
66
],
[
67,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
70,
75
],
[
70,
76
],
[
67,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
82,
83
],
[
82,
84
],
[
67,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
90,
91
],
[
90,
92
],
[
67,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
95,
97
],
[
67,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
102,
103
],
[
102,
104
],
[
67,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
105,
109
],
[
8,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
110,
115
],
[
115,
116
],
[
115,
117
],
[
110,
118
],
[
118,
119
],
[
119,
120
],
[
110,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
122,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
129,
131
],
[
6,
132
],
[
132,
133
],
[
0,
134
],
[
134,
135
],
[
134,
136
]
] | [
"import java.util.Scanner;\npublic class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint ary[], t, i;\n\t\tint w = sc.nextInt();\n\t\tary = new int[w + 1];\n\t\tfor(i = 0; i < w; i++)\n\t\t\tary[i + 1] = i + 1;\n\t\tint n = sc.nextInt();\n\t\tfor(i = 0; i < n; i++){\n\t\t\tString[] s = sc.next().split(\",\", 0);\n\t\t\tint a = Integer.parseInt(s[0]);\n\t\t\tint b = Integer.parseInt(s[1]);\n\t\t\tt = ary[a];\n\t\t\tary[a] = ary[b];\n\t\t\tary[b] = t;\n\t\t}\n\t\tfor(i = 0; i < w; i++)\n\t\t\tSystem.out.println(ary[i + 1]);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint ary[], t, i;\n\t\tint w = sc.nextInt();\n\t\tary = new int[w + 1];\n\t\tfor(i = 0; i < w; i++)\n\t\t\tary[i + 1] = i + 1;\n\t\tint n = sc.nextInt();\n\t\tfor(i = 0; i < n; i++){\n\t\t\tString[] s = sc.next().split(\",\", 0);\n\t\t\tint a = Integer.parseInt(s[0]);\n\t\t\tint b = Integer.parseInt(s[1]);\n\t\t\tt = ary[a];\n\t\t\tary[a] = ary[b];\n\t\t\tary[b] = t;\n\t\t}\n\t\tfor(i = 0; i < w; i++)\n\t\t\tSystem.out.println(ary[i + 1]);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint ary[], t, i;\n\t\tint w = sc.nextInt();\n\t\tary = new int[w + 1];\n\t\tfor(i = 0; i < w; i++)\n\t\t\tary[i + 1] = i + 1;\n\t\tint n = sc.nextInt();\n\t\tfor(i = 0; i < n; i++){\n\t\t\tString[] s = sc.next().split(\",\", 0);\n\t\t\tint a = Integer.parseInt(s[0]);\n\t\t\tint b = Integer.parseInt(s[1]);\n\t\t\tt = ary[a];\n\t\t\tary[a] = ary[b];\n\t\t\tary[b] = t;\n\t\t}\n\t\tfor(i = 0; i < w; i++)\n\t\t\tSystem.out.println(ary[i + 1]);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint ary[], t, i;\n\t\tint w = sc.nextInt();\n\t\tary = new int[w + 1];\n\t\tfor(i = 0; i < w; i++)\n\t\t\tary[i + 1] = i + 1;\n\t\tint n = sc.nextInt();\n\t\tfor(i = 0; i < n; i++){\n\t\t\tString[] s = sc.next().split(\",\", 0);\n\t\t\tint a = Integer.parseInt(s[0]);\n\t\t\tint b = Integer.parseInt(s[1]);\n\t\t\tt = ary[a];\n\t\t\tary[a] = ary[b];\n\t\t\tary[b] = t;\n\t\t}\n\t\tfor(i = 0; i < w; i++)\n\t\t\tSystem.out.println(ary[i + 1]);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int ary[]",
"ary",
"t",
"t",
"i;",
"i",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"ary = new int[w + 1]",
"ary",
"new int[w + 1]",
"w + 1",
"w",
"1",
"for(i = 0; i < w; i++)\n\t\t\tary[i + 1] = i + 1;",
"i = 0;",
"i = 0",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"ary[i + 1] = i + 1;",
"ary[i + 1] = i + 1",
"ary[i + 1]",
"ary",
"i + 1",
"i",
"1",
"i + 1",
"i",
"1",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(i = 0; i < n; i++){\n\t\t\tString[] s = sc.next().split(\",\", 0);\n\t\t\tint a = Integer.parseInt(s[0]);\n\t\t\tint b = Integer.parseInt(s[1]);\n\t\t\tt = ary[a];\n\t\t\tary[a] = ary[b];\n\t\t\tary[b] = t;\n\t\t}",
"i = 0;",
"i = 0",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString[] s = sc.next().split(\",\", 0);\n\t\t\tint a = Integer.parseInt(s[0]);\n\t\t\tint b = Integer.parseInt(s[1]);\n\t\t\tt = ary[a];\n\t\t\tary[a] = ary[b];\n\t\t\tary[b] = t;\n\t\t}",
"{\n\t\t\tString[] s = sc.next().split(\",\", 0);\n\t\t\tint a = Integer.parseInt(s[0]);\n\t\t\tint b = Integer.parseInt(s[1]);\n\t\t\tt = ary[a];\n\t\t\tary[a] = ary[b];\n\t\t\tary[b] = t;\n\t\t}",
"String[] s = sc.next().split(\",\", 0);",
"s",
"sc.next().split(\",\", 0)",
"sc.next().split",
"sc.next()",
"sc.next",
"sc",
"\",\"",
"0",
"int a = Integer.parseInt(s[0]);",
"a",
"Integer.parseInt(s[0])",
"Integer.parseInt",
"Integer",
"s[0]",
"s",
"0",
"int b = Integer.parseInt(s[1]);",
"b",
"Integer.parseInt(s[1])",
"Integer.parseInt",
"Integer",
"s[1]",
"s",
"1",
"t = ary[a]",
"t",
"ary[a]",
"ary",
"a",
"ary[a] = ary[b]",
"ary[a]",
"ary",
"a",
"ary[b]",
"ary",
"b",
"ary[b] = t",
"ary[b]",
"ary",
"b",
"t",
"for(i = 0; i < w; i++)\n\t\t\tSystem.out.println(ary[i + 1]);",
"i = 0;",
"i = 0",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"System.out.println(ary[i + 1]);",
"System.out.println(ary[i + 1])",
"System.out.println",
"System.out",
"System",
"System.out",
"ary[i + 1]",
"ary",
"i + 1",
"i",
"1",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint ary[], t, i;\n\t\tint w = sc.nextInt();\n\t\tary = new int[w + 1];\n\t\tfor(i = 0; i < w; i++)\n\t\t\tary[i + 1] = i + 1;\n\t\tint n = sc.nextInt();\n\t\tfor(i = 0; i < n; i++){\n\t\t\tString[] s = sc.next().split(\",\", 0);\n\t\t\tint a = Integer.parseInt(s[0]);\n\t\t\tint b = Integer.parseInt(s[1]);\n\t\t\tt = ary[a];\n\t\t\tary[a] = ary[b];\n\t\t\tary[b] = t;\n\t\t}\n\t\tfor(i = 0; i < w; i++)\n\t\t\tSystem.out.println(ary[i + 1]);\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint ary[], t, i;\n\t\tint w = sc.nextInt();\n\t\tary = new int[w + 1];\n\t\tfor(i = 0; i < w; i++)\n\t\t\tary[i + 1] = i + 1;\n\t\tint n = sc.nextInt();\n\t\tfor(i = 0; i < n; i++){\n\t\t\tString[] s = sc.next().split(\",\", 0);\n\t\t\tint a = Integer.parseInt(s[0]);\n\t\t\tint b = Integer.parseInt(s[1]);\n\t\t\tt = ary[a];\n\t\t\tary[a] = ary[b];\n\t\t\tary[b] = t;\n\t\t}\n\t\tfor(i = 0; i < w; i++)\n\t\t\tSystem.out.println(ary[i + 1]);\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int ary[], t, i;
int w = sc.nextInt();
ary = new int[w + 1];
for(i = 0; i < w; i++)
ary[i + 1] = i + 1;
int n = sc.nextInt();
for(i = 0; i < n; i++){
String[] s = sc.next().split(",", 0);
int a = Integer.parseInt(s[0]);
int b = Integer.parseInt(s[1]);
t = ary[a];
ary[a] = ary[b];
ary[b] = t;
}
for(i = 0; i < w; i++)
System.out.println(ary[i + 1]);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
121,
5
],
[
121,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
8,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
46,
48
],
[
8,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
54,
55
],
[
54,
56
],
[
49,
57
],
[
57,
58
],
[
58,
59
],
[
49,
60
],
[
61,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
64,
69
],
[
61,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
76,
77
],
[
76,
78
],
[
72,
79
],
[
61,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
86,
87
],
[
86,
88
],
[
82,
89
],
[
61,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
92,
94
],
[
61,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
99,
101
],
[
61,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
8,
107
],
[
107,
108
],
[
107,
109
],
[
107,
110
],
[
111,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
112,
117
],
[
6,
118
],
[
118,
119
],
[
0,
120
],
[
120,
121
],
[
120,
122
]
] | [
"import java.util.*;\n\npublic class Main{\n public static void main(String[] args){\n Scanner in = new Scanner(System.in);\n int w = in.nextInt();\n int n = in.nextInt(); in.nextLine();\n int[] a = new int[w];\n for(int i = 0; i < w; i++){\n a[i] = i + 1;\n }\n for(int i = 0; i < n; i++){\n String[] line = in.nextLine().split(\",\");\n int s = Integer.parseInt(line[0]) - 1;\n int t = Integer.parseInt(line[1]) - 1;\n int tmp = a[s]; a[s] = a[t]; a[t] = tmp;\n }\n\n for(int i: a){\n System.out.println(i);\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n public static void main(String[] args){\n Scanner in = new Scanner(System.in);\n int w = in.nextInt();\n int n = in.nextInt(); in.nextLine();\n int[] a = new int[w];\n for(int i = 0; i < w; i++){\n a[i] = i + 1;\n }\n for(int i = 0; i < n; i++){\n String[] line = in.nextLine().split(\",\");\n int s = Integer.parseInt(line[0]) - 1;\n int t = Integer.parseInt(line[1]) - 1;\n int tmp = a[s]; a[s] = a[t]; a[t] = tmp;\n }\n\n for(int i: a){\n System.out.println(i);\n }\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner in = new Scanner(System.in);\n int w = in.nextInt();\n int n = in.nextInt(); in.nextLine();\n int[] a = new int[w];\n for(int i = 0; i < w; i++){\n a[i] = i + 1;\n }\n for(int i = 0; i < n; i++){\n String[] line = in.nextLine().split(\",\");\n int s = Integer.parseInt(line[0]) - 1;\n int t = Integer.parseInt(line[1]) - 1;\n int tmp = a[s]; a[s] = a[t]; a[t] = tmp;\n }\n\n for(int i: a){\n System.out.println(i);\n }\n }",
"main",
"{\n Scanner in = new Scanner(System.in);\n int w = in.nextInt();\n int n = in.nextInt(); in.nextLine();\n int[] a = new int[w];\n for(int i = 0; i < w; i++){\n a[i] = i + 1;\n }\n for(int i = 0; i < n; i++){\n String[] line = in.nextLine().split(\",\");\n int s = Integer.parseInt(line[0]) - 1;\n int t = Integer.parseInt(line[1]) - 1;\n int tmp = a[s]; a[s] = a[t]; a[t] = tmp;\n }\n\n for(int i: a){\n System.out.println(i);\n }\n }",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"int w = in.nextInt();",
"w",
"in.nextInt()",
"in.nextInt",
"in",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"in.nextLine()",
"in.nextLine",
"in",
"int[] a = new int[w];",
"a",
"new int[w]",
"w",
"for(int i = 0; i < w; i++){\n a[i] = i + 1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n a[i] = i + 1;\n }",
"{\n a[i] = i + 1;\n }",
"a[i] = i + 1",
"a[i]",
"a",
"i",
"i + 1",
"i",
"1",
"for(int i = 0; i < n; i++){\n String[] line = in.nextLine().split(\",\");\n int s = Integer.parseInt(line[0]) - 1;\n int t = Integer.parseInt(line[1]) - 1;\n int tmp = a[s]; a[s] = a[t]; a[t] = tmp;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String[] line = in.nextLine().split(\",\");\n int s = Integer.parseInt(line[0]) - 1;\n int t = Integer.parseInt(line[1]) - 1;\n int tmp = a[s]; a[s] = a[t]; a[t] = tmp;\n }",
"{\n String[] line = in.nextLine().split(\",\");\n int s = Integer.parseInt(line[0]) - 1;\n int t = Integer.parseInt(line[1]) - 1;\n int tmp = a[s]; a[s] = a[t]; a[t] = tmp;\n }",
"String[] line = in.nextLine().split(\",\");",
"line",
"in.nextLine().split(\",\")",
"in.nextLine().split",
"in.nextLine()",
"in.nextLine",
"in",
"\",\"",
"int s = Integer.parseInt(line[0]) - 1;",
"s",
"Integer.parseInt(line[0]) - 1",
"Integer.parseInt(line[0])",
"Integer.parseInt",
"Integer",
"line[0]",
"line",
"0",
"1",
"int t = Integer.parseInt(line[1]) - 1;",
"t",
"Integer.parseInt(line[1]) - 1",
"Integer.parseInt(line[1])",
"Integer.parseInt",
"Integer",
"line[1]",
"line",
"1",
"1",
"int tmp = a[s];",
"tmp",
"a[s]",
"a",
"s",
"a[s] = a[t]",
"a[s]",
"a",
"s",
"a[t]",
"a",
"t",
"a[t] = tmp",
"a[t]",
"a",
"t",
"tmp",
"for(int i: a){\n System.out.println(i);\n }",
"int i",
"a",
"{\n System.out.println(i);\n }",
"{\n System.out.println(i);\n }",
"System.out.println(i)",
"System.out.println",
"System.out",
"System",
"System.out",
"i",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner in = new Scanner(System.in);\n int w = in.nextInt();\n int n = in.nextInt(); in.nextLine();\n int[] a = new int[w];\n for(int i = 0; i < w; i++){\n a[i] = i + 1;\n }\n for(int i = 0; i < n; i++){\n String[] line = in.nextLine().split(\",\");\n int s = Integer.parseInt(line[0]) - 1;\n int t = Integer.parseInt(line[1]) - 1;\n int tmp = a[s]; a[s] = a[t]; a[t] = tmp;\n }\n\n for(int i: a){\n System.out.println(i);\n }\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner in = new Scanner(System.in);\n int w = in.nextInt();\n int n = in.nextInt(); in.nextLine();\n int[] a = new int[w];\n for(int i = 0; i < w; i++){\n a[i] = i + 1;\n }\n for(int i = 0; i < n; i++){\n String[] line = in.nextLine().split(\",\");\n int s = Integer.parseInt(line[0]) - 1;\n int t = Integer.parseInt(line[1]) - 1;\n int tmp = a[s]; a[s] = a[t]; a[t] = tmp;\n }\n\n for(int i: a){\n System.out.println(i);\n }\n }\n}",
"Main"
] | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int w = in.nextInt();
int n = in.nextInt(); in.nextLine();
int[] a = new int[w];
for(int i = 0; i < w; i++){
a[i] = i + 1;
}
for(int i = 0; i < n; i++){
String[] line = in.nextLine().split(",");
int s = Integer.parseInt(line[0]) - 1;
int t = Integer.parseInt(line[1]) - 1;
int tmp = a[s]; a[s] = a[t]; a[t] = tmp;
}
for(int i: a){
System.out.println(i);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
0,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
19,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
32,
33
],
[
32,
34
],
[
27,
35
],
[
35,
36
],
[
36,
37
],
[
27,
38
],
[
39,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
44,
45
],
[
44,
46
],
[
8,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
8,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
8,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
63,
64
],
[
63,
65
],
[
58,
66
],
[
66,
67
],
[
67,
68
],
[
58,
69
],
[
70,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
70,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
70,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
88,
89
],
[
88,
90
],
[
84,
91
],
[
70,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
98,
99
],
[
98,
100
],
[
94,
101
],
[
70,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
104,
106
],
[
70,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
107,
111
],
[
111,
112
],
[
111,
113
],
[
70,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
8,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
119,
124
],
[
124,
125
],
[
124,
126
],
[
119,
127
],
[
127,
128
],
[
128,
129
],
[
119,
130
],
[
131,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
132,
137
],
[
137,
138
],
[
137,
139
],
[
6,
140
],
[
140,
141
]
] | [
"import java.io.*;\nclass Main {\n public static void main(String... args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String s = br.readLine();\n int w = Integer.parseInt(s);\n int[] nums = new int[w];\n for(int i = 0; i < w; i++) {\n nums[i] = i+1;\n }\n s = br.readLine();\n int n = Integer.parseInt(s);\n for(int i = 0; i < n; i++) {\n s = br.readLine();\n String[] arr = s.split(\",\");\n int a = Integer.parseInt(arr[0])-1;\n int b = Integer.parseInt(arr[1])-1;\n int temp = nums[a];\n nums[a] = nums[b];\n nums[b] = temp;\n }\n for(int i = 0; i < w; i++) {\n System.out.println(nums[i]);\n }\n }\n}",
"import java.io.*;",
"io.*",
"java",
"class Main {\n public static void main(String... args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String s = br.readLine();\n int w = Integer.parseInt(s);\n int[] nums = new int[w];\n for(int i = 0; i < w; i++) {\n nums[i] = i+1;\n }\n s = br.readLine();\n int n = Integer.parseInt(s);\n for(int i = 0; i < n; i++) {\n s = br.readLine();\n String[] arr = s.split(\",\");\n int a = Integer.parseInt(arr[0])-1;\n int b = Integer.parseInt(arr[1])-1;\n int temp = nums[a];\n nums[a] = nums[b];\n nums[b] = temp;\n }\n for(int i = 0; i < w; i++) {\n System.out.println(nums[i]);\n }\n }\n}",
"Main",
"public static void main(String... args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String s = br.readLine();\n int w = Integer.parseInt(s);\n int[] nums = new int[w];\n for(int i = 0; i < w; i++) {\n nums[i] = i+1;\n }\n s = br.readLine();\n int n = Integer.parseInt(s);\n for(int i = 0; i < n; i++) {\n s = br.readLine();\n String[] arr = s.split(\",\");\n int a = Integer.parseInt(arr[0])-1;\n int b = Integer.parseInt(arr[1])-1;\n int temp = nums[a];\n nums[a] = nums[b];\n nums[b] = temp;\n }\n for(int i = 0; i < w; i++) {\n System.out.println(nums[i]);\n }\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String s = br.readLine();\n int w = Integer.parseInt(s);\n int[] nums = new int[w];\n for(int i = 0; i < w; i++) {\n nums[i] = i+1;\n }\n s = br.readLine();\n int n = Integer.parseInt(s);\n for(int i = 0; i < n; i++) {\n s = br.readLine();\n String[] arr = s.split(\",\");\n int a = Integer.parseInt(arr[0])-1;\n int b = Integer.parseInt(arr[1])-1;\n int temp = nums[a];\n nums[a] = nums[b];\n nums[b] = temp;\n }\n for(int i = 0; i < w; i++) {\n System.out.println(nums[i]);\n }\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String s = br.readLine();",
"s",
"br.readLine()",
"br.readLine",
"br",
"int w = Integer.parseInt(s);",
"w",
"Integer.parseInt(s)",
"Integer.parseInt",
"Integer",
"s",
"int[] nums = new int[w];",
"nums",
"new int[w]",
"w",
"for(int i = 0; i < w; i++) {\n nums[i] = i+1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n nums[i] = i+1;\n }",
"{\n nums[i] = i+1;\n }",
"nums[i] = i+1",
"nums[i]",
"nums",
"i",
"i+1",
"i",
"1",
"s = br.readLine()",
"s",
"br.readLine()",
"br.readLine",
"br",
"int n = Integer.parseInt(s);",
"n",
"Integer.parseInt(s)",
"Integer.parseInt",
"Integer",
"s",
"for(int i = 0; i < n; i++) {\n s = br.readLine();\n String[] arr = s.split(\",\");\n int a = Integer.parseInt(arr[0])-1;\n int b = Integer.parseInt(arr[1])-1;\n int temp = nums[a];\n nums[a] = nums[b];\n nums[b] = temp;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n s = br.readLine();\n String[] arr = s.split(\",\");\n int a = Integer.parseInt(arr[0])-1;\n int b = Integer.parseInt(arr[1])-1;\n int temp = nums[a];\n nums[a] = nums[b];\n nums[b] = temp;\n }",
"{\n s = br.readLine();\n String[] arr = s.split(\",\");\n int a = Integer.parseInt(arr[0])-1;\n int b = Integer.parseInt(arr[1])-1;\n int temp = nums[a];\n nums[a] = nums[b];\n nums[b] = temp;\n }",
"s = br.readLine()",
"s",
"br.readLine()",
"br.readLine",
"br",
"String[] arr = s.split(\",\");",
"arr",
"s.split(\",\")",
"s.split",
"s",
"\",\"",
"int a = Integer.parseInt(arr[0])-1;",
"a",
"Integer.parseInt(arr[0])-1",
"Integer.parseInt(arr[0])",
"Integer.parseInt",
"Integer",
"arr[0]",
"arr",
"0",
"1",
"int b = Integer.parseInt(arr[1])-1;",
"b",
"Integer.parseInt(arr[1])-1",
"Integer.parseInt(arr[1])",
"Integer.parseInt",
"Integer",
"arr[1]",
"arr",
"1",
"1",
"int temp = nums[a];",
"temp",
"nums[a]",
"nums",
"a",
"nums[a] = nums[b]",
"nums[a]",
"nums",
"a",
"nums[b]",
"nums",
"b",
"nums[b] = temp",
"nums[b]",
"nums",
"b",
"temp",
"for(int i = 0; i < w; i++) {\n System.out.println(nums[i]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n System.out.println(nums[i]);\n }",
"{\n System.out.println(nums[i]);\n }",
"System.out.println(nums[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"nums[i]",
"nums",
"i",
"String... args",
"args"
] | import java.io.*;
class Main {
public static void main(String... args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s = br.readLine();
int w = Integer.parseInt(s);
int[] nums = new int[w];
for(int i = 0; i < w; i++) {
nums[i] = i+1;
}
s = br.readLine();
int n = Integer.parseInt(s);
for(int i = 0; i < n; i++) {
s = br.readLine();
String[] arr = s.split(",");
int a = Integer.parseInt(arr[0])-1;
int b = Integer.parseInt(arr[1])-1;
int temp = nums[a];
nums[a] = nums[b];
nums[b] = temp;
}
for(int i = 0; i < w; i++) {
System.out.println(nums[i]);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
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,
2,
13,
17,
41,
13,
4,
18,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
0,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
139,
5
],
[
139,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
25,
33
],
[
33,
34
],
[
34,
35
],
[
25,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
42,
44
],
[
8,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
8,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
50,
55
],
[
55,
56
],
[
55,
57
],
[
50,
58
],
[
58,
59
],
[
59,
60
],
[
50,
61
],
[
62,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
62,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
70,
74
],
[
62,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
81,
82
],
[
81,
83
],
[
77,
84
],
[
62,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
91,
92
],
[
91,
93
],
[
87,
94
],
[
62,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
97,
99
],
[
62,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
104
],
[
104,
105
],
[
104,
106
],
[
62,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
107,
111
],
[
8,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
112,
117
],
[
117,
118
],
[
117,
119
],
[
112,
120
],
[
120,
121
],
[
121,
122
],
[
112,
123
],
[
124,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
125,
130
],
[
130,
131
],
[
130,
132
],
[
8,
133
],
[
133,
134
],
[
134,
135
],
[
6,
136
],
[
136,
137
],
[
0,
138
],
[
138,
139
],
[
138,
140
]
] | [
"import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n\n int i;\n int swap;\n\n int n=sc.nextInt();\n int[] numarr=new int[n];\n for(i=0;i<n;i++){\n numarr[i]=i+1;\n }\n int m=sc.nextInt();\n \n for(i=0;i<m;i++){\n String str=sc.next();\n String[] inte=str.split(\",\",0);\n int a=Integer.parseInt(inte[0])-1;\n int b=Integer.parseInt(inte[1])-1;\n swap=numarr[a];\n numarr[a]=numarr[b];\n numarr[b]=swap;\n }\n \n for(i=0;i<n;i++){\n System.out.println(numarr[i]);\n }\n sc.close();\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n\n int i;\n int swap;\n\n int n=sc.nextInt();\n int[] numarr=new int[n];\n for(i=0;i<n;i++){\n numarr[i]=i+1;\n }\n int m=sc.nextInt();\n \n for(i=0;i<m;i++){\n String str=sc.next();\n String[] inte=str.split(\",\",0);\n int a=Integer.parseInt(inte[0])-1;\n int b=Integer.parseInt(inte[1])-1;\n swap=numarr[a];\n numarr[a]=numarr[b];\n numarr[b]=swap;\n }\n \n for(i=0;i<n;i++){\n System.out.println(numarr[i]);\n }\n sc.close();\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n\n int i;\n int swap;\n\n int n=sc.nextInt();\n int[] numarr=new int[n];\n for(i=0;i<n;i++){\n numarr[i]=i+1;\n }\n int m=sc.nextInt();\n \n for(i=0;i<m;i++){\n String str=sc.next();\n String[] inte=str.split(\",\",0);\n int a=Integer.parseInt(inte[0])-1;\n int b=Integer.parseInt(inte[1])-1;\n swap=numarr[a];\n numarr[a]=numarr[b];\n numarr[b]=swap;\n }\n \n for(i=0;i<n;i++){\n System.out.println(numarr[i]);\n }\n sc.close();\n }",
"main",
"{\n Scanner sc=new Scanner(System.in);\n\n int i;\n int swap;\n\n int n=sc.nextInt();\n int[] numarr=new int[n];\n for(i=0;i<n;i++){\n numarr[i]=i+1;\n }\n int m=sc.nextInt();\n \n for(i=0;i<m;i++){\n String str=sc.next();\n String[] inte=str.split(\",\",0);\n int a=Integer.parseInt(inte[0])-1;\n int b=Integer.parseInt(inte[1])-1;\n swap=numarr[a];\n numarr[a]=numarr[b];\n numarr[b]=swap;\n }\n \n for(i=0;i<n;i++){\n System.out.println(numarr[i]);\n }\n sc.close();\n }",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int i;",
"i",
"int swap;",
"swap",
"int n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] numarr=new int[n];",
"numarr",
"new int[n]",
"n",
"for(i=0;i<n;i++){\n numarr[i]=i+1;\n }",
"i=0;",
"i=0",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n numarr[i]=i+1;\n }",
"{\n numarr[i]=i+1;\n }",
"numarr[i]=i+1",
"numarr[i]",
"numarr",
"i",
"i+1",
"i",
"1",
"int m=sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(i=0;i<m;i++){\n String str=sc.next();\n String[] inte=str.split(\",\",0);\n int a=Integer.parseInt(inte[0])-1;\n int b=Integer.parseInt(inte[1])-1;\n swap=numarr[a];\n numarr[a]=numarr[b];\n numarr[b]=swap;\n }",
"i=0;",
"i=0",
"i",
"0",
"i<m",
"i",
"m",
"i++",
"i++",
"i",
"{\n String str=sc.next();\n String[] inte=str.split(\",\",0);\n int a=Integer.parseInt(inte[0])-1;\n int b=Integer.parseInt(inte[1])-1;\n swap=numarr[a];\n numarr[a]=numarr[b];\n numarr[b]=swap;\n }",
"{\n String str=sc.next();\n String[] inte=str.split(\",\",0);\n int a=Integer.parseInt(inte[0])-1;\n int b=Integer.parseInt(inte[1])-1;\n swap=numarr[a];\n numarr[a]=numarr[b];\n numarr[b]=swap;\n }",
"String str=sc.next();",
"str",
"sc.next()",
"sc.next",
"sc",
"String[] inte=str.split(\",\",0);",
"inte",
"str.split(\",\",0)",
"str.split",
"str",
"\",\"",
"0",
"int a=Integer.parseInt(inte[0])-1;",
"a",
"Integer.parseInt(inte[0])-1",
"Integer.parseInt(inte[0])",
"Integer.parseInt",
"Integer",
"inte[0]",
"inte",
"0",
"1",
"int b=Integer.parseInt(inte[1])-1;",
"b",
"Integer.parseInt(inte[1])-1",
"Integer.parseInt(inte[1])",
"Integer.parseInt",
"Integer",
"inte[1]",
"inte",
"1",
"1",
"swap=numarr[a]",
"swap",
"numarr[a]",
"numarr",
"a",
"numarr[a]=numarr[b]",
"numarr[a]",
"numarr",
"a",
"numarr[b]",
"numarr",
"b",
"numarr[b]=swap",
"numarr[b]",
"numarr",
"b",
"swap",
"for(i=0;i<n;i++){\n System.out.println(numarr[i]);\n }",
"i=0;",
"i=0",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n System.out.println(numarr[i]);\n }",
"{\n System.out.println(numarr[i]);\n }",
"System.out.println(numarr[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"numarr[i]",
"numarr",
"i",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n\n int i;\n int swap;\n\n int n=sc.nextInt();\n int[] numarr=new int[n];\n for(i=0;i<n;i++){\n numarr[i]=i+1;\n }\n int m=sc.nextInt();\n \n for(i=0;i<m;i++){\n String str=sc.next();\n String[] inte=str.split(\",\",0);\n int a=Integer.parseInt(inte[0])-1;\n int b=Integer.parseInt(inte[1])-1;\n swap=numarr[a];\n numarr[a]=numarr[b];\n numarr[b]=swap;\n }\n \n for(i=0;i<n;i++){\n System.out.println(numarr[i]);\n }\n sc.close();\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n\n int i;\n int swap;\n\n int n=sc.nextInt();\n int[] numarr=new int[n];\n for(i=0;i<n;i++){\n numarr[i]=i+1;\n }\n int m=sc.nextInt();\n \n for(i=0;i<m;i++){\n String str=sc.next();\n String[] inte=str.split(\",\",0);\n int a=Integer.parseInt(inte[0])-1;\n int b=Integer.parseInt(inte[1])-1;\n swap=numarr[a];\n numarr[a]=numarr[b];\n numarr[b]=swap;\n }\n \n for(i=0;i<n;i++){\n System.out.println(numarr[i]);\n }\n sc.close();\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int i;
int swap;
int n=sc.nextInt();
int[] numarr=new int[n];
for(i=0;i<n;i++){
numarr[i]=i+1;
}
int m=sc.nextInt();
for(i=0;i<m;i++){
String str=sc.next();
String[] inte=str.split(",",0);
int a=Integer.parseInt(inte[0])-1;
int b=Integer.parseInt(inte[1])-1;
swap=numarr[a];
numarr[a]=numarr[b];
numarr[b]=swap;
}
for(i=0;i<n;i++){
System.out.println(numarr[i]);
}
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
20,
41,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
20,
2,
13,
17,
17,
0,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
4,
18,
13,
17,
0,
18,
18,
13,
13,
17,
4,
18,
4,
18,
13,
18,
13,
17,
0,
18,
18,
13,
13,
17,
4,
18,
4,
18,
13,
18,
13,
17,
41,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
18,
13,
13,
17,
13,
0,
13,
18,
18,
13,
13,
17,
14,
2,
18,
18,
13,
13,
17,
13,
0,
13,
18,
18,
13,
13,
17,
0,
18,
13,
2,
13,
17,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
8,
11
],
[
11,
12
],
[
8,
13
],
[
13,
14
],
[
8,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
35,
36
],
[
35,
37
],
[
8,
39
],
[
39,
40
],
[
39,
41
],
[
42,
43
],
[
42,
44
],
[
8,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
50,
51
],
[
50,
52
],
[
45,
53
],
[
53,
54
],
[
54,
55
],
[
45,
56
],
[
57,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
60,
65
],
[
57,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
66,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
77,
78
],
[
77,
79
],
[
57,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
80,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
91,
92
],
[
91,
93
],
[
8,
94
],
[
94,
95
],
[
8,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
96,
101
],
[
101,
102
],
[
101,
103
],
[
96,
104
],
[
104,
105
],
[
105,
106
],
[
96,
107
],
[
108,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
112,
117
],
[
117,
118
],
[
117,
119
],
[
112,
120
],
[
120,
121
],
[
121,
122
],
[
112,
123
],
[
124,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
127,
131
],
[
126,
132
],
[
125,
133
],
[
133,
134
],
[
133,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
135,
139
],
[
125,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
143,
145
],
[
142,
146
],
[
141,
147
],
[
140,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
150,
154
],
[
108,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
158,
159
],
[
158,
160
],
[
155,
161
],
[
8,
162
],
[
162,
163
],
[
163,
164
],
[
164,
165
],
[
164,
166
],
[
162,
167
],
[
167,
168
],
[
167,
169
],
[
162,
170
],
[
170,
171
],
[
171,
172
],
[
162,
173
],
[
173,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
174,
179
],
[
179,
180
],
[
179,
181
],
[
6,
182
],
[
182,
183
]
] | [
"import java.util.*;\nclass Main{\n\n public static void main(String args[]){\n\tint w,n;\n\tint[][] Edge;\n\tint[] Ans;\n\tScanner in = new Scanner(System.in);\n\tString[] s;\n\n\tw = in.nextInt();\n\tn = in.nextInt();\n\tEdge = new int[w+1][2];\n\tAns = new int[w+1];\n\tfor(int i=0;i<n;i++){\n\t s = in.next().split(\",\");\n\t Edge[i][0] = Integer.valueOf(s[0]).intValue();\n\t Edge[i][1] = Integer.valueOf(s[1]).intValue();\t \n\t}\n \n\tint here;\n\tfor(int i=1;i<=w;i++){\n\t here = i;\n\t for(int j=0;j<w;j++){\n\t\tif(Edge[j][0] == here)here = Edge[j][1];\n\t\telse if(Edge[j][1] == here)here = Edge[j][0];\n\t }\n\t Ans[here-1] = i;\n\t}\n\n\tfor(int i=0;i<w;i++)System.out.println(Ans[i]);\n\n }\n\n\n\n}",
"import java.util.*;",
"util.*",
"java",
"class Main{\n\n public static void main(String args[]){\n\tint w,n;\n\tint[][] Edge;\n\tint[] Ans;\n\tScanner in = new Scanner(System.in);\n\tString[] s;\n\n\tw = in.nextInt();\n\tn = in.nextInt();\n\tEdge = new int[w+1][2];\n\tAns = new int[w+1];\n\tfor(int i=0;i<n;i++){\n\t s = in.next().split(\",\");\n\t Edge[i][0] = Integer.valueOf(s[0]).intValue();\n\t Edge[i][1] = Integer.valueOf(s[1]).intValue();\t \n\t}\n \n\tint here;\n\tfor(int i=1;i<=w;i++){\n\t here = i;\n\t for(int j=0;j<w;j++){\n\t\tif(Edge[j][0] == here)here = Edge[j][1];\n\t\telse if(Edge[j][1] == here)here = Edge[j][0];\n\t }\n\t Ans[here-1] = i;\n\t}\n\n\tfor(int i=0;i<w;i++)System.out.println(Ans[i]);\n\n }\n\n\n\n}",
"Main",
"public static void main(String args[]){\n\tint w,n;\n\tint[][] Edge;\n\tint[] Ans;\n\tScanner in = new Scanner(System.in);\n\tString[] s;\n\n\tw = in.nextInt();\n\tn = in.nextInt();\n\tEdge = new int[w+1][2];\n\tAns = new int[w+1];\n\tfor(int i=0;i<n;i++){\n\t s = in.next().split(\",\");\n\t Edge[i][0] = Integer.valueOf(s[0]).intValue();\n\t Edge[i][1] = Integer.valueOf(s[1]).intValue();\t \n\t}\n \n\tint here;\n\tfor(int i=1;i<=w;i++){\n\t here = i;\n\t for(int j=0;j<w;j++){\n\t\tif(Edge[j][0] == here)here = Edge[j][1];\n\t\telse if(Edge[j][1] == here)here = Edge[j][0];\n\t }\n\t Ans[here-1] = i;\n\t}\n\n\tfor(int i=0;i<w;i++)System.out.println(Ans[i]);\n\n }",
"main",
"{\n\tint w,n;\n\tint[][] Edge;\n\tint[] Ans;\n\tScanner in = new Scanner(System.in);\n\tString[] s;\n\n\tw = in.nextInt();\n\tn = in.nextInt();\n\tEdge = new int[w+1][2];\n\tAns = new int[w+1];\n\tfor(int i=0;i<n;i++){\n\t s = in.next().split(\",\");\n\t Edge[i][0] = Integer.valueOf(s[0]).intValue();\n\t Edge[i][1] = Integer.valueOf(s[1]).intValue();\t \n\t}\n \n\tint here;\n\tfor(int i=1;i<=w;i++){\n\t here = i;\n\t for(int j=0;j<w;j++){\n\t\tif(Edge[j][0] == here)here = Edge[j][1];\n\t\telse if(Edge[j][1] == here)here = Edge[j][0];\n\t }\n\t Ans[here-1] = i;\n\t}\n\n\tfor(int i=0;i<w;i++)System.out.println(Ans[i]);\n\n }",
"int w",
"w",
"n;",
"n",
"int[][] Edge;",
"Edge",
"int[] Ans;",
"Ans",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"String[] s;",
"s",
"w = in.nextInt()",
"w",
"in.nextInt()",
"in.nextInt",
"in",
"n = in.nextInt()",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"Edge = new int[w+1][2]",
"Edge",
"new int[w+1][2]",
"w+1",
"w",
"1",
"2",
"Ans = new int[w+1]",
"Ans",
"new int[w+1]",
"w+1",
"w",
"1",
"for(int i=0;i<n;i++){\n\t s = in.next().split(\",\");\n\t Edge[i][0] = Integer.valueOf(s[0]).intValue();\n\t Edge[i][1] = Integer.valueOf(s[1]).intValue();\t \n\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t s = in.next().split(\",\");\n\t Edge[i][0] = Integer.valueOf(s[0]).intValue();\n\t Edge[i][1] = Integer.valueOf(s[1]).intValue();\t \n\t}",
"{\n\t s = in.next().split(\",\");\n\t Edge[i][0] = Integer.valueOf(s[0]).intValue();\n\t Edge[i][1] = Integer.valueOf(s[1]).intValue();\t \n\t}",
"s = in.next().split(\",\")",
"s",
"in.next().split(\",\")",
"in.next().split",
"in.next()",
"in.next",
"in",
"\",\"",
"Edge[i][0] = Integer.valueOf(s[0]).intValue()",
"Edge[i][0]",
"Edge[i]",
"Edge",
"i",
"0",
"Integer.valueOf(s[0]).intValue()",
"Integer.valueOf(s[0]).intValue",
"Integer.valueOf(s[0])",
"Integer.valueOf",
"Integer",
"s[0]",
"s",
"0",
"Edge[i][1] = Integer.valueOf(s[1]).intValue()",
"Edge[i][1]",
"Edge[i]",
"Edge",
"i",
"1",
"Integer.valueOf(s[1]).intValue()",
"Integer.valueOf(s[1]).intValue",
"Integer.valueOf(s[1])",
"Integer.valueOf",
"Integer",
"s[1]",
"s",
"1",
"int here;",
"here",
"for(int i=1;i<=w;i++){\n\t here = i;\n\t for(int j=0;j<w;j++){\n\t\tif(Edge[j][0] == here)here = Edge[j][1];\n\t\telse if(Edge[j][1] == here)here = Edge[j][0];\n\t }\n\t Ans[here-1] = i;\n\t}",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t here = i;\n\t for(int j=0;j<w;j++){\n\t\tif(Edge[j][0] == here)here = Edge[j][1];\n\t\telse if(Edge[j][1] == here)here = Edge[j][0];\n\t }\n\t Ans[here-1] = i;\n\t}",
"{\n\t here = i;\n\t for(int j=0;j<w;j++){\n\t\tif(Edge[j][0] == here)here = Edge[j][1];\n\t\telse if(Edge[j][1] == here)here = Edge[j][0];\n\t }\n\t Ans[here-1] = i;\n\t}",
"here = i",
"here",
"i",
"for(int j=0;j<w;j++){\n\t\tif(Edge[j][0] == here)here = Edge[j][1];\n\t\telse if(Edge[j][1] == here)here = Edge[j][0];\n\t }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<w",
"j",
"w",
"j++",
"j++",
"j",
"{\n\t\tif(Edge[j][0] == here)here = Edge[j][1];\n\t\telse if(Edge[j][1] == here)here = Edge[j][0];\n\t }",
"{\n\t\tif(Edge[j][0] == here)here = Edge[j][1];\n\t\telse if(Edge[j][1] == here)here = Edge[j][0];\n\t }",
"if(Edge[j][0] == here)here = Edge[j][1];\n\t\telse if(Edge[j][1] == here)here = Edge[j][0];",
"Edge[j][0] == here",
"Edge[j][0]",
"Edge[j]",
"Edge",
"j",
"0",
"here",
"here = Edge[j][1]",
"here",
"Edge[j][1]",
"Edge[j]",
"Edge",
"j",
"1",
"if(Edge[j][1] == here)here = Edge[j][0];",
"Edge[j][1] == here",
"Edge[j][1]",
"Edge[j]",
"Edge",
"j",
"1",
"here",
"here = Edge[j][0]",
"here",
"Edge[j][0]",
"Edge[j]",
"Edge",
"j",
"0",
"Ans[here-1] = i",
"Ans[here-1]",
"Ans",
"here-1",
"here",
"1",
"i",
"for(int i=0;i<w;i++)System.out.println(Ans[i]);",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"System.out.println(Ans[i]);",
"System.out.println(Ans[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"Ans[i]",
"Ans",
"i",
"String args[]",
"args"
] | import java.util.*;
class Main{
public static void main(String args[]){
int w,n;
int[][] Edge;
int[] Ans;
Scanner in = new Scanner(System.in);
String[] s;
w = in.nextInt();
n = in.nextInt();
Edge = new int[w+1][2];
Ans = new int[w+1];
for(int i=0;i<n;i++){
s = in.next().split(",");
Edge[i][0] = Integer.valueOf(s[0]).intValue();
Edge[i][1] = Integer.valueOf(s[1]).intValue();
}
int here;
for(int i=1;i<=w;i++){
here = i;
for(int j=0;j<w;j++){
if(Edge[j][0] == here)here = Edge[j][1];
else if(Edge[j][1] == here)here = Edge[j][0];
}
Ans[here-1] = i;
}
for(int i=0;i<w;i++)System.out.println(Ans[i]);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
14,
2,
13,
13,
30,
29,
4,
18,
4,
18,
13,
13,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
13,
30,
0,
13,
13,
0,
13,
13,
4,
18,
13,
4,
18,
13,
17,
13,
4,
18,
13,
4,
18,
13,
13,
4,
18,
13,
4,
18,
13,
2,
13,
17,
13,
4,
18,
13,
4,
18,
13,
13,
4,
18,
13,
4,
18,
13,
2,
13,
17,
29,
4,
18,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
18,
13,
2,
17,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
0,
13,
4,
13,
13,
2,
4,
18,
13,
18,
13,
17,
17,
2,
4,
18,
13,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
18,
18,
13,
13,
2,
4,
18,
13,
13,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
210,
5
],
[
210,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
16,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
24,
27
],
[
16,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
28,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
32,
36
],
[
36,
37
],
[
36,
38
],
[
28,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
43,
45
],
[
8,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
49,
53
],
[
8,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
8,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
64,
65
],
[
65,
66
],
[
64,
67
],
[
67,
68
],
[
67,
69
],
[
64,
70
],
[
8,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
8,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
84,
85
],
[
84,
86
],
[
8,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
6,
91
],
[
91,
92
],
[
6,
93
],
[
93,
94
],
[
6,
95
],
[
95,
96
],
[
210,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
106,
107
],
[
99,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
111,
112
],
[
99,
113
],
[
113,
114
],
[
114,
115
],
[
99,
116
],
[
116,
117
],
[
116,
118
],
[
99,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
119,
124
],
[
124,
125
],
[
124,
126
],
[
119,
127
],
[
127,
128
],
[
128,
129
],
[
119,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
131,
134
],
[
134,
135
],
[
134,
136
],
[
99,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
140,
141
],
[
99,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
142,
147
],
[
147,
148
],
[
147,
149
],
[
142,
150
],
[
150,
151
],
[
151,
152
],
[
142,
153
],
[
154,
154
],
[
154,
155
],
[
155,
156
],
[
155,
157
],
[
157,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
157,
162
],
[
154,
163
],
[
163,
164
],
[
163,
165
],
[
165,
166
],
[
165,
167
],
[
165,
168
],
[
168,
169
],
[
169,
170
],
[
170,
171
],
[
169,
172
],
[
172,
173
],
[
172,
174
],
[
168,
175
],
[
165,
176
],
[
176,
177
],
[
177,
178
],
[
178,
179
],
[
177,
180
],
[
180,
181
],
[
180,
182
],
[
176,
183
],
[
99,
184
],
[
184,
185
],
[
185,
186
],
[
186,
187
],
[
186,
188
],
[
184,
189
],
[
189,
190
],
[
189,
191
],
[
184,
192
],
[
192,
193
],
[
193,
194
],
[
184,
195
],
[
195,
196
],
[
196,
197
],
[
197,
198
],
[
198,
199
],
[
198,
200
],
[
196,
201
],
[
201,
202
],
[
202,
203
],
[
203,
204
],
[
202,
205
],
[
201,
206
],
[
97,
207
],
[
207,
208
],
[
0,
209
],
[
209,
210
],
[
209,
211
]
] | [
"import java.util.Scanner;\n\n\npublic class Main {\n\n\tstatic String swap(String s, int i, int j) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint a, b;\n\t\tif (i == j) { return sb.append(s).toString();\n\t\t} else if (i < j) { a = i; b = j;\n\t\t} else { a = j; b = i; }\n\t\tsb.append(s.substring(0, a));\n\t\tsb.append(s.charAt(b));\n\t\tsb.append(s.substring(a+1, b));\n\t\tsb.append(s.charAt(a));\n\t\tsb.append(s.substring(b+1));\n\t\treturn sb.toString();\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint W = sc.nextInt(), N = sc.nextInt(); sc.nextLine();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0 ; i < W ; i++) sb.append((char) (49+i));\n\t\tString str = sb.toString();\n\t\tfor (int i = 0 ; i < N ; i++) {\n\t\t\tString[] bar = sc.nextLine().split(\",\");\n\t\t\tstr = swap(str, Integer.parseInt(bar[0])-1, Integer.parseInt(bar[1])-1);\n\t\t}\n\t\tfor (int i = 0 ; i < W ; i++) System.out.println(((int) str.charAt(i))-48);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tstatic String swap(String s, int i, int j) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint a, b;\n\t\tif (i == j) { return sb.append(s).toString();\n\t\t} else if (i < j) { a = i; b = j;\n\t\t} else { a = j; b = i; }\n\t\tsb.append(s.substring(0, a));\n\t\tsb.append(s.charAt(b));\n\t\tsb.append(s.substring(a+1, b));\n\t\tsb.append(s.charAt(a));\n\t\tsb.append(s.substring(b+1));\n\t\treturn sb.toString();\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint W = sc.nextInt(), N = sc.nextInt(); sc.nextLine();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0 ; i < W ; i++) sb.append((char) (49+i));\n\t\tString str = sb.toString();\n\t\tfor (int i = 0 ; i < N ; i++) {\n\t\t\tString[] bar = sc.nextLine().split(\",\");\n\t\t\tstr = swap(str, Integer.parseInt(bar[0])-1, Integer.parseInt(bar[1])-1);\n\t\t}\n\t\tfor (int i = 0 ; i < W ; i++) System.out.println(((int) str.charAt(i))-48);\n\t}\n}",
"Main",
"static String swap(String s, int i, int j) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint a, b;\n\t\tif (i == j) { return sb.append(s).toString();\n\t\t} else if (i < j) { a = i; b = j;\n\t\t} else { a = j; b = i; }\n\t\tsb.append(s.substring(0, a));\n\t\tsb.append(s.charAt(b));\n\t\tsb.append(s.substring(a+1, b));\n\t\tsb.append(s.charAt(a));\n\t\tsb.append(s.substring(b+1));\n\t\treturn sb.toString();\n\t}",
"swap",
"{\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint a, b;\n\t\tif (i == j) { return sb.append(s).toString();\n\t\t} else if (i < j) { a = i; b = j;\n\t\t} else { a = j; b = i; }\n\t\tsb.append(s.substring(0, a));\n\t\tsb.append(s.charAt(b));\n\t\tsb.append(s.substring(a+1, b));\n\t\tsb.append(s.charAt(a));\n\t\tsb.append(s.substring(b+1));\n\t\treturn sb.toString();\n\t}",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"int a",
"a",
"b;",
"b",
"if (i == j) { return sb.append(s).toString();\n\t\t} else if (i < j) { a = i; b = j;\n\t\t} else { a = j; b = i; }",
"i == j",
"i",
"j",
"{ return sb.append(s).toString();\n\t\t}",
"return sb.append(s).toString();",
"sb.append(s).toString()",
"sb.append(s).toString",
"sb.append(s)",
"sb.append",
"sb",
"s",
"if (i < j) { a = i; b = j;\n\t\t} else { a = j; b = i; }",
"i < j",
"i",
"j",
"{ a = i; b = j;\n\t\t}",
"a = i",
"a",
"i",
"b = j",
"b",
"j",
"{ a = j; b = i; }",
"a = j",
"a",
"j",
"b = i",
"b",
"i",
"sb.append(s.substring(0, a))",
"sb.append",
"sb",
"s.substring(0, a)",
"s.substring",
"s",
"0",
"a",
"sb.append(s.charAt(b))",
"sb.append",
"sb",
"s.charAt(b)",
"s.charAt",
"s",
"b",
"sb.append(s.substring(a+1, b))",
"sb.append",
"sb",
"s.substring(a+1, b)",
"s.substring",
"s",
"a+1",
"a",
"1",
"b",
"sb.append(s.charAt(a))",
"sb.append",
"sb",
"s.charAt(a)",
"s.charAt",
"s",
"a",
"sb.append(s.substring(b+1))",
"sb.append",
"sb",
"s.substring(b+1)",
"s.substring",
"s",
"b+1",
"b",
"1",
"return sb.toString();",
"sb.toString()",
"sb.toString",
"sb",
"String s",
"s",
"int i",
"i",
"int j",
"j",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint W = sc.nextInt(), N = sc.nextInt(); sc.nextLine();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0 ; i < W ; i++) sb.append((char) (49+i));\n\t\tString str = sb.toString();\n\t\tfor (int i = 0 ; i < N ; i++) {\n\t\t\tString[] bar = sc.nextLine().split(\",\");\n\t\t\tstr = swap(str, Integer.parseInt(bar[0])-1, Integer.parseInt(bar[1])-1);\n\t\t}\n\t\tfor (int i = 0 ; i < W ; i++) System.out.println(((int) str.charAt(i))-48);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint W = sc.nextInt(), N = sc.nextInt(); sc.nextLine();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0 ; i < W ; i++) sb.append((char) (49+i));\n\t\tString str = sb.toString();\n\t\tfor (int i = 0 ; i < N ; i++) {\n\t\t\tString[] bar = sc.nextLine().split(\",\");\n\t\t\tstr = swap(str, Integer.parseInt(bar[0])-1, Integer.parseInt(bar[1])-1);\n\t\t}\n\t\tfor (int i = 0 ; i < W ; i++) System.out.println(((int) str.charAt(i))-48);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int W = sc.nextInt()",
"W",
"sc.nextInt()",
"sc.nextInt",
"sc",
"N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sc.nextLine()",
"sc.nextLine",
"sc",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"for (int i = 0 ; i < W ; i++) sb.append((char) (49+i));",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < W",
"i",
"W",
"i++",
"i++",
"i",
"sb.append((char) (49+i));",
"sb.append((char) (49+i))",
"sb.append",
"sb",
"(char) (49+i)",
"49",
"i",
"String str = sb.toString();",
"str",
"sb.toString()",
"sb.toString",
"sb",
"for (int i = 0 ; i < N ; i++) {\n\t\t\tString[] bar = sc.nextLine().split(\",\");\n\t\t\tstr = swap(str, Integer.parseInt(bar[0])-1, Integer.parseInt(bar[1])-1);\n\t\t}",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tString[] bar = sc.nextLine().split(\",\");\n\t\t\tstr = swap(str, Integer.parseInt(bar[0])-1, Integer.parseInt(bar[1])-1);\n\t\t}",
"{\n\t\t\tString[] bar = sc.nextLine().split(\",\");\n\t\t\tstr = swap(str, Integer.parseInt(bar[0])-1, Integer.parseInt(bar[1])-1);\n\t\t}",
"String[] bar = sc.nextLine().split(\",\");",
"bar",
"sc.nextLine().split(\",\")",
"sc.nextLine().split",
"sc.nextLine()",
"sc.nextLine",
"sc",
"\",\"",
"str = swap(str, Integer.parseInt(bar[0])-1, Integer.parseInt(bar[1])-1)",
"str",
"swap(str, Integer.parseInt(bar[0])-1, Integer.parseInt(bar[1])-1)",
"swap",
"str",
"Integer.parseInt(bar[0])-1",
"Integer.parseInt(bar[0])",
"Integer.parseInt",
"Integer",
"bar[0]",
"bar",
"0",
"1",
"Integer.parseInt(bar[1])-1",
"Integer.parseInt(bar[1])",
"Integer.parseInt",
"Integer",
"bar[1]",
"bar",
"1",
"1",
"for (int i = 0 ; i < W ; i++) System.out.println(((int) str.charAt(i))-48);",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < W",
"i",
"W",
"i++",
"i++",
"i",
"System.out.println(((int) str.charAt(i))-48);",
"System.out.println(((int) str.charAt(i))-48)",
"System.out.println",
"System.out",
"System",
"System.out",
"((int) str.charAt(i))-48",
"((int) str.charAt(i))",
"str.charAt",
"str",
"i",
"48",
"String[] args",
"args",
"public class Main {\n\n\tstatic String swap(String s, int i, int j) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint a, b;\n\t\tif (i == j) { return sb.append(s).toString();\n\t\t} else if (i < j) { a = i; b = j;\n\t\t} else { a = j; b = i; }\n\t\tsb.append(s.substring(0, a));\n\t\tsb.append(s.charAt(b));\n\t\tsb.append(s.substring(a+1, b));\n\t\tsb.append(s.charAt(a));\n\t\tsb.append(s.substring(b+1));\n\t\treturn sb.toString();\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint W = sc.nextInt(), N = sc.nextInt(); sc.nextLine();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0 ; i < W ; i++) sb.append((char) (49+i));\n\t\tString str = sb.toString();\n\t\tfor (int i = 0 ; i < N ; i++) {\n\t\t\tString[] bar = sc.nextLine().split(\",\");\n\t\t\tstr = swap(str, Integer.parseInt(bar[0])-1, Integer.parseInt(bar[1])-1);\n\t\t}\n\t\tfor (int i = 0 ; i < W ; i++) System.out.println(((int) str.charAt(i))-48);\n\t}\n}",
"public class Main {\n\n\tstatic String swap(String s, int i, int j) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint a, b;\n\t\tif (i == j) { return sb.append(s).toString();\n\t\t} else if (i < j) { a = i; b = j;\n\t\t} else { a = j; b = i; }\n\t\tsb.append(s.substring(0, a));\n\t\tsb.append(s.charAt(b));\n\t\tsb.append(s.substring(a+1, b));\n\t\tsb.append(s.charAt(a));\n\t\tsb.append(s.substring(b+1));\n\t\treturn sb.toString();\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint W = sc.nextInt(), N = sc.nextInt(); sc.nextLine();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0 ; i < W ; i++) sb.append((char) (49+i));\n\t\tString str = sb.toString();\n\t\tfor (int i = 0 ; i < N ; i++) {\n\t\t\tString[] bar = sc.nextLine().split(\",\");\n\t\t\tstr = swap(str, Integer.parseInt(bar[0])-1, Integer.parseInt(bar[1])-1);\n\t\t}\n\t\tfor (int i = 0 ; i < W ; i++) System.out.println(((int) str.charAt(i))-48);\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
static String swap(String s, int i, int j) {
StringBuilder sb = new StringBuilder();
int a, b;
if (i == j) { return sb.append(s).toString();
} else if (i < j) { a = i; b = j;
} else { a = j; b = i; }
sb.append(s.substring(0, a));
sb.append(s.charAt(b));
sb.append(s.substring(a+1, b));
sb.append(s.charAt(a));
sb.append(s.substring(b+1));
return sb.toString();
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int W = sc.nextInt(), N = sc.nextInt(); sc.nextLine();
StringBuilder sb = new StringBuilder();
for (int i = 0 ; i < W ; i++) sb.append((char) (49+i));
String str = sb.toString();
for (int i = 0 ; i < N ; i++) {
String[] bar = sc.nextLine().split(",");
str = swap(str, Integer.parseInt(bar[0])-1, Integer.parseInt(bar[1])-1);
}
for (int i = 0 ; i < W ; i++) System.out.println(((int) str.charAt(i))-48);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
13,
42,
2,
40,
13,
17,
30,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
115,
5
],
[
115,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
25,
26
],
[
25,
27
],
[
8,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
8,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
45,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
53,
58
],
[
50,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
64,
65
],
[
64,
66
],
[
50,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
72,
73
],
[
72,
74
],
[
50,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
77,
79
],
[
50,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
84,
85
],
[
84,
86
],
[
50,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
87,
91
],
[
8,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
92,
97
],
[
97,
98
],
[
97,
99
],
[
92,
100
],
[
100,
101
],
[
101,
102
],
[
92,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
104,
109
],
[
109,
110
],
[
109,
111
],
[
6,
112
],
[
112,
113
],
[
0,
114
],
[
114,
115
],
[
114,
116
]
] | [
"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 w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint[] a = new int[w+1];\n\t\tfor(int i=1; i<=w; i++) a[i]=i;\n\t\t\n\t\twhile(n-- != 0) {\n\t\t\tString[] s = sc.next().split(\",\");\n\t\t\tint x = Integer.parseInt(s[0]);\n\t\t\tint y = Integer.parseInt(s[1]);\n\t\t\tint std = a[x];\n\t\t\ta[x] = a[y];\n\t\t\ta[y] = std;\n\t\t}\n\t\tfor(int i=1; i<=w; i++) System.out.println(a[i]);\n\t}\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint[] a = new int[w+1];\n\t\tfor(int i=1; i<=w; i++) a[i]=i;\n\t\t\n\t\twhile(n-- != 0) {\n\t\t\tString[] s = sc.next().split(\",\");\n\t\t\tint x = Integer.parseInt(s[0]);\n\t\t\tint y = Integer.parseInt(s[1]);\n\t\t\tint std = a[x];\n\t\t\ta[x] = a[y];\n\t\t\ta[y] = std;\n\t\t}\n\t\tfor(int i=1; i<=w; i++) System.out.println(a[i]);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint[] a = new int[w+1];\n\t\tfor(int i=1; i<=w; i++) a[i]=i;\n\t\t\n\t\twhile(n-- != 0) {\n\t\t\tString[] s = sc.next().split(\",\");\n\t\t\tint x = Integer.parseInt(s[0]);\n\t\t\tint y = Integer.parseInt(s[1]);\n\t\t\tint std = a[x];\n\t\t\ta[x] = a[y];\n\t\t\ta[y] = std;\n\t\t}\n\t\tfor(int i=1; i<=w; i++) System.out.println(a[i]);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint[] a = new int[w+1];\n\t\tfor(int i=1; i<=w; i++) a[i]=i;\n\t\t\n\t\twhile(n-- != 0) {\n\t\t\tString[] s = sc.next().split(\",\");\n\t\t\tint x = Integer.parseInt(s[0]);\n\t\t\tint y = Integer.parseInt(s[1]);\n\t\t\tint std = a[x];\n\t\t\ta[x] = a[y];\n\t\t\ta[y] = std;\n\t\t}\n\t\tfor(int i=1; i<=w; i++) System.out.println(a[i]);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] a = new int[w+1];",
"a",
"new int[w+1]",
"w+1",
"w",
"1",
"for(int i=1; i<=w; i++) a[i]=i;",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=w",
"i",
"w",
"i++",
"i++",
"i",
"a[i]=i;",
"a[i]=i",
"a[i]",
"a",
"i",
"i",
"while(n-- != 0) {\n\t\t\tString[] s = sc.next().split(\",\");\n\t\t\tint x = Integer.parseInt(s[0]);\n\t\t\tint y = Integer.parseInt(s[1]);\n\t\t\tint std = a[x];\n\t\t\ta[x] = a[y];\n\t\t\ta[y] = std;\n\t\t}",
"n-- != 0",
"n--",
"n",
"0",
"{\n\t\t\tString[] s = sc.next().split(\",\");\n\t\t\tint x = Integer.parseInt(s[0]);\n\t\t\tint y = Integer.parseInt(s[1]);\n\t\t\tint std = a[x];\n\t\t\ta[x] = a[y];\n\t\t\ta[y] = std;\n\t\t}",
"String[] s = sc.next().split(\",\");",
"s",
"sc.next().split(\",\")",
"sc.next().split",
"sc.next()",
"sc.next",
"sc",
"\",\"",
"int x = Integer.parseInt(s[0]);",
"x",
"Integer.parseInt(s[0])",
"Integer.parseInt",
"Integer",
"s[0]",
"s",
"0",
"int y = Integer.parseInt(s[1]);",
"y",
"Integer.parseInt(s[1])",
"Integer.parseInt",
"Integer",
"s[1]",
"s",
"1",
"int std = a[x];",
"std",
"a[x]",
"a",
"x",
"a[x] = a[y]",
"a[x]",
"a",
"x",
"a[y]",
"a",
"y",
"a[y] = std",
"a[y]",
"a",
"y",
"std",
"for(int i=1; i<=w; i++) System.out.println(a[i]);",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=w",
"i",
"w",
"i++",
"i++",
"i",
"System.out.println(a[i]);",
"System.out.println(a[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"a[i]",
"a",
"i",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint[] a = new int[w+1];\n\t\tfor(int i=1; i<=w; i++) a[i]=i;\n\t\t\n\t\twhile(n-- != 0) {\n\t\t\tString[] s = sc.next().split(\",\");\n\t\t\tint x = Integer.parseInt(s[0]);\n\t\t\tint y = Integer.parseInt(s[1]);\n\t\t\tint std = a[x];\n\t\t\ta[x] = a[y];\n\t\t\ta[y] = std;\n\t\t}\n\t\tfor(int i=1; i<=w; i++) System.out.println(a[i]);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint[] a = new int[w+1];\n\t\tfor(int i=1; i<=w; i++) a[i]=i;\n\t\t\n\t\twhile(n-- != 0) {\n\t\t\tString[] s = sc.next().split(\",\");\n\t\t\tint x = Integer.parseInt(s[0]);\n\t\t\tint y = Integer.parseInt(s[1]);\n\t\t\tint std = a[x];\n\t\t\ta[x] = a[y];\n\t\t\ta[y] = std;\n\t\t}\n\t\tfor(int i=1; i<=w; i++) System.out.println(a[i]);\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int w = sc.nextInt();
int n = sc.nextInt();
int[] a = new int[w+1];
for(int i=1; i<=w; i++) a[i]=i;
while(n-- != 0) {
String[] s = sc.next().split(",");
int x = Integer.parseInt(s[0]);
int y = Integer.parseInt(s[1]);
int std = a[x];
a[x] = a[y];
a[y] = std;
}
for(int i=1; i<=w; i++) System.out.println(a[i]);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
131,
5
],
[
131,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
43,
45
],
[
8,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
58,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
58,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
76,
77
],
[
76,
78
],
[
72,
79
],
[
58,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
86,
87
],
[
86,
88
],
[
82,
89
],
[
58,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
92,
94
],
[
58,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
99,
101
],
[
58,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
8,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
107,
112
],
[
112,
113
],
[
112,
114
],
[
107,
115
],
[
115,
116
],
[
116,
117
],
[
107,
118
],
[
119,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
120,
125
],
[
125,
126
],
[
125,
127
],
[
6,
128
],
[
128,
129
],
[
0,
130
],
[
130,
131
],
[
130,
132
]
] | [
"import java.util.Scanner;\n\n\npublic class Main \n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tint w = scanner.nextInt();\n\t\tint n = scanner.nextInt();\n\t\t\n\t\tint[] m = new int[w];\n\t\tfor(int i=0; i<w; i++)\n\t\t{\n\t\t\tm[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(int i=0; i<n; i++)\n\t\t{\t\n\t\t\tString s = scanner.next();\n\t\t\tString[] str = s.split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(str[0]) -1;\n\t\t\tint b = Integer.parseInt(str[1]) -1;\n\t\t\t\n\t\t\tint buf = m[a];\n\t\t\tm[a] = m[b];\n\t\t\tm[b] = buf;\n\t\t}\n\t\t\n\t\tfor(int i=0; i<w; i++)\n\t\t{\n\t\t\tSystem.out.println(m[i]);\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main \n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tint w = scanner.nextInt();\n\t\tint n = scanner.nextInt();\n\t\t\n\t\tint[] m = new int[w];\n\t\tfor(int i=0; i<w; i++)\n\t\t{\n\t\t\tm[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(int i=0; i<n; i++)\n\t\t{\t\n\t\t\tString s = scanner.next();\n\t\t\tString[] str = s.split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(str[0]) -1;\n\t\t\tint b = Integer.parseInt(str[1]) -1;\n\t\t\t\n\t\t\tint buf = m[a];\n\t\t\tm[a] = m[b];\n\t\t\tm[b] = buf;\n\t\t}\n\t\t\n\t\tfor(int i=0; i<w; i++)\n\t\t{\n\t\t\tSystem.out.println(m[i]);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args)\n\t{\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tint w = scanner.nextInt();\n\t\tint n = scanner.nextInt();\n\t\t\n\t\tint[] m = new int[w];\n\t\tfor(int i=0; i<w; i++)\n\t\t{\n\t\t\tm[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(int i=0; i<n; i++)\n\t\t{\t\n\t\t\tString s = scanner.next();\n\t\t\tString[] str = s.split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(str[0]) -1;\n\t\t\tint b = Integer.parseInt(str[1]) -1;\n\t\t\t\n\t\t\tint buf = m[a];\n\t\t\tm[a] = m[b];\n\t\t\tm[b] = buf;\n\t\t}\n\t\t\n\t\tfor(int i=0; i<w; i++)\n\t\t{\n\t\t\tSystem.out.println(m[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tint w = scanner.nextInt();\n\t\tint n = scanner.nextInt();\n\t\t\n\t\tint[] m = new int[w];\n\t\tfor(int i=0; i<w; i++)\n\t\t{\n\t\t\tm[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(int i=0; i<n; i++)\n\t\t{\t\n\t\t\tString s = scanner.next();\n\t\t\tString[] str = s.split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(str[0]) -1;\n\t\t\tint b = Integer.parseInt(str[1]) -1;\n\t\t\t\n\t\t\tint buf = m[a];\n\t\t\tm[a] = m[b];\n\t\t\tm[b] = buf;\n\t\t}\n\t\t\n\t\tfor(int i=0; i<w; i++)\n\t\t{\n\t\t\tSystem.out.println(m[i]);\n\t\t}\n\t}",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int w = scanner.nextInt();",
"w",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int n = scanner.nextInt();",
"n",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int[] m = new int[w];",
"m",
"new int[w]",
"w",
"for(int i=0; i<w; i++)\n\t\t{\n\t\t\tm[i] = i+1;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tm[i] = i+1;\n\t\t}",
"{\n\t\t\tm[i] = i+1;\n\t\t}",
"m[i] = i+1",
"m[i]",
"m",
"i",
"i+1",
"i",
"1",
"for(int i=0; i<n; i++)\n\t\t{\t\n\t\t\tString s = scanner.next();\n\t\t\tString[] str = s.split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(str[0]) -1;\n\t\t\tint b = Integer.parseInt(str[1]) -1;\n\t\t\t\n\t\t\tint buf = m[a];\n\t\t\tm[a] = m[b];\n\t\t\tm[b] = buf;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\t\n\t\t\tString s = scanner.next();\n\t\t\tString[] str = s.split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(str[0]) -1;\n\t\t\tint b = Integer.parseInt(str[1]) -1;\n\t\t\t\n\t\t\tint buf = m[a];\n\t\t\tm[a] = m[b];\n\t\t\tm[b] = buf;\n\t\t}",
"{\t\n\t\t\tString s = scanner.next();\n\t\t\tString[] str = s.split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(str[0]) -1;\n\t\t\tint b = Integer.parseInt(str[1]) -1;\n\t\t\t\n\t\t\tint buf = m[a];\n\t\t\tm[a] = m[b];\n\t\t\tm[b] = buf;\n\t\t}",
"String s = scanner.next();",
"s",
"scanner.next()",
"scanner.next",
"scanner",
"String[] str = s.split(\",\");",
"str",
"s.split(\",\")",
"s.split",
"s",
"\",\"",
"int a = Integer.parseInt(str[0]) -1;",
"a",
"Integer.parseInt(str[0]) -1",
"Integer.parseInt(str[0])",
"Integer.parseInt",
"Integer",
"str[0]",
"str",
"0",
"1",
"int b = Integer.parseInt(str[1]) -1;",
"b",
"Integer.parseInt(str[1]) -1",
"Integer.parseInt(str[1])",
"Integer.parseInt",
"Integer",
"str[1]",
"str",
"1",
"1",
"int buf = m[a];",
"buf",
"m[a]",
"m",
"a",
"m[a] = m[b]",
"m[a]",
"m",
"a",
"m[b]",
"m",
"b",
"m[b] = buf",
"m[b]",
"m",
"b",
"buf",
"for(int i=0; i<w; i++)\n\t\t{\n\t\t\tSystem.out.println(m[i]);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(m[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(m[i]);\n\t\t}",
"System.out.println(m[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"m[i]",
"m",
"i",
"String[] args",
"args",
"public class Main \n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tint w = scanner.nextInt();\n\t\tint n = scanner.nextInt();\n\t\t\n\t\tint[] m = new int[w];\n\t\tfor(int i=0; i<w; i++)\n\t\t{\n\t\t\tm[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(int i=0; i<n; i++)\n\t\t{\t\n\t\t\tString s = scanner.next();\n\t\t\tString[] str = s.split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(str[0]) -1;\n\t\t\tint b = Integer.parseInt(str[1]) -1;\n\t\t\t\n\t\t\tint buf = m[a];\n\t\t\tm[a] = m[b];\n\t\t\tm[b] = buf;\n\t\t}\n\t\t\n\t\tfor(int i=0; i<w; i++)\n\t\t{\n\t\t\tSystem.out.println(m[i]);\n\t\t}\n\t}\n}",
"public class Main \n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tint w = scanner.nextInt();\n\t\tint n = scanner.nextInt();\n\t\t\n\t\tint[] m = new int[w];\n\t\tfor(int i=0; i<w; i++)\n\t\t{\n\t\t\tm[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(int i=0; i<n; i++)\n\t\t{\t\n\t\t\tString s = scanner.next();\n\t\t\tString[] str = s.split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(str[0]) -1;\n\t\t\tint b = Integer.parseInt(str[1]) -1;\n\t\t\t\n\t\t\tint buf = m[a];\n\t\t\tm[a] = m[b];\n\t\t\tm[b] = buf;\n\t\t}\n\t\t\n\t\tfor(int i=0; i<w; i++)\n\t\t{\n\t\t\tSystem.out.println(m[i]);\n\t\t}\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner scanner = new Scanner(System.in);
int w = scanner.nextInt();
int n = scanner.nextInt();
int[] m = new int[w];
for(int i=0; i<w; i++)
{
m[i] = i+1;
}
for(int i=0; i<n; i++)
{
String s = scanner.next();
String[] str = s.split(",");
int a = Integer.parseInt(str[0]) -1;
int b = Integer.parseInt(str[1]) -1;
int buf = m[a];
m[a] = m[b];
m[b] = buf;
}
for(int i=0; i<w; i++)
{
System.out.println(m[i]);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
0,
18,
18,
13,
13,
17,
4,
18,
13,
18,
13,
17,
0,
18,
18,
13,
13,
17,
4,
18,
13,
18,
13,
17,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
13,
13,
13,
0,
18,
13,
2,
13,
17,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
18,
18,
13,
13,
17,
30,
0,
13,
18,
18,
13,
13,
17,
14,
2,
13,
18,
18,
13,
13,
17,
30,
0,
13,
18,
18,
13,
13,
17,
29,
13,
23,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
188,
5
],
[
188,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
8,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
43,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
43,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
55,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
64,
65
],
[
64,
66
],
[
43,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
67,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
76,
77
],
[
76,
78
],
[
8,
79
],
[
79,
80
],
[
80,
81
],
[
8,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
82,
87
],
[
87,
88
],
[
87,
89
],
[
82,
90
],
[
90,
91
],
[
91,
92
],
[
82,
93
],
[
94,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
97,
99
],
[
97,
100
],
[
94,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
104,
106
],
[
101,
107
],
[
8,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
108,
113
],
[
113,
114
],
[
113,
115
],
[
108,
116
],
[
116,
117
],
[
117,
118
],
[
108,
119
],
[
120,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
121,
126
],
[
126,
127
],
[
126,
128
],
[
6,
129
],
[
129,
130
],
[
188,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
134,
139
],
[
139,
140
],
[
139,
141
],
[
141,
142
],
[
141,
143
],
[
134,
144
],
[
144,
145
],
[
145,
146
],
[
134,
147
],
[
148,
148
],
[
148,
149
],
[
149,
150
],
[
150,
151
],
[
150,
152
],
[
152,
153
],
[
153,
154
],
[
153,
155
],
[
152,
156
],
[
149,
157
],
[
157,
158
],
[
158,
159
],
[
158,
160
],
[
160,
161
],
[
161,
162
],
[
161,
163
],
[
160,
164
],
[
149,
165
],
[
165,
166
],
[
166,
167
],
[
166,
168
],
[
168,
169
],
[
169,
170
],
[
169,
171
],
[
168,
172
],
[
165,
173
],
[
173,
174
],
[
174,
175
],
[
174,
176
],
[
176,
177
],
[
177,
178
],
[
177,
179
],
[
176,
180
],
[
133,
181
],
[
181,
182
],
[
131,
183
],
[
183,
184
],
[
131,
185
],
[
185,
186
],
[
0,
187
],
[
187,
188
],
[
187,
189
]
] | [
"\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 w=sc.nextInt();\n\t\tint n=sc.nextInt();\n\t\tint[][] list=new int[n][2];\n\t\tint[] answer=new int[w];\n\n\t\tfor(int i=0; i<n; i++){\n\t\t\tString str=sc.next();\n\t\t\tString[] ab=str.split(\",\");\n\t\t\tlist[i][0]=Integer.parseInt(ab[0]);\n\t\t\tlist[i][1]=Integer.parseInt(ab[1]);\n\t\t}\n\n\n\n\n\t\tsc.close();\n\n\t\t//MyBLAS.Calc.pMat(list);\n\n\t\tfor(int i=1; i<=w; i++){\n\t\t\tint c=move(list,i);\n\t\t\tanswer[c-1]=i;\n\t\t}\n\n\t\tfor(int k=0; k<w; k++){\n\t\t\tSystem.out.println(answer[k]);\n\t\t}\n\n\n\n\t}\n\n\tpublic static int move(int[][] a,int b){\n\n\t\tfor(int i=0; i<a.length; i++){\n\t\t\tif(b==a[i][0]){\n\t\t\t\tb=a[i][1];\n\t\t\t}else if(b==a[i][1]){\n\t\t\t\tb=a[i][0];\n\t\t\t}\n\t\t}\n\t\treturn b;\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w=sc.nextInt();\n\t\tint n=sc.nextInt();\n\t\tint[][] list=new int[n][2];\n\t\tint[] answer=new int[w];\n\n\t\tfor(int i=0; i<n; i++){\n\t\t\tString str=sc.next();\n\t\t\tString[] ab=str.split(\",\");\n\t\t\tlist[i][0]=Integer.parseInt(ab[0]);\n\t\t\tlist[i][1]=Integer.parseInt(ab[1]);\n\t\t}\n\n\n\n\n\t\tsc.close();\n\n\t\t//MyBLAS.Calc.pMat(list);\n\n\t\tfor(int i=1; i<=w; i++){\n\t\t\tint c=move(list,i);\n\t\t\tanswer[c-1]=i;\n\t\t}\n\n\t\tfor(int k=0; k<w; k++){\n\t\t\tSystem.out.println(answer[k]);\n\t\t}\n\n\n\n\t}\n\n\tpublic static int move(int[][] a,int b){\n\n\t\tfor(int i=0; i<a.length; i++){\n\t\t\tif(b==a[i][0]){\n\t\t\t\tb=a[i][1];\n\t\t\t}else if(b==a[i][1]){\n\t\t\t\tb=a[i][0];\n\t\t\t}\n\t\t}\n\t\treturn b;\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w=sc.nextInt();\n\t\tint n=sc.nextInt();\n\t\tint[][] list=new int[n][2];\n\t\tint[] answer=new int[w];\n\n\t\tfor(int i=0; i<n; i++){\n\t\t\tString str=sc.next();\n\t\t\tString[] ab=str.split(\",\");\n\t\t\tlist[i][0]=Integer.parseInt(ab[0]);\n\t\t\tlist[i][1]=Integer.parseInt(ab[1]);\n\t\t}\n\n\n\n\n\t\tsc.close();\n\n\t\t//MyBLAS.Calc.pMat(list);\n\n\t\tfor(int i=1; i<=w; i++){\n\t\t\tint c=move(list,i);\n\t\t\tanswer[c-1]=i;\n\t\t}\n\n\t\tfor(int k=0; k<w; k++){\n\t\t\tSystem.out.println(answer[k]);\n\t\t}\n\n\n\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w=sc.nextInt();\n\t\tint n=sc.nextInt();\n\t\tint[][] list=new int[n][2];\n\t\tint[] answer=new int[w];\n\n\t\tfor(int i=0; i<n; i++){\n\t\t\tString str=sc.next();\n\t\t\tString[] ab=str.split(\",\");\n\t\t\tlist[i][0]=Integer.parseInt(ab[0]);\n\t\t\tlist[i][1]=Integer.parseInt(ab[1]);\n\t\t}\n\n\n\n\n\t\tsc.close();\n\n\t\t//MyBLAS.Calc.pMat(list);\n\n\t\tfor(int i=1; i<=w; i++){\n\t\t\tint c=move(list,i);\n\t\t\tanswer[c-1]=i;\n\t\t}\n\n\t\tfor(int k=0; k<w; k++){\n\t\t\tSystem.out.println(answer[k]);\n\t\t}\n\n\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w=sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[][] list=new int[n][2];",
"list",
"new int[n][2]",
"n",
"2",
"int[] answer=new int[w];",
"answer",
"new int[w]",
"w",
"for(int i=0; i<n; i++){\n\t\t\tString str=sc.next();\n\t\t\tString[] ab=str.split(\",\");\n\t\t\tlist[i][0]=Integer.parseInt(ab[0]);\n\t\t\tlist[i][1]=Integer.parseInt(ab[1]);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString str=sc.next();\n\t\t\tString[] ab=str.split(\",\");\n\t\t\tlist[i][0]=Integer.parseInt(ab[0]);\n\t\t\tlist[i][1]=Integer.parseInt(ab[1]);\n\t\t}",
"{\n\t\t\tString str=sc.next();\n\t\t\tString[] ab=str.split(\",\");\n\t\t\tlist[i][0]=Integer.parseInt(ab[0]);\n\t\t\tlist[i][1]=Integer.parseInt(ab[1]);\n\t\t}",
"String str=sc.next();",
"str",
"sc.next()",
"sc.next",
"sc",
"String[] ab=str.split(\",\");",
"ab",
"str.split(\",\")",
"str.split",
"str",
"\",\"",
"list[i][0]=Integer.parseInt(ab[0])",
"list[i][0]",
"list[i]",
"list",
"i",
"0",
"Integer.parseInt(ab[0])",
"Integer.parseInt",
"Integer",
"ab[0]",
"ab",
"0",
"list[i][1]=Integer.parseInt(ab[1])",
"list[i][1]",
"list[i]",
"list",
"i",
"1",
"Integer.parseInt(ab[1])",
"Integer.parseInt",
"Integer",
"ab[1]",
"ab",
"1",
"sc.close()",
"sc.close",
"sc",
"for(int i=1; i<=w; i++){\n\t\t\tint c=move(list,i);\n\t\t\tanswer[c-1]=i;\n\t\t}",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tint c=move(list,i);\n\t\t\tanswer[c-1]=i;\n\t\t}",
"{\n\t\t\tint c=move(list,i);\n\t\t\tanswer[c-1]=i;\n\t\t}",
"int c=move(list,i);",
"c",
"move(list,i)",
"move",
"list",
"i",
"answer[c-1]=i",
"answer[c-1]",
"answer",
"c-1",
"c",
"1",
"i",
"for(int k=0; k<w; k++){\n\t\t\tSystem.out.println(answer[k]);\n\t\t}",
"int k=0;",
"int k=0;",
"k",
"0",
"k<w",
"k",
"w",
"k++",
"k++",
"k",
"{\n\t\t\tSystem.out.println(answer[k]);\n\t\t}",
"{\n\t\t\tSystem.out.println(answer[k]);\n\t\t}",
"System.out.println(answer[k])",
"System.out.println",
"System.out",
"System",
"System.out",
"answer[k]",
"answer",
"k",
"String[] args",
"args",
"public static int move(int[][] a,int b){\n\n\t\tfor(int i=0; i<a.length; i++){\n\t\t\tif(b==a[i][0]){\n\t\t\t\tb=a[i][1];\n\t\t\t}else if(b==a[i][1]){\n\t\t\t\tb=a[i][0];\n\t\t\t}\n\t\t}\n\t\treturn b;\n\t}",
"move",
"{\n\n\t\tfor(int i=0; i<a.length; i++){\n\t\t\tif(b==a[i][0]){\n\t\t\t\tb=a[i][1];\n\t\t\t}else if(b==a[i][1]){\n\t\t\t\tb=a[i][0];\n\t\t\t}\n\t\t}\n\t\treturn b;\n\t}",
"for(int i=0; i<a.length; i++){\n\t\t\tif(b==a[i][0]){\n\t\t\t\tb=a[i][1];\n\t\t\t}else if(b==a[i][1]){\n\t\t\t\tb=a[i][0];\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<a.length",
"i",
"a.length",
"a",
"a.length",
"i++",
"i++",
"i",
"{\n\t\t\tif(b==a[i][0]){\n\t\t\t\tb=a[i][1];\n\t\t\t}else if(b==a[i][1]){\n\t\t\t\tb=a[i][0];\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(b==a[i][0]){\n\t\t\t\tb=a[i][1];\n\t\t\t}else if(b==a[i][1]){\n\t\t\t\tb=a[i][0];\n\t\t\t}\n\t\t}",
"if(b==a[i][0]){\n\t\t\t\tb=a[i][1];\n\t\t\t}else if(b==a[i][1]){\n\t\t\t\tb=a[i][0];\n\t\t\t}",
"b==a[i][0]",
"b",
"a[i][0]",
"a[i]",
"a",
"i",
"0",
"{\n\t\t\t\tb=a[i][1];\n\t\t\t}",
"b=a[i][1]",
"b",
"a[i][1]",
"a[i]",
"a",
"i",
"1",
"if(b==a[i][1]){\n\t\t\t\tb=a[i][0];\n\t\t\t}",
"b==a[i][1]",
"b",
"a[i][1]",
"a[i]",
"a",
"i",
"1",
"{\n\t\t\t\tb=a[i][0];\n\t\t\t}",
"b=a[i][0]",
"b",
"a[i][0]",
"a[i]",
"a",
"i",
"0",
"return b;",
"b",
"int[][] a",
"a",
"int b",
"b",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w=sc.nextInt();\n\t\tint n=sc.nextInt();\n\t\tint[][] list=new int[n][2];\n\t\tint[] answer=new int[w];\n\n\t\tfor(int i=0; i<n; i++){\n\t\t\tString str=sc.next();\n\t\t\tString[] ab=str.split(\",\");\n\t\t\tlist[i][0]=Integer.parseInt(ab[0]);\n\t\t\tlist[i][1]=Integer.parseInt(ab[1]);\n\t\t}\n\n\n\n\n\t\tsc.close();\n\n\t\t//MyBLAS.Calc.pMat(list);\n\n\t\tfor(int i=1; i<=w; i++){\n\t\t\tint c=move(list,i);\n\t\t\tanswer[c-1]=i;\n\t\t}\n\n\t\tfor(int k=0; k<w; k++){\n\t\t\tSystem.out.println(answer[k]);\n\t\t}\n\n\n\n\t}\n\n\tpublic static int move(int[][] a,int b){\n\n\t\tfor(int i=0; i<a.length; i++){\n\t\t\tif(b==a[i][0]){\n\t\t\t\tb=a[i][1];\n\t\t\t}else if(b==a[i][1]){\n\t\t\t\tb=a[i][0];\n\t\t\t}\n\t\t}\n\t\treturn b;\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w=sc.nextInt();\n\t\tint n=sc.nextInt();\n\t\tint[][] list=new int[n][2];\n\t\tint[] answer=new int[w];\n\n\t\tfor(int i=0; i<n; i++){\n\t\t\tString str=sc.next();\n\t\t\tString[] ab=str.split(\",\");\n\t\t\tlist[i][0]=Integer.parseInt(ab[0]);\n\t\t\tlist[i][1]=Integer.parseInt(ab[1]);\n\t\t}\n\n\n\n\n\t\tsc.close();\n\n\t\t//MyBLAS.Calc.pMat(list);\n\n\t\tfor(int i=1; i<=w; i++){\n\t\t\tint c=move(list,i);\n\t\t\tanswer[c-1]=i;\n\t\t}\n\n\t\tfor(int k=0; k<w; k++){\n\t\t\tSystem.out.println(answer[k]);\n\t\t}\n\n\n\n\t}\n\n\tpublic static int move(int[][] a,int b){\n\n\t\tfor(int i=0; i<a.length; i++){\n\t\t\tif(b==a[i][0]){\n\t\t\t\tb=a[i][1];\n\t\t\t}else if(b==a[i][1]){\n\t\t\t\tb=a[i][0];\n\t\t\t}\n\t\t}\n\t\treturn b;\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int w=sc.nextInt();
int n=sc.nextInt();
int[][] list=new int[n][2];
int[] answer=new int[w];
for(int i=0; i<n; i++){
String str=sc.next();
String[] ab=str.split(",");
list[i][0]=Integer.parseInt(ab[0]);
list[i][1]=Integer.parseInt(ab[1]);
}
sc.close();
//MyBLAS.Calc.pMat(list);
for(int i=1; i<=w; i++){
int c=move(list,i);
answer[c-1]=i;
}
for(int k=0; k<w; k++){
System.out.println(answer[k]);
}
}
public static int move(int[][] a,int b){
for(int i=0; i<a.length; i++){
if(b==a[i][0]){
b=a[i][1];
}else if(b==a[i][1]){
b=a[i][0];
}
}
return b;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
0,
13,
4,
13,
13,
4,
18,
13,
18,
13,
17,
4,
18,
13,
18,
13,
17,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
40,
13,
40,
13,
0,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
29,
13,
23,
13,
23,
13,
23,
13,
10,
6,
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
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
41,
42
],
[
41,
43
],
[
36,
44
],
[
44,
45
],
[
45,
46
],
[
36,
47
],
[
48,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
53,
55
],
[
8,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
56,
64
],
[
64,
65
],
[
65,
66
],
[
56,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
71,
76
],
[
68,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
79,
81
],
[
79,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
85,
86
],
[
85,
87
],
[
79,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
91,
92
],
[
91,
93
],
[
8,
94
],
[
94,
95
],
[
95,
96
],
[
8,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
102,
103
],
[
102,
104
],
[
97,
105
],
[
105,
106
],
[
106,
107
],
[
97,
108
],
[
109,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
110,
115
],
[
115,
116
],
[
115,
117
],
[
6,
118
],
[
118,
119
],
[
155,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
123,
124
],
[
122,
125
],
[
125,
126
],
[
122,
127
],
[
127,
128
],
[
122,
129
],
[
129,
130
],
[
129,
131
],
[
131,
132
],
[
131,
133
],
[
122,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
134,
138
],
[
138,
139
],
[
138,
140
],
[
122,
141
],
[
141,
142
],
[
142,
143
],
[
142,
144
],
[
141,
145
],
[
122,
146
],
[
146,
147
],
[
120,
148
],
[
148,
149
],
[
120,
150
],
[
150,
151
],
[
120,
152
],
[
152,
153
],
[
0,
154
],
[
154,
155
],
[
154,
156
]
] | [
"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 w;\n\t\tint n;\n\t\tint a,b;\n\t\tshort tmp;\n\t\t\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\t\t\n\t\tint[] data = new int[w];\n\t\t\n\t\tfor(int i=0;i<w;i++){\n\t\t\tdata[i] = i+1;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] str = sc.next().split(\",\");\n\t\t\tdata = swap(data,Integer.parseInt(str[0]),Integer.parseInt(str[1]));\n\t\t}\n\t\tsc.close();\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(data[i]);\n\t\t}\n\t}\n\t\n\tstatic int[] swap(int[] dat,int a,int b){\n\t\tint temp;\n\t\t\n\t\t--a;\n\t\t--b;\n\t\t\n\t\ttemp = dat[a];\n\t\tdat[a] = dat[b];\n\t\tdat[b] = temp;\n\t\t\n\t\treturn dat;\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w;\n\t\tint n;\n\t\tint a,b;\n\t\tshort tmp;\n\t\t\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\t\t\n\t\tint[] data = new int[w];\n\t\t\n\t\tfor(int i=0;i<w;i++){\n\t\t\tdata[i] = i+1;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] str = sc.next().split(\",\");\n\t\t\tdata = swap(data,Integer.parseInt(str[0]),Integer.parseInt(str[1]));\n\t\t}\n\t\tsc.close();\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(data[i]);\n\t\t}\n\t}\n\t\n\tstatic int[] swap(int[] dat,int a,int b){\n\t\tint temp;\n\t\t\n\t\t--a;\n\t\t--b;\n\t\t\n\t\ttemp = dat[a];\n\t\tdat[a] = dat[b];\n\t\tdat[b] = temp;\n\t\t\n\t\treturn dat;\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w;\n\t\tint n;\n\t\tint a,b;\n\t\tshort tmp;\n\t\t\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\t\t\n\t\tint[] data = new int[w];\n\t\t\n\t\tfor(int i=0;i<w;i++){\n\t\t\tdata[i] = i+1;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] str = sc.next().split(\",\");\n\t\t\tdata = swap(data,Integer.parseInt(str[0]),Integer.parseInt(str[1]));\n\t\t}\n\t\tsc.close();\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(data[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w;\n\t\tint n;\n\t\tint a,b;\n\t\tshort tmp;\n\t\t\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\t\t\n\t\tint[] data = new int[w];\n\t\t\n\t\tfor(int i=0;i<w;i++){\n\t\t\tdata[i] = i+1;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] str = sc.next().split(\",\");\n\t\t\tdata = swap(data,Integer.parseInt(str[0]),Integer.parseInt(str[1]));\n\t\t}\n\t\tsc.close();\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(data[i]);\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w;",
"w",
"int n;",
"n",
"int a",
"a",
"b;",
"b",
"short tmp;",
"tmp",
"w = sc.nextInt()",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] data = new int[w];",
"data",
"new int[w]",
"w",
"for(int i=0;i<w;i++){\n\t\t\tdata[i] = i+1;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tdata[i] = i+1;\n\t\t}",
"{\n\t\t\tdata[i] = i+1;\n\t\t}",
"data[i] = i+1",
"data[i]",
"data",
"i",
"i+1",
"i",
"1",
"for(int i=0;i<n;i++){\n\t\t\tString[] str = sc.next().split(\",\");\n\t\t\tdata = swap(data,Integer.parseInt(str[0]),Integer.parseInt(str[1]));\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString[] str = sc.next().split(\",\");\n\t\t\tdata = swap(data,Integer.parseInt(str[0]),Integer.parseInt(str[1]));\n\t\t}",
"{\n\t\t\tString[] str = sc.next().split(\",\");\n\t\t\tdata = swap(data,Integer.parseInt(str[0]),Integer.parseInt(str[1]));\n\t\t}",
"String[] str = sc.next().split(\",\");",
"str",
"sc.next().split(\",\")",
"sc.next().split",
"sc.next()",
"sc.next",
"sc",
"\",\"",
"data = swap(data,Integer.parseInt(str[0]),Integer.parseInt(str[1]))",
"data",
"swap(data,Integer.parseInt(str[0]),Integer.parseInt(str[1]))",
"swap",
"data",
"Integer.parseInt(str[0])",
"Integer.parseInt",
"Integer",
"str[0]",
"str",
"0",
"Integer.parseInt(str[1])",
"Integer.parseInt",
"Integer",
"str[1]",
"str",
"1",
"sc.close()",
"sc.close",
"sc",
"for(int i=0;i<w;i++){\n\t\t\tSystem.out.println(data[i]);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(data[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(data[i]);\n\t\t}",
"System.out.println(data[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"data[i]",
"data",
"i",
"String[] args",
"args",
"static int[] swap(int[] dat,int a,int b){\n\t\tint temp;\n\t\t\n\t\t--a;\n\t\t--b;\n\t\t\n\t\ttemp = dat[a];\n\t\tdat[a] = dat[b];\n\t\tdat[b] = temp;\n\t\t\n\t\treturn dat;\n\t}",
"swap",
"{\n\t\tint temp;\n\t\t\n\t\t--a;\n\t\t--b;\n\t\t\n\t\ttemp = dat[a];\n\t\tdat[a] = dat[b];\n\t\tdat[b] = temp;\n\t\t\n\t\treturn dat;\n\t}",
"int temp;",
"temp",
"--a",
"a",
"--b",
"b",
"temp = dat[a]",
"temp",
"dat[a]",
"dat",
"a",
"dat[a] = dat[b]",
"dat[a]",
"dat",
"a",
"dat[b]",
"dat",
"b",
"dat[b] = temp",
"dat[b]",
"dat",
"b",
"temp",
"return dat;",
"dat",
"int[] dat",
"dat",
"int a",
"a",
"int b",
"b",
"public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w;\n\t\tint n;\n\t\tint a,b;\n\t\tshort tmp;\n\t\t\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\t\t\n\t\tint[] data = new int[w];\n\t\t\n\t\tfor(int i=0;i<w;i++){\n\t\t\tdata[i] = i+1;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] str = sc.next().split(\",\");\n\t\t\tdata = swap(data,Integer.parseInt(str[0]),Integer.parseInt(str[1]));\n\t\t}\n\t\tsc.close();\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(data[i]);\n\t\t}\n\t}\n\t\n\tstatic int[] swap(int[] dat,int a,int b){\n\t\tint temp;\n\t\t\n\t\t--a;\n\t\t--b;\n\t\t\n\t\ttemp = dat[a];\n\t\tdat[a] = dat[b];\n\t\tdat[b] = temp;\n\t\t\n\t\treturn dat;\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w;\n\t\tint n;\n\t\tint a,b;\n\t\tshort tmp;\n\t\t\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\t\t\n\t\tint[] data = new int[w];\n\t\t\n\t\tfor(int i=0;i<w;i++){\n\t\t\tdata[i] = i+1;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] str = sc.next().split(\",\");\n\t\t\tdata = swap(data,Integer.parseInt(str[0]),Integer.parseInt(str[1]));\n\t\t}\n\t\tsc.close();\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(data[i]);\n\t\t}\n\t}\n\t\n\tstatic int[] swap(int[] dat,int a,int b){\n\t\tint temp;\n\t\t\n\t\t--a;\n\t\t--b;\n\t\t\n\t\ttemp = dat[a];\n\t\tdat[a] = dat[b];\n\t\tdat[b] = temp;\n\t\t\n\t\treturn dat;\n\t}\n}",
"Main"
] | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int w;
int n;
int a,b;
short tmp;
w = sc.nextInt();
n = sc.nextInt();
int[] data = new int[w];
for(int i=0;i<w;i++){
data[i] = i+1;
}
for(int i=0;i<n;i++){
String[] str = sc.next().split(",");
data = swap(data,Integer.parseInt(str[0]),Integer.parseInt(str[1]));
}
sc.close();
for(int i=0;i<w;i++){
System.out.println(data[i]);
}
}
static int[] swap(int[] dat,int a,int b){
int temp;
--a;
--b;
temp = dat[a];
dat[a] = dat[b];
dat[b] = temp;
return dat;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
13,
13,
4,
18,
4,
18,
13,
17,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
23,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
8,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
46,
48
],
[
8,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
54,
55
],
[
54,
56
],
[
49,
57
],
[
57,
58
],
[
58,
59
],
[
49,
60
],
[
61,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
62,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
65,
70
],
[
8,
71
],
[
71,
72
],
[
72,
73
],
[
8,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
79,
80
],
[
79,
81
],
[
74,
82
],
[
82,
83
],
[
83,
84
],
[
74,
85
],
[
86,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
87,
92
],
[
92,
93
],
[
92,
94
],
[
6,
95
],
[
95,
96
],
[
4,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
106,
107
],
[
106,
108
],
[
102,
109
],
[
99,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
113,
116
],
[
116,
117
],
[
116,
118
],
[
112,
119
],
[
99,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
122,
124
],
[
99,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
125,
129
],
[
129,
130
],
[
129,
131
],
[
99,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
132,
136
],
[
97,
137
],
[
137,
138
],
[
97,
139
],
[
139,
140
]
] | [
"import java.util.*;\n\nclass Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] lot = new int[w];\n\t\tsc.nextLine();\n\t\tfor(int i = 0 ; i < w ; i++){\n\t\t\tlot[i] = i+1;\n\t\t}\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tswap(lot, sc.nextLine().split(\",\"));\n\t\t}\n\t\tsc.close();\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(lot[i]);\n\t\t}\n\t}\n\tstatic void swap(int[] source, String[] s){\n\t\tint a = Integer.parseInt(s[0])-1;\n\t\tint b = Integer.parseInt(s[1])-1;\n\t\tint tmp = source[a];\n\t\tsource[a] = source[b];\n\t\tsource[b] = tmp;\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] lot = new int[w];\n\t\tsc.nextLine();\n\t\tfor(int i = 0 ; i < w ; i++){\n\t\t\tlot[i] = i+1;\n\t\t}\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tswap(lot, sc.nextLine().split(\",\"));\n\t\t}\n\t\tsc.close();\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(lot[i]);\n\t\t}\n\t}\n\tstatic void swap(int[] source, String[] s){\n\t\tint a = Integer.parseInt(s[0])-1;\n\t\tint b = Integer.parseInt(s[1])-1;\n\t\tint tmp = source[a];\n\t\tsource[a] = source[b];\n\t\tsource[b] = tmp;\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] lot = new int[w];\n\t\tsc.nextLine();\n\t\tfor(int i = 0 ; i < w ; i++){\n\t\t\tlot[i] = i+1;\n\t\t}\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tswap(lot, sc.nextLine().split(\",\"));\n\t\t}\n\t\tsc.close();\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(lot[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] lot = new int[w];\n\t\tsc.nextLine();\n\t\tfor(int i = 0 ; i < w ; i++){\n\t\t\tlot[i] = i+1;\n\t\t}\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tswap(lot, sc.nextLine().split(\",\"));\n\t\t}\n\t\tsc.close();\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(lot[i]);\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] lot = new int[w];",
"lot",
"new int[w]",
"w",
"sc.nextLine()",
"sc.nextLine",
"sc",
"for(int i = 0 ; i < w ; i++){\n\t\t\tlot[i] = i+1;\n\t\t}",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tlot[i] = i+1;\n\t\t}",
"{\n\t\t\tlot[i] = i+1;\n\t\t}",
"lot[i] = i+1",
"lot[i]",
"lot",
"i",
"i+1",
"i",
"1",
"for(int i = 0; i < n; i++){\n\t\t\tswap(lot, sc.nextLine().split(\",\"));\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tswap(lot, sc.nextLine().split(\",\"));\n\t\t}",
"{\n\t\t\tswap(lot, sc.nextLine().split(\",\"));\n\t\t}",
"swap(lot, sc.nextLine().split(\",\"))",
"swap",
"lot",
"sc.nextLine().split(\",\")",
"sc.nextLine().split",
"sc.nextLine()",
"sc.nextLine",
"sc",
"\",\"",
"sc.close()",
"sc.close",
"sc",
"for(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(lot[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(lot[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(lot[i]);\n\t\t}",
"System.out.println(lot[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"lot[i]",
"lot",
"i",
"String[] args",
"args",
"static void swap(int[] source, String[] s){\n\t\tint a = Integer.parseInt(s[0])-1;\n\t\tint b = Integer.parseInt(s[1])-1;\n\t\tint tmp = source[a];\n\t\tsource[a] = source[b];\n\t\tsource[b] = tmp;\n\t}",
"swap",
"{\n\t\tint a = Integer.parseInt(s[0])-1;\n\t\tint b = Integer.parseInt(s[1])-1;\n\t\tint tmp = source[a];\n\t\tsource[a] = source[b];\n\t\tsource[b] = tmp;\n\t}",
"int a = Integer.parseInt(s[0])-1;",
"a",
"Integer.parseInt(s[0])-1",
"Integer.parseInt(s[0])",
"Integer.parseInt",
"Integer",
"s[0]",
"s",
"0",
"1",
"int b = Integer.parseInt(s[1])-1;",
"b",
"Integer.parseInt(s[1])-1",
"Integer.parseInt(s[1])",
"Integer.parseInt",
"Integer",
"s[1]",
"s",
"1",
"1",
"int tmp = source[a];",
"tmp",
"source[a]",
"source",
"a",
"source[a] = source[b]",
"source[a]",
"source",
"a",
"source[b]",
"source",
"b",
"source[b] = tmp",
"source[b]",
"source",
"b",
"tmp",
"int[] source",
"source",
"String[] s",
"s"
] | import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int w = sc.nextInt();
int n = sc.nextInt();
int[] lot = new int[w];
sc.nextLine();
for(int i = 0 ; i < w ; i++){
lot[i] = i+1;
}
for(int i = 0; i < n; i++){
swap(lot, sc.nextLine().split(","));
}
sc.close();
for(int i = 0; i < w; i++){
System.out.println(lot[i]);
}
}
static void swap(int[] source, String[] s){
int a = Integer.parseInt(s[0])-1;
int b = Integer.parseInt(s[1])-1;
int tmp = source[a];
source[a] = source[b];
source[b] = tmp;
}
} |
[
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,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
18,
18,
13,
13,
2,
18,
13,
13,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
126,
5
],
[
126,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
26,
27
],
[
26,
28
],
[
21,
29
],
[
29,
30
],
[
30,
31
],
[
21,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
33,
37
],
[
8,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
8,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
48,
49
],
[
48,
50
],
[
43,
51
],
[
51,
52
],
[
52,
53
],
[
43,
54
],
[
55,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
58,
63
],
[
55,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
70,
71
],
[
70,
72
],
[
66,
73
],
[
55,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
80,
81
],
[
80,
82
],
[
76,
83
],
[
55,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
86,
88
],
[
55,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
93,
94
],
[
93,
95
],
[
55,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
8,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
101,
106
],
[
106,
107
],
[
106,
108
],
[
101,
109
],
[
109,
110
],
[
110,
111
],
[
101,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
113,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
118,
122
],
[
6,
123
],
[
123,
124
],
[
0,
125
],
[
125,
126
],
[
125,
127
]
] | [
"import java.util.*;\npublic class Main {\n\tpublic static void main(String args[]){\n\t\tScanner s=new Scanner(System.in);\n\t\tint n=s.nextInt();\n\t\tint[] m=new int[n];\n\t\tfor(int i=0;i<n;i++)m[i]=i;\n\t\tint b=s.nextInt();\n\t\tfor(int i=0;i<b;i++){\n String[] str=s.next().split(\",\");\n int q=Integer.parseInt(str[0])-1;\n int w=Integer.parseInt(str[1])-1;\n\t\t\tint temp=m[q];\n\t\t\tm[q]=m[w];\n\t\t\tm[w]=temp;\n\t\t}\n\t\tfor(int i=0;i<n;i++)System.out.println(m[i]+1);\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String args[]){\n\t\tScanner s=new Scanner(System.in);\n\t\tint n=s.nextInt();\n\t\tint[] m=new int[n];\n\t\tfor(int i=0;i<n;i++)m[i]=i;\n\t\tint b=s.nextInt();\n\t\tfor(int i=0;i<b;i++){\n String[] str=s.next().split(\",\");\n int q=Integer.parseInt(str[0])-1;\n int w=Integer.parseInt(str[1])-1;\n\t\t\tint temp=m[q];\n\t\t\tm[q]=m[w];\n\t\t\tm[w]=temp;\n\t\t}\n\t\tfor(int i=0;i<n;i++)System.out.println(m[i]+1);\n\t}\n}",
"Main",
"public static void main(String args[]){\n\t\tScanner s=new Scanner(System.in);\n\t\tint n=s.nextInt();\n\t\tint[] m=new int[n];\n\t\tfor(int i=0;i<n;i++)m[i]=i;\n\t\tint b=s.nextInt();\n\t\tfor(int i=0;i<b;i++){\n String[] str=s.next().split(\",\");\n int q=Integer.parseInt(str[0])-1;\n int w=Integer.parseInt(str[1])-1;\n\t\t\tint temp=m[q];\n\t\t\tm[q]=m[w];\n\t\t\tm[w]=temp;\n\t\t}\n\t\tfor(int i=0;i<n;i++)System.out.println(m[i]+1);\n\t}",
"main",
"{\n\t\tScanner s=new Scanner(System.in);\n\t\tint n=s.nextInt();\n\t\tint[] m=new int[n];\n\t\tfor(int i=0;i<n;i++)m[i]=i;\n\t\tint b=s.nextInt();\n\t\tfor(int i=0;i<b;i++){\n String[] str=s.next().split(\",\");\n int q=Integer.parseInt(str[0])-1;\n int w=Integer.parseInt(str[1])-1;\n\t\t\tint temp=m[q];\n\t\t\tm[q]=m[w];\n\t\t\tm[w]=temp;\n\t\t}\n\t\tfor(int i=0;i<n;i++)System.out.println(m[i]+1);\n\t}",
"Scanner s=new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"int n=s.nextInt();",
"n",
"s.nextInt()",
"s.nextInt",
"s",
"int[] m=new int[n];",
"m",
"new int[n]",
"n",
"for(int i=0;i<n;i++)m[i]=i;",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"m[i]=i;",
"m[i]=i",
"m[i]",
"m",
"i",
"i",
"int b=s.nextInt();",
"b",
"s.nextInt()",
"s.nextInt",
"s",
"for(int i=0;i<b;i++){\n String[] str=s.next().split(\",\");\n int q=Integer.parseInt(str[0])-1;\n int w=Integer.parseInt(str[1])-1;\n\t\t\tint temp=m[q];\n\t\t\tm[q]=m[w];\n\t\t\tm[w]=temp;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<b",
"i",
"b",
"i++",
"i++",
"i",
"{\n String[] str=s.next().split(\",\");\n int q=Integer.parseInt(str[0])-1;\n int w=Integer.parseInt(str[1])-1;\n\t\t\tint temp=m[q];\n\t\t\tm[q]=m[w];\n\t\t\tm[w]=temp;\n\t\t}",
"{\n String[] str=s.next().split(\",\");\n int q=Integer.parseInt(str[0])-1;\n int w=Integer.parseInt(str[1])-1;\n\t\t\tint temp=m[q];\n\t\t\tm[q]=m[w];\n\t\t\tm[w]=temp;\n\t\t}",
"String[] str=s.next().split(\",\");",
"str",
"s.next().split(\",\")",
"s.next().split",
"s.next()",
"s.next",
"s",
"\",\"",
"int q=Integer.parseInt(str[0])-1;",
"q",
"Integer.parseInt(str[0])-1",
"Integer.parseInt(str[0])",
"Integer.parseInt",
"Integer",
"str[0]",
"str",
"0",
"1",
"int w=Integer.parseInt(str[1])-1;",
"w",
"Integer.parseInt(str[1])-1",
"Integer.parseInt(str[1])",
"Integer.parseInt",
"Integer",
"str[1]",
"str",
"1",
"1",
"int temp=m[q];",
"temp",
"m[q]",
"m",
"q",
"m[q]=m[w]",
"m[q]",
"m",
"q",
"m[w]",
"m",
"w",
"m[w]=temp",
"m[w]",
"m",
"w",
"temp",
"for(int i=0;i<n;i++)System.out.println(m[i]+1);",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"System.out.println(m[i]+1);",
"System.out.println(m[i]+1)",
"System.out.println",
"System.out",
"System",
"System.out",
"m[i]+1",
"m[i]",
"m",
"i",
"1",
"String args[]",
"args",
"public class Main {\n\tpublic static void main(String args[]){\n\t\tScanner s=new Scanner(System.in);\n\t\tint n=s.nextInt();\n\t\tint[] m=new int[n];\n\t\tfor(int i=0;i<n;i++)m[i]=i;\n\t\tint b=s.nextInt();\n\t\tfor(int i=0;i<b;i++){\n String[] str=s.next().split(\",\");\n int q=Integer.parseInt(str[0])-1;\n int w=Integer.parseInt(str[1])-1;\n\t\t\tint temp=m[q];\n\t\t\tm[q]=m[w];\n\t\t\tm[w]=temp;\n\t\t}\n\t\tfor(int i=0;i<n;i++)System.out.println(m[i]+1);\n\t}\n}",
"public class Main {\n\tpublic static void main(String args[]){\n\t\tScanner s=new Scanner(System.in);\n\t\tint n=s.nextInt();\n\t\tint[] m=new int[n];\n\t\tfor(int i=0;i<n;i++)m[i]=i;\n\t\tint b=s.nextInt();\n\t\tfor(int i=0;i<b;i++){\n String[] str=s.next().split(\",\");\n int q=Integer.parseInt(str[0])-1;\n int w=Integer.parseInt(str[1])-1;\n\t\t\tint temp=m[q];\n\t\t\tm[q]=m[w];\n\t\t\tm[w]=temp;\n\t\t}\n\t\tfor(int i=0;i<n;i++)System.out.println(m[i]+1);\n\t}\n}",
"Main"
] | import java.util.*;
public class Main {
public static void main(String args[]){
Scanner s=new Scanner(System.in);
int n=s.nextInt();
int[] m=new int[n];
for(int i=0;i<n;i++)m[i]=i;
int b=s.nextInt();
for(int i=0;i<b;i++){
String[] str=s.next().split(",");
int q=Integer.parseInt(str[0])-1;
int w=Integer.parseInt(str[1])-1;
int temp=m[q];
m[q]=m[w];
m[w]=temp;
}
for(int i=0;i<n;i++)System.out.println(m[i]+1);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
135,
8
],
[
135,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
11,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
11,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
11,
40
],
[
40,
41
],
[
40,
42
],
[
43,
44
],
[
43,
45
],
[
11,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
11,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
68,
69
],
[
68,
70
],
[
63,
71
],
[
71,
72
],
[
72,
73
],
[
63,
74
],
[
75,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
84,
85
],
[
85,
86
],
[
75,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
92,
93
],
[
93,
94
],
[
75,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
97,
99
],
[
75,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
104
],
[
104,
105
],
[
104,
106
],
[
75,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
107,
111
],
[
11,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
112,
117
],
[
117,
118
],
[
117,
119
],
[
112,
120
],
[
120,
121
],
[
121,
122
],
[
112,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
124,
129
],
[
129,
130
],
[
129,
131
],
[
9,
132
],
[
132,
133
],
[
0,
134
],
[
134,
135
],
[
134,
136
]
] | [
"import java.util.*;\nimport java.io.*;\npublic class Main{\n public static void main(String[] args)throws IOException{\n\tInputStreamReader isr = new InputStreamReader(System.in);\n\t\tBufferedReader br=new BufferedReader(isr);\n\t\tString ad=br.readLine();\n\t\tString bd=br.readLine();\n\t\tint w = Integer.parseInt(ad);\n\t\tint n = Integer.parseInt(bd);\n\t\tint[] amida=new int[w+1];\n\t\tfor(int i=1;i<=w;i++)\n\t\t amida[i]=i;\n\t\tfor(int i=0;i<n;i++){\n\t\tStringTokenizer st = new StringTokenizer(br.readLine(),\",\");\n\t\tint a=Integer.parseInt(st.nextToken());\n\t\tint b=Integer.parseInt(st.nextToken());\n\t\tint t=amida[a];\n\t\tamida[a]=amida[b];\n\t\tamida[b]=t;\n\t\t}\n\t\tfor(int i=1;i<=w;i++)\n\t\t System.out.println(amida[i]);\n\t\t\n }\n \n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main{\n public static void main(String[] args)throws IOException{\n\tInputStreamReader isr = new InputStreamReader(System.in);\n\t\tBufferedReader br=new BufferedReader(isr);\n\t\tString ad=br.readLine();\n\t\tString bd=br.readLine();\n\t\tint w = Integer.parseInt(ad);\n\t\tint n = Integer.parseInt(bd);\n\t\tint[] amida=new int[w+1];\n\t\tfor(int i=1;i<=w;i++)\n\t\t amida[i]=i;\n\t\tfor(int i=0;i<n;i++){\n\t\tStringTokenizer st = new StringTokenizer(br.readLine(),\",\");\n\t\tint a=Integer.parseInt(st.nextToken());\n\t\tint b=Integer.parseInt(st.nextToken());\n\t\tint t=amida[a];\n\t\tamida[a]=amida[b];\n\t\tamida[b]=t;\n\t\t}\n\t\tfor(int i=1;i<=w;i++)\n\t\t System.out.println(amida[i]);\n\t\t\n }\n \n}",
"Main",
"public static void main(String[] args)throws IOException{\n\tInputStreamReader isr = new InputStreamReader(System.in);\n\t\tBufferedReader br=new BufferedReader(isr);\n\t\tString ad=br.readLine();\n\t\tString bd=br.readLine();\n\t\tint w = Integer.parseInt(ad);\n\t\tint n = Integer.parseInt(bd);\n\t\tint[] amida=new int[w+1];\n\t\tfor(int i=1;i<=w;i++)\n\t\t amida[i]=i;\n\t\tfor(int i=0;i<n;i++){\n\t\tStringTokenizer st = new StringTokenizer(br.readLine(),\",\");\n\t\tint a=Integer.parseInt(st.nextToken());\n\t\tint b=Integer.parseInt(st.nextToken());\n\t\tint t=amida[a];\n\t\tamida[a]=amida[b];\n\t\tamida[b]=t;\n\t\t}\n\t\tfor(int i=1;i<=w;i++)\n\t\t System.out.println(amida[i]);\n\t\t\n }",
"main",
"{\n\tInputStreamReader isr = new InputStreamReader(System.in);\n\t\tBufferedReader br=new BufferedReader(isr);\n\t\tString ad=br.readLine();\n\t\tString bd=br.readLine();\n\t\tint w = Integer.parseInt(ad);\n\t\tint n = Integer.parseInt(bd);\n\t\tint[] amida=new int[w+1];\n\t\tfor(int i=1;i<=w;i++)\n\t\t amida[i]=i;\n\t\tfor(int i=0;i<n;i++){\n\t\tStringTokenizer st = new StringTokenizer(br.readLine(),\",\");\n\t\tint a=Integer.parseInt(st.nextToken());\n\t\tint b=Integer.parseInt(st.nextToken());\n\t\tint t=amida[a];\n\t\tamida[a]=amida[b];\n\t\tamida[b]=t;\n\t\t}\n\t\tfor(int i=1;i<=w;i++)\n\t\t System.out.println(amida[i]);\n\t\t\n }",
"InputStreamReader isr = new InputStreamReader(System.in);",
"isr",
"new InputStreamReader(System.in)",
"BufferedReader br=new BufferedReader(isr);",
"br",
"new BufferedReader(isr)",
"String ad=br.readLine();",
"ad",
"br.readLine()",
"br.readLine",
"br",
"String bd=br.readLine();",
"bd",
"br.readLine()",
"br.readLine",
"br",
"int w = Integer.parseInt(ad);",
"w",
"Integer.parseInt(ad)",
"Integer.parseInt",
"Integer",
"ad",
"int n = Integer.parseInt(bd);",
"n",
"Integer.parseInt(bd)",
"Integer.parseInt",
"Integer",
"bd",
"int[] amida=new int[w+1];",
"amida",
"new int[w+1]",
"w+1",
"w",
"1",
"for(int i=1;i<=w;i++)\n\t\t amida[i]=i;",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=w",
"i",
"w",
"i++",
"i++",
"i",
"amida[i]=i;",
"amida[i]=i",
"amida[i]",
"amida",
"i",
"i",
"for(int i=0;i<n;i++){\n\t\tStringTokenizer st = new StringTokenizer(br.readLine(),\",\");\n\t\tint a=Integer.parseInt(st.nextToken());\n\t\tint b=Integer.parseInt(st.nextToken());\n\t\tint t=amida[a];\n\t\tamida[a]=amida[b];\n\t\tamida[b]=t;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\tStringTokenizer st = new StringTokenizer(br.readLine(),\",\");\n\t\tint a=Integer.parseInt(st.nextToken());\n\t\tint b=Integer.parseInt(st.nextToken());\n\t\tint t=amida[a];\n\t\tamida[a]=amida[b];\n\t\tamida[b]=t;\n\t\t}",
"{\n\t\tStringTokenizer st = new StringTokenizer(br.readLine(),\",\");\n\t\tint a=Integer.parseInt(st.nextToken());\n\t\tint b=Integer.parseInt(st.nextToken());\n\t\tint t=amida[a];\n\t\tamida[a]=amida[b];\n\t\tamida[b]=t;\n\t\t}",
"StringTokenizer st = new StringTokenizer(br.readLine(),\",\");",
"st",
"new StringTokenizer(br.readLine(),\",\")",
"int a=Integer.parseInt(st.nextToken());",
"a",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"int b=Integer.parseInt(st.nextToken());",
"b",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"int t=amida[a];",
"t",
"amida[a]",
"amida",
"a",
"amida[a]=amida[b]",
"amida[a]",
"amida",
"a",
"amida[b]",
"amida",
"b",
"amida[b]=t",
"amida[b]",
"amida",
"b",
"t",
"for(int i=1;i<=w;i++)\n\t\t System.out.println(amida[i]);",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=w",
"i",
"w",
"i++",
"i++",
"i",
"System.out.println(amida[i]);",
"System.out.println(amida[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"amida[i]",
"amida",
"i",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args)throws IOException{\n\tInputStreamReader isr = new InputStreamReader(System.in);\n\t\tBufferedReader br=new BufferedReader(isr);\n\t\tString ad=br.readLine();\n\t\tString bd=br.readLine();\n\t\tint w = Integer.parseInt(ad);\n\t\tint n = Integer.parseInt(bd);\n\t\tint[] amida=new int[w+1];\n\t\tfor(int i=1;i<=w;i++)\n\t\t amida[i]=i;\n\t\tfor(int i=0;i<n;i++){\n\t\tStringTokenizer st = new StringTokenizer(br.readLine(),\",\");\n\t\tint a=Integer.parseInt(st.nextToken());\n\t\tint b=Integer.parseInt(st.nextToken());\n\t\tint t=amida[a];\n\t\tamida[a]=amida[b];\n\t\tamida[b]=t;\n\t\t}\n\t\tfor(int i=1;i<=w;i++)\n\t\t System.out.println(amida[i]);\n\t\t\n }\n \n}",
"public class Main{\n public static void main(String[] args)throws IOException{\n\tInputStreamReader isr = new InputStreamReader(System.in);\n\t\tBufferedReader br=new BufferedReader(isr);\n\t\tString ad=br.readLine();\n\t\tString bd=br.readLine();\n\t\tint w = Integer.parseInt(ad);\n\t\tint n = Integer.parseInt(bd);\n\t\tint[] amida=new int[w+1];\n\t\tfor(int i=1;i<=w;i++)\n\t\t amida[i]=i;\n\t\tfor(int i=0;i<n;i++){\n\t\tStringTokenizer st = new StringTokenizer(br.readLine(),\",\");\n\t\tint a=Integer.parseInt(st.nextToken());\n\t\tint b=Integer.parseInt(st.nextToken());\n\t\tint t=amida[a];\n\t\tamida[a]=amida[b];\n\t\tamida[b]=t;\n\t\t}\n\t\tfor(int i=1;i<=w;i++)\n\t\t System.out.println(amida[i]);\n\t\t\n }\n \n}",
"Main"
] | import java.util.*;
import java.io.*;
public class Main{
public static void main(String[] args)throws IOException{
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br=new BufferedReader(isr);
String ad=br.readLine();
String bd=br.readLine();
int w = Integer.parseInt(ad);
int n = Integer.parseInt(bd);
int[] amida=new int[w+1];
for(int i=1;i<=w;i++)
amida[i]=i;
for(int i=0;i<n;i++){
StringTokenizer st = new StringTokenizer(br.readLine(),",");
int a=Integer.parseInt(st.nextToken());
int b=Integer.parseInt(st.nextToken());
int t=amida[a];
amida[a]=amida[b];
amida[b]=t;
}
for(int i=1;i<=w;i++)
System.out.println(amida[i]);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
0,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
0,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
17,
41,
13,
20,
17,
0,
18,
13,
17,
4,
18,
13,
18,
13,
17,
0,
18,
13,
17,
4,
18,
13,
18,
13,
17,
4,
13,
13,
18,
13,
17,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
0,
13,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
13,
29,
23,
13,
23,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
185,
11
],
[
185,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
14,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
27,
30
],
[
14,
31
],
[
31,
32
],
[
31,
33
],
[
14,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
47,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
52,
54
],
[
14,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
14,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
14,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
71,
72
],
[
71,
73
],
[
66,
74
],
[
74,
75
],
[
75,
76
],
[
66,
77
],
[
78,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
78,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
86,
90
],
[
78,
91
],
[
91,
92
],
[
91,
93
],
[
78,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
102,
103
],
[
102,
104
],
[
78,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
105,
109
],
[
109,
110
],
[
110,
111
],
[
109,
112
],
[
112,
113
],
[
112,
114
],
[
78,
115
],
[
115,
116
],
[
115,
117
],
[
115,
118
],
[
118,
119
],
[
118,
120
],
[
115,
121
],
[
121,
122
],
[
121,
123
],
[
14,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
124,
129
],
[
129,
130
],
[
129,
131
],
[
124,
132
],
[
132,
133
],
[
133,
134
],
[
124,
135
],
[
136,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
137,
142
],
[
142,
143
],
[
142,
144
],
[
12,
145
],
[
145,
146
],
[
185,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
150,
151
],
[
149,
152
],
[
152,
153
],
[
152,
154
],
[
154,
155
],
[
154,
156
],
[
156,
157
],
[
156,
158
],
[
149,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
162,
163
],
[
162,
164
],
[
159,
165
],
[
165,
166
],
[
165,
167
],
[
167,
168
],
[
167,
169
],
[
149,
170
],
[
170,
171
],
[
171,
172
],
[
171,
173
],
[
173,
174
],
[
173,
175
],
[
170,
176
],
[
149,
177
],
[
147,
178
],
[
178,
179
],
[
147,
180
],
[
180,
181
],
[
147,
182
],
[
182,
183
],
[
0,
184
],
[
184,
185
],
[
184,
186
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t//Input Initialize\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tstr = br.readLine();\n\t\tint Nver = Integer.parseInt(str);\n\t\tint[] Ver = new int[Nver];\n\t\tfor (int i = 0; i < Nver; i++) {\n\t\t\tVer[i] = i + 1;\n\t\t}\n\n\t\tstr =br.readLine();\n\t\tint Nhor = Integer.parseInt(str);\n\n\t\tfor (int i = 0; i < Nhor; i++) {\n\t\t\t//Input swap\n\t\t\tstr = br.readLine();\n\t\t\tString[] tmp = str.split(\",\", 0);\n\t\t\tint[] SW = new int[2];\n\t\t\tSW[0] = Integer.parseInt(tmp[0]);\n\t\t\tSW[1] = Integer.parseInt(tmp[1]);\n\n\t\t\t//Swap\n\t\t\tswap(Ver, SW[0], SW[1]);\n\n\t\t}\n\n\t\tfor (int i = 0; i < Nver; i++) {\n\t\t\tSystem.out.println(Ver[i]);\n\t\t}\n\t}\n\n\tprivate static void swap(int[] N, int a, int b) {\n\t\tint tmp;\n\t\ttmp = N[a-1]; N[a-1] = N[b-1]; N[b-1] = tmp;\n\t\treturn;\n\t}\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t//Input Initialize\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tstr = br.readLine();\n\t\tint Nver = Integer.parseInt(str);\n\t\tint[] Ver = new int[Nver];\n\t\tfor (int i = 0; i < Nver; i++) {\n\t\t\tVer[i] = i + 1;\n\t\t}\n\n\t\tstr =br.readLine();\n\t\tint Nhor = Integer.parseInt(str);\n\n\t\tfor (int i = 0; i < Nhor; i++) {\n\t\t\t//Input swap\n\t\t\tstr = br.readLine();\n\t\t\tString[] tmp = str.split(\",\", 0);\n\t\t\tint[] SW = new int[2];\n\t\t\tSW[0] = Integer.parseInt(tmp[0]);\n\t\t\tSW[1] = Integer.parseInt(tmp[1]);\n\n\t\t\t//Swap\n\t\t\tswap(Ver, SW[0], SW[1]);\n\n\t\t}\n\n\t\tfor (int i = 0; i < Nver; i++) {\n\t\t\tSystem.out.println(Ver[i]);\n\t\t}\n\t}\n\n\tprivate static void swap(int[] N, int a, int b) {\n\t\tint tmp;\n\t\ttmp = N[a-1]; N[a-1] = N[b-1]; N[b-1] = tmp;\n\t\treturn;\n\t}\n\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\t\t//Input Initialize\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tstr = br.readLine();\n\t\tint Nver = Integer.parseInt(str);\n\t\tint[] Ver = new int[Nver];\n\t\tfor (int i = 0; i < Nver; i++) {\n\t\t\tVer[i] = i + 1;\n\t\t}\n\n\t\tstr =br.readLine();\n\t\tint Nhor = Integer.parseInt(str);\n\n\t\tfor (int i = 0; i < Nhor; i++) {\n\t\t\t//Input swap\n\t\t\tstr = br.readLine();\n\t\t\tString[] tmp = str.split(\",\", 0);\n\t\t\tint[] SW = new int[2];\n\t\t\tSW[0] = Integer.parseInt(tmp[0]);\n\t\t\tSW[1] = Integer.parseInt(tmp[1]);\n\n\t\t\t//Swap\n\t\t\tswap(Ver, SW[0], SW[1]);\n\n\t\t}\n\n\t\tfor (int i = 0; i < Nver; i++) {\n\t\t\tSystem.out.println(Ver[i]);\n\t\t}\n\t}",
"main",
"{\n\t\t//Input Initialize\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tstr = br.readLine();\n\t\tint Nver = Integer.parseInt(str);\n\t\tint[] Ver = new int[Nver];\n\t\tfor (int i = 0; i < Nver; i++) {\n\t\t\tVer[i] = i + 1;\n\t\t}\n\n\t\tstr =br.readLine();\n\t\tint Nhor = Integer.parseInt(str);\n\n\t\tfor (int i = 0; i < Nhor; i++) {\n\t\t\t//Input swap\n\t\t\tstr = br.readLine();\n\t\t\tString[] tmp = str.split(\",\", 0);\n\t\t\tint[] SW = new int[2];\n\t\t\tSW[0] = Integer.parseInt(tmp[0]);\n\t\t\tSW[1] = Integer.parseInt(tmp[1]);\n\n\t\t\t//Swap\n\t\t\tswap(Ver, SW[0], SW[1]);\n\n\t\t}\n\n\t\tfor (int i = 0; i < Nver; i++) {\n\t\t\tSystem.out.println(Ver[i]);\n\t\t}\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String str;",
"str",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"int Nver = Integer.parseInt(str);",
"Nver",
"Integer.parseInt(str)",
"Integer.parseInt",
"Integer",
"str",
"int[] Ver = new int[Nver];",
"Ver",
"new int[Nver]",
"Nver",
"for (int i = 0; i < Nver; i++) {\n\t\t\tVer[i] = i + 1;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < Nver",
"i",
"Nver",
"i++",
"i++",
"i",
"{\n\t\t\tVer[i] = i + 1;\n\t\t}",
"{\n\t\t\tVer[i] = i + 1;\n\t\t}",
"Ver[i] = i + 1",
"Ver[i]",
"Ver",
"i",
"i + 1",
"i",
"1",
"str =br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"int Nhor = Integer.parseInt(str);",
"Nhor",
"Integer.parseInt(str)",
"Integer.parseInt",
"Integer",
"str",
"for (int i = 0; i < Nhor; i++) {\n\t\t\t//Input swap\n\t\t\tstr = br.readLine();\n\t\t\tString[] tmp = str.split(\",\", 0);\n\t\t\tint[] SW = new int[2];\n\t\t\tSW[0] = Integer.parseInt(tmp[0]);\n\t\t\tSW[1] = Integer.parseInt(tmp[1]);\n\n\t\t\t//Swap\n\t\t\tswap(Ver, SW[0], SW[1]);\n\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < Nhor",
"i",
"Nhor",
"i++",
"i++",
"i",
"{\n\t\t\t//Input swap\n\t\t\tstr = br.readLine();\n\t\t\tString[] tmp = str.split(\",\", 0);\n\t\t\tint[] SW = new int[2];\n\t\t\tSW[0] = Integer.parseInt(tmp[0]);\n\t\t\tSW[1] = Integer.parseInt(tmp[1]);\n\n\t\t\t//Swap\n\t\t\tswap(Ver, SW[0], SW[1]);\n\n\t\t}",
"{\n\t\t\t//Input swap\n\t\t\tstr = br.readLine();\n\t\t\tString[] tmp = str.split(\",\", 0);\n\t\t\tint[] SW = new int[2];\n\t\t\tSW[0] = Integer.parseInt(tmp[0]);\n\t\t\tSW[1] = Integer.parseInt(tmp[1]);\n\n\t\t\t//Swap\n\t\t\tswap(Ver, SW[0], SW[1]);\n\n\t\t}",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"String[] tmp = str.split(\",\", 0);",
"tmp",
"str.split(\",\", 0)",
"str.split",
"str",
"\",\"",
"0",
"int[] SW = new int[2];",
"SW",
"new int[2]",
"2",
"SW[0] = Integer.parseInt(tmp[0])",
"SW[0]",
"SW",
"0",
"Integer.parseInt(tmp[0])",
"Integer.parseInt",
"Integer",
"tmp[0]",
"tmp",
"0",
"SW[1] = Integer.parseInt(tmp[1])",
"SW[1]",
"SW",
"1",
"Integer.parseInt(tmp[1])",
"Integer.parseInt",
"Integer",
"tmp[1]",
"tmp",
"1",
"swap(Ver, SW[0], SW[1])",
"swap",
"Ver",
"SW[0]",
"SW",
"0",
"SW[1]",
"SW",
"1",
"for (int i = 0; i < Nver; i++) {\n\t\t\tSystem.out.println(Ver[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < Nver",
"i",
"Nver",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(Ver[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(Ver[i]);\n\t\t}",
"System.out.println(Ver[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"Ver[i]",
"Ver",
"i",
"String[] args",
"args",
"private static void swap(int[] N, int a, int b) {\n\t\tint tmp;\n\t\ttmp = N[a-1]; N[a-1] = N[b-1]; N[b-1] = tmp;\n\t\treturn;\n\t}",
"swap",
"{\n\t\tint tmp;\n\t\ttmp = N[a-1]; N[a-1] = N[b-1]; N[b-1] = tmp;\n\t\treturn;\n\t}",
"int tmp;",
"tmp",
"tmp = N[a-1]",
"tmp",
"N[a-1]",
"N",
"a-1",
"a",
"1",
"N[a-1] = N[b-1]",
"N[a-1]",
"N",
"a-1",
"a",
"1",
"N[b-1]",
"N",
"b-1",
"b",
"1",
"N[b-1] = tmp",
"N[b-1]",
"N",
"b-1",
"b",
"1",
"tmp",
"return;",
"int[] N",
"N",
"int a",
"a",
"int b",
"b",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t//Input Initialize\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tstr = br.readLine();\n\t\tint Nver = Integer.parseInt(str);\n\t\tint[] Ver = new int[Nver];\n\t\tfor (int i = 0; i < Nver; i++) {\n\t\t\tVer[i] = i + 1;\n\t\t}\n\n\t\tstr =br.readLine();\n\t\tint Nhor = Integer.parseInt(str);\n\n\t\tfor (int i = 0; i < Nhor; i++) {\n\t\t\t//Input swap\n\t\t\tstr = br.readLine();\n\t\t\tString[] tmp = str.split(\",\", 0);\n\t\t\tint[] SW = new int[2];\n\t\t\tSW[0] = Integer.parseInt(tmp[0]);\n\t\t\tSW[1] = Integer.parseInt(tmp[1]);\n\n\t\t\t//Swap\n\t\t\tswap(Ver, SW[0], SW[1]);\n\n\t\t}\n\n\t\tfor (int i = 0; i < Nver; i++) {\n\t\t\tSystem.out.println(Ver[i]);\n\t\t}\n\t}\n\n\tprivate static void swap(int[] N, int a, int b) {\n\t\tint tmp;\n\t\ttmp = N[a-1]; N[a-1] = N[b-1]; N[b-1] = tmp;\n\t\treturn;\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t//Input Initialize\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tstr = br.readLine();\n\t\tint Nver = Integer.parseInt(str);\n\t\tint[] Ver = new int[Nver];\n\t\tfor (int i = 0; i < Nver; i++) {\n\t\t\tVer[i] = i + 1;\n\t\t}\n\n\t\tstr =br.readLine();\n\t\tint Nhor = Integer.parseInt(str);\n\n\t\tfor (int i = 0; i < Nhor; i++) {\n\t\t\t//Input swap\n\t\t\tstr = br.readLine();\n\t\t\tString[] tmp = str.split(\",\", 0);\n\t\t\tint[] SW = new int[2];\n\t\t\tSW[0] = Integer.parseInt(tmp[0]);\n\t\t\tSW[1] = Integer.parseInt(tmp[1]);\n\n\t\t\t//Swap\n\t\t\tswap(Ver, SW[0], SW[1]);\n\n\t\t}\n\n\t\tfor (int i = 0; i < Nver; i++) {\n\t\t\tSystem.out.println(Ver[i]);\n\t\t}\n\t}\n\n\tprivate static void swap(int[] N, int a, int b) {\n\t\tint tmp;\n\t\ttmp = N[a-1]; N[a-1] = N[b-1]; N[b-1] = tmp;\n\t\treturn;\n\t}\n\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
//Input Initialize
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str;
str = br.readLine();
int Nver = Integer.parseInt(str);
int[] Ver = new int[Nver];
for (int i = 0; i < Nver; i++) {
Ver[i] = i + 1;
}
str =br.readLine();
int Nhor = Integer.parseInt(str);
for (int i = 0; i < Nhor; i++) {
//Input swap
str = br.readLine();
String[] tmp = str.split(",", 0);
int[] SW = new int[2];
SW[0] = Integer.parseInt(tmp[0]);
SW[1] = Integer.parseInt(tmp[1]);
//Swap
swap(Ver, SW[0], SW[1]);
}
for (int i = 0; i < Nver; i++) {
System.out.println(Ver[i]);
}
}
private static void swap(int[] N, int a, int b) {
int tmp;
tmp = N[a-1]; N[a-1] = N[b-1]; N[b-1] = tmp;
return;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
0,
13,
18,
13,
2,
4,
18,
13,
18,
13,
17,
17,
0,
18,
13,
2,
4,
18,
13,
18,
13,
17,
17,
18,
13,
2,
4,
18,
13,
18,
13,
17,
17,
0,
18,
13,
2,
4,
18,
13,
18,
13,
17,
17,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
139,
5
],
[
139,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
8,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
46,
48
],
[
8,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
54,
55
],
[
54,
56
],
[
49,
57
],
[
57,
58
],
[
58,
59
],
[
49,
60
],
[
61,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
64,
69
],
[
61,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
78,
79
],
[
78,
80
],
[
74,
81
],
[
61,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
89,
90
],
[
89,
91
],
[
85,
92
],
[
82,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
96,
99
],
[
99,
100
],
[
99,
101
],
[
95,
102
],
[
61,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
110,
111
],
[
110,
112
],
[
106,
113
],
[
103,
114
],
[
8,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
115,
120
],
[
120,
121
],
[
120,
122
],
[
115,
123
],
[
123,
124
],
[
124,
125
],
[
115,
126
],
[
127,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
128,
133
],
[
133,
134
],
[
133,
135
],
[
6,
136
],
[
136,
137
],
[
0,
138
],
[
138,
139
],
[
138,
140
]
] | [
"import java.util.Scanner;\n\npublic class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\tint w = sc.nextInt();\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = 0;\n\t\t\t\tint[] num = new int[w];\n\t\t\t\t\tfor(int i=0; i<w; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tnum[i] = i+1;\n\t\t\t\t\t}\n\t\t\t\t\t\tfor(int i=0; i<n; i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString[] str = sc.next().split(\",\");\n\t\t\t\t\t\t\tx = num[Integer.valueOf(str[0])-1];\n\t\t\t\t\t\t\tnum[Integer.valueOf(str[0])-1] = num[Integer.valueOf(str[1])-1];\n\t\t\t\t\t\t\tnum[Integer.valueOf(str[1])-1] = x;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor(int i=0; i<w; i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tSystem.out.println(num[i]);\n\t\t\t\t\t\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\tint w = sc.nextInt();\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = 0;\n\t\t\t\tint[] num = new int[w];\n\t\t\t\t\tfor(int i=0; i<w; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tnum[i] = i+1;\n\t\t\t\t\t}\n\t\t\t\t\t\tfor(int i=0; i<n; i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString[] str = sc.next().split(\",\");\n\t\t\t\t\t\t\tx = num[Integer.valueOf(str[0])-1];\n\t\t\t\t\t\t\tnum[Integer.valueOf(str[0])-1] = num[Integer.valueOf(str[1])-1];\n\t\t\t\t\t\t\tnum[Integer.valueOf(str[1])-1] = x;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor(int i=0; i<w; i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tSystem.out.println(num[i]);\n\t\t\t\t\t\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args)\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\tint w = sc.nextInt();\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = 0;\n\t\t\t\tint[] num = new int[w];\n\t\t\t\t\tfor(int i=0; i<w; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tnum[i] = i+1;\n\t\t\t\t\t}\n\t\t\t\t\t\tfor(int i=0; i<n; i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString[] str = sc.next().split(\",\");\n\t\t\t\t\t\t\tx = num[Integer.valueOf(str[0])-1];\n\t\t\t\t\t\t\tnum[Integer.valueOf(str[0])-1] = num[Integer.valueOf(str[1])-1];\n\t\t\t\t\t\t\tnum[Integer.valueOf(str[1])-1] = x;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor(int i=0; i<w; i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tSystem.out.println(num[i]);\n\t\t\t\t\t\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\tint w = sc.nextInt();\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = 0;\n\t\t\t\tint[] num = new int[w];\n\t\t\t\t\tfor(int i=0; i<w; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tnum[i] = i+1;\n\t\t\t\t\t}\n\t\t\t\t\t\tfor(int i=0; i<n; i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString[] str = sc.next().split(\",\");\n\t\t\t\t\t\t\tx = num[Integer.valueOf(str[0])-1];\n\t\t\t\t\t\t\tnum[Integer.valueOf(str[0])-1] = num[Integer.valueOf(str[1])-1];\n\t\t\t\t\t\t\tnum[Integer.valueOf(str[1])-1] = x;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor(int i=0; i<w; i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tSystem.out.println(num[i]);\n\t\t\t\t\t\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int x = 0;",
"x",
"0",
"int[] num = new int[w];",
"num",
"new int[w]",
"w",
"for(int i=0; i<w; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tnum[i] = i+1;\n\t\t\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\t\t\t\tnum[i] = i+1;\n\t\t\t\t\t}",
"{\n\t\t\t\t\t\tnum[i] = i+1;\n\t\t\t\t\t}",
"num[i] = i+1",
"num[i]",
"num",
"i",
"i+1",
"i",
"1",
"for(int i=0; i<n; i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString[] str = sc.next().split(\",\");\n\t\t\t\t\t\t\tx = num[Integer.valueOf(str[0])-1];\n\t\t\t\t\t\t\tnum[Integer.valueOf(str[0])-1] = num[Integer.valueOf(str[1])-1];\n\t\t\t\t\t\t\tnum[Integer.valueOf(str[1])-1] = x;\n\t\t\t\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\t\t\t\tString[] str = sc.next().split(\",\");\n\t\t\t\t\t\t\tx = num[Integer.valueOf(str[0])-1];\n\t\t\t\t\t\t\tnum[Integer.valueOf(str[0])-1] = num[Integer.valueOf(str[1])-1];\n\t\t\t\t\t\t\tnum[Integer.valueOf(str[1])-1] = x;\n\t\t\t\t\t\t}",
"{\n\t\t\t\t\t\t\tString[] str = sc.next().split(\",\");\n\t\t\t\t\t\t\tx = num[Integer.valueOf(str[0])-1];\n\t\t\t\t\t\t\tnum[Integer.valueOf(str[0])-1] = num[Integer.valueOf(str[1])-1];\n\t\t\t\t\t\t\tnum[Integer.valueOf(str[1])-1] = x;\n\t\t\t\t\t\t}",
"String[] str = sc.next().split(\",\");",
"str",
"sc.next().split(\",\")",
"sc.next().split",
"sc.next()",
"sc.next",
"sc",
"\",\"",
"x = num[Integer.valueOf(str[0])-1]",
"x",
"num[Integer.valueOf(str[0])-1]",
"num",
"Integer.valueOf(str[0])-1",
"Integer.valueOf(str[0])",
"Integer.valueOf",
"Integer",
"str[0]",
"str",
"0",
"1",
"num[Integer.valueOf(str[0])-1] = num[Integer.valueOf(str[1])-1]",
"num[Integer.valueOf(str[0])-1]",
"num",
"Integer.valueOf(str[0])-1",
"Integer.valueOf(str[0])",
"Integer.valueOf",
"Integer",
"str[0]",
"str",
"0",
"1",
"num[Integer.valueOf(str[1])-1]",
"num",
"Integer.valueOf(str[1])-1",
"Integer.valueOf(str[1])",
"Integer.valueOf",
"Integer",
"str[1]",
"str",
"1",
"1",
"num[Integer.valueOf(str[1])-1] = x",
"num[Integer.valueOf(str[1])-1]",
"num",
"Integer.valueOf(str[1])-1",
"Integer.valueOf(str[1])",
"Integer.valueOf",
"Integer",
"str[1]",
"str",
"1",
"1",
"x",
"for(int i=0; i<w; i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tSystem.out.println(num[i]);\n\t\t\t\t\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\t\t\t\t\t\tSystem.out.println(num[i]);\n\t\t\t\t\t\t\t}",
"{\n\t\t\t\t\t\t\t\tSystem.out.println(num[i]);\n\t\t\t\t\t\t\t}",
"System.out.println(num[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"num[i]",
"num",
"i",
"String[] args",
"args",
"public class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\tint w = sc.nextInt();\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = 0;\n\t\t\t\tint[] num = new int[w];\n\t\t\t\t\tfor(int i=0; i<w; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tnum[i] = i+1;\n\t\t\t\t\t}\n\t\t\t\t\t\tfor(int i=0; i<n; i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString[] str = sc.next().split(\",\");\n\t\t\t\t\t\t\tx = num[Integer.valueOf(str[0])-1];\n\t\t\t\t\t\t\tnum[Integer.valueOf(str[0])-1] = num[Integer.valueOf(str[1])-1];\n\t\t\t\t\t\t\tnum[Integer.valueOf(str[1])-1] = x;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor(int i=0; i<w; i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tSystem.out.println(num[i]);\n\t\t\t\t\t\t\t}\n\t}\n}",
"public class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\tint w = sc.nextInt();\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = 0;\n\t\t\t\tint[] num = new int[w];\n\t\t\t\t\tfor(int i=0; i<w; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tnum[i] = i+1;\n\t\t\t\t\t}\n\t\t\t\t\t\tfor(int i=0; i<n; i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString[] str = sc.next().split(\",\");\n\t\t\t\t\t\t\tx = num[Integer.valueOf(str[0])-1];\n\t\t\t\t\t\t\tnum[Integer.valueOf(str[0])-1] = num[Integer.valueOf(str[1])-1];\n\t\t\t\t\t\t\tnum[Integer.valueOf(str[1])-1] = x;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor(int i=0; i<w; i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tSystem.out.println(num[i]);\n\t\t\t\t\t\t\t}\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
int w = sc.nextInt();
int n = sc.nextInt();
int x = 0;
int[] num = new int[w];
for(int i=0; i<w; i++)
{
num[i] = i+1;
}
for(int i=0; i<n; i++)
{
String[] str = sc.next().split(",");
x = num[Integer.valueOf(str[0])-1];
num[Integer.valueOf(str[0])-1] = num[Integer.valueOf(str[1])-1];
num[Integer.valueOf(str[1])-1] = x;
}
for(int i=0; i<w; i++)
{
System.out.println(num[i]);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
4,
18,
13,
41,
13,
41,
13,
41,
13,
41,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
143,
5
],
[
143,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
8,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
8,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
8,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
34,
42
],
[
42,
43
],
[
43,
44
],
[
34,
45
],
[
46,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
51,
53
],
[
8,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
59,
60
],
[
59,
61
],
[
54,
62
],
[
62,
63
],
[
63,
64
],
[
54,
65
],
[
66,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
66,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
66,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
83,
84
],
[
83,
85
],
[
66,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
91,
92
],
[
91,
93
],
[
66,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
98,
100
],
[
66,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
104,
106
],
[
101,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
109,
111
],
[
66,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
115,
117
],
[
112,
118
],
[
8,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
119,
124
],
[
124,
125
],
[
124,
126
],
[
119,
127
],
[
127,
128
],
[
128,
129
],
[
119,
130
],
[
131,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
132,
137
],
[
137,
138
],
[
137,
139
],
[
6,
140
],
[
140,
141
],
[
0,
142
],
[
142,
143
],
[
142,
144
]
] | [
"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 w = sc.nextInt();\n\t\tint[] lot_num = new int[w];\n\t\tint n = sc.nextInt();\n\t\tint a,b,swap;\n\t\tString str;\n\n\t\tfor(int i=0; i<w; i++){\n\t\t\tlot_num[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(int i=0; i<n; i++){\n\t\t\tstr = sc.next();\n\t\t\tString[] num = str.split(\",\");\n \t\t\ta = Integer.parseInt(num[0]);\n\t\t\tb = Integer.parseInt(num[1]);\n\t\t\tswap = lot_num[a-1];\n\t\t\tlot_num[a-1] = lot_num[b-1];\n\t\t\tlot_num[b-1] = swap;\n\t\t}\n\n\t\tfor(int i=0; i<w; i++){\n\t\t\tSystem.out.println(lot_num[i]);\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint[] lot_num = new int[w];\n\t\tint n = sc.nextInt();\n\t\tint a,b,swap;\n\t\tString str;\n\n\t\tfor(int i=0; i<w; i++){\n\t\t\tlot_num[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(int i=0; i<n; i++){\n\t\t\tstr = sc.next();\n\t\t\tString[] num = str.split(\",\");\n \t\t\ta = Integer.parseInt(num[0]);\n\t\t\tb = Integer.parseInt(num[1]);\n\t\t\tswap = lot_num[a-1];\n\t\t\tlot_num[a-1] = lot_num[b-1];\n\t\t\tlot_num[b-1] = swap;\n\t\t}\n\n\t\tfor(int i=0; i<w; i++){\n\t\t\tSystem.out.println(lot_num[i]);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint[] lot_num = new int[w];\n\t\tint n = sc.nextInt();\n\t\tint a,b,swap;\n\t\tString str;\n\n\t\tfor(int i=0; i<w; i++){\n\t\t\tlot_num[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(int i=0; i<n; i++){\n\t\t\tstr = sc.next();\n\t\t\tString[] num = str.split(\",\");\n \t\t\ta = Integer.parseInt(num[0]);\n\t\t\tb = Integer.parseInt(num[1]);\n\t\t\tswap = lot_num[a-1];\n\t\t\tlot_num[a-1] = lot_num[b-1];\n\t\t\tlot_num[b-1] = swap;\n\t\t}\n\n\t\tfor(int i=0; i<w; i++){\n\t\t\tSystem.out.println(lot_num[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint[] lot_num = new int[w];\n\t\tint n = sc.nextInt();\n\t\tint a,b,swap;\n\t\tString str;\n\n\t\tfor(int i=0; i<w; i++){\n\t\t\tlot_num[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(int i=0; i<n; i++){\n\t\t\tstr = sc.next();\n\t\t\tString[] num = str.split(\",\");\n \t\t\ta = Integer.parseInt(num[0]);\n\t\t\tb = Integer.parseInt(num[1]);\n\t\t\tswap = lot_num[a-1];\n\t\t\tlot_num[a-1] = lot_num[b-1];\n\t\t\tlot_num[b-1] = swap;\n\t\t}\n\n\t\tfor(int i=0; i<w; i++){\n\t\t\tSystem.out.println(lot_num[i]);\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] lot_num = new int[w];",
"lot_num",
"new int[w]",
"w",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int a",
"a",
"b",
"b",
"swap;",
"swap",
"String str;",
"str",
"for(int i=0; i<w; i++){\n\t\t\tlot_num[i] = i+1;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tlot_num[i] = i+1;\n\t\t}",
"{\n\t\t\tlot_num[i] = i+1;\n\t\t}",
"lot_num[i] = i+1",
"lot_num[i]",
"lot_num",
"i",
"i+1",
"i",
"1",
"for(int i=0; i<n; i++){\n\t\t\tstr = sc.next();\n\t\t\tString[] num = str.split(\",\");\n \t\t\ta = Integer.parseInt(num[0]);\n\t\t\tb = Integer.parseInt(num[1]);\n\t\t\tswap = lot_num[a-1];\n\t\t\tlot_num[a-1] = lot_num[b-1];\n\t\t\tlot_num[b-1] = swap;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tstr = sc.next();\n\t\t\tString[] num = str.split(\",\");\n \t\t\ta = Integer.parseInt(num[0]);\n\t\t\tb = Integer.parseInt(num[1]);\n\t\t\tswap = lot_num[a-1];\n\t\t\tlot_num[a-1] = lot_num[b-1];\n\t\t\tlot_num[b-1] = swap;\n\t\t}",
"{\n\t\t\tstr = sc.next();\n\t\t\tString[] num = str.split(\",\");\n \t\t\ta = Integer.parseInt(num[0]);\n\t\t\tb = Integer.parseInt(num[1]);\n\t\t\tswap = lot_num[a-1];\n\t\t\tlot_num[a-1] = lot_num[b-1];\n\t\t\tlot_num[b-1] = swap;\n\t\t}",
"str = sc.next()",
"str",
"sc.next()",
"sc.next",
"sc",
"String[] num = str.split(\",\");",
"num",
"str.split(\",\")",
"str.split",
"str",
"\",\"",
"a = Integer.parseInt(num[0])",
"a",
"Integer.parseInt(num[0])",
"Integer.parseInt",
"Integer",
"num[0]",
"num",
"0",
"b = Integer.parseInt(num[1])",
"b",
"Integer.parseInt(num[1])",
"Integer.parseInt",
"Integer",
"num[1]",
"num",
"1",
"swap = lot_num[a-1]",
"swap",
"lot_num[a-1]",
"lot_num",
"a-1",
"a",
"1",
"lot_num[a-1] = lot_num[b-1]",
"lot_num[a-1]",
"lot_num",
"a-1",
"a",
"1",
"lot_num[b-1]",
"lot_num",
"b-1",
"b",
"1",
"lot_num[b-1] = swap",
"lot_num[b-1]",
"lot_num",
"b-1",
"b",
"1",
"swap",
"for(int i=0; i<w; i++){\n\t\t\tSystem.out.println(lot_num[i]);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(lot_num[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(lot_num[i]);\n\t\t}",
"System.out.println(lot_num[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"lot_num[i]",
"lot_num",
"i",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint[] lot_num = new int[w];\n\t\tint n = sc.nextInt();\n\t\tint a,b,swap;\n\t\tString str;\n\n\t\tfor(int i=0; i<w; i++){\n\t\t\tlot_num[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(int i=0; i<n; i++){\n\t\t\tstr = sc.next();\n\t\t\tString[] num = str.split(\",\");\n \t\t\ta = Integer.parseInt(num[0]);\n\t\t\tb = Integer.parseInt(num[1]);\n\t\t\tswap = lot_num[a-1];\n\t\t\tlot_num[a-1] = lot_num[b-1];\n\t\t\tlot_num[b-1] = swap;\n\t\t}\n\n\t\tfor(int i=0; i<w; i++){\n\t\t\tSystem.out.println(lot_num[i]);\n\t\t}\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint[] lot_num = new int[w];\n\t\tint n = sc.nextInt();\n\t\tint a,b,swap;\n\t\tString str;\n\n\t\tfor(int i=0; i<w; i++){\n\t\t\tlot_num[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(int i=0; i<n; i++){\n\t\t\tstr = sc.next();\n\t\t\tString[] num = str.split(\",\");\n \t\t\ta = Integer.parseInt(num[0]);\n\t\t\tb = Integer.parseInt(num[1]);\n\t\t\tswap = lot_num[a-1];\n\t\t\tlot_num[a-1] = lot_num[b-1];\n\t\t\tlot_num[b-1] = swap;\n\t\t}\n\n\t\tfor(int i=0; i<w; i++){\n\t\t\tSystem.out.println(lot_num[i]);\n\t\t}\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int w = sc.nextInt();
int[] lot_num = new int[w];
int n = sc.nextInt();
int a,b,swap;
String str;
for(int i=0; i<w; i++){
lot_num[i] = i+1;
}
for(int i=0; i<n; i++){
str = sc.next();
String[] num = str.split(",");
a = Integer.parseInt(num[0]);
b = Integer.parseInt(num[1]);
swap = lot_num[a-1];
lot_num[a-1] = lot_num[b-1];
lot_num[b-1] = swap;
}
for(int i=0; i<w; i++){
System.out.println(lot_num[i]);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
41,
13,
20,
13,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
13,
30,
0,
13,
18,
13,
13,
14,
2,
18,
13,
13,
13,
30,
0,
13,
18,
13,
13,
0,
18,
13,
2,
13,
17,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
29
],
[
29,
30
],
[
29,
31
],
[
11,
33
],
[
33,
34
],
[
33,
35
],
[
11,
37
],
[
37,
38
],
[
38,
39
],
[
37,
40
],
[
11,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
46,
47
],
[
46,
48
],
[
41,
49
],
[
49,
50
],
[
50,
51
],
[
41,
52
],
[
53,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
59,
60
],
[
53,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
65,
66
],
[
66,
67
],
[
11,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
73,
74
],
[
73,
75
],
[
68,
76
],
[
76,
77
],
[
77,
78
],
[
68,
79
],
[
80,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
89,
90
],
[
89,
91
],
[
84,
92
],
[
92,
93
],
[
93,
94
],
[
84,
95
],
[
96,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
97,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
106,
108
],
[
97,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
109,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
118,
120
],
[
80,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
124,
126
],
[
121,
127
],
[
11,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
128,
133
],
[
133,
134
],
[
133,
135
],
[
128,
136
],
[
136,
137
],
[
137,
138
],
[
128,
139
],
[
140,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
143,
145
],
[
141,
146
],
[
146,
147
],
[
146,
148
],
[
9,
149
],
[
149,
150
]
] | [
"import java.util.*;\nimport java.io.*;\n\nclass Main\n{\n public static void main(String[] args)\n {\n Scanner scan = new Scanner(System.in);\n int w = scan.nextInt(), n = scan.nextInt();\n int[] a = new int[n], b = new int[n];\n int[] ans = new int[w];\n\n scan.useDelimiter(\",|\\n\");\n\n for (int j = 0; j < n; j++)\n {\n a[j] = scan.nextInt();\n b[j] = scan.nextInt();\n }\n\n for (int i = 1; i <= w; i++)\n {\n int now = i;\n\n for (int j = 0; j < n; j++){\n if (a[j] == now)\n {\n now = b[j];\n }\n else if (b[j] == now)\n {\n now = a[j];\n }\n }\n ans[now - 1] = i;\n }\n\n for (int i = 0; i < w; i++) {\n System.out.println(ans[i]);\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"class Main\n{\n public static void main(String[] args)\n {\n Scanner scan = new Scanner(System.in);\n int w = scan.nextInt(), n = scan.nextInt();\n int[] a = new int[n], b = new int[n];\n int[] ans = new int[w];\n\n scan.useDelimiter(\",|\\n\");\n\n for (int j = 0; j < n; j++)\n {\n a[j] = scan.nextInt();\n b[j] = scan.nextInt();\n }\n\n for (int i = 1; i <= w; i++)\n {\n int now = i;\n\n for (int j = 0; j < n; j++){\n if (a[j] == now)\n {\n now = b[j];\n }\n else if (b[j] == now)\n {\n now = a[j];\n }\n }\n ans[now - 1] = i;\n }\n\n for (int i = 0; i < w; i++) {\n System.out.println(ans[i]);\n }\n }\n}",
"Main",
"public static void main(String[] args)\n {\n Scanner scan = new Scanner(System.in);\n int w = scan.nextInt(), n = scan.nextInt();\n int[] a = new int[n], b = new int[n];\n int[] ans = new int[w];\n\n scan.useDelimiter(\",|\\n\");\n\n for (int j = 0; j < n; j++)\n {\n a[j] = scan.nextInt();\n b[j] = scan.nextInt();\n }\n\n for (int i = 1; i <= w; i++)\n {\n int now = i;\n\n for (int j = 0; j < n; j++){\n if (a[j] == now)\n {\n now = b[j];\n }\n else if (b[j] == now)\n {\n now = a[j];\n }\n }\n ans[now - 1] = i;\n }\n\n for (int i = 0; i < w; i++) {\n System.out.println(ans[i]);\n }\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n int w = scan.nextInt(), n = scan.nextInt();\n int[] a = new int[n], b = new int[n];\n int[] ans = new int[w];\n\n scan.useDelimiter(\",|\\n\");\n\n for (int j = 0; j < n; j++)\n {\n a[j] = scan.nextInt();\n b[j] = scan.nextInt();\n }\n\n for (int i = 1; i <= w; i++)\n {\n int now = i;\n\n for (int j = 0; j < n; j++){\n if (a[j] == now)\n {\n now = b[j];\n }\n else if (b[j] == now)\n {\n now = a[j];\n }\n }\n ans[now - 1] = i;\n }\n\n for (int i = 0; i < w; i++) {\n System.out.println(ans[i]);\n }\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int w = scan.nextInt()",
"w",
"scan.nextInt()",
"scan.nextInt",
"scan",
"n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int[] a = new int[n]",
"a",
"new int[n]",
"n",
"b = new int[n];",
"b",
"new int[n]",
"n",
"int[] ans = new int[w];",
"ans",
"new int[w]",
"w",
"scan.useDelimiter(\",|\\n\")",
"scan.useDelimiter",
"scan",
"\",|\\n\"",
"for (int j = 0; j < n; j++)\n {\n a[j] = scan.nextInt();\n b[j] = scan.nextInt();\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < n",
"j",
"n",
"j++",
"j++",
"j",
"{\n a[j] = scan.nextInt();\n b[j] = scan.nextInt();\n }",
"{\n a[j] = scan.nextInt();\n b[j] = scan.nextInt();\n }",
"a[j] = scan.nextInt()",
"a[j]",
"a",
"j",
"scan.nextInt()",
"scan.nextInt",
"scan",
"b[j] = scan.nextInt()",
"b[j]",
"b",
"j",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for (int i = 1; i <= w; i++)\n {\n int now = i;\n\n for (int j = 0; j < n; j++){\n if (a[j] == now)\n {\n now = b[j];\n }\n else if (b[j] == now)\n {\n now = a[j];\n }\n }\n ans[now - 1] = i;\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= w",
"i",
"w",
"i++",
"i++",
"i",
"{\n int now = i;\n\n for (int j = 0; j < n; j++){\n if (a[j] == now)\n {\n now = b[j];\n }\n else if (b[j] == now)\n {\n now = a[j];\n }\n }\n ans[now - 1] = i;\n }",
"{\n int now = i;\n\n for (int j = 0; j < n; j++){\n if (a[j] == now)\n {\n now = b[j];\n }\n else if (b[j] == now)\n {\n now = a[j];\n }\n }\n ans[now - 1] = i;\n }",
"int now = i;",
"now",
"i",
"for (int j = 0; j < n; j++){\n if (a[j] == now)\n {\n now = b[j];\n }\n else if (b[j] == now)\n {\n now = a[j];\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < n",
"j",
"n",
"j++",
"j++",
"j",
"{\n if (a[j] == now)\n {\n now = b[j];\n }\n else if (b[j] == now)\n {\n now = a[j];\n }\n }",
"{\n if (a[j] == now)\n {\n now = b[j];\n }\n else if (b[j] == now)\n {\n now = a[j];\n }\n }",
"if (a[j] == now)\n {\n now = b[j];\n }\n else if (b[j] == now)\n {\n now = a[j];\n }",
"a[j] == now",
"a[j]",
"a",
"j",
"now",
"{\n now = b[j];\n }",
"now = b[j]",
"now",
"b[j]",
"b",
"j",
"if (b[j] == now)\n {\n now = a[j];\n }",
"b[j] == now",
"b[j]",
"b",
"j",
"now",
"{\n now = a[j];\n }",
"now = a[j]",
"now",
"a[j]",
"a",
"j",
"ans[now - 1] = i",
"ans[now - 1]",
"ans",
"now - 1",
"now",
"1",
"i",
"for (int i = 0; i < w; i++) {\n System.out.println(ans[i]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n System.out.println(ans[i]);\n }",
"{\n System.out.println(ans[i]);\n }",
"System.out.println(ans[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"ans[i]",
"ans",
"i",
"String[] args",
"args"
] | import java.util.*;
import java.io.*;
class Main
{
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
int w = scan.nextInt(), n = scan.nextInt();
int[] a = new int[n], b = new int[n];
int[] ans = new int[w];
scan.useDelimiter(",|\n");
for (int j = 0; j < n; j++)
{
a[j] = scan.nextInt();
b[j] = scan.nextInt();
}
for (int i = 1; i <= w; i++)
{
int now = i;
for (int j = 0; j < n; j++){
if (a[j] == now)
{
now = b[j];
}
else if (b[j] == now)
{
now = a[j];
}
}
ans[now - 1] = i;
}
for (int i = 0; i < w; i++) {
System.out.println(ans[i]);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
13,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
2,
13,
17,
1,
40,
13,
30,
0,
18,
13,
13,
13,
11,
1,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
2,
13,
13,
1,
40,
13,
30,
4,
18,
18,
13,
13,
18,
13,
2,
13,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
118,
5
],
[
118,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
28,
29
],
[
28,
30
],
[
8,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
37,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
8,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
50,
51
],
[
51,
52
],
[
45,
53
],
[
54,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
57,
62
],
[
54,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
68,
69
],
[
68,
70
],
[
54,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
76,
77
],
[
76,
78
],
[
54,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
81,
83
],
[
54,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
88,
90
],
[
54,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
8,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
98,
100
],
[
96,
101
],
[
101,
102
],
[
102,
103
],
[
96,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
112,
114
],
[
6,
115
],
[
115,
116
],
[
0,
117
],
[
117,
118
],
[
117,
119
]
] | [
"import java.util.*;public class Main{public static void main(String[] args) {Scanner sc =new Scanner(System.in);int n=sc.nextInt(),c=n,m=sc.nextInt();int num[]=new int[n+1];for(;n>0;n--) num[n]=n;for(;m>0;m--){String []s=sc.next().split(\",\");int a=Integer.parseInt(s[0]),b=Integer.parseInt(s[1]),t=num[a];num[a]=num[b];num[b]=t;}for(;n<c;n++)System.out.println(num[n+1]);}}",
"import java.util.*;",
"util.*",
"java",
"public class Main{public static void main(String[] args) {Scanner sc =new Scanner(System.in);int n=sc.nextInt(),c=n,m=sc.nextInt();int num[]=new int[n+1];for(;n>0;n--) num[n]=n;for(;m>0;m--){String []s=sc.next().split(\",\");int a=Integer.parseInt(s[0]),b=Integer.parseInt(s[1]),t=num[a];num[a]=num[b];num[b]=t;}for(;n<c;n++)System.out.println(num[n+1]);}}",
"Main",
"public static void main(String[] args) {Scanner sc =new Scanner(System.in);int n=sc.nextInt(),c=n,m=sc.nextInt();int num[]=new int[n+1];for(;n>0;n--) num[n]=n;for(;m>0;m--){String []s=sc.next().split(\",\");int a=Integer.parseInt(s[0]),b=Integer.parseInt(s[1]),t=num[a];num[a]=num[b];num[b]=t;}for(;n<c;n++)System.out.println(num[n+1]);}",
"main",
"{Scanner sc =new Scanner(System.in);int n=sc.nextInt(),c=n,m=sc.nextInt();int num[]=new int[n+1];for(;n>0;n--) num[n]=n;for(;m>0;m--){String []s=sc.next().split(\",\");int a=Integer.parseInt(s[0]),b=Integer.parseInt(s[1]),t=num[a];num[a]=num[b];num[b]=t;}for(;n<c;n++)System.out.println(num[n+1]);}",
"Scanner sc =new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n=sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"c=n",
"c",
"n",
"m=sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int num[]=new int[n+1];",
"num",
"new int[n+1]",
"n+1",
"n",
"1",
"for(;n>0;n--) num[n]=n;",
";",
"n>0",
"n",
"0",
"n--",
"n--",
"n",
"num[n]=n;",
"num[n]=n",
"num[n]",
"num",
"n",
"n",
"for(;m>0;m--){String []s=sc.next().split(\",\");int a=Integer.parseInt(s[0]),b=Integer.parseInt(s[1]),t=num[a];num[a]=num[b];num[b]=t;}",
";",
"m>0",
"m",
"0",
"m--",
"m--",
"m",
"{String []s=sc.next().split(\",\");int a=Integer.parseInt(s[0]),b=Integer.parseInt(s[1]),t=num[a];num[a]=num[b];num[b]=t;}",
"{String []s=sc.next().split(\",\");int a=Integer.parseInt(s[0]),b=Integer.parseInt(s[1]),t=num[a];num[a]=num[b];num[b]=t;}",
"String []s=sc.next().split(\",\");",
"s",
"sc.next().split(\",\")",
"sc.next().split",
"sc.next()",
"sc.next",
"sc",
"\",\"",
"int a=Integer.parseInt(s[0])",
"a",
"Integer.parseInt(s[0])",
"Integer.parseInt",
"Integer",
"s[0]",
"s",
"0",
"b=Integer.parseInt(s[1])",
"b",
"Integer.parseInt(s[1])",
"Integer.parseInt",
"Integer",
"s[1]",
"s",
"1",
"t=num[a];",
"t",
"num[a]",
"num",
"a",
"num[a]=num[b]",
"num[a]",
"num",
"a",
"num[b]",
"num",
"b",
"num[b]=t",
"num[b]",
"num",
"b",
"t",
"for(;n<c;n++)System.out.println(num[n+1]);",
";",
"n<c",
"n",
"c",
"n++",
"n++",
"n",
"System.out.println(num[n+1]);",
"System.out.println(num[n+1])",
"System.out.println",
"System.out",
"System",
"System.out",
"num[n+1]",
"num",
"n+1",
"n",
"1",
"String[] args",
"args",
"public class Main{public static void main(String[] args) {Scanner sc =new Scanner(System.in);int n=sc.nextInt(),c=n,m=sc.nextInt();int num[]=new int[n+1];for(;n>0;n--) num[n]=n;for(;m>0;m--){String []s=sc.next().split(\",\");int a=Integer.parseInt(s[0]),b=Integer.parseInt(s[1]),t=num[a];num[a]=num[b];num[b]=t;}for(;n<c;n++)System.out.println(num[n+1]);}}",
"public class Main{public static void main(String[] args) {Scanner sc =new Scanner(System.in);int n=sc.nextInt(),c=n,m=sc.nextInt();int num[]=new int[n+1];for(;n>0;n--) num[n]=n;for(;m>0;m--){String []s=sc.next().split(\",\");int a=Integer.parseInt(s[0]),b=Integer.parseInt(s[1]),t=num[a];num[a]=num[b];num[b]=t;}for(;n<c;n++)System.out.println(num[n+1]);}}",
"Main"
] | import java.util.*;public class Main{public static void main(String[] args) {Scanner sc =new Scanner(System.in);int n=sc.nextInt(),c=n,m=sc.nextInt();int num[]=new int[n+1];for(;n>0;n--) num[n]=n;for(;m>0;m--){String []s=sc.next().split(",");int a=Integer.parseInt(s[0]),b=Integer.parseInt(s[1]),t=num[a];num[a]=num[b];num[b]=t;}for(;n<c;n++)System.out.println(num[n+1]);}} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
2,
13,
17,
41,
13,
20,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
0,
18,
18,
13,
13,
13,
13,
0,
18,
18,
13,
13,
13,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
18,
13,
13,
13,
17,
30,
0,
13,
18,
18,
13,
13,
13,
14,
2,
18,
18,
13,
13,
13,
17,
30,
0,
13,
18,
18,
13,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
12,
13,
30,
41,
13,
20,
4,
18,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
192,
5
],
[
192,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
26,
27
],
[
26,
28
],
[
8,
29
],
[
29,
30
],
[
29,
31
],
[
33,
34
],
[
33,
35
],
[
8,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
41,
42
],
[
41,
43
],
[
36,
44
],
[
44,
45
],
[
45,
46
],
[
36,
47
],
[
48,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
51,
56
],
[
48,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
62,
63
],
[
62,
64
],
[
48,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
70,
71
],
[
70,
72
],
[
48,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
73,
79
],
[
48,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
80,
86
],
[
8,
87
],
[
87,
88
],
[
87,
89
],
[
90,
91
],
[
90,
92
],
[
8,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
98,
99
],
[
98,
100
],
[
93,
101
],
[
101,
102
],
[
102,
103
],
[
93,
104
],
[
105,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
105,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
109,
114
],
[
114,
115
],
[
114,
116
],
[
109,
117
],
[
117,
118
],
[
118,
119
],
[
109,
120
],
[
121,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
124,
128
],
[
123,
129
],
[
122,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
133,
137
],
[
122,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
140,
144
],
[
139,
145
],
[
138,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
150,
151
],
[
150,
152
],
[
149,
153
],
[
105,
154
],
[
154,
155
],
[
155,
156
],
[
155,
157
],
[
154,
158
],
[
8,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
161,
163
],
[
159,
164
],
[
164,
165
],
[
164,
166
],
[
159,
167
],
[
167,
168
],
[
168,
169
],
[
159,
170
],
[
171,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
174,
175
],
[
174,
176
],
[
172,
177
],
[
177,
178
],
[
177,
179
],
[
192,
180
],
[
180,
181
],
[
180,
182
],
[
182,
183
],
[
183,
184
],
[
183,
185
],
[
182,
186
],
[
186,
187
],
[
187,
188
],
[
180,
189
],
[
189,
190
],
[
0,
191
],
[
191,
192
],
[
191,
193
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\n public void DL() {\n Scanner s = new Scanner(System.in);\n int w = s.nextInt();\n int n = s.nextInt();\n int[][] list1 = new int[n][w + 1];\n int[][] list2 = new int[n][w + 1];\n\n for (int i = 0; i < n; i++) {\n String[] input = s.next().split(\",\");\n int in0 = Integer.parseInt(input[0]);\n int in1 = Integer.parseInt(input[1]);\n list1[i][in0] = in1;\n list2[i][in1] = in0;\n }\n\n int[] a = new int[w + 1];\n\n for (int i = 1; i <= w; i++) {\n int p = i;\n for (int j = 0; j < n; j++) {\n if (list1[j][p] != 0) {\n p = list1[j][p];\n } else if (list2[j][p] != 0) {\n p = list2[j][p];\n }\n }\n a[p] = i;\n }\n\n for (int i = 1; i <= w; i++) {\n System.out.println(a[i]);\n }\n\n }\n\n public static void main(String[] args) {\n Main main = new Main();\n main.DL();\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public void DL() {\n Scanner s = new Scanner(System.in);\n int w = s.nextInt();\n int n = s.nextInt();\n int[][] list1 = new int[n][w + 1];\n int[][] list2 = new int[n][w + 1];\n\n for (int i = 0; i < n; i++) {\n String[] input = s.next().split(\",\");\n int in0 = Integer.parseInt(input[0]);\n int in1 = Integer.parseInt(input[1]);\n list1[i][in0] = in1;\n list2[i][in1] = in0;\n }\n\n int[] a = new int[w + 1];\n\n for (int i = 1; i <= w; i++) {\n int p = i;\n for (int j = 0; j < n; j++) {\n if (list1[j][p] != 0) {\n p = list1[j][p];\n } else if (list2[j][p] != 0) {\n p = list2[j][p];\n }\n }\n a[p] = i;\n }\n\n for (int i = 1; i <= w; i++) {\n System.out.println(a[i]);\n }\n\n }\n\n public static void main(String[] args) {\n Main main = new Main();\n main.DL();\n }\n}",
"Main",
"public void DL() {\n Scanner s = new Scanner(System.in);\n int w = s.nextInt();\n int n = s.nextInt();\n int[][] list1 = new int[n][w + 1];\n int[][] list2 = new int[n][w + 1];\n\n for (int i = 0; i < n; i++) {\n String[] input = s.next().split(\",\");\n int in0 = Integer.parseInt(input[0]);\n int in1 = Integer.parseInt(input[1]);\n list1[i][in0] = in1;\n list2[i][in1] = in0;\n }\n\n int[] a = new int[w + 1];\n\n for (int i = 1; i <= w; i++) {\n int p = i;\n for (int j = 0; j < n; j++) {\n if (list1[j][p] != 0) {\n p = list1[j][p];\n } else if (list2[j][p] != 0) {\n p = list2[j][p];\n }\n }\n a[p] = i;\n }\n\n for (int i = 1; i <= w; i++) {\n System.out.println(a[i]);\n }\n\n }",
"DL",
"{\n Scanner s = new Scanner(System.in);\n int w = s.nextInt();\n int n = s.nextInt();\n int[][] list1 = new int[n][w + 1];\n int[][] list2 = new int[n][w + 1];\n\n for (int i = 0; i < n; i++) {\n String[] input = s.next().split(\",\");\n int in0 = Integer.parseInt(input[0]);\n int in1 = Integer.parseInt(input[1]);\n list1[i][in0] = in1;\n list2[i][in1] = in0;\n }\n\n int[] a = new int[w + 1];\n\n for (int i = 1; i <= w; i++) {\n int p = i;\n for (int j = 0; j < n; j++) {\n if (list1[j][p] != 0) {\n p = list1[j][p];\n } else if (list2[j][p] != 0) {\n p = list2[j][p];\n }\n }\n a[p] = i;\n }\n\n for (int i = 1; i <= w; i++) {\n System.out.println(a[i]);\n }\n\n }",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"int w = s.nextInt();",
"w",
"s.nextInt()",
"s.nextInt",
"s",
"int n = s.nextInt();",
"n",
"s.nextInt()",
"s.nextInt",
"s",
"int[][] list1 = new int[n][w + 1];",
"list1",
"new int[n][w + 1]",
"n",
"w + 1",
"w",
"1",
"int[][] list2 = new int[n][w + 1];",
"list2",
"new int[n][w + 1]",
"n",
"w + 1",
"w",
"1",
"for (int i = 0; i < n; i++) {\n String[] input = s.next().split(\",\");\n int in0 = Integer.parseInt(input[0]);\n int in1 = Integer.parseInt(input[1]);\n list1[i][in0] = in1;\n list2[i][in1] = in0;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String[] input = s.next().split(\",\");\n int in0 = Integer.parseInt(input[0]);\n int in1 = Integer.parseInt(input[1]);\n list1[i][in0] = in1;\n list2[i][in1] = in0;\n }",
"{\n String[] input = s.next().split(\",\");\n int in0 = Integer.parseInt(input[0]);\n int in1 = Integer.parseInt(input[1]);\n list1[i][in0] = in1;\n list2[i][in1] = in0;\n }",
"String[] input = s.next().split(\",\");",
"input",
"s.next().split(\",\")",
"s.next().split",
"s.next()",
"s.next",
"s",
"\",\"",
"int in0 = Integer.parseInt(input[0]);",
"in0",
"Integer.parseInt(input[0])",
"Integer.parseInt",
"Integer",
"input[0]",
"input",
"0",
"int in1 = Integer.parseInt(input[1]);",
"in1",
"Integer.parseInt(input[1])",
"Integer.parseInt",
"Integer",
"input[1]",
"input",
"1",
"list1[i][in0] = in1",
"list1[i][in0]",
"list1[i]",
"list1",
"i",
"in0",
"in1",
"list2[i][in1] = in0",
"list2[i][in1]",
"list2[i]",
"list2",
"i",
"in1",
"in0",
"int[] a = new int[w + 1];",
"a",
"new int[w + 1]",
"w + 1",
"w",
"1",
"for (int i = 1; i <= w; i++) {\n int p = i;\n for (int j = 0; j < n; j++) {\n if (list1[j][p] != 0) {\n p = list1[j][p];\n } else if (list2[j][p] != 0) {\n p = list2[j][p];\n }\n }\n a[p] = i;\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= w",
"i",
"w",
"i++",
"i++",
"i",
"{\n int p = i;\n for (int j = 0; j < n; j++) {\n if (list1[j][p] != 0) {\n p = list1[j][p];\n } else if (list2[j][p] != 0) {\n p = list2[j][p];\n }\n }\n a[p] = i;\n }",
"{\n int p = i;\n for (int j = 0; j < n; j++) {\n if (list1[j][p] != 0) {\n p = list1[j][p];\n } else if (list2[j][p] != 0) {\n p = list2[j][p];\n }\n }\n a[p] = i;\n }",
"int p = i;",
"p",
"i",
"for (int j = 0; j < n; j++) {\n if (list1[j][p] != 0) {\n p = list1[j][p];\n } else if (list2[j][p] != 0) {\n p = list2[j][p];\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < n",
"j",
"n",
"j++",
"j++",
"j",
"{\n if (list1[j][p] != 0) {\n p = list1[j][p];\n } else if (list2[j][p] != 0) {\n p = list2[j][p];\n }\n }",
"{\n if (list1[j][p] != 0) {\n p = list1[j][p];\n } else if (list2[j][p] != 0) {\n p = list2[j][p];\n }\n }",
"if (list1[j][p] != 0) {\n p = list1[j][p];\n } else if (list2[j][p] != 0) {\n p = list2[j][p];\n }",
"list1[j][p] != 0",
"list1[j][p]",
"list1[j]",
"list1",
"j",
"p",
"0",
"{\n p = list1[j][p];\n }",
"p = list1[j][p]",
"p",
"list1[j][p]",
"list1[j]",
"list1",
"j",
"p",
"if (list2[j][p] != 0) {\n p = list2[j][p];\n }",
"list2[j][p] != 0",
"list2[j][p]",
"list2[j]",
"list2",
"j",
"p",
"0",
"{\n p = list2[j][p];\n }",
"p = list2[j][p]",
"p",
"list2[j][p]",
"list2[j]",
"list2",
"j",
"p",
"a[p] = i",
"a[p]",
"a",
"p",
"i",
"for (int i = 1; i <= w; i++) {\n System.out.println(a[i]);\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= w",
"i",
"w",
"i++",
"i++",
"i",
"{\n System.out.println(a[i]);\n }",
"{\n System.out.println(a[i]);\n }",
"System.out.println(a[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"a[i]",
"a",
"i",
"public static void main(String[] args) {\n Main main = new Main();\n main.DL();\n }",
"main",
"{\n Main main = new Main();\n main.DL();\n }",
"Main main = new Main();",
"main",
"new Main()",
"main.DL()",
"main.DL",
"main",
"String[] args",
"args",
"public class Main {\n\n public void DL() {\n Scanner s = new Scanner(System.in);\n int w = s.nextInt();\n int n = s.nextInt();\n int[][] list1 = new int[n][w + 1];\n int[][] list2 = new int[n][w + 1];\n\n for (int i = 0; i < n; i++) {\n String[] input = s.next().split(\",\");\n int in0 = Integer.parseInt(input[0]);\n int in1 = Integer.parseInt(input[1]);\n list1[i][in0] = in1;\n list2[i][in1] = in0;\n }\n\n int[] a = new int[w + 1];\n\n for (int i = 1; i <= w; i++) {\n int p = i;\n for (int j = 0; j < n; j++) {\n if (list1[j][p] != 0) {\n p = list1[j][p];\n } else if (list2[j][p] != 0) {\n p = list2[j][p];\n }\n }\n a[p] = i;\n }\n\n for (int i = 1; i <= w; i++) {\n System.out.println(a[i]);\n }\n\n }\n\n public static void main(String[] args) {\n Main main = new Main();\n main.DL();\n }\n}",
"public class Main {\n\n public void DL() {\n Scanner s = new Scanner(System.in);\n int w = s.nextInt();\n int n = s.nextInt();\n int[][] list1 = new int[n][w + 1];\n int[][] list2 = new int[n][w + 1];\n\n for (int i = 0; i < n; i++) {\n String[] input = s.next().split(\",\");\n int in0 = Integer.parseInt(input[0]);\n int in1 = Integer.parseInt(input[1]);\n list1[i][in0] = in1;\n list2[i][in1] = in0;\n }\n\n int[] a = new int[w + 1];\n\n for (int i = 1; i <= w; i++) {\n int p = i;\n for (int j = 0; j < n; j++) {\n if (list1[j][p] != 0) {\n p = list1[j][p];\n } else if (list2[j][p] != 0) {\n p = list2[j][p];\n }\n }\n a[p] = i;\n }\n\n for (int i = 1; i <= w; i++) {\n System.out.println(a[i]);\n }\n\n }\n\n public static void main(String[] args) {\n Main main = new Main();\n main.DL();\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public void DL() {
Scanner s = new Scanner(System.in);
int w = s.nextInt();
int n = s.nextInt();
int[][] list1 = new int[n][w + 1];
int[][] list2 = new int[n][w + 1];
for (int i = 0; i < n; i++) {
String[] input = s.next().split(",");
int in0 = Integer.parseInt(input[0]);
int in1 = Integer.parseInt(input[1]);
list1[i][in0] = in1;
list2[i][in1] = in0;
}
int[] a = new int[w + 1];
for (int i = 1; i <= w; i++) {
int p = i;
for (int j = 0; j < n; j++) {
if (list1[j][p] != 0) {
p = list1[j][p];
} else if (list2[j][p] != 0) {
p = list2[j][p];
}
}
a[p] = i;
}
for (int i = 1; i <= w; i++) {
System.out.println(a[i]);
}
}
public static void main(String[] args) {
Main main = new Main();
main.DL();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
4,
18,
13,
17,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
13,
13,
2,
13,
17,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
132,
5
],
[
132,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
11,
13
],
[
8,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
21,
25
],
[
6,
26
],
[
26,
27
],
[
6,
28
],
[
28,
29
],
[
6,
30
],
[
30,
31
],
[
132,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
34,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
34,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
34,
52
],
[
52,
53
],
[
52,
54
],
[
34,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
56,
64
],
[
64,
65
],
[
65,
66
],
[
56,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
73,
75
],
[
34,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
81,
82
],
[
81,
83
],
[
76,
84
],
[
84,
85
],
[
85,
86
],
[
76,
87
],
[
88,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
88,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
97,
98
],
[
88,
99
],
[
99,
100
],
[
99,
101
],
[
99,
102
],
[
102,
103
],
[
102,
104
],
[
99,
105
],
[
105,
106
],
[
105,
107
],
[
34,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
108,
113
],
[
113,
114
],
[
113,
115
],
[
108,
116
],
[
116,
117
],
[
117,
118
],
[
108,
119
],
[
120,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
121,
126
],
[
126,
127
],
[
126,
128
],
[
32,
129
],
[
129,
130
],
[
0,
131
],
[
131,
132
],
[
131,
133
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n public static void swap(int[] array, int x, int y) {\n int temp = array[x];\n array[x] = array[y];\n array[y] = temp;\n }\n\n public static void main(String args[]) {\n Scanner sc = new Scanner(System.in);\n sc.useDelimiter(\"[\\\\s,]\");\n\n int w = sc.nextInt();\n int n = sc.nextInt();\n\n int[] order = new int[w];\n for(int i = 0; i < w; i++) {\n order[i] = i + 1;\n }\n\n for(int i = 0; i < n; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n swap(order, a - 1, b - 1);\n }\n\n for(int i = 0; i < w; i++) {\n System.out.println(order[i]);\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void swap(int[] array, int x, int y) {\n int temp = array[x];\n array[x] = array[y];\n array[y] = temp;\n }\n\n public static void main(String args[]) {\n Scanner sc = new Scanner(System.in);\n sc.useDelimiter(\"[\\\\s,]\");\n\n int w = sc.nextInt();\n int n = sc.nextInt();\n\n int[] order = new int[w];\n for(int i = 0; i < w; i++) {\n order[i] = i + 1;\n }\n\n for(int i = 0; i < n; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n swap(order, a - 1, b - 1);\n }\n\n for(int i = 0; i < w; i++) {\n System.out.println(order[i]);\n }\n }\n}",
"Main",
"public static void swap(int[] array, int x, int y) {\n int temp = array[x];\n array[x] = array[y];\n array[y] = temp;\n }",
"swap",
"{\n int temp = array[x];\n array[x] = array[y];\n array[y] = temp;\n }",
"int temp = array[x];",
"temp",
"array[x]",
"array",
"x",
"array[x] = array[y]",
"array[x]",
"array",
"x",
"array[y]",
"array",
"y",
"array[y] = temp",
"array[y]",
"array",
"y",
"temp",
"int[] array",
"array",
"int x",
"x",
"int y",
"y",
"public static void main(String args[]) {\n Scanner sc = new Scanner(System.in);\n sc.useDelimiter(\"[\\\\s,]\");\n\n int w = sc.nextInt();\n int n = sc.nextInt();\n\n int[] order = new int[w];\n for(int i = 0; i < w; i++) {\n order[i] = i + 1;\n }\n\n for(int i = 0; i < n; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n swap(order, a - 1, b - 1);\n }\n\n for(int i = 0; i < w; i++) {\n System.out.println(order[i]);\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n sc.useDelimiter(\"[\\\\s,]\");\n\n int w = sc.nextInt();\n int n = sc.nextInt();\n\n int[] order = new int[w];\n for(int i = 0; i < w; i++) {\n order[i] = i + 1;\n }\n\n for(int i = 0; i < n; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n swap(order, a - 1, b - 1);\n }\n\n for(int i = 0; i < w; i++) {\n System.out.println(order[i]);\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"sc.useDelimiter(\"[\\\\s,]\")",
"sc.useDelimiter",
"sc",
"\"[\\\\s,]\"",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] order = new int[w];",
"order",
"new int[w]",
"w",
"for(int i = 0; i < w; i++) {\n order[i] = i + 1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n order[i] = i + 1;\n }",
"{\n order[i] = i + 1;\n }",
"order[i] = i + 1",
"order[i]",
"order",
"i",
"i + 1",
"i",
"1",
"for(int i = 0; i < n; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n swap(order, a - 1, b - 1);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int a = sc.nextInt();\n int b = sc.nextInt();\n swap(order, a - 1, b - 1);\n }",
"{\n int a = sc.nextInt();\n int b = sc.nextInt();\n swap(order, a - 1, b - 1);\n }",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"swap(order, a - 1, b - 1)",
"swap",
"order",
"a - 1",
"a",
"1",
"b - 1",
"b",
"1",
"for(int i = 0; i < w; i++) {\n System.out.println(order[i]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n System.out.println(order[i]);\n }",
"{\n System.out.println(order[i]);\n }",
"System.out.println(order[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"order[i]",
"order",
"i",
"String args[]",
"args",
"public class Main {\n public static void swap(int[] array, int x, int y) {\n int temp = array[x];\n array[x] = array[y];\n array[y] = temp;\n }\n\n public static void main(String args[]) {\n Scanner sc = new Scanner(System.in);\n sc.useDelimiter(\"[\\\\s,]\");\n\n int w = sc.nextInt();\n int n = sc.nextInt();\n\n int[] order = new int[w];\n for(int i = 0; i < w; i++) {\n order[i] = i + 1;\n }\n\n for(int i = 0; i < n; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n swap(order, a - 1, b - 1);\n }\n\n for(int i = 0; i < w; i++) {\n System.out.println(order[i]);\n }\n }\n}",
"public class Main {\n public static void swap(int[] array, int x, int y) {\n int temp = array[x];\n array[x] = array[y];\n array[y] = temp;\n }\n\n public static void main(String args[]) {\n Scanner sc = new Scanner(System.in);\n sc.useDelimiter(\"[\\\\s,]\");\n\n int w = sc.nextInt();\n int n = sc.nextInt();\n\n int[] order = new int[w];\n for(int i = 0; i < w; i++) {\n order[i] = i + 1;\n }\n\n for(int i = 0; i < n; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n swap(order, a - 1, b - 1);\n }\n\n for(int i = 0; i < w; i++) {\n System.out.println(order[i]);\n }\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void swap(int[] array, int x, int y) {
int temp = array[x];
array[x] = array[y];
array[y] = temp;
}
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
sc.useDelimiter("[\\s,]");
int w = sc.nextInt();
int n = sc.nextInt();
int[] order = new int[w];
for(int i = 0; i < w; i++) {
order[i] = i + 1;
}
for(int i = 0; i < n; i++) {
int a = sc.nextInt();
int b = sc.nextInt();
swap(order, a - 1, b - 1);
}
for(int i = 0; i < w; i++) {
System.out.println(order[i]);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
18,
13,
13,
17,
17,
41,
13,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
0,
13,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
159,
5
],
[
159,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
43,
44
],
[
8,
45
],
[
45,
46
],
[
45,
47
],
[
8,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
54,
55
],
[
54,
56
],
[
49,
57
],
[
57,
58
],
[
58,
59
],
[
49,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
65,
66
],
[
65,
67
],
[
8,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
73,
74
],
[
73,
75
],
[
68,
76
],
[
76,
77
],
[
77,
78
],
[
68,
79
],
[
80,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
83,
89
],
[
80,
90
],
[
90,
91
],
[
80,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
97,
98
],
[
97,
99
],
[
80,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
102,
105
],
[
105,
106
],
[
105,
107
],
[
80,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
112,
114
],
[
80,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
118,
120
],
[
115,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
123,
125
],
[
80,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
129,
131
],
[
126,
132
],
[
8,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
133,
138
],
[
138,
139
],
[
138,
140
],
[
133,
141
],
[
141,
142
],
[
142,
143
],
[
133,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
145,
150
],
[
150,
151
],
[
150,
152
],
[
8,
153
],
[
153,
154
],
[
154,
155
],
[
6,
156
],
[
156,
157
],
[
0,
158
],
[
158,
159
],
[
158,
160
]
] | [
"import java.util.Scanner;\n\npublic class Main{\n public static void main(String arg[]){\n Scanner sc=new Scanner(System.in);\n int w=sc.nextInt();\n int n=sc.nextInt();\n String[] data=new String[w];\n for(int i=0;i<n;i++)data[i]=sc.next();\n int[] ans=new int[w];\n for(int i=0;i<w;i++)ans[i]=i+1;\n for(int i=0;i<n;i++){\n String[] str=data[i].split(\",\",0);\n int swap;\n int a=Integer.valueOf(str[0]);\n int b=Integer.valueOf(str[1]);\n swap=ans[a-1];\n ans[a-1]=ans[b-1];\n ans[b-1]=swap;\n }\n for(int i=0;i<w;i++)System.out.println(ans[i]);\n sc.close();\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String arg[]){\n Scanner sc=new Scanner(System.in);\n int w=sc.nextInt();\n int n=sc.nextInt();\n String[] data=new String[w];\n for(int i=0;i<n;i++)data[i]=sc.next();\n int[] ans=new int[w];\n for(int i=0;i<w;i++)ans[i]=i+1;\n for(int i=0;i<n;i++){\n String[] str=data[i].split(\",\",0);\n int swap;\n int a=Integer.valueOf(str[0]);\n int b=Integer.valueOf(str[1]);\n swap=ans[a-1];\n ans[a-1]=ans[b-1];\n ans[b-1]=swap;\n }\n for(int i=0;i<w;i++)System.out.println(ans[i]);\n sc.close();\n }\n}",
"Main",
"public static void main(String arg[]){\n Scanner sc=new Scanner(System.in);\n int w=sc.nextInt();\n int n=sc.nextInt();\n String[] data=new String[w];\n for(int i=0;i<n;i++)data[i]=sc.next();\n int[] ans=new int[w];\n for(int i=0;i<w;i++)ans[i]=i+1;\n for(int i=0;i<n;i++){\n String[] str=data[i].split(\",\",0);\n int swap;\n int a=Integer.valueOf(str[0]);\n int b=Integer.valueOf(str[1]);\n swap=ans[a-1];\n ans[a-1]=ans[b-1];\n ans[b-1]=swap;\n }\n for(int i=0;i<w;i++)System.out.println(ans[i]);\n sc.close();\n }",
"main",
"{\n Scanner sc=new Scanner(System.in);\n int w=sc.nextInt();\n int n=sc.nextInt();\n String[] data=new String[w];\n for(int i=0;i<n;i++)data[i]=sc.next();\n int[] ans=new int[w];\n for(int i=0;i<w;i++)ans[i]=i+1;\n for(int i=0;i<n;i++){\n String[] str=data[i].split(\",\",0);\n int swap;\n int a=Integer.valueOf(str[0]);\n int b=Integer.valueOf(str[1]);\n swap=ans[a-1];\n ans[a-1]=ans[b-1];\n ans[b-1]=swap;\n }\n for(int i=0;i<w;i++)System.out.println(ans[i]);\n sc.close();\n }",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w=sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String[] data=new String[w];",
"data",
"new String[w]",
"w",
"for(int i=0;i<n;i++)data[i]=sc.next();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"data[i]=sc.next();",
"data[i]=sc.next()",
"data[i]",
"data",
"i",
"sc.next()",
"sc.next",
"sc",
"int[] ans=new int[w];",
"ans",
"new int[w]",
"w",
"for(int i=0;i<w;i++)ans[i]=i+1;",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"ans[i]=i+1;",
"ans[i]=i+1",
"ans[i]",
"ans",
"i",
"i+1",
"i",
"1",
"for(int i=0;i<n;i++){\n String[] str=data[i].split(\",\",0);\n int swap;\n int a=Integer.valueOf(str[0]);\n int b=Integer.valueOf(str[1]);\n swap=ans[a-1];\n ans[a-1]=ans[b-1];\n ans[b-1]=swap;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String[] str=data[i].split(\",\",0);\n int swap;\n int a=Integer.valueOf(str[0]);\n int b=Integer.valueOf(str[1]);\n swap=ans[a-1];\n ans[a-1]=ans[b-1];\n ans[b-1]=swap;\n }",
"{\n String[] str=data[i].split(\",\",0);\n int swap;\n int a=Integer.valueOf(str[0]);\n int b=Integer.valueOf(str[1]);\n swap=ans[a-1];\n ans[a-1]=ans[b-1];\n ans[b-1]=swap;\n }",
"String[] str=data[i].split(\",\",0);",
"str",
"data[i].split(\",\",0)",
"data[i].split",
"data[i]",
"data",
"i",
"\",\"",
"0",
"int swap;",
"swap",
"int a=Integer.valueOf(str[0]);",
"a",
"Integer.valueOf(str[0])",
"Integer.valueOf",
"Integer",
"str[0]",
"str",
"0",
"int b=Integer.valueOf(str[1]);",
"b",
"Integer.valueOf(str[1])",
"Integer.valueOf",
"Integer",
"str[1]",
"str",
"1",
"swap=ans[a-1]",
"swap",
"ans[a-1]",
"ans",
"a-1",
"a",
"1",
"ans[a-1]=ans[b-1]",
"ans[a-1]",
"ans",
"a-1",
"a",
"1",
"ans[b-1]",
"ans",
"b-1",
"b",
"1",
"ans[b-1]=swap",
"ans[b-1]",
"ans",
"b-1",
"b",
"1",
"swap",
"for(int i=0;i<w;i++)System.out.println(ans[i]);",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"System.out.println(ans[i]);",
"System.out.println(ans[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"ans[i]",
"ans",
"i",
"sc.close()",
"sc.close",
"sc",
"String arg[]",
"arg",
"public class Main{\n public static void main(String arg[]){\n Scanner sc=new Scanner(System.in);\n int w=sc.nextInt();\n int n=sc.nextInt();\n String[] data=new String[w];\n for(int i=0;i<n;i++)data[i]=sc.next();\n int[] ans=new int[w];\n for(int i=0;i<w;i++)ans[i]=i+1;\n for(int i=0;i<n;i++){\n String[] str=data[i].split(\",\",0);\n int swap;\n int a=Integer.valueOf(str[0]);\n int b=Integer.valueOf(str[1]);\n swap=ans[a-1];\n ans[a-1]=ans[b-1];\n ans[b-1]=swap;\n }\n for(int i=0;i<w;i++)System.out.println(ans[i]);\n sc.close();\n }\n}",
"public class Main{\n public static void main(String arg[]){\n Scanner sc=new Scanner(System.in);\n int w=sc.nextInt();\n int n=sc.nextInt();\n String[] data=new String[w];\n for(int i=0;i<n;i++)data[i]=sc.next();\n int[] ans=new int[w];\n for(int i=0;i<w;i++)ans[i]=i+1;\n for(int i=0;i<n;i++){\n String[] str=data[i].split(\",\",0);\n int swap;\n int a=Integer.valueOf(str[0]);\n int b=Integer.valueOf(str[1]);\n swap=ans[a-1];\n ans[a-1]=ans[b-1];\n ans[b-1]=swap;\n }\n for(int i=0;i<w;i++)System.out.println(ans[i]);\n sc.close();\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main(String arg[]){
Scanner sc=new Scanner(System.in);
int w=sc.nextInt();
int n=sc.nextInt();
String[] data=new String[w];
for(int i=0;i<n;i++)data[i]=sc.next();
int[] ans=new int[w];
for(int i=0;i<w;i++)ans[i]=i+1;
for(int i=0;i<n;i++){
String[] str=data[i].split(",",0);
int swap;
int a=Integer.valueOf(str[0]);
int b=Integer.valueOf(str[1]);
swap=ans[a-1];
ans[a-1]=ans[b-1];
ans[b-1]=swap;
}
for(int i=0;i<w;i++)System.out.println(ans[i]);
sc.close();
}
}
|
[
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,
4,
18,
13,
13,
41,
13,
4,
13,
13,
0,
13,
4,
13,
13,
13,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
13,
4,
18,
13,
13,
29,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
13,
17,
41,
13,
4,
18,
4,
18,
13,
13,
17,
14,
4,
18,
13,
13,
30,
0,
13,
13,
14,
4,
18,
13,
13,
30,
0,
13,
13,
4,
18,
13,
2,
4,
18,
13,
13,
17,
4,
18,
13,
2,
13,
17,
29,
13,
23,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
29,
32
],
[
32,
33
],
[
33,
34
],
[
23,
35
],
[
35,
36
],
[
35,
37
],
[
23,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
23,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
47,
49
],
[
23,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
52,
54
],
[
52,
55
],
[
23,
56
],
[
56,
57
],
[
56,
58
],
[
56,
59
],
[
60,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
21,
67
],
[
67,
68
],
[
19,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
77,
78
],
[
78,
79
],
[
71,
80
],
[
80,
81
],
[
80,
82
],
[
71,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
88,
89
],
[
88,
90
],
[
83,
91
],
[
91,
92
],
[
92,
93
],
[
83,
94
],
[
95,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
98,
103
],
[
95,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
107,
108
],
[
106,
109
],
[
95,
110
],
[
110,
111
],
[
111,
112
],
[
110,
113
],
[
71,
114
],
[
114,
115
],
[
69,
116
],
[
116,
117
],
[
19,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
121,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
129,
130
],
[
121,
131
],
[
131,
132
],
[
132,
133
],
[
121,
134
],
[
135,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
139,
140
],
[
138,
141
],
[
141,
142
],
[
141,
143
],
[
135,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
144,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
152,
153
],
[
144,
154
],
[
154,
155
],
[
155,
156
],
[
144,
157
],
[
158,
158
],
[
158,
159
],
[
159,
160
],
[
159,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
164,
165
],
[
163,
166
],
[
161,
167
],
[
158,
168
],
[
168,
169
],
[
168,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
172,
175
],
[
170,
176
],
[
158,
177
],
[
177,
178
],
[
178,
179
],
[
179,
180
],
[
178,
181
],
[
177,
182
],
[
182,
183
],
[
183,
184
],
[
183,
185
],
[
177,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
187,
190
],
[
186,
191
],
[
191,
192
],
[
192,
193
],
[
192,
194
],
[
135,
195
],
[
195,
196
],
[
196,
197
],
[
195,
198
],
[
198,
199
],
[
199,
200
],
[
200,
201
],
[
199,
202
],
[
198,
203
],
[
195,
204
],
[
204,
205
],
[
205,
206
],
[
204,
207
],
[
207,
208
],
[
207,
209
],
[
120,
210
],
[
210,
211
],
[
118,
212
],
[
212,
213
],
[
118,
214
],
[
214,
215
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.List;\n\nclass Main {\n\t/**\n\t * ??\\?????????????????? / ????????????????????????\n\t */\n\tpublic static void main(String[] args) throws Exception {\n\n\t\t// ??\\???????????????\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint verticalLineCount = Integer.parseInt(br.readLine());\n\t\t// ???????????????????£??????° ???????????????\n\t\tString[] verticalLine = new String[verticalLineCount];\n\t\tList<String> goalNumberList = Arrays.asList(verticalLine);\n\n\t\tList<List<String>> allSideLine = processAllSideLine(br);\n\n\t\tgoalNumberList = processGoalNumberList(goalNumberList, allSideLine);\n\n\t\t// ???????????????\n\t\tfor (String string : goalNumberList) {\n\n\t\t\tSystem.out.println(string);\n\t\t}\n\t}\n\n\t/**\n\t * ??¨???????¨??£?????????¨??????????´??????????????¬?????????????????????????\n\t */\n\tpublic static List<List<String>> processAllSideLine(BufferedReader br) throws IOException {\n\n\t\tint sideLineCount = Integer.parseInt(br.readLine());\n\t\tList<List<String>> allSideLine = new ArrayList<>();\n\n\t\tfor (int i = 0; i < sideLineCount; i++) {\n\n\t\t\tString[] sideLine = br.readLine().split(\",\");\n\t\t\tList<String> sideLineToList = Arrays.asList(sideLine);\n\t\t\tallSideLine.add(sideLineToList);\n\t\t}\n\n\t\treturn allSideLine;\n\t}\n\n\t/**\n\t * ????????????????????????????????????????????????????????§?????????????????????????????????????????§????????????\n\t */\n\tpublic static List<String> processGoalNumberList(List<String> goalNumberList, List<List<String>> allSideLine) {\n\n\t\tfor (int startNumber = 0; startNumber < goalNumberList.size(); startNumber++) {\n\n\t\t\tString goalNumber = String.valueOf(startNumber + 1);\n\n\t\t\tfor (int j = 0; j < allSideLine.size(); j++) {\n\n\t\t\t\tString sideNode_1 = allSideLine.get(j).get(0);\n\t\t\t\tString sideNode_2 = allSideLine.get(j).get(1);\n\n\t\t\t\tif (sideNode_1.equals(goalNumber)) {\n\n\t\t\t\t\tgoalNumber = sideNode_2;\n\t\t\t\t} else if (sideNode_2.equals(goalNumber)) {\n\n\t\t\t\t\tgoalNumber = sideNode_1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tgoalNumberList.set(Integer.parseInt(goalNumber) - 1, String.valueOf(startNumber + 1));\n\t\t}\n\n\t\treturn goalNumberList;\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.List;",
"List",
"java.util",
"class Main {\n\t/**\n\t * ??\\?????????????????? / ????????????????????????\n\t */\n\tpublic static void main(String[] args) throws Exception {\n\n\t\t// ??\\???????????????\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint verticalLineCount = Integer.parseInt(br.readLine());\n\t\t// ???????????????????£??????° ???????????????\n\t\tString[] verticalLine = new String[verticalLineCount];\n\t\tList<String> goalNumberList = Arrays.asList(verticalLine);\n\n\t\tList<List<String>> allSideLine = processAllSideLine(br);\n\n\t\tgoalNumberList = processGoalNumberList(goalNumberList, allSideLine);\n\n\t\t// ???????????????\n\t\tfor (String string : goalNumberList) {\n\n\t\t\tSystem.out.println(string);\n\t\t}\n\t}\n\n\t/**\n\t * ??¨???????¨??£?????????¨??????????´??????????????¬?????????????????????????\n\t */\n\tpublic static List<List<String>> processAllSideLine(BufferedReader br) throws IOException {\n\n\t\tint sideLineCount = Integer.parseInt(br.readLine());\n\t\tList<List<String>> allSideLine = new ArrayList<>();\n\n\t\tfor (int i = 0; i < sideLineCount; i++) {\n\n\t\t\tString[] sideLine = br.readLine().split(\",\");\n\t\t\tList<String> sideLineToList = Arrays.asList(sideLine);\n\t\t\tallSideLine.add(sideLineToList);\n\t\t}\n\n\t\treturn allSideLine;\n\t}\n\n\t/**\n\t * ????????????????????????????????????????????????????????§?????????????????????????????????????????§????????????\n\t */\n\tpublic static List<String> processGoalNumberList(List<String> goalNumberList, List<List<String>> allSideLine) {\n\n\t\tfor (int startNumber = 0; startNumber < goalNumberList.size(); startNumber++) {\n\n\t\t\tString goalNumber = String.valueOf(startNumber + 1);\n\n\t\t\tfor (int j = 0; j < allSideLine.size(); j++) {\n\n\t\t\t\tString sideNode_1 = allSideLine.get(j).get(0);\n\t\t\t\tString sideNode_2 = allSideLine.get(j).get(1);\n\n\t\t\t\tif (sideNode_1.equals(goalNumber)) {\n\n\t\t\t\t\tgoalNumber = sideNode_2;\n\t\t\t\t} else if (sideNode_2.equals(goalNumber)) {\n\n\t\t\t\t\tgoalNumber = sideNode_1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tgoalNumberList.set(Integer.parseInt(goalNumber) - 1, String.valueOf(startNumber + 1));\n\t\t}\n\n\t\treturn goalNumberList;\n\t}\n}",
"Main",
"/**\n\t * ??\\?????????????????? / ????????????????????????\n\t */\n\tpublic static void main(String[] args) throws Exception {\n\n\t\t// ??\\???????????????\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint verticalLineCount = Integer.parseInt(br.readLine());\n\t\t// ???????????????????£??????° ???????????????\n\t\tString[] verticalLine = new String[verticalLineCount];\n\t\tList<String> goalNumberList = Arrays.asList(verticalLine);\n\n\t\tList<List<String>> allSideLine = processAllSideLine(br);\n\n\t\tgoalNumberList = processGoalNumberList(goalNumberList, allSideLine);\n\n\t\t// ???????????????\n\t\tfor (String string : goalNumberList) {\n\n\t\t\tSystem.out.println(string);\n\t\t}\n\t}",
"main",
"{\n\n\t\t// ??\\???????????????\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint verticalLineCount = Integer.parseInt(br.readLine());\n\t\t// ???????????????????£??????° ???????????????\n\t\tString[] verticalLine = new String[verticalLineCount];\n\t\tList<String> goalNumberList = Arrays.asList(verticalLine);\n\n\t\tList<List<String>> allSideLine = processAllSideLine(br);\n\n\t\tgoalNumberList = processGoalNumberList(goalNumberList, allSideLine);\n\n\t\t// ???????????????\n\t\tfor (String string : goalNumberList) {\n\n\t\t\tSystem.out.println(string);\n\t\t}\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int verticalLineCount = Integer.parseInt(br.readLine());",
"verticalLineCount",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"String[] verticalLine = new String[verticalLineCount];",
"verticalLine",
"new String[verticalLineCount]",
"verticalLineCount",
"List<String> goalNumberList = Arrays.asList(verticalLine);",
"goalNumberList",
"Arrays.asList(verticalLine)",
"Arrays.asList",
"Arrays",
"verticalLine",
"List<List<String>> allSideLine = processAllSideLine(br);",
"allSideLine",
"processAllSideLine(br)",
"processAllSideLine",
"br",
"goalNumberList = processGoalNumberList(goalNumberList, allSideLine)",
"goalNumberList",
"processGoalNumberList(goalNumberList, allSideLine)",
"processGoalNumberList",
"goalNumberList",
"allSideLine",
"for (String string : goalNumberList) {\n\n\t\t\tSystem.out.println(string);\n\t\t}",
"String string",
"goalNumberList",
"{\n\n\t\t\tSystem.out.println(string);\n\t\t}",
"{\n\n\t\t\tSystem.out.println(string);\n\t\t}",
"System.out.println(string)",
"System.out.println",
"System.out",
"System",
"System.out",
"string",
"String[] args",
"args",
"/**\n\t * ??¨???????¨??£?????????¨??????????´??????????????¬?????????????????????????\n\t */\n\tpublic static List<List<String>> processAllSideLine(BufferedReader br) throws IOException {\n\n\t\tint sideLineCount = Integer.parseInt(br.readLine());\n\t\tList<List<String>> allSideLine = new ArrayList<>();\n\n\t\tfor (int i = 0; i < sideLineCount; i++) {\n\n\t\t\tString[] sideLine = br.readLine().split(\",\");\n\t\t\tList<String> sideLineToList = Arrays.asList(sideLine);\n\t\t\tallSideLine.add(sideLineToList);\n\t\t}\n\n\t\treturn allSideLine;\n\t}",
"processAllSideLine",
"{\n\n\t\tint sideLineCount = Integer.parseInt(br.readLine());\n\t\tList<List<String>> allSideLine = new ArrayList<>();\n\n\t\tfor (int i = 0; i < sideLineCount; i++) {\n\n\t\t\tString[] sideLine = br.readLine().split(\",\");\n\t\t\tList<String> sideLineToList = Arrays.asList(sideLine);\n\t\t\tallSideLine.add(sideLineToList);\n\t\t}\n\n\t\treturn allSideLine;\n\t}",
"int sideLineCount = Integer.parseInt(br.readLine());",
"sideLineCount",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"List<List<String>> allSideLine = new ArrayList<>();",
"allSideLine",
"new ArrayList<>()",
"for (int i = 0; i < sideLineCount; i++) {\n\n\t\t\tString[] sideLine = br.readLine().split(\",\");\n\t\t\tList<String> sideLineToList = Arrays.asList(sideLine);\n\t\t\tallSideLine.add(sideLineToList);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < sideLineCount",
"i",
"sideLineCount",
"i++",
"i++",
"i",
"{\n\n\t\t\tString[] sideLine = br.readLine().split(\",\");\n\t\t\tList<String> sideLineToList = Arrays.asList(sideLine);\n\t\t\tallSideLine.add(sideLineToList);\n\t\t}",
"{\n\n\t\t\tString[] sideLine = br.readLine().split(\",\");\n\t\t\tList<String> sideLineToList = Arrays.asList(sideLine);\n\t\t\tallSideLine.add(sideLineToList);\n\t\t}",
"String[] sideLine = br.readLine().split(\",\");",
"sideLine",
"br.readLine().split(\",\")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\",\"",
"List<String> sideLineToList = Arrays.asList(sideLine);",
"sideLineToList",
"Arrays.asList(sideLine)",
"Arrays.asList",
"Arrays",
"sideLine",
"allSideLine.add(sideLineToList)",
"allSideLine.add",
"allSideLine",
"sideLineToList",
"return allSideLine;",
"allSideLine",
"BufferedReader br",
"br",
"/**\n\t * ????????????????????????????????????????????????????????§?????????????????????????????????????????§????????????\n\t */\n\tpublic static List<String> processGoalNumberList(List<String> goalNumberList, List<List<String>> allSideLine) {\n\n\t\tfor (int startNumber = 0; startNumber < goalNumberList.size(); startNumber++) {\n\n\t\t\tString goalNumber = String.valueOf(startNumber + 1);\n\n\t\t\tfor (int j = 0; j < allSideLine.size(); j++) {\n\n\t\t\t\tString sideNode_1 = allSideLine.get(j).get(0);\n\t\t\t\tString sideNode_2 = allSideLine.get(j).get(1);\n\n\t\t\t\tif (sideNode_1.equals(goalNumber)) {\n\n\t\t\t\t\tgoalNumber = sideNode_2;\n\t\t\t\t} else if (sideNode_2.equals(goalNumber)) {\n\n\t\t\t\t\tgoalNumber = sideNode_1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tgoalNumberList.set(Integer.parseInt(goalNumber) - 1, String.valueOf(startNumber + 1));\n\t\t}\n\n\t\treturn goalNumberList;\n\t}",
"processGoalNumberList",
"{\n\n\t\tfor (int startNumber = 0; startNumber < goalNumberList.size(); startNumber++) {\n\n\t\t\tString goalNumber = String.valueOf(startNumber + 1);\n\n\t\t\tfor (int j = 0; j < allSideLine.size(); j++) {\n\n\t\t\t\tString sideNode_1 = allSideLine.get(j).get(0);\n\t\t\t\tString sideNode_2 = allSideLine.get(j).get(1);\n\n\t\t\t\tif (sideNode_1.equals(goalNumber)) {\n\n\t\t\t\t\tgoalNumber = sideNode_2;\n\t\t\t\t} else if (sideNode_2.equals(goalNumber)) {\n\n\t\t\t\t\tgoalNumber = sideNode_1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tgoalNumberList.set(Integer.parseInt(goalNumber) - 1, String.valueOf(startNumber + 1));\n\t\t}\n\n\t\treturn goalNumberList;\n\t}",
"for (int startNumber = 0; startNumber < goalNumberList.size(); startNumber++) {\n\n\t\t\tString goalNumber = String.valueOf(startNumber + 1);\n\n\t\t\tfor (int j = 0; j < allSideLine.size(); j++) {\n\n\t\t\t\tString sideNode_1 = allSideLine.get(j).get(0);\n\t\t\t\tString sideNode_2 = allSideLine.get(j).get(1);\n\n\t\t\t\tif (sideNode_1.equals(goalNumber)) {\n\n\t\t\t\t\tgoalNumber = sideNode_2;\n\t\t\t\t} else if (sideNode_2.equals(goalNumber)) {\n\n\t\t\t\t\tgoalNumber = sideNode_1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tgoalNumberList.set(Integer.parseInt(goalNumber) - 1, String.valueOf(startNumber + 1));\n\t\t}",
"int startNumber = 0;",
"int startNumber = 0;",
"startNumber",
"0",
"startNumber < goalNumberList.size()",
"startNumber",
"goalNumberList.size()",
"goalNumberList.size",
"goalNumberList",
"startNumber++",
"startNumber++",
"startNumber",
"{\n\n\t\t\tString goalNumber = String.valueOf(startNumber + 1);\n\n\t\t\tfor (int j = 0; j < allSideLine.size(); j++) {\n\n\t\t\t\tString sideNode_1 = allSideLine.get(j).get(0);\n\t\t\t\tString sideNode_2 = allSideLine.get(j).get(1);\n\n\t\t\t\tif (sideNode_1.equals(goalNumber)) {\n\n\t\t\t\t\tgoalNumber = sideNode_2;\n\t\t\t\t} else if (sideNode_2.equals(goalNumber)) {\n\n\t\t\t\t\tgoalNumber = sideNode_1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tgoalNumberList.set(Integer.parseInt(goalNumber) - 1, String.valueOf(startNumber + 1));\n\t\t}",
"{\n\n\t\t\tString goalNumber = String.valueOf(startNumber + 1);\n\n\t\t\tfor (int j = 0; j < allSideLine.size(); j++) {\n\n\t\t\t\tString sideNode_1 = allSideLine.get(j).get(0);\n\t\t\t\tString sideNode_2 = allSideLine.get(j).get(1);\n\n\t\t\t\tif (sideNode_1.equals(goalNumber)) {\n\n\t\t\t\t\tgoalNumber = sideNode_2;\n\t\t\t\t} else if (sideNode_2.equals(goalNumber)) {\n\n\t\t\t\t\tgoalNumber = sideNode_1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tgoalNumberList.set(Integer.parseInt(goalNumber) - 1, String.valueOf(startNumber + 1));\n\t\t}",
"String goalNumber = String.valueOf(startNumber + 1);",
"goalNumber",
"String.valueOf(startNumber + 1)",
"String.valueOf",
"String",
"startNumber + 1",
"startNumber",
"1",
"for (int j = 0; j < allSideLine.size(); j++) {\n\n\t\t\t\tString sideNode_1 = allSideLine.get(j).get(0);\n\t\t\t\tString sideNode_2 = allSideLine.get(j).get(1);\n\n\t\t\t\tif (sideNode_1.equals(goalNumber)) {\n\n\t\t\t\t\tgoalNumber = sideNode_2;\n\t\t\t\t} else if (sideNode_2.equals(goalNumber)) {\n\n\t\t\t\t\tgoalNumber = sideNode_1;\n\t\t\t\t}\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < allSideLine.size()",
"j",
"allSideLine.size()",
"allSideLine.size",
"allSideLine",
"j++",
"j++",
"j",
"{\n\n\t\t\t\tString sideNode_1 = allSideLine.get(j).get(0);\n\t\t\t\tString sideNode_2 = allSideLine.get(j).get(1);\n\n\t\t\t\tif (sideNode_1.equals(goalNumber)) {\n\n\t\t\t\t\tgoalNumber = sideNode_2;\n\t\t\t\t} else if (sideNode_2.equals(goalNumber)) {\n\n\t\t\t\t\tgoalNumber = sideNode_1;\n\t\t\t\t}\n\t\t\t}",
"{\n\n\t\t\t\tString sideNode_1 = allSideLine.get(j).get(0);\n\t\t\t\tString sideNode_2 = allSideLine.get(j).get(1);\n\n\t\t\t\tif (sideNode_1.equals(goalNumber)) {\n\n\t\t\t\t\tgoalNumber = sideNode_2;\n\t\t\t\t} else if (sideNode_2.equals(goalNumber)) {\n\n\t\t\t\t\tgoalNumber = sideNode_1;\n\t\t\t\t}\n\t\t\t}",
"String sideNode_1 = allSideLine.get(j).get(0);",
"sideNode_1",
"allSideLine.get(j).get(0)",
"allSideLine.get(j).get",
"allSideLine.get(j)",
"allSideLine.get",
"allSideLine",
"j",
"0",
"String sideNode_2 = allSideLine.get(j).get(1);",
"sideNode_2",
"allSideLine.get(j).get(1)",
"allSideLine.get(j).get",
"allSideLine.get(j)",
"allSideLine.get",
"allSideLine",
"j",
"1",
"if (sideNode_1.equals(goalNumber)) {\n\n\t\t\t\t\tgoalNumber = sideNode_2;\n\t\t\t\t} else if (sideNode_2.equals(goalNumber)) {\n\n\t\t\t\t\tgoalNumber = sideNode_1;\n\t\t\t\t}",
"sideNode_1.equals(goalNumber)",
"sideNode_1.equals",
"sideNode_1",
"goalNumber",
"{\n\n\t\t\t\t\tgoalNumber = sideNode_2;\n\t\t\t\t}",
"goalNumber = sideNode_2",
"goalNumber",
"sideNode_2",
"if (sideNode_2.equals(goalNumber)) {\n\n\t\t\t\t\tgoalNumber = sideNode_1;\n\t\t\t\t}",
"sideNode_2.equals(goalNumber)",
"sideNode_2.equals",
"sideNode_2",
"goalNumber",
"{\n\n\t\t\t\t\tgoalNumber = sideNode_1;\n\t\t\t\t}",
"goalNumber = sideNode_1",
"goalNumber",
"sideNode_1",
"goalNumberList.set(Integer.parseInt(goalNumber) - 1, String.valueOf(startNumber + 1))",
"goalNumberList.set",
"goalNumberList",
"Integer.parseInt(goalNumber) - 1",
"Integer.parseInt(goalNumber)",
"Integer.parseInt",
"Integer",
"goalNumber",
"1",
"String.valueOf(startNumber + 1)",
"String.valueOf",
"String",
"startNumber + 1",
"startNumber",
"1",
"return goalNumberList;",
"goalNumberList",
"List<String> goalNumberList",
"goalNumberList",
"List<List<String>> allSideLine",
"allSideLine"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
class Main {
/**
* ??\?????????????????? / ????????????????????????
*/
public static void main(String[] args) throws Exception {
// ??\???????????????
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int verticalLineCount = Integer.parseInt(br.readLine());
// ???????????????????£??????° ???????????????
String[] verticalLine = new String[verticalLineCount];
List<String> goalNumberList = Arrays.asList(verticalLine);
List<List<String>> allSideLine = processAllSideLine(br);
goalNumberList = processGoalNumberList(goalNumberList, allSideLine);
// ???????????????
for (String string : goalNumberList) {
System.out.println(string);
}
}
/**
* ??¨???????¨??£?????????¨??????????´??????????????¬?????????????????????????
*/
public static List<List<String>> processAllSideLine(BufferedReader br) throws IOException {
int sideLineCount = Integer.parseInt(br.readLine());
List<List<String>> allSideLine = new ArrayList<>();
for (int i = 0; i < sideLineCount; i++) {
String[] sideLine = br.readLine().split(",");
List<String> sideLineToList = Arrays.asList(sideLine);
allSideLine.add(sideLineToList);
}
return allSideLine;
}
/**
* ????????????????????????????????????????????????????????§?????????????????????????????????????????§????????????
*/
public static List<String> processGoalNumberList(List<String> goalNumberList, List<List<String>> allSideLine) {
for (int startNumber = 0; startNumber < goalNumberList.size(); startNumber++) {
String goalNumber = String.valueOf(startNumber + 1);
for (int j = 0; j < allSideLine.size(); j++) {
String sideNode_1 = allSideLine.get(j).get(0);
String sideNode_2 = allSideLine.get(j).get(1);
if (sideNode_1.equals(goalNumber)) {
goalNumber = sideNode_2;
} else if (sideNode_2.equals(goalNumber)) {
goalNumber = sideNode_1;
}
}
goalNumberList.set(Integer.parseInt(goalNumber) - 1, String.valueOf(startNumber + 1));
}
return goalNumberList;
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
29,
30,
38,
5,
13,
30,
29,
30,
4,
18,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
20,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
18,
13,
13,
4,
18,
13,
13,
28,
13,
4,
13,
13,
13,
30,
30,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
28,
13,
13,
30,
30,
41,
13,
18,
13,
2,
18,
13,
17,
17,
0,
18,
13,
2,
18,
13,
17,
17,
18,
13,
2,
18,
13,
17,
17,
0,
18,
13,
2,
18,
13,
17,
17,
13,
29,
13,
23,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
24,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
30,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
24,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
45,
46
],
[
46,
47
],
[
39,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
53,
54
],
[
54,
55
],
[
39,
56
],
[
56,
57
],
[
56,
58
],
[
39,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
59,
64
],
[
64,
65
],
[
64,
66
],
[
59,
67
],
[
67,
68
],
[
68,
69
],
[
59,
70
],
[
71,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
74,
79
],
[
71,
80
],
[
80,
81
],
[
80,
82
],
[
71,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
91,
93
],
[
84,
94
],
[
94,
95
],
[
95,
96
],
[
84,
97
],
[
98,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
106,
107
],
[
106,
108
],
[
71,
109
],
[
109,
110
],
[
110,
111
],
[
109,
112
],
[
39,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
115,
117
],
[
115,
118
],
[
113,
119
],
[
120,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
121,
126
],
[
18,
127
],
[
127,
128
],
[
16,
129
],
[
129,
130
],
[
129,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
131,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
136,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
143,
145
],
[
136,
146
],
[
146,
147
],
[
147,
148
],
[
136,
149
],
[
150,
150
],
[
150,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
151,
155
],
[
155,
156
],
[
155,
157
],
[
131,
158
],
[
158,
159
],
[
158,
160
],
[
158,
161
],
[
162,
162
],
[
162,
163
],
[
163,
164
],
[
163,
165
],
[
165,
166
],
[
165,
167
],
[
167,
168
],
[
168,
169
],
[
168,
170
],
[
167,
171
],
[
162,
172
],
[
172,
173
],
[
173,
174
],
[
173,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
175,
179
],
[
172,
180
],
[
180,
181
],
[
180,
182
],
[
182,
183
],
[
183,
184
],
[
183,
185
],
[
182,
186
],
[
162,
187
],
[
187,
188
],
[
188,
189
],
[
188,
190
],
[
190,
191
],
[
191,
192
],
[
191,
193
],
[
190,
194
],
[
187,
195
],
[
131,
196
],
[
196,
197
],
[
129,
198
],
[
198,
199
],
[
129,
200
],
[
200,
201
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\nimport java.util.List;\n\nclass Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\ttry{\n\t\t\tint verLineNum = Integer.parseInt(br.readLine()); //tate\n\t\t\tint horLineNum = Integer.parseInt(br.readLine()); //yoko\n\t\t\tArrayList<Integer[]> horLineList = new ArrayList<Integer[]>();\n\t\t\tfor(int i=0;i<horLineNum;i++){\n\t\t\t\tString[] lineStr = br.readLine().split(\",\");\n\t\t\t\tInteger[] lineInfo = new Integer[2];\n\t\t\t\tfor(int j=0;j<lineInfo.length;j++){\n\t\t\t\t\tlineInfo[j] = Integer.parseInt(lineStr[j]);\n\t\t\t\t}\n\t\t\t\thorLineList.add(lineInfo);\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i : SortGoalLine(verLineNum, horLineList)){\n\t\t\t\tSystem.out.println(i);\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e){\n\t\t\treturn;\n\t\t}\n\t\tfinally{\n\t\t\ttry {\n\t\t\t\tbr.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tprivate static Integer[] SortGoalLine(int verLineNum,List<Integer[]> horizonLineList){\n\t\tInteger[] goalNum = new Integer[verLineNum];\n\t\tfor(int i=0;i<goalNum.length;i++){\n\t\t\tgoalNum[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(Integer[] i : horizonLineList){\n\t\t\tint temp = goalNum[i[0]-1];\n\t\t\tgoalNum[i[0]-1] = goalNum[i[1]-1];\n\t\t\tgoalNum[i[1]-1] = temp;\n\t\t}\n\t\t\n\t\treturn goalNum;\n\t}\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.List;",
"List",
"java.util",
"class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\ttry{\n\t\t\tint verLineNum = Integer.parseInt(br.readLine()); //tate\n\t\t\tint horLineNum = Integer.parseInt(br.readLine()); //yoko\n\t\t\tArrayList<Integer[]> horLineList = new ArrayList<Integer[]>();\n\t\t\tfor(int i=0;i<horLineNum;i++){\n\t\t\t\tString[] lineStr = br.readLine().split(\",\");\n\t\t\t\tInteger[] lineInfo = new Integer[2];\n\t\t\t\tfor(int j=0;j<lineInfo.length;j++){\n\t\t\t\t\tlineInfo[j] = Integer.parseInt(lineStr[j]);\n\t\t\t\t}\n\t\t\t\thorLineList.add(lineInfo);\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i : SortGoalLine(verLineNum, horLineList)){\n\t\t\t\tSystem.out.println(i);\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e){\n\t\t\treturn;\n\t\t}\n\t\tfinally{\n\t\t\ttry {\n\t\t\t\tbr.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tprivate static Integer[] SortGoalLine(int verLineNum,List<Integer[]> horizonLineList){\n\t\tInteger[] goalNum = new Integer[verLineNum];\n\t\tfor(int i=0;i<goalNum.length;i++){\n\t\t\tgoalNum[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(Integer[] i : horizonLineList){\n\t\t\tint temp = goalNum[i[0]-1];\n\t\t\tgoalNum[i[0]-1] = goalNum[i[1]-1];\n\t\t\tgoalNum[i[1]-1] = temp;\n\t\t}\n\t\t\n\t\treturn goalNum;\n\t}\n\n}",
"Main",
"/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\ttry{\n\t\t\tint verLineNum = Integer.parseInt(br.readLine()); //tate\n\t\t\tint horLineNum = Integer.parseInt(br.readLine()); //yoko\n\t\t\tArrayList<Integer[]> horLineList = new ArrayList<Integer[]>();\n\t\t\tfor(int i=0;i<horLineNum;i++){\n\t\t\t\tString[] lineStr = br.readLine().split(\",\");\n\t\t\t\tInteger[] lineInfo = new Integer[2];\n\t\t\t\tfor(int j=0;j<lineInfo.length;j++){\n\t\t\t\t\tlineInfo[j] = Integer.parseInt(lineStr[j]);\n\t\t\t\t}\n\t\t\t\thorLineList.add(lineInfo);\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i : SortGoalLine(verLineNum, horLineList)){\n\t\t\t\tSystem.out.println(i);\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e){\n\t\t\treturn;\n\t\t}\n\t\tfinally{\n\t\t\ttry {\n\t\t\t\tbr.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\ttry{\n\t\t\tint verLineNum = Integer.parseInt(br.readLine()); //tate\n\t\t\tint horLineNum = Integer.parseInt(br.readLine()); //yoko\n\t\t\tArrayList<Integer[]> horLineList = new ArrayList<Integer[]>();\n\t\t\tfor(int i=0;i<horLineNum;i++){\n\t\t\t\tString[] lineStr = br.readLine().split(\",\");\n\t\t\t\tInteger[] lineInfo = new Integer[2];\n\t\t\t\tfor(int j=0;j<lineInfo.length;j++){\n\t\t\t\t\tlineInfo[j] = Integer.parseInt(lineStr[j]);\n\t\t\t\t}\n\t\t\t\thorLineList.add(lineInfo);\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i : SortGoalLine(verLineNum, horLineList)){\n\t\t\t\tSystem.out.println(i);\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e){\n\t\t\treturn;\n\t\t}\n\t\tfinally{\n\t\t\ttry {\n\t\t\t\tbr.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"try{\n\t\t\tint verLineNum = Integer.parseInt(br.readLine()); //tate\n\t\t\tint horLineNum = Integer.parseInt(br.readLine()); //yoko\n\t\t\tArrayList<Integer[]> horLineList = new ArrayList<Integer[]>();\n\t\t\tfor(int i=0;i<horLineNum;i++){\n\t\t\t\tString[] lineStr = br.readLine().split(\",\");\n\t\t\t\tInteger[] lineInfo = new Integer[2];\n\t\t\t\tfor(int j=0;j<lineInfo.length;j++){\n\t\t\t\t\tlineInfo[j] = Integer.parseInt(lineStr[j]);\n\t\t\t\t}\n\t\t\t\thorLineList.add(lineInfo);\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i : SortGoalLine(verLineNum, horLineList)){\n\t\t\t\tSystem.out.println(i);\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e){\n\t\t\treturn;\n\t\t}\n\t\tfinally{\n\t\t\ttry {\n\t\t\t\tbr.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\treturn;\n\t\t\t}\n\t\t}",
"catch(Exception e){\n\t\t\treturn;\n\t\t}",
"Exception e",
"{\n\t\t\treturn;\n\t\t}",
"return;",
"{\n\t\t\ttry {\n\t\t\t\tbr.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\treturn;\n\t\t\t}\n\t\t}",
"try {\n\t\t\t\tbr.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\treturn;\n\t\t\t}",
"catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\treturn;\n\t\t\t}",
"IOException e",
"{\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\treturn;\n\t\t\t}",
"return;",
"{\n\t\t\t\tbr.close();\n\t\t\t}",
"br.close()",
"br.close",
"br",
"{\n\t\t\tint verLineNum = Integer.parseInt(br.readLine()); //tate\n\t\t\tint horLineNum = Integer.parseInt(br.readLine()); //yoko\n\t\t\tArrayList<Integer[]> horLineList = new ArrayList<Integer[]>();\n\t\t\tfor(int i=0;i<horLineNum;i++){\n\t\t\t\tString[] lineStr = br.readLine().split(\",\");\n\t\t\t\tInteger[] lineInfo = new Integer[2];\n\t\t\t\tfor(int j=0;j<lineInfo.length;j++){\n\t\t\t\t\tlineInfo[j] = Integer.parseInt(lineStr[j]);\n\t\t\t\t}\n\t\t\t\thorLineList.add(lineInfo);\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i : SortGoalLine(verLineNum, horLineList)){\n\t\t\t\tSystem.out.println(i);\n\t\t\t}\n\t\t}",
"int verLineNum = Integer.parseInt(br.readLine());",
"verLineNum",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int horLineNum = Integer.parseInt(br.readLine());",
"horLineNum",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"ArrayList<Integer[]> horLineList = new ArrayList<Integer[]>();",
"horLineList",
"new ArrayList<Integer[]>()",
"for(int i=0;i<horLineNum;i++){\n\t\t\t\tString[] lineStr = br.readLine().split(\",\");\n\t\t\t\tInteger[] lineInfo = new Integer[2];\n\t\t\t\tfor(int j=0;j<lineInfo.length;j++){\n\t\t\t\t\tlineInfo[j] = Integer.parseInt(lineStr[j]);\n\t\t\t\t}\n\t\t\t\thorLineList.add(lineInfo);\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<horLineNum",
"i",
"horLineNum",
"i++",
"i++",
"i",
"{\n\t\t\t\tString[] lineStr = br.readLine().split(\",\");\n\t\t\t\tInteger[] lineInfo = new Integer[2];\n\t\t\t\tfor(int j=0;j<lineInfo.length;j++){\n\t\t\t\t\tlineInfo[j] = Integer.parseInt(lineStr[j]);\n\t\t\t\t}\n\t\t\t\thorLineList.add(lineInfo);\n\t\t\t}",
"{\n\t\t\t\tString[] lineStr = br.readLine().split(\",\");\n\t\t\t\tInteger[] lineInfo = new Integer[2];\n\t\t\t\tfor(int j=0;j<lineInfo.length;j++){\n\t\t\t\t\tlineInfo[j] = Integer.parseInt(lineStr[j]);\n\t\t\t\t}\n\t\t\t\thorLineList.add(lineInfo);\n\t\t\t}",
"String[] lineStr = br.readLine().split(\",\");",
"lineStr",
"br.readLine().split(\",\")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\",\"",
"Integer[] lineInfo = new Integer[2];",
"lineInfo",
"new Integer[2]",
"2",
"for(int j=0;j<lineInfo.length;j++){\n\t\t\t\t\tlineInfo[j] = Integer.parseInt(lineStr[j]);\n\t\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<lineInfo.length",
"j",
"lineInfo.length",
"lineInfo",
"lineInfo.length",
"j++",
"j++",
"j",
"{\n\t\t\t\t\tlineInfo[j] = Integer.parseInt(lineStr[j]);\n\t\t\t\t}",
"{\n\t\t\t\t\tlineInfo[j] = Integer.parseInt(lineStr[j]);\n\t\t\t\t}",
"lineInfo[j] = Integer.parseInt(lineStr[j])",
"lineInfo[j]",
"lineInfo",
"j",
"Integer.parseInt(lineStr[j])",
"Integer.parseInt",
"Integer",
"lineStr[j]",
"lineStr",
"j",
"horLineList.add(lineInfo)",
"horLineList.add",
"horLineList",
"lineInfo",
"for(int i : SortGoalLine(verLineNum, horLineList)){\n\t\t\t\tSystem.out.println(i);\n\t\t\t}",
"int i",
"SortGoalLine(verLineNum, horLineList)",
"SortGoalLine",
"verLineNum",
"horLineList",
"{\n\t\t\t\tSystem.out.println(i);\n\t\t\t}",
"{\n\t\t\t\tSystem.out.println(i);\n\t\t\t}",
"System.out.println(i)",
"System.out.println",
"System.out",
"System",
"System.out",
"i",
"String[] args",
"args",
"private static Integer[] SortGoalLine(int verLineNum,List<Integer[]> horizonLineList){\n\t\tInteger[] goalNum = new Integer[verLineNum];\n\t\tfor(int i=0;i<goalNum.length;i++){\n\t\t\tgoalNum[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(Integer[] i : horizonLineList){\n\t\t\tint temp = goalNum[i[0]-1];\n\t\t\tgoalNum[i[0]-1] = goalNum[i[1]-1];\n\t\t\tgoalNum[i[1]-1] = temp;\n\t\t}\n\t\t\n\t\treturn goalNum;\n\t}",
"SortGoalLine",
"{\n\t\tInteger[] goalNum = new Integer[verLineNum];\n\t\tfor(int i=0;i<goalNum.length;i++){\n\t\t\tgoalNum[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(Integer[] i : horizonLineList){\n\t\t\tint temp = goalNum[i[0]-1];\n\t\t\tgoalNum[i[0]-1] = goalNum[i[1]-1];\n\t\t\tgoalNum[i[1]-1] = temp;\n\t\t}\n\t\t\n\t\treturn goalNum;\n\t}",
"Integer[] goalNum = new Integer[verLineNum];",
"goalNum",
"new Integer[verLineNum]",
"verLineNum",
"for(int i=0;i<goalNum.length;i++){\n\t\t\tgoalNum[i] = i+1;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<goalNum.length",
"i",
"goalNum.length",
"goalNum",
"goalNum.length",
"i++",
"i++",
"i",
"{\n\t\t\tgoalNum[i] = i+1;\n\t\t}",
"{\n\t\t\tgoalNum[i] = i+1;\n\t\t}",
"goalNum[i] = i+1",
"goalNum[i]",
"goalNum",
"i",
"i+1",
"i",
"1",
"for(Integer[] i : horizonLineList){\n\t\t\tint temp = goalNum[i[0]-1];\n\t\t\tgoalNum[i[0]-1] = goalNum[i[1]-1];\n\t\t\tgoalNum[i[1]-1] = temp;\n\t\t}",
"Integer[] i",
"horizonLineList",
"{\n\t\t\tint temp = goalNum[i[0]-1];\n\t\t\tgoalNum[i[0]-1] = goalNum[i[1]-1];\n\t\t\tgoalNum[i[1]-1] = temp;\n\t\t}",
"{\n\t\t\tint temp = goalNum[i[0]-1];\n\t\t\tgoalNum[i[0]-1] = goalNum[i[1]-1];\n\t\t\tgoalNum[i[1]-1] = temp;\n\t\t}",
"int temp = goalNum[i[0]-1];",
"temp",
"goalNum[i[0]-1]",
"goalNum",
"i[0]-1",
"i[0]",
"i",
"0",
"1",
"goalNum[i[0]-1] = goalNum[i[1]-1]",
"goalNum[i[0]-1]",
"goalNum",
"i[0]-1",
"i[0]",
"i",
"0",
"1",
"goalNum[i[1]-1]",
"goalNum",
"i[1]-1",
"i[1]",
"i",
"1",
"1",
"goalNum[i[1]-1] = temp",
"goalNum[i[1]-1]",
"goalNum",
"i[1]-1",
"i[1]",
"i",
"1",
"1",
"temp",
"return goalNum;",
"goalNum",
"int verLineNum",
"verLineNum",
"List<Integer[]> horizonLineList",
"horizonLineList"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
class Main {
/**
* @param args
*/
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
try{
int verLineNum = Integer.parseInt(br.readLine()); //tate
int horLineNum = Integer.parseInt(br.readLine()); //yoko
ArrayList<Integer[]> horLineList = new ArrayList<Integer[]>();
for(int i=0;i<horLineNum;i++){
String[] lineStr = br.readLine().split(",");
Integer[] lineInfo = new Integer[2];
for(int j=0;j<lineInfo.length;j++){
lineInfo[j] = Integer.parseInt(lineStr[j]);
}
horLineList.add(lineInfo);
}
for(int i : SortGoalLine(verLineNum, horLineList)){
System.out.println(i);
}
}
catch(Exception e){
return;
}
finally{
try {
br.close();
} catch (IOException e) {
// TODO Auto-generated catch block
return;
}
}
}
private static Integer[] SortGoalLine(int verLineNum,List<Integer[]> horizonLineList){
Integer[] goalNum = new Integer[verLineNum];
for(int i=0;i<goalNum.length;i++){
goalNum[i] = i+1;
}
for(Integer[] i : horizonLineList){
int temp = goalNum[i[0]-1];
goalNum[i[0]-1] = goalNum[i[1]-1];
goalNum[i[1]-1] = temp;
}
return goalNum;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
0,
18,
13,
13,
4,
18,
13,
18,
13,
17,
0,
18,
13,
13,
4,
18,
13,
18,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
13,
30,
0,
13,
18,
13,
13,
14,
2,
18,
13,
13,
13,
30,
0,
13,
18,
13,
13,
0,
18,
13,
2,
13,
17,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
166,
5
],
[
166,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
8,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
30,
38
],
[
38,
39
],
[
39,
40
],
[
30,
41
],
[
42,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
42,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
42,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
61,
62
],
[
61,
63
],
[
42,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
71,
72
],
[
71,
73
],
[
8,
74
],
[
74,
75
],
[
74,
76
],
[
8,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
83,
84
],
[
83,
85
],
[
78,
86
],
[
86,
87
],
[
87,
88
],
[
78,
89
],
[
90,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
93,
95
],
[
90,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
96,
101
],
[
101,
102
],
[
101,
103
],
[
96,
104
],
[
104,
105
],
[
105,
106
],
[
96,
107
],
[
108,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
109,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
118,
120
],
[
109,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
122,
126
],
[
121,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
130,
132
],
[
90,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
136,
137
],
[
136,
138
],
[
133,
139
],
[
139,
140
],
[
139,
141
],
[
8,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
142,
147
],
[
147,
148
],
[
147,
149
],
[
142,
150
],
[
150,
151
],
[
151,
152
],
[
142,
153
],
[
154,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
157,
159
],
[
155,
160
],
[
160,
161
],
[
160,
162
],
[
6,
163
],
[
163,
164
],
[
0,
165
],
[
165,
166
],
[
165,
167
]
] | [
"import java.util.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint w = stdIn.nextInt();\n\t\tint n = stdIn.nextInt();\n\t\tint[] a = new int[n];\n\t\tint[] b = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tString tmp = stdIn.next();\n\t\t\tString[] tmp2 = tmp.split(\",\");\n\t\t\ta[i] = Integer.parseInt(tmp2[0]);\n\t\t\tb[i] = Integer.parseInt(tmp2[1]);\n\t\t}\n\t\tint[] loc = new int[w];\n\t\tfor(int i = 0; i < w; i++) {\n\t\t\tint p = i+1;\n\t\t\tfor(int j = 0; j < n; j++) {\n\t\t\t\tif(a[j] == p) {\n\t\t\t\t\tp = b[j];\n\t\t\t\t}\n\t\t\t\telse if(b[j] == p) {\n\t\t\t\t\tp = a[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tloc[p-1] = i+1;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < w; i++) {\n\t\t\tSystem.out.println(loc[i]);\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint w = stdIn.nextInt();\n\t\tint n = stdIn.nextInt();\n\t\tint[] a = new int[n];\n\t\tint[] b = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tString tmp = stdIn.next();\n\t\t\tString[] tmp2 = tmp.split(\",\");\n\t\t\ta[i] = Integer.parseInt(tmp2[0]);\n\t\t\tb[i] = Integer.parseInt(tmp2[1]);\n\t\t}\n\t\tint[] loc = new int[w];\n\t\tfor(int i = 0; i < w; i++) {\n\t\t\tint p = i+1;\n\t\t\tfor(int j = 0; j < n; j++) {\n\t\t\t\tif(a[j] == p) {\n\t\t\t\t\tp = b[j];\n\t\t\t\t}\n\t\t\t\telse if(b[j] == p) {\n\t\t\t\t\tp = a[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tloc[p-1] = i+1;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < w; i++) {\n\t\t\tSystem.out.println(loc[i]);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint w = stdIn.nextInt();\n\t\tint n = stdIn.nextInt();\n\t\tint[] a = new int[n];\n\t\tint[] b = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tString tmp = stdIn.next();\n\t\t\tString[] tmp2 = tmp.split(\",\");\n\t\t\ta[i] = Integer.parseInt(tmp2[0]);\n\t\t\tb[i] = Integer.parseInt(tmp2[1]);\n\t\t}\n\t\tint[] loc = new int[w];\n\t\tfor(int i = 0; i < w; i++) {\n\t\t\tint p = i+1;\n\t\t\tfor(int j = 0; j < n; j++) {\n\t\t\t\tif(a[j] == p) {\n\t\t\t\t\tp = b[j];\n\t\t\t\t}\n\t\t\t\telse if(b[j] == p) {\n\t\t\t\t\tp = a[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tloc[p-1] = i+1;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < w; i++) {\n\t\t\tSystem.out.println(loc[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint w = stdIn.nextInt();\n\t\tint n = stdIn.nextInt();\n\t\tint[] a = new int[n];\n\t\tint[] b = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tString tmp = stdIn.next();\n\t\t\tString[] tmp2 = tmp.split(\",\");\n\t\t\ta[i] = Integer.parseInt(tmp2[0]);\n\t\t\tb[i] = Integer.parseInt(tmp2[1]);\n\t\t}\n\t\tint[] loc = new int[w];\n\t\tfor(int i = 0; i < w; i++) {\n\t\t\tint p = i+1;\n\t\t\tfor(int j = 0; j < n; j++) {\n\t\t\t\tif(a[j] == p) {\n\t\t\t\t\tp = b[j];\n\t\t\t\t}\n\t\t\t\telse if(b[j] == p) {\n\t\t\t\t\tp = a[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tloc[p-1] = i+1;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < w; i++) {\n\t\t\tSystem.out.println(loc[i]);\n\t\t}\n\t}",
"Scanner stdIn = new Scanner(System.in);",
"stdIn",
"new Scanner(System.in)",
"int w = stdIn.nextInt();",
"w",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"int n = stdIn.nextInt();",
"n",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"int[] a = new int[n];",
"a",
"new int[n]",
"n",
"int[] b = new int[n];",
"b",
"new int[n]",
"n",
"for(int i = 0; i < n; i++) {\n\t\t\tString tmp = stdIn.next();\n\t\t\tString[] tmp2 = tmp.split(\",\");\n\t\t\ta[i] = Integer.parseInt(tmp2[0]);\n\t\t\tb[i] = Integer.parseInt(tmp2[1]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString tmp = stdIn.next();\n\t\t\tString[] tmp2 = tmp.split(\",\");\n\t\t\ta[i] = Integer.parseInt(tmp2[0]);\n\t\t\tb[i] = Integer.parseInt(tmp2[1]);\n\t\t}",
"{\n\t\t\tString tmp = stdIn.next();\n\t\t\tString[] tmp2 = tmp.split(\",\");\n\t\t\ta[i] = Integer.parseInt(tmp2[0]);\n\t\t\tb[i] = Integer.parseInt(tmp2[1]);\n\t\t}",
"String tmp = stdIn.next();",
"tmp",
"stdIn.next()",
"stdIn.next",
"stdIn",
"String[] tmp2 = tmp.split(\",\");",
"tmp2",
"tmp.split(\",\")",
"tmp.split",
"tmp",
"\",\"",
"a[i] = Integer.parseInt(tmp2[0])",
"a[i]",
"a",
"i",
"Integer.parseInt(tmp2[0])",
"Integer.parseInt",
"Integer",
"tmp2[0]",
"tmp2",
"0",
"b[i] = Integer.parseInt(tmp2[1])",
"b[i]",
"b",
"i",
"Integer.parseInt(tmp2[1])",
"Integer.parseInt",
"Integer",
"tmp2[1]",
"tmp2",
"1",
"int[] loc = new int[w];",
"loc",
"new int[w]",
"w",
"for(int i = 0; i < w; i++) {\n\t\t\tint p = i+1;\n\t\t\tfor(int j = 0; j < n; j++) {\n\t\t\t\tif(a[j] == p) {\n\t\t\t\t\tp = b[j];\n\t\t\t\t}\n\t\t\t\telse if(b[j] == p) {\n\t\t\t\t\tp = a[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tloc[p-1] = i+1;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tint p = i+1;\n\t\t\tfor(int j = 0; j < n; j++) {\n\t\t\t\tif(a[j] == p) {\n\t\t\t\t\tp = b[j];\n\t\t\t\t}\n\t\t\t\telse if(b[j] == p) {\n\t\t\t\t\tp = a[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tloc[p-1] = i+1;\n\t\t}",
"{\n\t\t\tint p = i+1;\n\t\t\tfor(int j = 0; j < n; j++) {\n\t\t\t\tif(a[j] == p) {\n\t\t\t\t\tp = b[j];\n\t\t\t\t}\n\t\t\t\telse if(b[j] == p) {\n\t\t\t\t\tp = a[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tloc[p-1] = i+1;\n\t\t}",
"int p = i+1;",
"p",
"i+1",
"i",
"1",
"for(int j = 0; j < n; j++) {\n\t\t\t\tif(a[j] == p) {\n\t\t\t\t\tp = b[j];\n\t\t\t\t}\n\t\t\t\telse if(b[j] == p) {\n\t\t\t\t\tp = a[j];\n\t\t\t\t}\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < n",
"j",
"n",
"j++",
"j++",
"j",
"{\n\t\t\t\tif(a[j] == p) {\n\t\t\t\t\tp = b[j];\n\t\t\t\t}\n\t\t\t\telse if(b[j] == p) {\n\t\t\t\t\tp = a[j];\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(a[j] == p) {\n\t\t\t\t\tp = b[j];\n\t\t\t\t}\n\t\t\t\telse if(b[j] == p) {\n\t\t\t\t\tp = a[j];\n\t\t\t\t}\n\t\t\t}",
"if(a[j] == p) {\n\t\t\t\t\tp = b[j];\n\t\t\t\t}\n\t\t\t\telse if(b[j] == p) {\n\t\t\t\t\tp = a[j];\n\t\t\t\t}",
"a[j] == p",
"a[j]",
"a",
"j",
"p",
"{\n\t\t\t\t\tp = b[j];\n\t\t\t\t}",
"p = b[j]",
"p",
"b[j]",
"b",
"j",
"if(b[j] == p) {\n\t\t\t\t\tp = a[j];\n\t\t\t\t}",
"b[j] == p",
"b[j]",
"b",
"j",
"p",
"{\n\t\t\t\t\tp = a[j];\n\t\t\t\t}",
"p = a[j]",
"p",
"a[j]",
"a",
"j",
"loc[p-1] = i+1",
"loc[p-1]",
"loc",
"p-1",
"p",
"1",
"i+1",
"i",
"1",
"for(int i = 0; i < w; i++) {\n\t\t\tSystem.out.println(loc[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(loc[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(loc[i]);\n\t\t}",
"System.out.println(loc[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"loc[i]",
"loc",
"i",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint w = stdIn.nextInt();\n\t\tint n = stdIn.nextInt();\n\t\tint[] a = new int[n];\n\t\tint[] b = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tString tmp = stdIn.next();\n\t\t\tString[] tmp2 = tmp.split(\",\");\n\t\t\ta[i] = Integer.parseInt(tmp2[0]);\n\t\t\tb[i] = Integer.parseInt(tmp2[1]);\n\t\t}\n\t\tint[] loc = new int[w];\n\t\tfor(int i = 0; i < w; i++) {\n\t\t\tint p = i+1;\n\t\t\tfor(int j = 0; j < n; j++) {\n\t\t\t\tif(a[j] == p) {\n\t\t\t\t\tp = b[j];\n\t\t\t\t}\n\t\t\t\telse if(b[j] == p) {\n\t\t\t\t\tp = a[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tloc[p-1] = i+1;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < w; i++) {\n\t\t\tSystem.out.println(loc[i]);\n\t\t}\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint w = stdIn.nextInt();\n\t\tint n = stdIn.nextInt();\n\t\tint[] a = new int[n];\n\t\tint[] b = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tString tmp = stdIn.next();\n\t\t\tString[] tmp2 = tmp.split(\",\");\n\t\t\ta[i] = Integer.parseInt(tmp2[0]);\n\t\t\tb[i] = Integer.parseInt(tmp2[1]);\n\t\t}\n\t\tint[] loc = new int[w];\n\t\tfor(int i = 0; i < w; i++) {\n\t\t\tint p = i+1;\n\t\t\tfor(int j = 0; j < n; j++) {\n\t\t\t\tif(a[j] == p) {\n\t\t\t\t\tp = b[j];\n\t\t\t\t}\n\t\t\t\telse if(b[j] == p) {\n\t\t\t\t\tp = a[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tloc[p-1] = i+1;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < w; i++) {\n\t\t\tSystem.out.println(loc[i]);\n\t\t}\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
int w = stdIn.nextInt();
int n = stdIn.nextInt();
int[] a = new int[n];
int[] b = new int[n];
for(int i = 0; i < n; i++) {
String tmp = stdIn.next();
String[] tmp2 = tmp.split(",");
a[i] = Integer.parseInt(tmp2[0]);
b[i] = Integer.parseInt(tmp2[1]);
}
int[] loc = new int[w];
for(int i = 0; i < w; i++) {
int p = i+1;
for(int j = 0; j < n; j++) {
if(a[j] == p) {
p = b[j];
}
else if(b[j] == p) {
p = a[j];
}
}
loc[p-1] = i+1;
}
for(int i = 0; i < w; i++) {
System.out.println(loc[i]);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
18,
13,
13,
41,
13,
39,
39,
17,
17,
17,
40,
17,
39,
17,
40,
17,
17,
17,
41,
13,
20,
41,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
13,
23,
13,
12,
13,
30,
41,
13,
41,
13,
0,
13,
4,
18,
13,
4,
18,
13,
0,
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,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
20,
41,
13,
41,
13,
41,
13,
0,
13,
2,
4,
18,
13,
4,
18,
13,
17,
0,
13,
2,
4,
18,
13,
4,
18,
13,
17,
0,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
195,
14
],
[
195,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
17,
19
],
[
195,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
23,
26
],
[
23,
27
],
[
27,
28
],
[
22,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
29,
33
],
[
29,
34
],
[
195,
35
],
[
35,
36
],
[
35,
37
],
[
195,
38
],
[
38,
39
],
[
195,
40
],
[
40,
41
],
[
195,
42
],
[
42,
43
],
[
195,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
50,
55
],
[
55,
56
],
[
55,
57
],
[
50,
58
],
[
58,
59
],
[
59,
60
],
[
50,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
44,
65
],
[
65,
66
],
[
195,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
72,
73
],
[
69,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
79,
80
],
[
80,
81
],
[
69,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
87,
88
],
[
88,
89
],
[
69,
90
],
[
90,
91
],
[
90,
92
],
[
69,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
99,
100
],
[
99,
101
],
[
94,
102
],
[
102,
103
],
[
103,
104
],
[
94,
105
],
[
106,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
107,
111
],
[
111,
112
],
[
111,
113
],
[
69,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
114,
119
],
[
119,
120
],
[
119,
121
],
[
114,
122
],
[
122,
123
],
[
123,
124
],
[
114,
125
],
[
126,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
126,
130
],
[
130,
131
],
[
126,
132
],
[
132,
133
],
[
126,
134
],
[
134,
135
],
[
126,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
139,
142
],
[
142,
143
],
[
143,
144
],
[
138,
145
],
[
126,
146
],
[
146,
147
],
[
146,
148
],
[
148,
149
],
[
149,
150
],
[
150,
151
],
[
149,
152
],
[
152,
153
],
[
153,
154
],
[
148,
155
],
[
126,
156
],
[
156,
157
],
[
156,
158
],
[
158,
159
],
[
158,
160
],
[
126,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
161,
165
],
[
165,
166
],
[
165,
167
],
[
126,
168
],
[
168,
169
],
[
169,
170
],
[
169,
171
],
[
168,
172
],
[
69,
173
],
[
173,
174
],
[
174,
175
],
[
175,
176
],
[
175,
177
],
[
173,
178
],
[
178,
179
],
[
178,
180
],
[
173,
181
],
[
181,
182
],
[
182,
183
],
[
173,
184
],
[
185,
185
],
[
185,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
188,
190
],
[
186,
191
],
[
191,
192
],
[
191,
193
],
[
0,
194
],
[
194,
195
],
[
194,
196
]
] | [
"\nimport java.util.*;\n\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\npublic class Main {//change to Main\n static int INF = Integer.MAX_VALUE;\n static int[][] near = {{0,0,1,-1},{1,-1,0,0}};\n static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));//\n static StringTokenizer st;\n static StringBuilder sb;\n static String line;\n\n\n public static void main(String[] args) throws Exception {\n\n //int T = Integer.parseInt(in.readLine());//number of messages\n int T =1;\n for (int t = 0; t < T; t++) {\n solve();\n //st = new StringTokenizer(in.readLine());\n //int x = Integer.parseInt(st.nextToken());\n\n }//forLoop#1\n }//main\n\n\n public static void solve() throws Exception{\n int w,n;\n w= Integer.parseInt(in.readLine());\n n= Integer.parseInt(in.readLine());\n\n int[] A = new int[w]; //array\n for (int i = 0; i < w; i++) {\n A[i] = i+1;\n }\n\n for (int i = 0; i < n; i++) {\n st = new StringTokenizer(in.readLine(),\",\");\n int a,b,temp;\n a = Integer.parseInt(st.nextToken())-1;\n b = Integer.parseInt(st.nextToken())-1;\n temp = A[a];\n A[a] = A[b];\n A[b] = temp;\n }\n\n for (int i = 0; i < w; i++) {\n System.out.println(A[i]);\n }\n\n\n\n }\n}//class",
"import java.util.*;",
"util.*",
"java",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main {//change to Main\n static int INF = Integer.MAX_VALUE;\n static int[][] near = {{0,0,1,-1},{1,-1,0,0}};\n static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));//\n static StringTokenizer st;\n static StringBuilder sb;\n static String line;\n\n\n public static void main(String[] args) throws Exception {\n\n //int T = Integer.parseInt(in.readLine());//number of messages\n int T =1;\n for (int t = 0; t < T; t++) {\n solve();\n //st = new StringTokenizer(in.readLine());\n //int x = Integer.parseInt(st.nextToken());\n\n }//forLoop#1\n }//main\n\n\n public static void solve() throws Exception{\n int w,n;\n w= Integer.parseInt(in.readLine());\n n= Integer.parseInt(in.readLine());\n\n int[] A = new int[w]; //array\n for (int i = 0; i < w; i++) {\n A[i] = i+1;\n }\n\n for (int i = 0; i < n; i++) {\n st = new StringTokenizer(in.readLine(),\",\");\n int a,b,temp;\n a = Integer.parseInt(st.nextToken())-1;\n b = Integer.parseInt(st.nextToken())-1;\n temp = A[a];\n A[a] = A[b];\n A[b] = temp;\n }\n\n for (int i = 0; i < w; i++) {\n System.out.println(A[i]);\n }\n\n\n\n }\n}//class",
"Main",
"static int INF = Integer.MAX_VALUE;",
"INF",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"static int[][] near = {{0,0,1,-1},{1,-1,0,0}};",
"near",
"{{0,0,1,-1},{1,-1,0,0}}",
"{0,0,1,-1}",
"0",
"0",
"1",
"-1",
"1",
"{1,-1,0,0}",
"1",
"-1",
"1",
"0",
"0",
"static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));//",
"in",
"new BufferedReader(new InputStreamReader(System.in))",
"static StringTokenizer st;",
"st",
"static StringBuilder sb;",
"sb",
"static String line;",
"line",
"public static void main(String[] args) throws Exception {\n\n //int T = Integer.parseInt(in.readLine());//number of messages\n int T =1;\n for (int t = 0; t < T; t++) {\n solve();\n //st = new StringTokenizer(in.readLine());\n //int x = Integer.parseInt(st.nextToken());\n\n }//forLoop#1\n }//main",
"main",
"{\n\n //int T = Integer.parseInt(in.readLine());//number of messages\n int T =1;\n for (int t = 0; t < T; t++) {\n solve();\n //st = new StringTokenizer(in.readLine());\n //int x = Integer.parseInt(st.nextToken());\n\n }//forLoop#1\n }",
"int T =1;",
"T",
"1",
"for (int t = 0; t < T; t++) {\n solve();\n //st = new StringTokenizer(in.readLine());\n //int x = Integer.parseInt(st.nextToken());\n\n }//forLoop#1",
"int t = 0;",
"int t = 0;",
"t",
"0",
"t < T",
"t",
"T",
"t++",
"t++",
"t",
"{\n solve();\n //st = new StringTokenizer(in.readLine());\n //int x = Integer.parseInt(st.nextToken());\n\n }//forLoop#1",
"{\n solve();\n //st = new StringTokenizer(in.readLine());\n //int x = Integer.parseInt(st.nextToken());\n\n }",
"solve()",
"solve",
"String[] args",
"args",
"public static void solve() throws Exception{\n int w,n;\n w= Integer.parseInt(in.readLine());\n n= Integer.parseInt(in.readLine());\n\n int[] A = new int[w]; //array\n for (int i = 0; i < w; i++) {\n A[i] = i+1;\n }\n\n for (int i = 0; i < n; i++) {\n st = new StringTokenizer(in.readLine(),\",\");\n int a,b,temp;\n a = Integer.parseInt(st.nextToken())-1;\n b = Integer.parseInt(st.nextToken())-1;\n temp = A[a];\n A[a] = A[b];\n A[b] = temp;\n }\n\n for (int i = 0; i < w; i++) {\n System.out.println(A[i]);\n }\n\n\n\n }",
"solve",
"{\n int w,n;\n w= Integer.parseInt(in.readLine());\n n= Integer.parseInt(in.readLine());\n\n int[] A = new int[w]; //array\n for (int i = 0; i < w; i++) {\n A[i] = i+1;\n }\n\n for (int i = 0; i < n; i++) {\n st = new StringTokenizer(in.readLine(),\",\");\n int a,b,temp;\n a = Integer.parseInt(st.nextToken())-1;\n b = Integer.parseInt(st.nextToken())-1;\n temp = A[a];\n A[a] = A[b];\n A[b] = temp;\n }\n\n for (int i = 0; i < w; i++) {\n System.out.println(A[i]);\n }\n\n\n\n }",
"int w",
"w",
"n;",
"n",
"w= Integer.parseInt(in.readLine())",
"w",
"Integer.parseInt(in.readLine())",
"Integer.parseInt",
"Integer",
"in.readLine()",
"in.readLine",
"in",
"n= Integer.parseInt(in.readLine())",
"n",
"Integer.parseInt(in.readLine())",
"Integer.parseInt",
"Integer",
"in.readLine()",
"in.readLine",
"in",
"int[] A = new int[w];",
"A",
"new int[w]",
"w",
"for (int i = 0; i < w; i++) {\n A[i] = i+1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n A[i] = i+1;\n }",
"{\n A[i] = i+1;\n }",
"A[i] = i+1",
"A[i]",
"A",
"i",
"i+1",
"i",
"1",
"for (int i = 0; i < n; i++) {\n st = new StringTokenizer(in.readLine(),\",\");\n int a,b,temp;\n a = Integer.parseInt(st.nextToken())-1;\n b = Integer.parseInt(st.nextToken())-1;\n temp = A[a];\n A[a] = A[b];\n A[b] = temp;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n st = new StringTokenizer(in.readLine(),\",\");\n int a,b,temp;\n a = Integer.parseInt(st.nextToken())-1;\n b = Integer.parseInt(st.nextToken())-1;\n temp = A[a];\n A[a] = A[b];\n A[b] = temp;\n }",
"{\n st = new StringTokenizer(in.readLine(),\",\");\n int a,b,temp;\n a = Integer.parseInt(st.nextToken())-1;\n b = Integer.parseInt(st.nextToken())-1;\n temp = A[a];\n A[a] = A[b];\n A[b] = temp;\n }",
"st = new StringTokenizer(in.readLine(),\",\")",
"st",
"new StringTokenizer(in.readLine(),\",\")",
"int a",
"a",
"b",
"b",
"temp;",
"temp",
"a = Integer.parseInt(st.nextToken())-1",
"a",
"Integer.parseInt(st.nextToken())-1",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"1",
"b = Integer.parseInt(st.nextToken())-1",
"b",
"Integer.parseInt(st.nextToken())-1",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"1",
"temp = A[a]",
"temp",
"A[a]",
"A",
"a",
"A[a] = A[b]",
"A[a]",
"A",
"a",
"A[b]",
"A",
"b",
"A[b] = temp",
"A[b]",
"A",
"b",
"temp",
"for (int i = 0; i < w; i++) {\n System.out.println(A[i]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n System.out.println(A[i]);\n }",
"{\n System.out.println(A[i]);\n }",
"System.out.println(A[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"A[i]",
"A",
"i",
"public class Main {//change to Main\n static int INF = Integer.MAX_VALUE;\n static int[][] near = {{0,0,1,-1},{1,-1,0,0}};\n static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));//\n static StringTokenizer st;\n static StringBuilder sb;\n static String line;\n\n\n public static void main(String[] args) throws Exception {\n\n //int T = Integer.parseInt(in.readLine());//number of messages\n int T =1;\n for (int t = 0; t < T; t++) {\n solve();\n //st = new StringTokenizer(in.readLine());\n //int x = Integer.parseInt(st.nextToken());\n\n }//forLoop#1\n }//main\n\n\n public static void solve() throws Exception{\n int w,n;\n w= Integer.parseInt(in.readLine());\n n= Integer.parseInt(in.readLine());\n\n int[] A = new int[w]; //array\n for (int i = 0; i < w; i++) {\n A[i] = i+1;\n }\n\n for (int i = 0; i < n; i++) {\n st = new StringTokenizer(in.readLine(),\",\");\n int a,b,temp;\n a = Integer.parseInt(st.nextToken())-1;\n b = Integer.parseInt(st.nextToken())-1;\n temp = A[a];\n A[a] = A[b];\n A[b] = temp;\n }\n\n for (int i = 0; i < w; i++) {\n System.out.println(A[i]);\n }\n\n\n\n }\n}//class",
"public class Main {//change to Main\n static int INF = Integer.MAX_VALUE;\n static int[][] near = {{0,0,1,-1},{1,-1,0,0}};\n static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));//\n static StringTokenizer st;\n static StringBuilder sb;\n static String line;\n\n\n public static void main(String[] args) throws Exception {\n\n //int T = Integer.parseInt(in.readLine());//number of messages\n int T =1;\n for (int t = 0; t < T; t++) {\n solve();\n //st = new StringTokenizer(in.readLine());\n //int x = Integer.parseInt(st.nextToken());\n\n }//forLoop#1\n }//main\n\n\n public static void solve() throws Exception{\n int w,n;\n w= Integer.parseInt(in.readLine());\n n= Integer.parseInt(in.readLine());\n\n int[] A = new int[w]; //array\n for (int i = 0; i < w; i++) {\n A[i] = i+1;\n }\n\n for (int i = 0; i < n; i++) {\n st = new StringTokenizer(in.readLine(),\",\");\n int a,b,temp;\n a = Integer.parseInt(st.nextToken())-1;\n b = Integer.parseInt(st.nextToken())-1;\n temp = A[a];\n A[a] = A[b];\n A[b] = temp;\n }\n\n for (int i = 0; i < w; i++) {\n System.out.println(A[i]);\n }\n\n\n\n }\n}//class",
"Main"
] |
import java.util.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {//change to Main
static int INF = Integer.MAX_VALUE;
static int[][] near = {{0,0,1,-1},{1,-1,0,0}};
static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));//
static StringTokenizer st;
static StringBuilder sb;
static String line;
public static void main(String[] args) throws Exception {
//int T = Integer.parseInt(in.readLine());//number of messages
int T =1;
for (int t = 0; t < T; t++) {
solve();
//st = new StringTokenizer(in.readLine());
//int x = Integer.parseInt(st.nextToken());
}//forLoop#1
}//main
public static void solve() throws Exception{
int w,n;
w= Integer.parseInt(in.readLine());
n= Integer.parseInt(in.readLine());
int[] A = new int[w]; //array
for (int i = 0; i < w; i++) {
A[i] = i+1;
}
for (int i = 0; i < n; i++) {
st = new StringTokenizer(in.readLine(),",");
int a,b,temp;
a = Integer.parseInt(st.nextToken())-1;
b = Integer.parseInt(st.nextToken())-1;
temp = A[a];
A[a] = A[b];
A[b] = temp;
}
for (int i = 0; i < w; i++) {
System.out.println(A[i]);
}
}
}//class |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
41,
13,
4,
18,
13,
41,
13,
20,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
0,
18,
18,
13,
13,
17,
4,
18,
13,
18,
13,
17,
0,
18,
18,
13,
13,
17,
4,
18,
13,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
18,
13,
2,
18,
18,
13,
13,
17,
17,
0,
18,
13,
2,
18,
18,
13,
13,
17,
17,
18,
13,
2,
18,
18,
13,
13,
17,
17,
0,
18,
13,
2,
18,
18,
13,
13,
17,
17,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
16,
22
],
[
22,
23
],
[
22,
24
],
[
16,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
43,
45
],
[
16,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
16,
51
],
[
51,
52
],
[
51,
53
],
[
16,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
56,
64
],
[
64,
65
],
[
65,
66
],
[
56,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
71,
76
],
[
68,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
77,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
86,
87
],
[
86,
88
],
[
68,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
89,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
98,
99
],
[
98,
100
],
[
16,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
101,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
108,
110
],
[
101,
111
],
[
111,
112
],
[
112,
113
],
[
101,
114
],
[
115,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
121,
125
],
[
120,
126
],
[
115,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
131,
135
],
[
130,
136
],
[
127,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
140,
144
],
[
139,
145
],
[
115,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
150,
154
],
[
149,
155
],
[
146,
156
],
[
16,
157
],
[
157,
158
],
[
158,
159
],
[
159,
160
],
[
159,
161
],
[
157,
162
],
[
162,
163
],
[
162,
164
],
[
164,
165
],
[
164,
166
],
[
157,
167
],
[
167,
168
],
[
168,
169
],
[
157,
170
],
[
171,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
174,
175
],
[
174,
176
],
[
172,
177
],
[
177,
178
],
[
177,
179
],
[
6,
180
],
[
180,
181
]
] | [
"import java.util.Scanner;\n\nclass Main{\n public static void main(String[] args){\n \tScanner scan = new Scanner(System.in);\n \t\n \twhile (scan.hasNextInt()){\n \t\tint numverline = scan.nextInt();\n \t\tint[] verline = new int[numverline];\n \t\tfor(int i = 0; i < numverline; i++){\n \t\t\tverline[i] = i+1;\n \t\t}\n \t\tint horline = scan.nextInt();\n \t\tint[][] coor = new int[horline][2];\n \t\tfor(int i = 0; i < horline; i++){\n \t\t\tString[] tmp = scan.next().split(\",\");\n \t\t\tcoor[i][0] = Integer.parseInt(tmp[0]);\n \t\t\tcoor[i][1] = Integer.parseInt(tmp[1]);\n \t\t}\n \t\t\n \t\tfor(int i = 0; i < coor.length; i++){\n \t\t\tint tmp = verline[coor[i][0]-1];\n \t\t\tverline[coor[i][0]-1] = verline[coor[i][1]-1];\n \t\t\tverline[coor[i][1]-1] = tmp;\n \t\t}\n \t\t\n \t\tfor(int i = 0; i < verline.length; i++){\n \t\t\tSystem.out.println(verline[i]);\n \t\t}\n \t}\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n public static void main(String[] args){\n \tScanner scan = new Scanner(System.in);\n \t\n \twhile (scan.hasNextInt()){\n \t\tint numverline = scan.nextInt();\n \t\tint[] verline = new int[numverline];\n \t\tfor(int i = 0; i < numverline; i++){\n \t\t\tverline[i] = i+1;\n \t\t}\n \t\tint horline = scan.nextInt();\n \t\tint[][] coor = new int[horline][2];\n \t\tfor(int i = 0; i < horline; i++){\n \t\t\tString[] tmp = scan.next().split(\",\");\n \t\t\tcoor[i][0] = Integer.parseInt(tmp[0]);\n \t\t\tcoor[i][1] = Integer.parseInt(tmp[1]);\n \t\t}\n \t\t\n \t\tfor(int i = 0; i < coor.length; i++){\n \t\t\tint tmp = verline[coor[i][0]-1];\n \t\t\tverline[coor[i][0]-1] = verline[coor[i][1]-1];\n \t\t\tverline[coor[i][1]-1] = tmp;\n \t\t}\n \t\t\n \t\tfor(int i = 0; i < verline.length; i++){\n \t\t\tSystem.out.println(verline[i]);\n \t\t}\n \t}\n }\n}",
"Main",
"public static void main(String[] args){\n \tScanner scan = new Scanner(System.in);\n \t\n \twhile (scan.hasNextInt()){\n \t\tint numverline = scan.nextInt();\n \t\tint[] verline = new int[numverline];\n \t\tfor(int i = 0; i < numverline; i++){\n \t\t\tverline[i] = i+1;\n \t\t}\n \t\tint horline = scan.nextInt();\n \t\tint[][] coor = new int[horline][2];\n \t\tfor(int i = 0; i < horline; i++){\n \t\t\tString[] tmp = scan.next().split(\",\");\n \t\t\tcoor[i][0] = Integer.parseInt(tmp[0]);\n \t\t\tcoor[i][1] = Integer.parseInt(tmp[1]);\n \t\t}\n \t\t\n \t\tfor(int i = 0; i < coor.length; i++){\n \t\t\tint tmp = verline[coor[i][0]-1];\n \t\t\tverline[coor[i][0]-1] = verline[coor[i][1]-1];\n \t\t\tverline[coor[i][1]-1] = tmp;\n \t\t}\n \t\t\n \t\tfor(int i = 0; i < verline.length; i++){\n \t\t\tSystem.out.println(verline[i]);\n \t\t}\n \t}\n }",
"main",
"{\n \tScanner scan = new Scanner(System.in);\n \t\n \twhile (scan.hasNextInt()){\n \t\tint numverline = scan.nextInt();\n \t\tint[] verline = new int[numverline];\n \t\tfor(int i = 0; i < numverline; i++){\n \t\t\tverline[i] = i+1;\n \t\t}\n \t\tint horline = scan.nextInt();\n \t\tint[][] coor = new int[horline][2];\n \t\tfor(int i = 0; i < horline; i++){\n \t\t\tString[] tmp = scan.next().split(\",\");\n \t\t\tcoor[i][0] = Integer.parseInt(tmp[0]);\n \t\t\tcoor[i][1] = Integer.parseInt(tmp[1]);\n \t\t}\n \t\t\n \t\tfor(int i = 0; i < coor.length; i++){\n \t\t\tint tmp = verline[coor[i][0]-1];\n \t\t\tverline[coor[i][0]-1] = verline[coor[i][1]-1];\n \t\t\tverline[coor[i][1]-1] = tmp;\n \t\t}\n \t\t\n \t\tfor(int i = 0; i < verline.length; i++){\n \t\t\tSystem.out.println(verline[i]);\n \t\t}\n \t}\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"while (scan.hasNextInt()){\n \t\tint numverline = scan.nextInt();\n \t\tint[] verline = new int[numverline];\n \t\tfor(int i = 0; i < numverline; i++){\n \t\t\tverline[i] = i+1;\n \t\t}\n \t\tint horline = scan.nextInt();\n \t\tint[][] coor = new int[horline][2];\n \t\tfor(int i = 0; i < horline; i++){\n \t\t\tString[] tmp = scan.next().split(\",\");\n \t\t\tcoor[i][0] = Integer.parseInt(tmp[0]);\n \t\t\tcoor[i][1] = Integer.parseInt(tmp[1]);\n \t\t}\n \t\t\n \t\tfor(int i = 0; i < coor.length; i++){\n \t\t\tint tmp = verline[coor[i][0]-1];\n \t\t\tverline[coor[i][0]-1] = verline[coor[i][1]-1];\n \t\t\tverline[coor[i][1]-1] = tmp;\n \t\t}\n \t\t\n \t\tfor(int i = 0; i < verline.length; i++){\n \t\t\tSystem.out.println(verline[i]);\n \t\t}\n \t}",
"scan.hasNextInt()",
"scan.hasNextInt",
"scan",
"{\n \t\tint numverline = scan.nextInt();\n \t\tint[] verline = new int[numverline];\n \t\tfor(int i = 0; i < numverline; i++){\n \t\t\tverline[i] = i+1;\n \t\t}\n \t\tint horline = scan.nextInt();\n \t\tint[][] coor = new int[horline][2];\n \t\tfor(int i = 0; i < horline; i++){\n \t\t\tString[] tmp = scan.next().split(\",\");\n \t\t\tcoor[i][0] = Integer.parseInt(tmp[0]);\n \t\t\tcoor[i][1] = Integer.parseInt(tmp[1]);\n \t\t}\n \t\t\n \t\tfor(int i = 0; i < coor.length; i++){\n \t\t\tint tmp = verline[coor[i][0]-1];\n \t\t\tverline[coor[i][0]-1] = verline[coor[i][1]-1];\n \t\t\tverline[coor[i][1]-1] = tmp;\n \t\t}\n \t\t\n \t\tfor(int i = 0; i < verline.length; i++){\n \t\t\tSystem.out.println(verline[i]);\n \t\t}\n \t}",
"int numverline = scan.nextInt();",
"numverline",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int[] verline = new int[numverline];",
"verline",
"new int[numverline]",
"numverline",
"for(int i = 0; i < numverline; i++){\n \t\t\tverline[i] = i+1;\n \t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < numverline",
"i",
"numverline",
"i++",
"i++",
"i",
"{\n \t\t\tverline[i] = i+1;\n \t\t}",
"{\n \t\t\tverline[i] = i+1;\n \t\t}",
"verline[i] = i+1",
"verline[i]",
"verline",
"i",
"i+1",
"i",
"1",
"int horline = scan.nextInt();",
"horline",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int[][] coor = new int[horline][2];",
"coor",
"new int[horline][2]",
"horline",
"2",
"for(int i = 0; i < horline; i++){\n \t\t\tString[] tmp = scan.next().split(\",\");\n \t\t\tcoor[i][0] = Integer.parseInt(tmp[0]);\n \t\t\tcoor[i][1] = Integer.parseInt(tmp[1]);\n \t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < horline",
"i",
"horline",
"i++",
"i++",
"i",
"{\n \t\t\tString[] tmp = scan.next().split(\",\");\n \t\t\tcoor[i][0] = Integer.parseInt(tmp[0]);\n \t\t\tcoor[i][1] = Integer.parseInt(tmp[1]);\n \t\t}",
"{\n \t\t\tString[] tmp = scan.next().split(\",\");\n \t\t\tcoor[i][0] = Integer.parseInt(tmp[0]);\n \t\t\tcoor[i][1] = Integer.parseInt(tmp[1]);\n \t\t}",
"String[] tmp = scan.next().split(\",\");",
"tmp",
"scan.next().split(\",\")",
"scan.next().split",
"scan.next()",
"scan.next",
"scan",
"\",\"",
"coor[i][0] = Integer.parseInt(tmp[0])",
"coor[i][0]",
"coor[i]",
"coor",
"i",
"0",
"Integer.parseInt(tmp[0])",
"Integer.parseInt",
"Integer",
"tmp[0]",
"tmp",
"0",
"coor[i][1] = Integer.parseInt(tmp[1])",
"coor[i][1]",
"coor[i]",
"coor",
"i",
"1",
"Integer.parseInt(tmp[1])",
"Integer.parseInt",
"Integer",
"tmp[1]",
"tmp",
"1",
"for(int i = 0; i < coor.length; i++){\n \t\t\tint tmp = verline[coor[i][0]-1];\n \t\t\tverline[coor[i][0]-1] = verline[coor[i][1]-1];\n \t\t\tverline[coor[i][1]-1] = tmp;\n \t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < coor.length",
"i",
"coor.length",
"coor",
"coor.length",
"i++",
"i++",
"i",
"{\n \t\t\tint tmp = verline[coor[i][0]-1];\n \t\t\tverline[coor[i][0]-1] = verline[coor[i][1]-1];\n \t\t\tverline[coor[i][1]-1] = tmp;\n \t\t}",
"{\n \t\t\tint tmp = verline[coor[i][0]-1];\n \t\t\tverline[coor[i][0]-1] = verline[coor[i][1]-1];\n \t\t\tverline[coor[i][1]-1] = tmp;\n \t\t}",
"int tmp = verline[coor[i][0]-1];",
"tmp",
"verline[coor[i][0]-1]",
"verline",
"coor[i][0]-1",
"coor[i][0]",
"coor[i]",
"coor",
"i",
"0",
"1",
"verline[coor[i][0]-1] = verline[coor[i][1]-1]",
"verline[coor[i][0]-1]",
"verline",
"coor[i][0]-1",
"coor[i][0]",
"coor[i]",
"coor",
"i",
"0",
"1",
"verline[coor[i][1]-1]",
"verline",
"coor[i][1]-1",
"coor[i][1]",
"coor[i]",
"coor",
"i",
"1",
"1",
"verline[coor[i][1]-1] = tmp",
"verline[coor[i][1]-1]",
"verline",
"coor[i][1]-1",
"coor[i][1]",
"coor[i]",
"coor",
"i",
"1",
"1",
"tmp",
"for(int i = 0; i < verline.length; i++){\n \t\t\tSystem.out.println(verline[i]);\n \t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < verline.length",
"i",
"verline.length",
"verline",
"verline.length",
"i++",
"i++",
"i",
"{\n \t\t\tSystem.out.println(verline[i]);\n \t\t}",
"{\n \t\t\tSystem.out.println(verline[i]);\n \t\t}",
"System.out.println(verline[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"verline[i]",
"verline",
"i",
"String[] args",
"args"
] | import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
while (scan.hasNextInt()){
int numverline = scan.nextInt();
int[] verline = new int[numverline];
for(int i = 0; i < numverline; i++){
verline[i] = i+1;
}
int horline = scan.nextInt();
int[][] coor = new int[horline][2];
for(int i = 0; i < horline; i++){
String[] tmp = scan.next().split(",");
coor[i][0] = Integer.parseInt(tmp[0]);
coor[i][1] = Integer.parseInt(tmp[1]);
}
for(int i = 0; i < coor.length; i++){
int tmp = verline[coor[i][0]-1];
verline[coor[i][0]-1] = verline[coor[i][1]-1];
verline[coor[i][1]-1] = tmp;
}
for(int i = 0; i < verline.length; i++){
System.out.println(verline[i]);
}
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
0,
18,
13,
13,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
126,
5
],
[
126,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
30,
32
],
[
23,
33
],
[
33,
34
],
[
34,
35
],
[
23,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
8,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
8,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
52,
53
],
[
52,
54
],
[
47,
55
],
[
55,
56
],
[
56,
57
],
[
47,
58
],
[
59,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
62,
67
],
[
59,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
73,
74
],
[
73,
75
],
[
59,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
81,
82
],
[
81,
83
],
[
59,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
86,
88
],
[
59,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
93,
94
],
[
93,
95
],
[
59,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
8,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
101,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
108,
110
],
[
101,
111
],
[
111,
112
],
[
112,
113
],
[
101,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
115,
120
],
[
120,
121
],
[
120,
122
],
[
6,
123
],
[
123,
124
],
[
0,
125
],
[
125,
126
],
[
125,
127
]
] | [
"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 w = sc.nextInt();\n int[] a = new int[w+1];\n for(int i = 1; i < w+1; i++) a[i]=i;\n int n = sc.nextInt();\n for(int i = 0; i < n; i++){\n String[] s = sc.next().split(\",\");\n int l = Integer.parseInt(s[0]);\n int r = Integer.parseInt(s[1]);\n int exchange = a[l];\n a[l] = a[r];\n a[r] = exchange;\n }\n for(int i = 1; i < w+1; i++)System.out.println(a[i]);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int[] a = new int[w+1];\n for(int i = 1; i < w+1; i++) a[i]=i;\n int n = sc.nextInt();\n for(int i = 0; i < n; i++){\n String[] s = sc.next().split(\",\");\n int l = Integer.parseInt(s[0]);\n int r = Integer.parseInt(s[1]);\n int exchange = a[l];\n a[l] = a[r];\n a[r] = exchange;\n }\n for(int i = 1; i < w+1; i++)System.out.println(a[i]);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int[] a = new int[w+1];\n for(int i = 1; i < w+1; i++) a[i]=i;\n int n = sc.nextInt();\n for(int i = 0; i < n; i++){\n String[] s = sc.next().split(\",\");\n int l = Integer.parseInt(s[0]);\n int r = Integer.parseInt(s[1]);\n int exchange = a[l];\n a[l] = a[r];\n a[r] = exchange;\n }\n for(int i = 1; i < w+1; i++)System.out.println(a[i]);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int[] a = new int[w+1];\n for(int i = 1; i < w+1; i++) a[i]=i;\n int n = sc.nextInt();\n for(int i = 0; i < n; i++){\n String[] s = sc.next().split(\",\");\n int l = Integer.parseInt(s[0]);\n int r = Integer.parseInt(s[1]);\n int exchange = a[l];\n a[l] = a[r];\n a[r] = exchange;\n }\n for(int i = 1; i < w+1; i++)System.out.println(a[i]);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] a = new int[w+1];",
"a",
"new int[w+1]",
"w+1",
"w",
"1",
"for(int i = 1; i < w+1; i++) a[i]=i;",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < w+1",
"i",
"w+1",
"w",
"1",
"i++",
"i++",
"i",
"a[i]=i;",
"a[i]=i",
"a[i]",
"a",
"i",
"i",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i = 0; i < n; i++){\n String[] s = sc.next().split(\",\");\n int l = Integer.parseInt(s[0]);\n int r = Integer.parseInt(s[1]);\n int exchange = a[l];\n a[l] = a[r];\n a[r] = exchange;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String[] s = sc.next().split(\",\");\n int l = Integer.parseInt(s[0]);\n int r = Integer.parseInt(s[1]);\n int exchange = a[l];\n a[l] = a[r];\n a[r] = exchange;\n }",
"{\n String[] s = sc.next().split(\",\");\n int l = Integer.parseInt(s[0]);\n int r = Integer.parseInt(s[1]);\n int exchange = a[l];\n a[l] = a[r];\n a[r] = exchange;\n }",
"String[] s = sc.next().split(\",\");",
"s",
"sc.next().split(\",\")",
"sc.next().split",
"sc.next()",
"sc.next",
"sc",
"\",\"",
"int l = Integer.parseInt(s[0]);",
"l",
"Integer.parseInt(s[0])",
"Integer.parseInt",
"Integer",
"s[0]",
"s",
"0",
"int r = Integer.parseInt(s[1]);",
"r",
"Integer.parseInt(s[1])",
"Integer.parseInt",
"Integer",
"s[1]",
"s",
"1",
"int exchange = a[l];",
"exchange",
"a[l]",
"a",
"l",
"a[l] = a[r]",
"a[l]",
"a",
"l",
"a[r]",
"a",
"r",
"a[r] = exchange",
"a[r]",
"a",
"r",
"exchange",
"for(int i = 1; i < w+1; i++)System.out.println(a[i]);",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < w+1",
"i",
"w+1",
"w",
"1",
"i++",
"i++",
"i",
"System.out.println(a[i]);",
"System.out.println(a[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"a[i]",
"a",
"i",
"String[] args",
"args",
"public class Main{\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int[] a = new int[w+1];\n for(int i = 1; i < w+1; i++) a[i]=i;\n int n = sc.nextInt();\n for(int i = 0; i < n; i++){\n String[] s = sc.next().split(\",\");\n int l = Integer.parseInt(s[0]);\n int r = Integer.parseInt(s[1]);\n int exchange = a[l];\n a[l] = a[r];\n a[r] = exchange;\n }\n for(int i = 1; i < w+1; i++)System.out.println(a[i]);\n }\n}",
"public class Main{\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int[] a = new int[w+1];\n for(int i = 1; i < w+1; i++) a[i]=i;\n int n = sc.nextInt();\n for(int i = 0; i < n; i++){\n String[] s = sc.next().split(\",\");\n int l = Integer.parseInt(s[0]);\n int r = Integer.parseInt(s[1]);\n int exchange = a[l];\n a[l] = a[r];\n a[r] = exchange;\n }\n for(int i = 1; i < w+1; i++)System.out.println(a[i]);\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int w = sc.nextInt();
int[] a = new int[w+1];
for(int i = 1; i < w+1; i++) a[i]=i;
int n = sc.nextInt();
for(int i = 0; i < n; i++){
String[] s = sc.next().split(",");
int l = Integer.parseInt(s[0]);
int r = Integer.parseInt(s[1]);
int exchange = a[l];
a[l] = a[r];
a[r] = exchange;
}
for(int i = 1; i < w+1; i++)System.out.println(a[i]);
}
} |
[
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,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
13,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
132,
11
],
[
132,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
20,
23
],
[
23,
24
],
[
24,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
31,
32
],
[
32,
33
],
[
14,
34
],
[
34,
35
],
[
34,
36
],
[
37,
38
],
[
37,
39
],
[
14,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
45,
46
],
[
45,
47
],
[
40,
48
],
[
48,
49
],
[
49,
50
],
[
40,
51
],
[
52,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
14,
58
],
[
58,
59
],
[
14,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
61,
67
],
[
60,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
68,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
80,
81
],
[
80,
82
],
[
68,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
88,
89
],
[
88,
90
],
[
68,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
93,
95
],
[
68,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
100,
101
],
[
100,
102
],
[
68,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
14,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
108,
113
],
[
113,
114
],
[
113,
115
],
[
108,
116
],
[
116,
117
],
[
117,
118
],
[
108,
119
],
[
120,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
121,
126
],
[
126,
127
],
[
126,
128
],
[
12,
129
],
[
129,
130
],
[
0,
131
],
[
131,
132
],
[
131,
133
]
] | [
"\n\nimport 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 Auto-generated method stub\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint w = Integer.parseInt(br.readLine());\n\t\tint n = Integer.parseInt(br.readLine());\n\t\t\n\t\tint[] arr = new int[w + 1];\n\t\tfor (int i = 1; i <= w ; i++) {\n\t\t\tarr[i] = i;\n\t\t}\n\t\t\n\t\tString line;\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tString[] ab = line.split(\",\");\n\t\t\tint a1 = Integer.parseInt(ab[0]);\n\t\t\tint b1 = Integer.parseInt(ab[1]);\n\t\t\tint temp = arr[a1];\n\t\t\tarr[a1] = arr[b1];\n\t\t\tarr[b1] = temp;\n\t\t}\n\n\t\tfor (int i = 1; i <= w ; i++) {\n\t\t\tSystem.out.println(arr[i]);\n\t\t}\n\t}\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main{\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\t// TODO Auto-generated method stub\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint w = Integer.parseInt(br.readLine());\n\t\tint n = Integer.parseInt(br.readLine());\n\t\t\n\t\tint[] arr = new int[w + 1];\n\t\tfor (int i = 1; i <= w ; i++) {\n\t\t\tarr[i] = i;\n\t\t}\n\t\t\n\t\tString line;\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tString[] ab = line.split(\",\");\n\t\t\tint a1 = Integer.parseInt(ab[0]);\n\t\t\tint b1 = Integer.parseInt(ab[1]);\n\t\t\tint temp = arr[a1];\n\t\t\tarr[a1] = arr[b1];\n\t\t\tarr[b1] = temp;\n\t\t}\n\n\t\tfor (int i = 1; i <= w ; i++) {\n\t\t\tSystem.out.println(arr[i]);\n\t\t}\n\t}\n\n}",
"Main",
"public static void main(String[] args) throws NumberFormatException, IOException {\n\t\t// TODO Auto-generated method stub\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint w = Integer.parseInt(br.readLine());\n\t\tint n = Integer.parseInt(br.readLine());\n\t\t\n\t\tint[] arr = new int[w + 1];\n\t\tfor (int i = 1; i <= w ; i++) {\n\t\t\tarr[i] = i;\n\t\t}\n\t\t\n\t\tString line;\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tString[] ab = line.split(\",\");\n\t\t\tint a1 = Integer.parseInt(ab[0]);\n\t\t\tint b1 = Integer.parseInt(ab[1]);\n\t\t\tint temp = arr[a1];\n\t\t\tarr[a1] = arr[b1];\n\t\t\tarr[b1] = temp;\n\t\t}\n\n\t\tfor (int i = 1; i <= w ; i++) {\n\t\t\tSystem.out.println(arr[i]);\n\t\t}\n\t}",
"main",
"{\n\t\t// TODO Auto-generated method stub\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint w = Integer.parseInt(br.readLine());\n\t\tint n = Integer.parseInt(br.readLine());\n\t\t\n\t\tint[] arr = new int[w + 1];\n\t\tfor (int i = 1; i <= w ; i++) {\n\t\t\tarr[i] = i;\n\t\t}\n\t\t\n\t\tString line;\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tString[] ab = line.split(\",\");\n\t\t\tint a1 = Integer.parseInt(ab[0]);\n\t\t\tint b1 = Integer.parseInt(ab[1]);\n\t\t\tint temp = arr[a1];\n\t\t\tarr[a1] = arr[b1];\n\t\t\tarr[b1] = temp;\n\t\t}\n\n\t\tfor (int i = 1; i <= w ; i++) {\n\t\t\tSystem.out.println(arr[i]);\n\t\t}\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int w = Integer.parseInt(br.readLine());",
"w",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int n = Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int[] arr = new int[w + 1];",
"arr",
"new int[w + 1]",
"w + 1",
"w",
"1",
"for (int i = 1; i <= w ; i++) {\n\t\t\tarr[i] = i;\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tarr[i] = i;\n\t\t}",
"{\n\t\t\tarr[i] = i;\n\t\t}",
"arr[i] = i",
"arr[i]",
"arr",
"i",
"i",
"String line;",
"line",
"while ((line = br.readLine()) != null) {\n\t\t\tString[] ab = line.split(\",\");\n\t\t\tint a1 = Integer.parseInt(ab[0]);\n\t\t\tint b1 = Integer.parseInt(ab[1]);\n\t\t\tint temp = arr[a1];\n\t\t\tarr[a1] = arr[b1];\n\t\t\tarr[b1] = temp;\n\t\t}",
"(line = br.readLine()) != null",
"(line = br.readLine())",
"line",
"br.readLine()",
"br.readLine",
"br",
"null",
"{\n\t\t\tString[] ab = line.split(\",\");\n\t\t\tint a1 = Integer.parseInt(ab[0]);\n\t\t\tint b1 = Integer.parseInt(ab[1]);\n\t\t\tint temp = arr[a1];\n\t\t\tarr[a1] = arr[b1];\n\t\t\tarr[b1] = temp;\n\t\t}",
"String[] ab = line.split(\",\");",
"ab",
"line.split(\",\")",
"line.split",
"line",
"\",\"",
"int a1 = Integer.parseInt(ab[0]);",
"a1",
"Integer.parseInt(ab[0])",
"Integer.parseInt",
"Integer",
"ab[0]",
"ab",
"0",
"int b1 = Integer.parseInt(ab[1]);",
"b1",
"Integer.parseInt(ab[1])",
"Integer.parseInt",
"Integer",
"ab[1]",
"ab",
"1",
"int temp = arr[a1];",
"temp",
"arr[a1]",
"arr",
"a1",
"arr[a1] = arr[b1]",
"arr[a1]",
"arr",
"a1",
"arr[b1]",
"arr",
"b1",
"arr[b1] = temp",
"arr[b1]",
"arr",
"b1",
"temp",
"for (int i = 1; i <= w ; i++) {\n\t\t\tSystem.out.println(arr[i]);\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(arr[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(arr[i]);\n\t\t}",
"System.out.println(arr[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"arr[i]",
"arr",
"i",
"String[] args",
"args",
"public class Main{\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\t// TODO Auto-generated method stub\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint w = Integer.parseInt(br.readLine());\n\t\tint n = Integer.parseInt(br.readLine());\n\t\t\n\t\tint[] arr = new int[w + 1];\n\t\tfor (int i = 1; i <= w ; i++) {\n\t\t\tarr[i] = i;\n\t\t}\n\t\t\n\t\tString line;\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tString[] ab = line.split(\",\");\n\t\t\tint a1 = Integer.parseInt(ab[0]);\n\t\t\tint b1 = Integer.parseInt(ab[1]);\n\t\t\tint temp = arr[a1];\n\t\t\tarr[a1] = arr[b1];\n\t\t\tarr[b1] = temp;\n\t\t}\n\n\t\tfor (int i = 1; i <= w ; i++) {\n\t\t\tSystem.out.println(arr[i]);\n\t\t}\n\t}\n\n}",
"public class Main{\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\t// TODO Auto-generated method stub\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint w = Integer.parseInt(br.readLine());\n\t\tint n = Integer.parseInt(br.readLine());\n\t\t\n\t\tint[] arr = new int[w + 1];\n\t\tfor (int i = 1; i <= w ; i++) {\n\t\t\tarr[i] = i;\n\t\t}\n\t\t\n\t\tString line;\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tString[] ab = line.split(\",\");\n\t\t\tint a1 = Integer.parseInt(ab[0]);\n\t\t\tint b1 = Integer.parseInt(ab[1]);\n\t\t\tint temp = arr[a1];\n\t\t\tarr[a1] = arr[b1];\n\t\t\tarr[b1] = temp;\n\t\t}\n\n\t\tfor (int i = 1; i <= w ; i++) {\n\t\t\tSystem.out.println(arr[i]);\n\t\t}\n\t}\n\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main{
public static void main(String[] args) throws NumberFormatException, IOException {
// TODO Auto-generated method stub
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int w = Integer.parseInt(br.readLine());
int n = Integer.parseInt(br.readLine());
int[] arr = new int[w + 1];
for (int i = 1; i <= w ; i++) {
arr[i] = i;
}
String line;
while ((line = br.readLine()) != null) {
String[] ab = line.split(",");
int a1 = Integer.parseInt(ab[0]);
int b1 = Integer.parseInt(ab[1]);
int temp = arr[a1];
arr[a1] = arr[b1];
arr[b1] = temp;
}
for (int i = 1; i <= w ; i++) {
System.out.println(arr[i]);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
4,
18,
13,
0,
13,
4,
18,
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,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
13,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
161,
11
],
[
161,
12
],
[
12,
13
],
[
12,
14
],
[
161,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
17,
24
],
[
24,
25
],
[
24,
26
],
[
17,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
27,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
35,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
27,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
52,
53
],
[
53,
54
],
[
46,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
60,
61
],
[
61,
62
],
[
46,
63
],
[
63,
64
],
[
63,
65
],
[
46,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
74,
76
],
[
67,
77
],
[
77,
78
],
[
78,
79
],
[
67,
80
],
[
81,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
86,
88
],
[
46,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
94,
95
],
[
94,
96
],
[
89,
97
],
[
97,
98
],
[
98,
99
],
[
89,
100
],
[
101,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
104,
109
],
[
101,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
113,
116
],
[
116,
117
],
[
116,
118
],
[
112,
119
],
[
101,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
123,
126
],
[
126,
127
],
[
126,
128
],
[
122,
129
],
[
101,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
132,
134
],
[
101,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
135,
139
],
[
139,
140
],
[
139,
141
],
[
101,
142
],
[
142,
143
],
[
143,
144
],
[
143,
145
],
[
142,
146
],
[
46,
147
],
[
147,
148
],
[
147,
149
],
[
147,
150
],
[
151,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
154,
156
],
[
152,
157
],
[
15,
158
],
[
158,
159
],
[
0,
160
],
[
160,
161
],
[
160,
162
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n private static final String REGIX_COMMA = \",\";\n\n public static void main(String[] args) {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n int wide = 0;\n int num = 0;\n\n try {\n wide = Integer.valueOf(in.readLine());\n num = Integer.valueOf(in.readLine());\n\n int[] lot = new int[wide];\n\n for (int i = 0; i < lot.length; i++) {\n lot[i] = i + 1;\n }\n\n for (int j = 0; j < num; j++) {\n\n String[] changePosition = in.readLine().split(REGIX_COMMA);\n int left = Integer.valueOf(changePosition[0]) - 1;\n int right = Integer.valueOf(changePosition[1]) - 1;\n\n int temp = lot[left];\n lot[left] = lot[right];\n lot[right] = temp;\n }\n\n for (int answer : lot) {\n System.out.println(answer);\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n in.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\n private static final String REGIX_COMMA = \",\";\n\n public static void main(String[] args) {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n int wide = 0;\n int num = 0;\n\n try {\n wide = Integer.valueOf(in.readLine());\n num = Integer.valueOf(in.readLine());\n\n int[] lot = new int[wide];\n\n for (int i = 0; i < lot.length; i++) {\n lot[i] = i + 1;\n }\n\n for (int j = 0; j < num; j++) {\n\n String[] changePosition = in.readLine().split(REGIX_COMMA);\n int left = Integer.valueOf(changePosition[0]) - 1;\n int right = Integer.valueOf(changePosition[1]) - 1;\n\n int temp = lot[left];\n lot[left] = lot[right];\n lot[right] = temp;\n }\n\n for (int answer : lot) {\n System.out.println(answer);\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n in.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n}",
"Main",
"private static final String REGIX_COMMA = \",\";",
"REGIX_COMMA",
"\",\"",
"public static void main(String[] args) {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n int wide = 0;\n int num = 0;\n\n try {\n wide = Integer.valueOf(in.readLine());\n num = Integer.valueOf(in.readLine());\n\n int[] lot = new int[wide];\n\n for (int i = 0; i < lot.length; i++) {\n lot[i] = i + 1;\n }\n\n for (int j = 0; j < num; j++) {\n\n String[] changePosition = in.readLine().split(REGIX_COMMA);\n int left = Integer.valueOf(changePosition[0]) - 1;\n int right = Integer.valueOf(changePosition[1]) - 1;\n\n int temp = lot[left];\n lot[left] = lot[right];\n lot[right] = temp;\n }\n\n for (int answer : lot) {\n System.out.println(answer);\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n in.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }",
"main",
"{\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n int wide = 0;\n int num = 0;\n\n try {\n wide = Integer.valueOf(in.readLine());\n num = Integer.valueOf(in.readLine());\n\n int[] lot = new int[wide];\n\n for (int i = 0; i < lot.length; i++) {\n lot[i] = i + 1;\n }\n\n for (int j = 0; j < num; j++) {\n\n String[] changePosition = in.readLine().split(REGIX_COMMA);\n int left = Integer.valueOf(changePosition[0]) - 1;\n int right = Integer.valueOf(changePosition[1]) - 1;\n\n int temp = lot[left];\n lot[left] = lot[right];\n lot[right] = temp;\n }\n\n for (int answer : lot) {\n System.out.println(answer);\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n in.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }",
"BufferedReader in = new BufferedReader(new InputStreamReader(System.in));",
"in",
"new BufferedReader(new InputStreamReader(System.in))",
"int wide = 0;",
"wide",
"0",
"int num = 0;",
"num",
"0",
"try {\n wide = Integer.valueOf(in.readLine());\n num = Integer.valueOf(in.readLine());\n\n int[] lot = new int[wide];\n\n for (int i = 0; i < lot.length; i++) {\n lot[i] = i + 1;\n }\n\n for (int j = 0; j < num; j++) {\n\n String[] changePosition = in.readLine().split(REGIX_COMMA);\n int left = Integer.valueOf(changePosition[0]) - 1;\n int right = Integer.valueOf(changePosition[1]) - 1;\n\n int temp = lot[left];\n lot[left] = lot[right];\n lot[right] = temp;\n }\n\n for (int answer : lot) {\n System.out.println(answer);\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n in.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"catch (IOException e) {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n try {\n in.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"try {\n in.close();\n } catch (IOException e) {\n e.printStackTrace();\n }",
"catch (IOException e) {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n in.close();\n }",
"in.close()",
"in.close",
"in",
"{\n wide = Integer.valueOf(in.readLine());\n num = Integer.valueOf(in.readLine());\n\n int[] lot = new int[wide];\n\n for (int i = 0; i < lot.length; i++) {\n lot[i] = i + 1;\n }\n\n for (int j = 0; j < num; j++) {\n\n String[] changePosition = in.readLine().split(REGIX_COMMA);\n int left = Integer.valueOf(changePosition[0]) - 1;\n int right = Integer.valueOf(changePosition[1]) - 1;\n\n int temp = lot[left];\n lot[left] = lot[right];\n lot[right] = temp;\n }\n\n for (int answer : lot) {\n System.out.println(answer);\n }\n }",
"wide = Integer.valueOf(in.readLine())",
"wide",
"Integer.valueOf(in.readLine())",
"Integer.valueOf",
"Integer",
"in.readLine()",
"in.readLine",
"in",
"num = Integer.valueOf(in.readLine())",
"num",
"Integer.valueOf(in.readLine())",
"Integer.valueOf",
"Integer",
"in.readLine()",
"in.readLine",
"in",
"int[] lot = new int[wide];",
"lot",
"new int[wide]",
"wide",
"for (int i = 0; i < lot.length; i++) {\n lot[i] = i + 1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < lot.length",
"i",
"lot.length",
"lot",
"lot.length",
"i++",
"i++",
"i",
"{\n lot[i] = i + 1;\n }",
"{\n lot[i] = i + 1;\n }",
"lot[i] = i + 1",
"lot[i]",
"lot",
"i",
"i + 1",
"i",
"1",
"for (int j = 0; j < num; j++) {\n\n String[] changePosition = in.readLine().split(REGIX_COMMA);\n int left = Integer.valueOf(changePosition[0]) - 1;\n int right = Integer.valueOf(changePosition[1]) - 1;\n\n int temp = lot[left];\n lot[left] = lot[right];\n lot[right] = temp;\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < num",
"j",
"num",
"j++",
"j++",
"j",
"{\n\n String[] changePosition = in.readLine().split(REGIX_COMMA);\n int left = Integer.valueOf(changePosition[0]) - 1;\n int right = Integer.valueOf(changePosition[1]) - 1;\n\n int temp = lot[left];\n lot[left] = lot[right];\n lot[right] = temp;\n }",
"{\n\n String[] changePosition = in.readLine().split(REGIX_COMMA);\n int left = Integer.valueOf(changePosition[0]) - 1;\n int right = Integer.valueOf(changePosition[1]) - 1;\n\n int temp = lot[left];\n lot[left] = lot[right];\n lot[right] = temp;\n }",
"String[] changePosition = in.readLine().split(REGIX_COMMA);",
"changePosition",
"in.readLine().split(REGIX_COMMA)",
"in.readLine().split",
"in.readLine()",
"in.readLine",
"in",
"REGIX_COMMA",
"int left = Integer.valueOf(changePosition[0]) - 1;",
"left",
"Integer.valueOf(changePosition[0]) - 1",
"Integer.valueOf(changePosition[0])",
"Integer.valueOf",
"Integer",
"changePosition[0]",
"changePosition",
"0",
"1",
"int right = Integer.valueOf(changePosition[1]) - 1;",
"right",
"Integer.valueOf(changePosition[1]) - 1",
"Integer.valueOf(changePosition[1])",
"Integer.valueOf",
"Integer",
"changePosition[1]",
"changePosition",
"1",
"1",
"int temp = lot[left];",
"temp",
"lot[left]",
"lot",
"left",
"lot[left] = lot[right]",
"lot[left]",
"lot",
"left",
"lot[right]",
"lot",
"right",
"lot[right] = temp",
"lot[right]",
"lot",
"right",
"temp",
"for (int answer : lot) {\n System.out.println(answer);\n }",
"int answer",
"lot",
"{\n System.out.println(answer);\n }",
"{\n System.out.println(answer);\n }",
"System.out.println(answer)",
"System.out.println",
"System.out",
"System",
"System.out",
"answer",
"String[] args",
"args",
"public class Main {\n\n private static final String REGIX_COMMA = \",\";\n\n public static void main(String[] args) {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n int wide = 0;\n int num = 0;\n\n try {\n wide = Integer.valueOf(in.readLine());\n num = Integer.valueOf(in.readLine());\n\n int[] lot = new int[wide];\n\n for (int i = 0; i < lot.length; i++) {\n lot[i] = i + 1;\n }\n\n for (int j = 0; j < num; j++) {\n\n String[] changePosition = in.readLine().split(REGIX_COMMA);\n int left = Integer.valueOf(changePosition[0]) - 1;\n int right = Integer.valueOf(changePosition[1]) - 1;\n\n int temp = lot[left];\n lot[left] = lot[right];\n lot[right] = temp;\n }\n\n for (int answer : lot) {\n System.out.println(answer);\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n in.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n}",
"public class Main {\n\n private static final String REGIX_COMMA = \",\";\n\n public static void main(String[] args) {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n int wide = 0;\n int num = 0;\n\n try {\n wide = Integer.valueOf(in.readLine());\n num = Integer.valueOf(in.readLine());\n\n int[] lot = new int[wide];\n\n for (int i = 0; i < lot.length; i++) {\n lot[i] = i + 1;\n }\n\n for (int j = 0; j < num; j++) {\n\n String[] changePosition = in.readLine().split(REGIX_COMMA);\n int left = Integer.valueOf(changePosition[0]) - 1;\n int right = Integer.valueOf(changePosition[1]) - 1;\n\n int temp = lot[left];\n lot[left] = lot[right];\n lot[right] = temp;\n }\n\n for (int answer : lot) {\n System.out.println(answer);\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n in.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
private static final String REGIX_COMMA = ",";
public static void main(String[] args) {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int wide = 0;
int num = 0;
try {
wide = Integer.valueOf(in.readLine());
num = Integer.valueOf(in.readLine());
int[] lot = new int[wide];
for (int i = 0; i < lot.length; i++) {
lot[i] = i + 1;
}
for (int j = 0; j < num; j++) {
String[] changePosition = in.readLine().split(REGIX_COMMA);
int left = Integer.valueOf(changePosition[0]) - 1;
int right = Integer.valueOf(changePosition[1]) - 1;
int temp = lot[left];
lot[left] = lot[right];
lot[right] = temp;
}
for (int answer : lot) {
System.out.println(answer);
}
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
in.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
4,
18,
13,
17,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
2,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
12,
15
],
[
8,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
8,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
30,
38
],
[
38,
39
],
[
39,
40
],
[
30,
41
],
[
42,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
47,
49
],
[
8,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
50,
55
],
[
55,
56
],
[
55,
57
],
[
50,
58
],
[
58,
59
],
[
59,
60
],
[
50,
61
],
[
62,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
65,
69
],
[
62,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
72,
76
],
[
62,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
79,
81
],
[
62,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
86,
88
],
[
62,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
8,
94
],
[
94,
95
],
[
94,
96
],
[
94,
97
],
[
98,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
99,
104
],
[
6,
105
],
[
105,
106
]
] | [
"import java.util.Scanner;\n\nclass Main {\n public static void main (String args[]) {\n\tScanner scan = new Scanner(System.in);\n\tscan.useDelimiter(\",|\\n\");\n\tint n = scan.nextInt();\n\tint m = scan.nextInt();\n\tint[] seq = new int[n];\n\n\tfor (int i=0; i<n; i++) {\n\t seq[i] = i+1;\n\t}\n\n for (int i=0; i<m; i++) {\n\t int a = scan.nextInt() - 1;\n\t int b = scan.nextInt() - 1;\n\t \n\t int tmp = seq[a];\n\t seq[a] = seq[b];\n\t seq[b] = tmp;\n\t}\n\n\tfor (int data: seq) {\n\t System.out.println(data);\n\t}\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n public static void main (String args[]) {\n\tScanner scan = new Scanner(System.in);\n\tscan.useDelimiter(\",|\\n\");\n\tint n = scan.nextInt();\n\tint m = scan.nextInt();\n\tint[] seq = new int[n];\n\n\tfor (int i=0; i<n; i++) {\n\t seq[i] = i+1;\n\t}\n\n for (int i=0; i<m; i++) {\n\t int a = scan.nextInt() - 1;\n\t int b = scan.nextInt() - 1;\n\t \n\t int tmp = seq[a];\n\t seq[a] = seq[b];\n\t seq[b] = tmp;\n\t}\n\n\tfor (int data: seq) {\n\t System.out.println(data);\n\t}\n }\n}",
"Main",
"public static void main (String args[]) {\n\tScanner scan = new Scanner(System.in);\n\tscan.useDelimiter(\",|\\n\");\n\tint n = scan.nextInt();\n\tint m = scan.nextInt();\n\tint[] seq = new int[n];\n\n\tfor (int i=0; i<n; i++) {\n\t seq[i] = i+1;\n\t}\n\n for (int i=0; i<m; i++) {\n\t int a = scan.nextInt() - 1;\n\t int b = scan.nextInt() - 1;\n\t \n\t int tmp = seq[a];\n\t seq[a] = seq[b];\n\t seq[b] = tmp;\n\t}\n\n\tfor (int data: seq) {\n\t System.out.println(data);\n\t}\n }",
"main",
"{\n\tScanner scan = new Scanner(System.in);\n\tscan.useDelimiter(\",|\\n\");\n\tint n = scan.nextInt();\n\tint m = scan.nextInt();\n\tint[] seq = new int[n];\n\n\tfor (int i=0; i<n; i++) {\n\t seq[i] = i+1;\n\t}\n\n for (int i=0; i<m; i++) {\n\t int a = scan.nextInt() - 1;\n\t int b = scan.nextInt() - 1;\n\t \n\t int tmp = seq[a];\n\t seq[a] = seq[b];\n\t seq[b] = tmp;\n\t}\n\n\tfor (int data: seq) {\n\t System.out.println(data);\n\t}\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"scan.useDelimiter(\",|\\n\")",
"scan.useDelimiter",
"scan",
"\",|\\n\"",
"int n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int m = scan.nextInt();",
"m",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int[] seq = new int[n];",
"seq",
"new int[n]",
"n",
"for (int i=0; i<n; i++) {\n\t seq[i] = i+1;\n\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t seq[i] = i+1;\n\t}",
"{\n\t seq[i] = i+1;\n\t}",
"seq[i] = i+1",
"seq[i]",
"seq",
"i",
"i+1",
"i",
"1",
"for (int i=0; i<m; i++) {\n\t int a = scan.nextInt() - 1;\n\t int b = scan.nextInt() - 1;\n\t \n\t int tmp = seq[a];\n\t seq[a] = seq[b];\n\t seq[b] = tmp;\n\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\t int a = scan.nextInt() - 1;\n\t int b = scan.nextInt() - 1;\n\t \n\t int tmp = seq[a];\n\t seq[a] = seq[b];\n\t seq[b] = tmp;\n\t}",
"{\n\t int a = scan.nextInt() - 1;\n\t int b = scan.nextInt() - 1;\n\t \n\t int tmp = seq[a];\n\t seq[a] = seq[b];\n\t seq[b] = tmp;\n\t}",
"int a = scan.nextInt() - 1;",
"a",
"scan.nextInt() - 1",
"scan.nextInt()",
"scan.nextInt",
"scan",
"1",
"int b = scan.nextInt() - 1;",
"b",
"scan.nextInt() - 1",
"scan.nextInt()",
"scan.nextInt",
"scan",
"1",
"int tmp = seq[a];",
"tmp",
"seq[a]",
"seq",
"a",
"seq[a] = seq[b]",
"seq[a]",
"seq",
"a",
"seq[b]",
"seq",
"b",
"seq[b] = tmp",
"seq[b]",
"seq",
"b",
"tmp",
"for (int data: seq) {\n\t System.out.println(data);\n\t}",
"int data",
"seq",
"{\n\t System.out.println(data);\n\t}",
"{\n\t System.out.println(data);\n\t}",
"System.out.println(data)",
"System.out.println",
"System.out",
"System",
"System.out",
"data",
"String args[]",
"args"
] | import java.util.Scanner;
class Main {
public static void main (String args[]) {
Scanner scan = new Scanner(System.in);
scan.useDelimiter(",|\n");
int n = scan.nextInt();
int m = scan.nextInt();
int[] seq = new int[n];
for (int i=0; i<n; i++) {
seq[i] = i+1;
}
for (int i=0; i<m; i++) {
int a = scan.nextInt() - 1;
int b = scan.nextInt() - 1;
int tmp = seq[a];
seq[a] = seq[b];
seq[b] = tmp;
}
for (int data: seq) {
System.out.println(data);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
2,
13,
17,
41,
13,
41,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
17,
13,
30,
0,
13,
13,
9,
14,
2,
2,
13,
17,
13,
30,
41,
13,
4,
18,
13,
13,
4,
18,
13,
13,
4,
18,
13,
13,
4,
18,
13,
13,
13,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
8,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
44,
45
],
[
44,
46
],
[
8,
47
],
[
47,
48
],
[
8,
49
],
[
49,
50
],
[
8,
51
],
[
51,
52
],
[
51,
53
],
[
8,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
59,
60
],
[
59,
61
],
[
54,
62
],
[
62,
63
],
[
63,
64
],
[
54,
65
],
[
66,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
69,
74
],
[
66,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
80,
81
],
[
80,
82
],
[
66,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
88,
89
],
[
88,
90
],
[
66,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
96,
97
],
[
96,
98
],
[
91,
99
],
[
99,
100
],
[
100,
101
],
[
91,
102
],
[
103,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
105,
109
],
[
104,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
103,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
116,
120
],
[
115,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
125,
126
],
[
124,
127
],
[
121,
128
],
[
128,
129
],
[
129,
130
],
[
128,
131
],
[
128,
132
],
[
132,
133
],
[
133,
134
],
[
132,
135
],
[
121,
136
],
[
136,
137
],
[
137,
138
],
[
136,
139
],
[
136,
140
],
[
8,
141
],
[
141,
142
],
[
141,
143
],
[
141,
144
],
[
145,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
146,
151
],
[
6,
152
],
[
152,
153
]
] | [
"import java.util.*;\n\n\nclass Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tMain main = new Main();\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\t\n\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < w; i++) {\n\t\t\tlist.add(i + 1);\n\t\t}\n\t\t\n\t\tint a, b, index = 0;\n\t\t\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\t\n\t\t\tString[] str = scan.next().split(\",\");\n\t\t\ta = Integer.valueOf(str[0]);\n\t\t\tb = Integer.valueOf(str[1]);\n\t\t\t\n\t\t\tfor(int j = 0; j < w; j++) {\n\t\t\t\tif( a-1 == j) {\n\t\t\t\t\tindex = j;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif( b-1 == j) {\n\t\t\t\t\tint temp = list.get(index);\n\t\t\t\t\tlist.set(index, list.get(j));\n\t\t\t\t\tlist.set(j, temp);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tfor(int i : list) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tMain main = new Main();\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\t\n\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < w; i++) {\n\t\t\tlist.add(i + 1);\n\t\t}\n\t\t\n\t\tint a, b, index = 0;\n\t\t\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\t\n\t\t\tString[] str = scan.next().split(\",\");\n\t\t\ta = Integer.valueOf(str[0]);\n\t\t\tb = Integer.valueOf(str[1]);\n\t\t\t\n\t\t\tfor(int j = 0; j < w; j++) {\n\t\t\t\tif( a-1 == j) {\n\t\t\t\t\tindex = j;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif( b-1 == j) {\n\t\t\t\t\tint temp = list.get(index);\n\t\t\t\t\tlist.set(index, list.get(j));\n\t\t\t\t\tlist.set(j, temp);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tfor(int i : list) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tMain main = new Main();\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\t\n\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < w; i++) {\n\t\t\tlist.add(i + 1);\n\t\t}\n\t\t\n\t\tint a, b, index = 0;\n\t\t\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\t\n\t\t\tString[] str = scan.next().split(\",\");\n\t\t\ta = Integer.valueOf(str[0]);\n\t\t\tb = Integer.valueOf(str[1]);\n\t\t\t\n\t\t\tfor(int j = 0; j < w; j++) {\n\t\t\t\tif( a-1 == j) {\n\t\t\t\t\tindex = j;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif( b-1 == j) {\n\t\t\t\t\tint temp = list.get(index);\n\t\t\t\t\tlist.set(index, list.get(j));\n\t\t\t\t\tlist.set(j, temp);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tfor(int i : list) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tMain main = new Main();\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\t\n\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < w; i++) {\n\t\t\tlist.add(i + 1);\n\t\t}\n\t\t\n\t\tint a, b, index = 0;\n\t\t\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\t\n\t\t\tString[] str = scan.next().split(\",\");\n\t\t\ta = Integer.valueOf(str[0]);\n\t\t\tb = Integer.valueOf(str[1]);\n\t\t\t\n\t\t\tfor(int j = 0; j < w; j++) {\n\t\t\t\tif( a-1 == j) {\n\t\t\t\t\tindex = j;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif( b-1 == j) {\n\t\t\t\t\tint temp = list.get(index);\n\t\t\t\t\tlist.set(index, list.get(j));\n\t\t\t\t\tlist.set(j, temp);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tfor(int i : list) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"Main main = new Main();",
"main",
"new Main()",
"int w = scan.nextInt();",
"w",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"ArrayList<Integer> list = new ArrayList<Integer>();",
"list",
"new ArrayList<Integer>()",
"for(int i = 0; i < w; i++) {\n\t\t\tlist.add(i + 1);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tlist.add(i + 1);\n\t\t}",
"{\n\t\t\tlist.add(i + 1);\n\t\t}",
"list.add(i + 1)",
"list.add",
"list",
"i + 1",
"i",
"1",
"int a",
"a",
"b",
"b",
"index = 0;",
"index",
"0",
"for(int i = 0; i < n; i++) {\n\t\t\t\n\t\t\tString[] str = scan.next().split(\",\");\n\t\t\ta = Integer.valueOf(str[0]);\n\t\t\tb = Integer.valueOf(str[1]);\n\t\t\t\n\t\t\tfor(int j = 0; j < w; j++) {\n\t\t\t\tif( a-1 == j) {\n\t\t\t\t\tindex = j;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif( b-1 == j) {\n\t\t\t\t\tint temp = list.get(index);\n\t\t\t\t\tlist.set(index, list.get(j));\n\t\t\t\t\tlist.set(j, temp);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\n\t\t\tString[] str = scan.next().split(\",\");\n\t\t\ta = Integer.valueOf(str[0]);\n\t\t\tb = Integer.valueOf(str[1]);\n\t\t\t\n\t\t\tfor(int j = 0; j < w; j++) {\n\t\t\t\tif( a-1 == j) {\n\t\t\t\t\tindex = j;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif( b-1 == j) {\n\t\t\t\t\tint temp = list.get(index);\n\t\t\t\t\tlist.set(index, list.get(j));\n\t\t\t\t\tlist.set(j, temp);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}",
"{\n\t\t\t\n\t\t\tString[] str = scan.next().split(\",\");\n\t\t\ta = Integer.valueOf(str[0]);\n\t\t\tb = Integer.valueOf(str[1]);\n\t\t\t\n\t\t\tfor(int j = 0; j < w; j++) {\n\t\t\t\tif( a-1 == j) {\n\t\t\t\t\tindex = j;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif( b-1 == j) {\n\t\t\t\t\tint temp = list.get(index);\n\t\t\t\t\tlist.set(index, list.get(j));\n\t\t\t\t\tlist.set(j, temp);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}",
"String[] str = scan.next().split(\",\");",
"str",
"scan.next().split(\",\")",
"scan.next().split",
"scan.next()",
"scan.next",
"scan",
"\",\"",
"a = Integer.valueOf(str[0])",
"a",
"Integer.valueOf(str[0])",
"Integer.valueOf",
"Integer",
"str[0]",
"str",
"0",
"b = Integer.valueOf(str[1])",
"b",
"Integer.valueOf(str[1])",
"Integer.valueOf",
"Integer",
"str[1]",
"str",
"1",
"for(int j = 0; j < w; j++) {\n\t\t\t\tif( a-1 == j) {\n\t\t\t\t\tindex = j;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif( b-1 == j) {\n\t\t\t\t\tint temp = list.get(index);\n\t\t\t\t\tlist.set(index, list.get(j));\n\t\t\t\t\tlist.set(j, temp);\n\t\t\t\t}\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < w",
"j",
"w",
"j++",
"j++",
"j",
"{\n\t\t\t\tif( a-1 == j) {\n\t\t\t\t\tindex = j;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif( b-1 == j) {\n\t\t\t\t\tint temp = list.get(index);\n\t\t\t\t\tlist.set(index, list.get(j));\n\t\t\t\t\tlist.set(j, temp);\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif( a-1 == j) {\n\t\t\t\t\tindex = j;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif( b-1 == j) {\n\t\t\t\t\tint temp = list.get(index);\n\t\t\t\t\tlist.set(index, list.get(j));\n\t\t\t\t\tlist.set(j, temp);\n\t\t\t\t}\n\t\t\t}",
"if( a-1 == j) {\n\t\t\t\t\tindex = j;\n\t\t\t\t\tcontinue;\n\t\t\t\t}",
"a-1 == j",
"a-1",
"a",
"1",
"j",
"{\n\t\t\t\t\tindex = j;\n\t\t\t\t\tcontinue;\n\t\t\t\t}",
"index = j",
"index",
"j",
"continue;",
"if( b-1 == j) {\n\t\t\t\t\tint temp = list.get(index);\n\t\t\t\t\tlist.set(index, list.get(j));\n\t\t\t\t\tlist.set(j, temp);\n\t\t\t\t}",
"b-1 == j",
"b-1",
"b",
"1",
"j",
"{\n\t\t\t\t\tint temp = list.get(index);\n\t\t\t\t\tlist.set(index, list.get(j));\n\t\t\t\t\tlist.set(j, temp);\n\t\t\t\t}",
"int temp = list.get(index);",
"temp",
"list.get(index)",
"list.get",
"list",
"index",
"list.set(index, list.get(j))",
"list.set",
"list",
"index",
"list.get(j)",
"list.get",
"list",
"j",
"list.set(j, temp)",
"list.set",
"list",
"j",
"temp",
"for(int i : list) {\n\t\t\tSystem.out.println(i);\n\t\t}",
"int i",
"list",
"{\n\t\t\tSystem.out.println(i);\n\t\t}",
"{\n\t\t\tSystem.out.println(i);\n\t\t}",
"System.out.println(i)",
"System.out.println",
"System.out",
"System",
"System.out",
"i",
"String[] args",
"args"
] | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
Main main = new Main();
int w = scan.nextInt();
int n = scan.nextInt();
ArrayList<Integer> list = new ArrayList<Integer>();
for(int i = 0; i < w; i++) {
list.add(i + 1);
}
int a, b, index = 0;
for(int i = 0; i < n; i++) {
String[] str = scan.next().split(",");
a = Integer.valueOf(str[0]);
b = Integer.valueOf(str[1]);
for(int j = 0; j < w; j++) {
if( a-1 == j) {
index = j;
continue;
}
if( b-1 == j) {
int temp = list.get(index);
list.set(index, list.get(j));
list.set(j, temp);
}
}
}
for(int i : list) {
System.out.println(i);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
20,
17,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
41,
13,
41,
13,
4,
18,
13,
0,
13,
4,
18,
13,
17,
0,
13,
2,
4,
18,
13,
4,
18,
13,
17,
13,
17,
0,
13,
2,
4,
18,
13,
4,
18,
13,
2,
13,
17,
17,
0,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
150,
5
],
[
150,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
8,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
8,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
41,
42
],
[
41,
43
],
[
36,
44
],
[
44,
45
],
[
45,
46
],
[
36,
47
],
[
48,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
53,
55
],
[
8,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
56,
64
],
[
64,
65
],
[
65,
66
],
[
56,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
71,
72
],
[
68,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
68,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
68,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
90,
94
],
[
86,
95
],
[
68,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
102,
103
],
[
103,
104
],
[
102,
105
],
[
105,
106
],
[
105,
107
],
[
98,
108
],
[
68,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
111,
113
],
[
68,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
118,
119
],
[
118,
120
],
[
68,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
121,
125
],
[
8,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
126,
131
],
[
131,
132
],
[
131,
133
],
[
126,
134
],
[
134,
135
],
[
135,
136
],
[
126,
137
],
[
138,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
139,
144
],
[
144,
145
],
[
144,
146
],
[
6,
147
],
[
147,
148
],
[
0,
149
],
[
149,
150
],
[
149,
151
]
] | [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n // 標準入力からデータを読み込む準備\n Scanner sc = new Scanner(System.in);\n // あみだくじ貰ったリストに応じてスワップする。\n int w, n, a, b, i;// w(整数),n(整数),a,bはスワップの横棒(i番目)\n int fdata[] = new int[30];\n w = sc.nextInt();\n n = sc.nextInt();\n // 初期データ確保\n for (i = 0; i < w; i++) {\n fdata[i] = i + 1;\n }\n for (i = 0; i < n; i++) {\n // 来るa1,b1に対する処理\n int swap, index;\n String string = sc.next();\n index = string.indexOf(\",\");\n a = Integer.parseInt(string.substring(0, index)) - 1;// substring(a,b)b-aまでを返す\n b = Integer.parseInt(string.substring(index + 1)) - 1;// substring(a)aまで以外を返す\n\n swap = fdata[a];\n fdata[a] = fdata[b];\n fdata[b] = swap;\n }\n for (i = 0; i < w; i++) {\n System.out.println(fdata[i]);\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n // 標準入力からデータを読み込む準備\n Scanner sc = new Scanner(System.in);\n // あみだくじ貰ったリストに応じてスワップする。\n int w, n, a, b, i;// w(整数),n(整数),a,bはスワップの横棒(i番目)\n int fdata[] = new int[30];\n w = sc.nextInt();\n n = sc.nextInt();\n // 初期データ確保\n for (i = 0; i < w; i++) {\n fdata[i] = i + 1;\n }\n for (i = 0; i < n; i++) {\n // 来るa1,b1に対する処理\n int swap, index;\n String string = sc.next();\n index = string.indexOf(\",\");\n a = Integer.parseInt(string.substring(0, index)) - 1;// substring(a,b)b-aまでを返す\n b = Integer.parseInt(string.substring(index + 1)) - 1;// substring(a)aまで以外を返す\n\n swap = fdata[a];\n fdata[a] = fdata[b];\n fdata[b] = swap;\n }\n for (i = 0; i < w; i++) {\n System.out.println(fdata[i]);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n // 標準入力からデータを読み込む準備\n Scanner sc = new Scanner(System.in);\n // あみだくじ貰ったリストに応じてスワップする。\n int w, n, a, b, i;// w(整数),n(整数),a,bはスワップの横棒(i番目)\n int fdata[] = new int[30];\n w = sc.nextInt();\n n = sc.nextInt();\n // 初期データ確保\n for (i = 0; i < w; i++) {\n fdata[i] = i + 1;\n }\n for (i = 0; i < n; i++) {\n // 来るa1,b1に対する処理\n int swap, index;\n String string = sc.next();\n index = string.indexOf(\",\");\n a = Integer.parseInt(string.substring(0, index)) - 1;// substring(a,b)b-aまでを返す\n b = Integer.parseInt(string.substring(index + 1)) - 1;// substring(a)aまで以外を返す\n\n swap = fdata[a];\n fdata[a] = fdata[b];\n fdata[b] = swap;\n }\n for (i = 0; i < w; i++) {\n System.out.println(fdata[i]);\n }\n }",
"main",
"{\n // 標準入力からデータを読み込む準備\n Scanner sc = new Scanner(System.in);\n // あみだくじ貰ったリストに応じてスワップする。\n int w, n, a, b, i;// w(整数),n(整数),a,bはスワップの横棒(i番目)\n int fdata[] = new int[30];\n w = sc.nextInt();\n n = sc.nextInt();\n // 初期データ確保\n for (i = 0; i < w; i++) {\n fdata[i] = i + 1;\n }\n for (i = 0; i < n; i++) {\n // 来るa1,b1に対する処理\n int swap, index;\n String string = sc.next();\n index = string.indexOf(\",\");\n a = Integer.parseInt(string.substring(0, index)) - 1;// substring(a,b)b-aまでを返す\n b = Integer.parseInt(string.substring(index + 1)) - 1;// substring(a)aまで以外を返す\n\n swap = fdata[a];\n fdata[a] = fdata[b];\n fdata[b] = swap;\n }\n for (i = 0; i < w; i++) {\n System.out.println(fdata[i]);\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w",
"w",
"n",
"n",
"a",
"a",
"b",
"b",
"i;",
"i",
"int fdata[] = new int[30];",
"fdata",
"new int[30]",
"30",
"w = sc.nextInt()",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (i = 0; i < w; i++) {\n fdata[i] = i + 1;\n }",
"i = 0;",
"i = 0",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n fdata[i] = i + 1;\n }",
"{\n fdata[i] = i + 1;\n }",
"fdata[i] = i + 1",
"fdata[i]",
"fdata",
"i",
"i + 1",
"i",
"1",
"for (i = 0; i < n; i++) {\n // 来るa1,b1に対する処理\n int swap, index;\n String string = sc.next();\n index = string.indexOf(\",\");\n a = Integer.parseInt(string.substring(0, index)) - 1;// substring(a,b)b-aまでを返す\n b = Integer.parseInt(string.substring(index + 1)) - 1;// substring(a)aまで以外を返す\n\n swap = fdata[a];\n fdata[a] = fdata[b];\n fdata[b] = swap;\n }",
"i = 0;",
"i = 0",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n // 来るa1,b1に対する処理\n int swap, index;\n String string = sc.next();\n index = string.indexOf(\",\");\n a = Integer.parseInt(string.substring(0, index)) - 1;// substring(a,b)b-aまでを返す\n b = Integer.parseInt(string.substring(index + 1)) - 1;// substring(a)aまで以外を返す\n\n swap = fdata[a];\n fdata[a] = fdata[b];\n fdata[b] = swap;\n }",
"{\n // 来るa1,b1に対する処理\n int swap, index;\n String string = sc.next();\n index = string.indexOf(\",\");\n a = Integer.parseInt(string.substring(0, index)) - 1;// substring(a,b)b-aまでを返す\n b = Integer.parseInt(string.substring(index + 1)) - 1;// substring(a)aまで以外を返す\n\n swap = fdata[a];\n fdata[a] = fdata[b];\n fdata[b] = swap;\n }",
"int swap",
"swap",
"index;",
"index",
"String string = sc.next();",
"string",
"sc.next()",
"sc.next",
"sc",
"index = string.indexOf(\",\")",
"index",
"string.indexOf(\",\")",
"string.indexOf",
"string",
"\",\"",
"a = Integer.parseInt(string.substring(0, index)) - 1",
"a",
"Integer.parseInt(string.substring(0, index)) - 1",
"Integer.parseInt(string.substring(0, index))",
"Integer.parseInt",
"Integer",
"string.substring(0, index)",
"string.substring",
"string",
"0",
"index",
"1",
"b = Integer.parseInt(string.substring(index + 1)) - 1",
"b",
"Integer.parseInt(string.substring(index + 1)) - 1",
"Integer.parseInt(string.substring(index + 1))",
"Integer.parseInt",
"Integer",
"string.substring(index + 1)",
"string.substring",
"string",
"index + 1",
"index",
"1",
"1",
"swap = fdata[a]",
"swap",
"fdata[a]",
"fdata",
"a",
"fdata[a] = fdata[b]",
"fdata[a]",
"fdata",
"a",
"fdata[b]",
"fdata",
"b",
"fdata[b] = swap",
"fdata[b]",
"fdata",
"b",
"swap",
"for (i = 0; i < w; i++) {\n System.out.println(fdata[i]);\n }",
"i = 0;",
"i = 0",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n System.out.println(fdata[i]);\n }",
"{\n System.out.println(fdata[i]);\n }",
"System.out.println(fdata[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"fdata[i]",
"fdata",
"i",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n // 標準入力からデータを読み込む準備\n Scanner sc = new Scanner(System.in);\n // あみだくじ貰ったリストに応じてスワップする。\n int w, n, a, b, i;// w(整数),n(整数),a,bはスワップの横棒(i番目)\n int fdata[] = new int[30];\n w = sc.nextInt();\n n = sc.nextInt();\n // 初期データ確保\n for (i = 0; i < w; i++) {\n fdata[i] = i + 1;\n }\n for (i = 0; i < n; i++) {\n // 来るa1,b1に対する処理\n int swap, index;\n String string = sc.next();\n index = string.indexOf(\",\");\n a = Integer.parseInt(string.substring(0, index)) - 1;// substring(a,b)b-aまでを返す\n b = Integer.parseInt(string.substring(index + 1)) - 1;// substring(a)aまで以外を返す\n\n swap = fdata[a];\n fdata[a] = fdata[b];\n fdata[b] = swap;\n }\n for (i = 0; i < w; i++) {\n System.out.println(fdata[i]);\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n // 標準入力からデータを読み込む準備\n Scanner sc = new Scanner(System.in);\n // あみだくじ貰ったリストに応じてスワップする。\n int w, n, a, b, i;// w(整数),n(整数),a,bはスワップの横棒(i番目)\n int fdata[] = new int[30];\n w = sc.nextInt();\n n = sc.nextInt();\n // 初期データ確保\n for (i = 0; i < w; i++) {\n fdata[i] = i + 1;\n }\n for (i = 0; i < n; i++) {\n // 来るa1,b1に対する処理\n int swap, index;\n String string = sc.next();\n index = string.indexOf(\",\");\n a = Integer.parseInt(string.substring(0, index)) - 1;// substring(a,b)b-aまでを返す\n b = Integer.parseInt(string.substring(index + 1)) - 1;// substring(a)aまで以外を返す\n\n swap = fdata[a];\n fdata[a] = fdata[b];\n fdata[b] = swap;\n }\n for (i = 0; i < w; i++) {\n System.out.println(fdata[i]);\n }\n }\n}",
"Main"
] | import java.util.*;
public class Main {
public static void main(String[] args) {
// 標準入力からデータを読み込む準備
Scanner sc = new Scanner(System.in);
// あみだくじ貰ったリストに応じてスワップする。
int w, n, a, b, i;// w(整数),n(整数),a,bはスワップの横棒(i番目)
int fdata[] = new int[30];
w = sc.nextInt();
n = sc.nextInt();
// 初期データ確保
for (i = 0; i < w; i++) {
fdata[i] = i + 1;
}
for (i = 0; i < n; i++) {
// 来るa1,b1に対する処理
int swap, index;
String string = sc.next();
index = string.indexOf(",");
a = Integer.parseInt(string.substring(0, index)) - 1;// substring(a,b)b-aまでを返す
b = Integer.parseInt(string.substring(index + 1)) - 1;// substring(a)aまで以外を返す
swap = fdata[a];
fdata[a] = fdata[b];
fdata[b] = swap;
}
for (i = 0; i < w; i++) {
System.out.println(fdata[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
17,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
41,
13,
0,
13,
20,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
17,
0,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
146,
5
],
[
146,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
16,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
16,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
16,
30
],
[
30,
31
],
[
16,
32
],
[
32,
33
],
[
16,
34
],
[
34,
35
],
[
34,
36
],
[
16,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
43,
44
],
[
43,
45
],
[
38,
46
],
[
46,
47
],
[
47,
48
],
[
38,
49
],
[
50,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
55,
57
],
[
16,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
63,
64
],
[
63,
65
],
[
58,
66
],
[
66,
67
],
[
67,
68
],
[
58,
69
],
[
70,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
70,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
70,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
88,
89
],
[
88,
90
],
[
84,
91
],
[
70,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
98,
99
],
[
98,
100
],
[
94,
101
],
[
70,
102
],
[
102,
103
],
[
102,
104
],
[
70,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
107,
109
],
[
70,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
114,
115
],
[
114,
116
],
[
70,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
117,
121
],
[
16,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
122,
127
],
[
127,
128
],
[
127,
129
],
[
122,
130
],
[
130,
131
],
[
131,
132
],
[
122,
133
],
[
134,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
135,
140
],
[
140,
141
],
[
140,
142
],
[
6,
143
],
[
143,
144
],
[
0,
145
],
[
145,
146
],
[
145,
147
]
] | [
"\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n while (sc.hasNext()) {\n int i = 0;\n int w = sc.nextInt();\n int n = sc.nextInt();\n String rem;\n int[] array;\n array = new int[w];\n\n for (i = 0; i < w; i++) {\n array[i] = i + 1;\n }\n\n for (i = 0; i < n; i++) {\n rem = sc.next();\n String[] swap = rem.split(\",\");\n int a = Integer.parseInt(swap[0]) - 1;\n int b = Integer.parseInt(swap[1]) - 1;\n int temp = 0;\n temp = array[a];\n array[a] = array[b];\n array[b] = temp;\n }\n for (i = 0; i < w; i++) {\n System.out.println(array[i]);\n }\n }\n }\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n while (sc.hasNext()) {\n int i = 0;\n int w = sc.nextInt();\n int n = sc.nextInt();\n String rem;\n int[] array;\n array = new int[w];\n\n for (i = 0; i < w; i++) {\n array[i] = i + 1;\n }\n\n for (i = 0; i < n; i++) {\n rem = sc.next();\n String[] swap = rem.split(\",\");\n int a = Integer.parseInt(swap[0]) - 1;\n int b = Integer.parseInt(swap[1]) - 1;\n int temp = 0;\n temp = array[a];\n array[a] = array[b];\n array[b] = temp;\n }\n for (i = 0; i < w; i++) {\n System.out.println(array[i]);\n }\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n while (sc.hasNext()) {\n int i = 0;\n int w = sc.nextInt();\n int n = sc.nextInt();\n String rem;\n int[] array;\n array = new int[w];\n\n for (i = 0; i < w; i++) {\n array[i] = i + 1;\n }\n\n for (i = 0; i < n; i++) {\n rem = sc.next();\n String[] swap = rem.split(\",\");\n int a = Integer.parseInt(swap[0]) - 1;\n int b = Integer.parseInt(swap[1]) - 1;\n int temp = 0;\n temp = array[a];\n array[a] = array[b];\n array[b] = temp;\n }\n for (i = 0; i < w; i++) {\n System.out.println(array[i]);\n }\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n while (sc.hasNext()) {\n int i = 0;\n int w = sc.nextInt();\n int n = sc.nextInt();\n String rem;\n int[] array;\n array = new int[w];\n\n for (i = 0; i < w; i++) {\n array[i] = i + 1;\n }\n\n for (i = 0; i < n; i++) {\n rem = sc.next();\n String[] swap = rem.split(\",\");\n int a = Integer.parseInt(swap[0]) - 1;\n int b = Integer.parseInt(swap[1]) - 1;\n int temp = 0;\n temp = array[a];\n array[a] = array[b];\n array[b] = temp;\n }\n for (i = 0; i < w; i++) {\n System.out.println(array[i]);\n }\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while (sc.hasNext()) {\n int i = 0;\n int w = sc.nextInt();\n int n = sc.nextInt();\n String rem;\n int[] array;\n array = new int[w];\n\n for (i = 0; i < w; i++) {\n array[i] = i + 1;\n }\n\n for (i = 0; i < n; i++) {\n rem = sc.next();\n String[] swap = rem.split(\",\");\n int a = Integer.parseInt(swap[0]) - 1;\n int b = Integer.parseInt(swap[1]) - 1;\n int temp = 0;\n temp = array[a];\n array[a] = array[b];\n array[b] = temp;\n }\n for (i = 0; i < w; i++) {\n System.out.println(array[i]);\n }\n }",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n int i = 0;\n int w = sc.nextInt();\n int n = sc.nextInt();\n String rem;\n int[] array;\n array = new int[w];\n\n for (i = 0; i < w; i++) {\n array[i] = i + 1;\n }\n\n for (i = 0; i < n; i++) {\n rem = sc.next();\n String[] swap = rem.split(\",\");\n int a = Integer.parseInt(swap[0]) - 1;\n int b = Integer.parseInt(swap[1]) - 1;\n int temp = 0;\n temp = array[a];\n array[a] = array[b];\n array[b] = temp;\n }\n for (i = 0; i < w; i++) {\n System.out.println(array[i]);\n }\n }",
"int i = 0;",
"i",
"0",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String rem;",
"rem",
"int[] array;",
"array",
"array = new int[w]",
"array",
"new int[w]",
"w",
"for (i = 0; i < w; i++) {\n array[i] = i + 1;\n }",
"i = 0;",
"i = 0",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n array[i] = i + 1;\n }",
"{\n array[i] = i + 1;\n }",
"array[i] = i + 1",
"array[i]",
"array",
"i",
"i + 1",
"i",
"1",
"for (i = 0; i < n; i++) {\n rem = sc.next();\n String[] swap = rem.split(\",\");\n int a = Integer.parseInt(swap[0]) - 1;\n int b = Integer.parseInt(swap[1]) - 1;\n int temp = 0;\n temp = array[a];\n array[a] = array[b];\n array[b] = temp;\n }",
"i = 0;",
"i = 0",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n rem = sc.next();\n String[] swap = rem.split(\",\");\n int a = Integer.parseInt(swap[0]) - 1;\n int b = Integer.parseInt(swap[1]) - 1;\n int temp = 0;\n temp = array[a];\n array[a] = array[b];\n array[b] = temp;\n }",
"{\n rem = sc.next();\n String[] swap = rem.split(\",\");\n int a = Integer.parseInt(swap[0]) - 1;\n int b = Integer.parseInt(swap[1]) - 1;\n int temp = 0;\n temp = array[a];\n array[a] = array[b];\n array[b] = temp;\n }",
"rem = sc.next()",
"rem",
"sc.next()",
"sc.next",
"sc",
"String[] swap = rem.split(\",\");",
"swap",
"rem.split(\",\")",
"rem.split",
"rem",
"\",\"",
"int a = Integer.parseInt(swap[0]) - 1;",
"a",
"Integer.parseInt(swap[0]) - 1",
"Integer.parseInt(swap[0])",
"Integer.parseInt",
"Integer",
"swap[0]",
"swap",
"0",
"1",
"int b = Integer.parseInt(swap[1]) - 1;",
"b",
"Integer.parseInt(swap[1]) - 1",
"Integer.parseInt(swap[1])",
"Integer.parseInt",
"Integer",
"swap[1]",
"swap",
"1",
"1",
"int temp = 0;",
"temp",
"0",
"temp = array[a]",
"temp",
"array[a]",
"array",
"a",
"array[a] = array[b]",
"array[a]",
"array",
"a",
"array[b]",
"array",
"b",
"array[b] = temp",
"array[b]",
"array",
"b",
"temp",
"for (i = 0; i < w; i++) {\n System.out.println(array[i]);\n }",
"i = 0;",
"i = 0",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n System.out.println(array[i]);\n }",
"{\n System.out.println(array[i]);\n }",
"System.out.println(array[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"array[i]",
"array",
"i",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n while (sc.hasNext()) {\n int i = 0;\n int w = sc.nextInt();\n int n = sc.nextInt();\n String rem;\n int[] array;\n array = new int[w];\n\n for (i = 0; i < w; i++) {\n array[i] = i + 1;\n }\n\n for (i = 0; i < n; i++) {\n rem = sc.next();\n String[] swap = rem.split(\",\");\n int a = Integer.parseInt(swap[0]) - 1;\n int b = Integer.parseInt(swap[1]) - 1;\n int temp = 0;\n temp = array[a];\n array[a] = array[b];\n array[b] = temp;\n }\n for (i = 0; i < w; i++) {\n System.out.println(array[i]);\n }\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n while (sc.hasNext()) {\n int i = 0;\n int w = sc.nextInt();\n int n = sc.nextInt();\n String rem;\n int[] array;\n array = new int[w];\n\n for (i = 0; i < w; i++) {\n array[i] = i + 1;\n }\n\n for (i = 0; i < n; i++) {\n rem = sc.next();\n String[] swap = rem.split(\",\");\n int a = Integer.parseInt(swap[0]) - 1;\n int b = Integer.parseInt(swap[1]) - 1;\n int temp = 0;\n temp = array[a];\n array[a] = array[b];\n array[b] = temp;\n }\n for (i = 0; i < w; i++) {\n System.out.println(array[i]);\n }\n }\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int i = 0;
int w = sc.nextInt();
int n = sc.nextInt();
String rem;
int[] array;
array = new int[w];
for (i = 0; i < w; i++) {
array[i] = i + 1;
}
for (i = 0; i < n; i++) {
rem = sc.next();
String[] swap = rem.split(",");
int a = Integer.parseInt(swap[0]) - 1;
int b = Integer.parseInt(swap[1]) - 1;
int temp = 0;
temp = array[a];
array[a] = array[b];
array[b] = temp;
}
for (i = 0; i < w; i++) {
System.out.println(array[i]);
}
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
20,
17,
41,
13,
20,
17,
41,
13,
41,
13,
41,
13,
41,
13,
20,
17,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
17,
0,
18,
13,
17,
4,
18,
13,
18,
13,
17,
0,
18,
13,
17,
4,
18,
13,
18,
13,
17,
0,
13,
18,
13,
2,
18,
13,
17,
17,
0,
18,
13,
2,
18,
13,
17,
17,
18,
13,
2,
18,
13,
17,
17,
0,
18,
13,
2,
18,
13,
17,
17,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
16,
18
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
24
],
[
24,
25
],
[
8,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
8,
30
],
[
30,
31
],
[
30,
32
],
[
8,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
8,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
8,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
44,
52
],
[
52,
53
],
[
53,
54
],
[
44,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
61,
63
],
[
8,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
69,
70
],
[
69,
71
],
[
64,
72
],
[
72,
73
],
[
73,
74
],
[
64,
75
],
[
76,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
76,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
76,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
95,
96
],
[
95,
97
],
[
76,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
102,
103
],
[
103,
104
],
[
102,
105
],
[
105,
106
],
[
105,
107
],
[
76,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
112,
116
],
[
76,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
120,
124
],
[
117,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
127,
131
],
[
76,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
135,
139
],
[
132,
140
],
[
8,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
143,
145
],
[
141,
146
],
[
146,
147
],
[
146,
148
],
[
141,
149
],
[
149,
150
],
[
150,
151
],
[
141,
152
],
[
153,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
154,
159
],
[
159,
160
],
[
159,
161
],
[
8,
162
],
[
162,
163
],
[
163,
164
],
[
6,
165
],
[
165,
166
]
] | [
"import java.util.Scanner;\n\nclass Main {\n\tpublic static void main(String args[]){\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint vertical;\n\t\tint cross;\n\t\tint[] num = new int[30];\n\t\tint[] change = new int[2];\n\t\tint i,tmp;\n\t\tString Line;\n\t\tString splitLine[] = new String[2];\n\t\t\n\t\tvertical = scan.nextInt();\n\t\tcross = scan.nextInt();\n\t\t\n\t\tfor(i=0;i<vertical;i++){\n\t\t\tnum[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(i=0;i<cross;i++){\n\t\t\tLine = scan.next();\n\t\t\tsplitLine = Line.split(\",\");\n\t\t\t\n\t\t\tchange[0] = Integer.parseInt(splitLine[0]);\n\t\t\tchange[1] = Integer.parseInt(splitLine[1]);\n\t\t\t\n\t\t\ttmp = num[change[0]-1];\n\t\t\tnum[change[0]-1] = num[change[1]-1];\n\t\t\tnum[change[1]-1] = tmp;\n\t\t}\n\t\t\n\t\tfor(i=0;i<vertical;i++){\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\t\t\n\t\tscan.close();\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n\tpublic static void main(String args[]){\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint vertical;\n\t\tint cross;\n\t\tint[] num = new int[30];\n\t\tint[] change = new int[2];\n\t\tint i,tmp;\n\t\tString Line;\n\t\tString splitLine[] = new String[2];\n\t\t\n\t\tvertical = scan.nextInt();\n\t\tcross = scan.nextInt();\n\t\t\n\t\tfor(i=0;i<vertical;i++){\n\t\t\tnum[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(i=0;i<cross;i++){\n\t\t\tLine = scan.next();\n\t\t\tsplitLine = Line.split(\",\");\n\t\t\t\n\t\t\tchange[0] = Integer.parseInt(splitLine[0]);\n\t\t\tchange[1] = Integer.parseInt(splitLine[1]);\n\t\t\t\n\t\t\ttmp = num[change[0]-1];\n\t\t\tnum[change[0]-1] = num[change[1]-1];\n\t\t\tnum[change[1]-1] = tmp;\n\t\t}\n\t\t\n\t\tfor(i=0;i<vertical;i++){\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\t\t\n\t\tscan.close();\n\t}\n}",
"Main",
"public static void main(String args[]){\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint vertical;\n\t\tint cross;\n\t\tint[] num = new int[30];\n\t\tint[] change = new int[2];\n\t\tint i,tmp;\n\t\tString Line;\n\t\tString splitLine[] = new String[2];\n\t\t\n\t\tvertical = scan.nextInt();\n\t\tcross = scan.nextInt();\n\t\t\n\t\tfor(i=0;i<vertical;i++){\n\t\t\tnum[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(i=0;i<cross;i++){\n\t\t\tLine = scan.next();\n\t\t\tsplitLine = Line.split(\",\");\n\t\t\t\n\t\t\tchange[0] = Integer.parseInt(splitLine[0]);\n\t\t\tchange[1] = Integer.parseInt(splitLine[1]);\n\t\t\t\n\t\t\ttmp = num[change[0]-1];\n\t\t\tnum[change[0]-1] = num[change[1]-1];\n\t\t\tnum[change[1]-1] = tmp;\n\t\t}\n\t\t\n\t\tfor(i=0;i<vertical;i++){\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\t\t\n\t\tscan.close();\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint vertical;\n\t\tint cross;\n\t\tint[] num = new int[30];\n\t\tint[] change = new int[2];\n\t\tint i,tmp;\n\t\tString Line;\n\t\tString splitLine[] = new String[2];\n\t\t\n\t\tvertical = scan.nextInt();\n\t\tcross = scan.nextInt();\n\t\t\n\t\tfor(i=0;i<vertical;i++){\n\t\t\tnum[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(i=0;i<cross;i++){\n\t\t\tLine = scan.next();\n\t\t\tsplitLine = Line.split(\",\");\n\t\t\t\n\t\t\tchange[0] = Integer.parseInt(splitLine[0]);\n\t\t\tchange[1] = Integer.parseInt(splitLine[1]);\n\t\t\t\n\t\t\ttmp = num[change[0]-1];\n\t\t\tnum[change[0]-1] = num[change[1]-1];\n\t\t\tnum[change[1]-1] = tmp;\n\t\t}\n\t\t\n\t\tfor(i=0;i<vertical;i++){\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\t\t\n\t\tscan.close();\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int vertical;",
"vertical",
"int cross;",
"cross",
"int[] num = new int[30];",
"num",
"new int[30]",
"30",
"int[] change = new int[2];",
"change",
"new int[2]",
"2",
"int i",
"i",
"tmp;",
"tmp",
"String Line;",
"Line",
"String splitLine[] = new String[2];",
"splitLine",
"new String[2]",
"2",
"vertical = scan.nextInt()",
"vertical",
"scan.nextInt()",
"scan.nextInt",
"scan",
"cross = scan.nextInt()",
"cross",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(i=0;i<vertical;i++){\n\t\t\tnum[i] = i+1;\n\t\t}",
"i=0;",
"i=0",
"i",
"0",
"i<vertical",
"i",
"vertical",
"i++",
"i++",
"i",
"{\n\t\t\tnum[i] = i+1;\n\t\t}",
"{\n\t\t\tnum[i] = i+1;\n\t\t}",
"num[i] = i+1",
"num[i]",
"num",
"i",
"i+1",
"i",
"1",
"for(i=0;i<cross;i++){\n\t\t\tLine = scan.next();\n\t\t\tsplitLine = Line.split(\",\");\n\t\t\t\n\t\t\tchange[0] = Integer.parseInt(splitLine[0]);\n\t\t\tchange[1] = Integer.parseInt(splitLine[1]);\n\t\t\t\n\t\t\ttmp = num[change[0]-1];\n\t\t\tnum[change[0]-1] = num[change[1]-1];\n\t\t\tnum[change[1]-1] = tmp;\n\t\t}",
"i=0;",
"i=0",
"i",
"0",
"i<cross",
"i",
"cross",
"i++",
"i++",
"i",
"{\n\t\t\tLine = scan.next();\n\t\t\tsplitLine = Line.split(\",\");\n\t\t\t\n\t\t\tchange[0] = Integer.parseInt(splitLine[0]);\n\t\t\tchange[1] = Integer.parseInt(splitLine[1]);\n\t\t\t\n\t\t\ttmp = num[change[0]-1];\n\t\t\tnum[change[0]-1] = num[change[1]-1];\n\t\t\tnum[change[1]-1] = tmp;\n\t\t}",
"{\n\t\t\tLine = scan.next();\n\t\t\tsplitLine = Line.split(\",\");\n\t\t\t\n\t\t\tchange[0] = Integer.parseInt(splitLine[0]);\n\t\t\tchange[1] = Integer.parseInt(splitLine[1]);\n\t\t\t\n\t\t\ttmp = num[change[0]-1];\n\t\t\tnum[change[0]-1] = num[change[1]-1];\n\t\t\tnum[change[1]-1] = tmp;\n\t\t}",
"Line = scan.next()",
"Line",
"scan.next()",
"scan.next",
"scan",
"splitLine = Line.split(\",\")",
"splitLine",
"Line.split(\",\")",
"Line.split",
"Line",
"\",\"",
"change[0] = Integer.parseInt(splitLine[0])",
"change[0]",
"change",
"0",
"Integer.parseInt(splitLine[0])",
"Integer.parseInt",
"Integer",
"splitLine[0]",
"splitLine",
"0",
"change[1] = Integer.parseInt(splitLine[1])",
"change[1]",
"change",
"1",
"Integer.parseInt(splitLine[1])",
"Integer.parseInt",
"Integer",
"splitLine[1]",
"splitLine",
"1",
"tmp = num[change[0]-1]",
"tmp",
"num[change[0]-1]",
"num",
"change[0]-1",
"change[0]",
"change",
"0",
"1",
"num[change[0]-1] = num[change[1]-1]",
"num[change[0]-1]",
"num",
"change[0]-1",
"change[0]",
"change",
"0",
"1",
"num[change[1]-1]",
"num",
"change[1]-1",
"change[1]",
"change",
"1",
"1",
"num[change[1]-1] = tmp",
"num[change[1]-1]",
"num",
"change[1]-1",
"change[1]",
"change",
"1",
"1",
"tmp",
"for(i=0;i<vertical;i++){\n\t\t\tSystem.out.println(num[i]);\n\t\t}",
"i=0;",
"i=0",
"i",
"0",
"i<vertical",
"i",
"vertical",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(num[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(num[i]);\n\t\t}",
"System.out.println(num[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"num[i]",
"num",
"i",
"scan.close()",
"scan.close",
"scan",
"String args[]",
"args"
] | import java.util.Scanner;
class Main {
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
int vertical;
int cross;
int[] num = new int[30];
int[] change = new int[2];
int i,tmp;
String Line;
String splitLine[] = new String[2];
vertical = scan.nextInt();
cross = scan.nextInt();
for(i=0;i<vertical;i++){
num[i] = i+1;
}
for(i=0;i<cross;i++){
Line = scan.next();
splitLine = Line.split(",");
change[0] = Integer.parseInt(splitLine[0]);
change[1] = Integer.parseInt(splitLine[1]);
tmp = num[change[0]-1];
num[change[0]-1] = num[change[1]-1];
num[change[1]-1] = tmp;
}
for(i=0;i<vertical;i++){
System.out.println(num[i]);
}
scan.close();
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
2,
13,
17,
41,
13,
41,
13,
41,
13,
41,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
2,
4,
18,
13,
18,
4,
18,
13,
17,
17,
17,
0,
13,
2,
4,
18,
13,
18,
4,
18,
13,
17,
17,
17,
0,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
28,
13,
13,
30,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
127,
5
],
[
127,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
42,
44
],
[
8,
45
],
[
45,
46
],
[
8,
47
],
[
47,
48
],
[
8,
49
],
[
49,
50
],
[
8,
51
],
[
51,
52
],
[
8,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
58,
59
],
[
58,
60
],
[
53,
61
],
[
61,
62
],
[
62,
63
],
[
53,
64
],
[
65,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
65,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
77,
82
],
[
73,
83
],
[
65,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
90,
95
],
[
86,
96
],
[
65,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
99,
101
],
[
65,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
106,
107
],
[
106,
108
],
[
65,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
8,
114
],
[
114,
115
],
[
114,
116
],
[
114,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
118,
123
],
[
6,
124
],
[
124,
125
],
[
0,
126
],
[
126,
127
],
[
126,
128
]
] | [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt(), n = sc.nextInt();\n int[] num = new int[w];\n for (int i=0; i<w; i++) num[i] = i+1;\n\n int a, b, tmp;\n String s;\n for (int i=0; i<n; i++) {\n s = sc.next();\n a = Integer.parseInt(s.split(\",\")[0]) - 1;\n b = Integer.parseInt(s.split(\",\")[1]) - 1;\n tmp = num[a];\n num[a] = num[b];\n num[b] = tmp;\n }\n\n for (int i : num) System.out.println(i);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt(), n = sc.nextInt();\n int[] num = new int[w];\n for (int i=0; i<w; i++) num[i] = i+1;\n\n int a, b, tmp;\n String s;\n for (int i=0; i<n; i++) {\n s = sc.next();\n a = Integer.parseInt(s.split(\",\")[0]) - 1;\n b = Integer.parseInt(s.split(\",\")[1]) - 1;\n tmp = num[a];\n num[a] = num[b];\n num[b] = tmp;\n }\n\n for (int i : num) System.out.println(i);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt(), n = sc.nextInt();\n int[] num = new int[w];\n for (int i=0; i<w; i++) num[i] = i+1;\n\n int a, b, tmp;\n String s;\n for (int i=0; i<n; i++) {\n s = sc.next();\n a = Integer.parseInt(s.split(\",\")[0]) - 1;\n b = Integer.parseInt(s.split(\",\")[1]) - 1;\n tmp = num[a];\n num[a] = num[b];\n num[b] = tmp;\n }\n\n for (int i : num) System.out.println(i);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt(), n = sc.nextInt();\n int[] num = new int[w];\n for (int i=0; i<w; i++) num[i] = i+1;\n\n int a, b, tmp;\n String s;\n for (int i=0; i<n; i++) {\n s = sc.next();\n a = Integer.parseInt(s.split(\",\")[0]) - 1;\n b = Integer.parseInt(s.split(\",\")[1]) - 1;\n tmp = num[a];\n num[a] = num[b];\n num[b] = tmp;\n }\n\n for (int i : num) System.out.println(i);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w = sc.nextInt()",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] num = new int[w];",
"num",
"new int[w]",
"w",
"for (int i=0; i<w; i++) num[i] = i+1;",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"num[i] = i+1;",
"num[i] = i+1",
"num[i]",
"num",
"i",
"i+1",
"i",
"1",
"int a",
"a",
"b",
"b",
"tmp;",
"tmp",
"String s;",
"s",
"for (int i=0; i<n; i++) {\n s = sc.next();\n a = Integer.parseInt(s.split(\",\")[0]) - 1;\n b = Integer.parseInt(s.split(\",\")[1]) - 1;\n tmp = num[a];\n num[a] = num[b];\n num[b] = tmp;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n s = sc.next();\n a = Integer.parseInt(s.split(\",\")[0]) - 1;\n b = Integer.parseInt(s.split(\",\")[1]) - 1;\n tmp = num[a];\n num[a] = num[b];\n num[b] = tmp;\n }",
"{\n s = sc.next();\n a = Integer.parseInt(s.split(\",\")[0]) - 1;\n b = Integer.parseInt(s.split(\",\")[1]) - 1;\n tmp = num[a];\n num[a] = num[b];\n num[b] = tmp;\n }",
"s = sc.next()",
"s",
"sc.next()",
"sc.next",
"sc",
"a = Integer.parseInt(s.split(\",\")[0]) - 1",
"a",
"Integer.parseInt(s.split(\",\")[0]) - 1",
"Integer.parseInt(s.split(\",\")[0])",
"Integer.parseInt",
"Integer",
"s.split(\",\")[0]",
"s.split(\",\")",
"s.split",
"s",
"\",\"",
"0",
"1",
"b = Integer.parseInt(s.split(\",\")[1]) - 1",
"b",
"Integer.parseInt(s.split(\",\")[1]) - 1",
"Integer.parseInt(s.split(\",\")[1])",
"Integer.parseInt",
"Integer",
"s.split(\",\")[1]",
"s.split(\",\")",
"s.split",
"s",
"\",\"",
"1",
"1",
"tmp = num[a]",
"tmp",
"num[a]",
"num",
"a",
"num[a] = num[b]",
"num[a]",
"num",
"a",
"num[b]",
"num",
"b",
"num[b] = tmp",
"num[b]",
"num",
"b",
"tmp",
"for (int i : num) System.out.println(i);",
"int i",
"num",
"System.out.println(i);",
"System.out.println(i)",
"System.out.println",
"System.out",
"System",
"System.out",
"i",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt(), n = sc.nextInt();\n int[] num = new int[w];\n for (int i=0; i<w; i++) num[i] = i+1;\n\n int a, b, tmp;\n String s;\n for (int i=0; i<n; i++) {\n s = sc.next();\n a = Integer.parseInt(s.split(\",\")[0]) - 1;\n b = Integer.parseInt(s.split(\",\")[1]) - 1;\n tmp = num[a];\n num[a] = num[b];\n num[b] = tmp;\n }\n\n for (int i : num) System.out.println(i);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt(), n = sc.nextInt();\n int[] num = new int[w];\n for (int i=0; i<w; i++) num[i] = i+1;\n\n int a, b, tmp;\n String s;\n for (int i=0; i<n; i++) {\n s = sc.next();\n a = Integer.parseInt(s.split(\",\")[0]) - 1;\n b = Integer.parseInt(s.split(\",\")[1]) - 1;\n tmp = num[a];\n num[a] = num[b];\n num[b] = tmp;\n }\n\n for (int i : num) System.out.println(i);\n }\n}",
"Main"
] | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int w = sc.nextInt(), n = sc.nextInt();
int[] num = new int[w];
for (int i=0; i<w; i++) num[i] = i+1;
int a, b, tmp;
String s;
for (int i=0; i<n; i++) {
s = sc.next();
a = Integer.parseInt(s.split(",")[0]) - 1;
b = Integer.parseInt(s.split(",")[1]) - 1;
tmp = num[a];
num[a] = num[b];
num[b] = tmp;
}
for (int i : num) System.out.println(i);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
41,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
13,
4,
18,
13,
18,
4,
18,
13,
17,
17,
0,
13,
4,
18,
13,
18,
4,
18,
13,
17,
17,
0,
13,
4,
13,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
13,
29,
13,
23,
13,
23,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
8,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
37,
39
],
[
30,
40
],
[
40,
41
],
[
41,
42
],
[
30,
43
],
[
44,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
49,
51
],
[
8,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
52,
60
],
[
60,
61
],
[
61,
62
],
[
52,
63
],
[
64,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
64,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
75,
80
],
[
64,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
86,
91
],
[
64,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
94,
96
],
[
94,
97
],
[
94,
98
],
[
8,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
99,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
106,
108
],
[
99,
109
],
[
109,
110
],
[
110,
111
],
[
99,
112
],
[
113,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
114,
119
],
[
119,
120
],
[
119,
121
],
[
8,
122
],
[
122,
123
],
[
123,
124
],
[
6,
125
],
[
125,
126
],
[
4,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
134,
136
],
[
129,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
140,
141
],
[
140,
142
],
[
137,
143
],
[
143,
144
],
[
143,
145
],
[
145,
146
],
[
145,
147
],
[
129,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
151,
153
],
[
148,
154
],
[
129,
155
],
[
155,
156
],
[
127,
157
],
[
157,
158
],
[
127,
159
],
[
159,
160
],
[
127,
161
],
[
161,
162
]
] | [
"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 size = in.nextInt();\n\t\tint n = in.nextInt();\n\t\tint[] lines = new int[size];\n\t\tint a, b;\n\t\tfor (int i = 0; i < lines.length; i++) {\n\t\t\tlines[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString input = in.next();\n\t\t\ta = Integer.parseInt(input.split(\",\")[0]);\n\t\t\tb = Integer.parseInt(input.split(\",\")[1]);\n\t\t\tlines = swap(a, b, lines);\n\t\t}\n\t\tfor (int i = 0; i < lines.length; i++) {\n\t\t\tSystem.out.println(lines[i]);\n\t\t}\n\t\tin.close();\n\t}\n\n\tpublic static int[] swap(int a, int b, int[] lines) {\n\t\tint temp = lines[a - 1];\n\t\tlines[a - 1] = lines[b - 1];\n\t\tlines[b - 1] = temp;\n\t\treturn lines;\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint size = in.nextInt();\n\t\tint n = in.nextInt();\n\t\tint[] lines = new int[size];\n\t\tint a, b;\n\t\tfor (int i = 0; i < lines.length; i++) {\n\t\t\tlines[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString input = in.next();\n\t\t\ta = Integer.parseInt(input.split(\",\")[0]);\n\t\t\tb = Integer.parseInt(input.split(\",\")[1]);\n\t\t\tlines = swap(a, b, lines);\n\t\t}\n\t\tfor (int i = 0; i < lines.length; i++) {\n\t\t\tSystem.out.println(lines[i]);\n\t\t}\n\t\tin.close();\n\t}\n\n\tpublic static int[] swap(int a, int b, int[] lines) {\n\t\tint temp = lines[a - 1];\n\t\tlines[a - 1] = lines[b - 1];\n\t\tlines[b - 1] = temp;\n\t\treturn lines;\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint size = in.nextInt();\n\t\tint n = in.nextInt();\n\t\tint[] lines = new int[size];\n\t\tint a, b;\n\t\tfor (int i = 0; i < lines.length; i++) {\n\t\t\tlines[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString input = in.next();\n\t\t\ta = Integer.parseInt(input.split(\",\")[0]);\n\t\t\tb = Integer.parseInt(input.split(\",\")[1]);\n\t\t\tlines = swap(a, b, lines);\n\t\t}\n\t\tfor (int i = 0; i < lines.length; i++) {\n\t\t\tSystem.out.println(lines[i]);\n\t\t}\n\t\tin.close();\n\t}",
"main",
"{\n\t\tScanner in = new Scanner(System.in);\n\t\tint size = in.nextInt();\n\t\tint n = in.nextInt();\n\t\tint[] lines = new int[size];\n\t\tint a, b;\n\t\tfor (int i = 0; i < lines.length; i++) {\n\t\t\tlines[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString input = in.next();\n\t\t\ta = Integer.parseInt(input.split(\",\")[0]);\n\t\t\tb = Integer.parseInt(input.split(\",\")[1]);\n\t\t\tlines = swap(a, b, lines);\n\t\t}\n\t\tfor (int i = 0; i < lines.length; i++) {\n\t\t\tSystem.out.println(lines[i]);\n\t\t}\n\t\tin.close();\n\t}",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"int size = in.nextInt();",
"size",
"in.nextInt()",
"in.nextInt",
"in",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int[] lines = new int[size];",
"lines",
"new int[size]",
"size",
"int a",
"a",
"b;",
"b",
"for (int i = 0; i < lines.length; i++) {\n\t\t\tlines[i] = i + 1;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < lines.length",
"i",
"lines.length",
"lines",
"lines.length",
"i++",
"i++",
"i",
"{\n\t\t\tlines[i] = i + 1;\n\t\t}",
"{\n\t\t\tlines[i] = i + 1;\n\t\t}",
"lines[i] = i + 1",
"lines[i]",
"lines",
"i",
"i + 1",
"i",
"1",
"for (int i = 0; i < n; i++) {\n\t\t\tString input = in.next();\n\t\t\ta = Integer.parseInt(input.split(\",\")[0]);\n\t\t\tb = Integer.parseInt(input.split(\",\")[1]);\n\t\t\tlines = swap(a, b, lines);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString input = in.next();\n\t\t\ta = Integer.parseInt(input.split(\",\")[0]);\n\t\t\tb = Integer.parseInt(input.split(\",\")[1]);\n\t\t\tlines = swap(a, b, lines);\n\t\t}",
"{\n\t\t\tString input = in.next();\n\t\t\ta = Integer.parseInt(input.split(\",\")[0]);\n\t\t\tb = Integer.parseInt(input.split(\",\")[1]);\n\t\t\tlines = swap(a, b, lines);\n\t\t}",
"String input = in.next();",
"input",
"in.next()",
"in.next",
"in",
"a = Integer.parseInt(input.split(\",\")[0])",
"a",
"Integer.parseInt(input.split(\",\")[0])",
"Integer.parseInt",
"Integer",
"input.split(\",\")[0]",
"input.split(\",\")",
"input.split",
"input",
"\",\"",
"0",
"b = Integer.parseInt(input.split(\",\")[1])",
"b",
"Integer.parseInt(input.split(\",\")[1])",
"Integer.parseInt",
"Integer",
"input.split(\",\")[1]",
"input.split(\",\")",
"input.split",
"input",
"\",\"",
"1",
"lines = swap(a, b, lines)",
"lines",
"swap(a, b, lines)",
"swap",
"a",
"b",
"lines",
"for (int i = 0; i < lines.length; i++) {\n\t\t\tSystem.out.println(lines[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < lines.length",
"i",
"lines.length",
"lines",
"lines.length",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(lines[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(lines[i]);\n\t\t}",
"System.out.println(lines[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"lines[i]",
"lines",
"i",
"in.close()",
"in.close",
"in",
"String[] args",
"args",
"public static int[] swap(int a, int b, int[] lines) {\n\t\tint temp = lines[a - 1];\n\t\tlines[a - 1] = lines[b - 1];\n\t\tlines[b - 1] = temp;\n\t\treturn lines;\n\t}",
"swap",
"{\n\t\tint temp = lines[a - 1];\n\t\tlines[a - 1] = lines[b - 1];\n\t\tlines[b - 1] = temp;\n\t\treturn lines;\n\t}",
"int temp = lines[a - 1];",
"temp",
"lines[a - 1]",
"lines",
"a - 1",
"a",
"1",
"lines[a - 1] = lines[b - 1]",
"lines[a - 1]",
"lines",
"a - 1",
"a",
"1",
"lines[b - 1]",
"lines",
"b - 1",
"b",
"1",
"lines[b - 1] = temp",
"lines[b - 1]",
"lines",
"b - 1",
"b",
"1",
"temp",
"return lines;",
"lines",
"int a",
"a",
"int b",
"b",
"int[] lines",
"lines"
] | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int size = in.nextInt();
int n = in.nextInt();
int[] lines = new int[size];
int a, b;
for (int i = 0; i < lines.length; i++) {
lines[i] = i + 1;
}
for (int i = 0; i < n; i++) {
String input = in.next();
a = Integer.parseInt(input.split(",")[0]);
b = Integer.parseInt(input.split(",")[1]);
lines = swap(a, b, lines);
}
for (int i = 0; i < lines.length; i++) {
System.out.println(lines[i]);
}
in.close();
}
public static int[] swap(int a, int b, int[] lines) {
int temp = lines[a - 1];
lines[a - 1] = lines[b - 1];
lines[b - 1] = temp;
return lines;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
0,
13,
4,
18,
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,
2,
13,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
41,
13,
0,
13,
20,
17,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
2,
17,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
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
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
8,
30
],
[
30,
31
],
[
30,
32
],
[
8,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
34,
42
],
[
42,
43
],
[
43,
44
],
[
34,
45
],
[
46,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
51,
53
],
[
8,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
59,
60
],
[
59,
61
],
[
54,
62
],
[
62,
63
],
[
63,
64
],
[
54,
65
],
[
66,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
69,
70
],
[
66,
71
],
[
71,
72
],
[
71,
73
],
[
66,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
66,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
66,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
92,
93
],
[
92,
94
],
[
88,
95
],
[
66,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
102,
103
],
[
102,
104
],
[
98,
105
],
[
66,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
108,
110
],
[
66,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
111,
115
],
[
115,
116
],
[
115,
117
],
[
66,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
118,
122
],
[
8,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
123,
128
],
[
128,
129
],
[
128,
130
],
[
123,
131
],
[
131,
132
],
[
132,
133
],
[
123,
134
],
[
135,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
136,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
143,
145
],
[
8,
146
],
[
146,
147
],
[
147,
148
],
[
6,
149
],
[
149,
150
],
[
0,
151
],
[
151,
152
],
[
151,
153
]
] | [
"import java.util.*;\n\npublic class Main{\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint[] mem;\n\t\tint n,time,i;\n\t\t\n\t\tn = sc.nextInt();\n\t\ttime = sc.nextInt();\n\t\tmem = new int[n];\n\t\t\n\t\tfor (i=0 ; i<n ; i++) {\n\t\t\tmem[i] = i+1;\n\t\t}\n\t\t\n\t\tfor (i=0 ; i<time ; i++) {\n\t\t\tString reader;\n\t\t\tString[] swap;\n\t\t\tswap = new String[2];\n\t\t\treader = sc.next();\n\t\t\tswap = reader.split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(swap[0])-1;\n\t\t\tint b = Integer.parseInt(swap[1])-1;\n\t\t\t\n\t\t\tint m = mem[a];\n\t\t\tmem[a] = mem[b];\n\t\t\tmem[b] = m;\n\t\t}\n\t\t\n\t\tfor (i=0 ; i<n ; i++) {\n\t\t\tSystem.out.println(\"\"+mem[i]);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint[] mem;\n\t\tint n,time,i;\n\t\t\n\t\tn = sc.nextInt();\n\t\ttime = sc.nextInt();\n\t\tmem = new int[n];\n\t\t\n\t\tfor (i=0 ; i<n ; i++) {\n\t\t\tmem[i] = i+1;\n\t\t}\n\t\t\n\t\tfor (i=0 ; i<time ; i++) {\n\t\t\tString reader;\n\t\t\tString[] swap;\n\t\t\tswap = new String[2];\n\t\t\treader = sc.next();\n\t\t\tswap = reader.split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(swap[0])-1;\n\t\t\tint b = Integer.parseInt(swap[1])-1;\n\t\t\t\n\t\t\tint m = mem[a];\n\t\t\tmem[a] = mem[b];\n\t\t\tmem[b] = m;\n\t\t}\n\t\t\n\t\tfor (i=0 ; i<n ; i++) {\n\t\t\tSystem.out.println(\"\"+mem[i]);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint[] mem;\n\t\tint n,time,i;\n\t\t\n\t\tn = sc.nextInt();\n\t\ttime = sc.nextInt();\n\t\tmem = new int[n];\n\t\t\n\t\tfor (i=0 ; i<n ; i++) {\n\t\t\tmem[i] = i+1;\n\t\t}\n\t\t\n\t\tfor (i=0 ; i<time ; i++) {\n\t\t\tString reader;\n\t\t\tString[] swap;\n\t\t\tswap = new String[2];\n\t\t\treader = sc.next();\n\t\t\tswap = reader.split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(swap[0])-1;\n\t\t\tint b = Integer.parseInt(swap[1])-1;\n\t\t\t\n\t\t\tint m = mem[a];\n\t\t\tmem[a] = mem[b];\n\t\t\tmem[b] = m;\n\t\t}\n\t\t\n\t\tfor (i=0 ; i<n ; i++) {\n\t\t\tSystem.out.println(\"\"+mem[i]);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}",
"main",
"{\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint[] mem;\n\t\tint n,time,i;\n\t\t\n\t\tn = sc.nextInt();\n\t\ttime = sc.nextInt();\n\t\tmem = new int[n];\n\t\t\n\t\tfor (i=0 ; i<n ; i++) {\n\t\t\tmem[i] = i+1;\n\t\t}\n\t\t\n\t\tfor (i=0 ; i<time ; i++) {\n\t\t\tString reader;\n\t\t\tString[] swap;\n\t\t\tswap = new String[2];\n\t\t\treader = sc.next();\n\t\t\tswap = reader.split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(swap[0])-1;\n\t\t\tint b = Integer.parseInt(swap[1])-1;\n\t\t\t\n\t\t\tint m = mem[a];\n\t\t\tmem[a] = mem[b];\n\t\t\tmem[b] = m;\n\t\t}\n\t\t\n\t\tfor (i=0 ; i<n ; i++) {\n\t\t\tSystem.out.println(\"\"+mem[i]);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int[] mem;",
"mem",
"int n",
"n",
"time",
"time",
"i;",
"i",
"n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"time = sc.nextInt()",
"time",
"sc.nextInt()",
"sc.nextInt",
"sc",
"mem = new int[n]",
"mem",
"new int[n]",
"n",
"for (i=0 ; i<n ; i++) {\n\t\t\tmem[i] = i+1;\n\t\t}",
"i=0 ;",
"i=0",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tmem[i] = i+1;\n\t\t}",
"{\n\t\t\tmem[i] = i+1;\n\t\t}",
"mem[i] = i+1",
"mem[i]",
"mem",
"i",
"i+1",
"i",
"1",
"for (i=0 ; i<time ; i++) {\n\t\t\tString reader;\n\t\t\tString[] swap;\n\t\t\tswap = new String[2];\n\t\t\treader = sc.next();\n\t\t\tswap = reader.split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(swap[0])-1;\n\t\t\tint b = Integer.parseInt(swap[1])-1;\n\t\t\t\n\t\t\tint m = mem[a];\n\t\t\tmem[a] = mem[b];\n\t\t\tmem[b] = m;\n\t\t}",
"i=0 ;",
"i=0",
"i",
"0",
"i<time",
"i",
"time",
"i++",
"i++",
"i",
"{\n\t\t\tString reader;\n\t\t\tString[] swap;\n\t\t\tswap = new String[2];\n\t\t\treader = sc.next();\n\t\t\tswap = reader.split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(swap[0])-1;\n\t\t\tint b = Integer.parseInt(swap[1])-1;\n\t\t\t\n\t\t\tint m = mem[a];\n\t\t\tmem[a] = mem[b];\n\t\t\tmem[b] = m;\n\t\t}",
"{\n\t\t\tString reader;\n\t\t\tString[] swap;\n\t\t\tswap = new String[2];\n\t\t\treader = sc.next();\n\t\t\tswap = reader.split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(swap[0])-1;\n\t\t\tint b = Integer.parseInt(swap[1])-1;\n\t\t\t\n\t\t\tint m = mem[a];\n\t\t\tmem[a] = mem[b];\n\t\t\tmem[b] = m;\n\t\t}",
"String reader;",
"reader",
"String[] swap;",
"swap",
"swap = new String[2]",
"swap",
"new String[2]",
"2",
"reader = sc.next()",
"reader",
"sc.next()",
"sc.next",
"sc",
"swap = reader.split(\",\")",
"swap",
"reader.split(\",\")",
"reader.split",
"reader",
"\",\"",
"int a = Integer.parseInt(swap[0])-1;",
"a",
"Integer.parseInt(swap[0])-1",
"Integer.parseInt(swap[0])",
"Integer.parseInt",
"Integer",
"swap[0]",
"swap",
"0",
"1",
"int b = Integer.parseInt(swap[1])-1;",
"b",
"Integer.parseInt(swap[1])-1",
"Integer.parseInt(swap[1])",
"Integer.parseInt",
"Integer",
"swap[1]",
"swap",
"1",
"1",
"int m = mem[a];",
"m",
"mem[a]",
"mem",
"a",
"mem[a] = mem[b]",
"mem[a]",
"mem",
"a",
"mem[b]",
"mem",
"b",
"mem[b] = m",
"mem[b]",
"mem",
"b",
"m",
"for (i=0 ; i<n ; i++) {\n\t\t\tSystem.out.println(\"\"+mem[i]);\n\t\t}",
"i=0 ;",
"i=0",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(\"\"+mem[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(\"\"+mem[i]);\n\t\t}",
"System.out.println(\"\"+mem[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"\"\"+mem[i]",
"\"\"",
"mem[i]",
"mem",
"i",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint[] mem;\n\t\tint n,time,i;\n\t\t\n\t\tn = sc.nextInt();\n\t\ttime = sc.nextInt();\n\t\tmem = new int[n];\n\t\t\n\t\tfor (i=0 ; i<n ; i++) {\n\t\t\tmem[i] = i+1;\n\t\t}\n\t\t\n\t\tfor (i=0 ; i<time ; i++) {\n\t\t\tString reader;\n\t\t\tString[] swap;\n\t\t\tswap = new String[2];\n\t\t\treader = sc.next();\n\t\t\tswap = reader.split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(swap[0])-1;\n\t\t\tint b = Integer.parseInt(swap[1])-1;\n\t\t\t\n\t\t\tint m = mem[a];\n\t\t\tmem[a] = mem[b];\n\t\t\tmem[b] = m;\n\t\t}\n\t\t\n\t\tfor (i=0 ; i<n ; i++) {\n\t\t\tSystem.out.println(\"\"+mem[i]);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint[] mem;\n\t\tint n,time,i;\n\t\t\n\t\tn = sc.nextInt();\n\t\ttime = sc.nextInt();\n\t\tmem = new int[n];\n\t\t\n\t\tfor (i=0 ; i<n ; i++) {\n\t\t\tmem[i] = i+1;\n\t\t}\n\t\t\n\t\tfor (i=0 ; i<time ; i++) {\n\t\t\tString reader;\n\t\t\tString[] swap;\n\t\t\tswap = new String[2];\n\t\t\treader = sc.next();\n\t\t\tswap = reader.split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(swap[0])-1;\n\t\t\tint b = Integer.parseInt(swap[1])-1;\n\t\t\t\n\t\t\tint m = mem[a];\n\t\t\tmem[a] = mem[b];\n\t\t\tmem[b] = m;\n\t\t}\n\t\t\n\t\tfor (i=0 ; i<n ; i++) {\n\t\t\tSystem.out.println(\"\"+mem[i]);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}\n}",
"Main"
] | import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int[] mem;
int n,time,i;
n = sc.nextInt();
time = sc.nextInt();
mem = new int[n];
for (i=0 ; i<n ; i++) {
mem[i] = i+1;
}
for (i=0 ; i<time ; i++) {
String reader;
String[] swap;
swap = new String[2];
reader = sc.next();
swap = reader.split(",");
int a = Integer.parseInt(swap[0])-1;
int b = Integer.parseInt(swap[1])-1;
int m = mem[a];
mem[a] = mem[b];
mem[b] = m;
}
for (i=0 ; i<n ; i++) {
System.out.println(""+mem[i]);
}
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
4,
18,
13,
41,
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,
2,
13,
17,
2,
13,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
18,
13,
4,
18,
13,
18,
13,
17,
0,
18,
13,
4,
18,
13,
18,
13,
17,
18,
13,
4,
18,
13,
18,
13,
17,
0,
18,
13,
4,
18,
13,
18,
13,
17,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
2,
13,
17,
4,
18,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
142,
5
],
[
142,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
8,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
8,
24
],
[
24,
25
],
[
24,
26
],
[
27,
28
],
[
27,
29
],
[
8,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
30,
38
],
[
38,
39
],
[
39,
40
],
[
30,
41
],
[
42,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
46,
48
],
[
43,
49
],
[
49,
50
],
[
49,
51
],
[
8,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
52,
60
],
[
60,
61
],
[
61,
62
],
[
52,
63
],
[
64,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
64,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
64,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
83,
84
],
[
83,
85
],
[
64,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
92,
93
],
[
92,
94
],
[
86,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
100,
101
],
[
100,
102
],
[
64,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
107,
108
],
[
106,
109
],
[
109,
110
],
[
109,
111
],
[
103,
112
],
[
8,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
113,
118
],
[
118,
119
],
[
118,
120
],
[
113,
121
],
[
121,
122
],
[
122,
123
],
[
113,
124
],
[
125,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
126,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
133,
135
],
[
8,
136
],
[
136,
137
],
[
137,
138
],
[
6,
139
],
[
139,
140
],
[
0,
141
],
[
141,
142
],
[
141,
143
]
] | [
"\nimport java.util.Scanner;\n\npublic class Main{\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint i;\n\t\tint w = scanner.nextInt();\n\t\tint n = scanner.nextInt();\n\t\tint[] box = new int[w + 1];\n\n\t\tfor (i = 0; i < w; i++) {\n\t\t\tbox[i + 1] = i + 1;\n\t\t}\n\n\t\tfor (i = 0; i < n; i++) {\n\t\t\tString str = scanner.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint tmp = box[Integer.parseInt(ab[1])];\n\t\t\tbox[Integer.parseInt(ab[1])] = box[Integer.parseInt(ab[0])];\n\t\t\tbox[Integer.parseInt(ab[0])] = tmp;\n\t\t}\n\n\t\tfor (i = 0; i < w; i++) {\n\t\t\tSystem.out.println(box[i + 1]);\n\t\t}\n\t\tscanner.close();\n\t}\n\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint i;\n\t\tint w = scanner.nextInt();\n\t\tint n = scanner.nextInt();\n\t\tint[] box = new int[w + 1];\n\n\t\tfor (i = 0; i < w; i++) {\n\t\t\tbox[i + 1] = i + 1;\n\t\t}\n\n\t\tfor (i = 0; i < n; i++) {\n\t\t\tString str = scanner.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint tmp = box[Integer.parseInt(ab[1])];\n\t\t\tbox[Integer.parseInt(ab[1])] = box[Integer.parseInt(ab[0])];\n\t\t\tbox[Integer.parseInt(ab[0])] = tmp;\n\t\t}\n\n\t\tfor (i = 0; i < w; i++) {\n\t\t\tSystem.out.println(box[i + 1]);\n\t\t}\n\t\tscanner.close();\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint i;\n\t\tint w = scanner.nextInt();\n\t\tint n = scanner.nextInt();\n\t\tint[] box = new int[w + 1];\n\n\t\tfor (i = 0; i < w; i++) {\n\t\t\tbox[i + 1] = i + 1;\n\t\t}\n\n\t\tfor (i = 0; i < n; i++) {\n\t\t\tString str = scanner.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint tmp = box[Integer.parseInt(ab[1])];\n\t\t\tbox[Integer.parseInt(ab[1])] = box[Integer.parseInt(ab[0])];\n\t\t\tbox[Integer.parseInt(ab[0])] = tmp;\n\t\t}\n\n\t\tfor (i = 0; i < w; i++) {\n\t\t\tSystem.out.println(box[i + 1]);\n\t\t}\n\t\tscanner.close();\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint i;\n\t\tint w = scanner.nextInt();\n\t\tint n = scanner.nextInt();\n\t\tint[] box = new int[w + 1];\n\n\t\tfor (i = 0; i < w; i++) {\n\t\t\tbox[i + 1] = i + 1;\n\t\t}\n\n\t\tfor (i = 0; i < n; i++) {\n\t\t\tString str = scanner.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint tmp = box[Integer.parseInt(ab[1])];\n\t\t\tbox[Integer.parseInt(ab[1])] = box[Integer.parseInt(ab[0])];\n\t\t\tbox[Integer.parseInt(ab[0])] = tmp;\n\t\t}\n\n\t\tfor (i = 0; i < w; i++) {\n\t\t\tSystem.out.println(box[i + 1]);\n\t\t}\n\t\tscanner.close();\n\t}",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int i;",
"i",
"int w = scanner.nextInt();",
"w",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int n = scanner.nextInt();",
"n",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int[] box = new int[w + 1];",
"box",
"new int[w + 1]",
"w + 1",
"w",
"1",
"for (i = 0; i < w; i++) {\n\t\t\tbox[i + 1] = i + 1;\n\t\t}",
"i = 0;",
"i = 0",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tbox[i + 1] = i + 1;\n\t\t}",
"{\n\t\t\tbox[i + 1] = i + 1;\n\t\t}",
"box[i + 1] = i + 1",
"box[i + 1]",
"box",
"i + 1",
"i",
"1",
"i + 1",
"i",
"1",
"for (i = 0; i < n; i++) {\n\t\t\tString str = scanner.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint tmp = box[Integer.parseInt(ab[1])];\n\t\t\tbox[Integer.parseInt(ab[1])] = box[Integer.parseInt(ab[0])];\n\t\t\tbox[Integer.parseInt(ab[0])] = tmp;\n\t\t}",
"i = 0;",
"i = 0",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString str = scanner.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint tmp = box[Integer.parseInt(ab[1])];\n\t\t\tbox[Integer.parseInt(ab[1])] = box[Integer.parseInt(ab[0])];\n\t\t\tbox[Integer.parseInt(ab[0])] = tmp;\n\t\t}",
"{\n\t\t\tString str = scanner.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint tmp = box[Integer.parseInt(ab[1])];\n\t\t\tbox[Integer.parseInt(ab[1])] = box[Integer.parseInt(ab[0])];\n\t\t\tbox[Integer.parseInt(ab[0])] = tmp;\n\t\t}",
"String str = scanner.next();",
"str",
"scanner.next()",
"scanner.next",
"scanner",
"String[] ab = str.split(\",\");",
"ab",
"str.split(\",\")",
"str.split",
"str",
"\",\"",
"int tmp = box[Integer.parseInt(ab[1])];",
"tmp",
"box[Integer.parseInt(ab[1])]",
"box",
"Integer.parseInt(ab[1])",
"Integer.parseInt",
"Integer",
"ab[1]",
"ab",
"1",
"box[Integer.parseInt(ab[1])] = box[Integer.parseInt(ab[0])]",
"box[Integer.parseInt(ab[1])]",
"box",
"Integer.parseInt(ab[1])",
"Integer.parseInt",
"Integer",
"ab[1]",
"ab",
"1",
"box[Integer.parseInt(ab[0])]",
"box",
"Integer.parseInt(ab[0])",
"Integer.parseInt",
"Integer",
"ab[0]",
"ab",
"0",
"box[Integer.parseInt(ab[0])] = tmp",
"box[Integer.parseInt(ab[0])]",
"box",
"Integer.parseInt(ab[0])",
"Integer.parseInt",
"Integer",
"ab[0]",
"ab",
"0",
"tmp",
"for (i = 0; i < w; i++) {\n\t\t\tSystem.out.println(box[i + 1]);\n\t\t}",
"i = 0;",
"i = 0",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(box[i + 1]);\n\t\t}",
"{\n\t\t\tSystem.out.println(box[i + 1]);\n\t\t}",
"System.out.println(box[i + 1])",
"System.out.println",
"System.out",
"System",
"System.out",
"box[i + 1]",
"box",
"i + 1",
"i",
"1",
"scanner.close()",
"scanner.close",
"scanner",
"String[] args",
"args",
"public class Main{\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint i;\n\t\tint w = scanner.nextInt();\n\t\tint n = scanner.nextInt();\n\t\tint[] box = new int[w + 1];\n\n\t\tfor (i = 0; i < w; i++) {\n\t\t\tbox[i + 1] = i + 1;\n\t\t}\n\n\t\tfor (i = 0; i < n; i++) {\n\t\t\tString str = scanner.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint tmp = box[Integer.parseInt(ab[1])];\n\t\t\tbox[Integer.parseInt(ab[1])] = box[Integer.parseInt(ab[0])];\n\t\t\tbox[Integer.parseInt(ab[0])] = tmp;\n\t\t}\n\n\t\tfor (i = 0; i < w; i++) {\n\t\t\tSystem.out.println(box[i + 1]);\n\t\t}\n\t\tscanner.close();\n\t}\n\n}",
"public class Main{\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint i;\n\t\tint w = scanner.nextInt();\n\t\tint n = scanner.nextInt();\n\t\tint[] box = new int[w + 1];\n\n\t\tfor (i = 0; i < w; i++) {\n\t\t\tbox[i + 1] = i + 1;\n\t\t}\n\n\t\tfor (i = 0; i < n; i++) {\n\t\t\tString str = scanner.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint tmp = box[Integer.parseInt(ab[1])];\n\t\t\tbox[Integer.parseInt(ab[1])] = box[Integer.parseInt(ab[0])];\n\t\t\tbox[Integer.parseInt(ab[0])] = tmp;\n\t\t}\n\n\t\tfor (i = 0; i < w; i++) {\n\t\t\tSystem.out.println(box[i + 1]);\n\t\t}\n\t\tscanner.close();\n\t}\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner scanner = new Scanner(System.in);
int i;
int w = scanner.nextInt();
int n = scanner.nextInt();
int[] box = new int[w + 1];
for (i = 0; i < w; i++) {
box[i + 1] = i + 1;
}
for (i = 0; i < n; i++) {
String str = scanner.next();
String[] ab = str.split(",");
int tmp = box[Integer.parseInt(ab[1])];
box[Integer.parseInt(ab[1])] = box[Integer.parseInt(ab[0])];
box[Integer.parseInt(ab[0])] = tmp;
}
for (i = 0; i < w; i++) {
System.out.println(box[i + 1]);
}
scanner.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
0,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
41,
13,
41,
13,
20,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
11,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
11,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
11,
40
],
[
40,
41
],
[
11,
42
],
[
42,
43
],
[
42,
44
],
[
11,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
63,
64
],
[
63,
65
],
[
11,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
71,
72
],
[
71,
73
],
[
66,
74
],
[
74,
75
],
[
75,
76
],
[
66,
77
],
[
78,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
78,
84
],
[
84,
85
],
[
84,
86
],
[
78,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
92,
93
],
[
93,
94
],
[
78,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
100,
101
],
[
101,
102
],
[
78,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
107,
109
],
[
78,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
113,
115
],
[
110,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
118,
120
],
[
78,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
124,
126
],
[
121,
127
],
[
11,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
128,
133
],
[
133,
134
],
[
133,
135
],
[
128,
136
],
[
136,
137
],
[
137,
138
],
[
128,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
142,
144
],
[
140,
145
],
[
145,
146
],
[
145,
147
],
[
9,
148
],
[
148,
149
]
] | [
"import java.io.*;\nimport java.util.*;\n\nclass Main{\n public static void main(String[] args)throws IOException{\n InputStreamReader isr =new InputStreamReader(System.in);\n \t\tBufferedReader reader =new BufferedReader(isr);\n \t\n /*???????????¬??°w???????????????*/\n String buf = reader.readLine();\n int w = Integer.parseInt(buf);\n \n /*?¨??£??????¬??°n???????????????*/\n buf = reader.readLine();\n int n = Integer.parseInt(buf);\n \n int i;\n int[] num = new int[w];\n \n for (i = 0;i < w;i++) {\n num[i] = i + 1;\n }\n \n for (i = 0;i < n;i++) {\n /*i??????????¨??£????????????????*/\n buf = reader.readLine();\n StringTokenizer st = new StringTokenizer(buf,\",\");\n int a = Integer.parseInt(st.nextToken());\n int b = Integer.parseInt(st.nextToken());\n int x = num[a - 1];\n num[a - 1] = num[b - 1];\n num[b - 1] = x;\n }\n \n for (i = 0;i < w;i++) System.out.println(num[i]);\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"class Main{\n public static void main(String[] args)throws IOException{\n InputStreamReader isr =new InputStreamReader(System.in);\n \t\tBufferedReader reader =new BufferedReader(isr);\n \t\n /*???????????¬??°w???????????????*/\n String buf = reader.readLine();\n int w = Integer.parseInt(buf);\n \n /*?¨??£??????¬??°n???????????????*/\n buf = reader.readLine();\n int n = Integer.parseInt(buf);\n \n int i;\n int[] num = new int[w];\n \n for (i = 0;i < w;i++) {\n num[i] = i + 1;\n }\n \n for (i = 0;i < n;i++) {\n /*i??????????¨??£????????????????*/\n buf = reader.readLine();\n StringTokenizer st = new StringTokenizer(buf,\",\");\n int a = Integer.parseInt(st.nextToken());\n int b = Integer.parseInt(st.nextToken());\n int x = num[a - 1];\n num[a - 1] = num[b - 1];\n num[b - 1] = x;\n }\n \n for (i = 0;i < w;i++) System.out.println(num[i]);\n }\n}",
"Main",
"public static void main(String[] args)throws IOException{\n InputStreamReader isr =new InputStreamReader(System.in);\n \t\tBufferedReader reader =new BufferedReader(isr);\n \t\n /*???????????¬??°w???????????????*/\n String buf = reader.readLine();\n int w = Integer.parseInt(buf);\n \n /*?¨??£??????¬??°n???????????????*/\n buf = reader.readLine();\n int n = Integer.parseInt(buf);\n \n int i;\n int[] num = new int[w];\n \n for (i = 0;i < w;i++) {\n num[i] = i + 1;\n }\n \n for (i = 0;i < n;i++) {\n /*i??????????¨??£????????????????*/\n buf = reader.readLine();\n StringTokenizer st = new StringTokenizer(buf,\",\");\n int a = Integer.parseInt(st.nextToken());\n int b = Integer.parseInt(st.nextToken());\n int x = num[a - 1];\n num[a - 1] = num[b - 1];\n num[b - 1] = x;\n }\n \n for (i = 0;i < w;i++) System.out.println(num[i]);\n }",
"main",
"{\n InputStreamReader isr =new InputStreamReader(System.in);\n \t\tBufferedReader reader =new BufferedReader(isr);\n \t\n /*???????????¬??°w???????????????*/\n String buf = reader.readLine();\n int w = Integer.parseInt(buf);\n \n /*?¨??£??????¬??°n???????????????*/\n buf = reader.readLine();\n int n = Integer.parseInt(buf);\n \n int i;\n int[] num = new int[w];\n \n for (i = 0;i < w;i++) {\n num[i] = i + 1;\n }\n \n for (i = 0;i < n;i++) {\n /*i??????????¨??£????????????????*/\n buf = reader.readLine();\n StringTokenizer st = new StringTokenizer(buf,\",\");\n int a = Integer.parseInt(st.nextToken());\n int b = Integer.parseInt(st.nextToken());\n int x = num[a - 1];\n num[a - 1] = num[b - 1];\n num[b - 1] = x;\n }\n \n for (i = 0;i < w;i++) System.out.println(num[i]);\n }",
"InputStreamReader isr =new InputStreamReader(System.in);",
"isr",
"new InputStreamReader(System.in)",
"BufferedReader reader =new BufferedReader(isr);",
"reader",
"new BufferedReader(isr)",
"String buf = reader.readLine();",
"buf",
"reader.readLine()",
"reader.readLine",
"reader",
"int w = Integer.parseInt(buf);",
"w",
"Integer.parseInt(buf)",
"Integer.parseInt",
"Integer",
"buf",
"buf = reader.readLine()",
"buf",
"reader.readLine()",
"reader.readLine",
"reader",
"int n = Integer.parseInt(buf);",
"n",
"Integer.parseInt(buf)",
"Integer.parseInt",
"Integer",
"buf",
"int i;",
"i",
"int[] num = new int[w];",
"num",
"new int[w]",
"w",
"for (i = 0;i < w;i++) {\n num[i] = i + 1;\n }",
"i = 0;",
"i = 0",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n num[i] = i + 1;\n }",
"{\n num[i] = i + 1;\n }",
"num[i] = i + 1",
"num[i]",
"num",
"i",
"i + 1",
"i",
"1",
"for (i = 0;i < n;i++) {\n /*i??????????¨??£????????????????*/\n buf = reader.readLine();\n StringTokenizer st = new StringTokenizer(buf,\",\");\n int a = Integer.parseInt(st.nextToken());\n int b = Integer.parseInt(st.nextToken());\n int x = num[a - 1];\n num[a - 1] = num[b - 1];\n num[b - 1] = x;\n }",
"i = 0;",
"i = 0",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n /*i??????????¨??£????????????????*/\n buf = reader.readLine();\n StringTokenizer st = new StringTokenizer(buf,\",\");\n int a = Integer.parseInt(st.nextToken());\n int b = Integer.parseInt(st.nextToken());\n int x = num[a - 1];\n num[a - 1] = num[b - 1];\n num[b - 1] = x;\n }",
"{\n /*i??????????¨??£????????????????*/\n buf = reader.readLine();\n StringTokenizer st = new StringTokenizer(buf,\",\");\n int a = Integer.parseInt(st.nextToken());\n int b = Integer.parseInt(st.nextToken());\n int x = num[a - 1];\n num[a - 1] = num[b - 1];\n num[b - 1] = x;\n }",
"buf = reader.readLine()",
"buf",
"reader.readLine()",
"reader.readLine",
"reader",
"StringTokenizer st = new StringTokenizer(buf,\",\");",
"st",
"new StringTokenizer(buf,\",\")",
"int a = Integer.parseInt(st.nextToken());",
"a",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"int b = Integer.parseInt(st.nextToken());",
"b",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"int x = num[a - 1];",
"x",
"num[a - 1]",
"num",
"a - 1",
"a",
"1",
"num[a - 1] = num[b - 1]",
"num[a - 1]",
"num",
"a - 1",
"a",
"1",
"num[b - 1]",
"num",
"b - 1",
"b",
"1",
"num[b - 1] = x",
"num[b - 1]",
"num",
"b - 1",
"b",
"1",
"x",
"for (i = 0;i < w;i++) System.out.println(num[i]);",
"i = 0;",
"i = 0",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"System.out.println(num[i]);",
"System.out.println(num[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"num[i]",
"num",
"i",
"String[] args",
"args"
] | import java.io.*;
import java.util.*;
class Main{
public static void main(String[] args)throws IOException{
InputStreamReader isr =new InputStreamReader(System.in);
BufferedReader reader =new BufferedReader(isr);
/*???????????¬??°w???????????????*/
String buf = reader.readLine();
int w = Integer.parseInt(buf);
/*?¨??£??????¬??°n???????????????*/
buf = reader.readLine();
int n = Integer.parseInt(buf);
int i;
int[] num = new int[w];
for (i = 0;i < w;i++) {
num[i] = i + 1;
}
for (i = 0;i < n;i++) {
/*i??????????¨??£????????????????*/
buf = reader.readLine();
StringTokenizer st = new StringTokenizer(buf,",");
int a = Integer.parseInt(st.nextToken());
int b = Integer.parseInt(st.nextToken());
int x = num[a - 1];
num[a - 1] = num[b - 1];
num[b - 1] = x;
}
for (i = 0;i < w;i++) System.out.println(num[i]);
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
13,
18,
13,
13,
12,
13,
30,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
4,
18,
13,
13,
2,
18,
13,
13,
17,
29,
4,
18,
13,
23,
13,
23,
13,
12,
13,
30,
4,
18,
20,
23,
13,
12,
13,
30,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
4,
18,
18,
13,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
4,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
11,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
11,
22
],
[
22,
23
],
[
22,
24
],
[
25,
26
],
[
25,
27
],
[
11,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
11,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
58,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
58,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
75,
76
],
[
75,
77
],
[
58,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
83,
84
],
[
83,
85
],
[
58,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
88,
90
],
[
58,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
95,
96
],
[
95,
97
],
[
58,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
11,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
103,
108
],
[
108,
109
],
[
108,
110
],
[
103,
111
],
[
111,
112
],
[
112,
113
],
[
103,
114
],
[
115,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
118,
120
],
[
4,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
123,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
127,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
134,
136
],
[
127,
137
],
[
137,
138
],
[
138,
139
],
[
127,
140
],
[
141,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
144,
147
],
[
142,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
148,
152
],
[
123,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
121,
157
],
[
157,
158
],
[
121,
159
],
[
159,
160
],
[
4,
161
],
[
161,
162
],
[
161,
163
],
[
163,
164
],
[
164,
165
],
[
165,
166
],
[
161,
167
],
[
167,
168
],
[
4,
169
],
[
169,
170
],
[
169,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
174,
175
],
[
174,
176
],
[
172,
177
],
[
169,
178
],
[
178,
179
],
[
4,
180
],
[
180,
181
],
[
180,
182
],
[
182,
183
],
[
183,
184
],
[
184,
185
],
[
185,
186
],
[
185,
187
],
[
183,
188
],
[
180,
189
],
[
189,
190
],
[
4,
191
],
[
191,
192
],
[
191,
193
],
[
193,
194
],
[
194,
195
],
[
195,
196
],
[
196,
197
],
[
196,
198
]
] | [
"\nimport java.util.*;\n\nclass Main {\n\tScanner sc = new Scanner(System.in);\n\n\tpublic void run() {\n\t\tint w=sc.nextInt();\n\t\tint n=sc.nextInt();\n\t\tint [] data=new int[w+1];\n\t\tfor(int i=1;i<=w;i++){\n\t\t\tdata[i]=i;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString bar=sc.next();\n\t\t\tString[] bs=bar.split(\",\");\n\t\t\tint a1=Integer.parseInt(bs[0]);\n\t\t\tint a2=Integer.parseInt(bs[1]);\n\t\t\tint tmp=data[a1];\n\t\t\tdata[a1]=data[a2];\n\t\t\tdata[a2]=tmp;\n\t\t}\n\t\t\n\t\tfor(int i=1;i<=w;i++){\n\t\t\tln(data[i]);\n\t\t}\n\t}\n\tpublic static String join(double[] array, String separator) {\n\t\tStringBuilder str = new StringBuilder(array[0] + \"\");\n\t\tfor (int i = 1; i < array.length; i++) {\n\t\t\tstr.append(separator).append(array[i] + \"\");\n\t\t}\n\t\treturn str.toString();\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n\n\tpublic static void pr(Object o) {\n\t\tSystem.out.print(o);\n\t}\n\n\tpublic static void ln(Object o) {\n\t\tSystem.out.println(o);\n\t}\n\n\tpublic static void ln() {\n\t\tSystem.out.println();\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"class Main {\n\tScanner sc = new Scanner(System.in);\n\n\tpublic void run() {\n\t\tint w=sc.nextInt();\n\t\tint n=sc.nextInt();\n\t\tint [] data=new int[w+1];\n\t\tfor(int i=1;i<=w;i++){\n\t\t\tdata[i]=i;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString bar=sc.next();\n\t\t\tString[] bs=bar.split(\",\");\n\t\t\tint a1=Integer.parseInt(bs[0]);\n\t\t\tint a2=Integer.parseInt(bs[1]);\n\t\t\tint tmp=data[a1];\n\t\t\tdata[a1]=data[a2];\n\t\t\tdata[a2]=tmp;\n\t\t}\n\t\t\n\t\tfor(int i=1;i<=w;i++){\n\t\t\tln(data[i]);\n\t\t}\n\t}\n\tpublic static String join(double[] array, String separator) {\n\t\tStringBuilder str = new StringBuilder(array[0] + \"\");\n\t\tfor (int i = 1; i < array.length; i++) {\n\t\t\tstr.append(separator).append(array[i] + \"\");\n\t\t}\n\t\treturn str.toString();\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n\n\tpublic static void pr(Object o) {\n\t\tSystem.out.print(o);\n\t}\n\n\tpublic static void ln(Object o) {\n\t\tSystem.out.println(o);\n\t}\n\n\tpublic static void ln() {\n\t\tSystem.out.println();\n\t}\n}",
"Main",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"public void run() {\n\t\tint w=sc.nextInt();\n\t\tint n=sc.nextInt();\n\t\tint [] data=new int[w+1];\n\t\tfor(int i=1;i<=w;i++){\n\t\t\tdata[i]=i;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString bar=sc.next();\n\t\t\tString[] bs=bar.split(\",\");\n\t\t\tint a1=Integer.parseInt(bs[0]);\n\t\t\tint a2=Integer.parseInt(bs[1]);\n\t\t\tint tmp=data[a1];\n\t\t\tdata[a1]=data[a2];\n\t\t\tdata[a2]=tmp;\n\t\t}\n\t\t\n\t\tfor(int i=1;i<=w;i++){\n\t\t\tln(data[i]);\n\t\t}\n\t}",
"run",
"{\n\t\tint w=sc.nextInt();\n\t\tint n=sc.nextInt();\n\t\tint [] data=new int[w+1];\n\t\tfor(int i=1;i<=w;i++){\n\t\t\tdata[i]=i;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString bar=sc.next();\n\t\t\tString[] bs=bar.split(\",\");\n\t\t\tint a1=Integer.parseInt(bs[0]);\n\t\t\tint a2=Integer.parseInt(bs[1]);\n\t\t\tint tmp=data[a1];\n\t\t\tdata[a1]=data[a2];\n\t\t\tdata[a2]=tmp;\n\t\t}\n\t\t\n\t\tfor(int i=1;i<=w;i++){\n\t\t\tln(data[i]);\n\t\t}\n\t}",
"int w=sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int [] data=new int[w+1];",
"data",
"new int[w+1]",
"w+1",
"w",
"1",
"for(int i=1;i<=w;i++){\n\t\t\tdata[i]=i;\n\t\t}",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tdata[i]=i;\n\t\t}",
"{\n\t\t\tdata[i]=i;\n\t\t}",
"data[i]=i",
"data[i]",
"data",
"i",
"i",
"for(int i=0;i<n;i++){\n\t\t\tString bar=sc.next();\n\t\t\tString[] bs=bar.split(\",\");\n\t\t\tint a1=Integer.parseInt(bs[0]);\n\t\t\tint a2=Integer.parseInt(bs[1]);\n\t\t\tint tmp=data[a1];\n\t\t\tdata[a1]=data[a2];\n\t\t\tdata[a2]=tmp;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString bar=sc.next();\n\t\t\tString[] bs=bar.split(\",\");\n\t\t\tint a1=Integer.parseInt(bs[0]);\n\t\t\tint a2=Integer.parseInt(bs[1]);\n\t\t\tint tmp=data[a1];\n\t\t\tdata[a1]=data[a2];\n\t\t\tdata[a2]=tmp;\n\t\t}",
"{\n\t\t\tString bar=sc.next();\n\t\t\tString[] bs=bar.split(\",\");\n\t\t\tint a1=Integer.parseInt(bs[0]);\n\t\t\tint a2=Integer.parseInt(bs[1]);\n\t\t\tint tmp=data[a1];\n\t\t\tdata[a1]=data[a2];\n\t\t\tdata[a2]=tmp;\n\t\t}",
"String bar=sc.next();",
"bar",
"sc.next()",
"sc.next",
"sc",
"String[] bs=bar.split(\",\");",
"bs",
"bar.split(\",\")",
"bar.split",
"bar",
"\",\"",
"int a1=Integer.parseInt(bs[0]);",
"a1",
"Integer.parseInt(bs[0])",
"Integer.parseInt",
"Integer",
"bs[0]",
"bs",
"0",
"int a2=Integer.parseInt(bs[1]);",
"a2",
"Integer.parseInt(bs[1])",
"Integer.parseInt",
"Integer",
"bs[1]",
"bs",
"1",
"int tmp=data[a1];",
"tmp",
"data[a1]",
"data",
"a1",
"data[a1]=data[a2]",
"data[a1]",
"data",
"a1",
"data[a2]",
"data",
"a2",
"data[a2]=tmp",
"data[a2]",
"data",
"a2",
"tmp",
"for(int i=1;i<=w;i++){\n\t\t\tln(data[i]);\n\t\t}",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tln(data[i]);\n\t\t}",
"{\n\t\t\tln(data[i]);\n\t\t}",
"ln(data[i])",
"ln",
"data[i]",
"data",
"i",
"public static String join(double[] array, String separator) {\n\t\tStringBuilder str = new StringBuilder(array[0] + \"\");\n\t\tfor (int i = 1; i < array.length; i++) {\n\t\t\tstr.append(separator).append(array[i] + \"\");\n\t\t}\n\t\treturn str.toString();\n\t}",
"join",
"{\n\t\tStringBuilder str = new StringBuilder(array[0] + \"\");\n\t\tfor (int i = 1; i < array.length; i++) {\n\t\t\tstr.append(separator).append(array[i] + \"\");\n\t\t}\n\t\treturn str.toString();\n\t}",
"StringBuilder str = new StringBuilder(array[0] + \"\");",
"str",
"new StringBuilder(array[0] + \"\")",
"for (int i = 1; i < array.length; i++) {\n\t\t\tstr.append(separator).append(array[i] + \"\");\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < array.length",
"i",
"array.length",
"array",
"array.length",
"i++",
"i++",
"i",
"{\n\t\t\tstr.append(separator).append(array[i] + \"\");\n\t\t}",
"{\n\t\t\tstr.append(separator).append(array[i] + \"\");\n\t\t}",
"str.append(separator).append(array[i] + \"\")",
"str.append(separator).append",
"str.append(separator)",
"str.append",
"str",
"separator",
"array[i] + \"\"",
"array[i]",
"array",
"i",
"\"\"",
"return str.toString();",
"str.toString()",
"str.toString",
"str",
"double[] array",
"array",
"String separator",
"separator",
"public static void main(String[] args) {\n\t\tnew Main().run();\n\t}",
"main",
"{\n\t\tnew Main().run();\n\t}",
"new Main().run()",
"new Main().run",
"new Main()",
"String[] args",
"args",
"public static void pr(Object o) {\n\t\tSystem.out.print(o);\n\t}",
"pr",
"{\n\t\tSystem.out.print(o);\n\t}",
"System.out.print(o)",
"System.out.print",
"System.out",
"System",
"System.out",
"o",
"Object o",
"o",
"public static void ln(Object o) {\n\t\tSystem.out.println(o);\n\t}",
"ln",
"{\n\t\tSystem.out.println(o);\n\t}",
"System.out.println(o)",
"System.out.println",
"System.out",
"System",
"System.out",
"o",
"Object o",
"o",
"public static void ln() {\n\t\tSystem.out.println();\n\t}",
"ln",
"{\n\t\tSystem.out.println();\n\t}",
"System.out.println()",
"System.out.println",
"System.out",
"System",
"System.out"
] |
import java.util.*;
class Main {
Scanner sc = new Scanner(System.in);
public void run() {
int w=sc.nextInt();
int n=sc.nextInt();
int [] data=new int[w+1];
for(int i=1;i<=w;i++){
data[i]=i;
}
for(int i=0;i<n;i++){
String bar=sc.next();
String[] bs=bar.split(",");
int a1=Integer.parseInt(bs[0]);
int a2=Integer.parseInt(bs[1]);
int tmp=data[a1];
data[a1]=data[a2];
data[a2]=tmp;
}
for(int i=1;i<=w;i++){
ln(data[i]);
}
}
public static String join(double[] array, String separator) {
StringBuilder str = new StringBuilder(array[0] + "");
for (int i = 1; i < array.length; i++) {
str.append(separator).append(array[i] + "");
}
return str.toString();
}
public static void main(String[] args) {
new Main().run();
}
public static void pr(Object o) {
System.out.print(o);
}
public static void ln(Object o) {
System.out.println(o);
}
public static void ln() {
System.out.println();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
17,
41,
13,
17,
0,
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,
2,
13,
17,
0,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
14,
2,
2,
13,
17,
4,
18,
13,
30,
3,
41,
13,
4,
18,
13,
17,
41,
13,
4,
13,
13,
0,
13,
18,
13,
18,
13,
17,
0,
18,
13,
18,
13,
17,
18,
13,
18,
13,
17,
0,
18,
13,
18,
13,
17,
13,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
20,
18,
13,
13,
0,
18,
13,
17,
2,
4,
18,
13,
18,
13,
17,
17,
0,
18,
13,
17,
2,
4,
18,
13,
18,
13,
17,
17,
29,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
182,
11
],
[
182,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
14,
21
],
[
21,
22
],
[
21,
23
],
[
14,
24
],
[
24,
25
],
[
24,
26
],
[
14,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
29,
32
],
[
32,
33
],
[
33,
34
],
[
14,
35
],
[
35,
36
],
[
35,
37
],
[
14,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
44,
45
],
[
44,
46
],
[
39,
47
],
[
47,
48
],
[
48,
49
],
[
39,
50
],
[
51,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
56,
57
],
[
56,
58
],
[
14,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
64,
65
],
[
65,
66
],
[
14,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
72,
73
],
[
72,
74
],
[
67,
75
],
[
75,
76
],
[
76,
77
],
[
67,
78
],
[
79,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
79,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
90,
91
],
[
91,
92
],
[
85,
93
],
[
93,
94
],
[
79,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
79,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
103,
105
],
[
79,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
110,
112
],
[
79,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
116,
118
],
[
113,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
121,
123
],
[
79,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
127,
129
],
[
124,
130
],
[
14,
131
],
[
131,
132
],
[
131,
133
],
[
131,
134
],
[
135,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
136,
141
],
[
12,
142
],
[
142,
143
],
[
182,
144
],
[
144,
145
],
[
144,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
150,
151
],
[
150,
152
],
[
146,
153
],
[
153,
154
],
[
154,
155
],
[
154,
156
],
[
153,
157
],
[
157,
158
],
[
158,
159
],
[
159,
160
],
[
158,
161
],
[
161,
162
],
[
161,
163
],
[
157,
164
],
[
146,
165
],
[
165,
166
],
[
166,
167
],
[
166,
168
],
[
165,
169
],
[
169,
170
],
[
170,
171
],
[
171,
172
],
[
170,
173
],
[
173,
174
],
[
173,
175
],
[
169,
176
],
[
146,
177
],
[
177,
178
],
[
144,
179
],
[
179,
180
],
[
0,
181
],
[
181,
182
],
[
181,
183
]
] | [
"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 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \n // ?????£???????¬???°\n int vertical = 0;\n // ??¨???£???????¬???°\n int horizontal = 0;\n // ?????????????????????¨??????°\n int x = 0;\n\n\n vertical = Integer.parseInt(br.readLine());\n\n // ?????£???????????????????\n int[] drowingLots = new int[vertical];\n // ???????????£???????????????´???????\n for (int i = 0; i < vertical; ++i) {\n drowingLots[i] = i + 1;\n }\n \n // ??¨???£? 2??????\n horizontal = Integer.parseInt(br.readLine());\n \n \n // ??¨??????\\?????????????????????????????????????????? 3????????\\???\n for (int i = 0; i < horizontal; ++i) {\n String input = br.readLine();\n if (input == null || input.isEmpty()) {\n break;\n }\n \n String[] change = input.split(\",\");\n int[] intInput = adjustment(change);\n \n // a1???????????????\n x = drowingLots[intInput[0]];\n // b1???a1?????\\??????\n drowingLots[intInput[0]] = drowingLots[intInput[1]];\n // a1???b1?????\\??????\n drowingLots[intInput[1]] = x;\n }\n \n for (int output : drowingLots) {\n System.out.println(output);\n }\n\n \n }\n \n // ??\\??????????????????int??????????????????-1??????\n private static int[] adjustment(String[] strInput) {\n // int????????????????????????\n int[] intInput = new int[strInput.length];\n \n intInput[0] = Integer.parseInt(strInput[0]) - 1;\n intInput[1] = Integer.parseInt(strInput[1]) - 1;\n \n return intInput;\n }\n \n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n \n public static void main(String[] args) throws IOException {\n \n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \n // ?????£???????¬???°\n int vertical = 0;\n // ??¨???£???????¬???°\n int horizontal = 0;\n // ?????????????????????¨??????°\n int x = 0;\n\n\n vertical = Integer.parseInt(br.readLine());\n\n // ?????£???????????????????\n int[] drowingLots = new int[vertical];\n // ???????????£???????????????´???????\n for (int i = 0; i < vertical; ++i) {\n drowingLots[i] = i + 1;\n }\n \n // ??¨???£? 2??????\n horizontal = Integer.parseInt(br.readLine());\n \n \n // ??¨??????\\?????????????????????????????????????????? 3????????\\???\n for (int i = 0; i < horizontal; ++i) {\n String input = br.readLine();\n if (input == null || input.isEmpty()) {\n break;\n }\n \n String[] change = input.split(\",\");\n int[] intInput = adjustment(change);\n \n // a1???????????????\n x = drowingLots[intInput[0]];\n // b1???a1?????\\??????\n drowingLots[intInput[0]] = drowingLots[intInput[1]];\n // a1???b1?????\\??????\n drowingLots[intInput[1]] = x;\n }\n \n for (int output : drowingLots) {\n System.out.println(output);\n }\n\n \n }\n \n // ??\\??????????????????int??????????????????-1??????\n private static int[] adjustment(String[] strInput) {\n // int????????????????????????\n int[] intInput = new int[strInput.length];\n \n intInput[0] = Integer.parseInt(strInput[0]) - 1;\n intInput[1] = Integer.parseInt(strInput[1]) - 1;\n \n return intInput;\n }\n \n}",
"Main",
"public static void main(String[] args) throws IOException {\n \n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \n // ?????£???????¬???°\n int vertical = 0;\n // ??¨???£???????¬???°\n int horizontal = 0;\n // ?????????????????????¨??????°\n int x = 0;\n\n\n vertical = Integer.parseInt(br.readLine());\n\n // ?????£???????????????????\n int[] drowingLots = new int[vertical];\n // ???????????£???????????????´???????\n for (int i = 0; i < vertical; ++i) {\n drowingLots[i] = i + 1;\n }\n \n // ??¨???£? 2??????\n horizontal = Integer.parseInt(br.readLine());\n \n \n // ??¨??????\\?????????????????????????????????????????? 3????????\\???\n for (int i = 0; i < horizontal; ++i) {\n String input = br.readLine();\n if (input == null || input.isEmpty()) {\n break;\n }\n \n String[] change = input.split(\",\");\n int[] intInput = adjustment(change);\n \n // a1???????????????\n x = drowingLots[intInput[0]];\n // b1???a1?????\\??????\n drowingLots[intInput[0]] = drowingLots[intInput[1]];\n // a1???b1?????\\??????\n drowingLots[intInput[1]] = x;\n }\n \n for (int output : drowingLots) {\n System.out.println(output);\n }\n\n \n }",
"main",
"{\n \n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \n // ?????£???????¬???°\n int vertical = 0;\n // ??¨???£???????¬???°\n int horizontal = 0;\n // ?????????????????????¨??????°\n int x = 0;\n\n\n vertical = Integer.parseInt(br.readLine());\n\n // ?????£???????????????????\n int[] drowingLots = new int[vertical];\n // ???????????£???????????????´???????\n for (int i = 0; i < vertical; ++i) {\n drowingLots[i] = i + 1;\n }\n \n // ??¨???£? 2??????\n horizontal = Integer.parseInt(br.readLine());\n \n \n // ??¨??????\\?????????????????????????????????????????? 3????????\\???\n for (int i = 0; i < horizontal; ++i) {\n String input = br.readLine();\n if (input == null || input.isEmpty()) {\n break;\n }\n \n String[] change = input.split(\",\");\n int[] intInput = adjustment(change);\n \n // a1???????????????\n x = drowingLots[intInput[0]];\n // b1???a1?????\\??????\n drowingLots[intInput[0]] = drowingLots[intInput[1]];\n // a1???b1?????\\??????\n drowingLots[intInput[1]] = x;\n }\n \n for (int output : drowingLots) {\n System.out.println(output);\n }\n\n \n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int vertical = 0;",
"vertical",
"0",
"int horizontal = 0;",
"horizontal",
"0",
"int x = 0;",
"x",
"0",
"vertical = Integer.parseInt(br.readLine())",
"vertical",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int[] drowingLots = new int[vertical];",
"drowingLots",
"new int[vertical]",
"vertical",
"for (int i = 0; i < vertical; ++i) {\n drowingLots[i] = i + 1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < vertical",
"i",
"vertical",
"++i",
"++i",
"i",
"{\n drowingLots[i] = i + 1;\n }",
"{\n drowingLots[i] = i + 1;\n }",
"drowingLots[i] = i + 1",
"drowingLots[i]",
"drowingLots",
"i",
"i + 1",
"i",
"1",
"horizontal = Integer.parseInt(br.readLine())",
"horizontal",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"for (int i = 0; i < horizontal; ++i) {\n String input = br.readLine();\n if (input == null || input.isEmpty()) {\n break;\n }\n \n String[] change = input.split(\",\");\n int[] intInput = adjustment(change);\n \n // a1???????????????\n x = drowingLots[intInput[0]];\n // b1???a1?????\\??????\n drowingLots[intInput[0]] = drowingLots[intInput[1]];\n // a1???b1?????\\??????\n drowingLots[intInput[1]] = x;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < horizontal",
"i",
"horizontal",
"++i",
"++i",
"i",
"{\n String input = br.readLine();\n if (input == null || input.isEmpty()) {\n break;\n }\n \n String[] change = input.split(\",\");\n int[] intInput = adjustment(change);\n \n // a1???????????????\n x = drowingLots[intInput[0]];\n // b1???a1?????\\??????\n drowingLots[intInput[0]] = drowingLots[intInput[1]];\n // a1???b1?????\\??????\n drowingLots[intInput[1]] = x;\n }",
"{\n String input = br.readLine();\n if (input == null || input.isEmpty()) {\n break;\n }\n \n String[] change = input.split(\",\");\n int[] intInput = adjustment(change);\n \n // a1???????????????\n x = drowingLots[intInput[0]];\n // b1???a1?????\\??????\n drowingLots[intInput[0]] = drowingLots[intInput[1]];\n // a1???b1?????\\??????\n drowingLots[intInput[1]] = x;\n }",
"String input = br.readLine();",
"input",
"br.readLine()",
"br.readLine",
"br",
"if (input == null || input.isEmpty()) {\n break;\n }",
"input == null || input.isEmpty()",
"input == null",
"input",
"null",
"input.isEmpty()",
"input.isEmpty",
"input",
"{\n break;\n }",
"break;",
"String[] change = input.split(\",\");",
"change",
"input.split(\",\")",
"input.split",
"input",
"\",\"",
"int[] intInput = adjustment(change);",
"intInput",
"adjustment(change)",
"adjustment",
"change",
"x = drowingLots[intInput[0]]",
"x",
"drowingLots[intInput[0]]",
"drowingLots",
"intInput[0]",
"intInput",
"0",
"drowingLots[intInput[0]] = drowingLots[intInput[1]]",
"drowingLots[intInput[0]]",
"drowingLots",
"intInput[0]",
"intInput",
"0",
"drowingLots[intInput[1]]",
"drowingLots",
"intInput[1]",
"intInput",
"1",
"drowingLots[intInput[1]] = x",
"drowingLots[intInput[1]]",
"drowingLots",
"intInput[1]",
"intInput",
"1",
"x",
"for (int output : drowingLots) {\n System.out.println(output);\n }",
"int output",
"drowingLots",
"{\n System.out.println(output);\n }",
"{\n System.out.println(output);\n }",
"System.out.println(output)",
"System.out.println",
"System.out",
"System",
"System.out",
"output",
"String[] args",
"args",
"// ??\\??????????????????int??????????????????-1??????\n private static int[] adjustment(String[] strInput) {\n // int????????????????????????\n int[] intInput = new int[strInput.length];\n \n intInput[0] = Integer.parseInt(strInput[0]) - 1;\n intInput[1] = Integer.parseInt(strInput[1]) - 1;\n \n return intInput;\n }",
"adjustment",
"{\n // int????????????????????????\n int[] intInput = new int[strInput.length];\n \n intInput[0] = Integer.parseInt(strInput[0]) - 1;\n intInput[1] = Integer.parseInt(strInput[1]) - 1;\n \n return intInput;\n }",
"int[] intInput = new int[strInput.length];",
"intInput",
"new int[strInput.length]",
"strInput.length",
"strInput",
"strInput.length",
"intInput[0] = Integer.parseInt(strInput[0]) - 1",
"intInput[0]",
"intInput",
"0",
"Integer.parseInt(strInput[0]) - 1",
"Integer.parseInt(strInput[0])",
"Integer.parseInt",
"Integer",
"strInput[0]",
"strInput",
"0",
"1",
"intInput[1] = Integer.parseInt(strInput[1]) - 1",
"intInput[1]",
"intInput",
"1",
"Integer.parseInt(strInput[1]) - 1",
"Integer.parseInt(strInput[1])",
"Integer.parseInt",
"Integer",
"strInput[1]",
"strInput",
"1",
"1",
"return intInput;",
"intInput",
"String[] strInput",
"strInput",
"public class Main {\n \n public static void main(String[] args) throws IOException {\n \n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \n // ?????£???????¬???°\n int vertical = 0;\n // ??¨???£???????¬???°\n int horizontal = 0;\n // ?????????????????????¨??????°\n int x = 0;\n\n\n vertical = Integer.parseInt(br.readLine());\n\n // ?????£???????????????????\n int[] drowingLots = new int[vertical];\n // ???????????£???????????????´???????\n for (int i = 0; i < vertical; ++i) {\n drowingLots[i] = i + 1;\n }\n \n // ??¨???£? 2??????\n horizontal = Integer.parseInt(br.readLine());\n \n \n // ??¨??????\\?????????????????????????????????????????? 3????????\\???\n for (int i = 0; i < horizontal; ++i) {\n String input = br.readLine();\n if (input == null || input.isEmpty()) {\n break;\n }\n \n String[] change = input.split(\",\");\n int[] intInput = adjustment(change);\n \n // a1???????????????\n x = drowingLots[intInput[0]];\n // b1???a1?????\\??????\n drowingLots[intInput[0]] = drowingLots[intInput[1]];\n // a1???b1?????\\??????\n drowingLots[intInput[1]] = x;\n }\n \n for (int output : drowingLots) {\n System.out.println(output);\n }\n\n \n }\n \n // ??\\??????????????????int??????????????????-1??????\n private static int[] adjustment(String[] strInput) {\n // int????????????????????????\n int[] intInput = new int[strInput.length];\n \n intInput[0] = Integer.parseInt(strInput[0]) - 1;\n intInput[1] = Integer.parseInt(strInput[1]) - 1;\n \n return intInput;\n }\n \n}",
"public class Main {\n \n public static void main(String[] args) throws IOException {\n \n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \n // ?????£???????¬???°\n int vertical = 0;\n // ??¨???£???????¬???°\n int horizontal = 0;\n // ?????????????????????¨??????°\n int x = 0;\n\n\n vertical = Integer.parseInt(br.readLine());\n\n // ?????£???????????????????\n int[] drowingLots = new int[vertical];\n // ???????????£???????????????´???????\n for (int i = 0; i < vertical; ++i) {\n drowingLots[i] = i + 1;\n }\n \n // ??¨???£? 2??????\n horizontal = Integer.parseInt(br.readLine());\n \n \n // ??¨??????\\?????????????????????????????????????????? 3????????\\???\n for (int i = 0; i < horizontal; ++i) {\n String input = br.readLine();\n if (input == null || input.isEmpty()) {\n break;\n }\n \n String[] change = input.split(\",\");\n int[] intInput = adjustment(change);\n \n // a1???????????????\n x = drowingLots[intInput[0]];\n // b1???a1?????\\??????\n drowingLots[intInput[0]] = drowingLots[intInput[1]];\n // a1???b1?????\\??????\n drowingLots[intInput[1]] = x;\n }\n \n for (int output : drowingLots) {\n System.out.println(output);\n }\n\n \n }\n \n // ??\\??????????????????int??????????????????-1??????\n private static int[] adjustment(String[] strInput) {\n // int????????????????????????\n int[] intInput = new int[strInput.length];\n \n intInput[0] = Integer.parseInt(strInput[0]) - 1;\n intInput[1] = Integer.parseInt(strInput[1]) - 1;\n \n return intInput;\n }\n \n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
// ?????£???????¬???°
int vertical = 0;
// ??¨???£???????¬???°
int horizontal = 0;
// ?????????????????????¨??????°
int x = 0;
vertical = Integer.parseInt(br.readLine());
// ?????£???????????????????
int[] drowingLots = new int[vertical];
// ???????????£???????????????´???????
for (int i = 0; i < vertical; ++i) {
drowingLots[i] = i + 1;
}
// ??¨???£? 2??????
horizontal = Integer.parseInt(br.readLine());
// ??¨??????\?????????????????????????????????????????? 3????????\???
for (int i = 0; i < horizontal; ++i) {
String input = br.readLine();
if (input == null || input.isEmpty()) {
break;
}
String[] change = input.split(",");
int[] intInput = adjustment(change);
// a1???????????????
x = drowingLots[intInput[0]];
// b1???a1?????\??????
drowingLots[intInput[0]] = drowingLots[intInput[1]];
// a1???b1?????\??????
drowingLots[intInput[1]] = x;
}
for (int output : drowingLots) {
System.out.println(output);
}
}
// ??\??????????????????int??????????????????-1??????
private static int[] adjustment(String[] strInput) {
// int????????????????????????
int[] intInput = new int[strInput.length];
intInput[0] = Integer.parseInt(strInput[0]) - 1;
intInput[1] = Integer.parseInt(strInput[1]) - 1;
return intInput;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
17,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
2,
13,
17,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
41,
13,
41,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
0,
13,
18,
13,
0,
13,
2,
4,
18,
13,
18,
13,
17,
17,
0,
18,
13,
13,
18,
13,
0,
13,
2,
4,
18,
13,
18,
13,
17,
17,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
133,
5
],
[
133,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
26,
27
],
[
26,
28
],
[
21,
29
],
[
29,
30
],
[
30,
31
],
[
21,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
33,
37
],
[
37,
38
],
[
37,
39
],
[
8,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
8,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
50,
51
],
[
50,
52
],
[
45,
53
],
[
53,
54
],
[
54,
55
],
[
45,
56
],
[
57,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
60,
61
],
[
57,
62
],
[
62,
63
],
[
57,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
57,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
57,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
85,
86
],
[
85,
87
],
[
81,
88
],
[
57,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
98,
101
],
[
101,
102
],
[
101,
103
],
[
97,
104
],
[
57,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
105,
109
],
[
8,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
110,
115
],
[
115,
116
],
[
115,
117
],
[
110,
118
],
[
118,
119
],
[
119,
120
],
[
110,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
122,
127
],
[
127,
128
],
[
127,
129
],
[
6,
130
],
[
130,
131
],
[
0,
132
],
[
132,
133
],
[
132,
134
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int[] array = new int[30];\n\n int w = scanner.nextInt();\n for (int i = 0; i < w; ++i) array[i] = i + 1;\n\n int n = scanner.nextInt();\n\n for (int i = 0; i < n; ++i) {\n int temp, a , b;\n String str = scanner.next();\n String[] num = str.split(\",\");\n temp = array[a = (Integer.parseInt(num[0]) - 1)];\n array[a] = array[b = (Integer.parseInt(num[1]) - 1)];\n array[b] = temp;\n }\n\n for (int i = 0; i < w; ++i) System.out.println(array[i]);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int[] array = new int[30];\n\n int w = scanner.nextInt();\n for (int i = 0; i < w; ++i) array[i] = i + 1;\n\n int n = scanner.nextInt();\n\n for (int i = 0; i < n; ++i) {\n int temp, a , b;\n String str = scanner.next();\n String[] num = str.split(\",\");\n temp = array[a = (Integer.parseInt(num[0]) - 1)];\n array[a] = array[b = (Integer.parseInt(num[1]) - 1)];\n array[b] = temp;\n }\n\n for (int i = 0; i < w; ++i) System.out.println(array[i]);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int[] array = new int[30];\n\n int w = scanner.nextInt();\n for (int i = 0; i < w; ++i) array[i] = i + 1;\n\n int n = scanner.nextInt();\n\n for (int i = 0; i < n; ++i) {\n int temp, a , b;\n String str = scanner.next();\n String[] num = str.split(\",\");\n temp = array[a = (Integer.parseInt(num[0]) - 1)];\n array[a] = array[b = (Integer.parseInt(num[1]) - 1)];\n array[b] = temp;\n }\n\n for (int i = 0; i < w; ++i) System.out.println(array[i]);\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n int[] array = new int[30];\n\n int w = scanner.nextInt();\n for (int i = 0; i < w; ++i) array[i] = i + 1;\n\n int n = scanner.nextInt();\n\n for (int i = 0; i < n; ++i) {\n int temp, a , b;\n String str = scanner.next();\n String[] num = str.split(\",\");\n temp = array[a = (Integer.parseInt(num[0]) - 1)];\n array[a] = array[b = (Integer.parseInt(num[1]) - 1)];\n array[b] = temp;\n }\n\n for (int i = 0; i < w; ++i) System.out.println(array[i]);\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int[] array = new int[30];",
"array",
"new int[30]",
"30",
"int w = scanner.nextInt();",
"w",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"for (int i = 0; i < w; ++i) array[i] = i + 1;",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"++i",
"++i",
"i",
"array[i] = i + 1;",
"array[i] = i + 1",
"array[i]",
"array",
"i",
"i + 1",
"i",
"1",
"int n = scanner.nextInt();",
"n",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"for (int i = 0; i < n; ++i) {\n int temp, a , b;\n String str = scanner.next();\n String[] num = str.split(\",\");\n temp = array[a = (Integer.parseInt(num[0]) - 1)];\n array[a] = array[b = (Integer.parseInt(num[1]) - 1)];\n array[b] = temp;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"++i",
"++i",
"i",
"{\n int temp, a , b;\n String str = scanner.next();\n String[] num = str.split(\",\");\n temp = array[a = (Integer.parseInt(num[0]) - 1)];\n array[a] = array[b = (Integer.parseInt(num[1]) - 1)];\n array[b] = temp;\n }",
"{\n int temp, a , b;\n String str = scanner.next();\n String[] num = str.split(\",\");\n temp = array[a = (Integer.parseInt(num[0]) - 1)];\n array[a] = array[b = (Integer.parseInt(num[1]) - 1)];\n array[b] = temp;\n }",
"int temp",
"temp",
"a",
"a",
"b;",
"b",
"String str = scanner.next();",
"str",
"scanner.next()",
"scanner.next",
"scanner",
"String[] num = str.split(\",\");",
"num",
"str.split(\",\")",
"str.split",
"str",
"\",\"",
"temp = array[a = (Integer.parseInt(num[0]) - 1)]",
"temp",
"array[a = (Integer.parseInt(num[0]) - 1)]",
"array",
"a = (Integer.parseInt(num[0]) - 1)",
"a",
"(Integer.parseInt(num[0]) - 1)",
"Integer.parseInt(num[0])",
"Integer.parseInt",
"Integer",
"num[0]",
"num",
"0",
"1",
"array[a] = array[b = (Integer.parseInt(num[1]) - 1)]",
"array[a]",
"array",
"a",
"array[b = (Integer.parseInt(num[1]) - 1)]",
"array",
"b = (Integer.parseInt(num[1]) - 1)",
"b",
"(Integer.parseInt(num[1]) - 1)",
"Integer.parseInt(num[1])",
"Integer.parseInt",
"Integer",
"num[1]",
"num",
"1",
"1",
"array[b] = temp",
"array[b]",
"array",
"b",
"temp",
"for (int i = 0; i < w; ++i) System.out.println(array[i]);",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"++i",
"++i",
"i",
"System.out.println(array[i]);",
"System.out.println(array[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"array[i]",
"array",
"i",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int[] array = new int[30];\n\n int w = scanner.nextInt();\n for (int i = 0; i < w; ++i) array[i] = i + 1;\n\n int n = scanner.nextInt();\n\n for (int i = 0; i < n; ++i) {\n int temp, a , b;\n String str = scanner.next();\n String[] num = str.split(\",\");\n temp = array[a = (Integer.parseInt(num[0]) - 1)];\n array[a] = array[b = (Integer.parseInt(num[1]) - 1)];\n array[b] = temp;\n }\n\n for (int i = 0; i < w; ++i) System.out.println(array[i]);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int[] array = new int[30];\n\n int w = scanner.nextInt();\n for (int i = 0; i < w; ++i) array[i] = i + 1;\n\n int n = scanner.nextInt();\n\n for (int i = 0; i < n; ++i) {\n int temp, a , b;\n String str = scanner.next();\n String[] num = str.split(\",\");\n temp = array[a = (Integer.parseInt(num[0]) - 1)];\n array[a] = array[b = (Integer.parseInt(num[1]) - 1)];\n array[b] = temp;\n }\n\n for (int i = 0; i < w; ++i) System.out.println(array[i]);\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int[] array = new int[30];
int w = scanner.nextInt();
for (int i = 0; i < w; ++i) array[i] = i + 1;
int n = scanner.nextInt();
for (int i = 0; i < n; ++i) {
int temp, a , b;
String str = scanner.next();
String[] num = str.split(",");
temp = array[a = (Integer.parseInt(num[0]) - 1)];
array[a] = array[b = (Integer.parseInt(num[1]) - 1)];
array[b] = temp;
}
for (int i = 0; i < w; ++i) System.out.println(array[i]);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
131,
8
],
[
131,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
28,
29
],
[
28,
30
],
[
11,
31
],
[
31,
32
],
[
32,
33
],
[
11,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
34,
42
],
[
42,
43
],
[
43,
44
],
[
34,
45
],
[
46,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
11,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
52,
60
],
[
60,
61
],
[
61,
62
],
[
52,
63
],
[
64,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
67,
72
],
[
67,
73
],
[
64,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
79,
80
],
[
79,
81
],
[
64,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
87,
88
],
[
87,
89
],
[
64,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
92,
94
],
[
64,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
99,
101
],
[
64,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
11,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
107,
112
],
[
112,
113
],
[
112,
114
],
[
107,
115
],
[
115,
116
],
[
116,
117
],
[
107,
118
],
[
119,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
120,
125
],
[
125,
126
],
[
125,
127
],
[
9,
128
],
[
128,
129
],
[
0,
130
],
[
130,
131
],
[
130,
132
]
] | [
"import java.util.Scanner;\nimport java.util.Arrays;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] num = new int[w+1];\n sc.nextLine();\n for(int i=1; i<=w; i++){\n num[i] = i;\n }\n for(int i=0; i<n; i++){\n String[] line = sc.nextLine().split(\",\",0);\n int a = Integer.parseInt(line[0]);\n int b = Integer.parseInt(line[1]);\n int tmp = num[a];\n num[a] = num[b];\n num[b] = tmp;\n }\n for(int i=1; i<=w; i++){\n System.out.println(num[i]);\n }\n }\n}\n\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] num = new int[w+1];\n sc.nextLine();\n for(int i=1; i<=w; i++){\n num[i] = i;\n }\n for(int i=0; i<n; i++){\n String[] line = sc.nextLine().split(\",\",0);\n int a = Integer.parseInt(line[0]);\n int b = Integer.parseInt(line[1]);\n int tmp = num[a];\n num[a] = num[b];\n num[b] = tmp;\n }\n for(int i=1; i<=w; i++){\n System.out.println(num[i]);\n }\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] num = new int[w+1];\n sc.nextLine();\n for(int i=1; i<=w; i++){\n num[i] = i;\n }\n for(int i=0; i<n; i++){\n String[] line = sc.nextLine().split(\",\",0);\n int a = Integer.parseInt(line[0]);\n int b = Integer.parseInt(line[1]);\n int tmp = num[a];\n num[a] = num[b];\n num[b] = tmp;\n }\n for(int i=1; i<=w; i++){\n System.out.println(num[i]);\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] num = new int[w+1];\n sc.nextLine();\n for(int i=1; i<=w; i++){\n num[i] = i;\n }\n for(int i=0; i<n; i++){\n String[] line = sc.nextLine().split(\",\",0);\n int a = Integer.parseInt(line[0]);\n int b = Integer.parseInt(line[1]);\n int tmp = num[a];\n num[a] = num[b];\n num[b] = tmp;\n }\n for(int i=1; i<=w; i++){\n System.out.println(num[i]);\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] num = new int[w+1];",
"num",
"new int[w+1]",
"w+1",
"w",
"1",
"sc.nextLine()",
"sc.nextLine",
"sc",
"for(int i=1; i<=w; i++){\n num[i] = i;\n }",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=w",
"i",
"w",
"i++",
"i++",
"i",
"{\n num[i] = i;\n }",
"{\n num[i] = i;\n }",
"num[i] = i",
"num[i]",
"num",
"i",
"i",
"for(int i=0; i<n; i++){\n String[] line = sc.nextLine().split(\",\",0);\n int a = Integer.parseInt(line[0]);\n int b = Integer.parseInt(line[1]);\n int tmp = num[a];\n num[a] = num[b];\n num[b] = tmp;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String[] line = sc.nextLine().split(\",\",0);\n int a = Integer.parseInt(line[0]);\n int b = Integer.parseInt(line[1]);\n int tmp = num[a];\n num[a] = num[b];\n num[b] = tmp;\n }",
"{\n String[] line = sc.nextLine().split(\",\",0);\n int a = Integer.parseInt(line[0]);\n int b = Integer.parseInt(line[1]);\n int tmp = num[a];\n num[a] = num[b];\n num[b] = tmp;\n }",
"String[] line = sc.nextLine().split(\",\",0);",
"line",
"sc.nextLine().split(\",\",0)",
"sc.nextLine().split",
"sc.nextLine()",
"sc.nextLine",
"sc",
"\",\"",
"0",
"int a = Integer.parseInt(line[0]);",
"a",
"Integer.parseInt(line[0])",
"Integer.parseInt",
"Integer",
"line[0]",
"line",
"0",
"int b = Integer.parseInt(line[1]);",
"b",
"Integer.parseInt(line[1])",
"Integer.parseInt",
"Integer",
"line[1]",
"line",
"1",
"int tmp = num[a];",
"tmp",
"num[a]",
"num",
"a",
"num[a] = num[b]",
"num[a]",
"num",
"a",
"num[b]",
"num",
"b",
"num[b] = tmp",
"num[b]",
"num",
"b",
"tmp",
"for(int i=1; i<=w; i++){\n System.out.println(num[i]);\n }",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=w",
"i",
"w",
"i++",
"i++",
"i",
"{\n System.out.println(num[i]);\n }",
"{\n System.out.println(num[i]);\n }",
"System.out.println(num[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"num[i]",
"num",
"i",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] num = new int[w+1];\n sc.nextLine();\n for(int i=1; i<=w; i++){\n num[i] = i;\n }\n for(int i=0; i<n; i++){\n String[] line = sc.nextLine().split(\",\",0);\n int a = Integer.parseInt(line[0]);\n int b = Integer.parseInt(line[1]);\n int tmp = num[a];\n num[a] = num[b];\n num[b] = tmp;\n }\n for(int i=1; i<=w; i++){\n System.out.println(num[i]);\n }\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] num = new int[w+1];\n sc.nextLine();\n for(int i=1; i<=w; i++){\n num[i] = i;\n }\n for(int i=0; i<n; i++){\n String[] line = sc.nextLine().split(\",\",0);\n int a = Integer.parseInt(line[0]);\n int b = Integer.parseInt(line[1]);\n int tmp = num[a];\n num[a] = num[b];\n num[b] = tmp;\n }\n for(int i=1; i<=w; i++){\n System.out.println(num[i]);\n }\n }\n}",
"Main"
] | import java.util.Scanner;
import java.util.Arrays;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int w = sc.nextInt();
int n = sc.nextInt();
int[] num = new int[w+1];
sc.nextLine();
for(int i=1; i<=w; i++){
num[i] = i;
}
for(int i=0; i<n; i++){
String[] line = sc.nextLine().split(",",0);
int a = Integer.parseInt(line[0]);
int b = Integer.parseInt(line[1]);
int tmp = num[a];
num[a] = num[b];
num[b] = tmp;
}
for(int i=1; i<=w; i++){
System.out.println(num[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
20,
4,
18,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
4,
18,
13,
18,
18,
13,
13,
17,
30,
0,
13,
18,
18,
13,
13,
17,
14,
4,
18,
13,
18,
18,
13,
13,
17,
30,
0,
13,
18,
18,
13,
13,
17,
41,
13,
2,
4,
18,
13,
13,
17,
0,
18,
13,
13,
4,
18,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
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
],
[
14,
15
],
[
15,
16
],
[
11,
17
],
[
17,
18
],
[
17,
19
],
[
20,
21
],
[
21,
22
],
[
11,
24
],
[
24,
25
],
[
24,
26
],
[
11,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
35,
37
],
[
28,
38
],
[
38,
39
],
[
39,
40
],
[
28,
41
],
[
42,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
47,
52
],
[
11,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
58,
59
],
[
58,
60
],
[
53,
61
],
[
61,
62
],
[
62,
63
],
[
53,
64
],
[
65,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
71,
72
],
[
71,
73
],
[
65,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
81,
83
],
[
74,
84
],
[
84,
85
],
[
85,
86
],
[
74,
87
],
[
88,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
89,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
89,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
106,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
118,
122
],
[
65,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
126,
129
],
[
125,
130
],
[
65,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
131,
135
],
[
135,
136
],
[
136,
137
],
[
135,
138
],
[
138,
139
],
[
138,
140
],
[
11,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
143,
145
],
[
141,
146
],
[
146,
147
],
[
146,
148
],
[
148,
149
],
[
148,
150
],
[
141,
151
],
[
151,
152
],
[
152,
153
],
[
141,
154
],
[
155,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
158,
159
],
[
158,
160
],
[
156,
161
],
[
161,
162
],
[
161,
163
],
[
9,
164
],
[
164,
165
],
[
0,
166
],
[
166,
167
],
[
166,
168
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\n\tpublic static void main(String[] args) {\n\t\t//?????°??????\n\t\tint vertical = sc.nextInt(); //???????????¬??°\n\t\tString[][] cross = new String[sc.nextInt()][2]; //?¨?????????¬??°\n\t\tString[] ans = new String[vertical];\n\n\t\t//?¨???????????´°???????????????\n\t\tfor(int count = 0; count < cross.length; count++) { //?¨?????????°????????°?????????\n\t\t\tcross[count] = sc.next().split(\",\");\n\t\t}\n\n\t\t//???????????????\n\t\tfor(int count = 0; count < vertical; count++) { //???????????¬??°??¶?????°?????????\n\t\t\tString dog = Integer.toString(count + 1);\n\n\t\t\tfor(int con = 0; con < cross.length; con++) { //?¨?????????¬??°??¶?????°?????????\n\t\t\t\tif(dog.equals(cross[con][0])) { //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][1];\n\t\t\t\t} else if(dog.equals(cross[con][1])) { //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][0];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint num = Integer.parseInt(dog) - 1;\n\t\t\tans[num] = Integer.toString(count + 1);\n\t\t}\n\n\t\t//??¨?????????\n\t\tfor(int count = 0; count < ans.length; count++) {\n\t\t\tSystem.out.println(ans[count]);\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\n\tpublic static void main(String[] args) {\n\t\t//?????°??????\n\t\tint vertical = sc.nextInt(); //???????????¬??°\n\t\tString[][] cross = new String[sc.nextInt()][2]; //?¨?????????¬??°\n\t\tString[] ans = new String[vertical];\n\n\t\t//?¨???????????´°???????????????\n\t\tfor(int count = 0; count < cross.length; count++) { //?¨?????????°????????°?????????\n\t\t\tcross[count] = sc.next().split(\",\");\n\t\t}\n\n\t\t//???????????????\n\t\tfor(int count = 0; count < vertical; count++) { //???????????¬??°??¶?????°?????????\n\t\t\tString dog = Integer.toString(count + 1);\n\n\t\t\tfor(int con = 0; con < cross.length; con++) { //?¨?????????¬??°??¶?????°?????????\n\t\t\t\tif(dog.equals(cross[con][0])) { //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][1];\n\t\t\t\t} else if(dog.equals(cross[con][1])) { //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][0];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint num = Integer.parseInt(dog) - 1;\n\t\t\tans[num] = Integer.toString(count + 1);\n\t\t}\n\n\t\t//??¨?????????\n\t\tfor(int count = 0; count < ans.length; count++) {\n\t\t\tSystem.out.println(ans[count]);\n\t\t}\n\t}\n}",
"Main",
"static Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"public static void main(String[] args) {\n\t\t//?????°??????\n\t\tint vertical = sc.nextInt(); //???????????¬??°\n\t\tString[][] cross = new String[sc.nextInt()][2]; //?¨?????????¬??°\n\t\tString[] ans = new String[vertical];\n\n\t\t//?¨???????????´°???????????????\n\t\tfor(int count = 0; count < cross.length; count++) { //?¨?????????°????????°?????????\n\t\t\tcross[count] = sc.next().split(\",\");\n\t\t}\n\n\t\t//???????????????\n\t\tfor(int count = 0; count < vertical; count++) { //???????????¬??°??¶?????°?????????\n\t\t\tString dog = Integer.toString(count + 1);\n\n\t\t\tfor(int con = 0; con < cross.length; con++) { //?¨?????????¬??°??¶?????°?????????\n\t\t\t\tif(dog.equals(cross[con][0])) { //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][1];\n\t\t\t\t} else if(dog.equals(cross[con][1])) { //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][0];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint num = Integer.parseInt(dog) - 1;\n\t\t\tans[num] = Integer.toString(count + 1);\n\t\t}\n\n\t\t//??¨?????????\n\t\tfor(int count = 0; count < ans.length; count++) {\n\t\t\tSystem.out.println(ans[count]);\n\t\t}\n\t}",
"main",
"{\n\t\t//?????°??????\n\t\tint vertical = sc.nextInt(); //???????????¬??°\n\t\tString[][] cross = new String[sc.nextInt()][2]; //?¨?????????¬??°\n\t\tString[] ans = new String[vertical];\n\n\t\t//?¨???????????´°???????????????\n\t\tfor(int count = 0; count < cross.length; count++) { //?¨?????????°????????°?????????\n\t\t\tcross[count] = sc.next().split(\",\");\n\t\t}\n\n\t\t//???????????????\n\t\tfor(int count = 0; count < vertical; count++) { //???????????¬??°??¶?????°?????????\n\t\t\tString dog = Integer.toString(count + 1);\n\n\t\t\tfor(int con = 0; con < cross.length; con++) { //?¨?????????¬??°??¶?????°?????????\n\t\t\t\tif(dog.equals(cross[con][0])) { //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][1];\n\t\t\t\t} else if(dog.equals(cross[con][1])) { //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][0];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint num = Integer.parseInt(dog) - 1;\n\t\t\tans[num] = Integer.toString(count + 1);\n\t\t}\n\n\t\t//??¨?????????\n\t\tfor(int count = 0; count < ans.length; count++) {\n\t\t\tSystem.out.println(ans[count]);\n\t\t}\n\t}",
"int vertical = sc.nextInt();",
"vertical",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String[][] cross = new String[sc.nextInt()][2];",
"cross",
"new String[sc.nextInt()][2]",
"sc.nextInt()",
"sc.nextInt",
"sc",
"2",
"String[] ans = new String[vertical];",
"ans",
"new String[vertical]",
"vertical",
"for(int count = 0; count < cross.length; count++) { //?¨?????????°????????°?????????\n\t\t\tcross[count] = sc.next().split(\",\");\n\t\t}",
"int count = 0;",
"int count = 0;",
"count",
"0",
"count < cross.length",
"count",
"cross.length",
"cross",
"cross.length",
"count++",
"count++",
"count",
"{ //?¨?????????°????????°?????????\n\t\t\tcross[count] = sc.next().split(\",\");\n\t\t}",
"{ //?¨?????????°????????°?????????\n\t\t\tcross[count] = sc.next().split(\",\");\n\t\t}",
"cross[count] = sc.next().split(\",\")",
"cross[count]",
"cross",
"count",
"sc.next().split(\",\")",
"sc.next().split",
"sc.next()",
"sc.next",
"sc",
"\",\"",
"for(int count = 0; count < vertical; count++) { //???????????¬??°??¶?????°?????????\n\t\t\tString dog = Integer.toString(count + 1);\n\n\t\t\tfor(int con = 0; con < cross.length; con++) { //?¨?????????¬??°??¶?????°?????????\n\t\t\t\tif(dog.equals(cross[con][0])) { //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][1];\n\t\t\t\t} else if(dog.equals(cross[con][1])) { //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][0];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint num = Integer.parseInt(dog) - 1;\n\t\t\tans[num] = Integer.toString(count + 1);\n\t\t}",
"int count = 0;",
"int count = 0;",
"count",
"0",
"count < vertical",
"count",
"vertical",
"count++",
"count++",
"count",
"{ //???????????¬??°??¶?????°?????????\n\t\t\tString dog = Integer.toString(count + 1);\n\n\t\t\tfor(int con = 0; con < cross.length; con++) { //?¨?????????¬??°??¶?????°?????????\n\t\t\t\tif(dog.equals(cross[con][0])) { //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][1];\n\t\t\t\t} else if(dog.equals(cross[con][1])) { //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][0];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint num = Integer.parseInt(dog) - 1;\n\t\t\tans[num] = Integer.toString(count + 1);\n\t\t}",
"{ //???????????¬??°??¶?????°?????????\n\t\t\tString dog = Integer.toString(count + 1);\n\n\t\t\tfor(int con = 0; con < cross.length; con++) { //?¨?????????¬??°??¶?????°?????????\n\t\t\t\tif(dog.equals(cross[con][0])) { //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][1];\n\t\t\t\t} else if(dog.equals(cross[con][1])) { //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][0];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint num = Integer.parseInt(dog) - 1;\n\t\t\tans[num] = Integer.toString(count + 1);\n\t\t}",
"String dog = Integer.toString(count + 1);",
"dog",
"Integer.toString(count + 1)",
"Integer.toString",
"Integer",
"count + 1",
"count",
"1",
"for(int con = 0; con < cross.length; con++) { //?¨?????????¬??°??¶?????°?????????\n\t\t\t\tif(dog.equals(cross[con][0])) { //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][1];\n\t\t\t\t} else if(dog.equals(cross[con][1])) { //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][0];\n\t\t\t\t}\n\t\t\t}",
"int con = 0;",
"int con = 0;",
"con",
"0",
"con < cross.length",
"con",
"cross.length",
"cross",
"cross.length",
"con++",
"con++",
"con",
"{ //?¨?????????¬??°??¶?????°?????????\n\t\t\t\tif(dog.equals(cross[con][0])) { //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][1];\n\t\t\t\t} else if(dog.equals(cross[con][1])) { //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][0];\n\t\t\t\t}\n\t\t\t}",
"{ //?¨?????????¬??°??¶?????°?????????\n\t\t\t\tif(dog.equals(cross[con][0])) { //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][1];\n\t\t\t\t} else if(dog.equals(cross[con][1])) { //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][0];\n\t\t\t\t}\n\t\t\t}",
"if(dog.equals(cross[con][0])) { //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][1];\n\t\t\t\t} else if(dog.equals(cross[con][1])) { //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][0];\n\t\t\t\t}",
"dog.equals(cross[con][0])",
"dog.equals",
"dog",
"cross[con][0]",
"cross[con]",
"cross",
"con",
"0",
"{ //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][1];\n\t\t\t\t}",
"dog = cross[con][1]",
"dog",
"cross[con][1]",
"cross[con]",
"cross",
"con",
"1",
"if(dog.equals(cross[con][1])) { //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][0];\n\t\t\t\t}",
"dog.equals(cross[con][1])",
"dog.equals",
"dog",
"cross[con][1]",
"cross[con]",
"cross",
"con",
"1",
"{ //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][0];\n\t\t\t\t}",
"dog = cross[con][0]",
"dog",
"cross[con][0]",
"cross[con]",
"cross",
"con",
"0",
"int num = Integer.parseInt(dog) - 1;",
"num",
"Integer.parseInt(dog) - 1",
"Integer.parseInt(dog)",
"Integer.parseInt",
"Integer",
"dog",
"1",
"ans[num] = Integer.toString(count + 1)",
"ans[num]",
"ans",
"num",
"Integer.toString(count + 1)",
"Integer.toString",
"Integer",
"count + 1",
"count",
"1",
"for(int count = 0; count < ans.length; count++) {\n\t\t\tSystem.out.println(ans[count]);\n\t\t}",
"int count = 0;",
"int count = 0;",
"count",
"0",
"count < ans.length",
"count",
"ans.length",
"ans",
"ans.length",
"count++",
"count++",
"count",
"{\n\t\t\tSystem.out.println(ans[count]);\n\t\t}",
"{\n\t\t\tSystem.out.println(ans[count]);\n\t\t}",
"System.out.println(ans[count])",
"System.out.println",
"System.out",
"System",
"System.out",
"ans[count]",
"ans",
"count",
"String[] args",
"args",
"public class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\n\tpublic static void main(String[] args) {\n\t\t//?????°??????\n\t\tint vertical = sc.nextInt(); //???????????¬??°\n\t\tString[][] cross = new String[sc.nextInt()][2]; //?¨?????????¬??°\n\t\tString[] ans = new String[vertical];\n\n\t\t//?¨???????????´°???????????????\n\t\tfor(int count = 0; count < cross.length; count++) { //?¨?????????°????????°?????????\n\t\t\tcross[count] = sc.next().split(\",\");\n\t\t}\n\n\t\t//???????????????\n\t\tfor(int count = 0; count < vertical; count++) { //???????????¬??°??¶?????°?????????\n\t\t\tString dog = Integer.toString(count + 1);\n\n\t\t\tfor(int con = 0; con < cross.length; con++) { //?¨?????????¬??°??¶?????°?????????\n\t\t\t\tif(dog.equals(cross[con][0])) { //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][1];\n\t\t\t\t} else if(dog.equals(cross[con][1])) { //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][0];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint num = Integer.parseInt(dog) - 1;\n\t\t\tans[num] = Integer.toString(count + 1);\n\t\t}\n\n\t\t//??¨?????????\n\t\tfor(int count = 0; count < ans.length; count++) {\n\t\t\tSystem.out.println(ans[count]);\n\t\t}\n\t}\n}",
"public class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\n\tpublic static void main(String[] args) {\n\t\t//?????°??????\n\t\tint vertical = sc.nextInt(); //???????????¬??°\n\t\tString[][] cross = new String[sc.nextInt()][2]; //?¨?????????¬??°\n\t\tString[] ans = new String[vertical];\n\n\t\t//?¨???????????´°???????????????\n\t\tfor(int count = 0; count < cross.length; count++) { //?¨?????????°????????°?????????\n\t\t\tcross[count] = sc.next().split(\",\");\n\t\t}\n\n\t\t//???????????????\n\t\tfor(int count = 0; count < vertical; count++) { //???????????¬??°??¶?????°?????????\n\t\t\tString dog = Integer.toString(count + 1);\n\n\t\t\tfor(int con = 0; con < cross.length; con++) { //?¨?????????¬??°??¶?????°?????????\n\t\t\t\tif(dog.equals(cross[con][0])) { //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][1];\n\t\t\t\t} else if(dog.equals(cross[con][1])) { //?¨?????????????????????¨???????????£???????????¨???\n\t\t\t\t\t//??\\????????????\n\t\t\t\t\tdog = cross[con][0];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint num = Integer.parseInt(dog) - 1;\n\t\t\tans[num] = Integer.toString(count + 1);\n\t\t}\n\n\t\t//??¨?????????\n\t\tfor(int count = 0; count < ans.length; count++) {\n\t\t\tSystem.out.println(ans[count]);\n\t\t}\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
//?????°??????
int vertical = sc.nextInt(); //???????????¬??°
String[][] cross = new String[sc.nextInt()][2]; //?¨?????????¬??°
String[] ans = new String[vertical];
//?¨???????????´°???????????????
for(int count = 0; count < cross.length; count++) { //?¨?????????°????????°?????????
cross[count] = sc.next().split(",");
}
//???????????????
for(int count = 0; count < vertical; count++) { //???????????¬??°??¶?????°?????????
String dog = Integer.toString(count + 1);
for(int con = 0; con < cross.length; con++) { //?¨?????????¬??°??¶?????°?????????
if(dog.equals(cross[con][0])) { //?¨?????????????????????¨???????????£???????????¨???
//??\????????????
dog = cross[con][1];
} else if(dog.equals(cross[con][1])) { //?¨?????????????????????¨???????????£???????????¨???
//??\????????????
dog = cross[con][0];
}
}
int num = Integer.parseInt(dog) - 1;
ans[num] = Integer.toString(count + 1);
}
//??¨?????????
for(int count = 0; count < ans.length; count++) {
System.out.println(ans[count]);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
17,
4,
18,
13,
17,
41,
13,
4,
18,
13,
4,
18,
13,
2,
4,
18,
13,
17,
17,
4,
18,
13,
0,
18,
13,
13,
20,
41,
13,
20,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
2,
4,
18,
13,
13,
17,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
0,
18,
36,
13,
13,
23,
13,
23,
13,
6,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
23,
13,
12,
13,
30,
41,
13,
13,
28,
13,
18,
36,
13,
30,
30,
14,
2,
13,
18,
13,
13,
0,
13,
18,
13,
13,
14,
2,
13,
18,
13,
13,
0,
13,
18,
13,
13,
29,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
213,
5
],
[
213,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
38,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
49,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
38,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
65,
70
],
[
62,
71
],
[
71,
72
],
[
72,
73
],
[
38,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
8,
79
],
[
79,
80
],
[
79,
81
],
[
8,
82
],
[
82,
83
],
[
82,
84
],
[
8,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
91,
92
],
[
91,
93
],
[
86,
94
],
[
94,
95
],
[
95,
96
],
[
86,
97
],
[
98,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
102,
107
],
[
99,
108
],
[
8,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
109,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
116,
118
],
[
109,
119
],
[
119,
120
],
[
120,
121
],
[
109,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
123,
128
],
[
128,
129
],
[
128,
130
],
[
8,
131
],
[
131,
132
],
[
132,
133
],
[
6,
134
],
[
134,
135
],
[
0,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
136,
140
],
[
140,
141
],
[
136,
142
],
[
142,
143
],
[
142,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
145,
149
],
[
144,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
150,
154
],
[
142,
155
],
[
155,
156
],
[
142,
157
],
[
157,
158
],
[
0,
159
],
[
159,
160
],
[
159,
161
],
[
161,
162
],
[
159,
163
],
[
163,
164
],
[
163,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
167,
169
],
[
166,
170
],
[
163,
171
],
[
171,
172
],
[
159,
173
],
[
173,
174
],
[
173,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
175,
179
],
[
179,
180
],
[
179,
181
],
[
181,
182
],
[
181,
183
],
[
179,
184
],
[
185,
185
],
[
185,
186
],
[
186,
187
],
[
187,
188
],
[
187,
189
],
[
189,
190
],
[
189,
191
],
[
186,
192
],
[
192,
193
],
[
192,
194
],
[
194,
195
],
[
194,
196
],
[
186,
197
],
[
197,
198
],
[
198,
199
],
[
198,
200
],
[
200,
201
],
[
200,
202
],
[
197,
203
],
[
203,
204
],
[
203,
205
],
[
205,
206
],
[
205,
207
],
[
175,
208
],
[
208,
209
],
[
173,
210
],
[
210,
211
],
[
0,
212
],
[
212,
213
],
[
212,
214
]
] | [
"import java.util.Scanner;\n\npublic class Main{\n\t\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tBridge[] b = new Bridge[n];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString in = sc.next();\n\t\t\tint x = Integer.parseInt(in.substring(0, in.indexOf(\",\")));\n\t\t\tint y = Integer.parseInt(in.substring(in.indexOf(\",\") + 1,\n\t\t\t\t\tin.length()));\n\t\t\tb[i] = new Bridge(x, y);\n\t\t}\n\t\tLot l = new Lot(b);\n\t\t\n\t\tint[] result = new int[w];\n\t\tfor(int i = 1; i <= w; i++){\n\t\t\tresult[l.lot(i) - 1] = i;\n\t\t}\n\t\tfor(int i = 0; i < result.length; i++)\n\t\t\tSystem.out.println(result[i]);\n\t\tsc.close();\n\t}\n\t\n}\n\nclass Bridge{\n\t\n\tint x;\n\tint y;\n\t\n\tBridge(int x, int y){\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}\n}\n\nclass Lot{\n\t\n\tBridge[] bridges;\n\t\n\tLot(Bridge... b){\n\t\tthis.bridges = b;\n\t}\n\t\n\tint lot(int num){\n\t\tint result = num;\n\t\tfor(Bridge b: this.bridges){\n\t\t\tif(result == b.x)\n\t\t\t\tresult = b.y;\n\t\t\telse if(result == b.y) result = b.x;\n\t\t}\n\t\treturn result;\n\t}\n\t\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\t\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tBridge[] b = new Bridge[n];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString in = sc.next();\n\t\t\tint x = Integer.parseInt(in.substring(0, in.indexOf(\",\")));\n\t\t\tint y = Integer.parseInt(in.substring(in.indexOf(\",\") + 1,\n\t\t\t\t\tin.length()));\n\t\t\tb[i] = new Bridge(x, y);\n\t\t}\n\t\tLot l = new Lot(b);\n\t\t\n\t\tint[] result = new int[w];\n\t\tfor(int i = 1; i <= w; i++){\n\t\t\tresult[l.lot(i) - 1] = i;\n\t\t}\n\t\tfor(int i = 0; i < result.length; i++)\n\t\t\tSystem.out.println(result[i]);\n\t\tsc.close();\n\t}\n\t\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tBridge[] b = new Bridge[n];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString in = sc.next();\n\t\t\tint x = Integer.parseInt(in.substring(0, in.indexOf(\",\")));\n\t\t\tint y = Integer.parseInt(in.substring(in.indexOf(\",\") + 1,\n\t\t\t\t\tin.length()));\n\t\t\tb[i] = new Bridge(x, y);\n\t\t}\n\t\tLot l = new Lot(b);\n\t\t\n\t\tint[] result = new int[w];\n\t\tfor(int i = 1; i <= w; i++){\n\t\t\tresult[l.lot(i) - 1] = i;\n\t\t}\n\t\tfor(int i = 0; i < result.length; i++)\n\t\t\tSystem.out.println(result[i]);\n\t\tsc.close();\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tBridge[] b = new Bridge[n];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString in = sc.next();\n\t\t\tint x = Integer.parseInt(in.substring(0, in.indexOf(\",\")));\n\t\t\tint y = Integer.parseInt(in.substring(in.indexOf(\",\") + 1,\n\t\t\t\t\tin.length()));\n\t\t\tb[i] = new Bridge(x, y);\n\t\t}\n\t\tLot l = new Lot(b);\n\t\t\n\t\tint[] result = new int[w];\n\t\tfor(int i = 1; i <= w; i++){\n\t\t\tresult[l.lot(i) - 1] = i;\n\t\t}\n\t\tfor(int i = 0; i < result.length; i++)\n\t\t\tSystem.out.println(result[i]);\n\t\tsc.close();\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Bridge[] b = new Bridge[n];",
"b",
"new Bridge[n]",
"n",
"for(int i = 0; i < n; i++){\n\t\t\tString in = sc.next();\n\t\t\tint x = Integer.parseInt(in.substring(0, in.indexOf(\",\")));\n\t\t\tint y = Integer.parseInt(in.substring(in.indexOf(\",\") + 1,\n\t\t\t\t\tin.length()));\n\t\t\tb[i] = new Bridge(x, y);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString in = sc.next();\n\t\t\tint x = Integer.parseInt(in.substring(0, in.indexOf(\",\")));\n\t\t\tint y = Integer.parseInt(in.substring(in.indexOf(\",\") + 1,\n\t\t\t\t\tin.length()));\n\t\t\tb[i] = new Bridge(x, y);\n\t\t}",
"{\n\t\t\tString in = sc.next();\n\t\t\tint x = Integer.parseInt(in.substring(0, in.indexOf(\",\")));\n\t\t\tint y = Integer.parseInt(in.substring(in.indexOf(\",\") + 1,\n\t\t\t\t\tin.length()));\n\t\t\tb[i] = new Bridge(x, y);\n\t\t}",
"String in = sc.next();",
"in",
"sc.next()",
"sc.next",
"sc",
"int x = Integer.parseInt(in.substring(0, in.indexOf(\",\")));",
"x",
"Integer.parseInt(in.substring(0, in.indexOf(\",\")))",
"Integer.parseInt",
"Integer",
"in.substring(0, in.indexOf(\",\"))",
"in.substring",
"in",
"0",
"in.indexOf(\",\")",
"in.indexOf",
"in",
"\",\"",
"int y = Integer.parseInt(in.substring(in.indexOf(\",\") + 1,\n\t\t\t\t\tin.length()));",
"y",
"Integer.parseInt(in.substring(in.indexOf(\",\") + 1,\n\t\t\t\t\tin.length()))",
"Integer.parseInt",
"Integer",
"in.substring(in.indexOf(\",\") + 1,\n\t\t\t\t\tin.length())",
"in.substring",
"in",
"in.indexOf(\",\") + 1",
"in.indexOf(\",\")",
"in.indexOf",
"in",
"\",\"",
"1",
"in.length()",
"in.length",
"in",
"b[i] = new Bridge(x, y)",
"b[i]",
"b",
"i",
"new Bridge(x, y)",
"Lot l = new Lot(b);",
"l",
"new Lot(b)",
"int[] result = new int[w];",
"result",
"new int[w]",
"w",
"for(int i = 1; i <= w; i++){\n\t\t\tresult[l.lot(i) - 1] = i;\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tresult[l.lot(i) - 1] = i;\n\t\t}",
"{\n\t\t\tresult[l.lot(i) - 1] = i;\n\t\t}",
"result[l.lot(i) - 1] = i",
"result[l.lot(i) - 1]",
"result",
"l.lot(i) - 1",
"l.lot(i)",
"l.lot",
"l",
"i",
"1",
"i",
"for(int i = 0; i < result.length; i++)\n\t\t\tSystem.out.println(result[i]);",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < result.length",
"i",
"result.length",
"result",
"result.length",
"i++",
"i++",
"i",
"System.out.println(result[i]);",
"System.out.println(result[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"result[i]",
"result",
"i",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"class Bridge{\n\t\n\tint x;\n\tint y;\n\t\n\tBridge(int x, int y){\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}\n}",
"Bridge",
"int x;",
"x",
"int y;",
"y",
"Bridge(int x, int y){\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}",
"Bridge",
"{\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}",
"this.x = x",
"this.x",
"this",
"this.x",
"x",
"this.y = y",
"this.y",
"this",
"this.y",
"y",
"int x",
"x",
"int y",
"y",
"class Lot{\n\t\n\tBridge[] bridges;\n\t\n\tLot(Bridge... b){\n\t\tthis.bridges = b;\n\t}\n\t\n\tint lot(int num){\n\t\tint result = num;\n\t\tfor(Bridge b: this.bridges){\n\t\t\tif(result == b.x)\n\t\t\t\tresult = b.y;\n\t\t\telse if(result == b.y) result = b.x;\n\t\t}\n\t\treturn result;\n\t}\n\t\n}",
"Lot",
"Bridge[] bridges;",
"bridges",
"Lot(Bridge... b){\n\t\tthis.bridges = b;\n\t}",
"Lot",
"{\n\t\tthis.bridges = b;\n\t}",
"this.bridges = b",
"this.bridges",
"this",
"this.bridges",
"b",
"Bridge... b",
"b",
"int lot(int num){\n\t\tint result = num;\n\t\tfor(Bridge b: this.bridges){\n\t\t\tif(result == b.x)\n\t\t\t\tresult = b.y;\n\t\t\telse if(result == b.y) result = b.x;\n\t\t}\n\t\treturn result;\n\t}",
"lot",
"{\n\t\tint result = num;\n\t\tfor(Bridge b: this.bridges){\n\t\t\tif(result == b.x)\n\t\t\t\tresult = b.y;\n\t\t\telse if(result == b.y) result = b.x;\n\t\t}\n\t\treturn result;\n\t}",
"int result = num;",
"result",
"num",
"for(Bridge b: this.bridges){\n\t\t\tif(result == b.x)\n\t\t\t\tresult = b.y;\n\t\t\telse if(result == b.y) result = b.x;\n\t\t}",
"Bridge b",
"this.bridges",
"this",
"this.bridges",
"{\n\t\t\tif(result == b.x)\n\t\t\t\tresult = b.y;\n\t\t\telse if(result == b.y) result = b.x;\n\t\t}",
"{\n\t\t\tif(result == b.x)\n\t\t\t\tresult = b.y;\n\t\t\telse if(result == b.y) result = b.x;\n\t\t}",
"if(result == b.x)\n\t\t\t\tresult = b.y;\n\t\t\telse if(result == b.y) result = b.x;",
"result == b.x",
"result",
"b.x",
"b",
"b.x",
"result = b.y",
"result",
"b.y",
"b",
"b.y",
"if(result == b.y) result = b.x;",
"result == b.y",
"result",
"b.y",
"b",
"b.y",
"result = b.x",
"result",
"b.x",
"b",
"b.x",
"return result;",
"result",
"int num",
"num",
"public class Main{\n\t\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tBridge[] b = new Bridge[n];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString in = sc.next();\n\t\t\tint x = Integer.parseInt(in.substring(0, in.indexOf(\",\")));\n\t\t\tint y = Integer.parseInt(in.substring(in.indexOf(\",\") + 1,\n\t\t\t\t\tin.length()));\n\t\t\tb[i] = new Bridge(x, y);\n\t\t}\n\t\tLot l = new Lot(b);\n\t\t\n\t\tint[] result = new int[w];\n\t\tfor(int i = 1; i <= w; i++){\n\t\t\tresult[l.lot(i) - 1] = i;\n\t\t}\n\t\tfor(int i = 0; i < result.length; i++)\n\t\t\tSystem.out.println(result[i]);\n\t\tsc.close();\n\t}\n\t\n}",
"public class Main{\n\t\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tBridge[] b = new Bridge[n];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString in = sc.next();\n\t\t\tint x = Integer.parseInt(in.substring(0, in.indexOf(\",\")));\n\t\t\tint y = Integer.parseInt(in.substring(in.indexOf(\",\") + 1,\n\t\t\t\t\tin.length()));\n\t\t\tb[i] = new Bridge(x, y);\n\t\t}\n\t\tLot l = new Lot(b);\n\t\t\n\t\tint[] result = new int[w];\n\t\tfor(int i = 1; i <= w; i++){\n\t\t\tresult[l.lot(i) - 1] = i;\n\t\t}\n\t\tfor(int i = 0; i < result.length; i++)\n\t\t\tSystem.out.println(result[i]);\n\t\tsc.close();\n\t}\n\t\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int w = sc.nextInt();
int n = sc.nextInt();
Bridge[] b = new Bridge[n];
for(int i = 0; i < n; i++){
String in = sc.next();
int x = Integer.parseInt(in.substring(0, in.indexOf(",")));
int y = Integer.parseInt(in.substring(in.indexOf(",") + 1,
in.length()));
b[i] = new Bridge(x, y);
}
Lot l = new Lot(b);
int[] result = new int[w];
for(int i = 1; i <= w; i++){
result[l.lot(i) - 1] = i;
}
for(int i = 0; i < result.length; i++)
System.out.println(result[i]);
sc.close();
}
}
class Bridge{
int x;
int y;
Bridge(int x, int y){
this.x = x;
this.y = y;
}
}
class Lot{
Bridge[] bridges;
Lot(Bridge... b){
this.bridges = b;
}
int lot(int num){
int result = num;
for(Bridge b: this.bridges){
if(result == b.x)
result = b.y;
else if(result == b.y) result = b.x;
}
return result;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
38,
30,
4,
18,
13,
30,
0,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
13,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
131,
5
],
[
131,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
15,
16
],
[
12,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
17,
26
],
[
26,
27
],
[
26,
28
],
[
17,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
30,
38
],
[
38,
39
],
[
39,
40
],
[
30,
41
],
[
42,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
47,
49
],
[
17,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
17,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
60,
61
],
[
60,
62
],
[
55,
63
],
[
63,
64
],
[
64,
65
],
[
55,
66
],
[
67,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
70,
75
],
[
67,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
81,
82
],
[
81,
83
],
[
67,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
89,
90
],
[
89,
91
],
[
67,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
96,
98
],
[
67,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
102,
104
],
[
99,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
107,
109
],
[
67,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
113,
115
],
[
110,
116
],
[
17,
117
],
[
117,
118
],
[
117,
119
],
[
117,
120
],
[
121,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
122,
127
],
[
6,
128
],
[
128,
129
],
[
0,
130
],
[
130,
131
],
[
130,
132
]
] | [
"\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = null;\n\t\ttry {\n\t\t\tsc = new Scanner(System.in);\n\t\t\t// 縦線の数\n\t\t\tint w = sc.nextInt();\n\t\t\t// あみだのスタートライン\n\t\t\tint[] nums = new int[w];\n\t\t\tfor (int i = 0; i < w; i++) {\n\t\t\t\tnums[i] = i + 1;\n\t\t\t}\n\n\t\t\t// 横線の数\n\t\t\tint n = sc.nextInt();\n\n\t\t\t// 横線を引く\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tString[] input = sc.next().split(\",\");\n\t\t\t\tint a = Integer.parseInt(input[0]);\n\t\t\t\tint b = Integer.parseInt(input[1]);\n\n\t\t\t\tint work = nums[a - 1];\n\t\t\t\tnums[a - 1] = nums[b - 1];\n\t\t\t\tnums[b - 1] = work;\n\t\t\t}\n\n\t\t\t// 結果出力\n\t\t\tfor (int result : nums) {\n\t\t\t\tSystem.out.println(result);\n\t\t\t}\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = null;\n\t\ttry {\n\t\t\tsc = new Scanner(System.in);\n\t\t\t// 縦線の数\n\t\t\tint w = sc.nextInt();\n\t\t\t// あみだのスタートライン\n\t\t\tint[] nums = new int[w];\n\t\t\tfor (int i = 0; i < w; i++) {\n\t\t\t\tnums[i] = i + 1;\n\t\t\t}\n\n\t\t\t// 横線の数\n\t\t\tint n = sc.nextInt();\n\n\t\t\t// 横線を引く\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tString[] input = sc.next().split(\",\");\n\t\t\t\tint a = Integer.parseInt(input[0]);\n\t\t\t\tint b = Integer.parseInt(input[1]);\n\n\t\t\t\tint work = nums[a - 1];\n\t\t\t\tnums[a - 1] = nums[b - 1];\n\t\t\t\tnums[b - 1] = work;\n\t\t\t}\n\n\t\t\t// 結果出力\n\t\t\tfor (int result : nums) {\n\t\t\t\tSystem.out.println(result);\n\t\t\t}\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\n\t\tScanner sc = null;\n\t\ttry {\n\t\t\tsc = new Scanner(System.in);\n\t\t\t// 縦線の数\n\t\t\tint w = sc.nextInt();\n\t\t\t// あみだのスタートライン\n\t\t\tint[] nums = new int[w];\n\t\t\tfor (int i = 0; i < w; i++) {\n\t\t\t\tnums[i] = i + 1;\n\t\t\t}\n\n\t\t\t// 横線の数\n\t\t\tint n = sc.nextInt();\n\n\t\t\t// 横線を引く\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tString[] input = sc.next().split(\",\");\n\t\t\t\tint a = Integer.parseInt(input[0]);\n\t\t\t\tint b = Integer.parseInt(input[1]);\n\n\t\t\t\tint work = nums[a - 1];\n\t\t\t\tnums[a - 1] = nums[b - 1];\n\t\t\t\tnums[b - 1] = work;\n\t\t\t}\n\n\t\t\t// 結果出力\n\t\t\tfor (int result : nums) {\n\t\t\t\tSystem.out.println(result);\n\t\t\t}\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}\n\t}",
"main",
"{\n\n\t\tScanner sc = null;\n\t\ttry {\n\t\t\tsc = new Scanner(System.in);\n\t\t\t// 縦線の数\n\t\t\tint w = sc.nextInt();\n\t\t\t// あみだのスタートライン\n\t\t\tint[] nums = new int[w];\n\t\t\tfor (int i = 0; i < w; i++) {\n\t\t\t\tnums[i] = i + 1;\n\t\t\t}\n\n\t\t\t// 横線の数\n\t\t\tint n = sc.nextInt();\n\n\t\t\t// 横線を引く\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tString[] input = sc.next().split(\",\");\n\t\t\t\tint a = Integer.parseInt(input[0]);\n\t\t\t\tint b = Integer.parseInt(input[1]);\n\n\t\t\t\tint work = nums[a - 1];\n\t\t\t\tnums[a - 1] = nums[b - 1];\n\t\t\t\tnums[b - 1] = work;\n\t\t\t}\n\n\t\t\t// 結果出力\n\t\t\tfor (int result : nums) {\n\t\t\t\tSystem.out.println(result);\n\t\t\t}\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}\n\t}",
"Scanner sc = null;",
"sc",
"null",
"try {\n\t\t\tsc = new Scanner(System.in);\n\t\t\t// 縦線の数\n\t\t\tint w = sc.nextInt();\n\t\t\t// あみだのスタートライン\n\t\t\tint[] nums = new int[w];\n\t\t\tfor (int i = 0; i < w; i++) {\n\t\t\t\tnums[i] = i + 1;\n\t\t\t}\n\n\t\t\t// 横線の数\n\t\t\tint n = sc.nextInt();\n\n\t\t\t// 横線を引く\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tString[] input = sc.next().split(\",\");\n\t\t\t\tint a = Integer.parseInt(input[0]);\n\t\t\t\tint b = Integer.parseInt(input[1]);\n\n\t\t\t\tint work = nums[a - 1];\n\t\t\t\tnums[a - 1] = nums[b - 1];\n\t\t\t\tnums[b - 1] = work;\n\t\t\t}\n\n\t\t\t// 結果出力\n\t\t\tfor (int result : nums) {\n\t\t\t\tSystem.out.println(result);\n\t\t\t}\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}",
"{\n\t\t\tsc.close();\n\t\t}",
"sc.close()",
"sc.close",
"sc",
"{\n\t\t\tsc = new Scanner(System.in);\n\t\t\t// 縦線の数\n\t\t\tint w = sc.nextInt();\n\t\t\t// あみだのスタートライン\n\t\t\tint[] nums = new int[w];\n\t\t\tfor (int i = 0; i < w; i++) {\n\t\t\t\tnums[i] = i + 1;\n\t\t\t}\n\n\t\t\t// 横線の数\n\t\t\tint n = sc.nextInt();\n\n\t\t\t// 横線を引く\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tString[] input = sc.next().split(\",\");\n\t\t\t\tint a = Integer.parseInt(input[0]);\n\t\t\t\tint b = Integer.parseInt(input[1]);\n\n\t\t\t\tint work = nums[a - 1];\n\t\t\t\tnums[a - 1] = nums[b - 1];\n\t\t\t\tnums[b - 1] = work;\n\t\t\t}\n\n\t\t\t// 結果出力\n\t\t\tfor (int result : nums) {\n\t\t\t\tSystem.out.println(result);\n\t\t\t}\n\t\t}",
"sc = new Scanner(System.in)",
"sc",
"new Scanner(System.in)",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] nums = new int[w];",
"nums",
"new int[w]",
"w",
"for (int i = 0; i < w; i++) {\n\t\t\t\tnums[i] = i + 1;\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\t\tnums[i] = i + 1;\n\t\t\t}",
"{\n\t\t\t\tnums[i] = i + 1;\n\t\t\t}",
"nums[i] = i + 1",
"nums[i]",
"nums",
"i",
"i + 1",
"i",
"1",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int i = 0; i < n; i++) {\n\t\t\t\tString[] input = sc.next().split(\",\");\n\t\t\t\tint a = Integer.parseInt(input[0]);\n\t\t\t\tint b = Integer.parseInt(input[1]);\n\n\t\t\t\tint work = nums[a - 1];\n\t\t\t\tnums[a - 1] = nums[b - 1];\n\t\t\t\tnums[b - 1] = work;\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\tString[] input = sc.next().split(\",\");\n\t\t\t\tint a = Integer.parseInt(input[0]);\n\t\t\t\tint b = Integer.parseInt(input[1]);\n\n\t\t\t\tint work = nums[a - 1];\n\t\t\t\tnums[a - 1] = nums[b - 1];\n\t\t\t\tnums[b - 1] = work;\n\t\t\t}",
"{\n\t\t\t\tString[] input = sc.next().split(\",\");\n\t\t\t\tint a = Integer.parseInt(input[0]);\n\t\t\t\tint b = Integer.parseInt(input[1]);\n\n\t\t\t\tint work = nums[a - 1];\n\t\t\t\tnums[a - 1] = nums[b - 1];\n\t\t\t\tnums[b - 1] = work;\n\t\t\t}",
"String[] input = sc.next().split(\",\");",
"input",
"sc.next().split(\",\")",
"sc.next().split",
"sc.next()",
"sc.next",
"sc",
"\",\"",
"int a = Integer.parseInt(input[0]);",
"a",
"Integer.parseInt(input[0])",
"Integer.parseInt",
"Integer",
"input[0]",
"input",
"0",
"int b = Integer.parseInt(input[1]);",
"b",
"Integer.parseInt(input[1])",
"Integer.parseInt",
"Integer",
"input[1]",
"input",
"1",
"int work = nums[a - 1];",
"work",
"nums[a - 1]",
"nums",
"a - 1",
"a",
"1",
"nums[a - 1] = nums[b - 1]",
"nums[a - 1]",
"nums",
"a - 1",
"a",
"1",
"nums[b - 1]",
"nums",
"b - 1",
"b",
"1",
"nums[b - 1] = work",
"nums[b - 1]",
"nums",
"b - 1",
"b",
"1",
"work",
"for (int result : nums) {\n\t\t\t\tSystem.out.println(result);\n\t\t\t}",
"int result",
"nums",
"{\n\t\t\t\tSystem.out.println(result);\n\t\t\t}",
"{\n\t\t\t\tSystem.out.println(result);\n\t\t\t}",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = null;\n\t\ttry {\n\t\t\tsc = new Scanner(System.in);\n\t\t\t// 縦線の数\n\t\t\tint w = sc.nextInt();\n\t\t\t// あみだのスタートライン\n\t\t\tint[] nums = new int[w];\n\t\t\tfor (int i = 0; i < w; i++) {\n\t\t\t\tnums[i] = i + 1;\n\t\t\t}\n\n\t\t\t// 横線の数\n\t\t\tint n = sc.nextInt();\n\n\t\t\t// 横線を引く\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tString[] input = sc.next().split(\",\");\n\t\t\t\tint a = Integer.parseInt(input[0]);\n\t\t\t\tint b = Integer.parseInt(input[1]);\n\n\t\t\t\tint work = nums[a - 1];\n\t\t\t\tnums[a - 1] = nums[b - 1];\n\t\t\t\tnums[b - 1] = work;\n\t\t\t}\n\n\t\t\t// 結果出力\n\t\t\tfor (int result : nums) {\n\t\t\t\tSystem.out.println(result);\n\t\t\t}\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = null;\n\t\ttry {\n\t\t\tsc = new Scanner(System.in);\n\t\t\t// 縦線の数\n\t\t\tint w = sc.nextInt();\n\t\t\t// あみだのスタートライン\n\t\t\tint[] nums = new int[w];\n\t\t\tfor (int i = 0; i < w; i++) {\n\t\t\t\tnums[i] = i + 1;\n\t\t\t}\n\n\t\t\t// 横線の数\n\t\t\tint n = sc.nextInt();\n\n\t\t\t// 横線を引く\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tString[] input = sc.next().split(\",\");\n\t\t\t\tint a = Integer.parseInt(input[0]);\n\t\t\t\tint b = Integer.parseInt(input[1]);\n\n\t\t\t\tint work = nums[a - 1];\n\t\t\t\tnums[a - 1] = nums[b - 1];\n\t\t\t\tnums[b - 1] = work;\n\t\t\t}\n\n\t\t\t// 結果出力\n\t\t\tfor (int result : nums) {\n\t\t\t\tSystem.out.println(result);\n\t\t\t}\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = null;
try {
sc = new Scanner(System.in);
// 縦線の数
int w = sc.nextInt();
// あみだのスタートライン
int[] nums = new int[w];
for (int i = 0; i < w; i++) {
nums[i] = i + 1;
}
// 横線の数
int n = sc.nextInt();
// 横線を引く
for (int i = 0; i < n; i++) {
String[] input = sc.next().split(",");
int a = Integer.parseInt(input[0]);
int b = Integer.parseInt(input[1]);
int work = nums[a - 1];
nums[a - 1] = nums[b - 1];
nums[b - 1] = work;
}
// 結果出力
for (int result : nums) {
System.out.println(result);
}
} finally {
sc.close();
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
141,
11
],
[
141,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
14,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
39,
41
],
[
32,
42
],
[
42,
43
],
[
43,
44
],
[
32,
45
],
[
46,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
51,
53
],
[
14,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
59,
60
],
[
59,
61
],
[
54,
62
],
[
62,
63
],
[
63,
64
],
[
54,
65
],
[
66,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
66,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
66,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
84,
85
],
[
84,
86
],
[
80,
87
],
[
66,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
94,
95
],
[
94,
96
],
[
90,
97
],
[
66,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
100,
102
],
[
66,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
107,
108
],
[
107,
109
],
[
66,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
14,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
115,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
122,
124
],
[
115,
125
],
[
125,
126
],
[
126,
127
],
[
115,
128
],
[
129,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
130,
135
],
[
135,
136
],
[
135,
137
],
[
12,
138
],
[
138,
139
],
[
0,
140
],
[
140,
141
],
[
140,
142
]
] | [
"import java.util.Scanner;\nimport java.lang.Math;\nimport java.util.Random;\n\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n//\t\tRandom rnd = new Random();\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] values = new int[w];\n\t\tfor(int i=0; i<values.length; i++){\n\t\t\tvalues[i] = i+1;\n\t\t}\n\t\tfor(int i=0; i<n; i++){\n\t\t\tString str = sc.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\tint x = values[a];\n\t\t\tvalues[a] = values[b];\n\t\t\tvalues[b] = x; \n\t\t}\n\n\t\tfor(int i=0; i<values.length; i++){\n\t\t\tSystem.out.println(values[i]);\n\t\t}\n\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.lang.Math;",
"Math",
"java.lang",
"import java.util.Random;",
"Random",
"java.util",
"public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n//\t\tRandom rnd = new Random();\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] values = new int[w];\n\t\tfor(int i=0; i<values.length; i++){\n\t\t\tvalues[i] = i+1;\n\t\t}\n\t\tfor(int i=0; i<n; i++){\n\t\t\tString str = sc.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\tint x = values[a];\n\t\t\tvalues[a] = values[b];\n\t\t\tvalues[b] = x; \n\t\t}\n\n\t\tfor(int i=0; i<values.length; i++){\n\t\t\tSystem.out.println(values[i]);\n\t\t}\n\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n//\t\tRandom rnd = new Random();\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] values = new int[w];\n\t\tfor(int i=0; i<values.length; i++){\n\t\t\tvalues[i] = i+1;\n\t\t}\n\t\tfor(int i=0; i<n; i++){\n\t\t\tString str = sc.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\tint x = values[a];\n\t\t\tvalues[a] = values[b];\n\t\t\tvalues[b] = x; \n\t\t}\n\n\t\tfor(int i=0; i<values.length; i++){\n\t\t\tSystem.out.println(values[i]);\n\t\t}\n\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n//\t\tRandom rnd = new Random();\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] values = new int[w];\n\t\tfor(int i=0; i<values.length; i++){\n\t\t\tvalues[i] = i+1;\n\t\t}\n\t\tfor(int i=0; i<n; i++){\n\t\t\tString str = sc.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\tint x = values[a];\n\t\t\tvalues[a] = values[b];\n\t\t\tvalues[b] = x; \n\t\t}\n\n\t\tfor(int i=0; i<values.length; i++){\n\t\t\tSystem.out.println(values[i]);\n\t\t}\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] values = new int[w];",
"values",
"new int[w]",
"w",
"for(int i=0; i<values.length; i++){\n\t\t\tvalues[i] = i+1;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<values.length",
"i",
"values.length",
"values",
"values.length",
"i++",
"i++",
"i",
"{\n\t\t\tvalues[i] = i+1;\n\t\t}",
"{\n\t\t\tvalues[i] = i+1;\n\t\t}",
"values[i] = i+1",
"values[i]",
"values",
"i",
"i+1",
"i",
"1",
"for(int i=0; i<n; i++){\n\t\t\tString str = sc.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\tint x = values[a];\n\t\t\tvalues[a] = values[b];\n\t\t\tvalues[b] = x; \n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString str = sc.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\tint x = values[a];\n\t\t\tvalues[a] = values[b];\n\t\t\tvalues[b] = x; \n\t\t}",
"{\n\t\t\tString str = sc.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\tint x = values[a];\n\t\t\tvalues[a] = values[b];\n\t\t\tvalues[b] = x; \n\t\t}",
"String str = sc.next();",
"str",
"sc.next()",
"sc.next",
"sc",
"String[] ab = str.split(\",\");",
"ab",
"str.split(\",\")",
"str.split",
"str",
"\",\"",
"int a = Integer.parseInt(ab[0]) - 1;",
"a",
"Integer.parseInt(ab[0]) - 1",
"Integer.parseInt(ab[0])",
"Integer.parseInt",
"Integer",
"ab[0]",
"ab",
"0",
"1",
"int b = Integer.parseInt(ab[1]) - 1;",
"b",
"Integer.parseInt(ab[1]) - 1",
"Integer.parseInt(ab[1])",
"Integer.parseInt",
"Integer",
"ab[1]",
"ab",
"1",
"1",
"int x = values[a];",
"x",
"values[a]",
"values",
"a",
"values[a] = values[b]",
"values[a]",
"values",
"a",
"values[b]",
"values",
"b",
"values[b] = x",
"values[b]",
"values",
"b",
"x",
"for(int i=0; i<values.length; i++){\n\t\t\tSystem.out.println(values[i]);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<values.length",
"i",
"values.length",
"values",
"values.length",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(values[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(values[i]);\n\t\t}",
"System.out.println(values[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"values[i]",
"values",
"i",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n//\t\tRandom rnd = new Random();\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] values = new int[w];\n\t\tfor(int i=0; i<values.length; i++){\n\t\t\tvalues[i] = i+1;\n\t\t}\n\t\tfor(int i=0; i<n; i++){\n\t\t\tString str = sc.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\tint x = values[a];\n\t\t\tvalues[a] = values[b];\n\t\t\tvalues[b] = x; \n\t\t}\n\n\t\tfor(int i=0; i<values.length; i++){\n\t\t\tSystem.out.println(values[i]);\n\t\t}\n\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n//\t\tRandom rnd = new Random();\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] values = new int[w];\n\t\tfor(int i=0; i<values.length; i++){\n\t\t\tvalues[i] = i+1;\n\t\t}\n\t\tfor(int i=0; i<n; i++){\n\t\t\tString str = sc.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\tint x = values[a];\n\t\t\tvalues[a] = values[b];\n\t\t\tvalues[b] = x; \n\t\t}\n\n\t\tfor(int i=0; i<values.length; i++){\n\t\t\tSystem.out.println(values[i]);\n\t\t}\n\n\t}\n}",
"Main"
] | import java.util.Scanner;
import java.lang.Math;
import java.util.Random;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// Random rnd = new Random();
int w = sc.nextInt();
int n = sc.nextInt();
int[] values = new int[w];
for(int i=0; i<values.length; i++){
values[i] = i+1;
}
for(int i=0; i<n; i++){
String str = sc.next();
String[] ab = str.split(",");
int a = Integer.parseInt(ab[0]) - 1;
int b = Integer.parseInt(ab[1]) - 1;
int x = values[a];
values[a] = values[b];
values[b] = x;
}
for(int i=0; i<values.length; i++){
System.out.println(values[i]);
}
}
} |
[
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,
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,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
13,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
134,
11
],
[
134,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
20,
23
],
[
23,
24
],
[
24,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
31,
32
],
[
32,
33
],
[
14,
34
],
[
34,
35
],
[
34,
36
],
[
14,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
43,
44
],
[
43,
45
],
[
38,
46
],
[
46,
47
],
[
47,
48
],
[
38,
49
],
[
50,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
55,
57
],
[
14,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
63,
64
],
[
63,
65
],
[
58,
66
],
[
66,
67
],
[
67,
68
],
[
58,
69
],
[
70,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
73,
78
],
[
70,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
84,
85
],
[
84,
86
],
[
70,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
92,
93
],
[
92,
94
],
[
70,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
99,
101
],
[
70,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
105,
107
],
[
102,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
110,
112
],
[
70,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
116,
118
],
[
113,
119
],
[
14,
120
],
[
120,
121
],
[
120,
122
],
[
120,
123
],
[
124,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
125,
130
],
[
12,
131
],
[
131,
132
],
[
0,
133
],
[
133,
134
],
[
133,
135
]
] | [
"import java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.BufferedReader;\n\npublic class Main{\n public static void main(String[] args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n int w = Integer.parseInt(br.readLine());\n int n = Integer.parseInt(br.readLine());\n\n int[] array = new int[w];\n for(int i = 0; i < w; i++){\n array[i] = i+1;\n }\n\n for(int i = 0; i < n; i++){\n String[] input = br.readLine().split(\",\");\n int a = Integer.parseInt(input[0]);\n int b = Integer.parseInt(input[1]); \n \n int tmp = array[a-1];\n array[a-1] = array[b-1];\n array[b-1] = tmp;\n }\n\n for(int i : array){\n System.out.println(i);\n }\n }\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"public class Main{\n public static void main(String[] args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n int w = Integer.parseInt(br.readLine());\n int n = Integer.parseInt(br.readLine());\n\n int[] array = new int[w];\n for(int i = 0; i < w; i++){\n array[i] = i+1;\n }\n\n for(int i = 0; i < n; i++){\n String[] input = br.readLine().split(\",\");\n int a = Integer.parseInt(input[0]);\n int b = Integer.parseInt(input[1]); \n \n int tmp = array[a-1];\n array[a-1] = array[b-1];\n array[b-1] = tmp;\n }\n\n for(int i : array){\n System.out.println(i);\n }\n }\n}",
"Main",
"public static void main(String[] args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n int w = Integer.parseInt(br.readLine());\n int n = Integer.parseInt(br.readLine());\n\n int[] array = new int[w];\n for(int i = 0; i < w; i++){\n array[i] = i+1;\n }\n\n for(int i = 0; i < n; i++){\n String[] input = br.readLine().split(\",\");\n int a = Integer.parseInt(input[0]);\n int b = Integer.parseInt(input[1]); \n \n int tmp = array[a-1];\n array[a-1] = array[b-1];\n array[b-1] = tmp;\n }\n\n for(int i : array){\n System.out.println(i);\n }\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n int w = Integer.parseInt(br.readLine());\n int n = Integer.parseInt(br.readLine());\n\n int[] array = new int[w];\n for(int i = 0; i < w; i++){\n array[i] = i+1;\n }\n\n for(int i = 0; i < n; i++){\n String[] input = br.readLine().split(\",\");\n int a = Integer.parseInt(input[0]);\n int b = Integer.parseInt(input[1]); \n \n int tmp = array[a-1];\n array[a-1] = array[b-1];\n array[b-1] = tmp;\n }\n\n for(int i : array){\n System.out.println(i);\n }\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int w = Integer.parseInt(br.readLine());",
"w",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int n = Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int[] array = new int[w];",
"array",
"new int[w]",
"w",
"for(int i = 0; i < w; i++){\n array[i] = i+1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n array[i] = i+1;\n }",
"{\n array[i] = i+1;\n }",
"array[i] = i+1",
"array[i]",
"array",
"i",
"i+1",
"i",
"1",
"for(int i = 0; i < n; i++){\n String[] input = br.readLine().split(\",\");\n int a = Integer.parseInt(input[0]);\n int b = Integer.parseInt(input[1]); \n \n int tmp = array[a-1];\n array[a-1] = array[b-1];\n array[b-1] = tmp;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String[] input = br.readLine().split(\",\");\n int a = Integer.parseInt(input[0]);\n int b = Integer.parseInt(input[1]); \n \n int tmp = array[a-1];\n array[a-1] = array[b-1];\n array[b-1] = tmp;\n }",
"{\n String[] input = br.readLine().split(\",\");\n int a = Integer.parseInt(input[0]);\n int b = Integer.parseInt(input[1]); \n \n int tmp = array[a-1];\n array[a-1] = array[b-1];\n array[b-1] = tmp;\n }",
"String[] input = br.readLine().split(\",\");",
"input",
"br.readLine().split(\",\")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\",\"",
"int a = Integer.parseInt(input[0]);",
"a",
"Integer.parseInt(input[0])",
"Integer.parseInt",
"Integer",
"input[0]",
"input",
"0",
"int b = Integer.parseInt(input[1]);",
"b",
"Integer.parseInt(input[1])",
"Integer.parseInt",
"Integer",
"input[1]",
"input",
"1",
"int tmp = array[a-1];",
"tmp",
"array[a-1]",
"array",
"a-1",
"a",
"1",
"array[a-1] = array[b-1]",
"array[a-1]",
"array",
"a-1",
"a",
"1",
"array[b-1]",
"array",
"b-1",
"b",
"1",
"array[b-1] = tmp",
"array[b-1]",
"array",
"b-1",
"b",
"1",
"tmp",
"for(int i : array){\n System.out.println(i);\n }",
"int i",
"array",
"{\n System.out.println(i);\n }",
"{\n System.out.println(i);\n }",
"System.out.println(i)",
"System.out.println",
"System.out",
"System",
"System.out",
"i",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n int w = Integer.parseInt(br.readLine());\n int n = Integer.parseInt(br.readLine());\n\n int[] array = new int[w];\n for(int i = 0; i < w; i++){\n array[i] = i+1;\n }\n\n for(int i = 0; i < n; i++){\n String[] input = br.readLine().split(\",\");\n int a = Integer.parseInt(input[0]);\n int b = Integer.parseInt(input[1]); \n \n int tmp = array[a-1];\n array[a-1] = array[b-1];\n array[b-1] = tmp;\n }\n\n for(int i : array){\n System.out.println(i);\n }\n }\n}",
"public class Main{\n public static void main(String[] args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n int w = Integer.parseInt(br.readLine());\n int n = Integer.parseInt(br.readLine());\n\n int[] array = new int[w];\n for(int i = 0; i < w; i++){\n array[i] = i+1;\n }\n\n for(int i = 0; i < n; i++){\n String[] input = br.readLine().split(\",\");\n int a = Integer.parseInt(input[0]);\n int b = Integer.parseInt(input[1]); \n \n int tmp = array[a-1];\n array[a-1] = array[b-1];\n array[b-1] = tmp;\n }\n\n for(int i : array){\n System.out.println(i);\n }\n }\n}",
"Main"
] | import java.io.IOException;
import java.io.InputStreamReader;
import java.io.BufferedReader;
public class Main{
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int w = Integer.parseInt(br.readLine());
int n = Integer.parseInt(br.readLine());
int[] array = new int[w];
for(int i = 0; i < w; i++){
array[i] = i+1;
}
for(int i = 0; i < n; i++){
String[] input = br.readLine().split(",");
int a = Integer.parseInt(input[0]);
int b = Integer.parseInt(input[1]);
int tmp = array[a-1];
array[a-1] = array[b-1];
array[b-1] = tmp;
}
for(int i : array){
System.out.println(i);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
0,
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,
2,
13,
17,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
0,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
139,
5
],
[
139,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
32,
34
],
[
25,
35
],
[
35,
36
],
[
36,
37
],
[
25,
38
],
[
39,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
44,
45
],
[
44,
46
],
[
8,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
8,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
52,
60
],
[
60,
61
],
[
61,
62
],
[
52,
63
],
[
64,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
64,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
64,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
82,
83
],
[
82,
84
],
[
78,
85
],
[
64,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
92,
93
],
[
92,
94
],
[
88,
95
],
[
64,
96
],
[
96,
97
],
[
64,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
100,
102
],
[
64,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
107,
108
],
[
107,
109
],
[
64,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
8,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
115,
120
],
[
120,
121
],
[
120,
122
],
[
115,
123
],
[
123,
124
],
[
124,
125
],
[
115,
126
],
[
127,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
128,
133
],
[
133,
134
],
[
133,
135
],
[
6,
136
],
[
136,
137
],
[
0,
138
],
[
138,
139
],
[
138,
140
]
] | [
"import java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n Scanner sc =new Scanner(System.in);\n int n,m;\n n=sc.nextInt();\n int []x =new int [n];\n for(int j=0;j<x.length;j++){\n\t\t\tx[j]=j+1;\n }\n m=sc.nextInt();\n\n for(int i=0;i<m;i++){\n String h =sc.next();\n String []s = h.split(\",\");\n int a =Integer.parseInt(s[0])-1;\n int b =Integer.parseInt(s[1])-1;\n int p;\n p=x[a];\n x[a]=x[b];\n x[b]=p;\n\n }\n\n for(int k=0;k<n;k++){\n System.out.println(x[k]);\n }\n}\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String[] args){\n Scanner sc =new Scanner(System.in);\n int n,m;\n n=sc.nextInt();\n int []x =new int [n];\n for(int j=0;j<x.length;j++){\n\t\t\tx[j]=j+1;\n }\n m=sc.nextInt();\n\n for(int i=0;i<m;i++){\n String h =sc.next();\n String []s = h.split(\",\");\n int a =Integer.parseInt(s[0])-1;\n int b =Integer.parseInt(s[1])-1;\n int p;\n p=x[a];\n x[a]=x[b];\n x[b]=p;\n\n }\n\n for(int k=0;k<n;k++){\n System.out.println(x[k]);\n }\n}\n}",
"Main",
"public static void main(String[] args){\n Scanner sc =new Scanner(System.in);\n int n,m;\n n=sc.nextInt();\n int []x =new int [n];\n for(int j=0;j<x.length;j++){\n\t\t\tx[j]=j+1;\n }\n m=sc.nextInt();\n\n for(int i=0;i<m;i++){\n String h =sc.next();\n String []s = h.split(\",\");\n int a =Integer.parseInt(s[0])-1;\n int b =Integer.parseInt(s[1])-1;\n int p;\n p=x[a];\n x[a]=x[b];\n x[b]=p;\n\n }\n\n for(int k=0;k<n;k++){\n System.out.println(x[k]);\n }\n}",
"main",
"{\n Scanner sc =new Scanner(System.in);\n int n,m;\n n=sc.nextInt();\n int []x =new int [n];\n for(int j=0;j<x.length;j++){\n\t\t\tx[j]=j+1;\n }\n m=sc.nextInt();\n\n for(int i=0;i<m;i++){\n String h =sc.next();\n String []s = h.split(\",\");\n int a =Integer.parseInt(s[0])-1;\n int b =Integer.parseInt(s[1])-1;\n int p;\n p=x[a];\n x[a]=x[b];\n x[b]=p;\n\n }\n\n for(int k=0;k<n;k++){\n System.out.println(x[k]);\n }\n}",
"Scanner sc =new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n",
"n",
"m;",
"m",
"n=sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int []x =new int [n];",
"x",
"new int [n]",
"n",
"for(int j=0;j<x.length;j++){\n\t\t\tx[j]=j+1;\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<x.length",
"j",
"x.length",
"x",
"x.length",
"j++",
"j++",
"j",
"{\n\t\t\tx[j]=j+1;\n }",
"{\n\t\t\tx[j]=j+1;\n }",
"x[j]=j+1",
"x[j]",
"x",
"j",
"j+1",
"j",
"1",
"m=sc.nextInt()",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0;i<m;i++){\n String h =sc.next();\n String []s = h.split(\",\");\n int a =Integer.parseInt(s[0])-1;\n int b =Integer.parseInt(s[1])-1;\n int p;\n p=x[a];\n x[a]=x[b];\n x[b]=p;\n\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<m",
"i",
"m",
"i++",
"i++",
"i",
"{\n String h =sc.next();\n String []s = h.split(\",\");\n int a =Integer.parseInt(s[0])-1;\n int b =Integer.parseInt(s[1])-1;\n int p;\n p=x[a];\n x[a]=x[b];\n x[b]=p;\n\n }",
"{\n String h =sc.next();\n String []s = h.split(\",\");\n int a =Integer.parseInt(s[0])-1;\n int b =Integer.parseInt(s[1])-1;\n int p;\n p=x[a];\n x[a]=x[b];\n x[b]=p;\n\n }",
"String h =sc.next();",
"h",
"sc.next()",
"sc.next",
"sc",
"String []s = h.split(\",\");",
"s",
"h.split(\",\")",
"h.split",
"h",
"\",\"",
"int a =Integer.parseInt(s[0])-1;",
"a",
"Integer.parseInt(s[0])-1",
"Integer.parseInt(s[0])",
"Integer.parseInt",
"Integer",
"s[0]",
"s",
"0",
"1",
"int b =Integer.parseInt(s[1])-1;",
"b",
"Integer.parseInt(s[1])-1",
"Integer.parseInt(s[1])",
"Integer.parseInt",
"Integer",
"s[1]",
"s",
"1",
"1",
"int p;",
"p",
"p=x[a]",
"p",
"x[a]",
"x",
"a",
"x[a]=x[b]",
"x[a]",
"x",
"a",
"x[b]",
"x",
"b",
"x[b]=p",
"x[b]",
"x",
"b",
"p",
"for(int k=0;k<n;k++){\n System.out.println(x[k]);\n }",
"int k=0;",
"int k=0;",
"k",
"0",
"k<n",
"k",
"n",
"k++",
"k++",
"k",
"{\n System.out.println(x[k]);\n }",
"{\n System.out.println(x[k]);\n }",
"System.out.println(x[k])",
"System.out.println",
"System.out",
"System",
"System.out",
"x[k]",
"x",
"k",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner sc =new Scanner(System.in);\n int n,m;\n n=sc.nextInt();\n int []x =new int [n];\n for(int j=0;j<x.length;j++){\n\t\t\tx[j]=j+1;\n }\n m=sc.nextInt();\n\n for(int i=0;i<m;i++){\n String h =sc.next();\n String []s = h.split(\",\");\n int a =Integer.parseInt(s[0])-1;\n int b =Integer.parseInt(s[1])-1;\n int p;\n p=x[a];\n x[a]=x[b];\n x[b]=p;\n\n }\n\n for(int k=0;k<n;k++){\n System.out.println(x[k]);\n }\n}\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc =new Scanner(System.in);\n int n,m;\n n=sc.nextInt();\n int []x =new int [n];\n for(int j=0;j<x.length;j++){\n\t\t\tx[j]=j+1;\n }\n m=sc.nextInt();\n\n for(int i=0;i<m;i++){\n String h =sc.next();\n String []s = h.split(\",\");\n int a =Integer.parseInt(s[0])-1;\n int b =Integer.parseInt(s[1])-1;\n int p;\n p=x[a];\n x[a]=x[b];\n x[b]=p;\n\n }\n\n for(int k=0;k<n;k++){\n System.out.println(x[k]);\n }\n}\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc =new Scanner(System.in);
int n,m;
n=sc.nextInt();
int []x =new int [n];
for(int j=0;j<x.length;j++){
x[j]=j+1;
}
m=sc.nextInt();
for(int i=0;i<m;i++){
String h =sc.next();
String []s = h.split(",");
int a =Integer.parseInt(s[0])-1;
int b =Integer.parseInt(s[1])-1;
int p;
p=x[a];
x[a]=x[b];
x[b]=p;
}
for(int k=0;k<n;k++){
System.out.println(x[k]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
4,
18,
13,
17,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
2,
13,
17,
41,
13,
4,
18,
13,
41,
13,
41,
13,
41,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
129,
5
],
[
129,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
12,
15
],
[
8,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
25,
33
],
[
33,
34
],
[
34,
35
],
[
25,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
41,
42
],
[
41,
43
],
[
8,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
8,
49
],
[
49,
50
],
[
8,
51
],
[
51,
52
],
[
8,
53
],
[
53,
54
],
[
8,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
60,
61
],
[
60,
62
],
[
55,
63
],
[
63,
64
],
[
64,
65
],
[
55,
66
],
[
67,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
67,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
67,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
82,
84
],
[
67,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
88,
90
],
[
85,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
93,
95
],
[
67,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
99,
101
],
[
96,
102
],
[
8,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
103,
108
],
[
108,
109
],
[
108,
110
],
[
103,
111
],
[
111,
112
],
[
112,
113
],
[
103,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
115,
120
],
[
120,
121
],
[
120,
122
],
[
8,
123
],
[
123,
124
],
[
124,
125
],
[
6,
126
],
[
126,
127
],
[
0,
128
],
[
128,
129
],
[
128,
130
]
] | [
"import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n sc.useDelimiter(\",|\\n\");\n int w=sc.nextInt();\n int array[]=new int[w];\n for(int i=0;i<w;i++) array[i]=i+1;\n int n=sc.nextInt();\n int a,b,c;\n for(int i=0;i<n;i++){\n a=sc.nextInt();\n b=sc.nextInt();\n c=array[a-1];\n array[a-1]=array[b-1];\n array[b-1]=c;\n }\n for(int i=0;i<w;i++) System.out.println(array[i]);\n sc.close();\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n sc.useDelimiter(\",|\\n\");\n int w=sc.nextInt();\n int array[]=new int[w];\n for(int i=0;i<w;i++) array[i]=i+1;\n int n=sc.nextInt();\n int a,b,c;\n for(int i=0;i<n;i++){\n a=sc.nextInt();\n b=sc.nextInt();\n c=array[a-1];\n array[a-1]=array[b-1];\n array[b-1]=c;\n }\n for(int i=0;i<w;i++) System.out.println(array[i]);\n sc.close();\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n sc.useDelimiter(\",|\\n\");\n int w=sc.nextInt();\n int array[]=new int[w];\n for(int i=0;i<w;i++) array[i]=i+1;\n int n=sc.nextInt();\n int a,b,c;\n for(int i=0;i<n;i++){\n a=sc.nextInt();\n b=sc.nextInt();\n c=array[a-1];\n array[a-1]=array[b-1];\n array[b-1]=c;\n }\n for(int i=0;i<w;i++) System.out.println(array[i]);\n sc.close();\n }",
"main",
"{\n Scanner sc=new Scanner(System.in);\n sc.useDelimiter(\",|\\n\");\n int w=sc.nextInt();\n int array[]=new int[w];\n for(int i=0;i<w;i++) array[i]=i+1;\n int n=sc.nextInt();\n int a,b,c;\n for(int i=0;i<n;i++){\n a=sc.nextInt();\n b=sc.nextInt();\n c=array[a-1];\n array[a-1]=array[b-1];\n array[b-1]=c;\n }\n for(int i=0;i<w;i++) System.out.println(array[i]);\n sc.close();\n }",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"sc.useDelimiter(\",|\\n\")",
"sc.useDelimiter",
"sc",
"\",|\\n\"",
"int w=sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int array[]=new int[w];",
"array",
"new int[w]",
"w",
"for(int i=0;i<w;i++) array[i]=i+1;",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"array[i]=i+1;",
"array[i]=i+1",
"array[i]",
"array",
"i",
"i+1",
"i",
"1",
"int n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int a",
"a",
"b",
"b",
"c;",
"c",
"for(int i=0;i<n;i++){\n a=sc.nextInt();\n b=sc.nextInt();\n c=array[a-1];\n array[a-1]=array[b-1];\n array[b-1]=c;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n a=sc.nextInt();\n b=sc.nextInt();\n c=array[a-1];\n array[a-1]=array[b-1];\n array[b-1]=c;\n }",
"{\n a=sc.nextInt();\n b=sc.nextInt();\n c=array[a-1];\n array[a-1]=array[b-1];\n array[b-1]=c;\n }",
"a=sc.nextInt()",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"b=sc.nextInt()",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"c=array[a-1]",
"c",
"array[a-1]",
"array",
"a-1",
"a",
"1",
"array[a-1]=array[b-1]",
"array[a-1]",
"array",
"a-1",
"a",
"1",
"array[b-1]",
"array",
"b-1",
"b",
"1",
"array[b-1]=c",
"array[b-1]",
"array",
"b-1",
"b",
"1",
"c",
"for(int i=0;i<w;i++) System.out.println(array[i]);",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"System.out.println(array[i]);",
"System.out.println(array[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"array[i]",
"array",
"i",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n sc.useDelimiter(\",|\\n\");\n int w=sc.nextInt();\n int array[]=new int[w];\n for(int i=0;i<w;i++) array[i]=i+1;\n int n=sc.nextInt();\n int a,b,c;\n for(int i=0;i<n;i++){\n a=sc.nextInt();\n b=sc.nextInt();\n c=array[a-1];\n array[a-1]=array[b-1];\n array[b-1]=c;\n }\n for(int i=0;i<w;i++) System.out.println(array[i]);\n sc.close();\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n sc.useDelimiter(\",|\\n\");\n int w=sc.nextInt();\n int array[]=new int[w];\n for(int i=0;i<w;i++) array[i]=i+1;\n int n=sc.nextInt();\n int a,b,c;\n for(int i=0;i<n;i++){\n a=sc.nextInt();\n b=sc.nextInt();\n c=array[a-1];\n array[a-1]=array[b-1];\n array[b-1]=c;\n }\n for(int i=0;i<w;i++) System.out.println(array[i]);\n sc.close();\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
sc.useDelimiter(",|\n");
int w=sc.nextInt();
int array[]=new int[w];
for(int i=0;i<w;i++) array[i]=i+1;
int n=sc.nextInt();
int a,b,c;
for(int i=0;i<n;i++){
a=sc.nextInt();
b=sc.nextInt();
c=array[a-1];
array[a-1]=array[b-1];
array[b-1]=c;
}
for(int i=0;i<w;i++) System.out.println(array[i]);
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
18,
13,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
4,
13,
13,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
0,
13,
2,
13,
17,
42,
2,
2,
13,
17,
2,
18,
13,
13,
13,
30,
0,
18,
13,
2,
13,
17,
18,
13,
13,
40,
13,
0,
18,
13,
2,
13,
17,
13,
4,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
14,
2,
13,
2,
13,
17,
30,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
22,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
37,
38
],
[
37,
39
],
[
32,
40
],
[
40,
41
],
[
41,
42
],
[
32,
43
],
[
44,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
52,
53
],
[
52,
54
],
[
8,
55
],
[
55,
56
],
[
8,
57
],
[
57,
58
],
[
8,
59
],
[
59,
60
],
[
8,
61
],
[
61,
62
],
[
8,
63
],
[
63,
64
],
[
8,
65
],
[
65,
66
],
[
65,
67
],
[
65,
68
],
[
8,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
74,
75
],
[
74,
76
],
[
69,
77
],
[
77,
78
],
[
78,
79
],
[
69,
80
],
[
81,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
84,
86
],
[
81,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
89,
91
],
[
81,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
92,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
106,
108
],
[
103,
109
],
[
109,
110
],
[
109,
111
],
[
102,
112
],
[
112,
113
],
[
81,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
117,
119
],
[
114,
120
],
[
81,
121
],
[
121,
122
],
[
121,
123
],
[
121,
124
],
[
6,
125
],
[
125,
126
],
[
4,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
129,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
133,
138
],
[
138,
139
],
[
138,
140
],
[
133,
141
],
[
141,
142
],
[
142,
143
],
[
133,
144
],
[
145,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
148,
149
],
[
148,
150
],
[
145,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
154,
155
],
[
154,
156
],
[
151,
157
],
[
157,
158
],
[
158,
159
],
[
158,
160
],
[
129,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
163,
165
],
[
161,
166
],
[
127,
167
],
[
167,
168
],
[
127,
169
],
[
169,
170
]
] | [
"import java.io.*;\n\nclass Main {\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[] elements = br.readLine().split(\" \");\n int[] A = new int[N];\n for (int i = 0; i < N; i++) {\n A[i] = Integer.parseInt(elements[i]);\n }\n\n int key;\n int i, j, k;\n String output;\n printArray(A, N);\n for (i = 1; i < N; i++) {\n key = A[i];\n j = i - 1;\n while (j >= 0 && A[j] > key) {\n A[j+1] = A[j];\n j--;\n }\n A[j+1] = key;\n\n printArray(A, N);\n }\n }\n\n public static void printArray (int[] array, int length) {\n String output = \"\";\n for (int i = 0; i < length; i++) {\n output += array[i];\n if (i != length-1) {\n output += \" \";\n }\n }\n System.out.println(output);\n }\n}",
"import java.io.*;",
"io.*",
"java",
"class Main {\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[] elements = br.readLine().split(\" \");\n int[] A = new int[N];\n for (int i = 0; i < N; i++) {\n A[i] = Integer.parseInt(elements[i]);\n }\n\n int key;\n int i, j, k;\n String output;\n printArray(A, N);\n for (i = 1; i < N; i++) {\n key = A[i];\n j = i - 1;\n while (j >= 0 && A[j] > key) {\n A[j+1] = A[j];\n j--;\n }\n A[j+1] = key;\n\n printArray(A, N);\n }\n }\n\n public static void printArray (int[] array, int length) {\n String output = \"\";\n for (int i = 0; i < length; i++) {\n output += array[i];\n if (i != length-1) {\n output += \" \";\n }\n }\n System.out.println(output);\n }\n}",
"Main",
"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[] elements = br.readLine().split(\" \");\n int[] A = new int[N];\n for (int i = 0; i < N; i++) {\n A[i] = Integer.parseInt(elements[i]);\n }\n\n int key;\n int i, j, k;\n String output;\n printArray(A, N);\n for (i = 1; i < N; i++) {\n key = A[i];\n j = i - 1;\n while (j >= 0 && A[j] > key) {\n A[j+1] = A[j];\n j--;\n }\n A[j+1] = key;\n\n printArray(A, N);\n }\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int N = Integer.parseInt(br.readLine());\n String[] elements = br.readLine().split(\" \");\n int[] A = new int[N];\n for (int i = 0; i < N; i++) {\n A[i] = Integer.parseInt(elements[i]);\n }\n\n int key;\n int i, j, k;\n String output;\n printArray(A, N);\n for (i = 1; i < N; i++) {\n key = A[i];\n j = i - 1;\n while (j >= 0 && A[j] > key) {\n A[j+1] = A[j];\n j--;\n }\n A[j+1] = key;\n\n printArray(A, N);\n }\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int N = Integer.parseInt(br.readLine());",
"N",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"String[] elements = br.readLine().split(\" \");",
"elements",
"br.readLine().split(\" \")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"int[] A = new int[N];",
"A",
"new int[N]",
"N",
"for (int i = 0; i < N; i++) {\n A[i] = Integer.parseInt(elements[i]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n A[i] = Integer.parseInt(elements[i]);\n }",
"{\n A[i] = Integer.parseInt(elements[i]);\n }",
"A[i] = Integer.parseInt(elements[i])",
"A[i]",
"A",
"i",
"Integer.parseInt(elements[i])",
"Integer.parseInt",
"Integer",
"elements[i]",
"elements",
"i",
"int key;",
"key",
"int i",
"i",
"j",
"j",
"k;",
"k",
"String output;",
"output",
"printArray(A, N)",
"printArray",
"A",
"N",
"for (i = 1; i < N; i++) {\n key = A[i];\n j = i - 1;\n while (j >= 0 && A[j] > key) {\n A[j+1] = A[j];\n j--;\n }\n A[j+1] = key;\n\n printArray(A, N);\n }",
"i = 1;",
"i = 1",
"i",
"1",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n key = A[i];\n j = i - 1;\n while (j >= 0 && A[j] > key) {\n A[j+1] = A[j];\n j--;\n }\n A[j+1] = key;\n\n printArray(A, N);\n }",
"{\n key = A[i];\n j = i - 1;\n while (j >= 0 && A[j] > key) {\n A[j+1] = A[j];\n j--;\n }\n A[j+1] = key;\n\n printArray(A, N);\n }",
"key = A[i]",
"key",
"A[i]",
"A",
"i",
"j = i - 1",
"j",
"i - 1",
"i",
"1",
"while (j >= 0 && A[j] > key) {\n A[j+1] = A[j];\n j--;\n }",
"j >= 0 && A[j] > key",
"j >= 0",
"j",
"0",
"A[j] > key",
"A[j]",
"A",
"j",
"key",
"{\n A[j+1] = A[j];\n j--;\n }",
"A[j+1] = A[j]",
"A[j+1]",
"A",
"j+1",
"j",
"1",
"A[j]",
"A",
"j",
"j--",
"j",
"A[j+1] = key",
"A[j+1]",
"A",
"j+1",
"j",
"1",
"key",
"printArray(A, N)",
"printArray",
"A",
"N",
"String[] args",
"args",
"public static void printArray (int[] array, int length) {\n String output = \"\";\n for (int i = 0; i < length; i++) {\n output += array[i];\n if (i != length-1) {\n output += \" \";\n }\n }\n System.out.println(output);\n }",
"printArray",
"{\n String output = \"\";\n for (int i = 0; i < length; i++) {\n output += array[i];\n if (i != length-1) {\n output += \" \";\n }\n }\n System.out.println(output);\n }",
"String output = \"\";",
"output",
"\"\"",
"for (int i = 0; i < length; i++) {\n output += array[i];\n if (i != length-1) {\n output += \" \";\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < length",
"i",
"length",
"i++",
"i++",
"i",
"{\n output += array[i];\n if (i != length-1) {\n output += \" \";\n }\n }",
"{\n output += array[i];\n if (i != length-1) {\n output += \" \";\n }\n }",
"output += array[i]",
"output",
"array[i]",
"array",
"i",
"if (i != length-1) {\n output += \" \";\n }",
"i != length-1",
"i",
"length-1",
"length",
"1",
"{\n output += \" \";\n }",
"output += \" \"",
"output",
"\" \"",
"System.out.println(output)",
"System.out.println",
"System.out",
"System",
"System.out",
"output",
"int[] array",
"array",
"int length",
"length"
] | import java.io.*;
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[] elements = br.readLine().split(" ");
int[] A = new int[N];
for (int i = 0; i < N; i++) {
A[i] = Integer.parseInt(elements[i]);
}
int key;
int i, j, k;
String output;
printArray(A, N);
for (i = 1; i < N; i++) {
key = A[i];
j = i - 1;
while (j >= 0 && A[j] > key) {
A[j+1] = A[j];
j--;
}
A[j+1] = key;
printArray(A, N);
}
}
public static void printArray (int[] array, int length) {
String output = "";
for (int i = 0; i < length; i++) {
output += array[i];
if (i != length-1) {
output += " ";
}
}
System.out.println(output);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
4,
13,
0,
13,
4,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
18,
13,
13,
41,
13,
2,
13,
17,
42,
2,
2,
13,
17,
2,
18,
13,
13,
13,
30,
0,
18,
13,
2,
13,
17,
18,
13,
13,
40,
13,
0,
18,
13,
2,
13,
17,
13,
4,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
2,
18,
13,
13,
17,
4,
18,
18,
13,
13,
18,
13,
2,
13,
17,
12,
13,
30,
12,
13,
30,
0,
13,
20,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
4,
13,
41,
13,
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,
13,
18,
13,
13,
29,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
2,
18,
13,
13,
17,
30,
0,
13,
4,
18,
13,
18,
13,
13,
30,
0,
13,
2,
4,
18,
13,
18,
13,
13,
17,
29,
13,
23,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
13,
29,
13,
23,
13,
12,
13,
30,
4,
13,
4,
13,
4,
13,
4,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
288,
11
],
[
288,
12
],
[
12,
13
],
[
288,
14
],
[
14,
15
],
[
288,
16
],
[
16,
17
],
[
288,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
288,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
37,
38
],
[
37,
39
],
[
32,
40
],
[
40,
41
],
[
41,
42
],
[
32,
43
],
[
44,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
47,
49
],
[
44,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
52,
54
],
[
44,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
55,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
69,
71
],
[
66,
72
],
[
72,
73
],
[
72,
74
],
[
65,
75
],
[
75,
76
],
[
44,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
80,
82
],
[
77,
83
],
[
44,
84
],
[
84,
85
],
[
288,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
96,
98
],
[
89,
99
],
[
99,
100
],
[
100,
101
],
[
89,
102
],
[
103,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
104,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
88,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
114,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
121,
123
],
[
288,
124
],
[
124,
125
],
[
124,
126
],
[
288,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
288,
133
],
[
133,
134
],
[
133,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
288,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
144,
147
],
[
147,
148
],
[
288,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
154,
155
],
[
151,
156
],
[
156,
157
],
[
156,
158
],
[
158,
159
],
[
159,
160
],
[
158,
161
],
[
151,
162
],
[
162,
163
],
[
162,
164
],
[
165,
166
],
[
165,
167
],
[
151,
168
],
[
168,
169
],
[
169,
170
],
[
170,
171
],
[
170,
172
],
[
168,
173
],
[
173,
174
],
[
173,
175
],
[
175,
176
],
[
175,
177
],
[
168,
178
],
[
178,
179
],
[
179,
180
],
[
168,
181
],
[
182,
182
],
[
182,
183
],
[
183,
184
],
[
184,
185
],
[
184,
186
],
[
183,
187
],
[
187,
188
],
[
188,
189
],
[
187,
190
],
[
190,
191
],
[
190,
192
],
[
151,
193
],
[
193,
194
],
[
288,
195
],
[
195,
196
],
[
195,
197
],
[
197,
198
],
[
198,
199
],
[
198,
200
],
[
197,
201
],
[
201,
202
],
[
202,
203
],
[
203,
204
],
[
203,
205
],
[
201,
206
],
[
206,
207
],
[
206,
208
],
[
208,
209
],
[
208,
210
],
[
201,
211
],
[
211,
212
],
[
212,
213
],
[
201,
214
],
[
215,
215
],
[
215,
216
],
[
216,
217
],
[
217,
218
],
[
217,
219
],
[
219,
220
],
[
220,
221
],
[
220,
222
],
[
219,
223
],
[
216,
224
],
[
224,
225
],
[
225,
226
],
[
225,
227
],
[
227,
228
],
[
228,
229
],
[
227,
230
],
[
230,
231
],
[
230,
232
],
[
216,
233
],
[
233,
234
],
[
234,
235
],
[
234,
236
],
[
236,
237
],
[
237,
238
],
[
238,
239
],
[
237,
240
],
[
240,
241
],
[
240,
242
],
[
236,
243
],
[
197,
244
],
[
244,
245
],
[
195,
246
],
[
246,
247
],
[
288,
248
],
[
248,
249
],
[
248,
250
],
[
250,
251
],
[
251,
252
],
[
251,
253
],
[
250,
254
],
[
254,
255
],
[
255,
256
],
[
256,
257
],
[
256,
258
],
[
254,
259
],
[
259,
260
],
[
259,
261
],
[
254,
262
],
[
262,
263
],
[
263,
264
],
[
254,
265
],
[
266,
266
],
[
266,
267
],
[
267,
268
],
[
267,
269
],
[
250,
270
],
[
270,
271
],
[
248,
272
],
[
272,
273
],
[
288,
274
],
[
274,
275
],
[
274,
276
],
[
276,
277
],
[
277,
278
],
[
276,
279
],
[
279,
280
],
[
276,
281
],
[
281,
282
],
[
276,
283
],
[
283,
284
],
[
274,
285
],
[
285,
286
],
[
0,
287
],
[
287,
288
],
[
287,
289
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\t\n\tstatic int N;\n\tstatic int[] A;\n\t\n\tstatic void input() throws IOException {\n\t\tN = readInt();\n\t\tA = readMultiInt();\n\t}\n\t\n\tstatic void process() {\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint n = A[i];\n\t\t\tint j = i - 1;\n\t\t\twhile( j >= 0 && A[j] > n) {\n\t\t\t\tA[j + 1] = A[j];\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tA[j + 1] = n;\n\t\t\toutput0();\n\t\t}\n\t}\n\t\n\tstatic void output0() {\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tSystem.out.print(A[i] + \" \");\n\t\t}\n\t\tSystem.out.println(A[N - 1]);\n\t}\n\t\n\tstatic void output() {\n\t}\n\t\n\t//??\\?????±?????¨???\n\tstatic BufferedReader in;\n\t\n\tstatic void initBufferedReader() {\n\t\tin = new BufferedReader(new InputStreamReader(System.in));\n\t}\n\t\n\tstatic String readString() throws IOException {\n\t\treturn in.readLine();\n\t}\n\t\n\tstatic int readInt() throws NumberFormatException, IOException {\n\t\treturn Integer.valueOf(readString());\n\t}\n\t\n\tstatic int[] readMultiInt() throws IOException {\n\t\tString input = readString();\n\t\tString[] values = input.split(\" \");\n\t\tint[] result = new int[values.length];\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tresult[i] = Integer.valueOf(values[i]);\n\t\t}\n\t\treturn result;\n\t}\n\t\n\tstatic String arrayToString(int[] data) {\n\t\tString result = \"\";\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tif (i >= data.length - 1) {\n\t\t\t\tresult += String.valueOf(data[i]);\n\t\t\t} else {\n\t\t\t\tresult += String.valueOf(data[i]) + \" \";\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\t\n\tstatic long factional(int n) {\n\t\tint result = 1;\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tresult *= i;\n\t\t}\n\t\treturn result;\n\t}\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\tinitBufferedReader();\n\t\tinput();\n\t\tprocess();\n\t\toutput();\n\t}\n\t\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\t\n\tstatic int N;\n\tstatic int[] A;\n\t\n\tstatic void input() throws IOException {\n\t\tN = readInt();\n\t\tA = readMultiInt();\n\t}\n\t\n\tstatic void process() {\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint n = A[i];\n\t\t\tint j = i - 1;\n\t\t\twhile( j >= 0 && A[j] > n) {\n\t\t\t\tA[j + 1] = A[j];\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tA[j + 1] = n;\n\t\t\toutput0();\n\t\t}\n\t}\n\t\n\tstatic void output0() {\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tSystem.out.print(A[i] + \" \");\n\t\t}\n\t\tSystem.out.println(A[N - 1]);\n\t}\n\t\n\tstatic void output() {\n\t}\n\t\n\t//??\\?????±?????¨???\n\tstatic BufferedReader in;\n\t\n\tstatic void initBufferedReader() {\n\t\tin = new BufferedReader(new InputStreamReader(System.in));\n\t}\n\t\n\tstatic String readString() throws IOException {\n\t\treturn in.readLine();\n\t}\n\t\n\tstatic int readInt() throws NumberFormatException, IOException {\n\t\treturn Integer.valueOf(readString());\n\t}\n\t\n\tstatic int[] readMultiInt() throws IOException {\n\t\tString input = readString();\n\t\tString[] values = input.split(\" \");\n\t\tint[] result = new int[values.length];\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tresult[i] = Integer.valueOf(values[i]);\n\t\t}\n\t\treturn result;\n\t}\n\t\n\tstatic String arrayToString(int[] data) {\n\t\tString result = \"\";\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tif (i >= data.length - 1) {\n\t\t\t\tresult += String.valueOf(data[i]);\n\t\t\t} else {\n\t\t\t\tresult += String.valueOf(data[i]) + \" \";\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\t\n\tstatic long factional(int n) {\n\t\tint result = 1;\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tresult *= i;\n\t\t}\n\t\treturn result;\n\t}\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\tinitBufferedReader();\n\t\tinput();\n\t\tprocess();\n\t\toutput();\n\t}\n\t\n}",
"Main",
"static int N;",
"N",
"static int[] A;",
"A",
"//??\\?????±?????¨???\n\tstatic BufferedReader in;",
"in",
"static void input() throws IOException {\n\t\tN = readInt();\n\t\tA = readMultiInt();\n\t}",
"input",
"{\n\t\tN = readInt();\n\t\tA = readMultiInt();\n\t}",
"N = readInt()",
"N",
"readInt()",
"readInt",
"A = readMultiInt()",
"A",
"readMultiInt()",
"readMultiInt",
"static void process() {\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint n = A[i];\n\t\t\tint j = i - 1;\n\t\t\twhile( j >= 0 && A[j] > n) {\n\t\t\t\tA[j + 1] = A[j];\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tA[j + 1] = n;\n\t\t\toutput0();\n\t\t}\n\t}",
"process",
"{\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint n = A[i];\n\t\t\tint j = i - 1;\n\t\t\twhile( j >= 0 && A[j] > n) {\n\t\t\t\tA[j + 1] = A[j];\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tA[j + 1] = n;\n\t\t\toutput0();\n\t\t}\n\t}",
"for (int i = 0; i < N; i++) {\n\t\t\tint n = A[i];\n\t\t\tint j = i - 1;\n\t\t\twhile( j >= 0 && A[j] > n) {\n\t\t\t\tA[j + 1] = A[j];\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tA[j + 1] = n;\n\t\t\toutput0();\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tint n = A[i];\n\t\t\tint j = i - 1;\n\t\t\twhile( j >= 0 && A[j] > n) {\n\t\t\t\tA[j + 1] = A[j];\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tA[j + 1] = n;\n\t\t\toutput0();\n\t\t}",
"{\n\t\t\tint n = A[i];\n\t\t\tint j = i - 1;\n\t\t\twhile( j >= 0 && A[j] > n) {\n\t\t\t\tA[j + 1] = A[j];\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tA[j + 1] = n;\n\t\t\toutput0();\n\t\t}",
"int n = A[i];",
"n",
"A[i]",
"A",
"i",
"int j = i - 1;",
"j",
"i - 1",
"i",
"1",
"while( j >= 0 && A[j] > n) {\n\t\t\t\tA[j + 1] = A[j];\n\t\t\t\tj--;\n\t\t\t}",
"j >= 0 && A[j] > n",
"j >= 0",
"j",
"0",
"A[j] > n",
"A[j]",
"A",
"j",
"n",
"{\n\t\t\t\tA[j + 1] = A[j];\n\t\t\t\tj--;\n\t\t\t}",
"A[j + 1] = A[j]",
"A[j + 1]",
"A",
"j + 1",
"j",
"1",
"A[j]",
"A",
"j",
"j--",
"j",
"A[j + 1] = n",
"A[j + 1]",
"A",
"j + 1",
"j",
"1",
"n",
"output0()",
"output0",
"static void output0() {\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tSystem.out.print(A[i] + \" \");\n\t\t}\n\t\tSystem.out.println(A[N - 1]);\n\t}",
"output0",
"{\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tSystem.out.print(A[i] + \" \");\n\t\t}\n\t\tSystem.out.println(A[N - 1]);\n\t}",
"for (int i = 0; i < N - 1; i++) {\n\t\t\tSystem.out.print(A[i] + \" \");\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N - 1",
"i",
"N - 1",
"N",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.print(A[i] + \" \");\n\t\t}",
"{\n\t\t\tSystem.out.print(A[i] + \" \");\n\t\t}",
"System.out.print(A[i] + \" \")",
"System.out.print",
"System.out",
"System",
"System.out",
"A[i] + \" \"",
"A[i]",
"A",
"i",
"\" \"",
"System.out.println(A[N - 1])",
"System.out.println",
"System.out",
"System",
"System.out",
"A[N - 1]",
"A",
"N - 1",
"N",
"1",
"static void output() {\n\t}",
"output",
"{\n\t}",
"static void initBufferedReader() {\n\t\tin = new BufferedReader(new InputStreamReader(System.in));\n\t}",
"initBufferedReader",
"{\n\t\tin = new BufferedReader(new InputStreamReader(System.in));\n\t}",
"in = new BufferedReader(new InputStreamReader(System.in))",
"in",
"new BufferedReader(new InputStreamReader(System.in))",
"static String readString() throws IOException {\n\t\treturn in.readLine();\n\t}",
"readString",
"{\n\t\treturn in.readLine();\n\t}",
"return in.readLine();",
"in.readLine()",
"in.readLine",
"in",
"static int readInt() throws NumberFormatException, IOException {\n\t\treturn Integer.valueOf(readString());\n\t}",
"readInt",
"{\n\t\treturn Integer.valueOf(readString());\n\t}",
"return Integer.valueOf(readString());",
"Integer.valueOf(readString())",
"Integer.valueOf",
"Integer",
"readString()",
"readString",
"static int[] readMultiInt() throws IOException {\n\t\tString input = readString();\n\t\tString[] values = input.split(\" \");\n\t\tint[] result = new int[values.length];\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tresult[i] = Integer.valueOf(values[i]);\n\t\t}\n\t\treturn result;\n\t}",
"readMultiInt",
"{\n\t\tString input = readString();\n\t\tString[] values = input.split(\" \");\n\t\tint[] result = new int[values.length];\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tresult[i] = Integer.valueOf(values[i]);\n\t\t}\n\t\treturn result;\n\t}",
"String input = readString();",
"input",
"readString()",
"readString",
"String[] values = input.split(\" \");",
"values",
"input.split(\" \")",
"input.split",
"input",
"\" \"",
"int[] result = new int[values.length];",
"result",
"new int[values.length]",
"values.length",
"values",
"values.length",
"for (int i = 0; i < values.length; i++) {\n\t\t\tresult[i] = Integer.valueOf(values[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < values.length",
"i",
"values.length",
"values",
"values.length",
"i++",
"i++",
"i",
"{\n\t\t\tresult[i] = Integer.valueOf(values[i]);\n\t\t}",
"{\n\t\t\tresult[i] = Integer.valueOf(values[i]);\n\t\t}",
"result[i] = Integer.valueOf(values[i])",
"result[i]",
"result",
"i",
"Integer.valueOf(values[i])",
"Integer.valueOf",
"Integer",
"values[i]",
"values",
"i",
"return result;",
"result",
"static String arrayToString(int[] data) {\n\t\tString result = \"\";\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tif (i >= data.length - 1) {\n\t\t\t\tresult += String.valueOf(data[i]);\n\t\t\t} else {\n\t\t\t\tresult += String.valueOf(data[i]) + \" \";\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"arrayToString",
"{\n\t\tString result = \"\";\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tif (i >= data.length - 1) {\n\t\t\t\tresult += String.valueOf(data[i]);\n\t\t\t} else {\n\t\t\t\tresult += String.valueOf(data[i]) + \" \";\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"String result = \"\";",
"result",
"\"\"",
"for (int i = 0; i < data.length; i++) {\n\t\t\tif (i >= data.length - 1) {\n\t\t\t\tresult += String.valueOf(data[i]);\n\t\t\t} else {\n\t\t\t\tresult += String.valueOf(data[i]) + \" \";\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < data.length",
"i",
"data.length",
"data",
"data.length",
"i++",
"i++",
"i",
"{\n\t\t\tif (i >= data.length - 1) {\n\t\t\t\tresult += String.valueOf(data[i]);\n\t\t\t} else {\n\t\t\t\tresult += String.valueOf(data[i]) + \" \";\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (i >= data.length - 1) {\n\t\t\t\tresult += String.valueOf(data[i]);\n\t\t\t} else {\n\t\t\t\tresult += String.valueOf(data[i]) + \" \";\n\t\t\t}\n\t\t}",
"if (i >= data.length - 1) {\n\t\t\t\tresult += String.valueOf(data[i]);\n\t\t\t} else {\n\t\t\t\tresult += String.valueOf(data[i]) + \" \";\n\t\t\t}",
"i >= data.length - 1",
"i",
"data.length - 1",
"data.length",
"data",
"data.length",
"1",
"{\n\t\t\t\tresult += String.valueOf(data[i]);\n\t\t\t}",
"result += String.valueOf(data[i])",
"result",
"String.valueOf(data[i])",
"String.valueOf",
"String",
"data[i]",
"data",
"i",
"{\n\t\t\t\tresult += String.valueOf(data[i]) + \" \";\n\t\t\t}",
"result += String.valueOf(data[i]) + \" \"",
"result",
"String.valueOf(data[i]) + \" \"",
"String.valueOf(data[i])",
"String.valueOf",
"String",
"data[i]",
"data",
"i",
"\" \"",
"return result;",
"result",
"int[] data",
"data",
"static long factional(int n) {\n\t\tint result = 1;\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tresult *= i;\n\t\t}\n\t\treturn result;\n\t}",
"factional",
"{\n\t\tint result = 1;\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tresult *= i;\n\t\t}\n\t\treturn result;\n\t}",
"int result = 1;",
"result",
"1",
"for (int i = 1; i <= n; i++) {\n\t\t\tresult *= i;\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tresult *= i;\n\t\t}",
"{\n\t\t\tresult *= i;\n\t\t}",
"result *= i",
"result",
"i",
"return result;",
"result",
"int n",
"n",
"public static void main(String[] args) throws IOException {\n\t\tinitBufferedReader();\n\t\tinput();\n\t\tprocess();\n\t\toutput();\n\t}",
"main",
"{\n\t\tinitBufferedReader();\n\t\tinput();\n\t\tprocess();\n\t\toutput();\n\t}",
"initBufferedReader()",
"initBufferedReader",
"input()",
"input",
"process()",
"process",
"output()",
"output",
"String[] args",
"args",
"public class Main {\n\t\n\tstatic int N;\n\tstatic int[] A;\n\t\n\tstatic void input() throws IOException {\n\t\tN = readInt();\n\t\tA = readMultiInt();\n\t}\n\t\n\tstatic void process() {\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint n = A[i];\n\t\t\tint j = i - 1;\n\t\t\twhile( j >= 0 && A[j] > n) {\n\t\t\t\tA[j + 1] = A[j];\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tA[j + 1] = n;\n\t\t\toutput0();\n\t\t}\n\t}\n\t\n\tstatic void output0() {\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tSystem.out.print(A[i] + \" \");\n\t\t}\n\t\tSystem.out.println(A[N - 1]);\n\t}\n\t\n\tstatic void output() {\n\t}\n\t\n\t//??\\?????±?????¨???\n\tstatic BufferedReader in;\n\t\n\tstatic void initBufferedReader() {\n\t\tin = new BufferedReader(new InputStreamReader(System.in));\n\t}\n\t\n\tstatic String readString() throws IOException {\n\t\treturn in.readLine();\n\t}\n\t\n\tstatic int readInt() throws NumberFormatException, IOException {\n\t\treturn Integer.valueOf(readString());\n\t}\n\t\n\tstatic int[] readMultiInt() throws IOException {\n\t\tString input = readString();\n\t\tString[] values = input.split(\" \");\n\t\tint[] result = new int[values.length];\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tresult[i] = Integer.valueOf(values[i]);\n\t\t}\n\t\treturn result;\n\t}\n\t\n\tstatic String arrayToString(int[] data) {\n\t\tString result = \"\";\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tif (i >= data.length - 1) {\n\t\t\t\tresult += String.valueOf(data[i]);\n\t\t\t} else {\n\t\t\t\tresult += String.valueOf(data[i]) + \" \";\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\t\n\tstatic long factional(int n) {\n\t\tint result = 1;\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tresult *= i;\n\t\t}\n\t\treturn result;\n\t}\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\tinitBufferedReader();\n\t\tinput();\n\t\tprocess();\n\t\toutput();\n\t}\n\t\n}",
"public class Main {\n\t\n\tstatic int N;\n\tstatic int[] A;\n\t\n\tstatic void input() throws IOException {\n\t\tN = readInt();\n\t\tA = readMultiInt();\n\t}\n\t\n\tstatic void process() {\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint n = A[i];\n\t\t\tint j = i - 1;\n\t\t\twhile( j >= 0 && A[j] > n) {\n\t\t\t\tA[j + 1] = A[j];\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tA[j + 1] = n;\n\t\t\toutput0();\n\t\t}\n\t}\n\t\n\tstatic void output0() {\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tSystem.out.print(A[i] + \" \");\n\t\t}\n\t\tSystem.out.println(A[N - 1]);\n\t}\n\t\n\tstatic void output() {\n\t}\n\t\n\t//??\\?????±?????¨???\n\tstatic BufferedReader in;\n\t\n\tstatic void initBufferedReader() {\n\t\tin = new BufferedReader(new InputStreamReader(System.in));\n\t}\n\t\n\tstatic String readString() throws IOException {\n\t\treturn in.readLine();\n\t}\n\t\n\tstatic int readInt() throws NumberFormatException, IOException {\n\t\treturn Integer.valueOf(readString());\n\t}\n\t\n\tstatic int[] readMultiInt() throws IOException {\n\t\tString input = readString();\n\t\tString[] values = input.split(\" \");\n\t\tint[] result = new int[values.length];\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tresult[i] = Integer.valueOf(values[i]);\n\t\t}\n\t\treturn result;\n\t}\n\t\n\tstatic String arrayToString(int[] data) {\n\t\tString result = \"\";\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tif (i >= data.length - 1) {\n\t\t\t\tresult += String.valueOf(data[i]);\n\t\t\t} else {\n\t\t\t\tresult += String.valueOf(data[i]) + \" \";\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\t\n\tstatic long factional(int n) {\n\t\tint result = 1;\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tresult *= i;\n\t\t}\n\t\treturn result;\n\t}\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\tinitBufferedReader();\n\t\tinput();\n\t\tprocess();\n\t\toutput();\n\t}\n\t\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
static int N;
static int[] A;
static void input() throws IOException {
N = readInt();
A = readMultiInt();
}
static void process() {
for (int i = 0; i < N; i++) {
int n = A[i];
int j = i - 1;
while( j >= 0 && A[j] > n) {
A[j + 1] = A[j];
j--;
}
A[j + 1] = n;
output0();
}
}
static void output0() {
for (int i = 0; i < N - 1; i++) {
System.out.print(A[i] + " ");
}
System.out.println(A[N - 1]);
}
static void output() {
}
//??\?????±?????¨???
static BufferedReader in;
static void initBufferedReader() {
in = new BufferedReader(new InputStreamReader(System.in));
}
static String readString() throws IOException {
return in.readLine();
}
static int readInt() throws NumberFormatException, IOException {
return Integer.valueOf(readString());
}
static int[] readMultiInt() throws IOException {
String input = readString();
String[] values = input.split(" ");
int[] result = new int[values.length];
for (int i = 0; i < values.length; i++) {
result[i] = Integer.valueOf(values[i]);
}
return result;
}
static String arrayToString(int[] data) {
String result = "";
for (int i = 0; i < data.length; i++) {
if (i >= data.length - 1) {
result += String.valueOf(data[i]);
} else {
result += String.valueOf(data[i]) + " ";
}
}
return result;
}
static long factional(int n) {
int result = 1;
for (int i = 1; i <= n; i++) {
result *= i;
}
return result;
}
public static void main(String[] args) throws IOException {
initBufferedReader();
input();
process();
output();
}
} |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.