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,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
20,
13,
4,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
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,
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,
0,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
149,
5
],
[
149,
6
],
[
6,
7
],
[
149,
8
],
[
8,
9
],
[
149,
10
],
[
10,
11
],
[
149,
12
],
[
12,
13
],
[
149,
14
],
[
14,
15
],
[
149,
16
],
[
16,
17
],
[
149,
18
],
[
18,
19
],
[
149,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
22,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
22,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
22,
36
],
[
36,
37
],
[
36,
38
],
[
22,
40
],
[
40,
41
],
[
22,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
47,
48
],
[
47,
49
],
[
42,
50
],
[
50,
51
],
[
51,
52
],
[
42,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
59,
60
],
[
59,
61
],
[
20,
62
],
[
62,
63
],
[
149,
64
],
[
64,
65
],
[
64,
66
],
[
66,
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
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
84,
85
],
[
84,
86
],
[
66,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
87,
92
],
[
92,
93
],
[
92,
94
],
[
87,
95
],
[
95,
96
],
[
96,
97
],
[
87,
98
],
[
99,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
99,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
99,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
114,
117
],
[
117,
118
],
[
117,
119
],
[
113,
120
],
[
99,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
124,
127
],
[
127,
128
],
[
127,
129
],
[
123,
130
],
[
99,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
133,
135
],
[
99,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
136,
140
],
[
140,
141
],
[
140,
142
],
[
99,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
143,
147
],
[
0,
148
],
[
148,
149
],
[
148,
150
]
] | [
"import java.util.Scanner;\n \npublic class Main {\n\tstatic int[]z;\n public static int a,b,n,w,t;\n\tprivate static Scanner sc;\n public static void main(String[] args) {\n sc = new Scanner(System.in);\n w=sc.nextInt();\n n=sc.nextInt();\n z = new int[w];\n mmm();\n for(int i=0;i<w;i++)\n System.out.println(z[i]);\n }\n static void mmm(){\n \t for(int i=0;i<w;i++){\n z[i] = i+ 1;\n }\n \tfor(int i= 0; i< n; i++) {\n String mm= sc.next();\n String[] a1 = mm.split(\",\");\n a = Integer.parseInt(a1[0]) -1;\n b = Integer.parseInt(a1[1]) -1;\n t=z[a];\n z[a]=z[b];\n z[b]=t;\n }\n \t\n \t\n }\n }",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tstatic int[]z;\n public static int a,b,n,w,t;\n\tprivate static Scanner sc;\n public static void main(String[] args) {\n sc = new Scanner(System.in);\n w=sc.nextInt();\n n=sc.nextInt();\n z = new int[w];\n mmm();\n for(int i=0;i<w;i++)\n System.out.println(z[i]);\n }\n static void mmm(){\n \t for(int i=0;i<w;i++){\n z[i] = i+ 1;\n }\n \tfor(int i= 0; i< n; i++) {\n String mm= sc.next();\n String[] a1 = mm.split(\",\");\n a = Integer.parseInt(a1[0]) -1;\n b = Integer.parseInt(a1[1]) -1;\n t=z[a];\n z[a]=z[b];\n z[b]=t;\n }\n \t\n \t\n }\n }",
"Main",
"static int[]z;",
"z",
"public static int a",
"a",
"b",
"b",
"n",
"n",
"w",
"w",
"t;",
"t",
"private static Scanner sc;",
"sc",
"public static void main(String[] args) {\n sc = new Scanner(System.in);\n w=sc.nextInt();\n n=sc.nextInt();\n z = new int[w];\n mmm();\n for(int i=0;i<w;i++)\n System.out.println(z[i]);\n }",
"main",
"{\n sc = new Scanner(System.in);\n w=sc.nextInt();\n n=sc.nextInt();\n z = new int[w];\n mmm();\n for(int i=0;i<w;i++)\n System.out.println(z[i]);\n }",
"sc = new Scanner(System.in)",
"sc",
"new Scanner(System.in)",
"w=sc.nextInt()",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"n=sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"z = new int[w]",
"z",
"new int[w]",
"w",
"mmm()",
"mmm",
"for(int i=0;i<w;i++)\n System.out.println(z[i]);",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"System.out.println(z[i]);",
"System.out.println(z[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"z[i]",
"z",
"i",
"String[] args",
"args",
"static void mmm(){\n \t for(int i=0;i<w;i++){\n z[i] = i+ 1;\n }\n \tfor(int i= 0; i< n; i++) {\n String mm= sc.next();\n String[] a1 = mm.split(\",\");\n a = Integer.parseInt(a1[0]) -1;\n b = Integer.parseInt(a1[1]) -1;\n t=z[a];\n z[a]=z[b];\n z[b]=t;\n }\n \t\n \t\n }",
"mmm",
"{\n \t for(int i=0;i<w;i++){\n z[i] = i+ 1;\n }\n \tfor(int i= 0; i< n; i++) {\n String mm= sc.next();\n String[] a1 = mm.split(\",\");\n a = Integer.parseInt(a1[0]) -1;\n b = Integer.parseInt(a1[1]) -1;\n t=z[a];\n z[a]=z[b];\n z[b]=t;\n }\n \t\n \t\n }",
"for(int i=0;i<w;i++){\n z[i] = i+ 1;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"{\n z[i] = i+ 1;\n }",
"{\n z[i] = i+ 1;\n }",
"z[i] = i+ 1",
"z[i]",
"z",
"i",
"i+ 1",
"i",
"1",
"for(int i= 0; i< n; i++) {\n String mm= sc.next();\n String[] a1 = mm.split(\",\");\n a = Integer.parseInt(a1[0]) -1;\n b = Integer.parseInt(a1[1]) -1;\n t=z[a];\n z[a]=z[b];\n z[b]=t;\n }",
"int i= 0;",
"int i= 0;",
"i",
"0",
"i< n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String mm= sc.next();\n String[] a1 = mm.split(\",\");\n a = Integer.parseInt(a1[0]) -1;\n b = Integer.parseInt(a1[1]) -1;\n t=z[a];\n z[a]=z[b];\n z[b]=t;\n }",
"{\n String mm= sc.next();\n String[] a1 = mm.split(\",\");\n a = Integer.parseInt(a1[0]) -1;\n b = Integer.parseInt(a1[1]) -1;\n t=z[a];\n z[a]=z[b];\n z[b]=t;\n }",
"String mm= sc.next();",
"mm",
"sc.next()",
"sc.next",
"sc",
"String[] a1 = mm.split(\",\");",
"a1",
"mm.split(\",\")",
"mm.split",
"mm",
"\",\"",
"a = Integer.parseInt(a1[0]) -1",
"a",
"Integer.parseInt(a1[0]) -1",
"Integer.parseInt(a1[0])",
"Integer.parseInt",
"Integer",
"a1[0]",
"a1",
"0",
"1",
"b = Integer.parseInt(a1[1]) -1",
"b",
"Integer.parseInt(a1[1]) -1",
"Integer.parseInt(a1[1])",
"Integer.parseInt",
"Integer",
"a1[1]",
"a1",
"1",
"1",
"t=z[a]",
"t",
"z[a]",
"z",
"a",
"z[a]=z[b]",
"z[a]",
"z",
"a",
"z[b]",
"z",
"b",
"z[b]=t",
"z[b]",
"z",
"b",
"t",
"public class Main {\n\tstatic int[]z;\n public static int a,b,n,w,t;\n\tprivate static Scanner sc;\n public static void main(String[] args) {\n sc = new Scanner(System.in);\n w=sc.nextInt();\n n=sc.nextInt();\n z = new int[w];\n mmm();\n for(int i=0;i<w;i++)\n System.out.println(z[i]);\n }\n static void mmm(){\n \t for(int i=0;i<w;i++){\n z[i] = i+ 1;\n }\n \tfor(int i= 0; i< n; i++) {\n String mm= sc.next();\n String[] a1 = mm.split(\",\");\n a = Integer.parseInt(a1[0]) -1;\n b = Integer.parseInt(a1[1]) -1;\n t=z[a];\n z[a]=z[b];\n z[b]=t;\n }\n \t\n \t\n }\n }",
"public class Main {\n\tstatic int[]z;\n public static int a,b,n,w,t;\n\tprivate static Scanner sc;\n public static void main(String[] args) {\n sc = new Scanner(System.in);\n w=sc.nextInt();\n n=sc.nextInt();\n z = new int[w];\n mmm();\n for(int i=0;i<w;i++)\n System.out.println(z[i]);\n }\n static void mmm(){\n \t for(int i=0;i<w;i++){\n z[i] = i+ 1;\n }\n \tfor(int i= 0; i< n; i++) {\n String mm= sc.next();\n String[] a1 = mm.split(\",\");\n a = Integer.parseInt(a1[0]) -1;\n b = Integer.parseInt(a1[1]) -1;\n t=z[a];\n z[a]=z[b];\n z[b]=t;\n }\n \t\n \t\n }\n }",
"Main"
] | import java.util.Scanner;
public class Main {
static int[]z;
public static int a,b,n,w,t;
private static Scanner sc;
public static void main(String[] args) {
sc = new Scanner(System.in);
w=sc.nextInt();
n=sc.nextInt();
z = new int[w];
mmm();
for(int i=0;i<w;i++)
System.out.println(z[i]);
}
static void mmm(){
for(int i=0;i<w;i++){
z[i] = i+ 1;
}
for(int i= 0; i< n; i++) {
String mm= sc.next();
String[] a1 = mm.split(",");
a = Integer.parseInt(a1[0]) -1;
b = Integer.parseInt(a1[1]) -1;
t=z[a];
z[a]=z[b];
z[b]=t;
}
}
} |
[
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,
41,
13,
41,
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,
4,
18,
13,
13,
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,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
151,
8
],
[
151,
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
],
[
11,
27
],
[
27,
28
],
[
11,
29
],
[
29,
30
],
[
11,
31
],
[
31,
32
],
[
31,
33
],
[
11,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
51,
53
],
[
11,
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
],
[
66,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
89,
90
],
[
89,
91
],
[
66,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
97,
98
],
[
97,
99
],
[
66,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
104,
106
],
[
66,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
110,
112
],
[
107,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
115,
117
],
[
66,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
121,
123
],
[
118,
124
],
[
11,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
125,
130
],
[
130,
131
],
[
130,
132
],
[
125,
133
],
[
133,
134
],
[
134,
135
],
[
125,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
137,
142
],
[
142,
143
],
[
142,
144
],
[
11,
145
],
[
145,
146
],
[
146,
147
],
[
9,
148
],
[
148,
149
],
[
0,
150
],
[
150,
151
],
[
150,
152
]
] | [
"import java.util.*;\nimport java.util.regex.*;\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(),a,b,z;\n int[] amida = new int[w];\n for(int i=0;i<w;i++)amida[i]=i+1;\n for(int i=0;i<n;i++){\n String s = sc.next();\n Pattern pattern = Pattern.compile(\"\\\\D\");\n String[] splitStr = pattern.split(s);\n a = Integer.parseInt(splitStr[0]);\n b = Integer.parseInt(splitStr[1]);\n z = amida[a-1];\n amida[a-1] = amida[b-1];\n amida[b-1] = z;\n }\n for(int i=0;i<w;i++)System.out.println(amida[i]);\n sc.close();\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.util.regex.*;",
"regex.*",
"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 = sc.nextInt(),a,b,z;\n int[] amida = new int[w];\n for(int i=0;i<w;i++)amida[i]=i+1;\n for(int i=0;i<n;i++){\n String s = sc.next();\n Pattern pattern = Pattern.compile(\"\\\\D\");\n String[] splitStr = pattern.split(s);\n a = Integer.parseInt(splitStr[0]);\n b = Integer.parseInt(splitStr[1]);\n z = amida[a-1];\n amida[a-1] = amida[b-1];\n amida[b-1] = z;\n }\n for(int i=0;i<w;i++)System.out.println(amida[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 = sc.nextInt(),a,b,z;\n int[] amida = new int[w];\n for(int i=0;i<w;i++)amida[i]=i+1;\n for(int i=0;i<n;i++){\n String s = sc.next();\n Pattern pattern = Pattern.compile(\"\\\\D\");\n String[] splitStr = pattern.split(s);\n a = Integer.parseInt(splitStr[0]);\n b = Integer.parseInt(splitStr[1]);\n z = amida[a-1];\n amida[a-1] = amida[b-1];\n amida[b-1] = z;\n }\n for(int i=0;i<w;i++)System.out.println(amida[i]);\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt(),n = sc.nextInt(),a,b,z;\n int[] amida = new int[w];\n for(int i=0;i<w;i++)amida[i]=i+1;\n for(int i=0;i<n;i++){\n String s = sc.next();\n Pattern pattern = Pattern.compile(\"\\\\D\");\n String[] splitStr = pattern.split(s);\n a = Integer.parseInt(splitStr[0]);\n b = Integer.parseInt(splitStr[1]);\n z = amida[a-1];\n amida[a-1] = amida[b-1];\n amida[b-1] = z;\n }\n for(int i=0;i<w;i++)System.out.println(amida[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",
"n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"a",
"a",
"b",
"b",
"z;",
"z",
"int[] amida = new int[w];",
"amida",
"new int[w]",
"w",
"for(int i=0;i<w;i++)amida[i]=i+1;",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"amida[i]=i+1;",
"amida[i]=i+1",
"amida[i]",
"amida",
"i",
"i+1",
"i",
"1",
"for(int i=0;i<n;i++){\n String s = sc.next();\n Pattern pattern = Pattern.compile(\"\\\\D\");\n String[] splitStr = pattern.split(s);\n a = Integer.parseInt(splitStr[0]);\n b = Integer.parseInt(splitStr[1]);\n z = amida[a-1];\n amida[a-1] = amida[b-1];\n amida[b-1] = z;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String s = sc.next();\n Pattern pattern = Pattern.compile(\"\\\\D\");\n String[] splitStr = pattern.split(s);\n a = Integer.parseInt(splitStr[0]);\n b = Integer.parseInt(splitStr[1]);\n z = amida[a-1];\n amida[a-1] = amida[b-1];\n amida[b-1] = z;\n }",
"{\n String s = sc.next();\n Pattern pattern = Pattern.compile(\"\\\\D\");\n String[] splitStr = pattern.split(s);\n a = Integer.parseInt(splitStr[0]);\n b = Integer.parseInt(splitStr[1]);\n z = amida[a-1];\n amida[a-1] = amida[b-1];\n amida[b-1] = z;\n }",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"Pattern pattern = Pattern.compile(\"\\\\D\");",
"pattern",
"Pattern.compile(\"\\\\D\")",
"Pattern.compile",
"Pattern",
"\"\\\\D\"",
"String[] splitStr = pattern.split(s);",
"splitStr",
"pattern.split(s)",
"pattern.split",
"pattern",
"s",
"a = Integer.parseInt(splitStr[0])",
"a",
"Integer.parseInt(splitStr[0])",
"Integer.parseInt",
"Integer",
"splitStr[0]",
"splitStr",
"0",
"b = Integer.parseInt(splitStr[1])",
"b",
"Integer.parseInt(splitStr[1])",
"Integer.parseInt",
"Integer",
"splitStr[1]",
"splitStr",
"1",
"z = amida[a-1]",
"z",
"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] = z",
"amida[b-1]",
"amida",
"b-1",
"b",
"1",
"z",
"for(int i=0;i<w;i++)System.out.println(amida[i]);",
"int i=0;",
"int i=0;",
"i",
"0",
"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",
"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 = sc.nextInt(),a,b,z;\n int[] amida = new int[w];\n for(int i=0;i<w;i++)amida[i]=i+1;\n for(int i=0;i<n;i++){\n String s = sc.next();\n Pattern pattern = Pattern.compile(\"\\\\D\");\n String[] splitStr = pattern.split(s);\n a = Integer.parseInt(splitStr[0]);\n b = Integer.parseInt(splitStr[1]);\n z = amida[a-1];\n amida[a-1] = amida[b-1];\n amida[b-1] = z;\n }\n for(int i=0;i<w;i++)System.out.println(amida[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 = sc.nextInt(),a,b,z;\n int[] amida = new int[w];\n for(int i=0;i<w;i++)amida[i]=i+1;\n for(int i=0;i<n;i++){\n String s = sc.next();\n Pattern pattern = Pattern.compile(\"\\\\D\");\n String[] splitStr = pattern.split(s);\n a = Integer.parseInt(splitStr[0]);\n b = Integer.parseInt(splitStr[1]);\n z = amida[a-1];\n amida[a-1] = amida[b-1];\n amida[b-1] = z;\n }\n for(int i=0;i<w;i++)System.out.println(amida[i]);\n sc.close();\n }\n}",
"Main"
] | import java.util.*;
import java.util.regex.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int w = sc.nextInt(),n = sc.nextInt(),a,b,z;
int[] amida = new int[w];
for(int i=0;i<w;i++)amida[i]=i+1;
for(int i=0;i<n;i++){
String s = sc.next();
Pattern pattern = Pattern.compile("\\D");
String[] splitStr = pattern.split(s);
a = Integer.parseInt(splitStr[0]);
b = Integer.parseInt(splitStr[1]);
z = amida[a-1];
amida[a-1] = amida[b-1];
amida[b-1] = z;
}
for(int i=0;i<w;i++)System.out.println(amida[i]);
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
17,
41,
13,
17,
41,
13,
4,
18,
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,
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,
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
],
[
138,
5
],
[
138,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
16
],
[
16,
17
],
[
16,
18
],
[
8,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
8,
24
],
[
24,
25
],
[
24,
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
],
[
64,
65
],
[
65,
66
],
[
61,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
69,
73
],
[
61,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
80,
81
],
[
80,
82
],
[
76,
83
],
[
61,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
90,
91
],
[
90,
92
],
[
86,
93
],
[
61,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
96,
98
],
[
61,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
103,
104
],
[
103,
105
],
[
61,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
106,
110
],
[
8,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
111,
116
],
[
116,
117
],
[
116,
118
],
[
111,
119
],
[
119,
120
],
[
120,
121
],
[
111,
122
],
[
123,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
124,
129
],
[
129,
130
],
[
129,
131
],
[
8,
132
],
[
132,
133
],
[
133,
134
],
[
6,
135
],
[
135,
136
],
[
0,
137
],
[
137,
138
],
[
137,
139
]
] | [
"import java.util.*;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int box[] = new int[30];\n int x=0; \n int w = sc.nextInt();\n int n = sc.nextInt();\n \n for(int i=0;i<w;i++){\n box[i] = i + 1;\n }\n\n for(int i=0;i<n;i++){\n String str = sc.next();\n String[] ab = str.split(\",\",0);\n\n int a = Integer.parseInt(ab[0]) - 1;\n int b = Integer.parseInt(ab[1]) - 1;\n x = box[a];\n box[a] = box[b];\n box[b] = x;\n }\n\n for(int i=0;i<w;i++){\n System.out.println(box[i]);\n }\n\n sc.close();\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\n int box[] = new int[30];\n int x=0; \n int w = sc.nextInt();\n int n = sc.nextInt();\n \n for(int i=0;i<w;i++){\n box[i] = i + 1;\n }\n\n for(int i=0;i<n;i++){\n String str = sc.next();\n String[] ab = str.split(\",\",0);\n\n int a = Integer.parseInt(ab[0]) - 1;\n int b = Integer.parseInt(ab[1]) - 1;\n x = box[a];\n box[a] = box[b];\n box[b] = x;\n }\n\n for(int i=0;i<w;i++){\n System.out.println(box[i]);\n }\n\n sc.close();\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int box[] = new int[30];\n int x=0; \n int w = sc.nextInt();\n int n = sc.nextInt();\n \n for(int i=0;i<w;i++){\n box[i] = i + 1;\n }\n\n for(int i=0;i<n;i++){\n String str = sc.next();\n String[] ab = str.split(\",\",0);\n\n int a = Integer.parseInt(ab[0]) - 1;\n int b = Integer.parseInt(ab[1]) - 1;\n x = box[a];\n box[a] = box[b];\n box[b] = x;\n }\n\n for(int i=0;i<w;i++){\n System.out.println(box[i]);\n }\n\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n int box[] = new int[30];\n int x=0; \n int w = sc.nextInt();\n int n = sc.nextInt();\n \n for(int i=0;i<w;i++){\n box[i] = i + 1;\n }\n\n for(int i=0;i<n;i++){\n String str = sc.next();\n String[] ab = str.split(\",\",0);\n\n int a = Integer.parseInt(ab[0]) - 1;\n int b = Integer.parseInt(ab[1]) - 1;\n x = box[a];\n box[a] = box[b];\n box[b] = x;\n }\n\n for(int i=0;i<w;i++){\n System.out.println(box[i]);\n }\n\n sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int box[] = new int[30];",
"box",
"new int[30]",
"30",
"int x=0;",
"x",
"0",
"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 box[i] = i + 1;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"{\n box[i] = i + 1;\n }",
"{\n box[i] = i + 1;\n }",
"box[i] = i + 1",
"box[i]",
"box",
"i",
"i + 1",
"i",
"1",
"for(int i=0;i<n;i++){\n String str = sc.next();\n String[] ab = str.split(\",\",0);\n\n int a = Integer.parseInt(ab[0]) - 1;\n int b = Integer.parseInt(ab[1]) - 1;\n x = box[a];\n box[a] = box[b];\n box[b] = x;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String str = sc.next();\n String[] ab = str.split(\",\",0);\n\n int a = Integer.parseInt(ab[0]) - 1;\n int b = Integer.parseInt(ab[1]) - 1;\n x = box[a];\n box[a] = box[b];\n box[b] = x;\n }",
"{\n String str = sc.next();\n String[] ab = str.split(\",\",0);\n\n int a = Integer.parseInt(ab[0]) - 1;\n int b = Integer.parseInt(ab[1]) - 1;\n x = box[a];\n box[a] = box[b];\n box[b] = x;\n }",
"String str = sc.next();",
"str",
"sc.next()",
"sc.next",
"sc",
"String[] ab = str.split(\",\",0);",
"ab",
"str.split(\",\",0)",
"str.split",
"str",
"\",\"",
"0",
"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",
"x = box[a]",
"x",
"box[a]",
"box",
"a",
"box[a] = box[b]",
"box[a]",
"box",
"a",
"box[b]",
"box",
"b",
"box[b] = x",
"box[b]",
"box",
"b",
"x",
"for(int i=0;i<w;i++){\n System.out.println(box[i]);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"{\n System.out.println(box[i]);\n }",
"{\n System.out.println(box[i]);\n }",
"System.out.println(box[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"box[i]",
"box",
"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 box[] = new int[30];\n int x=0; \n int w = sc.nextInt();\n int n = sc.nextInt();\n \n for(int i=0;i<w;i++){\n box[i] = i + 1;\n }\n\n for(int i=0;i<n;i++){\n String str = sc.next();\n String[] ab = str.split(\",\",0);\n\n int a = Integer.parseInt(ab[0]) - 1;\n int b = Integer.parseInt(ab[1]) - 1;\n x = box[a];\n box[a] = box[b];\n box[b] = x;\n }\n\n for(int i=0;i<w;i++){\n System.out.println(box[i]);\n }\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 box[] = new int[30];\n int x=0; \n int w = sc.nextInt();\n int n = sc.nextInt();\n \n for(int i=0;i<w;i++){\n box[i] = i + 1;\n }\n\n for(int i=0;i<n;i++){\n String str = sc.next();\n String[] ab = str.split(\",\",0);\n\n int a = Integer.parseInt(ab[0]) - 1;\n int b = Integer.parseInt(ab[1]) - 1;\n x = box[a];\n box[a] = box[b];\n box[b] = x;\n }\n\n for(int i=0;i<w;i++){\n System.out.println(box[i]);\n }\n\n sc.close();\n }\n}",
"Main"
] | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int box[] = new int[30];
int x=0;
int w = sc.nextInt();
int n = sc.nextInt();
for(int i=0;i<w;i++){
box[i] = i + 1;
}
for(int i=0;i<n;i++){
String str = sc.next();
String[] ab = str.split(",",0);
int a = Integer.parseInt(ab[0]) - 1;
int b = Integer.parseInt(ab[1]) - 1;
x = box[a];
box[a] = box[b];
box[b] = x;
}
for(int i=0;i<w;i++){
System.out.println(box[i]);
}
sc.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
38,
30,
41,
13,
20,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
14,
13,
30,
0,
13,
20,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
13,
0,
13,
17,
30,
41,
13,
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,
40,
13,
14,
2,
13,
13,
30,
3,
11,
1,
41,
13,
17,
2,
13,
18,
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
],
[
175,
8
],
[
175,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
11,
21
],
[
21,
22
],
[
21,
23
],
[
11,
24
],
[
24,
25
],
[
24,
26
],
[
11,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
28,
32
],
[
32,
33
],
[
28,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
35,
41
],
[
34,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
45,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
60,
62
],
[
53,
63
],
[
63,
64
],
[
64,
65
],
[
53,
66
],
[
67,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
45,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
45,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
45,
84
],
[
84,
85
],
[
84,
86
],
[
43,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
87,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
102,
103
],
[
102,
104
],
[
98,
105
],
[
87,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
110,
113
],
[
113,
114
],
[
113,
115
],
[
109,
116
],
[
106,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
120,
123
],
[
123,
124
],
[
123,
125
],
[
119,
126
],
[
87,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
131,
134
],
[
134,
135
],
[
134,
136
],
[
130,
137
],
[
127,
138
],
[
87,
139
],
[
139,
140
],
[
87,
141
],
[
141,
142
],
[
142,
143
],
[
142,
144
],
[
141,
145
],
[
145,
146
],
[
28,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
147,
152
],
[
152,
153
],
[
152,
154
],
[
154,
155
],
[
154,
156
],
[
147,
157
],
[
157,
158
],
[
158,
159
],
[
147,
160
],
[
161,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
164,
165
],
[
164,
166
],
[
162,
167
],
[
167,
168
],
[
168,
169
],
[
168,
170
],
[
167,
171
],
[
9,
172
],
[
172,
173
],
[
0,
174
],
[
174,
175
],
[
174,
176
]
] | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main{\n\n\tpublic static void main(String[] args) throws Exception {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tboolean first=true;\n String str=\"\";\n int i=0,length=0;\n int[] amida = null;\n\n\t\ttry (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n String line;\n while ((line = br.readLine()) != null) {\n \tif(first){\n \t\tamida=new int[Integer.parseInt(line)];\n \t\tfor(int j=0;j<amida.length;j++){\n \t\t\tamida[j]=j;\n \t\t}\n \t\tline = br.readLine();\n \t\tlength =Integer.parseInt(line);\n \t\tfirst=false;\n \t}else{\n \t\tString[] tokens=line.split(\",\");\n \t\tint store=amida[Integer.parseInt(tokens[0])-1];\n \t\tamida[Integer.parseInt(tokens[0])-1]=amida[Integer.parseInt(tokens[1])-1];\n \t\tamida[Integer.parseInt(tokens[1])-1]=store;\n \t\ti++;\n \t\tif(i==length){\n \t\t\tbreak;\n \t\t}\n \t}\n }\n for(int k=0;k<amida.length;k++){\n \tSystem.out.println(amida[k]+1);\n }\n\t\t}\n\t}\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main{\n\n\tpublic static void main(String[] args) throws Exception {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tboolean first=true;\n String str=\"\";\n int i=0,length=0;\n int[] amida = null;\n\n\t\ttry (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n String line;\n while ((line = br.readLine()) != null) {\n \tif(first){\n \t\tamida=new int[Integer.parseInt(line)];\n \t\tfor(int j=0;j<amida.length;j++){\n \t\t\tamida[j]=j;\n \t\t}\n \t\tline = br.readLine();\n \t\tlength =Integer.parseInt(line);\n \t\tfirst=false;\n \t}else{\n \t\tString[] tokens=line.split(\",\");\n \t\tint store=amida[Integer.parseInt(tokens[0])-1];\n \t\tamida[Integer.parseInt(tokens[0])-1]=amida[Integer.parseInt(tokens[1])-1];\n \t\tamida[Integer.parseInt(tokens[1])-1]=store;\n \t\ti++;\n \t\tif(i==length){\n \t\t\tbreak;\n \t\t}\n \t}\n }\n for(int k=0;k<amida.length;k++){\n \tSystem.out.println(amida[k]+1);\n }\n\t\t}\n\t}\n\n}",
"Main",
"public static void main(String[] args) throws Exception {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tboolean first=true;\n String str=\"\";\n int i=0,length=0;\n int[] amida = null;\n\n\t\ttry (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n String line;\n while ((line = br.readLine()) != null) {\n \tif(first){\n \t\tamida=new int[Integer.parseInt(line)];\n \t\tfor(int j=0;j<amida.length;j++){\n \t\t\tamida[j]=j;\n \t\t}\n \t\tline = br.readLine();\n \t\tlength =Integer.parseInt(line);\n \t\tfirst=false;\n \t}else{\n \t\tString[] tokens=line.split(\",\");\n \t\tint store=amida[Integer.parseInt(tokens[0])-1];\n \t\tamida[Integer.parseInt(tokens[0])-1]=amida[Integer.parseInt(tokens[1])-1];\n \t\tamida[Integer.parseInt(tokens[1])-1]=store;\n \t\ti++;\n \t\tif(i==length){\n \t\t\tbreak;\n \t\t}\n \t}\n }\n for(int k=0;k<amida.length;k++){\n \tSystem.out.println(amida[k]+1);\n }\n\t\t}\n\t}",
"main",
"{\n\t\t// TODO ?????????????????????????????????????????????\n\t\tboolean first=true;\n String str=\"\";\n int i=0,length=0;\n int[] amida = null;\n\n\t\ttry (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n String line;\n while ((line = br.readLine()) != null) {\n \tif(first){\n \t\tamida=new int[Integer.parseInt(line)];\n \t\tfor(int j=0;j<amida.length;j++){\n \t\t\tamida[j]=j;\n \t\t}\n \t\tline = br.readLine();\n \t\tlength =Integer.parseInt(line);\n \t\tfirst=false;\n \t}else{\n \t\tString[] tokens=line.split(\",\");\n \t\tint store=amida[Integer.parseInt(tokens[0])-1];\n \t\tamida[Integer.parseInt(tokens[0])-1]=amida[Integer.parseInt(tokens[1])-1];\n \t\tamida[Integer.parseInt(tokens[1])-1]=store;\n \t\ti++;\n \t\tif(i==length){\n \t\t\tbreak;\n \t\t}\n \t}\n }\n for(int k=0;k<amida.length;k++){\n \tSystem.out.println(amida[k]+1);\n }\n\t\t}\n\t}",
"boolean first=true;",
"first",
"true",
"String str=\"\";",
"str",
"\"\"",
"int i=0",
"i",
"0",
"length=0;",
"length",
"0",
"int[] amida = null;",
"amida",
"null",
"try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n String line;\n while ((line = br.readLine()) != null) {\n \tif(first){\n \t\tamida=new int[Integer.parseInt(line)];\n \t\tfor(int j=0;j<amida.length;j++){\n \t\t\tamida[j]=j;\n \t\t}\n \t\tline = br.readLine();\n \t\tlength =Integer.parseInt(line);\n \t\tfirst=false;\n \t}else{\n \t\tString[] tokens=line.split(\",\");\n \t\tint store=amida[Integer.parseInt(tokens[0])-1];\n \t\tamida[Integer.parseInt(tokens[0])-1]=amida[Integer.parseInt(tokens[1])-1];\n \t\tamida[Integer.parseInt(tokens[1])-1]=store;\n \t\ti++;\n \t\tif(i==length){\n \t\t\tbreak;\n \t\t}\n \t}\n }\n for(int k=0;k<amida.length;k++){\n \tSystem.out.println(amida[k]+1);\n }\n\t\t}",
"{\n String line;\n while ((line = br.readLine()) != null) {\n \tif(first){\n \t\tamida=new int[Integer.parseInt(line)];\n \t\tfor(int j=0;j<amida.length;j++){\n \t\t\tamida[j]=j;\n \t\t}\n \t\tline = br.readLine();\n \t\tlength =Integer.parseInt(line);\n \t\tfirst=false;\n \t}else{\n \t\tString[] tokens=line.split(\",\");\n \t\tint store=amida[Integer.parseInt(tokens[0])-1];\n \t\tamida[Integer.parseInt(tokens[0])-1]=amida[Integer.parseInt(tokens[1])-1];\n \t\tamida[Integer.parseInt(tokens[1])-1]=store;\n \t\ti++;\n \t\tif(i==length){\n \t\t\tbreak;\n \t\t}\n \t}\n }\n for(int k=0;k<amida.length;k++){\n \tSystem.out.println(amida[k]+1);\n }\n\t\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in))",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in))",
"new BufferedReader(new InputStreamReader(System.in))",
"String line;",
"line",
"while ((line = br.readLine()) != null) {\n \tif(first){\n \t\tamida=new int[Integer.parseInt(line)];\n \t\tfor(int j=0;j<amida.length;j++){\n \t\t\tamida[j]=j;\n \t\t}\n \t\tline = br.readLine();\n \t\tlength =Integer.parseInt(line);\n \t\tfirst=false;\n \t}else{\n \t\tString[] tokens=line.split(\",\");\n \t\tint store=amida[Integer.parseInt(tokens[0])-1];\n \t\tamida[Integer.parseInt(tokens[0])-1]=amida[Integer.parseInt(tokens[1])-1];\n \t\tamida[Integer.parseInt(tokens[1])-1]=store;\n \t\ti++;\n \t\tif(i==length){\n \t\t\tbreak;\n \t\t}\n \t}\n }",
"(line = br.readLine()) != null",
"(line = br.readLine())",
"line",
"br.readLine()",
"br.readLine",
"br",
"null",
"{\n \tif(first){\n \t\tamida=new int[Integer.parseInt(line)];\n \t\tfor(int j=0;j<amida.length;j++){\n \t\t\tamida[j]=j;\n \t\t}\n \t\tline = br.readLine();\n \t\tlength =Integer.parseInt(line);\n \t\tfirst=false;\n \t}else{\n \t\tString[] tokens=line.split(\",\");\n \t\tint store=amida[Integer.parseInt(tokens[0])-1];\n \t\tamida[Integer.parseInt(tokens[0])-1]=amida[Integer.parseInt(tokens[1])-1];\n \t\tamida[Integer.parseInt(tokens[1])-1]=store;\n \t\ti++;\n \t\tif(i==length){\n \t\t\tbreak;\n \t\t}\n \t}\n }",
"if(first){\n \t\tamida=new int[Integer.parseInt(line)];\n \t\tfor(int j=0;j<amida.length;j++){\n \t\t\tamida[j]=j;\n \t\t}\n \t\tline = br.readLine();\n \t\tlength =Integer.parseInt(line);\n \t\tfirst=false;\n \t}else{\n \t\tString[] tokens=line.split(\",\");\n \t\tint store=amida[Integer.parseInt(tokens[0])-1];\n \t\tamida[Integer.parseInt(tokens[0])-1]=amida[Integer.parseInt(tokens[1])-1];\n \t\tamida[Integer.parseInt(tokens[1])-1]=store;\n \t\ti++;\n \t\tif(i==length){\n \t\t\tbreak;\n \t\t}\n \t}",
"first",
"{\n \t\tamida=new int[Integer.parseInt(line)];\n \t\tfor(int j=0;j<amida.length;j++){\n \t\t\tamida[j]=j;\n \t\t}\n \t\tline = br.readLine();\n \t\tlength =Integer.parseInt(line);\n \t\tfirst=false;\n \t}",
"amida=new int[Integer.parseInt(line)]",
"amida",
"new int[Integer.parseInt(line)]",
"Integer.parseInt(line)",
"Integer.parseInt",
"Integer",
"line",
"for(int j=0;j<amida.length;j++){\n \t\t\tamida[j]=j;\n \t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<amida.length",
"j",
"amida.length",
"amida",
"amida.length",
"j++",
"j++",
"j",
"{\n \t\t\tamida[j]=j;\n \t\t}",
"{\n \t\t\tamida[j]=j;\n \t\t}",
"amida[j]=j",
"amida[j]",
"amida",
"j",
"j",
"line = br.readLine()",
"line",
"br.readLine()",
"br.readLine",
"br",
"length =Integer.parseInt(line)",
"length",
"Integer.parseInt(line)",
"Integer.parseInt",
"Integer",
"line",
"first=false",
"first",
"false",
"{\n \t\tString[] tokens=line.split(\",\");\n \t\tint store=amida[Integer.parseInt(tokens[0])-1];\n \t\tamida[Integer.parseInt(tokens[0])-1]=amida[Integer.parseInt(tokens[1])-1];\n \t\tamida[Integer.parseInt(tokens[1])-1]=store;\n \t\ti++;\n \t\tif(i==length){\n \t\t\tbreak;\n \t\t}\n \t}",
"String[] tokens=line.split(\",\");",
"tokens",
"line.split(\",\")",
"line.split",
"line",
"\",\"",
"int store=amida[Integer.parseInt(tokens[0])-1];",
"store",
"amida[Integer.parseInt(tokens[0])-1]",
"amida",
"Integer.parseInt(tokens[0])-1",
"Integer.parseInt(tokens[0])",
"Integer.parseInt",
"Integer",
"tokens[0]",
"tokens",
"0",
"1",
"amida[Integer.parseInt(tokens[0])-1]=amida[Integer.parseInt(tokens[1])-1]",
"amida[Integer.parseInt(tokens[0])-1]",
"amida",
"Integer.parseInt(tokens[0])-1",
"Integer.parseInt(tokens[0])",
"Integer.parseInt",
"Integer",
"tokens[0]",
"tokens",
"0",
"1",
"amida[Integer.parseInt(tokens[1])-1]",
"amida",
"Integer.parseInt(tokens[1])-1",
"Integer.parseInt(tokens[1])",
"Integer.parseInt",
"Integer",
"tokens[1]",
"tokens",
"1",
"1",
"amida[Integer.parseInt(tokens[1])-1]=store",
"amida[Integer.parseInt(tokens[1])-1]",
"amida",
"Integer.parseInt(tokens[1])-1",
"Integer.parseInt(tokens[1])",
"Integer.parseInt",
"Integer",
"tokens[1]",
"tokens",
"1",
"1",
"store",
"i++",
"i",
"if(i==length){\n \t\t\tbreak;\n \t\t}",
"i==length",
"i",
"length",
"{\n \t\t\tbreak;\n \t\t}",
"break;",
"for(int k=0;k<amida.length;k++){\n \tSystem.out.println(amida[k]+1);\n }",
"int k=0;",
"int k=0;",
"k",
"0",
"k<amida.length",
"k",
"amida.length",
"amida",
"amida.length",
"k++",
"k++",
"k",
"{\n \tSystem.out.println(amida[k]+1);\n }",
"{\n \tSystem.out.println(amida[k]+1);\n }",
"System.out.println(amida[k]+1)",
"System.out.println",
"System.out",
"System",
"System.out",
"amida[k]+1",
"amida[k]",
"amida",
"k",
"1",
"String[] args",
"args",
"public class Main{\n\n\tpublic static void main(String[] args) throws Exception {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tboolean first=true;\n String str=\"\";\n int i=0,length=0;\n int[] amida = null;\n\n\t\ttry (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n String line;\n while ((line = br.readLine()) != null) {\n \tif(first){\n \t\tamida=new int[Integer.parseInt(line)];\n \t\tfor(int j=0;j<amida.length;j++){\n \t\t\tamida[j]=j;\n \t\t}\n \t\tline = br.readLine();\n \t\tlength =Integer.parseInt(line);\n \t\tfirst=false;\n \t}else{\n \t\tString[] tokens=line.split(\",\");\n \t\tint store=amida[Integer.parseInt(tokens[0])-1];\n \t\tamida[Integer.parseInt(tokens[0])-1]=amida[Integer.parseInt(tokens[1])-1];\n \t\tamida[Integer.parseInt(tokens[1])-1]=store;\n \t\ti++;\n \t\tif(i==length){\n \t\t\tbreak;\n \t\t}\n \t}\n }\n for(int k=0;k<amida.length;k++){\n \tSystem.out.println(amida[k]+1);\n }\n\t\t}\n\t}\n\n}",
"public class Main{\n\n\tpublic static void main(String[] args) throws Exception {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tboolean first=true;\n String str=\"\";\n int i=0,length=0;\n int[] amida = null;\n\n\t\ttry (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n String line;\n while ((line = br.readLine()) != null) {\n \tif(first){\n \t\tamida=new int[Integer.parseInt(line)];\n \t\tfor(int j=0;j<amida.length;j++){\n \t\t\tamida[j]=j;\n \t\t}\n \t\tline = br.readLine();\n \t\tlength =Integer.parseInt(line);\n \t\tfirst=false;\n \t}else{\n \t\tString[] tokens=line.split(\",\");\n \t\tint store=amida[Integer.parseInt(tokens[0])-1];\n \t\tamida[Integer.parseInt(tokens[0])-1]=amida[Integer.parseInt(tokens[1])-1];\n \t\tamida[Integer.parseInt(tokens[1])-1]=store;\n \t\ti++;\n \t\tif(i==length){\n \t\t\tbreak;\n \t\t}\n \t}\n }\n for(int k=0;k<amida.length;k++){\n \tSystem.out.println(amida[k]+1);\n }\n\t\t}\n\t}\n\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main{
public static void main(String[] args) throws Exception {
// TODO ?????????????????????????????????????????????
boolean first=true;
String str="";
int i=0,length=0;
int[] amida = null;
try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
String line;
while ((line = br.readLine()) != null) {
if(first){
amida=new int[Integer.parseInt(line)];
for(int j=0;j<amida.length;j++){
amida[j]=j;
}
line = br.readLine();
length =Integer.parseInt(line);
first=false;
}else{
String[] tokens=line.split(",");
int store=amida[Integer.parseInt(tokens[0])-1];
amida[Integer.parseInt(tokens[0])-1]=amida[Integer.parseInt(tokens[1])-1];
amida[Integer.parseInt(tokens[1])-1]=store;
i++;
if(i==length){
break;
}
}
}
for(int k=0;k<amida.length;k++){
System.out.println(amida[k]+1);
}
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
18,
13,
13,
17,
30,
41,
13,
20,
41,
13,
20,
4,
18,
13,
4,
18,
13,
41,
13,
41,
13,
41,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
41,
13,
41,
13,
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,
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,
18,
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
],
[
13,
14
],
[
13,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
16,
21
],
[
12,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
22,
26
],
[
26,
27
],
[
26,
28
],
[
29,
30
],
[
30,
31
],
[
29,
32
],
[
32,
33
],
[
33,
34
],
[
22,
35
],
[
35,
36
],
[
22,
37
],
[
37,
38
],
[
22,
39
],
[
39,
40
],
[
22,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
46,
47
],
[
47,
48
],
[
22,
49
],
[
49,
50
],
[
22,
51
],
[
51,
52
],
[
22,
53
],
[
53,
54
],
[
22,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
55,
65
],
[
65,
66
],
[
66,
67
],
[
55,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
73,
75
],
[
22,
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
],
[
93,
94
],
[
94,
95
],
[
91,
96
],
[
88,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
102,
103
],
[
102,
104
],
[
88,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
110,
111
],
[
110,
112
],
[
88,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
117,
119
],
[
88,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
123,
125
],
[
120,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
128,
130
],
[
88,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
134,
136
],
[
131,
137
],
[
22,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
138,
143
],
[
143,
144
],
[
143,
145
],
[
145,
146
],
[
145,
147
],
[
138,
148
],
[
148,
149
],
[
149,
150
],
[
138,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
154,
156
],
[
152,
157
],
[
157,
158
],
[
157,
159
],
[
9,
160
],
[
160,
161
]
] | [
"import java.io.*;\nimport java.util.*;\n\nclass Main{\n public static void main(String[] args){\n\ttry{\n\t BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));\n\t int[] x = new int[Integer.valueOf(sc.readLine())];\n\t int p, a, b, t = Integer.valueOf(sc.readLine());\n\t String st, u, v;\n\t for(int i=0; i<x.length; i++)\n\t\tx[i]=i+1;\n\t for(int i=0; i<t; i++){\n\t\tString[] parts = sc.readLine().split(\",\");\n\t\ta = Integer.valueOf(parts[0]);\n\t\tb = Integer.valueOf(parts[1]);\n\t\tp=x[a-1];\n\t\tx[a-1]=x[b-1];\n\t\tx[b-1]=p;\n\t }\n\t for(int i=0; i<x.length; i++)\n\t\tSystem.out.println(x[i]);\n\t}catch(Exception e){\n\t System.out.println(\"Error\");\n\t}\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"class Main{\n public static void main(String[] args){\n\ttry{\n\t BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));\n\t int[] x = new int[Integer.valueOf(sc.readLine())];\n\t int p, a, b, t = Integer.valueOf(sc.readLine());\n\t String st, u, v;\n\t for(int i=0; i<x.length; i++)\n\t\tx[i]=i+1;\n\t for(int i=0; i<t; i++){\n\t\tString[] parts = sc.readLine().split(\",\");\n\t\ta = Integer.valueOf(parts[0]);\n\t\tb = Integer.valueOf(parts[1]);\n\t\tp=x[a-1];\n\t\tx[a-1]=x[b-1];\n\t\tx[b-1]=p;\n\t }\n\t for(int i=0; i<x.length; i++)\n\t\tSystem.out.println(x[i]);\n\t}catch(Exception e){\n\t System.out.println(\"Error\");\n\t}\n }\n}",
"Main",
"public static void main(String[] args){\n\ttry{\n\t BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));\n\t int[] x = new int[Integer.valueOf(sc.readLine())];\n\t int p, a, b, t = Integer.valueOf(sc.readLine());\n\t String st, u, v;\n\t for(int i=0; i<x.length; i++)\n\t\tx[i]=i+1;\n\t for(int i=0; i<t; i++){\n\t\tString[] parts = sc.readLine().split(\",\");\n\t\ta = Integer.valueOf(parts[0]);\n\t\tb = Integer.valueOf(parts[1]);\n\t\tp=x[a-1];\n\t\tx[a-1]=x[b-1];\n\t\tx[b-1]=p;\n\t }\n\t for(int i=0; i<x.length; i++)\n\t\tSystem.out.println(x[i]);\n\t}catch(Exception e){\n\t System.out.println(\"Error\");\n\t}\n }",
"main",
"{\n\ttry{\n\t BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));\n\t int[] x = new int[Integer.valueOf(sc.readLine())];\n\t int p, a, b, t = Integer.valueOf(sc.readLine());\n\t String st, u, v;\n\t for(int i=0; i<x.length; i++)\n\t\tx[i]=i+1;\n\t for(int i=0; i<t; i++){\n\t\tString[] parts = sc.readLine().split(\",\");\n\t\ta = Integer.valueOf(parts[0]);\n\t\tb = Integer.valueOf(parts[1]);\n\t\tp=x[a-1];\n\t\tx[a-1]=x[b-1];\n\t\tx[b-1]=p;\n\t }\n\t for(int i=0; i<x.length; i++)\n\t\tSystem.out.println(x[i]);\n\t}catch(Exception e){\n\t System.out.println(\"Error\");\n\t}\n }",
"try{\n\t BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));\n\t int[] x = new int[Integer.valueOf(sc.readLine())];\n\t int p, a, b, t = Integer.valueOf(sc.readLine());\n\t String st, u, v;\n\t for(int i=0; i<x.length; i++)\n\t\tx[i]=i+1;\n\t for(int i=0; i<t; i++){\n\t\tString[] parts = sc.readLine().split(\",\");\n\t\ta = Integer.valueOf(parts[0]);\n\t\tb = Integer.valueOf(parts[1]);\n\t\tp=x[a-1];\n\t\tx[a-1]=x[b-1];\n\t\tx[b-1]=p;\n\t }\n\t for(int i=0; i<x.length; i++)\n\t\tSystem.out.println(x[i]);\n\t}catch(Exception e){\n\t System.out.println(\"Error\");\n\t}",
"catch(Exception e){\n\t System.out.println(\"Error\");\n\t}",
"Exception e",
"{\n\t System.out.println(\"Error\");\n\t}",
"System.out.println(\"Error\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Error\"",
"{\n\t BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));\n\t int[] x = new int[Integer.valueOf(sc.readLine())];\n\t int p, a, b, t = Integer.valueOf(sc.readLine());\n\t String st, u, v;\n\t for(int i=0; i<x.length; i++)\n\t\tx[i]=i+1;\n\t for(int i=0; i<t; i++){\n\t\tString[] parts = sc.readLine().split(\",\");\n\t\ta = Integer.valueOf(parts[0]);\n\t\tb = Integer.valueOf(parts[1]);\n\t\tp=x[a-1];\n\t\tx[a-1]=x[b-1];\n\t\tx[b-1]=p;\n\t }\n\t for(int i=0; i<x.length; i++)\n\t\tSystem.out.println(x[i]);\n\t}",
"BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));",
"sc",
"new BufferedReader(new InputStreamReader(System.in))",
"int[] x = new int[Integer.valueOf(sc.readLine())];",
"x",
"new int[Integer.valueOf(sc.readLine())]",
"Integer.valueOf(sc.readLine())",
"Integer.valueOf",
"Integer",
"sc.readLine()",
"sc.readLine",
"sc",
"int p",
"p",
"a",
"a",
"b",
"b",
"t = Integer.valueOf(sc.readLine());",
"t",
"Integer.valueOf(sc.readLine())",
"Integer.valueOf",
"Integer",
"sc.readLine()",
"sc.readLine",
"sc",
"String st",
"st",
"u",
"u",
"v;",
"v",
"for(int i=0; i<x.length; i++)\n\t\tx[i]=i+1;",
"int i=0;",
"int i=0;",
"i",
"0",
"i<x.length",
"i",
"x.length",
"x",
"x.length",
"i++",
"i++",
"i",
"x[i]=i+1;",
"x[i]=i+1",
"x[i]",
"x",
"i",
"i+1",
"i",
"1",
"for(int i=0; i<t; i++){\n\t\tString[] parts = sc.readLine().split(\",\");\n\t\ta = Integer.valueOf(parts[0]);\n\t\tb = Integer.valueOf(parts[1]);\n\t\tp=x[a-1];\n\t\tx[a-1]=x[b-1];\n\t\tx[b-1]=p;\n\t }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<t",
"i",
"t",
"i++",
"i++",
"i",
"{\n\t\tString[] parts = sc.readLine().split(\",\");\n\t\ta = Integer.valueOf(parts[0]);\n\t\tb = Integer.valueOf(parts[1]);\n\t\tp=x[a-1];\n\t\tx[a-1]=x[b-1];\n\t\tx[b-1]=p;\n\t }",
"{\n\t\tString[] parts = sc.readLine().split(\",\");\n\t\ta = Integer.valueOf(parts[0]);\n\t\tb = Integer.valueOf(parts[1]);\n\t\tp=x[a-1];\n\t\tx[a-1]=x[b-1];\n\t\tx[b-1]=p;\n\t }",
"String[] parts = sc.readLine().split(\",\");",
"parts",
"sc.readLine().split(\",\")",
"sc.readLine().split",
"sc.readLine()",
"sc.readLine",
"sc",
"\",\"",
"a = Integer.valueOf(parts[0])",
"a",
"Integer.valueOf(parts[0])",
"Integer.valueOf",
"Integer",
"parts[0]",
"parts",
"0",
"b = Integer.valueOf(parts[1])",
"b",
"Integer.valueOf(parts[1])",
"Integer.valueOf",
"Integer",
"parts[1]",
"parts",
"1",
"p=x[a-1]",
"p",
"x[a-1]",
"x",
"a-1",
"a",
"1",
"x[a-1]=x[b-1]",
"x[a-1]",
"x",
"a-1",
"a",
"1",
"x[b-1]",
"x",
"b-1",
"b",
"1",
"x[b-1]=p",
"x[b-1]",
"x",
"b-1",
"b",
"1",
"p",
"for(int i=0; i<x.length; i++)\n\t\tSystem.out.println(x[i]);",
"int i=0;",
"int i=0;",
"i",
"0",
"i<x.length",
"i",
"x.length",
"x",
"x.length",
"i++",
"i++",
"i",
"System.out.println(x[i]);",
"System.out.println(x[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"x[i]",
"x",
"i",
"String[] args",
"args"
] | import java.io.*;
import java.util.*;
class Main{
public static void main(String[] args){
try{
BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
int[] x = new int[Integer.valueOf(sc.readLine())];
int p, a, b, t = Integer.valueOf(sc.readLine());
String st, u, v;
for(int i=0; i<x.length; i++)
x[i]=i+1;
for(int i=0; i<t; i++){
String[] parts = sc.readLine().split(",");
a = Integer.valueOf(parts[0]);
b = Integer.valueOf(parts[1]);
p=x[a-1];
x[a-1]=x[b-1];
x[b-1]=p;
}
for(int i=0; i<x.length; i++)
System.out.println(x[i]);
}catch(Exception e){
System.out.println("Error");
}
}
} |
[
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,
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
],
[
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
],
[
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\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[] value = new int[w];\n\t\tfor(int i = 0; i< w; i++) {\n\t\t\tvalue[i] = i + 1;\n\t\t}\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\tint a = Integer.parseInt(ab[0]) -1;\n\t\t\tint b = Integer.parseInt(ab[1]) -1;\n\t\t\tint tmp = value[a];\n\t\t\tvalue[a] = value[b];\n\t\t\tvalue[b] = tmp;\n\t\t}\n\n\t\tfor(int i=0; i<w; i++) {\n\t\t\tSystem.out.println(value[i]);\n\t\t}\n\t\tsc.close();\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[] value = new int[w];\n\t\tfor(int i = 0; i< w; i++) {\n\t\t\tvalue[i] = i + 1;\n\t\t}\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\tint a = Integer.parseInt(ab[0]) -1;\n\t\t\tint b = Integer.parseInt(ab[1]) -1;\n\t\t\tint tmp = value[a];\n\t\t\tvalue[a] = value[b];\n\t\t\tvalue[b] = tmp;\n\t\t}\n\n\t\tfor(int i=0; i<w; i++) {\n\t\t\tSystem.out.println(value[i]);\n\t\t}\n\t\tsc.close();\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[] value = new int[w];\n\t\tfor(int i = 0; i< w; i++) {\n\t\t\tvalue[i] = i + 1;\n\t\t}\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\tint a = Integer.parseInt(ab[0]) -1;\n\t\t\tint b = Integer.parseInt(ab[1]) -1;\n\t\t\tint tmp = value[a];\n\t\t\tvalue[a] = value[b];\n\t\t\tvalue[b] = tmp;\n\t\t}\n\n\t\tfor(int i=0; i<w; i++) {\n\t\t\tSystem.out.println(value[i]);\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[] value = new int[w];\n\t\tfor(int i = 0; i< w; i++) {\n\t\t\tvalue[i] = i + 1;\n\t\t}\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\tint a = Integer.parseInt(ab[0]) -1;\n\t\t\tint b = Integer.parseInt(ab[1]) -1;\n\t\t\tint tmp = value[a];\n\t\t\tvalue[a] = value[b];\n\t\t\tvalue[b] = tmp;\n\t\t}\n\n\t\tfor(int i=0; i<w; i++) {\n\t\t\tSystem.out.println(value[i]);\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[] value = new int[w];",
"value",
"new int[w]",
"w",
"for(int i = 0; i< w; i++) {\n\t\t\tvalue[i] = i + 1;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i< w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tvalue[i] = i + 1;\n\t\t}",
"{\n\t\t\tvalue[i] = i + 1;\n\t\t}",
"value[i] = i + 1",
"value[i]",
"value",
"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 tmp = value[a];\n\t\t\tvalue[a] = value[b];\n\t\t\tvalue[b] = tmp;\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 tmp = value[a];\n\t\t\tvalue[a] = value[b];\n\t\t\tvalue[b] = tmp;\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 tmp = value[a];\n\t\t\tvalue[a] = value[b];\n\t\t\tvalue[b] = tmp;\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 tmp = value[a];",
"tmp",
"value[a]",
"value",
"a",
"value[a] = value[b]",
"value[a]",
"value",
"a",
"value[b]",
"value",
"b",
"value[b] = tmp",
"value[b]",
"value",
"b",
"tmp",
"for(int i=0; i<w; i++) {\n\t\t\tSystem.out.println(value[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(value[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(value[i]);\n\t\t}",
"System.out.println(value[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"value[i]",
"value",
"i",
"sc.close()",
"sc.close",
"sc",
"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\tint[] value = new int[w];\n\t\tfor(int i = 0; i< w; i++) {\n\t\t\tvalue[i] = i + 1;\n\t\t}\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\tint a = Integer.parseInt(ab[0]) -1;\n\t\t\tint b = Integer.parseInt(ab[1]) -1;\n\t\t\tint tmp = value[a];\n\t\t\tvalue[a] = value[b];\n\t\t\tvalue[b] = tmp;\n\t\t}\n\n\t\tfor(int i=0; i<w; i++) {\n\t\t\tSystem.out.println(value[i]);\n\t\t}\n\t\tsc.close();\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[] value = new int[w];\n\t\tfor(int i = 0; i< w; i++) {\n\t\t\tvalue[i] = i + 1;\n\t\t}\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\tint a = Integer.parseInt(ab[0]) -1;\n\t\t\tint b = Integer.parseInt(ab[1]) -1;\n\t\t\tint tmp = value[a];\n\t\t\tvalue[a] = value[b];\n\t\t\tvalue[b] = tmp;\n\t\t}\n\n\t\tfor(int i=0; i<w; i++) {\n\t\t\tSystem.out.println(value[i]);\n\t\t}\n\t\tsc.close();\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[] value = new int[w];
for(int i = 0; i< w; i++) {
value[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 tmp = value[a];
value[a] = value[b];
value[b] = tmp;
}
for(int i=0; i<w; i++) {
System.out.println(value[i]);
}
sc.close();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
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,
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
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
7,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
17,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
28,
29
],
[
29,
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
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
51,
53
],
[
14,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
54,
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
],
[
72,
73
],
[
71,
74
],
[
74,
75
],
[
74,
76
],
[
70,
77
],
[
59,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
84,
85
],
[
84,
86
],
[
80,
87
],
[
59,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
90,
92
],
[
59,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
97,
98
],
[
97,
99
],
[
59,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
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
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
117,
122
],
[
122,
123
],
[
122,
124
],
[
12,
125
],
[
125,
126
]
] | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\nclass Main {\n\n static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n public static void main(String[] args) throws Exception{\n\n int w = Integer.parseInt(reader.readLine());\n int n = Integer.parseInt(reader.readLine());\n\n int[] seq = new int[w];\n for (int i=0; i<w; i++)\n seq[i] = i+1;\n\n while (n-- > 0) {\n String[] s = reader.readLine().split(\",\");\n int begin = Integer.parseInt(s[0]) - 1;\n int end = Integer.parseInt(s[1]) - 1;\n\n int tmp = seq[begin];\n seq[begin] = seq[end];\n seq[end] = tmp;\n }\n\n for (int i=0; i<w; i++)\n System.out.println(seq[i]);\n }\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"class Main {\n\n static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n public static void main(String[] args) throws Exception{\n\n int w = Integer.parseInt(reader.readLine());\n int n = Integer.parseInt(reader.readLine());\n\n int[] seq = new int[w];\n for (int i=0; i<w; i++)\n seq[i] = i+1;\n\n while (n-- > 0) {\n String[] s = reader.readLine().split(\",\");\n int begin = Integer.parseInt(s[0]) - 1;\n int end = Integer.parseInt(s[1]) - 1;\n\n int tmp = seq[begin];\n seq[begin] = seq[end];\n seq[end] = tmp;\n }\n\n for (int i=0; i<w; i++)\n System.out.println(seq[i]);\n }\n\n}",
"Main",
"static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));",
"reader",
"new BufferedReader(new InputStreamReader(System.in))",
"public static void main(String[] args) throws Exception{\n\n int w = Integer.parseInt(reader.readLine());\n int n = Integer.parseInt(reader.readLine());\n\n int[] seq = new int[w];\n for (int i=0; i<w; i++)\n seq[i] = i+1;\n\n while (n-- > 0) {\n String[] s = reader.readLine().split(\",\");\n int begin = Integer.parseInt(s[0]) - 1;\n int end = Integer.parseInt(s[1]) - 1;\n\n int tmp = seq[begin];\n seq[begin] = seq[end];\n seq[end] = tmp;\n }\n\n for (int i=0; i<w; i++)\n System.out.println(seq[i]);\n }",
"main",
"{\n\n int w = Integer.parseInt(reader.readLine());\n int n = Integer.parseInt(reader.readLine());\n\n int[] seq = new int[w];\n for (int i=0; i<w; i++)\n seq[i] = i+1;\n\n while (n-- > 0) {\n String[] s = reader.readLine().split(\",\");\n int begin = Integer.parseInt(s[0]) - 1;\n int end = Integer.parseInt(s[1]) - 1;\n\n int tmp = seq[begin];\n seq[begin] = seq[end];\n seq[end] = tmp;\n }\n\n for (int i=0; i<w; i++)\n System.out.println(seq[i]);\n }",
"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[] seq = new int[w];",
"seq",
"new int[w]",
"w",
"for (int i=0; i<w; i++)\n seq[i] = i+1;",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"seq[i] = i+1;",
"seq[i] = i+1",
"seq[i]",
"seq",
"i",
"i+1",
"i",
"1",
"while (n-- > 0) {\n String[] s = reader.readLine().split(\",\");\n int begin = Integer.parseInt(s[0]) - 1;\n int end = Integer.parseInt(s[1]) - 1;\n\n int tmp = seq[begin];\n seq[begin] = seq[end];\n seq[end] = tmp;\n }",
"n-- > 0",
"n--",
"n",
"0",
"{\n String[] s = reader.readLine().split(\",\");\n int begin = Integer.parseInt(s[0]) - 1;\n int end = Integer.parseInt(s[1]) - 1;\n\n int tmp = seq[begin];\n seq[begin] = seq[end];\n seq[end] = tmp;\n }",
"String[] s = reader.readLine().split(\",\");",
"s",
"reader.readLine().split(\",\")",
"reader.readLine().split",
"reader.readLine()",
"reader.readLine",
"reader",
"\",\"",
"int begin = Integer.parseInt(s[0]) - 1;",
"begin",
"Integer.parseInt(s[0]) - 1",
"Integer.parseInt(s[0])",
"Integer.parseInt",
"Integer",
"s[0]",
"s",
"0",
"1",
"int end = Integer.parseInt(s[1]) - 1;",
"end",
"Integer.parseInt(s[1]) - 1",
"Integer.parseInt(s[1])",
"Integer.parseInt",
"Integer",
"s[1]",
"s",
"1",
"1",
"int tmp = seq[begin];",
"tmp",
"seq[begin]",
"seq",
"begin",
"seq[begin] = seq[end]",
"seq[begin]",
"seq",
"begin",
"seq[end]",
"seq",
"end",
"seq[end] = tmp",
"seq[end]",
"seq",
"end",
"tmp",
"for (int i=0; i<w; i++)\n System.out.println(seq[i]);",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"System.out.println(seq[i]);",
"System.out.println(seq[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"seq[i]",
"seq",
"i",
"String[] args",
"args"
] | import java.io.BufferedReader;
import java.io.InputStreamReader;
class Main {
static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
public static void main(String[] args) throws Exception{
int w = Integer.parseInt(reader.readLine());
int n = Integer.parseInt(reader.readLine());
int[] seq = new int[w];
for (int i=0; i<w; i++)
seq[i] = i+1;
while (n-- > 0) {
String[] s = reader.readLine().split(",");
int begin = Integer.parseInt(s[0]) - 1;
int end = Integer.parseInt(s[1]) - 1;
int tmp = seq[begin];
seq[begin] = seq[end];
seq[end] = tmp;
}
for (int i=0; i<w; i++)
System.out.println(seq[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,
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,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
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,
4,
13,
13,
2,
13,
17,
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,
12,
13,
30,
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
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
177,
11
],
[
177,
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
],
[
33,
34
],
[
34,
35
],
[
14,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
14,
42
],
[
42,
43
],
[
42,
44
],
[
14,
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
],
[
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
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
89,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
78,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
102,
103
],
[
103,
104
],
[
102,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
106,
109
],
[
105,
110
],
[
102,
111
],
[
111,
112
],
[
112,
113
],
[
78,
114
],
[
114,
115
],
[
114,
116
],
[
114,
117
],
[
117,
118
],
[
117,
119
],
[
114,
120
],
[
120,
121
],
[
120,
122
],
[
14,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
123,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
130,
132
],
[
123,
133
],
[
133,
134
],
[
134,
135
],
[
123,
136
],
[
137,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
138,
143
],
[
143,
144
],
[
143,
145
],
[
12,
146
],
[
146,
147
],
[
177,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
153,
154
],
[
153,
155
],
[
150,
156
],
[
156,
157
],
[
157,
158
],
[
157,
159
],
[
156,
160
],
[
160,
161
],
[
160,
162
],
[
150,
163
],
[
163,
164
],
[
164,
165
],
[
164,
166
],
[
163,
167
],
[
150,
168
],
[
168,
169
],
[
148,
170
],
[
170,
171
],
[
148,
172
],
[
172,
173
],
[
148,
174
],
[
174,
175
],
[
0,
176
],
[
176,
177
],
[
176,
178
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main{\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tstr = br.readLine();\n\t\tint w = Integer.parseInt(str);\n\t\tstr = br.readLine();\n\t\tint n = Integer.parseInt(str);\n\n\t\tint array[] = new int[w];\n\n\t\tfor(int i=0; i<w; i++){\n\t\t\tarray[i] = i+1;\n\t\t}\n\n\t\tfor(int i=0; i<n; i++){\n\t\t\tstr = br.readLine();\n\t\t\tint a = Integer.parseInt(str.substring(0, str.indexOf(\",\")));\n\t\t\tint b = Integer.parseInt(str.substring(str.indexOf(\",\")+1, str.length()));\n\n\t\t\tswap(array,a-1,b-1);\n\n\t\t}\n\n\t\tfor(int i=0; i<array.length; i++){\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\n\t}\n\n\n\tstatic int[] swap(int[] list,int a, int b){\n\t\tint temp = list[a];\n\t\tlist[a] = list[b];\n\t\tlist[b] = temp;\n\n\t\treturn list;\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\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tstr = br.readLine();\n\t\tint w = Integer.parseInt(str);\n\t\tstr = br.readLine();\n\t\tint n = Integer.parseInt(str);\n\n\t\tint array[] = new int[w];\n\n\t\tfor(int i=0; i<w; i++){\n\t\t\tarray[i] = i+1;\n\t\t}\n\n\t\tfor(int i=0; i<n; i++){\n\t\t\tstr = br.readLine();\n\t\t\tint a = Integer.parseInt(str.substring(0, str.indexOf(\",\")));\n\t\t\tint b = Integer.parseInt(str.substring(str.indexOf(\",\")+1, str.length()));\n\n\t\t\tswap(array,a-1,b-1);\n\n\t\t}\n\n\t\tfor(int i=0; i<array.length; i++){\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\n\t}\n\n\n\tstatic int[] swap(int[] list,int a, int b){\n\t\tint temp = list[a];\n\t\tlist[a] = list[b];\n\t\tlist[b] = temp;\n\n\t\treturn list;\n\t}\n\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tstr = br.readLine();\n\t\tint w = Integer.parseInt(str);\n\t\tstr = br.readLine();\n\t\tint n = Integer.parseInt(str);\n\n\t\tint array[] = new int[w];\n\n\t\tfor(int i=0; i<w; i++){\n\t\t\tarray[i] = i+1;\n\t\t}\n\n\t\tfor(int i=0; i<n; i++){\n\t\t\tstr = br.readLine();\n\t\t\tint a = Integer.parseInt(str.substring(0, str.indexOf(\",\")));\n\t\t\tint b = Integer.parseInt(str.substring(str.indexOf(\",\")+1, str.length()));\n\n\t\t\tswap(array,a-1,b-1);\n\n\t\t}\n\n\t\tfor(int i=0; i<array.length; i++){\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tstr = br.readLine();\n\t\tint w = Integer.parseInt(str);\n\t\tstr = br.readLine();\n\t\tint n = Integer.parseInt(str);\n\n\t\tint array[] = new int[w];\n\n\t\tfor(int i=0; i<w; i++){\n\t\t\tarray[i] = i+1;\n\t\t}\n\n\t\tfor(int i=0; i<n; i++){\n\t\t\tstr = br.readLine();\n\t\t\tint a = Integer.parseInt(str.substring(0, str.indexOf(\",\")));\n\t\t\tint b = Integer.parseInt(str.substring(str.indexOf(\",\")+1, str.length()));\n\n\t\t\tswap(array,a-1,b-1);\n\n\t\t}\n\n\t\tfor(int i=0; i<array.length; i++){\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\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 w = Integer.parseInt(str);",
"w",
"Integer.parseInt(str)",
"Integer.parseInt",
"Integer",
"str",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"int n = Integer.parseInt(str);",
"n",
"Integer.parseInt(str)",
"Integer.parseInt",
"Integer",
"str",
"int array[] = new int[w];",
"array",
"new int[w]",
"w",
"for(int i=0; i<w; i++){\n\t\t\tarray[i] = i+1;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tarray[i] = i+1;\n\t\t}",
"{\n\t\t\tarray[i] = i+1;\n\t\t}",
"array[i] = i+1",
"array[i]",
"array",
"i",
"i+1",
"i",
"1",
"for(int i=0; i<n; i++){\n\t\t\tstr = br.readLine();\n\t\t\tint a = Integer.parseInt(str.substring(0, str.indexOf(\",\")));\n\t\t\tint b = Integer.parseInt(str.substring(str.indexOf(\",\")+1, str.length()));\n\n\t\t\tswap(array,a-1,b-1);\n\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tstr = br.readLine();\n\t\t\tint a = Integer.parseInt(str.substring(0, str.indexOf(\",\")));\n\t\t\tint b = Integer.parseInt(str.substring(str.indexOf(\",\")+1, str.length()));\n\n\t\t\tswap(array,a-1,b-1);\n\n\t\t}",
"{\n\t\t\tstr = br.readLine();\n\t\t\tint a = Integer.parseInt(str.substring(0, str.indexOf(\",\")));\n\t\t\tint b = Integer.parseInt(str.substring(str.indexOf(\",\")+1, str.length()));\n\n\t\t\tswap(array,a-1,b-1);\n\n\t\t}",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"int a = Integer.parseInt(str.substring(0, str.indexOf(\",\")));",
"a",
"Integer.parseInt(str.substring(0, str.indexOf(\",\")))",
"Integer.parseInt",
"Integer",
"str.substring(0, str.indexOf(\",\"))",
"str.substring",
"str",
"0",
"str.indexOf(\",\")",
"str.indexOf",
"str",
"\",\"",
"int b = Integer.parseInt(str.substring(str.indexOf(\",\")+1, str.length()));",
"b",
"Integer.parseInt(str.substring(str.indexOf(\",\")+1, str.length()))",
"Integer.parseInt",
"Integer",
"str.substring(str.indexOf(\",\")+1, str.length())",
"str.substring",
"str",
"str.indexOf(\",\")+1",
"str.indexOf(\",\")",
"str.indexOf",
"str",
"\",\"",
"1",
"str.length()",
"str.length",
"str",
"swap(array,a-1,b-1)",
"swap",
"array",
"a-1",
"a",
"1",
"b-1",
"b",
"1",
"for(int i=0; i<array.length; i++){\n\t\t\tSystem.out.println(array[i]);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<array.length",
"i",
"array.length",
"array",
"array.length",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(array[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(array[i]);\n\t\t}",
"System.out.println(array[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"array[i]",
"array",
"i",
"String[] args",
"args",
"static int[] swap(int[] list,int a, int b){\n\t\tint temp = list[a];\n\t\tlist[a] = list[b];\n\t\tlist[b] = temp;\n\n\t\treturn list;\n\t}",
"swap",
"{\n\t\tint temp = list[a];\n\t\tlist[a] = list[b];\n\t\tlist[b] = temp;\n\n\t\treturn list;\n\t}",
"int temp = list[a];",
"temp",
"list[a]",
"list",
"a",
"list[a] = list[b]",
"list[a]",
"list",
"a",
"list[b]",
"list",
"b",
"list[b] = temp",
"list[b]",
"list",
"b",
"temp",
"return list;",
"list",
"int[] list",
"list",
"int a",
"a",
"int b",
"b",
"public class Main{\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tstr = br.readLine();\n\t\tint w = Integer.parseInt(str);\n\t\tstr = br.readLine();\n\t\tint n = Integer.parseInt(str);\n\n\t\tint array[] = new int[w];\n\n\t\tfor(int i=0; i<w; i++){\n\t\t\tarray[i] = i+1;\n\t\t}\n\n\t\tfor(int i=0; i<n; i++){\n\t\t\tstr = br.readLine();\n\t\t\tint a = Integer.parseInt(str.substring(0, str.indexOf(\",\")));\n\t\t\tint b = Integer.parseInt(str.substring(str.indexOf(\",\")+1, str.length()));\n\n\t\t\tswap(array,a-1,b-1);\n\n\t\t}\n\n\t\tfor(int i=0; i<array.length; i++){\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\n\t}\n\n\n\tstatic int[] swap(int[] list,int a, int b){\n\t\tint temp = list[a];\n\t\tlist[a] = list[b];\n\t\tlist[b] = temp;\n\n\t\treturn list;\n\t}\n\n}",
"public class Main{\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tstr = br.readLine();\n\t\tint w = Integer.parseInt(str);\n\t\tstr = br.readLine();\n\t\tint n = Integer.parseInt(str);\n\n\t\tint array[] = new int[w];\n\n\t\tfor(int i=0; i<w; i++){\n\t\t\tarray[i] = i+1;\n\t\t}\n\n\t\tfor(int i=0; i<n; i++){\n\t\t\tstr = br.readLine();\n\t\t\tint a = Integer.parseInt(str.substring(0, str.indexOf(\",\")));\n\t\t\tint b = Integer.parseInt(str.substring(str.indexOf(\",\")+1, str.length()));\n\n\t\t\tswap(array,a-1,b-1);\n\n\t\t}\n\n\t\tfor(int i=0; i<array.length; i++){\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\n\t}\n\n\n\tstatic int[] swap(int[] list,int a, int b){\n\t\tint temp = list[a];\n\t\tlist[a] = list[b];\n\t\tlist[b] = temp;\n\n\t\treturn list;\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 {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str;
str = br.readLine();
int w = Integer.parseInt(str);
str = br.readLine();
int n = Integer.parseInt(str);
int array[] = new int[w];
for(int i=0; i<w; i++){
array[i] = i+1;
}
for(int i=0; i<n; i++){
str = br.readLine();
int a = Integer.parseInt(str.substring(0, str.indexOf(",")));
int b = Integer.parseInt(str.substring(str.indexOf(",")+1, str.length()));
swap(array,a-1,b-1);
}
for(int i=0; i<array.length; i++){
System.out.println(array[i]);
}
}
static int[] swap(int[] list,int a, int b){
int temp = list[a];
list[a] = list[b];
list[b] = temp;
return list;
}
} |
[
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,
17,
41,
13,
20,
2,
13,
17,
41,
13,
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,
0,
13,
4,
18,
4,
18,
13,
17,
0,
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,
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
],
[
132,
5
],
[
132,
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
],
[
29,
30
],
[
29,
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
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
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
],
[
68,
69
],
[
69,
70
],
[
66,
71
],
[
63,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
79,
80
],
[
79,
81
],
[
63,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
88,
89
],
[
88,
90
],
[
82,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
96,
97
],
[
96,
98
],
[
63,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
102,
105
],
[
105,
106
],
[
105,
107
],
[
99,
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
],
[
0,
131
],
[
131,
132
],
[
131,
133
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n \n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint w = s.nextInt();\n\t\tint n = s.nextInt();\n\t\tString[] in = new String[2];\n\t\tint[] out = new int[w+1];\n\t\tint temp;\n\t\tfor(int i=0 ; i<=w ; i++)\n\t\t\tout[i] = i;\n\t\tfor(int i=0 ; i<n ; i++){\n\t\t\tin = s.next().split(\",\");\n\t\t\ttemp = out[Integer.parseInt(in[0])];\n\t\t\tout[Integer.parseInt(in[0])] = out[Integer.parseInt(in[1])];\n\t\t\tout[Integer.parseInt(in[1])] = temp;\n\t\t}\n\t\tfor(int i=1 ; i<=w ; i++)\n\t\t\tSystem.out.println(out[i]);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n \n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint w = s.nextInt();\n\t\tint n = s.nextInt();\n\t\tString[] in = new String[2];\n\t\tint[] out = new int[w+1];\n\t\tint temp;\n\t\tfor(int i=0 ; i<=w ; i++)\n\t\t\tout[i] = i;\n\t\tfor(int i=0 ; i<n ; i++){\n\t\t\tin = s.next().split(\",\");\n\t\t\ttemp = out[Integer.parseInt(in[0])];\n\t\t\tout[Integer.parseInt(in[0])] = out[Integer.parseInt(in[1])];\n\t\t\tout[Integer.parseInt(in[1])] = temp;\n\t\t}\n\t\tfor(int i=1 ; i<=w ; i++)\n\t\t\tSystem.out.println(out[i]);\n }\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint w = s.nextInt();\n\t\tint n = s.nextInt();\n\t\tString[] in = new String[2];\n\t\tint[] out = new int[w+1];\n\t\tint temp;\n\t\tfor(int i=0 ; i<=w ; i++)\n\t\t\tout[i] = i;\n\t\tfor(int i=0 ; i<n ; i++){\n\t\t\tin = s.next().split(\",\");\n\t\t\ttemp = out[Integer.parseInt(in[0])];\n\t\t\tout[Integer.parseInt(in[0])] = out[Integer.parseInt(in[1])];\n\t\t\tout[Integer.parseInt(in[1])] = temp;\n\t\t}\n\t\tfor(int i=1 ; i<=w ; i++)\n\t\t\tSystem.out.println(out[i]);\n }",
"main",
"{\n\t\tScanner s = new Scanner(System.in);\n\t\tint w = s.nextInt();\n\t\tint n = s.nextInt();\n\t\tString[] in = new String[2];\n\t\tint[] out = new int[w+1];\n\t\tint temp;\n\t\tfor(int i=0 ; i<=w ; i++)\n\t\t\tout[i] = i;\n\t\tfor(int i=0 ; i<n ; i++){\n\t\t\tin = s.next().split(\",\");\n\t\t\ttemp = out[Integer.parseInt(in[0])];\n\t\t\tout[Integer.parseInt(in[0])] = out[Integer.parseInt(in[1])];\n\t\t\tout[Integer.parseInt(in[1])] = temp;\n\t\t}\n\t\tfor(int i=1 ; i<=w ; i++)\n\t\t\tSystem.out.println(out[i]);\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",
"String[] in = new String[2];",
"in",
"new String[2]",
"2",
"int[] out = new int[w+1];",
"out",
"new int[w+1]",
"w+1",
"w",
"1",
"int temp;",
"temp",
"for(int i=0 ; i<=w ; i++)\n\t\t\tout[i] = i;",
"int i=0 ;",
"int i=0 ;",
"i",
"0",
"i<=w",
"i",
"w",
"i++",
"i++",
"i",
"out[i] = i;",
"out[i] = i",
"out[i]",
"out",
"i",
"i",
"for(int i=0 ; i<n ; i++){\n\t\t\tin = s.next().split(\",\");\n\t\t\ttemp = out[Integer.parseInt(in[0])];\n\t\t\tout[Integer.parseInt(in[0])] = out[Integer.parseInt(in[1])];\n\t\t\tout[Integer.parseInt(in[1])] = temp;\n\t\t}",
"int i=0 ;",
"int i=0 ;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tin = s.next().split(\",\");\n\t\t\ttemp = out[Integer.parseInt(in[0])];\n\t\t\tout[Integer.parseInt(in[0])] = out[Integer.parseInt(in[1])];\n\t\t\tout[Integer.parseInt(in[1])] = temp;\n\t\t}",
"{\n\t\t\tin = s.next().split(\",\");\n\t\t\ttemp = out[Integer.parseInt(in[0])];\n\t\t\tout[Integer.parseInt(in[0])] = out[Integer.parseInt(in[1])];\n\t\t\tout[Integer.parseInt(in[1])] = temp;\n\t\t}",
"in = s.next().split(\",\")",
"in",
"s.next().split(\",\")",
"s.next().split",
"s.next()",
"s.next",
"s",
"\",\"",
"temp = out[Integer.parseInt(in[0])]",
"temp",
"out[Integer.parseInt(in[0])]",
"out",
"Integer.parseInt(in[0])",
"Integer.parseInt",
"Integer",
"in[0]",
"in",
"0",
"out[Integer.parseInt(in[0])] = out[Integer.parseInt(in[1])]",
"out[Integer.parseInt(in[0])]",
"out",
"Integer.parseInt(in[0])",
"Integer.parseInt",
"Integer",
"in[0]",
"in",
"0",
"out[Integer.parseInt(in[1])]",
"out",
"Integer.parseInt(in[1])",
"Integer.parseInt",
"Integer",
"in[1]",
"in",
"1",
"out[Integer.parseInt(in[1])] = temp",
"out[Integer.parseInt(in[1])]",
"out",
"Integer.parseInt(in[1])",
"Integer.parseInt",
"Integer",
"in[1]",
"in",
"1",
"temp",
"for(int i=1 ; i<=w ; i++)\n\t\t\tSystem.out.println(out[i]);",
"int i=1 ;",
"int i=1 ;",
"i",
"1",
"i<=w",
"i",
"w",
"i++",
"i++",
"i",
"System.out.println(out[i]);",
"System.out.println(out[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"out[i]",
"out",
"i",
"String[] args",
"args",
"public class Main {\n \n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint w = s.nextInt();\n\t\tint n = s.nextInt();\n\t\tString[] in = new String[2];\n\t\tint[] out = new int[w+1];\n\t\tint temp;\n\t\tfor(int i=0 ; i<=w ; i++)\n\t\t\tout[i] = i;\n\t\tfor(int i=0 ; i<n ; i++){\n\t\t\tin = s.next().split(\",\");\n\t\t\ttemp = out[Integer.parseInt(in[0])];\n\t\t\tout[Integer.parseInt(in[0])] = out[Integer.parseInt(in[1])];\n\t\t\tout[Integer.parseInt(in[1])] = temp;\n\t\t}\n\t\tfor(int i=1 ; i<=w ; i++)\n\t\t\tSystem.out.println(out[i]);\n }\n}",
"public class Main {\n \n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint w = s.nextInt();\n\t\tint n = s.nextInt();\n\t\tString[] in = new String[2];\n\t\tint[] out = new int[w+1];\n\t\tint temp;\n\t\tfor(int i=0 ; i<=w ; i++)\n\t\t\tout[i] = i;\n\t\tfor(int i=0 ; i<n ; i++){\n\t\t\tin = s.next().split(\",\");\n\t\t\ttemp = out[Integer.parseInt(in[0])];\n\t\t\tout[Integer.parseInt(in[0])] = out[Integer.parseInt(in[1])];\n\t\t\tout[Integer.parseInt(in[1])] = temp;\n\t\t}\n\t\tfor(int i=1 ; i<=w ; i++)\n\t\t\tSystem.out.println(out[i]);\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int w = s.nextInt();
int n = s.nextInt();
String[] in = new String[2];
int[] out = new int[w+1];
int temp;
for(int i=0 ; i<=w ; i++)
out[i] = i;
for(int i=0 ; i<n ; i++){
in = s.next().split(",");
temp = out[Integer.parseInt(in[0])];
out[Integer.parseInt(in[0])] = out[Integer.parseInt(in[1])];
out[Integer.parseInt(in[1])] = temp;
}
for(int i=1 ; i<=w ; i++)
System.out.println(out[i]);
}
} |
[
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,
41,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
41,
13,
20,
2,
17,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
2,
13,
17,
4,
18,
13,
0,
18,
13,
2,
2,
13,
17,
17,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
2,
18,
13,
2,
13,
17,
17,
0,
18,
13,
2,
18,
13,
2,
13,
17,
17,
18,
13,
2,
18,
13,
2,
2,
13,
17,
17,
17,
0,
18,
13,
2,
18,
13,
2,
2,
13,
17,
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
],
[
173,
5
],
[
173,
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
],
[
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
],
[
49,
51
],
[
8,
52
],
[
52,
53
],
[
52,
54
],
[
55,
56
],
[
55,
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
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
74,
76
],
[
71,
77
],
[
77,
78
],
[
78,
79
],
[
70,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
80,
88
],
[
88,
89
],
[
89,
90
],
[
8,
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
],
[
104,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
111,
113
],
[
108,
114
],
[
103,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
121,
123
],
[
118,
124
],
[
115,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
130,
134
],
[
127,
135
],
[
103,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
143,
144
],
[
143,
145
],
[
142,
146
],
[
139,
147
],
[
136,
148
],
[
8,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
149,
154
],
[
154,
155
],
[
154,
156
],
[
149,
157
],
[
157,
158
],
[
158,
159
],
[
149,
160
],
[
161,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
164,
165
],
[
164,
166
],
[
162,
167
],
[
167,
168
],
[
167,
169
],
[
6,
170
],
[
170,
171
],
[
0,
172
],
[
172,
173
],
[
172,
174
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tscanner.useDelimiter(\"[\\\\n,]\");\n\t\tint l_num = scanner.nextInt();\n\t\tint w_num = scanner.nextInt();\n\t\tint[] ans = new int[l_num];\n\t\tint tmp;\n\t\tfor(int i=0; i<l_num; i++){\n\t\t\tans[i] = i+1;\n\t\t}\n\t\tint[] change = new int[2*w_num];\n\t\tfor(int i=0; i <w_num ; i++){\n\t\t\tchange[i*2] = scanner.nextInt();\n\t\t\tchange[(i*2)+1] = scanner.nextInt();\n\t\t}\n\t\tfor(int i=0; i<w_num ; i++){\n\t\t\ttmp = ans[change[i*2]-1];\n\t\t\tans[change[i*2]-1] = ans[change[i*2+1]-1];\n\t\t\tans[change[i*2+1]-1] = tmp;\t\t\n\t\t}\n\t\tfor(int i=0; i<l_num; i++){\n\t\t\tSystem.out.println(ans[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 scanner = new Scanner(System.in);\n\t\tscanner.useDelimiter(\"[\\\\n,]\");\n\t\tint l_num = scanner.nextInt();\n\t\tint w_num = scanner.nextInt();\n\t\tint[] ans = new int[l_num];\n\t\tint tmp;\n\t\tfor(int i=0; i<l_num; i++){\n\t\t\tans[i] = i+1;\n\t\t}\n\t\tint[] change = new int[2*w_num];\n\t\tfor(int i=0; i <w_num ; i++){\n\t\t\tchange[i*2] = scanner.nextInt();\n\t\t\tchange[(i*2)+1] = scanner.nextInt();\n\t\t}\n\t\tfor(int i=0; i<w_num ; i++){\n\t\t\ttmp = ans[change[i*2]-1];\n\t\t\tans[change[i*2]-1] = ans[change[i*2+1]-1];\n\t\t\tans[change[i*2+1]-1] = tmp;\t\t\n\t\t}\n\t\tfor(int i=0; i<l_num; i++){\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tscanner.useDelimiter(\"[\\\\n,]\");\n\t\tint l_num = scanner.nextInt();\n\t\tint w_num = scanner.nextInt();\n\t\tint[] ans = new int[l_num];\n\t\tint tmp;\n\t\tfor(int i=0; i<l_num; i++){\n\t\t\tans[i] = i+1;\n\t\t}\n\t\tint[] change = new int[2*w_num];\n\t\tfor(int i=0; i <w_num ; i++){\n\t\t\tchange[i*2] = scanner.nextInt();\n\t\t\tchange[(i*2)+1] = scanner.nextInt();\n\t\t}\n\t\tfor(int i=0; i<w_num ; i++){\n\t\t\ttmp = ans[change[i*2]-1];\n\t\t\tans[change[i*2]-1] = ans[change[i*2+1]-1];\n\t\t\tans[change[i*2+1]-1] = tmp;\t\t\n\t\t}\n\t\tfor(int i=0; i<l_num; i++){\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner scanner = new Scanner(System.in);\n\t\tscanner.useDelimiter(\"[\\\\n,]\");\n\t\tint l_num = scanner.nextInt();\n\t\tint w_num = scanner.nextInt();\n\t\tint[] ans = new int[l_num];\n\t\tint tmp;\n\t\tfor(int i=0; i<l_num; i++){\n\t\t\tans[i] = i+1;\n\t\t}\n\t\tint[] change = new int[2*w_num];\n\t\tfor(int i=0; i <w_num ; i++){\n\t\t\tchange[i*2] = scanner.nextInt();\n\t\t\tchange[(i*2)+1] = scanner.nextInt();\n\t\t}\n\t\tfor(int i=0; i<w_num ; i++){\n\t\t\ttmp = ans[change[i*2]-1];\n\t\t\tans[change[i*2]-1] = ans[change[i*2+1]-1];\n\t\t\tans[change[i*2+1]-1] = tmp;\t\t\n\t\t}\n\t\tfor(int i=0; i<l_num; i++){\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t}",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"scanner.useDelimiter(\"[\\\\n,]\")",
"scanner.useDelimiter",
"scanner",
"\"[\\\\n,]\"",
"int l_num = scanner.nextInt();",
"l_num",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int w_num = scanner.nextInt();",
"w_num",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int[] ans = new int[l_num];",
"ans",
"new int[l_num]",
"l_num",
"int tmp;",
"tmp",
"for(int i=0; i<l_num; i++){\n\t\t\tans[i] = i+1;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<l_num",
"i",
"l_num",
"i++",
"i++",
"i",
"{\n\t\t\tans[i] = i+1;\n\t\t}",
"{\n\t\t\tans[i] = i+1;\n\t\t}",
"ans[i] = i+1",
"ans[i]",
"ans",
"i",
"i+1",
"i",
"1",
"int[] change = new int[2*w_num];",
"change",
"new int[2*w_num]",
"2*w_num",
"2",
"w_num",
"for(int i=0; i <w_num ; i++){\n\t\t\tchange[i*2] = scanner.nextInt();\n\t\t\tchange[(i*2)+1] = scanner.nextInt();\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i <w_num",
"i",
"w_num",
"i++",
"i++",
"i",
"{\n\t\t\tchange[i*2] = scanner.nextInt();\n\t\t\tchange[(i*2)+1] = scanner.nextInt();\n\t\t}",
"{\n\t\t\tchange[i*2] = scanner.nextInt();\n\t\t\tchange[(i*2)+1] = scanner.nextInt();\n\t\t}",
"change[i*2] = scanner.nextInt()",
"change[i*2]",
"change",
"i*2",
"i",
"2",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"change[(i*2)+1] = scanner.nextInt()",
"change[(i*2)+1]",
"change",
"(i*2)+1",
"(i*2)",
"i",
"2",
"1",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"for(int i=0; i<w_num ; i++){\n\t\t\ttmp = ans[change[i*2]-1];\n\t\t\tans[change[i*2]-1] = ans[change[i*2+1]-1];\n\t\t\tans[change[i*2+1]-1] = tmp;\t\t\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w_num",
"i",
"w_num",
"i++",
"i++",
"i",
"{\n\t\t\ttmp = ans[change[i*2]-1];\n\t\t\tans[change[i*2]-1] = ans[change[i*2+1]-1];\n\t\t\tans[change[i*2+1]-1] = tmp;\t\t\n\t\t}",
"{\n\t\t\ttmp = ans[change[i*2]-1];\n\t\t\tans[change[i*2]-1] = ans[change[i*2+1]-1];\n\t\t\tans[change[i*2+1]-1] = tmp;\t\t\n\t\t}",
"tmp = ans[change[i*2]-1]",
"tmp",
"ans[change[i*2]-1]",
"ans",
"change[i*2]-1",
"change[i*2]",
"change",
"i*2",
"i",
"2",
"1",
"ans[change[i*2]-1] = ans[change[i*2+1]-1]",
"ans[change[i*2]-1]",
"ans",
"change[i*2]-1",
"change[i*2]",
"change",
"i*2",
"i",
"2",
"1",
"ans[change[i*2+1]-1]",
"ans",
"change[i*2+1]-1",
"change[i*2+1]",
"change",
"i*2+1",
"i*2",
"i",
"2",
"1",
"1",
"ans[change[i*2+1]-1] = tmp",
"ans[change[i*2+1]-1]",
"ans",
"change[i*2+1]-1",
"change[i*2+1]",
"change",
"i*2+1",
"i*2",
"i",
"2",
"1",
"1",
"tmp",
"for(int i=0; i<l_num; i++){\n\t\t\tSystem.out.println(ans[i]);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<l_num",
"i",
"l_num",
"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[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tscanner.useDelimiter(\"[\\\\n,]\");\n\t\tint l_num = scanner.nextInt();\n\t\tint w_num = scanner.nextInt();\n\t\tint[] ans = new int[l_num];\n\t\tint tmp;\n\t\tfor(int i=0; i<l_num; i++){\n\t\t\tans[i] = i+1;\n\t\t}\n\t\tint[] change = new int[2*w_num];\n\t\tfor(int i=0; i <w_num ; i++){\n\t\t\tchange[i*2] = scanner.nextInt();\n\t\t\tchange[(i*2)+1] = scanner.nextInt();\n\t\t}\n\t\tfor(int i=0; i<w_num ; i++){\n\t\t\ttmp = ans[change[i*2]-1];\n\t\t\tans[change[i*2]-1] = ans[change[i*2+1]-1];\n\t\t\tans[change[i*2+1]-1] = tmp;\t\t\n\t\t}\n\t\tfor(int i=0; i<l_num; i++){\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tscanner.useDelimiter(\"[\\\\n,]\");\n\t\tint l_num = scanner.nextInt();\n\t\tint w_num = scanner.nextInt();\n\t\tint[] ans = new int[l_num];\n\t\tint tmp;\n\t\tfor(int i=0; i<l_num; i++){\n\t\t\tans[i] = i+1;\n\t\t}\n\t\tint[] change = new int[2*w_num];\n\t\tfor(int i=0; i <w_num ; i++){\n\t\t\tchange[i*2] = scanner.nextInt();\n\t\t\tchange[(i*2)+1] = scanner.nextInt();\n\t\t}\n\t\tfor(int i=0; i<w_num ; i++){\n\t\t\ttmp = ans[change[i*2]-1];\n\t\t\tans[change[i*2]-1] = ans[change[i*2+1]-1];\n\t\t\tans[change[i*2+1]-1] = tmp;\t\t\n\t\t}\n\t\tfor(int i=0; i<l_num; i++){\n\t\t\tSystem.out.println(ans[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);
scanner.useDelimiter("[\\n,]");
int l_num = scanner.nextInt();
int w_num = scanner.nextInt();
int[] ans = new int[l_num];
int tmp;
for(int i=0; i<l_num; i++){
ans[i] = i+1;
}
int[] change = new int[2*w_num];
for(int i=0; i <w_num ; i++){
change[i*2] = scanner.nextInt();
change[(i*2)+1] = scanner.nextInt();
}
for(int i=0; i<w_num ; i++){
tmp = ans[change[i*2]-1];
ans[change[i*2]-1] = ans[change[i*2+1]-1];
ans[change[i*2+1]-1] = tmp;
}
for(int i=0; i<l_num; i++){
System.out.println(ans[i]);
}
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
12,
13,
30,
0,
13,
20,
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,
41,
13,
20,
13,
17,
41,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
18,
18,
13,
13,
17,
4,
18,
13,
4,
18,
13,
17,
4,
18,
13,
17,
0,
18,
18,
13,
13,
17,
4,
18,
13,
4,
18,
13,
2,
4,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
18,
13,
13,
17,
18,
13,
13,
30,
0,
18,
13,
13,
18,
18,
13,
13,
17,
14,
2,
18,
18,
13,
13,
17,
18,
13,
13,
30,
0,
18,
13,
13,
18,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
2,
13,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
225,
5
],
[
225,
6
],
[
6,
7
],
[
225,
8
],
[
8,
9
],
[
8,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],
[
14,
15
],
[
10,
16
],
[
16,
17
],
[
10,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
10,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
10,
28
],
[
28,
29
],
[
28,
30
],
[
10,
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
],
[
49,
51
],
[
10,
52
],
[
52,
53
],
[
52,
54
],
[
10,
57
],
[
57,
58
],
[
10,
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
],
[
71,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
77,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
86,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
71,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
94,
100
],
[
100,
101
],
[
101,
102
],
[
100,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
106,
111
],
[
10,
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
],
[
125,
133
],
[
133,
134
],
[
134,
135
],
[
125,
136
],
[
137,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
140,
144
],
[
139,
145
],
[
145,
146
],
[
145,
147
],
[
138,
148
],
[
148,
149
],
[
149,
150
],
[
150,
151
],
[
150,
152
],
[
149,
153
],
[
153,
154
],
[
154,
155
],
[
154,
156
],
[
153,
157
],
[
138,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
161,
163
],
[
160,
164
],
[
159,
165
],
[
165,
166
],
[
165,
167
],
[
158,
168
],
[
168,
169
],
[
169,
170
],
[
170,
171
],
[
170,
172
],
[
169,
173
],
[
173,
174
],
[
174,
175
],
[
174,
176
],
[
173,
177
],
[
10,
178
],
[
178,
179
],
[
179,
180
],
[
180,
181
],
[
180,
182
],
[
178,
183
],
[
183,
184
],
[
183,
185
],
[
178,
186
],
[
186,
187
],
[
187,
188
],
[
178,
189
],
[
190,
190
],
[
190,
191
],
[
191,
192
],
[
192,
193
],
[
193,
194
],
[
193,
195
],
[
191,
196
],
[
196,
197
],
[
196,
198
],
[
191,
199
],
[
199,
200
],
[
200,
201
],
[
191,
202
],
[
203,
203
],
[
203,
204
],
[
204,
205
],
[
205,
206
],
[
206,
207
],
[
206,
208
],
[
205,
209
],
[
209,
210
],
[
209,
211
],
[
204,
212
],
[
212,
213
],
[
213,
214
],
[
214,
215
],
[
215,
216
],
[
215,
217
],
[
213,
218
],
[
213,
219
],
[
219,
220
],
[
219,
221
],
[
8,
222
],
[
222,
223
],
[
0,
224
],
[
224,
225
],
[
224,
226
]
] | [
"import java.util.Scanner;\n//0011 DrawingLots}\n\npublic class Main {\n\tprivate static Scanner sc;\n\n\tpublic static void main(String args[]) {\n\t\tsc = new Scanner(System.in);\n\t\tint w, n;\n\n\t\t// w???n???????????????\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\n\t\t// ??´??°???????????????????????????????????????????????????????£??????????????????????????????¨??????????£????\n\t\tint number[] = new int[w];\n\t\t// ?????????????¨????\n\t\tfor (int k = 0; k < w; k++) {\n\t\t\tnumber[k] = k + 1;\n\t\t}\n\n\t\t// ?¨??£???????????????????????????????????¬¬????????¨?¬¬???????????°????????????\n\t\tint hbar[][] = new int[n][2];\n\n\t\t// ???????????¨???n?????????string????????????????????????????????¨??????int???????????????HorizontalBar???????´???????\n\t\t// ?????¨??????????£??????¢??????????¨??£??????????????´???´????????§?????????????????????????????°????????????\n\t\t// ????????????????????????????????????????????????\n\t\tString buff;\n\n\t\tfor (int k = 0; k < n; k++) {\n\t\t\t// System.out.printf(\"aa1\\n\");\n\n\t\t\tbuff = sc.next();\n\n\t\t\t// // System.out.printf(\"aa2\\n\");\n\t\t\t// System.out.printf(\"%s\\n\", buff);\n\t\t\t// System.out.printf(\"1's : %d\\n\",\n\t\t\t// Integer.parseInt(buff.substring(0, buff.indexOf(\",\"))));\n\t\t\t// System.out.printf(\"%d\\n\", buff.indexOf(\",\"));\n\t\t\t// System.out.printf(\"2's : %d\\n\",\n\t\t\t// Integer.parseInt(buff.substring(2)));\n\n\t\t\t// ??????????????????????????¨??????????????????????????°????????????????´?\n\t\t\thbar[k][0] = Integer.parseInt(buff.substring(0, buff.indexOf(\",\")));\n\t\t\thbar[k][1] = Integer.parseInt(buff.substring(buff.indexOf(\",\") + 1));\n\n\t\t\t// System.out.printf(\"[%d][%d] : (%d, %d)\\n\", k, 01, hbar[k][0],\n\t\t\t// hbar[k][1]);\n\t\t}\n\n\t\t// ????£????????????§?????????????????????\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\t// ?¨??£???§???????????????????£?????????????a1???b1????????£???????????????????????????????´¢???????????????\n\t\t\t// ???????????????????¨??£?????????????????????????????????????????£???????????????????\n\t\t\tfor (int k = 0; k < n; k++) {\n\t\t\t\tif (hbar[k][0] == number[i]) {\n\t\t\t\t\t// System.out.printf(\"HITleft!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][1], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][1];\n\t\t\t\t} else if (hbar[k][1] == number[i]) {\n\t\t\t\t\t// System.out.printf(\"HITright!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][0], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int k = 0; k < w; k++) {\n\t\t\tfor (int i = 0; i < w; i++) {\n\t\t\t\tif (number[i] == k + 1) {\n\t\t\t\t\t// System.out.printf(\"number[%d](=%d) == %d\\n\", i + 1,\n\t\t\t\t\t// number[i], k + 1);\n\t\t\t\t\tSystem.out.printf(\"%d\\n\", i + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tprivate static Scanner sc;\n\n\tpublic static void main(String args[]) {\n\t\tsc = new Scanner(System.in);\n\t\tint w, n;\n\n\t\t// w???n???????????????\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\n\t\t// ??´??°???????????????????????????????????????????????????????£??????????????????????????????¨??????????£????\n\t\tint number[] = new int[w];\n\t\t// ?????????????¨????\n\t\tfor (int k = 0; k < w; k++) {\n\t\t\tnumber[k] = k + 1;\n\t\t}\n\n\t\t// ?¨??£???????????????????????????????????¬¬????????¨?¬¬???????????°????????????\n\t\tint hbar[][] = new int[n][2];\n\n\t\t// ???????????¨???n?????????string????????????????????????????????¨??????int???????????????HorizontalBar???????´???????\n\t\t// ?????¨??????????£??????¢??????????¨??£??????????????´???´????????§?????????????????????????????°????????????\n\t\t// ????????????????????????????????????????????????\n\t\tString buff;\n\n\t\tfor (int k = 0; k < n; k++) {\n\t\t\t// System.out.printf(\"aa1\\n\");\n\n\t\t\tbuff = sc.next();\n\n\t\t\t// // System.out.printf(\"aa2\\n\");\n\t\t\t// System.out.printf(\"%s\\n\", buff);\n\t\t\t// System.out.printf(\"1's : %d\\n\",\n\t\t\t// Integer.parseInt(buff.substring(0, buff.indexOf(\",\"))));\n\t\t\t// System.out.printf(\"%d\\n\", buff.indexOf(\",\"));\n\t\t\t// System.out.printf(\"2's : %d\\n\",\n\t\t\t// Integer.parseInt(buff.substring(2)));\n\n\t\t\t// ??????????????????????????¨??????????????????????????°????????????????´?\n\t\t\thbar[k][0] = Integer.parseInt(buff.substring(0, buff.indexOf(\",\")));\n\t\t\thbar[k][1] = Integer.parseInt(buff.substring(buff.indexOf(\",\") + 1));\n\n\t\t\t// System.out.printf(\"[%d][%d] : (%d, %d)\\n\", k, 01, hbar[k][0],\n\t\t\t// hbar[k][1]);\n\t\t}\n\n\t\t// ????£????????????§?????????????????????\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\t// ?¨??£???§???????????????????£?????????????a1???b1????????£???????????????????????????????´¢???????????????\n\t\t\t// ???????????????????¨??£?????????????????????????????????????????£???????????????????\n\t\t\tfor (int k = 0; k < n; k++) {\n\t\t\t\tif (hbar[k][0] == number[i]) {\n\t\t\t\t\t// System.out.printf(\"HITleft!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][1], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][1];\n\t\t\t\t} else if (hbar[k][1] == number[i]) {\n\t\t\t\t\t// System.out.printf(\"HITright!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][0], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int k = 0; k < w; k++) {\n\t\t\tfor (int i = 0; i < w; i++) {\n\t\t\t\tif (number[i] == k + 1) {\n\t\t\t\t\t// System.out.printf(\"number[%d](=%d) == %d\\n\", i + 1,\n\t\t\t\t\t// number[i], k + 1);\n\t\t\t\t\tSystem.out.printf(\"%d\\n\", i + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}\n\n}",
"Main",
"private static Scanner sc;",
"sc",
"public static void main(String args[]) {\n\t\tsc = new Scanner(System.in);\n\t\tint w, n;\n\n\t\t// w???n???????????????\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\n\t\t// ??´??°???????????????????????????????????????????????????????£??????????????????????????????¨??????????£????\n\t\tint number[] = new int[w];\n\t\t// ?????????????¨????\n\t\tfor (int k = 0; k < w; k++) {\n\t\t\tnumber[k] = k + 1;\n\t\t}\n\n\t\t// ?¨??£???????????????????????????????????¬¬????????¨?¬¬???????????°????????????\n\t\tint hbar[][] = new int[n][2];\n\n\t\t// ???????????¨???n?????????string????????????????????????????????¨??????int???????????????HorizontalBar???????´???????\n\t\t// ?????¨??????????£??????¢??????????¨??£??????????????´???´????????§?????????????????????????????°????????????\n\t\t// ????????????????????????????????????????????????\n\t\tString buff;\n\n\t\tfor (int k = 0; k < n; k++) {\n\t\t\t// System.out.printf(\"aa1\\n\");\n\n\t\t\tbuff = sc.next();\n\n\t\t\t// // System.out.printf(\"aa2\\n\");\n\t\t\t// System.out.printf(\"%s\\n\", buff);\n\t\t\t// System.out.printf(\"1's : %d\\n\",\n\t\t\t// Integer.parseInt(buff.substring(0, buff.indexOf(\",\"))));\n\t\t\t// System.out.printf(\"%d\\n\", buff.indexOf(\",\"));\n\t\t\t// System.out.printf(\"2's : %d\\n\",\n\t\t\t// Integer.parseInt(buff.substring(2)));\n\n\t\t\t// ??????????????????????????¨??????????????????????????°????????????????´?\n\t\t\thbar[k][0] = Integer.parseInt(buff.substring(0, buff.indexOf(\",\")));\n\t\t\thbar[k][1] = Integer.parseInt(buff.substring(buff.indexOf(\",\") + 1));\n\n\t\t\t// System.out.printf(\"[%d][%d] : (%d, %d)\\n\", k, 01, hbar[k][0],\n\t\t\t// hbar[k][1]);\n\t\t}\n\n\t\t// ????£????????????§?????????????????????\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\t// ?¨??£???§???????????????????£?????????????a1???b1????????£???????????????????????????????´¢???????????????\n\t\t\t// ???????????????????¨??£?????????????????????????????????????????£???????????????????\n\t\t\tfor (int k = 0; k < n; k++) {\n\t\t\t\tif (hbar[k][0] == number[i]) {\n\t\t\t\t\t// System.out.printf(\"HITleft!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][1], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][1];\n\t\t\t\t} else if (hbar[k][1] == number[i]) {\n\t\t\t\t\t// System.out.printf(\"HITright!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][0], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int k = 0; k < w; k++) {\n\t\t\tfor (int i = 0; i < w; i++) {\n\t\t\t\tif (number[i] == k + 1) {\n\t\t\t\t\t// System.out.printf(\"number[%d](=%d) == %d\\n\", i + 1,\n\t\t\t\t\t// number[i], k + 1);\n\t\t\t\t\tSystem.out.printf(\"%d\\n\", i + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}",
"main",
"{\n\t\tsc = new Scanner(System.in);\n\t\tint w, n;\n\n\t\t// w???n???????????????\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\n\t\t// ??´??°???????????????????????????????????????????????????????£??????????????????????????????¨??????????£????\n\t\tint number[] = new int[w];\n\t\t// ?????????????¨????\n\t\tfor (int k = 0; k < w; k++) {\n\t\t\tnumber[k] = k + 1;\n\t\t}\n\n\t\t// ?¨??£???????????????????????????????????¬¬????????¨?¬¬???????????°????????????\n\t\tint hbar[][] = new int[n][2];\n\n\t\t// ???????????¨???n?????????string????????????????????????????????¨??????int???????????????HorizontalBar???????´???????\n\t\t// ?????¨??????????£??????¢??????????¨??£??????????????´???´????????§?????????????????????????????°????????????\n\t\t// ????????????????????????????????????????????????\n\t\tString buff;\n\n\t\tfor (int k = 0; k < n; k++) {\n\t\t\t// System.out.printf(\"aa1\\n\");\n\n\t\t\tbuff = sc.next();\n\n\t\t\t// // System.out.printf(\"aa2\\n\");\n\t\t\t// System.out.printf(\"%s\\n\", buff);\n\t\t\t// System.out.printf(\"1's : %d\\n\",\n\t\t\t// Integer.parseInt(buff.substring(0, buff.indexOf(\",\"))));\n\t\t\t// System.out.printf(\"%d\\n\", buff.indexOf(\",\"));\n\t\t\t// System.out.printf(\"2's : %d\\n\",\n\t\t\t// Integer.parseInt(buff.substring(2)));\n\n\t\t\t// ??????????????????????????¨??????????????????????????°????????????????´?\n\t\t\thbar[k][0] = Integer.parseInt(buff.substring(0, buff.indexOf(\",\")));\n\t\t\thbar[k][1] = Integer.parseInt(buff.substring(buff.indexOf(\",\") + 1));\n\n\t\t\t// System.out.printf(\"[%d][%d] : (%d, %d)\\n\", k, 01, hbar[k][0],\n\t\t\t// hbar[k][1]);\n\t\t}\n\n\t\t// ????£????????????§?????????????????????\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\t// ?¨??£???§???????????????????£?????????????a1???b1????????£???????????????????????????????´¢???????????????\n\t\t\t// ???????????????????¨??£?????????????????????????????????????????£???????????????????\n\t\t\tfor (int k = 0; k < n; k++) {\n\t\t\t\tif (hbar[k][0] == number[i]) {\n\t\t\t\t\t// System.out.printf(\"HITleft!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][1], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][1];\n\t\t\t\t} else if (hbar[k][1] == number[i]) {\n\t\t\t\t\t// System.out.printf(\"HITright!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][0], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int k = 0; k < w; k++) {\n\t\t\tfor (int i = 0; i < w; i++) {\n\t\t\t\tif (number[i] == k + 1) {\n\t\t\t\t\t// System.out.printf(\"number[%d](=%d) == %d\\n\", i + 1,\n\t\t\t\t\t// number[i], k + 1);\n\t\t\t\t\tSystem.out.printf(\"%d\\n\", i + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}",
"sc = new Scanner(System.in)",
"sc",
"new Scanner(System.in)",
"int w",
"w",
"n;",
"n",
"w = sc.nextInt()",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int number[] = new int[w];",
"number",
"new int[w]",
"w",
"for (int k = 0; k < w; k++) {\n\t\t\tnumber[k] = k + 1;\n\t\t}",
"int k = 0;",
"int k = 0;",
"k",
"0",
"k < w",
"k",
"w",
"k++",
"k++",
"k",
"{\n\t\t\tnumber[k] = k + 1;\n\t\t}",
"{\n\t\t\tnumber[k] = k + 1;\n\t\t}",
"number[k] = k + 1",
"number[k]",
"number",
"k",
"k + 1",
"k",
"1",
"int hbar[][] = new int[n][2];",
"hbar",
"new int[n][2]",
"n",
"2",
"String buff;",
"buff",
"for (int k = 0; k < n; k++) {\n\t\t\t// System.out.printf(\"aa1\\n\");\n\n\t\t\tbuff = sc.next();\n\n\t\t\t// // System.out.printf(\"aa2\\n\");\n\t\t\t// System.out.printf(\"%s\\n\", buff);\n\t\t\t// System.out.printf(\"1's : %d\\n\",\n\t\t\t// Integer.parseInt(buff.substring(0, buff.indexOf(\",\"))));\n\t\t\t// System.out.printf(\"%d\\n\", buff.indexOf(\",\"));\n\t\t\t// System.out.printf(\"2's : %d\\n\",\n\t\t\t// Integer.parseInt(buff.substring(2)));\n\n\t\t\t// ??????????????????????????¨??????????????????????????°????????????????´?\n\t\t\thbar[k][0] = Integer.parseInt(buff.substring(0, buff.indexOf(\",\")));\n\t\t\thbar[k][1] = Integer.parseInt(buff.substring(buff.indexOf(\",\") + 1));\n\n\t\t\t// System.out.printf(\"[%d][%d] : (%d, %d)\\n\", k, 01, hbar[k][0],\n\t\t\t// hbar[k][1]);\n\t\t}",
"int k = 0;",
"int k = 0;",
"k",
"0",
"k < n",
"k",
"n",
"k++",
"k++",
"k",
"{\n\t\t\t// System.out.printf(\"aa1\\n\");\n\n\t\t\tbuff = sc.next();\n\n\t\t\t// // System.out.printf(\"aa2\\n\");\n\t\t\t// System.out.printf(\"%s\\n\", buff);\n\t\t\t// System.out.printf(\"1's : %d\\n\",\n\t\t\t// Integer.parseInt(buff.substring(0, buff.indexOf(\",\"))));\n\t\t\t// System.out.printf(\"%d\\n\", buff.indexOf(\",\"));\n\t\t\t// System.out.printf(\"2's : %d\\n\",\n\t\t\t// Integer.parseInt(buff.substring(2)));\n\n\t\t\t// ??????????????????????????¨??????????????????????????°????????????????´?\n\t\t\thbar[k][0] = Integer.parseInt(buff.substring(0, buff.indexOf(\",\")));\n\t\t\thbar[k][1] = Integer.parseInt(buff.substring(buff.indexOf(\",\") + 1));\n\n\t\t\t// System.out.printf(\"[%d][%d] : (%d, %d)\\n\", k, 01, hbar[k][0],\n\t\t\t// hbar[k][1]);\n\t\t}",
"{\n\t\t\t// System.out.printf(\"aa1\\n\");\n\n\t\t\tbuff = sc.next();\n\n\t\t\t// // System.out.printf(\"aa2\\n\");\n\t\t\t// System.out.printf(\"%s\\n\", buff);\n\t\t\t// System.out.printf(\"1's : %d\\n\",\n\t\t\t// Integer.parseInt(buff.substring(0, buff.indexOf(\",\"))));\n\t\t\t// System.out.printf(\"%d\\n\", buff.indexOf(\",\"));\n\t\t\t// System.out.printf(\"2's : %d\\n\",\n\t\t\t// Integer.parseInt(buff.substring(2)));\n\n\t\t\t// ??????????????????????????¨??????????????????????????°????????????????´?\n\t\t\thbar[k][0] = Integer.parseInt(buff.substring(0, buff.indexOf(\",\")));\n\t\t\thbar[k][1] = Integer.parseInt(buff.substring(buff.indexOf(\",\") + 1));\n\n\t\t\t// System.out.printf(\"[%d][%d] : (%d, %d)\\n\", k, 01, hbar[k][0],\n\t\t\t// hbar[k][1]);\n\t\t}",
"buff = sc.next()",
"buff",
"sc.next()",
"sc.next",
"sc",
"hbar[k][0] = Integer.parseInt(buff.substring(0, buff.indexOf(\",\")))",
"hbar[k][0]",
"hbar[k]",
"hbar",
"k",
"0",
"Integer.parseInt(buff.substring(0, buff.indexOf(\",\")))",
"Integer.parseInt",
"Integer",
"buff.substring(0, buff.indexOf(\",\"))",
"buff.substring",
"buff",
"0",
"buff.indexOf(\",\")",
"buff.indexOf",
"buff",
"\",\"",
"hbar[k][1] = Integer.parseInt(buff.substring(buff.indexOf(\",\") + 1))",
"hbar[k][1]",
"hbar[k]",
"hbar",
"k",
"1",
"Integer.parseInt(buff.substring(buff.indexOf(\",\") + 1))",
"Integer.parseInt",
"Integer",
"buff.substring(buff.indexOf(\",\") + 1)",
"buff.substring",
"buff",
"buff.indexOf(\",\") + 1",
"buff.indexOf(\",\")",
"buff.indexOf",
"buff",
"\",\"",
"1",
"for (int i = 0; i < w; i++) {\n\t\t\t// ?¨??£???§???????????????????£?????????????a1???b1????????£???????????????????????????????´¢???????????????\n\t\t\t// ???????????????????¨??£?????????????????????????????????????????£???????????????????\n\t\t\tfor (int k = 0; k < n; k++) {\n\t\t\t\tif (hbar[k][0] == number[i]) {\n\t\t\t\t\t// System.out.printf(\"HITleft!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][1], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][1];\n\t\t\t\t} else if (hbar[k][1] == number[i]) {\n\t\t\t\t\t// System.out.printf(\"HITright!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][0], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][0];\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\t// ?¨??£???§???????????????????£?????????????a1???b1????????£???????????????????????????????´¢???????????????\n\t\t\t// ???????????????????¨??£?????????????????????????????????????????£???????????????????\n\t\t\tfor (int k = 0; k < n; k++) {\n\t\t\t\tif (hbar[k][0] == number[i]) {\n\t\t\t\t\t// System.out.printf(\"HITleft!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][1], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][1];\n\t\t\t\t} else if (hbar[k][1] == number[i]) {\n\t\t\t\t\t// System.out.printf(\"HITright!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][0], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][0];\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"{\n\t\t\t// ?¨??£???§???????????????????£?????????????a1???b1????????£???????????????????????????????´¢???????????????\n\t\t\t// ???????????????????¨??£?????????????????????????????????????????£???????????????????\n\t\t\tfor (int k = 0; k < n; k++) {\n\t\t\t\tif (hbar[k][0] == number[i]) {\n\t\t\t\t\t// System.out.printf(\"HITleft!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][1], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][1];\n\t\t\t\t} else if (hbar[k][1] == number[i]) {\n\t\t\t\t\t// System.out.printf(\"HITright!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][0], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][0];\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"for (int k = 0; k < n; k++) {\n\t\t\t\tif (hbar[k][0] == number[i]) {\n\t\t\t\t\t// System.out.printf(\"HITleft!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][1], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][1];\n\t\t\t\t} else if (hbar[k][1] == number[i]) {\n\t\t\t\t\t// System.out.printf(\"HITright!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][0], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][0];\n\t\t\t\t}\n\t\t\t}",
"int k = 0;",
"int k = 0;",
"k",
"0",
"k < n",
"k",
"n",
"k++",
"k++",
"k",
"{\n\t\t\t\tif (hbar[k][0] == number[i]) {\n\t\t\t\t\t// System.out.printf(\"HITleft!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][1], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][1];\n\t\t\t\t} else if (hbar[k][1] == number[i]) {\n\t\t\t\t\t// System.out.printf(\"HITright!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][0], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][0];\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif (hbar[k][0] == number[i]) {\n\t\t\t\t\t// System.out.printf(\"HITleft!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][1], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][1];\n\t\t\t\t} else if (hbar[k][1] == number[i]) {\n\t\t\t\t\t// System.out.printf(\"HITright!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][0], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][0];\n\t\t\t\t}\n\t\t\t}",
"if (hbar[k][0] == number[i]) {\n\t\t\t\t\t// System.out.printf(\"HITleft!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][1], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][1];\n\t\t\t\t} else if (hbar[k][1] == number[i]) {\n\t\t\t\t\t// System.out.printf(\"HITright!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][0], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][0];\n\t\t\t\t}",
"hbar[k][0] == number[i]",
"hbar[k][0]",
"hbar[k]",
"hbar",
"k",
"0",
"number[i]",
"number",
"i",
"{\n\t\t\t\t\t// System.out.printf(\"HITleft!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][1], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][1];\n\t\t\t\t}",
"number[i] = hbar[k][1]",
"number[i]",
"number",
"i",
"hbar[k][1]",
"hbar[k]",
"hbar",
"k",
"1",
"if (hbar[k][1] == number[i]) {\n\t\t\t\t\t// System.out.printf(\"HITright!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][0], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][0];\n\t\t\t\t}",
"hbar[k][1] == number[i]",
"hbar[k][1]",
"hbar[k]",
"hbar",
"k",
"1",
"number[i]",
"number",
"i",
"{\n\t\t\t\t\t// System.out.printf(\"HITright!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][0], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][0];\n\t\t\t\t}",
"number[i] = hbar[k][0]",
"number[i]",
"number",
"i",
"hbar[k][0]",
"hbar[k]",
"hbar",
"k",
"0",
"for (int k = 0; k < w; k++) {\n\t\t\tfor (int i = 0; i < w; i++) {\n\t\t\t\tif (number[i] == k + 1) {\n\t\t\t\t\t// System.out.printf(\"number[%d](=%d) == %d\\n\", i + 1,\n\t\t\t\t\t// number[i], k + 1);\n\t\t\t\t\tSystem.out.printf(\"%d\\n\", i + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"int k = 0;",
"int k = 0;",
"k",
"0",
"k < w",
"k",
"w",
"k++",
"k++",
"k",
"{\n\t\t\tfor (int i = 0; i < w; i++) {\n\t\t\t\tif (number[i] == k + 1) {\n\t\t\t\t\t// System.out.printf(\"number[%d](=%d) == %d\\n\", i + 1,\n\t\t\t\t\t// number[i], k + 1);\n\t\t\t\t\tSystem.out.printf(\"%d\\n\", i + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"{\n\t\t\tfor (int i = 0; i < w; i++) {\n\t\t\t\tif (number[i] == k + 1) {\n\t\t\t\t\t// System.out.printf(\"number[%d](=%d) == %d\\n\", i + 1,\n\t\t\t\t\t// number[i], k + 1);\n\t\t\t\t\tSystem.out.printf(\"%d\\n\", i + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"for (int i = 0; i < w; i++) {\n\t\t\t\tif (number[i] == k + 1) {\n\t\t\t\t\t// System.out.printf(\"number[%d](=%d) == %d\\n\", i + 1,\n\t\t\t\t\t// number[i], k + 1);\n\t\t\t\t\tSystem.out.printf(\"%d\\n\", i + 1);\n\t\t\t\t}\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\t\tif (number[i] == k + 1) {\n\t\t\t\t\t// System.out.printf(\"number[%d](=%d) == %d\\n\", i + 1,\n\t\t\t\t\t// number[i], k + 1);\n\t\t\t\t\tSystem.out.printf(\"%d\\n\", i + 1);\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif (number[i] == k + 1) {\n\t\t\t\t\t// System.out.printf(\"number[%d](=%d) == %d\\n\", i + 1,\n\t\t\t\t\t// number[i], k + 1);\n\t\t\t\t\tSystem.out.printf(\"%d\\n\", i + 1);\n\t\t\t\t}\n\t\t\t}",
"if (number[i] == k + 1) {\n\t\t\t\t\t// System.out.printf(\"number[%d](=%d) == %d\\n\", i + 1,\n\t\t\t\t\t// number[i], k + 1);\n\t\t\t\t\tSystem.out.printf(\"%d\\n\", i + 1);\n\t\t\t\t}",
"number[i] == k + 1",
"number[i]",
"number",
"i",
"k + 1",
"k",
"1",
"{\n\t\t\t\t\t// System.out.printf(\"number[%d](=%d) == %d\\n\", i + 1,\n\t\t\t\t\t// number[i], k + 1);\n\t\t\t\t\tSystem.out.printf(\"%d\\n\", i + 1);\n\t\t\t\t}",
"System.out.printf(\"%d\\n\", i + 1)",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%d\\n\"",
"i + 1",
"i",
"1",
"String args[]",
"args",
"public class Main {\n\tprivate static Scanner sc;\n\n\tpublic static void main(String args[]) {\n\t\tsc = new Scanner(System.in);\n\t\tint w, n;\n\n\t\t// w???n???????????????\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\n\t\t// ??´??°???????????????????????????????????????????????????????£??????????????????????????????¨??????????£????\n\t\tint number[] = new int[w];\n\t\t// ?????????????¨????\n\t\tfor (int k = 0; k < w; k++) {\n\t\t\tnumber[k] = k + 1;\n\t\t}\n\n\t\t// ?¨??£???????????????????????????????????¬¬????????¨?¬¬???????????°????????????\n\t\tint hbar[][] = new int[n][2];\n\n\t\t// ???????????¨???n?????????string????????????????????????????????¨??????int???????????????HorizontalBar???????´???????\n\t\t// ?????¨??????????£??????¢??????????¨??£??????????????´???´????????§?????????????????????????????°????????????\n\t\t// ????????????????????????????????????????????????\n\t\tString buff;\n\n\t\tfor (int k = 0; k < n; k++) {\n\t\t\t// System.out.printf(\"aa1\\n\");\n\n\t\t\tbuff = sc.next();\n\n\t\t\t// // System.out.printf(\"aa2\\n\");\n\t\t\t// System.out.printf(\"%s\\n\", buff);\n\t\t\t// System.out.printf(\"1's : %d\\n\",\n\t\t\t// Integer.parseInt(buff.substring(0, buff.indexOf(\",\"))));\n\t\t\t// System.out.printf(\"%d\\n\", buff.indexOf(\",\"));\n\t\t\t// System.out.printf(\"2's : %d\\n\",\n\t\t\t// Integer.parseInt(buff.substring(2)));\n\n\t\t\t// ??????????????????????????¨??????????????????????????°????????????????´?\n\t\t\thbar[k][0] = Integer.parseInt(buff.substring(0, buff.indexOf(\",\")));\n\t\t\thbar[k][1] = Integer.parseInt(buff.substring(buff.indexOf(\",\") + 1));\n\n\t\t\t// System.out.printf(\"[%d][%d] : (%d, %d)\\n\", k, 01, hbar[k][0],\n\t\t\t// hbar[k][1]);\n\t\t}\n\n\t\t// ????£????????????§?????????????????????\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\t// ?¨??£???§???????????????????£?????????????a1???b1????????£???????????????????????????????´¢???????????????\n\t\t\t// ???????????????????¨??£?????????????????????????????????????????£???????????????????\n\t\t\tfor (int k = 0; k < n; k++) {\n\t\t\t\tif (hbar[k][0] == number[i]) {\n\t\t\t\t\t// System.out.printf(\"HITleft!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][1], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][1];\n\t\t\t\t} else if (hbar[k][1] == number[i]) {\n\t\t\t\t\t// System.out.printf(\"HITright!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][0], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int k = 0; k < w; k++) {\n\t\t\tfor (int i = 0; i < w; i++) {\n\t\t\t\tif (number[i] == k + 1) {\n\t\t\t\t\t// System.out.printf(\"number[%d](=%d) == %d\\n\", i + 1,\n\t\t\t\t\t// number[i], k + 1);\n\t\t\t\t\tSystem.out.printf(\"%d\\n\", i + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}\n\n}",
"public class Main {\n\tprivate static Scanner sc;\n\n\tpublic static void main(String args[]) {\n\t\tsc = new Scanner(System.in);\n\t\tint w, n;\n\n\t\t// w???n???????????????\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\n\t\t// ??´??°???????????????????????????????????????????????????????£??????????????????????????????¨??????????£????\n\t\tint number[] = new int[w];\n\t\t// ?????????????¨????\n\t\tfor (int k = 0; k < w; k++) {\n\t\t\tnumber[k] = k + 1;\n\t\t}\n\n\t\t// ?¨??£???????????????????????????????????¬¬????????¨?¬¬???????????°????????????\n\t\tint hbar[][] = new int[n][2];\n\n\t\t// ???????????¨???n?????????string????????????????????????????????¨??????int???????????????HorizontalBar???????´???????\n\t\t// ?????¨??????????£??????¢??????????¨??£??????????????´???´????????§?????????????????????????????°????????????\n\t\t// ????????????????????????????????????????????????\n\t\tString buff;\n\n\t\tfor (int k = 0; k < n; k++) {\n\t\t\t// System.out.printf(\"aa1\\n\");\n\n\t\t\tbuff = sc.next();\n\n\t\t\t// // System.out.printf(\"aa2\\n\");\n\t\t\t// System.out.printf(\"%s\\n\", buff);\n\t\t\t// System.out.printf(\"1's : %d\\n\",\n\t\t\t// Integer.parseInt(buff.substring(0, buff.indexOf(\",\"))));\n\t\t\t// System.out.printf(\"%d\\n\", buff.indexOf(\",\"));\n\t\t\t// System.out.printf(\"2's : %d\\n\",\n\t\t\t// Integer.parseInt(buff.substring(2)));\n\n\t\t\t// ??????????????????????????¨??????????????????????????°????????????????´?\n\t\t\thbar[k][0] = Integer.parseInt(buff.substring(0, buff.indexOf(\",\")));\n\t\t\thbar[k][1] = Integer.parseInt(buff.substring(buff.indexOf(\",\") + 1));\n\n\t\t\t// System.out.printf(\"[%d][%d] : (%d, %d)\\n\", k, 01, hbar[k][0],\n\t\t\t// hbar[k][1]);\n\t\t}\n\n\t\t// ????£????????????§?????????????????????\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\t// ?¨??£???§???????????????????£?????????????a1???b1????????£???????????????????????????????´¢???????????????\n\t\t\t// ???????????????????¨??£?????????????????????????????????????????£???????????????????\n\t\t\tfor (int k = 0; k < n; k++) {\n\t\t\t\tif (hbar[k][0] == number[i]) {\n\t\t\t\t\t// System.out.printf(\"HITleft!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][1], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][1];\n\t\t\t\t} else if (hbar[k][1] == number[i]) {\n\t\t\t\t\t// System.out.printf(\"HITright!! tate[%d](=%d) excahged {%d}\n\t\t\t\t\t// at yoko[%d]\\n\", i + 1, number[i],\n\t\t\t\t\t// hbar[k][0], k + 1);\n\t\t\t\t\tnumber[i] = hbar[k][0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int k = 0; k < w; k++) {\n\t\t\tfor (int i = 0; i < w; i++) {\n\t\t\t\tif (number[i] == k + 1) {\n\t\t\t\t\t// System.out.printf(\"number[%d](=%d) == %d\\n\", i + 1,\n\t\t\t\t\t// number[i], k + 1);\n\t\t\t\t\tSystem.out.printf(\"%d\\n\", i + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}\n\n}",
"Main"
] | import java.util.Scanner;
//0011 DrawingLots}
public class Main {
private static Scanner sc;
public static void main(String args[]) {
sc = new Scanner(System.in);
int w, n;
// w???n???????????????
w = sc.nextInt();
n = sc.nextInt();
// ??´??°???????????????????????????????????????????????????????£??????????????????????????????¨??????????£????
int number[] = new int[w];
// ?????????????¨????
for (int k = 0; k < w; k++) {
number[k] = k + 1;
}
// ?¨??£???????????????????????????????????¬¬????????¨?¬¬???????????°????????????
int hbar[][] = new int[n][2];
// ???????????¨???n?????????string????????????????????????????????¨??????int???????????????HorizontalBar???????´???????
// ?????¨??????????£??????¢??????????¨??£??????????????´???´????????§?????????????????????????????°????????????
// ????????????????????????????????????????????????
String buff;
for (int k = 0; k < n; k++) {
// System.out.printf("aa1\n");
buff = sc.next();
// // System.out.printf("aa2\n");
// System.out.printf("%s\n", buff);
// System.out.printf("1's : %d\n",
// Integer.parseInt(buff.substring(0, buff.indexOf(","))));
// System.out.printf("%d\n", buff.indexOf(","));
// System.out.printf("2's : %d\n",
// Integer.parseInt(buff.substring(2)));
// ??????????????????????????¨??????????????????????????°????????????????´?
hbar[k][0] = Integer.parseInt(buff.substring(0, buff.indexOf(",")));
hbar[k][1] = Integer.parseInt(buff.substring(buff.indexOf(",") + 1));
// System.out.printf("[%d][%d] : (%d, %d)\n", k, 01, hbar[k][0],
// hbar[k][1]);
}
// ????£????????????§?????????????????????
for (int i = 0; i < w; i++) {
// ?¨??£???§???????????????????£?????????????a1???b1????????£???????????????????????????????´¢???????????????
// ???????????????????¨??£?????????????????????????????????????????£???????????????????
for (int k = 0; k < n; k++) {
if (hbar[k][0] == number[i]) {
// System.out.printf("HITleft!! tate[%d](=%d) excahged {%d}
// at yoko[%d]\n", i + 1, number[i],
// hbar[k][1], k + 1);
number[i] = hbar[k][1];
} else if (hbar[k][1] == number[i]) {
// System.out.printf("HITright!! tate[%d](=%d) excahged {%d}
// at yoko[%d]\n", i + 1, number[i],
// hbar[k][0], k + 1);
number[i] = hbar[k][0];
}
}
}
for (int k = 0; k < w; k++) {
for (int i = 0; i < w; i++) {
if (number[i] == k + 1) {
// System.out.printf("number[%d](=%d) == %d\n", i + 1,
// number[i], k + 1);
System.out.printf("%d\n", i + 1);
}
}
}
}
} |
[
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,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
41,
13,
20,
13,
17,
41,
13,
20,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
18,
13,
13,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
13,
4,
18,
13,
18,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
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,
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
],
[
200,
5
],
[
200,
6
],
[
6,
7
],
[
6,
8
],
[
200,
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
],
[
11,
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
],
[
11,
46
],
[
46,
47
],
[
46,
48
],
[
11,
51
],
[
51,
52
],
[
51,
53
],
[
11,
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
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
11,
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
],
[
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
],
[
109,
113
],
[
108,
114
],
[
114,
115
],
[
115,
116
],
[
114,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
117,
121
],
[
11,
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
],
[
135,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
140,
144
],
[
139,
145
],
[
134,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
150,
154
],
[
149,
155
],
[
146,
156
],
[
156,
157
],
[
156,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
159,
163
],
[
158,
164
],
[
134,
165
],
[
165,
166
],
[
166,
167
],
[
166,
168
],
[
168,
169
],
[
169,
170
],
[
170,
171
],
[
170,
172
],
[
169,
173
],
[
168,
174
],
[
165,
175
],
[
11,
176
],
[
176,
177
],
[
177,
178
],
[
178,
179
],
[
178,
180
],
[
176,
181
],
[
181,
182
],
[
181,
183
],
[
176,
184
],
[
184,
185
],
[
185,
186
],
[
176,
187
],
[
188,
188
],
[
188,
189
],
[
189,
190
],
[
190,
191
],
[
191,
192
],
[
191,
193
],
[
189,
194
],
[
194,
195
],
[
194,
196
],
[
9,
197
],
[
197,
198
],
[
0,
199
],
[
199,
200
],
[
199,
201
]
] | [
"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\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] num =new int[w];\n\t\tfor(int i=0;i<w;i++){\n\t\t\tnum[i]=i+1;\n\t\t}\n\n\t\tString [][] scombo =new String[n][2];\n\t\tint [][] combo =new int[n][2];\n\n\t\t//??\\?????????????????¨????????\\?????????????????§????????????\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString str =sc.next();\n\t\t\tscombo[i]=str.split(\",\");\n\t\t}\n\n\n\n\t\t//????????????????????°??????????????????\n\t\tfor(int i=0;i<n;i++){\n\t\t\tfor(int j=0;j<2;j++){\n\t\t\t\tcombo[i][j]=Integer.parseInt(scombo[i][j]);\n\t\t\t}\n\t\t}\n\t\t//????????????\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint x = num[combo[i][0]-1];\n\t\t\tnum[combo[i][0]-1]=num[combo[i][1]-1];\n\t\t\tnum[combo[i][1]-1]=x;\n\t\t}\n\t\t//??????\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\n\n\t}\n\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\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] num =new int[w];\n\t\tfor(int i=0;i<w;i++){\n\t\t\tnum[i]=i+1;\n\t\t}\n\n\t\tString [][] scombo =new String[n][2];\n\t\tint [][] combo =new int[n][2];\n\n\t\t//??\\?????????????????¨????????\\?????????????????§????????????\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString str =sc.next();\n\t\t\tscombo[i]=str.split(\",\");\n\t\t}\n\n\n\n\t\t//????????????????????°??????????????????\n\t\tfor(int i=0;i<n;i++){\n\t\t\tfor(int j=0;j<2;j++){\n\t\t\t\tcombo[i][j]=Integer.parseInt(scombo[i][j]);\n\t\t\t}\n\t\t}\n\t\t//????????????\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint x = num[combo[i][0]-1];\n\t\t\tnum[combo[i][0]-1]=num[combo[i][1]-1];\n\t\t\tnum[combo[i][1]-1]=x;\n\t\t}\n\t\t//??????\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\n\n\t}\n\n}",
"Main",
"static Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"public static void main(String[] args) {\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] num =new int[w];\n\t\tfor(int i=0;i<w;i++){\n\t\t\tnum[i]=i+1;\n\t\t}\n\n\t\tString [][] scombo =new String[n][2];\n\t\tint [][] combo =new int[n][2];\n\n\t\t//??\\?????????????????¨????????\\?????????????????§????????????\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString str =sc.next();\n\t\t\tscombo[i]=str.split(\",\");\n\t\t}\n\n\n\n\t\t//????????????????????°??????????????????\n\t\tfor(int i=0;i<n;i++){\n\t\t\tfor(int j=0;j<2;j++){\n\t\t\t\tcombo[i][j]=Integer.parseInt(scombo[i][j]);\n\t\t\t}\n\t\t}\n\t\t//????????????\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint x = num[combo[i][0]-1];\n\t\t\tnum[combo[i][0]-1]=num[combo[i][1]-1];\n\t\t\tnum[combo[i][1]-1]=x;\n\t\t}\n\t\t//??????\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\n\n\t}",
"main",
"{\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] num =new int[w];\n\t\tfor(int i=0;i<w;i++){\n\t\t\tnum[i]=i+1;\n\t\t}\n\n\t\tString [][] scombo =new String[n][2];\n\t\tint [][] combo =new int[n][2];\n\n\t\t//??\\?????????????????¨????????\\?????????????????§????????????\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString str =sc.next();\n\t\t\tscombo[i]=str.split(\",\");\n\t\t}\n\n\n\n\t\t//????????????????????°??????????????????\n\t\tfor(int i=0;i<n;i++){\n\t\t\tfor(int j=0;j<2;j++){\n\t\t\t\tcombo[i][j]=Integer.parseInt(scombo[i][j]);\n\t\t\t}\n\t\t}\n\t\t//????????????\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint x = num[combo[i][0]-1];\n\t\t\tnum[combo[i][0]-1]=num[combo[i][1]-1];\n\t\t\tnum[combo[i][1]-1]=x;\n\t\t}\n\t\t//??????\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\n\n\t}",
"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\t\t\tnum[i]=i+1;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"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",
"String [][] scombo =new String[n][2];",
"scombo",
"new String[n][2]",
"n",
"2",
"int [][] combo =new int[n][2];",
"combo",
"new int[n][2]",
"n",
"2",
"for(int i=0;i<n;i++){\n\t\t\tString str =sc.next();\n\t\t\tscombo[i]=str.split(\",\");\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\tscombo[i]=str.split(\",\");\n\t\t}",
"{\n\t\t\tString str =sc.next();\n\t\t\tscombo[i]=str.split(\",\");\n\t\t}",
"String str =sc.next();",
"str",
"sc.next()",
"sc.next",
"sc",
"scombo[i]=str.split(\",\")",
"scombo[i]",
"scombo",
"i",
"str.split(\",\")",
"str.split",
"str",
"\",\"",
"for(int i=0;i<n;i++){\n\t\t\tfor(int j=0;j<2;j++){\n\t\t\t\tcombo[i][j]=Integer.parseInt(scombo[i][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\tfor(int j=0;j<2;j++){\n\t\t\t\tcombo[i][j]=Integer.parseInt(scombo[i][j]);\n\t\t\t}\n\t\t}",
"{\n\t\t\tfor(int j=0;j<2;j++){\n\t\t\t\tcombo[i][j]=Integer.parseInt(scombo[i][j]);\n\t\t\t}\n\t\t}",
"for(int j=0;j<2;j++){\n\t\t\t\tcombo[i][j]=Integer.parseInt(scombo[i][j]);\n\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<2",
"j",
"2",
"j++",
"j++",
"j",
"{\n\t\t\t\tcombo[i][j]=Integer.parseInt(scombo[i][j]);\n\t\t\t}",
"{\n\t\t\t\tcombo[i][j]=Integer.parseInt(scombo[i][j]);\n\t\t\t}",
"combo[i][j]=Integer.parseInt(scombo[i][j])",
"combo[i][j]",
"combo[i]",
"combo",
"i",
"j",
"Integer.parseInt(scombo[i][j])",
"Integer.parseInt",
"Integer",
"scombo[i][j]",
"scombo[i]",
"scombo",
"i",
"j",
"for(int i=0;i<n;i++){\n\t\t\tint x = num[combo[i][0]-1];\n\t\t\tnum[combo[i][0]-1]=num[combo[i][1]-1];\n\t\t\tnum[combo[i][1]-1]=x;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint x = num[combo[i][0]-1];\n\t\t\tnum[combo[i][0]-1]=num[combo[i][1]-1];\n\t\t\tnum[combo[i][1]-1]=x;\n\t\t}",
"{\n\t\t\tint x = num[combo[i][0]-1];\n\t\t\tnum[combo[i][0]-1]=num[combo[i][1]-1];\n\t\t\tnum[combo[i][1]-1]=x;\n\t\t}",
"int x = num[combo[i][0]-1];",
"x",
"num[combo[i][0]-1]",
"num",
"combo[i][0]-1",
"combo[i][0]",
"combo[i]",
"combo",
"i",
"0",
"1",
"num[combo[i][0]-1]=num[combo[i][1]-1]",
"num[combo[i][0]-1]",
"num",
"combo[i][0]-1",
"combo[i][0]",
"combo[i]",
"combo",
"i",
"0",
"1",
"num[combo[i][1]-1]",
"num",
"combo[i][1]-1",
"combo[i][1]",
"combo[i]",
"combo",
"i",
"1",
"1",
"num[combo[i][1]-1]=x",
"num[combo[i][1]-1]",
"num",
"combo[i][1]-1",
"combo[i][1]",
"combo[i]",
"combo",
"i",
"1",
"1",
"x",
"for(int i=0;i<w;i++){\n\t\t\tSystem.out.println(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(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",
"String[] args",
"args",
"public class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\n\tpublic static void main(String[] args) {\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] num =new int[w];\n\t\tfor(int i=0;i<w;i++){\n\t\t\tnum[i]=i+1;\n\t\t}\n\n\t\tString [][] scombo =new String[n][2];\n\t\tint [][] combo =new int[n][2];\n\n\t\t//??\\?????????????????¨????????\\?????????????????§????????????\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString str =sc.next();\n\t\t\tscombo[i]=str.split(\",\");\n\t\t}\n\n\n\n\t\t//????????????????????°??????????????????\n\t\tfor(int i=0;i<n;i++){\n\t\t\tfor(int j=0;j<2;j++){\n\t\t\t\tcombo[i][j]=Integer.parseInt(scombo[i][j]);\n\t\t\t}\n\t\t}\n\t\t//????????????\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint x = num[combo[i][0]-1];\n\t\t\tnum[combo[i][0]-1]=num[combo[i][1]-1];\n\t\t\tnum[combo[i][1]-1]=x;\n\t\t}\n\t\t//??????\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\n\n\t}\n\n}",
"public class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\n\tpublic static void main(String[] args) {\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] num =new int[w];\n\t\tfor(int i=0;i<w;i++){\n\t\t\tnum[i]=i+1;\n\t\t}\n\n\t\tString [][] scombo =new String[n][2];\n\t\tint [][] combo =new int[n][2];\n\n\t\t//??\\?????????????????¨????????\\?????????????????§????????????\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString str =sc.next();\n\t\t\tscombo[i]=str.split(\",\");\n\t\t}\n\n\n\n\t\t//????????????????????°??????????????????\n\t\tfor(int i=0;i<n;i++){\n\t\t\tfor(int j=0;j<2;j++){\n\t\t\t\tcombo[i][j]=Integer.parseInt(scombo[i][j]);\n\t\t\t}\n\t\t}\n\t\t//????????????\n\t\tfor(int i=0;i<n;i++){\n\t\t\tint x = num[combo[i][0]-1];\n\t\t\tnum[combo[i][0]-1]=num[combo[i][1]-1];\n\t\t\tnum[combo[i][1]-1]=x;\n\t\t}\n\t\t//??????\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\n\n\t}\n\n}",
"Main"
] | import java.util.Scanner;
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
int w = sc.nextInt();
int n = sc.nextInt();
int[] num =new int[w];
for(int i=0;i<w;i++){
num[i]=i+1;
}
String [][] scombo =new String[n][2];
int [][] combo =new int[n][2];
//??\?????????????????¨????????\?????????????????§????????????
for(int i=0;i<n;i++){
String str =sc.next();
scombo[i]=str.split(",");
}
//????????????????????°??????????????????
for(int i=0;i<n;i++){
for(int j=0;j<2;j++){
combo[i][j]=Integer.parseInt(scombo[i][j]);
}
}
//????????????
for(int i=0;i<n;i++){
int x = num[combo[i][0]-1];
num[combo[i][0]-1]=num[combo[i][1]-1];
num[combo[i][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,
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,
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,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
17,
18,
13,
13,
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
],
[
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
],
[
76,
77
],
[
75,
78
],
[
78,
79
],
[
78,
80
],
[
74,
81
],
[
60,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
88,
89
],
[
88,
90
],
[
84,
91
],
[
60,
92
],
[
92,
93
],
[
92,
94
],
[
60,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
97,
99
],
[
60,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
104
],
[
104,
105
],
[
104,
106
],
[
60,
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
],
[
119,
120
],
[
119,
121
],
[
112,
122
],
[
122,
123
],
[
123,
124
],
[
112,
125
],
[
126,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
127,
132
],
[
127,
133
],
[
133,
134
],
[
133,
135
],
[
8,
136
],
[
136,
137
],
[
137,
138
],
[
6,
139
],
[
139,
140
],
[
0,
141
],
[
141,
142
],
[
141,
143
]
] | [
"import java.util.Scanner;\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\n\t\tint[] num = new int[w];\n\t\tfor(int i = 0;i < num.length;i++) {\n\t\t\tnum[i] = i+1;\n\t\t}\n\t\tfor(int i = 0;i<n;i++) {\n\t\t\tString ab_st = sc.next();\n\t\t\tString[] ab = ab_st.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\n\t\t\tint sub=0;\n\t\t\tsub = num[a];\n\t\t\tnum[a] = num[b];\n\t\t\tnum[b] = sub;\n\n\t\t}\n\t\tfor(int i = 0;i < num.length;i++) {\n\t\t\tSystem.out.printf(\"%d\\n\",num[i]);\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\n\t\tint[] num = new int[w];\n\t\tfor(int i = 0;i < num.length;i++) {\n\t\t\tnum[i] = i+1;\n\t\t}\n\t\tfor(int i = 0;i<n;i++) {\n\t\t\tString ab_st = sc.next();\n\t\t\tString[] ab = ab_st.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\n\t\t\tint sub=0;\n\t\t\tsub = num[a];\n\t\t\tnum[a] = num[b];\n\t\t\tnum[b] = sub;\n\n\t\t}\n\t\tfor(int i = 0;i < num.length;i++) {\n\t\t\tSystem.out.printf(\"%d\\n\",num[i]);\n\t\t}\n\t\tsc.close();\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\n\t\tint[] num = new int[w];\n\t\tfor(int i = 0;i < num.length;i++) {\n\t\t\tnum[i] = i+1;\n\t\t}\n\t\tfor(int i = 0;i<n;i++) {\n\t\t\tString ab_st = sc.next();\n\t\t\tString[] ab = ab_st.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\n\t\t\tint sub=0;\n\t\t\tsub = num[a];\n\t\t\tnum[a] = num[b];\n\t\t\tnum[b] = sub;\n\n\t\t}\n\t\tfor(int i = 0;i < num.length;i++) {\n\t\t\tSystem.out.printf(\"%d\\n\",num[i]);\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\n\t\tint[] num = new int[w];\n\t\tfor(int i = 0;i < num.length;i++) {\n\t\t\tnum[i] = i+1;\n\t\t}\n\t\tfor(int i = 0;i<n;i++) {\n\t\t\tString ab_st = sc.next();\n\t\t\tString[] ab = ab_st.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\n\t\t\tint sub=0;\n\t\t\tsub = num[a];\n\t\t\tnum[a] = num[b];\n\t\t\tnum[b] = sub;\n\n\t\t}\n\t\tfor(int i = 0;i < num.length;i++) {\n\t\t\tSystem.out.printf(\"%d\\n\",num[i]);\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[] num = new int[w];",
"num",
"new int[w]",
"w",
"for(int i = 0;i < num.length;i++) {\n\t\t\tnum[i] = i+1;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < num.length",
"i",
"num.length",
"num",
"num.length",
"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(int i = 0;i<n;i++) {\n\t\t\tString ab_st = sc.next();\n\t\t\tString[] ab = ab_st.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\n\t\t\tint sub=0;\n\t\t\tsub = num[a];\n\t\t\tnum[a] = num[b];\n\t\t\tnum[b] = sub;\n\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString ab_st = sc.next();\n\t\t\tString[] ab = ab_st.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\n\t\t\tint sub=0;\n\t\t\tsub = num[a];\n\t\t\tnum[a] = num[b];\n\t\t\tnum[b] = sub;\n\n\t\t}",
"{\n\t\t\tString ab_st = sc.next();\n\t\t\tString[] ab = ab_st.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\n\t\t\tint sub=0;\n\t\t\tsub = num[a];\n\t\t\tnum[a] = num[b];\n\t\t\tnum[b] = sub;\n\n\t\t}",
"String ab_st = sc.next();",
"ab_st",
"sc.next()",
"sc.next",
"sc",
"String[] ab = ab_st.split(\",\");",
"ab",
"ab_st.split(\",\")",
"ab_st.split",
"ab_st",
"\",\"",
"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 sub=0;",
"sub",
"0",
"sub = num[a]",
"sub",
"num[a]",
"num",
"a",
"num[a] = num[b]",
"num[a]",
"num",
"a",
"num[b]",
"num",
"b",
"num[b] = sub",
"num[b]",
"num",
"b",
"sub",
"for(int i = 0;i < num.length;i++) {\n\t\t\tSystem.out.printf(\"%d\\n\",num[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < num.length",
"i",
"num.length",
"num",
"num.length",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.printf(\"%d\\n\",num[i]);\n\t\t}",
"{\n\t\t\tSystem.out.printf(\"%d\\n\",num[i]);\n\t\t}",
"System.out.printf(\"%d\\n\",num[i])",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%d\\n\"",
"num[i]",
"num",
"i",
"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\n\t\tint[] num = new int[w];\n\t\tfor(int i = 0;i < num.length;i++) {\n\t\t\tnum[i] = i+1;\n\t\t}\n\t\tfor(int i = 0;i<n;i++) {\n\t\t\tString ab_st = sc.next();\n\t\t\tString[] ab = ab_st.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\n\t\t\tint sub=0;\n\t\t\tsub = num[a];\n\t\t\tnum[a] = num[b];\n\t\t\tnum[b] = sub;\n\n\t\t}\n\t\tfor(int i = 0;i < num.length;i++) {\n\t\t\tSystem.out.printf(\"%d\\n\",num[i]);\n\t\t}\n\t\tsc.close();\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\n\t\tint[] num = new int[w];\n\t\tfor(int i = 0;i < num.length;i++) {\n\t\t\tnum[i] = i+1;\n\t\t}\n\t\tfor(int i = 0;i<n;i++) {\n\t\t\tString ab_st = sc.next();\n\t\t\tString[] ab = ab_st.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\n\t\t\tint sub=0;\n\t\t\tsub = num[a];\n\t\t\tnum[a] = num[b];\n\t\t\tnum[b] = sub;\n\n\t\t}\n\t\tfor(int i = 0;i < num.length;i++) {\n\t\t\tSystem.out.printf(\"%d\\n\",num[i]);\n\t\t}\n\t\tsc.close();\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[] num = new int[w];
for(int i = 0;i < num.length;i++) {
num[i] = i+1;
}
for(int i = 0;i<n;i++) {
String ab_st = sc.next();
String[] ab = ab_st.split(",");
int a = Integer.parseInt(ab[0]) - 1;
int b = Integer.parseInt(ab[1]) - 1;
int sub=0;
sub = num[a];
num[a] = num[b];
num[b] = sub;
}
for(int i = 0;i < num.length;i++) {
System.out.printf("%d\n",num[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,
13,
4,
18,
13,
41,
13,
20,
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,
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,
13,
18,
13,
13,
30,
0,
13,
18,
13,
13,
14,
2,
13,
18,
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
],
[
172,
5
],
[
172,
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
],
[
22,
25
],
[
25,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
36
],
[
36,
37
],
[
36,
38
],
[
8,
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
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
52,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
52,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
71,
72
],
[
71,
73
],
[
52,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
81,
82
],
[
81,
83
],
[
8,
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
],
[
97,
99
],
[
99,
100
],
[
99,
101
],
[
96,
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
],
[
116,
118
],
[
118,
119
],
[
118,
120
],
[
115,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
124,
126
],
[
115,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
130,
132
],
[
127,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
136,
137
],
[
136,
138
],
[
96,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
142,
144
],
[
139,
145
],
[
145,
146
],
[
145,
147
],
[
8,
148
],
[
148,
149
],
[
149,
150
],
[
150,
151
],
[
150,
152
],
[
148,
153
],
[
153,
154
],
[
153,
155
],
[
148,
156
],
[
156,
157
],
[
157,
158
],
[
148,
159
],
[
160,
160
],
[
160,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
163,
165
],
[
161,
166
],
[
166,
167
],
[
166,
168
],
[
6,
169
],
[
169,
170
],
[
0,
171
],
[
171,
172
],
[
171,
173
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int w = Integer.parseInt(scanner.nextLine());\n int n = Integer.parseInt(scanner.nextLine());\n int a[] = new int[n];\n int b[] = new int[n];\n int z[] = new int[w];\n for (int i = 0; i < n; i++) {\n String s = scanner.nextLine();\n String t[] = s.split(\",\");\n a[i] = Integer.parseInt(t[0]);\n b[i] = Integer.parseInt(t[1]);\n }\n for (int i = 0; i < w; i++) {\n int p = i + 1;\n for (int j = 0; j < n; j++) {\n if (p == a[j]) {\n p = b[j];\n } else if (p == b[j]) {\n p = a[j];\n }\n }\n z[p-1] = i + 1;\n }\n for (int i = 0; i < w; i++) {\n System.out.println(z[i]);\n }\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 w = Integer.parseInt(scanner.nextLine());\n int n = Integer.parseInt(scanner.nextLine());\n int a[] = new int[n];\n int b[] = new int[n];\n int z[] = new int[w];\n for (int i = 0; i < n; i++) {\n String s = scanner.nextLine();\n String t[] = s.split(\",\");\n a[i] = Integer.parseInt(t[0]);\n b[i] = Integer.parseInt(t[1]);\n }\n for (int i = 0; i < w; i++) {\n int p = i + 1;\n for (int j = 0; j < n; j++) {\n if (p == a[j]) {\n p = b[j];\n } else if (p == b[j]) {\n p = a[j];\n }\n }\n z[p-1] = i + 1;\n }\n for (int i = 0; i < w; i++) {\n System.out.println(z[i]);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int w = Integer.parseInt(scanner.nextLine());\n int n = Integer.parseInt(scanner.nextLine());\n int a[] = new int[n];\n int b[] = new int[n];\n int z[] = new int[w];\n for (int i = 0; i < n; i++) {\n String s = scanner.nextLine();\n String t[] = s.split(\",\");\n a[i] = Integer.parseInt(t[0]);\n b[i] = Integer.parseInt(t[1]);\n }\n for (int i = 0; i < w; i++) {\n int p = i + 1;\n for (int j = 0; j < n; j++) {\n if (p == a[j]) {\n p = b[j];\n } else if (p == b[j]) {\n p = a[j];\n }\n }\n z[p-1] = i + 1;\n }\n for (int i = 0; i < w; i++) {\n System.out.println(z[i]);\n }\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n int w = Integer.parseInt(scanner.nextLine());\n int n = Integer.parseInt(scanner.nextLine());\n int a[] = new int[n];\n int b[] = new int[n];\n int z[] = new int[w];\n for (int i = 0; i < n; i++) {\n String s = scanner.nextLine();\n String t[] = s.split(\",\");\n a[i] = Integer.parseInt(t[0]);\n b[i] = Integer.parseInt(t[1]);\n }\n for (int i = 0; i < w; i++) {\n int p = i + 1;\n for (int j = 0; j < n; j++) {\n if (p == a[j]) {\n p = b[j];\n } else if (p == b[j]) {\n p = a[j];\n }\n }\n z[p-1] = i + 1;\n }\n for (int i = 0; i < w; i++) {\n System.out.println(z[i]);\n }\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int w = Integer.parseInt(scanner.nextLine());",
"w",
"Integer.parseInt(scanner.nextLine())",
"Integer.parseInt",
"Integer",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"int n = Integer.parseInt(scanner.nextLine());",
"n",
"Integer.parseInt(scanner.nextLine())",
"Integer.parseInt",
"Integer",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"int a[] = new int[n];",
"a",
"new int[n]",
"n",
"int b[] = new int[n];",
"b",
"new int[n]",
"n",
"int z[] = new int[w];",
"z",
"new int[w]",
"w",
"for (int i = 0; i < n; i++) {\n String s = scanner.nextLine();\n String t[] = s.split(\",\");\n a[i] = Integer.parseInt(t[0]);\n b[i] = Integer.parseInt(t[1]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String s = scanner.nextLine();\n String t[] = s.split(\",\");\n a[i] = Integer.parseInt(t[0]);\n b[i] = Integer.parseInt(t[1]);\n }",
"{\n String s = scanner.nextLine();\n String t[] = s.split(\",\");\n a[i] = Integer.parseInt(t[0]);\n b[i] = Integer.parseInt(t[1]);\n }",
"String s = scanner.nextLine();",
"s",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"String t[] = s.split(\",\");",
"t",
"s.split(\",\")",
"s.split",
"s",
"\",\"",
"a[i] = Integer.parseInt(t[0])",
"a[i]",
"a",
"i",
"Integer.parseInt(t[0])",
"Integer.parseInt",
"Integer",
"t[0]",
"t",
"0",
"b[i] = Integer.parseInt(t[1])",
"b[i]",
"b",
"i",
"Integer.parseInt(t[1])",
"Integer.parseInt",
"Integer",
"t[1]",
"t",
"1",
"for (int i = 0; i < w; i++) {\n int p = i + 1;\n for (int j = 0; j < n; j++) {\n if (p == a[j]) {\n p = b[j];\n } else if (p == b[j]) {\n p = a[j];\n }\n }\n z[p-1] = i + 1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n int p = i + 1;\n for (int j = 0; j < n; j++) {\n if (p == a[j]) {\n p = b[j];\n } else if (p == b[j]) {\n p = a[j];\n }\n }\n z[p-1] = i + 1;\n }",
"{\n int p = i + 1;\n for (int j = 0; j < n; j++) {\n if (p == a[j]) {\n p = b[j];\n } else if (p == b[j]) {\n p = a[j];\n }\n }\n z[p-1] = i + 1;\n }",
"int p = i + 1;",
"p",
"i + 1",
"i",
"1",
"for (int j = 0; j < n; j++) {\n if (p == a[j]) {\n p = b[j];\n } else if (p == b[j]) {\n p = a[j];\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < n",
"j",
"n",
"j++",
"j++",
"j",
"{\n if (p == a[j]) {\n p = b[j];\n } else if (p == b[j]) {\n p = a[j];\n }\n }",
"{\n if (p == a[j]) {\n p = b[j];\n } else if (p == b[j]) {\n p = a[j];\n }\n }",
"if (p == a[j]) {\n p = b[j];\n } else if (p == b[j]) {\n p = a[j];\n }",
"p == a[j]",
"p",
"a[j]",
"a",
"j",
"{\n p = b[j];\n }",
"p = b[j]",
"p",
"b[j]",
"b",
"j",
"if (p == b[j]) {\n p = a[j];\n }",
"p == b[j]",
"p",
"b[j]",
"b",
"j",
"{\n p = a[j];\n }",
"p = a[j]",
"p",
"a[j]",
"a",
"j",
"z[p-1] = i + 1",
"z[p-1]",
"z",
"p-1",
"p",
"1",
"i + 1",
"i",
"1",
"for (int i = 0; i < w; i++) {\n System.out.println(z[i]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n System.out.println(z[i]);\n }",
"{\n System.out.println(z[i]);\n }",
"System.out.println(z[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"z[i]",
"z",
"i",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int w = Integer.parseInt(scanner.nextLine());\n int n = Integer.parseInt(scanner.nextLine());\n int a[] = new int[n];\n int b[] = new int[n];\n int z[] = new int[w];\n for (int i = 0; i < n; i++) {\n String s = scanner.nextLine();\n String t[] = s.split(\",\");\n a[i] = Integer.parseInt(t[0]);\n b[i] = Integer.parseInt(t[1]);\n }\n for (int i = 0; i < w; i++) {\n int p = i + 1;\n for (int j = 0; j < n; j++) {\n if (p == a[j]) {\n p = b[j];\n } else if (p == b[j]) {\n p = a[j];\n }\n }\n z[p-1] = i + 1;\n }\n for (int i = 0; i < w; i++) {\n System.out.println(z[i]);\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int w = Integer.parseInt(scanner.nextLine());\n int n = Integer.parseInt(scanner.nextLine());\n int a[] = new int[n];\n int b[] = new int[n];\n int z[] = new int[w];\n for (int i = 0; i < n; i++) {\n String s = scanner.nextLine();\n String t[] = s.split(\",\");\n a[i] = Integer.parseInt(t[0]);\n b[i] = Integer.parseInt(t[1]);\n }\n for (int i = 0; i < w; i++) {\n int p = i + 1;\n for (int j = 0; j < n; j++) {\n if (p == a[j]) {\n p = b[j];\n } else if (p == b[j]) {\n p = a[j];\n }\n }\n z[p-1] = i + 1;\n }\n for (int i = 0; i < w; i++) {\n System.out.println(z[i]);\n }\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int w = Integer.parseInt(scanner.nextLine());
int n = Integer.parseInt(scanner.nextLine());
int a[] = new int[n];
int b[] = new int[n];
int z[] = new int[w];
for (int i = 0; i < n; i++) {
String s = scanner.nextLine();
String t[] = s.split(",");
a[i] = Integer.parseInt(t[0]);
b[i] = Integer.parseInt(t[1]);
}
for (int i = 0; i < w; i++) {
int p = i + 1;
for (int j = 0; j < n; j++) {
if (p == a[j]) {
p = b[j];
} else if (p == b[j]) {
p = a[j];
}
}
z[p-1] = i + 1;
}
for (int i = 0; i < w; i++) {
System.out.println(z[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,
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,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
13,
11,
1,
41,
13,
2,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
13,
18,
13,
13,
30,
0,
13,
18,
13,
13,
14,
2,
13,
18,
13,
13,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
17,
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
],
[
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
],
[
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
],
[
87,
89
],
[
86,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
94,
96
],
[
90,
97
],
[
97,
98
],
[
97,
99
],
[
90,
100
],
[
100,
101
],
[
101,
102
],
[
90,
103
],
[
104,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
108,
110
],
[
105,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
114,
116
],
[
105,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
120,
122
],
[
117,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
126,
128
],
[
86,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
129,
134
],
[
129,
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 int w = sc.nextInt();// 縦線の本数\n int n = sc.nextInt();// 横棒の本数\n int a[] = new int[n];\n int b[] = new int[n];\n\n for (int i = 0; i < n; i++) {// 横棒の入力\n String ab = sc.next();\n String ab_p[] = ab.split(\",\");\n a[i] = Integer.parseInt(ab_p[0]);\n b[i] = Integer.parseInt(ab_p[1]);\n }\n\n for (int i = 1; i <= w; i++) {// 左から右\n int k = i;\n for (int j = n - 1; j >= 0; j--) {// 下から上へ辿る\n if (k == a[j]) {\n k = b[j];\n } else if (k == b[j]) {\n k = a[j];\n }\n }\n System.out.printf(\"%d\\n\", 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 w = sc.nextInt();// 縦線の本数\n int n = sc.nextInt();// 横棒の本数\n int a[] = new int[n];\n int b[] = new int[n];\n\n for (int i = 0; i < n; i++) {// 横棒の入力\n String ab = sc.next();\n String ab_p[] = ab.split(\",\");\n a[i] = Integer.parseInt(ab_p[0]);\n b[i] = Integer.parseInt(ab_p[1]);\n }\n\n for (int i = 1; i <= w; i++) {// 左から右\n int k = i;\n for (int j = n - 1; j >= 0; j--) {// 下から上へ辿る\n if (k == a[j]) {\n k = b[j];\n } else if (k == b[j]) {\n k = a[j];\n }\n }\n System.out.printf(\"%d\\n\", k);\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 a[] = new int[n];\n int b[] = new int[n];\n\n for (int i = 0; i < n; i++) {// 横棒の入力\n String ab = sc.next();\n String ab_p[] = ab.split(\",\");\n a[i] = Integer.parseInt(ab_p[0]);\n b[i] = Integer.parseInt(ab_p[1]);\n }\n\n for (int i = 1; i <= w; i++) {// 左から右\n int k = i;\n for (int j = n - 1; j >= 0; j--) {// 下から上へ辿る\n if (k == a[j]) {\n k = b[j];\n } else if (k == b[j]) {\n k = a[j];\n }\n }\n System.out.printf(\"%d\\n\", k);\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();// 縦線の本数\n int n = sc.nextInt();// 横棒の本数\n int a[] = new int[n];\n int b[] = new int[n];\n\n for (int i = 0; i < n; i++) {// 横棒の入力\n String ab = sc.next();\n String ab_p[] = ab.split(\",\");\n a[i] = Integer.parseInt(ab_p[0]);\n b[i] = Integer.parseInt(ab_p[1]);\n }\n\n for (int i = 1; i <= w; i++) {// 左から右\n int k = i;\n for (int j = n - 1; j >= 0; j--) {// 下から上へ辿る\n if (k == a[j]) {\n k = b[j];\n } else if (k == b[j]) {\n k = a[j];\n }\n }\n System.out.printf(\"%d\\n\", k);\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 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 String ab = sc.next();\n String ab_p[] = ab.split(\",\");\n a[i] = Integer.parseInt(ab_p[0]);\n b[i] = Integer.parseInt(ab_p[1]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{// 横棒の入力\n String ab = sc.next();\n String ab_p[] = ab.split(\",\");\n a[i] = Integer.parseInt(ab_p[0]);\n b[i] = Integer.parseInt(ab_p[1]);\n }",
"{// 横棒の入力\n String ab = sc.next();\n String ab_p[] = ab.split(\",\");\n a[i] = Integer.parseInt(ab_p[0]);\n b[i] = Integer.parseInt(ab_p[1]);\n }",
"String ab = sc.next();",
"ab",
"sc.next()",
"sc.next",
"sc",
"String ab_p[] = ab.split(\",\");",
"ab_p",
"ab.split(\",\")",
"ab.split",
"ab",
"\",\"",
"a[i] = Integer.parseInt(ab_p[0])",
"a[i]",
"a",
"i",
"Integer.parseInt(ab_p[0])",
"Integer.parseInt",
"Integer",
"ab_p[0]",
"ab_p",
"0",
"b[i] = Integer.parseInt(ab_p[1])",
"b[i]",
"b",
"i",
"Integer.parseInt(ab_p[1])",
"Integer.parseInt",
"Integer",
"ab_p[1]",
"ab_p",
"1",
"for (int i = 1; i <= w; i++) {// 左から右\n int k = i;\n for (int j = n - 1; j >= 0; j--) {// 下から上へ辿る\n if (k == a[j]) {\n k = b[j];\n } else if (k == b[j]) {\n k = a[j];\n }\n }\n System.out.printf(\"%d\\n\", k);\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= w",
"i",
"w",
"i++",
"i++",
"i",
"{// 左から右\n int k = i;\n for (int j = n - 1; j >= 0; j--) {// 下から上へ辿る\n if (k == a[j]) {\n k = b[j];\n } else if (k == b[j]) {\n k = a[j];\n }\n }\n System.out.printf(\"%d\\n\", k);\n }",
"{// 左から右\n int k = i;\n for (int j = n - 1; j >= 0; j--) {// 下から上へ辿る\n if (k == a[j]) {\n k = b[j];\n } else if (k == b[j]) {\n k = a[j];\n }\n }\n System.out.printf(\"%d\\n\", k);\n }",
"int k = i;",
"k",
"i",
"for (int j = n - 1; j >= 0; j--) {// 下から上へ辿る\n if (k == a[j]) {\n k = b[j];\n } else if (k == b[j]) {\n k = a[j];\n }\n }",
"int j = n - 1;",
"int j = n - 1;",
"j",
"n - 1",
"n",
"1",
"j >= 0",
"j",
"0",
"j--",
"j--",
"j",
"{// 下から上へ辿る\n if (k == a[j]) {\n k = b[j];\n } else if (k == b[j]) {\n k = a[j];\n }\n }",
"{// 下から上へ辿る\n if (k == a[j]) {\n k = b[j];\n } else if (k == b[j]) {\n k = a[j];\n }\n }",
"if (k == a[j]) {\n k = b[j];\n } else if (k == b[j]) {\n k = a[j];\n }",
"k == a[j]",
"k",
"a[j]",
"a",
"j",
"{\n k = b[j];\n }",
"k = b[j]",
"k",
"b[j]",
"b",
"j",
"if (k == b[j]) {\n k = a[j];\n }",
"k == b[j]",
"k",
"b[j]",
"b",
"j",
"{\n k = a[j];\n }",
"k = a[j]",
"k",
"a[j]",
"a",
"j",
"System.out.printf(\"%d\\n\", k)",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%d\\n\"",
"k",
"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[n];\n int b[] = new int[n];\n\n for (int i = 0; i < n; i++) {// 横棒の入力\n String ab = sc.next();\n String ab_p[] = ab.split(\",\");\n a[i] = Integer.parseInt(ab_p[0]);\n b[i] = Integer.parseInt(ab_p[1]);\n }\n\n for (int i = 1; i <= w; i++) {// 左から右\n int k = i;\n for (int j = n - 1; j >= 0; j--) {// 下から上へ辿る\n if (k == a[j]) {\n k = b[j];\n } else if (k == b[j]) {\n k = a[j];\n }\n }\n System.out.printf(\"%d\\n\", k);\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 a[] = new int[n];\n int b[] = new int[n];\n\n for (int i = 0; i < n; i++) {// 横棒の入力\n String ab = sc.next();\n String ab_p[] = ab.split(\",\");\n a[i] = Integer.parseInt(ab_p[0]);\n b[i] = Integer.parseInt(ab_p[1]);\n }\n\n for (int i = 1; i <= w; i++) {// 左から右\n int k = i;\n for (int j = n - 1; j >= 0; j--) {// 下から上へ辿る\n if (k == a[j]) {\n k = b[j];\n } else if (k == b[j]) {\n k = a[j];\n }\n }\n System.out.printf(\"%d\\n\", 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 w = sc.nextInt();// 縦線の本数
int n = sc.nextInt();// 横棒の本数
int a[] = new int[n];
int b[] = new int[n];
for (int i = 0; i < n; i++) {// 横棒の入力
String ab = sc.next();
String ab_p[] = ab.split(",");
a[i] = Integer.parseInt(ab_p[0]);
b[i] = Integer.parseInt(ab_p[1]);
}
for (int i = 1; i <= w; i++) {// 左から右
int k = i;
for (int j = n - 1; j >= 0; j--) {// 下から上へ辿る
if (k == a[j]) {
k = b[j];
} else if (k == b[j]) {
k = a[j];
}
}
System.out.printf("%d\n", k);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
4,
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,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
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,
4,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
14,
2,
13,
17,
30,
4,
18,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
149,
5
],
[
149,
6
],
[
6,
7
],
[
6,
8
],
[
149,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
11,
19
],
[
19,
20
],
[
19,
21
],
[
11,
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
],
[
40,
41
],
[
40,
42
],
[
11,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
45,
48
],
[
48,
49
],
[
11,
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
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
78,
79
],
[
78,
80
],
[
74,
81
],
[
62,
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
],
[
62,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
110,
111
],
[
110,
112
],
[
106,
113
],
[
103,
114
],
[
11,
115
],
[
115,
116
],
[
115,
117
],
[
115,
118
],
[
119,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
120,
125
],
[
11,
126
],
[
126,
127
],
[
9,
128
],
[
128,
129
],
[
149,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
149,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
140,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
0,
148
],
[
148,
149
],
[
148,
150
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static Scanner scanner = new Scanner(System.in);\n\n\tpublic static void main(String[] args) {\n\n\t\tint w = Integer.parseInt(input());\n\t\tint[] amida = new int[w];\n\n\t\tfor (int i = 0; i < w; i++) {\n\n\t\t\tamida[i] = i + 1;\n\n\t\t}\n\n\t\tint n = Integer.parseInt(input());\n\n\t\tfor (int j = 0; j < n; j++) {\n\n\t\t\tString[] change = input().split(\",\");\n\t\t\tint temp = amida[Integer.parseInt(change[0]) - 1];\n\t\t\tamida[Integer.parseInt(change[0]) - 1] = amida[Integer.parseInt(change[1]) - 1];\n\t\t\tamida[Integer.parseInt(change[1]) - 1] = temp;\n\n\t\t}\n\n\t\tfor (int k: amida) {\n\n\t\t\tSystem.out.println(k);\n\n\t\t}\n\n\t\tclose();\n\n\t}\n\n\tpublic static String input() {\n\n\t\treturn scanner.nextLine();\n\n\t}\n\n\tpublic static void close() {\n\n\t\tif (scanner != null) {\n\n\t\t\tscanner.close();\n\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static Scanner scanner = new Scanner(System.in);\n\n\tpublic static void main(String[] args) {\n\n\t\tint w = Integer.parseInt(input());\n\t\tint[] amida = new int[w];\n\n\t\tfor (int i = 0; i < w; i++) {\n\n\t\t\tamida[i] = i + 1;\n\n\t\t}\n\n\t\tint n = Integer.parseInt(input());\n\n\t\tfor (int j = 0; j < n; j++) {\n\n\t\t\tString[] change = input().split(\",\");\n\t\t\tint temp = amida[Integer.parseInt(change[0]) - 1];\n\t\t\tamida[Integer.parseInt(change[0]) - 1] = amida[Integer.parseInt(change[1]) - 1];\n\t\t\tamida[Integer.parseInt(change[1]) - 1] = temp;\n\n\t\t}\n\n\t\tfor (int k: amida) {\n\n\t\t\tSystem.out.println(k);\n\n\t\t}\n\n\t\tclose();\n\n\t}\n\n\tpublic static String input() {\n\n\t\treturn scanner.nextLine();\n\n\t}\n\n\tpublic static void close() {\n\n\t\tif (scanner != null) {\n\n\t\t\tscanner.close();\n\n\t\t}\n\t}\n}",
"Main",
"public static Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"public static void main(String[] args) {\n\n\t\tint w = Integer.parseInt(input());\n\t\tint[] amida = new int[w];\n\n\t\tfor (int i = 0; i < w; i++) {\n\n\t\t\tamida[i] = i + 1;\n\n\t\t}\n\n\t\tint n = Integer.parseInt(input());\n\n\t\tfor (int j = 0; j < n; j++) {\n\n\t\t\tString[] change = input().split(\",\");\n\t\t\tint temp = amida[Integer.parseInt(change[0]) - 1];\n\t\t\tamida[Integer.parseInt(change[0]) - 1] = amida[Integer.parseInt(change[1]) - 1];\n\t\t\tamida[Integer.parseInt(change[1]) - 1] = temp;\n\n\t\t}\n\n\t\tfor (int k: amida) {\n\n\t\t\tSystem.out.println(k);\n\n\t\t}\n\n\t\tclose();\n\n\t}",
"main",
"{\n\n\t\tint w = Integer.parseInt(input());\n\t\tint[] amida = new int[w];\n\n\t\tfor (int i = 0; i < w; i++) {\n\n\t\t\tamida[i] = i + 1;\n\n\t\t}\n\n\t\tint n = Integer.parseInt(input());\n\n\t\tfor (int j = 0; j < n; j++) {\n\n\t\t\tString[] change = input().split(\",\");\n\t\t\tint temp = amida[Integer.parseInt(change[0]) - 1];\n\t\t\tamida[Integer.parseInt(change[0]) - 1] = amida[Integer.parseInt(change[1]) - 1];\n\t\t\tamida[Integer.parseInt(change[1]) - 1] = temp;\n\n\t\t}\n\n\t\tfor (int k: amida) {\n\n\t\t\tSystem.out.println(k);\n\n\t\t}\n\n\t\tclose();\n\n\t}",
"int w = Integer.parseInt(input());",
"w",
"Integer.parseInt(input())",
"Integer.parseInt",
"Integer",
"input()",
"input",
"int[] amida = new int[w];",
"amida",
"new int[w]",
"w",
"for (int i = 0; i < w; i++) {\n\n\t\t\tamida[i] = i + 1;\n\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\n\t\t\tamida[i] = i + 1;\n\n\t\t}",
"{\n\n\t\t\tamida[i] = i + 1;\n\n\t\t}",
"amida[i] = i + 1",
"amida[i]",
"amida",
"i",
"i + 1",
"i",
"1",
"int n = Integer.parseInt(input());",
"n",
"Integer.parseInt(input())",
"Integer.parseInt",
"Integer",
"input()",
"input",
"for (int j = 0; j < n; j++) {\n\n\t\t\tString[] change = input().split(\",\");\n\t\t\tint temp = amida[Integer.parseInt(change[0]) - 1];\n\t\t\tamida[Integer.parseInt(change[0]) - 1] = amida[Integer.parseInt(change[1]) - 1];\n\t\t\tamida[Integer.parseInt(change[1]) - 1] = temp;\n\n\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < n",
"j",
"n",
"j++",
"j++",
"j",
"{\n\n\t\t\tString[] change = input().split(\",\");\n\t\t\tint temp = amida[Integer.parseInt(change[0]) - 1];\n\t\t\tamida[Integer.parseInt(change[0]) - 1] = amida[Integer.parseInt(change[1]) - 1];\n\t\t\tamida[Integer.parseInt(change[1]) - 1] = temp;\n\n\t\t}",
"{\n\n\t\t\tString[] change = input().split(\",\");\n\t\t\tint temp = amida[Integer.parseInt(change[0]) - 1];\n\t\t\tamida[Integer.parseInt(change[0]) - 1] = amida[Integer.parseInt(change[1]) - 1];\n\t\t\tamida[Integer.parseInt(change[1]) - 1] = temp;\n\n\t\t}",
"String[] change = input().split(\",\");",
"change",
"input().split(\",\")",
"input().split",
"input()",
"input",
"\",\"",
"int temp = amida[Integer.parseInt(change[0]) - 1];",
"temp",
"amida[Integer.parseInt(change[0]) - 1]",
"amida",
"Integer.parseInt(change[0]) - 1",
"Integer.parseInt(change[0])",
"Integer.parseInt",
"Integer",
"change[0]",
"change",
"0",
"1",
"amida[Integer.parseInt(change[0]) - 1] = amida[Integer.parseInt(change[1]) - 1]",
"amida[Integer.parseInt(change[0]) - 1]",
"amida",
"Integer.parseInt(change[0]) - 1",
"Integer.parseInt(change[0])",
"Integer.parseInt",
"Integer",
"change[0]",
"change",
"0",
"1",
"amida[Integer.parseInt(change[1]) - 1]",
"amida",
"Integer.parseInt(change[1]) - 1",
"Integer.parseInt(change[1])",
"Integer.parseInt",
"Integer",
"change[1]",
"change",
"1",
"1",
"amida[Integer.parseInt(change[1]) - 1] = temp",
"amida[Integer.parseInt(change[1]) - 1]",
"amida",
"Integer.parseInt(change[1]) - 1",
"Integer.parseInt(change[1])",
"Integer.parseInt",
"Integer",
"change[1]",
"change",
"1",
"1",
"temp",
"for (int k: amida) {\n\n\t\t\tSystem.out.println(k);\n\n\t\t}",
"int k",
"amida",
"{\n\n\t\t\tSystem.out.println(k);\n\n\t\t}",
"{\n\n\t\t\tSystem.out.println(k);\n\n\t\t}",
"System.out.println(k)",
"System.out.println",
"System.out",
"System",
"System.out",
"k",
"close()",
"close",
"String[] args",
"args",
"public static String input() {\n\n\t\treturn scanner.nextLine();\n\n\t}",
"input",
"{\n\n\t\treturn scanner.nextLine();\n\n\t}",
"return scanner.nextLine();",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"public static void close() {\n\n\t\tif (scanner != null) {\n\n\t\t\tscanner.close();\n\n\t\t}\n\t}",
"close",
"{\n\n\t\tif (scanner != null) {\n\n\t\t\tscanner.close();\n\n\t\t}\n\t}",
"if (scanner != null) {\n\n\t\t\tscanner.close();\n\n\t\t}",
"scanner != null",
"scanner",
"null",
"{\n\n\t\t\tscanner.close();\n\n\t\t}",
"scanner.close()",
"scanner.close",
"scanner",
"public class Main {\n\n\tpublic static Scanner scanner = new Scanner(System.in);\n\n\tpublic static void main(String[] args) {\n\n\t\tint w = Integer.parseInt(input());\n\t\tint[] amida = new int[w];\n\n\t\tfor (int i = 0; i < w; i++) {\n\n\t\t\tamida[i] = i + 1;\n\n\t\t}\n\n\t\tint n = Integer.parseInt(input());\n\n\t\tfor (int j = 0; j < n; j++) {\n\n\t\t\tString[] change = input().split(\",\");\n\t\t\tint temp = amida[Integer.parseInt(change[0]) - 1];\n\t\t\tamida[Integer.parseInt(change[0]) - 1] = amida[Integer.parseInt(change[1]) - 1];\n\t\t\tamida[Integer.parseInt(change[1]) - 1] = temp;\n\n\t\t}\n\n\t\tfor (int k: amida) {\n\n\t\t\tSystem.out.println(k);\n\n\t\t}\n\n\t\tclose();\n\n\t}\n\n\tpublic static String input() {\n\n\t\treturn scanner.nextLine();\n\n\t}\n\n\tpublic static void close() {\n\n\t\tif (scanner != null) {\n\n\t\t\tscanner.close();\n\n\t\t}\n\t}\n}",
"public class Main {\n\n\tpublic static Scanner scanner = new Scanner(System.in);\n\n\tpublic static void main(String[] args) {\n\n\t\tint w = Integer.parseInt(input());\n\t\tint[] amida = new int[w];\n\n\t\tfor (int i = 0; i < w; i++) {\n\n\t\t\tamida[i] = i + 1;\n\n\t\t}\n\n\t\tint n = Integer.parseInt(input());\n\n\t\tfor (int j = 0; j < n; j++) {\n\n\t\t\tString[] change = input().split(\",\");\n\t\t\tint temp = amida[Integer.parseInt(change[0]) - 1];\n\t\t\tamida[Integer.parseInt(change[0]) - 1] = amida[Integer.parseInt(change[1]) - 1];\n\t\t\tamida[Integer.parseInt(change[1]) - 1] = temp;\n\n\t\t}\n\n\t\tfor (int k: amida) {\n\n\t\t\tSystem.out.println(k);\n\n\t\t}\n\n\t\tclose();\n\n\t}\n\n\tpublic static String input() {\n\n\t\treturn scanner.nextLine();\n\n\t}\n\n\tpublic static void close() {\n\n\t\tif (scanner != null) {\n\n\t\t\tscanner.close();\n\n\t\t}\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static Scanner scanner = new Scanner(System.in);
public static void main(String[] args) {
int w = Integer.parseInt(input());
int[] amida = new int[w];
for (int i = 0; i < w; i++) {
amida[i] = i + 1;
}
int n = Integer.parseInt(input());
for (int j = 0; j < n; j++) {
String[] change = input().split(",");
int temp = amida[Integer.parseInt(change[0]) - 1];
amida[Integer.parseInt(change[0]) - 1] = amida[Integer.parseInt(change[1]) - 1];
amida[Integer.parseInt(change[1]) - 1] = temp;
}
for (int k: amida) {
System.out.println(k);
}
close();
}
public static String input() {
return scanner.nextLine();
}
public static void close() {
if (scanner != null) {
scanner.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,
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,
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
],
[
128,
5
],
[
128,
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
],
[
63,
64
],
[
64,
65
],
[
61,
66
],
[
58,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
73,
74
],
[
73,
75
],
[
69,
76
],
[
58,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
83,
84
],
[
83,
85
],
[
79,
86
],
[
58,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
89,
91
],
[
58,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
96,
97
],
[
96,
98
],
[
58,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
8,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
104,
109
],
[
109,
110
],
[
109,
111
],
[
104,
112
],
[
112,
113
],
[
113,
114
],
[
104,
115
],
[
116,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
117,
122
],
[
122,
123
],
[
122,
124
],
[
6,
125
],
[
125,
126
],
[
0,
127
],
[
127,
128
],
[
127,
129
]
] | [
"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 w=sc.nextInt();\n\t\tint n=sc.nextInt();\n\t\tint[] wArr=new int[w];\n\t\tfor(int i=0;i<w;i++){\n\t\t\twArr[i]=i+1;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] ab=sc.next().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 box=wArr[a];\n\t\t\twArr[a]=wArr[b];\n\t\t\twArr[b]=box;\n\t\t}\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(wArr[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 n=sc.nextInt();\n\t\tint[] wArr=new int[w];\n\t\tfor(int i=0;i<w;i++){\n\t\t\twArr[i]=i+1;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] ab=sc.next().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 box=wArr[a];\n\t\t\twArr[a]=wArr[b];\n\t\t\twArr[b]=box;\n\t\t}\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(wArr[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[] wArr=new int[w];\n\t\tfor(int i=0;i<w;i++){\n\t\t\twArr[i]=i+1;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] ab=sc.next().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 box=wArr[a];\n\t\t\twArr[a]=wArr[b];\n\t\t\twArr[b]=box;\n\t\t}\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(wArr[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[] wArr=new int[w];\n\t\tfor(int i=0;i<w;i++){\n\t\t\twArr[i]=i+1;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] ab=sc.next().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 box=wArr[a];\n\t\t\twArr[a]=wArr[b];\n\t\t\twArr[b]=box;\n\t\t}\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(wArr[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[] wArr=new int[w];",
"wArr",
"new int[w]",
"w",
"for(int i=0;i<w;i++){\n\t\t\twArr[i]=i+1;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\twArr[i]=i+1;\n\t\t}",
"{\n\t\t\twArr[i]=i+1;\n\t\t}",
"wArr[i]=i+1",
"wArr[i]",
"wArr",
"i",
"i+1",
"i",
"1",
"for(int i=0;i<n;i++){\n\t\t\tString[] ab=sc.next().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 box=wArr[a];\n\t\t\twArr[a]=wArr[b];\n\t\t\twArr[b]=box;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString[] ab=sc.next().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 box=wArr[a];\n\t\t\twArr[a]=wArr[b];\n\t\t\twArr[b]=box;\n\t\t}",
"{\n\t\t\tString[] ab=sc.next().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 box=wArr[a];\n\t\t\twArr[a]=wArr[b];\n\t\t\twArr[b]=box;\n\t\t}",
"String[] ab=sc.next().split(\",\");",
"ab",
"sc.next().split(\",\")",
"sc.next().split",
"sc.next()",
"sc.next",
"sc",
"\",\"",
"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 box=wArr[a];",
"box",
"wArr[a]",
"wArr",
"a",
"wArr[a]=wArr[b]",
"wArr[a]",
"wArr",
"a",
"wArr[b]",
"wArr",
"b",
"wArr[b]=box",
"wArr[b]",
"wArr",
"b",
"box",
"for(int i=0;i<w;i++){\n\t\t\tSystem.out.println(wArr[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(wArr[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(wArr[i]);\n\t\t}",
"System.out.println(wArr[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"wArr[i]",
"wArr",
"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\tint[] wArr=new int[w];\n\t\tfor(int i=0;i<w;i++){\n\t\t\twArr[i]=i+1;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] ab=sc.next().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 box=wArr[a];\n\t\t\twArr[a]=wArr[b];\n\t\t\twArr[b]=box;\n\t\t}\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(wArr[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 n=sc.nextInt();\n\t\tint[] wArr=new int[w];\n\t\tfor(int i=0;i<w;i++){\n\t\t\twArr[i]=i+1;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] ab=sc.next().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 box=wArr[a];\n\t\t\twArr[a]=wArr[b];\n\t\t\twArr[b]=box;\n\t\t}\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(wArr[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 n=sc.nextInt();
int[] wArr=new int[w];
for(int i=0;i<w;i++){
wArr[i]=i+1;
}
for(int i=0;i<n;i++){
String[] ab=sc.next().split(",");
int a=Integer.parseInt(ab[0])-1;
int b=Integer.parseInt(ab[1])-1;
int box=wArr[a];
wArr[a]=wArr[b];
wArr[b]=box;
}
for(int i=0;i<w;i++){
System.out.println(wArr[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,
41,
13,
42,
4,
18,
13,
30,
0,
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,
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,
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
],
[
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
],
[
27,
28
],
[
28,
29
],
[
26,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
30,
36
],
[
36,
37
],
[
36,
38
],
[
39,
40
],
[
39,
41
],
[
30,
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
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
30,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
30,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
70,
71
],
[
70,
72
],
[
65,
73
],
[
73,
74
],
[
74,
75
],
[
65,
76
],
[
77,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
80,
85
],
[
77,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
91,
92
],
[
91,
93
],
[
77,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
97,
98
],
[
96,
99
],
[
99,
100
],
[
99,
101
],
[
77,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
104,
106
],
[
77,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
107,
111
],
[
111,
112
],
[
111,
113
],
[
77,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
30,
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.util.*;\n\nclass Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w, n, a, b, tmp;\n\t\tString[] s;\n\t\tint[] table;\n\t\twhile(sc.hasNext()){\n\t\t\tw = sc.nextInt();\n\t\t\ttable = new int[w + 1];\n\t\t\tfor(int i = 0; i <= w; i++){\n\t\t\t\ttable[i] = i;\n\t\t\t}\n\t\t\tn = sc.nextInt();\n\t\t\tfor(int i = 0; i < n; i++){\n\t\t\t\ts = sc.next().split(\",\");\n\t\t\t\ta = Integer.parseInt(s[0]);\n\t\t\t\tb = Integer.parseInt(s[1]);\n\t\t\t\ttmp = table[a];\n\t\t\t\ttable[a] = table[b];\n\t\t\t\ttable[b] = tmp;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 1; i <= w; i++){ \n\t\t\t\tSystem.out.println(table[i]);\n\t\t\t}\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, n, a, b, tmp;\n\t\tString[] s;\n\t\tint[] table;\n\t\twhile(sc.hasNext()){\n\t\t\tw = sc.nextInt();\n\t\t\ttable = new int[w + 1];\n\t\t\tfor(int i = 0; i <= w; i++){\n\t\t\t\ttable[i] = i;\n\t\t\t}\n\t\t\tn = sc.nextInt();\n\t\t\tfor(int i = 0; i < n; i++){\n\t\t\t\ts = sc.next().split(\",\");\n\t\t\t\ta = Integer.parseInt(s[0]);\n\t\t\t\tb = Integer.parseInt(s[1]);\n\t\t\t\ttmp = table[a];\n\t\t\t\ttable[a] = table[b];\n\t\t\t\ttable[b] = tmp;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 1; i <= w; i++){ \n\t\t\t\tSystem.out.println(table[i]);\n\t\t\t}\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, n, a, b, tmp;\n\t\tString[] s;\n\t\tint[] table;\n\t\twhile(sc.hasNext()){\n\t\t\tw = sc.nextInt();\n\t\t\ttable = new int[w + 1];\n\t\t\tfor(int i = 0; i <= w; i++){\n\t\t\t\ttable[i] = i;\n\t\t\t}\n\t\t\tn = sc.nextInt();\n\t\t\tfor(int i = 0; i < n; i++){\n\t\t\t\ts = sc.next().split(\",\");\n\t\t\t\ta = Integer.parseInt(s[0]);\n\t\t\t\tb = Integer.parseInt(s[1]);\n\t\t\t\ttmp = table[a];\n\t\t\t\ttable[a] = table[b];\n\t\t\t\ttable[b] = tmp;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 1; i <= w; i++){ \n\t\t\t\tSystem.out.println(table[i]);\n\t\t\t}\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w, n, a, b, tmp;\n\t\tString[] s;\n\t\tint[] table;\n\t\twhile(sc.hasNext()){\n\t\t\tw = sc.nextInt();\n\t\t\ttable = new int[w + 1];\n\t\t\tfor(int i = 0; i <= w; i++){\n\t\t\t\ttable[i] = i;\n\t\t\t}\n\t\t\tn = sc.nextInt();\n\t\t\tfor(int i = 0; i < n; i++){\n\t\t\t\ts = sc.next().split(\",\");\n\t\t\t\ta = Integer.parseInt(s[0]);\n\t\t\t\tb = Integer.parseInt(s[1]);\n\t\t\t\ttmp = table[a];\n\t\t\t\ttable[a] = table[b];\n\t\t\t\ttable[b] = tmp;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 1; i <= w; i++){ \n\t\t\t\tSystem.out.println(table[i]);\n\t\t\t}\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w",
"w",
"n",
"n",
"a",
"a",
"b",
"b",
"tmp;",
"tmp",
"String[] s;",
"s",
"int[] table;",
"table",
"while(sc.hasNext()){\n\t\t\tw = sc.nextInt();\n\t\t\ttable = new int[w + 1];\n\t\t\tfor(int i = 0; i <= w; i++){\n\t\t\t\ttable[i] = i;\n\t\t\t}\n\t\t\tn = sc.nextInt();\n\t\t\tfor(int i = 0; i < n; i++){\n\t\t\t\ts = sc.next().split(\",\");\n\t\t\t\ta = Integer.parseInt(s[0]);\n\t\t\t\tb = Integer.parseInt(s[1]);\n\t\t\t\ttmp = table[a];\n\t\t\t\ttable[a] = table[b];\n\t\t\t\ttable[b] = tmp;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 1; i <= w; i++){ \n\t\t\t\tSystem.out.println(table[i]);\n\t\t\t}\n\t\t}",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n\t\t\tw = sc.nextInt();\n\t\t\ttable = new int[w + 1];\n\t\t\tfor(int i = 0; i <= w; i++){\n\t\t\t\ttable[i] = i;\n\t\t\t}\n\t\t\tn = sc.nextInt();\n\t\t\tfor(int i = 0; i < n; i++){\n\t\t\t\ts = sc.next().split(\",\");\n\t\t\t\ta = Integer.parseInt(s[0]);\n\t\t\t\tb = Integer.parseInt(s[1]);\n\t\t\t\ttmp = table[a];\n\t\t\t\ttable[a] = table[b];\n\t\t\t\ttable[b] = tmp;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 1; i <= w; i++){ \n\t\t\t\tSystem.out.println(table[i]);\n\t\t\t}\n\t\t}",
"w = sc.nextInt()",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"table = new int[w + 1]",
"table",
"new int[w + 1]",
"w + 1",
"w",
"1",
"for(int i = 0; i <= w; i++){\n\t\t\t\ttable[i] = i;\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\t\ttable[i] = i;\n\t\t\t}",
"{\n\t\t\t\ttable[i] = i;\n\t\t\t}",
"table[i] = i",
"table[i]",
"table",
"i",
"i",
"n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i = 0; i < n; i++){\n\t\t\t\ts = sc.next().split(\",\");\n\t\t\t\ta = Integer.parseInt(s[0]);\n\t\t\t\tb = Integer.parseInt(s[1]);\n\t\t\t\ttmp = table[a];\n\t\t\t\ttable[a] = table[b];\n\t\t\t\ttable[b] = tmp;\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\ts = sc.next().split(\",\");\n\t\t\t\ta = Integer.parseInt(s[0]);\n\t\t\t\tb = Integer.parseInt(s[1]);\n\t\t\t\ttmp = table[a];\n\t\t\t\ttable[a] = table[b];\n\t\t\t\ttable[b] = tmp;\n\t\t\t}",
"{\n\t\t\t\ts = sc.next().split(\",\");\n\t\t\t\ta = Integer.parseInt(s[0]);\n\t\t\t\tb = Integer.parseInt(s[1]);\n\t\t\t\ttmp = table[a];\n\t\t\t\ttable[a] = table[b];\n\t\t\t\ttable[b] = tmp;\n\t\t\t}",
"s = sc.next().split(\",\")",
"s",
"sc.next().split(\",\")",
"sc.next().split",
"sc.next()",
"sc.next",
"sc",
"\",\"",
"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",
"tmp = table[a]",
"tmp",
"table[a]",
"table",
"a",
"table[a] = table[b]",
"table[a]",
"table",
"a",
"table[b]",
"table",
"b",
"table[b] = tmp",
"table[b]",
"table",
"b",
"tmp",
"for(int i = 1; i <= w; i++){ \n\t\t\t\tSystem.out.println(table[i]);\n\t\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= w",
"i",
"w",
"i++",
"i++",
"i",
"{ \n\t\t\t\tSystem.out.println(table[i]);\n\t\t\t}",
"{ \n\t\t\t\tSystem.out.println(table[i]);\n\t\t\t}",
"System.out.println(table[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"table[i]",
"table",
"i",
"String[] args",
"args"
] | import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int w, n, a, b, tmp;
String[] s;
int[] table;
while(sc.hasNext()){
w = sc.nextInt();
table = new int[w + 1];
for(int i = 0; i <= w; i++){
table[i] = i;
}
n = sc.nextInt();
for(int i = 0; i < n; i++){
s = sc.next().split(",");
a = Integer.parseInt(s[0]);
b = Integer.parseInt(s[1]);
tmp = table[a];
table[a] = table[b];
table[b] = tmp;
}
for(int i = 1; i <= w; i++){
System.out.println(table[i]);
}
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
20,
38,
5,
13,
30,
30,
41,
13,
4,
18,
13,
0,
13,
4,
18,
13,
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,
0,
13,
4,
18,
13,
0,
13,
4,
18,
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,
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,
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
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
182,
14
],
[
182,
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
],
[
27,
29
],
[
17,
30
],
[
30,
31
],
[
30,
32
],
[
17,
33
],
[
33,
34
],
[
33,
35
],
[
17,
36
],
[
36,
37
],
[
36,
38
],
[
17,
39
],
[
39,
40
],
[
39,
41
],
[
17,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
46,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
46,
58
],
[
58,
59
],
[
58,
60
],
[
46,
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
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
79,
80
],
[
79,
81
],
[
46,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
46,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
46,
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
],
[
108,
109
],
[
109,
110
],
[
105,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
114,
115
],
[
113,
116
],
[
105,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
120,
121
],
[
119,
122
],
[
122,
123
],
[
122,
124
],
[
105,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
128,
129
],
[
127,
130
],
[
130,
131
],
[
130,
132
],
[
105,
133
],
[
133,
134
],
[
133,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
137,
139
],
[
105,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
143,
145
],
[
140,
146
],
[
146,
147
],
[
146,
148
],
[
148,
149
],
[
148,
150
],
[
105,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
154,
155
],
[
154,
156
],
[
151,
157
],
[
46,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
158,
163
],
[
163,
164
],
[
163,
165
],
[
158,
166
],
[
166,
167
],
[
167,
168
],
[
158,
169
],
[
170,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
173,
175
],
[
171,
176
],
[
176,
177
],
[
176,
178
],
[
15,
179
],
[
179,
180
],
[
0,
181
],
[
181,
182
],
[
181,
183
]
] | [
"import java.io.*;\nimport java.util.Arrays;\nimport java.util.Scanner;\nimport java.util.ArrayList;\npublic class Main{\n\tpublic static void main(String args[]){\n int a=0,b=0,c=0,i=0,n=0,j=0,m=0;\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n\n try{\n String line = reader.readLine();\n n = Integer.parseInt(line);\n int bar[] = new int[n];\n for(i=0;i<n;i++){\n bar[i] = i + 1;\n }\n \n line = reader.readLine();\n j = Integer.parseInt(line);\n for(i=0;i<j;i++){\n line = reader.readLine();\n String[] splitted = line.split(\",\");\n a = Integer.parseInt(splitted[0]);\n b = Integer.parseInt(splitted[1]);\n c = bar[a - 1];\n bar[a - 1] = bar[b - 1];\n bar[b - 1] = c;\n\n }\n \n for(i=0;i<n;i++){\n System.out.println(bar[i]);\n }\n \n \n\n\n\n\n\n\t\t}catch(Exception e){\n }\n\n\n\n\n \n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.Arrays;",
"Arrays",
"java.util",
"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 int a=0,b=0,c=0,i=0,n=0,j=0,m=0;\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n\n try{\n String line = reader.readLine();\n n = Integer.parseInt(line);\n int bar[] = new int[n];\n for(i=0;i<n;i++){\n bar[i] = i + 1;\n }\n \n line = reader.readLine();\n j = Integer.parseInt(line);\n for(i=0;i<j;i++){\n line = reader.readLine();\n String[] splitted = line.split(\",\");\n a = Integer.parseInt(splitted[0]);\n b = Integer.parseInt(splitted[1]);\n c = bar[a - 1];\n bar[a - 1] = bar[b - 1];\n bar[b - 1] = c;\n\n }\n \n for(i=0;i<n;i++){\n System.out.println(bar[i]);\n }\n \n \n\n\n\n\n\n\t\t}catch(Exception e){\n }\n\n\n\n\n \n\t}\n}",
"Main",
"public static void main(String args[]){\n int a=0,b=0,c=0,i=0,n=0,j=0,m=0;\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n\n try{\n String line = reader.readLine();\n n = Integer.parseInt(line);\n int bar[] = new int[n];\n for(i=0;i<n;i++){\n bar[i] = i + 1;\n }\n \n line = reader.readLine();\n j = Integer.parseInt(line);\n for(i=0;i<j;i++){\n line = reader.readLine();\n String[] splitted = line.split(\",\");\n a = Integer.parseInt(splitted[0]);\n b = Integer.parseInt(splitted[1]);\n c = bar[a - 1];\n bar[a - 1] = bar[b - 1];\n bar[b - 1] = c;\n\n }\n \n for(i=0;i<n;i++){\n System.out.println(bar[i]);\n }\n \n \n\n\n\n\n\n\t\t}catch(Exception e){\n }\n\n\n\n\n \n\t}",
"main",
"{\n int a=0,b=0,c=0,i=0,n=0,j=0,m=0;\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n\n try{\n String line = reader.readLine();\n n = Integer.parseInt(line);\n int bar[] = new int[n];\n for(i=0;i<n;i++){\n bar[i] = i + 1;\n }\n \n line = reader.readLine();\n j = Integer.parseInt(line);\n for(i=0;i<j;i++){\n line = reader.readLine();\n String[] splitted = line.split(\",\");\n a = Integer.parseInt(splitted[0]);\n b = Integer.parseInt(splitted[1]);\n c = bar[a - 1];\n bar[a - 1] = bar[b - 1];\n bar[b - 1] = c;\n\n }\n \n for(i=0;i<n;i++){\n System.out.println(bar[i]);\n }\n \n \n\n\n\n\n\n\t\t}catch(Exception e){\n }\n\n\n\n\n \n\t}",
"int a=0",
"a",
"0",
"b=0",
"b",
"0",
"c=0",
"c",
"0",
"i=0",
"i",
"0",
"n=0",
"n",
"0",
"j=0",
"j",
"0",
"m=0;",
"m",
"0",
"BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));",
"reader",
"new BufferedReader(new InputStreamReader(System.in))",
"try{\n String line = reader.readLine();\n n = Integer.parseInt(line);\n int bar[] = new int[n];\n for(i=0;i<n;i++){\n bar[i] = i + 1;\n }\n \n line = reader.readLine();\n j = Integer.parseInt(line);\n for(i=0;i<j;i++){\n line = reader.readLine();\n String[] splitted = line.split(\",\");\n a = Integer.parseInt(splitted[0]);\n b = Integer.parseInt(splitted[1]);\n c = bar[a - 1];\n bar[a - 1] = bar[b - 1];\n bar[b - 1] = c;\n\n }\n \n for(i=0;i<n;i++){\n System.out.println(bar[i]);\n }\n \n \n\n\n\n\n\n\t\t}catch(Exception e){\n }",
"catch(Exception e){\n }",
"Exception e",
"{\n }",
"{\n String line = reader.readLine();\n n = Integer.parseInt(line);\n int bar[] = new int[n];\n for(i=0;i<n;i++){\n bar[i] = i + 1;\n }\n \n line = reader.readLine();\n j = Integer.parseInt(line);\n for(i=0;i<j;i++){\n line = reader.readLine();\n String[] splitted = line.split(\",\");\n a = Integer.parseInt(splitted[0]);\n b = Integer.parseInt(splitted[1]);\n c = bar[a - 1];\n bar[a - 1] = bar[b - 1];\n bar[b - 1] = c;\n\n }\n \n for(i=0;i<n;i++){\n System.out.println(bar[i]);\n }\n \n \n\n\n\n\n\n\t\t}",
"String line = reader.readLine();",
"line",
"reader.readLine()",
"reader.readLine",
"reader",
"n = Integer.parseInt(line)",
"n",
"Integer.parseInt(line)",
"Integer.parseInt",
"Integer",
"line",
"int bar[] = new int[n];",
"bar",
"new int[n]",
"n",
"for(i=0;i<n;i++){\n bar[i] = i + 1;\n }",
"i=0;",
"i=0",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n bar[i] = i + 1;\n }",
"{\n bar[i] = i + 1;\n }",
"bar[i] = i + 1",
"bar[i]",
"bar",
"i",
"i + 1",
"i",
"1",
"line = reader.readLine()",
"line",
"reader.readLine()",
"reader.readLine",
"reader",
"j = Integer.parseInt(line)",
"j",
"Integer.parseInt(line)",
"Integer.parseInt",
"Integer",
"line",
"for(i=0;i<j;i++){\n line = reader.readLine();\n String[] splitted = line.split(\",\");\n a = Integer.parseInt(splitted[0]);\n b = Integer.parseInt(splitted[1]);\n c = bar[a - 1];\n bar[a - 1] = bar[b - 1];\n bar[b - 1] = c;\n\n }",
"i=0;",
"i=0",
"i",
"0",
"i<j",
"i",
"j",
"i++",
"i++",
"i",
"{\n line = reader.readLine();\n String[] splitted = line.split(\",\");\n a = Integer.parseInt(splitted[0]);\n b = Integer.parseInt(splitted[1]);\n c = bar[a - 1];\n bar[a - 1] = bar[b - 1];\n bar[b - 1] = c;\n\n }",
"{\n line = reader.readLine();\n String[] splitted = line.split(\",\");\n a = Integer.parseInt(splitted[0]);\n b = Integer.parseInt(splitted[1]);\n c = bar[a - 1];\n bar[a - 1] = bar[b - 1];\n bar[b - 1] = c;\n\n }",
"line = reader.readLine()",
"line",
"reader.readLine()",
"reader.readLine",
"reader",
"String[] splitted = line.split(\",\");",
"splitted",
"line.split(\",\")",
"line.split",
"line",
"\",\"",
"a = Integer.parseInt(splitted[0])",
"a",
"Integer.parseInt(splitted[0])",
"Integer.parseInt",
"Integer",
"splitted[0]",
"splitted",
"0",
"b = Integer.parseInt(splitted[1])",
"b",
"Integer.parseInt(splitted[1])",
"Integer.parseInt",
"Integer",
"splitted[1]",
"splitted",
"1",
"c = bar[a - 1]",
"c",
"bar[a - 1]",
"bar",
"a - 1",
"a",
"1",
"bar[a - 1] = bar[b - 1]",
"bar[a - 1]",
"bar",
"a - 1",
"a",
"1",
"bar[b - 1]",
"bar",
"b - 1",
"b",
"1",
"bar[b - 1] = c",
"bar[b - 1]",
"bar",
"b - 1",
"b",
"1",
"c",
"for(i=0;i<n;i++){\n System.out.println(bar[i]);\n }",
"i=0;",
"i=0",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n System.out.println(bar[i]);\n }",
"{\n System.out.println(bar[i]);\n }",
"System.out.println(bar[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"bar[i]",
"bar",
"i",
"String args[]",
"args",
"public class Main{\n\tpublic static void main(String args[]){\n int a=0,b=0,c=0,i=0,n=0,j=0,m=0;\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n\n try{\n String line = reader.readLine();\n n = Integer.parseInt(line);\n int bar[] = new int[n];\n for(i=0;i<n;i++){\n bar[i] = i + 1;\n }\n \n line = reader.readLine();\n j = Integer.parseInt(line);\n for(i=0;i<j;i++){\n line = reader.readLine();\n String[] splitted = line.split(\",\");\n a = Integer.parseInt(splitted[0]);\n b = Integer.parseInt(splitted[1]);\n c = bar[a - 1];\n bar[a - 1] = bar[b - 1];\n bar[b - 1] = c;\n\n }\n \n for(i=0;i<n;i++){\n System.out.println(bar[i]);\n }\n \n \n\n\n\n\n\n\t\t}catch(Exception e){\n }\n\n\n\n\n \n\t}\n}",
"public class Main{\n\tpublic static void main(String args[]){\n int a=0,b=0,c=0,i=0,n=0,j=0,m=0;\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n\n try{\n String line = reader.readLine();\n n = Integer.parseInt(line);\n int bar[] = new int[n];\n for(i=0;i<n;i++){\n bar[i] = i + 1;\n }\n \n line = reader.readLine();\n j = Integer.parseInt(line);\n for(i=0;i<j;i++){\n line = reader.readLine();\n String[] splitted = line.split(\",\");\n a = Integer.parseInt(splitted[0]);\n b = Integer.parseInt(splitted[1]);\n c = bar[a - 1];\n bar[a - 1] = bar[b - 1];\n bar[b - 1] = c;\n\n }\n \n for(i=0;i<n;i++){\n System.out.println(bar[i]);\n }\n \n \n\n\n\n\n\n\t\t}catch(Exception e){\n }\n\n\n\n\n \n\t}\n}",
"Main"
] | import java.io.*;
import java.util.Arrays;
import java.util.Scanner;
import java.util.ArrayList;
public class Main{
public static void main(String args[]){
int a=0,b=0,c=0,i=0,n=0,j=0,m=0;
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
try{
String line = reader.readLine();
n = Integer.parseInt(line);
int bar[] = new int[n];
for(i=0;i<n;i++){
bar[i] = i + 1;
}
line = reader.readLine();
j = Integer.parseInt(line);
for(i=0;i<j;i++){
line = reader.readLine();
String[] splitted = line.split(",");
a = Integer.parseInt(splitted[0]);
b = Integer.parseInt(splitted[1]);
c = bar[a - 1];
bar[a - 1] = bar[b - 1];
bar[b - 1] = c;
}
for(i=0;i<n;i++){
System.out.println(bar[i]);
}
}catch(Exception e){
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
41,
13,
41,
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,
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,
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
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
149,
8
],
[
149,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
17,
20
],
[
20,
21
],
[
21,
22
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
28,
29
],
[
29,
30
],
[
11,
31
],
[
31,
32
],
[
11,
33
],
[
33,
34
],
[
11,
35
],
[
35,
36
],
[
11,
37
],
[
37,
38
],
[
37,
39
],
[
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
],
[
58,
60
],
[
11,
61
],
[
61,
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
],
[
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
],
[
104,
105
],
[
104,
106
],
[
75,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
110,
112
],
[
107,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
115,
117
],
[
75,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
121,
123
],
[
118,
124
],
[
11,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
125,
130
],
[
130,
131
],
[
130,
132
],
[
125,
133
],
[
133,
134
],
[
134,
135
],
[
125,
136
],
[
137,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
138,
143
],
[
143,
144
],
[
143,
145
],
[
9,
146
],
[
146,
147
],
[
0,
148
],
[
148,
149
],
[
148,
150
]
] | [
"import java.util.*;\nimport java.text.*;\n/*\nMain class for AOJ where there is no input.\n*/\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int width = Integer.parseInt(sc.nextLine());\n int n = Integer.parseInt(sc.nextLine());\n String[] arr;\n int a;\n int b;\n int[] lot = new int[width];\n for(int i = 0; i < width; i ++){\n lot[i] = i + 1;\n }\n \n int temp;\n \n for(int i = 0; i < n; i ++){\n arr = sc.nextLine().split(\",\");\n a = Integer.parseInt(arr[0]);\n b = Integer.parseInt(arr[1]);\n \n temp = lot[a-1];\n lot[a-1] = lot[b-1];\n lot[b-1] = temp;\n }\n \n for(int i = 0; i < width; i ++){\n System.out.println(lot[i]);\n }\n \n }//main\n}//class",
"import java.util.*;",
"util.*",
"java",
"import java.text.*;",
"text.*",
"java",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int width = Integer.parseInt(sc.nextLine());\n int n = Integer.parseInt(sc.nextLine());\n String[] arr;\n int a;\n int b;\n int[] lot = new int[width];\n for(int i = 0; i < width; i ++){\n lot[i] = i + 1;\n }\n \n int temp;\n \n for(int i = 0; i < n; i ++){\n arr = sc.nextLine().split(\",\");\n a = Integer.parseInt(arr[0]);\n b = Integer.parseInt(arr[1]);\n \n temp = lot[a-1];\n lot[a-1] = lot[b-1];\n lot[b-1] = temp;\n }\n \n for(int i = 0; i < width; i ++){\n System.out.println(lot[i]);\n }\n \n }//main\n}//class",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int width = Integer.parseInt(sc.nextLine());\n int n = Integer.parseInt(sc.nextLine());\n String[] arr;\n int a;\n int b;\n int[] lot = new int[width];\n for(int i = 0; i < width; i ++){\n lot[i] = i + 1;\n }\n \n int temp;\n \n for(int i = 0; i < n; i ++){\n arr = sc.nextLine().split(\",\");\n a = Integer.parseInt(arr[0]);\n b = Integer.parseInt(arr[1]);\n \n temp = lot[a-1];\n lot[a-1] = lot[b-1];\n lot[b-1] = temp;\n }\n \n for(int i = 0; i < width; i ++){\n System.out.println(lot[i]);\n }\n \n }//main",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int width = Integer.parseInt(sc.nextLine());\n int n = Integer.parseInt(sc.nextLine());\n String[] arr;\n int a;\n int b;\n int[] lot = new int[width];\n for(int i = 0; i < width; i ++){\n lot[i] = i + 1;\n }\n \n int temp;\n \n for(int i = 0; i < n; i ++){\n arr = sc.nextLine().split(\",\");\n a = Integer.parseInt(arr[0]);\n b = Integer.parseInt(arr[1]);\n \n temp = lot[a-1];\n lot[a-1] = lot[b-1];\n lot[b-1] = temp;\n }\n \n for(int i = 0; i < width; i ++){\n System.out.println(lot[i]);\n }\n \n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int width = Integer.parseInt(sc.nextLine());",
"width",
"Integer.parseInt(sc.nextLine())",
"Integer.parseInt",
"Integer",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int n = Integer.parseInt(sc.nextLine());",
"n",
"Integer.parseInt(sc.nextLine())",
"Integer.parseInt",
"Integer",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String[] arr;",
"arr",
"int a;",
"a",
"int b;",
"b",
"int[] lot = new int[width];",
"lot",
"new int[width]",
"width",
"for(int i = 0; i < width; i ++){\n lot[i] = i + 1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < width",
"i",
"width",
"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",
"int temp;",
"temp",
"for(int i = 0; i < n; i ++){\n arr = sc.nextLine().split(\",\");\n a = Integer.parseInt(arr[0]);\n b = Integer.parseInt(arr[1]);\n \n temp = lot[a-1];\n lot[a-1] = lot[b-1];\n lot[b-1] = temp;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i ++",
"i ++",
"i",
"{\n arr = sc.nextLine().split(\",\");\n a = Integer.parseInt(arr[0]);\n b = Integer.parseInt(arr[1]);\n \n temp = lot[a-1];\n lot[a-1] = lot[b-1];\n lot[b-1] = temp;\n }",
"{\n arr = sc.nextLine().split(\",\");\n a = Integer.parseInt(arr[0]);\n b = Integer.parseInt(arr[1]);\n \n temp = lot[a-1];\n lot[a-1] = lot[b-1];\n lot[b-1] = temp;\n }",
"arr = sc.nextLine().split(\",\")",
"arr",
"sc.nextLine().split(\",\")",
"sc.nextLine().split",
"sc.nextLine()",
"sc.nextLine",
"sc",
"\",\"",
"a = Integer.parseInt(arr[0])",
"a",
"Integer.parseInt(arr[0])",
"Integer.parseInt",
"Integer",
"arr[0]",
"arr",
"0",
"b = Integer.parseInt(arr[1])",
"b",
"Integer.parseInt(arr[1])",
"Integer.parseInt",
"Integer",
"arr[1]",
"arr",
"1",
"temp = lot[a-1]",
"temp",
"lot[a-1]",
"lot",
"a-1",
"a",
"1",
"lot[a-1] = lot[b-1]",
"lot[a-1]",
"lot",
"a-1",
"a",
"1",
"lot[b-1]",
"lot",
"b-1",
"b",
"1",
"lot[b-1] = temp",
"lot[b-1]",
"lot",
"b-1",
"b",
"1",
"temp",
"for(int i = 0; i < width; i ++){\n System.out.println(lot[i]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < width",
"i",
"width",
"i ++",
"i ++",
"i",
"{\n System.out.println(lot[i]);\n }",
"{\n System.out.println(lot[i]);\n }",
"System.out.println(lot[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"lot[i]",
"lot",
"i",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int width = Integer.parseInt(sc.nextLine());\n int n = Integer.parseInt(sc.nextLine());\n String[] arr;\n int a;\n int b;\n int[] lot = new int[width];\n for(int i = 0; i < width; i ++){\n lot[i] = i + 1;\n }\n \n int temp;\n \n for(int i = 0; i < n; i ++){\n arr = sc.nextLine().split(\",\");\n a = Integer.parseInt(arr[0]);\n b = Integer.parseInt(arr[1]);\n \n temp = lot[a-1];\n lot[a-1] = lot[b-1];\n lot[b-1] = temp;\n }\n \n for(int i = 0; i < width; i ++){\n System.out.println(lot[i]);\n }\n \n }//main\n}//class",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int width = Integer.parseInt(sc.nextLine());\n int n = Integer.parseInt(sc.nextLine());\n String[] arr;\n int a;\n int b;\n int[] lot = new int[width];\n for(int i = 0; i < width; i ++){\n lot[i] = i + 1;\n }\n \n int temp;\n \n for(int i = 0; i < n; i ++){\n arr = sc.nextLine().split(\",\");\n a = Integer.parseInt(arr[0]);\n b = Integer.parseInt(arr[1]);\n \n temp = lot[a-1];\n lot[a-1] = lot[b-1];\n lot[b-1] = temp;\n }\n \n for(int i = 0; i < width; i ++){\n System.out.println(lot[i]);\n }\n \n }//main\n}//class",
"Main"
] | import java.util.*;
import java.text.*;
/*
Main class for AOJ where there is no input.
*/
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int width = Integer.parseInt(sc.nextLine());
int n = Integer.parseInt(sc.nextLine());
String[] arr;
int a;
int b;
int[] lot = new int[width];
for(int i = 0; i < width; i ++){
lot[i] = i + 1;
}
int temp;
for(int i = 0; i < n; i ++){
arr = sc.nextLine().split(",");
a = Integer.parseInt(arr[0]);
b = Integer.parseInt(arr[1]);
temp = lot[a-1];
lot[a-1] = lot[b-1];
lot[b-1] = temp;
}
for(int i = 0; i < width; i ++){
System.out.println(lot[i]);
}
}//main
}//class |
[
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,
2,
13,
17,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
20,
41,
13,
17,
41,
13,
39,
17,
17,
41,
13,
39,
17,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
13,
17,
30,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
4,
18,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
2,
4,
18,
18,
13,
13,
13,
17,
4,
18,
13,
17,
2,
2,
4,
18,
18,
13,
13,
13,
17,
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,
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
],
[
233,
8
],
[
233,
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
],
[
46,
47
],
[
46,
48
],
[
11,
49
],
[
49,
50
],
[
50,
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
],
[
64,
70
],
[
70,
71
],
[
70,
72
],
[
64,
73
],
[
73,
74
],
[
73,
75
],
[
64,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
78,
80
],
[
64,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
83,
85
],
[
64,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
86,
96
],
[
96,
97
],
[
97,
98
],
[
86,
99
],
[
100,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
102,
107
],
[
101,
108
],
[
108,
109
],
[
109,
110
],
[
101,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
112,
116
],
[
116,
117
],
[
117,
118
],
[
116,
119
],
[
64,
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
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
142,
144
],
[
133,
145
],
[
145,
146
],
[
146,
147
],
[
133,
148
],
[
149,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
150,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
158,
159
],
[
158,
160
],
[
156,
161
],
[
155,
162
],
[
154,
163
],
[
163,
164
],
[
164,
165
],
[
163,
166
],
[
163,
167
],
[
168,
168
],
[
168,
169
],
[
169,
170
],
[
170,
171
],
[
171,
172
],
[
171,
173
],
[
168,
174
],
[
168,
175
],
[
64,
176
],
[
176,
177
],
[
176,
178
],
[
178,
179
],
[
178,
180
],
[
180,
181
],
[
181,
182
],
[
181,
183
],
[
180,
184
],
[
64,
185
],
[
185,
186
],
[
186,
187
],
[
186,
188
],
[
188,
189
],
[
189,
190
],
[
189,
191
],
[
188,
192
],
[
185,
193
],
[
193,
194
],
[
193,
195
],
[
195,
196
],
[
196,
197
],
[
196,
198
],
[
195,
199
],
[
64,
200
],
[
200,
201
],
[
201,
202
],
[
201,
203
],
[
203,
204
],
[
204,
205
],
[
204,
206
],
[
203,
207
],
[
200,
208
],
[
11,
209
],
[
209,
210
],
[
210,
211
],
[
211,
212
],
[
211,
213
],
[
209,
214
],
[
214,
215
],
[
214,
216
],
[
209,
217
],
[
217,
218
],
[
218,
219
],
[
209,
220
],
[
221,
221
],
[
221,
222
],
[
222,
223
],
[
223,
224
],
[
224,
225
],
[
224,
226
],
[
222,
227
],
[
227,
228
],
[
227,
229
],
[
9,
230
],
[
230,
231
],
[
0,
232
],
[
232,
233
],
[
232,
234
]
] | [
"import java.io.*;\nimport java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n Scanner sc= new Scanner(System.in);\n int w=sc.nextInt();\n int n=sc.nextInt();\n int amida[]=new int[w];\n for (int i=0;i<w;i++){\n amida[i]=i+1;\n }\n sc.nextLine();\n for (int i=0;i<n;i++){\n String s=sc.nextLine();\n Scanner kb=new Scanner(s);\n int count=0;\n String snum[]={\"\", \"\"};\n int num[]={0, 0};\n for (int j=0;j<s.length();j++){\n if (s.charAt(j)==','){\n count++;\n }\n else{\n snum[count]+=s.charAt(j);\n }\n }\n for (int j=0;j<2;j++){\n for (int k=0;k<snum[j].length();k++){\n num[j]+=(snum[j].charAt(k)-'0')*Math.pow(10, snum[j].length()-k-1);\n }\n }\n int hoge=amida[num[0]-1];\n amida[num[0]-1]=amida[num[1]-1];\n amida[num[1]-1]=hoge;\n }\n\n for (int i=0;i<w;i++){\n System.out.println(amida[i]);\n }\n }\n}",
"import java.io.*;",
"io.*",
"java",
"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 amida[]=new int[w];\n for (int i=0;i<w;i++){\n amida[i]=i+1;\n }\n sc.nextLine();\n for (int i=0;i<n;i++){\n String s=sc.nextLine();\n Scanner kb=new Scanner(s);\n int count=0;\n String snum[]={\"\", \"\"};\n int num[]={0, 0};\n for (int j=0;j<s.length();j++){\n if (s.charAt(j)==','){\n count++;\n }\n else{\n snum[count]+=s.charAt(j);\n }\n }\n for (int j=0;j<2;j++){\n for (int k=0;k<snum[j].length();k++){\n num[j]+=(snum[j].charAt(k)-'0')*Math.pow(10, snum[j].length()-k-1);\n }\n }\n int hoge=amida[num[0]-1];\n amida[num[0]-1]=amida[num[1]-1];\n amida[num[1]-1]=hoge;\n }\n\n for (int i=0;i<w;i++){\n System.out.println(amida[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 amida[]=new int[w];\n for (int i=0;i<w;i++){\n amida[i]=i+1;\n }\n sc.nextLine();\n for (int i=0;i<n;i++){\n String s=sc.nextLine();\n Scanner kb=new Scanner(s);\n int count=0;\n String snum[]={\"\", \"\"};\n int num[]={0, 0};\n for (int j=0;j<s.length();j++){\n if (s.charAt(j)==','){\n count++;\n }\n else{\n snum[count]+=s.charAt(j);\n }\n }\n for (int j=0;j<2;j++){\n for (int k=0;k<snum[j].length();k++){\n num[j]+=(snum[j].charAt(k)-'0')*Math.pow(10, snum[j].length()-k-1);\n }\n }\n int hoge=amida[num[0]-1];\n amida[num[0]-1]=amida[num[1]-1];\n amida[num[1]-1]=hoge;\n }\n\n for (int i=0;i<w;i++){\n System.out.println(amida[i]);\n }\n }",
"main",
"{\n Scanner sc= new Scanner(System.in);\n int w=sc.nextInt();\n int n=sc.nextInt();\n int amida[]=new int[w];\n for (int i=0;i<w;i++){\n amida[i]=i+1;\n }\n sc.nextLine();\n for (int i=0;i<n;i++){\n String s=sc.nextLine();\n Scanner kb=new Scanner(s);\n int count=0;\n String snum[]={\"\", \"\"};\n int num[]={0, 0};\n for (int j=0;j<s.length();j++){\n if (s.charAt(j)==','){\n count++;\n }\n else{\n snum[count]+=s.charAt(j);\n }\n }\n for (int j=0;j<2;j++){\n for (int k=0;k<snum[j].length();k++){\n num[j]+=(snum[j].charAt(k)-'0')*Math.pow(10, snum[j].length()-k-1);\n }\n }\n int hoge=amida[num[0]-1];\n amida[num[0]-1]=amida[num[1]-1];\n amida[num[1]-1]=hoge;\n }\n\n for (int i=0;i<w;i++){\n System.out.println(amida[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 amida[]=new int[w];",
"amida",
"new int[w]",
"w",
"for (int i=0;i<w;i++){\n amida[i]=i+1;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"{\n amida[i]=i+1;\n }",
"{\n amida[i]=i+1;\n }",
"amida[i]=i+1",
"amida[i]",
"amida",
"i",
"i+1",
"i",
"1",
"sc.nextLine()",
"sc.nextLine",
"sc",
"for (int i=0;i<n;i++){\n String s=sc.nextLine();\n Scanner kb=new Scanner(s);\n int count=0;\n String snum[]={\"\", \"\"};\n int num[]={0, 0};\n for (int j=0;j<s.length();j++){\n if (s.charAt(j)==','){\n count++;\n }\n else{\n snum[count]+=s.charAt(j);\n }\n }\n for (int j=0;j<2;j++){\n for (int k=0;k<snum[j].length();k++){\n num[j]+=(snum[j].charAt(k)-'0')*Math.pow(10, snum[j].length()-k-1);\n }\n }\n int hoge=amida[num[0]-1];\n amida[num[0]-1]=amida[num[1]-1];\n amida[num[1]-1]=hoge;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String s=sc.nextLine();\n Scanner kb=new Scanner(s);\n int count=0;\n String snum[]={\"\", \"\"};\n int num[]={0, 0};\n for (int j=0;j<s.length();j++){\n if (s.charAt(j)==','){\n count++;\n }\n else{\n snum[count]+=s.charAt(j);\n }\n }\n for (int j=0;j<2;j++){\n for (int k=0;k<snum[j].length();k++){\n num[j]+=(snum[j].charAt(k)-'0')*Math.pow(10, snum[j].length()-k-1);\n }\n }\n int hoge=amida[num[0]-1];\n amida[num[0]-1]=amida[num[1]-1];\n amida[num[1]-1]=hoge;\n }",
"{\n String s=sc.nextLine();\n Scanner kb=new Scanner(s);\n int count=0;\n String snum[]={\"\", \"\"};\n int num[]={0, 0};\n for (int j=0;j<s.length();j++){\n if (s.charAt(j)==','){\n count++;\n }\n else{\n snum[count]+=s.charAt(j);\n }\n }\n for (int j=0;j<2;j++){\n for (int k=0;k<snum[j].length();k++){\n num[j]+=(snum[j].charAt(k)-'0')*Math.pow(10, snum[j].length()-k-1);\n }\n }\n int hoge=amida[num[0]-1];\n amida[num[0]-1]=amida[num[1]-1];\n amida[num[1]-1]=hoge;\n }",
"String s=sc.nextLine();",
"s",
"sc.nextLine()",
"sc.nextLine",
"sc",
"Scanner kb=new Scanner(s);",
"kb",
"new Scanner(s)",
"int count=0;",
"count",
"0",
"String snum[]={\"\", \"\"};",
"snum",
"{\"\", \"\"}",
"\"\"",
"\"\"",
"int num[]={0, 0};",
"num",
"{0, 0}",
"0",
"0",
"for (int j=0;j<s.length();j++){\n if (s.charAt(j)==','){\n count++;\n }\n else{\n snum[count]+=s.charAt(j);\n }\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<s.length()",
"j",
"s.length()",
"s.length",
"s",
"j++",
"j++",
"j",
"{\n if (s.charAt(j)==','){\n count++;\n }\n else{\n snum[count]+=s.charAt(j);\n }\n }",
"{\n if (s.charAt(j)==','){\n count++;\n }\n else{\n snum[count]+=s.charAt(j);\n }\n }",
"if (s.charAt(j)==','){\n count++;\n }\n else{\n snum[count]+=s.charAt(j);\n }",
"s.charAt(j)==','",
"s.charAt(j)",
"s.charAt",
"s",
"j",
"','",
"{\n count++;\n }",
"count++",
"count",
"{\n snum[count]+=s.charAt(j);\n }",
"snum[count]+=s.charAt(j)",
"snum[count]",
"snum",
"count",
"s.charAt(j)",
"s.charAt",
"s",
"j",
"for (int j=0;j<2;j++){\n for (int k=0;k<snum[j].length();k++){\n num[j]+=(snum[j].charAt(k)-'0')*Math.pow(10, snum[j].length()-k-1);\n }\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<2",
"j",
"2",
"j++",
"j++",
"j",
"{\n for (int k=0;k<snum[j].length();k++){\n num[j]+=(snum[j].charAt(k)-'0')*Math.pow(10, snum[j].length()-k-1);\n }\n }",
"{\n for (int k=0;k<snum[j].length();k++){\n num[j]+=(snum[j].charAt(k)-'0')*Math.pow(10, snum[j].length()-k-1);\n }\n }",
"for (int k=0;k<snum[j].length();k++){\n num[j]+=(snum[j].charAt(k)-'0')*Math.pow(10, snum[j].length()-k-1);\n }",
"int k=0;",
"int k=0;",
"k",
"0",
"k<snum[j].length()",
"k",
"snum[j].length()",
"snum[j].length",
"snum[j]",
"snum",
"j",
"k++",
"k++",
"k",
"{\n num[j]+=(snum[j].charAt(k)-'0')*Math.pow(10, snum[j].length()-k-1);\n }",
"{\n num[j]+=(snum[j].charAt(k)-'0')*Math.pow(10, snum[j].length()-k-1);\n }",
"num[j]+=(snum[j].charAt(k)-'0')*Math.pow(10, snum[j].length()-k-1)",
"num[j]",
"num",
"j",
"(snum[j].charAt(k)-'0')*Math.pow(10, snum[j].length()-k-1)",
"(snum[j].charAt(k)-'0')",
"snum[j].charAt(k)",
"snum[j].charAt",
"snum[j]",
"snum",
"j",
"k",
"'0'",
"Math.pow(10, snum[j].length()-k-1)",
"Math.pow",
"Math",
"10",
"snum[j].length()-k-1",
"snum[j].length()-k-1",
"snum[j].length()",
"snum[j].length",
"snum[j]",
"snum",
"j",
"k",
"1",
"int hoge=amida[num[0]-1];",
"hoge",
"amida[num[0]-1]",
"amida",
"num[0]-1",
"num[0]",
"num",
"0",
"1",
"amida[num[0]-1]=amida[num[1]-1]",
"amida[num[0]-1]",
"amida",
"num[0]-1",
"num[0]",
"num",
"0",
"1",
"amida[num[1]-1]",
"amida",
"num[1]-1",
"num[1]",
"num",
"1",
"1",
"amida[num[1]-1]=hoge",
"amida[num[1]-1]",
"amida",
"num[1]-1",
"num[1]",
"num",
"1",
"1",
"hoge",
"for (int i=0;i<w;i++){\n System.out.println(amida[i]);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"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",
"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 amida[]=new int[w];\n for (int i=0;i<w;i++){\n amida[i]=i+1;\n }\n sc.nextLine();\n for (int i=0;i<n;i++){\n String s=sc.nextLine();\n Scanner kb=new Scanner(s);\n int count=0;\n String snum[]={\"\", \"\"};\n int num[]={0, 0};\n for (int j=0;j<s.length();j++){\n if (s.charAt(j)==','){\n count++;\n }\n else{\n snum[count]+=s.charAt(j);\n }\n }\n for (int j=0;j<2;j++){\n for (int k=0;k<snum[j].length();k++){\n num[j]+=(snum[j].charAt(k)-'0')*Math.pow(10, snum[j].length()-k-1);\n }\n }\n int hoge=amida[num[0]-1];\n amida[num[0]-1]=amida[num[1]-1];\n amida[num[1]-1]=hoge;\n }\n\n for (int i=0;i<w;i++){\n System.out.println(amida[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 amida[]=new int[w];\n for (int i=0;i<w;i++){\n amida[i]=i+1;\n }\n sc.nextLine();\n for (int i=0;i<n;i++){\n String s=sc.nextLine();\n Scanner kb=new Scanner(s);\n int count=0;\n String snum[]={\"\", \"\"};\n int num[]={0, 0};\n for (int j=0;j<s.length();j++){\n if (s.charAt(j)==','){\n count++;\n }\n else{\n snum[count]+=s.charAt(j);\n }\n }\n for (int j=0;j<2;j++){\n for (int k=0;k<snum[j].length();k++){\n num[j]+=(snum[j].charAt(k)-'0')*Math.pow(10, snum[j].length()-k-1);\n }\n }\n int hoge=amida[num[0]-1];\n amida[num[0]-1]=amida[num[1]-1];\n amida[num[1]-1]=hoge;\n }\n\n for (int i=0;i<w;i++){\n System.out.println(amida[i]);\n }\n }\n}",
"Main"
] | import java.io.*;
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 amida[]=new int[w];
for (int i=0;i<w;i++){
amida[i]=i+1;
}
sc.nextLine();
for (int i=0;i<n;i++){
String s=sc.nextLine();
Scanner kb=new Scanner(s);
int count=0;
String snum[]={"", ""};
int num[]={0, 0};
for (int j=0;j<s.length();j++){
if (s.charAt(j)==','){
count++;
}
else{
snum[count]+=s.charAt(j);
}
}
for (int j=0;j<2;j++){
for (int k=0;k<snum[j].length();k++){
num[j]+=(snum[j].charAt(k)-'0')*Math.pow(10, snum[j].length()-k-1);
}
}
int hoge=amida[num[0]-1];
amida[num[0]-1]=amida[num[1]-1];
amida[num[1]-1]=hoge;
}
for (int i=0;i<w;i++){
System.out.println(amida[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,
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,
18,
13,
13,
18,
13,
13,
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
],
[
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
],
[
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
],
[
90,
91
],
[
90,
92
],
[
58,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
96,
98
],
[
93,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
101,
103
],
[
58,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
107,
109
],
[
104,
110
],
[
8,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
111,
116
],
[
116,
117
],
[
116,
118
],
[
111,
119
],
[
119,
120
],
[
120,
121
],
[
111,
122
],
[
123,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
124,
129
],
[
129,
130
],
[
129,
131
],
[
6,
132
],
[
132,
133
],
[
0,
134
],
[
134,
135
],
[
134,
136
]
] | [
"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\tint[] s = new int[w];\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\ts[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString line = sc.next();\n\t\t\tString[] ss = line.split(\",\");\n\t\t\tint a = Integer.parseInt(ss[0]);\n\t\t\tint b = Integer.parseInt(ss[1]);\n\t\t\tint c = s[a - 1];\n\t\t\ts[a - 1] = s[b - 1];\n\t\t\ts[b - 1] = c;\n\t\t}\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\tSystem.out.println(s[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 n = sc.nextInt();\n\t\tint[] s = new int[w];\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\ts[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString line = sc.next();\n\t\t\tString[] ss = line.split(\",\");\n\t\t\tint a = Integer.parseInt(ss[0]);\n\t\t\tint b = Integer.parseInt(ss[1]);\n\t\t\tint c = s[a - 1];\n\t\t\ts[a - 1] = s[b - 1];\n\t\t\ts[b - 1] = c;\n\t\t}\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\tSystem.out.println(s[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[] s = new int[w];\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\ts[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString line = sc.next();\n\t\t\tString[] ss = line.split(\",\");\n\t\t\tint a = Integer.parseInt(ss[0]);\n\t\t\tint b = Integer.parseInt(ss[1]);\n\t\t\tint c = s[a - 1];\n\t\t\ts[a - 1] = s[b - 1];\n\t\t\ts[b - 1] = c;\n\t\t}\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\tSystem.out.println(s[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[] s = new int[w];\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\ts[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString line = sc.next();\n\t\t\tString[] ss = line.split(\",\");\n\t\t\tint a = Integer.parseInt(ss[0]);\n\t\t\tint b = Integer.parseInt(ss[1]);\n\t\t\tint c = s[a - 1];\n\t\t\ts[a - 1] = s[b - 1];\n\t\t\ts[b - 1] = c;\n\t\t}\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\tSystem.out.println(s[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[] s = new int[w];",
"s",
"new int[w]",
"w",
"for (int i = 0; i < w; i++) {\n\t\t\ts[i] = i + 1;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\ts[i] = i + 1;\n\t\t}",
"{\n\t\t\ts[i] = i + 1;\n\t\t}",
"s[i] = i + 1",
"s[i]",
"s",
"i",
"i + 1",
"i",
"1",
"for (int i = 0; i < n; i++) {\n\t\t\tString line = sc.next();\n\t\t\tString[] ss = line.split(\",\");\n\t\t\tint a = Integer.parseInt(ss[0]);\n\t\t\tint b = Integer.parseInt(ss[1]);\n\t\t\tint c = s[a - 1];\n\t\t\ts[a - 1] = s[b - 1];\n\t\t\ts[b - 1] = c;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString line = sc.next();\n\t\t\tString[] ss = line.split(\",\");\n\t\t\tint a = Integer.parseInt(ss[0]);\n\t\t\tint b = Integer.parseInt(ss[1]);\n\t\t\tint c = s[a - 1];\n\t\t\ts[a - 1] = s[b - 1];\n\t\t\ts[b - 1] = c;\n\t\t}",
"{\n\t\t\tString line = sc.next();\n\t\t\tString[] ss = line.split(\",\");\n\t\t\tint a = Integer.parseInt(ss[0]);\n\t\t\tint b = Integer.parseInt(ss[1]);\n\t\t\tint c = s[a - 1];\n\t\t\ts[a - 1] = s[b - 1];\n\t\t\ts[b - 1] = c;\n\t\t}",
"String line = sc.next();",
"line",
"sc.next()",
"sc.next",
"sc",
"String[] ss = line.split(\",\");",
"ss",
"line.split(\",\")",
"line.split",
"line",
"\",\"",
"int a = Integer.parseInt(ss[0]);",
"a",
"Integer.parseInt(ss[0])",
"Integer.parseInt",
"Integer",
"ss[0]",
"ss",
"0",
"int b = Integer.parseInt(ss[1]);",
"b",
"Integer.parseInt(ss[1])",
"Integer.parseInt",
"Integer",
"ss[1]",
"ss",
"1",
"int c = s[a - 1];",
"c",
"s[a - 1]",
"s",
"a - 1",
"a",
"1",
"s[a - 1] = s[b - 1]",
"s[a - 1]",
"s",
"a - 1",
"a",
"1",
"s[b - 1]",
"s",
"b - 1",
"b",
"1",
"s[b - 1] = c",
"s[b - 1]",
"s",
"b - 1",
"b",
"1",
"c",
"for (int i = 0; i < w; i++) {\n\t\t\tSystem.out.println(s[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(s[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(s[i]);\n\t\t}",
"System.out.println(s[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"s[i]",
"s",
"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\tint[] s = new int[w];\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\ts[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString line = sc.next();\n\t\t\tString[] ss = line.split(\",\");\n\t\t\tint a = Integer.parseInt(ss[0]);\n\t\t\tint b = Integer.parseInt(ss[1]);\n\t\t\tint c = s[a - 1];\n\t\t\ts[a - 1] = s[b - 1];\n\t\t\ts[b - 1] = c;\n\t\t}\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\tSystem.out.println(s[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 n = sc.nextInt();\n\t\tint[] s = new int[w];\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\ts[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString line = sc.next();\n\t\t\tString[] ss = line.split(\",\");\n\t\t\tint a = Integer.parseInt(ss[0]);\n\t\t\tint b = Integer.parseInt(ss[1]);\n\t\t\tint c = s[a - 1];\n\t\t\ts[a - 1] = s[b - 1];\n\t\t\ts[b - 1] = c;\n\t\t}\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\tSystem.out.println(s[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 n = sc.nextInt();
int[] s = new int[w];
for (int i = 0; i < w; i++) {
s[i] = i + 1;
}
for (int i = 0; i < n; i++) {
String line = sc.next();
String[] ss = line.split(",");
int a = Integer.parseInt(ss[0]);
int b = Integer.parseInt(ss[1]);
int c = s[a - 1];
s[a - 1] = s[b - 1];
s[b - 1] = c;
}
for (int i = 0; i < w; i++) {
System.out.println(s[i]);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
41,
13,
41,
13,
41,
13,
20,
13,
11,
1,
2,
13,
13,
30,
0,
18,
13,
13,
40,
13,
11,
1,
0,
13,
4,
18,
13,
4,
18,
13,
2,
40,
13,
17,
30,
30,
0,
13,
4,
18,
4,
18,
13,
17,
0,
13,
18,
13,
0,
13,
2,
20,
17,
0,
18,
13,
13,
18,
13,
0,
13,
2,
20,
17,
0,
18,
13,
13,
13,
28,
13,
13,
30,
4,
18,
18,
13,
13,
2,
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
],
[
8,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
8,
24
],
[
24,
25
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
8,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
40,
41
],
[
8,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
43,
49
],
[
49,
50
],
[
50,
51
],
[
42,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
42,
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
],
[
68,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
72,
74
],
[
57,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
83,
85
],
[
57,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
8,
91
],
[
91,
92
],
[
91,
93
],
[
91,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
95,
100
],
[
100,
101
],
[
100,
102
],
[
6,
103
],
[
103,
104
]
] | [
"import java.util.*;class Main{public static void main(String[]z){Scanner s=new Scanner(System.in);int t=s.nextInt(),i=0,a,b,c;int[]n=new int[t];for(;i<t;)n[i]=i++;for(t=s.nextInt(),s.nextLine();t-->0;){z=s.nextLine().split(\",\");c=n[a=new Integer(z[0])-1];n[a]=n[b=new Integer(z[1])-1];n[b]=c;}for(int e:n)System.out.println(e+1);}}",
"import java.util.*;",
"util.*",
"java",
"class Main{public static void main(String[]z){Scanner s=new Scanner(System.in);int t=s.nextInt(),i=0,a,b,c;int[]n=new int[t];for(;i<t;)n[i]=i++;for(t=s.nextInt(),s.nextLine();t-->0;){z=s.nextLine().split(\",\");c=n[a=new Integer(z[0])-1];n[a]=n[b=new Integer(z[1])-1];n[b]=c;}for(int e:n)System.out.println(e+1);}}",
"Main",
"public static void main(String[]z){Scanner s=new Scanner(System.in);int t=s.nextInt(),i=0,a,b,c;int[]n=new int[t];for(;i<t;)n[i]=i++;for(t=s.nextInt(),s.nextLine();t-->0;){z=s.nextLine().split(\",\");c=n[a=new Integer(z[0])-1];n[a]=n[b=new Integer(z[1])-1];n[b]=c;}for(int e:n)System.out.println(e+1);}",
"main",
"{Scanner s=new Scanner(System.in);int t=s.nextInt(),i=0,a,b,c;int[]n=new int[t];for(;i<t;)n[i]=i++;for(t=s.nextInt(),s.nextLine();t-->0;){z=s.nextLine().split(\",\");c=n[a=new Integer(z[0])-1];n[a]=n[b=new Integer(z[1])-1];n[b]=c;}for(int e:n)System.out.println(e+1);}",
"Scanner s=new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"int t=s.nextInt()",
"t",
"s.nextInt()",
"s.nextInt",
"s",
"i=0",
"i",
"0",
"a",
"a",
"b",
"b",
"c;",
"c",
"int[]n=new int[t];",
"n",
"new int[t]",
"t",
"for(;i<t;)n[i]=i++;",
";",
"i<t",
"i",
"t",
"n[i]=i++;",
"n[i]=i++",
"n[i]",
"n",
"i",
"i++",
"i",
"for(t=s.nextInt(),s.nextLine();t-->0;){z=s.nextLine().split(\",\");c=n[a=new Integer(z[0])-1];n[a]=n[b=new Integer(z[1])-1];n[b]=c;}",
"t=s.nextInt(),s.nextLine();",
"t=s.nextInt()",
"t",
"s.nextInt()",
"s.nextInt",
"s",
"s.nextLine()",
"s.nextLine",
"s",
"t-->0",
"t--",
"t",
"0",
"{z=s.nextLine().split(\",\");c=n[a=new Integer(z[0])-1];n[a]=n[b=new Integer(z[1])-1];n[b]=c;}",
"{z=s.nextLine().split(\",\");c=n[a=new Integer(z[0])-1];n[a]=n[b=new Integer(z[1])-1];n[b]=c;}",
"z=s.nextLine().split(\",\")",
"z",
"s.nextLine().split(\",\")",
"s.nextLine().split",
"s.nextLine()",
"s.nextLine",
"s",
"\",\"",
"c=n[a=new Integer(z[0])-1]",
"c",
"n[a=new Integer(z[0])-1]",
"n",
"a=new Integer(z[0])-1",
"a",
"new Integer(z[0])-1",
"new Integer(z[0])",
"1",
"n[a]=n[b=new Integer(z[1])-1]",
"n[a]",
"n",
"a",
"n[b=new Integer(z[1])-1]",
"n",
"b=new Integer(z[1])-1",
"b",
"new Integer(z[1])-1",
"new Integer(z[1])",
"1",
"n[b]=c",
"n[b]",
"n",
"b",
"c",
"for(int e:n)System.out.println(e+1);",
"int e",
"n",
"System.out.println(e+1);",
"System.out.println(e+1)",
"System.out.println",
"System.out",
"System",
"System.out",
"e+1",
"e",
"1",
"String[]z",
"z"
] | import java.util.*;class Main{public static void main(String[]z){Scanner s=new Scanner(System.in);int t=s.nextInt(),i=0,a,b,c;int[]n=new int[t];for(;i<t;)n[i]=i++;for(t=s.nextInt(),s.nextLine();t-->0;){z=s.nextLine().split(",");c=n[a=new Integer(z[0])-1];n[a]=n[b=new Integer(z[1])-1];n[b]=c;}for(int e:n)System.out.println(e+1);}} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
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,
4,
13,
13,
2,
13,
17,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
4,
18,
13,
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
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
20,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
20,
34
],
[
34,
35
],
[
34,
36
],
[
20,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
42,
43
],
[
42,
44
],
[
37,
45
],
[
45,
46
],
[
46,
47
],
[
37,
48
],
[
49,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
20,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
20,
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
],
[
71,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
71,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
88,
89
],
[
88,
90
],
[
71,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
96,
97
],
[
96,
98
],
[
71,
99
],
[
99,
100
],
[
99,
101
],
[
99,
102
],
[
102,
103
],
[
102,
104
],
[
99,
105
],
[
105,
106
],
[
105,
107
],
[
20,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
108,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
116,
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
],
[
129,
130
],
[
128,
131
],
[
18,
132
],
[
132,
133
]
] | [
"import java.io.IOException;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\n\nimport static java.util.Collections.swap;\n\n/**\n * Wrong Answer\n */\nclass Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tScanner in = new Scanner(System.in);\n\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\n\t\tList<Integer> ans = new ArrayList<Integer>();\n\t\tfor(int i=1;i<=w;i++) {\n\t\t\tans.add(i);\n\t\t}\n\n\t\tString buf = in.nextLine();\n\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tString line = in.nextLine();\n\t\t\tString arr[] = line.split(\",\");\n\t\t\tint a = Integer.parseInt(arr[0]);\n\t\t\tint b = Integer.parseInt(arr[1]);\n\t\t\tswap(ans, a-1, b-1);\n\t\t}\n\t\tfor(int i=0;i<ans.size();i++) {\n\t\t\tSystem.out.println(ans.get(i));\n\t\t}\n\t}\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import static java.util.Collections.swap;",
"import static java.util.Collections.swap;",
"import static java.util.Collections.swap;",
"class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tScanner in = new Scanner(System.in);\n\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\n\t\tList<Integer> ans = new ArrayList<Integer>();\n\t\tfor(int i=1;i<=w;i++) {\n\t\t\tans.add(i);\n\t\t}\n\n\t\tString buf = in.nextLine();\n\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tString line = in.nextLine();\n\t\t\tString arr[] = line.split(\",\");\n\t\t\tint a = Integer.parseInt(arr[0]);\n\t\t\tint b = Integer.parseInt(arr[1]);\n\t\t\tswap(ans, a-1, b-1);\n\t\t}\n\t\tfor(int i=0;i<ans.size();i++) {\n\t\t\tSystem.out.println(ans.get(i));\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\t\tScanner in = new Scanner(System.in);\n\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\n\t\tList<Integer> ans = new ArrayList<Integer>();\n\t\tfor(int i=1;i<=w;i++) {\n\t\t\tans.add(i);\n\t\t}\n\n\t\tString buf = in.nextLine();\n\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tString line = in.nextLine();\n\t\t\tString arr[] = line.split(\",\");\n\t\t\tint a = Integer.parseInt(arr[0]);\n\t\t\tint b = Integer.parseInt(arr[1]);\n\t\t\tswap(ans, a-1, b-1);\n\t\t}\n\t\tfor(int i=0;i<ans.size();i++) {\n\t\t\tSystem.out.println(ans.get(i));\n\t\t}\n\t}",
"main",
"{\n\t\tScanner in = new Scanner(System.in);\n\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\n\t\tList<Integer> ans = new ArrayList<Integer>();\n\t\tfor(int i=1;i<=w;i++) {\n\t\t\tans.add(i);\n\t\t}\n\n\t\tString buf = in.nextLine();\n\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tString line = in.nextLine();\n\t\t\tString arr[] = line.split(\",\");\n\t\t\tint a = Integer.parseInt(arr[0]);\n\t\t\tint b = Integer.parseInt(arr[1]);\n\t\t\tswap(ans, a-1, b-1);\n\t\t}\n\t\tfor(int i=0;i<ans.size();i++) {\n\t\t\tSystem.out.println(ans.get(i));\n\t\t}\n\t}",
"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",
"List<Integer> ans = new ArrayList<Integer>();",
"ans",
"new ArrayList<Integer>()",
"for(int i=1;i<=w;i++) {\n\t\t\tans.add(i);\n\t\t}",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tans.add(i);\n\t\t}",
"{\n\t\t\tans.add(i);\n\t\t}",
"ans.add(i)",
"ans.add",
"ans",
"i",
"String buf = in.nextLine();",
"buf",
"in.nextLine()",
"in.nextLine",
"in",
"for(int i=0;i<n;i++) {\n\t\t\tString line = in.nextLine();\n\t\t\tString arr[] = line.split(\",\");\n\t\t\tint a = Integer.parseInt(arr[0]);\n\t\t\tint b = Integer.parseInt(arr[1]);\n\t\t\tswap(ans, a-1, b-1);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString line = in.nextLine();\n\t\t\tString arr[] = line.split(\",\");\n\t\t\tint a = Integer.parseInt(arr[0]);\n\t\t\tint b = Integer.parseInt(arr[1]);\n\t\t\tswap(ans, a-1, b-1);\n\t\t}",
"{\n\t\t\tString line = in.nextLine();\n\t\t\tString arr[] = line.split(\",\");\n\t\t\tint a = Integer.parseInt(arr[0]);\n\t\t\tint b = Integer.parseInt(arr[1]);\n\t\t\tswap(ans, a-1, b-1);\n\t\t}",
"String line = in.nextLine();",
"line",
"in.nextLine()",
"in.nextLine",
"in",
"String arr[] = line.split(\",\");",
"arr",
"line.split(\",\")",
"line.split",
"line",
"\",\"",
"int a = Integer.parseInt(arr[0]);",
"a",
"Integer.parseInt(arr[0])",
"Integer.parseInt",
"Integer",
"arr[0]",
"arr",
"0",
"int b = Integer.parseInt(arr[1]);",
"b",
"Integer.parseInt(arr[1])",
"Integer.parseInt",
"Integer",
"arr[1]",
"arr",
"1",
"swap(ans, a-1, b-1)",
"swap",
"ans",
"a-1",
"a",
"1",
"b-1",
"b",
"1",
"for(int i=0;i<ans.size();i++) {\n\t\t\tSystem.out.println(ans.get(i));\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<ans.size()",
"i",
"ans.size()",
"ans.size",
"ans",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(ans.get(i));\n\t\t}",
"{\n\t\t\tSystem.out.println(ans.get(i));\n\t\t}",
"System.out.println(ans.get(i))",
"System.out.println",
"System.out",
"System",
"System.out",
"ans.get(i)",
"ans.get",
"ans",
"i",
"String[] args",
"args"
] | import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import static java.util.Collections.swap;
/**
* Wrong Answer
*/
class Main {
public static void main(String[] args) throws IOException {
Scanner in = new Scanner(System.in);
int w = in.nextInt();
int n = in.nextInt();
List<Integer> ans = new ArrayList<Integer>();
for(int i=1;i<=w;i++) {
ans.add(i);
}
String buf = in.nextLine();
for(int i=0;i<n;i++) {
String line = in.nextLine();
String arr[] = line.split(",");
int a = Integer.parseInt(arr[0]);
int b = Integer.parseInt(arr[1]);
swap(ans, a-1, b-1);
}
for(int i=0;i<ans.size();i++) {
System.out.println(ans.get(i));
}
}
} |
[
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,
0,
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,
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,
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,
17,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
136,
5
],
[
136,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
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
],
[
35,
36
],
[
35,
37
],
[
8,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
43,
44
],
[
43,
45
],
[
38,
46
],
[
46,
47
],
[
47,
48
],
[
38,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
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
],
[
75,
78
],
[
67,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
84,
85
],
[
84,
86
],
[
67,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
92,
93
],
[
92,
94
],
[
67,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
97,
99
],
[
67,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
104
],
[
104,
105
],
[
104,
106
],
[
67,
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
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
124,
129
],
[
124,
130
],
[
130,
131
],
[
130,
132
],
[
6,
133
],
[
133,
134
],
[
0,
135
],
[
135,
136
],
[
135,
137
]
] | [
"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,n;\n\t\tint a,b;\n\t\tint[] d;\n\t\tw=sc.nextInt();\n\t\tn=sc.nextInt();\n\t\td=new int[w+1];\n\t\tfor(int i=1;i<=w;i++)d[i]=i;\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\ta=Integer.parseInt(ab[0]);\n\t\t\tb=Integer.parseInt(ab[1]);\n\t\t\tint t=d[a];\n\t\t\td[a]=d[b];\n\t\t\td[b]=t;\n\n\t\t}\n\t\tfor(int i=1;i<=w;i++)System.out.printf(\"%d\\n\",d[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,n;\n\t\tint a,b;\n\t\tint[] d;\n\t\tw=sc.nextInt();\n\t\tn=sc.nextInt();\n\t\td=new int[w+1];\n\t\tfor(int i=1;i<=w;i++)d[i]=i;\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\ta=Integer.parseInt(ab[0]);\n\t\t\tb=Integer.parseInt(ab[1]);\n\t\t\tint t=d[a];\n\t\t\td[a]=d[b];\n\t\t\td[b]=t;\n\n\t\t}\n\t\tfor(int i=1;i<=w;i++)System.out.printf(\"%d\\n\",d[i]);\n\t}\n}",
"Main",
"public static void main(String args[]){\n\t\tScanner sc=new Scanner(System.in);\n\t\tint w,n;\n\t\tint a,b;\n\t\tint[] d;\n\t\tw=sc.nextInt();\n\t\tn=sc.nextInt();\n\t\td=new int[w+1];\n\t\tfor(int i=1;i<=w;i++)d[i]=i;\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\ta=Integer.parseInt(ab[0]);\n\t\t\tb=Integer.parseInt(ab[1]);\n\t\t\tint t=d[a];\n\t\t\td[a]=d[b];\n\t\t\td[b]=t;\n\n\t\t}\n\t\tfor(int i=1;i<=w;i++)System.out.printf(\"%d\\n\",d[i]);\n\t}",
"main",
"{\n\t\tScanner sc=new Scanner(System.in);\n\t\tint w,n;\n\t\tint a,b;\n\t\tint[] d;\n\t\tw=sc.nextInt();\n\t\tn=sc.nextInt();\n\t\td=new int[w+1];\n\t\tfor(int i=1;i<=w;i++)d[i]=i;\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\ta=Integer.parseInt(ab[0]);\n\t\t\tb=Integer.parseInt(ab[1]);\n\t\t\tint t=d[a];\n\t\t\td[a]=d[b];\n\t\t\td[b]=t;\n\n\t\t}\n\t\tfor(int i=1;i<=w;i++)System.out.printf(\"%d\\n\",d[i]);\n\t}",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w",
"w",
"n;",
"n",
"int a",
"a",
"b;",
"b",
"int[] d;",
"d",
"w=sc.nextInt()",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"n=sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"d=new int[w+1]",
"d",
"new int[w+1]",
"w+1",
"w",
"1",
"for(int i=1;i<=w;i++)d[i]=i;",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=w",
"i",
"w",
"i++",
"i++",
"i",
"d[i]=i;",
"d[i]=i",
"d[i]",
"d",
"i",
"i",
"for(int i=0;i<n;i++){\n\t\t\tString str=sc.next();\n\t\t\tString[] ab=str.split(\",\");\n\t\t\ta=Integer.parseInt(ab[0]);\n\t\t\tb=Integer.parseInt(ab[1]);\n\t\t\tint t=d[a];\n\t\t\td[a]=d[b];\n\t\t\td[b]=t;\n\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\ta=Integer.parseInt(ab[0]);\n\t\t\tb=Integer.parseInt(ab[1]);\n\t\t\tint t=d[a];\n\t\t\td[a]=d[b];\n\t\t\td[b]=t;\n\n\t\t}",
"{\n\t\t\tString str=sc.next();\n\t\t\tString[] ab=str.split(\",\");\n\t\t\ta=Integer.parseInt(ab[0]);\n\t\t\tb=Integer.parseInt(ab[1]);\n\t\t\tint t=d[a];\n\t\t\td[a]=d[b];\n\t\t\td[b]=t;\n\n\t\t}",
"String str=sc.next();",
"str",
"sc.next()",
"sc.next",
"sc",
"String[] ab=str.split(\",\");",
"ab",
"str.split(\",\")",
"str.split",
"str",
"\",\"",
"a=Integer.parseInt(ab[0])",
"a",
"Integer.parseInt(ab[0])",
"Integer.parseInt",
"Integer",
"ab[0]",
"ab",
"0",
"b=Integer.parseInt(ab[1])",
"b",
"Integer.parseInt(ab[1])",
"Integer.parseInt",
"Integer",
"ab[1]",
"ab",
"1",
"int t=d[a];",
"t",
"d[a]",
"d",
"a",
"d[a]=d[b]",
"d[a]",
"d",
"a",
"d[b]",
"d",
"b",
"d[b]=t",
"d[b]",
"d",
"b",
"t",
"for(int i=1;i<=w;i++)System.out.printf(\"%d\\n\",d[i]);",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=w",
"i",
"w",
"i++",
"i++",
"i",
"System.out.printf(\"%d\\n\",d[i]);",
"System.out.printf(\"%d\\n\",d[i])",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%d\\n\"",
"d[i]",
"d",
"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,n;\n\t\tint a,b;\n\t\tint[] d;\n\t\tw=sc.nextInt();\n\t\tn=sc.nextInt();\n\t\td=new int[w+1];\n\t\tfor(int i=1;i<=w;i++)d[i]=i;\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\ta=Integer.parseInt(ab[0]);\n\t\t\tb=Integer.parseInt(ab[1]);\n\t\t\tint t=d[a];\n\t\t\td[a]=d[b];\n\t\t\td[b]=t;\n\n\t\t}\n\t\tfor(int i=1;i<=w;i++)System.out.printf(\"%d\\n\",d[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,n;\n\t\tint a,b;\n\t\tint[] d;\n\t\tw=sc.nextInt();\n\t\tn=sc.nextInt();\n\t\td=new int[w+1];\n\t\tfor(int i=1;i<=w;i++)d[i]=i;\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\ta=Integer.parseInt(ab[0]);\n\t\t\tb=Integer.parseInt(ab[1]);\n\t\t\tint t=d[a];\n\t\t\td[a]=d[b];\n\t\t\td[b]=t;\n\n\t\t}\n\t\tfor(int i=1;i<=w;i++)System.out.printf(\"%d\\n\",d[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,n;
int a,b;
int[] d;
w=sc.nextInt();
n=sc.nextInt();
d=new int[w+1];
for(int i=1;i<=w;i++)d[i]=i;
for(int i=0;i<n;i++){
String str=sc.next();
String[] ab=str.split(",");
a=Integer.parseInt(ab[0]);
b=Integer.parseInt(ab[1]);
int t=d[a];
d[a]=d[b];
d[b]=t;
}
for(int i=1;i<=w;i++)System.out.printf("%d\n",d[i]);
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
41,
13,
41,
13,
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,
0,
13,
20,
2,
13,
17,
41,
13,
41,
13,
20,
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,
0,
13,
4,
18,
13,
0,
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,
29,
17,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
163,
5
],
[
163,
6
],
[
6,
7
],
[
6,
8
],
[
163,
9
],
[
9,
10
],
[
163,
11
],
[
11,
12
],
[
163,
13
],
[
13,
14
],
[
163,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
18,
21
],
[
21,
22
],
[
22,
23
],
[
15,
24
],
[
24,
25
],
[
163,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
29,
34
],
[
34,
35
],
[
28,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
28,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
28,
46
],
[
46,
47
],
[
46,
48
],
[
49,
50
],
[
49,
51
],
[
28,
52
],
[
52,
53
],
[
28,
54
],
[
54,
55
],
[
54,
56
],
[
28,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
65,
67
],
[
58,
68
],
[
68,
69
],
[
69,
70
],
[
58,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
28,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
82,
83
],
[
82,
84
],
[
77,
85
],
[
85,
86
],
[
86,
87
],
[
77,
88
],
[
89,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
89,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
89,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
106,
107
],
[
106,
108
],
[
89,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
112,
113
],
[
111,
114
],
[
114,
115
],
[
114,
116
],
[
89,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
119,
121
],
[
89,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
122,
126
],
[
126,
127
],
[
126,
128
],
[
89,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
129,
133
],
[
28,
134
],
[
134,
135
],
[
163,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
139,
144
],
[
144,
145
],
[
144,
146
],
[
146,
147
],
[
146,
148
],
[
139,
149
],
[
149,
150
],
[
150,
151
],
[
139,
152
],
[
153,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
154,
159
],
[
159,
160
],
[
159,
161
],
[
0,
162
],
[
162,
163
],
[
162,
164
]
] | [
"import java.util.*;\npublic class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tstatic int w, h;\n\tstatic int[]amida;\n\tpublic static void main(String[] args) {\n\t\twhile(read()){\n\t\t\tsolve();\n\t\t}\n\t}\n\tstatic boolean read(){\n\t\tif(!sc.hasNext())return false;\n\t\tw = sc.nextInt(); h = sc.nextInt();\n\t\tamida = new int[w+1];\n\t\tString line;\n\t\tString[] devide = new String[2];\n\t\tfor(int i = 1; i < w+1; i++)\n\t\t\tamida[i] = i;\n\t\tfor(int i = 0; i < h; i++){\n\t\t\tline = sc.next();\n\t\t\tdevide = line.split(\",\");\n\t\t\tint exIndex1 = Integer.parseInt(devide[0]);\n\t\t\tint exIndex2 = Integer.parseInt(devide[1]);\n\t\t\tint temp = amida[exIndex1];\n\t\t\tamida[exIndex1] = amida[exIndex2];\n\t\t\tamida[exIndex2] = temp;\n\t\t}\n\t\treturn true;\n\t}\n\tstatic void solve(){\n\t\tfor(int i = 1; i < w+1; i++){\n\t\t\tSystem.out.println(amida[i]);\n\t\t}\n\t}\n\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tstatic int w, h;\n\tstatic int[]amida;\n\tpublic static void main(String[] args) {\n\t\twhile(read()){\n\t\t\tsolve();\n\t\t}\n\t}\n\tstatic boolean read(){\n\t\tif(!sc.hasNext())return false;\n\t\tw = sc.nextInt(); h = sc.nextInt();\n\t\tamida = new int[w+1];\n\t\tString line;\n\t\tString[] devide = new String[2];\n\t\tfor(int i = 1; i < w+1; i++)\n\t\t\tamida[i] = i;\n\t\tfor(int i = 0; i < h; i++){\n\t\t\tline = sc.next();\n\t\t\tdevide = line.split(\",\");\n\t\t\tint exIndex1 = Integer.parseInt(devide[0]);\n\t\t\tint exIndex2 = Integer.parseInt(devide[1]);\n\t\t\tint temp = amida[exIndex1];\n\t\t\tamida[exIndex1] = amida[exIndex2];\n\t\t\tamida[exIndex2] = temp;\n\t\t}\n\t\treturn true;\n\t}\n\tstatic void solve(){\n\t\tfor(int i = 1; i < w+1; i++){\n\t\t\tSystem.out.println(amida[i]);\n\t\t}\n\t}\n\n}",
"Main",
"static Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"static int w",
"w",
"h;",
"h",
"static int[]amida;",
"amida",
"public static void main(String[] args) {\n\t\twhile(read()){\n\t\t\tsolve();\n\t\t}\n\t}",
"main",
"{\n\t\twhile(read()){\n\t\t\tsolve();\n\t\t}\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",
"static boolean read(){\n\t\tif(!sc.hasNext())return false;\n\t\tw = sc.nextInt(); h = sc.nextInt();\n\t\tamida = new int[w+1];\n\t\tString line;\n\t\tString[] devide = new String[2];\n\t\tfor(int i = 1; i < w+1; i++)\n\t\t\tamida[i] = i;\n\t\tfor(int i = 0; i < h; i++){\n\t\t\tline = sc.next();\n\t\t\tdevide = line.split(\",\");\n\t\t\tint exIndex1 = Integer.parseInt(devide[0]);\n\t\t\tint exIndex2 = Integer.parseInt(devide[1]);\n\t\t\tint temp = amida[exIndex1];\n\t\t\tamida[exIndex1] = amida[exIndex2];\n\t\t\tamida[exIndex2] = temp;\n\t\t}\n\t\treturn true;\n\t}",
"read",
"{\n\t\tif(!sc.hasNext())return false;\n\t\tw = sc.nextInt(); h = sc.nextInt();\n\t\tamida = new int[w+1];\n\t\tString line;\n\t\tString[] devide = new String[2];\n\t\tfor(int i = 1; i < w+1; i++)\n\t\t\tamida[i] = i;\n\t\tfor(int i = 0; i < h; i++){\n\t\t\tline = sc.next();\n\t\t\tdevide = line.split(\",\");\n\t\t\tint exIndex1 = Integer.parseInt(devide[0]);\n\t\t\tint exIndex2 = Integer.parseInt(devide[1]);\n\t\t\tint temp = amida[exIndex1];\n\t\t\tamida[exIndex1] = amida[exIndex2];\n\t\t\tamida[exIndex2] = temp;\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",
"h = sc.nextInt()",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"amida = new int[w+1]",
"amida",
"new int[w+1]",
"w+1",
"w",
"1",
"String line;",
"line",
"String[] devide = new String[2];",
"devide",
"new String[2]",
"2",
"for(int i = 1; i < w+1; i++)\n\t\t\tamida[i] = i;",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < w+1",
"i",
"w+1",
"w",
"1",
"i++",
"i++",
"i",
"amida[i] = i;",
"amida[i] = i",
"amida[i]",
"amida",
"i",
"i",
"for(int i = 0; i < h; i++){\n\t\t\tline = sc.next();\n\t\t\tdevide = line.split(\",\");\n\t\t\tint exIndex1 = Integer.parseInt(devide[0]);\n\t\t\tint exIndex2 = Integer.parseInt(devide[1]);\n\t\t\tint temp = amida[exIndex1];\n\t\t\tamida[exIndex1] = amida[exIndex2];\n\t\t\tamida[exIndex2] = temp;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < h",
"i",
"h",
"i++",
"i++",
"i",
"{\n\t\t\tline = sc.next();\n\t\t\tdevide = line.split(\",\");\n\t\t\tint exIndex1 = Integer.parseInt(devide[0]);\n\t\t\tint exIndex2 = Integer.parseInt(devide[1]);\n\t\t\tint temp = amida[exIndex1];\n\t\t\tamida[exIndex1] = amida[exIndex2];\n\t\t\tamida[exIndex2] = temp;\n\t\t}",
"{\n\t\t\tline = sc.next();\n\t\t\tdevide = line.split(\",\");\n\t\t\tint exIndex1 = Integer.parseInt(devide[0]);\n\t\t\tint exIndex2 = Integer.parseInt(devide[1]);\n\t\t\tint temp = amida[exIndex1];\n\t\t\tamida[exIndex1] = amida[exIndex2];\n\t\t\tamida[exIndex2] = temp;\n\t\t}",
"line = sc.next()",
"line",
"sc.next()",
"sc.next",
"sc",
"devide = line.split(\",\")",
"devide",
"line.split(\",\")",
"line.split",
"line",
"\",\"",
"int exIndex1 = Integer.parseInt(devide[0]);",
"exIndex1",
"Integer.parseInt(devide[0])",
"Integer.parseInt",
"Integer",
"devide[0]",
"devide",
"0",
"int exIndex2 = Integer.parseInt(devide[1]);",
"exIndex2",
"Integer.parseInt(devide[1])",
"Integer.parseInt",
"Integer",
"devide[1]",
"devide",
"1",
"int temp = amida[exIndex1];",
"temp",
"amida[exIndex1]",
"amida",
"exIndex1",
"amida[exIndex1] = amida[exIndex2]",
"amida[exIndex1]",
"amida",
"exIndex1",
"amida[exIndex2]",
"amida",
"exIndex2",
"amida[exIndex2] = temp",
"amida[exIndex2]",
"amida",
"exIndex2",
"temp",
"return true;",
"true",
"static void solve(){\n\t\tfor(int i = 1; i < w+1; i++){\n\t\t\tSystem.out.println(amida[i]);\n\t\t}\n\t}",
"solve",
"{\n\t\tfor(int i = 1; i < w+1; i++){\n\t\t\tSystem.out.println(amida[i]);\n\t\t}\n\t}",
"for(int i = 1; i < w+1; i++){\n\t\t\tSystem.out.println(amida[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(amida[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(amida[i]);\n\t\t}",
"System.out.println(amida[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"amida[i]",
"amida",
"i",
"public class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tstatic int w, h;\n\tstatic int[]amida;\n\tpublic static void main(String[] args) {\n\t\twhile(read()){\n\t\t\tsolve();\n\t\t}\n\t}\n\tstatic boolean read(){\n\t\tif(!sc.hasNext())return false;\n\t\tw = sc.nextInt(); h = sc.nextInt();\n\t\tamida = new int[w+1];\n\t\tString line;\n\t\tString[] devide = new String[2];\n\t\tfor(int i = 1; i < w+1; i++)\n\t\t\tamida[i] = i;\n\t\tfor(int i = 0; i < h; i++){\n\t\t\tline = sc.next();\n\t\t\tdevide = line.split(\",\");\n\t\t\tint exIndex1 = Integer.parseInt(devide[0]);\n\t\t\tint exIndex2 = Integer.parseInt(devide[1]);\n\t\t\tint temp = amida[exIndex1];\n\t\t\tamida[exIndex1] = amida[exIndex2];\n\t\t\tamida[exIndex2] = temp;\n\t\t}\n\t\treturn true;\n\t}\n\tstatic void solve(){\n\t\tfor(int i = 1; i < w+1; i++){\n\t\t\tSystem.out.println(amida[i]);\n\t\t}\n\t}\n\n}",
"public class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tstatic int w, h;\n\tstatic int[]amida;\n\tpublic static void main(String[] args) {\n\t\twhile(read()){\n\t\t\tsolve();\n\t\t}\n\t}\n\tstatic boolean read(){\n\t\tif(!sc.hasNext())return false;\n\t\tw = sc.nextInt(); h = sc.nextInt();\n\t\tamida = new int[w+1];\n\t\tString line;\n\t\tString[] devide = new String[2];\n\t\tfor(int i = 1; i < w+1; i++)\n\t\t\tamida[i] = i;\n\t\tfor(int i = 0; i < h; i++){\n\t\t\tline = sc.next();\n\t\t\tdevide = line.split(\",\");\n\t\t\tint exIndex1 = Integer.parseInt(devide[0]);\n\t\t\tint exIndex2 = Integer.parseInt(devide[1]);\n\t\t\tint temp = amida[exIndex1];\n\t\t\tamida[exIndex1] = amida[exIndex2];\n\t\t\tamida[exIndex2] = temp;\n\t\t}\n\t\treturn true;\n\t}\n\tstatic void solve(){\n\t\tfor(int i = 1; i < w+1; i++){\n\t\t\tSystem.out.println(amida[i]);\n\t\t}\n\t}\n\n}",
"Main"
] | import java.util.*;
public class Main {
static Scanner sc = new Scanner(System.in);
static int w, h;
static int[]amida;
public static void main(String[] args) {
while(read()){
solve();
}
}
static boolean read(){
if(!sc.hasNext())return false;
w = sc.nextInt(); h = sc.nextInt();
amida = new int[w+1];
String line;
String[] devide = new String[2];
for(int i = 1; i < w+1; i++)
amida[i] = i;
for(int i = 0; i < h; i++){
line = sc.next();
devide = line.split(",");
int exIndex1 = Integer.parseInt(devide[0]);
int exIndex2 = Integer.parseInt(devide[1]);
int temp = amida[exIndex1];
amida[exIndex1] = amida[exIndex2];
amida[exIndex2] = temp;
}
return true;
}
static void solve(){
for(int i = 1; i < w+1; i++){
System.out.println(amida[i]);
}
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
12,
13,
30,
41,
13,
4,
18,
20,
4,
18,
13,
17,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
40,
13,
0,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
13,
41,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
4,
18,
13,
17,
4,
13,
4,
18,
13,
18,
13,
17,
4,
18,
13,
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,
0,
18,
13,
13,
2,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
23,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
147,
5
],
[
147,
6
],
[
6,
7
],
[
147,
8
],
[
8,
9
],
[
8,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
13,
14
],
[
14,
15
],
[
13,
16
],
[
16,
17
],
[
17,
18
],
[
16,
19
],
[
10,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
10,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
10,
30
],
[
30,
31
],
[
10,
32
],
[
32,
33
],
[
32,
34
],
[
10,
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
],
[
10,
54
],
[
54,
55
],
[
10,
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
],
[
80,
81
],
[
79,
82
],
[
82,
83
],
[
82,
84
],
[
77,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
88,
89
],
[
88,
90
],
[
10,
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
],
[
104,
109
],
[
109,
110
],
[
109,
111
],
[
8,
112
],
[
112,
113
],
[
147,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
117,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
121,
125
],
[
125,
126
],
[
125,
127
],
[
116,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
128,
132
],
[
132,
133
],
[
132,
134
],
[
116,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
135,
139
],
[
139,
140
],
[
139,
141
],
[
114,
142
],
[
142,
143
],
[
114,
144
],
[
144,
145
],
[
0,
146
],
[
146,
147
],
[
146,
148
]
] | [
"import java.util.*;\n\npublic class Main {\n\t\n\tprivate static int[] list;\n\t\n\tpublic static void main(String[] args) {\n\n\t\t//input\n\t\tScanner sc = new Scanner(System.in).useDelimiter(System.getProperty(\"line.separator\"));\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tw++;\n\n\t\t//initialization\n\t\tlist = new int[w];\n\t\tfor(int i=1;i<w;i++){list[i]=i;}\n\t\t\n\t\t//calculation\n\t\tString[] s;\n\t\tfor(int i=0;i<n;i++){\n\t\t\ts = sc.next().split(\",\");\n\t\t\tswap(Integer.parseInt(s[0]),Integer.parseInt(s[1]));\n\t\t}\n\n\t //output\n\t\tfor(int i=1;i<w;i++){System.out.println(list[i]);}\n\t}\n\t\n\tprivate static void swap(int a,int b){\n\t\tlist[b] = list[a] - list[b];\n\t\tlist[a] -= list[b];\n\t\tlist[b] += list[a];\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\t\n\tprivate static int[] list;\n\t\n\tpublic static void main(String[] args) {\n\n\t\t//input\n\t\tScanner sc = new Scanner(System.in).useDelimiter(System.getProperty(\"line.separator\"));\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tw++;\n\n\t\t//initialization\n\t\tlist = new int[w];\n\t\tfor(int i=1;i<w;i++){list[i]=i;}\n\t\t\n\t\t//calculation\n\t\tString[] s;\n\t\tfor(int i=0;i<n;i++){\n\t\t\ts = sc.next().split(\",\");\n\t\t\tswap(Integer.parseInt(s[0]),Integer.parseInt(s[1]));\n\t\t}\n\n\t //output\n\t\tfor(int i=1;i<w;i++){System.out.println(list[i]);}\n\t}\n\t\n\tprivate static void swap(int a,int b){\n\t\tlist[b] = list[a] - list[b];\n\t\tlist[a] -= list[b];\n\t\tlist[b] += list[a];\n\t}\n}",
"Main",
"private static int[] list;",
"list",
"public static void main(String[] args) {\n\n\t\t//input\n\t\tScanner sc = new Scanner(System.in).useDelimiter(System.getProperty(\"line.separator\"));\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tw++;\n\n\t\t//initialization\n\t\tlist = new int[w];\n\t\tfor(int i=1;i<w;i++){list[i]=i;}\n\t\t\n\t\t//calculation\n\t\tString[] s;\n\t\tfor(int i=0;i<n;i++){\n\t\t\ts = sc.next().split(\",\");\n\t\t\tswap(Integer.parseInt(s[0]),Integer.parseInt(s[1]));\n\t\t}\n\n\t //output\n\t\tfor(int i=1;i<w;i++){System.out.println(list[i]);}\n\t}",
"main",
"{\n\n\t\t//input\n\t\tScanner sc = new Scanner(System.in).useDelimiter(System.getProperty(\"line.separator\"));\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tw++;\n\n\t\t//initialization\n\t\tlist = new int[w];\n\t\tfor(int i=1;i<w;i++){list[i]=i;}\n\t\t\n\t\t//calculation\n\t\tString[] s;\n\t\tfor(int i=0;i<n;i++){\n\t\t\ts = sc.next().split(\",\");\n\t\t\tswap(Integer.parseInt(s[0]),Integer.parseInt(s[1]));\n\t\t}\n\n\t //output\n\t\tfor(int i=1;i<w;i++){System.out.println(list[i]);}\n\t}",
"Scanner sc = new Scanner(System.in).useDelimiter(System.getProperty(\"line.separator\"));",
"sc",
"new Scanner(System.in).useDelimiter(System.getProperty(\"line.separator\"))",
"new Scanner(System.in).useDelimiter",
"new Scanner(System.in)",
"System.getProperty(\"line.separator\")",
"System.getProperty",
"System",
"\"line.separator\"",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"w++",
"w",
"list = new int[w]",
"list",
"new int[w]",
"w",
"for(int i=1;i<w;i++){list[i]=i;}",
"int i=1;",
"int i=1;",
"i",
"1",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"{list[i]=i;}",
"{list[i]=i;}",
"list[i]=i",
"list[i]",
"list",
"i",
"i",
"String[] s;",
"s",
"for(int i=0;i<n;i++){\n\t\t\ts = sc.next().split(\",\");\n\t\t\tswap(Integer.parseInt(s[0]),Integer.parseInt(s[1]));\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\ts = sc.next().split(\",\");\n\t\t\tswap(Integer.parseInt(s[0]),Integer.parseInt(s[1]));\n\t\t}",
"{\n\t\t\ts = sc.next().split(\",\");\n\t\t\tswap(Integer.parseInt(s[0]),Integer.parseInt(s[1]));\n\t\t}",
"s = sc.next().split(\",\")",
"s",
"sc.next().split(\",\")",
"sc.next().split",
"sc.next()",
"sc.next",
"sc",
"\",\"",
"swap(Integer.parseInt(s[0]),Integer.parseInt(s[1]))",
"swap",
"Integer.parseInt(s[0])",
"Integer.parseInt",
"Integer",
"s[0]",
"s",
"0",
"Integer.parseInt(s[1])",
"Integer.parseInt",
"Integer",
"s[1]",
"s",
"1",
"for(int i=1;i<w;i++){System.out.println(list[i]);}",
"int i=1;",
"int i=1;",
"i",
"1",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"{System.out.println(list[i]);}",
"{System.out.println(list[i]);}",
"System.out.println(list[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"list[i]",
"list",
"i",
"String[] args",
"args",
"private static void swap(int a,int b){\n\t\tlist[b] = list[a] - list[b];\n\t\tlist[a] -= list[b];\n\t\tlist[b] += list[a];\n\t}",
"swap",
"{\n\t\tlist[b] = list[a] - list[b];\n\t\tlist[a] -= list[b];\n\t\tlist[b] += list[a];\n\t}",
"list[b] = list[a] - list[b]",
"list[b]",
"list",
"b",
"list[a] - list[b]",
"list[a]",
"list",
"a",
"list[b]",
"list",
"b",
"list[a] -= list[b]",
"list[a]",
"list",
"a",
"list[b]",
"list",
"b",
"list[b] += list[a]",
"list[b]",
"list",
"b",
"list[a]",
"list",
"a",
"int a",
"a",
"int b",
"b",
"public class Main {\n\t\n\tprivate static int[] list;\n\t\n\tpublic static void main(String[] args) {\n\n\t\t//input\n\t\tScanner sc = new Scanner(System.in).useDelimiter(System.getProperty(\"line.separator\"));\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tw++;\n\n\t\t//initialization\n\t\tlist = new int[w];\n\t\tfor(int i=1;i<w;i++){list[i]=i;}\n\t\t\n\t\t//calculation\n\t\tString[] s;\n\t\tfor(int i=0;i<n;i++){\n\t\t\ts = sc.next().split(\",\");\n\t\t\tswap(Integer.parseInt(s[0]),Integer.parseInt(s[1]));\n\t\t}\n\n\t //output\n\t\tfor(int i=1;i<w;i++){System.out.println(list[i]);}\n\t}\n\t\n\tprivate static void swap(int a,int b){\n\t\tlist[b] = list[a] - list[b];\n\t\tlist[a] -= list[b];\n\t\tlist[b] += list[a];\n\t}\n}",
"public class Main {\n\t\n\tprivate static int[] list;\n\t\n\tpublic static void main(String[] args) {\n\n\t\t//input\n\t\tScanner sc = new Scanner(System.in).useDelimiter(System.getProperty(\"line.separator\"));\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tw++;\n\n\t\t//initialization\n\t\tlist = new int[w];\n\t\tfor(int i=1;i<w;i++){list[i]=i;}\n\t\t\n\t\t//calculation\n\t\tString[] s;\n\t\tfor(int i=0;i<n;i++){\n\t\t\ts = sc.next().split(\",\");\n\t\t\tswap(Integer.parseInt(s[0]),Integer.parseInt(s[1]));\n\t\t}\n\n\t //output\n\t\tfor(int i=1;i<w;i++){System.out.println(list[i]);}\n\t}\n\t\n\tprivate static void swap(int a,int b){\n\t\tlist[b] = list[a] - list[b];\n\t\tlist[a] -= list[b];\n\t\tlist[b] += list[a];\n\t}\n}",
"Main"
] | import java.util.*;
public class Main {
private static int[] list;
public static void main(String[] args) {
//input
Scanner sc = new Scanner(System.in).useDelimiter(System.getProperty("line.separator"));
int w = sc.nextInt();
int n = sc.nextInt();
w++;
//initialization
list = new int[w];
for(int i=1;i<w;i++){list[i]=i;}
//calculation
String[] s;
for(int i=0;i<n;i++){
s = sc.next().split(",");
swap(Integer.parseInt(s[0]),Integer.parseInt(s[1]));
}
//output
for(int i=1;i<w;i++){System.out.println(list[i]);}
}
private static void swap(int a,int b){
list[b] = list[a] - list[b];
list[a] -= list[b];
list[b] += list[a];
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
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,
4,
18,
13,
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,
20,
4,
18,
13,
4,
18,
13,
2,
13,
17,
4,
18,
13,
2,
13,
17,
4,
18,
13,
2,
13,
17,
4,
18,
13,
2,
13,
17,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
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
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
162,
17
],
[
162,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
26,
29
],
[
29,
30
],
[
30,
31
],
[
20,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
37,
38
],
[
38,
39
],
[
20,
40
],
[
40,
41
],
[
40,
42
],
[
20,
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
],
[
57,
58
],
[
56,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
62,
63
],
[
62,
64
],
[
20,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
70,
71
],
[
70,
72
],
[
65,
73
],
[
73,
74
],
[
74,
75
],
[
65,
76
],
[
77,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
80,
85
],
[
77,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
91,
92
],
[
91,
93
],
[
77,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
97,
98
],
[
96,
99
],
[
99,
100
],
[
99,
101
],
[
77,
102
],
[
102,
103
],
[
102,
104
],
[
77,
105
],
[
105,
106
],
[
106,
107
],
[
105,
108
],
[
108,
109
],
[
109,
110
],
[
108,
111
],
[
111,
112
],
[
111,
113
],
[
77,
114
],
[
114,
115
],
[
115,
116
],
[
114,
117
],
[
117,
118
],
[
117,
119
],
[
114,
120
],
[
120,
121
],
[
121,
122
],
[
120,
123
],
[
123,
124
],
[
123,
125
],
[
77,
126
],
[
126,
127
],
[
127,
128
],
[
126,
129
],
[
129,
130
],
[
129,
131
],
[
126,
132
],
[
132,
133
],
[
133,
134
],
[
20,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
135,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
143,
144
],
[
135,
145
],
[
145,
146
],
[
146,
147
],
[
135,
148
],
[
149,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
150,
155
],
[
155,
156
],
[
156,
157
],
[
155,
158
],
[
18,
159
],
[
159,
160
],
[
0,
161
],
[
161,
162
],
[
161,
163
]
] | [
"import java.io.IOException;\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.List;\nimport java.util.ArrayList;\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 List<String> list = new ArrayList<String>();\n for (int j=0; j<w; j++){\n list.add(String.valueOf(j+1));\n }\n for (int i=0; i<n; i++){\n String[] yoko = br.readLine().split(\",\");\n int ai = Integer.parseInt(yoko[0]);\n int bi = Integer.parseInt(yoko[1]);\n StringBuilder sb = new StringBuilder();\n sb.append(list.get(ai-1));\n list.set(ai-1, list.get(bi-1));\n list.set(bi-1, sb.toString());\n }\n for (int k=0; k<list.size(); k++){\n System.out.println(list.get(k));\n }\n }\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.List;",
"List",
"java.util",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"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 List<String> list = new ArrayList<String>();\n for (int j=0; j<w; j++){\n list.add(String.valueOf(j+1));\n }\n for (int i=0; i<n; i++){\n String[] yoko = br.readLine().split(\",\");\n int ai = Integer.parseInt(yoko[0]);\n int bi = Integer.parseInt(yoko[1]);\n StringBuilder sb = new StringBuilder();\n sb.append(list.get(ai-1));\n list.set(ai-1, list.get(bi-1));\n list.set(bi-1, sb.toString());\n }\n for (int k=0; k<list.size(); k++){\n System.out.println(list.get(k));\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 List<String> list = new ArrayList<String>();\n for (int j=0; j<w; j++){\n list.add(String.valueOf(j+1));\n }\n for (int i=0; i<n; i++){\n String[] yoko = br.readLine().split(\",\");\n int ai = Integer.parseInt(yoko[0]);\n int bi = Integer.parseInt(yoko[1]);\n StringBuilder sb = new StringBuilder();\n sb.append(list.get(ai-1));\n list.set(ai-1, list.get(bi-1));\n list.set(bi-1, sb.toString());\n }\n for (int k=0; k<list.size(); k++){\n System.out.println(list.get(k));\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 List<String> list = new ArrayList<String>();\n for (int j=0; j<w; j++){\n list.add(String.valueOf(j+1));\n }\n for (int i=0; i<n; i++){\n String[] yoko = br.readLine().split(\",\");\n int ai = Integer.parseInt(yoko[0]);\n int bi = Integer.parseInt(yoko[1]);\n StringBuilder sb = new StringBuilder();\n sb.append(list.get(ai-1));\n list.set(ai-1, list.get(bi-1));\n list.set(bi-1, sb.toString());\n }\n for (int k=0; k<list.size(); k++){\n System.out.println(list.get(k));\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",
"List<String> list = new ArrayList<String>();",
"list",
"new ArrayList<String>()",
"for (int j=0; j<w; j++){\n list.add(String.valueOf(j+1));\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<w",
"j",
"w",
"j++",
"j++",
"j",
"{\n list.add(String.valueOf(j+1));\n }",
"{\n list.add(String.valueOf(j+1));\n }",
"list.add(String.valueOf(j+1))",
"list.add",
"list",
"String.valueOf(j+1)",
"String.valueOf",
"String",
"j+1",
"j",
"1",
"for (int i=0; i<n; i++){\n String[] yoko = br.readLine().split(\",\");\n int ai = Integer.parseInt(yoko[0]);\n int bi = Integer.parseInt(yoko[1]);\n StringBuilder sb = new StringBuilder();\n sb.append(list.get(ai-1));\n list.set(ai-1, list.get(bi-1));\n list.set(bi-1, sb.toString());\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String[] yoko = br.readLine().split(\",\");\n int ai = Integer.parseInt(yoko[0]);\n int bi = Integer.parseInt(yoko[1]);\n StringBuilder sb = new StringBuilder();\n sb.append(list.get(ai-1));\n list.set(ai-1, list.get(bi-1));\n list.set(bi-1, sb.toString());\n }",
"{\n String[] yoko = br.readLine().split(\",\");\n int ai = Integer.parseInt(yoko[0]);\n int bi = Integer.parseInt(yoko[1]);\n StringBuilder sb = new StringBuilder();\n sb.append(list.get(ai-1));\n list.set(ai-1, list.get(bi-1));\n list.set(bi-1, sb.toString());\n }",
"String[] yoko = br.readLine().split(\",\");",
"yoko",
"br.readLine().split(\",\")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\",\"",
"int ai = Integer.parseInt(yoko[0]);",
"ai",
"Integer.parseInt(yoko[0])",
"Integer.parseInt",
"Integer",
"yoko[0]",
"yoko",
"0",
"int bi = Integer.parseInt(yoko[1]);",
"bi",
"Integer.parseInt(yoko[1])",
"Integer.parseInt",
"Integer",
"yoko[1]",
"yoko",
"1",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"sb.append(list.get(ai-1))",
"sb.append",
"sb",
"list.get(ai-1)",
"list.get",
"list",
"ai-1",
"ai",
"1",
"list.set(ai-1, list.get(bi-1))",
"list.set",
"list",
"ai-1",
"ai",
"1",
"list.get(bi-1)",
"list.get",
"list",
"bi-1",
"bi",
"1",
"list.set(bi-1, sb.toString())",
"list.set",
"list",
"bi-1",
"bi",
"1",
"sb.toString()",
"sb.toString",
"sb",
"for (int k=0; k<list.size(); k++){\n System.out.println(list.get(k));\n }",
"int k=0;",
"int k=0;",
"k",
"0",
"k<list.size()",
"k",
"list.size()",
"list.size",
"list",
"k++",
"k++",
"k",
"{\n System.out.println(list.get(k));\n }",
"{\n System.out.println(list.get(k));\n }",
"System.out.println(list.get(k))",
"System.out.println",
"System.out",
"System",
"System.out",
"list.get(k)",
"list.get",
"list",
"k",
"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 List<String> list = new ArrayList<String>();\n for (int j=0; j<w; j++){\n list.add(String.valueOf(j+1));\n }\n for (int i=0; i<n; i++){\n String[] yoko = br.readLine().split(\",\");\n int ai = Integer.parseInt(yoko[0]);\n int bi = Integer.parseInt(yoko[1]);\n StringBuilder sb = new StringBuilder();\n sb.append(list.get(ai-1));\n list.set(ai-1, list.get(bi-1));\n list.set(bi-1, sb.toString());\n }\n for (int k=0; k<list.size(); k++){\n System.out.println(list.get(k));\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 List<String> list = new ArrayList<String>();\n for (int j=0; j<w; j++){\n list.add(String.valueOf(j+1));\n }\n for (int i=0; i<n; i++){\n String[] yoko = br.readLine().split(\",\");\n int ai = Integer.parseInt(yoko[0]);\n int bi = Integer.parseInt(yoko[1]);\n StringBuilder sb = new StringBuilder();\n sb.append(list.get(ai-1));\n list.set(ai-1, list.get(bi-1));\n list.set(bi-1, sb.toString());\n }\n for (int k=0; k<list.size(); k++){\n System.out.println(list.get(k));\n }\n }\n}",
"Main"
] | import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.List;
import java.util.ArrayList;
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());
List<String> list = new ArrayList<String>();
for (int j=0; j<w; j++){
list.add(String.valueOf(j+1));
}
for (int i=0; i<n; i++){
String[] yoko = br.readLine().split(",");
int ai = Integer.parseInt(yoko[0]);
int bi = Integer.parseInt(yoko[1]);
StringBuilder sb = new StringBuilder();
sb.append(list.get(ai-1));
list.set(ai-1, list.get(bi-1));
list.set(bi-1, sb.toString());
}
for (int k=0; k<list.size(); k++){
System.out.println(list.get(k));
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
41,
13,
4,
18,
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,
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,
0,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
18,
13,
13,
4,
18,
13,
17,
4,
18,
18,
13,
13,
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
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
20,
29
],
[
29,
30
],
[
29,
31
],
[
20,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
38,
39
],
[
38,
40
],
[
33,
41
],
[
41,
42
],
[
42,
43
],
[
33,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
50,
52
],
[
20,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
20,
58
],
[
58,
59
],
[
59,
60
],
[
20,
61
],
[
61,
62
],
[
20,
63
],
[
63,
64
],
[
20,
65
],
[
65,
66
],
[
20,
67
],
[
67,
68
],
[
20,
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
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
84,
89
],
[
81,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
96,
97
],
[
96,
98
],
[
92,
99
],
[
81,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
106,
107
],
[
106,
108
],
[
102,
109
],
[
81,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
112,
114
],
[
81,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
115,
119
],
[
119,
120
],
[
119,
121
],
[
81,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
122,
126
],
[
20,
127
],
[
127,
128
],
[
127,
129
],
[
20,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
130,
135
],
[
135,
136
],
[
135,
137
],
[
130,
138
],
[
138,
139
],
[
139,
140
],
[
130,
141
],
[
142,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
143,
146
],
[
146,
147
],
[
146,
148
],
[
142,
149
],
[
149,
150
],
[
150,
151
],
[
149,
152
],
[
20,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
155,
157
],
[
153,
158
],
[
18,
159
],
[
159,
160
]
] | [
"import java.io.IOException;\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.Scanner;\nimport java.text.DecimalFormat;\n\nclass Main {\n public static void main (String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n\n int w = sc.nextInt();\n int[] nums = new int[w];\n for (int i = 0; i < w; i++) {\n nums[i] = i + 1;\n }\n\n int n = sc.nextInt();\n sc.nextLine();\n\n int a, b, temp;\n String[] pair;\n for (int i = 0; i < n; i++) {\n pair = sc.nextLine().split(\",\");\n a = Integer.parseInt(pair[0]) - 1;\n b = Integer.parseInt(pair[1]) - 1;\n\n temp = nums[a];\n nums[a] = nums[b];\n nums[b] = temp;\n }\n\n StringBuilder sb = new StringBuilder(\"\");\n for (int i = 0; i < w; i++) {\n sb.append(nums[i]);\n sb.append('\\n');\n }\n System.out.print(sb);\n }\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.text.DecimalFormat;",
"DecimalFormat",
"java.text",
"class Main {\n public static void main (String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n\n int w = sc.nextInt();\n int[] nums = new int[w];\n for (int i = 0; i < w; i++) {\n nums[i] = i + 1;\n }\n\n int n = sc.nextInt();\n sc.nextLine();\n\n int a, b, temp;\n String[] pair;\n for (int i = 0; i < n; i++) {\n pair = sc.nextLine().split(\",\");\n a = Integer.parseInt(pair[0]) - 1;\n b = Integer.parseInt(pair[1]) - 1;\n\n temp = nums[a];\n nums[a] = nums[b];\n nums[b] = temp;\n }\n\n StringBuilder sb = new StringBuilder(\"\");\n for (int i = 0; i < w; i++) {\n sb.append(nums[i]);\n sb.append('\\n');\n }\n System.out.print(sb);\n }\n}",
"Main",
"public static void main (String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n\n int w = sc.nextInt();\n int[] nums = new int[w];\n for (int i = 0; i < w; i++) {\n nums[i] = i + 1;\n }\n\n int n = sc.nextInt();\n sc.nextLine();\n\n int a, b, temp;\n String[] pair;\n for (int i = 0; i < n; i++) {\n pair = sc.nextLine().split(\",\");\n a = Integer.parseInt(pair[0]) - 1;\n b = Integer.parseInt(pair[1]) - 1;\n\n temp = nums[a];\n nums[a] = nums[b];\n nums[b] = temp;\n }\n\n StringBuilder sb = new StringBuilder(\"\");\n for (int i = 0; i < w; i++) {\n sb.append(nums[i]);\n sb.append('\\n');\n }\n System.out.print(sb);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n int w = sc.nextInt();\n int[] nums = new int[w];\n for (int i = 0; i < w; i++) {\n nums[i] = i + 1;\n }\n\n int n = sc.nextInt();\n sc.nextLine();\n\n int a, b, temp;\n String[] pair;\n for (int i = 0; i < n; i++) {\n pair = sc.nextLine().split(\",\");\n a = Integer.parseInt(pair[0]) - 1;\n b = Integer.parseInt(pair[1]) - 1;\n\n temp = nums[a];\n nums[a] = nums[b];\n nums[b] = temp;\n }\n\n StringBuilder sb = new StringBuilder(\"\");\n for (int i = 0; i < w; i++) {\n sb.append(nums[i]);\n sb.append('\\n');\n }\n System.out.print(sb);\n }",
"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 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",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int a",
"a",
"b",
"b",
"temp;",
"temp",
"String[] pair;",
"pair",
"for (int i = 0; i < n; i++) {\n pair = sc.nextLine().split(\",\");\n a = Integer.parseInt(pair[0]) - 1;\n b = Integer.parseInt(pair[1]) - 1;\n\n 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 pair = sc.nextLine().split(\",\");\n a = Integer.parseInt(pair[0]) - 1;\n b = Integer.parseInt(pair[1]) - 1;\n\n temp = nums[a];\n nums[a] = nums[b];\n nums[b] = temp;\n }",
"{\n pair = sc.nextLine().split(\",\");\n a = Integer.parseInt(pair[0]) - 1;\n b = Integer.parseInt(pair[1]) - 1;\n\n temp = nums[a];\n nums[a] = nums[b];\n nums[b] = temp;\n }",
"pair = sc.nextLine().split(\",\")",
"pair",
"sc.nextLine().split(\",\")",
"sc.nextLine().split",
"sc.nextLine()",
"sc.nextLine",
"sc",
"\",\"",
"a = Integer.parseInt(pair[0]) - 1",
"a",
"Integer.parseInt(pair[0]) - 1",
"Integer.parseInt(pair[0])",
"Integer.parseInt",
"Integer",
"pair[0]",
"pair",
"0",
"1",
"b = Integer.parseInt(pair[1]) - 1",
"b",
"Integer.parseInt(pair[1]) - 1",
"Integer.parseInt(pair[1])",
"Integer.parseInt",
"Integer",
"pair[1]",
"pair",
"1",
"1",
"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",
"StringBuilder sb = new StringBuilder(\"\");",
"sb",
"new StringBuilder(\"\")",
"for (int i = 0; i < w; i++) {\n sb.append(nums[i]);\n sb.append('\\n');\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n sb.append(nums[i]);\n sb.append('\\n');\n }",
"{\n sb.append(nums[i]);\n sb.append('\\n');\n }",
"sb.append(nums[i])",
"sb.append",
"sb",
"nums[i]",
"nums",
"i",
"sb.append('\\n')",
"sb.append",
"sb",
"'\\n'",
"System.out.print(sb)",
"System.out.print",
"System.out",
"System",
"System.out",
"sb",
"String[] args",
"args"
] | import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.text.DecimalFormat;
class Main {
public static void main (String[] args) throws IOException {
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();
sc.nextLine();
int a, b, temp;
String[] pair;
for (int i = 0; i < n; i++) {
pair = sc.nextLine().split(",");
a = Integer.parseInt(pair[0]) - 1;
b = Integer.parseInt(pair[1]) - 1;
temp = nums[a];
nums[a] = nums[b];
nums[b] = temp;
}
StringBuilder sb = new StringBuilder("");
for (int i = 0; i < w; i++) {
sb.append(nums[i]);
sb.append('\n');
}
System.out.print(sb);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
41,
13,
0,
13,
0,
13,
17,
41,
13,
20,
41,
13,
20,
41,
13,
20,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
4,
18,
13,
0,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
19,
18,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
4,
18,
13,
19,
18,
13,
28,
13,
13,
30,
30,
28,
13,
13,
30,
30,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
28,
13,
13,
30,
30,
14,
2,
4,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
0,
18,
36,
13,
13,
23,
13,
12,
13,
30,
29,
13,
12,
13,
30,
29,
13,
12,
13,
30,
0,
13,
4,
18,
13,
13,
23,
13,
6,
13,
41,
13,
20,
12,
13,
30,
4,
18,
13,
13,
4,
18,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
18,
4,
18,
13,
17,
17,
41,
13,
4,
18,
13,
18,
4,
18,
13,
17,
17,
4,
18,
13,
13,
4,
18,
13,
13,
23,
13,
12,
13,
30,
14,
4,
18,
13,
13,
30,
29,
8,
2,
13,
4,
18,
13,
17,
4,
18,
13,
17,
4,
18,
13,
17,
30,
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
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
275,
14
],
[
275,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
17,
24
],
[
24,
25
],
[
17,
26
],
[
26,
27
],
[
17,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
30,
32
],
[
17,
33
],
[
33,
34
],
[
33,
35
],
[
17,
36
],
[
36,
37
],
[
36,
38
],
[
17,
39
],
[
39,
40
],
[
39,
41
],
[
17,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
42,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
55,
56
],
[
56,
57
],
[
49,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
63,
64
],
[
64,
65
],
[
49,
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
],
[
80,
81
],
[
79,
82
],
[
82,
83
],
[
83,
84
],
[
49,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
86,
92
],
[
85,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
97,
98
],
[
98,
99
],
[
17,
100
],
[
100,
101
],
[
100,
102
],
[
100,
103
],
[
104,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
105,
108
],
[
109,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
110,
113
],
[
17,
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
],
[
127,
130
],
[
131,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
133,
137
],
[
132,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
138,
143
],
[
143,
144
],
[
144,
145
],
[
15,
146
],
[
146,
147
],
[
275,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
148,
152
],
[
152,
153
],
[
148,
154
],
[
154,
155
],
[
154,
156
],
[
156,
157
],
[
157,
158
],
[
158,
159
],
[
158,
160
],
[
157,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
161,
165
],
[
154,
166
],
[
166,
167
],
[
148,
168
],
[
168,
169
],
[
168,
170
],
[
170,
171
],
[
171,
172
],
[
148,
173
],
[
173,
174
],
[
173,
175
],
[
175,
176
],
[
176,
177
],
[
148,
178
],
[
178,
179
],
[
178,
180
],
[
180,
181
],
[
181,
182
],
[
181,
183
],
[
183,
184
],
[
184,
185
],
[
183,
186
],
[
178,
187
],
[
187,
188
],
[
275,
189
],
[
189,
190
],
[
189,
191
],
[
191,
192
],
[
191,
193
],
[
189,
194
],
[
194,
195
],
[
194,
196
],
[
196,
197
],
[
197,
198
],
[
198,
199
],
[
197,
200
],
[
196,
201
],
[
201,
202
],
[
202,
203
],
[
201,
204
],
[
194,
205
],
[
205,
206
],
[
194,
207
],
[
207,
208
],
[
189,
209
],
[
209,
210
],
[
209,
211
],
[
211,
212
],
[
212,
213
],
[
212,
214
],
[
214,
215
],
[
215,
216
],
[
214,
217
],
[
217,
218
],
[
218,
219
],
[
219,
220
],
[
218,
221
],
[
217,
222
],
[
211,
223
],
[
223,
224
],
[
223,
225
],
[
225,
226
],
[
226,
227
],
[
225,
228
],
[
228,
229
],
[
229,
230
],
[
230,
231
],
[
229,
232
],
[
228,
233
],
[
211,
234
],
[
234,
235
],
[
235,
236
],
[
234,
237
],
[
211,
238
],
[
238,
239
],
[
239,
240
],
[
238,
241
],
[
209,
242
],
[
242,
243
],
[
189,
244
],
[
244,
245
],
[
244,
246
],
[
246,
247
],
[
247,
248
],
[
248,
249
],
[
249,
250
],
[
248,
251
],
[
247,
252
],
[
252,
253
],
[
253,
254
],
[
254,
255
],
[
255,
256
],
[
255,
257
],
[
257,
258
],
[
258,
259
],
[
257,
260
],
[
254,
261
],
[
261,
262
],
[
262,
263
],
[
261,
264
],
[
254,
265
],
[
265,
266
],
[
266,
267
],
[
265,
268
],
[
247,
269
],
[
269,
270
],
[
270,
271
],
[
244,
272
],
[
272,
273
],
[
0,
274
],
[
274,
275
],
[
274,
276
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s = \"\";\n\t\tint w, n;\n\t\tw = n = 0;\n\n\t\tMain main = new Main();\n\t\tArrayList<Lane> lanes = new ArrayList<Main.Lane>();\n\t\tArrayList<Rule> rules = new ArrayList<Main.Rule>();\n\n\t\ttry {\n\t\t\tw = Integer.parseInt(br.readLine());\n\t\t\tn = Integer.parseInt(br.readLine());\n\n\t\t\tfor (int i = 1; i <= w; i++) {\n\t\t\t\tlanes.add(main.new Lane(i));\n\t\t\t}\n\n\t\t\twhile ((s = br.readLine()) != null) {\n\t\t\t\trules.add(main.new Rule(s));\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tfor (Lane l : lanes) {\n\t\t\tfor (Rule r : rules) {\n\t\t\t\tl.applyRule(r);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tfor (Lane l : lanes) {\n\t\t\t\tif (l.getCurrentLane() == i)\n\t\t\t\t\tSystem.out.println(l.getInitialLane());\n\t\t\t}\n\t\t}\n\t}\n\n\tclass Lane {\n\t\tprivate int initial;\n\t\tprivate int current;\n\n\t\tLane(int lane) {\n\t\t\tthis.initial = this.current = lane;\n\t\t}\n\n\t\tint getInitialLane() {\n\t\t\treturn initial;\n\t\t}\n\n\t\tint getCurrentLane() {\n\t\t\treturn current;\n\t\t}\n\n\t\tvoid applyRule(Rule rule) {\n\t\t\tcurrent = rule.getNewLane(current);\n\t\t}\n\t}\n\n\tclass Rule {\n\t\tprivate ArrayList<Integer> pair = new ArrayList<Integer>();\n\n\t\tRule(int a, int b) {\n\t\t\tpair.add(a);\n\t\t\tpair.add(b);\n\t\t}\n\n\t\tRule(String s) {\n\t\t\tint a = Integer.parseInt((s.split(\",\")[0]));\n\t\t\tint b = Integer.parseInt((s.split(\",\")[1]));\n\t\t\tpair.add(a);\n\t\t\tpair.add(b);\n\t\t}\n\n\t\tint getNewLane(int lane) {\n\t\t\tif (pair.contains(lane)) {\n\t\t\t\treturn (lane == pair.get(0) ? pair.get(1) : pair.get(0));\n\t\t\t} else {\n\t\t\t\treturn lane;\n\t\t\t}\n\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",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s = \"\";\n\t\tint w, n;\n\t\tw = n = 0;\n\n\t\tMain main = new Main();\n\t\tArrayList<Lane> lanes = new ArrayList<Main.Lane>();\n\t\tArrayList<Rule> rules = new ArrayList<Main.Rule>();\n\n\t\ttry {\n\t\t\tw = Integer.parseInt(br.readLine());\n\t\t\tn = Integer.parseInt(br.readLine());\n\n\t\t\tfor (int i = 1; i <= w; i++) {\n\t\t\t\tlanes.add(main.new Lane(i));\n\t\t\t}\n\n\t\t\twhile ((s = br.readLine()) != null) {\n\t\t\t\trules.add(main.new Rule(s));\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tfor (Lane l : lanes) {\n\t\t\tfor (Rule r : rules) {\n\t\t\t\tl.applyRule(r);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tfor (Lane l : lanes) {\n\t\t\t\tif (l.getCurrentLane() == i)\n\t\t\t\t\tSystem.out.println(l.getInitialLane());\n\t\t\t}\n\t\t}\n\t}\n\n\tclass Lane {\n\t\tprivate int initial;\n\t\tprivate int current;\n\n\t\tLane(int lane) {\n\t\t\tthis.initial = this.current = lane;\n\t\t}\n\n\t\tint getInitialLane() {\n\t\t\treturn initial;\n\t\t}\n\n\t\tint getCurrentLane() {\n\t\t\treturn current;\n\t\t}\n\n\t\tvoid applyRule(Rule rule) {\n\t\t\tcurrent = rule.getNewLane(current);\n\t\t}\n\t}\n\n\tclass Rule {\n\t\tprivate ArrayList<Integer> pair = new ArrayList<Integer>();\n\n\t\tRule(int a, int b) {\n\t\t\tpair.add(a);\n\t\t\tpair.add(b);\n\t\t}\n\n\t\tRule(String s) {\n\t\t\tint a = Integer.parseInt((s.split(\",\")[0]));\n\t\t\tint b = Integer.parseInt((s.split(\",\")[1]));\n\t\t\tpair.add(a);\n\t\t\tpair.add(b);\n\t\t}\n\n\t\tint getNewLane(int lane) {\n\t\t\tif (pair.contains(lane)) {\n\t\t\t\treturn (lane == pair.get(0) ? pair.get(1) : pair.get(0));\n\t\t\t} else {\n\t\t\t\treturn lane;\n\t\t\t}\n\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s = \"\";\n\t\tint w, n;\n\t\tw = n = 0;\n\n\t\tMain main = new Main();\n\t\tArrayList<Lane> lanes = new ArrayList<Main.Lane>();\n\t\tArrayList<Rule> rules = new ArrayList<Main.Rule>();\n\n\t\ttry {\n\t\t\tw = Integer.parseInt(br.readLine());\n\t\t\tn = Integer.parseInt(br.readLine());\n\n\t\t\tfor (int i = 1; i <= w; i++) {\n\t\t\t\tlanes.add(main.new Lane(i));\n\t\t\t}\n\n\t\t\twhile ((s = br.readLine()) != null) {\n\t\t\t\trules.add(main.new Rule(s));\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tfor (Lane l : lanes) {\n\t\t\tfor (Rule r : rules) {\n\t\t\t\tl.applyRule(r);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tfor (Lane l : lanes) {\n\t\t\t\tif (l.getCurrentLane() == i)\n\t\t\t\t\tSystem.out.println(l.getInitialLane());\n\t\t\t}\n\t\t}\n\t}",
"main",
"{\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s = \"\";\n\t\tint w, n;\n\t\tw = n = 0;\n\n\t\tMain main = new Main();\n\t\tArrayList<Lane> lanes = new ArrayList<Main.Lane>();\n\t\tArrayList<Rule> rules = new ArrayList<Main.Rule>();\n\n\t\ttry {\n\t\t\tw = Integer.parseInt(br.readLine());\n\t\t\tn = Integer.parseInt(br.readLine());\n\n\t\t\tfor (int i = 1; i <= w; i++) {\n\t\t\t\tlanes.add(main.new Lane(i));\n\t\t\t}\n\n\t\t\twhile ((s = br.readLine()) != null) {\n\t\t\t\trules.add(main.new Rule(s));\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tfor (Lane l : lanes) {\n\t\t\tfor (Rule r : rules) {\n\t\t\t\tl.applyRule(r);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tfor (Lane l : lanes) {\n\t\t\t\tif (l.getCurrentLane() == i)\n\t\t\t\t\tSystem.out.println(l.getInitialLane());\n\t\t\t}\n\t\t}\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String s = \"\";",
"s",
"\"\"",
"int w",
"w",
"n;",
"n",
"w = n = 0",
"w",
"n = 0",
"n",
"0",
"Main main = new Main();",
"main",
"new Main()",
"ArrayList<Lane> lanes = new ArrayList<Main.Lane>();",
"lanes",
"new ArrayList<Main.Lane>()",
"ArrayList<Rule> rules = new ArrayList<Main.Rule>();",
"rules",
"new ArrayList<Main.Rule>()",
"try {\n\t\t\tw = Integer.parseInt(br.readLine());\n\t\t\tn = Integer.parseInt(br.readLine());\n\n\t\t\tfor (int i = 1; i <= w; i++) {\n\t\t\t\tlanes.add(main.new Lane(i));\n\t\t\t}\n\n\t\t\twhile ((s = br.readLine()) != null) {\n\t\t\t\trules.add(main.new Rule(s));\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}",
"catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}",
"IOException e",
"{\n\t\t\te.printStackTrace();\n\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\tw = Integer.parseInt(br.readLine());\n\t\t\tn = Integer.parseInt(br.readLine());\n\n\t\t\tfor (int i = 1; i <= w; i++) {\n\t\t\t\tlanes.add(main.new Lane(i));\n\t\t\t}\n\n\t\t\twhile ((s = br.readLine()) != null) {\n\t\t\t\trules.add(main.new Rule(s));\n\t\t\t}\n\t\t}",
"w = Integer.parseInt(br.readLine())",
"w",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"n = Integer.parseInt(br.readLine())",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"for (int i = 1; i <= w; i++) {\n\t\t\t\tlanes.add(main.new Lane(i));\n\t\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\t\tlanes.add(main.new Lane(i));\n\t\t\t}",
"{\n\t\t\t\tlanes.add(main.new Lane(i));\n\t\t\t}",
"lanes.add(main.new Lane(i))",
"lanes.add",
"lanes",
"main.new Lane(i)",
"main",
"main",
"while ((s = br.readLine()) != null) {\n\t\t\t\trules.add(main.new Rule(s));\n\t\t\t}",
"(s = br.readLine()) != null",
"(s = br.readLine())",
"s",
"br.readLine()",
"br.readLine",
"br",
"null",
"{\n\t\t\t\trules.add(main.new Rule(s));\n\t\t\t}",
"rules.add(main.new Rule(s))",
"rules.add",
"rules",
"main.new Rule(s)",
"main",
"main",
"for (Lane l : lanes) {\n\t\t\tfor (Rule r : rules) {\n\t\t\t\tl.applyRule(r);\n\t\t\t}\n\t\t}",
"Lane l",
"lanes",
"{\n\t\t\tfor (Rule r : rules) {\n\t\t\t\tl.applyRule(r);\n\t\t\t}\n\t\t}",
"{\n\t\t\tfor (Rule r : rules) {\n\t\t\t\tl.applyRule(r);\n\t\t\t}\n\t\t}",
"for (Rule r : rules) {\n\t\t\t\tl.applyRule(r);\n\t\t\t}",
"Rule r",
"rules",
"{\n\t\t\t\tl.applyRule(r);\n\t\t\t}",
"{\n\t\t\t\tl.applyRule(r);\n\t\t\t}",
"l.applyRule(r)",
"l.applyRule",
"l",
"r",
"for (int i = 1; i <= w; i++) {\n\t\t\tfor (Lane l : lanes) {\n\t\t\t\tif (l.getCurrentLane() == i)\n\t\t\t\t\tSystem.out.println(l.getInitialLane());\n\t\t\t}\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tfor (Lane l : lanes) {\n\t\t\t\tif (l.getCurrentLane() == i)\n\t\t\t\t\tSystem.out.println(l.getInitialLane());\n\t\t\t}\n\t\t}",
"{\n\t\t\tfor (Lane l : lanes) {\n\t\t\t\tif (l.getCurrentLane() == i)\n\t\t\t\t\tSystem.out.println(l.getInitialLane());\n\t\t\t}\n\t\t}",
"for (Lane l : lanes) {\n\t\t\t\tif (l.getCurrentLane() == i)\n\t\t\t\t\tSystem.out.println(l.getInitialLane());\n\t\t\t}",
"Lane l",
"lanes",
"{\n\t\t\t\tif (l.getCurrentLane() == i)\n\t\t\t\t\tSystem.out.println(l.getInitialLane());\n\t\t\t}",
"{\n\t\t\t\tif (l.getCurrentLane() == i)\n\t\t\t\t\tSystem.out.println(l.getInitialLane());\n\t\t\t}",
"if (l.getCurrentLane() == i)\n\t\t\t\t\tSystem.out.println(l.getInitialLane());",
"l.getCurrentLane() == i",
"l.getCurrentLane()",
"l.getCurrentLane",
"l",
"i",
"System.out.println(l.getInitialLane())",
"System.out.println",
"System.out",
"System",
"System.out",
"l.getInitialLane()",
"l.getInitialLane",
"l",
"String[] args",
"args",
"class Lane {\n\t\tprivate int initial;\n\t\tprivate int current;\n\n\t\tLane(int lane) {\n\t\t\tthis.initial = this.current = lane;\n\t\t}\n\n\t\tint getInitialLane() {\n\t\t\treturn initial;\n\t\t}\n\n\t\tint getCurrentLane() {\n\t\t\treturn current;\n\t\t}\n\n\t\tvoid applyRule(Rule rule) {\n\t\t\tcurrent = rule.getNewLane(current);\n\t\t}\n\t}",
"Lane",
"private int initial;",
"initial",
"private int current;",
"current",
"Lane(int lane) {\n\t\t\tthis.initial = this.current = lane;\n\t\t}",
"Lane",
"{\n\t\t\tthis.initial = this.current = lane;\n\t\t}",
"this.initial = this.current = lane",
"this.initial",
"this",
"this.initial",
"this.current = lane",
"this.current",
"this",
"this.current",
"lane",
"int lane",
"lane",
"int getInitialLane() {\n\t\t\treturn initial;\n\t\t}",
"getInitialLane",
"{\n\t\t\treturn initial;\n\t\t}",
"return initial;",
"initial",
"int getCurrentLane() {\n\t\t\treturn current;\n\t\t}",
"getCurrentLane",
"{\n\t\t\treturn current;\n\t\t}",
"return current;",
"current",
"void applyRule(Rule rule) {\n\t\t\tcurrent = rule.getNewLane(current);\n\t\t}",
"applyRule",
"{\n\t\t\tcurrent = rule.getNewLane(current);\n\t\t}",
"current = rule.getNewLane(current)",
"current",
"rule.getNewLane(current)",
"rule.getNewLane",
"rule",
"current",
"Rule rule",
"rule",
"class Rule {\n\t\tprivate ArrayList<Integer> pair = new ArrayList<Integer>();\n\n\t\tRule(int a, int b) {\n\t\t\tpair.add(a);\n\t\t\tpair.add(b);\n\t\t}\n\n\t\tRule(String s) {\n\t\t\tint a = Integer.parseInt((s.split(\",\")[0]));\n\t\t\tint b = Integer.parseInt((s.split(\",\")[1]));\n\t\t\tpair.add(a);\n\t\t\tpair.add(b);\n\t\t}\n\n\t\tint getNewLane(int lane) {\n\t\t\tif (pair.contains(lane)) {\n\t\t\t\treturn (lane == pair.get(0) ? pair.get(1) : pair.get(0));\n\t\t\t} else {\n\t\t\t\treturn lane;\n\t\t\t}\n\n\t\t}\n\t}",
"Rule",
"private ArrayList<Integer> pair = new ArrayList<Integer>();",
"pair",
"new ArrayList<Integer>()",
"Rule(int a, int b) {\n\t\t\tpair.add(a);\n\t\t\tpair.add(b);\n\t\t}",
"Rule",
"{\n\t\t\tpair.add(a);\n\t\t\tpair.add(b);\n\t\t}",
"pair.add(a)",
"pair.add",
"pair",
"a",
"pair.add(b)",
"pair.add",
"pair",
"b",
"int a",
"a",
"int b",
"b",
"Rule(String s) {\n\t\t\tint a = Integer.parseInt((s.split(\",\")[0]));\n\t\t\tint b = Integer.parseInt((s.split(\",\")[1]));\n\t\t\tpair.add(a);\n\t\t\tpair.add(b);\n\t\t}",
"Rule",
"{\n\t\t\tint a = Integer.parseInt((s.split(\",\")[0]));\n\t\t\tint b = Integer.parseInt((s.split(\",\")[1]));\n\t\t\tpair.add(a);\n\t\t\tpair.add(b);\n\t\t}",
"int a = Integer.parseInt((s.split(\",\")[0]));",
"a",
"Integer.parseInt((s.split(\",\")[0]))",
"Integer.parseInt",
"Integer",
"(s.split(\",\")[0])",
"s.split(\",\")",
"s.split",
"s",
"\",\"",
"0",
"int b = Integer.parseInt((s.split(\",\")[1]));",
"b",
"Integer.parseInt((s.split(\",\")[1]))",
"Integer.parseInt",
"Integer",
"(s.split(\",\")[1])",
"s.split(\",\")",
"s.split",
"s",
"\",\"",
"1",
"pair.add(a)",
"pair.add",
"pair",
"a",
"pair.add(b)",
"pair.add",
"pair",
"b",
"String s",
"s",
"int getNewLane(int lane) {\n\t\t\tif (pair.contains(lane)) {\n\t\t\t\treturn (lane == pair.get(0) ? pair.get(1) : pair.get(0));\n\t\t\t} else {\n\t\t\t\treturn lane;\n\t\t\t}\n\n\t\t}",
"getNewLane",
"{\n\t\t\tif (pair.contains(lane)) {\n\t\t\t\treturn (lane == pair.get(0) ? pair.get(1) : pair.get(0));\n\t\t\t} else {\n\t\t\t\treturn lane;\n\t\t\t}\n\n\t\t}",
"if (pair.contains(lane)) {\n\t\t\t\treturn (lane == pair.get(0) ? pair.get(1) : pair.get(0));\n\t\t\t} else {\n\t\t\t\treturn lane;\n\t\t\t}",
"pair.contains(lane)",
"pair.contains",
"pair",
"lane",
"{\n\t\t\t\treturn (lane == pair.get(0) ? pair.get(1) : pair.get(0));\n\t\t\t}",
"return (lane == pair.get(0) ? pair.get(1) : pair.get(0));",
"(lane == pair.get(0) ? pair.get(1) : pair.get(0))",
"lane == pair.get(0)",
"lane",
"pair.get(0)",
"pair.get",
"pair",
"0",
"pair.get(1)",
"pair.get",
"pair",
"1",
"pair.get(0)",
"pair.get",
"pair",
"0",
"{\n\t\t\t\treturn lane;\n\t\t\t}",
"return lane;",
"lane",
"int lane",
"lane",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s = \"\";\n\t\tint w, n;\n\t\tw = n = 0;\n\n\t\tMain main = new Main();\n\t\tArrayList<Lane> lanes = new ArrayList<Main.Lane>();\n\t\tArrayList<Rule> rules = new ArrayList<Main.Rule>();\n\n\t\ttry {\n\t\t\tw = Integer.parseInt(br.readLine());\n\t\t\tn = Integer.parseInt(br.readLine());\n\n\t\t\tfor (int i = 1; i <= w; i++) {\n\t\t\t\tlanes.add(main.new Lane(i));\n\t\t\t}\n\n\t\t\twhile ((s = br.readLine()) != null) {\n\t\t\t\trules.add(main.new Rule(s));\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tfor (Lane l : lanes) {\n\t\t\tfor (Rule r : rules) {\n\t\t\t\tl.applyRule(r);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tfor (Lane l : lanes) {\n\t\t\t\tif (l.getCurrentLane() == i)\n\t\t\t\t\tSystem.out.println(l.getInitialLane());\n\t\t\t}\n\t\t}\n\t}\n\n\tclass Lane {\n\t\tprivate int initial;\n\t\tprivate int current;\n\n\t\tLane(int lane) {\n\t\t\tthis.initial = this.current = lane;\n\t\t}\n\n\t\tint getInitialLane() {\n\t\t\treturn initial;\n\t\t}\n\n\t\tint getCurrentLane() {\n\t\t\treturn current;\n\t\t}\n\n\t\tvoid applyRule(Rule rule) {\n\t\t\tcurrent = rule.getNewLane(current);\n\t\t}\n\t}\n\n\tclass Rule {\n\t\tprivate ArrayList<Integer> pair = new ArrayList<Integer>();\n\n\t\tRule(int a, int b) {\n\t\t\tpair.add(a);\n\t\t\tpair.add(b);\n\t\t}\n\n\t\tRule(String s) {\n\t\t\tint a = Integer.parseInt((s.split(\",\")[0]));\n\t\t\tint b = Integer.parseInt((s.split(\",\")[1]));\n\t\t\tpair.add(a);\n\t\t\tpair.add(b);\n\t\t}\n\n\t\tint getNewLane(int lane) {\n\t\t\tif (pair.contains(lane)) {\n\t\t\t\treturn (lane == pair.get(0) ? pair.get(1) : pair.get(0));\n\t\t\t} else {\n\t\t\t\treturn lane;\n\t\t\t}\n\n\t\t}\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s = \"\";\n\t\tint w, n;\n\t\tw = n = 0;\n\n\t\tMain main = new Main();\n\t\tArrayList<Lane> lanes = new ArrayList<Main.Lane>();\n\t\tArrayList<Rule> rules = new ArrayList<Main.Rule>();\n\n\t\ttry {\n\t\t\tw = Integer.parseInt(br.readLine());\n\t\t\tn = Integer.parseInt(br.readLine());\n\n\t\t\tfor (int i = 1; i <= w; i++) {\n\t\t\t\tlanes.add(main.new Lane(i));\n\t\t\t}\n\n\t\t\twhile ((s = br.readLine()) != null) {\n\t\t\t\trules.add(main.new Rule(s));\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tfor (Lane l : lanes) {\n\t\t\tfor (Rule r : rules) {\n\t\t\t\tl.applyRule(r);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tfor (Lane l : lanes) {\n\t\t\t\tif (l.getCurrentLane() == i)\n\t\t\t\t\tSystem.out.println(l.getInitialLane());\n\t\t\t}\n\t\t}\n\t}\n\n\tclass Lane {\n\t\tprivate int initial;\n\t\tprivate int current;\n\n\t\tLane(int lane) {\n\t\t\tthis.initial = this.current = lane;\n\t\t}\n\n\t\tint getInitialLane() {\n\t\t\treturn initial;\n\t\t}\n\n\t\tint getCurrentLane() {\n\t\t\treturn current;\n\t\t}\n\n\t\tvoid applyRule(Rule rule) {\n\t\t\tcurrent = rule.getNewLane(current);\n\t\t}\n\t}\n\n\tclass Rule {\n\t\tprivate ArrayList<Integer> pair = new ArrayList<Integer>();\n\n\t\tRule(int a, int b) {\n\t\t\tpair.add(a);\n\t\t\tpair.add(b);\n\t\t}\n\n\t\tRule(String s) {\n\t\t\tint a = Integer.parseInt((s.split(\",\")[0]));\n\t\t\tint b = Integer.parseInt((s.split(\",\")[1]));\n\t\t\tpair.add(a);\n\t\t\tpair.add(b);\n\t\t}\n\n\t\tint getNewLane(int lane) {\n\t\t\tif (pair.contains(lane)) {\n\t\t\t\treturn (lane == pair.get(0) ? pair.get(1) : pair.get(0));\n\t\t\t} else {\n\t\t\t\treturn lane;\n\t\t\t}\n\n\t\t}\n\t}\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class Main {
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s = "";
int w, n;
w = n = 0;
Main main = new Main();
ArrayList<Lane> lanes = new ArrayList<Main.Lane>();
ArrayList<Rule> rules = new ArrayList<Main.Rule>();
try {
w = Integer.parseInt(br.readLine());
n = Integer.parseInt(br.readLine());
for (int i = 1; i <= w; i++) {
lanes.add(main.new Lane(i));
}
while ((s = br.readLine()) != null) {
rules.add(main.new Rule(s));
}
} catch (IOException e) {
e.printStackTrace();
}
for (Lane l : lanes) {
for (Rule r : rules) {
l.applyRule(r);
}
}
for (int i = 1; i <= w; i++) {
for (Lane l : lanes) {
if (l.getCurrentLane() == i)
System.out.println(l.getInitialLane());
}
}
}
class Lane {
private int initial;
private int current;
Lane(int lane) {
this.initial = this.current = lane;
}
int getInitialLane() {
return initial;
}
int getCurrentLane() {
return current;
}
void applyRule(Rule rule) {
current = rule.getNewLane(current);
}
}
class Rule {
private ArrayList<Integer> pair = new ArrayList<Integer>();
Rule(int a, int b) {
pair.add(a);
pair.add(b);
}
Rule(String s) {
int a = Integer.parseInt((s.split(",")[0]));
int b = Integer.parseInt((s.split(",")[1]));
pair.add(a);
pair.add(b);
}
int getNewLane(int lane) {
if (pair.contains(lane)) {
return (lane == pair.get(0) ? pair.get(1) : pair.get(0));
} else {
return lane;
}
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
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,
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,
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,
18,
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
],
[
131,
5
],
[
131,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
10,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
10,
24
],
[
24,
25
],
[
24,
26
],
[
10,
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
],
[
47,
49
],
[
10,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
10,
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
],
[
66,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
81,
83
],
[
66,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
87,
89
],
[
84,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
92,
94
],
[
66,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
98,
100
],
[
95,
101
],
[
10,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
102,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
109,
111
],
[
102,
112
],
[
112,
113
],
[
113,
114
],
[
102,
115
],
[
116,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
117,
122
],
[
122,
123
],
[
122,
124
],
[
10,
125
],
[
125,
126
],
[
126,
127
],
[
6,
128
],
[
128,
129
],
[
0,
130
],
[
130,
131
],
[
130,
132
]
] | [
"import java.util.Scanner;\npublic class Main{\npublic static void main(String[] args){\ntry(Scanner sc = new Scanner(System.in)){\nint w = sc.nextInt();\nint n = sc.nextInt();\nint[] values = new int[w];\nfor(int i = 0; i < values.length; i++){\nvalues[i] = i + 1;\n}\nsc.useDelimiter(\",|\\n\");\nfor(int i = 0; i<n; i++){\nint a = sc.nextInt();\nint b = sc.nextInt();\nint temp = values[a-1];\nvalues[a-1] = values[b-1];\nvalues[b-1] = temp;\n}\nfor(int i = 0; i<values.length; i++){\nSystem.out.println(values[i]);\n}\nsc.close();\n}\n}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\npublic static void main(String[] args){\ntry(Scanner sc = new Scanner(System.in)){\nint w = sc.nextInt();\nint n = sc.nextInt();\nint[] values = new int[w];\nfor(int i = 0; i < values.length; i++){\nvalues[i] = i + 1;\n}\nsc.useDelimiter(\",|\\n\");\nfor(int i = 0; i<n; i++){\nint a = sc.nextInt();\nint b = sc.nextInt();\nint temp = values[a-1];\nvalues[a-1] = values[b-1];\nvalues[b-1] = temp;\n}\nfor(int i = 0; i<values.length; i++){\nSystem.out.println(values[i]);\n}\nsc.close();\n}\n}\n}",
"Main",
"public static void main(String[] args){\ntry(Scanner sc = new Scanner(System.in)){\nint w = sc.nextInt();\nint n = sc.nextInt();\nint[] values = new int[w];\nfor(int i = 0; i < values.length; i++){\nvalues[i] = i + 1;\n}\nsc.useDelimiter(\",|\\n\");\nfor(int i = 0; i<n; i++){\nint a = sc.nextInt();\nint b = sc.nextInt();\nint temp = values[a-1];\nvalues[a-1] = values[b-1];\nvalues[b-1] = temp;\n}\nfor(int i = 0; i<values.length; i++){\nSystem.out.println(values[i]);\n}\nsc.close();\n}\n}",
"main",
"{\ntry(Scanner sc = new Scanner(System.in)){\nint w = sc.nextInt();\nint n = sc.nextInt();\nint[] values = new int[w];\nfor(int i = 0; i < values.length; i++){\nvalues[i] = i + 1;\n}\nsc.useDelimiter(\",|\\n\");\nfor(int i = 0; i<n; i++){\nint a = sc.nextInt();\nint b = sc.nextInt();\nint temp = values[a-1];\nvalues[a-1] = values[b-1];\nvalues[b-1] = temp;\n}\nfor(int i = 0; i<values.length; i++){\nSystem.out.println(values[i]);\n}\nsc.close();\n}\n}",
"try(Scanner sc = new Scanner(System.in)){\nint w = sc.nextInt();\nint n = sc.nextInt();\nint[] values = new int[w];\nfor(int i = 0; i < values.length; i++){\nvalues[i] = i + 1;\n}\nsc.useDelimiter(\",|\\n\");\nfor(int i = 0; i<n; i++){\nint a = sc.nextInt();\nint b = sc.nextInt();\nint temp = values[a-1];\nvalues[a-1] = values[b-1];\nvalues[b-1] = temp;\n}\nfor(int i = 0; i<values.length; i++){\nSystem.out.println(values[i]);\n}\nsc.close();\n}",
"{\nint w = sc.nextInt();\nint n = sc.nextInt();\nint[] values = new int[w];\nfor(int i = 0; i < values.length; i++){\nvalues[i] = i + 1;\n}\nsc.useDelimiter(\",|\\n\");\nfor(int i = 0; i<n; i++){\nint a = sc.nextInt();\nint b = sc.nextInt();\nint temp = values[a-1];\nvalues[a-1] = values[b-1];\nvalues[b-1] = temp;\n}\nfor(int i = 0; i<values.length; i++){\nSystem.out.println(values[i]);\n}\nsc.close();\n}",
"Scanner sc = new Scanner(System.in)",
"Scanner sc = new Scanner(System.in)",
"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++){\nvalues[i] = i + 1;\n}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < values.length",
"i",
"values.length",
"values",
"values.length",
"i++",
"i++",
"i",
"{\nvalues[i] = i + 1;\n}",
"{\nvalues[i] = i + 1;\n}",
"values[i] = i + 1",
"values[i]",
"values",
"i",
"i + 1",
"i",
"1",
"sc.useDelimiter(\",|\\n\")",
"sc.useDelimiter",
"sc",
"\",|\\n\"",
"for(int i = 0; i<n; i++){\nint a = sc.nextInt();\nint b = sc.nextInt();\nint temp = values[a-1];\nvalues[a-1] = values[b-1];\nvalues[b-1] = temp;\n}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\nint a = sc.nextInt();\nint b = sc.nextInt();\nint temp = values[a-1];\nvalues[a-1] = values[b-1];\nvalues[b-1] = temp;\n}",
"{\nint a = sc.nextInt();\nint b = sc.nextInt();\nint temp = values[a-1];\nvalues[a-1] = values[b-1];\nvalues[b-1] = temp;\n}",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int temp = values[a-1];",
"temp",
"values[a-1]",
"values",
"a-1",
"a",
"1",
"values[a-1] = values[b-1]",
"values[a-1]",
"values",
"a-1",
"a",
"1",
"values[b-1]",
"values",
"b-1",
"b",
"1",
"values[b-1] = temp",
"values[b-1]",
"values",
"b-1",
"b",
"1",
"temp",
"for(int i = 0; i<values.length; i++){\nSystem.out.println(values[i]);\n}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<values.length",
"i",
"values.length",
"values",
"values.length",
"i++",
"i++",
"i",
"{\nSystem.out.println(values[i]);\n}",
"{\nSystem.out.println(values[i]);\n}",
"System.out.println(values[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"values[i]",
"values",
"i",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main{\npublic static void main(String[] args){\ntry(Scanner sc = new Scanner(System.in)){\nint w = sc.nextInt();\nint n = sc.nextInt();\nint[] values = new int[w];\nfor(int i = 0; i < values.length; i++){\nvalues[i] = i + 1;\n}\nsc.useDelimiter(\",|\\n\");\nfor(int i = 0; i<n; i++){\nint a = sc.nextInt();\nint b = sc.nextInt();\nint temp = values[a-1];\nvalues[a-1] = values[b-1];\nvalues[b-1] = temp;\n}\nfor(int i = 0; i<values.length; i++){\nSystem.out.println(values[i]);\n}\nsc.close();\n}\n}\n}",
"public class Main{\npublic static void main(String[] args){\ntry(Scanner sc = new Scanner(System.in)){\nint w = sc.nextInt();\nint n = sc.nextInt();\nint[] values = new int[w];\nfor(int i = 0; i < values.length; i++){\nvalues[i] = i + 1;\n}\nsc.useDelimiter(\",|\\n\");\nfor(int i = 0; i<n; i++){\nint a = sc.nextInt();\nint b = sc.nextInt();\nint temp = values[a-1];\nvalues[a-1] = values[b-1];\nvalues[b-1] = temp;\n}\nfor(int i = 0; i<values.length; i++){\nSystem.out.println(values[i]);\n}\nsc.close();\n}\n}\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main(String[] args){
try(Scanner sc = new Scanner(System.in)){
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;
}
sc.useDelimiter(",|\n");
for(int i = 0; i<n; i++){
int a = sc.nextInt();
int b = sc.nextInt();
int temp = values[a-1];
values[a-1] = values[b-1];
values[b-1] = temp;
}
for(int i = 0; i<values.length; i++){
System.out.println(values[i]);
}
sc.close();
}
}
}
|
[
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,
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,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
13,
11,
1,
41,
13,
2,
13,
17,
2,
13,
17,
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,
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
],
[
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
],
[
11,
29
],
[
29,
30
],
[
29,
31
],
[
11,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
38,
39
],
[
38,
40
],
[
33,
41
],
[
41,
42
],
[
42,
43
],
[
33,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
45,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
45,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
64,
65
],
[
64,
66
],
[
45,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
74,
75
],
[
74,
76
],
[
11,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
82,
83
],
[
82,
84
],
[
77,
85
],
[
85,
86
],
[
86,
87
],
[
77,
88
],
[
89,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
97,
99
],
[
93,
100
],
[
100,
101
],
[
100,
102
],
[
93,
103
],
[
103,
104
],
[
104,
105
],
[
93,
106
],
[
107,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
108,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
117,
119
],
[
108,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
121,
125
],
[
120,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
129,
131
],
[
89,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
132,
137
],
[
9,
138
],
[
138,
139
],
[
0,
140
],
[
140,
141
],
[
140,
142
]
] | [
"import java.util.*;\nimport java.lang.*;\n\n/**\n * DrawingLots\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 n = sc.nextInt();\n int a[] = new int[n];\n int b[] = new int[n];\n\n for (int i = 0; i < n; i++) {\n String str = sc.next();\n String list[] = str.split(\",\");\n a[i] = Integer.valueOf(list[0]);\n b[i] = Integer.valueOf(list[1]);\n }\n\n for (int i = 1; i <= w; i++) {\n int num = i;\n for (int j = n - 1; j >= 0; j--) {\n if (a[j] == num) {\n num = b[j];\n } else if (b[j] == num) {\n num = a[j];\n }\n }\n System.out.println(num);\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"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 n = sc.nextInt();\n int a[] = new int[n];\n int b[] = new int[n];\n\n for (int i = 0; i < n; i++) {\n String str = sc.next();\n String list[] = str.split(\",\");\n a[i] = Integer.valueOf(list[0]);\n b[i] = Integer.valueOf(list[1]);\n }\n\n for (int i = 1; i <= w; i++) {\n int num = i;\n for (int j = n - 1; j >= 0; j--) {\n if (a[j] == num) {\n num = b[j];\n } else if (b[j] == num) {\n num = a[j];\n }\n }\n System.out.println(num);\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 a[] = new int[n];\n int b[] = new int[n];\n\n for (int i = 0; i < n; i++) {\n String str = sc.next();\n String list[] = str.split(\",\");\n a[i] = Integer.valueOf(list[0]);\n b[i] = Integer.valueOf(list[1]);\n }\n\n for (int i = 1; i <= w; i++) {\n int num = i;\n for (int j = n - 1; j >= 0; j--) {\n if (a[j] == num) {\n num = b[j];\n } else if (b[j] == num) {\n num = a[j];\n }\n }\n System.out.println(num);\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int a[] = new int[n];\n int b[] = new int[n];\n\n for (int i = 0; i < n; i++) {\n String str = sc.next();\n String list[] = str.split(\",\");\n a[i] = Integer.valueOf(list[0]);\n b[i] = Integer.valueOf(list[1]);\n }\n\n for (int i = 1; i <= w; i++) {\n int num = i;\n for (int j = n - 1; j >= 0; j--) {\n if (a[j] == num) {\n num = b[j];\n } else if (b[j] == num) {\n num = a[j];\n }\n }\n System.out.println(num);\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 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 String str = sc.next();\n String list[] = str.split(\",\");\n a[i] = Integer.valueOf(list[0]);\n b[i] = Integer.valueOf(list[1]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String str = sc.next();\n String list[] = str.split(\",\");\n a[i] = Integer.valueOf(list[0]);\n b[i] = Integer.valueOf(list[1]);\n }",
"{\n String str = sc.next();\n String list[] = str.split(\",\");\n a[i] = Integer.valueOf(list[0]);\n b[i] = Integer.valueOf(list[1]);\n }",
"String str = sc.next();",
"str",
"sc.next()",
"sc.next",
"sc",
"String list[] = str.split(\",\");",
"list",
"str.split(\",\")",
"str.split",
"str",
"\",\"",
"a[i] = Integer.valueOf(list[0])",
"a[i]",
"a",
"i",
"Integer.valueOf(list[0])",
"Integer.valueOf",
"Integer",
"list[0]",
"list",
"0",
"b[i] = Integer.valueOf(list[1])",
"b[i]",
"b",
"i",
"Integer.valueOf(list[1])",
"Integer.valueOf",
"Integer",
"list[1]",
"list",
"1",
"for (int i = 1; i <= w; i++) {\n int num = i;\n for (int j = n - 1; j >= 0; j--) {\n if (a[j] == num) {\n num = b[j];\n } else if (b[j] == num) {\n num = a[j];\n }\n }\n System.out.println(num);\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= w",
"i",
"w",
"i++",
"i++",
"i",
"{\n int num = i;\n for (int j = n - 1; j >= 0; j--) {\n if (a[j] == num) {\n num = b[j];\n } else if (b[j] == num) {\n num = a[j];\n }\n }\n System.out.println(num);\n }",
"{\n int num = i;\n for (int j = n - 1; j >= 0; j--) {\n if (a[j] == num) {\n num = b[j];\n } else if (b[j] == num) {\n num = a[j];\n }\n }\n System.out.println(num);\n }",
"int num = i;",
"num",
"i",
"for (int j = n - 1; j >= 0; j--) {\n if (a[j] == num) {\n num = b[j];\n } else if (b[j] == num) {\n num = a[j];\n }\n }",
"int j = n - 1;",
"int j = n - 1;",
"j",
"n - 1",
"n",
"1",
"j >= 0",
"j",
"0",
"j--",
"j--",
"j",
"{\n if (a[j] == num) {\n num = b[j];\n } else if (b[j] == num) {\n num = a[j];\n }\n }",
"{\n if (a[j] == num) {\n num = b[j];\n } else if (b[j] == num) {\n num = a[j];\n }\n }",
"if (a[j] == num) {\n num = b[j];\n } else if (b[j] == num) {\n num = a[j];\n }",
"a[j] == num",
"a[j]",
"a",
"j",
"num",
"{\n num = b[j];\n }",
"num = b[j]",
"num",
"b[j]",
"b",
"j",
"if (b[j] == num) {\n num = a[j];\n }",
"b[j] == num",
"b[j]",
"b",
"j",
"num",
"{\n num = a[j];\n }",
"num = a[j]",
"num",
"a[j]",
"a",
"j",
"System.out.println(num)",
"System.out.println",
"System.out",
"System",
"System.out",
"num",
"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 n = sc.nextInt();\n int a[] = new int[n];\n int b[] = new int[n];\n\n for (int i = 0; i < n; i++) {\n String str = sc.next();\n String list[] = str.split(\",\");\n a[i] = Integer.valueOf(list[0]);\n b[i] = Integer.valueOf(list[1]);\n }\n\n for (int i = 1; i <= w; i++) {\n int num = i;\n for (int j = n - 1; j >= 0; j--) {\n if (a[j] == num) {\n num = b[j];\n } else if (b[j] == num) {\n num = a[j];\n }\n }\n System.out.println(num);\n }\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 n = sc.nextInt();\n int a[] = new int[n];\n int b[] = new int[n];\n\n for (int i = 0; i < n; i++) {\n String str = sc.next();\n String list[] = str.split(\",\");\n a[i] = Integer.valueOf(list[0]);\n b[i] = Integer.valueOf(list[1]);\n }\n\n for (int i = 1; i <= w; i++) {\n int num = i;\n for (int j = n - 1; j >= 0; j--) {\n if (a[j] == num) {\n num = b[j];\n } else if (b[j] == num) {\n num = a[j];\n }\n }\n System.out.println(num);\n }\n }\n}",
"Main"
] | import java.util.*;
import java.lang.*;
/**
* DrawingLots
*/
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[n];
int b[] = new int[n];
for (int i = 0; i < n; i++) {
String str = sc.next();
String list[] = str.split(",");
a[i] = Integer.valueOf(list[0]);
b[i] = Integer.valueOf(list[1]);
}
for (int i = 1; i <= w; i++) {
int num = i;
for (int j = n - 1; j >= 0; j--) {
if (a[j] == num) {
num = b[j];
} else if (b[j] == num) {
num = a[j];
}
}
System.out.println(num);
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
12,
13,
30,
4,
18,
20,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
0,
13,
20,
2,
13,
17,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
17,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
4,
18,
13,
17,
13,
17,
41,
13,
2,
4,
18,
13,
4,
18,
13,
2,
13,
17,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
2,
13,
13,
30,
0,
18,
18,
13,
13,
13,
18,
18,
13,
2,
13,
17,
13,
30,
0,
18,
18,
13,
13,
13,
18,
18,
13,
2,
13,
17,
13,
0,
18,
18,
13,
13,
13,
18,
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,
18,
13,
13,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
4,
18,
13,
18,
13,
13,
4,
18,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
240,
8
],
[
240,
9
],
[
9,
10
],
[
240,
11
],
[
11,
12
],
[
11,
13
],
[
13,
14
],
[
14,
15
],
[
15,
16
],
[
11,
17
],
[
17,
18
],
[
240,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
21,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
21,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
21,
35
],
[
35,
36
],
[
35,
37
],
[
38,
39
],
[
38,
40
],
[
21,
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
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
55,
61
],
[
61,
62
],
[
61,
63
],
[
21,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
64,
74
],
[
74,
75
],
[
75,
76
],
[
64,
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
],
[
78,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
96,
97
],
[
97,
98
],
[
96,
99
],
[
96,
100
],
[
92,
101
],
[
78,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
105,
108
],
[
108,
109
],
[
109,
110
],
[
108,
111
],
[
111,
112
],
[
111,
113
],
[
108,
114
],
[
114,
115
],
[
115,
116
],
[
104,
117
],
[
78,
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
],
[
132,
136
],
[
136,
137
],
[
136,
138
],
[
131,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
142,
144
],
[
141,
145
],
[
140,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
149,
151
],
[
146,
152
],
[
131,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
155,
159
],
[
154,
160
],
[
160,
161
],
[
161,
162
],
[
161,
163
],
[
163,
164
],
[
163,
165
],
[
160,
166
],
[
153,
167
],
[
167,
168
],
[
168,
169
],
[
169,
170
],
[
169,
171
],
[
168,
172
],
[
167,
173
],
[
173,
174
],
[
174,
175
],
[
174,
176
],
[
176,
177
],
[
176,
178
],
[
173,
179
],
[
21,
180
],
[
180,
181
],
[
181,
182
],
[
182,
183
],
[
182,
184
],
[
180,
185
],
[
185,
186
],
[
185,
187
],
[
180,
188
],
[
188,
189
],
[
189,
190
],
[
180,
191
],
[
192,
192
],
[
192,
193
],
[
193,
194
],
[
194,
195
],
[
195,
196
],
[
195,
197
],
[
193,
198
],
[
198,
199
],
[
199,
200
],
[
199,
201
],
[
198,
202
],
[
240,
203
],
[
203,
204
],
[
203,
205
],
[
205,
206
],
[
206,
207
],
[
207,
208
],
[
208,
209
],
[
208,
210
],
[
206,
211
],
[
211,
212
],
[
211,
213
],
[
213,
214
],
[
213,
215
],
[
206,
216
],
[
216,
217
],
[
217,
218
],
[
206,
219
],
[
220,
220
],
[
220,
221
],
[
221,
222
],
[
222,
223
],
[
223,
224
],
[
223,
225
],
[
221,
226
],
[
226,
227
],
[
227,
228
],
[
226,
229
],
[
229,
230
],
[
229,
231
],
[
205,
232
],
[
232,
233
],
[
233,
234
],
[
234,
235
],
[
234,
236
],
[
203,
237
],
[
237,
238
],
[
0,
239
],
[
239,
240
],
[
239,
241
]
] | [
"import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n\tprivate int lots[][];\n\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n\t\n\tprivate void run() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tlots = new int[n+1][w];\n\t\t\n\t\tfor (int j = 0; j < w; j++) {\n\t\t\tlots[0][j] = j+1;\n\t\t}\n\t\t\n\t\tfor (int i = 1; i < n + 1; i++) {\n\t\t\tString num = scan.next();\n\t\t\tint a = num.indexOf(\",\");\n\t\t\tint p = Integer.parseInt(num.substring(0, a))-1;\n\t\t\tint q = Integer.parseInt(num.substring(a+1, num.length()))-1;\n\t\t\t\n\t\t\tfor (int j = 0; j < w; j++) {\n\t\t\t\tif (j != p && j != q) {\n\t\t\t\t\tlots[i][j] = lots[i - 1][j];\n\t\t\t\t}else {\n\t\t\t\t\tlots[i][p] = lots[i - 1][q];\n\t\t\t\t\tlots[i][q] = lots[i - 1][p];\n\t\t\t\t}\n\t\t\t}\n\t\t\t//debug(n);\n\t\t}\n\t\t\n\t\tfor (int j = 0; j < w; j++) {\n\t\t\tSystem.out.println(lots[n][j]);\n\t\t}\n\t}\n\t\n\tprivate void debug(int n) {\n\t\tfor (int i = 0; i < n+1; i++) {\n\t\t\tSystem.out.println(Arrays.toString(lots[i]));\n\t\t}\n\t\tSystem.out.println();\n\t}\n\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tprivate int lots[][];\n\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n\t\n\tprivate void run() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tlots = new int[n+1][w];\n\t\t\n\t\tfor (int j = 0; j < w; j++) {\n\t\t\tlots[0][j] = j+1;\n\t\t}\n\t\t\n\t\tfor (int i = 1; i < n + 1; i++) {\n\t\t\tString num = scan.next();\n\t\t\tint a = num.indexOf(\",\");\n\t\t\tint p = Integer.parseInt(num.substring(0, a))-1;\n\t\t\tint q = Integer.parseInt(num.substring(a+1, num.length()))-1;\n\t\t\t\n\t\t\tfor (int j = 0; j < w; j++) {\n\t\t\t\tif (j != p && j != q) {\n\t\t\t\t\tlots[i][j] = lots[i - 1][j];\n\t\t\t\t}else {\n\t\t\t\t\tlots[i][p] = lots[i - 1][q];\n\t\t\t\t\tlots[i][q] = lots[i - 1][p];\n\t\t\t\t}\n\t\t\t}\n\t\t\t//debug(n);\n\t\t}\n\t\t\n\t\tfor (int j = 0; j < w; j++) {\n\t\t\tSystem.out.println(lots[n][j]);\n\t\t}\n\t}\n\t\n\tprivate void debug(int n) {\n\t\tfor (int i = 0; i < n+1; i++) {\n\t\t\tSystem.out.println(Arrays.toString(lots[i]));\n\t\t}\n\t\tSystem.out.println();\n\t}\n\n}",
"Main",
"private int lots[][];",
"lots",
"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",
"private void run() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tlots = new int[n+1][w];\n\t\t\n\t\tfor (int j = 0; j < w; j++) {\n\t\t\tlots[0][j] = j+1;\n\t\t}\n\t\t\n\t\tfor (int i = 1; i < n + 1; i++) {\n\t\t\tString num = scan.next();\n\t\t\tint a = num.indexOf(\",\");\n\t\t\tint p = Integer.parseInt(num.substring(0, a))-1;\n\t\t\tint q = Integer.parseInt(num.substring(a+1, num.length()))-1;\n\t\t\t\n\t\t\tfor (int j = 0; j < w; j++) {\n\t\t\t\tif (j != p && j != q) {\n\t\t\t\t\tlots[i][j] = lots[i - 1][j];\n\t\t\t\t}else {\n\t\t\t\t\tlots[i][p] = lots[i - 1][q];\n\t\t\t\t\tlots[i][q] = lots[i - 1][p];\n\t\t\t\t}\n\t\t\t}\n\t\t\t//debug(n);\n\t\t}\n\t\t\n\t\tfor (int j = 0; j < w; j++) {\n\t\t\tSystem.out.println(lots[n][j]);\n\t\t}\n\t}",
"run",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tlots = new int[n+1][w];\n\t\t\n\t\tfor (int j = 0; j < w; j++) {\n\t\t\tlots[0][j] = j+1;\n\t\t}\n\t\t\n\t\tfor (int i = 1; i < n + 1; i++) {\n\t\t\tString num = scan.next();\n\t\t\tint a = num.indexOf(\",\");\n\t\t\tint p = Integer.parseInt(num.substring(0, a))-1;\n\t\t\tint q = Integer.parseInt(num.substring(a+1, num.length()))-1;\n\t\t\t\n\t\t\tfor (int j = 0; j < w; j++) {\n\t\t\t\tif (j != p && j != q) {\n\t\t\t\t\tlots[i][j] = lots[i - 1][j];\n\t\t\t\t}else {\n\t\t\t\t\tlots[i][p] = lots[i - 1][q];\n\t\t\t\t\tlots[i][q] = lots[i - 1][p];\n\t\t\t\t}\n\t\t\t}\n\t\t\t//debug(n);\n\t\t}\n\t\t\n\t\tfor (int j = 0; j < w; j++) {\n\t\t\tSystem.out.println(lots[n][j]);\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",
"lots = new int[n+1][w]",
"lots",
"new int[n+1][w]",
"n+1",
"n",
"1",
"w",
"for (int j = 0; j < w; j++) {\n\t\t\tlots[0][j] = j+1;\n\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < w",
"j",
"w",
"j++",
"j++",
"j",
"{\n\t\t\tlots[0][j] = j+1;\n\t\t}",
"{\n\t\t\tlots[0][j] = j+1;\n\t\t}",
"lots[0][j] = j+1",
"lots[0][j]",
"lots[0]",
"lots",
"0",
"j",
"j+1",
"j",
"1",
"for (int i = 1; i < n + 1; i++) {\n\t\t\tString num = scan.next();\n\t\t\tint a = num.indexOf(\",\");\n\t\t\tint p = Integer.parseInt(num.substring(0, a))-1;\n\t\t\tint q = Integer.parseInt(num.substring(a+1, num.length()))-1;\n\t\t\t\n\t\t\tfor (int j = 0; j < w; j++) {\n\t\t\t\tif (j != p && j != q) {\n\t\t\t\t\tlots[i][j] = lots[i - 1][j];\n\t\t\t\t}else {\n\t\t\t\t\tlots[i][p] = lots[i - 1][q];\n\t\t\t\t\tlots[i][q] = lots[i - 1][p];\n\t\t\t\t}\n\t\t\t}\n\t\t\t//debug(n);\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < n + 1",
"i",
"n + 1",
"n",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tString num = scan.next();\n\t\t\tint a = num.indexOf(\",\");\n\t\t\tint p = Integer.parseInt(num.substring(0, a))-1;\n\t\t\tint q = Integer.parseInt(num.substring(a+1, num.length()))-1;\n\t\t\t\n\t\t\tfor (int j = 0; j < w; j++) {\n\t\t\t\tif (j != p && j != q) {\n\t\t\t\t\tlots[i][j] = lots[i - 1][j];\n\t\t\t\t}else {\n\t\t\t\t\tlots[i][p] = lots[i - 1][q];\n\t\t\t\t\tlots[i][q] = lots[i - 1][p];\n\t\t\t\t}\n\t\t\t}\n\t\t\t//debug(n);\n\t\t}",
"{\n\t\t\tString num = scan.next();\n\t\t\tint a = num.indexOf(\",\");\n\t\t\tint p = Integer.parseInt(num.substring(0, a))-1;\n\t\t\tint q = Integer.parseInt(num.substring(a+1, num.length()))-1;\n\t\t\t\n\t\t\tfor (int j = 0; j < w; j++) {\n\t\t\t\tif (j != p && j != q) {\n\t\t\t\t\tlots[i][j] = lots[i - 1][j];\n\t\t\t\t}else {\n\t\t\t\t\tlots[i][p] = lots[i - 1][q];\n\t\t\t\t\tlots[i][q] = lots[i - 1][p];\n\t\t\t\t}\n\t\t\t}\n\t\t\t//debug(n);\n\t\t}",
"String num = scan.next();",
"num",
"scan.next()",
"scan.next",
"scan",
"int a = num.indexOf(\",\");",
"a",
"num.indexOf(\",\")",
"num.indexOf",
"num",
"\",\"",
"int p = Integer.parseInt(num.substring(0, a))-1;",
"p",
"Integer.parseInt(num.substring(0, a))-1",
"Integer.parseInt(num.substring(0, a))",
"Integer.parseInt",
"Integer",
"num.substring(0, a)",
"num.substring",
"num",
"0",
"a",
"1",
"int q = Integer.parseInt(num.substring(a+1, num.length()))-1;",
"q",
"Integer.parseInt(num.substring(a+1, num.length()))-1",
"Integer.parseInt(num.substring(a+1, num.length()))",
"Integer.parseInt",
"Integer",
"num.substring(a+1, num.length())",
"num.substring",
"num",
"a+1",
"a",
"1",
"num.length()",
"num.length",
"num",
"1",
"for (int j = 0; j < w; j++) {\n\t\t\t\tif (j != p && j != q) {\n\t\t\t\t\tlots[i][j] = lots[i - 1][j];\n\t\t\t\t}else {\n\t\t\t\t\tlots[i][p] = lots[i - 1][q];\n\t\t\t\t\tlots[i][q] = lots[i - 1][p];\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 (j != p && j != q) {\n\t\t\t\t\tlots[i][j] = lots[i - 1][j];\n\t\t\t\t}else {\n\t\t\t\t\tlots[i][p] = lots[i - 1][q];\n\t\t\t\t\tlots[i][q] = lots[i - 1][p];\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif (j != p && j != q) {\n\t\t\t\t\tlots[i][j] = lots[i - 1][j];\n\t\t\t\t}else {\n\t\t\t\t\tlots[i][p] = lots[i - 1][q];\n\t\t\t\t\tlots[i][q] = lots[i - 1][p];\n\t\t\t\t}\n\t\t\t}",
"if (j != p && j != q) {\n\t\t\t\t\tlots[i][j] = lots[i - 1][j];\n\t\t\t\t}else {\n\t\t\t\t\tlots[i][p] = lots[i - 1][q];\n\t\t\t\t\tlots[i][q] = lots[i - 1][p];\n\t\t\t\t}",
"j != p && j != q",
"j != p",
"j",
"p",
"j != q",
"j",
"q",
"{\n\t\t\t\t\tlots[i][j] = lots[i - 1][j];\n\t\t\t\t}",
"lots[i][j] = lots[i - 1][j]",
"lots[i][j]",
"lots[i]",
"lots",
"i",
"j",
"lots[i - 1][j]",
"lots[i - 1]",
"lots",
"i - 1",
"i",
"1",
"j",
"{\n\t\t\t\t\tlots[i][p] = lots[i - 1][q];\n\t\t\t\t\tlots[i][q] = lots[i - 1][p];\n\t\t\t\t}",
"lots[i][p] = lots[i - 1][q]",
"lots[i][p]",
"lots[i]",
"lots",
"i",
"p",
"lots[i - 1][q]",
"lots[i - 1]",
"lots",
"i - 1",
"i",
"1",
"q",
"lots[i][q] = lots[i - 1][p]",
"lots[i][q]",
"lots[i]",
"lots",
"i",
"q",
"lots[i - 1][p]",
"lots[i - 1]",
"lots",
"i - 1",
"i",
"1",
"p",
"for (int j = 0; j < w; j++) {\n\t\t\tSystem.out.println(lots[n][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(lots[n][j]);\n\t\t}",
"{\n\t\t\tSystem.out.println(lots[n][j]);\n\t\t}",
"System.out.println(lots[n][j])",
"System.out.println",
"System.out",
"System",
"System.out",
"lots[n][j]",
"lots[n]",
"lots",
"n",
"j",
"private void debug(int n) {\n\t\tfor (int i = 0; i < n+1; i++) {\n\t\t\tSystem.out.println(Arrays.toString(lots[i]));\n\t\t}\n\t\tSystem.out.println();\n\t}",
"debug",
"{\n\t\tfor (int i = 0; i < n+1; i++) {\n\t\t\tSystem.out.println(Arrays.toString(lots[i]));\n\t\t}\n\t\tSystem.out.println();\n\t}",
"for (int i = 0; i < n+1; i++) {\n\t\t\tSystem.out.println(Arrays.toString(lots[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.println(Arrays.toString(lots[i]));\n\t\t}",
"{\n\t\t\tSystem.out.println(Arrays.toString(lots[i]));\n\t\t}",
"System.out.println(Arrays.toString(lots[i]))",
"System.out.println",
"System.out",
"System",
"System.out",
"Arrays.toString(lots[i])",
"Arrays.toString",
"Arrays",
"lots[i]",
"lots",
"i",
"System.out.println()",
"System.out.println",
"System.out",
"System",
"System.out",
"int n",
"n",
"public class Main {\n\tprivate int lots[][];\n\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n\t\n\tprivate void run() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tlots = new int[n+1][w];\n\t\t\n\t\tfor (int j = 0; j < w; j++) {\n\t\t\tlots[0][j] = j+1;\n\t\t}\n\t\t\n\t\tfor (int i = 1; i < n + 1; i++) {\n\t\t\tString num = scan.next();\n\t\t\tint a = num.indexOf(\",\");\n\t\t\tint p = Integer.parseInt(num.substring(0, a))-1;\n\t\t\tint q = Integer.parseInt(num.substring(a+1, num.length()))-1;\n\t\t\t\n\t\t\tfor (int j = 0; j < w; j++) {\n\t\t\t\tif (j != p && j != q) {\n\t\t\t\t\tlots[i][j] = lots[i - 1][j];\n\t\t\t\t}else {\n\t\t\t\t\tlots[i][p] = lots[i - 1][q];\n\t\t\t\t\tlots[i][q] = lots[i - 1][p];\n\t\t\t\t}\n\t\t\t}\n\t\t\t//debug(n);\n\t\t}\n\t\t\n\t\tfor (int j = 0; j < w; j++) {\n\t\t\tSystem.out.println(lots[n][j]);\n\t\t}\n\t}\n\t\n\tprivate void debug(int n) {\n\t\tfor (int i = 0; i < n+1; i++) {\n\t\t\tSystem.out.println(Arrays.toString(lots[i]));\n\t\t}\n\t\tSystem.out.println();\n\t}\n\n}",
"public class Main {\n\tprivate int lots[][];\n\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n\t\n\tprivate void run() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tlots = new int[n+1][w];\n\t\t\n\t\tfor (int j = 0; j < w; j++) {\n\t\t\tlots[0][j] = j+1;\n\t\t}\n\t\t\n\t\tfor (int i = 1; i < n + 1; i++) {\n\t\t\tString num = scan.next();\n\t\t\tint a = num.indexOf(\",\");\n\t\t\tint p = Integer.parseInt(num.substring(0, a))-1;\n\t\t\tint q = Integer.parseInt(num.substring(a+1, num.length()))-1;\n\t\t\t\n\t\t\tfor (int j = 0; j < w; j++) {\n\t\t\t\tif (j != p && j != q) {\n\t\t\t\t\tlots[i][j] = lots[i - 1][j];\n\t\t\t\t}else {\n\t\t\t\t\tlots[i][p] = lots[i - 1][q];\n\t\t\t\t\tlots[i][q] = lots[i - 1][p];\n\t\t\t\t}\n\t\t\t}\n\t\t\t//debug(n);\n\t\t}\n\t\t\n\t\tfor (int j = 0; j < w; j++) {\n\t\t\tSystem.out.println(lots[n][j]);\n\t\t}\n\t}\n\t\n\tprivate void debug(int n) {\n\t\tfor (int i = 0; i < n+1; i++) {\n\t\t\tSystem.out.println(Arrays.toString(lots[i]));\n\t\t}\n\t\tSystem.out.println();\n\t}\n\n}",
"Main"
] | import java.util.Arrays;
import java.util.Scanner;
public class Main {
private int lots[][];
public static void main(String[] args) {
new Main().run();
}
private void run() {
Scanner scan = new Scanner(System.in);
int w = scan.nextInt();
int n = scan.nextInt();
lots = new int[n+1][w];
for (int j = 0; j < w; j++) {
lots[0][j] = j+1;
}
for (int i = 1; i < n + 1; i++) {
String num = scan.next();
int a = num.indexOf(",");
int p = Integer.parseInt(num.substring(0, a))-1;
int q = Integer.parseInt(num.substring(a+1, num.length()))-1;
for (int j = 0; j < w; j++) {
if (j != p && j != q) {
lots[i][j] = lots[i - 1][j];
}else {
lots[i][p] = lots[i - 1][q];
lots[i][q] = lots[i - 1][p];
}
}
//debug(n);
}
for (int j = 0; j < w; j++) {
System.out.println(lots[n][j]);
}
}
private void debug(int n) {
for (int i = 0; i < n+1; i++) {
System.out.println(Arrays.toString(lots[i]));
}
System.out.println();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
20,
17,
41,
13,
20,
17,
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,
0,
13,
4,
18,
4,
18,
13,
17,
17,
0,
18,
13,
17,
2,
4,
18,
13,
18,
13,
17,
17,
0,
18,
13,
17,
2,
4,
18,
13,
18,
13,
17,
17,
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,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
17,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
162,
8
],
[
162,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
11,
22
],
[
22,
23
],
[
11,
24
],
[
24,
25
],
[
24,
26
],
[
11,
28
],
[
28,
29
],
[
28,
30
],
[
11,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
11,
37
],
[
37,
38
],
[
37,
39
],
[
39,
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
],
[
83,
84
],
[
84,
85
],
[
81,
86
],
[
81,
87
],
[
78,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
96,
97
],
[
96,
98
],
[
92,
99
],
[
78,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
105,
108
],
[
108,
109
],
[
108,
110
],
[
104,
111
],
[
78,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
116,
118
],
[
78,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
122,
124
],
[
119,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
127,
129
],
[
78,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
133,
135
],
[
130,
136
],
[
11,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
137,
142
],
[
142,
143
],
[
142,
144
],
[
137,
145
],
[
145,
146
],
[
146,
147
],
[
137,
148
],
[
149,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
150,
155
],
[
150,
156
],
[
156,
157
],
[
156,
158
],
[
9,
159
],
[
159,
160
],
[
0,
161
],
[
161,
162
],
[
161,
163
]
] | [
"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<String> shuff= new ArrayList<String>();\n\t\tint w,n,tmp;\n\t\tint shuf_num[] =new int[2];\n\t\tString buf[]=new String[2];\n\t\tw=in.nextInt();\n\t\tn=in.nextInt();\n\t\tint a[]=new int[w];\n\t\tfor (int i=0;i<w;i++) {\n\t\t\ta[i] = i+1;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tbuf =(in.next()).split(\",\",0);\n\t\t\tshuf_num[0]=Integer.parseInt(buf[0])-1;\n\t\t\tshuf_num[1]=Integer.parseInt(buf[1])-1;\n\t\t\ttmp=a[shuf_num[0]];\n\t\t\ta[shuf_num[0]]=a[shuf_num[1]];\n\t\t\ta[shuf_num[1]]=tmp;\n\t\t}\n\t\tfor (int i=0;i<w;i++) {\n\t\t\t\tSystem.out.printf(\"%d%n\",a[i]);\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<String> shuff= new ArrayList<String>();\n\t\tint w,n,tmp;\n\t\tint shuf_num[] =new int[2];\n\t\tString buf[]=new String[2];\n\t\tw=in.nextInt();\n\t\tn=in.nextInt();\n\t\tint a[]=new int[w];\n\t\tfor (int i=0;i<w;i++) {\n\t\t\ta[i] = i+1;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tbuf =(in.next()).split(\",\",0);\n\t\t\tshuf_num[0]=Integer.parseInt(buf[0])-1;\n\t\t\tshuf_num[1]=Integer.parseInt(buf[1])-1;\n\t\t\ttmp=a[shuf_num[0]];\n\t\t\ta[shuf_num[0]]=a[shuf_num[1]];\n\t\t\ta[shuf_num[1]]=tmp;\n\t\t}\n\t\tfor (int i=0;i<w;i++) {\n\t\t\t\tSystem.out.printf(\"%d%n\",a[i]);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String args[]){\n\t\tScanner in=new Scanner(System.in);\n\t\tArrayList<String> shuff= new ArrayList<String>();\n\t\tint w,n,tmp;\n\t\tint shuf_num[] =new int[2];\n\t\tString buf[]=new String[2];\n\t\tw=in.nextInt();\n\t\tn=in.nextInt();\n\t\tint a[]=new int[w];\n\t\tfor (int i=0;i<w;i++) {\n\t\t\ta[i] = i+1;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tbuf =(in.next()).split(\",\",0);\n\t\t\tshuf_num[0]=Integer.parseInt(buf[0])-1;\n\t\t\tshuf_num[1]=Integer.parseInt(buf[1])-1;\n\t\t\ttmp=a[shuf_num[0]];\n\t\t\ta[shuf_num[0]]=a[shuf_num[1]];\n\t\t\ta[shuf_num[1]]=tmp;\n\t\t}\n\t\tfor (int i=0;i<w;i++) {\n\t\t\t\tSystem.out.printf(\"%d%n\",a[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner in=new Scanner(System.in);\n\t\tArrayList<String> shuff= new ArrayList<String>();\n\t\tint w,n,tmp;\n\t\tint shuf_num[] =new int[2];\n\t\tString buf[]=new String[2];\n\t\tw=in.nextInt();\n\t\tn=in.nextInt();\n\t\tint a[]=new int[w];\n\t\tfor (int i=0;i<w;i++) {\n\t\t\ta[i] = i+1;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tbuf =(in.next()).split(\",\",0);\n\t\t\tshuf_num[0]=Integer.parseInt(buf[0])-1;\n\t\t\tshuf_num[1]=Integer.parseInt(buf[1])-1;\n\t\t\ttmp=a[shuf_num[0]];\n\t\t\ta[shuf_num[0]]=a[shuf_num[1]];\n\t\t\ta[shuf_num[1]]=tmp;\n\t\t}\n\t\tfor (int i=0;i<w;i++) {\n\t\t\t\tSystem.out.printf(\"%d%n\",a[i]);\n\t\t}\n\t}",
"Scanner in=new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"ArrayList<String> shuff= new ArrayList<String>();",
"shuff",
"new ArrayList<String>()",
"int w",
"w",
"n",
"n",
"tmp;",
"tmp",
"int shuf_num[] =new int[2];",
"shuf_num",
"new int[2]",
"2",
"String buf[]=new String[2];",
"buf",
"new String[2]",
"2",
"w=in.nextInt()",
"w",
"in.nextInt()",
"in.nextInt",
"in",
"n=in.nextInt()",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int a[]=new int[w];",
"a",
"new int[w]",
"w",
"for (int i=0;i<w;i++) {\n\t\t\ta[i] = i+1;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"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\tbuf =(in.next()).split(\",\",0);\n\t\t\tshuf_num[0]=Integer.parseInt(buf[0])-1;\n\t\t\tshuf_num[1]=Integer.parseInt(buf[1])-1;\n\t\t\ttmp=a[shuf_num[0]];\n\t\t\ta[shuf_num[0]]=a[shuf_num[1]];\n\t\t\ta[shuf_num[1]]=tmp;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tbuf =(in.next()).split(\",\",0);\n\t\t\tshuf_num[0]=Integer.parseInt(buf[0])-1;\n\t\t\tshuf_num[1]=Integer.parseInt(buf[1])-1;\n\t\t\ttmp=a[shuf_num[0]];\n\t\t\ta[shuf_num[0]]=a[shuf_num[1]];\n\t\t\ta[shuf_num[1]]=tmp;\n\t\t}",
"{\n\t\t\tbuf =(in.next()).split(\",\",0);\n\t\t\tshuf_num[0]=Integer.parseInt(buf[0])-1;\n\t\t\tshuf_num[1]=Integer.parseInt(buf[1])-1;\n\t\t\ttmp=a[shuf_num[0]];\n\t\t\ta[shuf_num[0]]=a[shuf_num[1]];\n\t\t\ta[shuf_num[1]]=tmp;\n\t\t}",
"buf =(in.next()).split(\",\",0)",
"buf",
"(in.next()).split(\",\",0)",
"(in.next()).split",
"(in.next())",
"in.next",
"in",
"\",\"",
"0",
"shuf_num[0]=Integer.parseInt(buf[0])-1",
"shuf_num[0]",
"shuf_num",
"0",
"Integer.parseInt(buf[0])-1",
"Integer.parseInt(buf[0])",
"Integer.parseInt",
"Integer",
"buf[0]",
"buf",
"0",
"1",
"shuf_num[1]=Integer.parseInt(buf[1])-1",
"shuf_num[1]",
"shuf_num",
"1",
"Integer.parseInt(buf[1])-1",
"Integer.parseInt(buf[1])",
"Integer.parseInt",
"Integer",
"buf[1]",
"buf",
"1",
"1",
"tmp=a[shuf_num[0]]",
"tmp",
"a[shuf_num[0]]",
"a",
"shuf_num[0]",
"shuf_num",
"0",
"a[shuf_num[0]]=a[shuf_num[1]]",
"a[shuf_num[0]]",
"a",
"shuf_num[0]",
"shuf_num",
"0",
"a[shuf_num[1]]",
"a",
"shuf_num[1]",
"shuf_num",
"1",
"a[shuf_num[1]]=tmp",
"a[shuf_num[1]]",
"a",
"shuf_num[1]",
"shuf_num",
"1",
"tmp",
"for (int i=0;i<w;i++) {\n\t\t\t\tSystem.out.printf(\"%d%n\",a[i]);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\t\tSystem.out.printf(\"%d%n\",a[i]);\n\t\t}",
"{\n\t\t\t\tSystem.out.printf(\"%d%n\",a[i]);\n\t\t}",
"System.out.printf(\"%d%n\",a[i])",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%d%n\"",
"a[i]",
"a",
"i",
"String args[]",
"args",
"public class Main {\n\tpublic static void main(String args[]){\n\t\tScanner in=new Scanner(System.in);\n\t\tArrayList<String> shuff= new ArrayList<String>();\n\t\tint w,n,tmp;\n\t\tint shuf_num[] =new int[2];\n\t\tString buf[]=new String[2];\n\t\tw=in.nextInt();\n\t\tn=in.nextInt();\n\t\tint a[]=new int[w];\n\t\tfor (int i=0;i<w;i++) {\n\t\t\ta[i] = i+1;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tbuf =(in.next()).split(\",\",0);\n\t\t\tshuf_num[0]=Integer.parseInt(buf[0])-1;\n\t\t\tshuf_num[1]=Integer.parseInt(buf[1])-1;\n\t\t\ttmp=a[shuf_num[0]];\n\t\t\ta[shuf_num[0]]=a[shuf_num[1]];\n\t\t\ta[shuf_num[1]]=tmp;\n\t\t}\n\t\tfor (int i=0;i<w;i++) {\n\t\t\t\tSystem.out.printf(\"%d%n\",a[i]);\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<String> shuff= new ArrayList<String>();\n\t\tint w,n,tmp;\n\t\tint shuf_num[] =new int[2];\n\t\tString buf[]=new String[2];\n\t\tw=in.nextInt();\n\t\tn=in.nextInt();\n\t\tint a[]=new int[w];\n\t\tfor (int i=0;i<w;i++) {\n\t\t\ta[i] = i+1;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tbuf =(in.next()).split(\",\",0);\n\t\t\tshuf_num[0]=Integer.parseInt(buf[0])-1;\n\t\t\tshuf_num[1]=Integer.parseInt(buf[1])-1;\n\t\t\ttmp=a[shuf_num[0]];\n\t\t\ta[shuf_num[0]]=a[shuf_num[1]];\n\t\t\ta[shuf_num[1]]=tmp;\n\t\t}\n\t\tfor (int i=0;i<w;i++) {\n\t\t\t\tSystem.out.printf(\"%d%n\",a[i]);\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<String> shuff= new ArrayList<String>();
int w,n,tmp;
int shuf_num[] =new int[2];
String buf[]=new String[2];
w=in.nextInt();
n=in.nextInt();
int a[]=new int[w];
for (int i=0;i<w;i++) {
a[i] = i+1;
}
for(int i=0;i<n;i++){
buf =(in.next()).split(",",0);
shuf_num[0]=Integer.parseInt(buf[0])-1;
shuf_num[1]=Integer.parseInt(buf[1])-1;
tmp=a[shuf_num[0]];
a[shuf_num[0]]=a[shuf_num[1]];
a[shuf_num[1]]=tmp;
}
for (int i=0;i<w;i++) {
System.out.printf("%d%n",a[i]);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
18,
13,
13,
17,
4,
18,
13,
17,
30,
41,
13,
20,
41,
13,
41,
13,
20,
17,
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,
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,
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
] | [
[
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
],
[
13,
14
],
[
13,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
16,
21
],
[
15,
22
],
[
22,
23
],
[
23,
24
],
[
22,
25
],
[
12,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
26,
32
],
[
32,
33
],
[
32,
34
],
[
26,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
41,
42
],
[
42,
43
],
[
26,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
49,
50
],
[
50,
51
],
[
26,
52
],
[
52,
53
],
[
52,
54
],
[
26,
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
],
[
26,
76
],
[
76,
77
],
[
26,
78
],
[
78,
79
],
[
26,
80
],
[
80,
81
],
[
26,
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
],
[
98,
99
],
[
94,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
102,
105
],
[
94,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
109,
110
],
[
108,
111
],
[
111,
112
],
[
111,
113
],
[
94,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
117,
118
],
[
116,
119
],
[
119,
120
],
[
119,
121
],
[
94,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
126,
128
],
[
94,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
132,
134
],
[
129,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
137,
139
],
[
94,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
143,
145
],
[
140,
146
],
[
26,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
147,
152
],
[
152,
153
],
[
152,
154
],
[
147,
155
],
[
155,
156
],
[
156,
157
],
[
147,
158
],
[
159,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
160,
165
],
[
165,
166
],
[
165,
167
],
[
9,
168
],
[
168,
169
]
] | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nclass Main{\n public static void main(String args[]){\n\ttry{\n\t BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t String str;\n\t String strary[] = new String[2];\n\t int w = Integer.parseInt(br.readLine());\n\t int n = Integer.parseInt(br.readLine());\n\t int ary[] = new int[w];\n\t for (int i = 0; i < w; i++) {\n\t\tary[i] = i+1;\n\t }\n\t int a,b,tmp;\n\t for (int i = 0; i < n; i++) {\n\t\tstr = br.readLine();\n\t\tstrary = str.split(\",\");\n\t\ta = Integer.parseInt(strary[0]);\n\t\tb = Integer.parseInt(strary[1]);\n\t\ttmp = ary[a-1];\n\t\tary[a-1] = ary[b-1];\n\t\tary[b-1] = tmp;\n\t }\n\t for (int i = 0; i < w; i++) {\n\t\tSystem.out.println(ary[i]);\n\t }\n\t}\n\tcatch(Exception e){\n\t System.out.println(\"error\");\n\t System.exit(0);\n\t}\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"class Main{\n public static void main(String args[]){\n\ttry{\n\t BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t String str;\n\t String strary[] = new String[2];\n\t int w = Integer.parseInt(br.readLine());\n\t int n = Integer.parseInt(br.readLine());\n\t int ary[] = new int[w];\n\t for (int i = 0; i < w; i++) {\n\t\tary[i] = i+1;\n\t }\n\t int a,b,tmp;\n\t for (int i = 0; i < n; i++) {\n\t\tstr = br.readLine();\n\t\tstrary = str.split(\",\");\n\t\ta = Integer.parseInt(strary[0]);\n\t\tb = Integer.parseInt(strary[1]);\n\t\ttmp = ary[a-1];\n\t\tary[a-1] = ary[b-1];\n\t\tary[b-1] = tmp;\n\t }\n\t for (int i = 0; i < w; i++) {\n\t\tSystem.out.println(ary[i]);\n\t }\n\t}\n\tcatch(Exception e){\n\t System.out.println(\"error\");\n\t System.exit(0);\n\t}\n }\n}",
"Main",
"public static void main(String args[]){\n\ttry{\n\t BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t String str;\n\t String strary[] = new String[2];\n\t int w = Integer.parseInt(br.readLine());\n\t int n = Integer.parseInt(br.readLine());\n\t int ary[] = new int[w];\n\t for (int i = 0; i < w; i++) {\n\t\tary[i] = i+1;\n\t }\n\t int a,b,tmp;\n\t for (int i = 0; i < n; i++) {\n\t\tstr = br.readLine();\n\t\tstrary = str.split(\",\");\n\t\ta = Integer.parseInt(strary[0]);\n\t\tb = Integer.parseInt(strary[1]);\n\t\ttmp = ary[a-1];\n\t\tary[a-1] = ary[b-1];\n\t\tary[b-1] = tmp;\n\t }\n\t for (int i = 0; i < w; i++) {\n\t\tSystem.out.println(ary[i]);\n\t }\n\t}\n\tcatch(Exception e){\n\t System.out.println(\"error\");\n\t System.exit(0);\n\t}\n }",
"main",
"{\n\ttry{\n\t BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t String str;\n\t String strary[] = new String[2];\n\t int w = Integer.parseInt(br.readLine());\n\t int n = Integer.parseInt(br.readLine());\n\t int ary[] = new int[w];\n\t for (int i = 0; i < w; i++) {\n\t\tary[i] = i+1;\n\t }\n\t int a,b,tmp;\n\t for (int i = 0; i < n; i++) {\n\t\tstr = br.readLine();\n\t\tstrary = str.split(\",\");\n\t\ta = Integer.parseInt(strary[0]);\n\t\tb = Integer.parseInt(strary[1]);\n\t\ttmp = ary[a-1];\n\t\tary[a-1] = ary[b-1];\n\t\tary[b-1] = tmp;\n\t }\n\t for (int i = 0; i < w; i++) {\n\t\tSystem.out.println(ary[i]);\n\t }\n\t}\n\tcatch(Exception e){\n\t System.out.println(\"error\");\n\t System.exit(0);\n\t}\n }",
"try{\n\t BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t String str;\n\t String strary[] = new String[2];\n\t int w = Integer.parseInt(br.readLine());\n\t int n = Integer.parseInt(br.readLine());\n\t int ary[] = new int[w];\n\t for (int i = 0; i < w; i++) {\n\t\tary[i] = i+1;\n\t }\n\t int a,b,tmp;\n\t for (int i = 0; i < n; i++) {\n\t\tstr = br.readLine();\n\t\tstrary = str.split(\",\");\n\t\ta = Integer.parseInt(strary[0]);\n\t\tb = Integer.parseInt(strary[1]);\n\t\ttmp = ary[a-1];\n\t\tary[a-1] = ary[b-1];\n\t\tary[b-1] = tmp;\n\t }\n\t for (int i = 0; i < w; i++) {\n\t\tSystem.out.println(ary[i]);\n\t }\n\t}\n\tcatch(Exception e){\n\t System.out.println(\"error\");\n\t System.exit(0);\n\t}",
"catch(Exception e){\n\t System.out.println(\"error\");\n\t System.exit(0);\n\t}",
"Exception e",
"{\n\t System.out.println(\"error\");\n\t System.exit(0);\n\t}",
"System.out.println(\"error\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"error\"",
"System.exit(0)",
"System.exit",
"System",
"0",
"{\n\t BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t String str;\n\t String strary[] = new String[2];\n\t int w = Integer.parseInt(br.readLine());\n\t int n = Integer.parseInt(br.readLine());\n\t int ary[] = new int[w];\n\t for (int i = 0; i < w; i++) {\n\t\tary[i] = i+1;\n\t }\n\t int a,b,tmp;\n\t for (int i = 0; i < n; i++) {\n\t\tstr = br.readLine();\n\t\tstrary = str.split(\",\");\n\t\ta = Integer.parseInt(strary[0]);\n\t\tb = Integer.parseInt(strary[1]);\n\t\ttmp = ary[a-1];\n\t\tary[a-1] = ary[b-1];\n\t\tary[b-1] = tmp;\n\t }\n\t for (int i = 0; i < w; i++) {\n\t\tSystem.out.println(ary[i]);\n\t }\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String str;",
"str",
"String strary[] = new String[2];",
"strary",
"new String[2]",
"2",
"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 ary[] = new int[w];",
"ary",
"new int[w]",
"w",
"for (int i = 0; i < w; i++) {\n\t\tary[i] = i+1;\n\t }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\tary[i] = i+1;\n\t }",
"{\n\t\tary[i] = i+1;\n\t }",
"ary[i] = i+1",
"ary[i]",
"ary",
"i",
"i+1",
"i",
"1",
"int a",
"a",
"b",
"b",
"tmp;",
"tmp",
"for (int i = 0; i < n; i++) {\n\t\tstr = br.readLine();\n\t\tstrary = str.split(\",\");\n\t\ta = Integer.parseInt(strary[0]);\n\t\tb = Integer.parseInt(strary[1]);\n\t\ttmp = ary[a-1];\n\t\tary[a-1] = ary[b-1];\n\t\tary[b-1] = tmp;\n\t }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\tstr = br.readLine();\n\t\tstrary = str.split(\",\");\n\t\ta = Integer.parseInt(strary[0]);\n\t\tb = Integer.parseInt(strary[1]);\n\t\ttmp = ary[a-1];\n\t\tary[a-1] = ary[b-1];\n\t\tary[b-1] = tmp;\n\t }",
"{\n\t\tstr = br.readLine();\n\t\tstrary = str.split(\",\");\n\t\ta = Integer.parseInt(strary[0]);\n\t\tb = Integer.parseInt(strary[1]);\n\t\ttmp = ary[a-1];\n\t\tary[a-1] = ary[b-1];\n\t\tary[b-1] = tmp;\n\t }",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"strary = str.split(\",\")",
"strary",
"str.split(\",\")",
"str.split",
"str",
"\",\"",
"a = Integer.parseInt(strary[0])",
"a",
"Integer.parseInt(strary[0])",
"Integer.parseInt",
"Integer",
"strary[0]",
"strary",
"0",
"b = Integer.parseInt(strary[1])",
"b",
"Integer.parseInt(strary[1])",
"Integer.parseInt",
"Integer",
"strary[1]",
"strary",
"1",
"tmp = ary[a-1]",
"tmp",
"ary[a-1]",
"ary",
"a-1",
"a",
"1",
"ary[a-1] = ary[b-1]",
"ary[a-1]",
"ary",
"a-1",
"a",
"1",
"ary[b-1]",
"ary",
"b-1",
"b",
"1",
"ary[b-1] = tmp",
"ary[b-1]",
"ary",
"b-1",
"b",
"1",
"tmp",
"for (int i = 0; i < w; i++) {\n\t\tSystem.out.println(ary[i]);\n\t }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\tSystem.out.println(ary[i]);\n\t }",
"{\n\t\tSystem.out.println(ary[i]);\n\t }",
"System.out.println(ary[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"ary[i]",
"ary",
"i",
"String args[]",
"args"
] | import java.io.BufferedReader;
import java.io.InputStreamReader;
class Main{
public static void main(String args[]){
try{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str;
String strary[] = new String[2];
int w = Integer.parseInt(br.readLine());
int n = Integer.parseInt(br.readLine());
int ary[] = new int[w];
for (int i = 0; i < w; i++) {
ary[i] = i+1;
}
int a,b,tmp;
for (int i = 0; i < n; i++) {
str = br.readLine();
strary = str.split(",");
a = Integer.parseInt(strary[0]);
b = Integer.parseInt(strary[1]);
tmp = ary[a-1];
ary[a-1] = ary[b-1];
ary[b-1] = tmp;
}
for (int i = 0; i < w; i++) {
System.out.println(ary[i]);
}
}
catch(Exception e){
System.out.println("error");
System.exit(0);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
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
],
[
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
],
[
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
],
[
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
],
[
121,
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 sc = new Scanner(System.in);\n int w1 = sc.nextInt();\n int[] w2 = new int[w1];\n for(int i=0;i<w1;i++){\n w2[i] = i+1;\n }\n int n = sc.nextInt();\n for(int i=0;i<n;i++){\n String str = sc.next();\n String[] str2 = str.split(\",\");\n int a = Integer.parseInt(str2[0])-1;\n int b = Integer.parseInt(str2[1])-1;\n int tmp;\n tmp = w2[a];\n w2[a] = w2[b];\n w2[b] = tmp;\n }\n for(int i=0;i<w1;i++){\n System.out.println(w2[i]);\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 w1 = sc.nextInt();\n int[] w2 = new int[w1];\n for(int i=0;i<w1;i++){\n w2[i] = i+1;\n }\n int n = sc.nextInt();\n for(int i=0;i<n;i++){\n String str = sc.next();\n String[] str2 = str.split(\",\");\n int a = Integer.parseInt(str2[0])-1;\n int b = Integer.parseInt(str2[1])-1;\n int tmp;\n tmp = w2[a];\n w2[a] = w2[b];\n w2[b] = tmp;\n }\n for(int i=0;i<w1;i++){\n System.out.println(w2[i]);\n }\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int w1 = sc.nextInt();\n int[] w2 = new int[w1];\n for(int i=0;i<w1;i++){\n w2[i] = i+1;\n }\n int n = sc.nextInt();\n for(int i=0;i<n;i++){\n String str = sc.next();\n String[] str2 = str.split(\",\");\n int a = Integer.parseInt(str2[0])-1;\n int b = Integer.parseInt(str2[1])-1;\n int tmp;\n tmp = w2[a];\n w2[a] = w2[b];\n w2[b] = tmp;\n }\n for(int i=0;i<w1;i++){\n System.out.println(w2[i]);\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int w1 = sc.nextInt();\n int[] w2 = new int[w1];\n for(int i=0;i<w1;i++){\n w2[i] = i+1;\n }\n int n = sc.nextInt();\n for(int i=0;i<n;i++){\n String str = sc.next();\n String[] str2 = str.split(\",\");\n int a = Integer.parseInt(str2[0])-1;\n int b = Integer.parseInt(str2[1])-1;\n int tmp;\n tmp = w2[a];\n w2[a] = w2[b];\n w2[b] = tmp;\n }\n for(int i=0;i<w1;i++){\n System.out.println(w2[i]);\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w1 = sc.nextInt();",
"w1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] w2 = new int[w1];",
"w2",
"new int[w1]",
"w1",
"for(int i=0;i<w1;i++){\n w2[i] = i+1;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w1",
"i",
"w1",
"i++",
"i++",
"i",
"{\n w2[i] = i+1;\n }",
"{\n w2[i] = i+1;\n }",
"w2[i] = i+1",
"w2[i]",
"w2",
"i",
"i+1",
"i",
"1",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0;i<n;i++){\n String str = sc.next();\n String[] str2 = str.split(\",\");\n int a = Integer.parseInt(str2[0])-1;\n int b = Integer.parseInt(str2[1])-1;\n int tmp;\n tmp = w2[a];\n w2[a] = w2[b];\n w2[b] = tmp;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String str = sc.next();\n String[] str2 = str.split(\",\");\n int a = Integer.parseInt(str2[0])-1;\n int b = Integer.parseInt(str2[1])-1;\n int tmp;\n tmp = w2[a];\n w2[a] = w2[b];\n w2[b] = tmp;\n }",
"{\n String str = sc.next();\n String[] str2 = str.split(\",\");\n int a = Integer.parseInt(str2[0])-1;\n int b = Integer.parseInt(str2[1])-1;\n int tmp;\n tmp = w2[a];\n w2[a] = w2[b];\n w2[b] = tmp;\n }",
"String str = sc.next();",
"str",
"sc.next()",
"sc.next",
"sc",
"String[] str2 = str.split(\",\");",
"str2",
"str.split(\",\")",
"str.split",
"str",
"\",\"",
"int a = Integer.parseInt(str2[0])-1;",
"a",
"Integer.parseInt(str2[0])-1",
"Integer.parseInt(str2[0])",
"Integer.parseInt",
"Integer",
"str2[0]",
"str2",
"0",
"1",
"int b = Integer.parseInt(str2[1])-1;",
"b",
"Integer.parseInt(str2[1])-1",
"Integer.parseInt(str2[1])",
"Integer.parseInt",
"Integer",
"str2[1]",
"str2",
"1",
"1",
"int tmp;",
"tmp",
"tmp = w2[a]",
"tmp",
"w2[a]",
"w2",
"a",
"w2[a] = w2[b]",
"w2[a]",
"w2",
"a",
"w2[b]",
"w2",
"b",
"w2[b] = tmp",
"w2[b]",
"w2",
"b",
"tmp",
"for(int i=0;i<w1;i++){\n System.out.println(w2[i]);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w1",
"i",
"w1",
"i++",
"i++",
"i",
"{\n System.out.println(w2[i]);\n }",
"{\n System.out.println(w2[i]);\n }",
"System.out.println(w2[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"w2[i]",
"w2",
"i",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int w1 = sc.nextInt();\n int[] w2 = new int[w1];\n for(int i=0;i<w1;i++){\n w2[i] = i+1;\n }\n int n = sc.nextInt();\n for(int i=0;i<n;i++){\n String str = sc.next();\n String[] str2 = str.split(\",\");\n int a = Integer.parseInt(str2[0])-1;\n int b = Integer.parseInt(str2[1])-1;\n int tmp;\n tmp = w2[a];\n w2[a] = w2[b];\n w2[b] = tmp;\n }\n for(int i=0;i<w1;i++){\n System.out.println(w2[i]);\n }\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int w1 = sc.nextInt();\n int[] w2 = new int[w1];\n for(int i=0;i<w1;i++){\n w2[i] = i+1;\n }\n int n = sc.nextInt();\n for(int i=0;i<n;i++){\n String str = sc.next();\n String[] str2 = str.split(\",\");\n int a = Integer.parseInt(str2[0])-1;\n int b = Integer.parseInt(str2[1])-1;\n int tmp;\n tmp = w2[a];\n w2[a] = w2[b];\n w2[b] = tmp;\n }\n for(int i=0;i<w1;i++){\n System.out.println(w2[i]);\n }\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int w1 = sc.nextInt();
int[] w2 = new int[w1];
for(int i=0;i<w1;i++){
w2[i] = i+1;
}
int n = sc.nextInt();
for(int i=0;i<n;i++){
String str = sc.next();
String[] str2 = str.split(",");
int a = Integer.parseInt(str2[0])-1;
int b = Integer.parseInt(str2[1])-1;
int tmp;
tmp = w2[a];
w2[a] = w2[b];
w2[b] = tmp;
}
for(int i=0;i<w1;i++){
System.out.println(w2[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,
0,
18,
13,
13,
13,
41,
13,
4,
18,
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,
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
],
[
119,
5
],
[
119,
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
],
[
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
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
96,
101
],
[
101,
102
],
[
101,
103
],
[
96,
104
],
[
104,
105
],
[
105,
106
],
[
96,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
108,
113
],
[
113,
114
],
[
113,
115
],
[
6,
116
],
[
116,
117
],
[
0,
118
],
[
118,
119
],
[
118,
120
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint w = stdIn.nextInt();\n\t\tint[] a = new int[w+1];\n\t\tfor (int i = 1; i <= w; i++)\n\t\t\ta[i] = i;\n\t\tint s = stdIn.nextInt();\n\t\tfor (; s != 0; s--) {\n\t\t\tString[] S = stdIn.next().split(\",\");\n\t\t\tint l = Integer.parseInt(S[0]);\n\t\t\tint r = Integer.parseInt(S[1]);\n\t\t\tint t = a[l];\n\t\t\ta[l] = a[r];\n\t\t\ta[r] = t;\n\t\t}\n\t\tfor (int i = 1; i <= w; i++)\n\t\t\tSystem.out.println(a[i]);\n\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint w = stdIn.nextInt();\n\t\tint[] a = new int[w+1];\n\t\tfor (int i = 1; i <= w; i++)\n\t\t\ta[i] = i;\n\t\tint s = stdIn.nextInt();\n\t\tfor (; s != 0; s--) {\n\t\t\tString[] S = stdIn.next().split(\",\");\n\t\t\tint l = Integer.parseInt(S[0]);\n\t\t\tint r = Integer.parseInt(S[1]);\n\t\t\tint t = a[l];\n\t\t\ta[l] = a[r];\n\t\t\ta[r] = t;\n\t\t}\n\t\tfor (int i = 1; i <= w; i++)\n\t\t\tSystem.out.println(a[i]);\n\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[] a = new int[w+1];\n\t\tfor (int i = 1; i <= w; i++)\n\t\t\ta[i] = i;\n\t\tint s = stdIn.nextInt();\n\t\tfor (; s != 0; s--) {\n\t\t\tString[] S = stdIn.next().split(\",\");\n\t\t\tint l = Integer.parseInt(S[0]);\n\t\t\tint r = Integer.parseInt(S[1]);\n\t\t\tint t = a[l];\n\t\t\ta[l] = a[r];\n\t\t\ta[r] = t;\n\t\t}\n\t\tfor (int i = 1; i <= w; i++)\n\t\t\tSystem.out.println(a[i]);\n\n\t}",
"main",
"{\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint w = stdIn.nextInt();\n\t\tint[] a = new int[w+1];\n\t\tfor (int i = 1; i <= w; i++)\n\t\t\ta[i] = i;\n\t\tint s = stdIn.nextInt();\n\t\tfor (; s != 0; s--) {\n\t\t\tString[] S = stdIn.next().split(\",\");\n\t\t\tint l = Integer.parseInt(S[0]);\n\t\t\tint r = Integer.parseInt(S[1]);\n\t\t\tint t = a[l];\n\t\t\ta[l] = a[r];\n\t\t\ta[r] = t;\n\t\t}\n\t\tfor (int i = 1; i <= w; i++)\n\t\t\tSystem.out.println(a[i]);\n\n\t}",
"Scanner stdIn = new Scanner(System.in);",
"stdIn",
"new Scanner(System.in)",
"int w = stdIn.nextInt();",
"w",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"int[] 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;",
"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",
"int s = stdIn.nextInt();",
"s",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"for (; s != 0; s--) {\n\t\t\tString[] S = stdIn.next().split(\",\");\n\t\t\tint l = Integer.parseInt(S[0]);\n\t\t\tint r = Integer.parseInt(S[1]);\n\t\t\tint t = a[l];\n\t\t\ta[l] = a[r];\n\t\t\ta[r] = t;\n\t\t}",
";",
"s != 0",
"s",
"0",
"s--",
"s--",
"s",
"{\n\t\t\tString[] S = stdIn.next().split(\",\");\n\t\t\tint l = Integer.parseInt(S[0]);\n\t\t\tint r = Integer.parseInt(S[1]);\n\t\t\tint t = a[l];\n\t\t\ta[l] = a[r];\n\t\t\ta[r] = t;\n\t\t}",
"{\n\t\t\tString[] S = stdIn.next().split(\",\");\n\t\t\tint l = Integer.parseInt(S[0]);\n\t\t\tint r = Integer.parseInt(S[1]);\n\t\t\tint t = a[l];\n\t\t\ta[l] = a[r];\n\t\t\ta[r] = t;\n\t\t}",
"String[] S = stdIn.next().split(\",\");",
"S",
"stdIn.next().split(\",\")",
"stdIn.next().split",
"stdIn.next()",
"stdIn.next",
"stdIn",
"\",\"",
"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 t = a[l];",
"t",
"a[l]",
"a",
"l",
"a[l] = a[r]",
"a[l]",
"a",
"l",
"a[r]",
"a",
"r",
"a[r] = t",
"a[r]",
"a",
"r",
"t",
"for (int i = 1; i <= w; i++)\n\t\t\tSystem.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 stdIn = new Scanner(System.in);\n\t\tint w = stdIn.nextInt();\n\t\tint[] a = new int[w+1];\n\t\tfor (int i = 1; i <= w; i++)\n\t\t\ta[i] = i;\n\t\tint s = stdIn.nextInt();\n\t\tfor (; s != 0; s--) {\n\t\t\tString[] S = stdIn.next().split(\",\");\n\t\t\tint l = Integer.parseInt(S[0]);\n\t\t\tint r = Integer.parseInt(S[1]);\n\t\t\tint t = a[l];\n\t\t\ta[l] = a[r];\n\t\t\ta[r] = t;\n\t\t}\n\t\tfor (int i = 1; i <= w; i++)\n\t\t\tSystem.out.println(a[i]);\n\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint w = stdIn.nextInt();\n\t\tint[] a = new int[w+1];\n\t\tfor (int i = 1; i <= w; i++)\n\t\t\ta[i] = i;\n\t\tint s = stdIn.nextInt();\n\t\tfor (; s != 0; s--) {\n\t\t\tString[] S = stdIn.next().split(\",\");\n\t\t\tint l = Integer.parseInt(S[0]);\n\t\t\tint r = Integer.parseInt(S[1]);\n\t\t\tint t = a[l];\n\t\t\ta[l] = a[r];\n\t\t\ta[r] = t;\n\t\t}\n\t\tfor (int i = 1; i <= w; i++)\n\t\t\tSystem.out.println(a[i]);\n\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[] a = new int[w+1];
for (int i = 1; i <= w; i++)
a[i] = i;
int s = stdIn.nextInt();
for (; s != 0; s--) {
String[] S = stdIn.next().split(",");
int l = Integer.parseInt(S[0]);
int r = Integer.parseInt(S[1]);
int t = a[l];
a[l] = a[r];
a[r] = t;
}
for (int i = 1; i <= w; i++)
System.out.println(a[i]);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
4,
18,
13,
17,
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,
2,
4,
18,
13,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
4,
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,
29,
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
],
[
12,
15
],
[
8,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
18,
21
],
[
21,
22
],
[
22,
23
],
[
8,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
26,
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
],
[
72,
75
],
[
75,
76
],
[
76,
77
],
[
71,
78
],
[
68,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
85,
86
],
[
86,
87
],
[
81,
88
],
[
68,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
91,
93
],
[
68,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
98,
99
],
[
98,
100
],
[
68,
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
],
[
8,
127
],
[
6,
128
],
[
128,
129
],
[
0,
130
],
[
130,
131
],
[
130,
132
]
] | [
"import java.util.Scanner;\n\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tscan.useDelimiter(\",|//s|\\n\");\n\t\tint w = Integer.parseInt(scan.next());\n\t\tint n = Integer.parseInt(scan.next());\n\t\tint[] number = new int[w];\n\t\tfor( int i = 0; i < w; i++){\n\t\t\tnumber[i] = i+1;\n\t\t}\n\t\tfor( int i = 0; i < n; i++ ){\n\t\t\tint a = Integer.parseInt(scan.next()) - 1;\n\t\t\tint b = Integer.parseInt(scan.next()) - 1;\n\t\t\tint temp = number[a];\n\t\t\tnumber[a] = number[b];\n\t\t\tnumber[b] = temp;\n\t\t}\n\t\tfor( int i = 0; i < w; i++ ){\n\t\t\tSystem.out.println(number[i]);\n\t\t}\n\t\treturn;\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tscan.useDelimiter(\",|//s|\\n\");\n\t\tint w = Integer.parseInt(scan.next());\n\t\tint n = Integer.parseInt(scan.next());\n\t\tint[] number = new int[w];\n\t\tfor( int i = 0; i < w; i++){\n\t\t\tnumber[i] = i+1;\n\t\t}\n\t\tfor( int i = 0; i < n; i++ ){\n\t\t\tint a = Integer.parseInt(scan.next()) - 1;\n\t\t\tint b = Integer.parseInt(scan.next()) - 1;\n\t\t\tint temp = number[a];\n\t\t\tnumber[a] = number[b];\n\t\t\tnumber[b] = temp;\n\t\t}\n\t\tfor( int i = 0; i < w; i++ ){\n\t\t\tSystem.out.println(number[i]);\n\t\t}\n\t\treturn;\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tscan.useDelimiter(\",|//s|\\n\");\n\t\tint w = Integer.parseInt(scan.next());\n\t\tint n = Integer.parseInt(scan.next());\n\t\tint[] number = new int[w];\n\t\tfor( int i = 0; i < w; i++){\n\t\t\tnumber[i] = i+1;\n\t\t}\n\t\tfor( int i = 0; i < n; i++ ){\n\t\t\tint a = Integer.parseInt(scan.next()) - 1;\n\t\t\tint b = Integer.parseInt(scan.next()) - 1;\n\t\t\tint temp = number[a];\n\t\t\tnumber[a] = number[b];\n\t\t\tnumber[b] = temp;\n\t\t}\n\t\tfor( int i = 0; i < w; i++ ){\n\t\t\tSystem.out.println(number[i]);\n\t\t}\n\t\treturn;\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tscan.useDelimiter(\",|//s|\\n\");\n\t\tint w = Integer.parseInt(scan.next());\n\t\tint n = Integer.parseInt(scan.next());\n\t\tint[] number = new int[w];\n\t\tfor( int i = 0; i < w; i++){\n\t\t\tnumber[i] = i+1;\n\t\t}\n\t\tfor( int i = 0; i < n; i++ ){\n\t\t\tint a = Integer.parseInt(scan.next()) - 1;\n\t\t\tint b = Integer.parseInt(scan.next()) - 1;\n\t\t\tint temp = number[a];\n\t\t\tnumber[a] = number[b];\n\t\t\tnumber[b] = temp;\n\t\t}\n\t\tfor( int i = 0; i < w; i++ ){\n\t\t\tSystem.out.println(number[i]);\n\t\t}\n\t\treturn;\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"scan.useDelimiter(\",|//s|\\n\")",
"scan.useDelimiter",
"scan",
"\",|//s|\\n\"",
"int w = Integer.parseInt(scan.next());",
"w",
"Integer.parseInt(scan.next())",
"Integer.parseInt",
"Integer",
"scan.next()",
"scan.next",
"scan",
"int n = Integer.parseInt(scan.next());",
"n",
"Integer.parseInt(scan.next())",
"Integer.parseInt",
"Integer",
"scan.next()",
"scan.next",
"scan",
"int[] number = new int[w];",
"number",
"new int[w]",
"w",
"for( int i = 0; i < w; i++){\n\t\t\tnumber[i] = i+1;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tnumber[i] = i+1;\n\t\t}",
"{\n\t\t\tnumber[i] = i+1;\n\t\t}",
"number[i] = i+1",
"number[i]",
"number",
"i",
"i+1",
"i",
"1",
"for( int i = 0; i < n; i++ ){\n\t\t\tint a = Integer.parseInt(scan.next()) - 1;\n\t\t\tint b = Integer.parseInt(scan.next()) - 1;\n\t\t\tint temp = number[a];\n\t\t\tnumber[a] = number[b];\n\t\t\tnumber[b] = temp;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint a = Integer.parseInt(scan.next()) - 1;\n\t\t\tint b = Integer.parseInt(scan.next()) - 1;\n\t\t\tint temp = number[a];\n\t\t\tnumber[a] = number[b];\n\t\t\tnumber[b] = temp;\n\t\t}",
"{\n\t\t\tint a = Integer.parseInt(scan.next()) - 1;\n\t\t\tint b = Integer.parseInt(scan.next()) - 1;\n\t\t\tint temp = number[a];\n\t\t\tnumber[a] = number[b];\n\t\t\tnumber[b] = temp;\n\t\t}",
"int a = Integer.parseInt(scan.next()) - 1;",
"a",
"Integer.parseInt(scan.next()) - 1",
"Integer.parseInt(scan.next())",
"Integer.parseInt",
"Integer",
"scan.next()",
"scan.next",
"scan",
"1",
"int b = Integer.parseInt(scan.next()) - 1;",
"b",
"Integer.parseInt(scan.next()) - 1",
"Integer.parseInt(scan.next())",
"Integer.parseInt",
"Integer",
"scan.next()",
"scan.next",
"scan",
"1",
"int temp = number[a];",
"temp",
"number[a]",
"number",
"a",
"number[a] = number[b]",
"number[a]",
"number",
"a",
"number[b]",
"number",
"b",
"number[b] = temp",
"number[b]",
"number",
"b",
"temp",
"for( int i = 0; i < w; i++ ){\n\t\t\tSystem.out.println(number[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(number[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(number[i]);\n\t\t}",
"System.out.println(number[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"number[i]",
"number",
"i",
"return;",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tscan.useDelimiter(\",|//s|\\n\");\n\t\tint w = Integer.parseInt(scan.next());\n\t\tint n = Integer.parseInt(scan.next());\n\t\tint[] number = new int[w];\n\t\tfor( int i = 0; i < w; i++){\n\t\t\tnumber[i] = i+1;\n\t\t}\n\t\tfor( int i = 0; i < n; i++ ){\n\t\t\tint a = Integer.parseInt(scan.next()) - 1;\n\t\t\tint b = Integer.parseInt(scan.next()) - 1;\n\t\t\tint temp = number[a];\n\t\t\tnumber[a] = number[b];\n\t\t\tnumber[b] = temp;\n\t\t}\n\t\tfor( int i = 0; i < w; i++ ){\n\t\t\tSystem.out.println(number[i]);\n\t\t}\n\t\treturn;\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tscan.useDelimiter(\",|//s|\\n\");\n\t\tint w = Integer.parseInt(scan.next());\n\t\tint n = Integer.parseInt(scan.next());\n\t\tint[] number = new int[w];\n\t\tfor( int i = 0; i < w; i++){\n\t\t\tnumber[i] = i+1;\n\t\t}\n\t\tfor( int i = 0; i < n; i++ ){\n\t\t\tint a = Integer.parseInt(scan.next()) - 1;\n\t\t\tint b = Integer.parseInt(scan.next()) - 1;\n\t\t\tint temp = number[a];\n\t\t\tnumber[a] = number[b];\n\t\t\tnumber[b] = temp;\n\t\t}\n\t\tfor( int i = 0; i < w; i++ ){\n\t\t\tSystem.out.println(number[i]);\n\t\t}\n\t\treturn;\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
scan.useDelimiter(",|//s|\n");
int w = Integer.parseInt(scan.next());
int n = Integer.parseInt(scan.next());
int[] number = new int[w];
for( int i = 0; i < w; i++){
number[i] = i+1;
}
for( int i = 0; i < n; i++ ){
int a = Integer.parseInt(scan.next()) - 1;
int b = Integer.parseInt(scan.next()) - 1;
int temp = number[a];
number[a] = number[b];
number[b] = temp;
}
for( int i = 0; i < w; i++ ){
System.out.println(number[i]);
}
return;
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
12,
13,
30,
0,
13,
20,
4,
18,
13,
17,
41,
13,
20,
17,
11,
1,
41,
13,
17,
2,
13,
17,
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,
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,
18,
13,
13,
4,
18,
13,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
121,
5
],
[
121,
6
],
[
6,
7
],
[
121,
8
],
[
8,
9
],
[
8,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
10,
18
],
[
18,
19
],
[
18,
20
],
[
10,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
22,
27
],
[
27,
28
],
[
27,
29
],
[
22,
30
],
[
30,
31
],
[
31,
32
],
[
22,
33
],
[
34,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
10,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
10,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
10,
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
],
[
62,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
75,
77
],
[
62,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
80,
82
],
[
62,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
62,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
10,
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
],
[
10,
114
],
[
114,
115
],
[
115,
116
],
[
114,
117
],
[
8,
118
],
[
118,
119
],
[
0,
120
],
[
120,
121
],
[
120,
122
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\tprivate static Scanner scan;\n\tpublic static void main(String[] args) {\n\t\tscan = new Scanner(System.in);\n\t\tscan.useDelimiter(\",|\\\\s+\");\n\t\tint a[] = new int[31];\n\t\tfor(int i = 0;i < 31;i++){\n\t\t\ta[i] = i;\n\t\t}\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tfor(int i = 0;i < n;i++){\t\t\t\n\t\t\tint a1 = scan.nextInt();\n\t\t\tint a2 = scan.nextInt();\n\t\t\tint b1 = a[a1];\n\t\t\tint b2 = a[a2];\n\t\t\ta[a1] = b2;\n\t\t\ta[a2] = b1;\n\t\t}\n\t\tfor(int i = 1;i <= w;i++ ){\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t\tSystem.exit(0);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tprivate static Scanner scan;\n\tpublic static void main(String[] args) {\n\t\tscan = new Scanner(System.in);\n\t\tscan.useDelimiter(\",|\\\\s+\");\n\t\tint a[] = new int[31];\n\t\tfor(int i = 0;i < 31;i++){\n\t\t\ta[i] = i;\n\t\t}\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tfor(int i = 0;i < n;i++){\t\t\t\n\t\t\tint a1 = scan.nextInt();\n\t\t\tint a2 = scan.nextInt();\n\t\t\tint b1 = a[a1];\n\t\t\tint b2 = a[a2];\n\t\t\ta[a1] = b2;\n\t\t\ta[a2] = b1;\n\t\t}\n\t\tfor(int i = 1;i <= w;i++ ){\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t\tSystem.exit(0);\n\t}\n}",
"Main",
"private static Scanner scan;",
"scan",
"public static void main(String[] args) {\n\t\tscan = new Scanner(System.in);\n\t\tscan.useDelimiter(\",|\\\\s+\");\n\t\tint a[] = new int[31];\n\t\tfor(int i = 0;i < 31;i++){\n\t\t\ta[i] = i;\n\t\t}\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tfor(int i = 0;i < n;i++){\t\t\t\n\t\t\tint a1 = scan.nextInt();\n\t\t\tint a2 = scan.nextInt();\n\t\t\tint b1 = a[a1];\n\t\t\tint b2 = a[a2];\n\t\t\ta[a1] = b2;\n\t\t\ta[a2] = b1;\n\t\t}\n\t\tfor(int i = 1;i <= w;i++ ){\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t\tSystem.exit(0);\n\t}",
"main",
"{\n\t\tscan = new Scanner(System.in);\n\t\tscan.useDelimiter(\",|\\\\s+\");\n\t\tint a[] = new int[31];\n\t\tfor(int i = 0;i < 31;i++){\n\t\t\ta[i] = i;\n\t\t}\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tfor(int i = 0;i < n;i++){\t\t\t\n\t\t\tint a1 = scan.nextInt();\n\t\t\tint a2 = scan.nextInt();\n\t\t\tint b1 = a[a1];\n\t\t\tint b2 = a[a2];\n\t\t\ta[a1] = b2;\n\t\t\ta[a2] = b1;\n\t\t}\n\t\tfor(int i = 1;i <= w;i++ ){\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t\tSystem.exit(0);\n\t}",
"scan = new Scanner(System.in)",
"scan",
"new Scanner(System.in)",
"scan.useDelimiter(\",|\\\\s+\")",
"scan.useDelimiter",
"scan",
"\",|\\\\s+\"",
"int a[] = new int[31];",
"a",
"new int[31]",
"31",
"for(int i = 0;i < 31;i++){\n\t\t\ta[i] = i;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < 31",
"i",
"31",
"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",
"int w = scan.nextInt();",
"w",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(int i = 0;i < n;i++){\t\t\t\n\t\t\tint a1 = scan.nextInt();\n\t\t\tint a2 = scan.nextInt();\n\t\t\tint b1 = a[a1];\n\t\t\tint b2 = a[a2];\n\t\t\ta[a1] = b2;\n\t\t\ta[a2] = b1;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\t\t\t\n\t\t\tint a1 = scan.nextInt();\n\t\t\tint a2 = scan.nextInt();\n\t\t\tint b1 = a[a1];\n\t\t\tint b2 = a[a2];\n\t\t\ta[a1] = b2;\n\t\t\ta[a2] = b1;\n\t\t}",
"{\t\t\t\n\t\t\tint a1 = scan.nextInt();\n\t\t\tint a2 = scan.nextInt();\n\t\t\tint b1 = a[a1];\n\t\t\tint b2 = a[a2];\n\t\t\ta[a1] = b2;\n\t\t\ta[a2] = b1;\n\t\t}",
"int a1 = scan.nextInt();",
"a1",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int a2 = scan.nextInt();",
"a2",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int b1 = a[a1];",
"b1",
"a[a1]",
"a",
"a1",
"int b2 = a[a2];",
"b2",
"a[a2]",
"a",
"a2",
"a[a1] = b2",
"a[a1]",
"a",
"a1",
"b2",
"a[a2] = b1",
"a[a2]",
"a",
"a2",
"b1",
"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",
"System.exit(0)",
"System.exit",
"System",
"0",
"String[] args",
"args",
"public class Main {\n\tprivate static Scanner scan;\n\tpublic static void main(String[] args) {\n\t\tscan = new Scanner(System.in);\n\t\tscan.useDelimiter(\",|\\\\s+\");\n\t\tint a[] = new int[31];\n\t\tfor(int i = 0;i < 31;i++){\n\t\t\ta[i] = i;\n\t\t}\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tfor(int i = 0;i < n;i++){\t\t\t\n\t\t\tint a1 = scan.nextInt();\n\t\t\tint a2 = scan.nextInt();\n\t\t\tint b1 = a[a1];\n\t\t\tint b2 = a[a2];\n\t\t\ta[a1] = b2;\n\t\t\ta[a2] = b1;\n\t\t}\n\t\tfor(int i = 1;i <= w;i++ ){\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t\tSystem.exit(0);\n\t}\n}",
"public class Main {\n\tprivate static Scanner scan;\n\tpublic static void main(String[] args) {\n\t\tscan = new Scanner(System.in);\n\t\tscan.useDelimiter(\",|\\\\s+\");\n\t\tint a[] = new int[31];\n\t\tfor(int i = 0;i < 31;i++){\n\t\t\ta[i] = i;\n\t\t}\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tfor(int i = 0;i < n;i++){\t\t\t\n\t\t\tint a1 = scan.nextInt();\n\t\t\tint a2 = scan.nextInt();\n\t\t\tint b1 = a[a1];\n\t\t\tint b2 = a[a2];\n\t\t\ta[a1] = b2;\n\t\t\ta[a2] = b1;\n\t\t}\n\t\tfor(int i = 1;i <= w;i++ ){\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t\tSystem.exit(0);\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
private static Scanner scan;
public static void main(String[] args) {
scan = new Scanner(System.in);
scan.useDelimiter(",|\\s+");
int a[] = new int[31];
for(int i = 0;i < 31;i++){
a[i] = i;
}
int w = scan.nextInt();
int n = scan.nextInt();
for(int i = 0;i < n;i++){
int a1 = scan.nextInt();
int a2 = scan.nextInt();
int b1 = a[a1];
int b2 = a[a2];
a[a1] = b2;
a[a2] = b1;
}
for(int i = 1;i <= w;i++ ){
System.out.println(a[i]);
}
System.exit(0);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
4,
18,
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,
17,
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
],
[
140,
14
],
[
140,
15
],
[
15,
16
],
[
15,
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
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
17,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
51,
53
],
[
17,
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
],
[
17,
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
],
[
128,
134
],
[
134,
135
],
[
134,
136
],
[
15,
137
],
[
137,
138
],
[
0,
139
],
[
139,
140
],
[
139,
141
]
] | [
"import java.io.*;\nimport java.util.*;\nimport java.lang.Math;\nimport java.util.Arrays;\n\npublic class Main {\n public static void main(final String[] args) {\n\n Scanner sc = new Scanner(System.in);\n \n int w = sc.nextInt();\n int ar[] = new int[w];\n int n = sc.nextInt();\n for (int i = 0; i < w; i++)\n ar[i] = i + 1;\n for (int i = 0; i < n; i++) {\n String buf = sc.next();\n String buf2[] = buf.split(\",\");\n int a = Integer.parseInt(buf2[0]) - 1, \n b = Integer.parseInt(buf2[1]) - 1;\n int tmp = ar[a];\n ar[a] = ar[b];\n ar[b] = tmp;\n }\n \n for (int i = 0; i < w; i++) {\n System.out.printf(\"%d\\n\", ar[i]);\n }\n }\n \n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"import java.lang.Math;",
"Math",
"java.lang",
"import java.util.Arrays;",
"Arrays",
"java.util",
"public class Main {\n public static void main(final String[] args) {\n\n Scanner sc = new Scanner(System.in);\n \n int w = sc.nextInt();\n int ar[] = new int[w];\n int n = sc.nextInt();\n for (int i = 0; i < w; i++)\n ar[i] = i + 1;\n for (int i = 0; i < n; i++) {\n String buf = sc.next();\n String buf2[] = buf.split(\",\");\n int a = Integer.parseInt(buf2[0]) - 1, \n b = Integer.parseInt(buf2[1]) - 1;\n int tmp = ar[a];\n ar[a] = ar[b];\n ar[b] = tmp;\n }\n \n for (int i = 0; i < w; i++) {\n System.out.printf(\"%d\\n\", ar[i]);\n }\n }\n \n}",
"Main",
"public static void main(final String[] args) {\n\n Scanner sc = new Scanner(System.in);\n \n int w = sc.nextInt();\n int ar[] = new int[w];\n int n = sc.nextInt();\n for (int i = 0; i < w; i++)\n ar[i] = i + 1;\n for (int i = 0; i < n; i++) {\n String buf = sc.next();\n String buf2[] = buf.split(\",\");\n int a = Integer.parseInt(buf2[0]) - 1, \n b = Integer.parseInt(buf2[1]) - 1;\n int tmp = ar[a];\n ar[a] = ar[b];\n ar[b] = tmp;\n }\n \n for (int i = 0; i < w; i++) {\n System.out.printf(\"%d\\n\", ar[i]);\n }\n }",
"main",
"{\n\n Scanner sc = new Scanner(System.in);\n \n int w = sc.nextInt();\n int ar[] = new int[w];\n int n = sc.nextInt();\n for (int i = 0; i < w; i++)\n ar[i] = i + 1;\n for (int i = 0; i < n; i++) {\n String buf = sc.next();\n String buf2[] = buf.split(\",\");\n int a = Integer.parseInt(buf2[0]) - 1, \n b = Integer.parseInt(buf2[1]) - 1;\n int tmp = ar[a];\n ar[a] = ar[b];\n ar[b] = tmp;\n }\n \n for (int i = 0; i < w; i++) {\n System.out.printf(\"%d\\n\", ar[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 ar[] = new int[w];",
"ar",
"new int[w]",
"w",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int i = 0; i < w; i++)\n ar[i] = i + 1;",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"ar[i] = i + 1;",
"ar[i] = i + 1",
"ar[i]",
"ar",
"i",
"i + 1",
"i",
"1",
"for (int i = 0; i < n; i++) {\n String buf = sc.next();\n String buf2[] = buf.split(\",\");\n int a = Integer.parseInt(buf2[0]) - 1, \n b = Integer.parseInt(buf2[1]) - 1;\n int tmp = ar[a];\n ar[a] = ar[b];\n ar[b] = tmp;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String buf = sc.next();\n String buf2[] = buf.split(\",\");\n int a = Integer.parseInt(buf2[0]) - 1, \n b = Integer.parseInt(buf2[1]) - 1;\n int tmp = ar[a];\n ar[a] = ar[b];\n ar[b] = tmp;\n }",
"{\n String buf = sc.next();\n String buf2[] = buf.split(\",\");\n int a = Integer.parseInt(buf2[0]) - 1, \n b = Integer.parseInt(buf2[1]) - 1;\n int tmp = ar[a];\n ar[a] = ar[b];\n ar[b] = tmp;\n }",
"String buf = sc.next();",
"buf",
"sc.next()",
"sc.next",
"sc",
"String buf2[] = buf.split(\",\");",
"buf2",
"buf.split(\",\")",
"buf.split",
"buf",
"\",\"",
"int a = Integer.parseInt(buf2[0]) - 1",
"a",
"Integer.parseInt(buf2[0]) - 1",
"Integer.parseInt(buf2[0])",
"Integer.parseInt",
"Integer",
"buf2[0]",
"buf2",
"0",
"1",
"b = Integer.parseInt(buf2[1]) - 1;",
"b",
"Integer.parseInt(buf2[1]) - 1",
"Integer.parseInt(buf2[1])",
"Integer.parseInt",
"Integer",
"buf2[1]",
"buf2",
"1",
"1",
"int tmp = ar[a];",
"tmp",
"ar[a]",
"ar",
"a",
"ar[a] = ar[b]",
"ar[a]",
"ar",
"a",
"ar[b]",
"ar",
"b",
"ar[b] = tmp",
"ar[b]",
"ar",
"b",
"tmp",
"for (int i = 0; i < w; i++) {\n System.out.printf(\"%d\\n\", ar[i]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n System.out.printf(\"%d\\n\", ar[i]);\n }",
"{\n System.out.printf(\"%d\\n\", ar[i]);\n }",
"System.out.printf(\"%d\\n\", ar[i])",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%d\\n\"",
"ar[i]",
"ar",
"i",
"final String[] args",
"args",
"public class Main {\n public static void main(final String[] args) {\n\n Scanner sc = new Scanner(System.in);\n \n int w = sc.nextInt();\n int ar[] = new int[w];\n int n = sc.nextInt();\n for (int i = 0; i < w; i++)\n ar[i] = i + 1;\n for (int i = 0; i < n; i++) {\n String buf = sc.next();\n String buf2[] = buf.split(\",\");\n int a = Integer.parseInt(buf2[0]) - 1, \n b = Integer.parseInt(buf2[1]) - 1;\n int tmp = ar[a];\n ar[a] = ar[b];\n ar[b] = tmp;\n }\n \n for (int i = 0; i < w; i++) {\n System.out.printf(\"%d\\n\", ar[i]);\n }\n }\n \n}",
"public class Main {\n public static void main(final String[] args) {\n\n Scanner sc = new Scanner(System.in);\n \n int w = sc.nextInt();\n int ar[] = new int[w];\n int n = sc.nextInt();\n for (int i = 0; i < w; i++)\n ar[i] = i + 1;\n for (int i = 0; i < n; i++) {\n String buf = sc.next();\n String buf2[] = buf.split(\",\");\n int a = Integer.parseInt(buf2[0]) - 1, \n b = Integer.parseInt(buf2[1]) - 1;\n int tmp = ar[a];\n ar[a] = ar[b];\n ar[b] = tmp;\n }\n \n for (int i = 0; i < w; i++) {\n System.out.printf(\"%d\\n\", ar[i]);\n }\n }\n \n}",
"Main"
] | import java.io.*;
import java.util.*;
import java.lang.Math;
import java.util.Arrays;
public class Main {
public static void main(final String[] args) {
Scanner sc = new Scanner(System.in);
int w = sc.nextInt();
int ar[] = new int[w];
int n = sc.nextInt();
for (int i = 0; i < w; i++)
ar[i] = i + 1;
for (int i = 0; i < n; i++) {
String buf = sc.next();
String buf2[] = buf.split(",");
int a = Integer.parseInt(buf2[0]) - 1,
b = Integer.parseInt(buf2[1]) - 1;
int tmp = ar[a];
ar[a] = ar[b];
ar[b] = tmp;
}
for (int i = 0; i < w; i++) {
System.out.printf("%d\n", ar[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,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
2,
13,
17,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
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,
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,
18,
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
],
[
150,
8
],
[
150,
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
],
[
22,
25
],
[
11,
26
],
[
26,
27
],
[
26,
28
],
[
11,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
30,
38
],
[
38,
39
],
[
39,
40
],
[
30,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
45,
47
],
[
42,
48
],
[
11,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
11,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
11,
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
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
72,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
72,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
89,
90
],
[
89,
91
],
[
72,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
97,
98
],
[
97,
99
],
[
72,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
104,
106
],
[
72,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
110,
112
],
[
107,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
115,
117
],
[
72,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
121,
123
],
[
118,
124
],
[
11,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
125,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
132,
134
],
[
125,
135
],
[
135,
136
],
[
136,
137
],
[
125,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
139,
144
],
[
144,
145
],
[
144,
146
],
[
9,
147
],
[
147,
148
],
[
0,
149
],
[
149,
150
],
[
149,
151
]
] | [
"import java.io.*;\nimport java.util.*;\npublic class Main{\n\tpublic static void main(String[] args)throws IOException{\n\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n\t\t//Scanner reader=new Scanner(System.in);\n\t\tString s=reader.readLine();\n\t\tint in=Integer.parseInt(s);\n\t\t//int in=reader.nextInt();\n\t\tint[] out=new int[in];\n\t\tfor(int i=1;i<=in;i++)out[i-1]=i;\n\t\t//in=reader.nextInt();\n\t\ts=reader.readLine();\n\t\tin=Integer.parseInt(s);\n\t\tfor(int i=0;i<in;i++){\n\t\t\tString s1=reader.readLine();\n\t\t\tString[] in1=s1.split(\",\");\n\t\t\tint a=Integer.parseInt(in1[0]);\n\t\t\tint b=Integer.parseInt(in1[1]);\n\t\t\tint tmp=out[a-1];\n\t\t\tout[a-1]=out[b-1];\n\t\t\tout[b-1]=tmp;\n\t\t}\n\t\tfor(int i=0;i<out.length;i++)System.out.println(out[i]);\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\tpublic static void main(String[] args)throws IOException{\n\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n\t\t//Scanner reader=new Scanner(System.in);\n\t\tString s=reader.readLine();\n\t\tint in=Integer.parseInt(s);\n\t\t//int in=reader.nextInt();\n\t\tint[] out=new int[in];\n\t\tfor(int i=1;i<=in;i++)out[i-1]=i;\n\t\t//in=reader.nextInt();\n\t\ts=reader.readLine();\n\t\tin=Integer.parseInt(s);\n\t\tfor(int i=0;i<in;i++){\n\t\t\tString s1=reader.readLine();\n\t\t\tString[] in1=s1.split(\",\");\n\t\t\tint a=Integer.parseInt(in1[0]);\n\t\t\tint b=Integer.parseInt(in1[1]);\n\t\t\tint tmp=out[a-1];\n\t\t\tout[a-1]=out[b-1];\n\t\t\tout[b-1]=tmp;\n\t\t}\n\t\tfor(int i=0;i<out.length;i++)System.out.println(out[i]);\n\t}\n}",
"Main",
"public static void main(String[] args)throws IOException{\n\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n\t\t//Scanner reader=new Scanner(System.in);\n\t\tString s=reader.readLine();\n\t\tint in=Integer.parseInt(s);\n\t\t//int in=reader.nextInt();\n\t\tint[] out=new int[in];\n\t\tfor(int i=1;i<=in;i++)out[i-1]=i;\n\t\t//in=reader.nextInt();\n\t\ts=reader.readLine();\n\t\tin=Integer.parseInt(s);\n\t\tfor(int i=0;i<in;i++){\n\t\t\tString s1=reader.readLine();\n\t\t\tString[] in1=s1.split(\",\");\n\t\t\tint a=Integer.parseInt(in1[0]);\n\t\t\tint b=Integer.parseInt(in1[1]);\n\t\t\tint tmp=out[a-1];\n\t\t\tout[a-1]=out[b-1];\n\t\t\tout[b-1]=tmp;\n\t\t}\n\t\tfor(int i=0;i<out.length;i++)System.out.println(out[i]);\n\t}",
"main",
"{\n\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n\t\t//Scanner reader=new Scanner(System.in);\n\t\tString s=reader.readLine();\n\t\tint in=Integer.parseInt(s);\n\t\t//int in=reader.nextInt();\n\t\tint[] out=new int[in];\n\t\tfor(int i=1;i<=in;i++)out[i-1]=i;\n\t\t//in=reader.nextInt();\n\t\ts=reader.readLine();\n\t\tin=Integer.parseInt(s);\n\t\tfor(int i=0;i<in;i++){\n\t\t\tString s1=reader.readLine();\n\t\t\tString[] in1=s1.split(\",\");\n\t\t\tint a=Integer.parseInt(in1[0]);\n\t\t\tint b=Integer.parseInt(in1[1]);\n\t\t\tint tmp=out[a-1];\n\t\t\tout[a-1]=out[b-1];\n\t\t\tout[b-1]=tmp;\n\t\t}\n\t\tfor(int i=0;i<out.length;i++)System.out.println(out[i]);\n\t}",
"BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));",
"reader",
"new BufferedReader(new InputStreamReader(System.in))",
"String s=reader.readLine();",
"s",
"reader.readLine()",
"reader.readLine",
"reader",
"int in=Integer.parseInt(s);",
"in",
"Integer.parseInt(s)",
"Integer.parseInt",
"Integer",
"s",
"int[] out=new int[in];",
"out",
"new int[in]",
"in",
"for(int i=1;i<=in;i++)out[i-1]=i;",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=in",
"i",
"in",
"i++",
"i++",
"i",
"out[i-1]=i;",
"out[i-1]=i",
"out[i-1]",
"out",
"i-1",
"i",
"1",
"i",
"s=reader.readLine()",
"s",
"reader.readLine()",
"reader.readLine",
"reader",
"in=Integer.parseInt(s)",
"in",
"Integer.parseInt(s)",
"Integer.parseInt",
"Integer",
"s",
"for(int i=0;i<in;i++){\n\t\t\tString s1=reader.readLine();\n\t\t\tString[] in1=s1.split(\",\");\n\t\t\tint a=Integer.parseInt(in1[0]);\n\t\t\tint b=Integer.parseInt(in1[1]);\n\t\t\tint tmp=out[a-1];\n\t\t\tout[a-1]=out[b-1];\n\t\t\tout[b-1]=tmp;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<in",
"i",
"in",
"i++",
"i++",
"i",
"{\n\t\t\tString s1=reader.readLine();\n\t\t\tString[] in1=s1.split(\",\");\n\t\t\tint a=Integer.parseInt(in1[0]);\n\t\t\tint b=Integer.parseInt(in1[1]);\n\t\t\tint tmp=out[a-1];\n\t\t\tout[a-1]=out[b-1];\n\t\t\tout[b-1]=tmp;\n\t\t}",
"{\n\t\t\tString s1=reader.readLine();\n\t\t\tString[] in1=s1.split(\",\");\n\t\t\tint a=Integer.parseInt(in1[0]);\n\t\t\tint b=Integer.parseInt(in1[1]);\n\t\t\tint tmp=out[a-1];\n\t\t\tout[a-1]=out[b-1];\n\t\t\tout[b-1]=tmp;\n\t\t}",
"String s1=reader.readLine();",
"s1",
"reader.readLine()",
"reader.readLine",
"reader",
"String[] in1=s1.split(\",\");",
"in1",
"s1.split(\",\")",
"s1.split",
"s1",
"\",\"",
"int a=Integer.parseInt(in1[0]);",
"a",
"Integer.parseInt(in1[0])",
"Integer.parseInt",
"Integer",
"in1[0]",
"in1",
"0",
"int b=Integer.parseInt(in1[1]);",
"b",
"Integer.parseInt(in1[1])",
"Integer.parseInt",
"Integer",
"in1[1]",
"in1",
"1",
"int tmp=out[a-1];",
"tmp",
"out[a-1]",
"out",
"a-1",
"a",
"1",
"out[a-1]=out[b-1]",
"out[a-1]",
"out",
"a-1",
"a",
"1",
"out[b-1]",
"out",
"b-1",
"b",
"1",
"out[b-1]=tmp",
"out[b-1]",
"out",
"b-1",
"b",
"1",
"tmp",
"for(int i=0;i<out.length;i++)System.out.println(out[i]);",
"int i=0;",
"int i=0;",
"i",
"0",
"i<out.length",
"i",
"out.length",
"out",
"out.length",
"i++",
"i++",
"i",
"System.out.println(out[i]);",
"System.out.println(out[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"out[i]",
"out",
"i",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args)throws IOException{\n\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n\t\t//Scanner reader=new Scanner(System.in);\n\t\tString s=reader.readLine();\n\t\tint in=Integer.parseInt(s);\n\t\t//int in=reader.nextInt();\n\t\tint[] out=new int[in];\n\t\tfor(int i=1;i<=in;i++)out[i-1]=i;\n\t\t//in=reader.nextInt();\n\t\ts=reader.readLine();\n\t\tin=Integer.parseInt(s);\n\t\tfor(int i=0;i<in;i++){\n\t\t\tString s1=reader.readLine();\n\t\t\tString[] in1=s1.split(\",\");\n\t\t\tint a=Integer.parseInt(in1[0]);\n\t\t\tint b=Integer.parseInt(in1[1]);\n\t\t\tint tmp=out[a-1];\n\t\t\tout[a-1]=out[b-1];\n\t\t\tout[b-1]=tmp;\n\t\t}\n\t\tfor(int i=0;i<out.length;i++)System.out.println(out[i]);\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] args)throws IOException{\n\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n\t\t//Scanner reader=new Scanner(System.in);\n\t\tString s=reader.readLine();\n\t\tint in=Integer.parseInt(s);\n\t\t//int in=reader.nextInt();\n\t\tint[] out=new int[in];\n\t\tfor(int i=1;i<=in;i++)out[i-1]=i;\n\t\t//in=reader.nextInt();\n\t\ts=reader.readLine();\n\t\tin=Integer.parseInt(s);\n\t\tfor(int i=0;i<in;i++){\n\t\t\tString s1=reader.readLine();\n\t\t\tString[] in1=s1.split(\",\");\n\t\t\tint a=Integer.parseInt(in1[0]);\n\t\t\tint b=Integer.parseInt(in1[1]);\n\t\t\tint tmp=out[a-1];\n\t\t\tout[a-1]=out[b-1];\n\t\t\tout[b-1]=tmp;\n\t\t}\n\t\tfor(int i=0;i<out.length;i++)System.out.println(out[i]);\n\t}\n}",
"Main"
] | import java.io.*;
import java.util.*;
public class Main{
public static void main(String[] args)throws IOException{
BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
//Scanner reader=new Scanner(System.in);
String s=reader.readLine();
int in=Integer.parseInt(s);
//int in=reader.nextInt();
int[] out=new int[in];
for(int i=1;i<=in;i++)out[i-1]=i;
//in=reader.nextInt();
s=reader.readLine();
in=Integer.parseInt(s);
for(int i=0;i<in;i++){
String s1=reader.readLine();
String[] in1=s1.split(",");
int a=Integer.parseInt(in1[0]);
int b=Integer.parseInt(in1[1]);
int tmp=out[a-1];
out[a-1]=out[b-1];
out[b-1]=tmp;
}
for(int i=0;i<out.length;i++)System.out.println(out[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,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
13,
13,
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,
4,
18,
13,
18,
13,
17,
4,
18,
13,
18,
13,
17,
0,
18,
18,
13,
13,
4,
18,
13,
18,
13,
17,
4,
18,
13,
18,
13,
17,
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,
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,
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
],
[
202,
11
],
[
202,
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
],
[
40,
41
],
[
40,
42
],
[
14,
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
],
[
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
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
69,
75
],
[
14,
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
],
[
93,
94
],
[
94,
95
],
[
91,
96
],
[
88,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
102,
103
],
[
103,
104
],
[
102,
105
],
[
105,
106
],
[
105,
107
],
[
97,
108
],
[
108,
109
],
[
109,
110
],
[
108,
111
],
[
111,
112
],
[
111,
113
],
[
88,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
115,
119
],
[
119,
120
],
[
120,
121
],
[
119,
122
],
[
122,
123
],
[
122,
124
],
[
114,
125
],
[
125,
126
],
[
126,
127
],
[
125,
128
],
[
128,
129
],
[
128,
130
],
[
14,
131
],
[
131,
132
],
[
131,
133
],
[
134,
135
],
[
134,
136
],
[
14,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
137,
142
],
[
142,
143
],
[
142,
144
],
[
137,
145
],
[
145,
146
],
[
146,
147
],
[
137,
148
],
[
149,
149
],
[
149,
150
],
[
150,
151
],
[
150,
152
],
[
149,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
155,
157
],
[
153,
158
],
[
158,
159
],
[
158,
160
],
[
153,
161
],
[
161,
162
],
[
162,
163
],
[
153,
164
],
[
165,
165
],
[
165,
166
],
[
166,
167
],
[
166,
168
],
[
168,
169
],
[
169,
170
],
[
169,
171
],
[
168,
172
],
[
149,
173
],
[
173,
174
],
[
174,
175
],
[
174,
176
],
[
173,
177
],
[
14,
178
],
[
178,
179
],
[
179,
180
],
[
180,
181
],
[
180,
182
],
[
178,
183
],
[
183,
184
],
[
183,
185
],
[
178,
186
],
[
186,
187
],
[
187,
188
],
[
178,
189
],
[
190,
190
],
[
190,
191
],
[
191,
192
],
[
192,
193
],
[
193,
194
],
[
193,
195
],
[
191,
196
],
[
196,
197
],
[
196,
198
],
[
12,
199
],
[
199,
200
],
[
0,
201
],
[
201,
202
],
[
201,
203
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint lineNum = Integer.parseInt(br.readLine());\n\t\tint changeNum = Integer.parseInt(br.readLine());\n\n\t\tint[][] changer = new int[changeNum+1][lineNum+1];\n\t\t//?????????\n\t\tfor(int i = 1; i <= changeNum ; i++){\n\t\t\tfor(int j = 1; j <= lineNum; j++){\n\t\t\t\tchanger[i][j] = j;\n\t\t\t}\n\t\t}\n\n\t\t//??\\???????????????\n\t\tfor(int i = 1;i <= changeNum; i++){\n\t\t\tString[] tmpStr = br.readLine().split(\",\");\n\t\t\tchanger[i][Integer.parseInt(tmpStr[0])] = Integer.parseInt(tmpStr[1]);\n\t\t\tchanger[i][Integer.parseInt(tmpStr[1])] = Integer.parseInt(tmpStr[0]);\n\t\t}\n\n\t\t//???????????????\n\t\tint[] answer = new int[lineNum + 1];\n\n\t\tfor(int i = 1; i <= lineNum ; i++){\n\t\t\tint tmpAnswer = i;\n\n\t\t\tfor(int j = 1; j <= changeNum ; j++){\n\t\t\t\t//System.out.println(\"next \"+changer[j][tmpAnswer]);\n\t\t\t\ttmpAnswer = changer[j][tmpAnswer];\n\t\t\t}\n\n\t\t\tanswer[tmpAnswer] = i;\n\t\t}\n\n\t\tfor(int i = 1; i <= lineNum; i++){\n\t\t\tSystem.out.println(answer[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 ?????????????????????????????????????????????\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint lineNum = Integer.parseInt(br.readLine());\n\t\tint changeNum = Integer.parseInt(br.readLine());\n\n\t\tint[][] changer = new int[changeNum+1][lineNum+1];\n\t\t//?????????\n\t\tfor(int i = 1; i <= changeNum ; i++){\n\t\t\tfor(int j = 1; j <= lineNum; j++){\n\t\t\t\tchanger[i][j] = j;\n\t\t\t}\n\t\t}\n\n\t\t//??\\???????????????\n\t\tfor(int i = 1;i <= changeNum; i++){\n\t\t\tString[] tmpStr = br.readLine().split(\",\");\n\t\t\tchanger[i][Integer.parseInt(tmpStr[0])] = Integer.parseInt(tmpStr[1]);\n\t\t\tchanger[i][Integer.parseInt(tmpStr[1])] = Integer.parseInt(tmpStr[0]);\n\t\t}\n\n\t\t//???????????????\n\t\tint[] answer = new int[lineNum + 1];\n\n\t\tfor(int i = 1; i <= lineNum ; i++){\n\t\t\tint tmpAnswer = i;\n\n\t\t\tfor(int j = 1; j <= changeNum ; j++){\n\t\t\t\t//System.out.println(\"next \"+changer[j][tmpAnswer]);\n\t\t\t\ttmpAnswer = changer[j][tmpAnswer];\n\t\t\t}\n\n\t\t\tanswer[tmpAnswer] = i;\n\t\t}\n\n\t\tfor(int i = 1; i <= lineNum; i++){\n\t\t\tSystem.out.println(answer[i]);\n\t\t}\n\t}\n\n}",
"Main",
"public static void main(String[] args) throws NumberFormatException, IOException {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint lineNum = Integer.parseInt(br.readLine());\n\t\tint changeNum = Integer.parseInt(br.readLine());\n\n\t\tint[][] changer = new int[changeNum+1][lineNum+1];\n\t\t//?????????\n\t\tfor(int i = 1; i <= changeNum ; i++){\n\t\t\tfor(int j = 1; j <= lineNum; j++){\n\t\t\t\tchanger[i][j] = j;\n\t\t\t}\n\t\t}\n\n\t\t//??\\???????????????\n\t\tfor(int i = 1;i <= changeNum; i++){\n\t\t\tString[] tmpStr = br.readLine().split(\",\");\n\t\t\tchanger[i][Integer.parseInt(tmpStr[0])] = Integer.parseInt(tmpStr[1]);\n\t\t\tchanger[i][Integer.parseInt(tmpStr[1])] = Integer.parseInt(tmpStr[0]);\n\t\t}\n\n\t\t//???????????????\n\t\tint[] answer = new int[lineNum + 1];\n\n\t\tfor(int i = 1; i <= lineNum ; i++){\n\t\t\tint tmpAnswer = i;\n\n\t\t\tfor(int j = 1; j <= changeNum ; j++){\n\t\t\t\t//System.out.println(\"next \"+changer[j][tmpAnswer]);\n\t\t\t\ttmpAnswer = changer[j][tmpAnswer];\n\t\t\t}\n\n\t\t\tanswer[tmpAnswer] = i;\n\t\t}\n\n\t\tfor(int i = 1; i <= lineNum; i++){\n\t\t\tSystem.out.println(answer[i]);\n\t\t}\n\t}",
"main",
"{\n\t\t// TODO ?????????????????????????????????????????????\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint lineNum = Integer.parseInt(br.readLine());\n\t\tint changeNum = Integer.parseInt(br.readLine());\n\n\t\tint[][] changer = new int[changeNum+1][lineNum+1];\n\t\t//?????????\n\t\tfor(int i = 1; i <= changeNum ; i++){\n\t\t\tfor(int j = 1; j <= lineNum; j++){\n\t\t\t\tchanger[i][j] = j;\n\t\t\t}\n\t\t}\n\n\t\t//??\\???????????????\n\t\tfor(int i = 1;i <= changeNum; i++){\n\t\t\tString[] tmpStr = br.readLine().split(\",\");\n\t\t\tchanger[i][Integer.parseInt(tmpStr[0])] = Integer.parseInt(tmpStr[1]);\n\t\t\tchanger[i][Integer.parseInt(tmpStr[1])] = Integer.parseInt(tmpStr[0]);\n\t\t}\n\n\t\t//???????????????\n\t\tint[] answer = new int[lineNum + 1];\n\n\t\tfor(int i = 1; i <= lineNum ; i++){\n\t\t\tint tmpAnswer = i;\n\n\t\t\tfor(int j = 1; j <= changeNum ; j++){\n\t\t\t\t//System.out.println(\"next \"+changer[j][tmpAnswer]);\n\t\t\t\ttmpAnswer = changer[j][tmpAnswer];\n\t\t\t}\n\n\t\t\tanswer[tmpAnswer] = i;\n\t\t}\n\n\t\tfor(int i = 1; i <= lineNum; i++){\n\t\t\tSystem.out.println(answer[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 changeNum = Integer.parseInt(br.readLine());",
"changeNum",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int[][] changer = new int[changeNum+1][lineNum+1];",
"changer",
"new int[changeNum+1][lineNum+1]",
"changeNum+1",
"changeNum",
"1",
"lineNum+1",
"lineNum",
"1",
"for(int i = 1; i <= changeNum ; i++){\n\t\t\tfor(int j = 1; j <= lineNum; j++){\n\t\t\t\tchanger[i][j] = j;\n\t\t\t}\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= changeNum",
"i",
"changeNum",
"i++",
"i++",
"i",
"{\n\t\t\tfor(int j = 1; j <= lineNum; j++){\n\t\t\t\tchanger[i][j] = j;\n\t\t\t}\n\t\t}",
"{\n\t\t\tfor(int j = 1; j <= lineNum; j++){\n\t\t\t\tchanger[i][j] = j;\n\t\t\t}\n\t\t}",
"for(int j = 1; j <= lineNum; j++){\n\t\t\t\tchanger[i][j] = j;\n\t\t\t}",
"int j = 1;",
"int j = 1;",
"j",
"1",
"j <= lineNum",
"j",
"lineNum",
"j++",
"j++",
"j",
"{\n\t\t\t\tchanger[i][j] = j;\n\t\t\t}",
"{\n\t\t\t\tchanger[i][j] = j;\n\t\t\t}",
"changer[i][j] = j",
"changer[i][j]",
"changer[i]",
"changer",
"i",
"j",
"j",
"for(int i = 1;i <= changeNum; i++){\n\t\t\tString[] tmpStr = br.readLine().split(\",\");\n\t\t\tchanger[i][Integer.parseInt(tmpStr[0])] = Integer.parseInt(tmpStr[1]);\n\t\t\tchanger[i][Integer.parseInt(tmpStr[1])] = Integer.parseInt(tmpStr[0]);\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= changeNum",
"i",
"changeNum",
"i++",
"i++",
"i",
"{\n\t\t\tString[] tmpStr = br.readLine().split(\",\");\n\t\t\tchanger[i][Integer.parseInt(tmpStr[0])] = Integer.parseInt(tmpStr[1]);\n\t\t\tchanger[i][Integer.parseInt(tmpStr[1])] = Integer.parseInt(tmpStr[0]);\n\t\t}",
"{\n\t\t\tString[] tmpStr = br.readLine().split(\",\");\n\t\t\tchanger[i][Integer.parseInt(tmpStr[0])] = Integer.parseInt(tmpStr[1]);\n\t\t\tchanger[i][Integer.parseInt(tmpStr[1])] = Integer.parseInt(tmpStr[0]);\n\t\t}",
"String[] tmpStr = br.readLine().split(\",\");",
"tmpStr",
"br.readLine().split(\",\")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\",\"",
"changer[i][Integer.parseInt(tmpStr[0])] = Integer.parseInt(tmpStr[1])",
"changer[i][Integer.parseInt(tmpStr[0])]",
"changer[i]",
"changer",
"i",
"Integer.parseInt(tmpStr[0])",
"Integer.parseInt",
"Integer",
"tmpStr[0]",
"tmpStr",
"0",
"Integer.parseInt(tmpStr[1])",
"Integer.parseInt",
"Integer",
"tmpStr[1]",
"tmpStr",
"1",
"changer[i][Integer.parseInt(tmpStr[1])] = Integer.parseInt(tmpStr[0])",
"changer[i][Integer.parseInt(tmpStr[1])]",
"changer[i]",
"changer",
"i",
"Integer.parseInt(tmpStr[1])",
"Integer.parseInt",
"Integer",
"tmpStr[1]",
"tmpStr",
"1",
"Integer.parseInt(tmpStr[0])",
"Integer.parseInt",
"Integer",
"tmpStr[0]",
"tmpStr",
"0",
"int[] answer = new int[lineNum + 1];",
"answer",
"new int[lineNum + 1]",
"lineNum + 1",
"lineNum",
"1",
"for(int i = 1; i <= lineNum ; i++){\n\t\t\tint tmpAnswer = i;\n\n\t\t\tfor(int j = 1; j <= changeNum ; j++){\n\t\t\t\t//System.out.println(\"next \"+changer[j][tmpAnswer]);\n\t\t\t\ttmpAnswer = changer[j][tmpAnswer];\n\t\t\t}\n\n\t\t\tanswer[tmpAnswer] = i;\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= lineNum",
"i",
"lineNum",
"i++",
"i++",
"i",
"{\n\t\t\tint tmpAnswer = i;\n\n\t\t\tfor(int j = 1; j <= changeNum ; j++){\n\t\t\t\t//System.out.println(\"next \"+changer[j][tmpAnswer]);\n\t\t\t\ttmpAnswer = changer[j][tmpAnswer];\n\t\t\t}\n\n\t\t\tanswer[tmpAnswer] = i;\n\t\t}",
"{\n\t\t\tint tmpAnswer = i;\n\n\t\t\tfor(int j = 1; j <= changeNum ; j++){\n\t\t\t\t//System.out.println(\"next \"+changer[j][tmpAnswer]);\n\t\t\t\ttmpAnswer = changer[j][tmpAnswer];\n\t\t\t}\n\n\t\t\tanswer[tmpAnswer] = i;\n\t\t}",
"int tmpAnswer = i;",
"tmpAnswer",
"i",
"for(int j = 1; j <= changeNum ; j++){\n\t\t\t\t//System.out.println(\"next \"+changer[j][tmpAnswer]);\n\t\t\t\ttmpAnswer = changer[j][tmpAnswer];\n\t\t\t}",
"int j = 1;",
"int j = 1;",
"j",
"1",
"j <= changeNum",
"j",
"changeNum",
"j++",
"j++",
"j",
"{\n\t\t\t\t//System.out.println(\"next \"+changer[j][tmpAnswer]);\n\t\t\t\ttmpAnswer = changer[j][tmpAnswer];\n\t\t\t}",
"{\n\t\t\t\t//System.out.println(\"next \"+changer[j][tmpAnswer]);\n\t\t\t\ttmpAnswer = changer[j][tmpAnswer];\n\t\t\t}",
"tmpAnswer = changer[j][tmpAnswer]",
"tmpAnswer",
"changer[j][tmpAnswer]",
"changer[j]",
"changer",
"j",
"tmpAnswer",
"answer[tmpAnswer] = i",
"answer[tmpAnswer]",
"answer",
"tmpAnswer",
"i",
"for(int i = 1; i <= lineNum; i++){\n\t\t\tSystem.out.println(answer[i]);\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= lineNum",
"i",
"lineNum",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(answer[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(answer[i]);\n\t\t}",
"System.out.println(answer[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"answer[i]",
"answer",
"i",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint lineNum = Integer.parseInt(br.readLine());\n\t\tint changeNum = Integer.parseInt(br.readLine());\n\n\t\tint[][] changer = new int[changeNum+1][lineNum+1];\n\t\t//?????????\n\t\tfor(int i = 1; i <= changeNum ; i++){\n\t\t\tfor(int j = 1; j <= lineNum; j++){\n\t\t\t\tchanger[i][j] = j;\n\t\t\t}\n\t\t}\n\n\t\t//??\\???????????????\n\t\tfor(int i = 1;i <= changeNum; i++){\n\t\t\tString[] tmpStr = br.readLine().split(\",\");\n\t\t\tchanger[i][Integer.parseInt(tmpStr[0])] = Integer.parseInt(tmpStr[1]);\n\t\t\tchanger[i][Integer.parseInt(tmpStr[1])] = Integer.parseInt(tmpStr[0]);\n\t\t}\n\n\t\t//???????????????\n\t\tint[] answer = new int[lineNum + 1];\n\n\t\tfor(int i = 1; i <= lineNum ; i++){\n\t\t\tint tmpAnswer = i;\n\n\t\t\tfor(int j = 1; j <= changeNum ; j++){\n\t\t\t\t//System.out.println(\"next \"+changer[j][tmpAnswer]);\n\t\t\t\ttmpAnswer = changer[j][tmpAnswer];\n\t\t\t}\n\n\t\t\tanswer[tmpAnswer] = i;\n\t\t}\n\n\t\tfor(int i = 1; i <= lineNum; i++){\n\t\t\tSystem.out.println(answer[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 ?????????????????????????????????????????????\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint lineNum = Integer.parseInt(br.readLine());\n\t\tint changeNum = Integer.parseInt(br.readLine());\n\n\t\tint[][] changer = new int[changeNum+1][lineNum+1];\n\t\t//?????????\n\t\tfor(int i = 1; i <= changeNum ; i++){\n\t\t\tfor(int j = 1; j <= lineNum; j++){\n\t\t\t\tchanger[i][j] = j;\n\t\t\t}\n\t\t}\n\n\t\t//??\\???????????????\n\t\tfor(int i = 1;i <= changeNum; i++){\n\t\t\tString[] tmpStr = br.readLine().split(\",\");\n\t\t\tchanger[i][Integer.parseInt(tmpStr[0])] = Integer.parseInt(tmpStr[1]);\n\t\t\tchanger[i][Integer.parseInt(tmpStr[1])] = Integer.parseInt(tmpStr[0]);\n\t\t}\n\n\t\t//???????????????\n\t\tint[] answer = new int[lineNum + 1];\n\n\t\tfor(int i = 1; i <= lineNum ; i++){\n\t\t\tint tmpAnswer = i;\n\n\t\t\tfor(int j = 1; j <= changeNum ; j++){\n\t\t\t\t//System.out.println(\"next \"+changer[j][tmpAnswer]);\n\t\t\t\ttmpAnswer = changer[j][tmpAnswer];\n\t\t\t}\n\n\t\t\tanswer[tmpAnswer] = i;\n\t\t}\n\n\t\tfor(int i = 1; i <= lineNum; i++){\n\t\t\tSystem.out.println(answer[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 ?????????????????????????????????????????????
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int lineNum = Integer.parseInt(br.readLine());
int changeNum = Integer.parseInt(br.readLine());
int[][] changer = new int[changeNum+1][lineNum+1];
//?????????
for(int i = 1; i <= changeNum ; i++){
for(int j = 1; j <= lineNum; j++){
changer[i][j] = j;
}
}
//??\???????????????
for(int i = 1;i <= changeNum; i++){
String[] tmpStr = br.readLine().split(",");
changer[i][Integer.parseInt(tmpStr[0])] = Integer.parseInt(tmpStr[1]);
changer[i][Integer.parseInt(tmpStr[1])] = Integer.parseInt(tmpStr[0]);
}
//???????????????
int[] answer = new int[lineNum + 1];
for(int i = 1; i <= lineNum ; i++){
int tmpAnswer = i;
for(int j = 1; j <= changeNum ; j++){
//System.out.println("next "+changer[j][tmpAnswer]);
tmpAnswer = changer[j][tmpAnswer];
}
answer[tmpAnswer] = i;
}
for(int i = 1; i <= lineNum; i++){
System.out.println(answer[i]);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
41,
13,
20,
41,
13,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
13,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
41,
13,
20,
41,
13,
2,
4,
18,
13,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
4,
18,
13,
17,
41,
13,
17,
0,
13,
4,
18,
13,
13,
4,
18,
13,
13,
4,
18,
13,
13,
4,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
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
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
157,
14
],
[
157,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
18,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
25,
29
],
[
29,
30
],
[
25,
31
],
[
31,
32
],
[
31,
33
],
[
25,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
36,
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
],
[
56,
57
],
[
55,
58
],
[
25,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
64,
65
],
[
65,
66
],
[
25,
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
],
[
85,
87
],
[
79,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
94,
95
],
[
95,
96
],
[
90,
97
],
[
79,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
101,
104
],
[
104,
105
],
[
105,
106
],
[
100,
107
],
[
79,
108
],
[
108,
109
],
[
108,
110
],
[
79,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
114,
115
],
[
113,
116
],
[
79,
117
],
[
117,
118
],
[
118,
119
],
[
117,
120
],
[
117,
121
],
[
121,
122
],
[
122,
123
],
[
121,
124
],
[
79,
125
],
[
125,
126
],
[
126,
127
],
[
125,
128
],
[
125,
129
],
[
25,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
130,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
138,
139
],
[
130,
140
],
[
140,
141
],
[
141,
142
],
[
130,
143
],
[
144,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
145,
150
],
[
150,
151
],
[
151,
152
],
[
150,
153
],
[
15,
154
],
[
154,
155
],
[
0,
156
],
[
156,
157
],
[
156,
158
]
] | [
"import java.io.*;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.StringTokenizer;\n \n \n \n \npublic class Main {\n \n \n public static void main(String[] args) {\n \n try {\n \n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in)); \n String s;\n List<Integer> List = new ArrayList<Integer>(); \n \n int verticalNum = Integer.parseInt(br.readLine());\n \n for(int i = 1; i<=verticalNum; i++)\n {\n \tList.add(i);\n }\n int horizontalNum = Integer.parseInt(br.readLine());\n \n for(int i = 0; i<horizontalNum; i++)\n {\n \ts = br.readLine();\n \tStringTokenizer st = new StringTokenizer(s,\",\");\n \n \tint a = Integer.parseInt(st.nextToken()) - 1;\n int b = Integer.parseInt(st.nextToken()) - 1;\n int temp = 0;\n \n temp = List.get(a);\n List.set(a,List.get(b));\n List.set(b, temp);\n \n }\n \n for(int i = 0; i<List.size(); i++)\n {\n \tSystem.out.println(List.get(i));\n }\n \n }catch (Exception e) {\n e.printStackTrace();\n }\n \n }\n \n \n \n \n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main {\n \n \n public static void main(String[] args) {\n \n try {\n \n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in)); \n String s;\n List<Integer> List = new ArrayList<Integer>(); \n \n int verticalNum = Integer.parseInt(br.readLine());\n \n for(int i = 1; i<=verticalNum; i++)\n {\n \tList.add(i);\n }\n int horizontalNum = Integer.parseInt(br.readLine());\n \n for(int i = 0; i<horizontalNum; i++)\n {\n \ts = br.readLine();\n \tStringTokenizer st = new StringTokenizer(s,\",\");\n \n \tint a = Integer.parseInt(st.nextToken()) - 1;\n int b = Integer.parseInt(st.nextToken()) - 1;\n int temp = 0;\n \n temp = List.get(a);\n List.set(a,List.get(b));\n List.set(b, temp);\n \n }\n \n for(int i = 0; i<List.size(); i++)\n {\n \tSystem.out.println(List.get(i));\n }\n \n }catch (Exception e) {\n e.printStackTrace();\n }\n \n }\n \n \n \n \n}",
"Main",
"public static void main(String[] args) {\n \n try {\n \n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in)); \n String s;\n List<Integer> List = new ArrayList<Integer>(); \n \n int verticalNum = Integer.parseInt(br.readLine());\n \n for(int i = 1; i<=verticalNum; i++)\n {\n \tList.add(i);\n }\n int horizontalNum = Integer.parseInt(br.readLine());\n \n for(int i = 0; i<horizontalNum; i++)\n {\n \ts = br.readLine();\n \tStringTokenizer st = new StringTokenizer(s,\",\");\n \n \tint a = Integer.parseInt(st.nextToken()) - 1;\n int b = Integer.parseInt(st.nextToken()) - 1;\n int temp = 0;\n \n temp = List.get(a);\n List.set(a,List.get(b));\n List.set(b, temp);\n \n }\n \n for(int i = 0; i<List.size(); i++)\n {\n \tSystem.out.println(List.get(i));\n }\n \n }catch (Exception e) {\n e.printStackTrace();\n }\n \n }",
"main",
"{\n \n try {\n \n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in)); \n String s;\n List<Integer> List = new ArrayList<Integer>(); \n \n int verticalNum = Integer.parseInt(br.readLine());\n \n for(int i = 1; i<=verticalNum; i++)\n {\n \tList.add(i);\n }\n int horizontalNum = Integer.parseInt(br.readLine());\n \n for(int i = 0; i<horizontalNum; i++)\n {\n \ts = br.readLine();\n \tStringTokenizer st = new StringTokenizer(s,\",\");\n \n \tint a = Integer.parseInt(st.nextToken()) - 1;\n int b = Integer.parseInt(st.nextToken()) - 1;\n int temp = 0;\n \n temp = List.get(a);\n List.set(a,List.get(b));\n List.set(b, temp);\n \n }\n \n for(int i = 0; i<List.size(); i++)\n {\n \tSystem.out.println(List.get(i));\n }\n \n }catch (Exception e) {\n e.printStackTrace();\n }\n \n }",
"try {\n \n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in)); \n String s;\n List<Integer> List = new ArrayList<Integer>(); \n \n int verticalNum = Integer.parseInt(br.readLine());\n \n for(int i = 1; i<=verticalNum; i++)\n {\n \tList.add(i);\n }\n int horizontalNum = Integer.parseInt(br.readLine());\n \n for(int i = 0; i<horizontalNum; i++)\n {\n \ts = br.readLine();\n \tStringTokenizer st = new StringTokenizer(s,\",\");\n \n \tint a = Integer.parseInt(st.nextToken()) - 1;\n int b = Integer.parseInt(st.nextToken()) - 1;\n int temp = 0;\n \n temp = List.get(a);\n List.set(a,List.get(b));\n List.set(b, temp);\n \n }\n \n for(int i = 0; i<List.size(); i++)\n {\n \tSystem.out.println(List.get(i));\n }\n \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 \n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in)); \n String s;\n List<Integer> List = new ArrayList<Integer>(); \n \n int verticalNum = Integer.parseInt(br.readLine());\n \n for(int i = 1; i<=verticalNum; i++)\n {\n \tList.add(i);\n }\n int horizontalNum = Integer.parseInt(br.readLine());\n \n for(int i = 0; i<horizontalNum; i++)\n {\n \ts = br.readLine();\n \tStringTokenizer st = new StringTokenizer(s,\",\");\n \n \tint a = Integer.parseInt(st.nextToken()) - 1;\n int b = Integer.parseInt(st.nextToken()) - 1;\n int temp = 0;\n \n temp = List.get(a);\n List.set(a,List.get(b));\n List.set(b, temp);\n \n }\n \n for(int i = 0; i<List.size(); i++)\n {\n \tSystem.out.println(List.get(i));\n }\n \n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String s;",
"s",
"List<Integer> List = new ArrayList<Integer>();",
"List",
"new ArrayList<Integer>()",
"int verticalNum = Integer.parseInt(br.readLine());",
"verticalNum",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"for(int i = 1; i<=verticalNum; i++)\n {\n \tList.add(i);\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i<=verticalNum",
"i",
"verticalNum",
"i++",
"i++",
"i",
"{\n \tList.add(i);\n }",
"{\n \tList.add(i);\n }",
"List.add(i)",
"List.add",
"List",
"i",
"int horizontalNum = Integer.parseInt(br.readLine());",
"horizontalNum",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"for(int i = 0; i<horizontalNum; i++)\n {\n \ts = br.readLine();\n \tStringTokenizer st = new StringTokenizer(s,\",\");\n \n \tint a = Integer.parseInt(st.nextToken()) - 1;\n int b = Integer.parseInt(st.nextToken()) - 1;\n int temp = 0;\n \n temp = List.get(a);\n List.set(a,List.get(b));\n List.set(b, temp);\n \n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<horizontalNum",
"i",
"horizontalNum",
"i++",
"i++",
"i",
"{\n \ts = br.readLine();\n \tStringTokenizer st = new StringTokenizer(s,\",\");\n \n \tint a = Integer.parseInt(st.nextToken()) - 1;\n int b = Integer.parseInt(st.nextToken()) - 1;\n int temp = 0;\n \n temp = List.get(a);\n List.set(a,List.get(b));\n List.set(b, temp);\n \n }",
"{\n \ts = br.readLine();\n \tStringTokenizer st = new StringTokenizer(s,\",\");\n \n \tint a = Integer.parseInt(st.nextToken()) - 1;\n int b = Integer.parseInt(st.nextToken()) - 1;\n int temp = 0;\n \n temp = List.get(a);\n List.set(a,List.get(b));\n List.set(b, temp);\n \n }",
"s = br.readLine()",
"s",
"br.readLine()",
"br.readLine",
"br",
"StringTokenizer st = new StringTokenizer(s,\",\");",
"st",
"new StringTokenizer(s,\",\")",
"int 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",
"int 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",
"int temp = 0;",
"temp",
"0",
"temp = List.get(a)",
"temp",
"List.get(a)",
"List.get",
"List",
"a",
"List.set(a,List.get(b))",
"List.set",
"List",
"a",
"List.get(b)",
"List.get",
"List",
"b",
"List.set(b, temp)",
"List.set",
"List",
"b",
"temp",
"for(int i = 0; i<List.size(); i++)\n {\n \tSystem.out.println(List.get(i));\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<List.size()",
"i",
"List.size()",
"List.size",
"List",
"i++",
"i++",
"i",
"{\n \tSystem.out.println(List.get(i));\n }",
"{\n \tSystem.out.println(List.get(i));\n }",
"System.out.println(List.get(i))",
"System.out.println",
"System.out",
"System",
"System.out",
"List.get(i)",
"List.get",
"List",
"i",
"String[] args",
"args",
"public class Main {\n \n \n public static void main(String[] args) {\n \n try {\n \n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in)); \n String s;\n List<Integer> List = new ArrayList<Integer>(); \n \n int verticalNum = Integer.parseInt(br.readLine());\n \n for(int i = 1; i<=verticalNum; i++)\n {\n \tList.add(i);\n }\n int horizontalNum = Integer.parseInt(br.readLine());\n \n for(int i = 0; i<horizontalNum; i++)\n {\n \ts = br.readLine();\n \tStringTokenizer st = new StringTokenizer(s,\",\");\n \n \tint a = Integer.parseInt(st.nextToken()) - 1;\n int b = Integer.parseInt(st.nextToken()) - 1;\n int temp = 0;\n \n temp = List.get(a);\n List.set(a,List.get(b));\n List.set(b, temp);\n \n }\n \n for(int i = 0; i<List.size(); i++)\n {\n \tSystem.out.println(List.get(i));\n }\n \n }catch (Exception e) {\n e.printStackTrace();\n }\n \n }\n \n \n \n \n}",
"public class Main {\n \n \n public static void main(String[] args) {\n \n try {\n \n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in)); \n String s;\n List<Integer> List = new ArrayList<Integer>(); \n \n int verticalNum = Integer.parseInt(br.readLine());\n \n for(int i = 1; i<=verticalNum; i++)\n {\n \tList.add(i);\n }\n int horizontalNum = Integer.parseInt(br.readLine());\n \n for(int i = 0; i<horizontalNum; i++)\n {\n \ts = br.readLine();\n \tStringTokenizer st = new StringTokenizer(s,\",\");\n \n \tint a = Integer.parseInt(st.nextToken()) - 1;\n int b = Integer.parseInt(st.nextToken()) - 1;\n int temp = 0;\n \n temp = List.get(a);\n List.set(a,List.get(b));\n List.set(b, temp);\n \n }\n \n for(int i = 0; i<List.size(); i++)\n {\n \tSystem.out.println(List.get(i));\n }\n \n }catch (Exception e) {\n e.printStackTrace();\n }\n \n }\n \n \n \n \n}",
"Main"
] | import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s;
List<Integer> List = new ArrayList<Integer>();
int verticalNum = Integer.parseInt(br.readLine());
for(int i = 1; i<=verticalNum; i++)
{
List.add(i);
}
int horizontalNum = Integer.parseInt(br.readLine());
for(int i = 0; i<horizontalNum; i++)
{
s = br.readLine();
StringTokenizer st = new StringTokenizer(s,",");
int a = Integer.parseInt(st.nextToken()) - 1;
int b = Integer.parseInt(st.nextToken()) - 1;
int temp = 0;
temp = List.get(a);
List.set(a,List.get(b));
List.set(b, temp);
}
for(int i = 0; i<List.size(); i++)
{
System.out.println(List.get(i));
}
}catch (Exception e) {
e.printStackTrace();
}
}
} |
[
7,
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,
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
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
22,
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
],
[
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
],
[
69,
70
],
[
70,
71
],
[
67,
72
],
[
64,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
78,
79
],
[
78,
80
],
[
64,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
86,
87
],
[
86,
88
],
[
64,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
93,
95
],
[
64,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
99,
101
],
[
96,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
104,
106
],
[
64,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
110,
112
],
[
107,
113
],
[
8,
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;\n\n\npublic class Main {\n\tpublic static void main(String[] args){\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint line = Integer.parseInt(sc.nextLine());\n\t\tint n = Integer.parseInt(sc.nextLine());\n\n\t\tint[] values = new int[line];\n\t\tfor(int i=0;i<line;i++){\n\t\t\tvalues[i] = i+1;\n\t\t}\n\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] s = sc.nextLine().split(\",\");\n\t\t\tint a = Integer.parseInt(s[0]);\n\t\t\tint b= Integer.parseInt(s[1]);\n\n\t\t\tint value = values[a-1];\n\t\t\tvalues[a-1] = values[b-1];\n\t\t\tvalues[b-1] = value;\n\t\t}\n\n\t\tfor(int i=0;i<line;i++){\n\t\t\tSystem.out.println(values[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\n\t\tScanner sc = new Scanner(System.in);\n\t\tint line = Integer.parseInt(sc.nextLine());\n\t\tint n = Integer.parseInt(sc.nextLine());\n\n\t\tint[] values = new int[line];\n\t\tfor(int i=0;i<line;i++){\n\t\t\tvalues[i] = i+1;\n\t\t}\n\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] s = sc.nextLine().split(\",\");\n\t\t\tint a = Integer.parseInt(s[0]);\n\t\t\tint b= Integer.parseInt(s[1]);\n\n\t\t\tint value = values[a-1];\n\t\t\tvalues[a-1] = values[b-1];\n\t\t\tvalues[b-1] = value;\n\t\t}\n\n\t\tfor(int i=0;i<line;i++){\n\t\t\tSystem.out.println(values[i]);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args){\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint line = Integer.parseInt(sc.nextLine());\n\t\tint n = Integer.parseInt(sc.nextLine());\n\n\t\tint[] values = new int[line];\n\t\tfor(int i=0;i<line;i++){\n\t\t\tvalues[i] = i+1;\n\t\t}\n\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] s = sc.nextLine().split(\",\");\n\t\t\tint a = Integer.parseInt(s[0]);\n\t\t\tint b= Integer.parseInt(s[1]);\n\n\t\t\tint value = values[a-1];\n\t\t\tvalues[a-1] = values[b-1];\n\t\t\tvalues[b-1] = value;\n\t\t}\n\n\t\tfor(int i=0;i<line;i++){\n\t\t\tSystem.out.println(values[i]);\n\t\t}\n\t}",
"main",
"{\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint line = Integer.parseInt(sc.nextLine());\n\t\tint n = Integer.parseInt(sc.nextLine());\n\n\t\tint[] values = new int[line];\n\t\tfor(int i=0;i<line;i++){\n\t\t\tvalues[i] = i+1;\n\t\t}\n\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] s = sc.nextLine().split(\",\");\n\t\t\tint a = Integer.parseInt(s[0]);\n\t\t\tint b= Integer.parseInt(s[1]);\n\n\t\t\tint value = values[a-1];\n\t\t\tvalues[a-1] = values[b-1];\n\t\t\tvalues[b-1] = value;\n\t\t}\n\n\t\tfor(int i=0;i<line;i++){\n\t\t\tSystem.out.println(values[i]);\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int line = Integer.parseInt(sc.nextLine());",
"line",
"Integer.parseInt(sc.nextLine())",
"Integer.parseInt",
"Integer",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int n = Integer.parseInt(sc.nextLine());",
"n",
"Integer.parseInt(sc.nextLine())",
"Integer.parseInt",
"Integer",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int[] values = new int[line];",
"values",
"new int[line]",
"line",
"for(int i=0;i<line;i++){\n\t\t\tvalues[i] = i+1;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<line",
"i",
"line",
"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[] s = sc.nextLine().split(\",\");\n\t\t\tint a = Integer.parseInt(s[0]);\n\t\t\tint b= Integer.parseInt(s[1]);\n\n\t\t\tint value = values[a-1];\n\t\t\tvalues[a-1] = values[b-1];\n\t\t\tvalues[b-1] = value;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString[] s = sc.nextLine().split(\",\");\n\t\t\tint a = Integer.parseInt(s[0]);\n\t\t\tint b= Integer.parseInt(s[1]);\n\n\t\t\tint value = values[a-1];\n\t\t\tvalues[a-1] = values[b-1];\n\t\t\tvalues[b-1] = value;\n\t\t}",
"{\n\t\t\tString[] s = sc.nextLine().split(\",\");\n\t\t\tint a = Integer.parseInt(s[0]);\n\t\t\tint b= Integer.parseInt(s[1]);\n\n\t\t\tint value = values[a-1];\n\t\t\tvalues[a-1] = values[b-1];\n\t\t\tvalues[b-1] = value;\n\t\t}",
"String[] s = sc.nextLine().split(\",\");",
"s",
"sc.nextLine().split(\",\")",
"sc.nextLine().split",
"sc.nextLine()",
"sc.nextLine",
"sc",
"\",\"",
"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",
"int value = values[a-1];",
"value",
"values[a-1]",
"values",
"a-1",
"a",
"1",
"values[a-1] = values[b-1]",
"values[a-1]",
"values",
"a-1",
"a",
"1",
"values[b-1]",
"values",
"b-1",
"b",
"1",
"values[b-1] = value",
"values[b-1]",
"values",
"b-1",
"b",
"1",
"value",
"for(int i=0;i<line;i++){\n\t\t\tSystem.out.println(values[i]);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<line",
"i",
"line",
"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\n\t\tScanner sc = new Scanner(System.in);\n\t\tint line = Integer.parseInt(sc.nextLine());\n\t\tint n = Integer.parseInt(sc.nextLine());\n\n\t\tint[] values = new int[line];\n\t\tfor(int i=0;i<line;i++){\n\t\t\tvalues[i] = i+1;\n\t\t}\n\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] s = sc.nextLine().split(\",\");\n\t\t\tint a = Integer.parseInt(s[0]);\n\t\t\tint b= Integer.parseInt(s[1]);\n\n\t\t\tint value = values[a-1];\n\t\t\tvalues[a-1] = values[b-1];\n\t\t\tvalues[b-1] = value;\n\t\t}\n\n\t\tfor(int i=0;i<line;i++){\n\t\t\tSystem.out.println(values[i]);\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint line = Integer.parseInt(sc.nextLine());\n\t\tint n = Integer.parseInt(sc.nextLine());\n\n\t\tint[] values = new int[line];\n\t\tfor(int i=0;i<line;i++){\n\t\t\tvalues[i] = i+1;\n\t\t}\n\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] s = sc.nextLine().split(\",\");\n\t\t\tint a = Integer.parseInt(s[0]);\n\t\t\tint b= Integer.parseInt(s[1]);\n\n\t\t\tint value = values[a-1];\n\t\t\tvalues[a-1] = values[b-1];\n\t\t\tvalues[b-1] = value;\n\t\t}\n\n\t\tfor(int i=0;i<line;i++){\n\t\t\tSystem.out.println(values[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 line = Integer.parseInt(sc.nextLine());
int n = Integer.parseInt(sc.nextLine());
int[] values = new int[line];
for(int i=0;i<line;i++){
values[i] = i+1;
}
for(int i=0;i<n;i++){
String[] s = sc.nextLine().split(",");
int a = Integer.parseInt(s[0]);
int b= Integer.parseInt(s[1]);
int value = values[a-1];
values[a-1] = values[b-1];
values[b-1] = value;
}
for(int i=0;i<line;i++){
System.out.println(values[i]);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
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,
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,
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
],
[
150,
5
],
[
150,
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
],
[
22,
25
],
[
25,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
35,
37
],
[
8,
38
],
[
38,
39
],
[
38,
40
],
[
8,
41
],
[
41,
42
],
[
41,
43
],
[
8,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
50,
51
],
[
50,
52
],
[
45,
53
],
[
53,
54
],
[
54,
55
],
[
45,
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
],
[
81,
82
],
[
82,
83
],
[
79,
84
],
[
76,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
90,
91
],
[
90,
92
],
[
76,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
98,
99
],
[
98,
100
],
[
76,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
105,
107
],
[
76,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
111,
113
],
[
108,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
116,
118
],
[
76,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
122,
124
],
[
119,
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.io.*;\npublic class Main {\n\tpublic static void main(String[] args) throws 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\tString[] c = new String[2];\n\t\tint f=0;\n\t\tint s=0;\n\t\tint temp = 0;\n\t\tint[] amida = new int[w];\n\t\tfor(int i = 0 ; i < w ; i ++)\n\t\t\tamida[i]=i+1;\n\t\tfor(int i = 0 ; i < n ; i ++){\n\t\t\tc=br.readLine().split(\",\");\n\t\t\tf=Integer.parseInt(c[0]);\n\t\t\ts=Integer.parseInt(c[1]);\n\t\t\ttemp=amida[f-1];\n\t\t\tamida[f-1]=amida[s-1];\n\t\t\tamida[s-1]=temp;\n\t\t}\n\t\tfor(int i = 0;i<w;i++){\n\t\t\tSystem.out.println(amida[i]);\n\t\t}\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n\tpublic static void main(String[] args) throws 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\tString[] c = new String[2];\n\t\tint f=0;\n\t\tint s=0;\n\t\tint temp = 0;\n\t\tint[] amida = new int[w];\n\t\tfor(int i = 0 ; i < w ; i ++)\n\t\t\tamida[i]=i+1;\n\t\tfor(int i = 0 ; i < n ; i ++){\n\t\t\tc=br.readLine().split(\",\");\n\t\t\tf=Integer.parseInt(c[0]);\n\t\t\ts=Integer.parseInt(c[1]);\n\t\t\ttemp=amida[f-1];\n\t\t\tamida[f-1]=amida[s-1];\n\t\t\tamida[s-1]=temp;\n\t\t}\n\t\tfor(int i = 0;i<w;i++){\n\t\t\tSystem.out.println(amida[i]);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) throws 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\tString[] c = new String[2];\n\t\tint f=0;\n\t\tint s=0;\n\t\tint temp = 0;\n\t\tint[] amida = new int[w];\n\t\tfor(int i = 0 ; i < w ; i ++)\n\t\t\tamida[i]=i+1;\n\t\tfor(int i = 0 ; i < n ; i ++){\n\t\t\tc=br.readLine().split(\",\");\n\t\t\tf=Integer.parseInt(c[0]);\n\t\t\ts=Integer.parseInt(c[1]);\n\t\t\ttemp=amida[f-1];\n\t\t\tamida[f-1]=amida[s-1];\n\t\t\tamida[s-1]=temp;\n\t\t}\n\t\tfor(int i = 0;i<w;i++){\n\t\t\tSystem.out.println(amida[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\tString[] c = new String[2];\n\t\tint f=0;\n\t\tint s=0;\n\t\tint temp = 0;\n\t\tint[] amida = new int[w];\n\t\tfor(int i = 0 ; i < w ; i ++)\n\t\t\tamida[i]=i+1;\n\t\tfor(int i = 0 ; i < n ; i ++){\n\t\t\tc=br.readLine().split(\",\");\n\t\t\tf=Integer.parseInt(c[0]);\n\t\t\ts=Integer.parseInt(c[1]);\n\t\t\ttemp=amida[f-1];\n\t\t\tamida[f-1]=amida[s-1];\n\t\t\tamida[s-1]=temp;\n\t\t}\n\t\tfor(int i = 0;i<w;i++){\n\t\t\tSystem.out.println(amida[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",
"String[] c = new String[2];",
"c",
"new String[2]",
"2",
"int f=0;",
"f",
"0",
"int s=0;",
"s",
"0",
"int temp = 0;",
"temp",
"0",
"int[] amida = new int[w];",
"amida",
"new int[w]",
"w",
"for(int i = 0 ; i < w ; i ++)\n\t\t\tamida[i]=i+1;",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < w",
"i",
"w",
"i ++",
"i ++",
"i",
"amida[i]=i+1;",
"amida[i]=i+1",
"amida[i]",
"amida",
"i",
"i+1",
"i",
"1",
"for(int i = 0 ; i < n ; i ++){\n\t\t\tc=br.readLine().split(\",\");\n\t\t\tf=Integer.parseInt(c[0]);\n\t\t\ts=Integer.parseInt(c[1]);\n\t\t\ttemp=amida[f-1];\n\t\t\tamida[f-1]=amida[s-1];\n\t\t\tamida[s-1]=temp;\n\t\t}",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < n",
"i",
"n",
"i ++",
"i ++",
"i",
"{\n\t\t\tc=br.readLine().split(\",\");\n\t\t\tf=Integer.parseInt(c[0]);\n\t\t\ts=Integer.parseInt(c[1]);\n\t\t\ttemp=amida[f-1];\n\t\t\tamida[f-1]=amida[s-1];\n\t\t\tamida[s-1]=temp;\n\t\t}",
"{\n\t\t\tc=br.readLine().split(\",\");\n\t\t\tf=Integer.parseInt(c[0]);\n\t\t\ts=Integer.parseInt(c[1]);\n\t\t\ttemp=amida[f-1];\n\t\t\tamida[f-1]=amida[s-1];\n\t\t\tamida[s-1]=temp;\n\t\t}",
"c=br.readLine().split(\",\")",
"c",
"br.readLine().split(\",\")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\",\"",
"f=Integer.parseInt(c[0])",
"f",
"Integer.parseInt(c[0])",
"Integer.parseInt",
"Integer",
"c[0]",
"c",
"0",
"s=Integer.parseInt(c[1])",
"s",
"Integer.parseInt(c[1])",
"Integer.parseInt",
"Integer",
"c[1]",
"c",
"1",
"temp=amida[f-1]",
"temp",
"amida[f-1]",
"amida",
"f-1",
"f",
"1",
"amida[f-1]=amida[s-1]",
"amida[f-1]",
"amida",
"f-1",
"f",
"1",
"amida[s-1]",
"amida",
"s-1",
"s",
"1",
"amida[s-1]=temp",
"amida[s-1]",
"amida",
"s-1",
"s",
"1",
"temp",
"for(int i = 0;i<w;i++){\n\t\t\tSystem.out.println(amida[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(amida[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(amida[i]);\n\t\t}",
"System.out.println(amida[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"amida[i]",
"amida",
"i",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) throws 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\tString[] c = new String[2];\n\t\tint f=0;\n\t\tint s=0;\n\t\tint temp = 0;\n\t\tint[] amida = new int[w];\n\t\tfor(int i = 0 ; i < w ; i ++)\n\t\t\tamida[i]=i+1;\n\t\tfor(int i = 0 ; i < n ; i ++){\n\t\t\tc=br.readLine().split(\",\");\n\t\t\tf=Integer.parseInt(c[0]);\n\t\t\ts=Integer.parseInt(c[1]);\n\t\t\ttemp=amida[f-1];\n\t\t\tamida[f-1]=amida[s-1];\n\t\t\tamida[s-1]=temp;\n\t\t}\n\t\tfor(int i = 0;i<w;i++){\n\t\t\tSystem.out.println(amida[i]);\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) throws 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\tString[] c = new String[2];\n\t\tint f=0;\n\t\tint s=0;\n\t\tint temp = 0;\n\t\tint[] amida = new int[w];\n\t\tfor(int i = 0 ; i < w ; i ++)\n\t\t\tamida[i]=i+1;\n\t\tfor(int i = 0 ; i < n ; i ++){\n\t\t\tc=br.readLine().split(\",\");\n\t\t\tf=Integer.parseInt(c[0]);\n\t\t\ts=Integer.parseInt(c[1]);\n\t\t\ttemp=amida[f-1];\n\t\t\tamida[f-1]=amida[s-1];\n\t\t\tamida[s-1]=temp;\n\t\t}\n\t\tfor(int i = 0;i<w;i++){\n\t\t\tSystem.out.println(amida[i]);\n\t\t}\n\t}\n}",
"Main"
] | import java.io.*;
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());
String[] c = new String[2];
int f=0;
int s=0;
int temp = 0;
int[] amida = new int[w];
for(int i = 0 ; i < w ; i ++)
amida[i]=i+1;
for(int i = 0 ; i < n ; i ++){
c=br.readLine().split(",");
f=Integer.parseInt(c[0]);
s=Integer.parseInt(c[1]);
temp=amida[f-1];
amida[f-1]=amida[s-1];
amida[s-1]=temp;
}
for(int i = 0;i<w;i++){
System.out.println(amida[i]);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
17,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
0,
13,
4,
18,
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,
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,
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,
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
],
[
8,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
8,
24
],
[
24,
25
],
[
8,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
8,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
8,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
8,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
47,
48
],
[
47,
49
],
[
42,
50
],
[
50,
51
],
[
51,
52
],
[
42,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
8,
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
],
[
71,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
71,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
88,
89
],
[
88,
90
],
[
71,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
96,
97
],
[
96,
98
],
[
71,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
101,
103
],
[
71,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
108,
109
],
[
108,
110
],
[
71,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
111,
115
],
[
8,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
116,
121
],
[
121,
122
],
[
121,
123
],
[
116,
124
],
[
124,
125
],
[
125,
126
],
[
116,
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 public static void main(String[] args){\n Scanner s = new Scanner(System.in);\n int[] am = new int[32];\n int n,i,w,a,b,t;\n String st;\n String[] x;\n w = s.nextInt();\n n = s.nextInt();\n for(i=1;i<=w;i++)am[i]=i;\n for(i=1;i<=n;i++){\n st = s.next();\n x = st.split(\",\");\n a = Integer.parseInt(x[0]);\n b = Integer.parseInt(x[1]);\n t = am[a];\n am[a] = am[b];\n am[b] = t;\n }\n for(i=1;i<=w;i++)System.out.println(am[i]);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String[] args){\n Scanner s = new Scanner(System.in);\n int[] am = new int[32];\n int n,i,w,a,b,t;\n String st;\n String[] x;\n w = s.nextInt();\n n = s.nextInt();\n for(i=1;i<=w;i++)am[i]=i;\n for(i=1;i<=n;i++){\n st = s.next();\n x = st.split(\",\");\n a = Integer.parseInt(x[0]);\n b = Integer.parseInt(x[1]);\n t = am[a];\n am[a] = am[b];\n am[b] = t;\n }\n for(i=1;i<=w;i++)System.out.println(am[i]);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner s = new Scanner(System.in);\n int[] am = new int[32];\n int n,i,w,a,b,t;\n String st;\n String[] x;\n w = s.nextInt();\n n = s.nextInt();\n for(i=1;i<=w;i++)am[i]=i;\n for(i=1;i<=n;i++){\n st = s.next();\n x = st.split(\",\");\n a = Integer.parseInt(x[0]);\n b = Integer.parseInt(x[1]);\n t = am[a];\n am[a] = am[b];\n am[b] = t;\n }\n for(i=1;i<=w;i++)System.out.println(am[i]);\n }",
"main",
"{\n Scanner s = new Scanner(System.in);\n int[] am = new int[32];\n int n,i,w,a,b,t;\n String st;\n String[] x;\n w = s.nextInt();\n n = s.nextInt();\n for(i=1;i<=w;i++)am[i]=i;\n for(i=1;i<=n;i++){\n st = s.next();\n x = st.split(\",\");\n a = Integer.parseInt(x[0]);\n b = Integer.parseInt(x[1]);\n t = am[a];\n am[a] = am[b];\n am[b] = t;\n }\n for(i=1;i<=w;i++)System.out.println(am[i]);\n }",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"int[] am = new int[32];",
"am",
"new int[32]",
"32",
"int n",
"n",
"i",
"i",
"w",
"w",
"a",
"a",
"b",
"b",
"t;",
"t",
"String st;",
"st",
"String[] x;",
"x",
"w = s.nextInt()",
"w",
"s.nextInt()",
"s.nextInt",
"s",
"n = s.nextInt()",
"n",
"s.nextInt()",
"s.nextInt",
"s",
"for(i=1;i<=w;i++)am[i]=i;",
"i=1;",
"i=1",
"i",
"1",
"i<=w",
"i",
"w",
"i++",
"i++",
"i",
"am[i]=i;",
"am[i]=i",
"am[i]",
"am",
"i",
"i",
"for(i=1;i<=n;i++){\n st = s.next();\n x = st.split(\",\");\n a = Integer.parseInt(x[0]);\n b = Integer.parseInt(x[1]);\n t = am[a];\n am[a] = am[b];\n am[b] = t;\n }",
"i=1;",
"i=1",
"i",
"1",
"i<=n",
"i",
"n",
"i++",
"i++",
"i",
"{\n st = s.next();\n x = st.split(\",\");\n a = Integer.parseInt(x[0]);\n b = Integer.parseInt(x[1]);\n t = am[a];\n am[a] = am[b];\n am[b] = t;\n }",
"{\n st = s.next();\n x = st.split(\",\");\n a = Integer.parseInt(x[0]);\n b = Integer.parseInt(x[1]);\n t = am[a];\n am[a] = am[b];\n am[b] = t;\n }",
"st = s.next()",
"st",
"s.next()",
"s.next",
"s",
"x = st.split(\",\")",
"x",
"st.split(\",\")",
"st.split",
"st",
"\",\"",
"a = Integer.parseInt(x[0])",
"a",
"Integer.parseInt(x[0])",
"Integer.parseInt",
"Integer",
"x[0]",
"x",
"0",
"b = Integer.parseInt(x[1])",
"b",
"Integer.parseInt(x[1])",
"Integer.parseInt",
"Integer",
"x[1]",
"x",
"1",
"t = am[a]",
"t",
"am[a]",
"am",
"a",
"am[a] = am[b]",
"am[a]",
"am",
"a",
"am[b]",
"am",
"b",
"am[b] = t",
"am[b]",
"am",
"b",
"t",
"for(i=1;i<=w;i++)System.out.println(am[i]);",
"i=1;",
"i=1",
"i",
"1",
"i<=w",
"i",
"w",
"i++",
"i++",
"i",
"System.out.println(am[i]);",
"System.out.println(am[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"am[i]",
"am",
"i",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner s = new Scanner(System.in);\n int[] am = new int[32];\n int n,i,w,a,b,t;\n String st;\n String[] x;\n w = s.nextInt();\n n = s.nextInt();\n for(i=1;i<=w;i++)am[i]=i;\n for(i=1;i<=n;i++){\n st = s.next();\n x = st.split(\",\");\n a = Integer.parseInt(x[0]);\n b = Integer.parseInt(x[1]);\n t = am[a];\n am[a] = am[b];\n am[b] = t;\n }\n for(i=1;i<=w;i++)System.out.println(am[i]);\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner s = new Scanner(System.in);\n int[] am = new int[32];\n int n,i,w,a,b,t;\n String st;\n String[] x;\n w = s.nextInt();\n n = s.nextInt();\n for(i=1;i<=w;i++)am[i]=i;\n for(i=1;i<=n;i++){\n st = s.next();\n x = st.split(\",\");\n a = Integer.parseInt(x[0]);\n b = Integer.parseInt(x[1]);\n t = am[a];\n am[a] = am[b];\n am[b] = t;\n }\n for(i=1;i<=w;i++)System.out.println(am[i]);\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner s = new Scanner(System.in);
int[] am = new int[32];
int n,i,w,a,b,t;
String st;
String[] x;
w = s.nextInt();
n = s.nextInt();
for(i=1;i<=w;i++)am[i]=i;
for(i=1;i<=n;i++){
st = s.next();
x = st.split(",");
a = Integer.parseInt(x[0]);
b = Integer.parseInt(x[1]);
t = am[a];
am[a] = am[b];
am[b] = t;
}
for(i=1;i<=w;i++)System.out.println(am[i]);
}
}
|
[
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,
41,
13,
20,
13,
41,
13,
20,
13,
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,
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,
0,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
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,
0,
18,
13,
2,
13,
17,
2,
13,
17,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
164,
5
],
[
164,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
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
],
[
36,
38
],
[
8,
40
],
[
40,
41
],
[
40,
42
],
[
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
],
[
56,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
64,
67
],
[
56,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
75,
76
],
[
75,
77
],
[
56,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
85,
86
],
[
85,
87
],
[
8,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
93,
94
],
[
93,
95
],
[
88,
96
],
[
96,
97
],
[
97,
98
],
[
88,
99
],
[
100,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
103,
105
],
[
100,
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
],
[
120,
122
],
[
122,
123
],
[
122,
124
],
[
119,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
127,
129
],
[
119,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
133,
135
],
[
130,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
138,
140
],
[
100,
141
],
[
141,
142
],
[
142,
143
],
[
142,
144
],
[
144,
145
],
[
144,
146
],
[
141,
147
],
[
147,
148
],
[
147,
149
],
[
8,
150
],
[
150,
151
],
[
150,
152
],
[
150,
153
],
[
154,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
157,
159
],
[
155,
160
],
[
6,
161
],
[
161,
162
],
[
0,
163
],
[
163,
164
],
[
163,
165
]
] | [
"import java.util.Scanner;\n\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w, n, pos;\n\t\tString string;\n\t\tString[] strings;\n\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\t\tint[] endPos = new int[w];\n\t\tint[] na = new int[n];\n\t\tint[] nb = new int[n];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tstring = sc.next();\n\t\t\tstrings = string.split(\",\");\n\t\t\tna[i] = Integer.parseInt(strings[0]);\n\t\t\tnb[i] = Integer.parseInt(strings[1]);\n\t\t}\n\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tpos = i + 1;\n\t\t\tfor(int j = 0; j < n; j++){\n\t\t\t\tif(pos == na[j]) pos = nb[j];\n\t\t\t\telse if(pos == nb[j]) pos = na[j];\n\t\t\t}\n\t\t\tendPos[pos - 1] = i + 1;\n\t\t}\n\n\t\tfor(int value: endPos){\n\t\t\tSystem.out.println(value);\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\n\t\tint w, n, pos;\n\t\tString string;\n\t\tString[] strings;\n\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\t\tint[] endPos = new int[w];\n\t\tint[] na = new int[n];\n\t\tint[] nb = new int[n];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tstring = sc.next();\n\t\t\tstrings = string.split(\",\");\n\t\t\tna[i] = Integer.parseInt(strings[0]);\n\t\t\tnb[i] = Integer.parseInt(strings[1]);\n\t\t}\n\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tpos = i + 1;\n\t\t\tfor(int j = 0; j < n; j++){\n\t\t\t\tif(pos == na[j]) pos = nb[j];\n\t\t\t\telse if(pos == nb[j]) pos = na[j];\n\t\t\t}\n\t\t\tendPos[pos - 1] = i + 1;\n\t\t}\n\n\t\tfor(int value: endPos){\n\t\t\tSystem.out.println(value);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w, n, pos;\n\t\tString string;\n\t\tString[] strings;\n\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\t\tint[] endPos = new int[w];\n\t\tint[] na = new int[n];\n\t\tint[] nb = new int[n];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tstring = sc.next();\n\t\t\tstrings = string.split(\",\");\n\t\t\tna[i] = Integer.parseInt(strings[0]);\n\t\t\tnb[i] = Integer.parseInt(strings[1]);\n\t\t}\n\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tpos = i + 1;\n\t\t\tfor(int j = 0; j < n; j++){\n\t\t\t\tif(pos == na[j]) pos = nb[j];\n\t\t\t\telse if(pos == nb[j]) pos = na[j];\n\t\t\t}\n\t\t\tendPos[pos - 1] = i + 1;\n\t\t}\n\n\t\tfor(int value: endPos){\n\t\t\tSystem.out.println(value);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w, n, pos;\n\t\tString string;\n\t\tString[] strings;\n\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\t\tint[] endPos = new int[w];\n\t\tint[] na = new int[n];\n\t\tint[] nb = new int[n];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tstring = sc.next();\n\t\t\tstrings = string.split(\",\");\n\t\t\tna[i] = Integer.parseInt(strings[0]);\n\t\t\tnb[i] = Integer.parseInt(strings[1]);\n\t\t}\n\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tpos = i + 1;\n\t\t\tfor(int j = 0; j < n; j++){\n\t\t\t\tif(pos == na[j]) pos = nb[j];\n\t\t\t\telse if(pos == nb[j]) pos = na[j];\n\t\t\t}\n\t\t\tendPos[pos - 1] = i + 1;\n\t\t}\n\n\t\tfor(int value: endPos){\n\t\t\tSystem.out.println(value);\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w",
"w",
"n",
"n",
"pos;",
"pos",
"String string;",
"string",
"String[] strings;",
"strings",
"w = sc.nextInt()",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] endPos = new int[w];",
"endPos",
"new int[w]",
"w",
"int[] na = new int[n];",
"na",
"new int[n]",
"n",
"int[] nb = new int[n];",
"nb",
"new int[n]",
"n",
"for(int i = 0; i < n; i++){\n\t\t\tstring = sc.next();\n\t\t\tstrings = string.split(\",\");\n\t\t\tna[i] = Integer.parseInt(strings[0]);\n\t\t\tnb[i] = Integer.parseInt(strings[1]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tstring = sc.next();\n\t\t\tstrings = string.split(\",\");\n\t\t\tna[i] = Integer.parseInt(strings[0]);\n\t\t\tnb[i] = Integer.parseInt(strings[1]);\n\t\t}",
"{\n\t\t\tstring = sc.next();\n\t\t\tstrings = string.split(\",\");\n\t\t\tna[i] = Integer.parseInt(strings[0]);\n\t\t\tnb[i] = Integer.parseInt(strings[1]);\n\t\t}",
"string = sc.next()",
"string",
"sc.next()",
"sc.next",
"sc",
"strings = string.split(\",\")",
"strings",
"string.split(\",\")",
"string.split",
"string",
"\",\"",
"na[i] = Integer.parseInt(strings[0])",
"na[i]",
"na",
"i",
"Integer.parseInt(strings[0])",
"Integer.parseInt",
"Integer",
"strings[0]",
"strings",
"0",
"nb[i] = Integer.parseInt(strings[1])",
"nb[i]",
"nb",
"i",
"Integer.parseInt(strings[1])",
"Integer.parseInt",
"Integer",
"strings[1]",
"strings",
"1",
"for(int i = 0; i < w; i++){\n\t\t\tpos = i + 1;\n\t\t\tfor(int j = 0; j < n; j++){\n\t\t\t\tif(pos == na[j]) pos = nb[j];\n\t\t\t\telse if(pos == nb[j]) pos = na[j];\n\t\t\t}\n\t\t\tendPos[pos - 1] = i + 1;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tpos = i + 1;\n\t\t\tfor(int j = 0; j < n; j++){\n\t\t\t\tif(pos == na[j]) pos = nb[j];\n\t\t\t\telse if(pos == nb[j]) pos = na[j];\n\t\t\t}\n\t\t\tendPos[pos - 1] = i + 1;\n\t\t}",
"{\n\t\t\tpos = i + 1;\n\t\t\tfor(int j = 0; j < n; j++){\n\t\t\t\tif(pos == na[j]) pos = nb[j];\n\t\t\t\telse if(pos == nb[j]) pos = na[j];\n\t\t\t}\n\t\t\tendPos[pos - 1] = i + 1;\n\t\t}",
"pos = i + 1",
"pos",
"i + 1",
"i",
"1",
"for(int j = 0; j < n; j++){\n\t\t\t\tif(pos == na[j]) pos = nb[j];\n\t\t\t\telse if(pos == nb[j]) pos = na[j];\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < n",
"j",
"n",
"j++",
"j++",
"j",
"{\n\t\t\t\tif(pos == na[j]) pos = nb[j];\n\t\t\t\telse if(pos == nb[j]) pos = na[j];\n\t\t\t}",
"{\n\t\t\t\tif(pos == na[j]) pos = nb[j];\n\t\t\t\telse if(pos == nb[j]) pos = na[j];\n\t\t\t}",
"if(pos == na[j]) pos = nb[j];\n\t\t\t\telse if(pos == nb[j]) pos = na[j];",
"pos == na[j]",
"pos",
"na[j]",
"na",
"j",
"pos = nb[j]",
"pos",
"nb[j]",
"nb",
"j",
"if(pos == nb[j]) pos = na[j];",
"pos == nb[j]",
"pos",
"nb[j]",
"nb",
"j",
"pos = na[j]",
"pos",
"na[j]",
"na",
"j",
"endPos[pos - 1] = i + 1",
"endPos[pos - 1]",
"endPos",
"pos - 1",
"pos",
"1",
"i + 1",
"i",
"1",
"for(int value: endPos){\n\t\t\tSystem.out.println(value);\n\t\t}",
"int value",
"endPos",
"{\n\t\t\tSystem.out.println(value);\n\t\t}",
"{\n\t\t\tSystem.out.println(value);\n\t\t}",
"System.out.println(value)",
"System.out.println",
"System.out",
"System",
"System.out",
"value",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w, n, pos;\n\t\tString string;\n\t\tString[] strings;\n\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\t\tint[] endPos = new int[w];\n\t\tint[] na = new int[n];\n\t\tint[] nb = new int[n];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tstring = sc.next();\n\t\t\tstrings = string.split(\",\");\n\t\t\tna[i] = Integer.parseInt(strings[0]);\n\t\t\tnb[i] = Integer.parseInt(strings[1]);\n\t\t}\n\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tpos = i + 1;\n\t\t\tfor(int j = 0; j < n; j++){\n\t\t\t\tif(pos == na[j]) pos = nb[j];\n\t\t\t\telse if(pos == nb[j]) pos = na[j];\n\t\t\t}\n\t\t\tendPos[pos - 1] = i + 1;\n\t\t}\n\n\t\tfor(int value: endPos){\n\t\t\tSystem.out.println(value);\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\n\t\tint w, n, pos;\n\t\tString string;\n\t\tString[] strings;\n\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\t\tint[] endPos = new int[w];\n\t\tint[] na = new int[n];\n\t\tint[] nb = new int[n];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tstring = sc.next();\n\t\t\tstrings = string.split(\",\");\n\t\t\tna[i] = Integer.parseInt(strings[0]);\n\t\t\tnb[i] = Integer.parseInt(strings[1]);\n\t\t}\n\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tpos = i + 1;\n\t\t\tfor(int j = 0; j < n; j++){\n\t\t\t\tif(pos == na[j]) pos = nb[j];\n\t\t\t\telse if(pos == nb[j]) pos = na[j];\n\t\t\t}\n\t\t\tendPos[pos - 1] = i + 1;\n\t\t}\n\n\t\tfor(int value: endPos){\n\t\t\tSystem.out.println(value);\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, n, pos;
String string;
String[] strings;
w = sc.nextInt();
n = sc.nextInt();
int[] endPos = new int[w];
int[] na = new int[n];
int[] nb = new int[n];
for(int i = 0; i < n; i++){
string = sc.next();
strings = string.split(",");
na[i] = Integer.parseInt(strings[0]);
nb[i] = Integer.parseInt(strings[1]);
}
for(int i = 0; i < w; i++){
pos = i + 1;
for(int j = 0; j < n; j++){
if(pos == na[j]) pos = nb[j];
else if(pos == nb[j]) pos = na[j];
}
endPos[pos - 1] = i + 1;
}
for(int value: endPos){
System.out.println(value);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
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,
42,
4,
18,
13,
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
],
[
120,
5
],
[
120,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
16,
19
],
[
19,
20
],
[
20,
21
],
[
10,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
24,
27
],
[
27,
28
],
[
28,
29
],
[
10,
30
],
[
30,
31
],
[
30,
32
],
[
10,
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
],
[
48,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
53,
55
],
[
10,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
56,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
63,
68
],
[
60,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
75,
76
],
[
75,
77
],
[
71,
78
],
[
60,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
85,
86
],
[
85,
87
],
[
81,
88
],
[
60,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
91,
93
],
[
60,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
98,
99
],
[
98,
100
],
[
60,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
10,
106
],
[
106,
107
],
[
106,
108
],
[
106,
109
],
[
110,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
111,
116
],
[
6,
117
],
[
117,
118
],
[
0,
119
],
[
119,
120
],
[
119,
121
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\tint w = Integer.parseInt(sc.nextLine());\n\t\t\tint n = Integer.parseInt(sc.nextLine());\n\t\t\tint[] ans = new int[w];\n\t\t\tfor (int i = 0; i < ans.length; i++) {\n\t\t\t\tans[i] = i + 1;\n\t\t\t}\n\t\t\twhile (sc.hasNext()) {\t\n\t\t\t\tString[] s = sc.nextLine().split(\",\");\n\t\t\t\tint x = Integer.parseInt(s[0]) - 1;\n\t\t\t\tint y = Integer.parseInt(s[1]) - 1;\n\t\t\t\tint tmp = ans[x];\n\t\t\t\tans[x] = ans[y];\n\t\t\t\tans[y] = tmp;\n\t\t\t\t\n\t\t\t}\n\t\t\tfor (int z : ans) {\n\t\t\t\tSystem.out.println(z);\n\t\t\t}\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\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\tint w = Integer.parseInt(sc.nextLine());\n\t\t\tint n = Integer.parseInt(sc.nextLine());\n\t\t\tint[] ans = new int[w];\n\t\t\tfor (int i = 0; i < ans.length; i++) {\n\t\t\t\tans[i] = i + 1;\n\t\t\t}\n\t\t\twhile (sc.hasNext()) {\t\n\t\t\t\tString[] s = sc.nextLine().split(\",\");\n\t\t\t\tint x = Integer.parseInt(s[0]) - 1;\n\t\t\t\tint y = Integer.parseInt(s[1]) - 1;\n\t\t\t\tint tmp = ans[x];\n\t\t\t\tans[x] = ans[y];\n\t\t\t\tans[y] = tmp;\n\t\t\t\t\n\t\t\t}\n\t\t\tfor (int z : ans) {\n\t\t\t\tSystem.out.println(z);\n\t\t\t}\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\tint w = Integer.parseInt(sc.nextLine());\n\t\t\tint n = Integer.parseInt(sc.nextLine());\n\t\t\tint[] ans = new int[w];\n\t\t\tfor (int i = 0; i < ans.length; i++) {\n\t\t\t\tans[i] = i + 1;\n\t\t\t}\n\t\t\twhile (sc.hasNext()) {\t\n\t\t\t\tString[] s = sc.nextLine().split(\",\");\n\t\t\t\tint x = Integer.parseInt(s[0]) - 1;\n\t\t\t\tint y = Integer.parseInt(s[1]) - 1;\n\t\t\t\tint tmp = ans[x];\n\t\t\t\tans[x] = ans[y];\n\t\t\t\tans[y] = tmp;\n\t\t\t\t\n\t\t\t}\n\t\t\tfor (int z : ans) {\n\t\t\t\tSystem.out.println(z);\n\t\t\t}\n\t\t}\n\t}",
"main",
"{\n\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\tint w = Integer.parseInt(sc.nextLine());\n\t\t\tint n = Integer.parseInt(sc.nextLine());\n\t\t\tint[] ans = new int[w];\n\t\t\tfor (int i = 0; i < ans.length; i++) {\n\t\t\t\tans[i] = i + 1;\n\t\t\t}\n\t\t\twhile (sc.hasNext()) {\t\n\t\t\t\tString[] s = sc.nextLine().split(\",\");\n\t\t\t\tint x = Integer.parseInt(s[0]) - 1;\n\t\t\t\tint y = Integer.parseInt(s[1]) - 1;\n\t\t\t\tint tmp = ans[x];\n\t\t\t\tans[x] = ans[y];\n\t\t\t\tans[y] = tmp;\n\t\t\t\t\n\t\t\t}\n\t\t\tfor (int z : ans) {\n\t\t\t\tSystem.out.println(z);\n\t\t\t}\n\t\t}\n\t}",
"try (Scanner sc = new Scanner(System.in)) {\n\t\t\tint w = Integer.parseInt(sc.nextLine());\n\t\t\tint n = Integer.parseInt(sc.nextLine());\n\t\t\tint[] ans = new int[w];\n\t\t\tfor (int i = 0; i < ans.length; i++) {\n\t\t\t\tans[i] = i + 1;\n\t\t\t}\n\t\t\twhile (sc.hasNext()) {\t\n\t\t\t\tString[] s = sc.nextLine().split(\",\");\n\t\t\t\tint x = Integer.parseInt(s[0]) - 1;\n\t\t\t\tint y = Integer.parseInt(s[1]) - 1;\n\t\t\t\tint tmp = ans[x];\n\t\t\t\tans[x] = ans[y];\n\t\t\t\tans[y] = tmp;\n\t\t\t\t\n\t\t\t}\n\t\t\tfor (int z : ans) {\n\t\t\t\tSystem.out.println(z);\n\t\t\t}\n\t\t}",
"{\n\t\t\tint w = Integer.parseInt(sc.nextLine());\n\t\t\tint n = Integer.parseInt(sc.nextLine());\n\t\t\tint[] ans = new int[w];\n\t\t\tfor (int i = 0; i < ans.length; i++) {\n\t\t\t\tans[i] = i + 1;\n\t\t\t}\n\t\t\twhile (sc.hasNext()) {\t\n\t\t\t\tString[] s = sc.nextLine().split(\",\");\n\t\t\t\tint x = Integer.parseInt(s[0]) - 1;\n\t\t\t\tint y = Integer.parseInt(s[1]) - 1;\n\t\t\t\tint tmp = ans[x];\n\t\t\t\tans[x] = ans[y];\n\t\t\t\tans[y] = tmp;\n\t\t\t\t\n\t\t\t}\n\t\t\tfor (int z : ans) {\n\t\t\t\tSystem.out.println(z);\n\t\t\t}\n\t\t}",
"Scanner sc = new Scanner(System.in)",
"Scanner sc = new Scanner(System.in)",
"new Scanner(System.in)",
"int w = Integer.parseInt(sc.nextLine());",
"w",
"Integer.parseInt(sc.nextLine())",
"Integer.parseInt",
"Integer",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int n = Integer.parseInt(sc.nextLine());",
"n",
"Integer.parseInt(sc.nextLine())",
"Integer.parseInt",
"Integer",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int[] ans = new int[w];",
"ans",
"new int[w]",
"w",
"for (int i = 0; i < ans.length; i++) {\n\t\t\t\tans[i] = i + 1;\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < ans.length",
"i",
"ans.length",
"ans",
"ans.length",
"i++",
"i++",
"i",
"{\n\t\t\t\tans[i] = i + 1;\n\t\t\t}",
"{\n\t\t\t\tans[i] = i + 1;\n\t\t\t}",
"ans[i] = i + 1",
"ans[i]",
"ans",
"i",
"i + 1",
"i",
"1",
"while (sc.hasNext()) {\t\n\t\t\t\tString[] s = sc.nextLine().split(\",\");\n\t\t\t\tint x = Integer.parseInt(s[0]) - 1;\n\t\t\t\tint y = Integer.parseInt(s[1]) - 1;\n\t\t\t\tint tmp = ans[x];\n\t\t\t\tans[x] = ans[y];\n\t\t\t\tans[y] = tmp;\n\t\t\t\t\n\t\t\t}",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\t\n\t\t\t\tString[] s = sc.nextLine().split(\",\");\n\t\t\t\tint x = Integer.parseInt(s[0]) - 1;\n\t\t\t\tint y = Integer.parseInt(s[1]) - 1;\n\t\t\t\tint tmp = ans[x];\n\t\t\t\tans[x] = ans[y];\n\t\t\t\tans[y] = tmp;\n\t\t\t\t\n\t\t\t}",
"String[] s = sc.nextLine().split(\",\");",
"s",
"sc.nextLine().split(\",\")",
"sc.nextLine().split",
"sc.nextLine()",
"sc.nextLine",
"sc",
"\",\"",
"int x = Integer.parseInt(s[0]) - 1;",
"x",
"Integer.parseInt(s[0]) - 1",
"Integer.parseInt(s[0])",
"Integer.parseInt",
"Integer",
"s[0]",
"s",
"0",
"1",
"int y = Integer.parseInt(s[1]) - 1;",
"y",
"Integer.parseInt(s[1]) - 1",
"Integer.parseInt(s[1])",
"Integer.parseInt",
"Integer",
"s[1]",
"s",
"1",
"1",
"int tmp = ans[x];",
"tmp",
"ans[x]",
"ans",
"x",
"ans[x] = ans[y]",
"ans[x]",
"ans",
"x",
"ans[y]",
"ans",
"y",
"ans[y] = tmp",
"ans[y]",
"ans",
"y",
"tmp",
"for (int z : ans) {\n\t\t\t\tSystem.out.println(z);\n\t\t\t}",
"int z",
"ans",
"{\n\t\t\t\tSystem.out.println(z);\n\t\t\t}",
"{\n\t\t\t\tSystem.out.println(z);\n\t\t\t}",
"System.out.println(z)",
"System.out.println",
"System.out",
"System",
"System.out",
"z",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\tint w = Integer.parseInt(sc.nextLine());\n\t\t\tint n = Integer.parseInt(sc.nextLine());\n\t\t\tint[] ans = new int[w];\n\t\t\tfor (int i = 0; i < ans.length; i++) {\n\t\t\t\tans[i] = i + 1;\n\t\t\t}\n\t\t\twhile (sc.hasNext()) {\t\n\t\t\t\tString[] s = sc.nextLine().split(\",\");\n\t\t\t\tint x = Integer.parseInt(s[0]) - 1;\n\t\t\t\tint y = Integer.parseInt(s[1]) - 1;\n\t\t\t\tint tmp = ans[x];\n\t\t\t\tans[x] = ans[y];\n\t\t\t\tans[y] = tmp;\n\t\t\t\t\n\t\t\t}\n\t\t\tfor (int z : ans) {\n\t\t\t\tSystem.out.println(z);\n\t\t\t}\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\tint w = Integer.parseInt(sc.nextLine());\n\t\t\tint n = Integer.parseInt(sc.nextLine());\n\t\t\tint[] ans = new int[w];\n\t\t\tfor (int i = 0; i < ans.length; i++) {\n\t\t\t\tans[i] = i + 1;\n\t\t\t}\n\t\t\twhile (sc.hasNext()) {\t\n\t\t\t\tString[] s = sc.nextLine().split(\",\");\n\t\t\t\tint x = Integer.parseInt(s[0]) - 1;\n\t\t\t\tint y = Integer.parseInt(s[1]) - 1;\n\t\t\t\tint tmp = ans[x];\n\t\t\t\tans[x] = ans[y];\n\t\t\t\tans[y] = tmp;\n\t\t\t\t\n\t\t\t}\n\t\t\tfor (int z : ans) {\n\t\t\t\tSystem.out.println(z);\n\t\t\t}\n\t\t}\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner sc = new Scanner(System.in)) {
int w = Integer.parseInt(sc.nextLine());
int n = Integer.parseInt(sc.nextLine());
int[] ans = new int[w];
for (int i = 0; i < ans.length; i++) {
ans[i] = i + 1;
}
while (sc.hasNext()) {
String[] s = sc.nextLine().split(",");
int x = Integer.parseInt(s[0]) - 1;
int y = Integer.parseInt(s[1]) - 1;
int tmp = ans[x];
ans[x] = ans[y];
ans[y] = tmp;
}
for (int z : ans) {
System.out.println(z);
}
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
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,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
20,
17,
41,
13,
4,
18,
4,
18,
13,
17,
0,
18,
13,
17,
2,
4,
18,
13,
18,
13,
17,
17,
0,
18,
13,
17,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
18,
13,
18,
13,
17,
0,
18,
13,
18,
13,
17,
18,
13,
18,
13,
17,
0,
18,
13,
18,
13,
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,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
148,
5
],
[
148,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
15,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
18,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
25,
27
],
[
18,
28
],
[
28,
29
],
[
29,
30
],
[
18,
31
],
[
32,
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
],
[
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
],
[
60,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
67,
72
],
[
60,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
81,
82
],
[
81,
83
],
[
77,
84
],
[
60,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
93,
94
],
[
93,
95
],
[
89,
96
],
[
60,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
101,
103
],
[
60,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
107,
109
],
[
104,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
112,
114
],
[
60,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
118,
120
],
[
115,
121
],
[
8,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
122,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
129,
131
],
[
122,
132
],
[
132,
133
],
[
133,
134
],
[
122,
135
],
[
136,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
137,
142
],
[
142,
143
],
[
142,
144
],
[
6,
145
],
[
145,
146
],
[
0,
147
],
[
147,
148
],
[
147,
149
]
] | [
"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[] row = new int[sc.nextInt()];\n\t\tfor(int i = 0; i < row.length; i++){\n\t\t\trow[i] = i + 1;\n\t\t}\n\t\tint ctimes = sc.nextInt();\n\t\n\t\tsc.nextLine();\n\t\tfor(int j = 0; j < ctimes; j++){\n\t\t\tint[] ch = new int[2];\n\t\t\tString[] s = sc.nextLine().split(\",\");\n\t\t\tch[0] = Integer.parseInt(s[0]) -1;\n\t\t\tch[1] = Integer.parseInt(s[1]) -1;\n\t\t\t\n\t\t\tint temp = row[ch[0]];\n\t\t\trow[ch[0]] = row[ch[1]];\n\t\t\trow[ch[1]] = temp;\n\t\t}\n\n\t\tfor(int i = 0; i < row.length; i++){\n\t\t\tSystem.out.println(row[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[] row = new int[sc.nextInt()];\n\t\tfor(int i = 0; i < row.length; i++){\n\t\t\trow[i] = i + 1;\n\t\t}\n\t\tint ctimes = sc.nextInt();\n\t\n\t\tsc.nextLine();\n\t\tfor(int j = 0; j < ctimes; j++){\n\t\t\tint[] ch = new int[2];\n\t\t\tString[] s = sc.nextLine().split(\",\");\n\t\t\tch[0] = Integer.parseInt(s[0]) -1;\n\t\t\tch[1] = Integer.parseInt(s[1]) -1;\n\t\t\t\n\t\t\tint temp = row[ch[0]];\n\t\t\trow[ch[0]] = row[ch[1]];\n\t\t\trow[ch[1]] = temp;\n\t\t}\n\n\t\tfor(int i = 0; i < row.length; i++){\n\t\t\tSystem.out.println(row[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[] row = new int[sc.nextInt()];\n\t\tfor(int i = 0; i < row.length; i++){\n\t\t\trow[i] = i + 1;\n\t\t}\n\t\tint ctimes = sc.nextInt();\n\t\n\t\tsc.nextLine();\n\t\tfor(int j = 0; j < ctimes; j++){\n\t\t\tint[] ch = new int[2];\n\t\t\tString[] s = sc.nextLine().split(\",\");\n\t\t\tch[0] = Integer.parseInt(s[0]) -1;\n\t\t\tch[1] = Integer.parseInt(s[1]) -1;\n\t\t\t\n\t\t\tint temp = row[ch[0]];\n\t\t\trow[ch[0]] = row[ch[1]];\n\t\t\trow[ch[1]] = temp;\n\t\t}\n\n\t\tfor(int i = 0; i < row.length; i++){\n\t\t\tSystem.out.println(row[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint[] row = new int[sc.nextInt()];\n\t\tfor(int i = 0; i < row.length; i++){\n\t\t\trow[i] = i + 1;\n\t\t}\n\t\tint ctimes = sc.nextInt();\n\t\n\t\tsc.nextLine();\n\t\tfor(int j = 0; j < ctimes; j++){\n\t\t\tint[] ch = new int[2];\n\t\t\tString[] s = sc.nextLine().split(\",\");\n\t\t\tch[0] = Integer.parseInt(s[0]) -1;\n\t\t\tch[1] = Integer.parseInt(s[1]) -1;\n\t\t\t\n\t\t\tint temp = row[ch[0]];\n\t\t\trow[ch[0]] = row[ch[1]];\n\t\t\trow[ch[1]] = temp;\n\t\t}\n\n\t\tfor(int i = 0; i < row.length; i++){\n\t\t\tSystem.out.println(row[i]);\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int[] row = new int[sc.nextInt()];",
"row",
"new int[sc.nextInt()]",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i = 0; i < row.length; i++){\n\t\t\trow[i] = i + 1;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < row.length",
"i",
"row.length",
"row",
"row.length",
"i++",
"i++",
"i",
"{\n\t\t\trow[i] = i + 1;\n\t\t}",
"{\n\t\t\trow[i] = i + 1;\n\t\t}",
"row[i] = i + 1",
"row[i]",
"row",
"i",
"i + 1",
"i",
"1",
"int ctimes = sc.nextInt();",
"ctimes",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sc.nextLine()",
"sc.nextLine",
"sc",
"for(int j = 0; j < ctimes; j++){\n\t\t\tint[] ch = new int[2];\n\t\t\tString[] s = sc.nextLine().split(\",\");\n\t\t\tch[0] = Integer.parseInt(s[0]) -1;\n\t\t\tch[1] = Integer.parseInt(s[1]) -1;\n\t\t\t\n\t\t\tint temp = row[ch[0]];\n\t\t\trow[ch[0]] = row[ch[1]];\n\t\t\trow[ch[1]] = temp;\n\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < ctimes",
"j",
"ctimes",
"j++",
"j++",
"j",
"{\n\t\t\tint[] ch = new int[2];\n\t\t\tString[] s = sc.nextLine().split(\",\");\n\t\t\tch[0] = Integer.parseInt(s[0]) -1;\n\t\t\tch[1] = Integer.parseInt(s[1]) -1;\n\t\t\t\n\t\t\tint temp = row[ch[0]];\n\t\t\trow[ch[0]] = row[ch[1]];\n\t\t\trow[ch[1]] = temp;\n\t\t}",
"{\n\t\t\tint[] ch = new int[2];\n\t\t\tString[] s = sc.nextLine().split(\",\");\n\t\t\tch[0] = Integer.parseInt(s[0]) -1;\n\t\t\tch[1] = Integer.parseInt(s[1]) -1;\n\t\t\t\n\t\t\tint temp = row[ch[0]];\n\t\t\trow[ch[0]] = row[ch[1]];\n\t\t\trow[ch[1]] = temp;\n\t\t}",
"int[] ch = new int[2];",
"ch",
"new int[2]",
"2",
"String[] s = sc.nextLine().split(\",\");",
"s",
"sc.nextLine().split(\",\")",
"sc.nextLine().split",
"sc.nextLine()",
"sc.nextLine",
"sc",
"\",\"",
"ch[0] = Integer.parseInt(s[0]) -1",
"ch[0]",
"ch",
"0",
"Integer.parseInt(s[0]) -1",
"Integer.parseInt(s[0])",
"Integer.parseInt",
"Integer",
"s[0]",
"s",
"0",
"1",
"ch[1] = Integer.parseInt(s[1]) -1",
"ch[1]",
"ch",
"1",
"Integer.parseInt(s[1]) -1",
"Integer.parseInt(s[1])",
"Integer.parseInt",
"Integer",
"s[1]",
"s",
"1",
"1",
"int temp = row[ch[0]];",
"temp",
"row[ch[0]]",
"row",
"ch[0]",
"ch",
"0",
"row[ch[0]] = row[ch[1]]",
"row[ch[0]]",
"row",
"ch[0]",
"ch",
"0",
"row[ch[1]]",
"row",
"ch[1]",
"ch",
"1",
"row[ch[1]] = temp",
"row[ch[1]]",
"row",
"ch[1]",
"ch",
"1",
"temp",
"for(int i = 0; i < row.length; i++){\n\t\t\tSystem.out.println(row[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < row.length",
"i",
"row.length",
"row",
"row.length",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(row[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(row[i]);\n\t\t}",
"System.out.println(row[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"row[i]",
"row",
"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[] row = new int[sc.nextInt()];\n\t\tfor(int i = 0; i < row.length; i++){\n\t\t\trow[i] = i + 1;\n\t\t}\n\t\tint ctimes = sc.nextInt();\n\t\n\t\tsc.nextLine();\n\t\tfor(int j = 0; j < ctimes; j++){\n\t\t\tint[] ch = new int[2];\n\t\t\tString[] s = sc.nextLine().split(\",\");\n\t\t\tch[0] = Integer.parseInt(s[0]) -1;\n\t\t\tch[1] = Integer.parseInt(s[1]) -1;\n\t\t\t\n\t\t\tint temp = row[ch[0]];\n\t\t\trow[ch[0]] = row[ch[1]];\n\t\t\trow[ch[1]] = temp;\n\t\t}\n\n\t\tfor(int i = 0; i < row.length; i++){\n\t\t\tSystem.out.println(row[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[] row = new int[sc.nextInt()];\n\t\tfor(int i = 0; i < row.length; i++){\n\t\t\trow[i] = i + 1;\n\t\t}\n\t\tint ctimes = sc.nextInt();\n\t\n\t\tsc.nextLine();\n\t\tfor(int j = 0; j < ctimes; j++){\n\t\t\tint[] ch = new int[2];\n\t\t\tString[] s = sc.nextLine().split(\",\");\n\t\t\tch[0] = Integer.parseInt(s[0]) -1;\n\t\t\tch[1] = Integer.parseInt(s[1]) -1;\n\t\t\t\n\t\t\tint temp = row[ch[0]];\n\t\t\trow[ch[0]] = row[ch[1]];\n\t\t\trow[ch[1]] = temp;\n\t\t}\n\n\t\tfor(int i = 0; i < row.length; i++){\n\t\t\tSystem.out.println(row[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[] row = new int[sc.nextInt()];
for(int i = 0; i < row.length; i++){
row[i] = i + 1;
}
int ctimes = sc.nextInt();
sc.nextLine();
for(int j = 0; j < ctimes; j++){
int[] ch = new int[2];
String[] s = sc.nextLine().split(",");
ch[0] = Integer.parseInt(s[0]) -1;
ch[1] = Integer.parseInt(s[1]) -1;
int temp = row[ch[0]];
row[ch[0]] = row[ch[1]];
row[ch[1]] = temp;
}
for(int i = 0; i < row.length; i++){
System.out.println(row[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,
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,
4,
18,
13,
17,
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,
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
],
[
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
],
[
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
],
[
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
],
[
68,
69
],
[
69,
70
],
[
66,
71
],
[
66,
72
],
[
63,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
79,
80
],
[
79,
81
],
[
75,
82
],
[
63,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
89,
90
],
[
89,
91
],
[
85,
92
],
[
63,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
95,
97
],
[
63,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
102,
103
],
[
102,
104
],
[
63,
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
],
[
122,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
123,
128
],
[
128,
129
],
[
128,
130
],
[
6,
131
],
[
131,
132
],
[
0,
133
],
[
133,
134
],
[
133,
135
]
] | [
"import java.util.Scanner;\n\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] array = new int[w];\n\t\tint swap1, swap2;\n\t\tbyte garbage;\n\n\t\tfor(int i = 0;i < w;i++) array[i] = i + 1;\n\n\t\tfor(int i = 0;i < n;i++){\n//\t\t\tString swap = sc.next();\n\t\t\tString[] swaps = sc.next().split(\",\", 0);\n\n\t\t\tswap1 = Integer.parseInt(swaps[0]) - 1;\n\t\t\tswap2 = Integer.parseInt(swaps[1]) - 1;\n\n\t\t\tint temp = array[swap1];\n\t\t\tarray[swap1] = array[swap2];\n\t\t\tarray[swap2] = temp;\n\t\t}\n\n\t\tfor(int i = 0;i < w;i++){\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\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\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] array = new int[w];\n\t\tint swap1, swap2;\n\t\tbyte garbage;\n\n\t\tfor(int i = 0;i < w;i++) array[i] = i + 1;\n\n\t\tfor(int i = 0;i < n;i++){\n//\t\t\tString swap = sc.next();\n\t\t\tString[] swaps = sc.next().split(\",\", 0);\n\n\t\t\tswap1 = Integer.parseInt(swaps[0]) - 1;\n\t\t\tswap2 = Integer.parseInt(swaps[1]) - 1;\n\n\t\t\tint temp = array[swap1];\n\t\t\tarray[swap1] = array[swap2];\n\t\t\tarray[swap2] = temp;\n\t\t}\n\n\t\tfor(int i = 0;i < w;i++){\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] array = new int[w];\n\t\tint swap1, swap2;\n\t\tbyte garbage;\n\n\t\tfor(int i = 0;i < w;i++) array[i] = i + 1;\n\n\t\tfor(int i = 0;i < n;i++){\n//\t\t\tString swap = sc.next();\n\t\t\tString[] swaps = sc.next().split(\",\", 0);\n\n\t\t\tswap1 = Integer.parseInt(swaps[0]) - 1;\n\t\t\tswap2 = Integer.parseInt(swaps[1]) - 1;\n\n\t\t\tint temp = array[swap1];\n\t\t\tarray[swap1] = array[swap2];\n\t\t\tarray[swap2] = temp;\n\t\t}\n\n\t\tfor(int i = 0;i < w;i++){\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] array = new int[w];\n\t\tint swap1, swap2;\n\t\tbyte garbage;\n\n\t\tfor(int i = 0;i < w;i++) array[i] = i + 1;\n\n\t\tfor(int i = 0;i < n;i++){\n//\t\t\tString swap = sc.next();\n\t\t\tString[] swaps = sc.next().split(\",\", 0);\n\n\t\t\tswap1 = Integer.parseInt(swaps[0]) - 1;\n\t\t\tswap2 = Integer.parseInt(swaps[1]) - 1;\n\n\t\t\tint temp = array[swap1];\n\t\t\tarray[swap1] = array[swap2];\n\t\t\tarray[swap2] = temp;\n\t\t}\n\n\t\tfor(int i = 0;i < w;i++){\n\t\t\tSystem.out.println(array[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[] array = new int[w];",
"array",
"new int[w]",
"w",
"int swap1",
"swap1",
"swap2;",
"swap2",
"byte garbage;",
"garbage",
"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",
"for(int i = 0;i < n;i++){\n//\t\t\tString swap = sc.next();\n\t\t\tString[] swaps = sc.next().split(\",\", 0);\n\n\t\t\tswap1 = Integer.parseInt(swaps[0]) - 1;\n\t\t\tswap2 = Integer.parseInt(swaps[1]) - 1;\n\n\t\t\tint temp = array[swap1];\n\t\t\tarray[swap1] = array[swap2];\n\t\t\tarray[swap2] = temp;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n//\t\t\tString swap = sc.next();\n\t\t\tString[] swaps = sc.next().split(\",\", 0);\n\n\t\t\tswap1 = Integer.parseInt(swaps[0]) - 1;\n\t\t\tswap2 = Integer.parseInt(swaps[1]) - 1;\n\n\t\t\tint temp = array[swap1];\n\t\t\tarray[swap1] = array[swap2];\n\t\t\tarray[swap2] = temp;\n\t\t}",
"{\n//\t\t\tString swap = sc.next();\n\t\t\tString[] swaps = sc.next().split(\",\", 0);\n\n\t\t\tswap1 = Integer.parseInt(swaps[0]) - 1;\n\t\t\tswap2 = Integer.parseInt(swaps[1]) - 1;\n\n\t\t\tint temp = array[swap1];\n\t\t\tarray[swap1] = array[swap2];\n\t\t\tarray[swap2] = temp;\n\t\t}",
"String[] swaps = sc.next().split(\",\", 0);",
"swaps",
"sc.next().split(\",\", 0)",
"sc.next().split",
"sc.next()",
"sc.next",
"sc",
"\",\"",
"0",
"swap1 = Integer.parseInt(swaps[0]) - 1",
"swap1",
"Integer.parseInt(swaps[0]) - 1",
"Integer.parseInt(swaps[0])",
"Integer.parseInt",
"Integer",
"swaps[0]",
"swaps",
"0",
"1",
"swap2 = Integer.parseInt(swaps[1]) - 1",
"swap2",
"Integer.parseInt(swaps[1]) - 1",
"Integer.parseInt(swaps[1])",
"Integer.parseInt",
"Integer",
"swaps[1]",
"swaps",
"1",
"1",
"int temp = array[swap1];",
"temp",
"array[swap1]",
"array",
"swap1",
"array[swap1] = array[swap2]",
"array[swap1]",
"array",
"swap1",
"array[swap2]",
"array",
"swap2",
"array[swap2] = temp",
"array[swap2]",
"array",
"swap2",
"temp",
"for(int i = 0;i < w;i++){\n\t\t\tSystem.out.println(array[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(array[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(array[i]);\n\t\t}",
"System.out.println(array[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"array[i]",
"array",
"i",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] array = new int[w];\n\t\tint swap1, swap2;\n\t\tbyte garbage;\n\n\t\tfor(int i = 0;i < w;i++) array[i] = i + 1;\n\n\t\tfor(int i = 0;i < n;i++){\n//\t\t\tString swap = sc.next();\n\t\t\tString[] swaps = sc.next().split(\",\", 0);\n\n\t\t\tswap1 = Integer.parseInt(swaps[0]) - 1;\n\t\t\tswap2 = Integer.parseInt(swaps[1]) - 1;\n\n\t\t\tint temp = array[swap1];\n\t\t\tarray[swap1] = array[swap2];\n\t\t\tarray[swap2] = temp;\n\t\t}\n\n\t\tfor(int i = 0;i < w;i++){\n\t\t\tSystem.out.println(array[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\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] array = new int[w];\n\t\tint swap1, swap2;\n\t\tbyte garbage;\n\n\t\tfor(int i = 0;i < w;i++) array[i] = i + 1;\n\n\t\tfor(int i = 0;i < n;i++){\n//\t\t\tString swap = sc.next();\n\t\t\tString[] swaps = sc.next().split(\",\", 0);\n\n\t\t\tswap1 = Integer.parseInt(swaps[0]) - 1;\n\t\t\tswap2 = Integer.parseInt(swaps[1]) - 1;\n\n\t\t\tint temp = array[swap1];\n\t\t\tarray[swap1] = array[swap2];\n\t\t\tarray[swap2] = temp;\n\t\t}\n\n\t\tfor(int i = 0;i < w;i++){\n\t\t\tSystem.out.println(array[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[] array = new int[w];
int swap1, swap2;
byte garbage;
for(int i = 0;i < w;i++) array[i] = i + 1;
for(int i = 0;i < n;i++){
// String swap = sc.next();
String[] swaps = sc.next().split(",", 0);
swap1 = Integer.parseInt(swaps[0]) - 1;
swap2 = Integer.parseInt(swaps[1]) - 1;
int temp = array[swap1];
array[swap1] = array[swap2];
array[swap2] = temp;
}
for(int i = 0;i < w;i++){
System.out.println(array[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
20,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
20,
13,
0,
13,
20,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
0,
13,
20,
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,
18,
13,
13,
17,
2,
4,
18,
13,
18,
13,
17,
17,
0,
18,
18,
13,
13,
17,
2,
4,
18,
13,
18,
13,
17,
17,
0,
13,
18,
13,
18,
18,
13,
13,
17,
0,
18,
13,
18,
18,
13,
13,
17,
18,
13,
18,
18,
13,
13,
17,
0,
18,
13,
18,
18,
13,
13,
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,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
183,
5
],
[
183,
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
],
[
8,
19
],
[
19,
20
],
[
8,
21
],
[
21,
22
],
[
8,
23
],
[
23,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
8,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
8,
38
],
[
38,
39
],
[
38,
40
],
[
8,
42
],
[
42,
43
],
[
42,
44
],
[
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
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
63,
64
],
[
63,
65
],
[
8,
66
],
[
66,
67
],
[
66,
68
],
[
8,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
76,
77
],
[
76,
78
],
[
71,
79
],
[
79,
80
],
[
80,
81
],
[
71,
82
],
[
83,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
83,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
83,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
95,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
102,
105
],
[
105,
106
],
[
105,
107
],
[
101,
108
],
[
83,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
109,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
116,
119
],
[
119,
120
],
[
119,
121
],
[
115,
122
],
[
83,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
127,
131
],
[
83,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
135,
139
],
[
132,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
143,
144
],
[
143,
145
],
[
142,
146
],
[
83,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
150,
154
],
[
147,
155
],
[
8,
156
],
[
156,
157
],
[
157,
158
],
[
158,
159
],
[
158,
160
],
[
156,
161
],
[
161,
162
],
[
161,
163
],
[
156,
164
],
[
164,
165
],
[
165,
166
],
[
156,
167
],
[
168,
168
],
[
168,
169
],
[
169,
170
],
[
170,
171
],
[
171,
172
],
[
171,
173
],
[
169,
174
],
[
174,
175
],
[
174,
176
],
[
8,
177
],
[
177,
178
],
[
178,
179
],
[
6,
180
],
[
180,
181
],
[
0,
182
],
[
182,
183
],
[
182,
184
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint w, n, l[][], num[];\n\t\tint i;\n\t\tint tmp;\n\t\tString str;\n\t\tString str1[];\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\n\t\tnum = new int[w];\n\t\tstr1 = new String[2];\n\n\t\tfor (i = 0; i < w; ++i) {\n\t\t\tnum[i] = i + 1;\n\t\t}\n\n\t\tl = new int[n][2];\n\n\t\tfor (i = 0; i < n; ++i) {\n\t\t\tstr = sc.next();\n\t\t\tstr1 = str.split(\",\");\n\t\t\tl[i][0] = Integer.parseInt(str1[0]) - 1;\n\t\t\tl[i][1] = Integer.parseInt(str1[1]) - 1;\n\t\t\t// swap\n\t\t\ttmp = num[l[i][0]];\n\t\t\tnum[l[i][0]] = num[l[i][1]];\n\t\t\tnum[l[i][1]] = tmp;\n\t\t}\n\t\t// show answer\n\t\tfor (i = 0; i < w; ++i) {\n\t\t\tSystem.out.println(num[i]);\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\tint w, n, l[][], num[];\n\t\tint i;\n\t\tint tmp;\n\t\tString str;\n\t\tString str1[];\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\n\t\tnum = new int[w];\n\t\tstr1 = new String[2];\n\n\t\tfor (i = 0; i < w; ++i) {\n\t\t\tnum[i] = i + 1;\n\t\t}\n\n\t\tl = new int[n][2];\n\n\t\tfor (i = 0; i < n; ++i) {\n\t\t\tstr = sc.next();\n\t\t\tstr1 = str.split(\",\");\n\t\t\tl[i][0] = Integer.parseInt(str1[0]) - 1;\n\t\t\tl[i][1] = Integer.parseInt(str1[1]) - 1;\n\t\t\t// swap\n\t\t\ttmp = num[l[i][0]];\n\t\t\tnum[l[i][0]] = num[l[i][1]];\n\t\t\tnum[l[i][1]] = tmp;\n\t\t}\n\t\t// show answer\n\t\tfor (i = 0; i < w; ++i) {\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\t\tsc.close();\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tint w, n, l[][], num[];\n\t\tint i;\n\t\tint tmp;\n\t\tString str;\n\t\tString str1[];\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\n\t\tnum = new int[w];\n\t\tstr1 = new String[2];\n\n\t\tfor (i = 0; i < w; ++i) {\n\t\t\tnum[i] = i + 1;\n\t\t}\n\n\t\tl = new int[n][2];\n\n\t\tfor (i = 0; i < n; ++i) {\n\t\t\tstr = sc.next();\n\t\t\tstr1 = str.split(\",\");\n\t\t\tl[i][0] = Integer.parseInt(str1[0]) - 1;\n\t\t\tl[i][1] = Integer.parseInt(str1[1]) - 1;\n\t\t\t// swap\n\t\t\ttmp = num[l[i][0]];\n\t\t\tnum[l[i][0]] = num[l[i][1]];\n\t\t\tnum[l[i][1]] = tmp;\n\t\t}\n\t\t// show answer\n\t\tfor (i = 0; i < w; ++i) {\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\t\tsc.close();\n\t}",
"main",
"{\n\t\tint w, n, l[][], num[];\n\t\tint i;\n\t\tint tmp;\n\t\tString str;\n\t\tString str1[];\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\n\t\tnum = new int[w];\n\t\tstr1 = new String[2];\n\n\t\tfor (i = 0; i < w; ++i) {\n\t\t\tnum[i] = i + 1;\n\t\t}\n\n\t\tl = new int[n][2];\n\n\t\tfor (i = 0; i < n; ++i) {\n\t\t\tstr = sc.next();\n\t\t\tstr1 = str.split(\",\");\n\t\t\tl[i][0] = Integer.parseInt(str1[0]) - 1;\n\t\t\tl[i][1] = Integer.parseInt(str1[1]) - 1;\n\t\t\t// swap\n\t\t\ttmp = num[l[i][0]];\n\t\t\tnum[l[i][0]] = num[l[i][1]];\n\t\t\tnum[l[i][1]] = tmp;\n\t\t}\n\t\t// show answer\n\t\tfor (i = 0; i < w; ++i) {\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\t\tsc.close();\n\t}",
"int w",
"w",
"n",
"n",
"l[][]",
"l",
"num[];",
"num",
"int i;",
"i",
"int tmp;",
"tmp",
"String str;",
"str",
"String str1[];",
"str1",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"w = sc.nextInt()",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"num = new int[w]",
"num",
"new int[w]",
"w",
"str1 = new String[2]",
"str1",
"new String[2]",
"2",
"for (i = 0; i < w; ++i) {\n\t\t\tnum[i] = i + 1;\n\t\t}",
"i = 0;",
"i = 0",
"i",
"0",
"i < w",
"i",
"w",
"++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",
"l = new int[n][2]",
"l",
"new int[n][2]",
"n",
"2",
"for (i = 0; i < n; ++i) {\n\t\t\tstr = sc.next();\n\t\t\tstr1 = str.split(\",\");\n\t\t\tl[i][0] = Integer.parseInt(str1[0]) - 1;\n\t\t\tl[i][1] = Integer.parseInt(str1[1]) - 1;\n\t\t\t// swap\n\t\t\ttmp = num[l[i][0]];\n\t\t\tnum[l[i][0]] = num[l[i][1]];\n\t\t\tnum[l[i][1]] = tmp;\n\t\t}",
"i = 0;",
"i = 0",
"i",
"0",
"i < n",
"i",
"n",
"++i",
"++i",
"i",
"{\n\t\t\tstr = sc.next();\n\t\t\tstr1 = str.split(\",\");\n\t\t\tl[i][0] = Integer.parseInt(str1[0]) - 1;\n\t\t\tl[i][1] = Integer.parseInt(str1[1]) - 1;\n\t\t\t// swap\n\t\t\ttmp = num[l[i][0]];\n\t\t\tnum[l[i][0]] = num[l[i][1]];\n\t\t\tnum[l[i][1]] = tmp;\n\t\t}",
"{\n\t\t\tstr = sc.next();\n\t\t\tstr1 = str.split(\",\");\n\t\t\tl[i][0] = Integer.parseInt(str1[0]) - 1;\n\t\t\tl[i][1] = Integer.parseInt(str1[1]) - 1;\n\t\t\t// swap\n\t\t\ttmp = num[l[i][0]];\n\t\t\tnum[l[i][0]] = num[l[i][1]];\n\t\t\tnum[l[i][1]] = tmp;\n\t\t}",
"str = sc.next()",
"str",
"sc.next()",
"sc.next",
"sc",
"str1 = str.split(\",\")",
"str1",
"str.split(\",\")",
"str.split",
"str",
"\",\"",
"l[i][0] = Integer.parseInt(str1[0]) - 1",
"l[i][0]",
"l[i]",
"l",
"i",
"0",
"Integer.parseInt(str1[0]) - 1",
"Integer.parseInt(str1[0])",
"Integer.parseInt",
"Integer",
"str1[0]",
"str1",
"0",
"1",
"l[i][1] = Integer.parseInt(str1[1]) - 1",
"l[i][1]",
"l[i]",
"l",
"i",
"1",
"Integer.parseInt(str1[1]) - 1",
"Integer.parseInt(str1[1])",
"Integer.parseInt",
"Integer",
"str1[1]",
"str1",
"1",
"1",
"tmp = num[l[i][0]]",
"tmp",
"num[l[i][0]]",
"num",
"l[i][0]",
"l[i]",
"l",
"i",
"0",
"num[l[i][0]] = num[l[i][1]]",
"num[l[i][0]]",
"num",
"l[i][0]",
"l[i]",
"l",
"i",
"0",
"num[l[i][1]]",
"num",
"l[i][1]",
"l[i]",
"l",
"i",
"1",
"num[l[i][1]] = tmp",
"num[l[i][1]]",
"num",
"l[i][1]",
"l[i]",
"l",
"i",
"1",
"tmp",
"for (i = 0; i < w; ++i) {\n\t\t\tSystem.out.println(num[i]);\n\t\t}",
"i = 0;",
"i = 0",
"i",
"0",
"i < w",
"i",
"w",
"++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",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint w, n, l[][], num[];\n\t\tint i;\n\t\tint tmp;\n\t\tString str;\n\t\tString str1[];\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\n\t\tnum = new int[w];\n\t\tstr1 = new String[2];\n\n\t\tfor (i = 0; i < w; ++i) {\n\t\t\tnum[i] = i + 1;\n\t\t}\n\n\t\tl = new int[n][2];\n\n\t\tfor (i = 0; i < n; ++i) {\n\t\t\tstr = sc.next();\n\t\t\tstr1 = str.split(\",\");\n\t\t\tl[i][0] = Integer.parseInt(str1[0]) - 1;\n\t\t\tl[i][1] = Integer.parseInt(str1[1]) - 1;\n\t\t\t// swap\n\t\t\ttmp = num[l[i][0]];\n\t\t\tnum[l[i][0]] = num[l[i][1]];\n\t\t\tnum[l[i][1]] = tmp;\n\t\t}\n\t\t// show answer\n\t\tfor (i = 0; i < w; ++i) {\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\t\tsc.close();\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint w, n, l[][], num[];\n\t\tint i;\n\t\tint tmp;\n\t\tString str;\n\t\tString str1[];\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\n\t\tnum = new int[w];\n\t\tstr1 = new String[2];\n\n\t\tfor (i = 0; i < w; ++i) {\n\t\t\tnum[i] = i + 1;\n\t\t}\n\n\t\tl = new int[n][2];\n\n\t\tfor (i = 0; i < n; ++i) {\n\t\t\tstr = sc.next();\n\t\t\tstr1 = str.split(\",\");\n\t\t\tl[i][0] = Integer.parseInt(str1[0]) - 1;\n\t\t\tl[i][1] = Integer.parseInt(str1[1]) - 1;\n\t\t\t// swap\n\t\t\ttmp = num[l[i][0]];\n\t\t\tnum[l[i][0]] = num[l[i][1]];\n\t\t\tnum[l[i][1]] = tmp;\n\t\t}\n\t\t// show answer\n\t\tfor (i = 0; i < w; ++i) {\n\t\t\tSystem.out.println(num[i]);\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) {
int w, n, l[][], num[];
int i;
int tmp;
String str;
String str1[];
Scanner sc = new Scanner(System.in);
w = sc.nextInt();
n = sc.nextInt();
num = new int[w];
str1 = new String[2];
for (i = 0; i < w; ++i) {
num[i] = i + 1;
}
l = new int[n][2];
for (i = 0; i < n; ++i) {
str = sc.next();
str1 = str.split(",");
l[i][0] = Integer.parseInt(str1[0]) - 1;
l[i][1] = Integer.parseInt(str1[1]) - 1;
// swap
tmp = num[l[i][0]];
num[l[i][0]] = num[l[i][1]];
num[l[i][1]] = tmp;
}
// show answer
for (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,
41,
13,
0,
13,
4,
18,
13,
4,
18,
13,
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,
41,
13,
2,
17,
4,
18,
13,
13,
0,
13,
2,
13,
13,
4,
18,
13,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
40,
17,
0,
13,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
14,
2,
2,
13,
13,
2,
13,
13,
30,
0,
13,
13,
0,
13,
13,
0,
13,
17,
14,
2,
2,
13,
13,
2,
13,
13,
30,
0,
13,
13,
0,
13,
13,
0,
13,
17,
14,
2,
13,
2,
13,
17,
30,
3,
4,
18,
13,
2,
13,
17,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
4,
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
],
[
11,
20
],
[
20,
21
],
[
11,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
24,
27
],
[
27,
28
],
[
28,
29
],
[
11,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
32,
35
],
[
35,
36
],
[
36,
37
],
[
11,
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
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
50,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
50,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
66,
68
],
[
50,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
11,
73
],
[
73,
74
],
[
11,
75
],
[
75,
76
],
[
11,
77
],
[
77,
78
],
[
11,
79
],
[
79,
80
],
[
11,
81
],
[
81,
82
],
[
11,
83
],
[
83,
84
],
[
83,
85
],
[
11,
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
],
[
99,
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
],
[
115,
120
],
[
120,
121
],
[
120,
122
],
[
115,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
123,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
131,
132
],
[
123,
133
],
[
133,
134
],
[
134,
135
],
[
123,
136
],
[
137,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
142,
145
],
[
140,
146
],
[
137,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
150,
151
],
[
149,
152
],
[
152,
153
],
[
152,
154
],
[
137,
155
],
[
155,
156
],
[
155,
157
],
[
157,
158
],
[
158,
159
],
[
157,
160
],
[
160,
161
],
[
160,
162
],
[
137,
163
],
[
163,
164
],
[
163,
165
],
[
165,
166
],
[
166,
167
],
[
165,
168
],
[
168,
169
],
[
168,
170
],
[
137,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
173,
175
],
[
172,
176
],
[
176,
177
],
[
176,
178
],
[
171,
179
],
[
179,
180
],
[
180,
181
],
[
180,
182
],
[
179,
183
],
[
183,
184
],
[
183,
185
],
[
179,
186
],
[
186,
187
],
[
186,
188
],
[
137,
189
],
[
189,
190
],
[
190,
191
],
[
191,
192
],
[
191,
193
],
[
190,
194
],
[
194,
195
],
[
194,
196
],
[
189,
197
],
[
197,
198
],
[
198,
199
],
[
198,
200
],
[
197,
201
],
[
201,
202
],
[
201,
203
],
[
197,
204
],
[
204,
205
],
[
204,
206
],
[
189,
207
],
[
207,
208
],
[
208,
209
],
[
208,
210
],
[
210,
211
],
[
210,
212
],
[
207,
213
],
[
213,
214
],
[
115,
215
],
[
215,
216
],
[
216,
217
],
[
215,
218
],
[
218,
219
],
[
218,
220
],
[
215,
221
],
[
11,
222
],
[
222,
223
],
[
223,
224
],
[
224,
225
],
[
224,
226
],
[
222,
227
],
[
227,
228
],
[
227,
229
],
[
229,
230
],
[
230,
231
],
[
222,
232
],
[
232,
233
],
[
233,
234
],
[
222,
235
],
[
236,
236
],
[
236,
237
],
[
237,
238
],
[
238,
239
],
[
239,
240
],
[
239,
241
],
[
237,
242
],
[
242,
243
],
[
243,
244
],
[
242,
245
],
[
9,
246
],
[
246,
247
]
] | [
"import java.io.*;\nimport java.util.*;\n\nclass Main{\n\t\tpublic static void main(String args[]) throws IOException{\n\t\t\tArrayList<String> line_list = new ArrayList<String>();\n\n\t\t\tScanner scan = new Scanner(System.in);\n\t\t\t\n\t\t\tint low,line;\n\t\t\t\n\t\t\tlow = Integer.parseInt(scan.next());\n\t\t\tline = Integer.parseInt(scan.next());\n\t\t\t\n\t\t\tfor(int i=0;i<line;i++){\n\t\t\t\tString str1 = scan.next();\n\t\t\t\tString str2 = \",\"+String.valueOf(i);\n\t\t\t\tstr1 = str1+str2;\n\t\t\t\tline_list.add(str1);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\tint now,priority,list_n,list_a,list_p;\n\t\t\tArrayList<Integer> res = new ArrayList<Integer>();\n\t\t\t\n\t\t\tfor(int i=0;i<low;i++){\n\t\t\t\tres.add(0);\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i=1;i<=low;i++){\n\t\t\t\tpriority = -1;\n\t\t\t\tnow = i;\n\t\t\t\tfor(int j=0;j<line_list.size();j++){\n\t\t\t\t\tString[] strAry = line_list.get(j).split(\",\");\n\t\t\t\t\tlist_n = Integer.parseInt(strAry[0]);\n\t\t\t\t\tlist_a = Integer.parseInt(strAry[1]);\n\t\t\t\t\tlist_p = Integer.parseInt(strAry[2]);\n\t\t\t\t\tif(now == list_n && priority < list_p){\n\t\t\t\t\t\tnow = list_a;\n\t\t\t\t\t\tpriority = list_p;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif(now == list_a && priority < list_p){\n\t\t\t\t\t\tnow = list_n;\n\t\t\t\t\t\tpriority = list_p;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}\n\t\t\t\t\telse if(priority == (line - 1)){break;}\n\t\t\t\t}\n\t\t\t\tres.set(now-1,i);\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i=0;i<res.size();i++){\n\t\t\t\t\tSystem.out.println(res.get(i));\n\t\t\t}\n\t\t\t\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"class Main{\n\t\tpublic static void main(String args[]) throws IOException{\n\t\t\tArrayList<String> line_list = new ArrayList<String>();\n\n\t\t\tScanner scan = new Scanner(System.in);\n\t\t\t\n\t\t\tint low,line;\n\t\t\t\n\t\t\tlow = Integer.parseInt(scan.next());\n\t\t\tline = Integer.parseInt(scan.next());\n\t\t\t\n\t\t\tfor(int i=0;i<line;i++){\n\t\t\t\tString str1 = scan.next();\n\t\t\t\tString str2 = \",\"+String.valueOf(i);\n\t\t\t\tstr1 = str1+str2;\n\t\t\t\tline_list.add(str1);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\tint now,priority,list_n,list_a,list_p;\n\t\t\tArrayList<Integer> res = new ArrayList<Integer>();\n\t\t\t\n\t\t\tfor(int i=0;i<low;i++){\n\t\t\t\tres.add(0);\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i=1;i<=low;i++){\n\t\t\t\tpriority = -1;\n\t\t\t\tnow = i;\n\t\t\t\tfor(int j=0;j<line_list.size();j++){\n\t\t\t\t\tString[] strAry = line_list.get(j).split(\",\");\n\t\t\t\t\tlist_n = Integer.parseInt(strAry[0]);\n\t\t\t\t\tlist_a = Integer.parseInt(strAry[1]);\n\t\t\t\t\tlist_p = Integer.parseInt(strAry[2]);\n\t\t\t\t\tif(now == list_n && priority < list_p){\n\t\t\t\t\t\tnow = list_a;\n\t\t\t\t\t\tpriority = list_p;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif(now == list_a && priority < list_p){\n\t\t\t\t\t\tnow = list_n;\n\t\t\t\t\t\tpriority = list_p;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}\n\t\t\t\t\telse if(priority == (line - 1)){break;}\n\t\t\t\t}\n\t\t\t\tres.set(now-1,i);\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i=0;i<res.size();i++){\n\t\t\t\t\tSystem.out.println(res.get(i));\n\t\t\t}\n\t\t\t\n\t}\n}",
"Main",
"public static void main(String args[]) throws IOException{\n\t\t\tArrayList<String> line_list = new ArrayList<String>();\n\n\t\t\tScanner scan = new Scanner(System.in);\n\t\t\t\n\t\t\tint low,line;\n\t\t\t\n\t\t\tlow = Integer.parseInt(scan.next());\n\t\t\tline = Integer.parseInt(scan.next());\n\t\t\t\n\t\t\tfor(int i=0;i<line;i++){\n\t\t\t\tString str1 = scan.next();\n\t\t\t\tString str2 = \",\"+String.valueOf(i);\n\t\t\t\tstr1 = str1+str2;\n\t\t\t\tline_list.add(str1);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\tint now,priority,list_n,list_a,list_p;\n\t\t\tArrayList<Integer> res = new ArrayList<Integer>();\n\t\t\t\n\t\t\tfor(int i=0;i<low;i++){\n\t\t\t\tres.add(0);\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i=1;i<=low;i++){\n\t\t\t\tpriority = -1;\n\t\t\t\tnow = i;\n\t\t\t\tfor(int j=0;j<line_list.size();j++){\n\t\t\t\t\tString[] strAry = line_list.get(j).split(\",\");\n\t\t\t\t\tlist_n = Integer.parseInt(strAry[0]);\n\t\t\t\t\tlist_a = Integer.parseInt(strAry[1]);\n\t\t\t\t\tlist_p = Integer.parseInt(strAry[2]);\n\t\t\t\t\tif(now == list_n && priority < list_p){\n\t\t\t\t\t\tnow = list_a;\n\t\t\t\t\t\tpriority = list_p;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif(now == list_a && priority < list_p){\n\t\t\t\t\t\tnow = list_n;\n\t\t\t\t\t\tpriority = list_p;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}\n\t\t\t\t\telse if(priority == (line - 1)){break;}\n\t\t\t\t}\n\t\t\t\tres.set(now-1,i);\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i=0;i<res.size();i++){\n\t\t\t\t\tSystem.out.println(res.get(i));\n\t\t\t}\n\t\t\t\n\t}",
"main",
"{\n\t\t\tArrayList<String> line_list = new ArrayList<String>();\n\n\t\t\tScanner scan = new Scanner(System.in);\n\t\t\t\n\t\t\tint low,line;\n\t\t\t\n\t\t\tlow = Integer.parseInt(scan.next());\n\t\t\tline = Integer.parseInt(scan.next());\n\t\t\t\n\t\t\tfor(int i=0;i<line;i++){\n\t\t\t\tString str1 = scan.next();\n\t\t\t\tString str2 = \",\"+String.valueOf(i);\n\t\t\t\tstr1 = str1+str2;\n\t\t\t\tline_list.add(str1);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\tint now,priority,list_n,list_a,list_p;\n\t\t\tArrayList<Integer> res = new ArrayList<Integer>();\n\t\t\t\n\t\t\tfor(int i=0;i<low;i++){\n\t\t\t\tres.add(0);\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i=1;i<=low;i++){\n\t\t\t\tpriority = -1;\n\t\t\t\tnow = i;\n\t\t\t\tfor(int j=0;j<line_list.size();j++){\n\t\t\t\t\tString[] strAry = line_list.get(j).split(\",\");\n\t\t\t\t\tlist_n = Integer.parseInt(strAry[0]);\n\t\t\t\t\tlist_a = Integer.parseInt(strAry[1]);\n\t\t\t\t\tlist_p = Integer.parseInt(strAry[2]);\n\t\t\t\t\tif(now == list_n && priority < list_p){\n\t\t\t\t\t\tnow = list_a;\n\t\t\t\t\t\tpriority = list_p;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif(now == list_a && priority < list_p){\n\t\t\t\t\t\tnow = list_n;\n\t\t\t\t\t\tpriority = list_p;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}\n\t\t\t\t\telse if(priority == (line - 1)){break;}\n\t\t\t\t}\n\t\t\t\tres.set(now-1,i);\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i=0;i<res.size();i++){\n\t\t\t\t\tSystem.out.println(res.get(i));\n\t\t\t}\n\t\t\t\n\t}",
"ArrayList<String> line_list = new ArrayList<String>();",
"line_list",
"new ArrayList<String>()",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int low",
"low",
"line;",
"line",
"low = Integer.parseInt(scan.next())",
"low",
"Integer.parseInt(scan.next())",
"Integer.parseInt",
"Integer",
"scan.next()",
"scan.next",
"scan",
"line = Integer.parseInt(scan.next())",
"line",
"Integer.parseInt(scan.next())",
"Integer.parseInt",
"Integer",
"scan.next()",
"scan.next",
"scan",
"for(int i=0;i<line;i++){\n\t\t\t\tString str1 = scan.next();\n\t\t\t\tString str2 = \",\"+String.valueOf(i);\n\t\t\t\tstr1 = str1+str2;\n\t\t\t\tline_list.add(str1);\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<line",
"i",
"line",
"i++",
"i++",
"i",
"{\n\t\t\t\tString str1 = scan.next();\n\t\t\t\tString str2 = \",\"+String.valueOf(i);\n\t\t\t\tstr1 = str1+str2;\n\t\t\t\tline_list.add(str1);\n\t\t\t}",
"{\n\t\t\t\tString str1 = scan.next();\n\t\t\t\tString str2 = \",\"+String.valueOf(i);\n\t\t\t\tstr1 = str1+str2;\n\t\t\t\tline_list.add(str1);\n\t\t\t}",
"String str1 = scan.next();",
"str1",
"scan.next()",
"scan.next",
"scan",
"String str2 = \",\"+String.valueOf(i);",
"str2",
"\",\"+String.valueOf(i)",
"\",\"",
"String.valueOf(i)",
"String.valueOf",
"String",
"i",
"str1 = str1+str2",
"str1",
"str1+str2",
"str1",
"str2",
"line_list.add(str1)",
"line_list.add",
"line_list",
"str1",
"int now",
"now",
"priority",
"priority",
"list_n",
"list_n",
"list_a",
"list_a",
"list_p;",
"list_p",
"ArrayList<Integer> res = new ArrayList<Integer>();",
"res",
"new ArrayList<Integer>()",
"for(int i=0;i<low;i++){\n\t\t\t\tres.add(0);\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<low",
"i",
"low",
"i++",
"i++",
"i",
"{\n\t\t\t\tres.add(0);\n\t\t\t}",
"{\n\t\t\t\tres.add(0);\n\t\t\t}",
"res.add(0)",
"res.add",
"res",
"0",
"for(int i=1;i<=low;i++){\n\t\t\t\tpriority = -1;\n\t\t\t\tnow = i;\n\t\t\t\tfor(int j=0;j<line_list.size();j++){\n\t\t\t\t\tString[] strAry = line_list.get(j).split(\",\");\n\t\t\t\t\tlist_n = Integer.parseInt(strAry[0]);\n\t\t\t\t\tlist_a = Integer.parseInt(strAry[1]);\n\t\t\t\t\tlist_p = Integer.parseInt(strAry[2]);\n\t\t\t\t\tif(now == list_n && priority < list_p){\n\t\t\t\t\t\tnow = list_a;\n\t\t\t\t\t\tpriority = list_p;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif(now == list_a && priority < list_p){\n\t\t\t\t\t\tnow = list_n;\n\t\t\t\t\t\tpriority = list_p;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}\n\t\t\t\t\telse if(priority == (line - 1)){break;}\n\t\t\t\t}\n\t\t\t\tres.set(now-1,i);\n\t\t\t}",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=low",
"i",
"low",
"i++",
"i++",
"i",
"{\n\t\t\t\tpriority = -1;\n\t\t\t\tnow = i;\n\t\t\t\tfor(int j=0;j<line_list.size();j++){\n\t\t\t\t\tString[] strAry = line_list.get(j).split(\",\");\n\t\t\t\t\tlist_n = Integer.parseInt(strAry[0]);\n\t\t\t\t\tlist_a = Integer.parseInt(strAry[1]);\n\t\t\t\t\tlist_p = Integer.parseInt(strAry[2]);\n\t\t\t\t\tif(now == list_n && priority < list_p){\n\t\t\t\t\t\tnow = list_a;\n\t\t\t\t\t\tpriority = list_p;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif(now == list_a && priority < list_p){\n\t\t\t\t\t\tnow = list_n;\n\t\t\t\t\t\tpriority = list_p;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}\n\t\t\t\t\telse if(priority == (line - 1)){break;}\n\t\t\t\t}\n\t\t\t\tres.set(now-1,i);\n\t\t\t}",
"{\n\t\t\t\tpriority = -1;\n\t\t\t\tnow = i;\n\t\t\t\tfor(int j=0;j<line_list.size();j++){\n\t\t\t\t\tString[] strAry = line_list.get(j).split(\",\");\n\t\t\t\t\tlist_n = Integer.parseInt(strAry[0]);\n\t\t\t\t\tlist_a = Integer.parseInt(strAry[1]);\n\t\t\t\t\tlist_p = Integer.parseInt(strAry[2]);\n\t\t\t\t\tif(now == list_n && priority < list_p){\n\t\t\t\t\t\tnow = list_a;\n\t\t\t\t\t\tpriority = list_p;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif(now == list_a && priority < list_p){\n\t\t\t\t\t\tnow = list_n;\n\t\t\t\t\t\tpriority = list_p;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}\n\t\t\t\t\telse if(priority == (line - 1)){break;}\n\t\t\t\t}\n\t\t\t\tres.set(now-1,i);\n\t\t\t}",
"priority = -1",
"priority",
"-1",
"1",
"now = i",
"now",
"i",
"for(int j=0;j<line_list.size();j++){\n\t\t\t\t\tString[] strAry = line_list.get(j).split(\",\");\n\t\t\t\t\tlist_n = Integer.parseInt(strAry[0]);\n\t\t\t\t\tlist_a = Integer.parseInt(strAry[1]);\n\t\t\t\t\tlist_p = Integer.parseInt(strAry[2]);\n\t\t\t\t\tif(now == list_n && priority < list_p){\n\t\t\t\t\t\tnow = list_a;\n\t\t\t\t\t\tpriority = list_p;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif(now == list_a && priority < list_p){\n\t\t\t\t\t\tnow = list_n;\n\t\t\t\t\t\tpriority = list_p;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}\n\t\t\t\t\telse if(priority == (line - 1)){break;}\n\t\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<line_list.size()",
"j",
"line_list.size()",
"line_list.size",
"line_list",
"j++",
"j++",
"j",
"{\n\t\t\t\t\tString[] strAry = line_list.get(j).split(\",\");\n\t\t\t\t\tlist_n = Integer.parseInt(strAry[0]);\n\t\t\t\t\tlist_a = Integer.parseInt(strAry[1]);\n\t\t\t\t\tlist_p = Integer.parseInt(strAry[2]);\n\t\t\t\t\tif(now == list_n && priority < list_p){\n\t\t\t\t\t\tnow = list_a;\n\t\t\t\t\t\tpriority = list_p;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif(now == list_a && priority < list_p){\n\t\t\t\t\t\tnow = list_n;\n\t\t\t\t\t\tpriority = list_p;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}\n\t\t\t\t\telse if(priority == (line - 1)){break;}\n\t\t\t\t}",
"{\n\t\t\t\t\tString[] strAry = line_list.get(j).split(\",\");\n\t\t\t\t\tlist_n = Integer.parseInt(strAry[0]);\n\t\t\t\t\tlist_a = Integer.parseInt(strAry[1]);\n\t\t\t\t\tlist_p = Integer.parseInt(strAry[2]);\n\t\t\t\t\tif(now == list_n && priority < list_p){\n\t\t\t\t\t\tnow = list_a;\n\t\t\t\t\t\tpriority = list_p;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif(now == list_a && priority < list_p){\n\t\t\t\t\t\tnow = list_n;\n\t\t\t\t\t\tpriority = list_p;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}\n\t\t\t\t\telse if(priority == (line - 1)){break;}\n\t\t\t\t}",
"String[] strAry = line_list.get(j).split(\",\");",
"strAry",
"line_list.get(j).split(\",\")",
"line_list.get(j).split",
"line_list.get(j)",
"line_list.get",
"line_list",
"j",
"\",\"",
"list_n = Integer.parseInt(strAry[0])",
"list_n",
"Integer.parseInt(strAry[0])",
"Integer.parseInt",
"Integer",
"strAry[0]",
"strAry",
"0",
"list_a = Integer.parseInt(strAry[1])",
"list_a",
"Integer.parseInt(strAry[1])",
"Integer.parseInt",
"Integer",
"strAry[1]",
"strAry",
"1",
"list_p = Integer.parseInt(strAry[2])",
"list_p",
"Integer.parseInt(strAry[2])",
"Integer.parseInt",
"Integer",
"strAry[2]",
"strAry",
"2",
"if(now == list_n && priority < list_p){\n\t\t\t\t\t\tnow = list_a;\n\t\t\t\t\t\tpriority = list_p;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}",
"now == list_n && priority < list_p",
"now == list_n",
"now",
"list_n",
"priority < list_p",
"priority",
"list_p",
"{\n\t\t\t\t\t\tnow = list_a;\n\t\t\t\t\t\tpriority = list_p;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}",
"now = list_a",
"now",
"list_a",
"priority = list_p",
"priority",
"list_p",
"j = 0",
"j",
"0",
"if(now == list_a && priority < list_p){\n\t\t\t\t\t\tnow = list_n;\n\t\t\t\t\t\tpriority = list_p;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}\n\t\t\t\t\telse if(priority == (line - 1)){break;}",
"now == list_a && priority < list_p",
"now == list_a",
"now",
"list_a",
"priority < list_p",
"priority",
"list_p",
"{\n\t\t\t\t\t\tnow = list_n;\n\t\t\t\t\t\tpriority = list_p;\n\t\t\t\t\t\tj = 0;\n\t\t\t\t\t}",
"now = list_n",
"now",
"list_n",
"priority = list_p",
"priority",
"list_p",
"j = 0",
"j",
"0",
"if(priority == (line - 1)){break;}",
"priority == (line - 1)",
"priority",
"(line - 1)",
"line",
"1",
"{break;}",
"break;",
"res.set(now-1,i)",
"res.set",
"res",
"now-1",
"now",
"1",
"i",
"for(int i=0;i<res.size();i++){\n\t\t\t\t\tSystem.out.println(res.get(i));\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<res.size()",
"i",
"res.size()",
"res.size",
"res",
"i++",
"i++",
"i",
"{\n\t\t\t\t\tSystem.out.println(res.get(i));\n\t\t\t}",
"{\n\t\t\t\t\tSystem.out.println(res.get(i));\n\t\t\t}",
"System.out.println(res.get(i))",
"System.out.println",
"System.out",
"System",
"System.out",
"res.get(i)",
"res.get",
"res",
"i",
"String args[]",
"args"
] | import java.io.*;
import java.util.*;
class Main{
public static void main(String args[]) throws IOException{
ArrayList<String> line_list = new ArrayList<String>();
Scanner scan = new Scanner(System.in);
int low,line;
low = Integer.parseInt(scan.next());
line = Integer.parseInt(scan.next());
for(int i=0;i<line;i++){
String str1 = scan.next();
String str2 = ","+String.valueOf(i);
str1 = str1+str2;
line_list.add(str1);
}
int now,priority,list_n,list_a,list_p;
ArrayList<Integer> res = new ArrayList<Integer>();
for(int i=0;i<low;i++){
res.add(0);
}
for(int i=1;i<=low;i++){
priority = -1;
now = i;
for(int j=0;j<line_list.size();j++){
String[] strAry = line_list.get(j).split(",");
list_n = Integer.parseInt(strAry[0]);
list_a = Integer.parseInt(strAry[1]);
list_p = Integer.parseInt(strAry[2]);
if(now == list_n && priority < list_p){
now = list_a;
priority = list_p;
j = 0;
}
if(now == list_a && priority < list_p){
now = list_n;
priority = list_p;
j = 0;
}
else if(priority == (line - 1)){break;}
}
res.set(now-1,i);
}
for(int i=0;i<res.size();i++){
System.out.println(res.get(i));
}
}
} |
[
7,
15,
13,
17,
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,
29,
23,
13,
23,
13,
23,
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,
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,
4,
13,
13,
2,
13,
17,
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
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
156,
8
],
[
156,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
14,
16
],
[
11,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
11,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
24,
28
],
[
11,
29
],
[
9,
30
],
[
30,
31
],
[
9,
32
],
[
32,
33
],
[
9,
34
],
[
34,
35
],
[
156,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
38,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
38,
52
],
[
52,
53
],
[
52,
54
],
[
38,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
63,
65
],
[
56,
66
],
[
66,
67
],
[
67,
68
],
[
56,
69
],
[
70,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
75,
76
],
[
75,
77
],
[
38,
78
],
[
78,
79
],
[
79,
80
],
[
38,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
81,
86
],
[
86,
87
],
[
86,
88
],
[
81,
89
],
[
89,
90
],
[
90,
91
],
[
81,
92
],
[
93,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
97,
98
],
[
93,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
102,
103
],
[
101,
104
],
[
93,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
110,
111
],
[
110,
112
],
[
93,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
116,
117
],
[
115,
118
],
[
118,
119
],
[
118,
120
],
[
93,
121
],
[
121,
122
],
[
121,
123
],
[
121,
124
],
[
124,
125
],
[
124,
126
],
[
121,
127
],
[
127,
128
],
[
127,
129
],
[
38,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
130,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
137,
139
],
[
130,
140
],
[
140,
141
],
[
141,
142
],
[
130,
143
],
[
144,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
145,
150
],
[
150,
151
],
[
150,
152
],
[
36,
153
],
[
153,
154
],
[
0,
155
],
[
155,
156
],
[
155,
157
]
] | [
"import java.io.IOException;\nimport java.util.Scanner;\n\npublic class Main {\n\n static void swapidx(int[] arr, int lhs, int rhs){\n \tint tmp = arr[lhs];\n \tarr[lhs] = arr[rhs];\n \tarr[rhs] = tmp;\n \treturn;\n }\n \n public static void main(String [] args){\n \tScanner sc = new Scanner(System.in);\n \tint w = sc.nextInt();\n \tint n = sc.nextInt();\n\n \tint[] lines = new int[w];\n \tfor(int i=0; i<lines.length;++i){\n \t lines[i] = i + 1;\n \t}\n\tsc.nextLine();\n \tfor(int i=0; i<n;++i){\n\t String line = sc.nextLine();\n\t String[] ints = line.split(\",\");\n\t // System.out.println(line);\n\t int a = Integer.parseInt(ints[0]);\n\t int b = Integer.parseInt(ints[1]);\n\t swapidx(lines, a - 1, b - 1);\n \t}\n\tfor(int i=0; i<lines.length;++i){\n\t System.out.println(lines[i]);\n\t}\n }\n\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n static void swapidx(int[] arr, int lhs, int rhs){\n \tint tmp = arr[lhs];\n \tarr[lhs] = arr[rhs];\n \tarr[rhs] = tmp;\n \treturn;\n }\n \n public static void main(String [] args){\n \tScanner sc = new Scanner(System.in);\n \tint w = sc.nextInt();\n \tint n = sc.nextInt();\n\n \tint[] lines = new int[w];\n \tfor(int i=0; i<lines.length;++i){\n \t lines[i] = i + 1;\n \t}\n\tsc.nextLine();\n \tfor(int i=0; i<n;++i){\n\t String line = sc.nextLine();\n\t String[] ints = line.split(\",\");\n\t // System.out.println(line);\n\t int a = Integer.parseInt(ints[0]);\n\t int b = Integer.parseInt(ints[1]);\n\t swapidx(lines, a - 1, b - 1);\n \t}\n\tfor(int i=0; i<lines.length;++i){\n\t System.out.println(lines[i]);\n\t}\n }\n\n}",
"Main",
"static void swapidx(int[] arr, int lhs, int rhs){\n \tint tmp = arr[lhs];\n \tarr[lhs] = arr[rhs];\n \tarr[rhs] = tmp;\n \treturn;\n }",
"swapidx",
"{\n \tint tmp = arr[lhs];\n \tarr[lhs] = arr[rhs];\n \tarr[rhs] = tmp;\n \treturn;\n }",
"int tmp = arr[lhs];",
"tmp",
"arr[lhs]",
"arr",
"lhs",
"arr[lhs] = arr[rhs]",
"arr[lhs]",
"arr",
"lhs",
"arr[rhs]",
"arr",
"rhs",
"arr[rhs] = tmp",
"arr[rhs]",
"arr",
"rhs",
"tmp",
"return;",
"int[] arr",
"arr",
"int lhs",
"lhs",
"int rhs",
"rhs",
"public static void main(String [] args){\n \tScanner sc = new Scanner(System.in);\n \tint w = sc.nextInt();\n \tint n = sc.nextInt();\n\n \tint[] lines = new int[w];\n \tfor(int i=0; i<lines.length;++i){\n \t lines[i] = i + 1;\n \t}\n\tsc.nextLine();\n \tfor(int i=0; i<n;++i){\n\t String line = sc.nextLine();\n\t String[] ints = line.split(\",\");\n\t // System.out.println(line);\n\t int a = Integer.parseInt(ints[0]);\n\t int b = Integer.parseInt(ints[1]);\n\t swapidx(lines, a - 1, b - 1);\n \t}\n\tfor(int i=0; i<lines.length;++i){\n\t System.out.println(lines[i]);\n\t}\n }",
"main",
"{\n \tScanner sc = new Scanner(System.in);\n \tint w = sc.nextInt();\n \tint n = sc.nextInt();\n\n \tint[] lines = new int[w];\n \tfor(int i=0; i<lines.length;++i){\n \t lines[i] = i + 1;\n \t}\n\tsc.nextLine();\n \tfor(int i=0; i<n;++i){\n\t String line = sc.nextLine();\n\t String[] ints = line.split(\",\");\n\t // System.out.println(line);\n\t int a = Integer.parseInt(ints[0]);\n\t int b = Integer.parseInt(ints[1]);\n\t swapidx(lines, a - 1, b - 1);\n \t}\n\tfor(int i=0; i<lines.length;++i){\n\t System.out.println(lines[i]);\n\t}\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[] lines = new int[w];",
"lines",
"new int[w]",
"w",
"for(int i=0; i<lines.length;++i){\n \t lines[i] = i + 1;\n \t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<lines.length",
"i",
"lines.length",
"lines",
"lines.length",
"++i",
"++i",
"i",
"{\n \t lines[i] = i + 1;\n \t}",
"{\n \t lines[i] = i + 1;\n \t}",
"lines[i] = i + 1",
"lines[i]",
"lines",
"i",
"i + 1",
"i",
"1",
"sc.nextLine()",
"sc.nextLine",
"sc",
"for(int i=0; i<n;++i){\n\t String line = sc.nextLine();\n\t String[] ints = line.split(\",\");\n\t // System.out.println(line);\n\t int a = Integer.parseInt(ints[0]);\n\t int b = Integer.parseInt(ints[1]);\n\t swapidx(lines, a - 1, b - 1);\n \t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"++i",
"++i",
"i",
"{\n\t String line = sc.nextLine();\n\t String[] ints = line.split(\",\");\n\t // System.out.println(line);\n\t int a = Integer.parseInt(ints[0]);\n\t int b = Integer.parseInt(ints[1]);\n\t swapidx(lines, a - 1, b - 1);\n \t}",
"{\n\t String line = sc.nextLine();\n\t String[] ints = line.split(\",\");\n\t // System.out.println(line);\n\t int a = Integer.parseInt(ints[0]);\n\t int b = Integer.parseInt(ints[1]);\n\t swapidx(lines, a - 1, b - 1);\n \t}",
"String line = sc.nextLine();",
"line",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String[] ints = line.split(\",\");",
"ints",
"line.split(\",\")",
"line.split",
"line",
"\",\"",
"int a = Integer.parseInt(ints[0]);",
"a",
"Integer.parseInt(ints[0])",
"Integer.parseInt",
"Integer",
"ints[0]",
"ints",
"0",
"int b = Integer.parseInt(ints[1]);",
"b",
"Integer.parseInt(ints[1])",
"Integer.parseInt",
"Integer",
"ints[1]",
"ints",
"1",
"swapidx(lines, a - 1, b - 1)",
"swapidx",
"lines",
"a - 1",
"a",
"1",
"b - 1",
"b",
"1",
"for(int i=0; i<lines.length;++i){\n\t System.out.println(lines[i]);\n\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<lines.length",
"i",
"lines.length",
"lines",
"lines.length",
"++i",
"++i",
"i",
"{\n\t System.out.println(lines[i]);\n\t}",
"{\n\t System.out.println(lines[i]);\n\t}",
"System.out.println(lines[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"lines[i]",
"lines",
"i",
"String [] args",
"args",
"public class Main {\n\n static void swapidx(int[] arr, int lhs, int rhs){\n \tint tmp = arr[lhs];\n \tarr[lhs] = arr[rhs];\n \tarr[rhs] = tmp;\n \treturn;\n }\n \n public static void main(String [] args){\n \tScanner sc = new Scanner(System.in);\n \tint w = sc.nextInt();\n \tint n = sc.nextInt();\n\n \tint[] lines = new int[w];\n \tfor(int i=0; i<lines.length;++i){\n \t lines[i] = i + 1;\n \t}\n\tsc.nextLine();\n \tfor(int i=0; i<n;++i){\n\t String line = sc.nextLine();\n\t String[] ints = line.split(\",\");\n\t // System.out.println(line);\n\t int a = Integer.parseInt(ints[0]);\n\t int b = Integer.parseInt(ints[1]);\n\t swapidx(lines, a - 1, b - 1);\n \t}\n\tfor(int i=0; i<lines.length;++i){\n\t System.out.println(lines[i]);\n\t}\n }\n\n}",
"public class Main {\n\n static void swapidx(int[] arr, int lhs, int rhs){\n \tint tmp = arr[lhs];\n \tarr[lhs] = arr[rhs];\n \tarr[rhs] = tmp;\n \treturn;\n }\n \n public static void main(String [] args){\n \tScanner sc = new Scanner(System.in);\n \tint w = sc.nextInt();\n \tint n = sc.nextInt();\n\n \tint[] lines = new int[w];\n \tfor(int i=0; i<lines.length;++i){\n \t lines[i] = i + 1;\n \t}\n\tsc.nextLine();\n \tfor(int i=0; i<n;++i){\n\t String line = sc.nextLine();\n\t String[] ints = line.split(\",\");\n\t // System.out.println(line);\n\t int a = Integer.parseInt(ints[0]);\n\t int b = Integer.parseInt(ints[1]);\n\t swapidx(lines, a - 1, b - 1);\n \t}\n\tfor(int i=0; i<lines.length;++i){\n\t System.out.println(lines[i]);\n\t}\n }\n\n}",
"Main"
] | import java.io.IOException;
import java.util.Scanner;
public class Main {
static void swapidx(int[] arr, int lhs, int rhs){
int tmp = arr[lhs];
arr[lhs] = arr[rhs];
arr[rhs] = tmp;
return;
}
public static void main(String [] args){
Scanner sc = new Scanner(System.in);
int w = sc.nextInt();
int n = sc.nextInt();
int[] lines = new int[w];
for(int i=0; i<lines.length;++i){
lines[i] = i + 1;
}
sc.nextLine();
for(int i=0; i<n;++i){
String line = sc.nextLine();
String[] ints = line.split(",");
// System.out.println(line);
int a = Integer.parseInt(ints[0]);
int b = Integer.parseInt(ints[1]);
swapidx(lines, a - 1, b - 1);
}
for(int i=0; i<lines.length;++i){
System.out.println(lines[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,
2,
13,
17,
13,
41,
13,
41,
13,
41,
13,
41,
13,
4,
18,
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,
0,
13,
2,
4,
18,
13,
18,
13,
17,
17,
0,
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,
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
],
[
145,
5
],
[
145,
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
],
[
42,
43
],
[
42,
44
],
[
39,
45
],
[
8,
46
],
[
46,
47
],
[
8,
48
],
[
48,
49
],
[
8,
50
],
[
50,
51
],
[
8,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
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
],
[
69,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
87,
88
],
[
87,
89
],
[
83,
90
],
[
69,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
97,
98
],
[
97,
99
],
[
93,
100
],
[
69,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
103,
105
],
[
69,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
106,
110
],
[
110,
111
],
[
110,
112
],
[
69,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
113,
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
],
[
8,
139
],
[
139,
140
],
[
140,
141
],
[
6,
142
],
[
142,
143
],
[
0,
144
],
[
144,
145
],
[
144,
146
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tint w = scn.nextInt(), n = scn.nextInt();\n\t\tint[] ans = new int[w];\n\t\tfor(int i = 1;i <= w;i++) {\n\t\t\tans[i-1] = i;\n\t\t}\n\t\tint a,b,buf;\n\t\tString line = scn.nextLine();\n\t\tfor(int i = 0;i < n;i++) {\n\t\t\tline = scn.nextLine();\n\t\t\tString[] nyan = line.split(\",\");\n\t\t\ta = Integer.parseInt(nyan[0])-1;\n\t\t\tb = Integer.parseInt(nyan[1])-1;\n\t\t\tbuf = ans[a];\n\t\t\tans[a] = ans[b];\n\t\t\tans[b] = buf;\n\t\t}\n\t\tfor(int i = 0;i < w;i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t\tscn.close();\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tint w = scn.nextInt(), n = scn.nextInt();\n\t\tint[] ans = new int[w];\n\t\tfor(int i = 1;i <= w;i++) {\n\t\t\tans[i-1] = i;\n\t\t}\n\t\tint a,b,buf;\n\t\tString line = scn.nextLine();\n\t\tfor(int i = 0;i < n;i++) {\n\t\t\tline = scn.nextLine();\n\t\t\tString[] nyan = line.split(\",\");\n\t\t\ta = Integer.parseInt(nyan[0])-1;\n\t\t\tb = Integer.parseInt(nyan[1])-1;\n\t\t\tbuf = ans[a];\n\t\t\tans[a] = ans[b];\n\t\t\tans[b] = buf;\n\t\t}\n\t\tfor(int i = 0;i < w;i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t\tscn.close();\n\t}\n}",
"Main",
"public static void main(String args[]) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tint w = scn.nextInt(), n = scn.nextInt();\n\t\tint[] ans = new int[w];\n\t\tfor(int i = 1;i <= w;i++) {\n\t\t\tans[i-1] = i;\n\t\t}\n\t\tint a,b,buf;\n\t\tString line = scn.nextLine();\n\t\tfor(int i = 0;i < n;i++) {\n\t\t\tline = scn.nextLine();\n\t\t\tString[] nyan = line.split(\",\");\n\t\t\ta = Integer.parseInt(nyan[0])-1;\n\t\t\tb = Integer.parseInt(nyan[1])-1;\n\t\t\tbuf = ans[a];\n\t\t\tans[a] = ans[b];\n\t\t\tans[b] = buf;\n\t\t}\n\t\tfor(int i = 0;i < w;i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t\tscn.close();\n\t}",
"main",
"{\n\t\tScanner scn = new Scanner(System.in);\n\t\tint w = scn.nextInt(), n = scn.nextInt();\n\t\tint[] ans = new int[w];\n\t\tfor(int i = 1;i <= w;i++) {\n\t\t\tans[i-1] = i;\n\t\t}\n\t\tint a,b,buf;\n\t\tString line = scn.nextLine();\n\t\tfor(int i = 0;i < n;i++) {\n\t\t\tline = scn.nextLine();\n\t\t\tString[] nyan = line.split(\",\");\n\t\t\ta = Integer.parseInt(nyan[0])-1;\n\t\t\tb = Integer.parseInt(nyan[1])-1;\n\t\t\tbuf = ans[a];\n\t\t\tans[a] = ans[b];\n\t\t\tans[b] = buf;\n\t\t}\n\t\tfor(int i = 0;i < w;i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t\tscn.close();\n\t}",
"Scanner scn = new Scanner(System.in);",
"scn",
"new Scanner(System.in)",
"int w = scn.nextInt()",
"w",
"scn.nextInt()",
"scn.nextInt",
"scn",
"n = scn.nextInt();",
"n",
"scn.nextInt()",
"scn.nextInt",
"scn",
"int[] ans = new int[w];",
"ans",
"new int[w]",
"w",
"for(int i = 1;i <= w;i++) {\n\t\t\tans[i-1] = i;\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tans[i-1] = i;\n\t\t}",
"{\n\t\t\tans[i-1] = i;\n\t\t}",
"ans[i-1] = i",
"ans[i-1]",
"ans",
"i-1",
"i",
"1",
"i",
"int a",
"a",
"b",
"b",
"buf;",
"buf",
"String line = scn.nextLine();",
"line",
"scn.nextLine()",
"scn.nextLine",
"scn",
"for(int i = 0;i < n;i++) {\n\t\t\tline = scn.nextLine();\n\t\t\tString[] nyan = line.split(\",\");\n\t\t\ta = Integer.parseInt(nyan[0])-1;\n\t\t\tb = Integer.parseInt(nyan[1])-1;\n\t\t\tbuf = ans[a];\n\t\t\tans[a] = ans[b];\n\t\t\tans[b] = buf;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tline = scn.nextLine();\n\t\t\tString[] nyan = line.split(\",\");\n\t\t\ta = Integer.parseInt(nyan[0])-1;\n\t\t\tb = Integer.parseInt(nyan[1])-1;\n\t\t\tbuf = ans[a];\n\t\t\tans[a] = ans[b];\n\t\t\tans[b] = buf;\n\t\t}",
"{\n\t\t\tline = scn.nextLine();\n\t\t\tString[] nyan = line.split(\",\");\n\t\t\ta = Integer.parseInt(nyan[0])-1;\n\t\t\tb = Integer.parseInt(nyan[1])-1;\n\t\t\tbuf = ans[a];\n\t\t\tans[a] = ans[b];\n\t\t\tans[b] = buf;\n\t\t}",
"line = scn.nextLine()",
"line",
"scn.nextLine()",
"scn.nextLine",
"scn",
"String[] nyan = line.split(\",\");",
"nyan",
"line.split(\",\")",
"line.split",
"line",
"\",\"",
"a = Integer.parseInt(nyan[0])-1",
"a",
"Integer.parseInt(nyan[0])-1",
"Integer.parseInt(nyan[0])",
"Integer.parseInt",
"Integer",
"nyan[0]",
"nyan",
"0",
"1",
"b = Integer.parseInt(nyan[1])-1",
"b",
"Integer.parseInt(nyan[1])-1",
"Integer.parseInt(nyan[1])",
"Integer.parseInt",
"Integer",
"nyan[1]",
"nyan",
"1",
"1",
"buf = ans[a]",
"buf",
"ans[a]",
"ans",
"a",
"ans[a] = ans[b]",
"ans[a]",
"ans",
"a",
"ans[b]",
"ans",
"b",
"ans[b] = buf",
"ans[b]",
"ans",
"b",
"buf",
"for(int i = 0;i < w;i++) {\n\t\t\tSystem.out.println(ans[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(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",
"scn.close()",
"scn.close",
"scn",
"String args[]",
"args",
"public class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tint w = scn.nextInt(), n = scn.nextInt();\n\t\tint[] ans = new int[w];\n\t\tfor(int i = 1;i <= w;i++) {\n\t\t\tans[i-1] = i;\n\t\t}\n\t\tint a,b,buf;\n\t\tString line = scn.nextLine();\n\t\tfor(int i = 0;i < n;i++) {\n\t\t\tline = scn.nextLine();\n\t\t\tString[] nyan = line.split(\",\");\n\t\t\ta = Integer.parseInt(nyan[0])-1;\n\t\t\tb = Integer.parseInt(nyan[1])-1;\n\t\t\tbuf = ans[a];\n\t\t\tans[a] = ans[b];\n\t\t\tans[b] = buf;\n\t\t}\n\t\tfor(int i = 0;i < w;i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t\tscn.close();\n\t}\n}",
"public class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tint w = scn.nextInt(), n = scn.nextInt();\n\t\tint[] ans = new int[w];\n\t\tfor(int i = 1;i <= w;i++) {\n\t\t\tans[i-1] = i;\n\t\t}\n\t\tint a,b,buf;\n\t\tString line = scn.nextLine();\n\t\tfor(int i = 0;i < n;i++) {\n\t\t\tline = scn.nextLine();\n\t\t\tString[] nyan = line.split(\",\");\n\t\t\ta = Integer.parseInt(nyan[0])-1;\n\t\t\tb = Integer.parseInt(nyan[1])-1;\n\t\t\tbuf = ans[a];\n\t\t\tans[a] = ans[b];\n\t\t\tans[b] = buf;\n\t\t}\n\t\tfor(int i = 0;i < w;i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t\tscn.close();\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner scn = new Scanner(System.in);
int w = scn.nextInt(), n = scn.nextInt();
int[] ans = new int[w];
for(int i = 1;i <= w;i++) {
ans[i-1] = i;
}
int a,b,buf;
String line = scn.nextLine();
for(int i = 0;i < n;i++) {
line = scn.nextLine();
String[] nyan = line.split(",");
a = Integer.parseInt(nyan[0])-1;
b = Integer.parseInt(nyan[1])-1;
buf = ans[a];
ans[a] = ans[b];
ans[b] = buf;
}
for(int i = 0;i < w;i++) {
System.out.println(ans[i]);
}
scn.close();
}
}
|
[
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,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
4,
18,
13,
17,
0,
13,
20,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
4,
18,
13,
18,
13,
13,
17,
41,
13,
18,
13,
18,
13,
17,
0,
18,
13,
18,
13,
17,
18,
13,
18,
13,
17,
0,
18,
13,
18,
13,
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,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
169,
11
],
[
169,
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
],
[
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
],
[
85,
87
],
[
88,
89
],
[
88,
90
],
[
76,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
98,
100
],
[
91,
101
],
[
101,
102
],
[
102,
103
],
[
91,
104
],
[
105,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
106,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
111,
114
],
[
114,
115
],
[
114,
116
],
[
110,
117
],
[
76,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
122,
124
],
[
76,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
128,
130
],
[
125,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
133,
135
],
[
76,
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
],
[
150,
151
],
[
150,
152
],
[
143,
153
],
[
153,
154
],
[
154,
155
],
[
143,
156
],
[
157,
157
],
[
157,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
158,
163
],
[
163,
164
],
[
163,
165
],
[
12,
166
],
[
166,
167
],
[
0,
168
],
[
168,
169
],
[
168,
170
]
] | [
"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[] bufbuf;\n\t\tint[] buf;\n\t\tfor(int i = 0;i < n;i++){\n\t\t\tbufbuf = br.readLine().split(\",\");\n\t\t\tbuf = new int[bufbuf.length];\n\t\t\tfor(int j = 0;j < bufbuf.length;j++){\n\t\t\t\tbuf[j] = Integer.parseInt(bufbuf[j])-1;\n\t\t\t}\n\t\t\tint tmp = lots[buf[0]];\n\t\t\tlots[buf[0]] = lots[buf[1]];\n\t\t\tlots[buf[1]] = 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[] bufbuf;\n\t\tint[] buf;\n\t\tfor(int i = 0;i < n;i++){\n\t\t\tbufbuf = br.readLine().split(\",\");\n\t\t\tbuf = new int[bufbuf.length];\n\t\t\tfor(int j = 0;j < bufbuf.length;j++){\n\t\t\t\tbuf[j] = Integer.parseInt(bufbuf[j])-1;\n\t\t\t}\n\t\t\tint tmp = lots[buf[0]];\n\t\t\tlots[buf[0]] = lots[buf[1]];\n\t\t\tlots[buf[1]] = 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[] bufbuf;\n\t\tint[] buf;\n\t\tfor(int i = 0;i < n;i++){\n\t\t\tbufbuf = br.readLine().split(\",\");\n\t\t\tbuf = new int[bufbuf.length];\n\t\t\tfor(int j = 0;j < bufbuf.length;j++){\n\t\t\t\tbuf[j] = Integer.parseInt(bufbuf[j])-1;\n\t\t\t}\n\t\t\tint tmp = lots[buf[0]];\n\t\t\tlots[buf[0]] = lots[buf[1]];\n\t\t\tlots[buf[1]] = 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[] bufbuf;\n\t\tint[] buf;\n\t\tfor(int i = 0;i < n;i++){\n\t\t\tbufbuf = br.readLine().split(\",\");\n\t\t\tbuf = new int[bufbuf.length];\n\t\t\tfor(int j = 0;j < bufbuf.length;j++){\n\t\t\t\tbuf[j] = Integer.parseInt(bufbuf[j])-1;\n\t\t\t}\n\t\t\tint tmp = lots[buf[0]];\n\t\t\tlots[buf[0]] = lots[buf[1]];\n\t\t\tlots[buf[1]] = 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[] bufbuf;",
"bufbuf",
"int[] buf;",
"buf",
"for(int i = 0;i < n;i++){\n\t\t\tbufbuf = br.readLine().split(\",\");\n\t\t\tbuf = new int[bufbuf.length];\n\t\t\tfor(int j = 0;j < bufbuf.length;j++){\n\t\t\t\tbuf[j] = Integer.parseInt(bufbuf[j])-1;\n\t\t\t}\n\t\t\tint tmp = lots[buf[0]];\n\t\t\tlots[buf[0]] = lots[buf[1]];\n\t\t\tlots[buf[1]] = tmp;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tbufbuf = br.readLine().split(\",\");\n\t\t\tbuf = new int[bufbuf.length];\n\t\t\tfor(int j = 0;j < bufbuf.length;j++){\n\t\t\t\tbuf[j] = Integer.parseInt(bufbuf[j])-1;\n\t\t\t}\n\t\t\tint tmp = lots[buf[0]];\n\t\t\tlots[buf[0]] = lots[buf[1]];\n\t\t\tlots[buf[1]] = tmp;\n\t\t}",
"{\n\t\t\tbufbuf = br.readLine().split(\",\");\n\t\t\tbuf = new int[bufbuf.length];\n\t\t\tfor(int j = 0;j < bufbuf.length;j++){\n\t\t\t\tbuf[j] = Integer.parseInt(bufbuf[j])-1;\n\t\t\t}\n\t\t\tint tmp = lots[buf[0]];\n\t\t\tlots[buf[0]] = lots[buf[1]];\n\t\t\tlots[buf[1]] = tmp;\n\t\t}",
"bufbuf = br.readLine().split(\",\")",
"bufbuf",
"br.readLine().split(\",\")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\",\"",
"buf = new int[bufbuf.length]",
"buf",
"new int[bufbuf.length]",
"bufbuf.length",
"bufbuf",
"bufbuf.length",
"for(int j = 0;j < bufbuf.length;j++){\n\t\t\t\tbuf[j] = Integer.parseInt(bufbuf[j])-1;\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < bufbuf.length",
"j",
"bufbuf.length",
"bufbuf",
"bufbuf.length",
"j++",
"j++",
"j",
"{\n\t\t\t\tbuf[j] = Integer.parseInt(bufbuf[j])-1;\n\t\t\t}",
"{\n\t\t\t\tbuf[j] = Integer.parseInt(bufbuf[j])-1;\n\t\t\t}",
"buf[j] = Integer.parseInt(bufbuf[j])-1",
"buf[j]",
"buf",
"j",
"Integer.parseInt(bufbuf[j])-1",
"Integer.parseInt(bufbuf[j])",
"Integer.parseInt",
"Integer",
"bufbuf[j]",
"bufbuf",
"j",
"1",
"int tmp = lots[buf[0]];",
"tmp",
"lots[buf[0]]",
"lots",
"buf[0]",
"buf",
"0",
"lots[buf[0]] = lots[buf[1]]",
"lots[buf[0]]",
"lots",
"buf[0]",
"buf",
"0",
"lots[buf[1]]",
"lots",
"buf[1]",
"buf",
"1",
"lots[buf[1]] = tmp",
"lots[buf[1]]",
"lots",
"buf[1]",
"buf",
"1",
"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[] bufbuf;\n\t\tint[] buf;\n\t\tfor(int i = 0;i < n;i++){\n\t\t\tbufbuf = br.readLine().split(\",\");\n\t\t\tbuf = new int[bufbuf.length];\n\t\t\tfor(int j = 0;j < bufbuf.length;j++){\n\t\t\t\tbuf[j] = Integer.parseInt(bufbuf[j])-1;\n\t\t\t}\n\t\t\tint tmp = lots[buf[0]];\n\t\t\tlots[buf[0]] = lots[buf[1]];\n\t\t\tlots[buf[1]] = 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[] bufbuf;\n\t\tint[] buf;\n\t\tfor(int i = 0;i < n;i++){\n\t\t\tbufbuf = br.readLine().split(\",\");\n\t\t\tbuf = new int[bufbuf.length];\n\t\t\tfor(int j = 0;j < bufbuf.length;j++){\n\t\t\t\tbuf[j] = Integer.parseInt(bufbuf[j])-1;\n\t\t\t}\n\t\t\tint tmp = lots[buf[0]];\n\t\t\tlots[buf[0]] = lots[buf[1]];\n\t\t\tlots[buf[1]] = 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[] bufbuf;
int[] buf;
for(int i = 0;i < n;i++){
bufbuf = br.readLine().split(",");
buf = new int[bufbuf.length];
for(int j = 0;j < bufbuf.length;j++){
buf[j] = Integer.parseInt(bufbuf[j])-1;
}
int tmp = lots[buf[0]];
lots[buf[0]] = lots[buf[1]];
lots[buf[1]] = 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,
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,
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
],
[
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
],
[
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
],
[
76,
77
],
[
75,
78
],
[
78,
79
],
[
78,
80
],
[
74,
81
],
[
60,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
88,
89
],
[
88,
90
],
[
84,
91
],
[
60,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
94,
96
],
[
60,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
101,
102
],
[
101,
103
],
[
60,
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
],
[
121,
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\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n\n int x = sc.nextInt();\n\n int y = sc.nextInt();\n\n int[] values = new int[x];\n\n for (int i = 0; i < values.length; i++) {\n\n values[i] = i +1;\n\n }\n for (int i = 0; i < y; i++) {\n String str = sc.next();\n String[] ab = str.split(\",\");\n int a = Integer.parseInt(ab[0])-1;\n int b = Integer.parseInt(ab[1])-1;\n int t = values[a];\n values[a] = values[b];\n values[b] = t;\n }\n for (int j=0; j < x; j++) {\n System.out.println(values[j]);\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\n int x = sc.nextInt();\n\n int y = sc.nextInt();\n\n int[] values = new int[x];\n\n for (int i = 0; i < values.length; i++) {\n\n values[i] = i +1;\n\n }\n for (int i = 0; i < y; i++) {\n String str = sc.next();\n String[] ab = str.split(\",\");\n int a = Integer.parseInt(ab[0])-1;\n int b = Integer.parseInt(ab[1])-1;\n int t = values[a];\n values[a] = values[b];\n values[b] = t;\n }\n for (int j=0; j < x; j++) {\n System.out.println(values[j]);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n\n int x = sc.nextInt();\n\n int y = sc.nextInt();\n\n int[] values = new int[x];\n\n for (int i = 0; i < values.length; i++) {\n\n values[i] = i +1;\n\n }\n for (int i = 0; i < y; i++) {\n String str = sc.next();\n String[] ab = str.split(\",\");\n int a = Integer.parseInt(ab[0])-1;\n int b = Integer.parseInt(ab[1])-1;\n int t = values[a];\n values[a] = values[b];\n values[b] = t;\n }\n for (int j=0; j < x; j++) {\n System.out.println(values[j]);\n }\n }",
"main",
"{\n\n Scanner sc = new Scanner(System.in);\n\n int x = sc.nextInt();\n\n int y = sc.nextInt();\n\n int[] values = new int[x];\n\n for (int i = 0; i < values.length; i++) {\n\n values[i] = i +1;\n\n }\n for (int i = 0; i < y; i++) {\n String str = sc.next();\n String[] ab = str.split(\",\");\n int a = Integer.parseInt(ab[0])-1;\n int b = Integer.parseInt(ab[1])-1;\n int t = values[a];\n values[a] = values[b];\n values[b] = t;\n }\n for (int j=0; j < x; j++) {\n System.out.println(values[j]);\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int x = sc.nextInt();",
"x",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int y = sc.nextInt();",
"y",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] values = new int[x];",
"values",
"new int[x]",
"x",
"for (int i = 0; i < values.length; i++) {\n\n values[i] = i +1;\n\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < values.length",
"i",
"values.length",
"values",
"values.length",
"i++",
"i++",
"i",
"{\n\n values[i] = i +1;\n\n }",
"{\n\n values[i] = i +1;\n\n }",
"values[i] = i +1",
"values[i]",
"values",
"i",
"i +1",
"i",
"1",
"for (int i = 0; i < y; i++) {\n String str = sc.next();\n String[] ab = str.split(\",\");\n int a = Integer.parseInt(ab[0])-1;\n int b = Integer.parseInt(ab[1])-1;\n int t = values[a];\n values[a] = values[b];\n values[b] = t;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < y",
"i",
"y",
"i++",
"i++",
"i",
"{\n String str = sc.next();\n String[] ab = str.split(\",\");\n int a = Integer.parseInt(ab[0])-1;\n int b = Integer.parseInt(ab[1])-1;\n int t = values[a];\n values[a] = values[b];\n values[b] = t;\n }",
"{\n String str = sc.next();\n String[] ab = str.split(\",\");\n int a = Integer.parseInt(ab[0])-1;\n int b = Integer.parseInt(ab[1])-1;\n int t = values[a];\n values[a] = values[b];\n values[b] = t;\n }",
"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 t = values[a];",
"t",
"values[a]",
"values",
"a",
"values[a] = values[b]",
"values[a]",
"values",
"a",
"values[b]",
"values",
"b",
"values[b] = t",
"values[b]",
"values",
"b",
"t",
"for (int j=0; j < x; j++) {\n System.out.println(values[j]);\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j < x",
"j",
"x",
"j++",
"j++",
"j",
"{\n System.out.println(values[j]);\n }",
"{\n System.out.println(values[j]);\n }",
"System.out.println(values[j])",
"System.out.println",
"System.out",
"System",
"System.out",
"values[j]",
"values",
"j",
"String[] args",
"args",
"public class Main{\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n\n int x = sc.nextInt();\n\n int y = sc.nextInt();\n\n int[] values = new int[x];\n\n for (int i = 0; i < values.length; i++) {\n\n values[i] = i +1;\n\n }\n for (int i = 0; i < y; i++) {\n String str = sc.next();\n String[] ab = str.split(\",\");\n int a = Integer.parseInt(ab[0])-1;\n int b = Integer.parseInt(ab[1])-1;\n int t = values[a];\n values[a] = values[b];\n values[b] = t;\n }\n for (int j=0; j < x; j++) {\n System.out.println(values[j]);\n }\n }\n}",
"public class Main{\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n\n int x = sc.nextInt();\n\n int y = sc.nextInt();\n\n int[] values = new int[x];\n\n for (int i = 0; i < values.length; i++) {\n\n values[i] = i +1;\n\n }\n for (int i = 0; i < y; i++) {\n String str = sc.next();\n String[] ab = str.split(\",\");\n int a = Integer.parseInt(ab[0])-1;\n int b = Integer.parseInt(ab[1])-1;\n int t = values[a];\n values[a] = values[b];\n values[b] = t;\n }\n for (int j=0; j < x; j++) {\n System.out.println(values[j]);\n }\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
int[] values = new int[x];
for (int i = 0; i < values.length; i++) {
values[i] = i +1;
}
for (int i = 0; i < y; i++) {
String str = sc.next();
String[] ab = str.split(",");
int a = Integer.parseInt(ab[0])-1;
int b = Integer.parseInt(ab[1])-1;
int t = values[a];
values[a] = values[b];
values[b] = t;
}
for (int j=0; j < x; j++) {
System.out.println(values[j]);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
41,
13,
17,
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,
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,
0,
18,
13,
13,
4,
18,
13,
18,
13,
13,
0,
18,
13,
13,
4,
18,
13,
18,
13,
13,
4,
18,
13,
13,
41,
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,
23,
13,
12,
13,
30,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
13,
28,
13,
13,
30,
30,
41,
13,
17,
0,
13,
18,
13,
18,
13,
13,
0,
18,
13,
18,
13,
13,
18,
13,
18,
13,
13,
0,
18,
13,
18,
13,
13,
13,
29,
13,
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
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
201,
17
],
[
201,
18
],
[
18,
19
],
[
18,
20
],
[
201,
21
],
[
21,
22
],
[
21,
23
],
[
201,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
32,
35
],
[
35,
36
],
[
36,
37
],
[
26,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
43,
44
],
[
44,
45
],
[
26,
46
],
[
46,
47
],
[
46,
48
],
[
26,
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
],
[
61,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
81,
82
],
[
81,
83
],
[
61,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
91,
92
],
[
91,
93
],
[
61,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
26,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
100,
102
],
[
100,
103
],
[
100,
104
],
[
26,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
112,
114
],
[
105,
115
],
[
115,
116
],
[
116,
117
],
[
105,
118
],
[
119,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
120,
125
],
[
125,
126
],
[
125,
127
],
[
24,
128
],
[
128,
129
],
[
201,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
136,
137
],
[
136,
138
],
[
132,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
139,
144
],
[
144,
145
],
[
144,
146
],
[
146,
147
],
[
146,
148
],
[
139,
149
],
[
149,
150
],
[
150,
151
],
[
139,
152
],
[
153,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
155,
157
],
[
154,
158
],
[
132,
159
],
[
159,
160
],
[
159,
161
],
[
159,
162
],
[
163,
163
],
[
163,
164
],
[
164,
165
],
[
164,
166
],
[
163,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
169,
171
],
[
171,
172
],
[
171,
173
],
[
163,
174
],
[
174,
175
],
[
175,
176
],
[
175,
177
],
[
177,
178
],
[
177,
179
],
[
174,
180
],
[
180,
181
],
[
180,
182
],
[
182,
183
],
[
182,
184
],
[
163,
185
],
[
185,
186
],
[
186,
187
],
[
186,
188
],
[
188,
189
],
[
188,
190
],
[
185,
191
],
[
132,
192
],
[
192,
193
],
[
130,
194
],
[
194,
195
],
[
130,
196
],
[
196,
197
],
[
130,
198
],
[
198,
199
],
[
0,
200
],
[
200,
201
],
[
200,
202
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class Main{\n\n public static final int FIRST_NUMBER = 0;\n public static final int SECOND_NUMBER = 1;\n\n public static void main(String[] args) throws NumberFormatException, IOException {\n\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t// ???????????°\n\tint vertical = Integer.parseInt(br.readLine());\n\t// ?¨?????????°\n\tint horizontal = Integer.parseInt(br.readLine());\n\n\t// ?????????????????°??????????????????\n\tList<int[]> changeRequests = new ArrayList<>();\n\tfor (int i = 0; i < horizontal; i++) {\n\t String[] changeRequestStr = br.readLine().split(\",\");\n\t int[] changeRequest = new int[2];\n\t changeRequest[FIRST_NUMBER] = Integer.parseInt(changeRequestStr[FIRST_NUMBER]);\n\t changeRequest[SECOND_NUMBER] = Integer.parseInt(changeRequestStr[SECOND_NUMBER]);\n\t changeRequests.add(changeRequest);\n\t}\n\n\t// ?????\\???????????????????´???????????????????????????????\n\tint[] outputArray = getDrawedArray(changeRequests, vertical, horizontal);\n\n\t// ???????????????????????????????????¨?????\\???????????????????????????????????????1??????????????????\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t System.out.println(outputArray[i]);\n\t}\n\n }\n\n /**\n * ?????? ?????????????´???????????????\\??????????????????\n * \n * @param changeRequests\n * @param vertical\n * @param horizontal\n * @return ?????\\?????????\n */\n private static int[] getDrawedArray(List<int[]> changeRequests, int vertical, int horizontal) {\n\t// ?????\\?????????????????????????????????????????????\n\t// outputArray[0]????????¨?????????\n\tint[] outputArray = new int[vertical + 1];\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t outputArray[i] = i;\n\t}\n\n\t// ?????????????????????????£????????????\\????????????\n\tfor (int[] changeRequest : changeRequests) {\n\t int mediator = 0;\n\t mediator = outputArray[changeRequest[FIRST_NUMBER]];\n\t outputArray[changeRequest[FIRST_NUMBER]] = outputArray[changeRequest[SECOND_NUMBER]];\n\t outputArray[changeRequest[SECOND_NUMBER]] = mediator;\n\n\t}\n\n\treturn outputArray;\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",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.List;",
"List",
"java.util",
"public class Main{\n\n public static final int FIRST_NUMBER = 0;\n public static final int SECOND_NUMBER = 1;\n\n public static void main(String[] args) throws NumberFormatException, IOException {\n\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t// ???????????°\n\tint vertical = Integer.parseInt(br.readLine());\n\t// ?¨?????????°\n\tint horizontal = Integer.parseInt(br.readLine());\n\n\t// ?????????????????°??????????????????\n\tList<int[]> changeRequests = new ArrayList<>();\n\tfor (int i = 0; i < horizontal; i++) {\n\t String[] changeRequestStr = br.readLine().split(\",\");\n\t int[] changeRequest = new int[2];\n\t changeRequest[FIRST_NUMBER] = Integer.parseInt(changeRequestStr[FIRST_NUMBER]);\n\t changeRequest[SECOND_NUMBER] = Integer.parseInt(changeRequestStr[SECOND_NUMBER]);\n\t changeRequests.add(changeRequest);\n\t}\n\n\t// ?????\\???????????????????´???????????????????????????????\n\tint[] outputArray = getDrawedArray(changeRequests, vertical, horizontal);\n\n\t// ???????????????????????????????????¨?????\\???????????????????????????????????????1??????????????????\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t System.out.println(outputArray[i]);\n\t}\n\n }\n\n /**\n * ?????? ?????????????´???????????????\\??????????????????\n * \n * @param changeRequests\n * @param vertical\n * @param horizontal\n * @return ?????\\?????????\n */\n private static int[] getDrawedArray(List<int[]> changeRequests, int vertical, int horizontal) {\n\t// ?????\\?????????????????????????????????????????????\n\t// outputArray[0]????????¨?????????\n\tint[] outputArray = new int[vertical + 1];\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t outputArray[i] = i;\n\t}\n\n\t// ?????????????????????????£????????????\\????????????\n\tfor (int[] changeRequest : changeRequests) {\n\t int mediator = 0;\n\t mediator = outputArray[changeRequest[FIRST_NUMBER]];\n\t outputArray[changeRequest[FIRST_NUMBER]] = outputArray[changeRequest[SECOND_NUMBER]];\n\t outputArray[changeRequest[SECOND_NUMBER]] = mediator;\n\n\t}\n\n\treturn outputArray;\n\n }\n\n}",
"Main",
"public static final int FIRST_NUMBER = 0;",
"FIRST_NUMBER",
"0",
"public static final int SECOND_NUMBER = 1;",
"SECOND_NUMBER",
"1",
"public static void main(String[] args) throws NumberFormatException, IOException {\n\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t// ???????????°\n\tint vertical = Integer.parseInt(br.readLine());\n\t// ?¨?????????°\n\tint horizontal = Integer.parseInt(br.readLine());\n\n\t// ?????????????????°??????????????????\n\tList<int[]> changeRequests = new ArrayList<>();\n\tfor (int i = 0; i < horizontal; i++) {\n\t String[] changeRequestStr = br.readLine().split(\",\");\n\t int[] changeRequest = new int[2];\n\t changeRequest[FIRST_NUMBER] = Integer.parseInt(changeRequestStr[FIRST_NUMBER]);\n\t changeRequest[SECOND_NUMBER] = Integer.parseInt(changeRequestStr[SECOND_NUMBER]);\n\t changeRequests.add(changeRequest);\n\t}\n\n\t// ?????\\???????????????????´???????????????????????????????\n\tint[] outputArray = getDrawedArray(changeRequests, vertical, horizontal);\n\n\t// ???????????????????????????????????¨?????\\???????????????????????????????????????1??????????????????\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t System.out.println(outputArray[i]);\n\t}\n\n }",
"main",
"{\n\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t// ???????????°\n\tint vertical = Integer.parseInt(br.readLine());\n\t// ?¨?????????°\n\tint horizontal = Integer.parseInt(br.readLine());\n\n\t// ?????????????????°??????????????????\n\tList<int[]> changeRequests = new ArrayList<>();\n\tfor (int i = 0; i < horizontal; i++) {\n\t String[] changeRequestStr = br.readLine().split(\",\");\n\t int[] changeRequest = new int[2];\n\t changeRequest[FIRST_NUMBER] = Integer.parseInt(changeRequestStr[FIRST_NUMBER]);\n\t changeRequest[SECOND_NUMBER] = Integer.parseInt(changeRequestStr[SECOND_NUMBER]);\n\t changeRequests.add(changeRequest);\n\t}\n\n\t// ?????\\???????????????????´???????????????????????????????\n\tint[] outputArray = getDrawedArray(changeRequests, vertical, horizontal);\n\n\t// ???????????????????????????????????¨?????\\???????????????????????????????????????1??????????????????\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t System.out.println(outputArray[i]);\n\t}\n\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int vertical = Integer.parseInt(br.readLine());",
"vertical",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int horizontal = Integer.parseInt(br.readLine());",
"horizontal",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"List<int[]> changeRequests = new ArrayList<>();",
"changeRequests",
"new ArrayList<>()",
"for (int i = 0; i < horizontal; i++) {\n\t String[] changeRequestStr = br.readLine().split(\",\");\n\t int[] changeRequest = new int[2];\n\t changeRequest[FIRST_NUMBER] = Integer.parseInt(changeRequestStr[FIRST_NUMBER]);\n\t changeRequest[SECOND_NUMBER] = Integer.parseInt(changeRequestStr[SECOND_NUMBER]);\n\t changeRequests.add(changeRequest);\n\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < horizontal",
"i",
"horizontal",
"i++",
"i++",
"i",
"{\n\t String[] changeRequestStr = br.readLine().split(\",\");\n\t int[] changeRequest = new int[2];\n\t changeRequest[FIRST_NUMBER] = Integer.parseInt(changeRequestStr[FIRST_NUMBER]);\n\t changeRequest[SECOND_NUMBER] = Integer.parseInt(changeRequestStr[SECOND_NUMBER]);\n\t changeRequests.add(changeRequest);\n\t}",
"{\n\t String[] changeRequestStr = br.readLine().split(\",\");\n\t int[] changeRequest = new int[2];\n\t changeRequest[FIRST_NUMBER] = Integer.parseInt(changeRequestStr[FIRST_NUMBER]);\n\t changeRequest[SECOND_NUMBER] = Integer.parseInt(changeRequestStr[SECOND_NUMBER]);\n\t changeRequests.add(changeRequest);\n\t}",
"String[] changeRequestStr = br.readLine().split(\",\");",
"changeRequestStr",
"br.readLine().split(\",\")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\",\"",
"int[] changeRequest = new int[2];",
"changeRequest",
"new int[2]",
"2",
"changeRequest[FIRST_NUMBER] = Integer.parseInt(changeRequestStr[FIRST_NUMBER])",
"changeRequest[FIRST_NUMBER]",
"changeRequest",
"FIRST_NUMBER",
"Integer.parseInt(changeRequestStr[FIRST_NUMBER])",
"Integer.parseInt",
"Integer",
"changeRequestStr[FIRST_NUMBER]",
"changeRequestStr",
"FIRST_NUMBER",
"changeRequest[SECOND_NUMBER] = Integer.parseInt(changeRequestStr[SECOND_NUMBER])",
"changeRequest[SECOND_NUMBER]",
"changeRequest",
"SECOND_NUMBER",
"Integer.parseInt(changeRequestStr[SECOND_NUMBER])",
"Integer.parseInt",
"Integer",
"changeRequestStr[SECOND_NUMBER]",
"changeRequestStr",
"SECOND_NUMBER",
"changeRequests.add(changeRequest)",
"changeRequests.add",
"changeRequests",
"changeRequest",
"int[] outputArray = getDrawedArray(changeRequests, vertical, horizontal);",
"outputArray",
"getDrawedArray(changeRequests, vertical, horizontal)",
"getDrawedArray",
"changeRequests",
"vertical",
"horizontal",
"for (int i = 1; i < outputArray.length; i++) {\n\t System.out.println(outputArray[i]);\n\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < outputArray.length",
"i",
"outputArray.length",
"outputArray",
"outputArray.length",
"i++",
"i++",
"i",
"{\n\t System.out.println(outputArray[i]);\n\t}",
"{\n\t System.out.println(outputArray[i]);\n\t}",
"System.out.println(outputArray[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"outputArray[i]",
"outputArray",
"i",
"String[] args",
"args",
"/**\n * ?????? ?????????????´???????????????\\??????????????????\n * \n * @param changeRequests\n * @param vertical\n * @param horizontal\n * @return ?????\\?????????\n */\n private static int[] getDrawedArray(List<int[]> changeRequests, int vertical, int horizontal) {\n\t// ?????\\?????????????????????????????????????????????\n\t// outputArray[0]????????¨?????????\n\tint[] outputArray = new int[vertical + 1];\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t outputArray[i] = i;\n\t}\n\n\t// ?????????????????????????£????????????\\????????????\n\tfor (int[] changeRequest : changeRequests) {\n\t int mediator = 0;\n\t mediator = outputArray[changeRequest[FIRST_NUMBER]];\n\t outputArray[changeRequest[FIRST_NUMBER]] = outputArray[changeRequest[SECOND_NUMBER]];\n\t outputArray[changeRequest[SECOND_NUMBER]] = mediator;\n\n\t}\n\n\treturn outputArray;\n\n }",
"getDrawedArray",
"{\n\t// ?????\\?????????????????????????????????????????????\n\t// outputArray[0]????????¨?????????\n\tint[] outputArray = new int[vertical + 1];\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t outputArray[i] = i;\n\t}\n\n\t// ?????????????????????????£????????????\\????????????\n\tfor (int[] changeRequest : changeRequests) {\n\t int mediator = 0;\n\t mediator = outputArray[changeRequest[FIRST_NUMBER]];\n\t outputArray[changeRequest[FIRST_NUMBER]] = outputArray[changeRequest[SECOND_NUMBER]];\n\t outputArray[changeRequest[SECOND_NUMBER]] = mediator;\n\n\t}\n\n\treturn outputArray;\n\n }",
"int[] outputArray = new int[vertical + 1];",
"outputArray",
"new int[vertical + 1]",
"vertical + 1",
"vertical",
"1",
"for (int i = 1; i < outputArray.length; i++) {\n\t outputArray[i] = i;\n\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < outputArray.length",
"i",
"outputArray.length",
"outputArray",
"outputArray.length",
"i++",
"i++",
"i",
"{\n\t outputArray[i] = i;\n\t}",
"{\n\t outputArray[i] = i;\n\t}",
"outputArray[i] = i",
"outputArray[i]",
"outputArray",
"i",
"i",
"for (int[] changeRequest : changeRequests) {\n\t int mediator = 0;\n\t mediator = outputArray[changeRequest[FIRST_NUMBER]];\n\t outputArray[changeRequest[FIRST_NUMBER]] = outputArray[changeRequest[SECOND_NUMBER]];\n\t outputArray[changeRequest[SECOND_NUMBER]] = mediator;\n\n\t}",
"int[] changeRequest",
"changeRequests",
"{\n\t int mediator = 0;\n\t mediator = outputArray[changeRequest[FIRST_NUMBER]];\n\t outputArray[changeRequest[FIRST_NUMBER]] = outputArray[changeRequest[SECOND_NUMBER]];\n\t outputArray[changeRequest[SECOND_NUMBER]] = mediator;\n\n\t}",
"{\n\t int mediator = 0;\n\t mediator = outputArray[changeRequest[FIRST_NUMBER]];\n\t outputArray[changeRequest[FIRST_NUMBER]] = outputArray[changeRequest[SECOND_NUMBER]];\n\t outputArray[changeRequest[SECOND_NUMBER]] = mediator;\n\n\t}",
"int mediator = 0;",
"mediator",
"0",
"mediator = outputArray[changeRequest[FIRST_NUMBER]]",
"mediator",
"outputArray[changeRequest[FIRST_NUMBER]]",
"outputArray",
"changeRequest[FIRST_NUMBER]",
"changeRequest",
"FIRST_NUMBER",
"outputArray[changeRequest[FIRST_NUMBER]] = outputArray[changeRequest[SECOND_NUMBER]]",
"outputArray[changeRequest[FIRST_NUMBER]]",
"outputArray",
"changeRequest[FIRST_NUMBER]",
"changeRequest",
"FIRST_NUMBER",
"outputArray[changeRequest[SECOND_NUMBER]]",
"outputArray",
"changeRequest[SECOND_NUMBER]",
"changeRequest",
"SECOND_NUMBER",
"outputArray[changeRequest[SECOND_NUMBER]] = mediator",
"outputArray[changeRequest[SECOND_NUMBER]]",
"outputArray",
"changeRequest[SECOND_NUMBER]",
"changeRequest",
"SECOND_NUMBER",
"mediator",
"return outputArray;",
"outputArray",
"List<int[]> changeRequests",
"changeRequests",
"int vertical",
"vertical",
"int horizontal",
"horizontal",
"public class Main{\n\n public static final int FIRST_NUMBER = 0;\n public static final int SECOND_NUMBER = 1;\n\n public static void main(String[] args) throws NumberFormatException, IOException {\n\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t// ???????????°\n\tint vertical = Integer.parseInt(br.readLine());\n\t// ?¨?????????°\n\tint horizontal = Integer.parseInt(br.readLine());\n\n\t// ?????????????????°??????????????????\n\tList<int[]> changeRequests = new ArrayList<>();\n\tfor (int i = 0; i < horizontal; i++) {\n\t String[] changeRequestStr = br.readLine().split(\",\");\n\t int[] changeRequest = new int[2];\n\t changeRequest[FIRST_NUMBER] = Integer.parseInt(changeRequestStr[FIRST_NUMBER]);\n\t changeRequest[SECOND_NUMBER] = Integer.parseInt(changeRequestStr[SECOND_NUMBER]);\n\t changeRequests.add(changeRequest);\n\t}\n\n\t// ?????\\???????????????????´???????????????????????????????\n\tint[] outputArray = getDrawedArray(changeRequests, vertical, horizontal);\n\n\t// ???????????????????????????????????¨?????\\???????????????????????????????????????1??????????????????\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t System.out.println(outputArray[i]);\n\t}\n\n }\n\n /**\n * ?????? ?????????????´???????????????\\??????????????????\n * \n * @param changeRequests\n * @param vertical\n * @param horizontal\n * @return ?????\\?????????\n */\n private static int[] getDrawedArray(List<int[]> changeRequests, int vertical, int horizontal) {\n\t// ?????\\?????????????????????????????????????????????\n\t// outputArray[0]????????¨?????????\n\tint[] outputArray = new int[vertical + 1];\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t outputArray[i] = i;\n\t}\n\n\t// ?????????????????????????£????????????\\????????????\n\tfor (int[] changeRequest : changeRequests) {\n\t int mediator = 0;\n\t mediator = outputArray[changeRequest[FIRST_NUMBER]];\n\t outputArray[changeRequest[FIRST_NUMBER]] = outputArray[changeRequest[SECOND_NUMBER]];\n\t outputArray[changeRequest[SECOND_NUMBER]] = mediator;\n\n\t}\n\n\treturn outputArray;\n\n }\n\n}",
"public class Main{\n\n public static final int FIRST_NUMBER = 0;\n public static final int SECOND_NUMBER = 1;\n\n public static void main(String[] args) throws NumberFormatException, IOException {\n\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t// ???????????°\n\tint vertical = Integer.parseInt(br.readLine());\n\t// ?¨?????????°\n\tint horizontal = Integer.parseInt(br.readLine());\n\n\t// ?????????????????°??????????????????\n\tList<int[]> changeRequests = new ArrayList<>();\n\tfor (int i = 0; i < horizontal; i++) {\n\t String[] changeRequestStr = br.readLine().split(\",\");\n\t int[] changeRequest = new int[2];\n\t changeRequest[FIRST_NUMBER] = Integer.parseInt(changeRequestStr[FIRST_NUMBER]);\n\t changeRequest[SECOND_NUMBER] = Integer.parseInt(changeRequestStr[SECOND_NUMBER]);\n\t changeRequests.add(changeRequest);\n\t}\n\n\t// ?????\\???????????????????´???????????????????????????????\n\tint[] outputArray = getDrawedArray(changeRequests, vertical, horizontal);\n\n\t// ???????????????????????????????????¨?????\\???????????????????????????????????????1??????????????????\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t System.out.println(outputArray[i]);\n\t}\n\n }\n\n /**\n * ?????? ?????????????´???????????????\\??????????????????\n * \n * @param changeRequests\n * @param vertical\n * @param horizontal\n * @return ?????\\?????????\n */\n private static int[] getDrawedArray(List<int[]> changeRequests, int vertical, int horizontal) {\n\t// ?????\\?????????????????????????????????????????????\n\t// outputArray[0]????????¨?????????\n\tint[] outputArray = new int[vertical + 1];\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t outputArray[i] = i;\n\t}\n\n\t// ?????????????????????????£????????????\\????????????\n\tfor (int[] changeRequest : changeRequests) {\n\t int mediator = 0;\n\t mediator = outputArray[changeRequest[FIRST_NUMBER]];\n\t outputArray[changeRequest[FIRST_NUMBER]] = outputArray[changeRequest[SECOND_NUMBER]];\n\t outputArray[changeRequest[SECOND_NUMBER]] = mediator;\n\n\t}\n\n\treturn outputArray;\n\n }\n\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class Main{
public static final int FIRST_NUMBER = 0;
public static final int SECOND_NUMBER = 1;
public static void main(String[] args) throws NumberFormatException, IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
// ???????????°
int vertical = Integer.parseInt(br.readLine());
// ?¨?????????°
int horizontal = Integer.parseInt(br.readLine());
// ?????????????????°??????????????????
List<int[]> changeRequests = new ArrayList<>();
for (int i = 0; i < horizontal; i++) {
String[] changeRequestStr = br.readLine().split(",");
int[] changeRequest = new int[2];
changeRequest[FIRST_NUMBER] = Integer.parseInt(changeRequestStr[FIRST_NUMBER]);
changeRequest[SECOND_NUMBER] = Integer.parseInt(changeRequestStr[SECOND_NUMBER]);
changeRequests.add(changeRequest);
}
// ?????\???????????????????´???????????????????????????????
int[] outputArray = getDrawedArray(changeRequests, vertical, horizontal);
// ???????????????????????????????????¨?????\???????????????????????????????????????1??????????????????
for (int i = 1; i < outputArray.length; i++) {
System.out.println(outputArray[i]);
}
}
/**
* ?????? ?????????????´???????????????\??????????????????
*
* @param changeRequests
* @param vertical
* @param horizontal
* @return ?????\?????????
*/
private static int[] getDrawedArray(List<int[]> changeRequests, int vertical, int horizontal) {
// ?????\?????????????????????????????????????????????
// outputArray[0]????????¨?????????
int[] outputArray = new int[vertical + 1];
for (int i = 1; i < outputArray.length; i++) {
outputArray[i] = i;
}
// ?????????????????????????£????????????\????????????
for (int[] changeRequest : changeRequests) {
int mediator = 0;
mediator = outputArray[changeRequest[FIRST_NUMBER]];
outputArray[changeRequest[FIRST_NUMBER]] = outputArray[changeRequest[SECOND_NUMBER]];
outputArray[changeRequest[SECOND_NUMBER]] = mediator;
}
return outputArray;
}
} |
[
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,
4,
18,
13,
17,
42,
2,
13,
17,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
0,
18,
13,
13,
2,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
2,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
2,
18,
13,
13,
18,
13,
13,
40,
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
],
[
47,
50
],
[
8,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
55,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
55,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
74,
75
],
[
74,
76
],
[
55,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
85,
86
],
[
85,
87
],
[
55,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
96,
97
],
[
96,
98
],
[
55,
99
],
[
99,
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.*;\npublic class Main {\n public static void main(String[] args) throws java.io.IOException{\n Scanner scan = new Scanner(System.in);\n int w=scan.nextInt();\n int [] line =new int[w+1];\n for(int i=1;i<w+1;i++)\n \tline[i]=i;\n int n=scan.nextInt();\n scan.useDelimiter(\",|\\\\n\");\n while(n!=0){\n \t\n \tint a=scan.nextInt();\n \tint b=scan.nextInt();\n \tline[a]=line[a]^line[b];\n \tline[b]=line[a]^line[b];\n \tline[a]=line[a]^line[b];\n n--;\t\n }\n for(int i =1;i<w+1;i++)\n System.out.println(line[i]);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) throws java.io.IOException{\n Scanner scan = new Scanner(System.in);\n int w=scan.nextInt();\n int [] line =new int[w+1];\n for(int i=1;i<w+1;i++)\n \tline[i]=i;\n int n=scan.nextInt();\n scan.useDelimiter(\",|\\\\n\");\n while(n!=0){\n \t\n \tint a=scan.nextInt();\n \tint b=scan.nextInt();\n \tline[a]=line[a]^line[b];\n \tline[b]=line[a]^line[b];\n \tline[a]=line[a]^line[b];\n n--;\t\n }\n for(int i =1;i<w+1;i++)\n System.out.println(line[i]);\n }\n}",
"Main",
"public static void main(String[] args) throws java.io.IOException{\n Scanner scan = new Scanner(System.in);\n int w=scan.nextInt();\n int [] line =new int[w+1];\n for(int i=1;i<w+1;i++)\n \tline[i]=i;\n int n=scan.nextInt();\n scan.useDelimiter(\",|\\\\n\");\n while(n!=0){\n \t\n \tint a=scan.nextInt();\n \tint b=scan.nextInt();\n \tline[a]=line[a]^line[b];\n \tline[b]=line[a]^line[b];\n \tline[a]=line[a]^line[b];\n n--;\t\n }\n for(int i =1;i<w+1;i++)\n System.out.println(line[i]);\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n int w=scan.nextInt();\n int [] line =new int[w+1];\n for(int i=1;i<w+1;i++)\n \tline[i]=i;\n int n=scan.nextInt();\n scan.useDelimiter(\",|\\\\n\");\n while(n!=0){\n \t\n \tint a=scan.nextInt();\n \tint b=scan.nextInt();\n \tline[a]=line[a]^line[b];\n \tline[b]=line[a]^line[b];\n \tline[a]=line[a]^line[b];\n n--;\t\n }\n for(int i =1;i<w+1;i++)\n System.out.println(line[i]);\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int w=scan.nextInt();",
"w",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int [] line =new int[w+1];",
"line",
"new int[w+1]",
"w+1",
"w",
"1",
"for(int i=1;i<w+1;i++)\n \tline[i]=i;",
"int i=1;",
"int i=1;",
"i",
"1",
"i<w+1",
"i",
"w+1",
"w",
"1",
"i++",
"i++",
"i",
"line[i]=i;",
"line[i]=i",
"line[i]",
"line",
"i",
"i",
"int n=scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"scan.useDelimiter(\",|\\\\n\")",
"scan.useDelimiter",
"scan",
"\",|\\\\n\"",
"while(n!=0){\n \t\n \tint a=scan.nextInt();\n \tint b=scan.nextInt();\n \tline[a]=line[a]^line[b];\n \tline[b]=line[a]^line[b];\n \tline[a]=line[a]^line[b];\n n--;\t\n }",
"n!=0",
"n",
"0",
"{\n \t\n \tint a=scan.nextInt();\n \tint b=scan.nextInt();\n \tline[a]=line[a]^line[b];\n \tline[b]=line[a]^line[b];\n \tline[a]=line[a]^line[b];\n n--;\t\n }",
"int a=scan.nextInt();",
"a",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int b=scan.nextInt();",
"b",
"scan.nextInt()",
"scan.nextInt",
"scan",
"line[a]=line[a]^line[b]",
"line[a]",
"line",
"a",
"line[a]^line[b]",
"line[a]",
"line",
"a",
"line[b]",
"line",
"b",
"line[b]=line[a]^line[b]",
"line[b]",
"line",
"b",
"line[a]^line[b]",
"line[a]",
"line",
"a",
"line[b]",
"line",
"b",
"line[a]=line[a]^line[b]",
"line[a]",
"line",
"a",
"line[a]^line[b]",
"line[a]",
"line",
"a",
"line[b]",
"line",
"b",
"n--",
"n",
"for(int i =1;i<w+1;i++)\n System.out.println(line[i]);",
"int i =1;",
"int i =1;",
"i",
"1",
"i<w+1",
"i",
"w+1",
"w",
"1",
"i++",
"i++",
"i",
"System.out.println(line[i]);",
"System.out.println(line[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"line[i]",
"line",
"i",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws java.io.IOException{\n Scanner scan = new Scanner(System.in);\n int w=scan.nextInt();\n int [] line =new int[w+1];\n for(int i=1;i<w+1;i++)\n \tline[i]=i;\n int n=scan.nextInt();\n scan.useDelimiter(\",|\\\\n\");\n while(n!=0){\n \t\n \tint a=scan.nextInt();\n \tint b=scan.nextInt();\n \tline[a]=line[a]^line[b];\n \tline[b]=line[a]^line[b];\n \tline[a]=line[a]^line[b];\n n--;\t\n }\n for(int i =1;i<w+1;i++)\n System.out.println(line[i]);\n }\n}",
"public class Main {\n public static void main(String[] args) throws java.io.IOException{\n Scanner scan = new Scanner(System.in);\n int w=scan.nextInt();\n int [] line =new int[w+1];\n for(int i=1;i<w+1;i++)\n \tline[i]=i;\n int n=scan.nextInt();\n scan.useDelimiter(\",|\\\\n\");\n while(n!=0){\n \t\n \tint a=scan.nextInt();\n \tint b=scan.nextInt();\n \tline[a]=line[a]^line[b];\n \tline[b]=line[a]^line[b];\n \tline[a]=line[a]^line[b];\n n--;\t\n }\n for(int i =1;i<w+1;i++)\n System.out.println(line[i]);\n }\n}",
"Main"
] | import java.util.*;
public class Main {
public static void main(String[] args) throws java.io.IOException{
Scanner scan = new Scanner(System.in);
int w=scan.nextInt();
int [] line =new int[w+1];
for(int i=1;i<w+1;i++)
line[i]=i;
int n=scan.nextInt();
scan.useDelimiter(",|\\n");
while(n!=0){
int a=scan.nextInt();
int b=scan.nextInt();
line[a]=line[a]^line[b];
line[b]=line[a]^line[b];
line[a]=line[a]^line[b];
n--;
}
for(int i =1;i<w+1;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,
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,
17,
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
],
[
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
],
[
76,
77
],
[
75,
78
],
[
78,
79
],
[
78,
80
],
[
74,
81
],
[
60,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
88,
89
],
[
88,
90
],
[
84,
91
],
[
60,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
94,
96
],
[
60,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
101,
102
],
[
101,
103
],
[
60,
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
],
[
116,
117
],
[
116,
118
],
[
109,
119
],
[
119,
120
],
[
120,
121
],
[
109,
122
],
[
123,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
124,
129
],
[
124,
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\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] values = new int[w];\n\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tvalues[i] = i + 1;\n\t\t}\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\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\n\t\t\tint tmp = values[a];\n\t\t\tvalues[a] = values[b];\n\t\t\tvalues[b] = tmp;\n\t\t}\n\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tSystem.out.printf(\"%d\\n\", values[i]);\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\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] values = new int[w];\n\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tvalues[i] = i + 1;\n\t\t}\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\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\n\t\t\tint tmp = values[a];\n\t\t\tvalues[a] = values[b];\n\t\t\tvalues[b] = tmp;\n\t\t}\n\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tSystem.out.printf(\"%d\\n\", values[i]);\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\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] values = new int[w];\n\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tvalues[i] = i + 1;\n\t\t}\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\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\n\t\t\tint tmp = values[a];\n\t\t\tvalues[a] = values[b];\n\t\t\tvalues[b] = tmp;\n\t\t}\n\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tSystem.out.printf(\"%d\\n\", values[i]);\n\t\t}\n\t\tsc.close();\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] values = new int[w];\n\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tvalues[i] = i + 1;\n\t\t}\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\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\n\t\t\tint tmp = values[a];\n\t\t\tvalues[a] = values[b];\n\t\t\tvalues[b] = tmp;\n\t\t}\n\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tSystem.out.printf(\"%d\\n\", values[i]);\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[] 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\n\t\t\tint tmp = values[a];\n\t\t\tvalues[a] = values[b];\n\t\t\tvalues[b] = tmp;\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\n\t\t\tint tmp = values[a];\n\t\t\tvalues[a] = values[b];\n\t\t\tvalues[b] = tmp;\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\n\t\t\tint tmp = values[a];\n\t\t\tvalues[a] = values[b];\n\t\t\tvalues[b] = tmp;\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 tmp = values[a];",
"tmp",
"values[a]",
"values",
"a",
"values[a] = values[b]",
"values[a]",
"values",
"a",
"values[b]",
"values",
"b",
"values[b] = tmp",
"values[b]",
"values",
"b",
"tmp",
"for (int i = 0; i < values.length; i++) {\n\t\t\tSystem.out.printf(\"%d\\n\", 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.printf(\"%d\\n\", values[i]);\n\t\t}",
"{\n\t\t\tSystem.out.printf(\"%d\\n\", values[i]);\n\t\t}",
"System.out.printf(\"%d\\n\", values[i])",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%d\\n\"",
"values[i]",
"values",
"i",
"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\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] values = new int[w];\n\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tvalues[i] = i + 1;\n\t\t}\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\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\n\t\t\tint tmp = values[a];\n\t\t\tvalues[a] = values[b];\n\t\t\tvalues[b] = tmp;\n\t\t}\n\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tSystem.out.printf(\"%d\\n\", values[i]);\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\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] values = new int[w];\n\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tvalues[i] = i + 1;\n\t\t}\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\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\n\t\t\tint tmp = values[a];\n\t\t\tvalues[a] = values[b];\n\t\t\tvalues[b] = tmp;\n\t\t}\n\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tSystem.out.printf(\"%d\\n\", values[i]);\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[] 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 tmp = values[a];
values[a] = values[b];
values[b] = tmp;
}
for (int i = 0; i < values.length; i++) {
System.out.printf("%d\n", values[i]);
}
sc.close();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
18,
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,
13,
41,
13,
4,
18,
13,
18,
4,
18,
13,
17,
17,
41,
13,
4,
18,
13,
18,
4,
18,
13,
17,
17,
4,
18,
13,
13,
2,
13,
17,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
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
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
135,
17
],
[
135,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
26,
29
],
[
29,
30
],
[
30,
31
],
[
20,
32
],
[
32,
33
],
[
32,
34
],
[
20,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
50,
51
],
[
50,
52
],
[
20,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
58,
59
],
[
59,
60
],
[
20,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
66,
67
],
[
66,
68
],
[
61,
69
],
[
69,
70
],
[
70,
71
],
[
61,
72
],
[
73,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
73,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
84,
89
],
[
73,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
96,
99
],
[
95,
100
],
[
73,
101
],
[
101,
102
],
[
102,
103
],
[
101,
104
],
[
101,
105
],
[
105,
106
],
[
105,
107
],
[
101,
108
],
[
108,
109
],
[
108,
110
],
[
20,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
111,
116
],
[
116,
117
],
[
116,
118
],
[
111,
119
],
[
119,
120
],
[
120,
121
],
[
111,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
123,
128
],
[
128,
129
],
[
129,
130
],
[
128,
131
],
[
18,
132
],
[
132,
133
],
[
0,
134
],
[
134,
135
],
[
134,
136
]
] | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\nimport java.util.ArrayList;\nimport java.util.Collections;\n\npublic class Main\n{\n\tpublic static void main(String[] arg) throws IOException\n\t{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint v = Integer.valueOf(br.readLine());\n\t\tArrayList<Integer> amida = new ArrayList<Integer>(v);\n\t\tfor(int i=0; i<v; i++)\n\t\t\tamida.add(i+1);\n\n\t\tint h = Integer.valueOf(br.readLine());\n\t\t\n\t\tfor(int i=0; i<h; i++){\n\t\t\tString swapInd = br.readLine();\n\t\t\tint swap1 = Integer.valueOf(swapInd.split(\",\")[0]);\n\t\t\tint swap2 = Integer.valueOf(swapInd.split(\",\")[1]);\n\t\t\tCollections.swap(amida,swap1-1,swap2-1);\n\t\t}\n\n\t\tfor(int i=0; i<v; i++)\n\t\t\tSystem.out.println(amida.get(i));\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Collections;",
"Collections",
"java.util",
"public class Main\n{\n\tpublic static void main(String[] arg) throws IOException\n\t{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint v = Integer.valueOf(br.readLine());\n\t\tArrayList<Integer> amida = new ArrayList<Integer>(v);\n\t\tfor(int i=0; i<v; i++)\n\t\t\tamida.add(i+1);\n\n\t\tint h = Integer.valueOf(br.readLine());\n\t\t\n\t\tfor(int i=0; i<h; i++){\n\t\t\tString swapInd = br.readLine();\n\t\t\tint swap1 = Integer.valueOf(swapInd.split(\",\")[0]);\n\t\t\tint swap2 = Integer.valueOf(swapInd.split(\",\")[1]);\n\t\t\tCollections.swap(amida,swap1-1,swap2-1);\n\t\t}\n\n\t\tfor(int i=0; i<v; i++)\n\t\t\tSystem.out.println(amida.get(i));\n\t}\n}",
"Main",
"public static void main(String[] arg) throws IOException\n\t{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint v = Integer.valueOf(br.readLine());\n\t\tArrayList<Integer> amida = new ArrayList<Integer>(v);\n\t\tfor(int i=0; i<v; i++)\n\t\t\tamida.add(i+1);\n\n\t\tint h = Integer.valueOf(br.readLine());\n\t\t\n\t\tfor(int i=0; i<h; i++){\n\t\t\tString swapInd = br.readLine();\n\t\t\tint swap1 = Integer.valueOf(swapInd.split(\",\")[0]);\n\t\t\tint swap2 = Integer.valueOf(swapInd.split(\",\")[1]);\n\t\t\tCollections.swap(amida,swap1-1,swap2-1);\n\t\t}\n\n\t\tfor(int i=0; i<v; i++)\n\t\t\tSystem.out.println(amida.get(i));\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint v = Integer.valueOf(br.readLine());\n\t\tArrayList<Integer> amida = new ArrayList<Integer>(v);\n\t\tfor(int i=0; i<v; i++)\n\t\t\tamida.add(i+1);\n\n\t\tint h = Integer.valueOf(br.readLine());\n\t\t\n\t\tfor(int i=0; i<h; i++){\n\t\t\tString swapInd = br.readLine();\n\t\t\tint swap1 = Integer.valueOf(swapInd.split(\",\")[0]);\n\t\t\tint swap2 = Integer.valueOf(swapInd.split(\",\")[1]);\n\t\t\tCollections.swap(amida,swap1-1,swap2-1);\n\t\t}\n\n\t\tfor(int i=0; i<v; i++)\n\t\t\tSystem.out.println(amida.get(i));\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int v = Integer.valueOf(br.readLine());",
"v",
"Integer.valueOf(br.readLine())",
"Integer.valueOf",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"ArrayList<Integer> amida = new ArrayList<Integer>(v);",
"amida",
"new ArrayList<Integer>(v)",
"for(int i=0; i<v; i++)\n\t\t\tamida.add(i+1);",
"int i=0;",
"int i=0;",
"i",
"0",
"i<v",
"i",
"v",
"i++",
"i++",
"i",
"amida.add(i+1);",
"amida.add(i+1)",
"amida.add",
"amida",
"i+1",
"i",
"1",
"int h = Integer.valueOf(br.readLine());",
"h",
"Integer.valueOf(br.readLine())",
"Integer.valueOf",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"for(int i=0; i<h; i++){\n\t\t\tString swapInd = br.readLine();\n\t\t\tint swap1 = Integer.valueOf(swapInd.split(\",\")[0]);\n\t\t\tint swap2 = Integer.valueOf(swapInd.split(\",\")[1]);\n\t\t\tCollections.swap(amida,swap1-1,swap2-1);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<h",
"i",
"h",
"i++",
"i++",
"i",
"{\n\t\t\tString swapInd = br.readLine();\n\t\t\tint swap1 = Integer.valueOf(swapInd.split(\",\")[0]);\n\t\t\tint swap2 = Integer.valueOf(swapInd.split(\",\")[1]);\n\t\t\tCollections.swap(amida,swap1-1,swap2-1);\n\t\t}",
"{\n\t\t\tString swapInd = br.readLine();\n\t\t\tint swap1 = Integer.valueOf(swapInd.split(\",\")[0]);\n\t\t\tint swap2 = Integer.valueOf(swapInd.split(\",\")[1]);\n\t\t\tCollections.swap(amida,swap1-1,swap2-1);\n\t\t}",
"String swapInd = br.readLine();",
"swapInd",
"br.readLine()",
"br.readLine",
"br",
"int swap1 = Integer.valueOf(swapInd.split(\",\")[0]);",
"swap1",
"Integer.valueOf(swapInd.split(\",\")[0])",
"Integer.valueOf",
"Integer",
"swapInd.split(\",\")[0]",
"swapInd.split(\",\")",
"swapInd.split",
"swapInd",
"\",\"",
"0",
"int swap2 = Integer.valueOf(swapInd.split(\",\")[1]);",
"swap2",
"Integer.valueOf(swapInd.split(\",\")[1])",
"Integer.valueOf",
"Integer",
"swapInd.split(\",\")[1]",
"swapInd.split(\",\")",
"swapInd.split",
"swapInd",
"\",\"",
"1",
"Collections.swap(amida,swap1-1,swap2-1)",
"Collections.swap",
"Collections",
"amida",
"swap1-1",
"swap1",
"1",
"swap2-1",
"swap2",
"1",
"for(int i=0; i<v; i++)\n\t\t\tSystem.out.println(amida.get(i));",
"int i=0;",
"int i=0;",
"i",
"0",
"i<v",
"i",
"v",
"i++",
"i++",
"i",
"System.out.println(amida.get(i));",
"System.out.println(amida.get(i))",
"System.out.println",
"System.out",
"System",
"System.out",
"amida.get(i)",
"amida.get",
"amida",
"i",
"String[] arg",
"arg",
"public class Main\n{\n\tpublic static void main(String[] arg) throws IOException\n\t{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint v = Integer.valueOf(br.readLine());\n\t\tArrayList<Integer> amida = new ArrayList<Integer>(v);\n\t\tfor(int i=0; i<v; i++)\n\t\t\tamida.add(i+1);\n\n\t\tint h = Integer.valueOf(br.readLine());\n\t\t\n\t\tfor(int i=0; i<h; i++){\n\t\t\tString swapInd = br.readLine();\n\t\t\tint swap1 = Integer.valueOf(swapInd.split(\",\")[0]);\n\t\t\tint swap2 = Integer.valueOf(swapInd.split(\",\")[1]);\n\t\t\tCollections.swap(amida,swap1-1,swap2-1);\n\t\t}\n\n\t\tfor(int i=0; i<v; i++)\n\t\t\tSystem.out.println(amida.get(i));\n\t}\n}",
"public class Main\n{\n\tpublic static void main(String[] arg) throws IOException\n\t{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint v = Integer.valueOf(br.readLine());\n\t\tArrayList<Integer> amida = new ArrayList<Integer>(v);\n\t\tfor(int i=0; i<v; i++)\n\t\t\tamida.add(i+1);\n\n\t\tint h = Integer.valueOf(br.readLine());\n\t\t\n\t\tfor(int i=0; i<h; i++){\n\t\t\tString swapInd = br.readLine();\n\t\t\tint swap1 = Integer.valueOf(swapInd.split(\",\")[0]);\n\t\t\tint swap2 = Integer.valueOf(swapInd.split(\",\")[1]);\n\t\t\tCollections.swap(amida,swap1-1,swap2-1);\n\t\t}\n\n\t\tfor(int i=0; i<v; i++)\n\t\t\tSystem.out.println(amida.get(i));\n\t}\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
public class Main
{
public static void main(String[] arg) throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int v = Integer.valueOf(br.readLine());
ArrayList<Integer> amida = new ArrayList<Integer>(v);
for(int i=0; i<v; i++)
amida.add(i+1);
int h = Integer.valueOf(br.readLine());
for(int i=0; i<h; i++){
String swapInd = br.readLine();
int swap1 = Integer.valueOf(swapInd.split(",")[0]);
int swap2 = Integer.valueOf(swapInd.split(",")[1]);
Collections.swap(amida,swap1-1,swap2-1);
}
for(int i=0; i<v; i++)
System.out.println(amida.get(i));
}
} |
[
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,
4,
18,
13,
17,
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,
41,
13,
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,
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
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
130,
11
],
[
130,
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
],
[
29,
30
],
[
28,
31
],
[
14,
32
],
[
32,
33
],
[
32,
34
],
[
14,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
41,
42
],
[
41,
43
],
[
36,
44
],
[
44,
45
],
[
45,
46
],
[
36,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
52,
54
],
[
14,
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
],
[
67,
70
],
[
70,
71
],
[
67,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
67,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
67,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
86,
88
],
[
67,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
92,
94
],
[
89,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
97,
99
],
[
67,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
103,
105
],
[
100,
106
],
[
14,
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
],
[
12,
127
],
[
127,
128
],
[
0,
129
],
[
129,
130
],
[
129,
131
]
] | [
"import java.util.Scanner;\nimport java.math.*;\nimport java.text.*;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\t\tin.useDelimiter(\"[\\\\s*[,\\\\n]\\\\s*]\");\n\t\tint[] ls = new int[w];\n\t\tfor(int i=0; i<w; i++)\n\t\t\tls[i] = i+1;\n\t\tfor(int iter=0; iter<n; iter++){\n\t\t\tint a, b;\n\t\t\ta = in.nextInt();\n\t\t\tb = in.nextInt();\n\t\t\tint tmp = ls[a-1];\n\t\t\tls[a-1] = ls[b-1];\n\t\t\tls[b-1] = tmp;\n\t\t}\n\t\tfor(int iter=0; iter<w; iter++)\n\t\t\tSystem.out.println(ls[iter]);\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.math.*;",
"math.*",
"java",
"import java.text.*;",
"text.*",
"java",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\t\tin.useDelimiter(\"[\\\\s*[,\\\\n]\\\\s*]\");\n\t\tint[] ls = new int[w];\n\t\tfor(int i=0; i<w; i++)\n\t\t\tls[i] = i+1;\n\t\tfor(int iter=0; iter<n; iter++){\n\t\t\tint a, b;\n\t\t\ta = in.nextInt();\n\t\t\tb = in.nextInt();\n\t\t\tint tmp = ls[a-1];\n\t\t\tls[a-1] = ls[b-1];\n\t\t\tls[b-1] = tmp;\n\t\t}\n\t\tfor(int iter=0; iter<w; iter++)\n\t\t\tSystem.out.println(ls[iter]);\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\t\tin.useDelimiter(\"[\\\\s*[,\\\\n]\\\\s*]\");\n\t\tint[] ls = new int[w];\n\t\tfor(int i=0; i<w; i++)\n\t\t\tls[i] = i+1;\n\t\tfor(int iter=0; iter<n; iter++){\n\t\t\tint a, b;\n\t\t\ta = in.nextInt();\n\t\t\tb = in.nextInt();\n\t\t\tint tmp = ls[a-1];\n\t\t\tls[a-1] = ls[b-1];\n\t\t\tls[b-1] = tmp;\n\t\t}\n\t\tfor(int iter=0; iter<w; iter++)\n\t\t\tSystem.out.println(ls[iter]);\n\t}",
"main",
"{\n\t\tScanner in = new Scanner(System.in);\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\t\tin.useDelimiter(\"[\\\\s*[,\\\\n]\\\\s*]\");\n\t\tint[] ls = new int[w];\n\t\tfor(int i=0; i<w; i++)\n\t\t\tls[i] = i+1;\n\t\tfor(int iter=0; iter<n; iter++){\n\t\t\tint a, b;\n\t\t\ta = in.nextInt();\n\t\t\tb = in.nextInt();\n\t\t\tint tmp = ls[a-1];\n\t\t\tls[a-1] = ls[b-1];\n\t\t\tls[b-1] = tmp;\n\t\t}\n\t\tfor(int iter=0; iter<w; iter++)\n\t\t\tSystem.out.println(ls[iter]);\n\t}",
"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.useDelimiter(\"[\\\\s*[,\\\\n]\\\\s*]\")",
"in.useDelimiter",
"in",
"\"[\\\\s*[,\\\\n]\\\\s*]\"",
"int[] ls = new int[w];",
"ls",
"new int[w]",
"w",
"for(int i=0; i<w; i++)\n\t\t\tls[i] = i+1;",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"ls[i] = i+1;",
"ls[i] = i+1",
"ls[i]",
"ls",
"i",
"i+1",
"i",
"1",
"for(int iter=0; iter<n; iter++){\n\t\t\tint a, b;\n\t\t\ta = in.nextInt();\n\t\t\tb = in.nextInt();\n\t\t\tint tmp = ls[a-1];\n\t\t\tls[a-1] = ls[b-1];\n\t\t\tls[b-1] = tmp;\n\t\t}",
"int iter=0;",
"int iter=0;",
"iter",
"0",
"iter<n",
"iter",
"n",
"iter++",
"iter++",
"iter",
"{\n\t\t\tint a, b;\n\t\t\ta = in.nextInt();\n\t\t\tb = in.nextInt();\n\t\t\tint tmp = ls[a-1];\n\t\t\tls[a-1] = ls[b-1];\n\t\t\tls[b-1] = tmp;\n\t\t}",
"{\n\t\t\tint a, b;\n\t\t\ta = in.nextInt();\n\t\t\tb = in.nextInt();\n\t\t\tint tmp = ls[a-1];\n\t\t\tls[a-1] = ls[b-1];\n\t\t\tls[b-1] = tmp;\n\t\t}",
"int a",
"a",
"b;",
"b",
"a = in.nextInt()",
"a",
"in.nextInt()",
"in.nextInt",
"in",
"b = in.nextInt()",
"b",
"in.nextInt()",
"in.nextInt",
"in",
"int tmp = ls[a-1];",
"tmp",
"ls[a-1]",
"ls",
"a-1",
"a",
"1",
"ls[a-1] = ls[b-1]",
"ls[a-1]",
"ls",
"a-1",
"a",
"1",
"ls[b-1]",
"ls",
"b-1",
"b",
"1",
"ls[b-1] = tmp",
"ls[b-1]",
"ls",
"b-1",
"b",
"1",
"tmp",
"for(int iter=0; iter<w; iter++)\n\t\t\tSystem.out.println(ls[iter]);",
"int iter=0;",
"int iter=0;",
"iter",
"0",
"iter<w",
"iter",
"w",
"iter++",
"iter++",
"iter",
"System.out.println(ls[iter]);",
"System.out.println(ls[iter])",
"System.out.println",
"System.out",
"System",
"System.out",
"ls[iter]",
"ls",
"iter",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\t\tin.useDelimiter(\"[\\\\s*[,\\\\n]\\\\s*]\");\n\t\tint[] ls = new int[w];\n\t\tfor(int i=0; i<w; i++)\n\t\t\tls[i] = i+1;\n\t\tfor(int iter=0; iter<n; iter++){\n\t\t\tint a, b;\n\t\t\ta = in.nextInt();\n\t\t\tb = in.nextInt();\n\t\t\tint tmp = ls[a-1];\n\t\t\tls[a-1] = ls[b-1];\n\t\t\tls[b-1] = tmp;\n\t\t}\n\t\tfor(int iter=0; iter<w; iter++)\n\t\t\tSystem.out.println(ls[iter]);\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\t\tin.useDelimiter(\"[\\\\s*[,\\\\n]\\\\s*]\");\n\t\tint[] ls = new int[w];\n\t\tfor(int i=0; i<w; i++)\n\t\t\tls[i] = i+1;\n\t\tfor(int iter=0; iter<n; iter++){\n\t\t\tint a, b;\n\t\t\ta = in.nextInt();\n\t\t\tb = in.nextInt();\n\t\t\tint tmp = ls[a-1];\n\t\t\tls[a-1] = ls[b-1];\n\t\t\tls[b-1] = tmp;\n\t\t}\n\t\tfor(int iter=0; iter<w; iter++)\n\t\t\tSystem.out.println(ls[iter]);\n\t}\n\n}",
"Main"
] | import java.util.Scanner;
import java.math.*;
import java.text.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int w = in.nextInt();
int n = in.nextInt();
in.useDelimiter("[\\s*[,\\n]\\s*]");
int[] ls = new int[w];
for(int i=0; i<w; i++)
ls[i] = i+1;
for(int iter=0; iter<n; iter++){
int a, b;
a = in.nextInt();
b = in.nextInt();
int tmp = ls[a-1];
ls[a-1] = ls[b-1];
ls[b-1] = tmp;
}
for(int iter=0; iter<w; iter++)
System.out.println(ls[iter]);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
41,
13,
41,
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,
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
],
[
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
],
[
8,
24
],
[
24,
25
],
[
8,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
31,
32
],
[
31,
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
],
[
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
],
[
78,
81
],
[
81,
82
],
[
81,
83
],
[
64,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
89,
90
],
[
89,
91
],
[
64,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
94,
96
],
[
64,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
101,
102
],
[
101,
103
],
[
64,
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
],
[
121,
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 sc = new Scanner(System.in);\n int row = sc.nextInt();\n int n = sc.nextInt();\n int save, x, y;\n int[] ans = new int[row+1];\n for(int i=1; i<=row; i++) {\n ans[i] = i;\n }\n for(int i=0; i<n; i++) {\n String line = sc.next();\n String[] a = line.split(\",\");\n x = Integer.parseInt(a[0]);\n y = Integer.parseInt(a[1]);\n save = ans[x];\n ans[x] = ans[y];\n ans[y] = save;\n\n }\n for(int i=1; i<=row; i++) {\n System.out.println(ans[i]);\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 row = sc.nextInt();\n int n = sc.nextInt();\n int save, x, y;\n int[] ans = new int[row+1];\n for(int i=1; i<=row; i++) {\n ans[i] = i;\n }\n for(int i=0; i<n; i++) {\n String line = sc.next();\n String[] a = line.split(\",\");\n x = Integer.parseInt(a[0]);\n y = Integer.parseInt(a[1]);\n save = ans[x];\n ans[x] = ans[y];\n ans[y] = save;\n\n }\n for(int i=1; i<=row; i++) {\n System.out.println(ans[i]);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int row = sc.nextInt();\n int n = sc.nextInt();\n int save, x, y;\n int[] ans = new int[row+1];\n for(int i=1; i<=row; i++) {\n ans[i] = i;\n }\n for(int i=0; i<n; i++) {\n String line = sc.next();\n String[] a = line.split(\",\");\n x = Integer.parseInt(a[0]);\n y = Integer.parseInt(a[1]);\n save = ans[x];\n ans[x] = ans[y];\n ans[y] = save;\n\n }\n for(int i=1; i<=row; i++) {\n System.out.println(ans[i]);\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int row = sc.nextInt();\n int n = sc.nextInt();\n int save, x, y;\n int[] ans = new int[row+1];\n for(int i=1; i<=row; i++) {\n ans[i] = i;\n }\n for(int i=0; i<n; i++) {\n String line = sc.next();\n String[] a = line.split(\",\");\n x = Integer.parseInt(a[0]);\n y = Integer.parseInt(a[1]);\n save = ans[x];\n ans[x] = ans[y];\n ans[y] = save;\n\n }\n for(int i=1; i<=row; i++) {\n System.out.println(ans[i]);\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int row = sc.nextInt();",
"row",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int save",
"save",
"x",
"x",
"y;",
"y",
"int[] ans = new int[row+1];",
"ans",
"new int[row+1]",
"row+1",
"row",
"1",
"for(int i=1; i<=row; i++) {\n ans[i] = i;\n }",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=row",
"i",
"row",
"i++",
"i++",
"i",
"{\n ans[i] = i;\n }",
"{\n ans[i] = i;\n }",
"ans[i] = i",
"ans[i]",
"ans",
"i",
"i",
"for(int i=0; i<n; i++) {\n String line = sc.next();\n String[] a = line.split(\",\");\n x = Integer.parseInt(a[0]);\n y = Integer.parseInt(a[1]);\n save = ans[x];\n ans[x] = ans[y];\n ans[y] = save;\n\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String line = sc.next();\n String[] a = line.split(\",\");\n x = Integer.parseInt(a[0]);\n y = Integer.parseInt(a[1]);\n save = ans[x];\n ans[x] = ans[y];\n ans[y] = save;\n\n }",
"{\n String line = sc.next();\n String[] a = line.split(\",\");\n x = Integer.parseInt(a[0]);\n y = Integer.parseInt(a[1]);\n save = ans[x];\n ans[x] = ans[y];\n ans[y] = save;\n\n }",
"String line = sc.next();",
"line",
"sc.next()",
"sc.next",
"sc",
"String[] a = line.split(\",\");",
"a",
"line.split(\",\")",
"line.split",
"line",
"\",\"",
"x = Integer.parseInt(a[0])",
"x",
"Integer.parseInt(a[0])",
"Integer.parseInt",
"Integer",
"a[0]",
"a",
"0",
"y = Integer.parseInt(a[1])",
"y",
"Integer.parseInt(a[1])",
"Integer.parseInt",
"Integer",
"a[1]",
"a",
"1",
"save = ans[x]",
"save",
"ans[x]",
"ans",
"x",
"ans[x] = ans[y]",
"ans[x]",
"ans",
"x",
"ans[y]",
"ans",
"y",
"ans[y] = save",
"ans[y]",
"ans",
"y",
"save",
"for(int i=1; i<=row; i++) {\n System.out.println(ans[i]);\n }",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=row",
"i",
"row",
"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",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int row = sc.nextInt();\n int n = sc.nextInt();\n int save, x, y;\n int[] ans = new int[row+1];\n for(int i=1; i<=row; i++) {\n ans[i] = i;\n }\n for(int i=0; i<n; i++) {\n String line = sc.next();\n String[] a = line.split(\",\");\n x = Integer.parseInt(a[0]);\n y = Integer.parseInt(a[1]);\n save = ans[x];\n ans[x] = ans[y];\n ans[y] = save;\n\n }\n for(int i=1; i<=row; i++) {\n System.out.println(ans[i]);\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int row = sc.nextInt();\n int n = sc.nextInt();\n int save, x, y;\n int[] ans = new int[row+1];\n for(int i=1; i<=row; i++) {\n ans[i] = i;\n }\n for(int i=0; i<n; i++) {\n String line = sc.next();\n String[] a = line.split(\",\");\n x = Integer.parseInt(a[0]);\n y = Integer.parseInt(a[1]);\n save = ans[x];\n ans[x] = ans[y];\n ans[y] = save;\n\n }\n for(int i=1; i<=row; i++) {\n System.out.println(ans[i]);\n }\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int row = sc.nextInt();
int n = sc.nextInt();
int save, x, y;
int[] ans = new int[row+1];
for(int i=1; i<=row; i++) {
ans[i] = i;
}
for(int i=0; i<n; i++) {
String line = sc.next();
String[] a = line.split(",");
x = Integer.parseInt(a[0]);
y = Integer.parseInt(a[1]);
save = ans[x];
ans[x] = ans[y];
ans[y] = save;
}
for(int i=1; i<=row; i++) {
System.out.println(ans[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
13,
41,
13,
4,
18,
13,
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,
2,
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
],
[
15,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
18,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
25,
27
],
[
18,
28
],
[
28,
29
],
[
29,
30
],
[
18,
31
],
[
32,
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
],
[
44,
47
],
[
43,
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
],
[
61,
62
],
[
60,
63
],
[
63,
64
],
[
63,
65
],
[
59,
66
],
[
48,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
73,
74
],
[
73,
75
],
[
69,
76
],
[
48,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
79,
81
],
[
48,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
86,
88
],
[
48,
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
],
[
104,
105
],
[
104,
106
],
[
6,
107
],
[
107,
108
]
] | [
"import java.util.Scanner;\n\nclass Main {\n public static void main(String[] z) {\n Scanner sc = new Scanner(System.in);\n int[] l=new int[sc.nextInt()];\n for(int i=0;i<l.length;i++) {\n l[i]=i;\n }\n int n=sc.nextInt();\n while(n-->0) {\n String[] lines=sc.next().split(\",\");\n int a=Integer.parseInt(lines[0])-1;\n int b=Integer.parseInt(lines[1])-1;\n int temp=l[a];\n l[a]=l[b];\n l[b]=temp;\n }\n for(int i:l) {\n System.out.println(i+1);\n }\n }\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n public static void main(String[] z) {\n Scanner sc = new Scanner(System.in);\n int[] l=new int[sc.nextInt()];\n for(int i=0;i<l.length;i++) {\n l[i]=i;\n }\n int n=sc.nextInt();\n while(n-->0) {\n String[] lines=sc.next().split(\",\");\n int a=Integer.parseInt(lines[0])-1;\n int b=Integer.parseInt(lines[1])-1;\n int temp=l[a];\n l[a]=l[b];\n l[b]=temp;\n }\n for(int i:l) {\n System.out.println(i+1);\n }\n }\n}",
"Main",
"public static void main(String[] z) {\n Scanner sc = new Scanner(System.in);\n int[] l=new int[sc.nextInt()];\n for(int i=0;i<l.length;i++) {\n l[i]=i;\n }\n int n=sc.nextInt();\n while(n-->0) {\n String[] lines=sc.next().split(\",\");\n int a=Integer.parseInt(lines[0])-1;\n int b=Integer.parseInt(lines[1])-1;\n int temp=l[a];\n l[a]=l[b];\n l[b]=temp;\n }\n for(int i:l) {\n System.out.println(i+1);\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int[] l=new int[sc.nextInt()];\n for(int i=0;i<l.length;i++) {\n l[i]=i;\n }\n int n=sc.nextInt();\n while(n-->0) {\n String[] lines=sc.next().split(\",\");\n int a=Integer.parseInt(lines[0])-1;\n int b=Integer.parseInt(lines[1])-1;\n int temp=l[a];\n l[a]=l[b];\n l[b]=temp;\n }\n for(int i:l) {\n System.out.println(i+1);\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int[] l=new int[sc.nextInt()];",
"l",
"new int[sc.nextInt()]",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0;i<l.length;i++) {\n l[i]=i;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<l.length",
"i",
"l.length",
"l",
"l.length",
"i++",
"i++",
"i",
"{\n l[i]=i;\n }",
"{\n l[i]=i;\n }",
"l[i]=i",
"l[i]",
"l",
"i",
"i",
"int n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"while(n-->0) {\n String[] lines=sc.next().split(\",\");\n int a=Integer.parseInt(lines[0])-1;\n int b=Integer.parseInt(lines[1])-1;\n int temp=l[a];\n l[a]=l[b];\n l[b]=temp;\n }",
"n-->0",
"n--",
"n",
"0",
"{\n String[] lines=sc.next().split(\",\");\n int a=Integer.parseInt(lines[0])-1;\n int b=Integer.parseInt(lines[1])-1;\n int temp=l[a];\n l[a]=l[b];\n l[b]=temp;\n }",
"String[] lines=sc.next().split(\",\");",
"lines",
"sc.next().split(\",\")",
"sc.next().split",
"sc.next()",
"sc.next",
"sc",
"\",\"",
"int a=Integer.parseInt(lines[0])-1;",
"a",
"Integer.parseInt(lines[0])-1",
"Integer.parseInt(lines[0])",
"Integer.parseInt",
"Integer",
"lines[0]",
"lines",
"0",
"1",
"int b=Integer.parseInt(lines[1])-1;",
"b",
"Integer.parseInt(lines[1])-1",
"Integer.parseInt(lines[1])",
"Integer.parseInt",
"Integer",
"lines[1]",
"lines",
"1",
"1",
"int temp=l[a];",
"temp",
"l[a]",
"l",
"a",
"l[a]=l[b]",
"l[a]",
"l",
"a",
"l[b]",
"l",
"b",
"l[b]=temp",
"l[b]",
"l",
"b",
"temp",
"for(int i:l) {\n System.out.println(i+1);\n }",
"int i",
"l",
"{\n System.out.println(i+1);\n }",
"{\n System.out.println(i+1);\n }",
"System.out.println(i+1)",
"System.out.println",
"System.out",
"System",
"System.out",
"i+1",
"i",
"1",
"String[] z",
"z"
] | import java.util.Scanner;
class Main {
public static void main(String[] z) {
Scanner sc = new Scanner(System.in);
int[] l=new int[sc.nextInt()];
for(int i=0;i<l.length;i++) {
l[i]=i;
}
int n=sc.nextInt();
while(n-->0) {
String[] lines=sc.next().split(",");
int a=Integer.parseInt(lines[0])-1;
int b=Integer.parseInt(lines[1])-1;
int temp=l[a];
l[a]=l[b];
l[b]=temp;
}
for(int i:l) {
System.out.println(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,
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,
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,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
18,
18,
13,
13,
13,
13,
30,
0,
13,
18,
18,
13,
13,
2,
2,
13,
17,
17,
3,
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
],
[
153,
5
],
[
153,
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
],
[
38,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
8,
55
],
[
55,
56
],
[
55,
57
],
[
8,
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
],
[
71,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
80,
81
],
[
80,
82
],
[
75,
83
],
[
83,
84
],
[
84,
85
],
[
75,
86
],
[
87,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
93,
94
],
[
93,
95
],
[
88,
96
],
[
96,
97
],
[
97,
98
],
[
88,
99
],
[
100,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
102,
108
],
[
101,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
112,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
116,
120
],
[
109,
121
],
[
71,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
122,
126
],
[
8,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
127,
132
],
[
132,
133
],
[
132,
134
],
[
127,
135
],
[
135,
136
],
[
136,
137
],
[
127,
138
],
[
139,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
142,
144
],
[
140,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
145,
149
],
[
6,
150
],
[
150,
151
],
[
0,
152
],
[
152,
153
],
[
152,
154
]
] | [
"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 n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tint[][] c = new int[k][];\n\t\t\n\t\tfor(int i = 0; i < k; i++) {\n\t\t\tString s = sc.next();\n\t\t\tString[] ns = s.split(\",\");\n\t\t\tc[i] = new int[]{Integer.parseInt(ns[0]) - 1, Integer.parseInt(ns[1]) - 1};\n\t\t}\n\t\tint[] res = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tint ret = i;\n\t\t\tfor(int j = 0; j < k; j++) {\n\t\t\t\tfor(int l = 0; l < 2; l++) {\n\t\t\t\t\tif(c[j][l] == ret) {\n\t\t\t\t\t\tret = c[j][(l + 1) % 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tres[ret] = i;\n\t\t}\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(res[i] + 1);\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 n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tint[][] c = new int[k][];\n\t\t\n\t\tfor(int i = 0; i < k; i++) {\n\t\t\tString s = sc.next();\n\t\t\tString[] ns = s.split(\",\");\n\t\t\tc[i] = new int[]{Integer.parseInt(ns[0]) - 1, Integer.parseInt(ns[1]) - 1};\n\t\t}\n\t\tint[] res = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tint ret = i;\n\t\t\tfor(int j = 0; j < k; j++) {\n\t\t\t\tfor(int l = 0; l < 2; l++) {\n\t\t\t\t\tif(c[j][l] == ret) {\n\t\t\t\t\t\tret = c[j][(l + 1) % 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tres[ret] = i;\n\t\t}\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(res[i] + 1);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tint[][] c = new int[k][];\n\t\t\n\t\tfor(int i = 0; i < k; i++) {\n\t\t\tString s = sc.next();\n\t\t\tString[] ns = s.split(\",\");\n\t\t\tc[i] = new int[]{Integer.parseInt(ns[0]) - 1, Integer.parseInt(ns[1]) - 1};\n\t\t}\n\t\tint[] res = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tint ret = i;\n\t\t\tfor(int j = 0; j < k; j++) {\n\t\t\t\tfor(int l = 0; l < 2; l++) {\n\t\t\t\t\tif(c[j][l] == ret) {\n\t\t\t\t\t\tret = c[j][(l + 1) % 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tres[ret] = i;\n\t\t}\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(res[i] + 1);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tint[][] c = new int[k][];\n\t\t\n\t\tfor(int i = 0; i < k; i++) {\n\t\t\tString s = sc.next();\n\t\t\tString[] ns = s.split(\",\");\n\t\t\tc[i] = new int[]{Integer.parseInt(ns[0]) - 1, Integer.parseInt(ns[1]) - 1};\n\t\t}\n\t\tint[] res = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tint ret = i;\n\t\t\tfor(int j = 0; j < k; j++) {\n\t\t\t\tfor(int l = 0; l < 2; l++) {\n\t\t\t\t\tif(c[j][l] == ret) {\n\t\t\t\t\t\tret = c[j][(l + 1) % 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tres[ret] = i;\n\t\t}\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(res[i] + 1);\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[][] c = new int[k][];",
"c",
"new int[k][]",
"k",
"for(int i = 0; i < k; i++) {\n\t\t\tString s = sc.next();\n\t\t\tString[] ns = s.split(\",\");\n\t\t\tc[i] = new int[]{Integer.parseInt(ns[0]) - 1, Integer.parseInt(ns[1]) - 1};\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n\t\t\tString s = sc.next();\n\t\t\tString[] ns = s.split(\",\");\n\t\t\tc[i] = new int[]{Integer.parseInt(ns[0]) - 1, Integer.parseInt(ns[1]) - 1};\n\t\t}",
"{\n\t\t\tString s = sc.next();\n\t\t\tString[] ns = s.split(\",\");\n\t\t\tc[i] = new int[]{Integer.parseInt(ns[0]) - 1, Integer.parseInt(ns[1]) - 1};\n\t\t}",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String[] ns = s.split(\",\");",
"ns",
"s.split(\",\")",
"s.split",
"s",
"\",\"",
"c[i] = new int[]{Integer.parseInt(ns[0]) - 1, Integer.parseInt(ns[1]) - 1}",
"c[i]",
"c",
"i",
"new int[]{Integer.parseInt(ns[0]) - 1, Integer.parseInt(ns[1]) - 1}",
"int[] res = new int[n];",
"res",
"new int[n]",
"n",
"for(int i = 0; i < n; i++) {\n\t\t\tint ret = i;\n\t\t\tfor(int j = 0; j < k; j++) {\n\t\t\t\tfor(int l = 0; l < 2; l++) {\n\t\t\t\t\tif(c[j][l] == ret) {\n\t\t\t\t\t\tret = c[j][(l + 1) % 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tres[ret] = i;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint ret = i;\n\t\t\tfor(int j = 0; j < k; j++) {\n\t\t\t\tfor(int l = 0; l < 2; l++) {\n\t\t\t\t\tif(c[j][l] == ret) {\n\t\t\t\t\t\tret = c[j][(l + 1) % 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tres[ret] = i;\n\t\t}",
"{\n\t\t\tint ret = i;\n\t\t\tfor(int j = 0; j < k; j++) {\n\t\t\t\tfor(int l = 0; l < 2; l++) {\n\t\t\t\t\tif(c[j][l] == ret) {\n\t\t\t\t\t\tret = c[j][(l + 1) % 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tres[ret] = i;\n\t\t}",
"int ret = i;",
"ret",
"i",
"for(int j = 0; j < k; j++) {\n\t\t\t\tfor(int l = 0; l < 2; l++) {\n\t\t\t\t\tif(c[j][l] == ret) {\n\t\t\t\t\t\tret = c[j][(l + 1) % 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < k",
"j",
"k",
"j++",
"j++",
"j",
"{\n\t\t\t\tfor(int l = 0; l < 2; l++) {\n\t\t\t\t\tif(c[j][l] == ret) {\n\t\t\t\t\t\tret = c[j][(l + 1) % 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tfor(int l = 0; l < 2; l++) {\n\t\t\t\t\tif(c[j][l] == ret) {\n\t\t\t\t\t\tret = c[j][(l + 1) % 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"for(int l = 0; l < 2; l++) {\n\t\t\t\t\tif(c[j][l] == ret) {\n\t\t\t\t\t\tret = c[j][(l + 1) % 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"int l = 0;",
"int l = 0;",
"l",
"0",
"l < 2",
"l",
"2",
"l++",
"l++",
"l",
"{\n\t\t\t\t\tif(c[j][l] == ret) {\n\t\t\t\t\t\tret = c[j][(l + 1) % 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"{\n\t\t\t\t\tif(c[j][l] == ret) {\n\t\t\t\t\t\tret = c[j][(l + 1) % 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"if(c[j][l] == ret) {\n\t\t\t\t\t\tret = c[j][(l + 1) % 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"c[j][l] == ret",
"c[j][l]",
"c[j]",
"c",
"j",
"l",
"ret",
"{\n\t\t\t\t\t\tret = c[j][(l + 1) % 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"ret = c[j][(l + 1) % 2]",
"ret",
"c[j][(l + 1) % 2]",
"c[j]",
"c",
"j",
"(l + 1) % 2",
"(l + 1)",
"l",
"1",
"2",
"break;",
"res[ret] = i",
"res[ret]",
"res",
"ret",
"i",
"for(int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(res[i] + 1);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(res[i] + 1);\n\t\t}",
"{\n\t\t\tSystem.out.println(res[i] + 1);\n\t\t}",
"System.out.println(res[i] + 1)",
"System.out.println",
"System.out",
"System",
"System.out",
"res[i] + 1",
"res[i]",
"res",
"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 n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tint[][] c = new int[k][];\n\t\t\n\t\tfor(int i = 0; i < k; i++) {\n\t\t\tString s = sc.next();\n\t\t\tString[] ns = s.split(\",\");\n\t\t\tc[i] = new int[]{Integer.parseInt(ns[0]) - 1, Integer.parseInt(ns[1]) - 1};\n\t\t}\n\t\tint[] res = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tint ret = i;\n\t\t\tfor(int j = 0; j < k; j++) {\n\t\t\t\tfor(int l = 0; l < 2; l++) {\n\t\t\t\t\tif(c[j][l] == ret) {\n\t\t\t\t\t\tret = c[j][(l + 1) % 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tres[ret] = i;\n\t\t}\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(res[i] + 1);\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 n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tint[][] c = new int[k][];\n\t\t\n\t\tfor(int i = 0; i < k; i++) {\n\t\t\tString s = sc.next();\n\t\t\tString[] ns = s.split(\",\");\n\t\t\tc[i] = new int[]{Integer.parseInt(ns[0]) - 1, Integer.parseInt(ns[1]) - 1};\n\t\t}\n\t\tint[] res = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tint ret = i;\n\t\t\tfor(int j = 0; j < k; j++) {\n\t\t\t\tfor(int l = 0; l < 2; l++) {\n\t\t\t\t\tif(c[j][l] == ret) {\n\t\t\t\t\t\tret = c[j][(l + 1) % 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tres[ret] = i;\n\t\t}\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(res[i] + 1);\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 n = sc.nextInt();
int k = sc.nextInt();
int[][] c = new int[k][];
for(int i = 0; i < k; i++) {
String s = sc.next();
String[] ns = s.split(",");
c[i] = new int[]{Integer.parseInt(ns[0]) - 1, Integer.parseInt(ns[1]) - 1};
}
int[] res = new int[n];
for(int i = 0; i < n; i++) {
int ret = i;
for(int j = 0; j < k; j++) {
for(int l = 0; l < 2; l++) {
if(c[j][l] == ret) {
ret = c[j][(l + 1) % 2];
break;
}
}
}
res[ret] = i;
}
for(int i = 0; i < n; i++) {
System.out.println(res[i] + 1);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
4,
18,
20,
17,
41,
13,
41,
13,
41,
13,
41,
13,
0,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
0,
13,
4,
18,
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,
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
],
[
131,
5
],
[
131,
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
],
[
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
],
[
44,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
49,
51
],
[
8,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
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
],
[
69,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
84,
86
],
[
69,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
90,
92
],
[
87,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
95,
97
],
[
69,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
101,
103
],
[
98,
104
],
[
8,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
112,
114
],
[
105,
115
],
[
115,
116
],
[
116,
117
],
[
105,
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\npublic class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner cin = new Scanner(System.in).useDelimiter(\",|\\\\s+\");\n\n\t\tint a,b,t,n;\n\n\t\tn = cin.nextInt();\n\t\tint[] num = new int[n];\n\t\tfor(int i=0; i<n; i++)\n\t\t{\n\t\t\tnum[i] = i+1;\n\t\t}\n\t\t\n\t\tn = cin.nextInt();\n\t\tfor(int i=0; i<n; i++)\n\t\t{\n\t\t\ta = cin.nextInt();\n\t\t\tb = cin.nextInt();\n\t\t\t\n\t\t\tt=num[a-1]; num[a-1]=num[b-1]; num[b-1]=t;\n\t\t}\n\n\t\tfor(int i=0; i<num.length; i++)\n\t\t{\n\t\t\tSystem.out.println(num[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 cin = new Scanner(System.in).useDelimiter(\",|\\\\s+\");\n\n\t\tint a,b,t,n;\n\n\t\tn = cin.nextInt();\n\t\tint[] num = new int[n];\n\t\tfor(int i=0; i<n; i++)\n\t\t{\n\t\t\tnum[i] = i+1;\n\t\t}\n\t\t\n\t\tn = cin.nextInt();\n\t\tfor(int i=0; i<n; i++)\n\t\t{\n\t\t\ta = cin.nextInt();\n\t\t\tb = cin.nextInt();\n\t\t\t\n\t\t\tt=num[a-1]; num[a-1]=num[b-1]; num[b-1]=t;\n\t\t}\n\n\t\tfor(int i=0; i<num.length; i++)\n\t\t{\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args)\n\t{\n\t\tScanner cin = new Scanner(System.in).useDelimiter(\",|\\\\s+\");\n\n\t\tint a,b,t,n;\n\n\t\tn = cin.nextInt();\n\t\tint[] num = new int[n];\n\t\tfor(int i=0; i<n; i++)\n\t\t{\n\t\t\tnum[i] = i+1;\n\t\t}\n\t\t\n\t\tn = cin.nextInt();\n\t\tfor(int i=0; i<n; i++)\n\t\t{\n\t\t\ta = cin.nextInt();\n\t\t\tb = cin.nextInt();\n\t\t\t\n\t\t\tt=num[a-1]; num[a-1]=num[b-1]; num[b-1]=t;\n\t\t}\n\n\t\tfor(int i=0; i<num.length; i++)\n\t\t{\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner cin = new Scanner(System.in).useDelimiter(\",|\\\\s+\");\n\n\t\tint a,b,t,n;\n\n\t\tn = cin.nextInt();\n\t\tint[] num = new int[n];\n\t\tfor(int i=0; i<n; i++)\n\t\t{\n\t\t\tnum[i] = i+1;\n\t\t}\n\t\t\n\t\tn = cin.nextInt();\n\t\tfor(int i=0; i<n; i++)\n\t\t{\n\t\t\ta = cin.nextInt();\n\t\t\tb = cin.nextInt();\n\t\t\t\n\t\t\tt=num[a-1]; num[a-1]=num[b-1]; num[b-1]=t;\n\t\t}\n\n\t\tfor(int i=0; i<num.length; i++)\n\t\t{\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\t}",
"Scanner cin = new Scanner(System.in).useDelimiter(\",|\\\\s+\");",
"cin",
"new Scanner(System.in).useDelimiter(\",|\\\\s+\")",
"new Scanner(System.in).useDelimiter",
"new Scanner(System.in)",
"\",|\\\\s+\"",
"int a",
"a",
"b",
"b",
"t",
"t",
"n;",
"n",
"n = cin.nextInt()",
"n",
"cin.nextInt()",
"cin.nextInt",
"cin",
"int[] num = new int[n];",
"num",
"new int[n]",
"n",
"for(int i=0; i<n; i++)\n\t\t{\n\t\t\tnum[i] = i+1;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"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",
"n = cin.nextInt()",
"n",
"cin.nextInt()",
"cin.nextInt",
"cin",
"for(int i=0; i<n; i++)\n\t\t{\n\t\t\ta = cin.nextInt();\n\t\t\tb = cin.nextInt();\n\t\t\t\n\t\t\tt=num[a-1]; num[a-1]=num[b-1]; num[b-1]=t;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\ta = cin.nextInt();\n\t\t\tb = cin.nextInt();\n\t\t\t\n\t\t\tt=num[a-1]; num[a-1]=num[b-1]; num[b-1]=t;\n\t\t}",
"{\n\t\t\ta = cin.nextInt();\n\t\t\tb = cin.nextInt();\n\t\t\t\n\t\t\tt=num[a-1]; num[a-1]=num[b-1]; num[b-1]=t;\n\t\t}",
"a = cin.nextInt()",
"a",
"cin.nextInt()",
"cin.nextInt",
"cin",
"b = cin.nextInt()",
"b",
"cin.nextInt()",
"cin.nextInt",
"cin",
"t=num[a-1]",
"t",
"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]=t",
"num[b-1]",
"num",
"b-1",
"b",
"1",
"t",
"for(int i=0; i<num.length; i++)\n\t\t{\n\t\t\tSystem.out.println(num[i]);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<num.length",
"i",
"num.length",
"num",
"num.length",
"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",
"String[] args",
"args",
"public class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner cin = new Scanner(System.in).useDelimiter(\",|\\\\s+\");\n\n\t\tint a,b,t,n;\n\n\t\tn = cin.nextInt();\n\t\tint[] num = new int[n];\n\t\tfor(int i=0; i<n; i++)\n\t\t{\n\t\t\tnum[i] = i+1;\n\t\t}\n\t\t\n\t\tn = cin.nextInt();\n\t\tfor(int i=0; i<n; i++)\n\t\t{\n\t\t\ta = cin.nextInt();\n\t\t\tb = cin.nextInt();\n\t\t\t\n\t\t\tt=num[a-1]; num[a-1]=num[b-1]; num[b-1]=t;\n\t\t}\n\n\t\tfor(int i=0; i<num.length; i++)\n\t\t{\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\t}\n}",
"public class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner cin = new Scanner(System.in).useDelimiter(\",|\\\\s+\");\n\n\t\tint a,b,t,n;\n\n\t\tn = cin.nextInt();\n\t\tint[] num = new int[n];\n\t\tfor(int i=0; i<n; i++)\n\t\t{\n\t\t\tnum[i] = i+1;\n\t\t}\n\t\t\n\t\tn = cin.nextInt();\n\t\tfor(int i=0; i<n; i++)\n\t\t{\n\t\t\ta = cin.nextInt();\n\t\t\tb = cin.nextInt();\n\t\t\t\n\t\t\tt=num[a-1]; num[a-1]=num[b-1]; num[b-1]=t;\n\t\t}\n\n\t\tfor(int i=0; i<num.length; i++)\n\t\t{\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner cin = new Scanner(System.in).useDelimiter(",|\\s+");
int a,b,t,n;
n = cin.nextInt();
int[] num = new int[n];
for(int i=0; i<n; i++)
{
num[i] = i+1;
}
n = cin.nextInt();
for(int i=0; i<n; i++)
{
a = cin.nextInt();
b = cin.nextInt();
t=num[a-1]; num[a-1]=num[b-1]; num[b-1]=t;
}
for(int i=0; i<num.length; i++)
{
System.out.println(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,
17,
41,
13,
20,
17,
41,
13,
20,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
41,
13,
42,
2,
13,
13,
30,
0,
18,
13,
13,
2,
13,
17,
40,
13,
42,
2,
13,
13,
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,
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,
42,
2,
13,
13,
30,
4,
18,
18,
13,
13,
17,
18,
13,
13,
40,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
154,
8
],
[
154,
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
],
[
37,
39
],
[
11,
40
],
[
40,
41
],
[
40,
42
],
[
11,
43
],
[
43,
44
],
[
43,
45
],
[
11,
46
],
[
46,
47
],
[
11,
48
],
[
48,
49
],
[
11,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
59,
61
],
[
54,
62
],
[
62,
63
],
[
11,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
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
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
87,
88
],
[
87,
89
],
[
68,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
97,
98
],
[
97,
99
],
[
68,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
68,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
112,
116
],
[
109,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
119,
123
],
[
68,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
127,
131
],
[
124,
132
],
[
68,
133
],
[
133,
134
],
[
11,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
135,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
142,
144
],
[
140,
145
],
[
140,
146
],
[
146,
147
],
[
146,
148
],
[
139,
149
],
[
149,
150
],
[
9,
151
],
[
151,
152
],
[
0,
153
],
[
153,
154
],
[
153,
155
]
] | [
"import java.io.*;\nimport java.util.Scanner;\npublic class Main{ \n public static void main(String[]args){ \n Scanner sc = new Scanner(System.in);\nint w = sc.nextInt(); \nint n= sc.nextInt();\n int [] a = new int[30];\n int [] b = new int[30];\n int [] S = new int[30];\n int i=0,j=0,k=0,p,q;\n while(j<w){\n S[j]=j + 1;\n j++;\n }\n while(i<n){\n String str = sc.next(); \n String[] ab = str.split(\",\"); \n a[i] = Integer.parseInt(ab[0]);\n b[i] = Integer.parseInt(ab[1]);\n p=S[a[i]-1];\n S[a[i]-1]=S[b[i]-1];\n S[b[i]-1]=p;\n i++;\n }\n while(k<w){\n System.out.printf(\"%d\\n\",S[k]);\n k++;\n }\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{ \n public static void main(String[]args){ \n Scanner sc = new Scanner(System.in);\nint w = sc.nextInt(); \nint n= sc.nextInt();\n int [] a = new int[30];\n int [] b = new int[30];\n int [] S = new int[30];\n int i=0,j=0,k=0,p,q;\n while(j<w){\n S[j]=j + 1;\n j++;\n }\n while(i<n){\n String str = sc.next(); \n String[] ab = str.split(\",\"); \n a[i] = Integer.parseInt(ab[0]);\n b[i] = Integer.parseInt(ab[1]);\n p=S[a[i]-1];\n S[a[i]-1]=S[b[i]-1];\n S[b[i]-1]=p;\n i++;\n }\n while(k<w){\n System.out.printf(\"%d\\n\",S[k]);\n k++;\n }\n }\n}",
"Main",
"public static void main(String[]args){ \n Scanner sc = new Scanner(System.in);\nint w = sc.nextInt(); \nint n= sc.nextInt();\n int [] a = new int[30];\n int [] b = new int[30];\n int [] S = new int[30];\n int i=0,j=0,k=0,p,q;\n while(j<w){\n S[j]=j + 1;\n j++;\n }\n while(i<n){\n String str = sc.next(); \n String[] ab = str.split(\",\"); \n a[i] = Integer.parseInt(ab[0]);\n b[i] = Integer.parseInt(ab[1]);\n p=S[a[i]-1];\n S[a[i]-1]=S[b[i]-1];\n S[b[i]-1]=p;\n i++;\n }\n while(k<w){\n System.out.printf(\"%d\\n\",S[k]);\n k++;\n }\n }",
"main",
"{ \n Scanner sc = new Scanner(System.in);\nint w = sc.nextInt(); \nint n= sc.nextInt();\n int [] a = new int[30];\n int [] b = new int[30];\n int [] S = new int[30];\n int i=0,j=0,k=0,p,q;\n while(j<w){\n S[j]=j + 1;\n j++;\n }\n while(i<n){\n String str = sc.next(); \n String[] ab = str.split(\",\"); \n a[i] = Integer.parseInt(ab[0]);\n b[i] = Integer.parseInt(ab[1]);\n p=S[a[i]-1];\n S[a[i]-1]=S[b[i]-1];\n S[b[i]-1]=p;\n i++;\n }\n while(k<w){\n System.out.printf(\"%d\\n\",S[k]);\n k++;\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 [] a = new int[30];",
"a",
"new int[30]",
"30",
"int [] b = new int[30];",
"b",
"new int[30]",
"30",
"int [] S = new int[30];",
"S",
"new int[30]",
"30",
"int i=0",
"i",
"0",
"j=0",
"j",
"0",
"k=0",
"k",
"0",
"p",
"p",
"q;",
"q",
"while(j<w){\n S[j]=j + 1;\n j++;\n }",
"j<w",
"j",
"w",
"{\n S[j]=j + 1;\n j++;\n }",
"S[j]=j + 1",
"S[j]",
"S",
"j",
"j + 1",
"j",
"1",
"j++",
"j",
"while(i<n){\n String str = sc.next(); \n String[] ab = str.split(\",\"); \n a[i] = Integer.parseInt(ab[0]);\n b[i] = Integer.parseInt(ab[1]);\n p=S[a[i]-1];\n S[a[i]-1]=S[b[i]-1];\n S[b[i]-1]=p;\n i++;\n }",
"i<n",
"i",
"n",
"{\n String str = sc.next(); \n String[] ab = str.split(\",\"); \n a[i] = Integer.parseInt(ab[0]);\n b[i] = Integer.parseInt(ab[1]);\n p=S[a[i]-1];\n S[a[i]-1]=S[b[i]-1];\n S[b[i]-1]=p;\n i++;\n }",
"String str = sc.next();",
"str",
"sc.next()",
"sc.next",
"sc",
"String[] ab = str.split(\",\");",
"ab",
"str.split(\",\")",
"str.split",
"str",
"\",\"",
"a[i] = Integer.parseInt(ab[0])",
"a[i]",
"a",
"i",
"Integer.parseInt(ab[0])",
"Integer.parseInt",
"Integer",
"ab[0]",
"ab",
"0",
"b[i] = Integer.parseInt(ab[1])",
"b[i]",
"b",
"i",
"Integer.parseInt(ab[1])",
"Integer.parseInt",
"Integer",
"ab[1]",
"ab",
"1",
"p=S[a[i]-1]",
"p",
"S[a[i]-1]",
"S",
"a[i]-1",
"a[i]",
"a",
"i",
"1",
"S[a[i]-1]=S[b[i]-1]",
"S[a[i]-1]",
"S",
"a[i]-1",
"a[i]",
"a",
"i",
"1",
"S[b[i]-1]",
"S",
"b[i]-1",
"b[i]",
"b",
"i",
"1",
"S[b[i]-1]=p",
"S[b[i]-1]",
"S",
"b[i]-1",
"b[i]",
"b",
"i",
"1",
"p",
"i++",
"i",
"while(k<w){\n System.out.printf(\"%d\\n\",S[k]);\n k++;\n }",
"k<w",
"k",
"w",
"{\n System.out.printf(\"%d\\n\",S[k]);\n k++;\n }",
"System.out.printf(\"%d\\n\",S[k])",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%d\\n\"",
"S[k]",
"S",
"k",
"k++",
"k",
"String[]args",
"args",
"public class Main{ \n public static void main(String[]args){ \n Scanner sc = new Scanner(System.in);\nint w = sc.nextInt(); \nint n= sc.nextInt();\n int [] a = new int[30];\n int [] b = new int[30];\n int [] S = new int[30];\n int i=0,j=0,k=0,p,q;\n while(j<w){\n S[j]=j + 1;\n j++;\n }\n while(i<n){\n String str = sc.next(); \n String[] ab = str.split(\",\"); \n a[i] = Integer.parseInt(ab[0]);\n b[i] = Integer.parseInt(ab[1]);\n p=S[a[i]-1];\n S[a[i]-1]=S[b[i]-1];\n S[b[i]-1]=p;\n i++;\n }\n while(k<w){\n System.out.printf(\"%d\\n\",S[k]);\n k++;\n }\n }\n}",
"public class Main{ \n public static void main(String[]args){ \n Scanner sc = new Scanner(System.in);\nint w = sc.nextInt(); \nint n= sc.nextInt();\n int [] a = new int[30];\n int [] b = new int[30];\n int [] S = new int[30];\n int i=0,j=0,k=0,p,q;\n while(j<w){\n S[j]=j + 1;\n j++;\n }\n while(i<n){\n String str = sc.next(); \n String[] ab = str.split(\",\"); \n a[i] = Integer.parseInt(ab[0]);\n b[i] = Integer.parseInt(ab[1]);\n p=S[a[i]-1];\n S[a[i]-1]=S[b[i]-1];\n S[b[i]-1]=p;\n i++;\n }\n while(k<w){\n System.out.printf(\"%d\\n\",S[k]);\n k++;\n }\n }\n}",
"Main"
] | import java.io.*;
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[30];
int [] b = new int[30];
int [] S = new int[30];
int i=0,j=0,k=0,p,q;
while(j<w){
S[j]=j + 1;
j++;
}
while(i<n){
String str = sc.next();
String[] ab = str.split(",");
a[i] = Integer.parseInt(ab[0]);
b[i] = Integer.parseInt(ab[1]);
p=S[a[i]-1];
S[a[i]-1]=S[b[i]-1];
S[b[i]-1]=p;
i++;
}
while(k<w){
System.out.printf("%d\n",S[k]);
k++;
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
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,
41,
13,
41,
13,
20,
17,
41,
13,
41,
13,
0,
13,
17,
0,
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,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
40,
13,
40,
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,
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
],
[
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
],
[
8,
52
],
[
52,
53
],
[
52,
54
],
[
8,
56
],
[
56,
57
],
[
8,
58
],
[
58,
59
],
[
8,
60
],
[
60,
61
],
[
60,
62
],
[
8,
63
],
[
63,
64
],
[
63,
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
],
[
78,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
86,
90
],
[
78,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
96,
97
],
[
96,
98
],
[
78,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
102,
103
],
[
101,
104
],
[
104,
105
],
[
104,
106
],
[
78,
107
],
[
107,
108
],
[
78,
109
],
[
109,
110
],
[
78,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
113,
115
],
[
78,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
116,
120
],
[
120,
121
],
[
120,
122
],
[
78,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
123,
127
],
[
8,
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
],
[
6,
149
],
[
149,
150
],
[
0,
151
],
[
151,
152
],
[
151,
153
]
] | [
"import java.util.Scanner;\npublic class Main {\n public static void main(String[] args) {\n\n Scanner scan = new Scanner(System.in);\n int w,n;\n w = scan.nextInt();\n n = scan.nextInt();\n int[] x = new int[w];\n for(int i=0;i<w;i++){\n x[i]=i+1;\n }\n String str;\n String[] num = new String[2];\n int a,b;\n a=0;\n b=0;\n for(int i=0;i<n;i++){\n str = scan.next();\n num = str.split(\",\",0);\n a = Integer.parseInt(num[0]);\n b = Integer.parseInt(num[1]);\n a--;\n b--;\n int c = x[a];\n x[a]=x[b];\n x[b]=c;\n }\n for(int i=0;i<w;i++){\n System.out.println(x[i]);\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n\n Scanner scan = new Scanner(System.in);\n int w,n;\n w = scan.nextInt();\n n = scan.nextInt();\n int[] x = new int[w];\n for(int i=0;i<w;i++){\n x[i]=i+1;\n }\n String str;\n String[] num = new String[2];\n int a,b;\n a=0;\n b=0;\n for(int i=0;i<n;i++){\n str = scan.next();\n num = str.split(\",\",0);\n a = Integer.parseInt(num[0]);\n b = Integer.parseInt(num[1]);\n a--;\n b--;\n int c = x[a];\n x[a]=x[b];\n x[b]=c;\n }\n for(int i=0;i<w;i++){\n System.out.println(x[i]);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n\n Scanner scan = new Scanner(System.in);\n int w,n;\n w = scan.nextInt();\n n = scan.nextInt();\n int[] x = new int[w];\n for(int i=0;i<w;i++){\n x[i]=i+1;\n }\n String str;\n String[] num = new String[2];\n int a,b;\n a=0;\n b=0;\n for(int i=0;i<n;i++){\n str = scan.next();\n num = str.split(\",\",0);\n a = Integer.parseInt(num[0]);\n b = Integer.parseInt(num[1]);\n a--;\n b--;\n int c = x[a];\n x[a]=x[b];\n x[b]=c;\n }\n for(int i=0;i<w;i++){\n System.out.println(x[i]);\n }\n }",
"main",
"{\n\n Scanner scan = new Scanner(System.in);\n int w,n;\n w = scan.nextInt();\n n = scan.nextInt();\n int[] x = new int[w];\n for(int i=0;i<w;i++){\n x[i]=i+1;\n }\n String str;\n String[] num = new String[2];\n int a,b;\n a=0;\n b=0;\n for(int i=0;i<n;i++){\n str = scan.next();\n num = str.split(\",\",0);\n a = Integer.parseInt(num[0]);\n b = Integer.parseInt(num[1]);\n a--;\n b--;\n int c = x[a];\n x[a]=x[b];\n x[b]=c;\n }\n for(int i=0;i<w;i++){\n System.out.println(x[i]);\n }\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int w",
"w",
"n;",
"n",
"w = scan.nextInt()",
"w",
"scan.nextInt()",
"scan.nextInt",
"scan",
"n = scan.nextInt()",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int[] x = new int[w];",
"x",
"new int[w]",
"w",
"for(int i=0;i<w;i++){\n x[i]=i+1;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"{\n x[i]=i+1;\n }",
"{\n x[i]=i+1;\n }",
"x[i]=i+1",
"x[i]",
"x",
"i",
"i+1",
"i",
"1",
"String str;",
"str",
"String[] num = new String[2];",
"num",
"new String[2]",
"2",
"int a",
"a",
"b;",
"b",
"a=0",
"a",
"0",
"b=0",
"b",
"0",
"for(int i=0;i<n;i++){\n str = scan.next();\n num = str.split(\",\",0);\n a = Integer.parseInt(num[0]);\n b = Integer.parseInt(num[1]);\n a--;\n b--;\n int c = x[a];\n x[a]=x[b];\n x[b]=c;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n str = scan.next();\n num = str.split(\",\",0);\n a = Integer.parseInt(num[0]);\n b = Integer.parseInt(num[1]);\n a--;\n b--;\n int c = x[a];\n x[a]=x[b];\n x[b]=c;\n }",
"{\n str = scan.next();\n num = str.split(\",\",0);\n a = Integer.parseInt(num[0]);\n b = Integer.parseInt(num[1]);\n a--;\n b--;\n int c = x[a];\n x[a]=x[b];\n x[b]=c;\n }",
"str = scan.next()",
"str",
"scan.next()",
"scan.next",
"scan",
"num = str.split(\",\",0)",
"num",
"str.split(\",\",0)",
"str.split",
"str",
"\",\"",
"0",
"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",
"a--",
"a",
"b--",
"b",
"int c = x[a];",
"c",
"x[a]",
"x",
"a",
"x[a]=x[b]",
"x[a]",
"x",
"a",
"x[b]",
"x",
"b",
"x[b]=c",
"x[b]",
"x",
"b",
"c",
"for(int i=0;i<w;i++){\n System.out.println(x[i]);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"{\n System.out.println(x[i]);\n }",
"{\n System.out.println(x[i]);\n }",
"System.out.println(x[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"x[i]",
"x",
"i",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n\n Scanner scan = new Scanner(System.in);\n int w,n;\n w = scan.nextInt();\n n = scan.nextInt();\n int[] x = new int[w];\n for(int i=0;i<w;i++){\n x[i]=i+1;\n }\n String str;\n String[] num = new String[2];\n int a,b;\n a=0;\n b=0;\n for(int i=0;i<n;i++){\n str = scan.next();\n num = str.split(\",\",0);\n a = Integer.parseInt(num[0]);\n b = Integer.parseInt(num[1]);\n a--;\n b--;\n int c = x[a];\n x[a]=x[b];\n x[b]=c;\n }\n for(int i=0;i<w;i++){\n System.out.println(x[i]);\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n\n Scanner scan = new Scanner(System.in);\n int w,n;\n w = scan.nextInt();\n n = scan.nextInt();\n int[] x = new int[w];\n for(int i=0;i<w;i++){\n x[i]=i+1;\n }\n String str;\n String[] num = new String[2];\n int a,b;\n a=0;\n b=0;\n for(int i=0;i<n;i++){\n str = scan.next();\n num = str.split(\",\",0);\n a = Integer.parseInt(num[0]);\n b = Integer.parseInt(num[1]);\n a--;\n b--;\n int c = x[a];\n x[a]=x[b];\n x[b]=c;\n }\n for(int i=0;i<w;i++){\n System.out.println(x[i]);\n }\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;
w = scan.nextInt();
n = scan.nextInt();
int[] x = new int[w];
for(int i=0;i<w;i++){
x[i]=i+1;
}
String str;
String[] num = new String[2];
int a,b;
a=0;
b=0;
for(int i=0;i<n;i++){
str = scan.next();
num = str.split(",",0);
a = Integer.parseInt(num[0]);
b = Integer.parseInt(num[1]);
a--;
b--;
int c = x[a];
x[a]=x[b];
x[b]=c;
}
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,
4,
18,
13,
41,
13,
20,
2,
13,
17,
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,
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,
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,
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
],
[
168,
5
],
[
168,
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
],
[
28,
30
],
[
8,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
38,
39
],
[
38,
40
],
[
33,
41
],
[
41,
42
],
[
42,
43
],
[
33,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
48,
53
],
[
45,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
54,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
63,
64
],
[
63,
65
],
[
45,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
66,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
75,
76
],
[
75,
77
],
[
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
],
[
90,
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
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
107,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
118,
122
],
[
107,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
126,
130
],
[
123,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
134,
138
],
[
90,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
139,
143
],
[
8,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
144,
149
],
[
149,
150
],
[
149,
151
],
[
144,
152
],
[
152,
153
],
[
153,
154
],
[
144,
155
],
[
156,
156
],
[
156,
157
],
[
157,
158
],
[
158,
159
],
[
159,
160
],
[
159,
161
],
[
157,
162
],
[
162,
163
],
[
162,
164
],
[
6,
165
],
[
165,
166
],
[
0,
167
],
[
167,
168
],
[
167,
169
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String args[]){\n\t\tScanner in = new Scanner(System.in);\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\t\tint end[] = new int [w + 1];\n\t\tint change[][] = new int [n][2];\n\t\tfor(int i = 0;i < n;i++){\n\t\t\tString[] num = in.next().split(\",\");\n\t\t\tchange[i][0] = Integer.valueOf(num[0]);\n\t\t\tchange[i][1] = Integer.valueOf(num[1]);\n\t\t}\n\t\tfor(int i = 1;i <= w;i++){\n\t\t\tint ans = i;\n\t\t\tfor(int j = 0;j < n;j++){\n\t\t\t\tif(ans == change[j][0]){\n\t\t\t\t\tans = change[j][1];\n\t\t\t\t}else if(ans == change[j][1]){\n\t\t\t\t\tans = change[j][0];\n\t\t\t\t}\n\t\t\t}\n\t\t\tend[ans] = i;\n\t\t}\n\t\tfor(int i = 1;i <= w;i++){\n\t\t\tSystem.out.println(end[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 in = new Scanner(System.in);\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\t\tint end[] = new int [w + 1];\n\t\tint change[][] = new int [n][2];\n\t\tfor(int i = 0;i < n;i++){\n\t\t\tString[] num = in.next().split(\",\");\n\t\t\tchange[i][0] = Integer.valueOf(num[0]);\n\t\t\tchange[i][1] = Integer.valueOf(num[1]);\n\t\t}\n\t\tfor(int i = 1;i <= w;i++){\n\t\t\tint ans = i;\n\t\t\tfor(int j = 0;j < n;j++){\n\t\t\t\tif(ans == change[j][0]){\n\t\t\t\t\tans = change[j][1];\n\t\t\t\t}else if(ans == change[j][1]){\n\t\t\t\t\tans = change[j][0];\n\t\t\t\t}\n\t\t\t}\n\t\t\tend[ans] = i;\n\t\t}\n\t\tfor(int i = 1;i <= w;i++){\n\t\t\tSystem.out.println(end[i]);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String args[]){\n\t\tScanner in = new Scanner(System.in);\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\t\tint end[] = new int [w + 1];\n\t\tint change[][] = new int [n][2];\n\t\tfor(int i = 0;i < n;i++){\n\t\t\tString[] num = in.next().split(\",\");\n\t\t\tchange[i][0] = Integer.valueOf(num[0]);\n\t\t\tchange[i][1] = Integer.valueOf(num[1]);\n\t\t}\n\t\tfor(int i = 1;i <= w;i++){\n\t\t\tint ans = i;\n\t\t\tfor(int j = 0;j < n;j++){\n\t\t\t\tif(ans == change[j][0]){\n\t\t\t\t\tans = change[j][1];\n\t\t\t\t}else if(ans == change[j][1]){\n\t\t\t\t\tans = change[j][0];\n\t\t\t\t}\n\t\t\t}\n\t\t\tend[ans] = i;\n\t\t}\n\t\tfor(int i = 1;i <= w;i++){\n\t\t\tSystem.out.println(end[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner in = new Scanner(System.in);\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\t\tint end[] = new int [w + 1];\n\t\tint change[][] = new int [n][2];\n\t\tfor(int i = 0;i < n;i++){\n\t\t\tString[] num = in.next().split(\",\");\n\t\t\tchange[i][0] = Integer.valueOf(num[0]);\n\t\t\tchange[i][1] = Integer.valueOf(num[1]);\n\t\t}\n\t\tfor(int i = 1;i <= w;i++){\n\t\t\tint ans = i;\n\t\t\tfor(int j = 0;j < n;j++){\n\t\t\t\tif(ans == change[j][0]){\n\t\t\t\t\tans = change[j][1];\n\t\t\t\t}else if(ans == change[j][1]){\n\t\t\t\t\tans = change[j][0];\n\t\t\t\t}\n\t\t\t}\n\t\t\tend[ans] = i;\n\t\t}\n\t\tfor(int i = 1;i <= w;i++){\n\t\t\tSystem.out.println(end[i]);\n\t\t}\n\t}",
"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",
"int end[] = new int [w + 1];",
"end",
"new int [w + 1]",
"w + 1",
"w",
"1",
"int change[][] = new int [n][2];",
"change",
"new int [n][2]",
"n",
"2",
"for(int i = 0;i < n;i++){\n\t\t\tString[] num = in.next().split(\",\");\n\t\t\tchange[i][0] = Integer.valueOf(num[0]);\n\t\t\tchange[i][1] = Integer.valueOf(num[1]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString[] num = in.next().split(\",\");\n\t\t\tchange[i][0] = Integer.valueOf(num[0]);\n\t\t\tchange[i][1] = Integer.valueOf(num[1]);\n\t\t}",
"{\n\t\t\tString[] num = in.next().split(\",\");\n\t\t\tchange[i][0] = Integer.valueOf(num[0]);\n\t\t\tchange[i][1] = Integer.valueOf(num[1]);\n\t\t}",
"String[] num = in.next().split(\",\");",
"num",
"in.next().split(\",\")",
"in.next().split",
"in.next()",
"in.next",
"in",
"\",\"",
"change[i][0] = Integer.valueOf(num[0])",
"change[i][0]",
"change[i]",
"change",
"i",
"0",
"Integer.valueOf(num[0])",
"Integer.valueOf",
"Integer",
"num[0]",
"num",
"0",
"change[i][1] = Integer.valueOf(num[1])",
"change[i][1]",
"change[i]",
"change",
"i",
"1",
"Integer.valueOf(num[1])",
"Integer.valueOf",
"Integer",
"num[1]",
"num",
"1",
"for(int i = 1;i <= w;i++){\n\t\t\tint ans = i;\n\t\t\tfor(int j = 0;j < n;j++){\n\t\t\t\tif(ans == change[j][0]){\n\t\t\t\t\tans = change[j][1];\n\t\t\t\t}else if(ans == change[j][1]){\n\t\t\t\t\tans = change[j][0];\n\t\t\t\t}\n\t\t\t}\n\t\t\tend[ans] = i;\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tint ans = i;\n\t\t\tfor(int j = 0;j < n;j++){\n\t\t\t\tif(ans == change[j][0]){\n\t\t\t\t\tans = change[j][1];\n\t\t\t\t}else if(ans == change[j][1]){\n\t\t\t\t\tans = change[j][0];\n\t\t\t\t}\n\t\t\t}\n\t\t\tend[ans] = i;\n\t\t}",
"{\n\t\t\tint ans = i;\n\t\t\tfor(int j = 0;j < n;j++){\n\t\t\t\tif(ans == change[j][0]){\n\t\t\t\t\tans = change[j][1];\n\t\t\t\t}else if(ans == change[j][1]){\n\t\t\t\t\tans = change[j][0];\n\t\t\t\t}\n\t\t\t}\n\t\t\tend[ans] = i;\n\t\t}",
"int ans = i;",
"ans",
"i",
"for(int j = 0;j < n;j++){\n\t\t\t\tif(ans == change[j][0]){\n\t\t\t\t\tans = change[j][1];\n\t\t\t\t}else if(ans == change[j][1]){\n\t\t\t\t\tans = change[j][0];\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(ans == change[j][0]){\n\t\t\t\t\tans = change[j][1];\n\t\t\t\t}else if(ans == change[j][1]){\n\t\t\t\t\tans = change[j][0];\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(ans == change[j][0]){\n\t\t\t\t\tans = change[j][1];\n\t\t\t\t}else if(ans == change[j][1]){\n\t\t\t\t\tans = change[j][0];\n\t\t\t\t}\n\t\t\t}",
"if(ans == change[j][0]){\n\t\t\t\t\tans = change[j][1];\n\t\t\t\t}else if(ans == change[j][1]){\n\t\t\t\t\tans = change[j][0];\n\t\t\t\t}",
"ans == change[j][0]",
"ans",
"change[j][0]",
"change[j]",
"change",
"j",
"0",
"{\n\t\t\t\t\tans = change[j][1];\n\t\t\t\t}",
"ans = change[j][1]",
"ans",
"change[j][1]",
"change[j]",
"change",
"j",
"1",
"if(ans == change[j][1]){\n\t\t\t\t\tans = change[j][0];\n\t\t\t\t}",
"ans == change[j][1]",
"ans",
"change[j][1]",
"change[j]",
"change",
"j",
"1",
"{\n\t\t\t\t\tans = change[j][0];\n\t\t\t\t}",
"ans = change[j][0]",
"ans",
"change[j][0]",
"change[j]",
"change",
"j",
"0",
"end[ans] = i",
"end[ans]",
"end",
"ans",
"i",
"for(int i = 1;i <= w;i++){\n\t\t\tSystem.out.println(end[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(end[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(end[i]);\n\t\t}",
"System.out.println(end[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"end[i]",
"end",
"i",
"String args[]",
"args",
"public class Main {\n\tpublic static void main(String args[]){\n\t\tScanner in = new Scanner(System.in);\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\t\tint end[] = new int [w + 1];\n\t\tint change[][] = new int [n][2];\n\t\tfor(int i = 0;i < n;i++){\n\t\t\tString[] num = in.next().split(\",\");\n\t\t\tchange[i][0] = Integer.valueOf(num[0]);\n\t\t\tchange[i][1] = Integer.valueOf(num[1]);\n\t\t}\n\t\tfor(int i = 1;i <= w;i++){\n\t\t\tint ans = i;\n\t\t\tfor(int j = 0;j < n;j++){\n\t\t\t\tif(ans == change[j][0]){\n\t\t\t\t\tans = change[j][1];\n\t\t\t\t}else if(ans == change[j][1]){\n\t\t\t\t\tans = change[j][0];\n\t\t\t\t}\n\t\t\t}\n\t\t\tend[ans] = i;\n\t\t}\n\t\tfor(int i = 1;i <= w;i++){\n\t\t\tSystem.out.println(end[i]);\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\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\t\tint end[] = new int [w + 1];\n\t\tint change[][] = new int [n][2];\n\t\tfor(int i = 0;i < n;i++){\n\t\t\tString[] num = in.next().split(\",\");\n\t\t\tchange[i][0] = Integer.valueOf(num[0]);\n\t\t\tchange[i][1] = Integer.valueOf(num[1]);\n\t\t}\n\t\tfor(int i = 1;i <= w;i++){\n\t\t\tint ans = i;\n\t\t\tfor(int j = 0;j < n;j++){\n\t\t\t\tif(ans == change[j][0]){\n\t\t\t\t\tans = change[j][1];\n\t\t\t\t}else if(ans == change[j][1]){\n\t\t\t\t\tans = change[j][0];\n\t\t\t\t}\n\t\t\t}\n\t\t\tend[ans] = i;\n\t\t}\n\t\tfor(int i = 1;i <= w;i++){\n\t\t\tSystem.out.println(end[i]);\n\t\t}\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String args[]){
Scanner in = new Scanner(System.in);
int w = in.nextInt();
int n = in.nextInt();
int end[] = new int [w + 1];
int change[][] = new int [n][2];
for(int i = 0;i < n;i++){
String[] num = in.next().split(",");
change[i][0] = Integer.valueOf(num[0]);
change[i][1] = Integer.valueOf(num[1]);
}
for(int i = 1;i <= w;i++){
int ans = i;
for(int j = 0;j < n;j++){
if(ans == change[j][0]){
ans = change[j][1];
}else if(ans == change[j][1]){
ans = change[j][0];
}
}
end[ans] = i;
}
for(int i = 1;i <= w;i++){
System.out.println(end[i]);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
4,
18,
20,
17,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
13,
41,
13,
4,
18,
13,
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,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
4,
18,
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
],
[
11,
12
],
[
12,
13
],
[
11,
14
],
[
8,
15
],
[
15,
16
],
[
15,
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
],
[
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
],
[
62,
66
],
[
59,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
69,
73
],
[
59,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
76,
78
],
[
59,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
83,
84
],
[
83,
85
],
[
59,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
8,
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
],
[
104,
109
],
[
109,
110
],
[
110,
111
],
[
109,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
112,
116
],
[
6,
117
],
[
117,
118
]
] | [
"import java.util.Scanner;\n\nclass Main\n{\n\tpublic static void main(String args[])\n\t{\n\t\tScanner sc = new Scanner(System.in).useDelimiter(\"[,\\\\n]\");\n\t\t\n\t\tint w = sc.nextInt();\n\t\tint lines[] = new int[w];\n\t\tfor (int i = 0; i < w; i++)\n\t\t{\n\t\t\tlines[i] = i;\n\t\t}\n\t\tint n = sc.nextInt();\n\t\tfor (int i = 0; i < n; i++)\n\t\t{\n\t\t\tint a = sc.nextInt() - 1;\n\t\t\tint b = sc.nextInt() - 1;\n\t\t\tint tmp = lines[a];\n\t\t\tlines[a] = lines[b];\n\t\t\tlines[b] = tmp;\n\t\t}\n\t\tfor (int i = 0; i < w; i++)\n\t\t{\n\t\t\tSystem.out.println(Integer.toString(lines[i] + 1));\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main\n{\n\tpublic static void main(String args[])\n\t{\n\t\tScanner sc = new Scanner(System.in).useDelimiter(\"[,\\\\n]\");\n\t\t\n\t\tint w = sc.nextInt();\n\t\tint lines[] = new int[w];\n\t\tfor (int i = 0; i < w; i++)\n\t\t{\n\t\t\tlines[i] = i;\n\t\t}\n\t\tint n = sc.nextInt();\n\t\tfor (int i = 0; i < n; i++)\n\t\t{\n\t\t\tint a = sc.nextInt() - 1;\n\t\t\tint b = sc.nextInt() - 1;\n\t\t\tint tmp = lines[a];\n\t\t\tlines[a] = lines[b];\n\t\t\tlines[b] = tmp;\n\t\t}\n\t\tfor (int i = 0; i < w; i++)\n\t\t{\n\t\t\tSystem.out.println(Integer.toString(lines[i] + 1));\n\t\t}\n\t}\n}",
"Main",
"public static void main(String args[])\n\t{\n\t\tScanner sc = new Scanner(System.in).useDelimiter(\"[,\\\\n]\");\n\t\t\n\t\tint w = sc.nextInt();\n\t\tint lines[] = new int[w];\n\t\tfor (int i = 0; i < w; i++)\n\t\t{\n\t\t\tlines[i] = i;\n\t\t}\n\t\tint n = sc.nextInt();\n\t\tfor (int i = 0; i < n; i++)\n\t\t{\n\t\t\tint a = sc.nextInt() - 1;\n\t\t\tint b = sc.nextInt() - 1;\n\t\t\tint tmp = lines[a];\n\t\t\tlines[a] = lines[b];\n\t\t\tlines[b] = tmp;\n\t\t}\n\t\tfor (int i = 0; i < w; i++)\n\t\t{\n\t\t\tSystem.out.println(Integer.toString(lines[i] + 1));\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in).useDelimiter(\"[,\\\\n]\");\n\t\t\n\t\tint w = sc.nextInt();\n\t\tint lines[] = new int[w];\n\t\tfor (int i = 0; i < w; i++)\n\t\t{\n\t\t\tlines[i] = i;\n\t\t}\n\t\tint n = sc.nextInt();\n\t\tfor (int i = 0; i < n; i++)\n\t\t{\n\t\t\tint a = sc.nextInt() - 1;\n\t\t\tint b = sc.nextInt() - 1;\n\t\t\tint tmp = lines[a];\n\t\t\tlines[a] = lines[b];\n\t\t\tlines[b] = tmp;\n\t\t}\n\t\tfor (int i = 0; i < w; i++)\n\t\t{\n\t\t\tSystem.out.println(Integer.toString(lines[i] + 1));\n\t\t}\n\t}",
"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 lines[] = new int[w];",
"lines",
"new int[w]",
"w",
"for (int i = 0; i < w; i++)\n\t\t{\n\t\t\tlines[i] = i;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tlines[i] = i;\n\t\t}",
"{\n\t\t\tlines[i] = i;\n\t\t}",
"lines[i] = i",
"lines[i]",
"lines",
"i",
"i",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int i = 0; i < n; i++)\n\t\t{\n\t\t\tint a = sc.nextInt() - 1;\n\t\t\tint b = sc.nextInt() - 1;\n\t\t\tint tmp = lines[a];\n\t\t\tlines[a] = lines[b];\n\t\t\tlines[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() - 1;\n\t\t\tint b = sc.nextInt() - 1;\n\t\t\tint tmp = lines[a];\n\t\t\tlines[a] = lines[b];\n\t\t\tlines[b] = tmp;\n\t\t}",
"{\n\t\t\tint a = sc.nextInt() - 1;\n\t\t\tint b = sc.nextInt() - 1;\n\t\t\tint tmp = lines[a];\n\t\t\tlines[a] = lines[b];\n\t\t\tlines[b] = tmp;\n\t\t}",
"int a = sc.nextInt() - 1;",
"a",
"sc.nextInt() - 1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"1",
"int b = sc.nextInt() - 1;",
"b",
"sc.nextInt() - 1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"1",
"int tmp = lines[a];",
"tmp",
"lines[a]",
"lines",
"a",
"lines[a] = lines[b]",
"lines[a]",
"lines",
"a",
"lines[b]",
"lines",
"b",
"lines[b] = tmp",
"lines[b]",
"lines",
"b",
"tmp",
"for (int i = 0; i < w; i++)\n\t\t{\n\t\t\tSystem.out.println(Integer.toString(lines[i] + 1));\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(Integer.toString(lines[i] + 1));\n\t\t}",
"{\n\t\t\tSystem.out.println(Integer.toString(lines[i] + 1));\n\t\t}",
"System.out.println(Integer.toString(lines[i] + 1))",
"System.out.println",
"System.out",
"System",
"System.out",
"Integer.toString(lines[i] + 1)",
"Integer.toString",
"Integer",
"lines[i] + 1",
"lines[i]",
"lines",
"i",
"1",
"String args[]",
"args"
] | import java.util.Scanner;
class Main
{
public static void main(String args[])
{
Scanner sc = new Scanner(System.in).useDelimiter("[,\\n]");
int w = sc.nextInt();
int lines[] = new int[w];
for (int i = 0; i < w; i++)
{
lines[i] = i;
}
int n = sc.nextInt();
for (int i = 0; i < n; i++)
{
int a = sc.nextInt() - 1;
int b = sc.nextInt() - 1;
int tmp = lines[a];
lines[a] = lines[b];
lines[b] = tmp;
}
for (int i = 0; i < w; i++)
{
System.out.println(Integer.toString(lines[i] + 1));
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
41,
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,
41,
13,
41,
13,
41,
13,
4,
18,
4,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
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
],
[
136,
5
],
[
136,
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
],
[
23,
24
],
[
24,
25
],
[
8,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
31,
32
],
[
31,
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
],
[
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
],
[
64,
67
],
[
67,
68
],
[
64,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
71,
76
],
[
64,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
82,
83
],
[
82,
84
],
[
64,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
90,
91
],
[
90,
92
],
[
64,
93
],
[
93,
94
],
[
64,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
97,
99
],
[
64,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
104
],
[
104,
105
],
[
104,
106
],
[
64,
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
],
[
6,
133
],
[
133,
134
],
[
0,
135
],
[
135,
136
],
[
135,
137
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w, n;\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\n\t\tint[] ans;\n\t\tans = new int[w + 1];\n\n\t\tfor (int i = 0; i <= w; i++) {\n\t\t\tans[i] = i;\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint a, b;\n\t\t\tString[] s = sc.next().split(\",\");\n\t\t\ta = Integer.parseInt(s[0]);\n\t\t\tb = Integer.parseInt(s[1]);\n\t\t\tint noise;\n\t\t\tnoise = ans[a];\n\t\t\tans[a] = ans[b];\n\t\t\tans[b] = noise;\n\t\t}\n\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\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\n\t\tint w, n;\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\n\t\tint[] ans;\n\t\tans = new int[w + 1];\n\n\t\tfor (int i = 0; i <= w; i++) {\n\t\t\tans[i] = i;\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint a, b;\n\t\t\tString[] s = sc.next().split(\",\");\n\t\t\ta = Integer.parseInt(s[0]);\n\t\t\tb = Integer.parseInt(s[1]);\n\t\t\tint noise;\n\t\t\tnoise = ans[a];\n\t\t\tans[a] = ans[b];\n\t\t\tans[b] = noise;\n\t\t}\n\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w, n;\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\n\t\tint[] ans;\n\t\tans = new int[w + 1];\n\n\t\tfor (int i = 0; i <= w; i++) {\n\t\t\tans[i] = i;\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint a, b;\n\t\t\tString[] s = sc.next().split(\",\");\n\t\t\ta = Integer.parseInt(s[0]);\n\t\t\tb = Integer.parseInt(s[1]);\n\t\t\tint noise;\n\t\t\tnoise = ans[a];\n\t\t\tans[a] = ans[b];\n\t\t\tans[b] = noise;\n\t\t}\n\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w, n;\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\n\t\tint[] ans;\n\t\tans = new int[w + 1];\n\n\t\tfor (int i = 0; i <= w; i++) {\n\t\t\tans[i] = i;\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint a, b;\n\t\t\tString[] s = sc.next().split(\",\");\n\t\t\ta = Integer.parseInt(s[0]);\n\t\t\tb = Integer.parseInt(s[1]);\n\t\t\tint noise;\n\t\t\tnoise = ans[a];\n\t\t\tans[a] = ans[b];\n\t\t\tans[b] = noise;\n\t\t}\n\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int w",
"w",
"n;",
"n",
"w = sc.nextInt()",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] ans;",
"ans",
"ans = new int[w + 1]",
"ans",
"new int[w + 1]",
"w + 1",
"w",
"1",
"for (int i = 0; i <= w; i++) {\n\t\t\tans[i] = i;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"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\tint a, b;\n\t\t\tString[] s = sc.next().split(\",\");\n\t\t\ta = Integer.parseInt(s[0]);\n\t\t\tb = Integer.parseInt(s[1]);\n\t\t\tint noise;\n\t\t\tnoise = ans[a];\n\t\t\tans[a] = ans[b];\n\t\t\tans[b] = noise;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint a, b;\n\t\t\tString[] s = sc.next().split(\",\");\n\t\t\ta = Integer.parseInt(s[0]);\n\t\t\tb = Integer.parseInt(s[1]);\n\t\t\tint noise;\n\t\t\tnoise = ans[a];\n\t\t\tans[a] = ans[b];\n\t\t\tans[b] = noise;\n\t\t}",
"{\n\t\t\tint a, b;\n\t\t\tString[] s = sc.next().split(\",\");\n\t\t\ta = Integer.parseInt(s[0]);\n\t\t\tb = Integer.parseInt(s[1]);\n\t\t\tint noise;\n\t\t\tnoise = ans[a];\n\t\t\tans[a] = ans[b];\n\t\t\tans[b] = noise;\n\t\t}",
"int a",
"a",
"b;",
"b",
"String[] s = sc.next().split(\",\");",
"s",
"sc.next().split(\",\")",
"sc.next().split",
"sc.next()",
"sc.next",
"sc",
"\",\"",
"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",
"int noise;",
"noise",
"noise = ans[a]",
"noise",
"ans[a]",
"ans",
"a",
"ans[a] = ans[b]",
"ans[a]",
"ans",
"a",
"ans[b]",
"ans",
"b",
"ans[b] = noise",
"ans[b]",
"ans",
"b",
"noise",
"for (int i = 1; i <= w; i++) {\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[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w, n;\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\n\t\tint[] ans;\n\t\tans = new int[w + 1];\n\n\t\tfor (int i = 0; i <= w; i++) {\n\t\t\tans[i] = i;\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint a, b;\n\t\t\tString[] s = sc.next().split(\",\");\n\t\t\ta = Integer.parseInt(s[0]);\n\t\t\tb = Integer.parseInt(s[1]);\n\t\t\tint noise;\n\t\t\tnoise = ans[a];\n\t\t\tans[a] = ans[b];\n\t\t\tans[b] = noise;\n\t\t}\n\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tSystem.out.println(ans[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\n\t\tint w, n;\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\n\t\tint[] ans;\n\t\tans = new int[w + 1];\n\n\t\tfor (int i = 0; i <= w; i++) {\n\t\t\tans[i] = i;\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint a, b;\n\t\t\tString[] s = sc.next().split(\",\");\n\t\t\ta = Integer.parseInt(s[0]);\n\t\t\tb = Integer.parseInt(s[1]);\n\t\t\tint noise;\n\t\t\tnoise = ans[a];\n\t\t\tans[a] = ans[b];\n\t\t\tans[b] = noise;\n\t\t}\n\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tSystem.out.println(ans[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, n;
w = sc.nextInt();
n = sc.nextInt();
int[] ans;
ans = new int[w + 1];
for (int i = 0; i <= w; i++) {
ans[i] = i;
}
for (int i = 0; i < n; i++) {
int a, b;
String[] s = sc.next().split(",");
a = Integer.parseInt(s[0]);
b = Integer.parseInt(s[1]);
int noise;
noise = ans[a];
ans[a] = ans[b];
ans[b] = noise;
}
for (int i = 1; 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,
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 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 array[] = new int[w];\n for (int i = 0; i < w; i++) array[i] = i+1;\n for (int i = 0; i < n; i++){\n String line = sc.next();\n String spl[] = line.split(\",\");\n int a = Integer.parseInt(spl[0]) - 1;\n int b = Integer.parseInt(spl[1]) - 1;\n int tmp = array[a];\n array[a] = array[b];\n array[b] = tmp;\n }\n for (int i = 0; i < w; i++){\n System.out.println(array[i]);\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 w = sc.nextInt();\n int n = sc.nextInt();\n int array[] = new int[w];\n for (int i = 0; i < w; i++) array[i] = i+1;\n for (int i = 0; i < n; i++){\n String line = sc.next();\n String spl[] = line.split(\",\");\n int a = Integer.parseInt(spl[0]) - 1;\n int b = Integer.parseInt(spl[1]) - 1;\n int tmp = array[a];\n array[a] = array[b];\n array[b] = tmp;\n }\n for (int i = 0; i < w; i++){\n System.out.println(array[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 array[] = new int[w];\n for (int i = 0; i < w; i++) array[i] = i+1;\n for (int i = 0; i < n; i++){\n String line = sc.next();\n String spl[] = line.split(\",\");\n int a = Integer.parseInt(spl[0]) - 1;\n int b = Integer.parseInt(spl[1]) - 1;\n int tmp = array[a];\n array[a] = array[b];\n array[b] = tmp;\n }\n for (int i = 0; i < w; i++){\n System.out.println(array[i]);\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int array[] = new int[w];\n for (int i = 0; i < w; i++) array[i] = i+1;\n for (int i = 0; i < n; i++){\n String line = sc.next();\n String spl[] = line.split(\",\");\n int a = Integer.parseInt(spl[0]) - 1;\n int b = Integer.parseInt(spl[1]) - 1;\n int tmp = array[a];\n array[a] = array[b];\n array[b] = tmp;\n }\n for (int i = 0; i < w; i++){\n System.out.println(array[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 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",
"for (int i = 0; i < n; i++){\n String line = sc.next();\n String spl[] = line.split(\",\");\n int a = Integer.parseInt(spl[0]) - 1;\n int b = Integer.parseInt(spl[1]) - 1;\n int tmp = array[a];\n array[a] = array[b];\n array[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 spl[] = line.split(\",\");\n int a = Integer.parseInt(spl[0]) - 1;\n int b = Integer.parseInt(spl[1]) - 1;\n int tmp = array[a];\n array[a] = array[b];\n array[b] = tmp;\n }",
"{\n String line = sc.next();\n String spl[] = line.split(\",\");\n int a = Integer.parseInt(spl[0]) - 1;\n int b = Integer.parseInt(spl[1]) - 1;\n int tmp = array[a];\n array[a] = array[b];\n array[b] = tmp;\n }",
"String line = sc.next();",
"line",
"sc.next()",
"sc.next",
"sc",
"String spl[] = line.split(\",\");",
"spl",
"line.split(\",\")",
"line.split",
"line",
"\",\"",
"int a = Integer.parseInt(spl[0]) - 1;",
"a",
"Integer.parseInt(spl[0]) - 1",
"Integer.parseInt(spl[0])",
"Integer.parseInt",
"Integer",
"spl[0]",
"spl",
"0",
"1",
"int b = Integer.parseInt(spl[1]) - 1;",
"b",
"Integer.parseInt(spl[1]) - 1",
"Integer.parseInt(spl[1])",
"Integer.parseInt",
"Integer",
"spl[1]",
"spl",
"1",
"1",
"int tmp = array[a];",
"tmp",
"array[a]",
"array",
"a",
"array[a] = array[b]",
"array[a]",
"array",
"a",
"array[b]",
"array",
"b",
"array[b] = tmp",
"array[b]",
"array",
"b",
"tmp",
"for (int i = 0; i < w; i++){\n System.out.println(array[i]);\n }",
"int i = 0;",
"int 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 int w = sc.nextInt();\n int n = sc.nextInt();\n int array[] = new int[w];\n for (int i = 0; i < w; i++) array[i] = i+1;\n for (int i = 0; i < n; i++){\n String line = sc.next();\n String spl[] = line.split(\",\");\n int a = Integer.parseInt(spl[0]) - 1;\n int b = Integer.parseInt(spl[1]) - 1;\n int tmp = array[a];\n array[a] = array[b];\n array[b] = tmp;\n }\n for (int i = 0; i < w; i++){\n System.out.println(array[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 array[] = new int[w];\n for (int i = 0; i < w; i++) array[i] = i+1;\n for (int i = 0; i < n; i++){\n String line = sc.next();\n String spl[] = line.split(\",\");\n int a = Integer.parseInt(spl[0]) - 1;\n int b = Integer.parseInt(spl[1]) - 1;\n int tmp = array[a];\n array[a] = array[b];\n array[b] = tmp;\n }\n for (int i = 0; i < w; i++){\n System.out.println(array[i]);\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 array[] = new int[w];
for (int i = 0; i < w; i++) array[i] = i+1;
for (int i = 0; i < n; i++){
String line = sc.next();
String spl[] = line.split(",");
int a = Integer.parseInt(spl[0]) - 1;
int b = Integer.parseInt(spl[1]) - 1;
int tmp = array[a];
array[a] = array[b];
array[b] = tmp;
}
for (int i = 0; i < w; i++){
System.out.println(array[i]);
}
}
} |
[
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,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
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,
2,
4,
18,
13,
18,
13,
17,
17,
0,
18,
18,
13,
13,
17,
2,
4,
18,
13,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
18,
13,
18,
18,
13,
13,
17,
0,
18,
13,
18,
18,
13,
13,
17,
18,
13,
18,
18,
13,
13,
17,
0,
18,
13,
18,
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,
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
],
[
176,
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
],
[
14,
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
],
[
49,
51
],
[
14,
52
],
[
52,
53
],
[
52,
54
],
[
14,
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
],
[
74,
75
],
[
75,
76
],
[
72,
77
],
[
69,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
78,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
88,
89
],
[
88,
90
],
[
84,
91
],
[
69,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
92,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
102,
103
],
[
102,
104
],
[
98,
105
],
[
14,
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
],
[
119,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
123,
127
],
[
118,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
131,
135
],
[
128,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
138,
142
],
[
118,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
146,
150
],
[
143,
151
],
[
14,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
154,
156
],
[
152,
157
],
[
157,
158
],
[
157,
159
],
[
152,
160
],
[
160,
161
],
[
161,
162
],
[
152,
163
],
[
164,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
167,
169
],
[
165,
170
],
[
170,
171
],
[
170,
172
],
[
12,
173
],
[
173,
174
],
[
0,
175
],
[
175,
176
],
[
175,
177
]
] | [
"import java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Scanner;\n\npublic class Main {\n\n\t/**\n\t * @param args\n\t * @throws IOException\n\t * @throws NumberFormatException\n\t */\n\tpublic static void main(String[] args) throws NumberFormatException,\n\t\t\tIOException {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t//System.out.println(\"???????????°:\");\n\t\tint tateLine = sc.nextInt();\n\t\t// System.out.println(\"?¨?????????°:\");\n\t\tint yokoLine = sc.nextInt();\n\t\tint[] numList = new int[tateLine]; // ??????????????¨????????????????????????\n\t\tfor (int i = 0; i < tateLine; i++) {\n\t\t\tnumList[i] = i + 1;\n\t\t}\n\t\tint[][] yoko = new int[yokoLine][2]; // ?¨????????§??????¨???????????????????????????????´?\n\t\tfor (int i = 0; i < yokoLine; i++) {\n\t\t\t// ??????????????????????????§????????????\n\t\t\tString[] s = sc.next().split(\",\");\n\n\t\t\t// System.out.println(\"????????¨\");\n\t\t\tyoko[i][0] = Integer.parseInt(s[0]) - 1;\n\t\t\t// System.out.println(\"??????\");\n\t\t\tyoko[i][1] = Integer.parseInt(s[1]) - 1;\n\n\t\t}\n\n\t\tfor (int i = 0; i < yokoLine; i++) {\n\t\t\tint b = numList[yoko[i][0]];\n\t\t\tnumList[yoko[i][0]] = numList[yoko[i][1]];\n\t\t\tnumList[yoko[i][1]] = b;\n\t\t}\n\n\t\tfor (int i = 0; i < tateLine; i++) {\n\t\t\tSystem.out.println(numList[i]);\n\t\t}\n\t}\n\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\t/**\n\t * @param args\n\t * @throws IOException\n\t * @throws NumberFormatException\n\t */\n\tpublic static void main(String[] args) throws NumberFormatException,\n\t\t\tIOException {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t//System.out.println(\"???????????°:\");\n\t\tint tateLine = sc.nextInt();\n\t\t// System.out.println(\"?¨?????????°:\");\n\t\tint yokoLine = sc.nextInt();\n\t\tint[] numList = new int[tateLine]; // ??????????????¨????????????????????????\n\t\tfor (int i = 0; i < tateLine; i++) {\n\t\t\tnumList[i] = i + 1;\n\t\t}\n\t\tint[][] yoko = new int[yokoLine][2]; // ?¨????????§??????¨???????????????????????????????´?\n\t\tfor (int i = 0; i < yokoLine; i++) {\n\t\t\t// ??????????????????????????§????????????\n\t\t\tString[] s = sc.next().split(\",\");\n\n\t\t\t// System.out.println(\"????????¨\");\n\t\t\tyoko[i][0] = Integer.parseInt(s[0]) - 1;\n\t\t\t// System.out.println(\"??????\");\n\t\t\tyoko[i][1] = Integer.parseInt(s[1]) - 1;\n\n\t\t}\n\n\t\tfor (int i = 0; i < yokoLine; i++) {\n\t\t\tint b = numList[yoko[i][0]];\n\t\t\tnumList[yoko[i][0]] = numList[yoko[i][1]];\n\t\t\tnumList[yoko[i][1]] = b;\n\t\t}\n\n\t\tfor (int i = 0; i < tateLine; i++) {\n\t\t\tSystem.out.println(numList[i]);\n\t\t}\n\t}\n\n}",
"Main",
"/**\n\t * @param args\n\t * @throws IOException\n\t * @throws NumberFormatException\n\t */\n\tpublic static void main(String[] args) throws NumberFormatException,\n\t\t\tIOException {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t//System.out.println(\"???????????°:\");\n\t\tint tateLine = sc.nextInt();\n\t\t// System.out.println(\"?¨?????????°:\");\n\t\tint yokoLine = sc.nextInt();\n\t\tint[] numList = new int[tateLine]; // ??????????????¨????????????????????????\n\t\tfor (int i = 0; i < tateLine; i++) {\n\t\t\tnumList[i] = i + 1;\n\t\t}\n\t\tint[][] yoko = new int[yokoLine][2]; // ?¨????????§??????¨???????????????????????????????´?\n\t\tfor (int i = 0; i < yokoLine; i++) {\n\t\t\t// ??????????????????????????§????????????\n\t\t\tString[] s = sc.next().split(\",\");\n\n\t\t\t// System.out.println(\"????????¨\");\n\t\t\tyoko[i][0] = Integer.parseInt(s[0]) - 1;\n\t\t\t// System.out.println(\"??????\");\n\t\t\tyoko[i][1] = Integer.parseInt(s[1]) - 1;\n\n\t\t}\n\n\t\tfor (int i = 0; i < yokoLine; i++) {\n\t\t\tint b = numList[yoko[i][0]];\n\t\t\tnumList[yoko[i][0]] = numList[yoko[i][1]];\n\t\t\tnumList[yoko[i][1]] = b;\n\t\t}\n\n\t\tfor (int i = 0; i < tateLine; i++) {\n\t\t\tSystem.out.println(numList[i]);\n\t\t}\n\t}",
"main",
"{\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t//System.out.println(\"???????????°:\");\n\t\tint tateLine = sc.nextInt();\n\t\t// System.out.println(\"?¨?????????°:\");\n\t\tint yokoLine = sc.nextInt();\n\t\tint[] numList = new int[tateLine]; // ??????????????¨????????????????????????\n\t\tfor (int i = 0; i < tateLine; i++) {\n\t\t\tnumList[i] = i + 1;\n\t\t}\n\t\tint[][] yoko = new int[yokoLine][2]; // ?¨????????§??????¨???????????????????????????????´?\n\t\tfor (int i = 0; i < yokoLine; i++) {\n\t\t\t// ??????????????????????????§????????????\n\t\t\tString[] s = sc.next().split(\",\");\n\n\t\t\t// System.out.println(\"????????¨\");\n\t\t\tyoko[i][0] = Integer.parseInt(s[0]) - 1;\n\t\t\t// System.out.println(\"??????\");\n\t\t\tyoko[i][1] = Integer.parseInt(s[1]) - 1;\n\n\t\t}\n\n\t\tfor (int i = 0; i < yokoLine; i++) {\n\t\t\tint b = numList[yoko[i][0]];\n\t\t\tnumList[yoko[i][0]] = numList[yoko[i][1]];\n\t\t\tnumList[yoko[i][1]] = b;\n\t\t}\n\n\t\tfor (int i = 0; i < tateLine; i++) {\n\t\t\tSystem.out.println(numList[i]);\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int tateLine = sc.nextInt();",
"tateLine",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int yokoLine = sc.nextInt();",
"yokoLine",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] numList = new int[tateLine];",
"numList",
"new int[tateLine]",
"tateLine",
"for (int i = 0; i < tateLine; i++) {\n\t\t\tnumList[i] = i + 1;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < tateLine",
"i",
"tateLine",
"i++",
"i++",
"i",
"{\n\t\t\tnumList[i] = i + 1;\n\t\t}",
"{\n\t\t\tnumList[i] = i + 1;\n\t\t}",
"numList[i] = i + 1",
"numList[i]",
"numList",
"i",
"i + 1",
"i",
"1",
"int[][] yoko = new int[yokoLine][2];",
"yoko",
"new int[yokoLine][2]",
"yokoLine",
"2",
"for (int i = 0; i < yokoLine; i++) {\n\t\t\t// ??????????????????????????§????????????\n\t\t\tString[] s = sc.next().split(\",\");\n\n\t\t\t// System.out.println(\"????????¨\");\n\t\t\tyoko[i][0] = Integer.parseInt(s[0]) - 1;\n\t\t\t// System.out.println(\"??????\");\n\t\t\tyoko[i][1] = Integer.parseInt(s[1]) - 1;\n\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < yokoLine",
"i",
"yokoLine",
"i++",
"i++",
"i",
"{\n\t\t\t// ??????????????????????????§????????????\n\t\t\tString[] s = sc.next().split(\",\");\n\n\t\t\t// System.out.println(\"????????¨\");\n\t\t\tyoko[i][0] = Integer.parseInt(s[0]) - 1;\n\t\t\t// System.out.println(\"??????\");\n\t\t\tyoko[i][1] = Integer.parseInt(s[1]) - 1;\n\n\t\t}",
"{\n\t\t\t// ??????????????????????????§????????????\n\t\t\tString[] s = sc.next().split(\",\");\n\n\t\t\t// System.out.println(\"????????¨\");\n\t\t\tyoko[i][0] = Integer.parseInt(s[0]) - 1;\n\t\t\t// System.out.println(\"??????\");\n\t\t\tyoko[i][1] = Integer.parseInt(s[1]) - 1;\n\n\t\t}",
"String[] s = sc.next().split(\",\");",
"s",
"sc.next().split(\",\")",
"sc.next().split",
"sc.next()",
"sc.next",
"sc",
"\",\"",
"yoko[i][0] = Integer.parseInt(s[0]) - 1",
"yoko[i][0]",
"yoko[i]",
"yoko",
"i",
"0",
"Integer.parseInt(s[0]) - 1",
"Integer.parseInt(s[0])",
"Integer.parseInt",
"Integer",
"s[0]",
"s",
"0",
"1",
"yoko[i][1] = Integer.parseInt(s[1]) - 1",
"yoko[i][1]",
"yoko[i]",
"yoko",
"i",
"1",
"Integer.parseInt(s[1]) - 1",
"Integer.parseInt(s[1])",
"Integer.parseInt",
"Integer",
"s[1]",
"s",
"1",
"1",
"for (int i = 0; i < yokoLine; i++) {\n\t\t\tint b = numList[yoko[i][0]];\n\t\t\tnumList[yoko[i][0]] = numList[yoko[i][1]];\n\t\t\tnumList[yoko[i][1]] = b;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < yokoLine",
"i",
"yokoLine",
"i++",
"i++",
"i",
"{\n\t\t\tint b = numList[yoko[i][0]];\n\t\t\tnumList[yoko[i][0]] = numList[yoko[i][1]];\n\t\t\tnumList[yoko[i][1]] = b;\n\t\t}",
"{\n\t\t\tint b = numList[yoko[i][0]];\n\t\t\tnumList[yoko[i][0]] = numList[yoko[i][1]];\n\t\t\tnumList[yoko[i][1]] = b;\n\t\t}",
"int b = numList[yoko[i][0]];",
"b",
"numList[yoko[i][0]]",
"numList",
"yoko[i][0]",
"yoko[i]",
"yoko",
"i",
"0",
"numList[yoko[i][0]] = numList[yoko[i][1]]",
"numList[yoko[i][0]]",
"numList",
"yoko[i][0]",
"yoko[i]",
"yoko",
"i",
"0",
"numList[yoko[i][1]]",
"numList",
"yoko[i][1]",
"yoko[i]",
"yoko",
"i",
"1",
"numList[yoko[i][1]] = b",
"numList[yoko[i][1]]",
"numList",
"yoko[i][1]",
"yoko[i]",
"yoko",
"i",
"1",
"b",
"for (int i = 0; i < tateLine; i++) {\n\t\t\tSystem.out.println(numList[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < tateLine",
"i",
"tateLine",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(numList[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(numList[i]);\n\t\t}",
"System.out.println(numList[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"numList[i]",
"numList",
"i",
"String[] args",
"args",
"public class Main {\n\n\t/**\n\t * @param args\n\t * @throws IOException\n\t * @throws NumberFormatException\n\t */\n\tpublic static void main(String[] args) throws NumberFormatException,\n\t\t\tIOException {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t//System.out.println(\"???????????°:\");\n\t\tint tateLine = sc.nextInt();\n\t\t// System.out.println(\"?¨?????????°:\");\n\t\tint yokoLine = sc.nextInt();\n\t\tint[] numList = new int[tateLine]; // ??????????????¨????????????????????????\n\t\tfor (int i = 0; i < tateLine; i++) {\n\t\t\tnumList[i] = i + 1;\n\t\t}\n\t\tint[][] yoko = new int[yokoLine][2]; // ?¨????????§??????¨???????????????????????????????´?\n\t\tfor (int i = 0; i < yokoLine; i++) {\n\t\t\t// ??????????????????????????§????????????\n\t\t\tString[] s = sc.next().split(\",\");\n\n\t\t\t// System.out.println(\"????????¨\");\n\t\t\tyoko[i][0] = Integer.parseInt(s[0]) - 1;\n\t\t\t// System.out.println(\"??????\");\n\t\t\tyoko[i][1] = Integer.parseInt(s[1]) - 1;\n\n\t\t}\n\n\t\tfor (int i = 0; i < yokoLine; i++) {\n\t\t\tint b = numList[yoko[i][0]];\n\t\t\tnumList[yoko[i][0]] = numList[yoko[i][1]];\n\t\t\tnumList[yoko[i][1]] = b;\n\t\t}\n\n\t\tfor (int i = 0; i < tateLine; i++) {\n\t\t\tSystem.out.println(numList[i]);\n\t\t}\n\t}\n\n}",
"public class Main {\n\n\t/**\n\t * @param args\n\t * @throws IOException\n\t * @throws NumberFormatException\n\t */\n\tpublic static void main(String[] args) throws NumberFormatException,\n\t\t\tIOException {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t//System.out.println(\"???????????°:\");\n\t\tint tateLine = sc.nextInt();\n\t\t// System.out.println(\"?¨?????????°:\");\n\t\tint yokoLine = sc.nextInt();\n\t\tint[] numList = new int[tateLine]; // ??????????????¨????????????????????????\n\t\tfor (int i = 0; i < tateLine; i++) {\n\t\t\tnumList[i] = i + 1;\n\t\t}\n\t\tint[][] yoko = new int[yokoLine][2]; // ?¨????????§??????¨???????????????????????????????´?\n\t\tfor (int i = 0; i < yokoLine; i++) {\n\t\t\t// ??????????????????????????§????????????\n\t\t\tString[] s = sc.next().split(\",\");\n\n\t\t\t// System.out.println(\"????????¨\");\n\t\t\tyoko[i][0] = Integer.parseInt(s[0]) - 1;\n\t\t\t// System.out.println(\"??????\");\n\t\t\tyoko[i][1] = Integer.parseInt(s[1]) - 1;\n\n\t\t}\n\n\t\tfor (int i = 0; i < yokoLine; i++) {\n\t\t\tint b = numList[yoko[i][0]];\n\t\t\tnumList[yoko[i][0]] = numList[yoko[i][1]];\n\t\t\tnumList[yoko[i][1]] = b;\n\t\t}\n\n\t\tfor (int i = 0; i < tateLine; i++) {\n\t\t\tSystem.out.println(numList[i]);\n\t\t}\n\t}\n\n}",
"Main"
] | import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
public class Main {
/**
* @param args
* @throws IOException
* @throws NumberFormatException
*/
public static void main(String[] args) throws NumberFormatException,
IOException {
// TODO ?????????????????????????????????????????????
Scanner sc = new Scanner(System.in);
//System.out.println("???????????°:");
int tateLine = sc.nextInt();
// System.out.println("?¨?????????°:");
int yokoLine = sc.nextInt();
int[] numList = new int[tateLine]; // ??????????????¨????????????????????????
for (int i = 0; i < tateLine; i++) {
numList[i] = i + 1;
}
int[][] yoko = new int[yokoLine][2]; // ?¨????????§??????¨???????????????????????????????´?
for (int i = 0; i < yokoLine; i++) {
// ??????????????????????????§????????????
String[] s = sc.next().split(",");
// System.out.println("????????¨");
yoko[i][0] = Integer.parseInt(s[0]) - 1;
// System.out.println("??????");
yoko[i][1] = Integer.parseInt(s[1]) - 1;
}
for (int i = 0; i < yokoLine; i++) {
int b = numList[yoko[i][0]];
numList[yoko[i][0]] = numList[yoko[i][1]];
numList[yoko[i][1]] = b;
}
for (int i = 0; i < tateLine; i++) {
System.out.println(numList[i]);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
17,
41,
13,
20,
17,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
13,
13,
41,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
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,
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
],
[
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
],
[
0,
22
],
[
154,
23
],
[
154,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
30,
32
],
[
26,
34
],
[
34,
35
],
[
34,
36
],
[
26,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
43,
44
],
[
44,
45
],
[
26,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
51,
52
],
[
52,
53
],
[
26,
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
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
26,
72
],
[
72,
73
],
[
26,
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
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
89,
94
],
[
86,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
100,
101
],
[
100,
102
],
[
86,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
106,
107
],
[
105,
108
],
[
108,
109
],
[
108,
110
],
[
86,
111
],
[
111,
112
],
[
86,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
115,
117
],
[
86,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
118,
122
],
[
122,
123
],
[
122,
124
],
[
86,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
125,
129
],
[
26,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
130,
135
],
[
135,
136
],
[
135,
137
],
[
130,
138
],
[
138,
139
],
[
139,
140
],
[
130,
141
],
[
142,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
143,
148
],
[
148,
149
],
[
148,
150
],
[
24,
151
],
[
151,
152
],
[
0,
153
],
[
153,
154
],
[
153,
155
]
] | [
"\nimport java.util.*;\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.lang.*;\nimport java.util.Scanner;\nimport java.util.StringTokenizer;\n\npublic class Main\n{\n\tpublic static void main (String[] arg)throws IOException\n\t{\n\t\tBufferedReader input =new BufferedReader (new InputStreamReader (System.in));\n\t\tint[] a= new int[31];\n\t\tint[] b= new int[31];\t\n\t\tint num = Integer.parseInt(input.readLine());\n\t\tint num2 = Integer.parseInt(input.readLine());\n\t\tfor(int i=0;i<=30;i++){\n a[i]=i;\n\t\t}\n\t\t\n\t\tString[] change;\n\t\tfor(int j=1;j<=num2;j++){\n\t\tchange=input.readLine().split(\",\");\n\t\tint x1 = Integer.parseInt(change[0]);\n int y1 = Integer.parseInt(change[1]);\n\t\tint buffer;\n\t\tbuffer=a[x1];\n\t\ta[x1]=a[y1];\n\t\ta[y1]=buffer;\n\t\t}\n\t\tfor(int k=1;k<=num;k++){\n\t\t\tSystem.out.println(a[k]);\n\t\t}\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.lang.*;",
"lang.*",
"java",
"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)throws IOException\n\t{\n\t\tBufferedReader input =new BufferedReader (new InputStreamReader (System.in));\n\t\tint[] a= new int[31];\n\t\tint[] b= new int[31];\t\n\t\tint num = Integer.parseInt(input.readLine());\n\t\tint num2 = Integer.parseInt(input.readLine());\n\t\tfor(int i=0;i<=30;i++){\n a[i]=i;\n\t\t}\n\t\t\n\t\tString[] change;\n\t\tfor(int j=1;j<=num2;j++){\n\t\tchange=input.readLine().split(\",\");\n\t\tint x1 = Integer.parseInt(change[0]);\n int y1 = Integer.parseInt(change[1]);\n\t\tint buffer;\n\t\tbuffer=a[x1];\n\t\ta[x1]=a[y1];\n\t\ta[y1]=buffer;\n\t\t}\n\t\tfor(int k=1;k<=num;k++){\n\t\t\tSystem.out.println(a[k]);\n\t\t}\n\t}\n}",
"Main",
"public static void main (String[] arg)throws IOException\n\t{\n\t\tBufferedReader input =new BufferedReader (new InputStreamReader (System.in));\n\t\tint[] a= new int[31];\n\t\tint[] b= new int[31];\t\n\t\tint num = Integer.parseInt(input.readLine());\n\t\tint num2 = Integer.parseInt(input.readLine());\n\t\tfor(int i=0;i<=30;i++){\n a[i]=i;\n\t\t}\n\t\t\n\t\tString[] change;\n\t\tfor(int j=1;j<=num2;j++){\n\t\tchange=input.readLine().split(\",\");\n\t\tint x1 = Integer.parseInt(change[0]);\n int y1 = Integer.parseInt(change[1]);\n\t\tint buffer;\n\t\tbuffer=a[x1];\n\t\ta[x1]=a[y1];\n\t\ta[y1]=buffer;\n\t\t}\n\t\tfor(int k=1;k<=num;k++){\n\t\t\tSystem.out.println(a[k]);\n\t\t}\n\t}",
"main",
"{\n\t\tBufferedReader input =new BufferedReader (new InputStreamReader (System.in));\n\t\tint[] a= new int[31];\n\t\tint[] b= new int[31];\t\n\t\tint num = Integer.parseInt(input.readLine());\n\t\tint num2 = Integer.parseInt(input.readLine());\n\t\tfor(int i=0;i<=30;i++){\n a[i]=i;\n\t\t}\n\t\t\n\t\tString[] change;\n\t\tfor(int j=1;j<=num2;j++){\n\t\tchange=input.readLine().split(\",\");\n\t\tint x1 = Integer.parseInt(change[0]);\n int y1 = Integer.parseInt(change[1]);\n\t\tint buffer;\n\t\tbuffer=a[x1];\n\t\ta[x1]=a[y1];\n\t\ta[y1]=buffer;\n\t\t}\n\t\tfor(int k=1;k<=num;k++){\n\t\t\tSystem.out.println(a[k]);\n\t\t}\n\t}",
"BufferedReader input =new BufferedReader (new InputStreamReader (System.in));",
"input",
"new BufferedReader (new InputStreamReader (System.in))",
"int[] a= new int[31];",
"a",
"new int[31]",
"31",
"int[] b= new int[31];",
"b",
"new int[31]",
"31",
"int num = Integer.parseInt(input.readLine());",
"num",
"Integer.parseInt(input.readLine())",
"Integer.parseInt",
"Integer",
"input.readLine()",
"input.readLine",
"input",
"int num2 = Integer.parseInt(input.readLine());",
"num2",
"Integer.parseInt(input.readLine())",
"Integer.parseInt",
"Integer",
"input.readLine()",
"input.readLine",
"input",
"for(int i=0;i<=30;i++){\n a[i]=i;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<=30",
"i",
"30",
"i++",
"i++",
"i",
"{\n a[i]=i;\n\t\t}",
"{\n a[i]=i;\n\t\t}",
"a[i]=i",
"a[i]",
"a",
"i",
"i",
"String[] change;",
"change",
"for(int j=1;j<=num2;j++){\n\t\tchange=input.readLine().split(\",\");\n\t\tint x1 = Integer.parseInt(change[0]);\n int y1 = Integer.parseInt(change[1]);\n\t\tint buffer;\n\t\tbuffer=a[x1];\n\t\ta[x1]=a[y1];\n\t\ta[y1]=buffer;\n\t\t}",
"int j=1;",
"int j=1;",
"j",
"1",
"j<=num2",
"j",
"num2",
"j++",
"j++",
"j",
"{\n\t\tchange=input.readLine().split(\",\");\n\t\tint x1 = Integer.parseInt(change[0]);\n int y1 = Integer.parseInt(change[1]);\n\t\tint buffer;\n\t\tbuffer=a[x1];\n\t\ta[x1]=a[y1];\n\t\ta[y1]=buffer;\n\t\t}",
"{\n\t\tchange=input.readLine().split(\",\");\n\t\tint x1 = Integer.parseInt(change[0]);\n int y1 = Integer.parseInt(change[1]);\n\t\tint buffer;\n\t\tbuffer=a[x1];\n\t\ta[x1]=a[y1];\n\t\ta[y1]=buffer;\n\t\t}",
"change=input.readLine().split(\",\")",
"change",
"input.readLine().split(\",\")",
"input.readLine().split",
"input.readLine()",
"input.readLine",
"input",
"\",\"",
"int x1 = Integer.parseInt(change[0]);",
"x1",
"Integer.parseInt(change[0])",
"Integer.parseInt",
"Integer",
"change[0]",
"change",
"0",
"int y1 = Integer.parseInt(change[1]);",
"y1",
"Integer.parseInt(change[1])",
"Integer.parseInt",
"Integer",
"change[1]",
"change",
"1",
"int buffer;",
"buffer",
"buffer=a[x1]",
"buffer",
"a[x1]",
"a",
"x1",
"a[x1]=a[y1]",
"a[x1]",
"a",
"x1",
"a[y1]",
"a",
"y1",
"a[y1]=buffer",
"a[y1]",
"a",
"y1",
"buffer",
"for(int k=1;k<=num;k++){\n\t\t\tSystem.out.println(a[k]);\n\t\t}",
"int k=1;",
"int k=1;",
"k",
"1",
"k<=num",
"k",
"num",
"k++",
"k++",
"k",
"{\n\t\t\tSystem.out.println(a[k]);\n\t\t}",
"{\n\t\t\tSystem.out.println(a[k]);\n\t\t}",
"System.out.println(a[k])",
"System.out.println",
"System.out",
"System",
"System.out",
"a[k]",
"a",
"k",
"String[] arg",
"arg",
"public class Main\n{\n\tpublic static void main (String[] arg)throws IOException\n\t{\n\t\tBufferedReader input =new BufferedReader (new InputStreamReader (System.in));\n\t\tint[] a= new int[31];\n\t\tint[] b= new int[31];\t\n\t\tint num = Integer.parseInt(input.readLine());\n\t\tint num2 = Integer.parseInt(input.readLine());\n\t\tfor(int i=0;i<=30;i++){\n a[i]=i;\n\t\t}\n\t\t\n\t\tString[] change;\n\t\tfor(int j=1;j<=num2;j++){\n\t\tchange=input.readLine().split(\",\");\n\t\tint x1 = Integer.parseInt(change[0]);\n int y1 = Integer.parseInt(change[1]);\n\t\tint buffer;\n\t\tbuffer=a[x1];\n\t\ta[x1]=a[y1];\n\t\ta[y1]=buffer;\n\t\t}\n\t\tfor(int k=1;k<=num;k++){\n\t\t\tSystem.out.println(a[k]);\n\t\t}\n\t}\n}",
"public class Main\n{\n\tpublic static void main (String[] arg)throws IOException\n\t{\n\t\tBufferedReader input =new BufferedReader (new InputStreamReader (System.in));\n\t\tint[] a= new int[31];\n\t\tint[] b= new int[31];\t\n\t\tint num = Integer.parseInt(input.readLine());\n\t\tint num2 = Integer.parseInt(input.readLine());\n\t\tfor(int i=0;i<=30;i++){\n a[i]=i;\n\t\t}\n\t\t\n\t\tString[] change;\n\t\tfor(int j=1;j<=num2;j++){\n\t\tchange=input.readLine().split(\",\");\n\t\tint x1 = Integer.parseInt(change[0]);\n int y1 = Integer.parseInt(change[1]);\n\t\tint buffer;\n\t\tbuffer=a[x1];\n\t\ta[x1]=a[y1];\n\t\ta[y1]=buffer;\n\t\t}\n\t\tfor(int k=1;k<=num;k++){\n\t\t\tSystem.out.println(a[k]);\n\t\t}\n\t}\n}",
"Main"
] |
import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.*;
import java.util.Scanner;
import java.util.StringTokenizer;
public class Main
{
public static void main (String[] arg)throws IOException
{
BufferedReader input =new BufferedReader (new InputStreamReader (System.in));
int[] a= new int[31];
int[] b= new int[31];
int num = Integer.parseInt(input.readLine());
int num2 = Integer.parseInt(input.readLine());
for(int i=0;i<=30;i++){
a[i]=i;
}
String[] change;
for(int j=1;j<=num2;j++){
change=input.readLine().split(",");
int x1 = Integer.parseInt(change[0]);
int y1 = Integer.parseInt(change[1]);
int buffer;
buffer=a[x1];
a[x1]=a[y1];
a[y1]=buffer;
}
for(int k=1;k<=num;k++){
System.out.println(a[k]);
}
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
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,
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,
18,
13,
13,
17,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
136,
5
],
[
136,
6
],
[
6,
7
],
[
6,
8
],
[
136,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
11,
17
],
[
17,
18
],
[
17,
19
],
[
11,
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
],
[
11,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
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
],
[
90,
91
],
[
90,
92
],
[
58,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
96,
98
],
[
93,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
101,
103
],
[
58,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
107,
109
],
[
104,
110
],
[
11,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
111,
116
],
[
116,
117
],
[
116,
118
],
[
111,
119
],
[
119,
120
],
[
120,
121
],
[
111,
122
],
[
123,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
124,
129
],
[
124,
130
],
[
130,
131
],
[
130,
132
],
[
9,
133
],
[
133,
134
],
[
0,
135
],
[
135,
136
],
[
135,
137
]
] | [
"import java.util.*;\n\npublic class Main{\n\tprivate static final Scanner scan = new Scanner(System.in);\n\n\tpublic static void main(String[] args){\n\t\tint w = scan.nextInt();\n\t\tint[] dl = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tdl[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 input = scan.next();\n\t\t\tString[] nums = input.split(\",\");\n\t\t\tint a = Integer.parseInt(nums[0]);\n\t\t\tint b = Integer.parseInt(nums[1]);\n\t\t\tint work = dl[a - 1];\n\t\t\tdl[a - 1] = dl[b - 1];\n\t\t\tdl[b - 1] = work;\n\t\t}\n\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.printf(\"%d\\n\", dl[i]);\n\t\t}\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\tprivate static final Scanner scan = new Scanner(System.in);\n\n\tpublic static void main(String[] args){\n\t\tint w = scan.nextInt();\n\t\tint[] dl = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tdl[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 input = scan.next();\n\t\t\tString[] nums = input.split(\",\");\n\t\t\tint a = Integer.parseInt(nums[0]);\n\t\t\tint b = Integer.parseInt(nums[1]);\n\t\t\tint work = dl[a - 1];\n\t\t\tdl[a - 1] = dl[b - 1];\n\t\t\tdl[b - 1] = work;\n\t\t}\n\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.printf(\"%d\\n\", dl[i]);\n\t\t}\n\t}\n}",
"Main",
"private static final Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"public static void main(String[] args){\n\t\tint w = scan.nextInt();\n\t\tint[] dl = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tdl[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 input = scan.next();\n\t\t\tString[] nums = input.split(\",\");\n\t\t\tint a = Integer.parseInt(nums[0]);\n\t\t\tint b = Integer.parseInt(nums[1]);\n\t\t\tint work = dl[a - 1];\n\t\t\tdl[a - 1] = dl[b - 1];\n\t\t\tdl[b - 1] = work;\n\t\t}\n\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.printf(\"%d\\n\", dl[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tint w = scan.nextInt();\n\t\tint[] dl = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tdl[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 input = scan.next();\n\t\t\tString[] nums = input.split(\",\");\n\t\t\tint a = Integer.parseInt(nums[0]);\n\t\t\tint b = Integer.parseInt(nums[1]);\n\t\t\tint work = dl[a - 1];\n\t\t\tdl[a - 1] = dl[b - 1];\n\t\t\tdl[b - 1] = work;\n\t\t}\n\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.printf(\"%d\\n\", dl[i]);\n\t\t}\n\t}",
"int w = scan.nextInt();",
"w",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int[] dl = new int[w];",
"dl",
"new int[w]",
"w",
"for(int i = 0; i < w; i++){\n\t\t\tdl[i] = i + 1;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tdl[i] = i + 1;\n\t\t}",
"{\n\t\t\tdl[i] = i + 1;\n\t\t}",
"dl[i] = i + 1",
"dl[i]",
"dl",
"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 input = scan.next();\n\t\t\tString[] nums = input.split(\",\");\n\t\t\tint a = Integer.parseInt(nums[0]);\n\t\t\tint b = Integer.parseInt(nums[1]);\n\t\t\tint work = dl[a - 1];\n\t\t\tdl[a - 1] = dl[b - 1];\n\t\t\tdl[b - 1] = work;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString input = scan.next();\n\t\t\tString[] nums = input.split(\",\");\n\t\t\tint a = Integer.parseInt(nums[0]);\n\t\t\tint b = Integer.parseInt(nums[1]);\n\t\t\tint work = dl[a - 1];\n\t\t\tdl[a - 1] = dl[b - 1];\n\t\t\tdl[b - 1] = work;\n\t\t}",
"{\n\t\t\tString input = scan.next();\n\t\t\tString[] nums = input.split(\",\");\n\t\t\tint a = Integer.parseInt(nums[0]);\n\t\t\tint b = Integer.parseInt(nums[1]);\n\t\t\tint work = dl[a - 1];\n\t\t\tdl[a - 1] = dl[b - 1];\n\t\t\tdl[b - 1] = work;\n\t\t}",
"String input = scan.next();",
"input",
"scan.next()",
"scan.next",
"scan",
"String[] nums = input.split(\",\");",
"nums",
"input.split(\",\")",
"input.split",
"input",
"\",\"",
"int a = Integer.parseInt(nums[0]);",
"a",
"Integer.parseInt(nums[0])",
"Integer.parseInt",
"Integer",
"nums[0]",
"nums",
"0",
"int b = Integer.parseInt(nums[1]);",
"b",
"Integer.parseInt(nums[1])",
"Integer.parseInt",
"Integer",
"nums[1]",
"nums",
"1",
"int work = dl[a - 1];",
"work",
"dl[a - 1]",
"dl",
"a - 1",
"a",
"1",
"dl[a - 1] = dl[b - 1]",
"dl[a - 1]",
"dl",
"a - 1",
"a",
"1",
"dl[b - 1]",
"dl",
"b - 1",
"b",
"1",
"dl[b - 1] = work",
"dl[b - 1]",
"dl",
"b - 1",
"b",
"1",
"work",
"for(int i = 0; i < w; i++){\n\t\t\tSystem.out.printf(\"%d\\n\", dl[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.printf(\"%d\\n\", dl[i]);\n\t\t}",
"{\n\t\t\tSystem.out.printf(\"%d\\n\", dl[i]);\n\t\t}",
"System.out.printf(\"%d\\n\", dl[i])",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%d\\n\"",
"dl[i]",
"dl",
"i",
"String[] args",
"args",
"public class Main{\n\tprivate static final Scanner scan = new Scanner(System.in);\n\n\tpublic static void main(String[] args){\n\t\tint w = scan.nextInt();\n\t\tint[] dl = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tdl[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 input = scan.next();\n\t\t\tString[] nums = input.split(\",\");\n\t\t\tint a = Integer.parseInt(nums[0]);\n\t\t\tint b = Integer.parseInt(nums[1]);\n\t\t\tint work = dl[a - 1];\n\t\t\tdl[a - 1] = dl[b - 1];\n\t\t\tdl[b - 1] = work;\n\t\t}\n\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.printf(\"%d\\n\", dl[i]);\n\t\t}\n\t}\n}",
"public class Main{\n\tprivate static final Scanner scan = new Scanner(System.in);\n\n\tpublic static void main(String[] args){\n\t\tint w = scan.nextInt();\n\t\tint[] dl = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tdl[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 input = scan.next();\n\t\t\tString[] nums = input.split(\",\");\n\t\t\tint a = Integer.parseInt(nums[0]);\n\t\t\tint b = Integer.parseInt(nums[1]);\n\t\t\tint work = dl[a - 1];\n\t\t\tdl[a - 1] = dl[b - 1];\n\t\t\tdl[b - 1] = work;\n\t\t}\n\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.printf(\"%d\\n\", dl[i]);\n\t\t}\n\t}\n}",
"Main"
] | import java.util.*;
public class Main{
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args){
int w = scan.nextInt();
int[] dl = new int[w];
for(int i = 0; i < w; i++){
dl[i] = i + 1;
}
int n = scan.nextInt();
for(int i = 0; i < n; i++){
String input = scan.next();
String[] nums = input.split(",");
int a = Integer.parseInt(nums[0]);
int b = Integer.parseInt(nums[1]);
int work = dl[a - 1];
dl[a - 1] = dl[b - 1];
dl[b - 1] = work;
}
for(int i = 0; i < w; i++){
System.out.printf("%d\n", dl[i]);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
41,
13,
20,
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,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
13,
4,
18,
13,
13,
42,
40,
4,
18,
13,
30,
41,
13,
4,
18,
13,
14,
2,
13,
18,
13,
13,
30,
0,
13,
18,
13,
13,
14,
2,
13,
18,
13,
13,
30,
0,
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,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
0,
18,
36,
13,
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
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
190,
23
],
[
190,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
32,
35
],
[
35,
36
],
[
36,
37
],
[
26,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
43,
44
],
[
44,
45
],
[
26,
46
],
[
46,
47
],
[
46,
48
],
[
49,
50
],
[
49,
51
],
[
26,
52
],
[
52,
53
],
[
52,
54
],
[
26,
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
],
[
77,
78
],
[
76,
79
],
[
26,
80
],
[
80,
81
],
[
80,
82
],
[
26,
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
],
[
95,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
95,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
103,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
112,
113
],
[
108,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
117,
119
],
[
114,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
123,
125
],
[
114,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
129,
131
],
[
126,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
135,
136
],
[
135,
137
],
[
95,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
138,
142
],
[
26,
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
],
[
24,
164
],
[
164,
165
],
[
190,
166
],
[
166,
167
],
[
166,
168
],
[
168,
169
],
[
166,
170
],
[
170,
171
],
[
166,
172
],
[
172,
173
],
[
172,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
175,
179
],
[
174,
180
],
[
180,
181
],
[
181,
182
],
[
181,
183
],
[
180,
184
],
[
172,
185
],
[
185,
186
],
[
172,
187
],
[
187,
188
],
[
0,
189
],
[
189,
190
],
[
189,
191
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayDeque;\nimport java.util.ArrayList;\nimport java.util.Deque;\nimport java.util.List;\n\npublic class Main {\n\n\t@SuppressWarnings(\"unchecked\")\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint w = Integer.parseInt(br.readLine());\n\n\t\tint n = Integer.parseInt(br.readLine());\n\n\t\tint[] ans = new int[w + 1];\n\n\t\tList<points> line = new ArrayList<>();\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString[] s_points = br.readLine().split(\",\");\n\n\t\t\tline.add(new points(Integer.parseInt(s_points[0]), Integer.parseInt(s_points[1])));\n\t\t}\n\n\t\tDeque<points> d = new ArrayDeque<>();\n\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tint target = i;\n\t\t\td.addAll(line);\n\t\t\twhile (!(d.isEmpty())) {\n\t\t\t\tpoints p = d.poll();\n\n\t\t\t\tif (target == p.point_a) {\n\t\t\t\t\ttarget = p.point_b;\n\t\t\t\t} else if (target == p.point_b) {\n\t\t\t\t\ttarget = p.point_a;\n\t\t\t\t}\n\t\t\t\t/* System.out.println(p.point_a+\" \"+p.point_b); */\n\t\t\t}\n\t\t\tans[target] = i;\n\t\t}\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t}\n\n\tstatic class points {\n\t\tint point_a;\n\t\tint point_b;\n\n\t\tpublic points(int a, int b) {\n\t\t\tthis.point_a = a;\n\t\t\tthis.point_b = b;\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",
"import java.util.ArrayDeque;",
"ArrayDeque",
"java.util",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Deque;",
"Deque",
"java.util",
"import java.util.List;",
"List",
"java.util",
"public class Main {\n\n\t@SuppressWarnings(\"unchecked\")\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint w = Integer.parseInt(br.readLine());\n\n\t\tint n = Integer.parseInt(br.readLine());\n\n\t\tint[] ans = new int[w + 1];\n\n\t\tList<points> line = new ArrayList<>();\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString[] s_points = br.readLine().split(\",\");\n\n\t\t\tline.add(new points(Integer.parseInt(s_points[0]), Integer.parseInt(s_points[1])));\n\t\t}\n\n\t\tDeque<points> d = new ArrayDeque<>();\n\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tint target = i;\n\t\t\td.addAll(line);\n\t\t\twhile (!(d.isEmpty())) {\n\t\t\t\tpoints p = d.poll();\n\n\t\t\t\tif (target == p.point_a) {\n\t\t\t\t\ttarget = p.point_b;\n\t\t\t\t} else if (target == p.point_b) {\n\t\t\t\t\ttarget = p.point_a;\n\t\t\t\t}\n\t\t\t\t/* System.out.println(p.point_a+\" \"+p.point_b); */\n\t\t\t}\n\t\t\tans[target] = i;\n\t\t}\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t}\n\n\tstatic class points {\n\t\tint point_a;\n\t\tint point_b;\n\n\t\tpublic points(int a, int b) {\n\t\t\tthis.point_a = a;\n\t\t\tthis.point_b = b;\n\t\t}\n\t}\n\n}",
"Main",
"@SuppressWarnings(\"unchecked\")\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint w = Integer.parseInt(br.readLine());\n\n\t\tint n = Integer.parseInt(br.readLine());\n\n\t\tint[] ans = new int[w + 1];\n\n\t\tList<points> line = new ArrayList<>();\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString[] s_points = br.readLine().split(\",\");\n\n\t\t\tline.add(new points(Integer.parseInt(s_points[0]), Integer.parseInt(s_points[1])));\n\t\t}\n\n\t\tDeque<points> d = new ArrayDeque<>();\n\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tint target = i;\n\t\t\td.addAll(line);\n\t\t\twhile (!(d.isEmpty())) {\n\t\t\t\tpoints p = d.poll();\n\n\t\t\t\tif (target == p.point_a) {\n\t\t\t\t\ttarget = p.point_b;\n\t\t\t\t} else if (target == p.point_b) {\n\t\t\t\t\ttarget = p.point_a;\n\t\t\t\t}\n\t\t\t\t/* System.out.println(p.point_a+\" \"+p.point_b); */\n\t\t\t}\n\t\t\tans[target] = i;\n\t\t}\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t}",
"main",
"{\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint w = Integer.parseInt(br.readLine());\n\n\t\tint n = Integer.parseInt(br.readLine());\n\n\t\tint[] ans = new int[w + 1];\n\n\t\tList<points> line = new ArrayList<>();\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString[] s_points = br.readLine().split(\",\");\n\n\t\t\tline.add(new points(Integer.parseInt(s_points[0]), Integer.parseInt(s_points[1])));\n\t\t}\n\n\t\tDeque<points> d = new ArrayDeque<>();\n\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tint target = i;\n\t\t\td.addAll(line);\n\t\t\twhile (!(d.isEmpty())) {\n\t\t\t\tpoints p = d.poll();\n\n\t\t\t\tif (target == p.point_a) {\n\t\t\t\t\ttarget = p.point_b;\n\t\t\t\t} else if (target == p.point_b) {\n\t\t\t\t\ttarget = p.point_a;\n\t\t\t\t}\n\t\t\t\t/* System.out.println(p.point_a+\" \"+p.point_b); */\n\t\t\t}\n\t\t\tans[target] = i;\n\t\t}\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tSystem.out.println(ans[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[] ans = new int[w + 1];",
"ans",
"new int[w + 1]",
"w + 1",
"w",
"1",
"List<points> line = new ArrayList<>();",
"line",
"new ArrayList<>()",
"for (int i = 0; i < n; i++) {\n\t\t\tString[] s_points = br.readLine().split(\",\");\n\n\t\t\tline.add(new points(Integer.parseInt(s_points[0]), Integer.parseInt(s_points[1])));\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString[] s_points = br.readLine().split(\",\");\n\n\t\t\tline.add(new points(Integer.parseInt(s_points[0]), Integer.parseInt(s_points[1])));\n\t\t}",
"{\n\t\t\tString[] s_points = br.readLine().split(\",\");\n\n\t\t\tline.add(new points(Integer.parseInt(s_points[0]), Integer.parseInt(s_points[1])));\n\t\t}",
"String[] s_points = br.readLine().split(\",\");",
"s_points",
"br.readLine().split(\",\")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\",\"",
"line.add(new points(Integer.parseInt(s_points[0]), Integer.parseInt(s_points[1])))",
"line.add",
"line",
"new points(Integer.parseInt(s_points[0]), Integer.parseInt(s_points[1]))",
"Deque<points> d = new ArrayDeque<>();",
"d",
"new ArrayDeque<>()",
"for (int i = 1; i <= w; i++) {\n\t\t\tint target = i;\n\t\t\td.addAll(line);\n\t\t\twhile (!(d.isEmpty())) {\n\t\t\t\tpoints p = d.poll();\n\n\t\t\t\tif (target == p.point_a) {\n\t\t\t\t\ttarget = p.point_b;\n\t\t\t\t} else if (target == p.point_b) {\n\t\t\t\t\ttarget = p.point_a;\n\t\t\t\t}\n\t\t\t\t/* System.out.println(p.point_a+\" \"+p.point_b); */\n\t\t\t}\n\t\t\tans[target] = i;\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tint target = i;\n\t\t\td.addAll(line);\n\t\t\twhile (!(d.isEmpty())) {\n\t\t\t\tpoints p = d.poll();\n\n\t\t\t\tif (target == p.point_a) {\n\t\t\t\t\ttarget = p.point_b;\n\t\t\t\t} else if (target == p.point_b) {\n\t\t\t\t\ttarget = p.point_a;\n\t\t\t\t}\n\t\t\t\t/* System.out.println(p.point_a+\" \"+p.point_b); */\n\t\t\t}\n\t\t\tans[target] = i;\n\t\t}",
"{\n\t\t\tint target = i;\n\t\t\td.addAll(line);\n\t\t\twhile (!(d.isEmpty())) {\n\t\t\t\tpoints p = d.poll();\n\n\t\t\t\tif (target == p.point_a) {\n\t\t\t\t\ttarget = p.point_b;\n\t\t\t\t} else if (target == p.point_b) {\n\t\t\t\t\ttarget = p.point_a;\n\t\t\t\t}\n\t\t\t\t/* System.out.println(p.point_a+\" \"+p.point_b); */\n\t\t\t}\n\t\t\tans[target] = i;\n\t\t}",
"int target = i;",
"target",
"i",
"d.addAll(line)",
"d.addAll",
"d",
"line",
"while (!(d.isEmpty())) {\n\t\t\t\tpoints p = d.poll();\n\n\t\t\t\tif (target == p.point_a) {\n\t\t\t\t\ttarget = p.point_b;\n\t\t\t\t} else if (target == p.point_b) {\n\t\t\t\t\ttarget = p.point_a;\n\t\t\t\t}\n\t\t\t\t/* System.out.println(p.point_a+\" \"+p.point_b); */\n\t\t\t}",
"!(d.isEmpty())",
"(d.isEmpty())",
"d.isEmpty",
"d",
"{\n\t\t\t\tpoints p = d.poll();\n\n\t\t\t\tif (target == p.point_a) {\n\t\t\t\t\ttarget = p.point_b;\n\t\t\t\t} else if (target == p.point_b) {\n\t\t\t\t\ttarget = p.point_a;\n\t\t\t\t}\n\t\t\t\t/* System.out.println(p.point_a+\" \"+p.point_b); */\n\t\t\t}",
"points p = d.poll();",
"p",
"d.poll()",
"d.poll",
"d",
"if (target == p.point_a) {\n\t\t\t\t\ttarget = p.point_b;\n\t\t\t\t} else if (target == p.point_b) {\n\t\t\t\t\ttarget = p.point_a;\n\t\t\t\t}",
"target == p.point_a",
"target",
"p.point_a",
"p",
"p.point_a",
"{\n\t\t\t\t\ttarget = p.point_b;\n\t\t\t\t}",
"target = p.point_b",
"target",
"p.point_b",
"p",
"p.point_b",
"if (target == p.point_b) {\n\t\t\t\t\ttarget = p.point_a;\n\t\t\t\t}",
"target == p.point_b",
"target",
"p.point_b",
"p",
"p.point_b",
"{\n\t\t\t\t\ttarget = p.point_a;\n\t\t\t\t}",
"target = p.point_a",
"target",
"p.point_a",
"p",
"p.point_a",
"ans[target] = i",
"ans[target]",
"ans",
"target",
"i",
"for (int i = 1; i <= w; i++) {\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[] args",
"args",
"static class points {\n\t\tint point_a;\n\t\tint point_b;\n\n\t\tpublic points(int a, int b) {\n\t\t\tthis.point_a = a;\n\t\t\tthis.point_b = b;\n\t\t}\n\t}",
"points",
"int point_a;",
"point_a",
"int point_b;",
"point_b",
"public points(int a, int b) {\n\t\t\tthis.point_a = a;\n\t\t\tthis.point_b = b;\n\t\t}",
"points",
"{\n\t\t\tthis.point_a = a;\n\t\t\tthis.point_b = b;\n\t\t}",
"this.point_a = a",
"this.point_a",
"this",
"this.point_a",
"a",
"this.point_b = b",
"this.point_b",
"this",
"this.point_b",
"b",
"int a",
"a",
"int b",
"b",
"public class Main {\n\n\t@SuppressWarnings(\"unchecked\")\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint w = Integer.parseInt(br.readLine());\n\n\t\tint n = Integer.parseInt(br.readLine());\n\n\t\tint[] ans = new int[w + 1];\n\n\t\tList<points> line = new ArrayList<>();\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString[] s_points = br.readLine().split(\",\");\n\n\t\t\tline.add(new points(Integer.parseInt(s_points[0]), Integer.parseInt(s_points[1])));\n\t\t}\n\n\t\tDeque<points> d = new ArrayDeque<>();\n\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tint target = i;\n\t\t\td.addAll(line);\n\t\t\twhile (!(d.isEmpty())) {\n\t\t\t\tpoints p = d.poll();\n\n\t\t\t\tif (target == p.point_a) {\n\t\t\t\t\ttarget = p.point_b;\n\t\t\t\t} else if (target == p.point_b) {\n\t\t\t\t\ttarget = p.point_a;\n\t\t\t\t}\n\t\t\t\t/* System.out.println(p.point_a+\" \"+p.point_b); */\n\t\t\t}\n\t\t\tans[target] = i;\n\t\t}\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t}\n\n\tstatic class points {\n\t\tint point_a;\n\t\tint point_b;\n\n\t\tpublic points(int a, int b) {\n\t\t\tthis.point_a = a;\n\t\t\tthis.point_b = b;\n\t\t}\n\t}\n\n}",
"public class Main {\n\n\t@SuppressWarnings(\"unchecked\")\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint w = Integer.parseInt(br.readLine());\n\n\t\tint n = Integer.parseInt(br.readLine());\n\n\t\tint[] ans = new int[w + 1];\n\n\t\tList<points> line = new ArrayList<>();\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString[] s_points = br.readLine().split(\",\");\n\n\t\t\tline.add(new points(Integer.parseInt(s_points[0]), Integer.parseInt(s_points[1])));\n\t\t}\n\n\t\tDeque<points> d = new ArrayDeque<>();\n\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tint target = i;\n\t\t\td.addAll(line);\n\t\t\twhile (!(d.isEmpty())) {\n\t\t\t\tpoints p = d.poll();\n\n\t\t\t\tif (target == p.point_a) {\n\t\t\t\t\ttarget = p.point_b;\n\t\t\t\t} else if (target == p.point_b) {\n\t\t\t\t\ttarget = p.point_a;\n\t\t\t\t}\n\t\t\t\t/* System.out.println(p.point_a+\" \"+p.point_b); */\n\t\t\t}\n\t\t\tans[target] = i;\n\t\t}\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t}\n\n\tstatic class points {\n\t\tint point_a;\n\t\tint point_b;\n\n\t\tpublic points(int a, int b) {\n\t\t\tthis.point_a = a;\n\t\t\tthis.point_b = b;\n\t\t}\n\t}\n\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Deque;
import java.util.List;
public class Main {
@SuppressWarnings("unchecked")
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[] ans = new int[w + 1];
List<points> line = new ArrayList<>();
for (int i = 0; i < n; i++) {
String[] s_points = br.readLine().split(",");
line.add(new points(Integer.parseInt(s_points[0]), Integer.parseInt(s_points[1])));
}
Deque<points> d = new ArrayDeque<>();
for (int i = 1; i <= w; i++) {
int target = i;
d.addAll(line);
while (!(d.isEmpty())) {
points p = d.poll();
if (target == p.point_a) {
target = p.point_b;
} else if (target == p.point_b) {
target = p.point_a;
}
/* System.out.println(p.point_a+" "+p.point_b); */
}
ans[target] = i;
}
for (int i = 1; i <= w; i++) {
System.out.println(ans[i]);
}
}
static class points {
int point_a;
int point_b;
public points(int a, int b) {
this.point_a = a;
this.point_b = b;
}
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
13,
13,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
13,
13,
2,
4,
18,
13,
17,
2,
4,
18,
13,
17,
4,
13,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
13,
17,
29,
13,
23,
13,
12,
13,
30,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
140,
5
],
[
140,
6
],
[
6,
7
],
[
6,
8
],
[
140,
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
],
[
24,
25
],
[
24,
26
],
[
11,
27
],
[
27,
28
],
[
28,
29
],
[
27,
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
],
[
44,
46
],
[
44,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
47,
51
],
[
44,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
52,
56
],
[
11,
57
],
[
57,
58
],
[
57,
59
],
[
9,
60
],
[
60,
61
],
[
140,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
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
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
86,
88
],
[
64,
89
],
[
89,
90
],
[
62,
91
],
[
91,
92
],
[
140,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
100,
101
],
[
100,
102
],
[
95,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
107,
108
],
[
107,
109
],
[
95,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
114,
115
],
[
114,
116
],
[
93,
117
],
[
117,
118
],
[
93,
119
],
[
119,
120
],
[
93,
121
],
[
121,
122
],
[
140,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
126,
129
],
[
130,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
131,
136
],
[
123,
137
],
[
137,
138
],
[
0,
139
],
[
139,
140
],
[
139,
141
]
] | [
"import java.util.*;\n\npublic class Main {\n private static final Scanner scn = new Scanner(System.in);\n \n public static void main(String[] args) {\n int w = scn.nextInt(), n = scn.nextInt();\n int[] ary = createArray(w);\n scn.useDelimiter(\"\\\\s+|,\");\n for(int i = 0; i < n; i++) {\n swapArray(ary, scn.nextInt() - 1, scn.nextInt() - 1);\n }\n showArray(ary);\n }\n \n private static int[] createArray(int w) {\n int[] ary = new int[w];\n for(int i = 0; i < w; i++) {\n ary[i] = i + 1;\n }\n return ary;\n }\n \n private static void swapArray(int[] ary, int x, int y) {\n ary[x] ^= ary[y];\n ary[y] ^= ary[x];\n ary[x] ^= ary[y];\n }\n \n private static void showArray(int[] ary) {\n for(int elm : ary) {\n System.out.println(elm);\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n private static final Scanner scn = new Scanner(System.in);\n \n public static void main(String[] args) {\n int w = scn.nextInt(), n = scn.nextInt();\n int[] ary = createArray(w);\n scn.useDelimiter(\"\\\\s+|,\");\n for(int i = 0; i < n; i++) {\n swapArray(ary, scn.nextInt() - 1, scn.nextInt() - 1);\n }\n showArray(ary);\n }\n \n private static int[] createArray(int w) {\n int[] ary = new int[w];\n for(int i = 0; i < w; i++) {\n ary[i] = i + 1;\n }\n return ary;\n }\n \n private static void swapArray(int[] ary, int x, int y) {\n ary[x] ^= ary[y];\n ary[y] ^= ary[x];\n ary[x] ^= ary[y];\n }\n \n private static void showArray(int[] ary) {\n for(int elm : ary) {\n System.out.println(elm);\n }\n }\n}",
"Main",
"private static final Scanner scn = new Scanner(System.in);",
"scn",
"new Scanner(System.in)",
"public static void main(String[] args) {\n int w = scn.nextInt(), n = scn.nextInt();\n int[] ary = createArray(w);\n scn.useDelimiter(\"\\\\s+|,\");\n for(int i = 0; i < n; i++) {\n swapArray(ary, scn.nextInt() - 1, scn.nextInt() - 1);\n }\n showArray(ary);\n }",
"main",
"{\n int w = scn.nextInt(), n = scn.nextInt();\n int[] ary = createArray(w);\n scn.useDelimiter(\"\\\\s+|,\");\n for(int i = 0; i < n; i++) {\n swapArray(ary, scn.nextInt() - 1, scn.nextInt() - 1);\n }\n showArray(ary);\n }",
"int w = scn.nextInt()",
"w",
"scn.nextInt()",
"scn.nextInt",
"scn",
"n = scn.nextInt();",
"n",
"scn.nextInt()",
"scn.nextInt",
"scn",
"int[] ary = createArray(w);",
"ary",
"createArray(w)",
"createArray",
"w",
"scn.useDelimiter(\"\\\\s+|,\")",
"scn.useDelimiter",
"scn",
"\"\\\\s+|,\"",
"for(int i = 0; i < n; i++) {\n swapArray(ary, scn.nextInt() - 1, scn.nextInt() - 1);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n swapArray(ary, scn.nextInt() - 1, scn.nextInt() - 1);\n }",
"{\n swapArray(ary, scn.nextInt() - 1, scn.nextInt() - 1);\n }",
"swapArray(ary, scn.nextInt() - 1, scn.nextInt() - 1)",
"swapArray",
"ary",
"scn.nextInt() - 1",
"scn.nextInt()",
"scn.nextInt",
"scn",
"1",
"scn.nextInt() - 1",
"scn.nextInt()",
"scn.nextInt",
"scn",
"1",
"showArray(ary)",
"showArray",
"ary",
"String[] args",
"args",
"private static int[] createArray(int w) {\n int[] ary = new int[w];\n for(int i = 0; i < w; i++) {\n ary[i] = i + 1;\n }\n return ary;\n }",
"createArray",
"{\n int[] ary = new int[w];\n for(int i = 0; i < w; i++) {\n ary[i] = i + 1;\n }\n return ary;\n }",
"int[] ary = new int[w];",
"ary",
"new int[w]",
"w",
"for(int i = 0; i < w; i++) {\n ary[i] = i + 1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n ary[i] = i + 1;\n }",
"{\n ary[i] = i + 1;\n }",
"ary[i] = i + 1",
"ary[i]",
"ary",
"i",
"i + 1",
"i",
"1",
"return ary;",
"ary",
"int w",
"w",
"private static void swapArray(int[] ary, int x, int y) {\n ary[x] ^= ary[y];\n ary[y] ^= ary[x];\n ary[x] ^= ary[y];\n }",
"swapArray",
"{\n ary[x] ^= ary[y];\n ary[y] ^= ary[x];\n ary[x] ^= ary[y];\n }",
"ary[x] ^= ary[y]",
"ary[x]",
"ary",
"x",
"ary[y]",
"ary",
"y",
"ary[y] ^= ary[x]",
"ary[y]",
"ary",
"y",
"ary[x]",
"ary",
"x",
"ary[x] ^= ary[y]",
"ary[x]",
"ary",
"x",
"ary[y]",
"ary",
"y",
"int[] ary",
"ary",
"int x",
"x",
"int y",
"y",
"private static void showArray(int[] ary) {\n for(int elm : ary) {\n System.out.println(elm);\n }\n }",
"showArray",
"{\n for(int elm : ary) {\n System.out.println(elm);\n }\n }",
"for(int elm : ary) {\n System.out.println(elm);\n }",
"int elm",
"ary",
"{\n System.out.println(elm);\n }",
"{\n System.out.println(elm);\n }",
"System.out.println(elm)",
"System.out.println",
"System.out",
"System",
"System.out",
"elm",
"int[] ary",
"ary",
"public class Main {\n private static final Scanner scn = new Scanner(System.in);\n \n public static void main(String[] args) {\n int w = scn.nextInt(), n = scn.nextInt();\n int[] ary = createArray(w);\n scn.useDelimiter(\"\\\\s+|,\");\n for(int i = 0; i < n; i++) {\n swapArray(ary, scn.nextInt() - 1, scn.nextInt() - 1);\n }\n showArray(ary);\n }\n \n private static int[] createArray(int w) {\n int[] ary = new int[w];\n for(int i = 0; i < w; i++) {\n ary[i] = i + 1;\n }\n return ary;\n }\n \n private static void swapArray(int[] ary, int x, int y) {\n ary[x] ^= ary[y];\n ary[y] ^= ary[x];\n ary[x] ^= ary[y];\n }\n \n private static void showArray(int[] ary) {\n for(int elm : ary) {\n System.out.println(elm);\n }\n }\n}",
"public class Main {\n private static final Scanner scn = new Scanner(System.in);\n \n public static void main(String[] args) {\n int w = scn.nextInt(), n = scn.nextInt();\n int[] ary = createArray(w);\n scn.useDelimiter(\"\\\\s+|,\");\n for(int i = 0; i < n; i++) {\n swapArray(ary, scn.nextInt() - 1, scn.nextInt() - 1);\n }\n showArray(ary);\n }\n \n private static int[] createArray(int w) {\n int[] ary = new int[w];\n for(int i = 0; i < w; i++) {\n ary[i] = i + 1;\n }\n return ary;\n }\n \n private static void swapArray(int[] ary, int x, int y) {\n ary[x] ^= ary[y];\n ary[y] ^= ary[x];\n ary[x] ^= ary[y];\n }\n \n private static void showArray(int[] ary) {\n for(int elm : ary) {\n System.out.println(elm);\n }\n }\n}",
"Main"
] | import java.util.*;
public class Main {
private static final Scanner scn = new Scanner(System.in);
public static void main(String[] args) {
int w = scn.nextInt(), n = scn.nextInt();
int[] ary = createArray(w);
scn.useDelimiter("\\s+|,");
for(int i = 0; i < n; i++) {
swapArray(ary, scn.nextInt() - 1, scn.nextInt() - 1);
}
showArray(ary);
}
private static int[] createArray(int w) {
int[] ary = new int[w];
for(int i = 0; i < w; i++) {
ary[i] = i + 1;
}
return ary;
}
private static void swapArray(int[] ary, int x, int y) {
ary[x] ^= ary[y];
ary[y] ^= ary[x];
ary[x] ^= ary[y];
}
private static void showArray(int[] ary) {
for(int elm : ary) {
System.out.println(elm);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
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,
20,
17,
0,
18,
13,
17,
4,
18,
13,
18,
13,
17,
0,
18,
13,
17,
4,
18,
13,
18,
13,
17,
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,
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
],
[
157,
8
],
[
157,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
17,
20
],
[
20,
21
],
[
21,
22
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
28,
29
],
[
29,
30
],
[
11,
31
],
[
31,
32
],
[
31,
33
],
[
11,
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
],
[
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
],
[
72,
73
],
[
73,
74
],
[
70,
75
],
[
67,
76
],
[
76,
77
],
[
76,
78
],
[
67,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
87,
88
],
[
87,
89
],
[
67,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
97,
98
],
[
97,
99
],
[
67,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
67,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
112,
116
],
[
109,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
119,
123
],
[
67,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
127,
131
],
[
124,
132
],
[
11,
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
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
146,
151
],
[
151,
152
],
[
151,
153
],
[
9,
154
],
[
154,
155
],
[
0,
156
],
[
156,
157
],
[
156,
158
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n BufferedReader read = new BufferedReader(\n new java.io.InputStreamReader(System.in));\n\n int w = Integer.parseInt(read.readLine());\n int n = Integer.parseInt(read.readLine());\n int [] var = new int [w];\nfor(int j=0;j<w;j++){\n\tvar[j]=j+1;\n}\n//String x[] = new String[2];\n for(int i=0;i<n;i++){\n //\t System.out.println(\"A\");\n String x[]= read.readLine().split(\",\");\n int str[] =new int[2];\n str[0]=Integer.parseInt(x[0]);\n str[1]=Integer.parseInt(x[1]);\n // System.out.println(\"B\");\n int tmp=var[str[0]-1];\n\n var[str[0]-1]=var[str[1]-1];\n var[str[1]-1]=tmp;\n\t // System.out.println(\"Str\"+str[0]+\",\"+str[1]);\n\n\t// System.out.println(\"var\"+var[0]+\",\"+var[1]);\n //System.out.println(z[2]);\n //System.out.println(x);\n\t// TODO ティツ?ェテ・ツ仰陛ァツ板淌ヲツ按静」ツ?陛」ツつ古」ツ?淌」ツδ。テ」ツつステ」ツδε」ツδ嘉」ツδサテ」ツつケテ」ツつソテ」ツδ?\n }\n for(int i=0;i<w;i++){\n System.out.println(var[i]);\n }\n\t}\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"public class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n BufferedReader read = new BufferedReader(\n new java.io.InputStreamReader(System.in));\n\n int w = Integer.parseInt(read.readLine());\n int n = Integer.parseInt(read.readLine());\n int [] var = new int [w];\nfor(int j=0;j<w;j++){\n\tvar[j]=j+1;\n}\n//String x[] = new String[2];\n for(int i=0;i<n;i++){\n //\t System.out.println(\"A\");\n String x[]= read.readLine().split(\",\");\n int str[] =new int[2];\n str[0]=Integer.parseInt(x[0]);\n str[1]=Integer.parseInt(x[1]);\n // System.out.println(\"B\");\n int tmp=var[str[0]-1];\n\n var[str[0]-1]=var[str[1]-1];\n var[str[1]-1]=tmp;\n\t // System.out.println(\"Str\"+str[0]+\",\"+str[1]);\n\n\t// System.out.println(\"var\"+var[0]+\",\"+var[1]);\n //System.out.println(z[2]);\n //System.out.println(x);\n\t// TODO ティツ?ェテ・ツ仰陛ァツ板淌ヲツ按静」ツ?陛」ツつ古」ツ?淌」ツδ。テ」ツつステ」ツδε」ツδ嘉」ツδサテ」ツつケテ」ツつソテ」ツδ?\n }\n for(int i=0;i<w;i++){\n System.out.println(var[i]);\n }\n\t}\n\n}",
"Main",
"public static void main(String[] args) throws NumberFormatException, IOException {\n BufferedReader read = new BufferedReader(\n new java.io.InputStreamReader(System.in));\n\n int w = Integer.parseInt(read.readLine());\n int n = Integer.parseInt(read.readLine());\n int [] var = new int [w];\nfor(int j=0;j<w;j++){\n\tvar[j]=j+1;\n}\n//String x[] = new String[2];\n for(int i=0;i<n;i++){\n //\t System.out.println(\"A\");\n String x[]= read.readLine().split(\",\");\n int str[] =new int[2];\n str[0]=Integer.parseInt(x[0]);\n str[1]=Integer.parseInt(x[1]);\n // System.out.println(\"B\");\n int tmp=var[str[0]-1];\n\n var[str[0]-1]=var[str[1]-1];\n var[str[1]-1]=tmp;\n\t // System.out.println(\"Str\"+str[0]+\",\"+str[1]);\n\n\t// System.out.println(\"var\"+var[0]+\",\"+var[1]);\n //System.out.println(z[2]);\n //System.out.println(x);\n\t// TODO ティツ?ェテ・ツ仰陛ァツ板淌ヲツ按静」ツ?陛」ツつ古」ツ?淌」ツδ。テ」ツつステ」ツδε」ツδ嘉」ツδサテ」ツつケテ」ツつソテ」ツδ?\n }\n for(int i=0;i<w;i++){\n System.out.println(var[i]);\n }\n\t}",
"main",
"{\n BufferedReader read = new BufferedReader(\n new java.io.InputStreamReader(System.in));\n\n int w = Integer.parseInt(read.readLine());\n int n = Integer.parseInt(read.readLine());\n int [] var = new int [w];\nfor(int j=0;j<w;j++){\n\tvar[j]=j+1;\n}\n//String x[] = new String[2];\n for(int i=0;i<n;i++){\n //\t System.out.println(\"A\");\n String x[]= read.readLine().split(\",\");\n int str[] =new int[2];\n str[0]=Integer.parseInt(x[0]);\n str[1]=Integer.parseInt(x[1]);\n // System.out.println(\"B\");\n int tmp=var[str[0]-1];\n\n var[str[0]-1]=var[str[1]-1];\n var[str[1]-1]=tmp;\n\t // System.out.println(\"Str\"+str[0]+\",\"+str[1]);\n\n\t// System.out.println(\"var\"+var[0]+\",\"+var[1]);\n //System.out.println(z[2]);\n //System.out.println(x);\n\t// TODO ティツ?ェテ・ツ仰陛ァツ板淌ヲツ按静」ツ?陛」ツつ古」ツ?淌」ツδ。テ」ツつステ」ツδε」ツδ嘉」ツδサテ」ツつケテ」ツつソテ」ツδ?\n }\n for(int i=0;i<w;i++){\n System.out.println(var[i]);\n }\n\t}",
"BufferedReader read = new BufferedReader(\n new java.io.InputStreamReader(System.in));",
"read",
"new BufferedReader(\n new java.io.InputStreamReader(System.in))",
"int w = Integer.parseInt(read.readLine());",
"w",
"Integer.parseInt(read.readLine())",
"Integer.parseInt",
"Integer",
"read.readLine()",
"read.readLine",
"read",
"int n = Integer.parseInt(read.readLine());",
"n",
"Integer.parseInt(read.readLine())",
"Integer.parseInt",
"Integer",
"read.readLine()",
"read.readLine",
"read",
"int [] var = new int [w];",
"var",
"new int [w]",
"w",
"for(int j=0;j<w;j++){\n\tvar[j]=j+1;\n}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<w",
"j",
"w",
"j++",
"j++",
"j",
"{\n\tvar[j]=j+1;\n}",
"{\n\tvar[j]=j+1;\n}",
"var[j]=j+1",
"var[j]",
"var",
"j",
"j+1",
"j",
"1",
"for(int i=0;i<n;i++){\n //\t System.out.println(\"A\");\n String x[]= read.readLine().split(\",\");\n int str[] =new int[2];\n str[0]=Integer.parseInt(x[0]);\n str[1]=Integer.parseInt(x[1]);\n // System.out.println(\"B\");\n int tmp=var[str[0]-1];\n\n var[str[0]-1]=var[str[1]-1];\n var[str[1]-1]=tmp;\n\t // System.out.println(\"Str\"+str[0]+\",\"+str[1]);\n\n\t// System.out.println(\"var\"+var[0]+\",\"+var[1]);\n //System.out.println(z[2]);\n //System.out.println(x);\n\t// TODO ティツ?ェテ・ツ仰陛ァツ板淌ヲツ按静」ツ?陛」ツつ古」ツ?淌」ツδ。テ」ツつステ」ツδε」ツδ嘉」ツδサテ」ツつケテ」ツつソテ」ツδ?\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n //\t System.out.println(\"A\");\n String x[]= read.readLine().split(\",\");\n int str[] =new int[2];\n str[0]=Integer.parseInt(x[0]);\n str[1]=Integer.parseInt(x[1]);\n // System.out.println(\"B\");\n int tmp=var[str[0]-1];\n\n var[str[0]-1]=var[str[1]-1];\n var[str[1]-1]=tmp;\n\t // System.out.println(\"Str\"+str[0]+\",\"+str[1]);\n\n\t// System.out.println(\"var\"+var[0]+\",\"+var[1]);\n //System.out.println(z[2]);\n //System.out.println(x);\n\t// TODO ティツ?ェテ・ツ仰陛ァツ板淌ヲツ按静」ツ?陛」ツつ古」ツ?淌」ツδ。テ」ツつステ」ツδε」ツδ嘉」ツδサテ」ツつケテ」ツつソテ」ツδ?\n }",
"{\n //\t System.out.println(\"A\");\n String x[]= read.readLine().split(\",\");\n int str[] =new int[2];\n str[0]=Integer.parseInt(x[0]);\n str[1]=Integer.parseInt(x[1]);\n // System.out.println(\"B\");\n int tmp=var[str[0]-1];\n\n var[str[0]-1]=var[str[1]-1];\n var[str[1]-1]=tmp;\n\t // System.out.println(\"Str\"+str[0]+\",\"+str[1]);\n\n\t// System.out.println(\"var\"+var[0]+\",\"+var[1]);\n //System.out.println(z[2]);\n //System.out.println(x);\n\t// TODO ティツ?ェテ・ツ仰陛ァツ板淌ヲツ按静」ツ?陛」ツつ古」ツ?淌」ツδ。テ」ツつステ」ツδε」ツδ嘉」ツδサテ」ツつケテ」ツつソテ」ツδ?\n }",
"String x[]= read.readLine().split(\",\");",
"x",
"read.readLine().split(\",\")",
"read.readLine().split",
"read.readLine()",
"read.readLine",
"read",
"\",\"",
"int str[] =new int[2];",
"str",
"new int[2]",
"2",
"str[0]=Integer.parseInt(x[0])",
"str[0]",
"str",
"0",
"Integer.parseInt(x[0])",
"Integer.parseInt",
"Integer",
"x[0]",
"x",
"0",
"str[1]=Integer.parseInt(x[1])",
"str[1]",
"str",
"1",
"Integer.parseInt(x[1])",
"Integer.parseInt",
"Integer",
"x[1]",
"x",
"1",
"int tmp=var[str[0]-1];",
"tmp",
"var[str[0]-1]",
"var",
"str[0]-1",
"str[0]",
"str",
"0",
"1",
"var[str[0]-1]=var[str[1]-1]",
"var[str[0]-1]",
"var",
"str[0]-1",
"str[0]",
"str",
"0",
"1",
"var[str[1]-1]",
"var",
"str[1]-1",
"str[1]",
"str",
"1",
"1",
"var[str[1]-1]=tmp",
"var[str[1]-1]",
"var",
"str[1]-1",
"str[1]",
"str",
"1",
"1",
"tmp",
"for(int i=0;i<w;i++){\n System.out.println(var[i]);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"{\n System.out.println(var[i]);\n }",
"{\n System.out.println(var[i]);\n }",
"System.out.println(var[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"var[i]",
"var",
"i",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n BufferedReader read = new BufferedReader(\n new java.io.InputStreamReader(System.in));\n\n int w = Integer.parseInt(read.readLine());\n int n = Integer.parseInt(read.readLine());\n int [] var = new int [w];\nfor(int j=0;j<w;j++){\n\tvar[j]=j+1;\n}\n//String x[] = new String[2];\n for(int i=0;i<n;i++){\n //\t System.out.println(\"A\");\n String x[]= read.readLine().split(\",\");\n int str[] =new int[2];\n str[0]=Integer.parseInt(x[0]);\n str[1]=Integer.parseInt(x[1]);\n // System.out.println(\"B\");\n int tmp=var[str[0]-1];\n\n var[str[0]-1]=var[str[1]-1];\n var[str[1]-1]=tmp;\n\t // System.out.println(\"Str\"+str[0]+\",\"+str[1]);\n\n\t// System.out.println(\"var\"+var[0]+\",\"+var[1]);\n //System.out.println(z[2]);\n //System.out.println(x);\n\t// TODO ティツ?ェテ・ツ仰陛ァツ板淌ヲツ按静」ツ?陛」ツつ古」ツ?淌」ツδ。テ」ツつステ」ツδε」ツδ嘉」ツδサテ」ツつケテ」ツつソテ」ツδ?\n }\n for(int i=0;i<w;i++){\n System.out.println(var[i]);\n }\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n BufferedReader read = new BufferedReader(\n new java.io.InputStreamReader(System.in));\n\n int w = Integer.parseInt(read.readLine());\n int n = Integer.parseInt(read.readLine());\n int [] var = new int [w];\nfor(int j=0;j<w;j++){\n\tvar[j]=j+1;\n}\n//String x[] = new String[2];\n for(int i=0;i<n;i++){\n //\t System.out.println(\"A\");\n String x[]= read.readLine().split(\",\");\n int str[] =new int[2];\n str[0]=Integer.parseInt(x[0]);\n str[1]=Integer.parseInt(x[1]);\n // System.out.println(\"B\");\n int tmp=var[str[0]-1];\n\n var[str[0]-1]=var[str[1]-1];\n var[str[1]-1]=tmp;\n\t // System.out.println(\"Str\"+str[0]+\",\"+str[1]);\n\n\t// System.out.println(\"var\"+var[0]+\",\"+var[1]);\n //System.out.println(z[2]);\n //System.out.println(x);\n\t// TODO ティツ?ェテ・ツ仰陛ァツ板淌ヲツ按静」ツ?陛」ツつ古」ツ?淌」ツδ。テ」ツつステ」ツδε」ツδ嘉」ツδサテ」ツつケテ」ツつソテ」ツδ?\n }\n for(int i=0;i<w;i++){\n System.out.println(var[i]);\n }\n\t}\n\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
public class Main {
public static void main(String[] args) throws NumberFormatException, IOException {
BufferedReader read = new BufferedReader(
new java.io.InputStreamReader(System.in));
int w = Integer.parseInt(read.readLine());
int n = Integer.parseInt(read.readLine());
int [] var = new int [w];
for(int j=0;j<w;j++){
var[j]=j+1;
}
//String x[] = new String[2];
for(int i=0;i<n;i++){
// System.out.println("A");
String x[]= read.readLine().split(",");
int str[] =new int[2];
str[0]=Integer.parseInt(x[0]);
str[1]=Integer.parseInt(x[1]);
// System.out.println("B");
int tmp=var[str[0]-1];
var[str[0]-1]=var[str[1]-1];
var[str[1]-1]=tmp;
// System.out.println("Str"+str[0]+","+str[1]);
// System.out.println("var"+var[0]+","+var[1]);
//System.out.println(z[2]);
//System.out.println(x);
// TODO ティツ?ェテ・ツ仰陛ァツ板淌ヲツ按静」ツ?陛」ツつ古」ツ?淌」ツδ。テ」ツつステ」ツδε」ツδ嘉」ツδサテ」ツつケテ」ツつソテ」ツδ?
}
for(int i=0;i<w;i++){
System.out.println(var[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,
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,
2,
4,
18,
13,
18,
13,
17,
17,
0,
18,
18,
13,
13,
17,
2,
4,
18,
13,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
18,
13,
18,
18,
13,
13,
17,
0,
18,
13,
18,
18,
13,
13,
17,
18,
13,
18,
18,
13,
13,
17,
0,
18,
13,
18,
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,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
170,
5
],
[
170,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
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
],
[
46,
48
],
[
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
],
[
68,
69
],
[
69,
70
],
[
66,
71
],
[
63,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
72,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
82,
83
],
[
82,
84
],
[
78,
85
],
[
63,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
87,
91
],
[
86,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
96,
97
],
[
96,
98
],
[
92,
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
],
[
113,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
117,
121
],
[
112,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
125,
129
],
[
122,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
132,
136
],
[
112,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
140,
144
],
[
137,
145
],
[
8,
146
],
[
146,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
146,
151
],
[
151,
152
],
[
151,
153
],
[
146,
154
],
[
154,
155
],
[
155,
156
],
[
146,
157
],
[
158,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
161,
163
],
[
159,
164
],
[
164,
165
],
[
164,
166
],
[
6,
167
],
[
167,
168
],
[
0,
169
],
[
169,
170
],
[
169,
171
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint tateLine = sc.nextInt();\n\t\tint yokoLine = sc.nextInt();\n\t\tint[] numList = new int[tateLine];\n\t\t\n\t\tfor (int i = 0; i < tateLine; i++) {\n\t\t\tnumList[i] = i + 1;\n\t\t}\n\t\t\n\t\tint[][] yoko = new int[yokoLine][2];\n\t\t\n\t\tfor (int i = 0; i < yokoLine; i++) {\n\t\t\tString[] s = sc.next().split(\",\");\n\n\t\t\tyoko[i][0] = Integer.parseInt(s[0]) - 1;\n\t\t\tyoko[i][1] = Integer.parseInt(s[1]) - 1;\n\n\t\t}\n\n\t\tfor (int i = 0; i < yokoLine; i++) {\n\t\t\tint b = numList[yoko[i][0]];\n\t\t\tnumList[yoko[i][0]] = numList[yoko[i][1]];\n\t\t\tnumList[yoko[i][1]] = b;\n\t\t}\n\n\t\tfor (int i = 0; i < tateLine; i++) {\n\t\t\tSystem.out.println(numList[i]);\n\t\t}\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint tateLine = sc.nextInt();\n\t\tint yokoLine = sc.nextInt();\n\t\tint[] numList = new int[tateLine];\n\t\t\n\t\tfor (int i = 0; i < tateLine; i++) {\n\t\t\tnumList[i] = i + 1;\n\t\t}\n\t\t\n\t\tint[][] yoko = new int[yokoLine][2];\n\t\t\n\t\tfor (int i = 0; i < yokoLine; i++) {\n\t\t\tString[] s = sc.next().split(\",\");\n\n\t\t\tyoko[i][0] = Integer.parseInt(s[0]) - 1;\n\t\t\tyoko[i][1] = Integer.parseInt(s[1]) - 1;\n\n\t\t}\n\n\t\tfor (int i = 0; i < yokoLine; i++) {\n\t\t\tint b = numList[yoko[i][0]];\n\t\t\tnumList[yoko[i][0]] = numList[yoko[i][1]];\n\t\t\tnumList[yoko[i][1]] = b;\n\t\t}\n\n\t\tfor (int i = 0; i < tateLine; i++) {\n\t\t\tSystem.out.println(numList[i]);\n\t\t}\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint tateLine = sc.nextInt();\n\t\tint yokoLine = sc.nextInt();\n\t\tint[] numList = new int[tateLine];\n\t\t\n\t\tfor (int i = 0; i < tateLine; i++) {\n\t\t\tnumList[i] = i + 1;\n\t\t}\n\t\t\n\t\tint[][] yoko = new int[yokoLine][2];\n\t\t\n\t\tfor (int i = 0; i < yokoLine; i++) {\n\t\t\tString[] s = sc.next().split(\",\");\n\n\t\t\tyoko[i][0] = Integer.parseInt(s[0]) - 1;\n\t\t\tyoko[i][1] = Integer.parseInt(s[1]) - 1;\n\n\t\t}\n\n\t\tfor (int i = 0; i < yokoLine; i++) {\n\t\t\tint b = numList[yoko[i][0]];\n\t\t\tnumList[yoko[i][0]] = numList[yoko[i][1]];\n\t\t\tnumList[yoko[i][1]] = b;\n\t\t}\n\n\t\tfor (int i = 0; i < tateLine; i++) {\n\t\t\tSystem.out.println(numList[i]);\n\t\t}\n\t}",
"main",
"{\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint tateLine = sc.nextInt();\n\t\tint yokoLine = sc.nextInt();\n\t\tint[] numList = new int[tateLine];\n\t\t\n\t\tfor (int i = 0; i < tateLine; i++) {\n\t\t\tnumList[i] = i + 1;\n\t\t}\n\t\t\n\t\tint[][] yoko = new int[yokoLine][2];\n\t\t\n\t\tfor (int i = 0; i < yokoLine; i++) {\n\t\t\tString[] s = sc.next().split(\",\");\n\n\t\t\tyoko[i][0] = Integer.parseInt(s[0]) - 1;\n\t\t\tyoko[i][1] = Integer.parseInt(s[1]) - 1;\n\n\t\t}\n\n\t\tfor (int i = 0; i < yokoLine; i++) {\n\t\t\tint b = numList[yoko[i][0]];\n\t\t\tnumList[yoko[i][0]] = numList[yoko[i][1]];\n\t\t\tnumList[yoko[i][1]] = b;\n\t\t}\n\n\t\tfor (int i = 0; i < tateLine; i++) {\n\t\t\tSystem.out.println(numList[i]);\n\t\t}\n\t}",
"@SuppressWarnings(\"resource\")\n\t\tScanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int tateLine = sc.nextInt();",
"tateLine",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int yokoLine = sc.nextInt();",
"yokoLine",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] numList = new int[tateLine];",
"numList",
"new int[tateLine]",
"tateLine",
"for (int i = 0; i < tateLine; i++) {\n\t\t\tnumList[i] = i + 1;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < tateLine",
"i",
"tateLine",
"i++",
"i++",
"i",
"{\n\t\t\tnumList[i] = i + 1;\n\t\t}",
"{\n\t\t\tnumList[i] = i + 1;\n\t\t}",
"numList[i] = i + 1",
"numList[i]",
"numList",
"i",
"i + 1",
"i",
"1",
"int[][] yoko = new int[yokoLine][2];",
"yoko",
"new int[yokoLine][2]",
"yokoLine",
"2",
"for (int i = 0; i < yokoLine; i++) {\n\t\t\tString[] s = sc.next().split(\",\");\n\n\t\t\tyoko[i][0] = Integer.parseInt(s[0]) - 1;\n\t\t\tyoko[i][1] = Integer.parseInt(s[1]) - 1;\n\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < yokoLine",
"i",
"yokoLine",
"i++",
"i++",
"i",
"{\n\t\t\tString[] s = sc.next().split(\",\");\n\n\t\t\tyoko[i][0] = Integer.parseInt(s[0]) - 1;\n\t\t\tyoko[i][1] = Integer.parseInt(s[1]) - 1;\n\n\t\t}",
"{\n\t\t\tString[] s = sc.next().split(\",\");\n\n\t\t\tyoko[i][0] = Integer.parseInt(s[0]) - 1;\n\t\t\tyoko[i][1] = Integer.parseInt(s[1]) - 1;\n\n\t\t}",
"String[] s = sc.next().split(\",\");",
"s",
"sc.next().split(\",\")",
"sc.next().split",
"sc.next()",
"sc.next",
"sc",
"\",\"",
"yoko[i][0] = Integer.parseInt(s[0]) - 1",
"yoko[i][0]",
"yoko[i]",
"yoko",
"i",
"0",
"Integer.parseInt(s[0]) - 1",
"Integer.parseInt(s[0])",
"Integer.parseInt",
"Integer",
"s[0]",
"s",
"0",
"1",
"yoko[i][1] = Integer.parseInt(s[1]) - 1",
"yoko[i][1]",
"yoko[i]",
"yoko",
"i",
"1",
"Integer.parseInt(s[1]) - 1",
"Integer.parseInt(s[1])",
"Integer.parseInt",
"Integer",
"s[1]",
"s",
"1",
"1",
"for (int i = 0; i < yokoLine; i++) {\n\t\t\tint b = numList[yoko[i][0]];\n\t\t\tnumList[yoko[i][0]] = numList[yoko[i][1]];\n\t\t\tnumList[yoko[i][1]] = b;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < yokoLine",
"i",
"yokoLine",
"i++",
"i++",
"i",
"{\n\t\t\tint b = numList[yoko[i][0]];\n\t\t\tnumList[yoko[i][0]] = numList[yoko[i][1]];\n\t\t\tnumList[yoko[i][1]] = b;\n\t\t}",
"{\n\t\t\tint b = numList[yoko[i][0]];\n\t\t\tnumList[yoko[i][0]] = numList[yoko[i][1]];\n\t\t\tnumList[yoko[i][1]] = b;\n\t\t}",
"int b = numList[yoko[i][0]];",
"b",
"numList[yoko[i][0]]",
"numList",
"yoko[i][0]",
"yoko[i]",
"yoko",
"i",
"0",
"numList[yoko[i][0]] = numList[yoko[i][1]]",
"numList[yoko[i][0]]",
"numList",
"yoko[i][0]",
"yoko[i]",
"yoko",
"i",
"0",
"numList[yoko[i][1]]",
"numList",
"yoko[i][1]",
"yoko[i]",
"yoko",
"i",
"1",
"numList[yoko[i][1]] = b",
"numList[yoko[i][1]]",
"numList",
"yoko[i][1]",
"yoko[i]",
"yoko",
"i",
"1",
"b",
"for (int i = 0; i < tateLine; i++) {\n\t\t\tSystem.out.println(numList[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < tateLine",
"i",
"tateLine",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(numList[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(numList[i]);\n\t\t}",
"System.out.println(numList[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"numList[i]",
"numList",
"i",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint tateLine = sc.nextInt();\n\t\tint yokoLine = sc.nextInt();\n\t\tint[] numList = new int[tateLine];\n\t\t\n\t\tfor (int i = 0; i < tateLine; i++) {\n\t\t\tnumList[i] = i + 1;\n\t\t}\n\t\t\n\t\tint[][] yoko = new int[yokoLine][2];\n\t\t\n\t\tfor (int i = 0; i < yokoLine; i++) {\n\t\t\tString[] s = sc.next().split(\",\");\n\n\t\t\tyoko[i][0] = Integer.parseInt(s[0]) - 1;\n\t\t\tyoko[i][1] = Integer.parseInt(s[1]) - 1;\n\n\t\t}\n\n\t\tfor (int i = 0; i < yokoLine; i++) {\n\t\t\tint b = numList[yoko[i][0]];\n\t\t\tnumList[yoko[i][0]] = numList[yoko[i][1]];\n\t\t\tnumList[yoko[i][1]] = b;\n\t\t}\n\n\t\tfor (int i = 0; i < tateLine; i++) {\n\t\t\tSystem.out.println(numList[i]);\n\t\t}\n\t}\n\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint tateLine = sc.nextInt();\n\t\tint yokoLine = sc.nextInt();\n\t\tint[] numList = new int[tateLine];\n\t\t\n\t\tfor (int i = 0; i < tateLine; i++) {\n\t\t\tnumList[i] = i + 1;\n\t\t}\n\t\t\n\t\tint[][] yoko = new int[yokoLine][2];\n\t\t\n\t\tfor (int i = 0; i < yokoLine; i++) {\n\t\t\tString[] s = sc.next().split(\",\");\n\n\t\t\tyoko[i][0] = Integer.parseInt(s[0]) - 1;\n\t\t\tyoko[i][1] = Integer.parseInt(s[1]) - 1;\n\n\t\t}\n\n\t\tfor (int i = 0; i < yokoLine; i++) {\n\t\t\tint b = numList[yoko[i][0]];\n\t\t\tnumList[yoko[i][0]] = numList[yoko[i][1]];\n\t\t\tnumList[yoko[i][1]] = b;\n\t\t}\n\n\t\tfor (int i = 0; i < tateLine; i++) {\n\t\t\tSystem.out.println(numList[i]);\n\t\t}\n\t}\n\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
@SuppressWarnings("resource")
Scanner sc = new Scanner(System.in);
int tateLine = sc.nextInt();
int yokoLine = sc.nextInt();
int[] numList = new int[tateLine];
for (int i = 0; i < tateLine; i++) {
numList[i] = i + 1;
}
int[][] yoko = new int[yokoLine][2];
for (int i = 0; i < yokoLine; i++) {
String[] s = sc.next().split(",");
yoko[i][0] = Integer.parseInt(s[0]) - 1;
yoko[i][1] = Integer.parseInt(s[1]) - 1;
}
for (int i = 0; i < yokoLine; i++) {
int b = numList[yoko[i][0]];
numList[yoko[i][0]] = numList[yoko[i][1]];
numList[yoko[i][1]] = b;
}
for (int i = 0; i < tateLine; i++) {
System.out.println(numList[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,
0,
13,
20,
13,
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,
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,
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,
17,
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
],
[
8,
24
],
[
24,
25
],
[
24,
26
],
[
8,
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
],
[
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
],
[
69,
72
],
[
69,
73
],
[
61,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
80,
81
],
[
80,
82
],
[
76,
83
],
[
61,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
90,
91
],
[
90,
92
],
[
86,
93
],
[
61,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
96,
98
],
[
61,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
103,
104
],
[
103,
105
],
[
61,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
106,
110
],
[
8,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
111,
116
],
[
116,
117
],
[
116,
118
],
[
111,
119
],
[
119,
120
],
[
120,
121
],
[
111,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
123,
128
],
[
123,
129
],
[
129,
130
],
[
129,
131
],
[
6,
132
],
[
132,
133
]
] | [
"import java.util.Scanner;\n\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 n = scan.nextInt();\n\t\tint[] amida;\n\t\tamida = new int[w];\n\t\tfor (int i = 0; i < amida.length; i ++) amida[i] = i + 1;\n\t\tfor (int i = 0; i < n; i ++) {\n\t\t\tString line = scan.next();\n\t\t\tString[] ab = line.split(\",\", 0);\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\tint swap = amida[a];\n\t\t\tamida[a] = amida[b];\n\t\t\tamida[b] = swap;\n\t\t}\n\t\tfor (int i = 0; i < w; i ++) System.out.printf(\"%d\\n\", amida[i]);\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 n = scan.nextInt();\n\t\tint[] amida;\n\t\tamida = new int[w];\n\t\tfor (int i = 0; i < amida.length; i ++) amida[i] = i + 1;\n\t\tfor (int i = 0; i < n; i ++) {\n\t\t\tString line = scan.next();\n\t\t\tString[] ab = line.split(\",\", 0);\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\tint swap = amida[a];\n\t\t\tamida[a] = amida[b];\n\t\t\tamida[b] = swap;\n\t\t}\n\t\tfor (int i = 0; i < w; i ++) System.out.printf(\"%d\\n\", amida[i]);\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 n = scan.nextInt();\n\t\tint[] amida;\n\t\tamida = new int[w];\n\t\tfor (int i = 0; i < amida.length; i ++) amida[i] = i + 1;\n\t\tfor (int i = 0; i < n; i ++) {\n\t\t\tString line = scan.next();\n\t\t\tString[] ab = line.split(\",\", 0);\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\tint swap = amida[a];\n\t\t\tamida[a] = amida[b];\n\t\t\tamida[b] = swap;\n\t\t}\n\t\tfor (int i = 0; i < w; i ++) System.out.printf(\"%d\\n\", amida[i]);\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tint[] amida;\n\t\tamida = new int[w];\n\t\tfor (int i = 0; i < amida.length; i ++) amida[i] = i + 1;\n\t\tfor (int i = 0; i < n; i ++) {\n\t\t\tString line = scan.next();\n\t\t\tString[] ab = line.split(\",\", 0);\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\tint swap = amida[a];\n\t\t\tamida[a] = amida[b];\n\t\t\tamida[b] = swap;\n\t\t}\n\t\tfor (int i = 0; i < w; i ++) System.out.printf(\"%d\\n\", amida[i]);\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[] amida;",
"amida",
"amida = new int[w]",
"amida",
"new int[w]",
"w",
"for (int i = 0; i < amida.length; i ++) amida[i] = i + 1;",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < amida.length",
"i",
"amida.length",
"amida",
"amida.length",
"i ++",
"i ++",
"i",
"amida[i] = i + 1;",
"amida[i] = i + 1",
"amida[i]",
"amida",
"i",
"i + 1",
"i",
"1",
"for (int i = 0; i < n; i ++) {\n\t\t\tString line = scan.next();\n\t\t\tString[] ab = line.split(\",\", 0);\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\tint swap = amida[a];\n\t\t\tamida[a] = amida[b];\n\t\t\tamida[b] = swap;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i ++",
"i ++",
"i",
"{\n\t\t\tString line = scan.next();\n\t\t\tString[] ab = line.split(\",\", 0);\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\tint swap = amida[a];\n\t\t\tamida[a] = amida[b];\n\t\t\tamida[b] = swap;\n\t\t}",
"{\n\t\t\tString line = scan.next();\n\t\t\tString[] ab = line.split(\",\", 0);\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\tint swap = amida[a];\n\t\t\tamida[a] = amida[b];\n\t\t\tamida[b] = swap;\n\t\t}",
"String line = scan.next();",
"line",
"scan.next()",
"scan.next",
"scan",
"String[] ab = line.split(\",\", 0);",
"ab",
"line.split(\",\", 0)",
"line.split",
"line",
"\",\"",
"0",
"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 swap = amida[a];",
"swap",
"amida[a]",
"amida",
"a",
"amida[a] = amida[b]",
"amida[a]",
"amida",
"a",
"amida[b]",
"amida",
"b",
"amida[b] = swap",
"amida[b]",
"amida",
"b",
"swap",
"for (int i = 0; i < w; i ++) System.out.printf(\"%d\\n\", amida[i]);",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i ++",
"i ++",
"i",
"System.out.printf(\"%d\\n\", amida[i]);",
"System.out.printf(\"%d\\n\", amida[i])",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%d\\n\"",
"amida[i]",
"amida",
"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 n = scan.nextInt();
int[] amida;
amida = new int[w];
for (int i = 0; i < amida.length; i ++) amida[i] = i + 1;
for (int i = 0; i < n; i ++) {
String line = scan.next();
String[] ab = line.split(",", 0);
int a = Integer.parseInt(ab[0]) - 1;
int b = Integer.parseInt(ab[1]) - 1;
int swap = amida[a];
amida[a] = amida[b];
amida[b] = swap;
}
for (int i = 0; i < w; i ++) System.out.printf("%d\n", amida[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,
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,
13,
18,
13,
17,
0,
18,
18,
13,
13,
17,
4,
18,
13,
18,
13,
17,
41,
13,
4,
13,
13,
13,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
13,
4,
18,
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,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
2,
18,
18,
13,
13,
17,
17,
41,
13,
2,
18,
18,
13,
13,
17,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
29,
13,
23,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
181,
5
],
[
181,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
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,
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
],
[
47,
48
],
[
48,
49
],
[
45,
50
],
[
42,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
51,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
60,
61
],
[
60,
62
],
[
42,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
63,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
72,
73
],
[
72,
74
],
[
8,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
77,
79
],
[
77,
80
],
[
8,
81
],
[
81,
82
],
[
81,
83
],
[
81,
84
],
[
85,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
8,
92
],
[
92,
93
],
[
93,
94
],
[
6,
95
],
[
95,
96
],
[
181,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
104,
109
],
[
109,
110
],
[
109,
111
],
[
104,
112
],
[
112,
113
],
[
113,
114
],
[
104,
115
],
[
116,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
117,
121
],
[
121,
122
],
[
121,
123
],
[
99,
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
],
[
139,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
143,
145
],
[
142,
146
],
[
141,
147
],
[
138,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
151,
155
],
[
150,
156
],
[
138,
157
],
[
157,
158
],
[
157,
159
],
[
159,
160
],
[
159,
161
],
[
138,
162
],
[
162,
163
],
[
163,
164
],
[
163,
165
],
[
162,
166
],
[
166,
167
],
[
166,
168
],
[
138,
169
],
[
169,
170
],
[
170,
171
],
[
170,
172
],
[
169,
173
],
[
99,
174
],
[
174,
175
],
[
97,
176
],
[
176,
177
],
[
97,
178
],
[
178,
179
],
[
0,
180
],
[
180,
181
],
[
180,
182
]
] | [
"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[][] horizontalLine = new int[n][2];\n\t\tString[] input = null;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tinput = sc.next().split(\",\");\n\t\t\thorizontalLine[i][0] = Integer.parseInt(input[0]);\n\t\t\thorizontalLine[i][1] = Integer.parseInt(input[1]);\n\t\t}\n\t\tint[] result = solve(w, horizontalLine);\n\t\tfor(int i : result){\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\tsc.close();\n\t}\n\n\tpublic static int[] solve(int numVerticalLines, int[][] horizontalLine){\n\t\t//initialize\n\t\tint[] n = new int[numVerticalLines];\n\t\tfor(int i = 0; i < numVerticalLines; i++){\n\t\t\tn[i] = i + 1;\n\t\t}\n\t\t\n\t\t//solve\n\t\tfor(int i = 0; i < horizontalLine.length; i++){\n\t\t\tint source = horizontalLine[i][0] - 1;\n\t\t\tint target = horizontalLine[i][1] - 1;\n\t\t\tint tmp = n[source];\n\t\t\tn[source] = n[target];\n\t\t\tn[target] = tmp;\n\t\t}\n\t\treturn 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[][] horizontalLine = new int[n][2];\n\t\tString[] input = null;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tinput = sc.next().split(\",\");\n\t\t\thorizontalLine[i][0] = Integer.parseInt(input[0]);\n\t\t\thorizontalLine[i][1] = Integer.parseInt(input[1]);\n\t\t}\n\t\tint[] result = solve(w, horizontalLine);\n\t\tfor(int i : result){\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\tsc.close();\n\t}\n\n\tpublic static int[] solve(int numVerticalLines, int[][] horizontalLine){\n\t\t//initialize\n\t\tint[] n = new int[numVerticalLines];\n\t\tfor(int i = 0; i < numVerticalLines; i++){\n\t\t\tn[i] = i + 1;\n\t\t}\n\t\t\n\t\t//solve\n\t\tfor(int i = 0; i < horizontalLine.length; i++){\n\t\t\tint source = horizontalLine[i][0] - 1;\n\t\t\tint target = horizontalLine[i][1] - 1;\n\t\t\tint tmp = n[source];\n\t\t\tn[source] = n[target];\n\t\t\tn[target] = tmp;\n\t\t}\n\t\treturn 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[][] horizontalLine = new int[n][2];\n\t\tString[] input = null;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tinput = sc.next().split(\",\");\n\t\t\thorizontalLine[i][0] = Integer.parseInt(input[0]);\n\t\t\thorizontalLine[i][1] = Integer.parseInt(input[1]);\n\t\t}\n\t\tint[] result = solve(w, horizontalLine);\n\t\tfor(int i : result){\n\t\t\tSystem.out.println(i);\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[][] horizontalLine = new int[n][2];\n\t\tString[] input = null;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tinput = sc.next().split(\",\");\n\t\t\thorizontalLine[i][0] = Integer.parseInt(input[0]);\n\t\t\thorizontalLine[i][1] = Integer.parseInt(input[1]);\n\t\t}\n\t\tint[] result = solve(w, horizontalLine);\n\t\tfor(int i : result){\n\t\t\tSystem.out.println(i);\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[][] horizontalLine = new int[n][2];",
"horizontalLine",
"new int[n][2]",
"n",
"2",
"String[] input = null;",
"input",
"null",
"for(int i = 0; i < n; i++){\n\t\t\tinput = sc.next().split(\",\");\n\t\t\thorizontalLine[i][0] = Integer.parseInt(input[0]);\n\t\t\thorizontalLine[i][1] = Integer.parseInt(input[1]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tinput = sc.next().split(\",\");\n\t\t\thorizontalLine[i][0] = Integer.parseInt(input[0]);\n\t\t\thorizontalLine[i][1] = Integer.parseInt(input[1]);\n\t\t}",
"{\n\t\t\tinput = sc.next().split(\",\");\n\t\t\thorizontalLine[i][0] = Integer.parseInt(input[0]);\n\t\t\thorizontalLine[i][1] = Integer.parseInt(input[1]);\n\t\t}",
"input = sc.next().split(\",\")",
"input",
"sc.next().split(\",\")",
"sc.next().split",
"sc.next()",
"sc.next",
"sc",
"\",\"",
"horizontalLine[i][0] = Integer.parseInt(input[0])",
"horizontalLine[i][0]",
"horizontalLine[i]",
"horizontalLine",
"i",
"0",
"Integer.parseInt(input[0])",
"Integer.parseInt",
"Integer",
"input[0]",
"input",
"0",
"horizontalLine[i][1] = Integer.parseInt(input[1])",
"horizontalLine[i][1]",
"horizontalLine[i]",
"horizontalLine",
"i",
"1",
"Integer.parseInt(input[1])",
"Integer.parseInt",
"Integer",
"input[1]",
"input",
"1",
"int[] result = solve(w, horizontalLine);",
"result",
"solve(w, horizontalLine)",
"solve",
"w",
"horizontalLine",
"for(int i : result){\n\t\t\tSystem.out.println(i);\n\t\t}",
"int i",
"result",
"{\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",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public static int[] solve(int numVerticalLines, int[][] horizontalLine){\n\t\t//initialize\n\t\tint[] n = new int[numVerticalLines];\n\t\tfor(int i = 0; i < numVerticalLines; i++){\n\t\t\tn[i] = i + 1;\n\t\t}\n\t\t\n\t\t//solve\n\t\tfor(int i = 0; i < horizontalLine.length; i++){\n\t\t\tint source = horizontalLine[i][0] - 1;\n\t\t\tint target = horizontalLine[i][1] - 1;\n\t\t\tint tmp = n[source];\n\t\t\tn[source] = n[target];\n\t\t\tn[target] = tmp;\n\t\t}\n\t\treturn n;\n\t}",
"solve",
"{\n\t\t//initialize\n\t\tint[] n = new int[numVerticalLines];\n\t\tfor(int i = 0; i < numVerticalLines; i++){\n\t\t\tn[i] = i + 1;\n\t\t}\n\t\t\n\t\t//solve\n\t\tfor(int i = 0; i < horizontalLine.length; i++){\n\t\t\tint source = horizontalLine[i][0] - 1;\n\t\t\tint target = horizontalLine[i][1] - 1;\n\t\t\tint tmp = n[source];\n\t\t\tn[source] = n[target];\n\t\t\tn[target] = tmp;\n\t\t}\n\t\treturn n;\n\t}",
"int[] n = new int[numVerticalLines];",
"n",
"new int[numVerticalLines]",
"numVerticalLines",
"for(int i = 0; i < numVerticalLines; i++){\n\t\t\tn[i] = i + 1;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < numVerticalLines",
"i",
"numVerticalLines",
"i++",
"i++",
"i",
"{\n\t\t\tn[i] = i + 1;\n\t\t}",
"{\n\t\t\tn[i] = i + 1;\n\t\t}",
"n[i] = i + 1",
"n[i]",
"n",
"i",
"i + 1",
"i",
"1",
"for(int i = 0; i < horizontalLine.length; i++){\n\t\t\tint source = horizontalLine[i][0] - 1;\n\t\t\tint target = horizontalLine[i][1] - 1;\n\t\t\tint tmp = n[source];\n\t\t\tn[source] = n[target];\n\t\t\tn[target] = tmp;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < horizontalLine.length",
"i",
"horizontalLine.length",
"horizontalLine",
"horizontalLine.length",
"i++",
"i++",
"i",
"{\n\t\t\tint source = horizontalLine[i][0] - 1;\n\t\t\tint target = horizontalLine[i][1] - 1;\n\t\t\tint tmp = n[source];\n\t\t\tn[source] = n[target];\n\t\t\tn[target] = tmp;\n\t\t}",
"{\n\t\t\tint source = horizontalLine[i][0] - 1;\n\t\t\tint target = horizontalLine[i][1] - 1;\n\t\t\tint tmp = n[source];\n\t\t\tn[source] = n[target];\n\t\t\tn[target] = tmp;\n\t\t}",
"int source = horizontalLine[i][0] - 1;",
"source",
"horizontalLine[i][0] - 1",
"horizontalLine[i][0]",
"horizontalLine[i]",
"horizontalLine",
"i",
"0",
"1",
"int target = horizontalLine[i][1] - 1;",
"target",
"horizontalLine[i][1] - 1",
"horizontalLine[i][1]",
"horizontalLine[i]",
"horizontalLine",
"i",
"1",
"1",
"int tmp = n[source];",
"tmp",
"n[source]",
"n",
"source",
"n[source] = n[target]",
"n[source]",
"n",
"source",
"n[target]",
"n",
"target",
"n[target] = tmp",
"n[target]",
"n",
"target",
"tmp",
"return n;",
"n",
"int numVerticalLines",
"numVerticalLines",
"int[][] horizontalLine",
"horizontalLine",
"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[][] horizontalLine = new int[n][2];\n\t\tString[] input = null;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tinput = sc.next().split(\",\");\n\t\t\thorizontalLine[i][0] = Integer.parseInt(input[0]);\n\t\t\thorizontalLine[i][1] = Integer.parseInt(input[1]);\n\t\t}\n\t\tint[] result = solve(w, horizontalLine);\n\t\tfor(int i : result){\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\tsc.close();\n\t}\n\n\tpublic static int[] solve(int numVerticalLines, int[][] horizontalLine){\n\t\t//initialize\n\t\tint[] n = new int[numVerticalLines];\n\t\tfor(int i = 0; i < numVerticalLines; i++){\n\t\t\tn[i] = i + 1;\n\t\t}\n\t\t\n\t\t//solve\n\t\tfor(int i = 0; i < horizontalLine.length; i++){\n\t\t\tint source = horizontalLine[i][0] - 1;\n\t\t\tint target = horizontalLine[i][1] - 1;\n\t\t\tint tmp = n[source];\n\t\t\tn[source] = n[target];\n\t\t\tn[target] = tmp;\n\t\t}\n\t\treturn 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[][] horizontalLine = new int[n][2];\n\t\tString[] input = null;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tinput = sc.next().split(\",\");\n\t\t\thorizontalLine[i][0] = Integer.parseInt(input[0]);\n\t\t\thorizontalLine[i][1] = Integer.parseInt(input[1]);\n\t\t}\n\t\tint[] result = solve(w, horizontalLine);\n\t\tfor(int i : result){\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\tsc.close();\n\t}\n\n\tpublic static int[] solve(int numVerticalLines, int[][] horizontalLine){\n\t\t//initialize\n\t\tint[] n = new int[numVerticalLines];\n\t\tfor(int i = 0; i < numVerticalLines; i++){\n\t\t\tn[i] = i + 1;\n\t\t}\n\t\t\n\t\t//solve\n\t\tfor(int i = 0; i < horizontalLine.length; i++){\n\t\t\tint source = horizontalLine[i][0] - 1;\n\t\t\tint target = horizontalLine[i][1] - 1;\n\t\t\tint tmp = n[source];\n\t\t\tn[source] = n[target];\n\t\t\tn[target] = tmp;\n\t\t}\n\t\treturn 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[][] horizontalLine = new int[n][2];
String[] input = null;
for(int i = 0; i < n; i++){
input = sc.next().split(",");
horizontalLine[i][0] = Integer.parseInt(input[0]);
horizontalLine[i][1] = Integer.parseInt(input[1]);
}
int[] result = solve(w, horizontalLine);
for(int i : result){
System.out.println(i);
}
sc.close();
}
public static int[] solve(int numVerticalLines, int[][] horizontalLine){
//initialize
int[] n = new int[numVerticalLines];
for(int i = 0; i < numVerticalLines; i++){
n[i] = i + 1;
}
//solve
for(int i = 0; i < horizontalLine.length; i++){
int source = horizontalLine[i][0] - 1;
int target = horizontalLine[i][1] - 1;
int tmp = n[source];
n[source] = n[target];
n[target] = tmp;
}
return n;
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
2,
17,
17,
41,
13,
17,
12,
13,
30,
0,
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,
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,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
13,
0,
18,
13,
13,
13,
14,
2,
18,
13,
13,
13,
0,
18,
13,
13,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
13,
2,
17,
18,
13,
13,
4,
18,
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,
20,
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
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
220,
20
],
[
220,
21
],
[
21,
22
],
[
220,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
25,
27
],
[
220,
28
],
[
28,
29
],
[
28,
30
],
[
220,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
33,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
33,
42
],
[
42,
43
],
[
42,
44
],
[
45,
46
],
[
45,
47
],
[
33,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
53,
54
],
[
53,
55
],
[
48,
56
],
[
56,
57
],
[
57,
58
],
[
48,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
33,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
33,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
75,
76
],
[
75,
77
],
[
70,
78
],
[
78,
79
],
[
79,
80
],
[
70,
81
],
[
82,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
85,
90
],
[
82,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
96,
97
],
[
96,
98
],
[
82,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
102,
103
],
[
101,
104
],
[
104,
105
],
[
104,
106
],
[
82,
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
],
[
121,
125
],
[
120,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
126,
130
],
[
120,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
132,
136
],
[
131,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
137,
141
],
[
33,
142
],
[
142,
143
],
[
142,
144
],
[
145,
146
],
[
145,
147
],
[
33,
148
],
[
148,
149
],
[
149,
150
],
[
150,
151
],
[
150,
152
],
[
148,
153
],
[
153,
154
],
[
153,
155
],
[
148,
156
],
[
156,
157
],
[
157,
158
],
[
148,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
161,
163
],
[
163,
164
],
[
163,
165
],
[
160,
166
],
[
33,
167
],
[
167,
168
],
[
168,
169
],
[
169,
170
],
[
169,
171
],
[
167,
172
],
[
172,
173
],
[
172,
174
],
[
167,
175
],
[
175,
176
],
[
176,
177
],
[
167,
178
],
[
178,
179
],
[
179,
180
],
[
179,
181
],
[
181,
182
],
[
181,
183
],
[
183,
184
],
[
183,
185
],
[
33,
186
],
[
186,
187
],
[
187,
188
],
[
220,
189
],
[
189,
190
],
[
189,
191
],
[
191,
192
],
[
192,
193
],
[
193,
194
],
[
194,
195
],
[
194,
196
],
[
192,
197
],
[
189,
198
],
[
198,
199
],
[
220,
200
],
[
200,
201
],
[
200,
202
],
[
202,
203
],
[
203,
204
],
[
204,
205
],
[
205,
206
],
[
205,
207
],
[
203,
208
],
[
200,
209
],
[
209,
210
],
[
220,
211
],
[
211,
212
],
[
211,
213
],
[
213,
214
],
[
214,
215
],
[
215,
216
],
[
211,
217
],
[
217,
218
],
[
0,
219
],
[
219,
220
],
[
219,
221
]
] | [
"import java.util.*;\nimport java.lang.*;\nimport java.math.*;\nimport java.io.*;\n\nimport static java.lang.Math.*;\nimport static java.util.Arrays.*;\n\npublic class Main{\n\n\tScanner sc;\n\n\tstatic final int INF=1<<28;\n\tstatic final double EPS=1e-9;\n\n\tvoid run(){\n\t\tsc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint[] l=new int[n+1];\n\t\tfor(int i=1;i<=n;i++)\n\t\t\tl[i]=i;\n\t\tint m=sc.nextInt();\n\t\tfor(int i=0;i<m;i++){\n\t\t\tString[] s=sc.next().split(\",\");\n\t\t\tint a=Integer.parseInt(s[0]);\n\t\t\tint b=Integer.parseInt(s[1]);\n\t\t\tfor(int k=1;k<=n;k++){\n\t\t\t\tif(l[k]==a)\n\t\t\t\t\tl[k]=b;\n\t\t\t\telse if(l[k]==b)\n\t\t\t\t\tl[k]=a;\n\t\t\t}\n\t\t}\n\t\tint[] ans=new int[n+1];\n\t\tfor(int i=1;i<=n;i++)\n\t\t\tans[l[i]]=i;\n\t\tfor(int i=1;i<=n;i++)\n\t\t\tprintln(\"\"+ans[i]);\n\t\tsc.close();\n\t}\n\n\tvoid print(String s){\n\t\tSystem.out.print(s);\n\t}\n\n\tvoid println(String s){\n\t\tSystem.out.println(s);\n\t}\n\n\tpublic static void main(String[] args){\n\t\tnew Main().run();\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"import java.math.*;",
"math.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import static java.lang.Math.*;",
"import static java.lang.Math.*;",
"import static java.lang.Math.*;",
"import static java.util.Arrays.*;",
"import static java.util.Arrays.*;",
"import static java.util.Arrays.*;",
"public class Main{\n\n\tScanner sc;\n\n\tstatic final int INF=1<<28;\n\tstatic final double EPS=1e-9;\n\n\tvoid run(){\n\t\tsc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint[] l=new int[n+1];\n\t\tfor(int i=1;i<=n;i++)\n\t\t\tl[i]=i;\n\t\tint m=sc.nextInt();\n\t\tfor(int i=0;i<m;i++){\n\t\t\tString[] s=sc.next().split(\",\");\n\t\t\tint a=Integer.parseInt(s[0]);\n\t\t\tint b=Integer.parseInt(s[1]);\n\t\t\tfor(int k=1;k<=n;k++){\n\t\t\t\tif(l[k]==a)\n\t\t\t\t\tl[k]=b;\n\t\t\t\telse if(l[k]==b)\n\t\t\t\t\tl[k]=a;\n\t\t\t}\n\t\t}\n\t\tint[] ans=new int[n+1];\n\t\tfor(int i=1;i<=n;i++)\n\t\t\tans[l[i]]=i;\n\t\tfor(int i=1;i<=n;i++)\n\t\t\tprintln(\"\"+ans[i]);\n\t\tsc.close();\n\t}\n\n\tvoid print(String s){\n\t\tSystem.out.print(s);\n\t}\n\n\tvoid println(String s){\n\t\tSystem.out.println(s);\n\t}\n\n\tpublic static void main(String[] args){\n\t\tnew Main().run();\n\t}\n}",
"Main",
"Scanner sc;",
"sc",
"static final int INF=1<<28;",
"INF",
"1<<28",
"1",
"28",
"static final double EPS=1e-9;",
"EPS",
"1e-9",
"void run(){\n\t\tsc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint[] l=new int[n+1];\n\t\tfor(int i=1;i<=n;i++)\n\t\t\tl[i]=i;\n\t\tint m=sc.nextInt();\n\t\tfor(int i=0;i<m;i++){\n\t\t\tString[] s=sc.next().split(\",\");\n\t\t\tint a=Integer.parseInt(s[0]);\n\t\t\tint b=Integer.parseInt(s[1]);\n\t\t\tfor(int k=1;k<=n;k++){\n\t\t\t\tif(l[k]==a)\n\t\t\t\t\tl[k]=b;\n\t\t\t\telse if(l[k]==b)\n\t\t\t\t\tl[k]=a;\n\t\t\t}\n\t\t}\n\t\tint[] ans=new int[n+1];\n\t\tfor(int i=1;i<=n;i++)\n\t\t\tans[l[i]]=i;\n\t\tfor(int i=1;i<=n;i++)\n\t\t\tprintln(\"\"+ans[i]);\n\t\tsc.close();\n\t}",
"run",
"{\n\t\tsc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint[] l=new int[n+1];\n\t\tfor(int i=1;i<=n;i++)\n\t\t\tl[i]=i;\n\t\tint m=sc.nextInt();\n\t\tfor(int i=0;i<m;i++){\n\t\t\tString[] s=sc.next().split(\",\");\n\t\t\tint a=Integer.parseInt(s[0]);\n\t\t\tint b=Integer.parseInt(s[1]);\n\t\t\tfor(int k=1;k<=n;k++){\n\t\t\t\tif(l[k]==a)\n\t\t\t\t\tl[k]=b;\n\t\t\t\telse if(l[k]==b)\n\t\t\t\t\tl[k]=a;\n\t\t\t}\n\t\t}\n\t\tint[] ans=new int[n+1];\n\t\tfor(int i=1;i<=n;i++)\n\t\t\tans[l[i]]=i;\n\t\tfor(int i=1;i<=n;i++)\n\t\t\tprintln(\"\"+ans[i]);\n\t\tsc.close();\n\t}",
"sc=new Scanner(System.in)",
"sc",
"new Scanner(System.in)",
"int n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] l=new int[n+1];",
"l",
"new int[n+1]",
"n+1",
"n",
"1",
"for(int i=1;i<=n;i++)\n\t\t\tl[i]=i;",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=n",
"i",
"n",
"i++",
"i++",
"i",
"l[i]=i;",
"l[i]=i",
"l[i]",
"l",
"i",
"i",
"int m=sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0;i<m;i++){\n\t\t\tString[] s=sc.next().split(\",\");\n\t\t\tint a=Integer.parseInt(s[0]);\n\t\t\tint b=Integer.parseInt(s[1]);\n\t\t\tfor(int k=1;k<=n;k++){\n\t\t\t\tif(l[k]==a)\n\t\t\t\t\tl[k]=b;\n\t\t\t\telse if(l[k]==b)\n\t\t\t\t\tl[k]=a;\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\t\t\tString[] s=sc.next().split(\",\");\n\t\t\tint a=Integer.parseInt(s[0]);\n\t\t\tint b=Integer.parseInt(s[1]);\n\t\t\tfor(int k=1;k<=n;k++){\n\t\t\t\tif(l[k]==a)\n\t\t\t\t\tl[k]=b;\n\t\t\t\telse if(l[k]==b)\n\t\t\t\t\tl[k]=a;\n\t\t\t}\n\t\t}",
"{\n\t\t\tString[] s=sc.next().split(\",\");\n\t\t\tint a=Integer.parseInt(s[0]);\n\t\t\tint b=Integer.parseInt(s[1]);\n\t\t\tfor(int k=1;k<=n;k++){\n\t\t\t\tif(l[k]==a)\n\t\t\t\t\tl[k]=b;\n\t\t\t\telse if(l[k]==b)\n\t\t\t\t\tl[k]=a;\n\t\t\t}\n\t\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",
"int b=Integer.parseInt(s[1]);",
"b",
"Integer.parseInt(s[1])",
"Integer.parseInt",
"Integer",
"s[1]",
"s",
"1",
"for(int k=1;k<=n;k++){\n\t\t\t\tif(l[k]==a)\n\t\t\t\t\tl[k]=b;\n\t\t\t\telse if(l[k]==b)\n\t\t\t\t\tl[k]=a;\n\t\t\t}",
"int k=1;",
"int k=1;",
"k",
"1",
"k<=n",
"k",
"n",
"k++",
"k++",
"k",
"{\n\t\t\t\tif(l[k]==a)\n\t\t\t\t\tl[k]=b;\n\t\t\t\telse if(l[k]==b)\n\t\t\t\t\tl[k]=a;\n\t\t\t}",
"{\n\t\t\t\tif(l[k]==a)\n\t\t\t\t\tl[k]=b;\n\t\t\t\telse if(l[k]==b)\n\t\t\t\t\tl[k]=a;\n\t\t\t}",
"if(l[k]==a)\n\t\t\t\t\tl[k]=b;\n\t\t\t\telse if(l[k]==b)\n\t\t\t\t\tl[k]=a;",
"l[k]==a",
"l[k]",
"l",
"k",
"a",
"l[k]=b",
"l[k]",
"l",
"k",
"b",
"if(l[k]==b)\n\t\t\t\t\tl[k]=a;",
"l[k]==b",
"l[k]",
"l",
"k",
"b",
"l[k]=a",
"l[k]",
"l",
"k",
"a",
"int[] ans=new int[n+1];",
"ans",
"new int[n+1]",
"n+1",
"n",
"1",
"for(int i=1;i<=n;i++)\n\t\t\tans[l[i]]=i;",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=n",
"i",
"n",
"i++",
"i++",
"i",
"ans[l[i]]=i;",
"ans[l[i]]=i",
"ans[l[i]]",
"ans",
"l[i]",
"l",
"i",
"i",
"for(int i=1;i<=n;i++)\n\t\t\tprintln(\"\"+ans[i]);",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=n",
"i",
"n",
"i++",
"i++",
"i",
"println(\"\"+ans[i]);",
"println(\"\"+ans[i])",
"println",
"\"\"+ans[i]",
"\"\"",
"ans[i]",
"ans",
"i",
"sc.close()",
"sc.close",
"sc",
"void print(String s){\n\t\tSystem.out.print(s);\n\t}",
"print",
"{\n\t\tSystem.out.print(s);\n\t}",
"System.out.print(s)",
"System.out.print",
"System.out",
"System",
"System.out",
"s",
"String s",
"s",
"void println(String s){\n\t\tSystem.out.println(s);\n\t}",
"println",
"{\n\t\tSystem.out.println(s);\n\t}",
"System.out.println(s)",
"System.out.println",
"System.out",
"System",
"System.out",
"s",
"String s",
"s",
"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\tScanner sc;\n\n\tstatic final int INF=1<<28;\n\tstatic final double EPS=1e-9;\n\n\tvoid run(){\n\t\tsc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint[] l=new int[n+1];\n\t\tfor(int i=1;i<=n;i++)\n\t\t\tl[i]=i;\n\t\tint m=sc.nextInt();\n\t\tfor(int i=0;i<m;i++){\n\t\t\tString[] s=sc.next().split(\",\");\n\t\t\tint a=Integer.parseInt(s[0]);\n\t\t\tint b=Integer.parseInt(s[1]);\n\t\t\tfor(int k=1;k<=n;k++){\n\t\t\t\tif(l[k]==a)\n\t\t\t\t\tl[k]=b;\n\t\t\t\telse if(l[k]==b)\n\t\t\t\t\tl[k]=a;\n\t\t\t}\n\t\t}\n\t\tint[] ans=new int[n+1];\n\t\tfor(int i=1;i<=n;i++)\n\t\t\tans[l[i]]=i;\n\t\tfor(int i=1;i<=n;i++)\n\t\t\tprintln(\"\"+ans[i]);\n\t\tsc.close();\n\t}\n\n\tvoid print(String s){\n\t\tSystem.out.print(s);\n\t}\n\n\tvoid println(String s){\n\t\tSystem.out.println(s);\n\t}\n\n\tpublic static void main(String[] args){\n\t\tnew Main().run();\n\t}\n}",
"public class Main{\n\n\tScanner sc;\n\n\tstatic final int INF=1<<28;\n\tstatic final double EPS=1e-9;\n\n\tvoid run(){\n\t\tsc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint[] l=new int[n+1];\n\t\tfor(int i=1;i<=n;i++)\n\t\t\tl[i]=i;\n\t\tint m=sc.nextInt();\n\t\tfor(int i=0;i<m;i++){\n\t\t\tString[] s=sc.next().split(\",\");\n\t\t\tint a=Integer.parseInt(s[0]);\n\t\t\tint b=Integer.parseInt(s[1]);\n\t\t\tfor(int k=1;k<=n;k++){\n\t\t\t\tif(l[k]==a)\n\t\t\t\t\tl[k]=b;\n\t\t\t\telse if(l[k]==b)\n\t\t\t\t\tl[k]=a;\n\t\t\t}\n\t\t}\n\t\tint[] ans=new int[n+1];\n\t\tfor(int i=1;i<=n;i++)\n\t\t\tans[l[i]]=i;\n\t\tfor(int i=1;i<=n;i++)\n\t\t\tprintln(\"\"+ans[i]);\n\t\tsc.close();\n\t}\n\n\tvoid print(String s){\n\t\tSystem.out.print(s);\n\t}\n\n\tvoid println(String s){\n\t\tSystem.out.println(s);\n\t}\n\n\tpublic static void main(String[] args){\n\t\tnew Main().run();\n\t}\n}",
"Main"
] | import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
public class Main{
Scanner sc;
static final int INF=1<<28;
static final double EPS=1e-9;
void run(){
sc=new Scanner(System.in);
int n=sc.nextInt();
int[] l=new int[n+1];
for(int i=1;i<=n;i++)
l[i]=i;
int m=sc.nextInt();
for(int i=0;i<m;i++){
String[] s=sc.next().split(",");
int a=Integer.parseInt(s[0]);
int b=Integer.parseInt(s[1]);
for(int k=1;k<=n;k++){
if(l[k]==a)
l[k]=b;
else if(l[k]==b)
l[k]=a;
}
}
int[] ans=new int[n+1];
for(int i=1;i<=n;i++)
ans[l[i]]=i;
for(int i=1;i<=n;i++)
println(""+ans[i]);
sc.close();
}
void print(String s){
System.out.print(s);
}
void println(String s){
System.out.println(s);
}
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,
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,
13,
41,
13,
4,
18,
13,
17,
41,
13,
20,
17,
0,
18,
13,
17,
2,
4,
18,
13,
18,
13,
17,
17,
0,
18,
13,
17,
2,
4,
18,
13,
18,
13,
17,
17,
41,
13,
18,
13,
18,
13,
17,
0,
18,
13,
18,
13,
17,
18,
13,
18,
13,
17,
0,
18,
13,
18,
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
],
[
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
],
[
64,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
64,
76
],
[
76,
77
],
[
76,
78
],
[
64,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
88,
89
],
[
88,
90
],
[
84,
91
],
[
64,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
100,
101
],
[
100,
102
],
[
96,
103
],
[
64,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
108,
110
],
[
64,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
114,
116
],
[
111,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
119,
121
],
[
64,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
125,
127
],
[
122,
128
],
[
8,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
129,
134
],
[
134,
135
],
[
134,
136
],
[
129,
137
],
[
137,
138
],
[
138,
139
],
[
129,
140
],
[
141,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
142,
147
],
[
147,
148
],
[
147,
149
],
[
6,
150
],
[
150,
151
]
] | [
"import java.io.*;\nclass Main\n{\n public static void main(String args[])throws IOException\n {\n\tBufferedReader input=new BufferedReader(new InputStreamReader(System.in));\n\tint w=Integer.parseInt(input.readLine());\n\tint a[]=new int[w];\n\tfor(int i=0;i<w;i++)\n\t {\n\t\ta[i]=i+1;\n\t }\n\tint n=Integer.parseInt(input.readLine());\n\tfor(int i=0;i<n;i++)\n\t {\n\t\tString str=input.readLine();\n\t\tString str_ary[]=str.split(\",\");\n\t\tint b[]=new int [2];\n\t\t\n\t\t\tb[0]=Integer.parseInt(str_ary[0])-1;\n\t\t\tb[1]=Integer.parseInt(str_ary[1])-1;\n\t\tint tmp=a[b[0]];\n\t\ta[b[0]]=a[b[1]];\n\t\ta[b[1]]=tmp;\n\t }\nfor(int i=0;i<w;i++)\n\t {\n\t\tSystem.out.println(a[i]);\n\t }\n }\n}",
"import java.io.*;",
"io.*",
"java",
"class Main\n{\n public static void main(String args[])throws IOException\n {\n\tBufferedReader input=new BufferedReader(new InputStreamReader(System.in));\n\tint w=Integer.parseInt(input.readLine());\n\tint a[]=new int[w];\n\tfor(int i=0;i<w;i++)\n\t {\n\t\ta[i]=i+1;\n\t }\n\tint n=Integer.parseInt(input.readLine());\n\tfor(int i=0;i<n;i++)\n\t {\n\t\tString str=input.readLine();\n\t\tString str_ary[]=str.split(\",\");\n\t\tint b[]=new int [2];\n\t\t\n\t\t\tb[0]=Integer.parseInt(str_ary[0])-1;\n\t\t\tb[1]=Integer.parseInt(str_ary[1])-1;\n\t\tint tmp=a[b[0]];\n\t\ta[b[0]]=a[b[1]];\n\t\ta[b[1]]=tmp;\n\t }\nfor(int i=0;i<w;i++)\n\t {\n\t\tSystem.out.println(a[i]);\n\t }\n }\n}",
"Main",
"public static void main(String args[])throws IOException\n {\n\tBufferedReader input=new BufferedReader(new InputStreamReader(System.in));\n\tint w=Integer.parseInt(input.readLine());\n\tint a[]=new int[w];\n\tfor(int i=0;i<w;i++)\n\t {\n\t\ta[i]=i+1;\n\t }\n\tint n=Integer.parseInt(input.readLine());\n\tfor(int i=0;i<n;i++)\n\t {\n\t\tString str=input.readLine();\n\t\tString str_ary[]=str.split(\",\");\n\t\tint b[]=new int [2];\n\t\t\n\t\t\tb[0]=Integer.parseInt(str_ary[0])-1;\n\t\t\tb[1]=Integer.parseInt(str_ary[1])-1;\n\t\tint tmp=a[b[0]];\n\t\ta[b[0]]=a[b[1]];\n\t\ta[b[1]]=tmp;\n\t }\nfor(int i=0;i<w;i++)\n\t {\n\t\tSystem.out.println(a[i]);\n\t }\n }",
"main",
"{\n\tBufferedReader input=new BufferedReader(new InputStreamReader(System.in));\n\tint w=Integer.parseInt(input.readLine());\n\tint a[]=new int[w];\n\tfor(int i=0;i<w;i++)\n\t {\n\t\ta[i]=i+1;\n\t }\n\tint n=Integer.parseInt(input.readLine());\n\tfor(int i=0;i<n;i++)\n\t {\n\t\tString str=input.readLine();\n\t\tString str_ary[]=str.split(\",\");\n\t\tint b[]=new int [2];\n\t\t\n\t\t\tb[0]=Integer.parseInt(str_ary[0])-1;\n\t\t\tb[1]=Integer.parseInt(str_ary[1])-1;\n\t\tint tmp=a[b[0]];\n\t\ta[b[0]]=a[b[1]];\n\t\ta[b[1]]=tmp;\n\t }\nfor(int i=0;i<w;i++)\n\t {\n\t\tSystem.out.println(a[i]);\n\t }\n }",
"BufferedReader input=new BufferedReader(new InputStreamReader(System.in));",
"input",
"new BufferedReader(new InputStreamReader(System.in))",
"int w=Integer.parseInt(input.readLine());",
"w",
"Integer.parseInt(input.readLine())",
"Integer.parseInt",
"Integer",
"input.readLine()",
"input.readLine",
"input",
"int a[]=new int[w];",
"a",
"new int[w]",
"w",
"for(int i=0;i<w;i++)\n\t {\n\t\ta[i]=i+1;\n\t }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"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 n=Integer.parseInt(input.readLine());",
"n",
"Integer.parseInt(input.readLine())",
"Integer.parseInt",
"Integer",
"input.readLine()",
"input.readLine",
"input",
"for(int i=0;i<n;i++)\n\t {\n\t\tString str=input.readLine();\n\t\tString str_ary[]=str.split(\",\");\n\t\tint b[]=new int [2];\n\t\t\n\t\t\tb[0]=Integer.parseInt(str_ary[0])-1;\n\t\t\tb[1]=Integer.parseInt(str_ary[1])-1;\n\t\tint tmp=a[b[0]];\n\t\ta[b[0]]=a[b[1]];\n\t\ta[b[1]]=tmp;\n\t }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\tString str=input.readLine();\n\t\tString str_ary[]=str.split(\",\");\n\t\tint b[]=new int [2];\n\t\t\n\t\t\tb[0]=Integer.parseInt(str_ary[0])-1;\n\t\t\tb[1]=Integer.parseInt(str_ary[1])-1;\n\t\tint tmp=a[b[0]];\n\t\ta[b[0]]=a[b[1]];\n\t\ta[b[1]]=tmp;\n\t }",
"{\n\t\tString str=input.readLine();\n\t\tString str_ary[]=str.split(\",\");\n\t\tint b[]=new int [2];\n\t\t\n\t\t\tb[0]=Integer.parseInt(str_ary[0])-1;\n\t\t\tb[1]=Integer.parseInt(str_ary[1])-1;\n\t\tint tmp=a[b[0]];\n\t\ta[b[0]]=a[b[1]];\n\t\ta[b[1]]=tmp;\n\t }",
"String str=input.readLine();",
"str",
"input.readLine()",
"input.readLine",
"input",
"String str_ary[]=str.split(\",\");",
"str_ary",
"str.split(\",\")",
"str.split",
"str",
"\",\"",
"int b[]=new int [2];",
"b",
"new int [2]",
"2",
"b[0]=Integer.parseInt(str_ary[0])-1",
"b[0]",
"b",
"0",
"Integer.parseInt(str_ary[0])-1",
"Integer.parseInt(str_ary[0])",
"Integer.parseInt",
"Integer",
"str_ary[0]",
"str_ary",
"0",
"1",
"b[1]=Integer.parseInt(str_ary[1])-1",
"b[1]",
"b",
"1",
"Integer.parseInt(str_ary[1])-1",
"Integer.parseInt(str_ary[1])",
"Integer.parseInt",
"Integer",
"str_ary[1]",
"str_ary",
"1",
"1",
"int tmp=a[b[0]];",
"tmp",
"a[b[0]]",
"a",
"b[0]",
"b",
"0",
"a[b[0]]=a[b[1]]",
"a[b[0]]",
"a",
"b[0]",
"b",
"0",
"a[b[1]]",
"a",
"b[1]",
"b",
"1",
"a[b[1]]=tmp",
"a[b[1]]",
"a",
"b[1]",
"b",
"1",
"tmp",
"for(int i=0;i<w;i++)\n\t {\n\t\tSystem.out.println(a[i]);\n\t }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"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"
] | import java.io.*;
class Main
{
public static void main(String args[])throws IOException
{
BufferedReader input=new BufferedReader(new InputStreamReader(System.in));
int w=Integer.parseInt(input.readLine());
int a[]=new int[w];
for(int i=0;i<w;i++)
{
a[i]=i+1;
}
int n=Integer.parseInt(input.readLine());
for(int i=0;i<n;i++)
{
String str=input.readLine();
String str_ary[]=str.split(",");
int b[]=new int [2];
b[0]=Integer.parseInt(str_ary[0])-1;
b[1]=Integer.parseInt(str_ary[1])-1;
int tmp=a[b[0]];
a[b[0]]=a[b[1]];
a[b[1]]=tmp;
}
for(int i=0;i<w;i++)
{
System.out.println(a[i]);
}
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
4,
18,
20,
23,
13,
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,
0,
18,
13,
13,
2,
13,
17,
4,
18,
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,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
113,
5
],
[
113,
6
],
[
6,
7
],
[
6,
8
],
[
113,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
[
9,
15
],
[
15,
16
],
[
113,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
19,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
19,
30
],
[
30,
31
],
[
30,
32
],
[
19,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
34,
42
],
[
42,
43
],
[
43,
44
],
[
34,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
50,
52
],
[
19,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
19,
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
],
[
74,
75
],
[
72,
76
],
[
69,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
79,
83
],
[
69,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
86,
88
],
[
69,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
93,
94
],
[
93,
95
],
[
69,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
19,
101
],
[
101,
102
],
[
101,
103
],
[
101,
104
],
[
105,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
106,
111
],
[
0,
112
],
[
112,
113
],
[
112,
114
]
] | [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n new Main().run();\n }\n\n private void run() {\n int w = sc.nextInt();\n int n = sc.nextInt();\n\n int[] lines = new int[w];\n for(int i = 0; i < w; i++) lines[i] = i + 1;\n\n sc.useDelimiter(\"[,\\n]\");\n\n for(int i = 0; i < n; i++) {\n int a = sc.nextInt() - 1;\n int b = sc.nextInt() - 1;\n\n int tmp = lines[a];\n lines[a] = lines[b];\n lines[b] = tmp;\n }\n\n for(int l : lines) {\n System.out.println(l);\n }\n }\n\n private final Scanner sc = new Scanner(System.in);\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n new Main().run();\n }\n\n private void run() {\n int w = sc.nextInt();\n int n = sc.nextInt();\n\n int[] lines = new int[w];\n for(int i = 0; i < w; i++) lines[i] = i + 1;\n\n sc.useDelimiter(\"[,\\n]\");\n\n for(int i = 0; i < n; i++) {\n int a = sc.nextInt() - 1;\n int b = sc.nextInt() - 1;\n\n int tmp = lines[a];\n lines[a] = lines[b];\n lines[b] = tmp;\n }\n\n for(int l : lines) {\n System.out.println(l);\n }\n }\n\n private final Scanner sc = new Scanner(System.in);\n}",
"Main",
"private final Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"public static void main(String[] args) {\n new Main().run();\n }",
"main",
"{\n new Main().run();\n }",
"new Main().run()",
"new Main().run",
"new Main()",
"String[] args",
"args",
"private void run() {\n int w = sc.nextInt();\n int n = sc.nextInt();\n\n int[] lines = new int[w];\n for(int i = 0; i < w; i++) lines[i] = i + 1;\n\n sc.useDelimiter(\"[,\\n]\");\n\n for(int i = 0; i < n; i++) {\n int a = sc.nextInt() - 1;\n int b = sc.nextInt() - 1;\n\n int tmp = lines[a];\n lines[a] = lines[b];\n lines[b] = tmp;\n }\n\n for(int l : lines) {\n System.out.println(l);\n }\n }",
"run",
"{\n int w = sc.nextInt();\n int n = sc.nextInt();\n\n int[] lines = new int[w];\n for(int i = 0; i < w; i++) lines[i] = i + 1;\n\n sc.useDelimiter(\"[,\\n]\");\n\n for(int i = 0; i < n; i++) {\n int a = sc.nextInt() - 1;\n int b = sc.nextInt() - 1;\n\n int tmp = lines[a];\n lines[a] = lines[b];\n lines[b] = tmp;\n }\n\n for(int l : lines) {\n System.out.println(l);\n }\n }",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] lines = new int[w];",
"lines",
"new int[w]",
"w",
"for(int i = 0; i < w; i++) lines[i] = i + 1;",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"lines[i] = i + 1;",
"lines[i] = i + 1",
"lines[i]",
"lines",
"i",
"i + 1",
"i",
"1",
"sc.useDelimiter(\"[,\\n]\")",
"sc.useDelimiter",
"sc",
"\"[,\\n]\"",
"for(int i = 0; i < n; i++) {\n int a = sc.nextInt() - 1;\n int b = sc.nextInt() - 1;\n\n int tmp = lines[a];\n lines[a] = lines[b];\n lines[b] = tmp;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int a = sc.nextInt() - 1;\n int b = sc.nextInt() - 1;\n\n int tmp = lines[a];\n lines[a] = lines[b];\n lines[b] = tmp;\n }",
"{\n int a = sc.nextInt() - 1;\n int b = sc.nextInt() - 1;\n\n int tmp = lines[a];\n lines[a] = lines[b];\n lines[b] = tmp;\n }",
"int a = sc.nextInt() - 1;",
"a",
"sc.nextInt() - 1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"1",
"int b = sc.nextInt() - 1;",
"b",
"sc.nextInt() - 1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"1",
"int tmp = lines[a];",
"tmp",
"lines[a]",
"lines",
"a",
"lines[a] = lines[b]",
"lines[a]",
"lines",
"a",
"lines[b]",
"lines",
"b",
"lines[b] = tmp",
"lines[b]",
"lines",
"b",
"tmp",
"for(int l : lines) {\n System.out.println(l);\n }",
"int l",
"lines",
"{\n System.out.println(l);\n }",
"{\n System.out.println(l);\n }",
"System.out.println(l)",
"System.out.println",
"System.out",
"System",
"System.out",
"l",
"public class Main {\n public static void main(String[] args) {\n new Main().run();\n }\n\n private void run() {\n int w = sc.nextInt();\n int n = sc.nextInt();\n\n int[] lines = new int[w];\n for(int i = 0; i < w; i++) lines[i] = i + 1;\n\n sc.useDelimiter(\"[,\\n]\");\n\n for(int i = 0; i < n; i++) {\n int a = sc.nextInt() - 1;\n int b = sc.nextInt() - 1;\n\n int tmp = lines[a];\n lines[a] = lines[b];\n lines[b] = tmp;\n }\n\n for(int l : lines) {\n System.out.println(l);\n }\n }\n\n private final Scanner sc = new Scanner(System.in);\n}",
"public class Main {\n public static void main(String[] args) {\n new Main().run();\n }\n\n private void run() {\n int w = sc.nextInt();\n int n = sc.nextInt();\n\n int[] lines = new int[w];\n for(int i = 0; i < w; i++) lines[i] = i + 1;\n\n sc.useDelimiter(\"[,\\n]\");\n\n for(int i = 0; i < n; i++) {\n int a = sc.nextInt() - 1;\n int b = sc.nextInt() - 1;\n\n int tmp = lines[a];\n lines[a] = lines[b];\n lines[b] = tmp;\n }\n\n for(int l : lines) {\n System.out.println(l);\n }\n }\n\n private final Scanner sc = new Scanner(System.in);\n}",
"Main"
] | import java.util.*;
public class Main {
public static void main(String[] args) {
new Main().run();
}
private void run() {
int w = sc.nextInt();
int n = sc.nextInt();
int[] lines = new int[w];
for(int i = 0; i < w; i++) lines[i] = i + 1;
sc.useDelimiter("[,\n]");
for(int i = 0; i < n; i++) {
int a = sc.nextInt() - 1;
int b = sc.nextInt() - 1;
int tmp = lines[a];
lines[a] = lines[b];
lines[b] = tmp;
}
for(int l : lines) {
System.out.println(l);
}
}
private final Scanner sc = new Scanner(System.in);
} |
[
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,
38,
5,
13,
30,
4,
18,
13,
17,
30,
41,
13,
20,
4,
13,
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,
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
],
[
167,
14
],
[
167,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
15,
21
],
[
21,
22
],
[
167,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
38,
39
],
[
38,
40
],
[
167,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
43,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
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
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
75,
80
],
[
73,
81
],
[
43,
82
],
[
82,
83
],
[
82,
84
],
[
82,
85
],
[
86,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
41,
91
],
[
91,
92
],
[
167,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
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
],
[
114,
116
],
[
113,
117
],
[
117,
118
],
[
117,
119
],
[
95,
120
],
[
120,
121
],
[
93,
122
],
[
122,
123
],
[
167,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
132,
134
],
[
129,
135
],
[
126,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
141,
142
],
[
141,
143
],
[
138,
144
],
[
126,
145
],
[
145,
146
],
[
145,
147
],
[
147,
148
],
[
147,
149
],
[
126,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
150,
154
],
[
154,
155
],
[
154,
156
],
[
126,
157
],
[
157,
158
],
[
158,
159
],
[
158,
160
],
[
157,
161
],
[
124,
162
],
[
162,
163
],
[
124,
164
],
[
164,
165
],
[
0,
166
],
[
166,
167
],
[
166,
168
]
] | [
"import static java.lang.System.out;\nimport static java.lang.Integer.parseInt;\nimport java.io.File;\nimport java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n new Main().lots();\n }\n\n public void lots() {\n try (Scanner scan = new Scanner(System.in)) {\n draw(scan);\n } catch (Exception e) {\n System.exit(0);\n }\n }\n\n private void draw(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}",
"import static java.lang.System.out;",
"import static java.lang.System.out;",
"import static java.lang.System.out;",
"import static java.lang.Integer.parseInt;",
"import static java.lang.Integer.parseInt;",
"import static java.lang.Integer.parseInt;",
"import java.io.File;",
"File",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n new Main().lots();\n }\n\n public void lots() {\n try (Scanner scan = new Scanner(System.in)) {\n draw(scan);\n } catch (Exception e) {\n System.exit(0);\n }\n }\n\n private void draw(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().lots();\n }",
"main",
"{\n new Main().lots();\n }",
"new Main().lots()",
"new Main().lots",
"new Main()",
"String[] args",
"args",
"public void lots() {\n try (Scanner scan = new Scanner(System.in)) {\n draw(scan);\n } catch (Exception e) {\n System.exit(0);\n }\n }",
"lots",
"{\n try (Scanner scan = new Scanner(System.in)) {\n draw(scan);\n } catch (Exception e) {\n System.exit(0);\n }\n }",
"try (Scanner scan = new Scanner(System.in)) {\n draw(scan);\n } catch (Exception e) {\n System.exit(0);\n }",
"catch (Exception e) {\n System.exit(0);\n }",
"Exception e",
"{\n System.exit(0);\n }",
"System.exit(0)",
"System.exit",
"System",
"0",
"{\n draw(scan);\n }",
"Scanner scan = new Scanner(System.in)",
"Scanner scan = new Scanner(System.in)",
"new Scanner(System.in)",
"draw(scan)",
"draw",
"scan",
"private void draw(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 }",
"draw",
"{\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",
"public class Main {\n\n public static void main(String[] args) {\n new Main().lots();\n }\n\n public void lots() {\n try (Scanner scan = new Scanner(System.in)) {\n draw(scan);\n } catch (Exception e) {\n System.exit(0);\n }\n }\n\n private void draw(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 {\n\n public static void main(String[] args) {\n new Main().lots();\n }\n\n public void lots() {\n try (Scanner scan = new Scanner(System.in)) {\n draw(scan);\n } catch (Exception e) {\n System.exit(0);\n }\n }\n\n private void draw(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.System.out;
import static java.lang.Integer.parseInt;
import java.io.File;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
new Main().lots();
}
public void lots() {
try (Scanner scan = new Scanner(System.in)) {
draw(scan);
} catch (Exception e) {
System.exit(0);
}
}
private void draw(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;
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
20,
12,
13,
30,
41,
13,
4,
13,
41,
13,
4,
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,
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,
13,
18,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
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
],
[
141,
12
],
[
12,
13
],
[
12,
14
],
[
141,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
17,
22
],
[
22,
23
],
[
22,
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
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
46,
48
],
[
17,
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
],
[
17,
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
],
[
119,
122
],
[
122,
123
],
[
122,
124
],
[
17,
125
],
[
125,
126
],
[
126,
127
],
[
15,
128
],
[
128,
129
],
[
141,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
134,
137
],
[
137,
138
],
[
138,
139
],
[
0,
140
],
[
140,
141
],
[
140,
142
]
] | [
"import java.io.PrintWriter;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tstatic Scanner scan = new Scanner(System.in);\n\tstatic PrintWriter out = new PrintWriter(System.out);\n\n\tpublic static void main(String[] args) {\n\t\tint w = si(), n = si();\n\t\tint[] ary = new int[w];\n\t\tfor (int i = 0; i < w; i++)\n\t\t\tary[i]=i+1;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString[] cons = scan.next().split(\",\");\n\t\t\tint p = Integer.parseInt(cons[0])-1, q = Integer.parseInt(cons[1])-1;\n\t\t\tint tmp = ary[p];\n\t\t\tary[p] = ary[q];\n\t\t\tary[q] = tmp;\n\t\t}\n\t\tfor (int i = 0; i < w ; i++)\n\t\t\tout.println(ary[i]);\n\t\tout.flush();\n\t}\n\n\tstatic int si() {\n\t\treturn Integer.parseInt(scan.next());\n\t}\n}",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tstatic Scanner scan = new Scanner(System.in);\n\tstatic PrintWriter out = new PrintWriter(System.out);\n\n\tpublic static void main(String[] args) {\n\t\tint w = si(), n = si();\n\t\tint[] ary = new int[w];\n\t\tfor (int i = 0; i < w; i++)\n\t\t\tary[i]=i+1;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString[] cons = scan.next().split(\",\");\n\t\t\tint p = Integer.parseInt(cons[0])-1, q = Integer.parseInt(cons[1])-1;\n\t\t\tint tmp = ary[p];\n\t\t\tary[p] = ary[q];\n\t\t\tary[q] = tmp;\n\t\t}\n\t\tfor (int i = 0; i < w ; i++)\n\t\t\tout.println(ary[i]);\n\t\tout.flush();\n\t}\n\n\tstatic int si() {\n\t\treturn Integer.parseInt(scan.next());\n\t}\n}",
"Main",
"static Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"static PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"public static void main(String[] args) {\n\t\tint w = si(), n = si();\n\t\tint[] ary = new int[w];\n\t\tfor (int i = 0; i < w; i++)\n\t\t\tary[i]=i+1;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString[] cons = scan.next().split(\",\");\n\t\t\tint p = Integer.parseInt(cons[0])-1, q = Integer.parseInt(cons[1])-1;\n\t\t\tint tmp = ary[p];\n\t\t\tary[p] = ary[q];\n\t\t\tary[q] = tmp;\n\t\t}\n\t\tfor (int i = 0; i < w ; i++)\n\t\t\tout.println(ary[i]);\n\t\tout.flush();\n\t}",
"main",
"{\n\t\tint w = si(), n = si();\n\t\tint[] ary = new int[w];\n\t\tfor (int i = 0; i < w; i++)\n\t\t\tary[i]=i+1;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString[] cons = scan.next().split(\",\");\n\t\t\tint p = Integer.parseInt(cons[0])-1, q = Integer.parseInt(cons[1])-1;\n\t\t\tint tmp = ary[p];\n\t\t\tary[p] = ary[q];\n\t\t\tary[q] = tmp;\n\t\t}\n\t\tfor (int i = 0; i < w ; i++)\n\t\t\tout.println(ary[i]);\n\t\tout.flush();\n\t}",
"int w = si()",
"w",
"si()",
"si",
"n = si();",
"n",
"si()",
"si",
"int[] ary = new int[w];",
"ary",
"new int[w]",
"w",
"for (int i = 0; i < w; i++)\n\t\t\tary[i]=i+1;",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"ary[i]=i+1;",
"ary[i]=i+1",
"ary[i]",
"ary",
"i",
"i+1",
"i",
"1",
"for (int i = 0; i < n; i++) {\n\t\t\tString[] cons = scan.next().split(\",\");\n\t\t\tint p = Integer.parseInt(cons[0])-1, q = Integer.parseInt(cons[1])-1;\n\t\t\tint tmp = ary[p];\n\t\t\tary[p] = ary[q];\n\t\t\tary[q] = tmp;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString[] cons = scan.next().split(\",\");\n\t\t\tint p = Integer.parseInt(cons[0])-1, q = Integer.parseInt(cons[1])-1;\n\t\t\tint tmp = ary[p];\n\t\t\tary[p] = ary[q];\n\t\t\tary[q] = tmp;\n\t\t}",
"{\n\t\t\tString[] cons = scan.next().split(\",\");\n\t\t\tint p = Integer.parseInt(cons[0])-1, q = Integer.parseInt(cons[1])-1;\n\t\t\tint tmp = ary[p];\n\t\t\tary[p] = ary[q];\n\t\t\tary[q] = tmp;\n\t\t}",
"String[] cons = scan.next().split(\",\");",
"cons",
"scan.next().split(\",\")",
"scan.next().split",
"scan.next()",
"scan.next",
"scan",
"\",\"",
"int p = Integer.parseInt(cons[0])-1",
"p",
"Integer.parseInt(cons[0])-1",
"Integer.parseInt(cons[0])",
"Integer.parseInt",
"Integer",
"cons[0]",
"cons",
"0",
"1",
"q = Integer.parseInt(cons[1])-1;",
"q",
"Integer.parseInt(cons[1])-1",
"Integer.parseInt(cons[1])",
"Integer.parseInt",
"Integer",
"cons[1]",
"cons",
"1",
"1",
"int tmp = ary[p];",
"tmp",
"ary[p]",
"ary",
"p",
"ary[p] = ary[q]",
"ary[p]",
"ary",
"p",
"ary[q]",
"ary",
"q",
"ary[q] = tmp",
"ary[q]",
"ary",
"q",
"tmp",
"for (int i = 0; i < w ; i++)\n\t\t\tout.println(ary[i]);",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"out.println(ary[i]);",
"out.println(ary[i])",
"out.println",
"out",
"ary[i]",
"ary",
"i",
"out.flush()",
"out.flush",
"out",
"String[] args",
"args",
"static int si() {\n\t\treturn Integer.parseInt(scan.next());\n\t}",
"si",
"{\n\t\treturn Integer.parseInt(scan.next());\n\t}",
"return Integer.parseInt(scan.next());",
"Integer.parseInt(scan.next())",
"Integer.parseInt",
"Integer",
"scan.next()",
"scan.next",
"scan",
"public class Main {\n\n\tstatic Scanner scan = new Scanner(System.in);\n\tstatic PrintWriter out = new PrintWriter(System.out);\n\n\tpublic static void main(String[] args) {\n\t\tint w = si(), n = si();\n\t\tint[] ary = new int[w];\n\t\tfor (int i = 0; i < w; i++)\n\t\t\tary[i]=i+1;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString[] cons = scan.next().split(\",\");\n\t\t\tint p = Integer.parseInt(cons[0])-1, q = Integer.parseInt(cons[1])-1;\n\t\t\tint tmp = ary[p];\n\t\t\tary[p] = ary[q];\n\t\t\tary[q] = tmp;\n\t\t}\n\t\tfor (int i = 0; i < w ; i++)\n\t\t\tout.println(ary[i]);\n\t\tout.flush();\n\t}\n\n\tstatic int si() {\n\t\treturn Integer.parseInt(scan.next());\n\t}\n}",
"public class Main {\n\n\tstatic Scanner scan = new Scanner(System.in);\n\tstatic PrintWriter out = new PrintWriter(System.out);\n\n\tpublic static void main(String[] args) {\n\t\tint w = si(), n = si();\n\t\tint[] ary = new int[w];\n\t\tfor (int i = 0; i < w; i++)\n\t\t\tary[i]=i+1;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString[] cons = scan.next().split(\",\");\n\t\t\tint p = Integer.parseInt(cons[0])-1, q = Integer.parseInt(cons[1])-1;\n\t\t\tint tmp = ary[p];\n\t\t\tary[p] = ary[q];\n\t\t\tary[q] = tmp;\n\t\t}\n\t\tfor (int i = 0; i < w ; i++)\n\t\t\tout.println(ary[i]);\n\t\tout.flush();\n\t}\n\n\tstatic int si() {\n\t\treturn Integer.parseInt(scan.next());\n\t}\n}",
"Main"
] | import java.io.PrintWriter;
import java.util.Scanner;
public class Main {
static Scanner scan = new Scanner(System.in);
static PrintWriter out = new PrintWriter(System.out);
public static void main(String[] args) {
int w = si(), n = si();
int[] ary = new int[w];
for (int i = 0; i < w; i++)
ary[i]=i+1;
for (int i = 0; i < n; i++) {
String[] cons = scan.next().split(",");
int p = Integer.parseInt(cons[0])-1, q = Integer.parseInt(cons[1])-1;
int tmp = ary[p];
ary[p] = ary[q];
ary[q] = tmp;
}
for (int i = 0; i < w ; i++)
out.println(ary[i]);
out.flush();
}
static int si() {
return Integer.parseInt(scan.next());
}
} |
[
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,
41,
13,
17,
42,
13,
30,
0,
13,
4,
18,
13,
4,
18,
13,
14,
2,
13,
17,
30,
3,
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,
14,
2,
13,
17,
30,
3,
42,
13,
30,
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,
0,
13,
17,
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
],
[
206,
11
],
[
206,
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
],
[
14,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
38,
39
],
[
39,
40
],
[
32,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
45,
46
],
[
32,
47
],
[
47,
48
],
[
47,
49
],
[
32,
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
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
68,
70
],
[
32,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
76,
77
],
[
77,
78
],
[
32,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
83,
84
],
[
32,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
93,
94
],
[
93,
95
],
[
88,
96
],
[
96,
97
],
[
97,
98
],
[
88,
99
],
[
100,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
104,
105
],
[
100,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
107,
111
],
[
111,
112
],
[
112,
113
],
[
106,
114
],
[
114,
115
],
[
100,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
119,
120
],
[
118,
121
],
[
100,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
124,
126
],
[
100,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
129,
131
],
[
131,
132
],
[
131,
133
],
[
100,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
137,
139
],
[
134,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
142,
144
],
[
100,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
148,
149
],
[
148,
150
],
[
145,
151
],
[
87,
152
],
[
152,
153
],
[
152,
154
],
[
152,
155
],
[
156,
156
],
[
156,
157
],
[
157,
158
],
[
158,
159
],
[
159,
160
],
[
159,
161
],
[
157,
162
],
[
87,
163
],
[
163,
164
],
[
163,
165
],
[
12,
166
],
[
166,
167
],
[
206,
168
],
[
168,
169
],
[
168,
170
],
[
170,
171
],
[
171,
172
],
[
171,
173
],
[
174,
175
],
[
174,
176
],
[
170,
177
],
[
177,
178
],
[
178,
179
],
[
178,
180
],
[
177,
181
],
[
181,
182
],
[
182,
183
],
[
183,
184
],
[
182,
185
],
[
185,
186
],
[
185,
187
],
[
181,
188
],
[
170,
189
],
[
189,
190
],
[
190,
191
],
[
190,
192
],
[
189,
193
],
[
193,
194
],
[
194,
195
],
[
195,
196
],
[
194,
197
],
[
197,
198
],
[
197,
199
],
[
193,
200
],
[
170,
201
],
[
201,
202
],
[
168,
203
],
[
203,
204
],
[
0,
205
],
[
205,
206
],
[
205,
207
]
] | [
"\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 IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\t// ????£??????¬??°\n\t\tint vertical = 0;\n\t\t// ?¨??£??????¬??°\n\t\tint horizontal = 0;\n\t\t// ????????????????????¨?????°\n\t\tint x = 0;\n\t\t// ????????????\n\t\tboolean result = true;\n\n\t\twhile (result) {\n\t\t\t// ????£? 1??????\n\t\t\tvertical = Integer.parseInt(br.readLine());\n\t\t\tif (vertical > 30) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// ????£???????????????????\n\t\t\tint[] drowingLots = new int[vertical];\n\t\t\t// ??????????£??????????????´???????\n\t\t\tfor (int i = 0; i < vertical; ++i) {\n\t\t\t\tdrowingLots[i] = i + 1;\n\t\t\t}\n\n\t\t\t// ?¨??£? 2??????\n\t\t\thorizontal = Integer.parseInt(br.readLine());\n\t\t\tif (horizontal > 30) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\twhile (result) {\n\t\t\t\t// ?¨??????\\?????????????????????????????????????????? 3????????\\???\n\t\t\t\tfor (int i = 0; i < horizontal; ++i) {\n\t\t\t\t\tString input = br.readLine();\n\t\t\t\t\tif (input == null || input.isEmpty()) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tString[] change = input.split(\",\");\n\t\t\t\t\tint[] intInput = adjustment(change);\n\n\t\t\t\t\t// a1???????????????\n\t\t\t\t\tx = drowingLots[intInput[0]];\n\t\t\t\t\t// b1???a1?????\\??????\n\t\t\t\t\tdrowingLots[intInput[0]] = drowingLots[intInput[1]];\n\t\t\t\t\t// a1???b1?????\\??????\n\t\t\t\t\tdrowingLots[intInput[1]] = x;\n\t\t\t\t}\n\n\t\t\t\tfor (int output : drowingLots) {\n\t\t\t\t\tSystem.out.println(output);\n\t\t\t\t}\n\t\t\t\tresult = false;\n\t\t\t}\n\n\t\t}\n\t}\n\n\t// ??\\??????????????????int??????????????????-1??????\n\tprivate static int[] adjustment(String[] strInput) {\n\t\t// int????????????????????????\n\t\tint[] intInput = new int[strInput.length];\n\n\t\tintInput[0] = Integer.parseInt(strInput[0]) - 1;\n\t\tintInput[1] = Integer.parseInt(strInput[1]) - 1;\n\n\t\treturn intInput;\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\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\t// ????£??????¬??°\n\t\tint vertical = 0;\n\t\t// ?¨??£??????¬??°\n\t\tint horizontal = 0;\n\t\t// ????????????????????¨?????°\n\t\tint x = 0;\n\t\t// ????????????\n\t\tboolean result = true;\n\n\t\twhile (result) {\n\t\t\t// ????£? 1??????\n\t\t\tvertical = Integer.parseInt(br.readLine());\n\t\t\tif (vertical > 30) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// ????£???????????????????\n\t\t\tint[] drowingLots = new int[vertical];\n\t\t\t// ??????????£??????????????´???????\n\t\t\tfor (int i = 0; i < vertical; ++i) {\n\t\t\t\tdrowingLots[i] = i + 1;\n\t\t\t}\n\n\t\t\t// ?¨??£? 2??????\n\t\t\thorizontal = Integer.parseInt(br.readLine());\n\t\t\tif (horizontal > 30) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\twhile (result) {\n\t\t\t\t// ?¨??????\\?????????????????????????????????????????? 3????????\\???\n\t\t\t\tfor (int i = 0; i < horizontal; ++i) {\n\t\t\t\t\tString input = br.readLine();\n\t\t\t\t\tif (input == null || input.isEmpty()) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tString[] change = input.split(\",\");\n\t\t\t\t\tint[] intInput = adjustment(change);\n\n\t\t\t\t\t// a1???????????????\n\t\t\t\t\tx = drowingLots[intInput[0]];\n\t\t\t\t\t// b1???a1?????\\??????\n\t\t\t\t\tdrowingLots[intInput[0]] = drowingLots[intInput[1]];\n\t\t\t\t\t// a1???b1?????\\??????\n\t\t\t\t\tdrowingLots[intInput[1]] = x;\n\t\t\t\t}\n\n\t\t\t\tfor (int output : drowingLots) {\n\t\t\t\t\tSystem.out.println(output);\n\t\t\t\t}\n\t\t\t\tresult = false;\n\t\t\t}\n\n\t\t}\n\t}\n\n\t// ??\\??????????????????int??????????????????-1??????\n\tprivate static int[] adjustment(String[] strInput) {\n\t\t// int????????????????????????\n\t\tint[] intInput = new int[strInput.length];\n\n\t\tintInput[0] = Integer.parseInt(strInput[0]) - 1;\n\t\tintInput[1] = Integer.parseInt(strInput[1]) - 1;\n\n\t\treturn intInput;\n\t}\n\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\t// ????£??????¬??°\n\t\tint vertical = 0;\n\t\t// ?¨??£??????¬??°\n\t\tint horizontal = 0;\n\t\t// ????????????????????¨?????°\n\t\tint x = 0;\n\t\t// ????????????\n\t\tboolean result = true;\n\n\t\twhile (result) {\n\t\t\t// ????£? 1??????\n\t\t\tvertical = Integer.parseInt(br.readLine());\n\t\t\tif (vertical > 30) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// ????£???????????????????\n\t\t\tint[] drowingLots = new int[vertical];\n\t\t\t// ??????????£??????????????´???????\n\t\t\tfor (int i = 0; i < vertical; ++i) {\n\t\t\t\tdrowingLots[i] = i + 1;\n\t\t\t}\n\n\t\t\t// ?¨??£? 2??????\n\t\t\thorizontal = Integer.parseInt(br.readLine());\n\t\t\tif (horizontal > 30) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\twhile (result) {\n\t\t\t\t// ?¨??????\\?????????????????????????????????????????? 3????????\\???\n\t\t\t\tfor (int i = 0; i < horizontal; ++i) {\n\t\t\t\t\tString input = br.readLine();\n\t\t\t\t\tif (input == null || input.isEmpty()) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tString[] change = input.split(\",\");\n\t\t\t\t\tint[] intInput = adjustment(change);\n\n\t\t\t\t\t// a1???????????????\n\t\t\t\t\tx = drowingLots[intInput[0]];\n\t\t\t\t\t// b1???a1?????\\??????\n\t\t\t\t\tdrowingLots[intInput[0]] = drowingLots[intInput[1]];\n\t\t\t\t\t// a1???b1?????\\??????\n\t\t\t\t\tdrowingLots[intInput[1]] = x;\n\t\t\t\t}\n\n\t\t\t\tfor (int output : drowingLots) {\n\t\t\t\t\tSystem.out.println(output);\n\t\t\t\t}\n\t\t\t\tresult = false;\n\t\t\t}\n\n\t\t}\n\t}",
"main",
"{\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\t// ????£??????¬??°\n\t\tint vertical = 0;\n\t\t// ?¨??£??????¬??°\n\t\tint horizontal = 0;\n\t\t// ????????????????????¨?????°\n\t\tint x = 0;\n\t\t// ????????????\n\t\tboolean result = true;\n\n\t\twhile (result) {\n\t\t\t// ????£? 1??????\n\t\t\tvertical = Integer.parseInt(br.readLine());\n\t\t\tif (vertical > 30) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// ????£???????????????????\n\t\t\tint[] drowingLots = new int[vertical];\n\t\t\t// ??????????£??????????????´???????\n\t\t\tfor (int i = 0; i < vertical; ++i) {\n\t\t\t\tdrowingLots[i] = i + 1;\n\t\t\t}\n\n\t\t\t// ?¨??£? 2??????\n\t\t\thorizontal = Integer.parseInt(br.readLine());\n\t\t\tif (horizontal > 30) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\twhile (result) {\n\t\t\t\t// ?¨??????\\?????????????????????????????????????????? 3????????\\???\n\t\t\t\tfor (int i = 0; i < horizontal; ++i) {\n\t\t\t\t\tString input = br.readLine();\n\t\t\t\t\tif (input == null || input.isEmpty()) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tString[] change = input.split(\",\");\n\t\t\t\t\tint[] intInput = adjustment(change);\n\n\t\t\t\t\t// a1???????????????\n\t\t\t\t\tx = drowingLots[intInput[0]];\n\t\t\t\t\t// b1???a1?????\\??????\n\t\t\t\t\tdrowingLots[intInput[0]] = drowingLots[intInput[1]];\n\t\t\t\t\t// a1???b1?????\\??????\n\t\t\t\t\tdrowingLots[intInput[1]] = x;\n\t\t\t\t}\n\n\t\t\t\tfor (int output : drowingLots) {\n\t\t\t\t\tSystem.out.println(output);\n\t\t\t\t}\n\t\t\t\tresult = false;\n\t\t\t}\n\n\t\t}\n\t}",
"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",
"boolean result = true;",
"result",
"true",
"while (result) {\n\t\t\t// ????£? 1??????\n\t\t\tvertical = Integer.parseInt(br.readLine());\n\t\t\tif (vertical > 30) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// ????£???????????????????\n\t\t\tint[] drowingLots = new int[vertical];\n\t\t\t// ??????????£??????????????´???????\n\t\t\tfor (int i = 0; i < vertical; ++i) {\n\t\t\t\tdrowingLots[i] = i + 1;\n\t\t\t}\n\n\t\t\t// ?¨??£? 2??????\n\t\t\thorizontal = Integer.parseInt(br.readLine());\n\t\t\tif (horizontal > 30) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\twhile (result) {\n\t\t\t\t// ?¨??????\\?????????????????????????????????????????? 3????????\\???\n\t\t\t\tfor (int i = 0; i < horizontal; ++i) {\n\t\t\t\t\tString input = br.readLine();\n\t\t\t\t\tif (input == null || input.isEmpty()) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tString[] change = input.split(\",\");\n\t\t\t\t\tint[] intInput = adjustment(change);\n\n\t\t\t\t\t// a1???????????????\n\t\t\t\t\tx = drowingLots[intInput[0]];\n\t\t\t\t\t// b1???a1?????\\??????\n\t\t\t\t\tdrowingLots[intInput[0]] = drowingLots[intInput[1]];\n\t\t\t\t\t// a1???b1?????\\??????\n\t\t\t\t\tdrowingLots[intInput[1]] = x;\n\t\t\t\t}\n\n\t\t\t\tfor (int output : drowingLots) {\n\t\t\t\t\tSystem.out.println(output);\n\t\t\t\t}\n\t\t\t\tresult = false;\n\t\t\t}\n\n\t\t}",
"result",
"{\n\t\t\t// ????£? 1??????\n\t\t\tvertical = Integer.parseInt(br.readLine());\n\t\t\tif (vertical > 30) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// ????£???????????????????\n\t\t\tint[] drowingLots = new int[vertical];\n\t\t\t// ??????????£??????????????´???????\n\t\t\tfor (int i = 0; i < vertical; ++i) {\n\t\t\t\tdrowingLots[i] = i + 1;\n\t\t\t}\n\n\t\t\t// ?¨??£? 2??????\n\t\t\thorizontal = Integer.parseInt(br.readLine());\n\t\t\tif (horizontal > 30) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\twhile (result) {\n\t\t\t\t// ?¨??????\\?????????????????????????????????????????? 3????????\\???\n\t\t\t\tfor (int i = 0; i < horizontal; ++i) {\n\t\t\t\t\tString input = br.readLine();\n\t\t\t\t\tif (input == null || input.isEmpty()) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tString[] change = input.split(\",\");\n\t\t\t\t\tint[] intInput = adjustment(change);\n\n\t\t\t\t\t// a1???????????????\n\t\t\t\t\tx = drowingLots[intInput[0]];\n\t\t\t\t\t// b1???a1?????\\??????\n\t\t\t\t\tdrowingLots[intInput[0]] = drowingLots[intInput[1]];\n\t\t\t\t\t// a1???b1?????\\??????\n\t\t\t\t\tdrowingLots[intInput[1]] = x;\n\t\t\t\t}\n\n\t\t\t\tfor (int output : drowingLots) {\n\t\t\t\t\tSystem.out.println(output);\n\t\t\t\t}\n\t\t\t\tresult = false;\n\t\t\t}\n\n\t\t}",
"vertical = Integer.parseInt(br.readLine())",
"vertical",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"if (vertical > 30) {\n\t\t\t\tbreak;\n\t\t\t}",
"vertical > 30",
"vertical",
"30",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"int[] drowingLots = new int[vertical];",
"drowingLots",
"new int[vertical]",
"vertical",
"for (int i = 0; i < vertical; ++i) {\n\t\t\t\tdrowingLots[i] = i + 1;\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < vertical",
"i",
"vertical",
"++i",
"++i",
"i",
"{\n\t\t\t\tdrowingLots[i] = i + 1;\n\t\t\t}",
"{\n\t\t\t\tdrowingLots[i] = i + 1;\n\t\t\t}",
"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",
"if (horizontal > 30) {\n\t\t\t\tbreak;\n\t\t\t}",
"horizontal > 30",
"horizontal",
"30",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"while (result) {\n\t\t\t\t// ?¨??????\\?????????????????????????????????????????? 3????????\\???\n\t\t\t\tfor (int i = 0; i < horizontal; ++i) {\n\t\t\t\t\tString input = br.readLine();\n\t\t\t\t\tif (input == null || input.isEmpty()) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tString[] change = input.split(\",\");\n\t\t\t\t\tint[] intInput = adjustment(change);\n\n\t\t\t\t\t// a1???????????????\n\t\t\t\t\tx = drowingLots[intInput[0]];\n\t\t\t\t\t// b1???a1?????\\??????\n\t\t\t\t\tdrowingLots[intInput[0]] = drowingLots[intInput[1]];\n\t\t\t\t\t// a1???b1?????\\??????\n\t\t\t\t\tdrowingLots[intInput[1]] = x;\n\t\t\t\t}\n\n\t\t\t\tfor (int output : drowingLots) {\n\t\t\t\t\tSystem.out.println(output);\n\t\t\t\t}\n\t\t\t\tresult = false;\n\t\t\t}",
"result",
"{\n\t\t\t\t// ?¨??????\\?????????????????????????????????????????? 3????????\\???\n\t\t\t\tfor (int i = 0; i < horizontal; ++i) {\n\t\t\t\t\tString input = br.readLine();\n\t\t\t\t\tif (input == null || input.isEmpty()) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tString[] change = input.split(\",\");\n\t\t\t\t\tint[] intInput = adjustment(change);\n\n\t\t\t\t\t// a1???????????????\n\t\t\t\t\tx = drowingLots[intInput[0]];\n\t\t\t\t\t// b1???a1?????\\??????\n\t\t\t\t\tdrowingLots[intInput[0]] = drowingLots[intInput[1]];\n\t\t\t\t\t// a1???b1?????\\??????\n\t\t\t\t\tdrowingLots[intInput[1]] = x;\n\t\t\t\t}\n\n\t\t\t\tfor (int output : drowingLots) {\n\t\t\t\t\tSystem.out.println(output);\n\t\t\t\t}\n\t\t\t\tresult = false;\n\t\t\t}",
"for (int i = 0; i < horizontal; ++i) {\n\t\t\t\t\tString input = br.readLine();\n\t\t\t\t\tif (input == null || input.isEmpty()) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tString[] change = input.split(\",\");\n\t\t\t\t\tint[] intInput = adjustment(change);\n\n\t\t\t\t\t// a1???????????????\n\t\t\t\t\tx = drowingLots[intInput[0]];\n\t\t\t\t\t// b1???a1?????\\??????\n\t\t\t\t\tdrowingLots[intInput[0]] = drowingLots[intInput[1]];\n\t\t\t\t\t// a1???b1?????\\??????\n\t\t\t\t\tdrowingLots[intInput[1]] = x;\n\t\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < horizontal",
"i",
"horizontal",
"++i",
"++i",
"i",
"{\n\t\t\t\t\tString input = br.readLine();\n\t\t\t\t\tif (input == null || input.isEmpty()) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tString[] change = input.split(\",\");\n\t\t\t\t\tint[] intInput = adjustment(change);\n\n\t\t\t\t\t// a1???????????????\n\t\t\t\t\tx = drowingLots[intInput[0]];\n\t\t\t\t\t// b1???a1?????\\??????\n\t\t\t\t\tdrowingLots[intInput[0]] = drowingLots[intInput[1]];\n\t\t\t\t\t// a1???b1?????\\??????\n\t\t\t\t\tdrowingLots[intInput[1]] = x;\n\t\t\t\t}",
"{\n\t\t\t\t\tString input = br.readLine();\n\t\t\t\t\tif (input == null || input.isEmpty()) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tString[] change = input.split(\",\");\n\t\t\t\t\tint[] intInput = adjustment(change);\n\n\t\t\t\t\t// a1???????????????\n\t\t\t\t\tx = drowingLots[intInput[0]];\n\t\t\t\t\t// b1???a1?????\\??????\n\t\t\t\t\tdrowingLots[intInput[0]] = drowingLots[intInput[1]];\n\t\t\t\t\t// a1???b1?????\\??????\n\t\t\t\t\tdrowingLots[intInput[1]] = x;\n\t\t\t\t}",
"String input = br.readLine();",
"input",
"br.readLine()",
"br.readLine",
"br",
"if (input == null || input.isEmpty()) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"input == null || input.isEmpty()",
"input == null",
"input",
"null",
"input.isEmpty()",
"input.isEmpty",
"input",
"{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"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\t\t\t\t\tSystem.out.println(output);\n\t\t\t\t}",
"int output",
"drowingLots",
"{\n\t\t\t\t\tSystem.out.println(output);\n\t\t\t\t}",
"{\n\t\t\t\t\tSystem.out.println(output);\n\t\t\t\t}",
"System.out.println(output)",
"System.out.println",
"System.out",
"System",
"System.out",
"output",
"result = false",
"result",
"false",
"String[] args",
"args",
"// ??\\??????????????????int??????????????????-1??????\n\tprivate static int[] adjustment(String[] strInput) {\n\t\t// int????????????????????????\n\t\tint[] intInput = new int[strInput.length];\n\n\t\tintInput[0] = Integer.parseInt(strInput[0]) - 1;\n\t\tintInput[1] = Integer.parseInt(strInput[1]) - 1;\n\n\t\treturn intInput;\n\t}",
"adjustment",
"{\n\t\t// int????????????????????????\n\t\tint[] intInput = new int[strInput.length];\n\n\t\tintInput[0] = Integer.parseInt(strInput[0]) - 1;\n\t\tintInput[1] = Integer.parseInt(strInput[1]) - 1;\n\n\t\treturn intInput;\n\t}",
"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\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\t// ????£??????¬??°\n\t\tint vertical = 0;\n\t\t// ?¨??£??????¬??°\n\t\tint horizontal = 0;\n\t\t// ????????????????????¨?????°\n\t\tint x = 0;\n\t\t// ????????????\n\t\tboolean result = true;\n\n\t\twhile (result) {\n\t\t\t// ????£? 1??????\n\t\t\tvertical = Integer.parseInt(br.readLine());\n\t\t\tif (vertical > 30) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// ????£???????????????????\n\t\t\tint[] drowingLots = new int[vertical];\n\t\t\t// ??????????£??????????????´???????\n\t\t\tfor (int i = 0; i < vertical; ++i) {\n\t\t\t\tdrowingLots[i] = i + 1;\n\t\t\t}\n\n\t\t\t// ?¨??£? 2??????\n\t\t\thorizontal = Integer.parseInt(br.readLine());\n\t\t\tif (horizontal > 30) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\twhile (result) {\n\t\t\t\t// ?¨??????\\?????????????????????????????????????????? 3????????\\???\n\t\t\t\tfor (int i = 0; i < horizontal; ++i) {\n\t\t\t\t\tString input = br.readLine();\n\t\t\t\t\tif (input == null || input.isEmpty()) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tString[] change = input.split(\",\");\n\t\t\t\t\tint[] intInput = adjustment(change);\n\n\t\t\t\t\t// a1???????????????\n\t\t\t\t\tx = drowingLots[intInput[0]];\n\t\t\t\t\t// b1???a1?????\\??????\n\t\t\t\t\tdrowingLots[intInput[0]] = drowingLots[intInput[1]];\n\t\t\t\t\t// a1???b1?????\\??????\n\t\t\t\t\tdrowingLots[intInput[1]] = x;\n\t\t\t\t}\n\n\t\t\t\tfor (int output : drowingLots) {\n\t\t\t\t\tSystem.out.println(output);\n\t\t\t\t}\n\t\t\t\tresult = false;\n\t\t\t}\n\n\t\t}\n\t}\n\n\t// ??\\??????????????????int??????????????????-1??????\n\tprivate static int[] adjustment(String[] strInput) {\n\t\t// int????????????????????????\n\t\tint[] intInput = new int[strInput.length];\n\n\t\tintInput[0] = Integer.parseInt(strInput[0]) - 1;\n\t\tintInput[1] = Integer.parseInt(strInput[1]) - 1;\n\n\t\treturn intInput;\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\t// ????£??????¬??°\n\t\tint vertical = 0;\n\t\t// ?¨??£??????¬??°\n\t\tint horizontal = 0;\n\t\t// ????????????????????¨?????°\n\t\tint x = 0;\n\t\t// ????????????\n\t\tboolean result = true;\n\n\t\twhile (result) {\n\t\t\t// ????£? 1??????\n\t\t\tvertical = Integer.parseInt(br.readLine());\n\t\t\tif (vertical > 30) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// ????£???????????????????\n\t\t\tint[] drowingLots = new int[vertical];\n\t\t\t// ??????????£??????????????´???????\n\t\t\tfor (int i = 0; i < vertical; ++i) {\n\t\t\t\tdrowingLots[i] = i + 1;\n\t\t\t}\n\n\t\t\t// ?¨??£? 2??????\n\t\t\thorizontal = Integer.parseInt(br.readLine());\n\t\t\tif (horizontal > 30) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\twhile (result) {\n\t\t\t\t// ?¨??????\\?????????????????????????????????????????? 3????????\\???\n\t\t\t\tfor (int i = 0; i < horizontal; ++i) {\n\t\t\t\t\tString input = br.readLine();\n\t\t\t\t\tif (input == null || input.isEmpty()) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tString[] change = input.split(\",\");\n\t\t\t\t\tint[] intInput = adjustment(change);\n\n\t\t\t\t\t// a1???????????????\n\t\t\t\t\tx = drowingLots[intInput[0]];\n\t\t\t\t\t// b1???a1?????\\??????\n\t\t\t\t\tdrowingLots[intInput[0]] = drowingLots[intInput[1]];\n\t\t\t\t\t// a1???b1?????\\??????\n\t\t\t\t\tdrowingLots[intInput[1]] = x;\n\t\t\t\t}\n\n\t\t\t\tfor (int output : drowingLots) {\n\t\t\t\t\tSystem.out.println(output);\n\t\t\t\t}\n\t\t\t\tresult = false;\n\t\t\t}\n\n\t\t}\n\t}\n\n\t// ??\\??????????????????int??????????????????-1??????\n\tprivate static int[] adjustment(String[] strInput) {\n\t\t// int????????????????????????\n\t\tint[] intInput = new int[strInput.length];\n\n\t\tintInput[0] = Integer.parseInt(strInput[0]) - 1;\n\t\tintInput[1] = Integer.parseInt(strInput[1]) - 1;\n\n\t\treturn intInput;\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 {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
// ????£??????¬??°
int vertical = 0;
// ?¨??£??????¬??°
int horizontal = 0;
// ????????????????????¨?????°
int x = 0;
// ????????????
boolean result = true;
while (result) {
// ????£? 1??????
vertical = Integer.parseInt(br.readLine());
if (vertical > 30) {
break;
}
// ????£???????????????????
int[] drowingLots = new int[vertical];
// ??????????£??????????????´???????
for (int i = 0; i < vertical; ++i) {
drowingLots[i] = i + 1;
}
// ?¨??£? 2??????
horizontal = Integer.parseInt(br.readLine());
if (horizontal > 30) {
break;
}
while (result) {
// ?¨??????\?????????????????????????????????????????? 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);
}
result = false;
}
}
}
// ??\??????????????????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,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
13,
11,
1,
0,
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,
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
],
[
136,
5
],
[
136,
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
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
8,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
8,
34
],
[
34,
35
],
[
34,
36
],
[
37,
38
],
[
37,
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
],
[
52,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
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
],
[
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
],
[
70,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
104
],
[
104,
105
],
[
104,
106
],
[
70,
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
],
[
6,
133
],
[
133,
134
],
[
0,
135
],
[
135,
136
],
[
135,
137
]
] | [
"import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\n\t\tint w,n,a,b,i,tmp;\n\t\tw=s.nextInt();//ツ縦\n\t\tn=s.nextInt();//ツ可。\n\t\tint k[]=new int[w+1];\n\t\tfor(i=1;i<=w;i++){\n\t\t\tk[i]=i;\n\t\t}\n\t\tfor(i=0;i<n;i++){\n\t\t\tString[] str=s.next().split(\",\");\n\t\t\ta=Integer.parseInt(str[0]);\n\t\t\tb=Integer.parseInt(str[1]);\n\t\t\ttmp=k[a];\n\t\t\tk[a]=k[b];\n\t\t\tk[b]=tmp;\n\t\t}\n\t\tfor(i=1;i<=w;i++){\n\t\t\tSystem.out.println(k[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 s=new Scanner(System.in);\n\t\tint w,n,a,b,i,tmp;\n\t\tw=s.nextInt();//ツ縦\n\t\tn=s.nextInt();//ツ可。\n\t\tint k[]=new int[w+1];\n\t\tfor(i=1;i<=w;i++){\n\t\t\tk[i]=i;\n\t\t}\n\t\tfor(i=0;i<n;i++){\n\t\t\tString[] str=s.next().split(\",\");\n\t\t\ta=Integer.parseInt(str[0]);\n\t\t\tb=Integer.parseInt(str[1]);\n\t\t\ttmp=k[a];\n\t\t\tk[a]=k[b];\n\t\t\tk[b]=tmp;\n\t\t}\n\t\tfor(i=1;i<=w;i++){\n\t\t\tSystem.out.println(k[i]);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\n\t\tint w,n,a,b,i,tmp;\n\t\tw=s.nextInt();//ツ縦\n\t\tn=s.nextInt();//ツ可。\n\t\tint k[]=new int[w+1];\n\t\tfor(i=1;i<=w;i++){\n\t\t\tk[i]=i;\n\t\t}\n\t\tfor(i=0;i<n;i++){\n\t\t\tString[] str=s.next().split(\",\");\n\t\t\ta=Integer.parseInt(str[0]);\n\t\t\tb=Integer.parseInt(str[1]);\n\t\t\ttmp=k[a];\n\t\t\tk[a]=k[b];\n\t\t\tk[b]=tmp;\n\t\t}\n\t\tfor(i=1;i<=w;i++){\n\t\t\tSystem.out.println(k[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner s=new Scanner(System.in);\n\t\tint w,n,a,b,i,tmp;\n\t\tw=s.nextInt();//ツ縦\n\t\tn=s.nextInt();//ツ可。\n\t\tint k[]=new int[w+1];\n\t\tfor(i=1;i<=w;i++){\n\t\t\tk[i]=i;\n\t\t}\n\t\tfor(i=0;i<n;i++){\n\t\t\tString[] str=s.next().split(\",\");\n\t\t\ta=Integer.parseInt(str[0]);\n\t\t\tb=Integer.parseInt(str[1]);\n\t\t\ttmp=k[a];\n\t\t\tk[a]=k[b];\n\t\t\tk[b]=tmp;\n\t\t}\n\t\tfor(i=1;i<=w;i++){\n\t\t\tSystem.out.println(k[i]);\n\t\t}\n\t}",
"Scanner s=new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"int w",
"w",
"n",
"n",
"a",
"a",
"b",
"b",
"i",
"i",
"tmp;",
"tmp",
"w=s.nextInt()",
"w",
"s.nextInt()",
"s.nextInt",
"s",
"n=s.nextInt()",
"n",
"s.nextInt()",
"s.nextInt",
"s",
"int k[]=new int[w+1];",
"k",
"new int[w+1]",
"w+1",
"w",
"1",
"for(i=1;i<=w;i++){\n\t\t\tk[i]=i;\n\t\t}",
"i=1;",
"i=1",
"i",
"1",
"i<=w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tk[i]=i;\n\t\t}",
"{\n\t\t\tk[i]=i;\n\t\t}",
"k[i]=i",
"k[i]",
"k",
"i",
"i",
"for(i=0;i<n;i++){\n\t\t\tString[] str=s.next().split(\",\");\n\t\t\ta=Integer.parseInt(str[0]);\n\t\t\tb=Integer.parseInt(str[1]);\n\t\t\ttmp=k[a];\n\t\t\tk[a]=k[b];\n\t\t\tk[b]=tmp;\n\t\t}",
"i=0;",
"i=0",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString[] str=s.next().split(\",\");\n\t\t\ta=Integer.parseInt(str[0]);\n\t\t\tb=Integer.parseInt(str[1]);\n\t\t\ttmp=k[a];\n\t\t\tk[a]=k[b];\n\t\t\tk[b]=tmp;\n\t\t}",
"{\n\t\t\tString[] str=s.next().split(\",\");\n\t\t\ta=Integer.parseInt(str[0]);\n\t\t\tb=Integer.parseInt(str[1]);\n\t\t\ttmp=k[a];\n\t\t\tk[a]=k[b];\n\t\t\tk[b]=tmp;\n\t\t}",
"String[] str=s.next().split(\",\");",
"str",
"s.next().split(\",\")",
"s.next().split",
"s.next()",
"s.next",
"s",
"\",\"",
"a=Integer.parseInt(str[0])",
"a",
"Integer.parseInt(str[0])",
"Integer.parseInt",
"Integer",
"str[0]",
"str",
"0",
"b=Integer.parseInt(str[1])",
"b",
"Integer.parseInt(str[1])",
"Integer.parseInt",
"Integer",
"str[1]",
"str",
"1",
"tmp=k[a]",
"tmp",
"k[a]",
"k",
"a",
"k[a]=k[b]",
"k[a]",
"k",
"a",
"k[b]",
"k",
"b",
"k[b]=tmp",
"k[b]",
"k",
"b",
"tmp",
"for(i=1;i<=w;i++){\n\t\t\tSystem.out.println(k[i]);\n\t\t}",
"i=1;",
"i=1",
"i",
"1",
"i<=w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(k[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(k[i]);\n\t\t}",
"System.out.println(k[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"k[i]",
"k",
"i",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\n\t\tint w,n,a,b,i,tmp;\n\t\tw=s.nextInt();//ツ縦\n\t\tn=s.nextInt();//ツ可。\n\t\tint k[]=new int[w+1];\n\t\tfor(i=1;i<=w;i++){\n\t\t\tk[i]=i;\n\t\t}\n\t\tfor(i=0;i<n;i++){\n\t\t\tString[] str=s.next().split(\",\");\n\t\t\ta=Integer.parseInt(str[0]);\n\t\t\tb=Integer.parseInt(str[1]);\n\t\t\ttmp=k[a];\n\t\t\tk[a]=k[b];\n\t\t\tk[b]=tmp;\n\t\t}\n\t\tfor(i=1;i<=w;i++){\n\t\t\tSystem.out.println(k[i]);\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\n\t\tint w,n,a,b,i,tmp;\n\t\tw=s.nextInt();//ツ縦\n\t\tn=s.nextInt();//ツ可。\n\t\tint k[]=new int[w+1];\n\t\tfor(i=1;i<=w;i++){\n\t\t\tk[i]=i;\n\t\t}\n\t\tfor(i=0;i<n;i++){\n\t\t\tString[] str=s.next().split(\",\");\n\t\t\ta=Integer.parseInt(str[0]);\n\t\t\tb=Integer.parseInt(str[1]);\n\t\t\ttmp=k[a];\n\t\t\tk[a]=k[b];\n\t\t\tk[b]=tmp;\n\t\t}\n\t\tfor(i=1;i<=w;i++){\n\t\t\tSystem.out.println(k[i]);\n\t\t}\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s=new Scanner(System.in);
int w,n,a,b,i,tmp;
w=s.nextInt();//ツ縦
n=s.nextInt();//ツ可。
int k[]=new int[w+1];
for(i=1;i<=w;i++){
k[i]=i;
}
for(i=0;i<n;i++){
String[] str=s.next().split(",");
a=Integer.parseInt(str[0]);
b=Integer.parseInt(str[1]);
tmp=k[a];
k[a]=k[b];
k[b]=tmp;
}
for(i=1;i<=w;i++){
System.out.println(k[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,
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,
2,
17,
13,
1,
0,
13,
17,
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,
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
],
[
157,
5
],
[
157,
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
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
26,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
37,
38
],
[
38,
39
],
[
8,
40
],
[
40,
41
],
[
40,
42
],
[
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
],
[
71,
72
],
[
71,
73
],
[
64,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
64,
78
],
[
79,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
79,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
87,
91
],
[
79,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
97,
98
],
[
97,
99
],
[
79,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
102,
105
],
[
105,
106
],
[
105,
107
],
[
79,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
112,
114
],
[
79,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
118,
120
],
[
115,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
123,
125
],
[
79,
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
],
[
145,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
146,
151
],
[
151,
152
],
[
151,
153
],
[
6,
154
],
[
154,
155
],
[
0,
156
],
[
156,
157
],
[
156,
158
]
] | [
"import java.io.*;\n\n public class Main{\n\t public static void main(String args[]) throws IOException{\n\t\t BufferedReader bf = new BufferedReader(\n\t\t\t\t new InputStreamReader(System.in));\n\t\t int w,n,right,left,x;\n\t\t String str;\n\t\t w = Integer.parseInt(bf.readLine());\n\t\t n = Integer.parseInt(bf.readLine());\n\t\t int[] order = new int[w];\n\t\t for(int i = 0; i < w; i++){\n\t\t\t order[i] = i+1;\n\t\t }\n\t\t for(int i = 0; i < 2*n; i += 2){\n\t\t\t str = bf.readLine();\n\t\t\t String deta[] = str.split(\",\",0);\n\t\t\t left = Integer.parseInt(deta[0]);\n\t\t\t right = Integer.parseInt(deta[1]);\n\t\t\t x = order[left-1];\n\t\t\t order[left-1] =order[right-1];\n\t\t\t order[right-1] = x;\n\t\t }\n\t\t for(int i = 0; i < w; i++){\n\t\t\t System.out.println(order[i]);\n\t\t }\n\t }\n}",
"import java.io.*;",
"io.*",
"java",
"public class Main{\n\t public static void main(String args[]) throws IOException{\n\t\t BufferedReader bf = new BufferedReader(\n\t\t\t\t new InputStreamReader(System.in));\n\t\t int w,n,right,left,x;\n\t\t String str;\n\t\t w = Integer.parseInt(bf.readLine());\n\t\t n = Integer.parseInt(bf.readLine());\n\t\t int[] order = new int[w];\n\t\t for(int i = 0; i < w; i++){\n\t\t\t order[i] = i+1;\n\t\t }\n\t\t for(int i = 0; i < 2*n; i += 2){\n\t\t\t str = bf.readLine();\n\t\t\t String deta[] = str.split(\",\",0);\n\t\t\t left = Integer.parseInt(deta[0]);\n\t\t\t right = Integer.parseInt(deta[1]);\n\t\t\t x = order[left-1];\n\t\t\t order[left-1] =order[right-1];\n\t\t\t order[right-1] = x;\n\t\t }\n\t\t for(int i = 0; i < w; i++){\n\t\t\t System.out.println(order[i]);\n\t\t }\n\t }\n}",
"Main",
"public static void main(String args[]) throws IOException{\n\t\t BufferedReader bf = new BufferedReader(\n\t\t\t\t new InputStreamReader(System.in));\n\t\t int w,n,right,left,x;\n\t\t String str;\n\t\t w = Integer.parseInt(bf.readLine());\n\t\t n = Integer.parseInt(bf.readLine());\n\t\t int[] order = new int[w];\n\t\t for(int i = 0; i < w; i++){\n\t\t\t order[i] = i+1;\n\t\t }\n\t\t for(int i = 0; i < 2*n; i += 2){\n\t\t\t str = bf.readLine();\n\t\t\t String deta[] = str.split(\",\",0);\n\t\t\t left = Integer.parseInt(deta[0]);\n\t\t\t right = Integer.parseInt(deta[1]);\n\t\t\t x = order[left-1];\n\t\t\t order[left-1] =order[right-1];\n\t\t\t order[right-1] = x;\n\t\t }\n\t\t for(int i = 0; i < w; i++){\n\t\t\t System.out.println(order[i]);\n\t\t }\n\t }",
"main",
"{\n\t\t BufferedReader bf = new BufferedReader(\n\t\t\t\t new InputStreamReader(System.in));\n\t\t int w,n,right,left,x;\n\t\t String str;\n\t\t w = Integer.parseInt(bf.readLine());\n\t\t n = Integer.parseInt(bf.readLine());\n\t\t int[] order = new int[w];\n\t\t for(int i = 0; i < w; i++){\n\t\t\t order[i] = i+1;\n\t\t }\n\t\t for(int i = 0; i < 2*n; i += 2){\n\t\t\t str = bf.readLine();\n\t\t\t String deta[] = str.split(\",\",0);\n\t\t\t left = Integer.parseInt(deta[0]);\n\t\t\t right = Integer.parseInt(deta[1]);\n\t\t\t x = order[left-1];\n\t\t\t order[left-1] =order[right-1];\n\t\t\t order[right-1] = x;\n\t\t }\n\t\t for(int i = 0; i < w; i++){\n\t\t\t System.out.println(order[i]);\n\t\t }\n\t }",
"BufferedReader bf = new BufferedReader(\n\t\t\t\t new InputStreamReader(System.in));",
"bf",
"new BufferedReader(\n\t\t\t\t new InputStreamReader(System.in))",
"int w",
"w",
"n",
"n",
"right",
"right",
"left",
"left",
"x;",
"x",
"String str;",
"str",
"w = Integer.parseInt(bf.readLine())",
"w",
"Integer.parseInt(bf.readLine())",
"Integer.parseInt",
"Integer",
"bf.readLine()",
"bf.readLine",
"bf",
"n = Integer.parseInt(bf.readLine())",
"n",
"Integer.parseInt(bf.readLine())",
"Integer.parseInt",
"Integer",
"bf.readLine()",
"bf.readLine",
"bf",
"int[] order = new int[w];",
"order",
"new int[w]",
"w",
"for(int i = 0; i < w; i++){\n\t\t\t order[i] = i+1;\n\t\t }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\t order[i] = i+1;\n\t\t }",
"{\n\t\t\t order[i] = i+1;\n\t\t }",
"order[i] = i+1",
"order[i]",
"order",
"i",
"i+1",
"i",
"1",
"for(int i = 0; i < 2*n; i += 2){\n\t\t\t str = bf.readLine();\n\t\t\t String deta[] = str.split(\",\",0);\n\t\t\t left = Integer.parseInt(deta[0]);\n\t\t\t right = Integer.parseInt(deta[1]);\n\t\t\t x = order[left-1];\n\t\t\t order[left-1] =order[right-1];\n\t\t\t order[right-1] = x;\n\t\t }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < 2*n",
"i",
"2*n",
"2",
"n",
"i += 2",
"i += 2",
"i",
"2",
"{\n\t\t\t str = bf.readLine();\n\t\t\t String deta[] = str.split(\",\",0);\n\t\t\t left = Integer.parseInt(deta[0]);\n\t\t\t right = Integer.parseInt(deta[1]);\n\t\t\t x = order[left-1];\n\t\t\t order[left-1] =order[right-1];\n\t\t\t order[right-1] = x;\n\t\t }",
"{\n\t\t\t str = bf.readLine();\n\t\t\t String deta[] = str.split(\",\",0);\n\t\t\t left = Integer.parseInt(deta[0]);\n\t\t\t right = Integer.parseInt(deta[1]);\n\t\t\t x = order[left-1];\n\t\t\t order[left-1] =order[right-1];\n\t\t\t order[right-1] = x;\n\t\t }",
"str = bf.readLine()",
"str",
"bf.readLine()",
"bf.readLine",
"bf",
"String deta[] = str.split(\",\",0);",
"deta",
"str.split(\",\",0)",
"str.split",
"str",
"\",\"",
"0",
"left = Integer.parseInt(deta[0])",
"left",
"Integer.parseInt(deta[0])",
"Integer.parseInt",
"Integer",
"deta[0]",
"deta",
"0",
"right = Integer.parseInt(deta[1])",
"right",
"Integer.parseInt(deta[1])",
"Integer.parseInt",
"Integer",
"deta[1]",
"deta",
"1",
"x = order[left-1]",
"x",
"order[left-1]",
"order",
"left-1",
"left",
"1",
"order[left-1] =order[right-1]",
"order[left-1]",
"order",
"left-1",
"left",
"1",
"order[right-1]",
"order",
"right-1",
"right",
"1",
"order[right-1] = x",
"order[right-1]",
"order",
"right-1",
"right",
"1",
"x",
"for(int i = 0; i < w; i++){\n\t\t\t System.out.println(order[i]);\n\t\t }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\t System.out.println(order[i]);\n\t\t }",
"{\n\t\t\t System.out.println(order[i]);\n\t\t }",
"System.out.println(order[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"order[i]",
"order",
"i",
"String args[]",
"args",
"public class Main{\n\t public static void main(String args[]) throws IOException{\n\t\t BufferedReader bf = new BufferedReader(\n\t\t\t\t new InputStreamReader(System.in));\n\t\t int w,n,right,left,x;\n\t\t String str;\n\t\t w = Integer.parseInt(bf.readLine());\n\t\t n = Integer.parseInt(bf.readLine());\n\t\t int[] order = new int[w];\n\t\t for(int i = 0; i < w; i++){\n\t\t\t order[i] = i+1;\n\t\t }\n\t\t for(int i = 0; i < 2*n; i += 2){\n\t\t\t str = bf.readLine();\n\t\t\t String deta[] = str.split(\",\",0);\n\t\t\t left = Integer.parseInt(deta[0]);\n\t\t\t right = Integer.parseInt(deta[1]);\n\t\t\t x = order[left-1];\n\t\t\t order[left-1] =order[right-1];\n\t\t\t order[right-1] = x;\n\t\t }\n\t\t for(int i = 0; i < w; i++){\n\t\t\t System.out.println(order[i]);\n\t\t }\n\t }\n}",
"public class Main{\n\t public static void main(String args[]) throws IOException{\n\t\t BufferedReader bf = new BufferedReader(\n\t\t\t\t new InputStreamReader(System.in));\n\t\t int w,n,right,left,x;\n\t\t String str;\n\t\t w = Integer.parseInt(bf.readLine());\n\t\t n = Integer.parseInt(bf.readLine());\n\t\t int[] order = new int[w];\n\t\t for(int i = 0; i < w; i++){\n\t\t\t order[i] = i+1;\n\t\t }\n\t\t for(int i = 0; i < 2*n; i += 2){\n\t\t\t str = bf.readLine();\n\t\t\t String deta[] = str.split(\",\",0);\n\t\t\t left = Integer.parseInt(deta[0]);\n\t\t\t right = Integer.parseInt(deta[1]);\n\t\t\t x = order[left-1];\n\t\t\t order[left-1] =order[right-1];\n\t\t\t order[right-1] = x;\n\t\t }\n\t\t for(int i = 0; i < w; i++){\n\t\t\t System.out.println(order[i]);\n\t\t }\n\t }\n}",
"Main"
] | import java.io.*;
public class Main{
public static void main(String args[]) throws IOException{
BufferedReader bf = new BufferedReader(
new InputStreamReader(System.in));
int w,n,right,left,x;
String str;
w = Integer.parseInt(bf.readLine());
n = Integer.parseInt(bf.readLine());
int[] order = new int[w];
for(int i = 0; i < w; i++){
order[i] = i+1;
}
for(int i = 0; i < 2*n; i += 2){
str = bf.readLine();
String deta[] = str.split(",",0);
left = Integer.parseInt(deta[0]);
right = Integer.parseInt(deta[1]);
x = order[left-1];
order[left-1] =order[right-1];
order[right-1] = x;
}
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,
2,
13,
17,
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,
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,
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,
23,
13,
12,
13,
30,
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
],
[
157,
5
],
[
157,
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
],
[
35,
36
],
[
35,
37
],
[
28,
38
],
[
38,
39
],
[
39,
40
],
[
28,
41
],
[
42,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
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
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
71,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
60,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
87,
92
],
[
84,
93
],
[
93,
94
],
[
94,
95
],
[
60,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
98,
100
],
[
98,
101
],
[
98,
102
],
[
8,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
103,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
110,
112
],
[
103,
113
],
[
113,
114
],
[
114,
115
],
[
103,
116
],
[
117,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
118,
123
],
[
123,
124
],
[
123,
125
],
[
6,
126
],
[
126,
127
],
[
157,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
133,
135
],
[
130,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
136,
140
],
[
140,
141
],
[
140,
142
],
[
130,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
143,
147
],
[
130,
148
],
[
148,
149
],
[
128,
150
],
[
150,
151
],
[
128,
152
],
[
152,
153
],
[
128,
154
],
[
154,
155
],
[
0,
156
],
[
156,
157
],
[
156,
158
]
] | [
"import 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\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] lines = new int[w+1];\n\t\tfor(int i =1; i<lines.length; i++){\n\t\t\tlines[i]=i;\t//initialize lines[]\n\t\t}\n\t\tfor(int i=0; i<n; i++){\n\t\t\tString s = sc.next();\n\t\t\tint a = Integer.parseInt(s.substring(0, s.indexOf(\",\")));\n\t\t\tint b = Integer.parseInt(s.substring(s.indexOf(\",\")+1,s.length()));\n\t\t\tlines = Swap(lines, a, b);\n\t\t}\n\t\tfor(int i=1; i<lines.length; i++){\n\t\t\tSystem.out.println(lines[i]);\n\t\t}\n\n\t}\n\tstatic int[] Swap(int[] ints, int a, int b){\n\t\tint c = ints[a];\n\t\tints[a]= ints[b];\n\t\tints[b]= c;\n\t\treturn ints;\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[] lines = new int[w+1];\n\t\tfor(int i =1; i<lines.length; i++){\n\t\t\tlines[i]=i;\t//initialize lines[]\n\t\t}\n\t\tfor(int i=0; i<n; i++){\n\t\t\tString s = sc.next();\n\t\t\tint a = Integer.parseInt(s.substring(0, s.indexOf(\",\")));\n\t\t\tint b = Integer.parseInt(s.substring(s.indexOf(\",\")+1,s.length()));\n\t\t\tlines = Swap(lines, a, b);\n\t\t}\n\t\tfor(int i=1; i<lines.length; i++){\n\t\t\tSystem.out.println(lines[i]);\n\t\t}\n\n\t}\n\tstatic int[] Swap(int[] ints, int a, int b){\n\t\tint c = ints[a];\n\t\tints[a]= ints[b];\n\t\tints[b]= c;\n\t\treturn ints;\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[] lines = new int[w+1];\n\t\tfor(int i =1; i<lines.length; i++){\n\t\t\tlines[i]=i;\t//initialize lines[]\n\t\t}\n\t\tfor(int i=0; i<n; i++){\n\t\t\tString s = sc.next();\n\t\t\tint a = Integer.parseInt(s.substring(0, s.indexOf(\",\")));\n\t\t\tint b = Integer.parseInt(s.substring(s.indexOf(\",\")+1,s.length()));\n\t\t\tlines = Swap(lines, a, b);\n\t\t}\n\t\tfor(int i=1; i<lines.length; i++){\n\t\t\tSystem.out.println(lines[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[] lines = new int[w+1];\n\t\tfor(int i =1; i<lines.length; i++){\n\t\t\tlines[i]=i;\t//initialize lines[]\n\t\t}\n\t\tfor(int i=0; i<n; i++){\n\t\t\tString s = sc.next();\n\t\t\tint a = Integer.parseInt(s.substring(0, s.indexOf(\",\")));\n\t\t\tint b = Integer.parseInt(s.substring(s.indexOf(\",\")+1,s.length()));\n\t\t\tlines = Swap(lines, a, b);\n\t\t}\n\t\tfor(int i=1; i<lines.length; i++){\n\t\t\tSystem.out.println(lines[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[] lines = new int[w+1];",
"lines",
"new int[w+1]",
"w+1",
"w",
"1",
"for(int i =1; i<lines.length; i++){\n\t\t\tlines[i]=i;\t//initialize lines[]\n\t\t}",
"int i =1;",
"int i =1;",
"i",
"1",
"i<lines.length",
"i",
"lines.length",
"lines",
"lines.length",
"i++",
"i++",
"i",
"{\n\t\t\tlines[i]=i;\t//initialize lines[]\n\t\t}",
"{\n\t\t\tlines[i]=i;\t//initialize lines[]\n\t\t}",
"lines[i]=i",
"lines[i]",
"lines",
"i",
"i",
"for(int i=0; i<n; i++){\n\t\t\tString s = sc.next();\n\t\t\tint a = Integer.parseInt(s.substring(0, s.indexOf(\",\")));\n\t\t\tint b = Integer.parseInt(s.substring(s.indexOf(\",\")+1,s.length()));\n\t\t\tlines = Swap(lines, a, b);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString s = sc.next();\n\t\t\tint a = Integer.parseInt(s.substring(0, s.indexOf(\",\")));\n\t\t\tint b = Integer.parseInt(s.substring(s.indexOf(\",\")+1,s.length()));\n\t\t\tlines = Swap(lines, a, b);\n\t\t}",
"{\n\t\t\tString s = sc.next();\n\t\t\tint a = Integer.parseInt(s.substring(0, s.indexOf(\",\")));\n\t\t\tint b = Integer.parseInt(s.substring(s.indexOf(\",\")+1,s.length()));\n\t\t\tlines = Swap(lines, a, b);\n\t\t}",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"int a = Integer.parseInt(s.substring(0, s.indexOf(\",\")));",
"a",
"Integer.parseInt(s.substring(0, s.indexOf(\",\")))",
"Integer.parseInt",
"Integer",
"s.substring(0, s.indexOf(\",\"))",
"s.substring",
"s",
"0",
"s.indexOf(\",\")",
"s.indexOf",
"s",
"\",\"",
"int b = Integer.parseInt(s.substring(s.indexOf(\",\")+1,s.length()));",
"b",
"Integer.parseInt(s.substring(s.indexOf(\",\")+1,s.length()))",
"Integer.parseInt",
"Integer",
"s.substring(s.indexOf(\",\")+1,s.length())",
"s.substring",
"s",
"s.indexOf(\",\")+1",
"s.indexOf(\",\")",
"s.indexOf",
"s",
"\",\"",
"1",
"s.length()",
"s.length",
"s",
"lines = Swap(lines, a, b)",
"lines",
"Swap(lines, a, b)",
"Swap",
"lines",
"a",
"b",
"for(int i=1; i<lines.length; i++){\n\t\t\tSystem.out.println(lines[i]);\n\t\t}",
"int i=1;",
"int i=1;",
"i",
"1",
"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",
"String[] args",
"args",
"static int[] Swap(int[] ints, int a, int b){\n\t\tint c = ints[a];\n\t\tints[a]= ints[b];\n\t\tints[b]= c;\n\t\treturn ints;\n\t}",
"Swap",
"{\n\t\tint c = ints[a];\n\t\tints[a]= ints[b];\n\t\tints[b]= c;\n\t\treturn ints;\n\t}",
"int c = ints[a];",
"c",
"ints[a]",
"ints",
"a",
"ints[a]= ints[b]",
"ints[a]",
"ints",
"a",
"ints[b]",
"ints",
"b",
"ints[b]= c",
"ints[b]",
"ints",
"b",
"c",
"return ints;",
"ints",
"int[] ints",
"ints",
"int a",
"a",
"int b",
"b",
"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[] lines = new int[w+1];\n\t\tfor(int i =1; i<lines.length; i++){\n\t\t\tlines[i]=i;\t//initialize lines[]\n\t\t}\n\t\tfor(int i=0; i<n; i++){\n\t\t\tString s = sc.next();\n\t\t\tint a = Integer.parseInt(s.substring(0, s.indexOf(\",\")));\n\t\t\tint b = Integer.parseInt(s.substring(s.indexOf(\",\")+1,s.length()));\n\t\t\tlines = Swap(lines, a, b);\n\t\t}\n\t\tfor(int i=1; i<lines.length; i++){\n\t\t\tSystem.out.println(lines[i]);\n\t\t}\n\n\t}\n\tstatic int[] Swap(int[] ints, int a, int b){\n\t\tint c = ints[a];\n\t\tints[a]= ints[b];\n\t\tints[b]= c;\n\t\treturn ints;\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[] lines = new int[w+1];\n\t\tfor(int i =1; i<lines.length; i++){\n\t\t\tlines[i]=i;\t//initialize lines[]\n\t\t}\n\t\tfor(int i=0; i<n; i++){\n\t\t\tString s = sc.next();\n\t\t\tint a = Integer.parseInt(s.substring(0, s.indexOf(\",\")));\n\t\t\tint b = Integer.parseInt(s.substring(s.indexOf(\",\")+1,s.length()));\n\t\t\tlines = Swap(lines, a, b);\n\t\t}\n\t\tfor(int i=1; i<lines.length; i++){\n\t\t\tSystem.out.println(lines[i]);\n\t\t}\n\n\t}\n\tstatic int[] Swap(int[] ints, int a, int b){\n\t\tint c = ints[a];\n\t\tints[a]= ints[b];\n\t\tints[b]= c;\n\t\treturn ints;\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[] lines = new int[w+1];
for(int i =1; i<lines.length; i++){
lines[i]=i; //initialize lines[]
}
for(int i=0; i<n; i++){
String s = sc.next();
int a = Integer.parseInt(s.substring(0, s.indexOf(",")));
int b = Integer.parseInt(s.substring(s.indexOf(",")+1,s.length()));
lines = Swap(lines, a, b);
}
for(int i=1; i<lines.length; i++){
System.out.println(lines[i]);
}
}
static int[] Swap(int[] ints, int a, int b){
int c = ints[a];
ints[a]= ints[b];
ints[b]= c;
return ints;
}
} |
[
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,
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,
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
],
[
148,
11
],
[
148,
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
],
[
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
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
75,
80
],
[
72,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
86,
87
],
[
86,
88
],
[
72,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
94,
95
],
[
94,
96
],
[
72,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
101,
103
],
[
72,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
107,
109
],
[
104,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
112,
114
],
[
72,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
118,
120
],
[
115,
121
],
[
14,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
122,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
129,
131
],
[
122,
132
],
[
132,
133
],
[
133,
134
],
[
122,
135
],
[
136,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
137,
142
],
[
142,
143
],
[
142,
144
],
[
12,
145
],
[
145,
146
],
[
0,
147
],
[
147,
148
],
[
147,
149
]
] | [
"\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\tint[] seq = new int[w];\n\t\tfor(int i = 0; i < seq.length;i++){\n\t\t\tseq[i] = i+1;\n\t\t}\n\t\tfor(int i = 0 ; i < n;i++){\n\t\t\tString[] s= br.readLine().split(\",\");\n\t\t\tint a=Integer.parseInt(s[0]);\n\t\t\tint b=Integer.parseInt(s[1]);\n\t\t\tint c = seq[a-1];\n\t\t\tseq[a-1] = seq[b-1];\n\t\t\tseq[b-1] = c;\n\t\t}\n\t\tfor(int i = 0; i<seq.length;i++){\n\t\t\tSystem.out.println(seq[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\tint[] seq = new int[w];\n\t\tfor(int i = 0; i < seq.length;i++){\n\t\t\tseq[i] = i+1;\n\t\t}\n\t\tfor(int i = 0 ; i < n;i++){\n\t\t\tString[] s= br.readLine().split(\",\");\n\t\t\tint a=Integer.parseInt(s[0]);\n\t\t\tint b=Integer.parseInt(s[1]);\n\t\t\tint c = seq[a-1];\n\t\t\tseq[a-1] = seq[b-1];\n\t\t\tseq[b-1] = c;\n\t\t}\n\t\tfor(int i = 0; i<seq.length;i++){\n\t\t\tSystem.out.println(seq[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\tint[] seq = new int[w];\n\t\tfor(int i = 0; i < seq.length;i++){\n\t\t\tseq[i] = i+1;\n\t\t}\n\t\tfor(int i = 0 ; i < n;i++){\n\t\t\tString[] s= br.readLine().split(\",\");\n\t\t\tint a=Integer.parseInt(s[0]);\n\t\t\tint b=Integer.parseInt(s[1]);\n\t\t\tint c = seq[a-1];\n\t\t\tseq[a-1] = seq[b-1];\n\t\t\tseq[b-1] = c;\n\t\t}\n\t\tfor(int i = 0; i<seq.length;i++){\n\t\t\tSystem.out.println(seq[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\tint[] seq = new int[w];\n\t\tfor(int i = 0; i < seq.length;i++){\n\t\t\tseq[i] = i+1;\n\t\t}\n\t\tfor(int i = 0 ; i < n;i++){\n\t\t\tString[] s= br.readLine().split(\",\");\n\t\t\tint a=Integer.parseInt(s[0]);\n\t\t\tint b=Integer.parseInt(s[1]);\n\t\t\tint c = seq[a-1];\n\t\t\tseq[a-1] = seq[b-1];\n\t\t\tseq[b-1] = c;\n\t\t}\n\t\tfor(int i = 0; i<seq.length;i++){\n\t\t\tSystem.out.println(seq[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[] seq = new int[w];",
"seq",
"new int[w]",
"w",
"for(int i = 0; i < seq.length;i++){\n\t\t\tseq[i] = i+1;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < seq.length",
"i",
"seq.length",
"seq",
"seq.length",
"i++",
"i++",
"i",
"{\n\t\t\tseq[i] = i+1;\n\t\t}",
"{\n\t\t\tseq[i] = i+1;\n\t\t}",
"seq[i] = i+1",
"seq[i]",
"seq",
"i",
"i+1",
"i",
"1",
"for(int i = 0 ; i < n;i++){\n\t\t\tString[] s= br.readLine().split(\",\");\n\t\t\tint a=Integer.parseInt(s[0]);\n\t\t\tint b=Integer.parseInt(s[1]);\n\t\t\tint c = seq[a-1];\n\t\t\tseq[a-1] = seq[b-1];\n\t\t\tseq[b-1] = c;\n\t\t}",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString[] s= br.readLine().split(\",\");\n\t\t\tint a=Integer.parseInt(s[0]);\n\t\t\tint b=Integer.parseInt(s[1]);\n\t\t\tint c = seq[a-1];\n\t\t\tseq[a-1] = seq[b-1];\n\t\t\tseq[b-1] = c;\n\t\t}",
"{\n\t\t\tString[] s= br.readLine().split(\",\");\n\t\t\tint a=Integer.parseInt(s[0]);\n\t\t\tint b=Integer.parseInt(s[1]);\n\t\t\tint c = seq[a-1];\n\t\t\tseq[a-1] = seq[b-1];\n\t\t\tseq[b-1] = c;\n\t\t}",
"String[] s= br.readLine().split(\",\");",
"s",
"br.readLine().split(\",\")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\",\"",
"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",
"int c = seq[a-1];",
"c",
"seq[a-1]",
"seq",
"a-1",
"a",
"1",
"seq[a-1] = seq[b-1]",
"seq[a-1]",
"seq",
"a-1",
"a",
"1",
"seq[b-1]",
"seq",
"b-1",
"b",
"1",
"seq[b-1] = c",
"seq[b-1]",
"seq",
"b-1",
"b",
"1",
"c",
"for(int i = 0; i<seq.length;i++){\n\t\t\tSystem.out.println(seq[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<seq.length",
"i",
"seq.length",
"seq",
"seq.length",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(seq[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(seq[i]);\n\t\t}",
"System.out.println(seq[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"seq[i]",
"seq",
"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\tint[] seq = new int[w];\n\t\tfor(int i = 0; i < seq.length;i++){\n\t\t\tseq[i] = i+1;\n\t\t}\n\t\tfor(int i = 0 ; i < n;i++){\n\t\t\tString[] s= br.readLine().split(\",\");\n\t\t\tint a=Integer.parseInt(s[0]);\n\t\t\tint b=Integer.parseInt(s[1]);\n\t\t\tint c = seq[a-1];\n\t\t\tseq[a-1] = seq[b-1];\n\t\t\tseq[b-1] = c;\n\t\t}\n\t\tfor(int i = 0; i<seq.length;i++){\n\t\t\tSystem.out.println(seq[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\tint[] seq = new int[w];\n\t\tfor(int i = 0; i < seq.length;i++){\n\t\t\tseq[i] = i+1;\n\t\t}\n\t\tfor(int i = 0 ; i < n;i++){\n\t\t\tString[] s= br.readLine().split(\",\");\n\t\t\tint a=Integer.parseInt(s[0]);\n\t\t\tint b=Integer.parseInt(s[1]);\n\t\t\tint c = seq[a-1];\n\t\t\tseq[a-1] = seq[b-1];\n\t\t\tseq[b-1] = c;\n\t\t}\n\t\tfor(int i = 0; i<seq.length;i++){\n\t\t\tSystem.out.println(seq[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[] seq = new int[w];
for(int i = 0; i < seq.length;i++){
seq[i] = i+1;
}
for(int i = 0 ; i < n;i++){
String[] s= br.readLine().split(",");
int a=Integer.parseInt(s[0]);
int b=Integer.parseInt(s[1]);
int c = seq[a-1];
seq[a-1] = seq[b-1];
seq[b-1] = c;
}
for(int i = 0; i<seq.length;i++){
System.out.println(seq[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,
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
],
[
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
],
[
76,
77
],
[
75,
78
],
[
78,
79
],
[
78,
80
],
[
74,
81
],
[
60,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
88,
89
],
[
88,
90
],
[
84,
91
],
[
60,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
94,
96
],
[
60,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
101,
102
],
[
101,
103
],
[
60,
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
],
[
121,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
122,
127
],
[
127,
128
],
[
127,
129
],
[
6,
130
],
[
130,
131
]
] | [
"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 n = sc.nextInt();\n int[] num = new int[w];\n for(int i=0;i<num.length;i++){\n num[i] = i+1;\n }\n for(int j=0;j<n;j++){\n String str = sc.next();\n String[] ab = str.split(\",\");\n int a = Integer.parseInt(ab[0])-1;\n int b = Integer.parseInt(ab[1])-1;\n int temp = num[a];\n num[a] = num[b];\n num[b] = temp;\n }\n for(int k=0;k<w;k++){\n System.out.println(num[k]);\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 n = sc.nextInt();\n int[] num = new int[w];\n for(int i=0;i<num.length;i++){\n num[i] = i+1;\n }\n for(int j=0;j<n;j++){\n String str = sc.next();\n String[] ab = str.split(\",\");\n int a = Integer.parseInt(ab[0])-1;\n int b = Integer.parseInt(ab[1])-1;\n int temp = num[a];\n num[a] = num[b];\n num[b] = temp;\n }\n for(int k=0;k<w;k++){\n System.out.println(num[k]);\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];\n for(int i=0;i<num.length;i++){\n num[i] = i+1;\n }\n for(int j=0;j<n;j++){\n String str = sc.next();\n String[] ab = str.split(\",\");\n int a = Integer.parseInt(ab[0])-1;\n int b = Integer.parseInt(ab[1])-1;\n int temp = num[a];\n num[a] = num[b];\n num[b] = temp;\n }\n for(int k=0;k<w;k++){\n System.out.println(num[k]);\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];\n for(int i=0;i<num.length;i++){\n num[i] = i+1;\n }\n for(int j=0;j<n;j++){\n String str = sc.next();\n String[] ab = str.split(\",\");\n int a = Integer.parseInt(ab[0])-1;\n int b = Integer.parseInt(ab[1])-1;\n int temp = num[a];\n num[a] = num[b];\n num[b] = temp;\n }\n for(int k=0;k<w;k++){\n System.out.println(num[k]);\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];",
"num",
"new int[w]",
"w",
"for(int i=0;i<num.length;i++){\n num[i] = i+1;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<num.length",
"i",
"num.length",
"num",
"num.length",
"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 j=0;j<n;j++){\n String str = sc.next();\n String[] ab = str.split(\",\");\n int a = Integer.parseInt(ab[0])-1;\n int b = Integer.parseInt(ab[1])-1;\n int temp = num[a];\n num[a] = num[b];\n num[b] = temp;\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<n",
"j",
"n",
"j++",
"j++",
"j",
"{\n String str = sc.next();\n String[] ab = str.split(\",\");\n int a = Integer.parseInt(ab[0])-1;\n int b = Integer.parseInt(ab[1])-1;\n int temp = num[a];\n num[a] = num[b];\n num[b] = temp;\n }",
"{\n String str = sc.next();\n String[] ab = str.split(\",\");\n int a = Integer.parseInt(ab[0])-1;\n int b = Integer.parseInt(ab[1])-1;\n int temp = num[a];\n num[a] = num[b];\n num[b] = temp;\n }",
"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 temp = num[a];",
"temp",
"num[a]",
"num",
"a",
"num[a] = num[b]",
"num[a]",
"num",
"a",
"num[b]",
"num",
"b",
"num[b] = temp",
"num[b]",
"num",
"b",
"temp",
"for(int k=0;k<w;k++){\n System.out.println(num[k]);\n }",
"int k=0;",
"int k=0;",
"k",
"0",
"k<w",
"k",
"w",
"k++",
"k++",
"k",
"{\n System.out.println(num[k]);\n }",
"{\n System.out.println(num[k]);\n }",
"System.out.println(num[k])",
"System.out.println",
"System.out",
"System",
"System.out",
"num[k]",
"num",
"k",
"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 n = sc.nextInt();
int[] num = new int[w];
for(int i=0;i<num.length;i++){
num[i] = i+1;
}
for(int j=0;j<n;j++){
String str = sc.next();
String[] ab = str.split(",");
int a = Integer.parseInt(ab[0])-1;
int b = Integer.parseInt(ab[1])-1;
int temp = num[a];
num[a] = num[b];
num[b] = temp;
}
for(int k=0;k<w;k++){
System.out.println(num[k]);
}
}
} |
[
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,
0,
13,
18,
13,
13,
14,
2,
18,
13,
13,
13,
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,
4,
18,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
167,
5
],
[
167,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
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
],
[
115,
117
],
[
117,
118
],
[
117,
119
],
[
109,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
121,
125
],
[
120,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
128,
130
],
[
90,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
134,
136
],
[
131,
137
],
[
137,
138
],
[
137,
139
],
[
8,
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
],
[
155,
156
],
[
155,
157
],
[
153,
158
],
[
158,
159
],
[
158,
160
],
[
8,
161
],
[
161,
162
],
[
162,
163
],
[
6,
164
],
[
164,
165
],
[
0,
166
],
[
166,
167
],
[
166,
168
]
] | [
"import java.util.Scanner;\npublic class Main{\n\tpublic 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[n];\n int[] b = new int[n];\n for(int i = 0; i < n; i++){\n String s = sc.next();\n String[] S = s.split(\",\");\n a[i] = Integer.parseInt(S[0]);\n b[i] = Integer.parseInt(S[1]);\n }\n int[] ans = new int[w];\n for(int i = 0; i < w; i++){\n int x = i + 1;\n for(int j = 0; j < n; j++){\n if(a[j] == x) x = b[j];\n else if(b[j] == x) x = a[j];\n }\n ans[x - 1] = i + 1;\n }\n\n for(int i = 0; i < w; i++){\n System.out.println(ans[i]);\n }\n\n sc.close();\n \n }\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\tpublic 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[n];\n int[] b = new int[n];\n for(int i = 0; i < n; i++){\n String s = sc.next();\n String[] S = s.split(\",\");\n a[i] = Integer.parseInt(S[0]);\n b[i] = Integer.parseInt(S[1]);\n }\n int[] ans = new int[w];\n for(int i = 0; i < w; i++){\n int x = i + 1;\n for(int j = 0; j < n; j++){\n if(a[j] == x) x = b[j];\n else if(b[j] == x) x = a[j];\n }\n ans[x - 1] = i + 1;\n }\n\n for(int i = 0; i < w; i++){\n System.out.println(ans[i]);\n }\n\n sc.close();\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[] a = new int[n];\n int[] b = new int[n];\n for(int i = 0; i < n; i++){\n String s = sc.next();\n String[] S = s.split(\",\");\n a[i] = Integer.parseInt(S[0]);\n b[i] = Integer.parseInt(S[1]);\n }\n int[] ans = new int[w];\n for(int i = 0; i < w; i++){\n int x = i + 1;\n for(int j = 0; j < n; j++){\n if(a[j] == x) x = b[j];\n else if(b[j] == x) x = a[j];\n }\n ans[x - 1] = i + 1;\n }\n\n for(int i = 0; i < w; i++){\n System.out.println(ans[i]);\n }\n\n sc.close();\n \n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] a = new int[n];\n int[] b = new int[n];\n for(int i = 0; i < n; i++){\n String s = sc.next();\n String[] S = s.split(\",\");\n a[i] = Integer.parseInt(S[0]);\n b[i] = Integer.parseInt(S[1]);\n }\n int[] ans = new int[w];\n for(int i = 0; i < w; i++){\n int x = i + 1;\n for(int j = 0; j < n; j++){\n if(a[j] == x) x = b[j];\n else if(b[j] == x) x = a[j];\n }\n ans[x - 1] = i + 1;\n }\n\n for(int i = 0; i < w; i++){\n System.out.println(ans[i]);\n }\n\n sc.close();\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[] 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 String s = sc.next();\n String[] S = s.split(\",\");\n a[i] = Integer.parseInt(S[0]);\n b[i] = Integer.parseInt(S[1]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String s = sc.next();\n String[] S = s.split(\",\");\n a[i] = Integer.parseInt(S[0]);\n b[i] = Integer.parseInt(S[1]);\n }",
"{\n String s = sc.next();\n String[] S = s.split(\",\");\n a[i] = Integer.parseInt(S[0]);\n b[i] = Integer.parseInt(S[1]);\n }",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String[] S = s.split(\",\");",
"S",
"s.split(\",\")",
"s.split",
"s",
"\",\"",
"a[i] = Integer.parseInt(S[0])",
"a[i]",
"a",
"i",
"Integer.parseInt(S[0])",
"Integer.parseInt",
"Integer",
"S[0]",
"S",
"0",
"b[i] = Integer.parseInt(S[1])",
"b[i]",
"b",
"i",
"Integer.parseInt(S[1])",
"Integer.parseInt",
"Integer",
"S[1]",
"S",
"1",
"int[] ans = new int[w];",
"ans",
"new int[w]",
"w",
"for(int i = 0; i < w; i++){\n int x = i + 1;\n for(int j = 0; j < n; j++){\n if(a[j] == x) x = b[j];\n else if(b[j] == x) x = a[j];\n }\n ans[x - 1] = i + 1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n int x = i + 1;\n for(int j = 0; j < n; j++){\n if(a[j] == x) x = b[j];\n else if(b[j] == x) x = a[j];\n }\n ans[x - 1] = i + 1;\n }",
"{\n int x = i + 1;\n for(int j = 0; j < n; j++){\n if(a[j] == x) x = b[j];\n else if(b[j] == x) x = a[j];\n }\n ans[x - 1] = i + 1;\n }",
"int x = i + 1;",
"x",
"i + 1",
"i",
"1",
"for(int j = 0; j < n; j++){\n if(a[j] == x) x = b[j];\n else if(b[j] == x) x = a[j];\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < n",
"j",
"n",
"j++",
"j++",
"j",
"{\n if(a[j] == x) x = b[j];\n else if(b[j] == x) x = a[j];\n }",
"{\n if(a[j] == x) x = b[j];\n else if(b[j] == x) x = a[j];\n }",
"if(a[j] == x) x = b[j];\n else if(b[j] == x) x = a[j];",
"a[j] == x",
"a[j]",
"a",
"j",
"x",
"x = b[j]",
"x",
"b[j]",
"b",
"j",
"if(b[j] == x) x = a[j];",
"b[j] == x",
"b[j]",
"b",
"j",
"x",
"x = a[j]",
"x",
"a[j]",
"a",
"j",
"ans[x - 1] = i + 1",
"ans[x - 1]",
"ans",
"x - 1",
"x",
"1",
"i + 1",
"i",
"1",
"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",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main{\n\tpublic 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[n];\n int[] b = new int[n];\n for(int i = 0; i < n; i++){\n String s = sc.next();\n String[] S = s.split(\",\");\n a[i] = Integer.parseInt(S[0]);\n b[i] = Integer.parseInt(S[1]);\n }\n int[] ans = new int[w];\n for(int i = 0; i < w; i++){\n int x = i + 1;\n for(int j = 0; j < n; j++){\n if(a[j] == x) x = b[j];\n else if(b[j] == x) x = a[j];\n }\n ans[x - 1] = i + 1;\n }\n\n for(int i = 0; i < w; i++){\n System.out.println(ans[i]);\n }\n\n sc.close();\n \n }\n}",
"public class Main{\n\tpublic 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[n];\n int[] b = new int[n];\n for(int i = 0; i < n; i++){\n String s = sc.next();\n String[] S = s.split(\",\");\n a[i] = Integer.parseInt(S[0]);\n b[i] = Integer.parseInt(S[1]);\n }\n int[] ans = new int[w];\n for(int i = 0; i < w; i++){\n int x = i + 1;\n for(int j = 0; j < n; j++){\n if(a[j] == x) x = b[j];\n else if(b[j] == x) x = a[j];\n }\n ans[x - 1] = i + 1;\n }\n\n for(int i = 0; i < w; i++){\n System.out.println(ans[i]);\n }\n\n sc.close();\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[] a = new int[n];
int[] b = new int[n];
for(int i = 0; i < n; i++){
String s = sc.next();
String[] S = s.split(",");
a[i] = Integer.parseInt(S[0]);
b[i] = Integer.parseInt(S[1]);
}
int[] ans = new int[w];
for(int i = 0; i < w; i++){
int x = i + 1;
for(int j = 0; j < n; j++){
if(a[j] == x) x = b[j];
else if(b[j] == x) x = a[j];
}
ans[x - 1] = i + 1;
}
for(int i = 0; i < w; i++){
System.out.println(ans[i]);
}
sc.close();
}
}
|
[
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,
0,
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,
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,
17,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
124,
5
],
[
124,
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
],
[
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
],
[
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
],
[
64,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
79,
81
],
[
64,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
85,
87
],
[
82,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
90,
92
],
[
64,
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
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
112,
117
],
[
112,
118
],
[
118,
119
],
[
118,
120
],
[
6,
121
],
[
121,
122
],
[
0,
123
],
[
123,
124
],
[
123,
125
]
] | [
"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\tsc.useDelimiter(\"\\\\D\");\n\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\n\t\tint[] amida;\n\t\tamida = new int[w];\n\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\tamida[i] = i + 1;\n\t\t}\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\n\t\t\tint t = amida[a-1];\n\t\t\tamida[a-1] = amida[b-1];\n\t\t\tamida[b-1] = t;\n\t\t}\n\n\t\tfor (int i = 0; i < w; i++)\n\t\t\tSystem.out.printf(\"%d\\n\", amida[i]);\n\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\tsc.useDelimiter(\"\\\\D\");\n\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\n\t\tint[] amida;\n\t\tamida = new int[w];\n\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\tamida[i] = i + 1;\n\t\t}\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\n\t\t\tint t = amida[a-1];\n\t\t\tamida[a-1] = amida[b-1];\n\t\t\tamida[b-1] = t;\n\t\t}\n\n\t\tfor (int i = 0; i < w; i++)\n\t\t\tSystem.out.printf(\"%d\\n\", amida[i]);\n\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tsc.useDelimiter(\"\\\\D\");\n\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\n\t\tint[] amida;\n\t\tamida = new int[w];\n\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\tamida[i] = i + 1;\n\t\t}\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\n\t\t\tint t = amida[a-1];\n\t\t\tamida[a-1] = amida[b-1];\n\t\t\tamida[b-1] = t;\n\t\t}\n\n\t\tfor (int i = 0; i < w; i++)\n\t\t\tSystem.out.printf(\"%d\\n\", amida[i]);\n\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tsc.useDelimiter(\"\\\\D\");\n\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\n\t\tint[] amida;\n\t\tamida = new int[w];\n\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\tamida[i] = i + 1;\n\t\t}\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\n\t\t\tint t = amida[a-1];\n\t\t\tamida[a-1] = amida[b-1];\n\t\t\tamida[b-1] = t;\n\t\t}\n\n\t\tfor (int i = 0; i < w; i++)\n\t\t\tSystem.out.printf(\"%d\\n\", amida[i]);\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"sc.useDelimiter(\"\\\\D\")",
"sc.useDelimiter",
"sc",
"\"\\\\D\"",
"int w = sc.nextInt();",
"w",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] amida;",
"amida",
"amida = new int[w]",
"amida",
"new int[w]",
"w",
"for (int i = 0; i < w; i++) {\n\t\t\tamida[i] = i + 1;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tamida[i] = i + 1;\n\t\t}",
"{\n\t\t\tamida[i] = i + 1;\n\t\t}",
"amida[i] = i + 1",
"amida[i]",
"amida",
"i",
"i + 1",
"i",
"1",
"for (int i = 0; i < n; i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\n\t\t\tint t = amida[a-1];\n\t\t\tamida[a-1] = amida[b-1];\n\t\t\tamida[b-1] = t;\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\n\t\t\tint t = amida[a-1];\n\t\t\tamida[a-1] = amida[b-1];\n\t\t\tamida[b-1] = t;\n\t\t}",
"{\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\n\t\t\tint t = amida[a-1];\n\t\t\tamida[a-1] = amida[b-1];\n\t\t\tamida[b-1] = t;\n\t\t}",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int t = amida[a-1];",
"t",
"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] = t",
"amida[b-1]",
"amida",
"b-1",
"b",
"1",
"t",
"for (int i = 0; i < w; i++)\n\t\t\tSystem.out.printf(\"%d\\n\", amida[i]);",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < w",
"i",
"w",
"i++",
"i++",
"i",
"System.out.printf(\"%d\\n\", amida[i]);",
"System.out.printf(\"%d\\n\", amida[i])",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%d\\n\"",
"amida[i]",
"amida",
"i",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tsc.useDelimiter(\"\\\\D\");\n\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\n\t\tint[] amida;\n\t\tamida = new int[w];\n\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\tamida[i] = i + 1;\n\t\t}\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\n\t\t\tint t = amida[a-1];\n\t\t\tamida[a-1] = amida[b-1];\n\t\t\tamida[b-1] = t;\n\t\t}\n\n\t\tfor (int i = 0; i < w; i++)\n\t\t\tSystem.out.printf(\"%d\\n\", amida[i]);\n\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tsc.useDelimiter(\"\\\\D\");\n\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\n\t\tint[] amida;\n\t\tamida = new int[w];\n\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\tamida[i] = i + 1;\n\t\t}\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\n\t\t\tint t = amida[a-1];\n\t\t\tamida[a-1] = amida[b-1];\n\t\t\tamida[b-1] = t;\n\t\t}\n\n\t\tfor (int i = 0; i < w; i++)\n\t\t\tSystem.out.printf(\"%d\\n\", amida[i]);\n\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
sc.useDelimiter("\\D");
int w = sc.nextInt();
int n = sc.nextInt();
int[] amida;
amida = new int[w];
for (int i = 0; i < w; i++) {
amida[i] = i + 1;
}
for (int i = 0; i < n; i++) {
int a = sc.nextInt();
int b = sc.nextInt();
int t = amida[a-1];
amida[a-1] = amida[b-1];
amida[b-1] = t;
}
for (int i = 0; i < w; i++)
System.out.printf("%d\n", amida[i]);
}
} |
[
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,
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,
40,
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,
4,
18,
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
],
[
159,
5
],
[
159,
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
],
[
27,
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
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
8,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
62,
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
],
[
78,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
86,
90
],
[
90,
91
],
[
78,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
97,
98
],
[
97,
99
],
[
78,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
102,
105
],
[
105,
106
],
[
105,
107
],
[
78,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
112,
114
],
[
78,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
118,
120
],
[
115,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
123,
125
],
[
78,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
129,
131
],
[
126,
132
],
[
8,
133
],
[
133,
134
],
[
134,
135
],
[
8,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
136,
141
],
[
141,
142
],
[
141,
143
],
[
136,
144
],
[
144,
145
],
[
145,
146
],
[
136,
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;\n\npublic class Main {\n public static void main (String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int x, y, c;\n String str;\n\n str = sc.nextLine();\n int w = Integer.parseInt(str);\n int[] a = new int[w];\n for (int i = 0; i < w; i++)\n {\n a[i] = i + 1;\n }\n\n str = sc.nextLine();\n int n = Integer.parseInt(str);\n\n for (int i = 0; i < n; i++)\n {\n str = sc.nextLine();\n String[] X = str.split(\",\", -1);\n x = Integer.parseInt(X[0]);\n y = Integer.parseInt(X[1]);\n c = a[x-1];\n a[x-1] = a[y-1];\n a[y-1] = c;\n }\n sc.close();\n\n for (int i = 0; i < w; i++) System.out.println(a[i]);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main (String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int x, y, c;\n String str;\n\n str = sc.nextLine();\n int w = Integer.parseInt(str);\n int[] a = new int[w];\n for (int i = 0; i < w; i++)\n {\n a[i] = i + 1;\n }\n\n str = sc.nextLine();\n int n = Integer.parseInt(str);\n\n for (int i = 0; i < n; i++)\n {\n str = sc.nextLine();\n String[] X = str.split(\",\", -1);\n x = Integer.parseInt(X[0]);\n y = Integer.parseInt(X[1]);\n c = a[x-1];\n a[x-1] = a[y-1];\n a[y-1] = c;\n }\n sc.close();\n\n for (int i = 0; i < w; i++) System.out.println(a[i]);\n }\n}",
"Main",
"public static void main (String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int x, y, c;\n String str;\n\n str = sc.nextLine();\n int w = Integer.parseInt(str);\n int[] a = new int[w];\n for (int i = 0; i < w; i++)\n {\n a[i] = i + 1;\n }\n\n str = sc.nextLine();\n int n = Integer.parseInt(str);\n\n for (int i = 0; i < n; i++)\n {\n str = sc.nextLine();\n String[] X = str.split(\",\", -1);\n x = Integer.parseInt(X[0]);\n y = Integer.parseInt(X[1]);\n c = a[x-1];\n a[x-1] = a[y-1];\n a[y-1] = c;\n }\n sc.close();\n\n for (int i = 0; i < w; i++) System.out.println(a[i]);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int x, y, c;\n String str;\n\n str = sc.nextLine();\n int w = Integer.parseInt(str);\n int[] a = new int[w];\n for (int i = 0; i < w; i++)\n {\n a[i] = i + 1;\n }\n\n str = sc.nextLine();\n int n = Integer.parseInt(str);\n\n for (int i = 0; i < n; i++)\n {\n str = sc.nextLine();\n String[] X = str.split(\",\", -1);\n x = Integer.parseInt(X[0]);\n y = Integer.parseInt(X[1]);\n c = a[x-1];\n a[x-1] = a[y-1];\n a[y-1] = c;\n }\n sc.close();\n\n for (int i = 0; i < w; i++) System.out.println(a[i]);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int x",
"x",
"y",
"y",
"c;",
"c",
"String str;",
"str",
"str = sc.nextLine()",
"str",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int w = Integer.parseInt(str);",
"w",
"Integer.parseInt(str)",
"Integer.parseInt",
"Integer",
"str",
"int[] a = new int[w];",
"a",
"new int[w]",
"w",
"for (int i = 0; i < w; i++)\n {\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",
"str = sc.nextLine()",
"str",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int n = Integer.parseInt(str);",
"n",
"Integer.parseInt(str)",
"Integer.parseInt",
"Integer",
"str",
"for (int i = 0; i < n; i++)\n {\n str = sc.nextLine();\n String[] X = str.split(\",\", -1);\n x = Integer.parseInt(X[0]);\n y = Integer.parseInt(X[1]);\n c = a[x-1];\n a[x-1] = a[y-1];\n a[y-1] = c;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n str = sc.nextLine();\n String[] X = str.split(\",\", -1);\n x = Integer.parseInt(X[0]);\n y = Integer.parseInt(X[1]);\n c = a[x-1];\n a[x-1] = a[y-1];\n a[y-1] = c;\n }",
"{\n str = sc.nextLine();\n String[] X = str.split(\",\", -1);\n x = Integer.parseInt(X[0]);\n y = Integer.parseInt(X[1]);\n c = a[x-1];\n a[x-1] = a[y-1];\n a[y-1] = c;\n }",
"str = sc.nextLine()",
"str",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String[] X = str.split(\",\", -1);",
"X",
"str.split(\",\", -1)",
"str.split",
"str",
"\",\"",
"-1",
"1",
"x = Integer.parseInt(X[0])",
"x",
"Integer.parseInt(X[0])",
"Integer.parseInt",
"Integer",
"X[0]",
"X",
"0",
"y = Integer.parseInt(X[1])",
"y",
"Integer.parseInt(X[1])",
"Integer.parseInt",
"Integer",
"X[1]",
"X",
"1",
"c = a[x-1]",
"c",
"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] = c",
"a[y-1]",
"a",
"y-1",
"y",
"1",
"c",
"sc.close()",
"sc.close",
"sc",
"for (int i = 0; i < w; i++) 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",
"String[] args",
"args",
"public class Main {\n public static void main (String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int x, y, c;\n String str;\n\n str = sc.nextLine();\n int w = Integer.parseInt(str);\n int[] a = new int[w];\n for (int i = 0; i < w; i++)\n {\n a[i] = i + 1;\n }\n\n str = sc.nextLine();\n int n = Integer.parseInt(str);\n\n for (int i = 0; i < n; i++)\n {\n str = sc.nextLine();\n String[] X = str.split(\",\", -1);\n x = Integer.parseInt(X[0]);\n y = Integer.parseInt(X[1]);\n c = a[x-1];\n a[x-1] = a[y-1];\n a[y-1] = c;\n }\n sc.close();\n\n for (int i = 0; i < w; i++) System.out.println(a[i]);\n }\n}",
"public class Main {\n public static void main (String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int x, y, c;\n String str;\n\n str = sc.nextLine();\n int w = Integer.parseInt(str);\n int[] a = new int[w];\n for (int i = 0; i < w; i++)\n {\n a[i] = i + 1;\n }\n\n str = sc.nextLine();\n int n = Integer.parseInt(str);\n\n for (int i = 0; i < n; i++)\n {\n str = sc.nextLine();\n String[] X = str.split(\",\", -1);\n x = Integer.parseInt(X[0]);\n y = Integer.parseInt(X[1]);\n c = a[x-1];\n a[x-1] = a[y-1];\n a[y-1] = c;\n }\n sc.close();\n\n for (int i = 0; i < w; 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 x, y, c;
String str;
str = sc.nextLine();
int w = Integer.parseInt(str);
int[] a = new int[w];
for (int i = 0; i < w; i++)
{
a[i] = i + 1;
}
str = sc.nextLine();
int n = Integer.parseInt(str);
for (int i = 0; i < n; i++)
{
str = sc.nextLine();
String[] X = str.split(",", -1);
x = Integer.parseInt(X[0]);
y = Integer.parseInt(X[1]);
c = a[x-1];
a[x-1] = a[y-1];
a[y-1] = c;
}
sc.close();
for (int i = 0; i < w; 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,
17,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
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,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
38,
5,
13,
30,
4,
18,
13,
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,
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,
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
],
[
192,
11
],
[
192,
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
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
24,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
14,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
39,
42
],
[
14,
43
],
[
43,
44
],
[
43,
45
],
[
14,
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
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
64,
65
],
[
64,
66
],
[
14,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
67,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
14,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
14,
86
],
[
86,
87
],
[
86,
88
],
[
14,
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
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
102,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
113,
114
],
[
101,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
118,
119
],
[
117,
120
],
[
117,
121
],
[
101,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
125,
126
],
[
124,
127
],
[
127,
128
],
[
127,
129
],
[
101,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
133,
134
],
[
132,
135
],
[
135,
136
],
[
135,
137
],
[
101,
138
],
[
138,
139
],
[
138,
140
],
[
101,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
143,
145
],
[
145,
146
],
[
145,
147
],
[
101,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
151,
153
],
[
148,
154
],
[
154,
155
],
[
154,
156
],
[
156,
157
],
[
156,
158
],
[
101,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
162,
163
],
[
162,
164
],
[
159,
165
],
[
14,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
168,
170
],
[
166,
171
],
[
171,
172
],
[
171,
173
],
[
173,
174
],
[
173,
175
],
[
166,
176
],
[
176,
177
],
[
177,
178
],
[
166,
179
],
[
180,
180
],
[
180,
181
],
[
181,
182
],
[
182,
183
],
[
183,
184
],
[
183,
185
],
[
181,
186
],
[
186,
187
],
[
186,
188
],
[
12,
189
],
[
189,
190
],
[
0,
191
],
[
191,
192
],
[
191,
193
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\n\npublic class Main {\n\tpublic static void main(String[] aegs){\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tint a = 0;\n\t\tString t = \"\";\n\t\t/*\n\t\twhile (true){\n\t\t\ttry {\n\t\t\t\tt = br.readLine();\n\t\t\t\tif(t == null){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ta = Integer.parseInt(t);\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t// TODO 自動生成された catch ブロック\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO 自動生成された catch ブロック\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\n\t\tint b = 0;\n\t\tfor(int i=0;i<10;i++){\n\t\t\tfor(int j=0;j<10;j++){\n\t\t\t\tfor(int k=0;k<10;k++){\n\t\t\t\t\tfor(int l=0;l<10;l++){\n\t\t\t\t\t\tif((i+j+k+l) == a){\n\t\t\t\t\t\t\tb++;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(b);\n\t\t}*/\n\t\t/*try {\n\t\t\tt = br.readLine();\n\t\t} catch (IOException e) {\n\t\t\t// TODO 自動生成された catch ブロック\n\t\t\te.printStackTrace();\n\t\t}\n\t\ta = Integer.parseInt(t);\n\t\tint s = 100000;\n\t\tfor(int i=0;i<a;i++){\n\t\t\ts = (int) ((double)s * 1.05);\n\t\t\tint ss = s;\n\t\t\ts = s/1000;\n\t\t\ts = s*1000;\n\t\t\tif((ss - s) > 0){\n\t\t\t\ts = s + 1000;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(s);\n\t\t*/\n\t\t\n\t\ttry {;\n\t\tt = br.readLine();\n\t} catch (IOException e) {\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}\n\ta = Integer.parseInt(t);\n\t\t\n\t\tint[] h = new int[a];\n\t\t\n\t\tfor(int i=0;i<a;i++){\n\t\t\th[i] = i+1;\n\t\t}\n\t\t\n\t\t\n\t\ttry {;\n\t\tt = br.readLine();\n\t} catch (IOException e) {\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}\n\tint b = Integer.parseInt(t);\n\t\t\n\tint c = 0;\n\tfor(int i=0;i<b;i++){\n\t\ttry {;\n\t\tt = br.readLine();\n\t} catch (IOException e) {\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}\n\t\tString[] tt = t.split(\",\",0);\n\ta = Integer.parseInt(tt[0]);\n\tc = Integer.parseInt(tt[1]);\n\t\n\tint d = 0;\n\t\n\td = h[a-1];\n\th[a-1] = h[c-1];\n\th[c-1] = d;\n\t\t\n\t}\n\t\tfor(int i=0;i<h.length;i++){\n\t\t\tSystem.out.println(h[i]);\n\t\t}\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\tpublic static void main(String[] aegs){\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tint a = 0;\n\t\tString t = \"\";\n\t\t/*\n\t\twhile (true){\n\t\t\ttry {\n\t\t\t\tt = br.readLine();\n\t\t\t\tif(t == null){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ta = Integer.parseInt(t);\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t// TODO 自動生成された catch ブロック\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO 自動生成された catch ブロック\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\n\t\tint b = 0;\n\t\tfor(int i=0;i<10;i++){\n\t\t\tfor(int j=0;j<10;j++){\n\t\t\t\tfor(int k=0;k<10;k++){\n\t\t\t\t\tfor(int l=0;l<10;l++){\n\t\t\t\t\t\tif((i+j+k+l) == a){\n\t\t\t\t\t\t\tb++;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(b);\n\t\t}*/\n\t\t/*try {\n\t\t\tt = br.readLine();\n\t\t} catch (IOException e) {\n\t\t\t// TODO 自動生成された catch ブロック\n\t\t\te.printStackTrace();\n\t\t}\n\t\ta = Integer.parseInt(t);\n\t\tint s = 100000;\n\t\tfor(int i=0;i<a;i++){\n\t\t\ts = (int) ((double)s * 1.05);\n\t\t\tint ss = s;\n\t\t\ts = s/1000;\n\t\t\ts = s*1000;\n\t\t\tif((ss - s) > 0){\n\t\t\t\ts = s + 1000;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(s);\n\t\t*/\n\t\t\n\t\ttry {;\n\t\tt = br.readLine();\n\t} catch (IOException e) {\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}\n\ta = Integer.parseInt(t);\n\t\t\n\t\tint[] h = new int[a];\n\t\t\n\t\tfor(int i=0;i<a;i++){\n\t\t\th[i] = i+1;\n\t\t}\n\t\t\n\t\t\n\t\ttry {;\n\t\tt = br.readLine();\n\t} catch (IOException e) {\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}\n\tint b = Integer.parseInt(t);\n\t\t\n\tint c = 0;\n\tfor(int i=0;i<b;i++){\n\t\ttry {;\n\t\tt = br.readLine();\n\t} catch (IOException e) {\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}\n\t\tString[] tt = t.split(\",\",0);\n\ta = Integer.parseInt(tt[0]);\n\tc = Integer.parseInt(tt[1]);\n\t\n\tint d = 0;\n\t\n\td = h[a-1];\n\th[a-1] = h[c-1];\n\th[c-1] = d;\n\t\t\n\t}\n\t\tfor(int i=0;i<h.length;i++){\n\t\t\tSystem.out.println(h[i]);\n\t\t}\n\t\t\n\t}\n\n}",
"Main",
"public static void main(String[] aegs){\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tint a = 0;\n\t\tString t = \"\";\n\t\t/*\n\t\twhile (true){\n\t\t\ttry {\n\t\t\t\tt = br.readLine();\n\t\t\t\tif(t == null){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ta = Integer.parseInt(t);\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t// TODO 自動生成された catch ブロック\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO 自動生成された catch ブロック\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\n\t\tint b = 0;\n\t\tfor(int i=0;i<10;i++){\n\t\t\tfor(int j=0;j<10;j++){\n\t\t\t\tfor(int k=0;k<10;k++){\n\t\t\t\t\tfor(int l=0;l<10;l++){\n\t\t\t\t\t\tif((i+j+k+l) == a){\n\t\t\t\t\t\t\tb++;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(b);\n\t\t}*/\n\t\t/*try {\n\t\t\tt = br.readLine();\n\t\t} catch (IOException e) {\n\t\t\t// TODO 自動生成された catch ブロック\n\t\t\te.printStackTrace();\n\t\t}\n\t\ta = Integer.parseInt(t);\n\t\tint s = 100000;\n\t\tfor(int i=0;i<a;i++){\n\t\t\ts = (int) ((double)s * 1.05);\n\t\t\tint ss = s;\n\t\t\ts = s/1000;\n\t\t\ts = s*1000;\n\t\t\tif((ss - s) > 0){\n\t\t\t\ts = s + 1000;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(s);\n\t\t*/\n\t\t\n\t\ttry {;\n\t\tt = br.readLine();\n\t} catch (IOException e) {\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}\n\ta = Integer.parseInt(t);\n\t\t\n\t\tint[] h = new int[a];\n\t\t\n\t\tfor(int i=0;i<a;i++){\n\t\t\th[i] = i+1;\n\t\t}\n\t\t\n\t\t\n\t\ttry {;\n\t\tt = br.readLine();\n\t} catch (IOException e) {\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}\n\tint b = Integer.parseInt(t);\n\t\t\n\tint c = 0;\n\tfor(int i=0;i<b;i++){\n\t\ttry {;\n\t\tt = br.readLine();\n\t} catch (IOException e) {\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}\n\t\tString[] tt = t.split(\",\",0);\n\ta = Integer.parseInt(tt[0]);\n\tc = Integer.parseInt(tt[1]);\n\t\n\tint d = 0;\n\t\n\td = h[a-1];\n\th[a-1] = h[c-1];\n\th[c-1] = d;\n\t\t\n\t}\n\t\tfor(int i=0;i<h.length;i++){\n\t\t\tSystem.out.println(h[i]);\n\t\t}\n\t\t\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tint a = 0;\n\t\tString t = \"\";\n\t\t/*\n\t\twhile (true){\n\t\t\ttry {\n\t\t\t\tt = br.readLine();\n\t\t\t\tif(t == null){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ta = Integer.parseInt(t);\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t// TODO 自動生成された catch ブロック\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO 自動生成された catch ブロック\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\n\t\tint b = 0;\n\t\tfor(int i=0;i<10;i++){\n\t\t\tfor(int j=0;j<10;j++){\n\t\t\t\tfor(int k=0;k<10;k++){\n\t\t\t\t\tfor(int l=0;l<10;l++){\n\t\t\t\t\t\tif((i+j+k+l) == a){\n\t\t\t\t\t\t\tb++;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(b);\n\t\t}*/\n\t\t/*try {\n\t\t\tt = br.readLine();\n\t\t} catch (IOException e) {\n\t\t\t// TODO 自動生成された catch ブロック\n\t\t\te.printStackTrace();\n\t\t}\n\t\ta = Integer.parseInt(t);\n\t\tint s = 100000;\n\t\tfor(int i=0;i<a;i++){\n\t\t\ts = (int) ((double)s * 1.05);\n\t\t\tint ss = s;\n\t\t\ts = s/1000;\n\t\t\ts = s*1000;\n\t\t\tif((ss - s) > 0){\n\t\t\t\ts = s + 1000;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(s);\n\t\t*/\n\t\t\n\t\ttry {;\n\t\tt = br.readLine();\n\t} catch (IOException e) {\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}\n\ta = Integer.parseInt(t);\n\t\t\n\t\tint[] h = new int[a];\n\t\t\n\t\tfor(int i=0;i<a;i++){\n\t\t\th[i] = i+1;\n\t\t}\n\t\t\n\t\t\n\t\ttry {;\n\t\tt = br.readLine();\n\t} catch (IOException e) {\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}\n\tint b = Integer.parseInt(t);\n\t\t\n\tint c = 0;\n\tfor(int i=0;i<b;i++){\n\t\ttry {;\n\t\tt = br.readLine();\n\t} catch (IOException e) {\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}\n\t\tString[] tt = t.split(\",\",0);\n\ta = Integer.parseInt(tt[0]);\n\tc = Integer.parseInt(tt[1]);\n\t\n\tint d = 0;\n\t\n\td = h[a-1];\n\th[a-1] = h[c-1];\n\th[c-1] = d;\n\t\t\n\t}\n\t\tfor(int i=0;i<h.length;i++){\n\t\t\tSystem.out.println(h[i]);\n\t\t}\n\t\t\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int a = 0;",
"a",
"0",
"String t = \"\";",
"t",
"\"\"",
"try {;\n\t\tt = br.readLine();\n\t} catch (IOException e) {\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}",
"catch (IOException e) {\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}",
"IOException e",
"{\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{;\n\t\tt = br.readLine();\n\t}",
"t = br.readLine()",
"t",
"br.readLine()",
"br.readLine",
"br",
"a = Integer.parseInt(t)",
"a",
"Integer.parseInt(t)",
"Integer.parseInt",
"Integer",
"t",
"int[] h = new int[a];",
"h",
"new int[a]",
"a",
"for(int i=0;i<a;i++){\n\t\t\th[i] = i+1;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<a",
"i",
"a",
"i++",
"i++",
"i",
"{\n\t\t\th[i] = i+1;\n\t\t}",
"{\n\t\t\th[i] = i+1;\n\t\t}",
"h[i] = i+1",
"h[i]",
"h",
"i",
"i+1",
"i",
"1",
"try {;\n\t\tt = br.readLine();\n\t} catch (IOException e) {\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}",
"catch (IOException e) {\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}",
"IOException e",
"{\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{;\n\t\tt = br.readLine();\n\t}",
"t = br.readLine()",
"t",
"br.readLine()",
"br.readLine",
"br",
"int b = Integer.parseInt(t);",
"b",
"Integer.parseInt(t)",
"Integer.parseInt",
"Integer",
"t",
"int c = 0;",
"c",
"0",
"for(int i=0;i<b;i++){\n\t\ttry {;\n\t\tt = br.readLine();\n\t} catch (IOException e) {\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}\n\t\tString[] tt = t.split(\",\",0);\n\ta = Integer.parseInt(tt[0]);\n\tc = Integer.parseInt(tt[1]);\n\t\n\tint d = 0;\n\t\n\td = h[a-1];\n\th[a-1] = h[c-1];\n\th[c-1] = d;\n\t\t\n\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<b",
"i",
"b",
"i++",
"i++",
"i",
"{\n\t\ttry {;\n\t\tt = br.readLine();\n\t} catch (IOException e) {\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}\n\t\tString[] tt = t.split(\",\",0);\n\ta = Integer.parseInt(tt[0]);\n\tc = Integer.parseInt(tt[1]);\n\t\n\tint d = 0;\n\t\n\td = h[a-1];\n\th[a-1] = h[c-1];\n\th[c-1] = d;\n\t\t\n\t}",
"{\n\t\ttry {;\n\t\tt = br.readLine();\n\t} catch (IOException e) {\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}\n\t\tString[] tt = t.split(\",\",0);\n\ta = Integer.parseInt(tt[0]);\n\tc = Integer.parseInt(tt[1]);\n\t\n\tint d = 0;\n\t\n\td = h[a-1];\n\th[a-1] = h[c-1];\n\th[c-1] = d;\n\t\t\n\t}",
"try {;\n\t\tt = br.readLine();\n\t} catch (IOException e) {\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}",
"catch (IOException e) {\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}",
"IOException e",
"{\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{;\n\t\tt = br.readLine();\n\t}",
"t = br.readLine()",
"t",
"br.readLine()",
"br.readLine",
"br",
"String[] tt = t.split(\",\",0);",
"tt",
"t.split(\",\",0)",
"t.split",
"t",
"\",\"",
"0",
"a = Integer.parseInt(tt[0])",
"a",
"Integer.parseInt(tt[0])",
"Integer.parseInt",
"Integer",
"tt[0]",
"tt",
"0",
"c = Integer.parseInt(tt[1])",
"c",
"Integer.parseInt(tt[1])",
"Integer.parseInt",
"Integer",
"tt[1]",
"tt",
"1",
"int d = 0;",
"d",
"0",
"d = h[a-1]",
"d",
"h[a-1]",
"h",
"a-1",
"a",
"1",
"h[a-1] = h[c-1]",
"h[a-1]",
"h",
"a-1",
"a",
"1",
"h[c-1]",
"h",
"c-1",
"c",
"1",
"h[c-1] = d",
"h[c-1]",
"h",
"c-1",
"c",
"1",
"d",
"for(int i=0;i<h.length;i++){\n\t\t\tSystem.out.println(h[i]);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<h.length",
"i",
"h.length",
"h",
"h.length",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(h[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(h[i]);\n\t\t}",
"System.out.println(h[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"h[i]",
"h",
"i",
"String[] aegs",
"aegs",
"public class Main {\n\tpublic static void main(String[] aegs){\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tint a = 0;\n\t\tString t = \"\";\n\t\t/*\n\t\twhile (true){\n\t\t\ttry {\n\t\t\t\tt = br.readLine();\n\t\t\t\tif(t == null){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ta = Integer.parseInt(t);\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t// TODO 自動生成された catch ブロック\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO 自動生成された catch ブロック\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\n\t\tint b = 0;\n\t\tfor(int i=0;i<10;i++){\n\t\t\tfor(int j=0;j<10;j++){\n\t\t\t\tfor(int k=0;k<10;k++){\n\t\t\t\t\tfor(int l=0;l<10;l++){\n\t\t\t\t\t\tif((i+j+k+l) == a){\n\t\t\t\t\t\t\tb++;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(b);\n\t\t}*/\n\t\t/*try {\n\t\t\tt = br.readLine();\n\t\t} catch (IOException e) {\n\t\t\t// TODO 自動生成された catch ブロック\n\t\t\te.printStackTrace();\n\t\t}\n\t\ta = Integer.parseInt(t);\n\t\tint s = 100000;\n\t\tfor(int i=0;i<a;i++){\n\t\t\ts = (int) ((double)s * 1.05);\n\t\t\tint ss = s;\n\t\t\ts = s/1000;\n\t\t\ts = s*1000;\n\t\t\tif((ss - s) > 0){\n\t\t\t\ts = s + 1000;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(s);\n\t\t*/\n\t\t\n\t\ttry {;\n\t\tt = br.readLine();\n\t} catch (IOException e) {\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}\n\ta = Integer.parseInt(t);\n\t\t\n\t\tint[] h = new int[a];\n\t\t\n\t\tfor(int i=0;i<a;i++){\n\t\t\th[i] = i+1;\n\t\t}\n\t\t\n\t\t\n\t\ttry {;\n\t\tt = br.readLine();\n\t} catch (IOException e) {\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}\n\tint b = Integer.parseInt(t);\n\t\t\n\tint c = 0;\n\tfor(int i=0;i<b;i++){\n\t\ttry {;\n\t\tt = br.readLine();\n\t} catch (IOException e) {\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}\n\t\tString[] tt = t.split(\",\",0);\n\ta = Integer.parseInt(tt[0]);\n\tc = Integer.parseInt(tt[1]);\n\t\n\tint d = 0;\n\t\n\td = h[a-1];\n\th[a-1] = h[c-1];\n\th[c-1] = d;\n\t\t\n\t}\n\t\tfor(int i=0;i<h.length;i++){\n\t\t\tSystem.out.println(h[i]);\n\t\t}\n\t\t\n\t}\n\n}",
"public class Main {\n\tpublic static void main(String[] aegs){\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tint a = 0;\n\t\tString t = \"\";\n\t\t/*\n\t\twhile (true){\n\t\t\ttry {\n\t\t\t\tt = br.readLine();\n\t\t\t\tif(t == null){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ta = Integer.parseInt(t);\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t// TODO 自動生成された catch ブロック\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO 自動生成された catch ブロック\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\n\t\tint b = 0;\n\t\tfor(int i=0;i<10;i++){\n\t\t\tfor(int j=0;j<10;j++){\n\t\t\t\tfor(int k=0;k<10;k++){\n\t\t\t\t\tfor(int l=0;l<10;l++){\n\t\t\t\t\t\tif((i+j+k+l) == a){\n\t\t\t\t\t\t\tb++;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(b);\n\t\t}*/\n\t\t/*try {\n\t\t\tt = br.readLine();\n\t\t} catch (IOException e) {\n\t\t\t// TODO 自動生成された catch ブロック\n\t\t\te.printStackTrace();\n\t\t}\n\t\ta = Integer.parseInt(t);\n\t\tint s = 100000;\n\t\tfor(int i=0;i<a;i++){\n\t\t\ts = (int) ((double)s * 1.05);\n\t\t\tint ss = s;\n\t\t\ts = s/1000;\n\t\t\ts = s*1000;\n\t\t\tif((ss - s) > 0){\n\t\t\t\ts = s + 1000;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(s);\n\t\t*/\n\t\t\n\t\ttry {;\n\t\tt = br.readLine();\n\t} catch (IOException e) {\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}\n\ta = Integer.parseInt(t);\n\t\t\n\t\tint[] h = new int[a];\n\t\t\n\t\tfor(int i=0;i<a;i++){\n\t\t\th[i] = i+1;\n\t\t}\n\t\t\n\t\t\n\t\ttry {;\n\t\tt = br.readLine();\n\t} catch (IOException e) {\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}\n\tint b = Integer.parseInt(t);\n\t\t\n\tint c = 0;\n\tfor(int i=0;i<b;i++){\n\t\ttry {;\n\t\tt = br.readLine();\n\t} catch (IOException e) {\n\t\t// TODO 自動生成された catch ブロック\n\t\te.printStackTrace();\n\t}\n\t\tString[] tt = t.split(\",\",0);\n\ta = Integer.parseInt(tt[0]);\n\tc = Integer.parseInt(tt[1]);\n\t\n\tint d = 0;\n\t\n\td = h[a-1];\n\th[a-1] = h[c-1];\n\th[c-1] = d;\n\t\t\n\t}\n\t\tfor(int i=0;i<h.length;i++){\n\t\t\tSystem.out.println(h[i]);\n\t\t}\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[] aegs){
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int a = 0;
String t = "";
/*
while (true){
try {
t = br.readLine();
if(t == null){
break;
}
a = Integer.parseInt(t);
} catch (NumberFormatException e) {
// TODO 自動生成された catch ブロック
e.printStackTrace();
} catch (IOException e) {
// TODO 自動生成された catch ブロック
e.printStackTrace();
}
int b = 0;
for(int i=0;i<10;i++){
for(int j=0;j<10;j++){
for(int k=0;k<10;k++){
for(int l=0;l<10;l++){
if((i+j+k+l) == a){
b++;
}
}
}
}
}
System.out.println(b);
}*/
/*try {
t = br.readLine();
} catch (IOException e) {
// TODO 自動生成された catch ブロック
e.printStackTrace();
}
a = Integer.parseInt(t);
int s = 100000;
for(int i=0;i<a;i++){
s = (int) ((double)s * 1.05);
int ss = s;
s = s/1000;
s = s*1000;
if((ss - s) > 0){
s = s + 1000;
}
}
System.out.println(s);
*/
try {;
t = br.readLine();
} catch (IOException e) {
// TODO 自動生成された catch ブロック
e.printStackTrace();
}
a = Integer.parseInt(t);
int[] h = new int[a];
for(int i=0;i<a;i++){
h[i] = i+1;
}
try {;
t = br.readLine();
} catch (IOException e) {
// TODO 自動生成された catch ブロック
e.printStackTrace();
}
int b = Integer.parseInt(t);
int c = 0;
for(int i=0;i<b;i++){
try {;
t = br.readLine();
} catch (IOException e) {
// TODO 自動生成された catch ブロック
e.printStackTrace();
}
String[] tt = t.split(",",0);
a = Integer.parseInt(tt[0]);
c = Integer.parseInt(tt[1]);
int d = 0;
d = h[a-1];
h[a-1] = h[c-1];
h[c-1] = d;
}
for(int i=0;i<h.length;i++){
System.out.println(h[i]);
}
}
} |
[
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,
13,
41,
13,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
2,
13,
17,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
13,
41,
13,
20,
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,
4,
18,
13,
17,
0,
13,
4,
18,
13,
2,
4,
18,
13,
17,
17,
0,
18,
18,
13,
13,
17,
4,
18,
13,
13,
0,
18,
18,
13,
13,
17,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
18,
18,
13,
2,
13,
13,
17,
0,
13,
13,
14,
2,
18,
13,
13,
18,
18,
13,
2,
13,
13,
17,
0,
13,
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,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
232,
5
],
[
232,
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
],
[
22,
25
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
8,
29
],
[
29,
30
],
[
29,
31
],
[
8,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
38,
39
],
[
38,
40
],
[
33,
41
],
[
41,
42
],
[
42,
43
],
[
33,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
49,
51
],
[
8,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
8,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
8,
63
],
[
63,
64
],
[
63,
65
],
[
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
],
[
80,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
88,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
80,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
99,
100
],
[
98,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
102,
105
],
[
101,
106
],
[
80,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
107,
113
],
[
113,
114
],
[
114,
115
],
[
113,
116
],
[
80,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
118,
122
],
[
117,
123
],
[
123,
124
],
[
124,
125
],
[
123,
126
],
[
8,
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
],
[
142,
144
],
[
141,
145
],
[
145,
146
],
[
145,
147
],
[
141,
148
],
[
148,
149
],
[
149,
150
],
[
150,
151
],
[
150,
152
],
[
148,
153
],
[
153,
154
],
[
153,
155
],
[
148,
156
],
[
156,
157
],
[
157,
158
],
[
148,
159
],
[
160,
160
],
[
160,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
163,
165
],
[
162,
166
],
[
166,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
169,
171
],
[
166,
172
],
[
161,
173
],
[
173,
174
],
[
173,
175
],
[
160,
176
],
[
176,
177
],
[
177,
178
],
[
178,
179
],
[
178,
180
],
[
177,
181
],
[
181,
182
],
[
182,
183
],
[
182,
184
],
[
184,
185
],
[
184,
186
],
[
181,
187
],
[
176,
188
],
[
188,
189
],
[
188,
190
],
[
141,
191
],
[
191,
192
],
[
191,
193
],
[
193,
194
],
[
193,
195
],
[
141,
196
],
[
196,
197
],
[
197,
198
],
[
197,
199
],
[
196,
200
],
[
200,
201
],
[
200,
202
],
[
141,
203
],
[
203,
204
],
[
204,
205
],
[
204,
206
],
[
203,
207
],
[
8,
208
],
[
208,
209
],
[
209,
210
],
[
210,
211
],
[
210,
212
],
[
208,
213
],
[
213,
214
],
[
213,
215
],
[
208,
216
],
[
216,
217
],
[
217,
218
],
[
208,
219
],
[
220,
220
],
[
220,
221
],
[
221,
222
],
[
222,
223
],
[
223,
224
],
[
223,
225
],
[
221,
226
],
[
226,
227
],
[
226,
228
],
[
6,
229
],
[
229,
230
],
[
0,
231
],
[
231,
232
],
[
231,
233
]
] | [
"import java.io.*;\npublic class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) throws IOException{\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(is);\n\n\t\tString str = br.readLine();\n\t\tint n = Integer.parseInt(str);\n\t\tint m = n;\n\t\tint[] amida = new int[n];\n\t\tfor(int i = 0; i < n; i++)\n\t\t\tamida[i] = i+1;\n\t\tstr = br.readLine();\n\t\tn = Integer.parseInt(str);\n\t\tint[][] yoko = new int[n][2];\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tstr = br.readLine();\n\t\t\tString str1 = str.substring(0, str.indexOf(\",\"));\n\t\t\tstr = str.substring(str.indexOf(\",\")+1);\n\t\t\tyoko[i][0] = Integer.parseInt(str1);\n\t\t\tyoko[i][1] = Integer.parseInt(str);\n\t\t}\n\t\tfor(int i = 1; i < n+1; i++){\n\t\t\tint c1=0, c2=0;\n\n\t\t\tfor(int j = 0; j < m; j++){\n\t\t\t\tif(amida[j] == yoko[n-i][0] )c1 = j;\n\t\t\t\tif(amida[j] == yoko[n-i][1] )c2 = j;\n\t\t\t}\n\t\t\tint tmp = amida[c1];\n\t\t\tamida[c1] = amida[c2];\n\t\t\tamida[c2] = tmp;\n\t\t}\n\t\tfor(int k = 0; k < m; k++){\n\t\t\tSystem.out.println(amida[k]);\n\t\t}\n\t\t\t\t\n\t}\n\n}",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) throws IOException{\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(is);\n\n\t\tString str = br.readLine();\n\t\tint n = Integer.parseInt(str);\n\t\tint m = n;\n\t\tint[] amida = new int[n];\n\t\tfor(int i = 0; i < n; i++)\n\t\t\tamida[i] = i+1;\n\t\tstr = br.readLine();\n\t\tn = Integer.parseInt(str);\n\t\tint[][] yoko = new int[n][2];\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tstr = br.readLine();\n\t\t\tString str1 = str.substring(0, str.indexOf(\",\"));\n\t\t\tstr = str.substring(str.indexOf(\",\")+1);\n\t\t\tyoko[i][0] = Integer.parseInt(str1);\n\t\t\tyoko[i][1] = Integer.parseInt(str);\n\t\t}\n\t\tfor(int i = 1; i < n+1; i++){\n\t\t\tint c1=0, c2=0;\n\n\t\t\tfor(int j = 0; j < m; j++){\n\t\t\t\tif(amida[j] == yoko[n-i][0] )c1 = j;\n\t\t\t\tif(amida[j] == yoko[n-i][1] )c2 = j;\n\t\t\t}\n\t\t\tint tmp = amida[c1];\n\t\t\tamida[c1] = amida[c2];\n\t\t\tamida[c2] = tmp;\n\t\t}\n\t\tfor(int k = 0; k < m; k++){\n\t\t\tSystem.out.println(amida[k]);\n\t\t}\n\t\t\t\t\n\t}\n\n}",
"Main",
"/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) throws IOException{\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(is);\n\n\t\tString str = br.readLine();\n\t\tint n = Integer.parseInt(str);\n\t\tint m = n;\n\t\tint[] amida = new int[n];\n\t\tfor(int i = 0; i < n; i++)\n\t\t\tamida[i] = i+1;\n\t\tstr = br.readLine();\n\t\tn = Integer.parseInt(str);\n\t\tint[][] yoko = new int[n][2];\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tstr = br.readLine();\n\t\t\tString str1 = str.substring(0, str.indexOf(\",\"));\n\t\t\tstr = str.substring(str.indexOf(\",\")+1);\n\t\t\tyoko[i][0] = Integer.parseInt(str1);\n\t\t\tyoko[i][1] = Integer.parseInt(str);\n\t\t}\n\t\tfor(int i = 1; i < n+1; i++){\n\t\t\tint c1=0, c2=0;\n\n\t\t\tfor(int j = 0; j < m; j++){\n\t\t\t\tif(amida[j] == yoko[n-i][0] )c1 = j;\n\t\t\t\tif(amida[j] == yoko[n-i][1] )c2 = j;\n\t\t\t}\n\t\t\tint tmp = amida[c1];\n\t\t\tamida[c1] = amida[c2];\n\t\t\tamida[c2] = tmp;\n\t\t}\n\t\tfor(int k = 0; k < m; k++){\n\t\t\tSystem.out.println(amida[k]);\n\t\t}\n\t\t\t\t\n\t}",
"main",
"{\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(is);\n\n\t\tString str = br.readLine();\n\t\tint n = Integer.parseInt(str);\n\t\tint m = n;\n\t\tint[] amida = new int[n];\n\t\tfor(int i = 0; i < n; i++)\n\t\t\tamida[i] = i+1;\n\t\tstr = br.readLine();\n\t\tn = Integer.parseInt(str);\n\t\tint[][] yoko = new int[n][2];\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tstr = br.readLine();\n\t\t\tString str1 = str.substring(0, str.indexOf(\",\"));\n\t\t\tstr = str.substring(str.indexOf(\",\")+1);\n\t\t\tyoko[i][0] = Integer.parseInt(str1);\n\t\t\tyoko[i][1] = Integer.parseInt(str);\n\t\t}\n\t\tfor(int i = 1; i < n+1; i++){\n\t\t\tint c1=0, c2=0;\n\n\t\t\tfor(int j = 0; j < m; j++){\n\t\t\t\tif(amida[j] == yoko[n-i][0] )c1 = j;\n\t\t\t\tif(amida[j] == yoko[n-i][1] )c2 = j;\n\t\t\t}\n\t\t\tint tmp = amida[c1];\n\t\t\tamida[c1] = amida[c2];\n\t\t\tamida[c2] = tmp;\n\t\t}\n\t\tfor(int k = 0; k < m; k++){\n\t\t\tSystem.out.println(amida[k]);\n\t\t}\n\t\t\t\t\n\t}",
"InputStreamReader is = new InputStreamReader(System.in);",
"is",
"new InputStreamReader(System.in)",
"BufferedReader br = new BufferedReader(is);",
"br",
"new BufferedReader(is)",
"String str = br.readLine();",
"str",
"br.readLine()",
"br.readLine",
"br",
"int n = Integer.parseInt(str);",
"n",
"Integer.parseInt(str)",
"Integer.parseInt",
"Integer",
"str",
"int m = n;",
"m",
"n",
"int[] amida = new int[n];",
"amida",
"new int[n]",
"n",
"for(int i = 0; i < n; i++)\n\t\t\tamida[i] = i+1;",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"amida[i] = i+1;",
"amida[i] = i+1",
"amida[i]",
"amida",
"i",
"i+1",
"i",
"1",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"n = Integer.parseInt(str)",
"n",
"Integer.parseInt(str)",
"Integer.parseInt",
"Integer",
"str",
"int[][] yoko = new int[n][2];",
"yoko",
"new int[n][2]",
"n",
"2",
"for(int i = 0; i < n; i++){\n\t\t\tstr = br.readLine();\n\t\t\tString str1 = str.substring(0, str.indexOf(\",\"));\n\t\t\tstr = str.substring(str.indexOf(\",\")+1);\n\t\t\tyoko[i][0] = Integer.parseInt(str1);\n\t\t\tyoko[i][1] = Integer.parseInt(str);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tstr = br.readLine();\n\t\t\tString str1 = str.substring(0, str.indexOf(\",\"));\n\t\t\tstr = str.substring(str.indexOf(\",\")+1);\n\t\t\tyoko[i][0] = Integer.parseInt(str1);\n\t\t\tyoko[i][1] = Integer.parseInt(str);\n\t\t}",
"{\n\t\t\tstr = br.readLine();\n\t\t\tString str1 = str.substring(0, str.indexOf(\",\"));\n\t\t\tstr = str.substring(str.indexOf(\",\")+1);\n\t\t\tyoko[i][0] = Integer.parseInt(str1);\n\t\t\tyoko[i][1] = Integer.parseInt(str);\n\t\t}",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"String str1 = str.substring(0, str.indexOf(\",\"));",
"str1",
"str.substring(0, str.indexOf(\",\"))",
"str.substring",
"str",
"0",
"str.indexOf(\",\")",
"str.indexOf",
"str",
"\",\"",
"str = str.substring(str.indexOf(\",\")+1)",
"str",
"str.substring(str.indexOf(\",\")+1)",
"str.substring",
"str",
"str.indexOf(\",\")+1",
"str.indexOf(\",\")",
"str.indexOf",
"str",
"\",\"",
"1",
"yoko[i][0] = Integer.parseInt(str1)",
"yoko[i][0]",
"yoko[i]",
"yoko",
"i",
"0",
"Integer.parseInt(str1)",
"Integer.parseInt",
"Integer",
"str1",
"yoko[i][1] = Integer.parseInt(str)",
"yoko[i][1]",
"yoko[i]",
"yoko",
"i",
"1",
"Integer.parseInt(str)",
"Integer.parseInt",
"Integer",
"str",
"for(int i = 1; i < n+1; i++){\n\t\t\tint c1=0, c2=0;\n\n\t\t\tfor(int j = 0; j < m; j++){\n\t\t\t\tif(amida[j] == yoko[n-i][0] )c1 = j;\n\t\t\t\tif(amida[j] == yoko[n-i][1] )c2 = j;\n\t\t\t}\n\t\t\tint tmp = amida[c1];\n\t\t\tamida[c1] = amida[c2];\n\t\t\tamida[c2] = tmp;\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < n+1",
"i",
"n+1",
"n",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tint c1=0, c2=0;\n\n\t\t\tfor(int j = 0; j < m; j++){\n\t\t\t\tif(amida[j] == yoko[n-i][0] )c1 = j;\n\t\t\t\tif(amida[j] == yoko[n-i][1] )c2 = j;\n\t\t\t}\n\t\t\tint tmp = amida[c1];\n\t\t\tamida[c1] = amida[c2];\n\t\t\tamida[c2] = tmp;\n\t\t}",
"{\n\t\t\tint c1=0, c2=0;\n\n\t\t\tfor(int j = 0; j < m; j++){\n\t\t\t\tif(amida[j] == yoko[n-i][0] )c1 = j;\n\t\t\t\tif(amida[j] == yoko[n-i][1] )c2 = j;\n\t\t\t}\n\t\t\tint tmp = amida[c1];\n\t\t\tamida[c1] = amida[c2];\n\t\t\tamida[c2] = tmp;\n\t\t}",
"int c1=0",
"c1",
"0",
"c2=0;",
"c2",
"0",
"for(int j = 0; j < m; j++){\n\t\t\t\tif(amida[j] == yoko[n-i][0] )c1 = j;\n\t\t\t\tif(amida[j] == yoko[n-i][1] )c2 = j;\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < m",
"j",
"m",
"j++",
"j++",
"j",
"{\n\t\t\t\tif(amida[j] == yoko[n-i][0] )c1 = j;\n\t\t\t\tif(amida[j] == yoko[n-i][1] )c2 = j;\n\t\t\t}",
"{\n\t\t\t\tif(amida[j] == yoko[n-i][0] )c1 = j;\n\t\t\t\tif(amida[j] == yoko[n-i][1] )c2 = j;\n\t\t\t}",
"if(amida[j] == yoko[n-i][0] )c1 = j;",
"amida[j] == yoko[n-i][0]",
"amida[j]",
"amida",
"j",
"yoko[n-i][0]",
"yoko[n-i]",
"yoko",
"n-i",
"n",
"i",
"0",
"c1 = j",
"c1",
"j",
"if(amida[j] == yoko[n-i][1] )c2 = j;",
"amida[j] == yoko[n-i][1]",
"amida[j]",
"amida",
"j",
"yoko[n-i][1]",
"yoko[n-i]",
"yoko",
"n-i",
"n",
"i",
"1",
"c2 = j",
"c2",
"j",
"int tmp = amida[c1];",
"tmp",
"amida[c1]",
"amida",
"c1",
"amida[c1] = amida[c2]",
"amida[c1]",
"amida",
"c1",
"amida[c2]",
"amida",
"c2",
"amida[c2] = tmp",
"amida[c2]",
"amida",
"c2",
"tmp",
"for(int k = 0; k < m; k++){\n\t\t\tSystem.out.println(amida[k]);\n\t\t}",
"int k = 0;",
"int k = 0;",
"k",
"0",
"k < m",
"k",
"m",
"k++",
"k++",
"k",
"{\n\t\t\tSystem.out.println(amida[k]);\n\t\t}",
"{\n\t\t\tSystem.out.println(amida[k]);\n\t\t}",
"System.out.println(amida[k])",
"System.out.println",
"System.out",
"System",
"System.out",
"amida[k]",
"amida",
"k",
"String[] args",
"args",
"public class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) throws IOException{\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(is);\n\n\t\tString str = br.readLine();\n\t\tint n = Integer.parseInt(str);\n\t\tint m = n;\n\t\tint[] amida = new int[n];\n\t\tfor(int i = 0; i < n; i++)\n\t\t\tamida[i] = i+1;\n\t\tstr = br.readLine();\n\t\tn = Integer.parseInt(str);\n\t\tint[][] yoko = new int[n][2];\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tstr = br.readLine();\n\t\t\tString str1 = str.substring(0, str.indexOf(\",\"));\n\t\t\tstr = str.substring(str.indexOf(\",\")+1);\n\t\t\tyoko[i][0] = Integer.parseInt(str1);\n\t\t\tyoko[i][1] = Integer.parseInt(str);\n\t\t}\n\t\tfor(int i = 1; i < n+1; i++){\n\t\t\tint c1=0, c2=0;\n\n\t\t\tfor(int j = 0; j < m; j++){\n\t\t\t\tif(amida[j] == yoko[n-i][0] )c1 = j;\n\t\t\t\tif(amida[j] == yoko[n-i][1] )c2 = j;\n\t\t\t}\n\t\t\tint tmp = amida[c1];\n\t\t\tamida[c1] = amida[c2];\n\t\t\tamida[c2] = tmp;\n\t\t}\n\t\tfor(int k = 0; k < m; k++){\n\t\t\tSystem.out.println(amida[k]);\n\t\t}\n\t\t\t\t\n\t}\n\n}",
"public class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) throws IOException{\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(is);\n\n\t\tString str = br.readLine();\n\t\tint n = Integer.parseInt(str);\n\t\tint m = n;\n\t\tint[] amida = new int[n];\n\t\tfor(int i = 0; i < n; i++)\n\t\t\tamida[i] = i+1;\n\t\tstr = br.readLine();\n\t\tn = Integer.parseInt(str);\n\t\tint[][] yoko = new int[n][2];\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tstr = br.readLine();\n\t\t\tString str1 = str.substring(0, str.indexOf(\",\"));\n\t\t\tstr = str.substring(str.indexOf(\",\")+1);\n\t\t\tyoko[i][0] = Integer.parseInt(str1);\n\t\t\tyoko[i][1] = Integer.parseInt(str);\n\t\t}\n\t\tfor(int i = 1; i < n+1; i++){\n\t\t\tint c1=0, c2=0;\n\n\t\t\tfor(int j = 0; j < m; j++){\n\t\t\t\tif(amida[j] == yoko[n-i][0] )c1 = j;\n\t\t\t\tif(amida[j] == yoko[n-i][1] )c2 = j;\n\t\t\t}\n\t\t\tint tmp = amida[c1];\n\t\t\tamida[c1] = amida[c2];\n\t\t\tamida[c2] = tmp;\n\t\t}\n\t\tfor(int k = 0; k < m; k++){\n\t\t\tSystem.out.println(amida[k]);\n\t\t}\n\t\t\t\t\n\t}\n\n}",
"Main"
] | import java.io.*;
public class Main {
/**
* @param args
*/
public static void main(String[] args) throws IOException{
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
String str = br.readLine();
int n = Integer.parseInt(str);
int m = n;
int[] amida = new int[n];
for(int i = 0; i < n; i++)
amida[i] = i+1;
str = br.readLine();
n = Integer.parseInt(str);
int[][] yoko = new int[n][2];
for(int i = 0; i < n; i++){
str = br.readLine();
String str1 = str.substring(0, str.indexOf(","));
str = str.substring(str.indexOf(",")+1);
yoko[i][0] = Integer.parseInt(str1);
yoko[i][1] = Integer.parseInt(str);
}
for(int i = 1; i < n+1; i++){
int c1=0, c2=0;
for(int j = 0; j < m; j++){
if(amida[j] == yoko[n-i][0] )c1 = j;
if(amida[j] == yoko[n-i][1] )c2 = j;
}
int tmp = amida[c1];
amida[c1] = amida[c2];
amida[c2] = tmp;
}
for(int k = 0; k < m; k++){
System.out.println(amida[k]);
}
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
12,
13,
30,
0,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
41,
13,
20,
2,
13,
17,
41,
13,
20,
2,
13,
17,
41,
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,
0,
18,
13,
13,
4,
18,
13,
18,
13,
17,
0,
18,
13,
13,
4,
18,
13,
18,
13,
17,
41,
13,
20,
2,
13,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
13,
11,
1,
0,
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,
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
],
[
175,
5
],
[
175,
6
],
[
6,
7
],
[
175,
8
],
[
8,
9
],
[
8,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
10,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
10,
24
],
[
24,
25
],
[
24,
26
],
[
27,
28
],
[
27,
29
],
[
10,
30
],
[
30,
31
],
[
30,
32
],
[
33,
34
],
[
33,
35
],
[
10,
36
],
[
36,
37
],
[
36,
38
],
[
39,
40
],
[
39,
41
],
[
10,
42
],
[
42,
43
],
[
42,
44
],
[
10,
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
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
76,
77
],
[
76,
78
],
[
57,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
86,
87
],
[
86,
88
],
[
10,
89
],
[
89,
90
],
[
89,
91
],
[
92,
93
],
[
92,
94
],
[
10,
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
],
[
108,
112
],
[
10,
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
],
[
126,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
130,
132
],
[
125,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
136,
137
],
[
136,
138
],
[
133,
139
],
[
139,
140
],
[
139,
141
],
[
141,
142
],
[
141,
143
],
[
125,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
147,
148
],
[
147,
149
],
[
144,
150
],
[
10,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
153,
155
],
[
151,
156
],
[
156,
157
],
[
156,
158
],
[
151,
159
],
[
159,
160
],
[
160,
161
],
[
151,
162
],
[
163,
163
],
[
163,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
166,
168
],
[
164,
169
],
[
169,
170
],
[
169,
171
],
[
8,
172
],
[
172,
173
],
[
0,
174
],
[
174,
175
],
[
174,
176
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static Scanner sc;\n\t\n\tpublic static void main(String[] args){\n\t\t//宣言\n\t\tsc = new Scanner(System.in);\n\t\tint w=sc.nextInt();\n\t\tint n=sc.nextInt();\n\t\tint a[]=new int[n+1];\n\t\tint b[]=new int[n+1];\n\t\tString s[]=new String[n+1];\n\t\tint i=0;\n\t\tfor(i=1;i<=n;i++){\n\t\t\tString str =sc.next();\n\t\t\tString[] ab =str.split(\",\");\n\t\t\ta[i]= Integer.parseInt(ab[0]);\n\t\t\tb[i]=Integer.parseInt(ab[1]);\n\t\t}\n\t\tint bar[]=new int[w+1];\n\t\tfor(i=1;i<=w;i++) {\n\t\t\tbar[i]=i;\n\t\t}\n\t\t//演算\n\t\tfor(i=1;i<=n;i++) {\n\t\t\t//swap\n\t\t\tint p =bar[(int)a[i]];\n\t\t\tbar[(int)a[i]]=bar[(int)b[i]];\n\t\t\tbar[(int)b[i]]=p;\n\t\t\t\n\t\t}\n\t\t//出力\n\t\tfor(i=1;i<=w;i++) {\n\t\t\tSystem.out.println(bar[i]);\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static Scanner sc;\n\t\n\tpublic static void main(String[] args){\n\t\t//宣言\n\t\tsc = new Scanner(System.in);\n\t\tint w=sc.nextInt();\n\t\tint n=sc.nextInt();\n\t\tint a[]=new int[n+1];\n\t\tint b[]=new int[n+1];\n\t\tString s[]=new String[n+1];\n\t\tint i=0;\n\t\tfor(i=1;i<=n;i++){\n\t\t\tString str =sc.next();\n\t\t\tString[] ab =str.split(\",\");\n\t\t\ta[i]= Integer.parseInt(ab[0]);\n\t\t\tb[i]=Integer.parseInt(ab[1]);\n\t\t}\n\t\tint bar[]=new int[w+1];\n\t\tfor(i=1;i<=w;i++) {\n\t\t\tbar[i]=i;\n\t\t}\n\t\t//演算\n\t\tfor(i=1;i<=n;i++) {\n\t\t\t//swap\n\t\t\tint p =bar[(int)a[i]];\n\t\t\tbar[(int)a[i]]=bar[(int)b[i]];\n\t\t\tbar[(int)b[i]]=p;\n\t\t\t\n\t\t}\n\t\t//出力\n\t\tfor(i=1;i<=w;i++) {\n\t\t\tSystem.out.println(bar[i]);\n\t\t}\n\t}\n}",
"Main",
"public static Scanner sc;",
"sc",
"public static void main(String[] args){\n\t\t//宣言\n\t\tsc = new Scanner(System.in);\n\t\tint w=sc.nextInt();\n\t\tint n=sc.nextInt();\n\t\tint a[]=new int[n+1];\n\t\tint b[]=new int[n+1];\n\t\tString s[]=new String[n+1];\n\t\tint i=0;\n\t\tfor(i=1;i<=n;i++){\n\t\t\tString str =sc.next();\n\t\t\tString[] ab =str.split(\",\");\n\t\t\ta[i]= Integer.parseInt(ab[0]);\n\t\t\tb[i]=Integer.parseInt(ab[1]);\n\t\t}\n\t\tint bar[]=new int[w+1];\n\t\tfor(i=1;i<=w;i++) {\n\t\t\tbar[i]=i;\n\t\t}\n\t\t//演算\n\t\tfor(i=1;i<=n;i++) {\n\t\t\t//swap\n\t\t\tint p =bar[(int)a[i]];\n\t\t\tbar[(int)a[i]]=bar[(int)b[i]];\n\t\t\tbar[(int)b[i]]=p;\n\t\t\t\n\t\t}\n\t\t//出力\n\t\tfor(i=1;i<=w;i++) {\n\t\t\tSystem.out.println(bar[i]);\n\t\t}\n\t}",
"main",
"{\n\t\t//宣言\n\t\tsc = new Scanner(System.in);\n\t\tint w=sc.nextInt();\n\t\tint n=sc.nextInt();\n\t\tint a[]=new int[n+1];\n\t\tint b[]=new int[n+1];\n\t\tString s[]=new String[n+1];\n\t\tint i=0;\n\t\tfor(i=1;i<=n;i++){\n\t\t\tString str =sc.next();\n\t\t\tString[] ab =str.split(\",\");\n\t\t\ta[i]= Integer.parseInt(ab[0]);\n\t\t\tb[i]=Integer.parseInt(ab[1]);\n\t\t}\n\t\tint bar[]=new int[w+1];\n\t\tfor(i=1;i<=w;i++) {\n\t\t\tbar[i]=i;\n\t\t}\n\t\t//演算\n\t\tfor(i=1;i<=n;i++) {\n\t\t\t//swap\n\t\t\tint p =bar[(int)a[i]];\n\t\t\tbar[(int)a[i]]=bar[(int)b[i]];\n\t\t\tbar[(int)b[i]]=p;\n\t\t\t\n\t\t}\n\t\t//出力\n\t\tfor(i=1;i<=w;i++) {\n\t\t\tSystem.out.println(bar[i]);\n\t\t}\n\t}",
"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[n+1];",
"a",
"new int[n+1]",
"n+1",
"n",
"1",
"int b[]=new int[n+1];",
"b",
"new int[n+1]",
"n+1",
"n",
"1",
"String s[]=new String[n+1];",
"s",
"new String[n+1]",
"n+1",
"n",
"1",
"int i=0;",
"i",
"0",
"for(i=1;i<=n;i++){\n\t\t\tString str =sc.next();\n\t\t\tString[] ab =str.split(\",\");\n\t\t\ta[i]= Integer.parseInt(ab[0]);\n\t\t\tb[i]=Integer.parseInt(ab[1]);\n\t\t}",
"i=1;",
"i=1",
"i",
"1",
"i<=n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString str =sc.next();\n\t\t\tString[] ab =str.split(\",\");\n\t\t\ta[i]= Integer.parseInt(ab[0]);\n\t\t\tb[i]=Integer.parseInt(ab[1]);\n\t\t}",
"{\n\t\t\tString str =sc.next();\n\t\t\tString[] ab =str.split(\",\");\n\t\t\ta[i]= Integer.parseInt(ab[0]);\n\t\t\tb[i]=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",
"\",\"",
"a[i]= Integer.parseInt(ab[0])",
"a[i]",
"a",
"i",
"Integer.parseInt(ab[0])",
"Integer.parseInt",
"Integer",
"ab[0]",
"ab",
"0",
"b[i]=Integer.parseInt(ab[1])",
"b[i]",
"b",
"i",
"Integer.parseInt(ab[1])",
"Integer.parseInt",
"Integer",
"ab[1]",
"ab",
"1",
"int bar[]=new int[w+1];",
"bar",
"new int[w+1]",
"w+1",
"w",
"1",
"for(i=1;i<=w;i++) {\n\t\t\tbar[i]=i;\n\t\t}",
"i=1;",
"i=1",
"i",
"1",
"i<=w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tbar[i]=i;\n\t\t}",
"{\n\t\t\tbar[i]=i;\n\t\t}",
"bar[i]=i",
"bar[i]",
"bar",
"i",
"i",
"for(i=1;i<=n;i++) {\n\t\t\t//swap\n\t\t\tint p =bar[(int)a[i]];\n\t\t\tbar[(int)a[i]]=bar[(int)b[i]];\n\t\t\tbar[(int)b[i]]=p;\n\t\t\t\n\t\t}",
"i=1;",
"i=1",
"i",
"1",
"i<=n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t//swap\n\t\t\tint p =bar[(int)a[i]];\n\t\t\tbar[(int)a[i]]=bar[(int)b[i]];\n\t\t\tbar[(int)b[i]]=p;\n\t\t\t\n\t\t}",
"{\n\t\t\t//swap\n\t\t\tint p =bar[(int)a[i]];\n\t\t\tbar[(int)a[i]]=bar[(int)b[i]];\n\t\t\tbar[(int)b[i]]=p;\n\t\t\t\n\t\t}",
"int p =bar[(int)a[i]];",
"p",
"bar[(int)a[i]]",
"bar",
"(int)a[i]",
"a",
"i",
"bar[(int)a[i]]=bar[(int)b[i]]",
"bar[(int)a[i]]",
"bar",
"(int)a[i]",
"a",
"i",
"bar[(int)b[i]]",
"bar",
"(int)b[i]",
"b",
"i",
"bar[(int)b[i]]=p",
"bar[(int)b[i]]",
"bar",
"(int)b[i]",
"b",
"i",
"p",
"for(i=1;i<=w;i++) {\n\t\t\tSystem.out.println(bar[i]);\n\t\t}",
"i=1;",
"i=1",
"i",
"1",
"i<=w",
"i",
"w",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(bar[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(bar[i]);\n\t\t}",
"System.out.println(bar[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"bar[i]",
"bar",
"i",
"String[] args",
"args",
"public class Main {\n\tpublic static Scanner sc;\n\t\n\tpublic static void main(String[] args){\n\t\t//宣言\n\t\tsc = new Scanner(System.in);\n\t\tint w=sc.nextInt();\n\t\tint n=sc.nextInt();\n\t\tint a[]=new int[n+1];\n\t\tint b[]=new int[n+1];\n\t\tString s[]=new String[n+1];\n\t\tint i=0;\n\t\tfor(i=1;i<=n;i++){\n\t\t\tString str =sc.next();\n\t\t\tString[] ab =str.split(\",\");\n\t\t\ta[i]= Integer.parseInt(ab[0]);\n\t\t\tb[i]=Integer.parseInt(ab[1]);\n\t\t}\n\t\tint bar[]=new int[w+1];\n\t\tfor(i=1;i<=w;i++) {\n\t\t\tbar[i]=i;\n\t\t}\n\t\t//演算\n\t\tfor(i=1;i<=n;i++) {\n\t\t\t//swap\n\t\t\tint p =bar[(int)a[i]];\n\t\t\tbar[(int)a[i]]=bar[(int)b[i]];\n\t\t\tbar[(int)b[i]]=p;\n\t\t\t\n\t\t}\n\t\t//出力\n\t\tfor(i=1;i<=w;i++) {\n\t\t\tSystem.out.println(bar[i]);\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static Scanner sc;\n\t\n\tpublic static void main(String[] args){\n\t\t//宣言\n\t\tsc = new Scanner(System.in);\n\t\tint w=sc.nextInt();\n\t\tint n=sc.nextInt();\n\t\tint a[]=new int[n+1];\n\t\tint b[]=new int[n+1];\n\t\tString s[]=new String[n+1];\n\t\tint i=0;\n\t\tfor(i=1;i<=n;i++){\n\t\t\tString str =sc.next();\n\t\t\tString[] ab =str.split(\",\");\n\t\t\ta[i]= Integer.parseInt(ab[0]);\n\t\t\tb[i]=Integer.parseInt(ab[1]);\n\t\t}\n\t\tint bar[]=new int[w+1];\n\t\tfor(i=1;i<=w;i++) {\n\t\t\tbar[i]=i;\n\t\t}\n\t\t//演算\n\t\tfor(i=1;i<=n;i++) {\n\t\t\t//swap\n\t\t\tint p =bar[(int)a[i]];\n\t\t\tbar[(int)a[i]]=bar[(int)b[i]];\n\t\t\tbar[(int)b[i]]=p;\n\t\t\t\n\t\t}\n\t\t//出力\n\t\tfor(i=1;i<=w;i++) {\n\t\t\tSystem.out.println(bar[i]);\n\t\t}\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static Scanner sc;
public static void main(String[] args){
//宣言
sc = new Scanner(System.in);
int w=sc.nextInt();
int n=sc.nextInt();
int a[]=new int[n+1];
int b[]=new int[n+1];
String s[]=new String[n+1];
int i=0;
for(i=1;i<=n;i++){
String str =sc.next();
String[] ab =str.split(",");
a[i]= Integer.parseInt(ab[0]);
b[i]=Integer.parseInt(ab[1]);
}
int bar[]=new int[w+1];
for(i=1;i<=w;i++) {
bar[i]=i;
}
//演算
for(i=1;i<=n;i++) {
//swap
int p =bar[(int)a[i]];
bar[(int)a[i]]=bar[(int)b[i]];
bar[(int)b[i]]=p;
}
//出力
for(i=1;i<=w;i++) {
System.out.println(bar[i]);
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
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,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
0,
13,
4,
13,
13,
4,
18,
13,
18,
13,
17,
4,
18,
13,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
2,
13,
17,
4,
18,
13,
2,
13,
17,
4,
18,
13,
2,
13,
17,
4,
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
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
15,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
22,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
31,
32
],
[
32,
33
],
[
22,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
39,
40
],
[
40,
41
],
[
22,
42
],
[
42,
43
],
[
42,
44
],
[
22,
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
],
[
61,
62
],
[
61,
63
],
[
22,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
64,
74
],
[
74,
75
],
[
75,
76
],
[
64,
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
],
[
78,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
92,
94
],
[
92,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
98,
99
],
[
98,
100
],
[
92,
101
],
[
101,
102
],
[
102,
103
],
[
101,
104
],
[
104,
105
],
[
104,
106
],
[
22,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
107,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
115,
116
],
[
107,
117
],
[
117,
118
],
[
118,
119
],
[
107,
120
],
[
121,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
122,
127
],
[
127,
128
],
[
128,
129
],
[
127,
130
],
[
12,
131
],
[
131,
132
],
[
10,
133
],
[
133,
134
],
[
133,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
139,
140
],
[
138,
141
],
[
141,
142
],
[
141,
143
],
[
135,
144
],
[
144,
145
],
[
145,
146
],
[
144,
147
],
[
147,
148
],
[
147,
149
],
[
144,
150
],
[
150,
151
],
[
151,
152
],
[
150,
153
],
[
153,
154
],
[
153,
155
],
[
135,
156
],
[
156,
157
],
[
157,
158
],
[
156,
159
],
[
159,
160
],
[
159,
161
],
[
156,
162
],
[
135,
163
],
[
163,
164
],
[
133,
165
],
[
165,
166
],
[
133,
167
],
[
167,
168
],
[
133,
169
],
[
169,
170
]
] | [
"\nimport java.io.*;\nimport java.util.ArrayList;\nimport java.util.List;\n\n\nclass Main {\n\tpublic static void main(String[] args) {\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tint verticalLine = Integer.parseInt(br.readLine());//???????????¬??°\n\t\t\tint horizontalLine = Integer.parseInt(br.readLine());//?¨?????????°\n\t\t\tList<Integer> lots = new ArrayList<>();//?????????????´????????????????\n\t\t\t\n\t\t\tfor(int i=0; i<verticalLine; i++){\n\t\t\t\tlots.add(i+1);//???????????????????????????????????????????????? ex) ???????????°??????1??????????????????[1], 2??????????????????[2]...\n\t\t\t}\n\t\t\t\n\t\t\tfor(int j=1; j<horizontalLine+1; j++){\n\t\t\t\tString line = br.readLine();\n\t\t\t\tString[] dataSet = line.split(\",\");\n\t\t\t\t\n\t\t\t\tlots = swap(lots, Integer.parseInt(dataSet[0]), Integer.parseInt(dataSet[1]));\n\t\t\t}\n\t\t\t\n\t\t\tfor(int k=0; k<lots.size(); k++){\n\t\t\t\tSystem.out.println(lots.get(k));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\t\n\t/*\n\t * ???????????\\????????????????????????\n\t * @param ??????????????????????´???????????????????\n\t * @param ??\\????????????????????????????????????\n\t * @param ??\\????????????????????????????????????\n\t *\n\t */\n\tprivate static List<Integer> swap(List<Integer> lots, int index1, int index2) {\n\t\tint tmp = lots.get(index1-1);\n\t\tlots.set(index1-1, lots.get(index2-1));\n\t lots.set(index2-1, tmp);\n\t return lots;\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.List;",
"List",
"java.util",
"class Main {\n\tpublic static void main(String[] args) {\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tint verticalLine = Integer.parseInt(br.readLine());//???????????¬??°\n\t\t\tint horizontalLine = Integer.parseInt(br.readLine());//?¨?????????°\n\t\t\tList<Integer> lots = new ArrayList<>();//?????????????´????????????????\n\t\t\t\n\t\t\tfor(int i=0; i<verticalLine; i++){\n\t\t\t\tlots.add(i+1);//???????????????????????????????????????????????? ex) ???????????°??????1??????????????????[1], 2??????????????????[2]...\n\t\t\t}\n\t\t\t\n\t\t\tfor(int j=1; j<horizontalLine+1; j++){\n\t\t\t\tString line = br.readLine();\n\t\t\t\tString[] dataSet = line.split(\",\");\n\t\t\t\t\n\t\t\t\tlots = swap(lots, Integer.parseInt(dataSet[0]), Integer.parseInt(dataSet[1]));\n\t\t\t}\n\t\t\t\n\t\t\tfor(int k=0; k<lots.size(); k++){\n\t\t\t\tSystem.out.println(lots.get(k));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\t\n\t/*\n\t * ???????????\\????????????????????????\n\t * @param ??????????????????????´???????????????????\n\t * @param ??\\????????????????????????????????????\n\t * @param ??\\????????????????????????????????????\n\t *\n\t */\n\tprivate static List<Integer> swap(List<Integer> lots, int index1, int index2) {\n\t\tint tmp = lots.get(index1-1);\n\t\tlots.set(index1-1, lots.get(index2-1));\n\t lots.set(index2-1, tmp);\n\t return lots;\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tint verticalLine = Integer.parseInt(br.readLine());//???????????¬??°\n\t\t\tint horizontalLine = Integer.parseInt(br.readLine());//?¨?????????°\n\t\t\tList<Integer> lots = new ArrayList<>();//?????????????´????????????????\n\t\t\t\n\t\t\tfor(int i=0; i<verticalLine; i++){\n\t\t\t\tlots.add(i+1);//???????????????????????????????????????????????? ex) ???????????°??????1??????????????????[1], 2??????????????????[2]...\n\t\t\t}\n\t\t\t\n\t\t\tfor(int j=1; j<horizontalLine+1; j++){\n\t\t\t\tString line = br.readLine();\n\t\t\t\tString[] dataSet = line.split(\",\");\n\t\t\t\t\n\t\t\t\tlots = swap(lots, Integer.parseInt(dataSet[0]), Integer.parseInt(dataSet[1]));\n\t\t\t}\n\t\t\t\n\t\t\tfor(int k=0; k<lots.size(); k++){\n\t\t\t\tSystem.out.println(lots.get(k));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"main",
"{\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tint verticalLine = Integer.parseInt(br.readLine());//???????????¬??°\n\t\t\tint horizontalLine = Integer.parseInt(br.readLine());//?¨?????????°\n\t\t\tList<Integer> lots = new ArrayList<>();//?????????????´????????????????\n\t\t\t\n\t\t\tfor(int i=0; i<verticalLine; i++){\n\t\t\t\tlots.add(i+1);//???????????????????????????????????????????????? ex) ???????????°??????1??????????????????[1], 2??????????????????[2]...\n\t\t\t}\n\t\t\t\n\t\t\tfor(int j=1; j<horizontalLine+1; j++){\n\t\t\t\tString line = br.readLine();\n\t\t\t\tString[] dataSet = line.split(\",\");\n\t\t\t\t\n\t\t\t\tlots = swap(lots, Integer.parseInt(dataSet[0]), Integer.parseInt(dataSet[1]));\n\t\t\t}\n\t\t\t\n\t\t\tfor(int k=0; k<lots.size(); k++){\n\t\t\t\tSystem.out.println(lots.get(k));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"try {\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tint verticalLine = Integer.parseInt(br.readLine());//???????????¬??°\n\t\t\tint horizontalLine = Integer.parseInt(br.readLine());//?¨?????????°\n\t\t\tList<Integer> lots = new ArrayList<>();//?????????????´????????????????\n\t\t\t\n\t\t\tfor(int i=0; i<verticalLine; i++){\n\t\t\t\tlots.add(i+1);//???????????????????????????????????????????????? ex) ???????????°??????1??????????????????[1], 2??????????????????[2]...\n\t\t\t}\n\t\t\t\n\t\t\tfor(int j=1; j<horizontalLine+1; j++){\n\t\t\t\tString line = br.readLine();\n\t\t\t\tString[] dataSet = line.split(\",\");\n\t\t\t\t\n\t\t\t\tlots = swap(lots, Integer.parseInt(dataSet[0]), Integer.parseInt(dataSet[1]));\n\t\t\t}\n\t\t\t\n\t\t\tfor(int k=0; k<lots.size(); k++){\n\t\t\t\tSystem.out.println(lots.get(k));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}",
"catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}",
"Exception e",
"{\n\t\t\te.printStackTrace();\n\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tint verticalLine = Integer.parseInt(br.readLine());//???????????¬??°\n\t\t\tint horizontalLine = Integer.parseInt(br.readLine());//?¨?????????°\n\t\t\tList<Integer> lots = new ArrayList<>();//?????????????´????????????????\n\t\t\t\n\t\t\tfor(int i=0; i<verticalLine; i++){\n\t\t\t\tlots.add(i+1);//???????????????????????????????????????????????? ex) ???????????°??????1??????????????????[1], 2??????????????????[2]...\n\t\t\t}\n\t\t\t\n\t\t\tfor(int j=1; j<horizontalLine+1; j++){\n\t\t\t\tString line = br.readLine();\n\t\t\t\tString[] dataSet = line.split(\",\");\n\t\t\t\t\n\t\t\t\tlots = swap(lots, Integer.parseInt(dataSet[0]), Integer.parseInt(dataSet[1]));\n\t\t\t}\n\t\t\t\n\t\t\tfor(int k=0; k<lots.size(); k++){\n\t\t\t\tSystem.out.println(lots.get(k));\n\t\t\t}\n\t\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int verticalLine = Integer.parseInt(br.readLine());",
"verticalLine",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int horizontalLine = Integer.parseInt(br.readLine());",
"horizontalLine",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"List<Integer> lots = new ArrayList<>();",
"lots",
"new ArrayList<>()",
"for(int i=0; i<verticalLine; i++){\n\t\t\t\tlots.add(i+1);//???????????????????????????????????????????????? ex) ???????????°??????1??????????????????[1], 2??????????????????[2]...\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<verticalLine",
"i",
"verticalLine",
"i++",
"i++",
"i",
"{\n\t\t\t\tlots.add(i+1);//???????????????????????????????????????????????? ex) ???????????°??????1??????????????????[1], 2??????????????????[2]...\n\t\t\t}",
"{\n\t\t\t\tlots.add(i+1);//???????????????????????????????????????????????? ex) ???????????°??????1??????????????????[1], 2??????????????????[2]...\n\t\t\t}",
"lots.add(i+1)",
"lots.add",
"lots",
"i+1",
"i",
"1",
"for(int j=1; j<horizontalLine+1; j++){\n\t\t\t\tString line = br.readLine();\n\t\t\t\tString[] dataSet = line.split(\",\");\n\t\t\t\t\n\t\t\t\tlots = swap(lots, Integer.parseInt(dataSet[0]), Integer.parseInt(dataSet[1]));\n\t\t\t}",
"int j=1;",
"int j=1;",
"j",
"1",
"j<horizontalLine+1",
"j",
"horizontalLine+1",
"horizontalLine",
"1",
"j++",
"j++",
"j",
"{\n\t\t\t\tString line = br.readLine();\n\t\t\t\tString[] dataSet = line.split(\",\");\n\t\t\t\t\n\t\t\t\tlots = swap(lots, Integer.parseInt(dataSet[0]), Integer.parseInt(dataSet[1]));\n\t\t\t}",
"{\n\t\t\t\tString line = br.readLine();\n\t\t\t\tString[] dataSet = line.split(\",\");\n\t\t\t\t\n\t\t\t\tlots = swap(lots, Integer.parseInt(dataSet[0]), Integer.parseInt(dataSet[1]));\n\t\t\t}",
"String line = br.readLine();",
"line",
"br.readLine()",
"br.readLine",
"br",
"String[] dataSet = line.split(\",\");",
"dataSet",
"line.split(\",\")",
"line.split",
"line",
"\",\"",
"lots = swap(lots, Integer.parseInt(dataSet[0]), Integer.parseInt(dataSet[1]))",
"lots",
"swap(lots, Integer.parseInt(dataSet[0]), Integer.parseInt(dataSet[1]))",
"swap",
"lots",
"Integer.parseInt(dataSet[0])",
"Integer.parseInt",
"Integer",
"dataSet[0]",
"dataSet",
"0",
"Integer.parseInt(dataSet[1])",
"Integer.parseInt",
"Integer",
"dataSet[1]",
"dataSet",
"1",
"for(int k=0; k<lots.size(); k++){\n\t\t\t\tSystem.out.println(lots.get(k));\n\t\t\t}",
"int k=0;",
"int k=0;",
"k",
"0",
"k<lots.size()",
"k",
"lots.size()",
"lots.size",
"lots",
"k++",
"k++",
"k",
"{\n\t\t\t\tSystem.out.println(lots.get(k));\n\t\t\t}",
"{\n\t\t\t\tSystem.out.println(lots.get(k));\n\t\t\t}",
"System.out.println(lots.get(k))",
"System.out.println",
"System.out",
"System",
"System.out",
"lots.get(k)",
"lots.get",
"lots",
"k",
"String[] args",
"args",
"/*\n\t * ???????????\\????????????????????????\n\t * @param ??????????????????????´???????????????????\n\t * @param ??\\????????????????????????????????????\n\t * @param ??\\????????????????????????????????????\n\t *\n\t */\n\tprivate static List<Integer> swap(List<Integer> lots, int index1, int index2) {\n\t\tint tmp = lots.get(index1-1);\n\t\tlots.set(index1-1, lots.get(index2-1));\n\t lots.set(index2-1, tmp);\n\t return lots;\n\t}",
"swap",
"{\n\t\tint tmp = lots.get(index1-1);\n\t\tlots.set(index1-1, lots.get(index2-1));\n\t lots.set(index2-1, tmp);\n\t return lots;\n\t}",
"int tmp = lots.get(index1-1);",
"tmp",
"lots.get(index1-1)",
"lots.get",
"lots",
"index1-1",
"index1",
"1",
"lots.set(index1-1, lots.get(index2-1))",
"lots.set",
"lots",
"index1-1",
"index1",
"1",
"lots.get(index2-1)",
"lots.get",
"lots",
"index2-1",
"index2",
"1",
"lots.set(index2-1, tmp)",
"lots.set",
"lots",
"index2-1",
"index2",
"1",
"tmp",
"return lots;",
"lots",
"List<Integer> lots",
"lots",
"int index1",
"index1",
"int index2",
"index2"
] |
import java.io.*;
import java.util.ArrayList;
import java.util.List;
class Main {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int verticalLine = Integer.parseInt(br.readLine());//???????????¬??°
int horizontalLine = Integer.parseInt(br.readLine());//?¨?????????°
List<Integer> lots = new ArrayList<>();//?????????????´????????????????
for(int i=0; i<verticalLine; i++){
lots.add(i+1);//???????????????????????????????????????????????? ex) ???????????°??????1??????????????????[1], 2??????????????????[2]...
}
for(int j=1; j<horizontalLine+1; j++){
String line = br.readLine();
String[] dataSet = line.split(",");
lots = swap(lots, Integer.parseInt(dataSet[0]), Integer.parseInt(dataSet[1]));
}
for(int k=0; k<lots.size(); k++){
System.out.println(lots.get(k));
}
} catch (Exception e) {
e.printStackTrace();
}
}
/*
* ???????????\????????????????????????
* @param ??????????????????????´???????????????????
* @param ??\????????????????????????????????????
* @param ??\????????????????????????????????????
*
*/
private static List<Integer> swap(List<Integer> lots, int index1, int index2) {
int tmp = lots.get(index1-1);
lots.set(index1-1, lots.get(index2-1));
lots.set(index2-1, tmp);
return lots;
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
38,
5,
13,
30,
4,
18,
18,
13,
13,
17,
30,
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,
0,
18,
13,
13,
2,
13,
17,
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,
0,
18,
13,
2,
13,
17,
2,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
2,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
2,
18,
13,
2,
13,
17,
18,
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
],
[
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
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
22,
27
],
[
18,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
31,
34
],
[
34,
35
],
[
35,
36
],
[
28,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
39,
42
],
[
42,
43
],
[
43,
44
],
[
28,
45
],
[
45,
46
],
[
45,
47
],
[
28,
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
],
[
28,
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
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
89,
90
],
[
90,
91
],
[
80,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
97,
98
],
[
98,
99
],
[
80,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
103,
105
],
[
100,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
109,
111
],
[
106,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
114,
116
],
[
80,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
120,
122
],
[
117,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
126,
128
],
[
123,
129
],
[
129,
130
],
[
129,
131
],
[
131,
132
],
[
131,
133
],
[
80,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
137,
139
],
[
134,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
143,
145
],
[
140,
146
],
[
146,
147
],
[
146,
148
],
[
148,
149
],
[
148,
150
],
[
28,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
153,
155
],
[
151,
156
],
[
156,
157
],
[
156,
158
],
[
151,
159
],
[
159,
160
],
[
160,
161
],
[
151,
162
],
[
162,
163
],
[
163,
164
],
[
164,
165
],
[
165,
166
],
[
165,
167
],
[
163,
168
],
[
168,
169
],
[
168,
170
],
[
9,
171
],
[
171,
172
]
] | [
"import java.io.*;\nimport java.util.StringTokenizer;\n\nclass Main {\n\tpublic static void main(String args[]) {\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(isr);\n\n\t\ttry {\n\t\t\tint w = Integer.parseInt(br.readLine());\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tint amida[] = new int[w];\n\t\t\tfor (int i=0;i<w;i++) amida[i] = i+1;\n\t\t\tfor (int i=0;i<n;i++) {\n\t\t\t\tStringTokenizer st = new StringTokenizer(br.readLine(),\",\");\n\t\t\t\tint a = Integer.parseInt(st.nextToken());\n\t\t\t\tint b = Integer.parseInt(st.nextToken());\n\t\t\t\tamida[a-1] = amida[a-1]^amida[b-1];\n\t\t\t\tamida[b-1] = amida[a-1]^amida[b-1];\n\t\t\t\tamida[a-1] = amida[a-1]^amida[b-1];\n\t\t\t}\n\t\t\tfor (int i=0;i<w;i++) System.out.println(amida[i]);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Exception!\");\n\t\t}\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"class Main {\n\tpublic static void main(String args[]) {\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(isr);\n\n\t\ttry {\n\t\t\tint w = Integer.parseInt(br.readLine());\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tint amida[] = new int[w];\n\t\t\tfor (int i=0;i<w;i++) amida[i] = i+1;\n\t\t\tfor (int i=0;i<n;i++) {\n\t\t\t\tStringTokenizer st = new StringTokenizer(br.readLine(),\",\");\n\t\t\t\tint a = Integer.parseInt(st.nextToken());\n\t\t\t\tint b = Integer.parseInt(st.nextToken());\n\t\t\t\tamida[a-1] = amida[a-1]^amida[b-1];\n\t\t\t\tamida[b-1] = amida[a-1]^amida[b-1];\n\t\t\t\tamida[a-1] = amida[a-1]^amida[b-1];\n\t\t\t}\n\t\t\tfor (int i=0;i<w;i++) System.out.println(amida[i]);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Exception!\");\n\t\t}\n\t}\n}",
"Main",
"public static void main(String args[]) {\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(isr);\n\n\t\ttry {\n\t\t\tint w = Integer.parseInt(br.readLine());\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tint amida[] = new int[w];\n\t\t\tfor (int i=0;i<w;i++) amida[i] = i+1;\n\t\t\tfor (int i=0;i<n;i++) {\n\t\t\t\tStringTokenizer st = new StringTokenizer(br.readLine(),\",\");\n\t\t\t\tint a = Integer.parseInt(st.nextToken());\n\t\t\t\tint b = Integer.parseInt(st.nextToken());\n\t\t\t\tamida[a-1] = amida[a-1]^amida[b-1];\n\t\t\t\tamida[b-1] = amida[a-1]^amida[b-1];\n\t\t\t\tamida[a-1] = amida[a-1]^amida[b-1];\n\t\t\t}\n\t\t\tfor (int i=0;i<w;i++) System.out.println(amida[i]);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Exception!\");\n\t\t}\n\t}",
"main",
"{\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(isr);\n\n\t\ttry {\n\t\t\tint w = Integer.parseInt(br.readLine());\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tint amida[] = new int[w];\n\t\t\tfor (int i=0;i<w;i++) amida[i] = i+1;\n\t\t\tfor (int i=0;i<n;i++) {\n\t\t\t\tStringTokenizer st = new StringTokenizer(br.readLine(),\",\");\n\t\t\t\tint a = Integer.parseInt(st.nextToken());\n\t\t\t\tint b = Integer.parseInt(st.nextToken());\n\t\t\t\tamida[a-1] = amida[a-1]^amida[b-1];\n\t\t\t\tamida[b-1] = amida[a-1]^amida[b-1];\n\t\t\t\tamida[a-1] = amida[a-1]^amida[b-1];\n\t\t\t}\n\t\t\tfor (int i=0;i<w;i++) System.out.println(amida[i]);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Exception!\");\n\t\t}\n\t}",
"InputStreamReader isr = new InputStreamReader(System.in);",
"isr",
"new InputStreamReader(System.in)",
"BufferedReader br = new BufferedReader(isr);",
"br",
"new BufferedReader(isr)",
"try {\n\t\t\tint w = Integer.parseInt(br.readLine());\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tint amida[] = new int[w];\n\t\t\tfor (int i=0;i<w;i++) amida[i] = i+1;\n\t\t\tfor (int i=0;i<n;i++) {\n\t\t\t\tStringTokenizer st = new StringTokenizer(br.readLine(),\",\");\n\t\t\t\tint a = Integer.parseInt(st.nextToken());\n\t\t\t\tint b = Integer.parseInt(st.nextToken());\n\t\t\t\tamida[a-1] = amida[a-1]^amida[b-1];\n\t\t\t\tamida[b-1] = amida[a-1]^amida[b-1];\n\t\t\t\tamida[a-1] = amida[a-1]^amida[b-1];\n\t\t\t}\n\t\t\tfor (int i=0;i<w;i++) System.out.println(amida[i]);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Exception!\");\n\t\t}",
"catch (Exception e) {\n\t\t\tSystem.out.println(\"Exception!\");\n\t\t}",
"Exception e",
"{\n\t\t\tSystem.out.println(\"Exception!\");\n\t\t}",
"System.out.println(\"Exception!\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Exception!\"",
"{\n\t\t\tint w = Integer.parseInt(br.readLine());\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tint amida[] = new int[w];\n\t\t\tfor (int i=0;i<w;i++) amida[i] = i+1;\n\t\t\tfor (int i=0;i<n;i++) {\n\t\t\t\tStringTokenizer st = new StringTokenizer(br.readLine(),\",\");\n\t\t\t\tint a = Integer.parseInt(st.nextToken());\n\t\t\t\tint b = Integer.parseInt(st.nextToken());\n\t\t\t\tamida[a-1] = amida[a-1]^amida[b-1];\n\t\t\t\tamida[b-1] = amida[a-1]^amida[b-1];\n\t\t\t\tamida[a-1] = amida[a-1]^amida[b-1];\n\t\t\t}\n\t\t\tfor (int i=0;i<w;i++) System.out.println(amida[i]);\n\t\t}",
"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 amida[] = new int[w];",
"amida",
"new int[w]",
"w",
"for (int i=0;i<w;i++) amida[i] = i+1;",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"amida[i] = i+1;",
"amida[i] = i+1",
"amida[i]",
"amida",
"i",
"i+1",
"i",
"1",
"for (int i=0;i<n;i++) {\n\t\t\t\tStringTokenizer st = new StringTokenizer(br.readLine(),\",\");\n\t\t\t\tint a = Integer.parseInt(st.nextToken());\n\t\t\t\tint b = Integer.parseInt(st.nextToken());\n\t\t\t\tamida[a-1] = amida[a-1]^amida[b-1];\n\t\t\t\tamida[b-1] = amida[a-1]^amida[b-1];\n\t\t\t\tamida[a-1] = amida[a-1]^amida[b-1];\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\tStringTokenizer st = new StringTokenizer(br.readLine(),\",\");\n\t\t\t\tint a = Integer.parseInt(st.nextToken());\n\t\t\t\tint b = Integer.parseInt(st.nextToken());\n\t\t\t\tamida[a-1] = amida[a-1]^amida[b-1];\n\t\t\t\tamida[b-1] = amida[a-1]^amida[b-1];\n\t\t\t\tamida[a-1] = amida[a-1]^amida[b-1];\n\t\t\t}",
"{\n\t\t\t\tStringTokenizer st = new StringTokenizer(br.readLine(),\",\");\n\t\t\t\tint a = Integer.parseInt(st.nextToken());\n\t\t\t\tint b = Integer.parseInt(st.nextToken());\n\t\t\t\tamida[a-1] = amida[a-1]^amida[b-1];\n\t\t\t\tamida[b-1] = amida[a-1]^amida[b-1];\n\t\t\t\tamida[a-1] = amida[a-1]^amida[b-1];\n\t\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",
"amida[a-1] = amida[a-1]^amida[b-1]",
"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] = amida[a-1]^amida[b-1]",
"amida[b-1]",
"amida",
"b-1",
"b",
"1",
"amida[a-1]^amida[b-1]",
"amida[a-1]",
"amida",
"a-1",
"a",
"1",
"amida[b-1]",
"amida",
"b-1",
"b",
"1",
"amida[a-1] = amida[a-1]^amida[b-1]",
"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",
"for (int i=0;i<w;i++) System.out.println(amida[i]);",
"int i=0;",
"int i=0;",
"i",
"0",
"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"
] | import java.io.*;
import java.util.StringTokenizer;
class Main {
public static void main(String args[]) {
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
try {
int w = Integer.parseInt(br.readLine());
int n = Integer.parseInt(br.readLine());
int amida[] = new int[w];
for (int i=0;i<w;i++) amida[i] = i+1;
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());
amida[a-1] = amida[a-1]^amida[b-1];
amida[b-1] = amida[a-1]^amida[b-1];
amida[a-1] = amida[a-1]^amida[b-1];
}
for (int i=0;i<w;i++) System.out.println(amida[i]);
} catch (Exception e) {
System.out.println("Exception!");
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
17,
41,
13,
4,
18,
13,
41,
13,
4,
18,
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,
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
],
[
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
],
[
11,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
11,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
11,
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
],
[
41,
45
],
[
45,
46
],
[
45,
47
],
[
11,
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
],
[
65,
66
],
[
66,
67
],
[
63,
68
],
[
60,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
75,
76
],
[
75,
77
],
[
71,
78
],
[
60,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
85,
86
],
[
85,
87
],
[
81,
88
],
[
60,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
91,
93
],
[
60,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
98,
99
],
[
98,
100
],
[
60,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
11,
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
],
[
9,
127
],
[
127,
128
],
[
0,
129
],
[
129,
130
],
[
129,
131
]
] | [
"import java.io.*;\nimport java.util.*;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int[] set = new int[30];\n \n int w = sc.nextInt();\n int n = sc.nextInt();\n \n for (int i=0;i<w;i++) set[i] = i+1;\n for (int i=0;i<n;i++) {\n String[] str = sc.next().split(\",\");\n int a = Integer.parseInt(str[0]) - 1;\n int b = Integer.parseInt(str[1]) - 1;\n int temp = set[a];\n set[a] = set[b];\n set[b] = temp;\n }\n for (int i=0;i<w;i++) {\n System.out.println(set[i]);\n }\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int[] set = new int[30];\n \n int w = sc.nextInt();\n int n = sc.nextInt();\n \n for (int i=0;i<w;i++) set[i] = i+1;\n for (int i=0;i<n;i++) {\n String[] str = sc.next().split(\",\");\n int a = Integer.parseInt(str[0]) - 1;\n int b = Integer.parseInt(str[1]) - 1;\n int temp = set[a];\n set[a] = set[b];\n set[b] = temp;\n }\n for (int i=0;i<w;i++) {\n System.out.println(set[i]);\n }\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int[] set = new int[30];\n \n int w = sc.nextInt();\n int n = sc.nextInt();\n \n for (int i=0;i<w;i++) set[i] = i+1;\n for (int i=0;i<n;i++) {\n String[] str = sc.next().split(\",\");\n int a = Integer.parseInt(str[0]) - 1;\n int b = Integer.parseInt(str[1]) - 1;\n int temp = set[a];\n set[a] = set[b];\n set[b] = temp;\n }\n for (int i=0;i<w;i++) {\n System.out.println(set[i]);\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int[] set = new int[30];\n \n int w = sc.nextInt();\n int n = sc.nextInt();\n \n for (int i=0;i<w;i++) set[i] = i+1;\n for (int i=0;i<n;i++) {\n String[] str = sc.next().split(\",\");\n int a = Integer.parseInt(str[0]) - 1;\n int b = Integer.parseInt(str[1]) - 1;\n int temp = set[a];\n set[a] = set[b];\n set[b] = temp;\n }\n for (int i=0;i<w;i++) {\n System.out.println(set[i]);\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int[] set = new int[30];",
"set",
"new int[30]",
"30",
"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++) set[i] = i+1;",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"set[i] = i+1;",
"set[i] = i+1",
"set[i]",
"set",
"i",
"i+1",
"i",
"1",
"for (int i=0;i<n;i++) {\n String[] str = sc.next().split(\",\");\n int a = Integer.parseInt(str[0]) - 1;\n int b = Integer.parseInt(str[1]) - 1;\n int temp = set[a];\n set[a] = set[b];\n set[b] = temp;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String[] str = sc.next().split(\",\");\n int a = Integer.parseInt(str[0]) - 1;\n int b = Integer.parseInt(str[1]) - 1;\n int temp = set[a];\n set[a] = set[b];\n set[b] = temp;\n }",
"{\n String[] str = sc.next().split(\",\");\n int a = Integer.parseInt(str[0]) - 1;\n int b = Integer.parseInt(str[1]) - 1;\n int temp = set[a];\n set[a] = set[b];\n set[b] = temp;\n }",
"String[] str = sc.next().split(\",\");",
"str",
"sc.next().split(\",\")",
"sc.next().split",
"sc.next()",
"sc.next",
"sc",
"\",\"",
"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 temp = set[a];",
"temp",
"set[a]",
"set",
"a",
"set[a] = set[b]",
"set[a]",
"set",
"a",
"set[b]",
"set",
"b",
"set[b] = temp",
"set[b]",
"set",
"b",
"temp",
"for (int i=0;i<w;i++) {\n System.out.println(set[i]);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<w",
"i",
"w",
"i++",
"i++",
"i",
"{\n System.out.println(set[i]);\n }",
"{\n System.out.println(set[i]);\n }",
"System.out.println(set[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"set[i]",
"set",
"i",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int[] set = new int[30];\n \n int w = sc.nextInt();\n int n = sc.nextInt();\n \n for (int i=0;i<w;i++) set[i] = i+1;\n for (int i=0;i<n;i++) {\n String[] str = sc.next().split(\",\");\n int a = Integer.parseInt(str[0]) - 1;\n int b = Integer.parseInt(str[1]) - 1;\n int temp = set[a];\n set[a] = set[b];\n set[b] = temp;\n }\n for (int i=0;i<w;i++) {\n System.out.println(set[i]);\n }\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int[] set = new int[30];\n \n int w = sc.nextInt();\n int n = sc.nextInt();\n \n for (int i=0;i<w;i++) set[i] = i+1;\n for (int i=0;i<n;i++) {\n String[] str = sc.next().split(\",\");\n int a = Integer.parseInt(str[0]) - 1;\n int b = Integer.parseInt(str[1]) - 1;\n int temp = set[a];\n set[a] = set[b];\n set[b] = temp;\n }\n for (int i=0;i<w;i++) {\n System.out.println(set[i]);\n }\n }\n}",
"Main"
] | import java.io.*;
import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int[] set = new int[30];
int w = sc.nextInt();
int n = sc.nextInt();
for (int i=0;i<w;i++) set[i] = i+1;
for (int i=0;i<n;i++) {
String[] str = sc.next().split(",");
int a = Integer.parseInt(str[0]) - 1;
int b = Integer.parseInt(str[1]) - 1;
int temp = set[a];
set[a] = set[b];
set[b] = temp;
}
for (int i=0;i<w;i++) {
System.out.println(set[i]);
}
}
} |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.