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, 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, 41, 13, 4, 18, 13, 4, 18, 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, 41, 13, 4, 18, 13, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 2, 13, 17, 2, 13, 17, 41, 13, 20, 41, 13, 4, 18, 13, 28, 13, 13, 30, 30, 4, 18, 13, 4, 18, 13, 17, 13, 4, 18, 18, 13, 13, 13, 23, 13, 6, 13, 41, 13, 12, 13, 30, 0, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 13, 23, 13, 12, 13, 30, 41, 13, 4, 18, 13, 13, 4, 18, 13, 13, 4, 18, 13, 13, 4, 18, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 29, 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 ], [ 185, 20 ], [ 185, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 23, 27 ], [ 27, 28 ], [ 27, 29 ], [ 23, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 33, 34 ], [ 32, 35 ], [ 35, 36 ], [ 36, 37 ], [ 23, 38 ], [ 38, 39 ], [ 38, 40 ], [ 23, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 44, 45 ], [ 43, 46 ], [ 46, 47 ], [ 47, 48 ], [ 23, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 49, 54 ], [ 54, 55 ], [ 54, 56 ], [ 49, 57 ], [ 57, 58 ], [ 58, 59 ], [ 49, 60 ], [ 61, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 65, 66 ], [ 61, 67 ], [ 67, 68 ], [ 67, 69 ], [ 61, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 73, 74 ], [ 72, 75 ], [ 75, 76 ], [ 76, 77 ], [ 61, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 81, 82 ], [ 80, 83 ], [ 83, 84 ], [ 84, 85 ], [ 61, 86 ], [ 86, 87 ], [ 87, 88 ], [ 86, 89 ], [ 89, 90 ], [ 89, 91 ], [ 86, 92 ], [ 92, 93 ], [ 92, 94 ], [ 23, 95 ], [ 95, 96 ], [ 95, 97 ], [ 23, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 101, 102 ], [ 23, 103 ], [ 103, 104 ], [ 103, 105 ], [ 103, 106 ], [ 107, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 108, 111 ], [ 111, 112 ], [ 112, 113 ], [ 111, 114 ], [ 111, 115 ], [ 23, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 118, 120 ], [ 116, 121 ], [ 21, 122 ], [ 122, 123 ], [ 0, 124 ], [ 124, 125 ], [ 124, 126 ], [ 126, 127 ], [ 124, 128 ], [ 128, 129 ], [ 128, 130 ], [ 130, 131 ], [ 131, 132 ], [ 131, 133 ], [ 130, 134 ], [ 134, 135 ], [ 135, 136 ], [ 136, 137 ], [ 136, 138 ], [ 134, 139 ], [ 139, 140 ], [ 139, 141 ], [ 134, 142 ], [ 142, 143 ], [ 143, 144 ], [ 134, 145 ], [ 146, 146 ], [ 146, 147 ], [ 147, 148 ], [ 148, 149 ], [ 147, 150 ], [ 128, 151 ], [ 151, 152 ], [ 124, 153 ], [ 153, 154 ], [ 153, 155 ], [ 155, 156 ], [ 156, 157 ], [ 156, 158 ], [ 158, 159 ], [ 159, 160 ], [ 158, 161 ], [ 155, 162 ], [ 162, 163 ], [ 163, 164 ], [ 162, 165 ], [ 162, 166 ], [ 166, 167 ], [ 167, 168 ], [ 166, 169 ], [ 155, 170 ], [ 170, 171 ], [ 171, 172 ], [ 170, 173 ], [ 170, 174 ], [ 153, 175 ], [ 175, 176 ], [ 153, 177 ], [ 177, 178 ], [ 124, 179 ], [ 179, 180 ], [ 179, 181 ], [ 181, 182 ], [ 182, 183 ], [ 0, 184 ], [ 184, 185 ], [ 184, 186 ] ]
[ "import java.io.InputStreamReader;\nimport java.io.BufferedReader;\nimport java.util.StringTokenizer;\nimport java.io.IOException;\nimport java.util.List;\nimport java.util.ArrayList;\n\npublic class Main {\n\n public static void main(String[] args) throws IOException {\n InputStreamReader inputReader = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(inputReader);\n\n final int column = Integer.parseInt(reader.readLine());\n NumberList list = new NumberList(column);\n\n final int row = Integer.parseInt(reader.readLine());\n for (int i = 0; i < row; i++) {\n final String line = reader.readLine();\n final StringTokenizer tokenizer = new StringTokenizer(line, \",\");\n\n final int a = Integer.parseInt(tokenizer.nextToken());\n final int b = Integer.parseInt(tokenizer.nextToken());\n\n list.swap(a - 1, b - 1);\n }\n\n StringBuilder builder = new StringBuilder();\n List<Integer> resultList = list.getList();\n for (int value : resultList) {\n builder.append(String.format(\"%d\\n\", value));\n }\n System.out.print(builder);\n }\n\n}\n\nclass NumberList {\n\n private List<Integer> list;\n\n public NumberList(int size) {\n list = new ArrayList<>();\n for (int i = 1; i <= size; i++) {\n list.add(i);\n }\n }\n\n public void swap(int index1, int index2) {\n int tmp = list.get(index1);\n list.set(index1, list.get(index2));\n list.set(index2, tmp);\n }\n\n public List<Integer> getList() {\n return list;\n }\n\n}", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.util.StringTokenizer;", "StringTokenizer", "java.util", "import java.io.IOException;", "IOException", "java.io", "import java.util.List;", "List", "java.util", "import java.util.ArrayList;", "ArrayList", "java.util", "public class Main {\n\n public static void main(String[] args) throws IOException {\n InputStreamReader inputReader = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(inputReader);\n\n final int column = Integer.parseInt(reader.readLine());\n NumberList list = new NumberList(column);\n\n final int row = Integer.parseInt(reader.readLine());\n for (int i = 0; i < row; i++) {\n final String line = reader.readLine();\n final StringTokenizer tokenizer = new StringTokenizer(line, \",\");\n\n final int a = Integer.parseInt(tokenizer.nextToken());\n final int b = Integer.parseInt(tokenizer.nextToken());\n\n list.swap(a - 1, b - 1);\n }\n\n StringBuilder builder = new StringBuilder();\n List<Integer> resultList = list.getList();\n for (int value : resultList) {\n builder.append(String.format(\"%d\\n\", value));\n }\n System.out.print(builder);\n }\n\n}", "Main", "public static void main(String[] args) throws IOException {\n InputStreamReader inputReader = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(inputReader);\n\n final int column = Integer.parseInt(reader.readLine());\n NumberList list = new NumberList(column);\n\n final int row = Integer.parseInt(reader.readLine());\n for (int i = 0; i < row; i++) {\n final String line = reader.readLine();\n final StringTokenizer tokenizer = new StringTokenizer(line, \",\");\n\n final int a = Integer.parseInt(tokenizer.nextToken());\n final int b = Integer.parseInt(tokenizer.nextToken());\n\n list.swap(a - 1, b - 1);\n }\n\n StringBuilder builder = new StringBuilder();\n List<Integer> resultList = list.getList();\n for (int value : resultList) {\n builder.append(String.format(\"%d\\n\", value));\n }\n System.out.print(builder);\n }", "main", "{\n InputStreamReader inputReader = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(inputReader);\n\n final int column = Integer.parseInt(reader.readLine());\n NumberList list = new NumberList(column);\n\n final int row = Integer.parseInt(reader.readLine());\n for (int i = 0; i < row; i++) {\n final String line = reader.readLine();\n final StringTokenizer tokenizer = new StringTokenizer(line, \",\");\n\n final int a = Integer.parseInt(tokenizer.nextToken());\n final int b = Integer.parseInt(tokenizer.nextToken());\n\n list.swap(a - 1, b - 1);\n }\n\n StringBuilder builder = new StringBuilder();\n List<Integer> resultList = list.getList();\n for (int value : resultList) {\n builder.append(String.format(\"%d\\n\", value));\n }\n System.out.print(builder);\n }", "InputStreamReader inputReader = new InputStreamReader(System.in);", "inputReader", "new InputStreamReader(System.in)", "BufferedReader reader = new BufferedReader(inputReader);", "reader", "new BufferedReader(inputReader)", "final int column = Integer.parseInt(reader.readLine());", "column", "Integer.parseInt(reader.readLine())", "Integer.parseInt", "Integer", "reader.readLine()", "reader.readLine", "reader", "NumberList list = new NumberList(column);", "list", "new NumberList(column)", "final int row = Integer.parseInt(reader.readLine());", "row", "Integer.parseInt(reader.readLine())", "Integer.parseInt", "Integer", "reader.readLine()", "reader.readLine", "reader", "for (int i = 0; i < row; i++) {\n final String line = reader.readLine();\n final StringTokenizer tokenizer = new StringTokenizer(line, \",\");\n\n final int a = Integer.parseInt(tokenizer.nextToken());\n final int b = Integer.parseInt(tokenizer.nextToken());\n\n list.swap(a - 1, b - 1);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < row", "i", "row", "i++", "i++", "i", "{\n final String line = reader.readLine();\n final StringTokenizer tokenizer = new StringTokenizer(line, \",\");\n\n final int a = Integer.parseInt(tokenizer.nextToken());\n final int b = Integer.parseInt(tokenizer.nextToken());\n\n list.swap(a - 1, b - 1);\n }", "{\n final String line = reader.readLine();\n final StringTokenizer tokenizer = new StringTokenizer(line, \",\");\n\n final int a = Integer.parseInt(tokenizer.nextToken());\n final int b = Integer.parseInt(tokenizer.nextToken());\n\n list.swap(a - 1, b - 1);\n }", "final String line = reader.readLine();", "line", "reader.readLine()", "reader.readLine", "reader", "final StringTokenizer tokenizer = new StringTokenizer(line, \",\");", "tokenizer", "new StringTokenizer(line, \",\")", "final int a = Integer.parseInt(tokenizer.nextToken());", "a", "Integer.parseInt(tokenizer.nextToken())", "Integer.parseInt", "Integer", "tokenizer.nextToken()", "tokenizer.nextToken", "tokenizer", "final int b = Integer.parseInt(tokenizer.nextToken());", "b", "Integer.parseInt(tokenizer.nextToken())", "Integer.parseInt", "Integer", "tokenizer.nextToken()", "tokenizer.nextToken", "tokenizer", "list.swap(a - 1, b - 1)", "list.swap", "list", "a - 1", "a", "1", "b - 1", "b", "1", "StringBuilder builder = new StringBuilder();", "builder", "new StringBuilder()", "List<Integer> resultList = list.getList();", "resultList", "list.getList()", "list.getList", "list", "for (int value : resultList) {\n builder.append(String.format(\"%d\\n\", value));\n }", "int value", "resultList", "{\n builder.append(String.format(\"%d\\n\", value));\n }", "{\n builder.append(String.format(\"%d\\n\", value));\n }", "builder.append(String.format(\"%d\\n\", value))", "builder.append", "builder", "String.format(\"%d\\n\", value)", "String.format", "String", "\"%d\\n\"", "value", "System.out.print(builder)", "System.out.print", "System.out", "System", "System.out", "builder", "String[] args", "args", "class NumberList {\n\n private List<Integer> list;\n\n public NumberList(int size) {\n list = new ArrayList<>();\n for (int i = 1; i <= size; i++) {\n list.add(i);\n }\n }\n\n public void swap(int index1, int index2) {\n int tmp = list.get(index1);\n list.set(index1, list.get(index2));\n list.set(index2, tmp);\n }\n\n public List<Integer> getList() {\n return list;\n }\n\n}", "NumberList", "private List<Integer> list;", "list", "public NumberList(int size) {\n list = new ArrayList<>();\n for (int i = 1; i <= size; i++) {\n list.add(i);\n }\n }", "NumberList", "{\n list = new ArrayList<>();\n for (int i = 1; i <= size; i++) {\n list.add(i);\n }\n }", "list = new ArrayList<>()", "list", "new ArrayList<>()", "for (int i = 1; i <= size; i++) {\n list.add(i);\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= size", "i", "size", "i++", "i++", "i", "{\n list.add(i);\n }", "{\n list.add(i);\n }", "list.add(i)", "list.add", "list", "i", "int size", "size", "public void swap(int index1, int index2) {\n int tmp = list.get(index1);\n list.set(index1, list.get(index2));\n list.set(index2, tmp);\n }", "swap", "{\n int tmp = list.get(index1);\n list.set(index1, list.get(index2));\n list.set(index2, tmp);\n }", "int tmp = list.get(index1);", "tmp", "list.get(index1)", "list.get", "list", "index1", "list.set(index1, list.get(index2))", "list.set", "list", "index1", "list.get(index2)", "list.get", "list", "index2", "list.set(index2, tmp)", "list.set", "list", "index2", "tmp", "int index1", "index1", "int index2", "index2", "public List<Integer> getList() {\n return list;\n }", "getList", "{\n return list;\n }", "return list;", "list", "public class Main {\n\n public static void main(String[] args) throws IOException {\n InputStreamReader inputReader = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(inputReader);\n\n final int column = Integer.parseInt(reader.readLine());\n NumberList list = new NumberList(column);\n\n final int row = Integer.parseInt(reader.readLine());\n for (int i = 0; i < row; i++) {\n final String line = reader.readLine();\n final StringTokenizer tokenizer = new StringTokenizer(line, \",\");\n\n final int a = Integer.parseInt(tokenizer.nextToken());\n final int b = Integer.parseInt(tokenizer.nextToken());\n\n list.swap(a - 1, b - 1);\n }\n\n StringBuilder builder = new StringBuilder();\n List<Integer> resultList = list.getList();\n for (int value : resultList) {\n builder.append(String.format(\"%d\\n\", value));\n }\n System.out.print(builder);\n }\n\n}", "public class Main {\n\n public static void main(String[] args) throws IOException {\n InputStreamReader inputReader = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(inputReader);\n\n final int column = Integer.parseInt(reader.readLine());\n NumberList list = new NumberList(column);\n\n final int row = Integer.parseInt(reader.readLine());\n for (int i = 0; i < row; i++) {\n final String line = reader.readLine();\n final StringTokenizer tokenizer = new StringTokenizer(line, \",\");\n\n final int a = Integer.parseInt(tokenizer.nextToken());\n final int b = Integer.parseInt(tokenizer.nextToken());\n\n list.swap(a - 1, b - 1);\n }\n\n StringBuilder builder = new StringBuilder();\n List<Integer> resultList = list.getList();\n for (int value : resultList) {\n builder.append(String.format(\"%d\\n\", value));\n }\n System.out.print(builder);\n }\n\n}", "Main" ]
import java.io.InputStreamReader; import java.io.BufferedReader; import java.util.StringTokenizer; import java.io.IOException; import java.util.List; import java.util.ArrayList; public class Main { public static void main(String[] args) throws IOException { InputStreamReader inputReader = new InputStreamReader(System.in); BufferedReader reader = new BufferedReader(inputReader); final int column = Integer.parseInt(reader.readLine()); NumberList list = new NumberList(column); final int row = Integer.parseInt(reader.readLine()); for (int i = 0; i < row; i++) { final String line = reader.readLine(); final StringTokenizer tokenizer = new StringTokenizer(line, ","); final int a = Integer.parseInt(tokenizer.nextToken()); final int b = Integer.parseInt(tokenizer.nextToken()); list.swap(a - 1, b - 1); } StringBuilder builder = new StringBuilder(); List<Integer> resultList = list.getList(); for (int value : resultList) { builder.append(String.format("%d\n", value)); } System.out.print(builder); } } class NumberList { private List<Integer> list; public NumberList(int size) { list = new ArrayList<>(); for (int i = 1; i <= size; i++) { list.add(i); } } public void swap(int index1, int index2) { int tmp = list.get(index1); list.set(index1, list.get(index2)); list.set(index2, tmp); } public List<Integer> getList() { return list; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 11, 1, 0, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 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, 41, 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 ], [ 147, 5 ], [ 147, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], [ 14, 15 ], [ 8, 16 ], [ 16, 17 ], [ 8, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 8, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 8, 30 ], [ 30, 31 ], [ 30, 32 ], [ 8, 34 ], [ 34, 35 ], [ 8, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 36, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 43, 45 ], [ 36, 46 ], [ 46, 47 ], [ 47, 48 ], [ 36, 49 ], [ 50, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 51, 55 ], [ 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 ], [ 71, 73 ], [ 73, 74 ], [ 74, 75 ], [ 70, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 78, 81 ], [ 70, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 85, 88 ], [ 88, 89 ], [ 88, 90 ], [ 84, 91 ], [ 70, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 95, 98 ], [ 98, 99 ], [ 98, 100 ], [ 94, 101 ], [ 70, 102 ], [ 102, 103 ], [ 70, 104 ], [ 104, 105 ], [ 104, 106 ], [ 106, 107 ], [ 106, 108 ], [ 70, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 109, 113 ], [ 113, 114 ], [ 113, 115 ], [ 70, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 116, 120 ], [ 8, 121 ], [ 121, 122 ], [ 8, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 123, 128 ], [ 128, 129 ], [ 128, 130 ], [ 123, 131 ], [ 131, 132 ], [ 132, 133 ], [ 123, 134 ], [ 135, 135 ], [ 135, 136 ], [ 136, 137 ], [ 137, 138 ], [ 138, 139 ], [ 138, 140 ], [ 136, 141 ], [ 141, 142 ], [ 141, 143 ], [ 6, 144 ], [ 144, 145 ], [ 0, 146 ], [ 146, 147 ], [ 146, 148 ] ]
[ "import java.util.Scanner;\npublic class Main{\n public static void main(String args[]){\n Scanner sc=new Scanner(System.in);\n int w,n,x,y;\n w=sc.nextInt();\n n=sc.nextInt();\n int[] values=new int[w];\n int i;\n for(i=0;i<values.length;i++){\n values[i]=i+1;\n }\n for(i=0;i<n;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 tmp;\n tmp=values[a];\n values[a]=values[b];\n values[b]=tmp;\n }\n int j;\n for(j=0;j<w;j++){\n System.out.println(values[j]);\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,n,x,y;\n w=sc.nextInt();\n n=sc.nextInt();\n int[] values=new int[w];\n int i;\n for(i=0;i<values.length;i++){\n values[i]=i+1;\n }\n for(i=0;i<n;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 tmp;\n tmp=values[a];\n values[a]=values[b];\n values[b]=tmp;\n }\n int j;\n for(j=0;j<w;j++){\n System.out.println(values[j]);\n }\n }\n}", "Main", "public static void main(String args[]){\n Scanner sc=new Scanner(System.in);\n int w,n,x,y;\n w=sc.nextInt();\n n=sc.nextInt();\n int[] values=new int[w];\n int i;\n for(i=0;i<values.length;i++){\n values[i]=i+1;\n }\n for(i=0;i<n;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 tmp;\n tmp=values[a];\n values[a]=values[b];\n values[b]=tmp;\n }\n int j;\n for(j=0;j<w;j++){\n System.out.println(values[j]);\n }\n }", "main", "{\n Scanner sc=new Scanner(System.in);\n int w,n,x,y;\n w=sc.nextInt();\n n=sc.nextInt();\n int[] values=new int[w];\n int i;\n for(i=0;i<values.length;i++){\n values[i]=i+1;\n }\n for(i=0;i<n;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 tmp;\n tmp=values[a];\n values[a]=values[b];\n values[b]=tmp;\n }\n int j;\n for(j=0;j<w;j++){\n System.out.println(values[j]);\n }\n }", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "int w", "w", "n", "n", "x", "x", "y;", "y", "w=sc.nextInt()", "w", "sc.nextInt()", "sc.nextInt", "sc", "n=sc.nextInt()", "n", "sc.nextInt()", "sc.nextInt", "sc", "int[] values=new int[w];", "values", "new int[w]", "w", "int i;", "i", "for(i=0;i<values.length;i++){\n values[i]=i+1;\n }", "i=0;", "i=0", "i", "0", "i<values.length", "i", "values.length", "values", "values.length", "i++", "i++", "i", "{\n values[i]=i+1;\n }", "{\n values[i]=i+1;\n }", "values[i]=i+1", "values[i]", "values", "i", "i+1", "i", "1", "for(i=0;i<n;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 tmp;\n tmp=values[a];\n values[a]=values[b];\n values[b]=tmp;\n }", "i=0;", "i=0", "i", "0", "i<n", "i", "n", "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 tmp;\n tmp=values[a];\n values[a]=values[b];\n values[b]=tmp;\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 tmp;\n tmp=values[a];\n values[a]=values[b];\n values[b]=tmp;\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 tmp;", "tmp", "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", "int j;", "j", "for(j=0;j<w;j++){\n System.out.println(values[j]);\n }", "j=0;", "j=0", "j", "0", "j<w", "j", "w", "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 public static void main(String args[]){\n Scanner sc=new Scanner(System.in);\n int w,n,x,y;\n w=sc.nextInt();\n n=sc.nextInt();\n int[] values=new int[w];\n int i;\n for(i=0;i<values.length;i++){\n values[i]=i+1;\n }\n for(i=0;i<n;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 tmp;\n tmp=values[a];\n values[a]=values[b];\n values[b]=tmp;\n }\n int j;\n for(j=0;j<w;j++){\n System.out.println(values[j]);\n }\n }\n}", "public class Main{\n public static void main(String args[]){\n Scanner sc=new Scanner(System.in);\n int w,n,x,y;\n w=sc.nextInt();\n n=sc.nextInt();\n int[] values=new int[w];\n int i;\n for(i=0;i<values.length;i++){\n values[i]=i+1;\n }\n for(i=0;i<n;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 tmp;\n tmp=values[a];\n values[a]=values[b];\n values[b]=tmp;\n }\n int j;\n for(j=0;j<w;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 w,n,x,y; w=sc.nextInt(); n=sc.nextInt(); int[] values=new int[w]; int i; for(i=0;i<values.length;i++){ values[i]=i+1; } for(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; tmp=values[a]; values[a]=values[b]; values[b]=tmp; } int j; for(j=0;j<w;j++){ System.out.println(values[j]); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 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, 0, 13, 20, 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, 4, 18, 13, 18, 13, 13, 17, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 150, 14 ], [ 150, 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 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 28, 31 ], [ 31, 32 ], [ 32, 33 ], [ 17, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 36, 39 ], [ 39, 40 ], [ 40, 41 ], [ 17, 42 ], [ 42, 43 ], [ 42, 44 ], [ 17, 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 ], [ 17, 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 ], [ 78, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 85, 88 ], [ 88, 89 ], [ 89, 90 ], [ 84, 91 ], [ 78, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 95, 98 ], [ 98, 99 ], [ 99, 100 ], [ 94, 101 ], [ 78, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 104, 106 ], [ 78, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 107, 111 ], [ 111, 112 ], [ 111, 113 ], [ 78, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 114, 118 ], [ 17, 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 ], [ 135, 136 ], [ 134, 137 ], [ 137, 138 ], [ 137, 139 ], [ 132, 140 ], [ 17, 141 ], [ 141, 142 ], [ 142, 143 ], [ 143, 144 ], [ 143, 145 ], [ 141, 146 ], [ 15, 147 ], [ 147, 148 ], [ 0, 149 ], [ 149, 150 ], [ 149, 151 ] ]
[ "\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException,\n\t\t\tIOException {\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\t\tStringBuilder builder = new StringBuilder();\n\t\tStringTokenizer tokenizer;\n\t\tint a = Integer.parseInt(reader.readLine());\n\t\tint n = Integer.parseInt(reader.readLine());\n\t\tint[] nums = new int[a];\n\t\tfor (int i = 0; i < a; i++) {\n\t\t\tnums[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ttokenizer = new StringTokenizer(reader.readLine(), \",\");\n\t\t\tint x = Integer.parseInt(tokenizer.nextToken()) - 1;\n\t\t\tint y = Integer.parseInt(tokenizer.nextToken()) - 1;\n\t\t\tint tmp = nums[x];\n\t\t\tnums[x] = nums[y];\n\t\t\tnums[y] = tmp;\n\t\t}\n\t\tfor (int i = 0; i < a; i++) {\n\t\t\tbuilder.append(nums[i]).append('\\n');\n\t\t}\n\t\tSystem.out.print(builder);\n\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.StringTokenizer;", "StringTokenizer", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException,\n\t\t\tIOException {\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\t\tStringBuilder builder = new StringBuilder();\n\t\tStringTokenizer tokenizer;\n\t\tint a = Integer.parseInt(reader.readLine());\n\t\tint n = Integer.parseInt(reader.readLine());\n\t\tint[] nums = new int[a];\n\t\tfor (int i = 0; i < a; i++) {\n\t\t\tnums[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ttokenizer = new StringTokenizer(reader.readLine(), \",\");\n\t\t\tint x = Integer.parseInt(tokenizer.nextToken()) - 1;\n\t\t\tint y = Integer.parseInt(tokenizer.nextToken()) - 1;\n\t\t\tint tmp = nums[x];\n\t\t\tnums[x] = nums[y];\n\t\t\tnums[y] = tmp;\n\t\t}\n\t\tfor (int i = 0; i < a; i++) {\n\t\t\tbuilder.append(nums[i]).append('\\n');\n\t\t}\n\t\tSystem.out.print(builder);\n\n\t}\n\n}", "Main", "public static void main(String[] args) throws NumberFormatException,\n\t\t\tIOException {\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\t\tStringBuilder builder = new StringBuilder();\n\t\tStringTokenizer tokenizer;\n\t\tint a = Integer.parseInt(reader.readLine());\n\t\tint n = Integer.parseInt(reader.readLine());\n\t\tint[] nums = new int[a];\n\t\tfor (int i = 0; i < a; i++) {\n\t\t\tnums[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ttokenizer = new StringTokenizer(reader.readLine(), \",\");\n\t\t\tint x = Integer.parseInt(tokenizer.nextToken()) - 1;\n\t\t\tint y = Integer.parseInt(tokenizer.nextToken()) - 1;\n\t\t\tint tmp = nums[x];\n\t\t\tnums[x] = nums[y];\n\t\t\tnums[y] = tmp;\n\t\t}\n\t\tfor (int i = 0; i < a; i++) {\n\t\t\tbuilder.append(nums[i]).append('\\n');\n\t\t}\n\t\tSystem.out.print(builder);\n\n\t}", "main", "{\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\t\tStringBuilder builder = new StringBuilder();\n\t\tStringTokenizer tokenizer;\n\t\tint a = Integer.parseInt(reader.readLine());\n\t\tint n = Integer.parseInt(reader.readLine());\n\t\tint[] nums = new int[a];\n\t\tfor (int i = 0; i < a; i++) {\n\t\t\tnums[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ttokenizer = new StringTokenizer(reader.readLine(), \",\");\n\t\t\tint x = Integer.parseInt(tokenizer.nextToken()) - 1;\n\t\t\tint y = Integer.parseInt(tokenizer.nextToken()) - 1;\n\t\t\tint tmp = nums[x];\n\t\t\tnums[x] = nums[y];\n\t\t\tnums[y] = tmp;\n\t\t}\n\t\tfor (int i = 0; i < a; i++) {\n\t\t\tbuilder.append(nums[i]).append('\\n');\n\t\t}\n\t\tSystem.out.print(builder);\n\n\t}", "BufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));", "reader", "new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in))", "StringBuilder builder = new StringBuilder();", "builder", "new StringBuilder()", "StringTokenizer tokenizer;", "tokenizer", "int a = Integer.parseInt(reader.readLine());", "a", "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[] nums = new int[a];", "nums", "new int[a]", "a", "for (int i = 0; i < a; i++) {\n\t\t\tnums[i] = i + 1;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < a", "i", "a", "i++", "i++", "i", "{\n\t\t\tnums[i] = i + 1;\n\t\t}", "{\n\t\t\tnums[i] = i + 1;\n\t\t}", "nums[i] = i + 1", "nums[i]", "nums", "i", "i + 1", "i", "1", "for (int i = 0; i < n; i++) {\n\t\t\ttokenizer = new StringTokenizer(reader.readLine(), \",\");\n\t\t\tint x = Integer.parseInt(tokenizer.nextToken()) - 1;\n\t\t\tint y = Integer.parseInt(tokenizer.nextToken()) - 1;\n\t\t\tint tmp = nums[x];\n\t\t\tnums[x] = nums[y];\n\t\t\tnums[y] = tmp;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\ttokenizer = new StringTokenizer(reader.readLine(), \",\");\n\t\t\tint x = Integer.parseInt(tokenizer.nextToken()) - 1;\n\t\t\tint y = Integer.parseInt(tokenizer.nextToken()) - 1;\n\t\t\tint tmp = nums[x];\n\t\t\tnums[x] = nums[y];\n\t\t\tnums[y] = tmp;\n\t\t}", "{\n\t\t\ttokenizer = new StringTokenizer(reader.readLine(), \",\");\n\t\t\tint x = Integer.parseInt(tokenizer.nextToken()) - 1;\n\t\t\tint y = Integer.parseInt(tokenizer.nextToken()) - 1;\n\t\t\tint tmp = nums[x];\n\t\t\tnums[x] = nums[y];\n\t\t\tnums[y] = tmp;\n\t\t}", "tokenizer = new StringTokenizer(reader.readLine(), \",\")", "tokenizer", "new StringTokenizer(reader.readLine(), \",\")", "int x = Integer.parseInt(tokenizer.nextToken()) - 1;", "x", "Integer.parseInt(tokenizer.nextToken()) - 1", "Integer.parseInt(tokenizer.nextToken())", "Integer.parseInt", "Integer", "tokenizer.nextToken()", "tokenizer.nextToken", "tokenizer", "1", "int y = Integer.parseInt(tokenizer.nextToken()) - 1;", "y", "Integer.parseInt(tokenizer.nextToken()) - 1", "Integer.parseInt(tokenizer.nextToken())", "Integer.parseInt", "Integer", "tokenizer.nextToken()", "tokenizer.nextToken", "tokenizer", "1", "int tmp = nums[x];", "tmp", "nums[x]", "nums", "x", "nums[x] = nums[y]", "nums[x]", "nums", "x", "nums[y]", "nums", "y", "nums[y] = tmp", "nums[y]", "nums", "y", "tmp", "for (int i = 0; i < a; i++) {\n\t\t\tbuilder.append(nums[i]).append('\\n');\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < a", "i", "a", "i++", "i++", "i", "{\n\t\t\tbuilder.append(nums[i]).append('\\n');\n\t\t}", "{\n\t\t\tbuilder.append(nums[i]).append('\\n');\n\t\t}", "builder.append(nums[i]).append('\\n')", "builder.append(nums[i]).append", "builder.append(nums[i])", "builder.append", "builder", "nums[i]", "nums", "i", "'\\n'", "System.out.print(builder)", "System.out.print", "System.out", "System", "System.out", "builder", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException,\n\t\t\tIOException {\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\t\tStringBuilder builder = new StringBuilder();\n\t\tStringTokenizer tokenizer;\n\t\tint a = Integer.parseInt(reader.readLine());\n\t\tint n = Integer.parseInt(reader.readLine());\n\t\tint[] nums = new int[a];\n\t\tfor (int i = 0; i < a; i++) {\n\t\t\tnums[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ttokenizer = new StringTokenizer(reader.readLine(), \",\");\n\t\t\tint x = Integer.parseInt(tokenizer.nextToken()) - 1;\n\t\t\tint y = Integer.parseInt(tokenizer.nextToken()) - 1;\n\t\t\tint tmp = nums[x];\n\t\t\tnums[x] = nums[y];\n\t\t\tnums[y] = tmp;\n\t\t}\n\t\tfor (int i = 0; i < a; i++) {\n\t\t\tbuilder.append(nums[i]).append('\\n');\n\t\t}\n\t\tSystem.out.print(builder);\n\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException,\n\t\t\tIOException {\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\t\tStringBuilder builder = new StringBuilder();\n\t\tStringTokenizer tokenizer;\n\t\tint a = Integer.parseInt(reader.readLine());\n\t\tint n = Integer.parseInt(reader.readLine());\n\t\tint[] nums = new int[a];\n\t\tfor (int i = 0; i < a; i++) {\n\t\t\tnums[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ttokenizer = new StringTokenizer(reader.readLine(), \",\");\n\t\t\tint x = Integer.parseInt(tokenizer.nextToken()) - 1;\n\t\t\tint y = Integer.parseInt(tokenizer.nextToken()) - 1;\n\t\t\tint tmp = nums[x];\n\t\t\tnums[x] = nums[y];\n\t\t\tnums[y] = tmp;\n\t\t}\n\t\tfor (int i = 0; i < a; i++) {\n\t\t\tbuilder.append(nums[i]).append('\\n');\n\t\t}\n\t\tSystem.out.print(builder);\n\n\t}\n\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader reader = new BufferedReader(new InputStreamReader( System.in)); StringBuilder builder = new StringBuilder(); StringTokenizer tokenizer; int a = Integer.parseInt(reader.readLine()); int n = Integer.parseInt(reader.readLine()); int[] nums = new int[a]; for (int i = 0; i < a; i++) { nums[i] = i + 1; } for (int i = 0; i < n; i++) { tokenizer = new StringTokenizer(reader.readLine(), ","); int x = Integer.parseInt(tokenizer.nextToken()) - 1; int y = Integer.parseInt(tokenizer.nextToken()) - 1; int tmp = nums[x]; nums[x] = nums[y]; nums[y] = tmp; } for (int i = 0; i < a; i++) { builder.append(nums[i]).append('\n'); } System.out.print(builder); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 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, 17, 41, 13, 17, 11, 1, 41, 13, 17, 1, 40, 13, 30, 30, 0, 13, 17, 0, 13, 2, 4, 18, 13, 13, 17, 14, 2, 4, 18, 13, 2, 13, 17, 17, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 4, 18, 13, 1, 40, 13, 30, 30, 0, 13, 17, 0, 13, 2, 4, 18, 13, 13, 17, 3, 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 ], [ 185, 5 ], [ 185, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], [ 14, 15 ], [ 8, 16 ], [ 16, 17 ], [ 8, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 8, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 8, 28 ], [ 28, 29 ], [ 28, 30 ], [ 8, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 32, 37 ], [ 37, 38 ], [ 37, 39 ], [ 32, 40 ], [ 40, 41 ], [ 41, 42 ], [ 32, 43 ], [ 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 ], [ 64, 73 ], [ 73, 74 ], [ 73, 75 ], [ 64, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 76, 81 ], [ 81, 82 ], [ 82, 83 ], [ 76, 84 ], [ 85, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 85, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 92, 95 ], [ 91, 96 ], [ 85, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 99, 102 ], [ 102, 103 ], [ 102, 104 ], [ 98, 105 ], [ 97, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 111, 112 ], [ 111, 113 ], [ 107, 114 ], [ 114, 115 ], [ 114, 116 ], [ 116, 117 ], [ 117, 118 ], [ 107, 119 ], [ 119, 120 ], [ 120, 121 ], [ 107, 122 ], [ 123, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 123, 127 ], [ 127, 128 ], [ 127, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 130, 133 ], [ 129, 134 ], [ 106, 135 ], [ 64, 136 ], [ 136, 137 ], [ 136, 138 ], [ 138, 139 ], [ 138, 140 ], [ 140, 141 ], [ 140, 142 ], [ 64, 143 ], [ 143, 144 ], [ 144, 145 ], [ 144, 146 ], [ 146, 147 ], [ 146, 148 ], [ 143, 149 ], [ 149, 150 ], [ 149, 151 ], [ 151, 152 ], [ 151, 153 ], [ 64, 154 ], [ 154, 155 ], [ 155, 156 ], [ 155, 157 ], [ 157, 158 ], [ 157, 159 ], [ 154, 160 ], [ 8, 161 ], [ 161, 162 ], [ 162, 163 ], [ 163, 164 ], [ 163, 165 ], [ 161, 166 ], [ 166, 167 ], [ 166, 168 ], [ 161, 169 ], [ 169, 170 ], [ 170, 171 ], [ 161, 172 ], [ 173, 173 ], [ 173, 174 ], [ 174, 175 ], [ 175, 176 ], [ 176, 177 ], [ 176, 178 ], [ 174, 179 ], [ 179, 180 ], [ 179, 181 ], [ 6, 182 ], [ 182, 183 ], [ 0, 184 ], [ 184, 185 ], [ 184, 186 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n, k;\n\t\tint a[];\n\n\t\tn = sc.nextInt();\n\t\tk = sc.nextInt();\n\t\ta = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ta[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tString st = sc.next();\n\t\t\tint left = 0, right = 0;\n\t\t\tfor (int j = 0; ; j++) {\n\t\t\t\tleft *= 10;\n\t\t\t\tleft += st.charAt(j) - '0';\n\t\t\t\tif (st.charAt(j + 1) == ',') {\n\t\t\t\t\tfor (int l = j + 2; l < st.length(); l++) {\n\t\t\t\t\t\tright *= 10;\n\t\t\t\t\t\tright += st.charAt(l) - '0';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint swap = a[left - 1];\n\t\t\ta[left - 1] = a[right - 1];\n\t\t\ta[right - 1] = swap;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(a[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 n, k;\n\t\tint a[];\n\n\t\tn = sc.nextInt();\n\t\tk = sc.nextInt();\n\t\ta = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ta[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tString st = sc.next();\n\t\t\tint left = 0, right = 0;\n\t\t\tfor (int j = 0; ; j++) {\n\t\t\t\tleft *= 10;\n\t\t\t\tleft += st.charAt(j) - '0';\n\t\t\t\tif (st.charAt(j + 1) == ',') {\n\t\t\t\t\tfor (int l = j + 2; l < st.length(); l++) {\n\t\t\t\t\t\tright *= 10;\n\t\t\t\t\t\tright += st.charAt(l) - '0';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint swap = a[left - 1];\n\t\t\ta[left - 1] = a[right - 1];\n\t\t\ta[right - 1] = swap;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t}\n}", "Main", "public static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n, k;\n\t\tint a[];\n\n\t\tn = sc.nextInt();\n\t\tk = sc.nextInt();\n\t\ta = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ta[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tString st = sc.next();\n\t\t\tint left = 0, right = 0;\n\t\t\tfor (int j = 0; ; j++) {\n\t\t\t\tleft *= 10;\n\t\t\t\tleft += st.charAt(j) - '0';\n\t\t\t\tif (st.charAt(j + 1) == ',') {\n\t\t\t\t\tfor (int l = j + 2; l < st.length(); l++) {\n\t\t\t\t\t\tright *= 10;\n\t\t\t\t\t\tright += st.charAt(l) - '0';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint swap = a[left - 1];\n\t\t\ta[left - 1] = a[right - 1];\n\t\t\ta[right - 1] = swap;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n, k;\n\t\tint a[];\n\n\t\tn = sc.nextInt();\n\t\tk = sc.nextInt();\n\t\ta = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ta[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tString st = sc.next();\n\t\t\tint left = 0, right = 0;\n\t\t\tfor (int j = 0; ; j++) {\n\t\t\t\tleft *= 10;\n\t\t\t\tleft += st.charAt(j) - '0';\n\t\t\t\tif (st.charAt(j + 1) == ',') {\n\t\t\t\t\tfor (int l = j + 2; l < st.length(); l++) {\n\t\t\t\t\t\tright *= 10;\n\t\t\t\t\t\tright += st.charAt(l) - '0';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint swap = a[left - 1];\n\t\t\ta[left - 1] = a[right - 1];\n\t\t\ta[right - 1] = swap;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n", "n", "k;", "k", "int a[];", "a", "n = sc.nextInt()", "n", "sc.nextInt()", "sc.nextInt", "sc", "k = sc.nextInt()", "k", "sc.nextInt()", "sc.nextInt", "sc", "a = new int[n]", "a", "new int[n]", "n", "for (int i = 0; i < n; i++) {\n\t\t\ta[i] = i + 1;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "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 < k; i++) {\n\t\t\tString st = sc.next();\n\t\t\tint left = 0, right = 0;\n\t\t\tfor (int j = 0; ; j++) {\n\t\t\t\tleft *= 10;\n\t\t\t\tleft += st.charAt(j) - '0';\n\t\t\t\tif (st.charAt(j + 1) == ',') {\n\t\t\t\t\tfor (int l = j + 2; l < st.length(); l++) {\n\t\t\t\t\t\tright *= 10;\n\t\t\t\t\t\tright += st.charAt(l) - '0';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint swap = a[left - 1];\n\t\t\ta[left - 1] = a[right - 1];\n\t\t\ta[right - 1] = swap;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < k", "i", "k", "i++", "i++", "i", "{\n\t\t\tString st = sc.next();\n\t\t\tint left = 0, right = 0;\n\t\t\tfor (int j = 0; ; j++) {\n\t\t\t\tleft *= 10;\n\t\t\t\tleft += st.charAt(j) - '0';\n\t\t\t\tif (st.charAt(j + 1) == ',') {\n\t\t\t\t\tfor (int l = j + 2; l < st.length(); l++) {\n\t\t\t\t\t\tright *= 10;\n\t\t\t\t\t\tright += st.charAt(l) - '0';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint swap = a[left - 1];\n\t\t\ta[left - 1] = a[right - 1];\n\t\t\ta[right - 1] = swap;\n\t\t}", "{\n\t\t\tString st = sc.next();\n\t\t\tint left = 0, right = 0;\n\t\t\tfor (int j = 0; ; j++) {\n\t\t\t\tleft *= 10;\n\t\t\t\tleft += st.charAt(j) - '0';\n\t\t\t\tif (st.charAt(j + 1) == ',') {\n\t\t\t\t\tfor (int l = j + 2; l < st.length(); l++) {\n\t\t\t\t\t\tright *= 10;\n\t\t\t\t\t\tright += st.charAt(l) - '0';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint swap = a[left - 1];\n\t\t\ta[left - 1] = a[right - 1];\n\t\t\ta[right - 1] = swap;\n\t\t}", "String st = sc.next();", "st", "sc.next()", "sc.next", "sc", "int left = 0", "left", "0", "right = 0;", "right", "0", "for (int j = 0; ; j++) {\n\t\t\t\tleft *= 10;\n\t\t\t\tleft += st.charAt(j) - '0';\n\t\t\t\tif (st.charAt(j + 1) == ',') {\n\t\t\t\t\tfor (int l = j + 2; l < st.length(); l++) {\n\t\t\t\t\t\tright *= 10;\n\t\t\t\t\t\tright += st.charAt(l) - '0';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "int j = 0;", "int j = 0;", "j", "0", "j++", "j++", "j", "{\n\t\t\t\tleft *= 10;\n\t\t\t\tleft += st.charAt(j) - '0';\n\t\t\t\tif (st.charAt(j + 1) == ',') {\n\t\t\t\t\tfor (int l = j + 2; l < st.length(); l++) {\n\t\t\t\t\t\tright *= 10;\n\t\t\t\t\t\tright += st.charAt(l) - '0';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tleft *= 10;\n\t\t\t\tleft += st.charAt(j) - '0';\n\t\t\t\tif (st.charAt(j + 1) == ',') {\n\t\t\t\t\tfor (int l = j + 2; l < st.length(); l++) {\n\t\t\t\t\t\tright *= 10;\n\t\t\t\t\t\tright += st.charAt(l) - '0';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "left *= 10", "left", "10", "left += st.charAt(j) - '0'", "left", "st.charAt(j) - '0'", "st.charAt(j)", "st.charAt", "st", "j", "'0'", "if (st.charAt(j + 1) == ',') {\n\t\t\t\t\tfor (int l = j + 2; l < st.length(); l++) {\n\t\t\t\t\t\tright *= 10;\n\t\t\t\t\t\tright += st.charAt(l) - '0';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}", "st.charAt(j + 1) == ','", "st.charAt(j + 1)", "st.charAt", "st", "j + 1", "j", "1", "','", "{\n\t\t\t\t\tfor (int l = j + 2; l < st.length(); l++) {\n\t\t\t\t\t\tright *= 10;\n\t\t\t\t\t\tright += st.charAt(l) - '0';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}", "for (int l = j + 2; l < st.length(); l++) {\n\t\t\t\t\t\tright *= 10;\n\t\t\t\t\t\tright += st.charAt(l) - '0';\n\t\t\t\t\t}", "int l = j + 2;", "int l = j + 2;", "l", "j + 2", "j", "2", "l < st.length()", "l", "st.length()", "st.length", "st", "l++", "l++", "l", "{\n\t\t\t\t\t\tright *= 10;\n\t\t\t\t\t\tright += st.charAt(l) - '0';\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tright *= 10;\n\t\t\t\t\t\tright += st.charAt(l) - '0';\n\t\t\t\t\t}", "right *= 10", "right", "10", "right += st.charAt(l) - '0'", "right", "st.charAt(l) - '0'", "st.charAt(l)", "st.charAt", "st", "l", "'0'", "break;", "int swap = a[left - 1];", "swap", "a[left - 1]", "a", "left - 1", "left", "1", "a[left - 1] = a[right - 1]", "a[left - 1]", "a", "left - 1", "left", "1", "a[right - 1]", "a", "right - 1", "right", "1", "a[right - 1] = swap", "a[right - 1]", "a", "right - 1", "right", "1", "swap", "for (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(a[i]);\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(a[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(a[i]);\n\t\t}", "System.out.println(a[i])", "System.out.println", "System.out", "System", "System.out", "a[i]", "a", "i", "String args[]", "args", "public class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n, k;\n\t\tint a[];\n\n\t\tn = sc.nextInt();\n\t\tk = sc.nextInt();\n\t\ta = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ta[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tString st = sc.next();\n\t\t\tint left = 0, right = 0;\n\t\t\tfor (int j = 0; ; j++) {\n\t\t\t\tleft *= 10;\n\t\t\t\tleft += st.charAt(j) - '0';\n\t\t\t\tif (st.charAt(j + 1) == ',') {\n\t\t\t\t\tfor (int l = j + 2; l < st.length(); l++) {\n\t\t\t\t\t\tright *= 10;\n\t\t\t\t\t\tright += st.charAt(l) - '0';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint swap = a[left - 1];\n\t\t\ta[left - 1] = a[right - 1];\n\t\t\ta[right - 1] = swap;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(a[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 n, k;\n\t\tint a[];\n\n\t\tn = sc.nextInt();\n\t\tk = sc.nextInt();\n\t\ta = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ta[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tString st = sc.next();\n\t\t\tint left = 0, right = 0;\n\t\t\tfor (int j = 0; ; j++) {\n\t\t\t\tleft *= 10;\n\t\t\t\tleft += st.charAt(j) - '0';\n\t\t\t\tif (st.charAt(j + 1) == ',') {\n\t\t\t\t\tfor (int l = j + 2; l < st.length(); l++) {\n\t\t\t\t\t\tright *= 10;\n\t\t\t\t\t\tright += st.charAt(l) - '0';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint swap = a[left - 1];\n\t\t\ta[left - 1] = a[right - 1];\n\t\t\ta[right - 1] = swap;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(a[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 n, k; int a[]; n = sc.nextInt(); k = sc.nextInt(); a = new int[n]; for (int i = 0; i < n; i++) { a[i] = i + 1; } for (int i = 0; i < k; i++) { String st = sc.next(); int left = 0, right = 0; for (int j = 0; ; j++) { left *= 10; left += st.charAt(j) - '0'; if (st.charAt(j + 1) == ',') { for (int l = j + 2; l < st.length(); l++) { right *= 10; right += st.charAt(l) - '0'; } break; } } int swap = a[left - 1]; a[left - 1] = a[right - 1]; a[right - 1] = swap; } for (int i = 0; i < n; i++) { System.out.println(a[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, 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, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 2, 4, 18, 13, 18, 13, 17, 17, 41, 13, 2, 4, 18, 13, 18, 13, 17, 17, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 2, 18, 13, 13, 17, 4, 18, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 137, 5 ], [ 137, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 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 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 44, 48 ], [ 8, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 49, 54 ], [ 54, 55 ], [ 54, 56 ], [ 49, 57 ], [ 57, 58 ], [ 58, 59 ], [ 49, 60 ], [ 61, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 64, 69 ], [ 61, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 73, 76 ], [ 76, 77 ], [ 76, 78 ], [ 72, 79 ], [ 61, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 83, 86 ], [ 86, 87 ], [ 86, 88 ], [ 82, 89 ], [ 61, 90 ], [ 90, 91 ], [ 90, 92 ], [ 92, 93 ], [ 92, 94 ], [ 61, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 95, 99 ], [ 99, 100 ], [ 99, 101 ], [ 61, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 102, 106 ], [ 8, 107 ], [ 107, 108 ], [ 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 ], [ 126, 127 ], [ 126, 128 ], [ 125, 129 ], [ 8, 130 ], [ 130, 131 ], [ 131, 132 ], [ 130, 133 ], [ 6, 134 ], [ 134, 135 ], [ 0, 136 ], [ 136, 137 ], [ 136, 138 ] ]
[ "import java.util.Scanner;\n\npublic class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\tint N = Integer.parseInt(input.nextLine());\n\t\tint W = Integer.parseInt(input.nextLine());\n\t\t\n\t\tint[] v = new int[N];\n\t\t\n\t\tfor(int i = 0; i < N; i++) v[i] = i;\n\t\t\n\t\tfor(int i = 0; i < W; i++) {\n\t\t\tString[] s = input.nextLine().split(\"[,]\");\n\t\t\tint a = Integer.parseInt(s[0]) - 1;\n\t\t\tint b = Integer.parseInt(s[1]) - 1;\n\t\t\t\n\t\t\tint tmp = v[a];\n\t\t\tv[a] = v[b];\n\t\t\tv[b] = tmp;\t\t\t\n\t\t}\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(v[i] + 1);\t\t\t\n\t\t}\n\t\tSystem.exit(0);\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\tint N = Integer.parseInt(input.nextLine());\n\t\tint W = Integer.parseInt(input.nextLine());\n\t\t\n\t\tint[] v = new int[N];\n\t\t\n\t\tfor(int i = 0; i < N; i++) v[i] = i;\n\t\t\n\t\tfor(int i = 0; i < W; i++) {\n\t\t\tString[] s = input.nextLine().split(\"[,]\");\n\t\t\tint a = Integer.parseInt(s[0]) - 1;\n\t\t\tint b = Integer.parseInt(s[1]) - 1;\n\t\t\t\n\t\t\tint tmp = v[a];\n\t\t\tv[a] = v[b];\n\t\t\tv[b] = tmp;\t\t\t\n\t\t}\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(v[i] + 1);\t\t\t\n\t\t}\n\t\tSystem.exit(0);\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\tint N = Integer.parseInt(input.nextLine());\n\t\tint W = Integer.parseInt(input.nextLine());\n\t\t\n\t\tint[] v = new int[N];\n\t\t\n\t\tfor(int i = 0; i < N; i++) v[i] = i;\n\t\t\n\t\tfor(int i = 0; i < W; i++) {\n\t\t\tString[] s = input.nextLine().split(\"[,]\");\n\t\t\tint a = Integer.parseInt(s[0]) - 1;\n\t\t\tint b = Integer.parseInt(s[1]) - 1;\n\t\t\t\n\t\t\tint tmp = v[a];\n\t\t\tv[a] = v[b];\n\t\t\tv[b] = tmp;\t\t\t\n\t\t}\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(v[i] + 1);\t\t\t\n\t\t}\n\t\tSystem.exit(0);\n\t}", "main", "{\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\tint N = Integer.parseInt(input.nextLine());\n\t\tint W = Integer.parseInt(input.nextLine());\n\t\t\n\t\tint[] v = new int[N];\n\t\t\n\t\tfor(int i = 0; i < N; i++) v[i] = i;\n\t\t\n\t\tfor(int i = 0; i < W; i++) {\n\t\t\tString[] s = input.nextLine().split(\"[,]\");\n\t\t\tint a = Integer.parseInt(s[0]) - 1;\n\t\t\tint b = Integer.parseInt(s[1]) - 1;\n\t\t\t\n\t\t\tint tmp = v[a];\n\t\t\tv[a] = v[b];\n\t\t\tv[b] = tmp;\t\t\t\n\t\t}\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(v[i] + 1);\t\t\t\n\t\t}\n\t\tSystem.exit(0);\n\t}", "Scanner input = new Scanner(System.in);", "input", "new Scanner(System.in)", "int N = Integer.parseInt(input.nextLine());", "N", "Integer.parseInt(input.nextLine())", "Integer.parseInt", "Integer", "input.nextLine()", "input.nextLine", "input", "int W = Integer.parseInt(input.nextLine());", "W", "Integer.parseInt(input.nextLine())", "Integer.parseInt", "Integer", "input.nextLine()", "input.nextLine", "input", "int[] v = new int[N];", "v", "new int[N]", "N", "for(int i = 0; i < N; i++) v[i] = i;", "int i = 0;", "int i = 0;", "i", "0", "i < N", "i", "N", "i++", "i++", "i", "v[i] = i;", "v[i] = i", "v[i]", "v", "i", "i", "for(int i = 0; i < W; i++) {\n\t\t\tString[] s = input.nextLine().split(\"[,]\");\n\t\t\tint a = Integer.parseInt(s[0]) - 1;\n\t\t\tint b = Integer.parseInt(s[1]) - 1;\n\t\t\t\n\t\t\tint tmp = v[a];\n\t\t\tv[a] = v[b];\n\t\t\tv[b] = tmp;\t\t\t\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < W", "i", "W", "i++", "i++", "i", "{\n\t\t\tString[] s = input.nextLine().split(\"[,]\");\n\t\t\tint a = Integer.parseInt(s[0]) - 1;\n\t\t\tint b = Integer.parseInt(s[1]) - 1;\n\t\t\t\n\t\t\tint tmp = v[a];\n\t\t\tv[a] = v[b];\n\t\t\tv[b] = tmp;\t\t\t\n\t\t}", "{\n\t\t\tString[] s = input.nextLine().split(\"[,]\");\n\t\t\tint a = Integer.parseInt(s[0]) - 1;\n\t\t\tint b = Integer.parseInt(s[1]) - 1;\n\t\t\t\n\t\t\tint tmp = v[a];\n\t\t\tv[a] = v[b];\n\t\t\tv[b] = tmp;\t\t\t\n\t\t}", "String[] s = input.nextLine().split(\"[,]\");", "s", "input.nextLine().split(\"[,]\")", "input.nextLine().split", "input.nextLine()", "input.nextLine", "input", "\"[,]\"", "int a = Integer.parseInt(s[0]) - 1;", "a", "Integer.parseInt(s[0]) - 1", "Integer.parseInt(s[0])", "Integer.parseInt", "Integer", "s[0]", "s", "0", "1", "int b = Integer.parseInt(s[1]) - 1;", "b", "Integer.parseInt(s[1]) - 1", "Integer.parseInt(s[1])", "Integer.parseInt", "Integer", "s[1]", "s", "1", "1", "int tmp = v[a];", "tmp", "v[a]", "v", "a", "v[a] = v[b]", "v[a]", "v", "a", "v[b]", "v", "b", "v[b] = tmp", "v[b]", "v", "b", "tmp", "for(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(v[i] + 1);\t\t\t\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < N", "i", "N", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(v[i] + 1);\t\t\t\n\t\t}", "{\n\t\t\tSystem.out.println(v[i] + 1);\t\t\t\n\t\t}", "System.out.println(v[i] + 1)", "System.out.println", "System.out", "System", "System.out", "v[i] + 1", "v[i]", "v", "i", "1", "System.exit(0)", "System.exit", "System", "0", "String[] args", "args", "public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\tint N = Integer.parseInt(input.nextLine());\n\t\tint W = Integer.parseInt(input.nextLine());\n\t\t\n\t\tint[] v = new int[N];\n\t\t\n\t\tfor(int i = 0; i < N; i++) v[i] = i;\n\t\t\n\t\tfor(int i = 0; i < W; i++) {\n\t\t\tString[] s = input.nextLine().split(\"[,]\");\n\t\t\tint a = Integer.parseInt(s[0]) - 1;\n\t\t\tint b = Integer.parseInt(s[1]) - 1;\n\t\t\t\n\t\t\tint tmp = v[a];\n\t\t\tv[a] = v[b];\n\t\t\tv[b] = tmp;\t\t\t\n\t\t}\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(v[i] + 1);\t\t\t\n\t\t}\n\t\tSystem.exit(0);\n\t}\n}", "public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\tint N = Integer.parseInt(input.nextLine());\n\t\tint W = Integer.parseInt(input.nextLine());\n\t\t\n\t\tint[] v = new int[N];\n\t\t\n\t\tfor(int i = 0; i < N; i++) v[i] = i;\n\t\t\n\t\tfor(int i = 0; i < W; i++) {\n\t\t\tString[] s = input.nextLine().split(\"[,]\");\n\t\t\tint a = Integer.parseInt(s[0]) - 1;\n\t\t\tint b = Integer.parseInt(s[1]) - 1;\n\t\t\t\n\t\t\tint tmp = v[a];\n\t\t\tv[a] = v[b];\n\t\t\tv[b] = tmp;\t\t\t\n\t\t}\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(v[i] + 1);\t\t\t\n\t\t}\n\t\tSystem.exit(0);\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner input = new Scanner(System.in); int N = Integer.parseInt(input.nextLine()); int W = Integer.parseInt(input.nextLine()); int[] v = new int[N]; for(int i = 0; i < N; i++) v[i] = i; for(int i = 0; i < W; i++) { String[] s = input.nextLine().split("[,]"); int a = Integer.parseInt(s[0]) - 1; int b = Integer.parseInt(s[1]) - 1; int tmp = v[a]; v[a] = v[b]; v[b] = tmp; } for(int i = 0; i < N; i++) { System.out.println(v[i] + 1); } System.exit(0); } }
[ 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, 2, 4, 18, 13, 18, 4, 18, 13, 17, 17, 17, 41, 13, 2, 4, 18, 13, 18, 4, 18, 13, 17, 17, 17, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 28, 13, 13, 30, 30, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 121, 5 ], [ 121, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 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 ], [ 68, 69 ], [ 67, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 71, 74 ], [ 70, 75 ], [ 66, 76 ], [ 58, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 80, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 83, 88 ], [ 79, 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 ], [ 107, 109 ], [ 107, 110 ], [ 111, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 112, 117 ], [ 6, 118 ], [ 118, 119 ], [ 0, 120 ], [ 120, 121 ], [ 120, 122 ] ]
[ "import java.util.Scanner;\n\npublic class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w = sc.nextInt();\n\t\tint h = sc.nextInt();\n\n\t\tint[] ary = new int[w];\n\t\tfor (int i = 0; i < w; i++)\n\t\t{\n\t\t\tary[i] = i + 1;\n\t\t}\n\n\t\tfor (int i = 0; i < h; i++)\n\t\t{\n\t\t\tString ab = sc.next();\n\t\t\tint a = Integer.parseInt(ab.split(\",\")[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab.split(\",\")[1]) - 1;\n\n\t\t\tint temp = ary[a];\n\t\t\tary[a] = ary[b];\n\t\t\tary[b] = temp;\n\t\t}\n\n\t\tfor (int a :\n\t\t\t\tary)\n\t\t{\n\t\t\tSystem.out.println(a);\n\t\t}\n\t}\n}\n", "import java.util.Scanner;", "Scanner", "java.util", "public class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w = sc.nextInt();\n\t\tint h = sc.nextInt();\n\n\t\tint[] ary = new int[w];\n\t\tfor (int i = 0; i < w; i++)\n\t\t{\n\t\t\tary[i] = i + 1;\n\t\t}\n\n\t\tfor (int i = 0; i < h; i++)\n\t\t{\n\t\t\tString ab = sc.next();\n\t\t\tint a = Integer.parseInt(ab.split(\",\")[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab.split(\",\")[1]) - 1;\n\n\t\t\tint temp = ary[a];\n\t\t\tary[a] = ary[b];\n\t\t\tary[b] = temp;\n\t\t}\n\n\t\tfor (int a :\n\t\t\t\tary)\n\t\t{\n\t\t\tSystem.out.println(a);\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args)\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w = sc.nextInt();\n\t\tint h = sc.nextInt();\n\n\t\tint[] ary = new int[w];\n\t\tfor (int i = 0; i < w; i++)\n\t\t{\n\t\t\tary[i] = i + 1;\n\t\t}\n\n\t\tfor (int i = 0; i < h; i++)\n\t\t{\n\t\t\tString ab = sc.next();\n\t\t\tint a = Integer.parseInt(ab.split(\",\")[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab.split(\",\")[1]) - 1;\n\n\t\t\tint temp = ary[a];\n\t\t\tary[a] = ary[b];\n\t\t\tary[b] = temp;\n\t\t}\n\n\t\tfor (int a :\n\t\t\t\tary)\n\t\t{\n\t\t\tSystem.out.println(a);\n\t\t}\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w = sc.nextInt();\n\t\tint h = sc.nextInt();\n\n\t\tint[] ary = new int[w];\n\t\tfor (int i = 0; i < w; i++)\n\t\t{\n\t\t\tary[i] = i + 1;\n\t\t}\n\n\t\tfor (int i = 0; i < h; i++)\n\t\t{\n\t\t\tString ab = sc.next();\n\t\t\tint a = Integer.parseInt(ab.split(\",\")[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab.split(\",\")[1]) - 1;\n\n\t\t\tint temp = ary[a];\n\t\t\tary[a] = ary[b];\n\t\t\tary[b] = temp;\n\t\t}\n\n\t\tfor (int a :\n\t\t\t\tary)\n\t\t{\n\t\t\tSystem.out.println(a);\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 h = sc.nextInt();", "h", "sc.nextInt()", "sc.nextInt", "sc", "int[] ary = new int[w];", "ary", "new int[w]", "w", "for (int i = 0; i < w; i++)\n\t\t{\n\t\t\tary[i] = i + 1;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < w", "i", "w", "i++", "i++", "i", "{\n\t\t\tary[i] = i + 1;\n\t\t}", "{\n\t\t\tary[i] = i + 1;\n\t\t}", "ary[i] = i + 1", "ary[i]", "ary", "i", "i + 1", "i", "1", "for (int i = 0; i < h; i++)\n\t\t{\n\t\t\tString ab = sc.next();\n\t\t\tint a = Integer.parseInt(ab.split(\",\")[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab.split(\",\")[1]) - 1;\n\n\t\t\tint temp = ary[a];\n\t\t\tary[a] = ary[b];\n\t\t\tary[b] = temp;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < h", "i", "h", "i++", "i++", "i", "{\n\t\t\tString ab = sc.next();\n\t\t\tint a = Integer.parseInt(ab.split(\",\")[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab.split(\",\")[1]) - 1;\n\n\t\t\tint temp = ary[a];\n\t\t\tary[a] = ary[b];\n\t\t\tary[b] = temp;\n\t\t}", "{\n\t\t\tString ab = sc.next();\n\t\t\tint a = Integer.parseInt(ab.split(\",\")[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab.split(\",\")[1]) - 1;\n\n\t\t\tint temp = ary[a];\n\t\t\tary[a] = ary[b];\n\t\t\tary[b] = temp;\n\t\t}", "String ab = sc.next();", "ab", "sc.next()", "sc.next", "sc", "int a = Integer.parseInt(ab.split(\",\")[0]) - 1;", "a", "Integer.parseInt(ab.split(\",\")[0]) - 1", "Integer.parseInt(ab.split(\",\")[0])", "Integer.parseInt", "Integer", "ab.split(\",\")[0]", "ab.split(\",\")", "ab.split", "ab", "\",\"", "0", "1", "int b = Integer.parseInt(ab.split(\",\")[1]) - 1;", "b", "Integer.parseInt(ab.split(\",\")[1]) - 1", "Integer.parseInt(ab.split(\",\")[1])", "Integer.parseInt", "Integer", "ab.split(\",\")[1]", "ab.split(\",\")", "ab.split", "ab", "\",\"", "1", "1", "int temp = ary[a];", "temp", "ary[a]", "ary", "a", "ary[a] = ary[b]", "ary[a]", "ary", "a", "ary[b]", "ary", "b", "ary[b] = temp", "ary[b]", "ary", "b", "temp", "for (int a :\n\t\t\t\tary)\n\t\t{\n\t\t\tSystem.out.println(a);\n\t\t}", "int a", "ary", "{\n\t\t\tSystem.out.println(a);\n\t\t}", "{\n\t\t\tSystem.out.println(a);\n\t\t}", "System.out.println(a)", "System.out.println", "System.out", "System", "System.out", "a", "String[] args", "args", "public class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w = sc.nextInt();\n\t\tint h = sc.nextInt();\n\n\t\tint[] ary = new int[w];\n\t\tfor (int i = 0; i < w; i++)\n\t\t{\n\t\t\tary[i] = i + 1;\n\t\t}\n\n\t\tfor (int i = 0; i < h; i++)\n\t\t{\n\t\t\tString ab = sc.next();\n\t\t\tint a = Integer.parseInt(ab.split(\",\")[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab.split(\",\")[1]) - 1;\n\n\t\t\tint temp = ary[a];\n\t\t\tary[a] = ary[b];\n\t\t\tary[b] = temp;\n\t\t}\n\n\t\tfor (int a :\n\t\t\t\tary)\n\t\t{\n\t\t\tSystem.out.println(a);\n\t\t}\n\t}\n}", "public class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w = sc.nextInt();\n\t\tint h = sc.nextInt();\n\n\t\tint[] ary = new int[w];\n\t\tfor (int i = 0; i < w; i++)\n\t\t{\n\t\t\tary[i] = i + 1;\n\t\t}\n\n\t\tfor (int i = 0; i < h; i++)\n\t\t{\n\t\t\tString ab = sc.next();\n\t\t\tint a = Integer.parseInt(ab.split(\",\")[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab.split(\",\")[1]) - 1;\n\n\t\t\tint temp = ary[a];\n\t\t\tary[a] = ary[b];\n\t\t\tary[b] = temp;\n\t\t}\n\n\t\tfor (int a :\n\t\t\t\tary)\n\t\t{\n\t\t\tSystem.out.println(a);\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 h = sc.nextInt(); int[] ary = new int[w]; for (int i = 0; i < w; i++) { ary[i] = i + 1; } for (int i = 0; i < h; i++) { String ab = sc.next(); int a = Integer.parseInt(ab.split(",")[0]) - 1; int b = Integer.parseInt(ab.split(",")[1]) - 1; int temp = ary[a]; ary[a] = ary[b]; ary[b] = temp; } for (int a : ary) { System.out.println(a); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 4, 18, 13, 17, 41, 13, 17, 41, 13, 17, 41, 13, 20, 17, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 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, 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 ], [ 13, 14 ], [ 12, 15 ], [ 8, 16 ], [ 16, 17 ], [ 16, 18 ], [ 8, 19 ], [ 19, 20 ], [ 19, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 8, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 34, 35 ], [ 8, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 36, 41 ], [ 41, 42 ], [ 41, 43 ], [ 36, 44 ], [ 44, 45 ], [ 45, 46 ], [ 36, 47 ], [ 48, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 49, 53 ], [ 53, 54 ], [ 53, 55 ], [ 8, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 56, 61 ], [ 61, 62 ], [ 61, 63 ], [ 56, 64 ], [ 64, 65 ], [ 65, 66 ], [ 56, 67 ], [ 68, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 72, 73 ], [ 68, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 68, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 83, 85 ], [ 68, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 89, 91 ], [ 86, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 94, 96 ], [ 68, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 100, 102 ], [ 97, 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;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n sc.useDelimiter(\",|\\n\");\n int w=0,n=0;\n int[] data=new int[30];\n w=sc.nextInt();\n n=sc.nextInt();\n for(int i=0;i<w;i++){\n data[i]=i+1;\n }\n for(int j=0;j<n;j++){\n int a=sc.nextInt();\n int b=sc.nextInt();\n int tmp=data[a-1];\n data[a-1]=data[b-1];\n data[b-1]=tmp;\n }\n for(int k=0;k<w;k++){\n System.out.println(data[k]);\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 sc.useDelimiter(\",|\\n\");\n int w=0,n=0;\n int[] data=new int[30];\n w=sc.nextInt();\n n=sc.nextInt();\n for(int i=0;i<w;i++){\n data[i]=i+1;\n }\n for(int j=0;j<n;j++){\n int a=sc.nextInt();\n int b=sc.nextInt();\n int tmp=data[a-1];\n data[a-1]=data[b-1];\n data[b-1]=tmp;\n }\n for(int k=0;k<w;k++){\n System.out.println(data[k]);\n }\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n sc.useDelimiter(\",|\\n\");\n int w=0,n=0;\n int[] data=new int[30];\n w=sc.nextInt();\n n=sc.nextInt();\n for(int i=0;i<w;i++){\n data[i]=i+1;\n }\n for(int j=0;j<n;j++){\n int a=sc.nextInt();\n int b=sc.nextInt();\n int tmp=data[a-1];\n data[a-1]=data[b-1];\n data[b-1]=tmp;\n }\n for(int k=0;k<w;k++){\n System.out.println(data[k]);\n }\n }", "main", "{\n Scanner sc=new Scanner(System.in);\n sc.useDelimiter(\",|\\n\");\n int w=0,n=0;\n int[] data=new int[30];\n w=sc.nextInt();\n n=sc.nextInt();\n for(int i=0;i<w;i++){\n data[i]=i+1;\n }\n for(int j=0;j<n;j++){\n int a=sc.nextInt();\n int b=sc.nextInt();\n int tmp=data[a-1];\n data[a-1]=data[b-1];\n data[b-1]=tmp;\n }\n for(int k=0;k<w;k++){\n System.out.println(data[k]);\n }\n }", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "sc.useDelimiter(\",|\\n\")", "sc.useDelimiter", "sc", "\",|\\n\"", "int w=0", "w", "0", "n=0;", "n", "0", "int[] data=new int[30];", "data", "new int[30]", "30", "w=sc.nextInt()", "w", "sc.nextInt()", "sc.nextInt", "sc", "n=sc.nextInt()", "n", "sc.nextInt()", "sc.nextInt", "sc", "for(int i=0;i<w;i++){\n data[i]=i+1;\n }", "int i=0;", "int i=0;", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "{\n data[i]=i+1;\n }", "{\n data[i]=i+1;\n }", "data[i]=i+1", "data[i]", "data", "i", "i+1", "i", "1", "for(int j=0;j<n;j++){\n int a=sc.nextInt();\n int b=sc.nextInt();\n int tmp=data[a-1];\n data[a-1]=data[b-1];\n data[b-1]=tmp;\n }", "int j=0;", "int j=0;", "j", "0", "j<n", "j", "n", "j++", "j++", "j", "{\n int a=sc.nextInt();\n int b=sc.nextInt();\n int tmp=data[a-1];\n data[a-1]=data[b-1];\n data[b-1]=tmp;\n }", "{\n int a=sc.nextInt();\n int b=sc.nextInt();\n int tmp=data[a-1];\n data[a-1]=data[b-1];\n data[b-1]=tmp;\n }", "int a=sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "int b=sc.nextInt();", "b", "sc.nextInt()", "sc.nextInt", "sc", "int tmp=data[a-1];", "tmp", "data[a-1]", "data", "a-1", "a", "1", "data[a-1]=data[b-1]", "data[a-1]", "data", "a-1", "a", "1", "data[b-1]", "data", "b-1", "b", "1", "data[b-1]=tmp", "data[b-1]", "data", "b-1", "b", "1", "tmp", "for(int k=0;k<w;k++){\n System.out.println(data[k]);\n }", "int k=0;", "int k=0;", "k", "0", "k<w", "k", "w", "k++", "k++", "k", "{\n System.out.println(data[k]);\n }", "{\n System.out.println(data[k]);\n }", "System.out.println(data[k])", "System.out.println", "System.out", "System", "System.out", "data[k]", "data", "k", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n sc.useDelimiter(\",|\\n\");\n int w=0,n=0;\n int[] data=new int[30];\n w=sc.nextInt();\n n=sc.nextInt();\n for(int i=0;i<w;i++){\n data[i]=i+1;\n }\n for(int j=0;j<n;j++){\n int a=sc.nextInt();\n int b=sc.nextInt();\n int tmp=data[a-1];\n data[a-1]=data[b-1];\n data[b-1]=tmp;\n }\n for(int k=0;k<w;k++){\n System.out.println(data[k]);\n }\n }\n}", "public class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n sc.useDelimiter(\",|\\n\");\n int w=0,n=0;\n int[] data=new int[30];\n w=sc.nextInt();\n n=sc.nextInt();\n for(int i=0;i<w;i++){\n data[i]=i+1;\n }\n for(int j=0;j<n;j++){\n int a=sc.nextInt();\n int b=sc.nextInt();\n int tmp=data[a-1];\n data[a-1]=data[b-1];\n data[b-1]=tmp;\n }\n for(int k=0;k<w;k++){\n System.out.println(data[k]);\n }\n }\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); sc.useDelimiter(",|\n"); int w=0,n=0; int[] data=new int[30]; w=sc.nextInt(); n=sc.nextInt(); for(int i=0;i<w;i++){ data[i]=i+1; } for(int j=0;j<n;j++){ int a=sc.nextInt(); int b=sc.nextInt(); int tmp=data[a-1]; data[a-1]=data[b-1]; data[b-1]=tmp; } for(int k=0;k<w;k++){ System.out.println(data[k]); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 41, 13, 0, 13, 20, 13, 0, 13, 20, 17, 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, 41, 13, 17, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 13, 14, 2, 2, 17, 13, 2, 13, 17, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 13, 13, 40, 13, 0, 13, 17, 30, 14, 2, 13, 17, 30, 0, 13, 13, 0, 13, 17, 0, 18, 13, 17, 4, 18, 13, 4, 18, 13, 13, 13, 0, 13, 18, 13, 2, 18, 13, 17, 17, 0, 18, 13, 2, 18, 13, 17, 17, 18, 13, 2, 18, 13, 17, 17, 0, 18, 13, 2, 18, 13, 17, 17, 13, 11, 1, 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 ], [ 212, 5 ], [ 212, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], [ 14, 15 ], [ 14, 16 ], [ 16, 17 ], [ 17, 18 ], [ 8, 19 ], [ 19, 20 ], [ 19, 21 ], [ 21, 22 ], [ 22, 23 ], [ 8, 24 ], [ 24, 25 ], [ 8, 26 ], [ 26, 27 ], [ 8, 28 ], [ 28, 29 ], [ 28, 30 ], [ 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 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 48, 52 ], [ 52, 53 ], [ 52, 54 ], [ 8, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 55, 60 ], [ 60, 61 ], [ 60, 62 ], [ 55, 63 ], [ 63, 64 ], [ 64, 65 ], [ 55, 66 ], [ 67, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 67, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 67, 78 ], [ 78, 79 ], [ 78, 80 ], [ 67, 81 ], [ 81, 82 ], [ 81, 83 ], [ 67, 84 ], [ 84, 85 ], [ 84, 86 ], [ 67, 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 ], [ 102, 105 ], [ 99, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 107, 111 ], [ 111, 112 ], [ 111, 113 ], [ 106, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 115, 119 ], [ 119, 120 ], [ 120, 121 ], [ 119, 122 ], [ 122, 123 ], [ 123, 124 ], [ 122, 125 ], [ 122, 126 ], [ 114, 127 ], [ 127, 128 ], [ 114, 129 ], [ 129, 130 ], [ 129, 131 ], [ 106, 132 ], [ 132, 133 ], [ 133, 134 ], [ 134, 135 ], [ 134, 136 ], [ 133, 137 ], [ 137, 138 ], [ 138, 139 ], [ 138, 140 ], [ 137, 141 ], [ 141, 142 ], [ 141, 143 ], [ 67, 144 ], [ 144, 145 ], [ 145, 146 ], [ 145, 147 ], [ 144, 148 ], [ 148, 149 ], [ 149, 150 ], [ 148, 151 ], [ 151, 152 ], [ 152, 153 ], [ 151, 154 ], [ 151, 155 ], [ 67, 156 ], [ 156, 157 ], [ 156, 158 ], [ 158, 159 ], [ 158, 160 ], [ 160, 161 ], [ 161, 162 ], [ 161, 163 ], [ 160, 164 ], [ 67, 165 ], [ 165, 166 ], [ 166, 167 ], [ 166, 168 ], [ 168, 169 ], [ 169, 170 ], [ 169, 171 ], [ 168, 172 ], [ 165, 173 ], [ 173, 174 ], [ 173, 175 ], [ 175, 176 ], [ 176, 177 ], [ 176, 178 ], [ 175, 179 ], [ 67, 180 ], [ 180, 181 ], [ 181, 182 ], [ 181, 183 ], [ 183, 184 ], [ 184, 185 ], [ 184, 186 ], [ 183, 187 ], [ 180, 188 ], [ 8, 189 ], [ 189, 190 ], [ 190, 191 ], [ 191, 192 ], [ 191, 193 ], [ 189, 194 ], [ 194, 195 ], [ 194, 196 ], [ 189, 197 ], [ 197, 198 ], [ 198, 199 ], [ 189, 200 ], [ 200, 201 ], [ 201, 202 ], [ 202, 203 ], [ 203, 204 ], [ 203, 205 ], [ 201, 206 ], [ 206, 207 ], [ 206, 208 ], [ 6, 209 ], [ 209, 210 ], [ 0, 211 ], [ 211, 212 ], [ 211, 213 ] ]
[ "import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tint d;\n\tint w = sc.nextInt();\n\tint n = sc.nextInt();\n\tint[] line;\n\tint[] a;\n\tline = new int[w];\n\ta = new int[2];\n\tfor(int i=0;i<w;i++) line[i] = i+1;\n\tfor(int i=0;i<n;i++){\n\t String s = sc.next();\n\t int l = s.length();\n\t int k = 0, f=0, x=0;\n\t for(int j=0;j<l;j++){\n\t\tchar c = s.charAt(j);\n\t\tif('0' > c || c > '9'){\n\t\t a[k] = Integer.parseInt(s.substring(x,j));\n\t\t k++;\n\t\t f=0;\n\t\t}else{\n\t\t if(f==0){\n\t\t\tx=j;\n\t\t\tf=1;\n\t\t } \n\t\t}\n\t }\n\t a[1] = Integer.parseInt(s.substring(x,l));\n\t d = line[a[0]-1];\n\t line[a[0]-1] = line[a[1]-1];\n\t line[a[1]-1] = d;\n\t}\n\tfor(int i=0;i<w;i++) System.out.println(line[i]);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tint d;\n\tint w = sc.nextInt();\n\tint n = sc.nextInt();\n\tint[] line;\n\tint[] a;\n\tline = new int[w];\n\ta = new int[2];\n\tfor(int i=0;i<w;i++) line[i] = i+1;\n\tfor(int i=0;i<n;i++){\n\t String s = sc.next();\n\t int l = s.length();\n\t int k = 0, f=0, x=0;\n\t for(int j=0;j<l;j++){\n\t\tchar c = s.charAt(j);\n\t\tif('0' > c || c > '9'){\n\t\t a[k] = Integer.parseInt(s.substring(x,j));\n\t\t k++;\n\t\t f=0;\n\t\t}else{\n\t\t if(f==0){\n\t\t\tx=j;\n\t\t\tf=1;\n\t\t } \n\t\t}\n\t }\n\t a[1] = Integer.parseInt(s.substring(x,l));\n\t d = line[a[0]-1];\n\t line[a[0]-1] = line[a[1]-1];\n\t line[a[1]-1] = d;\n\t}\n\tfor(int i=0;i<w;i++) System.out.println(line[i]);\n }\n}", "Main", "public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tint d;\n\tint w = sc.nextInt();\n\tint n = sc.nextInt();\n\tint[] line;\n\tint[] a;\n\tline = new int[w];\n\ta = new int[2];\n\tfor(int i=0;i<w;i++) line[i] = i+1;\n\tfor(int i=0;i<n;i++){\n\t String s = sc.next();\n\t int l = s.length();\n\t int k = 0, f=0, x=0;\n\t for(int j=0;j<l;j++){\n\t\tchar c = s.charAt(j);\n\t\tif('0' > c || c > '9'){\n\t\t a[k] = Integer.parseInt(s.substring(x,j));\n\t\t k++;\n\t\t f=0;\n\t\t}else{\n\t\t if(f==0){\n\t\t\tx=j;\n\t\t\tf=1;\n\t\t } \n\t\t}\n\t }\n\t a[1] = Integer.parseInt(s.substring(x,l));\n\t d = line[a[0]-1];\n\t line[a[0]-1] = line[a[1]-1];\n\t line[a[1]-1] = d;\n\t}\n\tfor(int i=0;i<w;i++) System.out.println(line[i]);\n }", "main", "{\n\tScanner sc = new Scanner(System.in);\n\tint d;\n\tint w = sc.nextInt();\n\tint n = sc.nextInt();\n\tint[] line;\n\tint[] a;\n\tline = new int[w];\n\ta = new int[2];\n\tfor(int i=0;i<w;i++) line[i] = i+1;\n\tfor(int i=0;i<n;i++){\n\t String s = sc.next();\n\t int l = s.length();\n\t int k = 0, f=0, x=0;\n\t for(int j=0;j<l;j++){\n\t\tchar c = s.charAt(j);\n\t\tif('0' > c || c > '9'){\n\t\t a[k] = Integer.parseInt(s.substring(x,j));\n\t\t k++;\n\t\t f=0;\n\t\t}else{\n\t\t if(f==0){\n\t\t\tx=j;\n\t\t\tf=1;\n\t\t } \n\t\t}\n\t }\n\t a[1] = Integer.parseInt(s.substring(x,l));\n\t d = line[a[0]-1];\n\t line[a[0]-1] = line[a[1]-1];\n\t line[a[1]-1] = d;\n\t}\n\tfor(int i=0;i<w;i++) System.out.println(line[i]);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int d;", "d", "int w = sc.nextInt();", "w", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int[] line;", "line", "int[] a;", "a", "line = new int[w]", "line", "new int[w]", "w", "a = new int[2]", "a", "new int[2]", "2", "for(int i=0;i<w;i++) line[i] = i+1;", "int i=0;", "int i=0;", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "line[i] = i+1;", "line[i] = i+1", "line[i]", "line", "i", "i+1", "i", "1", "for(int i=0;i<n;i++){\n\t String s = sc.next();\n\t int l = s.length();\n\t int k = 0, f=0, x=0;\n\t for(int j=0;j<l;j++){\n\t\tchar c = s.charAt(j);\n\t\tif('0' > c || c > '9'){\n\t\t a[k] = Integer.parseInt(s.substring(x,j));\n\t\t k++;\n\t\t f=0;\n\t\t}else{\n\t\t if(f==0){\n\t\t\tx=j;\n\t\t\tf=1;\n\t\t } \n\t\t}\n\t }\n\t a[1] = Integer.parseInt(s.substring(x,l));\n\t d = line[a[0]-1];\n\t line[a[0]-1] = line[a[1]-1];\n\t line[a[1]-1] = d;\n\t}", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t String s = sc.next();\n\t int l = s.length();\n\t int k = 0, f=0, x=0;\n\t for(int j=0;j<l;j++){\n\t\tchar c = s.charAt(j);\n\t\tif('0' > c || c > '9'){\n\t\t a[k] = Integer.parseInt(s.substring(x,j));\n\t\t k++;\n\t\t f=0;\n\t\t}else{\n\t\t if(f==0){\n\t\t\tx=j;\n\t\t\tf=1;\n\t\t } \n\t\t}\n\t }\n\t a[1] = Integer.parseInt(s.substring(x,l));\n\t d = line[a[0]-1];\n\t line[a[0]-1] = line[a[1]-1];\n\t line[a[1]-1] = d;\n\t}", "{\n\t String s = sc.next();\n\t int l = s.length();\n\t int k = 0, f=0, x=0;\n\t for(int j=0;j<l;j++){\n\t\tchar c = s.charAt(j);\n\t\tif('0' > c || c > '9'){\n\t\t a[k] = Integer.parseInt(s.substring(x,j));\n\t\t k++;\n\t\t f=0;\n\t\t}else{\n\t\t if(f==0){\n\t\t\tx=j;\n\t\t\tf=1;\n\t\t } \n\t\t}\n\t }\n\t a[1] = Integer.parseInt(s.substring(x,l));\n\t d = line[a[0]-1];\n\t line[a[0]-1] = line[a[1]-1];\n\t line[a[1]-1] = d;\n\t}", "String s = sc.next();", "s", "sc.next()", "sc.next", "sc", "int l = s.length();", "l", "s.length()", "s.length", "s", "int k = 0", "k", "0", "f=0", "f", "0", "x=0;", "x", "0", "for(int j=0;j<l;j++){\n\t\tchar c = s.charAt(j);\n\t\tif('0' > c || c > '9'){\n\t\t a[k] = Integer.parseInt(s.substring(x,j));\n\t\t k++;\n\t\t f=0;\n\t\t}else{\n\t\t if(f==0){\n\t\t\tx=j;\n\t\t\tf=1;\n\t\t } \n\t\t}\n\t }", "int j=0;", "int j=0;", "j", "0", "j<l", "j", "l", "j++", "j++", "j", "{\n\t\tchar c = s.charAt(j);\n\t\tif('0' > c || c > '9'){\n\t\t a[k] = Integer.parseInt(s.substring(x,j));\n\t\t k++;\n\t\t f=0;\n\t\t}else{\n\t\t if(f==0){\n\t\t\tx=j;\n\t\t\tf=1;\n\t\t } \n\t\t}\n\t }", "{\n\t\tchar c = s.charAt(j);\n\t\tif('0' > c || c > '9'){\n\t\t a[k] = Integer.parseInt(s.substring(x,j));\n\t\t k++;\n\t\t f=0;\n\t\t}else{\n\t\t if(f==0){\n\t\t\tx=j;\n\t\t\tf=1;\n\t\t } \n\t\t}\n\t }", "char c = s.charAt(j);", "c", "s.charAt(j)", "s.charAt", "s", "j", "if('0' > c || c > '9'){\n\t\t a[k] = Integer.parseInt(s.substring(x,j));\n\t\t k++;\n\t\t f=0;\n\t\t}else{\n\t\t if(f==0){\n\t\t\tx=j;\n\t\t\tf=1;\n\t\t } \n\t\t}", "'0' > c || c > '9'", "'0' > c", "'0'", "c", "c > '9'", "c", "'9'", "{\n\t\t a[k] = Integer.parseInt(s.substring(x,j));\n\t\t k++;\n\t\t f=0;\n\t\t}", "a[k] = Integer.parseInt(s.substring(x,j))", "a[k]", "a", "k", "Integer.parseInt(s.substring(x,j))", "Integer.parseInt", "Integer", "s.substring(x,j)", "s.substring", "s", "x", "j", "k++", "k", "f=0", "f", "0", "{\n\t\t if(f==0){\n\t\t\tx=j;\n\t\t\tf=1;\n\t\t } \n\t\t}", "if(f==0){\n\t\t\tx=j;\n\t\t\tf=1;\n\t\t }", "f==0", "f", "0", "{\n\t\t\tx=j;\n\t\t\tf=1;\n\t\t }", "x=j", "x", "j", "f=1", "f", "1", "a[1] = Integer.parseInt(s.substring(x,l))", "a[1]", "a", "1", "Integer.parseInt(s.substring(x,l))", "Integer.parseInt", "Integer", "s.substring(x,l)", "s.substring", "s", "x", "l", "d = line[a[0]-1]", "d", "line[a[0]-1]", "line", "a[0]-1", "a[0]", "a", "0", "1", "line[a[0]-1] = line[a[1]-1]", "line[a[0]-1]", "line", "a[0]-1", "a[0]", "a", "0", "1", "line[a[1]-1]", "line", "a[1]-1", "a[1]", "a", "1", "1", "line[a[1]-1] = d", "line[a[1]-1]", "line", "a[1]-1", "a[1]", "a", "1", "1", "d", "for(int i=0;i<w;i++) System.out.println(line[i]);", "int i=0;", "int i=0;", "i", "0", "i<w", "i", "w", "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){\n\tScanner sc = new Scanner(System.in);\n\tint d;\n\tint w = sc.nextInt();\n\tint n = sc.nextInt();\n\tint[] line;\n\tint[] a;\n\tline = new int[w];\n\ta = new int[2];\n\tfor(int i=0;i<w;i++) line[i] = i+1;\n\tfor(int i=0;i<n;i++){\n\t String s = sc.next();\n\t int l = s.length();\n\t int k = 0, f=0, x=0;\n\t for(int j=0;j<l;j++){\n\t\tchar c = s.charAt(j);\n\t\tif('0' > c || c > '9'){\n\t\t a[k] = Integer.parseInt(s.substring(x,j));\n\t\t k++;\n\t\t f=0;\n\t\t}else{\n\t\t if(f==0){\n\t\t\tx=j;\n\t\t\tf=1;\n\t\t } \n\t\t}\n\t }\n\t a[1] = Integer.parseInt(s.substring(x,l));\n\t d = line[a[0]-1];\n\t line[a[0]-1] = line[a[1]-1];\n\t line[a[1]-1] = d;\n\t}\n\tfor(int i=0;i<w;i++) System.out.println(line[i]);\n }\n}", "public class Main{\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tint d;\n\tint w = sc.nextInt();\n\tint n = sc.nextInt();\n\tint[] line;\n\tint[] a;\n\tline = new int[w];\n\ta = new int[2];\n\tfor(int i=0;i<w;i++) line[i] = i+1;\n\tfor(int i=0;i<n;i++){\n\t String s = sc.next();\n\t int l = s.length();\n\t int k = 0, f=0, x=0;\n\t for(int j=0;j<l;j++){\n\t\tchar c = s.charAt(j);\n\t\tif('0' > c || c > '9'){\n\t\t a[k] = Integer.parseInt(s.substring(x,j));\n\t\t k++;\n\t\t f=0;\n\t\t}else{\n\t\t if(f==0){\n\t\t\tx=j;\n\t\t\tf=1;\n\t\t } \n\t\t}\n\t }\n\t a[1] = Integer.parseInt(s.substring(x,l));\n\t d = line[a[0]-1];\n\t line[a[0]-1] = line[a[1]-1];\n\t line[a[1]-1] = d;\n\t}\n\tfor(int i=0;i<w;i++) System.out.println(line[i]);\n }\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int d; int w = sc.nextInt(); int n = sc.nextInt(); int[] line; int[] a; line = new int[w]; a = new int[2]; for(int i=0;i<w;i++) line[i] = i+1; for(int i=0;i<n;i++){ String s = sc.next(); int l = s.length(); int k = 0, f=0, x=0; for(int j=0;j<l;j++){ char c = s.charAt(j); if('0' > c || c > '9'){ a[k] = Integer.parseInt(s.substring(x,j)); k++; f=0; }else{ if(f==0){ x=j; f=1; } } } a[1] = Integer.parseInt(s.substring(x,l)); d = line[a[0]-1]; line[a[0]-1] = line[a[1]-1]; line[a[1]-1] = d; } for(int i=0;i<w;i++) System.out.println(line[i]); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 4, 18, 20, 17, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 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, 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, 12, 13, 30, 4, 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 ], [ 11, 12 ], [ 12, 13 ], [ 11, 14 ], [ 8, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 8, 25 ], [ 25, 26 ], [ 25, 27 ], [ 28, 29 ], [ 28, 30 ], [ 8, 31 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 31, 36 ], [ 36, 37 ], [ 36, 38 ], [ 31, 39 ], [ 39, 40 ], [ 40, 41 ], [ 31, 42 ], [ 43, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 44, 48 ], [ 8, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 49, 54 ], [ 54, 55 ], [ 54, 56 ], [ 49, 57 ], [ 57, 58 ], [ 58, 59 ], [ 49, 60 ], [ 61, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 65, 66 ], [ 61, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 70, 71 ], [ 61, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 74, 76 ], [ 61, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 77, 81 ], [ 81, 82 ], [ 81, 83 ], [ 61, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 84, 88 ], [ 8, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 89, 94 ], [ 94, 95 ], [ 94, 96 ], [ 89, 97 ], [ 97, 98 ], [ 98, 99 ], [ 89, 100 ], [ 101, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 102, 107 ], [ 107, 108 ], [ 107, 109 ], [ 4, 110 ], [ 110, 111 ], [ 110, 112 ], [ 112, 113 ], [ 113, 114 ], [ 110, 115 ], [ 115, 116 ] ]
[ "import java.util.Scanner;\n\nclass Main {\n private static void solve() {\n Scanner scanner = new Scanner(System.in).useDelimiter(\"[,\\\\s]+\");\n\n int w = scanner.nextInt();\n int n = scanner.nextInt();\n int[] number = new int[w + 1];\n for (int i = 1; i <= w; i++) {\n number[i] = i;\n }\n for (int i = 0; i < n; i++) {\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int temp = number[a];\n number[a] = number[b];\n number[b] = temp;\n }\n for (int i = 1; i <= w; i++) {\n System.out.println(number[i]);\n }\n }\n\n public static void main(String... args) {\n solve();\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main {\n private static void solve() {\n Scanner scanner = new Scanner(System.in).useDelimiter(\"[,\\\\s]+\");\n\n int w = scanner.nextInt();\n int n = scanner.nextInt();\n int[] number = new int[w + 1];\n for (int i = 1; i <= w; i++) {\n number[i] = i;\n }\n for (int i = 0; i < n; i++) {\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int temp = number[a];\n number[a] = number[b];\n number[b] = temp;\n }\n for (int i = 1; i <= w; i++) {\n System.out.println(number[i]);\n }\n }\n\n public static void main(String... args) {\n solve();\n }\n}", "Main", "private static void solve() {\n Scanner scanner = new Scanner(System.in).useDelimiter(\"[,\\\\s]+\");\n\n int w = scanner.nextInt();\n int n = scanner.nextInt();\n int[] number = new int[w + 1];\n for (int i = 1; i <= w; i++) {\n number[i] = i;\n }\n for (int i = 0; i < n; i++) {\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int temp = number[a];\n number[a] = number[b];\n number[b] = temp;\n }\n for (int i = 1; i <= w; i++) {\n System.out.println(number[i]);\n }\n }", "solve", "{\n Scanner scanner = new Scanner(System.in).useDelimiter(\"[,\\\\s]+\");\n\n int w = scanner.nextInt();\n int n = scanner.nextInt();\n int[] number = new int[w + 1];\n for (int i = 1; i <= w; i++) {\n number[i] = i;\n }\n for (int i = 0; i < n; i++) {\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int temp = number[a];\n number[a] = number[b];\n number[b] = temp;\n }\n for (int i = 1; i <= w; i++) {\n System.out.println(number[i]);\n }\n }", "Scanner scanner = new Scanner(System.in).useDelimiter(\"[,\\\\s]+\");", "scanner", "new Scanner(System.in).useDelimiter(\"[,\\\\s]+\")", "new Scanner(System.in).useDelimiter", "new Scanner(System.in)", "\"[,\\\\s]+\"", "int w = scanner.nextInt();", "w", "scanner.nextInt()", "scanner.nextInt", "scanner", "int n = scanner.nextInt();", "n", "scanner.nextInt()", "scanner.nextInt", "scanner", "int[] number = new int[w + 1];", "number", "new int[w + 1]", "w + 1", "w", "1", "for (int i = 1; i <= w; i++) {\n number[i] = i;\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= w", "i", "w", "i++", "i++", "i", "{\n number[i] = i;\n }", "{\n number[i] = i;\n }", "number[i] = i", "number[i]", "number", "i", "i", "for (int i = 0; i < n; i++) {\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int temp = number[a];\n number[a] = number[b];\n number[b] = temp;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int temp = number[a];\n number[a] = number[b];\n number[b] = temp;\n }", "{\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int temp = number[a];\n number[a] = number[b];\n number[b] = temp;\n }", "int a = scanner.nextInt();", "a", "scanner.nextInt()", "scanner.nextInt", "scanner", "int b = scanner.nextInt();", "b", "scanner.nextInt()", "scanner.nextInt", "scanner", "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 = 1; i <= w; i++) {\n System.out.println(number[i]);\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= w", "i", "w", "i++", "i++", "i", "{\n System.out.println(number[i]);\n }", "{\n System.out.println(number[i]);\n }", "System.out.println(number[i])", "System.out.println", "System.out", "System", "System.out", "number[i]", "number", "i", "public static void main(String... args) {\n solve();\n }", "main", "{\n solve();\n }", "solve()", "solve", "String... args", "args" ]
import java.util.Scanner; class Main { private static void solve() { Scanner scanner = new Scanner(System.in).useDelimiter("[,\\s]+"); int w = scanner.nextInt(); int n = scanner.nextInt(); int[] number = new int[w + 1]; for (int i = 1; i <= w; i++) { number[i] = i; } for (int i = 0; i < n; i++) { int a = scanner.nextInt(); int b = scanner.nextInt(); int temp = number[a]; number[a] = number[b]; number[b] = temp; } for (int i = 1; i <= w; i++) { System.out.println(number[i]); } } public static void main(String... args) { solve(); } }
[ 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, 4, 18, 13, 17, 13, 17, 41, 13, 2, 4, 18, 13, 4, 18, 13, 2, 13, 17, 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, 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 ], [ 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 ], [ 77, 78 ], [ 76, 79 ], [ 76, 80 ], [ 72, 81 ], [ 58, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 85, 88 ], [ 88, 89 ], [ 89, 90 ], [ 88, 91 ], [ 91, 92 ], [ 91, 93 ], [ 88, 94 ], [ 94, 95 ], [ 95, 96 ], [ 84, 97 ], [ 58, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 100, 102 ], [ 58, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 103, 107 ], [ 107, 108 ], [ 107, 109 ], [ 58, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 110, 114 ], [ 8, 115 ], [ 115, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 115, 120 ], [ 120, 121 ], [ 120, 122 ], [ 115, 123 ], [ 123, 124 ], [ 124, 125 ], [ 115, 126 ], [ 127, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 130, 131 ], [ 130, 132 ], [ 128, 133 ], [ 133, 134 ], [ 133, 135 ], [ 6, 136 ], [ 136, 137 ], [ 0, 138 ], [ 138, 139 ], [ 138, 140 ] ]
[ "import java.util.Scanner;\npublic class Main {\n\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 ans[] = new int[w];\n\t\tfor (int i=0;i<w;i++) {\n\t\t\tans[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\tint a = line.indexOf(',');\n\t\t\tint x1 = Integer.parseInt(line.substring(0,a))-1;\n\t\t\tint x2 = Integer.parseInt(line.substring(a+1,line.length()))-1;\n\t\t\tint temp = ans[x1];\n\t\t\tans[x1] = ans[x2];\n\t\t\tans[x2] = temp;\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}\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 ans[] = new int[w];\n\t\tfor (int i=0;i<w;i++) {\n\t\t\tans[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\tint a = line.indexOf(',');\n\t\t\tint x1 = Integer.parseInt(line.substring(0,a))-1;\n\t\t\tint x2 = Integer.parseInt(line.substring(a+1,line.length()))-1;\n\t\t\tint temp = ans[x1];\n\t\t\tans[x1] = ans[x2];\n\t\t\tans[x2] = temp;\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}\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 ans[] = new int[w];\n\t\tfor (int i=0;i<w;i++) {\n\t\t\tans[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\tint a = line.indexOf(',');\n\t\t\tint x1 = Integer.parseInt(line.substring(0,a))-1;\n\t\t\tint x2 = Integer.parseInt(line.substring(a+1,line.length()))-1;\n\t\t\tint temp = ans[x1];\n\t\t\tans[x1] = ans[x2];\n\t\t\tans[x2] = temp;\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}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint ans[] = new int[w];\n\t\tfor (int i=0;i<w;i++) {\n\t\t\tans[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\tint a = line.indexOf(',');\n\t\t\tint x1 = Integer.parseInt(line.substring(0,a))-1;\n\t\t\tint x2 = Integer.parseInt(line.substring(a+1,line.length()))-1;\n\t\t\tint temp = ans[x1];\n\t\t\tans[x1] = ans[x2];\n\t\t\tans[x2] = temp;\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}", "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 ans[] = new int[w];", "ans", "new int[w]", "w", "for (int i=0;i<w;i++) {\n\t\t\tans[i] = i+1;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<w", "i", "w", "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", "for (int i=0;i<n;i++) {\n\t\t\tString line = sc.next();\n\t\t\tint a = line.indexOf(',');\n\t\t\tint x1 = Integer.parseInt(line.substring(0,a))-1;\n\t\t\tint x2 = Integer.parseInt(line.substring(a+1,line.length()))-1;\n\t\t\tint temp = ans[x1];\n\t\t\tans[x1] = ans[x2];\n\t\t\tans[x2] = temp;\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\tint a = line.indexOf(',');\n\t\t\tint x1 = Integer.parseInt(line.substring(0,a))-1;\n\t\t\tint x2 = Integer.parseInt(line.substring(a+1,line.length()))-1;\n\t\t\tint temp = ans[x1];\n\t\t\tans[x1] = ans[x2];\n\t\t\tans[x2] = temp;\n\t\t}", "{\n\t\t\tString line = sc.next();\n\t\t\tint a = line.indexOf(',');\n\t\t\tint x1 = Integer.parseInt(line.substring(0,a))-1;\n\t\t\tint x2 = Integer.parseInt(line.substring(a+1,line.length()))-1;\n\t\t\tint temp = ans[x1];\n\t\t\tans[x1] = ans[x2];\n\t\t\tans[x2] = temp;\n\t\t}", "String line = sc.next();", "line", "sc.next()", "sc.next", "sc", "int a = line.indexOf(',');", "a", "line.indexOf(',')", "line.indexOf", "line", "','", "int x1 = Integer.parseInt(line.substring(0,a))-1;", "x1", "Integer.parseInt(line.substring(0,a))-1", "Integer.parseInt(line.substring(0,a))", "Integer.parseInt", "Integer", "line.substring(0,a)", "line.substring", "line", "0", "a", "1", "int x2 = Integer.parseInt(line.substring(a+1,line.length()))-1;", "x2", "Integer.parseInt(line.substring(a+1,line.length()))-1", "Integer.parseInt(line.substring(a+1,line.length()))", "Integer.parseInt", "Integer", "line.substring(a+1,line.length())", "line.substring", "line", "a+1", "a", "1", "line.length()", "line.length", "line", "1", "int temp = ans[x1];", "temp", "ans[x1]", "ans", "x1", "ans[x1] = ans[x2]", "ans[x1]", "ans", "x1", "ans[x2]", "ans", "x2", "ans[x2] = temp", "ans[x2]", "ans", "x2", "temp", "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", "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 ans[] = new int[w];\n\t\tfor (int i=0;i<w;i++) {\n\t\t\tans[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\tint a = line.indexOf(',');\n\t\t\tint x1 = Integer.parseInt(line.substring(0,a))-1;\n\t\t\tint x2 = Integer.parseInt(line.substring(a+1,line.length()))-1;\n\t\t\tint temp = ans[x1];\n\t\t\tans[x1] = ans[x2];\n\t\t\tans[x2] = temp;\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}\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 ans[] = new int[w];\n\t\tfor (int i=0;i<w;i++) {\n\t\t\tans[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\tint a = line.indexOf(',');\n\t\t\tint x1 = Integer.parseInt(line.substring(0,a))-1;\n\t\t\tint x2 = Integer.parseInt(line.substring(a+1,line.length()))-1;\n\t\t\tint temp = ans[x1];\n\t\t\tans[x1] = ans[x2];\n\t\t\tans[x2] = temp;\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}\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 ans[] = new int[w]; for (int i=0;i<w;i++) { ans[i] = i+1; } for (int i=0;i<n;i++) { String line = sc.next(); int a = line.indexOf(','); int x1 = Integer.parseInt(line.substring(0,a))-1; int x2 = Integer.parseInt(line.substring(a+1,line.length()))-1; int temp = ans[x1]; ans[x1] = ans[x2]; ans[x2] = temp; } for (int i=0;i<w;i++) { System.out.println(ans[i]); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 20, 0, 13, 4, 18, 13, 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, 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, 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 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 152, 8 ], [ 152, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 11, 14 ], [ 14, 15 ], [ 11, 16 ], [ 16, 17 ], [ 11, 18 ], [ 18, 19 ], [ 11, 20 ], [ 20, 21 ], [ 11, 22 ], [ 22, 23 ], [ 22, 24 ], [ 11, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 27, 30 ], [ 30, 31 ], [ 31, 32 ], [ 11, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 35, 38 ], [ 38, 39 ], [ 39, 40 ], [ 11, 41 ], [ 41, 42 ], [ 41, 43 ], [ 11, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 45, 50 ], [ 50, 51 ], [ 50, 52 ], [ 45, 53 ], [ 53, 54 ], [ 54, 55 ], [ 45, 56 ], [ 57, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 58, 62 ], [ 62, 63 ], [ 62, 64 ], [ 11, 65 ], [ 65, 66 ], [ 11, 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 ], [ 84, 85 ], [ 85, 86 ], [ 82, 87 ], [ 79, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 94, 95 ], [ 94, 96 ], [ 90, 97 ], [ 79, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 101, 104 ], [ 104, 105 ], [ 104, 106 ], [ 100, 107 ], [ 79, 108 ], [ 108, 109 ], [ 108, 110 ], [ 110, 111 ], [ 110, 112 ], [ 79, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 113, 117 ], [ 117, 118 ], [ 117, 119 ], [ 79, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 120, 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 ], [ 11, 146 ], [ 146, 147 ], [ 147, 148 ], [ 9, 149 ], [ 149, 150 ], [ 0, 151 ], [ 151, 152 ], [ 151, 153 ] ]
[ "import java.util.Scanner;\nimport java.lang.Math;\n\npublic class Main {\n\n\tpublic static void main(String args[]){\n\n\t\tint w,n,a,b,temp;\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tw = Integer.parseInt(in.next());\n\t\tn = Integer.parseInt(in.next());\n\t\t\n\t\tint lot[] = new int[w];\n\t\t\n\t\tfor(int i=0;i<w;i++){\n\t\t\tlot[i] = i+1;\n\t\t}\n\t\t\n\t\tString[] array;\n\t\t\n\t\tfor(int i=0;i<n;i++){\n\t\t\tarray = in.next().split(\",\");\n\t\t\ta = Integer.parseInt(array[0]) -1;\n\t\t\tb = Integer.parseInt(array[1]) -1;\n\t\t\t\n\t\t\ttemp = lot[a];\n\t\t\tlot[a] = lot[b];\n\t\t\tlot[b] = temp;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(lot[i]);\n\t\t}\n\t\tin.close();\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "import java.lang.Math;", "Math", "java.lang", "public class Main {\n\n\tpublic static void main(String args[]){\n\n\t\tint w,n,a,b,temp;\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tw = Integer.parseInt(in.next());\n\t\tn = Integer.parseInt(in.next());\n\t\t\n\t\tint lot[] = new int[w];\n\t\t\n\t\tfor(int i=0;i<w;i++){\n\t\t\tlot[i] = i+1;\n\t\t}\n\t\t\n\t\tString[] array;\n\t\t\n\t\tfor(int i=0;i<n;i++){\n\t\t\tarray = in.next().split(\",\");\n\t\t\ta = Integer.parseInt(array[0]) -1;\n\t\t\tb = Integer.parseInt(array[1]) -1;\n\t\t\t\n\t\t\ttemp = lot[a];\n\t\t\tlot[a] = lot[b];\n\t\t\tlot[b] = temp;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(lot[i]);\n\t\t}\n\t\tin.close();\n\t}\n}", "Main", "public static void main(String args[]){\n\n\t\tint w,n,a,b,temp;\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tw = Integer.parseInt(in.next());\n\t\tn = Integer.parseInt(in.next());\n\t\t\n\t\tint lot[] = new int[w];\n\t\t\n\t\tfor(int i=0;i<w;i++){\n\t\t\tlot[i] = i+1;\n\t\t}\n\t\t\n\t\tString[] array;\n\t\t\n\t\tfor(int i=0;i<n;i++){\n\t\t\tarray = in.next().split(\",\");\n\t\t\ta = Integer.parseInt(array[0]) -1;\n\t\t\tb = Integer.parseInt(array[1]) -1;\n\t\t\t\n\t\t\ttemp = lot[a];\n\t\t\tlot[a] = lot[b];\n\t\t\tlot[b] = temp;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(lot[i]);\n\t\t}\n\t\tin.close();\n\t}", "main", "{\n\n\t\tint w,n,a,b,temp;\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tw = Integer.parseInt(in.next());\n\t\tn = Integer.parseInt(in.next());\n\t\t\n\t\tint lot[] = new int[w];\n\t\t\n\t\tfor(int i=0;i<w;i++){\n\t\t\tlot[i] = i+1;\n\t\t}\n\t\t\n\t\tString[] array;\n\t\t\n\t\tfor(int i=0;i<n;i++){\n\t\t\tarray = in.next().split(\",\");\n\t\t\ta = Integer.parseInt(array[0]) -1;\n\t\t\tb = Integer.parseInt(array[1]) -1;\n\t\t\t\n\t\t\ttemp = lot[a];\n\t\t\tlot[a] = lot[b];\n\t\t\tlot[b] = temp;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(lot[i]);\n\t\t}\n\t\tin.close();\n\t}", "int w", "w", "n", "n", "a", "a", "b", "b", "temp;", "temp", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "w = Integer.parseInt(in.next())", "w", "Integer.parseInt(in.next())", "Integer.parseInt", "Integer", "in.next()", "in.next", "in", "n = Integer.parseInt(in.next())", "n", "Integer.parseInt(in.next())", "Integer.parseInt", "Integer", "in.next()", "in.next", "in", "int lot[] = new int[w];", "lot", "new int[w]", "w", "for(int i=0;i<w;i++){\n\t\t\tlot[i] = i+1;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "{\n\t\t\tlot[i] = i+1;\n\t\t}", "{\n\t\t\tlot[i] = i+1;\n\t\t}", "lot[i] = i+1", "lot[i]", "lot", "i", "i+1", "i", "1", "String[] array;", "array", "for(int i=0;i<n;i++){\n\t\t\tarray = in.next().split(\",\");\n\t\t\ta = Integer.parseInt(array[0]) -1;\n\t\t\tb = Integer.parseInt(array[1]) -1;\n\t\t\t\n\t\t\ttemp = lot[a];\n\t\t\tlot[a] = lot[b];\n\t\t\tlot[b] = temp;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t\t\tarray = in.next().split(\",\");\n\t\t\ta = Integer.parseInt(array[0]) -1;\n\t\t\tb = Integer.parseInt(array[1]) -1;\n\t\t\t\n\t\t\ttemp = lot[a];\n\t\t\tlot[a] = lot[b];\n\t\t\tlot[b] = temp;\n\t\t}", "{\n\t\t\tarray = in.next().split(\",\");\n\t\t\ta = Integer.parseInt(array[0]) -1;\n\t\t\tb = Integer.parseInt(array[1]) -1;\n\t\t\t\n\t\t\ttemp = lot[a];\n\t\t\tlot[a] = lot[b];\n\t\t\tlot[b] = temp;\n\t\t}", "array = in.next().split(\",\")", "array", "in.next().split(\",\")", "in.next().split", "in.next()", "in.next", "in", "\",\"", "a = Integer.parseInt(array[0]) -1", "a", "Integer.parseInt(array[0]) -1", "Integer.parseInt(array[0])", "Integer.parseInt", "Integer", "array[0]", "array", "0", "1", "b = Integer.parseInt(array[1]) -1", "b", "Integer.parseInt(array[1]) -1", "Integer.parseInt(array[1])", "Integer.parseInt", "Integer", "array[1]", "array", "1", "1", "temp = lot[a]", "temp", "lot[a]", "lot", "a", "lot[a] = lot[b]", "lot[a]", "lot", "a", "lot[b]", "lot", "b", "lot[b] = temp", "lot[b]", "lot", "b", "temp", "for(int i=0;i<w;i++){\n\t\t\tSystem.out.println(lot[i]);\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(lot[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(lot[i]);\n\t\t}", "System.out.println(lot[i])", "System.out.println", "System.out", "System", "System.out", "lot[i]", "lot", "i", "in.close()", "in.close", "in", "String args[]", "args", "public class Main {\n\n\tpublic static void main(String args[]){\n\n\t\tint w,n,a,b,temp;\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tw = Integer.parseInt(in.next());\n\t\tn = Integer.parseInt(in.next());\n\t\t\n\t\tint lot[] = new int[w];\n\t\t\n\t\tfor(int i=0;i<w;i++){\n\t\t\tlot[i] = i+1;\n\t\t}\n\t\t\n\t\tString[] array;\n\t\t\n\t\tfor(int i=0;i<n;i++){\n\t\t\tarray = in.next().split(\",\");\n\t\t\ta = Integer.parseInt(array[0]) -1;\n\t\t\tb = Integer.parseInt(array[1]) -1;\n\t\t\t\n\t\t\ttemp = lot[a];\n\t\t\tlot[a] = lot[b];\n\t\t\tlot[b] = temp;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(lot[i]);\n\t\t}\n\t\tin.close();\n\t}\n}", "public class Main {\n\n\tpublic static void main(String args[]){\n\n\t\tint w,n,a,b,temp;\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tw = Integer.parseInt(in.next());\n\t\tn = Integer.parseInt(in.next());\n\t\t\n\t\tint lot[] = new int[w];\n\t\t\n\t\tfor(int i=0;i<w;i++){\n\t\t\tlot[i] = i+1;\n\t\t}\n\t\t\n\t\tString[] array;\n\t\t\n\t\tfor(int i=0;i<n;i++){\n\t\t\tarray = in.next().split(\",\");\n\t\t\ta = Integer.parseInt(array[0]) -1;\n\t\t\tb = Integer.parseInt(array[1]) -1;\n\t\t\t\n\t\t\ttemp = lot[a];\n\t\t\tlot[a] = lot[b];\n\t\t\tlot[b] = temp;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(lot[i]);\n\t\t}\n\t\tin.close();\n\t}\n}", "Main" ]
import java.util.Scanner; import java.lang.Math; public class Main { public static void main(String args[]){ int w,n,a,b,temp; Scanner in = new Scanner(System.in); w = Integer.parseInt(in.next()); n = Integer.parseInt(in.next()); int lot[] = new int[w]; for(int i=0;i<w;i++){ lot[i] = i+1; } String[] array; for(int i=0;i<n;i++){ array = in.next().split(","); a = Integer.parseInt(array[0]) -1; b = Integer.parseInt(array[1]) -1; temp = lot[a]; lot[a] = lot[b]; lot[b] = temp; } for(int i=0;i<w;i++){ System.out.println(lot[i]); } in.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, 0, 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, 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, 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, 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 ], [ 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 ], [ 8, 24 ], [ 24, 25 ], [ 24, 26 ], [ 8, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 28, 33 ], [ 33, 34 ], [ 33, 35 ], [ 28, 36 ], [ 36, 37 ], [ 37, 38 ], [ 28, 39 ], [ 40, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 41, 45 ], [ 45, 46 ], [ 45, 47 ], [ 8, 48 ], [ 48, 49 ], [ 49, 50 ], [ 48, 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 ], [ 78, 79 ], [ 64, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 84, 86 ], [ 64, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 90, 92 ], [ 87, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 95, 97 ], [ 64, 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 ], [ 105, 113 ], [ 113, 114 ], [ 114, 115 ], [ 105, 116 ], [ 117, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 120, 122 ], [ 118, 123 ], [ 123, 124 ], [ 123, 125 ], [ 8, 126 ], [ 126, 127 ], [ 127, 128 ], [ 6, 129 ], [ 129, 130 ], [ 0, 131 ], [ 131, 132 ], [ 131, 133 ] ]
[ "import java.util.Scanner;\n\n\npublic class Main{\n \n public static void main(String[] args) {\n Scanner sc =new Scanner(System.in);\n \n int w =sc.nextInt();\n int n=sc.nextInt();\n \n int[] num;\n num=new int[w];\n\n for(int i=0;i<w;i++){\n\n num[i]=i+1;\n\n }\n sc.useDelimiter(\",|\\n\");\n for(int i=0;i<n;i++){\n\n String str=sc.nextLine();\n int a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n int temp = num[a-1];\n num[a-1] = num[b-1];\n num[b-1] = temp;\n \n }\n\n\n\n for(int i=0;i<w;i++){\n\n System.out.println(num[i]);\n }\n\n sc.close();\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n \n public static void main(String[] args) {\n Scanner sc =new Scanner(System.in);\n \n int w =sc.nextInt();\n int n=sc.nextInt();\n \n int[] num;\n num=new int[w];\n\n for(int i=0;i<w;i++){\n\n num[i]=i+1;\n\n }\n sc.useDelimiter(\",|\\n\");\n for(int i=0;i<n;i++){\n\n String str=sc.nextLine();\n int a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n int temp = num[a-1];\n num[a-1] = num[b-1];\n num[b-1] = temp;\n \n }\n\n\n\n for(int i=0;i<w;i++){\n\n System.out.println(num[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 w =sc.nextInt();\n int n=sc.nextInt();\n \n int[] num;\n num=new int[w];\n\n for(int i=0;i<w;i++){\n\n num[i]=i+1;\n\n }\n sc.useDelimiter(\",|\\n\");\n for(int i=0;i<n;i++){\n\n String str=sc.nextLine();\n int a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n int temp = num[a-1];\n num[a-1] = num[b-1];\n num[b-1] = temp;\n \n }\n\n\n\n for(int i=0;i<w;i++){\n\n System.out.println(num[i]);\n }\n\n sc.close();\n }", "main", "{\n Scanner sc =new Scanner(System.in);\n \n int w =sc.nextInt();\n int n=sc.nextInt();\n \n int[] num;\n num=new int[w];\n\n for(int i=0;i<w;i++){\n\n num[i]=i+1;\n\n }\n sc.useDelimiter(\",|\\n\");\n for(int i=0;i<n;i++){\n\n String str=sc.nextLine();\n int a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n int temp = num[a-1];\n num[a-1] = num[b-1];\n num[b-1] = temp;\n \n }\n\n\n\n for(int i=0;i<w;i++){\n\n System.out.println(num[i]);\n }\n\n sc.close();\n }", "Scanner sc =new Scanner(System.in);", "sc", "new Scanner(System.in)", "int w =sc.nextInt();", "w", "sc.nextInt()", "sc.nextInt", "sc", "int n=sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int[] num;", "num", "num=new int[w]", "num", "new int[w]", "w", "for(int i=0;i<w;i++){\n\n num[i]=i+1;\n\n }", "int i=0;", "int i=0;", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "{\n\n num[i]=i+1;\n\n }", "{\n\n num[i]=i+1;\n\n }", "num[i]=i+1", "num[i]", "num", "i", "i+1", "i", "1", "sc.useDelimiter(\",|\\n\")", "sc.useDelimiter", "sc", "\",|\\n\"", "for(int i=0;i<n;i++){\n\n String str=sc.nextLine();\n int a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n int temp = num[a-1];\n num[a-1] = num[b-1];\n num[b-1] = temp;\n \n }", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\n String str=sc.nextLine();\n int a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n int temp = num[a-1];\n num[a-1] = num[b-1];\n num[b-1] = temp;\n \n }", "{\n\n String str=sc.nextLine();\n int a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n int temp = num[a-1];\n num[a-1] = num[b-1];\n num[b-1] = temp;\n \n }", "String str=sc.nextLine();", "str", "sc.nextLine()", "sc.nextLine", "sc", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "int b = sc.nextInt();", "b", "sc.nextInt()", "sc.nextInt", "sc", "int temp = num[a-1];", "temp", "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] = temp", "num[b-1]", "num", "b-1", "b", "1", "temp", "for(int i=0;i<w;i++){\n\n System.out.println(num[i]);\n }", "int i=0;", "int i=0;", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "{\n\n System.out.println(num[i]);\n }", "{\n\n System.out.println(num[i]);\n }", "System.out.println(num[i])", "System.out.println", "System.out", "System", "System.out", "num[i]", "num", "i", "sc.close()", "sc.close", "sc", "String[] args", "args", "public class Main{\n \n public static void main(String[] args) {\n Scanner sc =new Scanner(System.in);\n \n int w =sc.nextInt();\n int n=sc.nextInt();\n \n int[] num;\n num=new int[w];\n\n for(int i=0;i<w;i++){\n\n num[i]=i+1;\n\n }\n sc.useDelimiter(\",|\\n\");\n for(int i=0;i<n;i++){\n\n String str=sc.nextLine();\n int a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n int temp = num[a-1];\n num[a-1] = num[b-1];\n num[b-1] = temp;\n \n }\n\n\n\n for(int i=0;i<w;i++){\n\n System.out.println(num[i]);\n }\n\n sc.close();\n }\n}", "public class Main{\n \n public static void main(String[] args) {\n Scanner sc =new Scanner(System.in);\n \n int w =sc.nextInt();\n int n=sc.nextInt();\n \n int[] num;\n num=new int[w];\n\n for(int i=0;i<w;i++){\n\n num[i]=i+1;\n\n }\n sc.useDelimiter(\",|\\n\");\n for(int i=0;i<n;i++){\n\n String str=sc.nextLine();\n int a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n int temp = num[a-1];\n num[a-1] = num[b-1];\n num[b-1] = temp;\n \n }\n\n\n\n for(int i=0;i<w;i++){\n\n System.out.println(num[i]);\n }\n\n sc.close();\n }\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner sc =new Scanner(System.in); int w =sc.nextInt(); int n=sc.nextInt(); int[] num; num=new int[w]; for(int i=0;i<w;i++){ num[i]=i+1; } sc.useDelimiter(",|\n"); for(int i=0;i<n;i++){ String str=sc.nextLine(); int a = sc.nextInt(); int b = sc.nextInt(); int temp = num[a-1]; num[a-1] = num[b-1]; num[b-1] = temp; } for(int i=0;i<w;i++){ System.out.println(num[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, 41, 13, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 2, 4, 18, 13, 17, 41, 13, 2, 4, 18, 13, 17, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 11, 1, 0, 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 ], [ 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 ], [ 8, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 34, 39 ], [ 39, 40 ], [ 39, 41 ], [ 34, 42 ], [ 42, 43 ], [ 43, 44 ], [ 34, 45 ], [ 46, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 47, 51 ], [ 51, 52 ], [ 51, 53 ], [ 8, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 54, 59 ], [ 59, 60 ], [ 59, 61 ], [ 54, 62 ], [ 62, 63 ], [ 63, 64 ], [ 54, 65 ], [ 66, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 69, 73 ], [ 66, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 76, 80 ], [ 66, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 83, 85 ], [ 66, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 86, 90 ], [ 90, 91 ], [ 90, 92 ], [ 66, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 93, 97 ], [ 8, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 98, 103 ], [ 103, 104 ], [ 103, 105 ], [ 98, 106 ], [ 106, 107 ], [ 107, 108 ], [ 98, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 110, 115 ], [ 115, 116 ], [ 115, 117 ], [ 8, 118 ], [ 118, 119 ], [ 119, 120 ], [ 6, 121 ], [ 121, 122 ], [ 0, 123 ], [ 123, 124 ], [ 123, 125 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n sc.useDelimiter(\",|\\n\");\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] num;\n num = new int[w];\n int i;\n for(i=0;i<w;i++){\n num[i] = i+1;\n }\n for(int j=0;j<n;j++){\n int a = sc.nextInt() - 1;\n int b = sc.nextInt() - 1;\n int temp = num[a];\n num[a] = num[b];\n num[b] = temp;\n }\n for(i=0;i<w;i++) System.out.println(num[i]);\n sc.close();\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n sc.useDelimiter(\",|\\n\");\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] num;\n num = new int[w];\n int i;\n for(i=0;i<w;i++){\n num[i] = i+1;\n }\n for(int j=0;j<n;j++){\n int a = sc.nextInt() - 1;\n int b = sc.nextInt() - 1;\n int temp = num[a];\n num[a] = num[b];\n num[b] = temp;\n }\n for(i=0;i<w;i++) System.out.println(num[i]);\n sc.close();\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n sc.useDelimiter(\",|\\n\");\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] num;\n num = new int[w];\n int i;\n for(i=0;i<w;i++){\n num[i] = i+1;\n }\n for(int j=0;j<n;j++){\n int a = sc.nextInt() - 1;\n int b = sc.nextInt() - 1;\n int temp = num[a];\n num[a] = num[b];\n num[b] = temp;\n }\n for(i=0;i<w;i++) System.out.println(num[i]);\n sc.close();\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n sc.useDelimiter(\",|\\n\");\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] num;\n num = new int[w];\n int i;\n for(i=0;i<w;i++){\n num[i] = i+1;\n }\n for(int j=0;j<n;j++){\n int a = sc.nextInt() - 1;\n int b = sc.nextInt() - 1;\n int temp = num[a];\n num[a] = num[b];\n num[b] = temp;\n }\n for(i=0;i<w;i++) System.out.println(num[i]);\n sc.close();\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "sc.useDelimiter(\",|\\n\")", "sc.useDelimiter", "sc", "\",|\\n\"", "int w = sc.nextInt();", "w", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int[] num;", "num", "num = new int[w]", "num", "new int[w]", "w", "int i;", "i", "for(i=0;i<w;i++){\n num[i] = i+1;\n }", "i=0;", "i=0", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "{\n num[i] = i+1;\n }", "{\n num[i] = i+1;\n }", "num[i] = i+1", "num[i]", "num", "i", "i+1", "i", "1", "for(int j=0;j<n;j++){\n int a = sc.nextInt() - 1;\n int b = sc.nextInt() - 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 int a = sc.nextInt() - 1;\n int b = sc.nextInt() - 1;\n int temp = num[a];\n num[a] = num[b];\n num[b] = temp;\n }", "{\n int a = sc.nextInt() - 1;\n int b = sc.nextInt() - 1;\n int temp = num[a];\n num[a] = num[b];\n num[b] = temp;\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 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(i=0;i<w;i++) System.out.println(num[i]);", "i=0;", "i=0", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "System.out.println(num[i]);", "System.out.println(num[i])", "System.out.println", "System.out", "System", "System.out", "num[i]", "num", "i", "sc.close()", "sc.close", "sc", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n sc.useDelimiter(\",|\\n\");\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] num;\n num = new int[w];\n int i;\n for(i=0;i<w;i++){\n num[i] = i+1;\n }\n for(int j=0;j<n;j++){\n int a = sc.nextInt() - 1;\n int b = sc.nextInt() - 1;\n int temp = num[a];\n num[a] = num[b];\n num[b] = temp;\n }\n for(i=0;i<w;i++) System.out.println(num[i]);\n sc.close();\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n sc.useDelimiter(\",|\\n\");\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] num;\n num = new int[w];\n int i;\n for(i=0;i<w;i++){\n num[i] = i+1;\n }\n for(int j=0;j<n;j++){\n int a = sc.nextInt() - 1;\n int b = sc.nextInt() - 1;\n int temp = num[a];\n num[a] = num[b];\n num[b] = temp;\n }\n for(i=0;i<w;i++) System.out.println(num[i]);\n sc.close();\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); sc.useDelimiter(",|\n"); int w = sc.nextInt(); int n = sc.nextInt(); int[] num; num = new int[w]; int i; for(i=0;i<w;i++){ num[i] = i+1; } for(int j=0;j<n;j++){ int a = sc.nextInt() - 1; int b = sc.nextInt() - 1; int temp = num[a]; num[a] = num[b]; num[b] = temp; } for(i=0;i<w;i++) System.out.println(num[i]); sc.close(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 42, 2, 40, 13, 17, 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, 0, 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 ], [ 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 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 26 ], [ 26, 27 ], [ 26, 28 ], [ 8, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 29, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 36, 38 ], [ 29, 39 ], [ 39, 40 ], [ 40, 41 ], [ 29, 42 ], [ 43, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 44, 48 ], [ 48, 49 ], [ 48, 50 ], [ 8, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 52, 55 ], [ 51, 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 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 71, 74 ], [ 74, 75 ], [ 74, 76 ], [ 70, 77 ], [ 56, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 81, 84 ], [ 84, 85 ], [ 84, 86 ], [ 80, 87 ], [ 56, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 90, 92 ], [ 56, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 93, 97 ], [ 97, 98 ], [ 97, 99 ], [ 56, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 100, 104 ], [ 8, 105 ], [ 105, 106 ], [ 105, 107 ], [ 105, 108 ], [ 109, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 110, 115 ], [ 6, 116 ], [ 116, 117 ], [ 0, 118 ], [ 118, 119 ], [ 118, 120 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int w = scan.nextInt();//縦線の数\n int n = scan.nextInt();//横線の本数\n int[] amida = new int[w];\n int copy = 0;\n for(int i=0;i<amida.length;i++){\n amida[i] = i+1;\n }\n while(n-->0){\n String str = scan.next();\n String[] ab = str.split(\",\");\n int a = Integer.parseInt(ab[0]) - 1;\n int b = Integer.parseInt(ab[1]) - 1;\n copy = amida[a];\n amida[a] = amida[b];\n amida[b] = copy;\n }\n for(int s: amida){\n System.out.println(s);\n }\n }\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int w = scan.nextInt();//縦線の数\n int n = scan.nextInt();//横線の本数\n int[] amida = new int[w];\n int copy = 0;\n for(int i=0;i<amida.length;i++){\n amida[i] = i+1;\n }\n while(n-->0){\n String str = scan.next();\n String[] ab = str.split(\",\");\n int a = Integer.parseInt(ab[0]) - 1;\n int b = Integer.parseInt(ab[1]) - 1;\n copy = amida[a];\n amida[a] = amida[b];\n amida[b] = copy;\n }\n for(int s: amida){\n System.out.println(s);\n }\n }\n\n}", "Main", "public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int w = scan.nextInt();//縦線の数\n int n = scan.nextInt();//横線の本数\n int[] amida = new int[w];\n int copy = 0;\n for(int i=0;i<amida.length;i++){\n amida[i] = i+1;\n }\n while(n-->0){\n String str = scan.next();\n String[] ab = str.split(\",\");\n int a = Integer.parseInt(ab[0]) - 1;\n int b = Integer.parseInt(ab[1]) - 1;\n copy = amida[a];\n amida[a] = amida[b];\n amida[b] = copy;\n }\n for(int s: amida){\n System.out.println(s);\n }\n }", "main", "{\n Scanner scan = new Scanner(System.in);\n int w = scan.nextInt();//縦線の数\n int n = scan.nextInt();//横線の本数\n int[] amida = new int[w];\n int copy = 0;\n for(int i=0;i<amida.length;i++){\n amida[i] = i+1;\n }\n while(n-->0){\n String str = scan.next();\n String[] ab = str.split(\",\");\n int a = Integer.parseInt(ab[0]) - 1;\n int b = Integer.parseInt(ab[1]) - 1;\n copy = amida[a];\n amida[a] = amida[b];\n amida[b] = copy;\n }\n for(int s: amida){\n System.out.println(s);\n }\n }", "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 = new int[w];", "amida", "new int[w]", "w", "int copy = 0;", "copy", "0", "for(int i=0;i<amida.length;i++){\n amida[i] = i+1;\n }", "int i=0;", "int i=0;", "i", "0", "i<amida.length", "i", "amida.length", "amida", "amida.length", "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", "while(n-->0){\n String str = scan.next();\n String[] ab = str.split(\",\");\n int a = Integer.parseInt(ab[0]) - 1;\n int b = Integer.parseInt(ab[1]) - 1;\n copy = amida[a];\n amida[a] = amida[b];\n amida[b] = copy;\n }", "n-->0", "n--", "n", "0", "{\n String str = scan.next();\n String[] ab = str.split(\",\");\n int a = Integer.parseInt(ab[0]) - 1;\n int b = Integer.parseInt(ab[1]) - 1;\n copy = amida[a];\n amida[a] = amida[b];\n amida[b] = copy;\n }", "String str = scan.next();", "str", "scan.next()", "scan.next", "scan", "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", "copy = amida[a]", "copy", "amida[a]", "amida", "a", "amida[a] = amida[b]", "amida[a]", "amida", "a", "amida[b]", "amida", "b", "amida[b] = copy", "amida[b]", "amida", "b", "copy", "for(int s: amida){\n System.out.println(s);\n }", "int s", "amida", "{\n System.out.println(s);\n }", "{\n System.out.println(s);\n }", "System.out.println(s)", "System.out.println", "System.out", "System", "System.out", "s", "String[] args", "args", "public class Main {\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int w = scan.nextInt();//縦線の数\n int n = scan.nextInt();//横線の本数\n int[] amida = new int[w];\n int copy = 0;\n for(int i=0;i<amida.length;i++){\n amida[i] = i+1;\n }\n while(n-->0){\n String str = scan.next();\n String[] ab = str.split(\",\");\n int a = Integer.parseInt(ab[0]) - 1;\n int b = Integer.parseInt(ab[1]) - 1;\n copy = amida[a];\n amida[a] = amida[b];\n amida[b] = copy;\n }\n for(int s: amida){\n System.out.println(s);\n }\n }\n\n}", "public class Main {\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int w = scan.nextInt();//縦線の数\n int n = scan.nextInt();//横線の本数\n int[] amida = new int[w];\n int copy = 0;\n for(int i=0;i<amida.length;i++){\n amida[i] = i+1;\n }\n while(n-->0){\n String str = scan.next();\n String[] ab = str.split(\",\");\n int a = Integer.parseInt(ab[0]) - 1;\n int b = Integer.parseInt(ab[1]) - 1;\n copy = amida[a];\n amida[a] = amida[b];\n amida[b] = copy;\n }\n for(int s: amida){\n System.out.println(s);\n }\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 = scan.nextInt();//縦線の数 int n = scan.nextInt();//横線の本数 int[] amida = new int[w]; int copy = 0; for(int i=0;i<amida.length;i++){ amida[i] = i+1; } while(n-->0){ String str = scan.next(); String[] ab = str.split(","); int a = Integer.parseInt(ab[0]) - 1; int b = Integer.parseInt(ab[1]) - 1; copy = amida[a]; amida[a] = amida[b]; amida[b] = copy; } for(int s: amida){ System.out.println(s); } } }
[ 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, 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 ], [ 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 ], [ 129, 130 ], [ 129, 131 ], [ 6, 132 ], [ 132, 133 ], [ 0, 134 ], [ 134, 135 ], [ 134, 136 ] ]
[ "import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n int w=sc.nextInt();\n int n=sc.nextInt();\n int[] a=new int[w];\n for(int i=0;i<a.length;i++){\n a[i]=i+1;\n }\n for(int j=0;j<n;j++){\n String str=sc.next();\n String[] bc=str.split(\",\");\n int b=Integer.parseInt(bc[0])-1;\n int c=Integer.parseInt(bc[1])-1;\n int x=a[b];\n a[b]=a[c];\n a[c]=x;\n }\n for(int k=0;k<a.length;k++){\n System.out.println(a[k]);\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[w];\n for(int i=0;i<a.length;i++){\n a[i]=i+1;\n }\n for(int j=0;j<n;j++){\n String str=sc.next();\n String[] bc=str.split(\",\");\n int b=Integer.parseInt(bc[0])-1;\n int c=Integer.parseInt(bc[1])-1;\n int x=a[b];\n a[b]=a[c];\n a[c]=x;\n }\n for(int k=0;k<a.length;k++){\n System.out.println(a[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[w];\n for(int i=0;i<a.length;i++){\n a[i]=i+1;\n }\n for(int j=0;j<n;j++){\n String str=sc.next();\n String[] bc=str.split(\",\");\n int b=Integer.parseInt(bc[0])-1;\n int c=Integer.parseInt(bc[1])-1;\n int x=a[b];\n a[b]=a[c];\n a[c]=x;\n }\n for(int k=0;k<a.length;k++){\n System.out.println(a[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[w];\n for(int i=0;i<a.length;i++){\n a[i]=i+1;\n }\n for(int j=0;j<n;j++){\n String str=sc.next();\n String[] bc=str.split(\",\");\n int b=Integer.parseInt(bc[0])-1;\n int c=Integer.parseInt(bc[1])-1;\n int x=a[b];\n a[b]=a[c];\n a[c]=x;\n }\n for(int k=0;k<a.length;k++){\n System.out.println(a[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[w];", "a", "new int[w]", "w", "for(int i=0;i<a.length;i++){\n a[i]=i+1;\n }", "int i=0;", "int i=0;", "i", "0", "i<a.length", "i", "a.length", "a", "a.length", "i++", "i++", "i", "{\n a[i]=i+1;\n }", "{\n a[i]=i+1;\n }", "a[i]=i+1", "a[i]", "a", "i", "i+1", "i", "1", "for(int j=0;j<n;j++){\n String str=sc.next();\n String[] bc=str.split(\",\");\n int b=Integer.parseInt(bc[0])-1;\n int c=Integer.parseInt(bc[1])-1;\n int x=a[b];\n a[b]=a[c];\n a[c]=x;\n }", "int j=0;", "int j=0;", "j", "0", "j<n", "j", "n", "j++", "j++", "j", "{\n String str=sc.next();\n String[] bc=str.split(\",\");\n int b=Integer.parseInt(bc[0])-1;\n int c=Integer.parseInt(bc[1])-1;\n int x=a[b];\n a[b]=a[c];\n a[c]=x;\n }", "{\n String str=sc.next();\n String[] bc=str.split(\",\");\n int b=Integer.parseInt(bc[0])-1;\n int c=Integer.parseInt(bc[1])-1;\n int x=a[b];\n a[b]=a[c];\n a[c]=x;\n }", "String str=sc.next();", "str", "sc.next()", "sc.next", "sc", "String[] bc=str.split(\",\");", "bc", "str.split(\",\")", "str.split", "str", "\",\"", "int b=Integer.parseInt(bc[0])-1;", "b", "Integer.parseInt(bc[0])-1", "Integer.parseInt(bc[0])", "Integer.parseInt", "Integer", "bc[0]", "bc", "0", "1", "int c=Integer.parseInt(bc[1])-1;", "c", "Integer.parseInt(bc[1])-1", "Integer.parseInt(bc[1])", "Integer.parseInt", "Integer", "bc[1]", "bc", "1", "1", "int x=a[b];", "x", "a[b]", "a", "b", "a[b]=a[c]", "a[b]", "a", "b", "a[c]", "a", "c", "a[c]=x", "a[c]", "a", "c", "x", "for(int k=0;k<a.length;k++){\n System.out.println(a[k]);\n }", "int k=0;", "int k=0;", "k", "0", "k<a.length", "k", "a.length", "a", "a.length", "k++", "k++", "k", "{\n System.out.println(a[k]);\n }", "{\n System.out.println(a[k]);\n }", "System.out.println(a[k])", "System.out.println", "System.out", "System", "System.out", "a[k]", "a", "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[w];\n for(int i=0;i<a.length;i++){\n a[i]=i+1;\n }\n for(int j=0;j<n;j++){\n String str=sc.next();\n String[] bc=str.split(\",\");\n int b=Integer.parseInt(bc[0])-1;\n int c=Integer.parseInt(bc[1])-1;\n int x=a[b];\n a[b]=a[c];\n a[c]=x;\n }\n for(int k=0;k<a.length;k++){\n System.out.println(a[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[w];\n for(int i=0;i<a.length;i++){\n a[i]=i+1;\n }\n for(int j=0;j<n;j++){\n String str=sc.next();\n String[] bc=str.split(\",\");\n int b=Integer.parseInt(bc[0])-1;\n int c=Integer.parseInt(bc[1])-1;\n int x=a[b];\n a[b]=a[c];\n a[c]=x;\n }\n for(int k=0;k<a.length;k++){\n System.out.println(a[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[w]; for(int i=0;i<a.length;i++){ a[i]=i+1; } for(int j=0;j<n;j++){ String str=sc.next(); String[] bc=str.split(","); int b=Integer.parseInt(bc[0])-1; int c=Integer.parseInt(bc[1])-1; int x=a[b]; a[b]=a[c]; a[c]=x; } for(int k=0;k<a.length;k++){ System.out.println(a[k]); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 127, 5 ], [ 127, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 20, 21 ], [ 20, 22 ], [ 8, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 23, 28 ], [ 28, 29 ], [ 28, 30 ], [ 23, 31 ], [ 31, 32 ], [ 32, 33 ], [ 23, 34 ], [ 35, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 36, 40 ], [ 8, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 44, 45 ], [ 8, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 61, 66 ], [ 58, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 70, 71 ], [ 69, 72 ], [ 72, 73 ], [ 72, 74 ], [ 58, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 78, 79 ], [ 77, 80 ], [ 80, 81 ], [ 80, 82 ], [ 58, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 85, 87 ], [ 58, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 88, 92 ], [ 92, 93 ], [ 92, 94 ], [ 58, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 95, 99 ], [ 8, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 100, 105 ], [ 105, 106 ], [ 105, 107 ], [ 100, 108 ], [ 108, 109 ], [ 109, 110 ], [ 100, 111 ], [ 112, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 113, 118 ], [ 118, 119 ], [ 118, 120 ], [ 8, 121 ], [ 121, 122 ], [ 122, 123 ], [ 6, 124 ], [ 124, 125 ], [ 0, 126 ], [ 126, 127 ], [ 126, 128 ] ]
[ "import java.util.Scanner;\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\tint w=sc.nextInt();\n\t\tint num[]=new int[w+1];\n\t\tfor(int i=1;i<=w;i++){\n\t\t\tnum[i]=i;\n\t\t}\n\n\t\tint n=sc.nextInt();\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] str=sc.next().split(\",\");\n\t\t\tint a=Integer.parseInt(str[0]);\n\t\t\tint b=Integer.parseInt(str[1]);\n\t\t\tint c=num[a];\n\t\t\tnum[a]=num[b];\n\t\t\tnum[b]=c;\n\t\t}\n\n\t\tfor(int i=1;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\tpublic static void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\tint w=sc.nextInt();\n\t\tint num[]=new int[w+1];\n\t\tfor(int i=1;i<=w;i++){\n\t\t\tnum[i]=i;\n\t\t}\n\n\t\tint n=sc.nextInt();\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] str=sc.next().split(\",\");\n\t\t\tint a=Integer.parseInt(str[0]);\n\t\t\tint b=Integer.parseInt(str[1]);\n\t\t\tint c=num[a];\n\t\t\tnum[a]=num[b];\n\t\t\tnum[b]=c;\n\t\t}\n\n\t\tfor(int i=1;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\tScanner sc=new Scanner(System.in);\n\t\tint w=sc.nextInt();\n\t\tint num[]=new int[w+1];\n\t\tfor(int i=1;i<=w;i++){\n\t\t\tnum[i]=i;\n\t\t}\n\n\t\tint n=sc.nextInt();\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] str=sc.next().split(\",\");\n\t\t\tint a=Integer.parseInt(str[0]);\n\t\t\tint b=Integer.parseInt(str[1]);\n\t\t\tint c=num[a];\n\t\t\tnum[a]=num[b];\n\t\t\tnum[b]=c;\n\t\t}\n\n\t\tfor(int i=1;i<=w;i++){\n\t\t\tSystem.out.println(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 num[]=new int[w+1];\n\t\tfor(int i=1;i<=w;i++){\n\t\t\tnum[i]=i;\n\t\t}\n\n\t\tint n=sc.nextInt();\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] str=sc.next().split(\",\");\n\t\t\tint a=Integer.parseInt(str[0]);\n\t\t\tint b=Integer.parseInt(str[1]);\n\t\t\tint c=num[a];\n\t\t\tnum[a]=num[b];\n\t\t\tnum[b]=c;\n\t\t}\n\n\t\tfor(int i=1;i<=w;i++){\n\t\t\tSystem.out.println(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 num[]=new int[w+1];", "num", "new int[w+1]", "w+1", "w", "1", "for(int i=1;i<=w;i++){\n\t\t\tnum[i]=i;\n\t\t}", "int i=1;", "int i=1;", "i", "1", "i<=w", "i", "w", "i++", "i++", "i", "{\n\t\t\tnum[i]=i;\n\t\t}", "{\n\t\t\tnum[i]=i;\n\t\t}", "num[i]=i", "num[i]", "num", "i", "i", "int n=sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "for(int i=0;i<n;i++){\n\t\t\tString[] str=sc.next().split(\",\");\n\t\t\tint a=Integer.parseInt(str[0]);\n\t\t\tint b=Integer.parseInt(str[1]);\n\t\t\tint c=num[a];\n\t\t\tnum[a]=num[b];\n\t\t\tnum[b]=c;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t\t\tString[] str=sc.next().split(\",\");\n\t\t\tint a=Integer.parseInt(str[0]);\n\t\t\tint b=Integer.parseInt(str[1]);\n\t\t\tint c=num[a];\n\t\t\tnum[a]=num[b];\n\t\t\tnum[b]=c;\n\t\t}", "{\n\t\t\tString[] str=sc.next().split(\",\");\n\t\t\tint a=Integer.parseInt(str[0]);\n\t\t\tint b=Integer.parseInt(str[1]);\n\t\t\tint c=num[a];\n\t\t\tnum[a]=num[b];\n\t\t\tnum[b]=c;\n\t\t}", "String[] str=sc.next().split(\",\");", "str", "sc.next().split(\",\")", "sc.next().split", "sc.next()", "sc.next", "sc", "\",\"", "int a=Integer.parseInt(str[0]);", "a", "Integer.parseInt(str[0])", "Integer.parseInt", "Integer", "str[0]", "str", "0", "int b=Integer.parseInt(str[1]);", "b", "Integer.parseInt(str[1])", "Integer.parseInt", "Integer", "str[1]", "str", "1", "int c=num[a];", "c", "num[a]", "num", "a", "num[a]=num[b]", "num[a]", "num", "a", "num[b]", "num", "b", "num[b]=c", "num[b]", "num", "b", "c", "for(int i=1;i<=w;i++){\n\t\t\tSystem.out.println(num[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(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\tpublic static void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\tint w=sc.nextInt();\n\t\tint num[]=new int[w+1];\n\t\tfor(int i=1;i<=w;i++){\n\t\t\tnum[i]=i;\n\t\t}\n\n\t\tint n=sc.nextInt();\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] str=sc.next().split(\",\");\n\t\t\tint a=Integer.parseInt(str[0]);\n\t\t\tint b=Integer.parseInt(str[1]);\n\t\t\tint c=num[a];\n\t\t\tnum[a]=num[b];\n\t\t\tnum[b]=c;\n\t\t}\n\n\t\tfor(int i=1;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\tpublic static void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\tint w=sc.nextInt();\n\t\tint num[]=new int[w+1];\n\t\tfor(int i=1;i<=w;i++){\n\t\t\tnum[i]=i;\n\t\t}\n\n\t\tint n=sc.nextInt();\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] str=sc.next().split(\",\");\n\t\t\tint a=Integer.parseInt(str[0]);\n\t\t\tint b=Integer.parseInt(str[1]);\n\t\t\tint c=num[a];\n\t\t\tnum[a]=num[b];\n\t\t\tnum[b]=c;\n\t\t}\n\n\t\tfor(int i=1;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){ Scanner sc=new Scanner(System.in); int w=sc.nextInt(); int num[]=new int[w+1]; for(int i=1;i<=w;i++){ num[i]=i; } int n=sc.nextInt(); for(int i=0;i<n;i++){ String[] str=sc.next().split(","); int a=Integer.parseInt(str[0]); int b=Integer.parseInt(str[1]); int c=num[a]; num[a]=num[b]; num[b]=c; } for(int i=1;i<=w;i++){ System.out.println(num[i]); } sc.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 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, 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, 17, 0, 18, 13, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 18, 13, 18, 18, 13, 13, 13, 0, 18, 13, 18, 18, 13, 13, 13, 18, 13, 18, 18, 13, 13, 13, 0, 18, 13, 18, 18, 13, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 18, 13, 13, 17, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 13, 0, 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 ], [ 194, 11 ], [ 194, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 14, 20 ], [ 20, 21 ], [ 14, 22 ], [ 22, 23 ], [ 14, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 26, 29 ], [ 29, 30 ], [ 30, 31 ], [ 14, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 34, 37 ], [ 37, 38 ], [ 38, 39 ], [ 14, 40 ], [ 40, 41 ], [ 40, 42 ], [ 14, 44 ], [ 44, 45 ], [ 44, 46 ], [ 14, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 48, 53 ], [ 53, 54 ], [ 53, 55 ], [ 48, 56 ], [ 56, 57 ], [ 57, 58 ], [ 48, 59 ], [ 60, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 61, 65 ], [ 14, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 71, 72 ], [ 71, 73 ], [ 66, 74 ], [ 74, 75 ], [ 75, 76 ], [ 66, 77 ], [ 78, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 78, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 87, 88 ], [ 86, 89 ], [ 86, 90 ], [ 78, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 91, 95 ], [ 14, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 96, 101 ], [ 101, 102 ], [ 101, 103 ], [ 96, 104 ], [ 104, 105 ], [ 105, 106 ], [ 96, 107 ], [ 108, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 113, 117 ], [ 108, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 121, 125 ], [ 118, 126 ], [ 126, 127 ], [ 126, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 128, 132 ], [ 108, 133 ], [ 133, 134 ], [ 134, 135 ], [ 134, 136 ], [ 136, 137 ], [ 137, 138 ], [ 137, 139 ], [ 136, 140 ], [ 133, 141 ], [ 14, 142 ], [ 142, 143 ], [ 143, 144 ], [ 144, 145 ], [ 144, 146 ], [ 142, 147 ], [ 147, 148 ], [ 147, 149 ], [ 142, 150 ], [ 150, 151 ], [ 151, 152 ], [ 142, 153 ], [ 154, 154 ], [ 154, 155 ], [ 155, 156 ], [ 156, 157 ], [ 156, 158 ], [ 155, 159 ], [ 159, 160 ], [ 160, 161 ], [ 160, 162 ], [ 159, 163 ], [ 154, 164 ], [ 164, 165 ], [ 165, 166 ], [ 166, 167 ], [ 166, 168 ], [ 164, 169 ], [ 169, 170 ], [ 169, 171 ], [ 12, 172 ], [ 172, 173 ], [ 0, 174 ], [ 174, 175 ], [ 174, 176 ], [ 176, 177 ], [ 174, 178 ], [ 178, 179 ], [ 174, 180 ], [ 180, 181 ], [ 180, 182 ], [ 182, 183 ], [ 183, 184 ], [ 183, 185 ], [ 182, 186 ], [ 186, 187 ], [ 186, 188 ], [ 180, 189 ], [ 189, 190 ], [ 180, 191 ], [ 191, 192 ], [ 0, 193 ], [ 193, 194 ], [ 193, 195 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString[] num;\n\t\tString str;\n\t\t\n\t\tint tmp;\n\t\tint W = Integer.parseInt(br.readLine());\n\t\tint N = Integer.parseInt(br.readLine());\n\t\tint[] array = new int[W];\n\n\t\tNumAB[] pair = new NumAB[N];\n\t\tfor(int i=0;i<W;i++){\n\t\t\tarray[i]=i;\n\t\t}\n\n\t\tfor(int i=0;i<N;i++){\n\t\t\tstr = br.readLine();\n\t\t\tnum = str.split(\",\",0);\n\t\t\tpair[i] = new NumAB(Integer.parseInt(num[0])-1,Integer.parseInt(num[1])-1);\n\t\t}\n\t\tfor(int i=0;i<N;i++){\n\t\t\ttmp = array[pair[i].a];\n\t\t\tarray[pair[i].a] = array[pair[i].b];\n\t\t\tarray[pair[i].b] = tmp;\n\t\t}\n\t\tfor(int i=0;i<W;i++){\n\t\t\tarray[i]=array[i]+1;\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\t}\n}\n\nfinal class NumAB{\n\tint a,b;\n\n\t//?????????????????????\n\tNumAB(int x, int y){\n\t\ta=x;\n\t\tb=y;\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\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString[] num;\n\t\tString str;\n\t\t\n\t\tint tmp;\n\t\tint W = Integer.parseInt(br.readLine());\n\t\tint N = Integer.parseInt(br.readLine());\n\t\tint[] array = new int[W];\n\n\t\tNumAB[] pair = new NumAB[N];\n\t\tfor(int i=0;i<W;i++){\n\t\t\tarray[i]=i;\n\t\t}\n\n\t\tfor(int i=0;i<N;i++){\n\t\t\tstr = br.readLine();\n\t\t\tnum = str.split(\",\",0);\n\t\t\tpair[i] = new NumAB(Integer.parseInt(num[0])-1,Integer.parseInt(num[1])-1);\n\t\t}\n\t\tfor(int i=0;i<N;i++){\n\t\t\ttmp = array[pair[i].a];\n\t\t\tarray[pair[i].a] = array[pair[i].b];\n\t\t\tarray[pair[i].b] = tmp;\n\t\t}\n\t\tfor(int i=0;i<W;i++){\n\t\t\tarray[i]=array[i]+1;\n\t\t\tSystem.out.println(array[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\tString[] num;\n\t\tString str;\n\t\t\n\t\tint tmp;\n\t\tint W = Integer.parseInt(br.readLine());\n\t\tint N = Integer.parseInt(br.readLine());\n\t\tint[] array = new int[W];\n\n\t\tNumAB[] pair = new NumAB[N];\n\t\tfor(int i=0;i<W;i++){\n\t\t\tarray[i]=i;\n\t\t}\n\n\t\tfor(int i=0;i<N;i++){\n\t\t\tstr = br.readLine();\n\t\t\tnum = str.split(\",\",0);\n\t\t\tpair[i] = new NumAB(Integer.parseInt(num[0])-1,Integer.parseInt(num[1])-1);\n\t\t}\n\t\tfor(int i=0;i<N;i++){\n\t\t\ttmp = array[pair[i].a];\n\t\t\tarray[pair[i].a] = array[pair[i].b];\n\t\t\tarray[pair[i].b] = tmp;\n\t\t}\n\t\tfor(int i=0;i<W;i++){\n\t\t\tarray[i]=array[i]+1;\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\t}", "main", "{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString[] num;\n\t\tString str;\n\t\t\n\t\tint tmp;\n\t\tint W = Integer.parseInt(br.readLine());\n\t\tint N = Integer.parseInt(br.readLine());\n\t\tint[] array = new int[W];\n\n\t\tNumAB[] pair = new NumAB[N];\n\t\tfor(int i=0;i<W;i++){\n\t\t\tarray[i]=i;\n\t\t}\n\n\t\tfor(int i=0;i<N;i++){\n\t\t\tstr = br.readLine();\n\t\t\tnum = str.split(\",\",0);\n\t\t\tpair[i] = new NumAB(Integer.parseInt(num[0])-1,Integer.parseInt(num[1])-1);\n\t\t}\n\t\tfor(int i=0;i<N;i++){\n\t\t\ttmp = array[pair[i].a];\n\t\t\tarray[pair[i].a] = array[pair[i].b];\n\t\t\tarray[pair[i].b] = tmp;\n\t\t}\n\t\tfor(int i=0;i<W;i++){\n\t\t\tarray[i]=array[i]+1;\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\t}", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "String[] num;", "num", "String str;", "str", "int tmp;", "tmp", "int W = Integer.parseInt(br.readLine());", "W", "Integer.parseInt(br.readLine())", "Integer.parseInt", "Integer", "br.readLine()", "br.readLine", "br", "int N = Integer.parseInt(br.readLine());", "N", "Integer.parseInt(br.readLine())", "Integer.parseInt", "Integer", "br.readLine()", "br.readLine", "br", "int[] array = new int[W];", "array", "new int[W]", "W", "NumAB[] pair = new NumAB[N];", "pair", "new NumAB[N]", "N", "for(int i=0;i<W;i++){\n\t\t\tarray[i]=i;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<W", "i", "W", "i++", "i++", "i", "{\n\t\t\tarray[i]=i;\n\t\t}", "{\n\t\t\tarray[i]=i;\n\t\t}", "array[i]=i", "array[i]", "array", "i", "i", "for(int i=0;i<N;i++){\n\t\t\tstr = br.readLine();\n\t\t\tnum = str.split(\",\",0);\n\t\t\tpair[i] = new NumAB(Integer.parseInt(num[0])-1,Integer.parseInt(num[1])-1);\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\tnum = str.split(\",\",0);\n\t\t\tpair[i] = new NumAB(Integer.parseInt(num[0])-1,Integer.parseInt(num[1])-1);\n\t\t}", "{\n\t\t\tstr = br.readLine();\n\t\t\tnum = str.split(\",\",0);\n\t\t\tpair[i] = new NumAB(Integer.parseInt(num[0])-1,Integer.parseInt(num[1])-1);\n\t\t}", "str = br.readLine()", "str", "br.readLine()", "br.readLine", "br", "num = str.split(\",\",0)", "num", "str.split(\",\",0)", "str.split", "str", "\",\"", "0", "pair[i] = new NumAB(Integer.parseInt(num[0])-1,Integer.parseInt(num[1])-1)", "pair[i]", "pair", "i", "new NumAB(Integer.parseInt(num[0])-1,Integer.parseInt(num[1])-1)", "for(int i=0;i<N;i++){\n\t\t\ttmp = array[pair[i].a];\n\t\t\tarray[pair[i].a] = array[pair[i].b];\n\t\t\tarray[pair[i].b] = tmp;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<N", "i", "N", "i++", "i++", "i", "{\n\t\t\ttmp = array[pair[i].a];\n\t\t\tarray[pair[i].a] = array[pair[i].b];\n\t\t\tarray[pair[i].b] = tmp;\n\t\t}", "{\n\t\t\ttmp = array[pair[i].a];\n\t\t\tarray[pair[i].a] = array[pair[i].b];\n\t\t\tarray[pair[i].b] = tmp;\n\t\t}", "tmp = array[pair[i].a]", "tmp", "array[pair[i].a]", "array", "pair[i].a", "pair[i]", "pair", "i", "pair[i].a", "array[pair[i].a] = array[pair[i].b]", "array[pair[i].a]", "array", "pair[i].a", "pair[i]", "pair", "i", "pair[i].a", "array[pair[i].b]", "array", "pair[i].b", "pair[i]", "pair", "i", "pair[i].b", "array[pair[i].b] = tmp", "array[pair[i].b]", "array", "pair[i].b", "pair[i]", "pair", "i", "pair[i].b", "tmp", "for(int i=0;i<W;i++){\n\t\t\tarray[i]=array[i]+1;\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\tarray[i]=array[i]+1;\n\t\t\tSystem.out.println(array[i]);\n\t\t}", "{\n\t\t\tarray[i]=array[i]+1;\n\t\t\tSystem.out.println(array[i]);\n\t\t}", "array[i]=array[i]+1", "array[i]", "array", "i", "array[i]+1", "array[i]", "array", "i", "1", "System.out.println(array[i])", "System.out.println", "System.out", "System", "System.out", "array[i]", "array", "i", "String[] args", "args", "final class NumAB{\n\tint a,b;\n\n\t//?????????????????????\n\tNumAB(int x, int y){\n\t\ta=x;\n\t\tb=y;\n\t}\n}", "NumAB", "int a", "a", "b;", "b", "//?????????????????????\n\tNumAB(int x, int y){\n\t\ta=x;\n\t\tb=y;\n\t}", "NumAB", "{\n\t\ta=x;\n\t\tb=y;\n\t}", "a=x", "a", "x", "b=y", "b", "y", "int x", "x", "int y", "y", "public class Main {\n\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString[] num;\n\t\tString str;\n\t\t\n\t\tint tmp;\n\t\tint W = Integer.parseInt(br.readLine());\n\t\tint N = Integer.parseInt(br.readLine());\n\t\tint[] array = new int[W];\n\n\t\tNumAB[] pair = new NumAB[N];\n\t\tfor(int i=0;i<W;i++){\n\t\t\tarray[i]=i;\n\t\t}\n\n\t\tfor(int i=0;i<N;i++){\n\t\t\tstr = br.readLine();\n\t\t\tnum = str.split(\",\",0);\n\t\t\tpair[i] = new NumAB(Integer.parseInt(num[0])-1,Integer.parseInt(num[1])-1);\n\t\t}\n\t\tfor(int i=0;i<N;i++){\n\t\t\ttmp = array[pair[i].a];\n\t\t\tarray[pair[i].a] = array[pair[i].b];\n\t\t\tarray[pair[i].b] = tmp;\n\t\t}\n\t\tfor(int i=0;i<W;i++){\n\t\t\tarray[i]=array[i]+1;\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString[] num;\n\t\tString str;\n\t\t\n\t\tint tmp;\n\t\tint W = Integer.parseInt(br.readLine());\n\t\tint N = Integer.parseInt(br.readLine());\n\t\tint[] array = new int[W];\n\n\t\tNumAB[] pair = new NumAB[N];\n\t\tfor(int i=0;i<W;i++){\n\t\t\tarray[i]=i;\n\t\t}\n\n\t\tfor(int i=0;i<N;i++){\n\t\t\tstr = br.readLine();\n\t\t\tnum = str.split(\",\",0);\n\t\t\tpair[i] = new NumAB(Integer.parseInt(num[0])-1,Integer.parseInt(num[1])-1);\n\t\t}\n\t\tfor(int i=0;i<N;i++){\n\t\t\ttmp = array[pair[i].a];\n\t\t\tarray[pair[i].a] = array[pair[i].b];\n\t\t\tarray[pair[i].b] = tmp;\n\t\t}\n\t\tfor(int i=0;i<W;i++){\n\t\t\tarray[i]=array[i]+1;\n\t\t\tSystem.out.println(array[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 IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] num; String str; int tmp; int W = Integer.parseInt(br.readLine()); int N = Integer.parseInt(br.readLine()); int[] array = new int[W]; NumAB[] pair = new NumAB[N]; for(int i=0;i<W;i++){ array[i]=i; } for(int i=0;i<N;i++){ str = br.readLine(); num = str.split(",",0); pair[i] = new NumAB(Integer.parseInt(num[0])-1,Integer.parseInt(num[1])-1); } for(int i=0;i<N;i++){ tmp = array[pair[i].a]; array[pair[i].a] = array[pair[i].b]; array[pair[i].b] = tmp; } for(int i=0;i<W;i++){ array[i]=array[i]+1; System.out.println(array[i]); } } } final class NumAB{ int a,b; //????????????????????? NumAB(int x, int y){ a=x; b=y; } }
[ 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, 2, 13, 17, 41, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 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, 18, 13, 13, 0, 18, 13, 18, 13, 13, 18, 13, 18, 13, 13, 0, 18, 13, 18, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 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 ], [ 159, 5 ], [ 159, 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 ], [ 39, 40 ], [ 39, 41 ], [ 8, 42 ], [ 42, 43 ], [ 8, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 44, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 51, 53 ], [ 44, 54 ], [ 54, 55 ], [ 55, 56 ], [ 44, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 59, 63 ], [ 8, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 64, 69 ], [ 69, 70 ], [ 69, 71 ], [ 64, 72 ], [ 72, 73 ], [ 73, 74 ], [ 64, 75 ], [ 76, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 80, 81 ], [ 76, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 76, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 88, 92 ], [ 92, 93 ], [ 93, 94 ], [ 92, 95 ], [ 95, 96 ], [ 95, 97 ], [ 76, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 98, 102 ], [ 102, 103 ], [ 103, 104 ], [ 102, 105 ], [ 105, 106 ], [ 105, 107 ], [ 76, 108 ], [ 108, 109 ], [ 108, 110 ], [ 110, 111 ], [ 110, 112 ], [ 112, 113 ], [ 112, 114 ], [ 76, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 118, 119 ], [ 118, 120 ], [ 115, 121 ], [ 121, 122 ], [ 121, 123 ], [ 123, 124 ], [ 123, 125 ], [ 76, 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 ], [ 140, 141 ], [ 140, 142 ], [ 133, 143 ], [ 143, 144 ], [ 144, 145 ], [ 133, 146 ], [ 147, 147 ], [ 147, 148 ], [ 148, 149 ], [ 149, 150 ], [ 150, 151 ], [ 150, 152 ], [ 148, 153 ], [ 153, 154 ], [ 153, 155 ], [ 6, 156 ], [ 156, 157 ], [ 0, 158 ], [ 158, 159 ], [ 158, 160 ] ]
[ "import java.util.Scanner;\n\n\npublic class Main{\npublic static void main(String[] args) {\n\tScanner scan = new Scanner(System.in);\n\tint w=Integer.valueOf(scan.nextLine());\n\tint n=Integer.valueOf(scan.nextLine());\n\tint[] a=new int[n];\n\tint[] b=new int[n];\n\tint[] lots=new int[w+1];\n\tint temp;\n\n\tfor(int i=1;i<lots.length;i++){\n\t\tlots[i]=i;\n\t}\n\tfor(int i=0;i<n;i++){\n\t\tString str=scan.nextLine();\n\t\tString[] s=str.split(\",\");\n\t\ta[i]=Integer.valueOf(s[0]);\n\t\tb[i]=Integer.valueOf(s[1]);\n\n\t\ttemp=lots[a[i]];\n\t\tlots[a[i]]=lots[b[i]];\n\t\tlots[b[i]]=temp;\n\t}\n\tfor(int i=1;i<lots.length;i++){\n\t\tSystem.out.println(lots[i]);\n\t}\n\n\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\npublic static void main(String[] args) {\n\tScanner scan = new Scanner(System.in);\n\tint w=Integer.valueOf(scan.nextLine());\n\tint n=Integer.valueOf(scan.nextLine());\n\tint[] a=new int[n];\n\tint[] b=new int[n];\n\tint[] lots=new int[w+1];\n\tint temp;\n\n\tfor(int i=1;i<lots.length;i++){\n\t\tlots[i]=i;\n\t}\n\tfor(int i=0;i<n;i++){\n\t\tString str=scan.nextLine();\n\t\tString[] s=str.split(\",\");\n\t\ta[i]=Integer.valueOf(s[0]);\n\t\tb[i]=Integer.valueOf(s[1]);\n\n\t\ttemp=lots[a[i]];\n\t\tlots[a[i]]=lots[b[i]];\n\t\tlots[b[i]]=temp;\n\t}\n\tfor(int i=1;i<lots.length;i++){\n\t\tSystem.out.println(lots[i]);\n\t}\n\n\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\tScanner scan = new Scanner(System.in);\n\tint w=Integer.valueOf(scan.nextLine());\n\tint n=Integer.valueOf(scan.nextLine());\n\tint[] a=new int[n];\n\tint[] b=new int[n];\n\tint[] lots=new int[w+1];\n\tint temp;\n\n\tfor(int i=1;i<lots.length;i++){\n\t\tlots[i]=i;\n\t}\n\tfor(int i=0;i<n;i++){\n\t\tString str=scan.nextLine();\n\t\tString[] s=str.split(\",\");\n\t\ta[i]=Integer.valueOf(s[0]);\n\t\tb[i]=Integer.valueOf(s[1]);\n\n\t\ttemp=lots[a[i]];\n\t\tlots[a[i]]=lots[b[i]];\n\t\tlots[b[i]]=temp;\n\t}\n\tfor(int i=1;i<lots.length;i++){\n\t\tSystem.out.println(lots[i]);\n\t}\n\n\n\t}", "main", "{\n\tScanner scan = new Scanner(System.in);\n\tint w=Integer.valueOf(scan.nextLine());\n\tint n=Integer.valueOf(scan.nextLine());\n\tint[] a=new int[n];\n\tint[] b=new int[n];\n\tint[] lots=new int[w+1];\n\tint temp;\n\n\tfor(int i=1;i<lots.length;i++){\n\t\tlots[i]=i;\n\t}\n\tfor(int i=0;i<n;i++){\n\t\tString str=scan.nextLine();\n\t\tString[] s=str.split(\",\");\n\t\ta[i]=Integer.valueOf(s[0]);\n\t\tb[i]=Integer.valueOf(s[1]);\n\n\t\ttemp=lots[a[i]];\n\t\tlots[a[i]]=lots[b[i]];\n\t\tlots[b[i]]=temp;\n\t}\n\tfor(int i=1;i<lots.length;i++){\n\t\tSystem.out.println(lots[i]);\n\t}\n\n\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int w=Integer.valueOf(scan.nextLine());", "w", "Integer.valueOf(scan.nextLine())", "Integer.valueOf", "Integer", "scan.nextLine()", "scan.nextLine", "scan", "int n=Integer.valueOf(scan.nextLine());", "n", "Integer.valueOf(scan.nextLine())", "Integer.valueOf", "Integer", "scan.nextLine()", "scan.nextLine", "scan", "int[] a=new int[n];", "a", "new int[n]", "n", "int[] b=new int[n];", "b", "new int[n]", "n", "int[] lots=new int[w+1];", "lots", "new int[w+1]", "w+1", "w", "1", "int temp;", "temp", "for(int i=1;i<lots.length;i++){\n\t\tlots[i]=i;\n\t}", "int i=1;", "int i=1;", "i", "1", "i<lots.length", "i", "lots.length", "lots", "lots.length", "i++", "i++", "i", "{\n\t\tlots[i]=i;\n\t}", "{\n\t\tlots[i]=i;\n\t}", "lots[i]=i", "lots[i]", "lots", "i", "i", "for(int i=0;i<n;i++){\n\t\tString str=scan.nextLine();\n\t\tString[] s=str.split(\",\");\n\t\ta[i]=Integer.valueOf(s[0]);\n\t\tb[i]=Integer.valueOf(s[1]);\n\n\t\ttemp=lots[a[i]];\n\t\tlots[a[i]]=lots[b[i]];\n\t\tlots[b[i]]=temp;\n\t}", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t\tString str=scan.nextLine();\n\t\tString[] s=str.split(\",\");\n\t\ta[i]=Integer.valueOf(s[0]);\n\t\tb[i]=Integer.valueOf(s[1]);\n\n\t\ttemp=lots[a[i]];\n\t\tlots[a[i]]=lots[b[i]];\n\t\tlots[b[i]]=temp;\n\t}", "{\n\t\tString str=scan.nextLine();\n\t\tString[] s=str.split(\",\");\n\t\ta[i]=Integer.valueOf(s[0]);\n\t\tb[i]=Integer.valueOf(s[1]);\n\n\t\ttemp=lots[a[i]];\n\t\tlots[a[i]]=lots[b[i]];\n\t\tlots[b[i]]=temp;\n\t}", "String str=scan.nextLine();", "str", "scan.nextLine()", "scan.nextLine", "scan", "String[] s=str.split(\",\");", "s", "str.split(\",\")", "str.split", "str", "\",\"", "a[i]=Integer.valueOf(s[0])", "a[i]", "a", "i", "Integer.valueOf(s[0])", "Integer.valueOf", "Integer", "s[0]", "s", "0", "b[i]=Integer.valueOf(s[1])", "b[i]", "b", "i", "Integer.valueOf(s[1])", "Integer.valueOf", "Integer", "s[1]", "s", "1", "temp=lots[a[i]]", "temp", "lots[a[i]]", "lots", "a[i]", "a", "i", "lots[a[i]]=lots[b[i]]", "lots[a[i]]", "lots", "a[i]", "a", "i", "lots[b[i]]", "lots", "b[i]", "b", "i", "lots[b[i]]=temp", "lots[b[i]]", "lots", "b[i]", "b", "i", "temp", "for(int i=1;i<lots.length;i++){\n\t\tSystem.out.println(lots[i]);\n\t}", "int i=1;", "int i=1;", "i", "1", "i<lots.length", "i", "lots.length", "lots", "lots.length", "i++", "i++", "i", "{\n\t\tSystem.out.println(lots[i]);\n\t}", "{\n\t\tSystem.out.println(lots[i]);\n\t}", "System.out.println(lots[i])", "System.out.println", "System.out", "System", "System.out", "lots[i]", "lots", "i", "String[] args", "args", "public class Main{\npublic static void main(String[] args) {\n\tScanner scan = new Scanner(System.in);\n\tint w=Integer.valueOf(scan.nextLine());\n\tint n=Integer.valueOf(scan.nextLine());\n\tint[] a=new int[n];\n\tint[] b=new int[n];\n\tint[] lots=new int[w+1];\n\tint temp;\n\n\tfor(int i=1;i<lots.length;i++){\n\t\tlots[i]=i;\n\t}\n\tfor(int i=0;i<n;i++){\n\t\tString str=scan.nextLine();\n\t\tString[] s=str.split(\",\");\n\t\ta[i]=Integer.valueOf(s[0]);\n\t\tb[i]=Integer.valueOf(s[1]);\n\n\t\ttemp=lots[a[i]];\n\t\tlots[a[i]]=lots[b[i]];\n\t\tlots[b[i]]=temp;\n\t}\n\tfor(int i=1;i<lots.length;i++){\n\t\tSystem.out.println(lots[i]);\n\t}\n\n\n\t}\n\n}", "public class Main{\npublic static void main(String[] args) {\n\tScanner scan = new Scanner(System.in);\n\tint w=Integer.valueOf(scan.nextLine());\n\tint n=Integer.valueOf(scan.nextLine());\n\tint[] a=new int[n];\n\tint[] b=new int[n];\n\tint[] lots=new int[w+1];\n\tint temp;\n\n\tfor(int i=1;i<lots.length;i++){\n\t\tlots[i]=i;\n\t}\n\tfor(int i=0;i<n;i++){\n\t\tString str=scan.nextLine();\n\t\tString[] s=str.split(\",\");\n\t\ta[i]=Integer.valueOf(s[0]);\n\t\tb[i]=Integer.valueOf(s[1]);\n\n\t\ttemp=lots[a[i]];\n\t\tlots[a[i]]=lots[b[i]];\n\t\tlots[b[i]]=temp;\n\t}\n\tfor(int i=1;i<lots.length;i++){\n\t\tSystem.out.println(lots[i]);\n\t}\n\n\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner scan = new Scanner(System.in); int w=Integer.valueOf(scan.nextLine()); int n=Integer.valueOf(scan.nextLine()); int[] a=new int[n]; int[] b=new int[n]; int[] lots=new int[w+1]; int temp; for(int i=1;i<lots.length;i++){ lots[i]=i; } for(int i=0;i<n;i++){ String str=scan.nextLine(); String[] s=str.split(","); a[i]=Integer.valueOf(s[0]); b[i]=Integer.valueOf(s[1]); temp=lots[a[i]]; lots[a[i]]=lots[b[i]]; lots[b[i]]=temp; } for(int i=1;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, 13, 1, 40, 13, 30, 0, 18, 13, 13, 2, 13, 17, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 1, 40, 13, 30, 30, 14, 2, 4, 18, 13, 13, 17, 30, 0, 13, 4, 18, 13, 13, 30, 0, 13, 13, 0, 13, 17, 0, 13, 4, 18, 13, 13, 0, 13, 4, 18, 13, 13, 41, 13, 17, 0, 13, 18, 13, 2, 13, 17, 0, 18, 13, 2, 13, 17, 18, 13, 2, 13, 17, 0, 18, 13, 2, 13, 17, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 174, 5 ], [ 174, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 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 ], [ 45, 47 ], [ 8, 48 ], [ 48, 49 ], [ 48, 50 ], [ 8, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 51, 56 ], [ 56, 57 ], [ 56, 58 ], [ 51, 59 ], [ 59, 60 ], [ 60, 61 ], [ 51, 62 ], [ 63, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 67, 68 ], [ 63, 69 ], [ 69, 70 ], [ 69, 71 ], [ 63, 72 ], [ 72, 73 ], [ 72, 74 ], [ 63, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 75, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 83, 84 ], [ 75, 85 ], [ 85, 86 ], [ 86, 87 ], [ 75, 88 ], [ 89, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 92, 95 ], [ 91, 96 ], [ 90, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 101, 102 ], [ 100, 103 ], [ 90, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 104, 108 ], [ 108, 109 ], [ 108, 110 ], [ 63, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 114, 115 ], [ 113, 116 ], [ 63, 117 ], [ 117, 118 ], [ 117, 119 ], [ 119, 120 ], [ 120, 121 ], [ 119, 122 ], [ 63, 123 ], [ 123, 124 ], [ 123, 125 ], [ 63, 126 ], [ 126, 127 ], [ 126, 128 ], [ 128, 129 ], [ 128, 130 ], [ 130, 131 ], [ 130, 132 ], [ 63, 133 ], [ 133, 134 ], [ 134, 135 ], [ 134, 136 ], [ 136, 137 ], [ 136, 138 ], [ 133, 139 ], [ 139, 140 ], [ 139, 141 ], [ 141, 142 ], [ 141, 143 ], [ 63, 144 ], [ 144, 145 ], [ 145, 146 ], [ 145, 147 ], [ 147, 148 ], [ 147, 149 ], [ 144, 150 ], [ 8, 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 ], [ 6, 171 ], [ 171, 172 ], [ 0, 173 ], [ 173, 174 ], [ 173, 175 ] ]
[ "import 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[] array=new int[w];\n for(int i=0;i<w;i++)array[i]=i+1;\n int a=0,b=0;\n for(int i=0;i<n;i++){\n String s=sc.next();\n String st1=\"\";\n String st2=\"\";\n for(int j=0;j<s.length();j++){\n if(s.charAt(j)!=','){\n st2+=s.charAt(j);\n }\n else {\n st1=st2;\n st2=\"\";\n }\n }\n a=Integer.parseInt(st1);\n b=Integer.parseInt(st2);\n int tmp=0;\n tmp=array[a-1];\n array[a-1]=array[b-1];\n array[b-1]=tmp;\n }\n for(int i=0;i<w;i++)System.out.println(array[i]);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n public static void main(String[] args){\n Scanner 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 int a=0,b=0;\n for(int i=0;i<n;i++){\n String s=sc.next();\n String st1=\"\";\n String st2=\"\";\n for(int j=0;j<s.length();j++){\n if(s.charAt(j)!=','){\n st2+=s.charAt(j);\n }\n else {\n st1=st2;\n st2=\"\";\n }\n }\n a=Integer.parseInt(st1);\n b=Integer.parseInt(st2);\n int tmp=0;\n tmp=array[a-1];\n array[a-1]=array[b-1];\n array[b-1]=tmp;\n }\n for(int i=0;i<w;i++)System.out.println(array[i]);\n }\n}", "Main", "public static void main(String[] args){\n Scanner 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 int a=0,b=0;\n for(int i=0;i<n;i++){\n String s=sc.next();\n String st1=\"\";\n String st2=\"\";\n for(int j=0;j<s.length();j++){\n if(s.charAt(j)!=','){\n st2+=s.charAt(j);\n }\n else {\n st1=st2;\n st2=\"\";\n }\n }\n a=Integer.parseInt(st1);\n b=Integer.parseInt(st2);\n int tmp=0;\n tmp=array[a-1];\n array[a-1]=array[b-1];\n array[b-1]=tmp;\n }\n for(int i=0;i<w;i++)System.out.println(array[i]);\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 int a=0,b=0;\n for(int i=0;i<n;i++){\n String s=sc.next();\n String st1=\"\";\n String st2=\"\";\n for(int j=0;j<s.length();j++){\n if(s.charAt(j)!=','){\n st2+=s.charAt(j);\n }\n else {\n st1=st2;\n st2=\"\";\n }\n }\n a=Integer.parseInt(st1);\n b=Integer.parseInt(st2);\n int tmp=0;\n tmp=array[a-1];\n array[a-1]=array[b-1];\n array[b-1]=tmp;\n }\n for(int i=0;i<w;i++)System.out.println(array[i]);\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", "int a=0", "a", "0", "b=0;", "b", "0", "for(int i=0;i<n;i++){\n String s=sc.next();\n String st1=\"\";\n String st2=\"\";\n for(int j=0;j<s.length();j++){\n if(s.charAt(j)!=','){\n st2+=s.charAt(j);\n }\n else {\n st1=st2;\n st2=\"\";\n }\n }\n a=Integer.parseInt(st1);\n b=Integer.parseInt(st2);\n int tmp=0;\n tmp=array[a-1];\n array[a-1]=array[b-1];\n array[b-1]=tmp;\n }", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n String s=sc.next();\n String st1=\"\";\n String st2=\"\";\n for(int j=0;j<s.length();j++){\n if(s.charAt(j)!=','){\n st2+=s.charAt(j);\n }\n else {\n st1=st2;\n st2=\"\";\n }\n }\n a=Integer.parseInt(st1);\n b=Integer.parseInt(st2);\n int tmp=0;\n tmp=array[a-1];\n array[a-1]=array[b-1];\n array[b-1]=tmp;\n }", "{\n String s=sc.next();\n String st1=\"\";\n String st2=\"\";\n for(int j=0;j<s.length();j++){\n if(s.charAt(j)!=','){\n st2+=s.charAt(j);\n }\n else {\n st1=st2;\n st2=\"\";\n }\n }\n a=Integer.parseInt(st1);\n b=Integer.parseInt(st2);\n int tmp=0;\n tmp=array[a-1];\n array[a-1]=array[b-1];\n array[b-1]=tmp;\n }", "String s=sc.next();", "s", "sc.next()", "sc.next", "sc", "String st1=\"\";", "st1", "\"\"", "String st2=\"\";", "st2", "\"\"", "for(int j=0;j<s.length();j++){\n if(s.charAt(j)!=','){\n st2+=s.charAt(j);\n }\n else {\n st1=st2;\n st2=\"\";\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 st2+=s.charAt(j);\n }\n else {\n st1=st2;\n st2=\"\";\n }\n }", "{\n if(s.charAt(j)!=','){\n st2+=s.charAt(j);\n }\n else {\n st1=st2;\n st2=\"\";\n }\n }", "if(s.charAt(j)!=','){\n st2+=s.charAt(j);\n }\n else {\n st1=st2;\n st2=\"\";\n }", "s.charAt(j)!=','", "s.charAt(j)", "s.charAt", "s", "j", "','", "{\n st2+=s.charAt(j);\n }", "st2+=s.charAt(j)", "st2", "s.charAt(j)", "s.charAt", "s", "j", "{\n st1=st2;\n st2=\"\";\n }", "st1=st2", "st1", "st2", "st2=\"\"", "st2", "\"\"", "a=Integer.parseInt(st1)", "a", "Integer.parseInt(st1)", "Integer.parseInt", "Integer", "st1", "b=Integer.parseInt(st2)", "b", "Integer.parseInt(st2)", "Integer.parseInt", "Integer", "st2", "int tmp=0;", "tmp", "0", "tmp=array[a-1]", "tmp", "array[a-1]", "array", "a-1", "a", "1", "array[a-1]=array[b-1]", "array[a-1]", "array", "a-1", "a", "1", "array[b-1]", "array", "b-1", "b", "1", "array[b-1]=tmp", "array[b-1]", "array", "b-1", "b", "1", "tmp", "for(int i=0;i<w;i++)System.out.println(array[i]);", "int i=0;", "int i=0;", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "System.out.println(array[i]);", "System.out.println(array[i])", "System.out.println", "System.out", "System", "System.out", "array[i]", "array", "i", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n Scanner 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 int a=0,b=0;\n for(int i=0;i<n;i++){\n String s=sc.next();\n String st1=\"\";\n String st2=\"\";\n for(int j=0;j<s.length();j++){\n if(s.charAt(j)!=','){\n st2+=s.charAt(j);\n }\n else {\n st1=st2;\n st2=\"\";\n }\n }\n a=Integer.parseInt(st1);\n b=Integer.parseInt(st2);\n int tmp=0;\n tmp=array[a-1];\n array[a-1]=array[b-1];\n array[b-1]=tmp;\n }\n for(int i=0;i<w;i++)System.out.println(array[i]);\n }\n}", "public class Main{\n public static void main(String[] args){\n Scanner 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 int a=0,b=0;\n for(int i=0;i<n;i++){\n String s=sc.next();\n String st1=\"\";\n String st2=\"\";\n for(int j=0;j<s.length();j++){\n if(s.charAt(j)!=','){\n st2+=s.charAt(j);\n }\n else {\n st1=st2;\n st2=\"\";\n }\n }\n a=Integer.parseInt(st1);\n b=Integer.parseInt(st2);\n int tmp=0;\n tmp=array[a-1];\n array[a-1]=array[b-1];\n array[b-1]=tmp;\n }\n for(int i=0;i<w;i++)System.out.println(array[i]);\n }\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner 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; int a=0,b=0; for(int i=0;i<n;i++){ String s=sc.next(); String st1=""; String st2=""; for(int j=0;j<s.length();j++){ if(s.charAt(j)!=','){ st2+=s.charAt(j); } else { st1=st2; st2=""; } } a=Integer.parseInt(st1); b=Integer.parseInt(st2); int tmp=0; tmp=array[a-1]; array[a-1]=array[b-1]; array[b-1]=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, 38, 5, 13, 30, 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, 30, 0, 18, 13, 13, 2, 13, 17, 41, 13, 41, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 0, 13, 4, 18, 13, 18, 13, 17, 0, 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 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 156, 11 ], [ 156, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 19, 20 ], [ 19, 21 ], [ 18, 22 ], [ 22, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 25, 28 ], [ 28, 29 ], [ 29, 30 ], [ 22, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 34, 35 ], [ 33, 36 ], [ 36, 37 ], [ 37, 38 ], [ 22, 39 ], [ 39, 40 ], [ 39, 41 ], [ 22, 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 ], [ 57, 59 ], [ 56, 60 ], [ 60, 61 ], [ 60, 62 ], [ 22, 63 ], [ 63, 64 ], [ 22, 65 ], [ 65, 66 ], [ 22, 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 ], [ 87, 88 ], [ 88, 89 ], [ 87, 90 ], [ 79, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 94, 95 ], [ 93, 96 ], [ 96, 97 ], [ 96, 98 ], [ 79, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 102, 103 ], [ 101, 104 ], [ 104, 105 ], [ 104, 106 ], [ 79, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 109, 111 ], [ 111, 112 ], [ 111, 113 ], [ 79, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 117, 119 ], [ 114, 120 ], [ 120, 121 ], [ 120, 122 ], [ 122, 123 ], [ 122, 124 ], [ 79, 125 ], [ 125, 126 ], [ 126, 127 ], [ 126, 128 ], [ 128, 129 ], [ 128, 130 ], [ 125, 131 ], [ 22, 132 ], [ 132, 133 ], [ 133, 134 ], [ 134, 135 ], [ 134, 136 ], [ 132, 137 ], [ 137, 138 ], [ 137, 139 ], [ 132, 140 ], [ 140, 141 ], [ 141, 142 ], [ 132, 143 ], [ 144, 144 ], [ 144, 145 ], [ 145, 146 ], [ 146, 147 ], [ 147, 148 ], [ 147, 149 ], [ 145, 150 ], [ 150, 151 ], [ 150, 152 ], [ 12, 153 ], [ 153, 154 ], [ 0, 155 ], [ 155, 156 ], [ 155, 157 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n public static void main(String[] args) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try{\n int w = Integer.parseInt(reader.readLine());\n int n = Integer.parseInt(reader.readLine());\n int[] x = new int[w];\n for(int i = 0; i< w; i++){\n x[i] = i + 1;\n }\n int a ;\n int b ;\n for(int i = 0; i < n; i++){\n String line = reader.readLine();\n String[] s = line.split(\",\");\n a = Integer.parseInt(s[0]);\n b = Integer.parseInt(s[1]);\n int temp = x[a-1];\n x[a-1] = x[b-1];\n x[b-1] = temp;\n }\n for(int i = 0; i < w; i++){\n System.out.println(x[i]);\n }\n }catch(IOException e){\n\n }\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "public class Main {\n public static void main(String[] args) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try{\n int w = Integer.parseInt(reader.readLine());\n int n = Integer.parseInt(reader.readLine());\n int[] x = new int[w];\n for(int i = 0; i< w; i++){\n x[i] = i + 1;\n }\n int a ;\n int b ;\n for(int i = 0; i < n; i++){\n String line = reader.readLine();\n String[] s = line.split(\",\");\n a = Integer.parseInt(s[0]);\n b = Integer.parseInt(s[1]);\n int temp = x[a-1];\n x[a-1] = x[b-1];\n x[b-1] = temp;\n }\n for(int i = 0; i < w; i++){\n System.out.println(x[i]);\n }\n }catch(IOException e){\n\n }\n }\n}", "Main", "public static void main(String[] args) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try{\n int w = Integer.parseInt(reader.readLine());\n int n = Integer.parseInt(reader.readLine());\n int[] x = new int[w];\n for(int i = 0; i< w; i++){\n x[i] = i + 1;\n }\n int a ;\n int b ;\n for(int i = 0; i < n; i++){\n String line = reader.readLine();\n String[] s = line.split(\",\");\n a = Integer.parseInt(s[0]);\n b = Integer.parseInt(s[1]);\n int temp = x[a-1];\n x[a-1] = x[b-1];\n x[b-1] = temp;\n }\n for(int i = 0; i < w; i++){\n System.out.println(x[i]);\n }\n }catch(IOException e){\n\n }\n }", "main", "{\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try{\n int w = Integer.parseInt(reader.readLine());\n int n = Integer.parseInt(reader.readLine());\n int[] x = new int[w];\n for(int i = 0; i< w; i++){\n x[i] = i + 1;\n }\n int a ;\n int b ;\n for(int i = 0; i < n; i++){\n String line = reader.readLine();\n String[] s = line.split(\",\");\n a = Integer.parseInt(s[0]);\n b = Integer.parseInt(s[1]);\n int temp = x[a-1];\n x[a-1] = x[b-1];\n x[b-1] = temp;\n }\n for(int i = 0; i < w; i++){\n System.out.println(x[i]);\n }\n }catch(IOException e){\n\n }\n }", "BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));", "reader", "new BufferedReader(new InputStreamReader(System.in))", "try{\n int w = Integer.parseInt(reader.readLine());\n int n = Integer.parseInt(reader.readLine());\n int[] x = new int[w];\n for(int i = 0; i< w; i++){\n x[i] = i + 1;\n }\n int a ;\n int b ;\n for(int i = 0; i < n; i++){\n String line = reader.readLine();\n String[] s = line.split(\",\");\n a = Integer.parseInt(s[0]);\n b = Integer.parseInt(s[1]);\n int temp = x[a-1];\n x[a-1] = x[b-1];\n x[b-1] = temp;\n }\n for(int i = 0; i < w; i++){\n System.out.println(x[i]);\n }\n }catch(IOException e){\n\n }", "catch(IOException e){\n\n }", "IOException e", "{\n\n }", "{\n int w = Integer.parseInt(reader.readLine());\n int n = Integer.parseInt(reader.readLine());\n int[] x = new int[w];\n for(int i = 0; i< w; i++){\n x[i] = i + 1;\n }\n int a ;\n int b ;\n for(int i = 0; i < n; i++){\n String line = reader.readLine();\n String[] s = line.split(\",\");\n a = Integer.parseInt(s[0]);\n b = Integer.parseInt(s[1]);\n int temp = x[a-1];\n x[a-1] = x[b-1];\n x[b-1] = temp;\n }\n for(int i = 0; i < w; i++){\n System.out.println(x[i]);\n }\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[] 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", "int a ;", "a", "int b ;", "b", "for(int i = 0; i < n; i++){\n String line = reader.readLine();\n String[] s = line.split(\",\");\n a = Integer.parseInt(s[0]);\n b = Integer.parseInt(s[1]);\n int temp = x[a-1];\n x[a-1] = x[b-1];\n x[b-1] = temp;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n String line = reader.readLine();\n String[] s = line.split(\",\");\n a = Integer.parseInt(s[0]);\n b = Integer.parseInt(s[1]);\n int temp = x[a-1];\n x[a-1] = x[b-1];\n x[b-1] = temp;\n }", "{\n String line = reader.readLine();\n String[] s = line.split(\",\");\n a = Integer.parseInt(s[0]);\n b = Integer.parseInt(s[1]);\n int temp = x[a-1];\n x[a-1] = x[b-1];\n x[b-1] = temp;\n }", "String line = reader.readLine();", "line", "reader.readLine()", "reader.readLine", "reader", "String[] s = line.split(\",\");", "s", "line.split(\",\")", "line.split", "line", "\",\"", "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 temp = x[a-1];", "temp", "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] = temp", "x[b-1]", "x", "b-1", "b", "1", "temp", "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 BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try{\n int w = Integer.parseInt(reader.readLine());\n int n = Integer.parseInt(reader.readLine());\n int[] x = new int[w];\n for(int i = 0; i< w; i++){\n x[i] = i + 1;\n }\n int a ;\n int b ;\n for(int i = 0; i < n; i++){\n String line = reader.readLine();\n String[] s = line.split(\",\");\n a = Integer.parseInt(s[0]);\n b = Integer.parseInt(s[1]);\n int temp = x[a-1];\n x[a-1] = x[b-1];\n x[b-1] = temp;\n }\n for(int i = 0; i < w; i++){\n System.out.println(x[i]);\n }\n }catch(IOException e){\n\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try{\n int w = Integer.parseInt(reader.readLine());\n int n = Integer.parseInt(reader.readLine());\n int[] x = new int[w];\n for(int i = 0; i< w; i++){\n x[i] = i + 1;\n }\n int a ;\n int b ;\n for(int i = 0; i < n; i++){\n String line = reader.readLine();\n String[] s = line.split(\",\");\n a = Integer.parseInt(s[0]);\n b = Integer.parseInt(s[1]);\n int temp = x[a-1];\n x[a-1] = x[b-1];\n x[b-1] = temp;\n }\n for(int i = 0; i < w; i++){\n System.out.println(x[i]);\n }\n }catch(IOException e){\n\n }\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); try{ int w = Integer.parseInt(reader.readLine()); int n = Integer.parseInt(reader.readLine()); int[] x = new int[w]; for(int i = 0; i< w; i++){ x[i] = i + 1; } int a ; int b ; for(int i = 0; i < n; i++){ String line = reader.readLine(); String[] s = line.split(","); a = Integer.parseInt(s[0]); b = Integer.parseInt(s[1]); int temp = x[a-1]; x[a-1] = x[b-1]; x[b-1] = temp; } for(int i = 0; i < w; i++){ System.out.println(x[i]); } }catch(IOException e){ } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 0, 13, 17, 41, 13, 20, 17, 41, 13, 20, 17, 38, 5, 13, 30, 4, 18, 18, 13, 13, 13, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 13, 0, 13, 4, 18, 13, 13, 41, 13, 20, 2, 13, 17, 0, 18, 13, 17, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 0, 18, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 18, 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, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 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 ], [ 197, 5 ], [ 197, 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 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 8, 31 ], [ 31, 32 ], [ 31, 33 ], [ 8, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 39, 44 ], [ 35, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 49, 50 ], [ 45, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 54, 55 ], [ 45, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 59, 60 ], [ 58, 61 ], [ 45, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 65, 66 ], [ 64, 67 ], [ 45, 68 ], [ 68, 69 ], [ 68, 70 ], [ 71, 72 ], [ 71, 73 ], [ 45, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 74, 78 ], [ 45, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 79, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 86, 88 ], [ 79, 89 ], [ 89, 90 ], [ 90, 91 ], [ 79, 92 ], [ 93, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 94, 98 ], [ 45, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 99, 104 ], [ 104, 105 ], [ 104, 106 ], [ 99, 107 ], [ 107, 108 ], [ 108, 109 ], [ 99, 110 ], [ 111, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 114, 115 ], [ 115, 116 ], [ 111, 117 ], [ 117, 118 ], [ 117, 119 ], [ 119, 120 ], [ 120, 121 ], [ 119, 122 ], [ 111, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 123, 128 ], [ 128, 129 ], [ 128, 130 ], [ 123, 131 ], [ 131, 132 ], [ 132, 133 ], [ 123, 134 ], [ 135, 135 ], [ 135, 136 ], [ 136, 137 ], [ 137, 138 ], [ 137, 139 ], [ 136, 140 ], [ 140, 141 ], [ 141, 142 ], [ 140, 143 ], [ 143, 144 ], [ 143, 145 ], [ 111, 146 ], [ 146, 147 ], [ 146, 148 ], [ 148, 149 ], [ 148, 150 ], [ 150, 151 ], [ 150, 152 ], [ 111, 153 ], [ 153, 154 ], [ 154, 155 ], [ 154, 156 ], [ 156, 157 ], [ 156, 158 ], [ 153, 159 ], [ 159, 160 ], [ 159, 161 ], [ 161, 162 ], [ 161, 163 ], [ 111, 164 ], [ 164, 165 ], [ 165, 166 ], [ 165, 167 ], [ 167, 168 ], [ 167, 169 ], [ 164, 170 ], [ 45, 171 ], [ 171, 172 ], [ 172, 173 ], [ 173, 174 ], [ 173, 175 ], [ 171, 176 ], [ 176, 177 ], [ 176, 178 ], [ 178, 179 ], [ 178, 180 ], [ 171, 181 ], [ 181, 182 ], [ 182, 183 ], [ 171, 184 ], [ 185, 185 ], [ 185, 186 ], [ 186, 187 ], [ 187, 188 ], [ 188, 189 ], [ 188, 190 ], [ 186, 191 ], [ 191, 192 ], [ 191, 193 ], [ 6, 194 ], [ 194, 195 ], [ 0, 196 ], [ 196, 197 ], [ 196, 198 ] ]
[ "import java.io.*;\n \npublic class Main{\n public static void main(String[] args){\n BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n String s,t,u;\n int a,b,hako;\n hako=0;\n String[] abc=new String[2];\n int[] xyz=new int[2];\n try{\n s=reader.readLine();\n t=reader.readLine();\n a=Integer.parseInt(s);\n b=Integer.parseInt(t);\n int[] x=new int[a+1];\n x[0]=0;\n for(int j=1;j<(a+1);j++){\n x[j]=j;\n }\n for(int i=0;i<b;i++){\n u=reader.readLine();\n abc=u.split(\",\");\n for(int k=0;k<2;k++){\n xyz[k]=Integer.parseInt(abc[k]);\n }\n hako=x[xyz[0]];;\n x[xyz[0]]=x[xyz[1]];\n x[xyz[1]]=hako;\n }\n for(int l=1;l<(a+1);l++){\n System.out.println(x[l]);\n }\n }catch(IOException e){\n System.out.println(e);\n }\n }\n}", "import java.io.*;", "io.*", "java", "public class Main{\n public static void main(String[] args){\n BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n String s,t,u;\n int a,b,hako;\n hako=0;\n String[] abc=new String[2];\n int[] xyz=new int[2];\n try{\n s=reader.readLine();\n t=reader.readLine();\n a=Integer.parseInt(s);\n b=Integer.parseInt(t);\n int[] x=new int[a+1];\n x[0]=0;\n for(int j=1;j<(a+1);j++){\n x[j]=j;\n }\n for(int i=0;i<b;i++){\n u=reader.readLine();\n abc=u.split(\",\");\n for(int k=0;k<2;k++){\n xyz[k]=Integer.parseInt(abc[k]);\n }\n hako=x[xyz[0]];;\n x[xyz[0]]=x[xyz[1]];\n x[xyz[1]]=hako;\n }\n for(int l=1;l<(a+1);l++){\n System.out.println(x[l]);\n }\n }catch(IOException e){\n System.out.println(e);\n }\n }\n}", "Main", "public static void main(String[] args){\n BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n String s,t,u;\n int a,b,hako;\n hako=0;\n String[] abc=new String[2];\n int[] xyz=new int[2];\n try{\n s=reader.readLine();\n t=reader.readLine();\n a=Integer.parseInt(s);\n b=Integer.parseInt(t);\n int[] x=new int[a+1];\n x[0]=0;\n for(int j=1;j<(a+1);j++){\n x[j]=j;\n }\n for(int i=0;i<b;i++){\n u=reader.readLine();\n abc=u.split(\",\");\n for(int k=0;k<2;k++){\n xyz[k]=Integer.parseInt(abc[k]);\n }\n hako=x[xyz[0]];;\n x[xyz[0]]=x[xyz[1]];\n x[xyz[1]]=hako;\n }\n for(int l=1;l<(a+1);l++){\n System.out.println(x[l]);\n }\n }catch(IOException e){\n System.out.println(e);\n }\n }", "main", "{\n BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n String s,t,u;\n int a,b,hako;\n hako=0;\n String[] abc=new String[2];\n int[] xyz=new int[2];\n try{\n s=reader.readLine();\n t=reader.readLine();\n a=Integer.parseInt(s);\n b=Integer.parseInt(t);\n int[] x=new int[a+1];\n x[0]=0;\n for(int j=1;j<(a+1);j++){\n x[j]=j;\n }\n for(int i=0;i<b;i++){\n u=reader.readLine();\n abc=u.split(\",\");\n for(int k=0;k<2;k++){\n xyz[k]=Integer.parseInt(abc[k]);\n }\n hako=x[xyz[0]];;\n x[xyz[0]]=x[xyz[1]];\n x[xyz[1]]=hako;\n }\n for(int l=1;l<(a+1);l++){\n System.out.println(x[l]);\n }\n }catch(IOException e){\n System.out.println(e);\n }\n }", "BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));", "reader", "new BufferedReader(new InputStreamReader(System.in))", "String s", "s", "t", "t", "u;", "u", "int a", "a", "b", "b", "hako;", "hako", "hako=0", "hako", "0", "String[] abc=new String[2];", "abc", "new String[2]", "2", "int[] xyz=new int[2];", "xyz", "new int[2]", "2", "try{\n s=reader.readLine();\n t=reader.readLine();\n a=Integer.parseInt(s);\n b=Integer.parseInt(t);\n int[] x=new int[a+1];\n x[0]=0;\n for(int j=1;j<(a+1);j++){\n x[j]=j;\n }\n for(int i=0;i<b;i++){\n u=reader.readLine();\n abc=u.split(\",\");\n for(int k=0;k<2;k++){\n xyz[k]=Integer.parseInt(abc[k]);\n }\n hako=x[xyz[0]];;\n x[xyz[0]]=x[xyz[1]];\n x[xyz[1]]=hako;\n }\n for(int l=1;l<(a+1);l++){\n System.out.println(x[l]);\n }\n }catch(IOException e){\n System.out.println(e);\n }", "catch(IOException e){\n System.out.println(e);\n }", "IOException e", "{\n System.out.println(e);\n }", "System.out.println(e)", "System.out.println", "System.out", "System", "System.out", "e", "{\n s=reader.readLine();\n t=reader.readLine();\n a=Integer.parseInt(s);\n b=Integer.parseInt(t);\n int[] x=new int[a+1];\n x[0]=0;\n for(int j=1;j<(a+1);j++){\n x[j]=j;\n }\n for(int i=0;i<b;i++){\n u=reader.readLine();\n abc=u.split(\",\");\n for(int k=0;k<2;k++){\n xyz[k]=Integer.parseInt(abc[k]);\n }\n hako=x[xyz[0]];;\n x[xyz[0]]=x[xyz[1]];\n x[xyz[1]]=hako;\n }\n for(int l=1;l<(a+1);l++){\n System.out.println(x[l]);\n }\n }", "s=reader.readLine()", "s", "reader.readLine()", "reader.readLine", "reader", "t=reader.readLine()", "t", "reader.readLine()", "reader.readLine", "reader", "a=Integer.parseInt(s)", "a", "Integer.parseInt(s)", "Integer.parseInt", "Integer", "s", "b=Integer.parseInt(t)", "b", "Integer.parseInt(t)", "Integer.parseInt", "Integer", "t", "int[] x=new int[a+1];", "x", "new int[a+1]", "a+1", "a", "1", "x[0]=0", "x[0]", "x", "0", "0", "for(int j=1;j<(a+1);j++){\n x[j]=j;\n }", "int j=1;", "int j=1;", "j", "1", "j<(a+1)", "j", "(a+1)", "a", "1", "j++", "j++", "j", "{\n x[j]=j;\n }", "{\n x[j]=j;\n }", "x[j]=j", "x[j]", "x", "j", "j", "for(int i=0;i<b;i++){\n u=reader.readLine();\n abc=u.split(\",\");\n for(int k=0;k<2;k++){\n xyz[k]=Integer.parseInt(abc[k]);\n }\n hako=x[xyz[0]];;\n x[xyz[0]]=x[xyz[1]];\n x[xyz[1]]=hako;\n }", "int i=0;", "int i=0;", "i", "0", "i<b", "i", "b", "i++", "i++", "i", "{\n u=reader.readLine();\n abc=u.split(\",\");\n for(int k=0;k<2;k++){\n xyz[k]=Integer.parseInt(abc[k]);\n }\n hako=x[xyz[0]];;\n x[xyz[0]]=x[xyz[1]];\n x[xyz[1]]=hako;\n }", "{\n u=reader.readLine();\n abc=u.split(\",\");\n for(int k=0;k<2;k++){\n xyz[k]=Integer.parseInt(abc[k]);\n }\n hako=x[xyz[0]];;\n x[xyz[0]]=x[xyz[1]];\n x[xyz[1]]=hako;\n }", "u=reader.readLine()", "u", "reader.readLine()", "reader.readLine", "reader", "abc=u.split(\",\")", "abc", "u.split(\",\")", "u.split", "u", "\",\"", "for(int k=0;k<2;k++){\n xyz[k]=Integer.parseInt(abc[k]);\n }", "int k=0;", "int k=0;", "k", "0", "k<2", "k", "2", "k++", "k++", "k", "{\n xyz[k]=Integer.parseInt(abc[k]);\n }", "{\n xyz[k]=Integer.parseInt(abc[k]);\n }", "xyz[k]=Integer.parseInt(abc[k])", "xyz[k]", "xyz", "k", "Integer.parseInt(abc[k])", "Integer.parseInt", "Integer", "abc[k]", "abc", "k", "hako=x[xyz[0]]", "hako", "x[xyz[0]]", "x", "xyz[0]", "xyz", "0", "x[xyz[0]]=x[xyz[1]]", "x[xyz[0]]", "x", "xyz[0]", "xyz", "0", "x[xyz[1]]", "x", "xyz[1]", "xyz", "1", "x[xyz[1]]=hako", "x[xyz[1]]", "x", "xyz[1]", "xyz", "1", "hako", "for(int l=1;l<(a+1);l++){\n System.out.println(x[l]);\n }", "int l=1;", "int l=1;", "l", "1", "l<(a+1)", "l", "(a+1)", "a", "1", "l++", "l++", "l", "{\n System.out.println(x[l]);\n }", "{\n System.out.println(x[l]);\n }", "System.out.println(x[l])", "System.out.println", "System.out", "System", "System.out", "x[l]", "x", "l", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n String s,t,u;\n int a,b,hako;\n hako=0;\n String[] abc=new String[2];\n int[] xyz=new int[2];\n try{\n s=reader.readLine();\n t=reader.readLine();\n a=Integer.parseInt(s);\n b=Integer.parseInt(t);\n int[] x=new int[a+1];\n x[0]=0;\n for(int j=1;j<(a+1);j++){\n x[j]=j;\n }\n for(int i=0;i<b;i++){\n u=reader.readLine();\n abc=u.split(\",\");\n for(int k=0;k<2;k++){\n xyz[k]=Integer.parseInt(abc[k]);\n }\n hako=x[xyz[0]];;\n x[xyz[0]]=x[xyz[1]];\n x[xyz[1]]=hako;\n }\n for(int l=1;l<(a+1);l++){\n System.out.println(x[l]);\n }\n }catch(IOException e){\n System.out.println(e);\n }\n }\n}", "public class Main{\n public static void main(String[] args){\n BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n String s,t,u;\n int a,b,hako;\n hako=0;\n String[] abc=new String[2];\n int[] xyz=new int[2];\n try{\n s=reader.readLine();\n t=reader.readLine();\n a=Integer.parseInt(s);\n b=Integer.parseInt(t);\n int[] x=new int[a+1];\n x[0]=0;\n for(int j=1;j<(a+1);j++){\n x[j]=j;\n }\n for(int i=0;i<b;i++){\n u=reader.readLine();\n abc=u.split(\",\");\n for(int k=0;k<2;k++){\n xyz[k]=Integer.parseInt(abc[k]);\n }\n hako=x[xyz[0]];;\n x[xyz[0]]=x[xyz[1]];\n x[xyz[1]]=hako;\n }\n for(int l=1;l<(a+1);l++){\n System.out.println(x[l]);\n }\n }catch(IOException e){\n System.out.println(e);\n }\n }\n}", "Main" ]
import java.io.*; public class Main{ public static void main(String[] args){ BufferedReader reader=new BufferedReader(new InputStreamReader(System.in)); String s,t,u; int a,b,hako; hako=0; String[] abc=new String[2]; int[] xyz=new int[2]; try{ s=reader.readLine(); t=reader.readLine(); a=Integer.parseInt(s); b=Integer.parseInt(t); int[] x=new int[a+1]; x[0]=0; for(int j=1;j<(a+1);j++){ x[j]=j; } for(int i=0;i<b;i++){ u=reader.readLine(); abc=u.split(","); for(int k=0;k<2;k++){ xyz[k]=Integer.parseInt(abc[k]); } hako=x[xyz[0]];; x[xyz[0]]=x[xyz[1]]; x[xyz[1]]=hako; } for(int l=1;l<(a+1);l++){ System.out.println(x[l]); } }catch(IOException e){ System.out.println(e); } } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 12, 13, 30, 20, 23, 13, 12, 13, 30, 0, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 41, 13, 4, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 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, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 140, 5 ], [ 140, 6 ], [ 6, 7 ], [ 140, 8 ], [ 8, 9 ], [ 8, 10 ], [ 10, 11 ], [ 8, 12 ], [ 12, 13 ], [ 140, 14 ], [ 14, 15 ], [ 14, 16 ], [ 16, 17 ], [ 17, 18 ], [ 17, 19 ], [ 16, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 22, 25 ], [ 25, 26 ], [ 26, 27 ], [ 16, 28 ], [ 28, 29 ], [ 28, 30 ], [ 16, 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 ], [ 16, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 55, 56 ], [ 54, 57 ], [ 57, 58 ], [ 58, 59 ], [ 16, 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 ], [ 85, 86 ], [ 84, 87 ], [ 87, 88 ], [ 87, 89 ], [ 83, 90 ], [ 72, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 94, 97 ], [ 97, 98 ], [ 97, 99 ], [ 93, 100 ], [ 72, 101 ], [ 101, 102 ], [ 101, 103 ], [ 103, 104 ], [ 103, 105 ], [ 72, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 106, 110 ], [ 110, 111 ], [ 110, 112 ], [ 72, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 113, 117 ], [ 16, 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 ], [ 0, 139 ], [ 139, 140 ], [ 139, 141 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tprivate Scanner sc;\n\t\n\tpublic static void main(String[] args) {\n\t\tnew Main();\n\t}\n\t\n\tpublic Main() {\n\t\tsc = new Scanner(System.in);\n\n\t\tint num = Integer.parseInt(sc.nextLine());\n\t\tint[] e = new int[num];\n\t\tfor (int i = 0; i < num; i++) {\n\t\t\te[i] = i + 1;\n\t\t}\n\t\t\n\t\tint lim = Integer.parseInt(sc.nextLine());\n\t\tfor (int i = 0; i < lim; i++) {\n\t\t\tString[] params = sc.nextLine().split(\",\");\n\t\t\tint l = Integer.parseInt(params[0]) - 1;\n\t\t\tint r = Integer.parseInt(params[1]) - 1;\n\t\t\t\n\t\t\tint tmp = e[l];\n\t\t\te[l] = e[r];\n\t\t\te[r] = tmp;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < num; i++) {\n\t\t\tSystem.out.println(e[i]);\n\t\t}\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tprivate Scanner sc;\n\t\n\tpublic static void main(String[] args) {\n\t\tnew Main();\n\t}\n\t\n\tpublic Main() {\n\t\tsc = new Scanner(System.in);\n\n\t\tint num = Integer.parseInt(sc.nextLine());\n\t\tint[] e = new int[num];\n\t\tfor (int i = 0; i < num; i++) {\n\t\t\te[i] = i + 1;\n\t\t}\n\t\t\n\t\tint lim = Integer.parseInt(sc.nextLine());\n\t\tfor (int i = 0; i < lim; i++) {\n\t\t\tString[] params = sc.nextLine().split(\",\");\n\t\t\tint l = Integer.parseInt(params[0]) - 1;\n\t\t\tint r = Integer.parseInt(params[1]) - 1;\n\t\t\t\n\t\t\tint tmp = e[l];\n\t\t\te[l] = e[r];\n\t\t\te[r] = tmp;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < num; i++) {\n\t\t\tSystem.out.println(e[i]);\n\t\t}\n\t}\n}", "Main", "private Scanner sc;", "sc", "public static void main(String[] args) {\n\t\tnew Main();\n\t}", "main", "{\n\t\tnew Main();\n\t}", "new Main()", "String[] args", "args", "public Main() {\n\t\tsc = new Scanner(System.in);\n\n\t\tint num = Integer.parseInt(sc.nextLine());\n\t\tint[] e = new int[num];\n\t\tfor (int i = 0; i < num; i++) {\n\t\t\te[i] = i + 1;\n\t\t}\n\t\t\n\t\tint lim = Integer.parseInt(sc.nextLine());\n\t\tfor (int i = 0; i < lim; i++) {\n\t\t\tString[] params = sc.nextLine().split(\",\");\n\t\t\tint l = Integer.parseInt(params[0]) - 1;\n\t\t\tint r = Integer.parseInt(params[1]) - 1;\n\t\t\t\n\t\t\tint tmp = e[l];\n\t\t\te[l] = e[r];\n\t\t\te[r] = tmp;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < num; i++) {\n\t\t\tSystem.out.println(e[i]);\n\t\t}\n\t}", "Main", "{\n\t\tsc = new Scanner(System.in);\n\n\t\tint num = Integer.parseInt(sc.nextLine());\n\t\tint[] e = new int[num];\n\t\tfor (int i = 0; i < num; i++) {\n\t\t\te[i] = i + 1;\n\t\t}\n\t\t\n\t\tint lim = Integer.parseInt(sc.nextLine());\n\t\tfor (int i = 0; i < lim; i++) {\n\t\t\tString[] params = sc.nextLine().split(\",\");\n\t\t\tint l = Integer.parseInt(params[0]) - 1;\n\t\t\tint r = Integer.parseInt(params[1]) - 1;\n\t\t\t\n\t\t\tint tmp = e[l];\n\t\t\te[l] = e[r];\n\t\t\te[r] = tmp;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < num; i++) {\n\t\t\tSystem.out.println(e[i]);\n\t\t}\n\t}", "sc = new Scanner(System.in)", "sc", "new Scanner(System.in)", "int num = Integer.parseInt(sc.nextLine());", "num", "Integer.parseInt(sc.nextLine())", "Integer.parseInt", "Integer", "sc.nextLine()", "sc.nextLine", "sc", "int[] e = new int[num];", "e", "new int[num]", "num", "for (int i = 0; i < num; i++) {\n\t\t\te[i] = i + 1;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < num", "i", "num", "i++", "i++", "i", "{\n\t\t\te[i] = i + 1;\n\t\t}", "{\n\t\t\te[i] = i + 1;\n\t\t}", "e[i] = i + 1", "e[i]", "e", "i", "i + 1", "i", "1", "int lim = Integer.parseInt(sc.nextLine());", "lim", "Integer.parseInt(sc.nextLine())", "Integer.parseInt", "Integer", "sc.nextLine()", "sc.nextLine", "sc", "for (int i = 0; i < lim; i++) {\n\t\t\tString[] params = sc.nextLine().split(\",\");\n\t\t\tint l = Integer.parseInt(params[0]) - 1;\n\t\t\tint r = Integer.parseInt(params[1]) - 1;\n\t\t\t\n\t\t\tint tmp = e[l];\n\t\t\te[l] = e[r];\n\t\t\te[r] = tmp;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < lim", "i", "lim", "i++", "i++", "i", "{\n\t\t\tString[] params = sc.nextLine().split(\",\");\n\t\t\tint l = Integer.parseInt(params[0]) - 1;\n\t\t\tint r = Integer.parseInt(params[1]) - 1;\n\t\t\t\n\t\t\tint tmp = e[l];\n\t\t\te[l] = e[r];\n\t\t\te[r] = tmp;\n\t\t}", "{\n\t\t\tString[] params = sc.nextLine().split(\",\");\n\t\t\tint l = Integer.parseInt(params[0]) - 1;\n\t\t\tint r = Integer.parseInt(params[1]) - 1;\n\t\t\t\n\t\t\tint tmp = e[l];\n\t\t\te[l] = e[r];\n\t\t\te[r] = tmp;\n\t\t}", "String[] params = sc.nextLine().split(\",\");", "params", "sc.nextLine().split(\",\")", "sc.nextLine().split", "sc.nextLine()", "sc.nextLine", "sc", "\",\"", "int l = Integer.parseInt(params[0]) - 1;", "l", "Integer.parseInt(params[0]) - 1", "Integer.parseInt(params[0])", "Integer.parseInt", "Integer", "params[0]", "params", "0", "1", "int r = Integer.parseInt(params[1]) - 1;", "r", "Integer.parseInt(params[1]) - 1", "Integer.parseInt(params[1])", "Integer.parseInt", "Integer", "params[1]", "params", "1", "1", "int tmp = e[l];", "tmp", "e[l]", "e", "l", "e[l] = e[r]", "e[l]", "e", "l", "e[r]", "e", "r", "e[r] = tmp", "e[r]", "e", "r", "tmp", "for (int i = 0; i < num; i++) {\n\t\t\tSystem.out.println(e[i]);\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < num", "i", "num", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(e[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(e[i]);\n\t\t}", "System.out.println(e[i])", "System.out.println", "System.out", "System", "System.out", "e[i]", "e", "i", "public class Main {\n\tprivate Scanner sc;\n\t\n\tpublic static void main(String[] args) {\n\t\tnew Main();\n\t}\n\t\n\tpublic Main() {\n\t\tsc = new Scanner(System.in);\n\n\t\tint num = Integer.parseInt(sc.nextLine());\n\t\tint[] e = new int[num];\n\t\tfor (int i = 0; i < num; i++) {\n\t\t\te[i] = i + 1;\n\t\t}\n\t\t\n\t\tint lim = Integer.parseInt(sc.nextLine());\n\t\tfor (int i = 0; i < lim; i++) {\n\t\t\tString[] params = sc.nextLine().split(\",\");\n\t\t\tint l = Integer.parseInt(params[0]) - 1;\n\t\t\tint r = Integer.parseInt(params[1]) - 1;\n\t\t\t\n\t\t\tint tmp = e[l];\n\t\t\te[l] = e[r];\n\t\t\te[r] = tmp;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < num; i++) {\n\t\t\tSystem.out.println(e[i]);\n\t\t}\n\t}\n}", "public class Main {\n\tprivate Scanner sc;\n\t\n\tpublic static void main(String[] args) {\n\t\tnew Main();\n\t}\n\t\n\tpublic Main() {\n\t\tsc = new Scanner(System.in);\n\n\t\tint num = Integer.parseInt(sc.nextLine());\n\t\tint[] e = new int[num];\n\t\tfor (int i = 0; i < num; i++) {\n\t\t\te[i] = i + 1;\n\t\t}\n\t\t\n\t\tint lim = Integer.parseInt(sc.nextLine());\n\t\tfor (int i = 0; i < lim; i++) {\n\t\t\tString[] params = sc.nextLine().split(\",\");\n\t\t\tint l = Integer.parseInt(params[0]) - 1;\n\t\t\tint r = Integer.parseInt(params[1]) - 1;\n\t\t\t\n\t\t\tint tmp = e[l];\n\t\t\te[l] = e[r];\n\t\t\te[r] = tmp;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < num; i++) {\n\t\t\tSystem.out.println(e[i]);\n\t\t}\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { private Scanner sc; public static void main(String[] args) { new Main(); } public Main() { sc = new Scanner(System.in); int num = Integer.parseInt(sc.nextLine()); int[] e = new int[num]; for (int i = 0; i < num; i++) { e[i] = i + 1; } int lim = Integer.parseInt(sc.nextLine()); for (int i = 0; i < lim; i++) { String[] params = sc.nextLine().split(","); int l = Integer.parseInt(params[0]) - 1; int r = Integer.parseInt(params[1]) - 1; int tmp = e[l]; e[l] = e[r]; e[r] = tmp; } for (int i = 0; i < num; i++) { System.out.println(e[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, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 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 ], [ 133, 11 ], [ 133, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 14, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 14, 28 ], [ 28, 29 ], [ 28, 30 ], [ 31, 32 ], [ 31, 33 ], [ 14, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 34, 39 ], [ 39, 40 ], [ 39, 41 ], [ 34, 42 ], [ 42, 43 ], [ 43, 44 ], [ 34, 45 ], [ 46, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 47, 51 ], [ 14, 52 ], [ 52, 53 ], [ 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 ], [ 14, 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 ], [ 12, 130 ], [ 130, 131 ], [ 0, 132 ], [ 132, 133 ], [ 132, 134 ] ]
[ "import java.awt.print.Printable;\nimport java.util.Scanner;\nimport javax.sound.midi.SysexMessage;\n \npublic class Main{ \n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int w = sc.nextInt();\n int amidaArray[] = new int[n+1];\n\n for(int i=1;i<=n;i++){\n amidaArray[i] = i;\n }\n for(int i=0;i<w;i++){\n String str = sc.next();\n String[] strs = str.split(\",\");\n\n int a = Integer.parseInt(strs[0]);\n int b = Integer.parseInt(strs[1]);\n\n int temp = amidaArray[a];\n\n amidaArray[a]=amidaArray[b];\n\n amidaArray[b]=temp;\n }\n for(int i=1;i<=n;i++){\n System.out.println(amidaArray[i]);\n }\n } \n}", "import java.awt.print.Printable;", "Printable", "java.awt.print", "import java.util.Scanner;", "Scanner", "java.util", "import javax.sound.midi.SysexMessage;", "SysexMessage", "javax.sound.midi", "public class Main{ \n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int w = sc.nextInt();\n int amidaArray[] = new int[n+1];\n\n for(int i=1;i<=n;i++){\n amidaArray[i] = i;\n }\n for(int i=0;i<w;i++){\n String str = sc.next();\n String[] strs = str.split(\",\");\n\n int a = Integer.parseInt(strs[0]);\n int b = Integer.parseInt(strs[1]);\n\n int temp = amidaArray[a];\n\n amidaArray[a]=amidaArray[b];\n\n amidaArray[b]=temp;\n }\n for(int i=1;i<=n;i++){\n System.out.println(amidaArray[i]);\n }\n } \n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int w = sc.nextInt();\n int amidaArray[] = new int[n+1];\n\n for(int i=1;i<=n;i++){\n amidaArray[i] = i;\n }\n for(int i=0;i<w;i++){\n String str = sc.next();\n String[] strs = str.split(\",\");\n\n int a = Integer.parseInt(strs[0]);\n int b = Integer.parseInt(strs[1]);\n\n int temp = amidaArray[a];\n\n amidaArray[a]=amidaArray[b];\n\n amidaArray[b]=temp;\n }\n for(int i=1;i<=n;i++){\n System.out.println(amidaArray[i]);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int w = sc.nextInt();\n int amidaArray[] = new int[n+1];\n\n for(int i=1;i<=n;i++){\n amidaArray[i] = i;\n }\n for(int i=0;i<w;i++){\n String str = sc.next();\n String[] strs = str.split(\",\");\n\n int a = Integer.parseInt(strs[0]);\n int b = Integer.parseInt(strs[1]);\n\n int temp = amidaArray[a];\n\n amidaArray[a]=amidaArray[b];\n\n amidaArray[b]=temp;\n }\n for(int i=1;i<=n;i++){\n System.out.println(amidaArray[i]);\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int w = sc.nextInt();", "w", "sc.nextInt()", "sc.nextInt", "sc", "int amidaArray[] = new int[n+1];", "amidaArray", "new int[n+1]", "n+1", "n", "1", "for(int i=1;i<=n;i++){\n amidaArray[i] = i;\n }", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n amidaArray[i] = i;\n }", "{\n amidaArray[i] = i;\n }", "amidaArray[i] = i", "amidaArray[i]", "amidaArray", "i", "i", "for(int i=0;i<w;i++){\n String str = sc.next();\n String[] strs = str.split(\",\");\n\n int a = Integer.parseInt(strs[0]);\n int b = Integer.parseInt(strs[1]);\n\n int temp = amidaArray[a];\n\n amidaArray[a]=amidaArray[b];\n\n amidaArray[b]=temp;\n }", "int i=0;", "int i=0;", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "{\n String str = sc.next();\n String[] strs = str.split(\",\");\n\n int a = Integer.parseInt(strs[0]);\n int b = Integer.parseInt(strs[1]);\n\n int temp = amidaArray[a];\n\n amidaArray[a]=amidaArray[b];\n\n amidaArray[b]=temp;\n }", "{\n String str = sc.next();\n String[] strs = str.split(\",\");\n\n int a = Integer.parseInt(strs[0]);\n int b = Integer.parseInt(strs[1]);\n\n int temp = amidaArray[a];\n\n amidaArray[a]=amidaArray[b];\n\n amidaArray[b]=temp;\n }", "String str = sc.next();", "str", "sc.next()", "sc.next", "sc", "String[] strs = str.split(\",\");", "strs", "str.split(\",\")", "str.split", "str", "\",\"", "int a = Integer.parseInt(strs[0]);", "a", "Integer.parseInt(strs[0])", "Integer.parseInt", "Integer", "strs[0]", "strs", "0", "int b = Integer.parseInt(strs[1]);", "b", "Integer.parseInt(strs[1])", "Integer.parseInt", "Integer", "strs[1]", "strs", "1", "int temp = amidaArray[a];", "temp", "amidaArray[a]", "amidaArray", "a", "amidaArray[a]=amidaArray[b]", "amidaArray[a]", "amidaArray", "a", "amidaArray[b]", "amidaArray", "b", "amidaArray[b]=temp", "amidaArray[b]", "amidaArray", "b", "temp", "for(int i=1;i<=n;i++){\n System.out.println(amidaArray[i]);\n }", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n System.out.println(amidaArray[i]);\n }", "{\n System.out.println(amidaArray[i]);\n }", "System.out.println(amidaArray[i])", "System.out.println", "System.out", "System", "System.out", "amidaArray[i]", "amidaArray", "i", "String[] args", "args", "public class Main{ \n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int w = sc.nextInt();\n int amidaArray[] = new int[n+1];\n\n for(int i=1;i<=n;i++){\n amidaArray[i] = i;\n }\n for(int i=0;i<w;i++){\n String str = sc.next();\n String[] strs = str.split(\",\");\n\n int a = Integer.parseInt(strs[0]);\n int b = Integer.parseInt(strs[1]);\n\n int temp = amidaArray[a];\n\n amidaArray[a]=amidaArray[b];\n\n amidaArray[b]=temp;\n }\n for(int i=1;i<=n;i++){\n System.out.println(amidaArray[i]);\n }\n } \n}", "public class Main{ \n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int w = sc.nextInt();\n int amidaArray[] = new int[n+1];\n\n for(int i=1;i<=n;i++){\n amidaArray[i] = i;\n }\n for(int i=0;i<w;i++){\n String str = sc.next();\n String[] strs = str.split(\",\");\n\n int a = Integer.parseInt(strs[0]);\n int b = Integer.parseInt(strs[1]);\n\n int temp = amidaArray[a];\n\n amidaArray[a]=amidaArray[b];\n\n amidaArray[b]=temp;\n }\n for(int i=1;i<=n;i++){\n System.out.println(amidaArray[i]);\n }\n } \n}", "Main" ]
import java.awt.print.Printable; import java.util.Scanner; import javax.sound.midi.SysexMessage; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int w = sc.nextInt(); int amidaArray[] = new int[n+1]; for(int i=1;i<=n;i++){ amidaArray[i] = i; } for(int i=0;i<w;i++){ String str = sc.next(); String[] strs = str.split(","); int a = Integer.parseInt(strs[0]); int b = Integer.parseInt(strs[1]); int temp = amidaArray[a]; amidaArray[a]=amidaArray[b]; amidaArray[b]=temp; } for(int i=1;i<=n;i++){ System.out.println(amidaArray[i]); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 4, 18, 13, 17, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 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, 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 ], [ 128, 11 ], [ 128, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 19, 20 ], [ 18, 21 ], [ 14, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 14, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 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 ], [ 48, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 49, 53 ], [ 53, 54 ], [ 53, 55 ], [ 14, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 56, 61 ], [ 61, 62 ], [ 61, 63 ], [ 56, 64 ], [ 64, 65 ], [ 65, 66 ], [ 56, 67 ], [ 68, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 72, 73 ], [ 68, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 68, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 83, 85 ], [ 68, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 89, 91 ], [ 86, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 94, 96 ], [ 68, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 100, 102 ], [ 97, 103 ], [ 14, 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 ], [ 12, 125 ], [ 125, 126 ], [ 0, 127 ], [ 127, 128 ], [ 127, 129 ] ]
[ "import java.util.Scanner;\nimport java.lang.Math;\nimport java.math.BigDecimal;\n\npublic class Main{\n\t\n\tpublic static void main(String[] args){\n\n\t\tScanner s = new Scanner(System.in);\n\t\ts.useDelimiter(\"\\\\s*,\\\\s*|\\\\s\");\n\t\t\n\t\tint w = s.nextInt();\n\t\tint n = s.nextInt();\n\t\t\t\t\n\t\tint[] x = new int[w];\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tx[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\t\n\t\t\tint a = s.nextInt();\n\t\t\tint b = s.nextInt();\n\t\t\t\n\t\t\tint tmp = x[a-1];\n\t\t\tx[a-1] = x[b-1];\n\t\t\tx[b-1] = tmp;\n\t\t\t\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(x[i]);\n\t\t}\n\t\t\n\t}\n\t\n}", "import java.util.Scanner;", "Scanner", "java.util", "import java.lang.Math;", "Math", "java.lang", "import java.math.BigDecimal;", "BigDecimal", "java.math", "public class Main{\n\t\n\tpublic static void main(String[] args){\n\n\t\tScanner s = new Scanner(System.in);\n\t\ts.useDelimiter(\"\\\\s*,\\\\s*|\\\\s\");\n\t\t\n\t\tint w = s.nextInt();\n\t\tint n = s.nextInt();\n\t\t\t\t\n\t\tint[] x = new int[w];\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tx[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\t\n\t\t\tint a = s.nextInt();\n\t\t\tint b = s.nextInt();\n\t\t\t\n\t\t\tint tmp = x[a-1];\n\t\t\tx[a-1] = x[b-1];\n\t\t\tx[b-1] = tmp;\n\t\t\t\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(x[i]);\n\t\t}\n\t\t\n\t}\n\t\n}", "Main", "public static void main(String[] args){\n\n\t\tScanner s = new Scanner(System.in);\n\t\ts.useDelimiter(\"\\\\s*,\\\\s*|\\\\s\");\n\t\t\n\t\tint w = s.nextInt();\n\t\tint n = s.nextInt();\n\t\t\t\t\n\t\tint[] x = new int[w];\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tx[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\t\n\t\t\tint a = s.nextInt();\n\t\t\tint b = s.nextInt();\n\t\t\t\n\t\t\tint tmp = x[a-1];\n\t\t\tx[a-1] = x[b-1];\n\t\t\tx[b-1] = tmp;\n\t\t\t\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(x[i]);\n\t\t}\n\t\t\n\t}", "main", "{\n\n\t\tScanner s = new Scanner(System.in);\n\t\ts.useDelimiter(\"\\\\s*,\\\\s*|\\\\s\");\n\t\t\n\t\tint w = s.nextInt();\n\t\tint n = s.nextInt();\n\t\t\t\t\n\t\tint[] x = new int[w];\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tx[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\t\n\t\t\tint a = s.nextInt();\n\t\t\tint b = s.nextInt();\n\t\t\t\n\t\t\tint tmp = x[a-1];\n\t\t\tx[a-1] = x[b-1];\n\t\t\tx[b-1] = tmp;\n\t\t\t\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(x[i]);\n\t\t}\n\t\t\n\t}", "Scanner s = new Scanner(System.in);", "s", "new Scanner(System.in)", "s.useDelimiter(\"\\\\s*,\\\\s*|\\\\s\")", "s.useDelimiter", "s", "\"\\\\s*,\\\\s*|\\\\s\"", "int w = s.nextInt();", "w", "s.nextInt()", "s.nextInt", "s", "int n = s.nextInt();", "n", "s.nextInt()", "s.nextInt", "s", "int[] x = new int[w];", "x", "new int[w]", "w", "for(int i = 0; i < w; i++){\n\t\t\tx[i] = i+1;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < w", "i", "w", "i++", "i++", "i", "{\n\t\t\tx[i] = i+1;\n\t\t}", "{\n\t\t\tx[i] = i+1;\n\t\t}", "x[i] = i+1", "x[i]", "x", "i", "i+1", "i", "1", "for(int i = 0; i < n; i++){\n\t\t\t\n\t\t\tint a = s.nextInt();\n\t\t\tint b = s.nextInt();\n\t\t\t\n\t\t\tint tmp = x[a-1];\n\t\t\tx[a-1] = x[b-1];\n\t\t\tx[b-1] = tmp;\n\t\t\t\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\t\n\t\t\tint a = s.nextInt();\n\t\t\tint b = s.nextInt();\n\t\t\t\n\t\t\tint tmp = x[a-1];\n\t\t\tx[a-1] = x[b-1];\n\t\t\tx[b-1] = tmp;\n\t\t\t\n\t\t}", "{\n\t\t\t\n\t\t\tint a = s.nextInt();\n\t\t\tint b = s.nextInt();\n\t\t\t\n\t\t\tint tmp = x[a-1];\n\t\t\tx[a-1] = x[b-1];\n\t\t\tx[b-1] = tmp;\n\t\t\t\n\t\t}", "int a = s.nextInt();", "a", "s.nextInt()", "s.nextInt", "s", "int b = s.nextInt();", "b", "s.nextInt()", "s.nextInt", "s", "int tmp = x[a-1];", "tmp", "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] = tmp", "x[b-1]", "x", "b-1", "b", "1", "tmp", "for(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(x[i]);\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < w", "i", "w", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(x[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(x[i]);\n\t\t}", "System.out.println(x[i])", "System.out.println", "System.out", "System", "System.out", "x[i]", "x", "i", "String[] args", "args", "public class Main{\n\t\n\tpublic static void main(String[] args){\n\n\t\tScanner s = new Scanner(System.in);\n\t\ts.useDelimiter(\"\\\\s*,\\\\s*|\\\\s\");\n\t\t\n\t\tint w = s.nextInt();\n\t\tint n = s.nextInt();\n\t\t\t\t\n\t\tint[] x = new int[w];\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tx[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\t\n\t\t\tint a = s.nextInt();\n\t\t\tint b = s.nextInt();\n\t\t\t\n\t\t\tint tmp = x[a-1];\n\t\t\tx[a-1] = x[b-1];\n\t\t\tx[b-1] = tmp;\n\t\t\t\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(x[i]);\n\t\t}\n\t\t\n\t}\n\t\n}", "public class Main{\n\t\n\tpublic static void main(String[] args){\n\n\t\tScanner s = new Scanner(System.in);\n\t\ts.useDelimiter(\"\\\\s*,\\\\s*|\\\\s\");\n\t\t\n\t\tint w = s.nextInt();\n\t\tint n = s.nextInt();\n\t\t\t\t\n\t\tint[] x = new int[w];\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tx[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < n; i++){\n\t\t\t\n\t\t\tint a = s.nextInt();\n\t\t\tint b = s.nextInt();\n\t\t\t\n\t\t\tint tmp = x[a-1];\n\t\t\tx[a-1] = x[b-1];\n\t\t\tx[b-1] = tmp;\n\t\t\t\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(x[i]);\n\t\t}\n\t\t\n\t}\n\t\n}", "Main" ]
import java.util.Scanner; import java.lang.Math; import java.math.BigDecimal; public class Main{ public static void main(String[] args){ Scanner s = new Scanner(System.in); s.useDelimiter("\\s*,\\s*|\\s"); int w = s.nextInt(); int n = s.nextInt(); int[] x = new int[w]; for(int i = 0; i < w; i++){ x[i] = i+1; } for(int i = 0; i < n; i++){ int a = s.nextInt(); int b = s.nextInt(); int tmp = x[a-1]; x[a-1] = x[b-1]; x[b-1] = tmp; } 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, 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, 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, 28, 13, 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 ], [ 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 ], [ 58, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 76, 79 ], [ 79, 80 ], [ 79, 81 ], [ 75, 82 ], [ 58, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 86, 89 ], [ 89, 90 ], [ 89, 91 ], [ 85, 92 ], [ 58, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 95, 97 ], [ 58, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 98, 102 ], [ 102, 103 ], [ 102, 104 ], [ 58, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 105, 109 ], [ 8, 110 ], [ 110, 111 ], [ 110, 112 ], [ 110, 113 ], [ 114, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 115, 120 ], [ 120, 121 ], [ 121, 122 ], [ 120, 123 ], [ 6, 124 ], [ 124, 125 ] ]
[ "\n\nimport java.util.Scanner;\n\nclass Main{\n\n\n\tpublic static void main(String[] a){\n\n\t\tScanner sc = new Scanner(System.in);\n\n\n\t\tint tatebo = sc.nextInt();\n\t\tint yokobo = sc.nextInt();\n\n\t\tint num [] = new int[tatebo];\n\t\tfor(int i = 0; i < tatebo; i++) {\n\t\t\tnum[i] = i + 1;\n\t\t}\n\n\n\t\tfor(int i = 0; i < yokobo; i++) {\n\n\t\t\tString tmp1 = sc.next();\n\t\t\tString tmp2 [] = tmp1.split(\",\");\n\t\t\tint tmp3 = 0;\n\n\t\t\tint x = Integer.valueOf(tmp2[0]) - 1;\n\t\t\tint y = Integer.valueOf(tmp2[1]) - 1;\n\n\n\t\t\ttmp3 = num[x];\n\t\t\tnum[x] = num[y];\n\t\t\tnum[y] = tmp3;\n\t\t}\n\n\n\t\tfor(int i: num) {\n\n\t\t\tSystem.out.println(String.valueOf(i));\n\t\t}\n\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\n\n\n\tpublic static void main(String[] a){\n\n\t\tScanner sc = new Scanner(System.in);\n\n\n\t\tint tatebo = sc.nextInt();\n\t\tint yokobo = sc.nextInt();\n\n\t\tint num [] = new int[tatebo];\n\t\tfor(int i = 0; i < tatebo; i++) {\n\t\t\tnum[i] = i + 1;\n\t\t}\n\n\n\t\tfor(int i = 0; i < yokobo; i++) {\n\n\t\t\tString tmp1 = sc.next();\n\t\t\tString tmp2 [] = tmp1.split(\",\");\n\t\t\tint tmp3 = 0;\n\n\t\t\tint x = Integer.valueOf(tmp2[0]) - 1;\n\t\t\tint y = Integer.valueOf(tmp2[1]) - 1;\n\n\n\t\t\ttmp3 = num[x];\n\t\t\tnum[x] = num[y];\n\t\t\tnum[y] = tmp3;\n\t\t}\n\n\n\t\tfor(int i: num) {\n\n\t\t\tSystem.out.println(String.valueOf(i));\n\t\t}\n\n\t}\n\n}", "Main", "public static void main(String[] a){\n\n\t\tScanner sc = new Scanner(System.in);\n\n\n\t\tint tatebo = sc.nextInt();\n\t\tint yokobo = sc.nextInt();\n\n\t\tint num [] = new int[tatebo];\n\t\tfor(int i = 0; i < tatebo; i++) {\n\t\t\tnum[i] = i + 1;\n\t\t}\n\n\n\t\tfor(int i = 0; i < yokobo; i++) {\n\n\t\t\tString tmp1 = sc.next();\n\t\t\tString tmp2 [] = tmp1.split(\",\");\n\t\t\tint tmp3 = 0;\n\n\t\t\tint x = Integer.valueOf(tmp2[0]) - 1;\n\t\t\tint y = Integer.valueOf(tmp2[1]) - 1;\n\n\n\t\t\ttmp3 = num[x];\n\t\t\tnum[x] = num[y];\n\t\t\tnum[y] = tmp3;\n\t\t}\n\n\n\t\tfor(int i: num) {\n\n\t\t\tSystem.out.println(String.valueOf(i));\n\t\t}\n\n\t}", "main", "{\n\n\t\tScanner sc = new Scanner(System.in);\n\n\n\t\tint tatebo = sc.nextInt();\n\t\tint yokobo = sc.nextInt();\n\n\t\tint num [] = new int[tatebo];\n\t\tfor(int i = 0; i < tatebo; i++) {\n\t\t\tnum[i] = i + 1;\n\t\t}\n\n\n\t\tfor(int i = 0; i < yokobo; i++) {\n\n\t\t\tString tmp1 = sc.next();\n\t\t\tString tmp2 [] = tmp1.split(\",\");\n\t\t\tint tmp3 = 0;\n\n\t\t\tint x = Integer.valueOf(tmp2[0]) - 1;\n\t\t\tint y = Integer.valueOf(tmp2[1]) - 1;\n\n\n\t\t\ttmp3 = num[x];\n\t\t\tnum[x] = num[y];\n\t\t\tnum[y] = tmp3;\n\t\t}\n\n\n\t\tfor(int i: num) {\n\n\t\t\tSystem.out.println(String.valueOf(i));\n\t\t}\n\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int tatebo = sc.nextInt();", "tatebo", "sc.nextInt()", "sc.nextInt", "sc", "int yokobo = sc.nextInt();", "yokobo", "sc.nextInt()", "sc.nextInt", "sc", "int num [] = new int[tatebo];", "num", "new int[tatebo]", "tatebo", "for(int i = 0; i < tatebo; i++) {\n\t\t\tnum[i] = i + 1;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < tatebo", "i", "tatebo", "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 < yokobo; i++) {\n\n\t\t\tString tmp1 = sc.next();\n\t\t\tString tmp2 [] = tmp1.split(\",\");\n\t\t\tint tmp3 = 0;\n\n\t\t\tint x = Integer.valueOf(tmp2[0]) - 1;\n\t\t\tint y = Integer.valueOf(tmp2[1]) - 1;\n\n\n\t\t\ttmp3 = num[x];\n\t\t\tnum[x] = num[y];\n\t\t\tnum[y] = tmp3;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < yokobo", "i", "yokobo", "i++", "i++", "i", "{\n\n\t\t\tString tmp1 = sc.next();\n\t\t\tString tmp2 [] = tmp1.split(\",\");\n\t\t\tint tmp3 = 0;\n\n\t\t\tint x = Integer.valueOf(tmp2[0]) - 1;\n\t\t\tint y = Integer.valueOf(tmp2[1]) - 1;\n\n\n\t\t\ttmp3 = num[x];\n\t\t\tnum[x] = num[y];\n\t\t\tnum[y] = tmp3;\n\t\t}", "{\n\n\t\t\tString tmp1 = sc.next();\n\t\t\tString tmp2 [] = tmp1.split(\",\");\n\t\t\tint tmp3 = 0;\n\n\t\t\tint x = Integer.valueOf(tmp2[0]) - 1;\n\t\t\tint y = Integer.valueOf(tmp2[1]) - 1;\n\n\n\t\t\ttmp3 = num[x];\n\t\t\tnum[x] = num[y];\n\t\t\tnum[y] = tmp3;\n\t\t}", "String tmp1 = sc.next();", "tmp1", "sc.next()", "sc.next", "sc", "String tmp2 [] = tmp1.split(\",\");", "tmp2", "tmp1.split(\",\")", "tmp1.split", "tmp1", "\",\"", "int tmp3 = 0;", "tmp3", "0", "int x = Integer.valueOf(tmp2[0]) - 1;", "x", "Integer.valueOf(tmp2[0]) - 1", "Integer.valueOf(tmp2[0])", "Integer.valueOf", "Integer", "tmp2[0]", "tmp2", "0", "1", "int y = Integer.valueOf(tmp2[1]) - 1;", "y", "Integer.valueOf(tmp2[1]) - 1", "Integer.valueOf(tmp2[1])", "Integer.valueOf", "Integer", "tmp2[1]", "tmp2", "1", "1", "tmp3 = num[x]", "tmp3", "num[x]", "num", "x", "num[x] = num[y]", "num[x]", "num", "x", "num[y]", "num", "y", "num[y] = tmp3", "num[y]", "num", "y", "tmp3", "for(int i: num) {\n\n\t\t\tSystem.out.println(String.valueOf(i));\n\t\t}", "int i", "num", "{\n\n\t\t\tSystem.out.println(String.valueOf(i));\n\t\t}", "{\n\n\t\t\tSystem.out.println(String.valueOf(i));\n\t\t}", "System.out.println(String.valueOf(i))", "System.out.println", "System.out", "System", "System.out", "String.valueOf(i)", "String.valueOf", "String", "i", "String[] a", "a" ]
import java.util.Scanner; class Main{ public static void main(String[] a){ Scanner sc = new Scanner(System.in); int tatebo = sc.nextInt(); int yokobo = sc.nextInt(); int num [] = new int[tatebo]; for(int i = 0; i < tatebo; i++) { num[i] = i + 1; } for(int i = 0; i < yokobo; i++) { String tmp1 = sc.next(); String tmp2 [] = tmp1.split(","); int tmp3 = 0; int x = Integer.valueOf(tmp2[0]) - 1; int y = Integer.valueOf(tmp2[1]) - 1; tmp3 = num[x]; num[x] = num[y]; num[y] = tmp3; } for(int i: num) { System.out.println(String.valueOf(i)); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 20, 41, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 20, 2, 13, 17, 17, 0, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 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, 18, 18, 13, 13, 17, 4, 18, 4, 18, 13, 18, 13, 17, 0, 18, 18, 13, 13, 17, 4, 18, 4, 18, 13, 18, 13, 17, 41, 13, 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, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 8, 11 ], [ 11, 12 ], [ 8, 13 ], [ 13, 14 ], [ 8, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 35, 36 ], [ 35, 37 ], [ 8, 39 ], [ 39, 40 ], [ 39, 41 ], [ 42, 43 ], [ 42, 44 ], [ 8, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 45, 50 ], [ 50, 51 ], [ 50, 52 ], [ 45, 53 ], [ 53, 54 ], [ 54, 55 ], [ 45, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 57, 61 ], [ 8, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 62, 67 ], [ 67, 68 ], [ 67, 69 ], [ 62, 70 ], [ 70, 71 ], [ 71, 72 ], [ 62, 73 ], [ 74, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 77, 82 ], [ 74, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 84, 88 ], [ 83, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 94, 95 ], [ 94, 96 ], [ 74, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 98, 102 ], [ 97, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 105, 108 ], [ 108, 109 ], [ 108, 110 ], [ 74, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 113, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 115, 119 ], [ 74, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 123, 127 ], [ 120, 128 ], [ 128, 129 ], [ 128, 130 ], [ 130, 131 ], [ 131, 132 ], [ 131, 133 ], [ 130, 134 ], [ 74, 135 ], [ 135, 136 ], [ 136, 137 ], [ 136, 138 ], [ 138, 139 ], [ 139, 140 ], [ 139, 141 ], [ 138, 142 ], [ 135, 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 ], [ 155, 156 ], [ 156, 157 ], [ 157, 158 ], [ 158, 159 ], [ 158, 160 ], [ 156, 161 ], [ 161, 162 ], [ 161, 163 ], [ 6, 164 ], [ 164, 165 ] ]
[ "import java.util.*;\nclass Main{\n \n public static void main(String args[]){\n int w,n;\n int[][] Edge;\n int[] Ans;\n Scanner in = new Scanner(System.in);\n String[] s;\n \n \n w = in.nextInt();\n n = in.nextInt();\n Edge = new int[w+1][2];\n Ans = new int[w+1];\n for(int i=1;i<=w;i++)Ans[i] = i;\n for(int i=0;i<n;i++){\n s = in.next().split(\",\");\n Edge[i][0] = Integer.valueOf(s[0]).intValue();\n Edge[i][1] = Integer.valueOf(s[1]).intValue();\n int h = Ans[Edge[i][0]];\n Ans[Edge[i][0]] = Ans[Edge[i][1]];\n Ans[Edge[i][1]] = h;\n }\n \n for(int i=1;i<=w;i++)System.out.println(Ans[i]);\n \n }\n \n \n \n}", "import java.util.*;", "util.*", "java", "class Main{\n \n public static void main(String args[]){\n int w,n;\n int[][] Edge;\n int[] Ans;\n Scanner in = new Scanner(System.in);\n String[] s;\n \n \n w = in.nextInt();\n n = in.nextInt();\n Edge = new int[w+1][2];\n Ans = new int[w+1];\n for(int i=1;i<=w;i++)Ans[i] = i;\n for(int i=0;i<n;i++){\n s = in.next().split(\",\");\n Edge[i][0] = Integer.valueOf(s[0]).intValue();\n Edge[i][1] = Integer.valueOf(s[1]).intValue();\n int h = Ans[Edge[i][0]];\n Ans[Edge[i][0]] = Ans[Edge[i][1]];\n Ans[Edge[i][1]] = h;\n }\n \n for(int i=1;i<=w;i++)System.out.println(Ans[i]);\n \n }\n \n \n \n}", "Main", "public static void main(String args[]){\n int w,n;\n int[][] Edge;\n int[] Ans;\n Scanner in = new Scanner(System.in);\n String[] s;\n \n \n w = in.nextInt();\n n = in.nextInt();\n Edge = new int[w+1][2];\n Ans = new int[w+1];\n for(int i=1;i<=w;i++)Ans[i] = i;\n for(int i=0;i<n;i++){\n s = in.next().split(\",\");\n Edge[i][0] = Integer.valueOf(s[0]).intValue();\n Edge[i][1] = Integer.valueOf(s[1]).intValue();\n int h = Ans[Edge[i][0]];\n Ans[Edge[i][0]] = Ans[Edge[i][1]];\n Ans[Edge[i][1]] = h;\n }\n \n for(int i=1;i<=w;i++)System.out.println(Ans[i]);\n \n }", "main", "{\n int w,n;\n int[][] Edge;\n int[] Ans;\n Scanner in = new Scanner(System.in);\n String[] s;\n \n \n w = in.nextInt();\n n = in.nextInt();\n Edge = new int[w+1][2];\n Ans = new int[w+1];\n for(int i=1;i<=w;i++)Ans[i] = i;\n for(int i=0;i<n;i++){\n s = in.next().split(\",\");\n Edge[i][0] = Integer.valueOf(s[0]).intValue();\n Edge[i][1] = Integer.valueOf(s[1]).intValue();\n int h = Ans[Edge[i][0]];\n Ans[Edge[i][0]] = Ans[Edge[i][1]];\n Ans[Edge[i][1]] = h;\n }\n \n for(int i=1;i<=w;i++)System.out.println(Ans[i]);\n \n }", "int w", "w", "n;", "n", "int[][] Edge;", "Edge", "int[] Ans;", "Ans", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "String[] s;", "s", "w = in.nextInt()", "w", "in.nextInt()", "in.nextInt", "in", "n = in.nextInt()", "n", "in.nextInt()", "in.nextInt", "in", "Edge = new int[w+1][2]", "Edge", "new int[w+1][2]", "w+1", "w", "1", "2", "Ans = new int[w+1]", "Ans", "new int[w+1]", "w+1", "w", "1", "for(int i=1;i<=w;i++)Ans[i] = i;", "int i=1;", "int i=1;", "i", "1", "i<=w", "i", "w", "i++", "i++", "i", "Ans[i] = i;", "Ans[i] = i", "Ans[i]", "Ans", "i", "i", "for(int i=0;i<n;i++){\n s = in.next().split(\",\");\n Edge[i][0] = Integer.valueOf(s[0]).intValue();\n Edge[i][1] = Integer.valueOf(s[1]).intValue();\n int h = Ans[Edge[i][0]];\n Ans[Edge[i][0]] = Ans[Edge[i][1]];\n Ans[Edge[i][1]] = h;\n }", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n s = in.next().split(\",\");\n Edge[i][0] = Integer.valueOf(s[0]).intValue();\n Edge[i][1] = Integer.valueOf(s[1]).intValue();\n int h = Ans[Edge[i][0]];\n Ans[Edge[i][0]] = Ans[Edge[i][1]];\n Ans[Edge[i][1]] = h;\n }", "{\n s = in.next().split(\",\");\n Edge[i][0] = Integer.valueOf(s[0]).intValue();\n Edge[i][1] = Integer.valueOf(s[1]).intValue();\n int h = Ans[Edge[i][0]];\n Ans[Edge[i][0]] = Ans[Edge[i][1]];\n Ans[Edge[i][1]] = h;\n }", "s = in.next().split(\",\")", "s", "in.next().split(\",\")", "in.next().split", "in.next()", "in.next", "in", "\",\"", "Edge[i][0] = Integer.valueOf(s[0]).intValue()", "Edge[i][0]", "Edge[i]", "Edge", "i", "0", "Integer.valueOf(s[0]).intValue()", "Integer.valueOf(s[0]).intValue", "Integer.valueOf(s[0])", "Integer.valueOf", "Integer", "s[0]", "s", "0", "Edge[i][1] = Integer.valueOf(s[1]).intValue()", "Edge[i][1]", "Edge[i]", "Edge", "i", "1", "Integer.valueOf(s[1]).intValue()", "Integer.valueOf(s[1]).intValue", "Integer.valueOf(s[1])", "Integer.valueOf", "Integer", "s[1]", "s", "1", "int h = Ans[Edge[i][0]];", "h", "Ans[Edge[i][0]]", "Ans", "Edge[i][0]", "Edge[i]", "Edge", "i", "0", "Ans[Edge[i][0]] = Ans[Edge[i][1]]", "Ans[Edge[i][0]]", "Ans", "Edge[i][0]", "Edge[i]", "Edge", "i", "0", "Ans[Edge[i][1]]", "Ans", "Edge[i][1]", "Edge[i]", "Edge", "i", "1", "Ans[Edge[i][1]] = h", "Ans[Edge[i][1]]", "Ans", "Edge[i][1]", "Edge[i]", "Edge", "i", "1", "h", "for(int i=1;i<=w;i++)System.out.println(Ans[i]);", "int i=1;", "int i=1;", "i", "1", "i<=w", "i", "w", "i++", "i++", "i", "System.out.println(Ans[i]);", "System.out.println(Ans[i])", "System.out.println", "System.out", "System", "System.out", "Ans[i]", "Ans", "i", "String args[]", "args" ]
import java.util.*; class Main{ public static void main(String args[]){ int w,n; int[][] Edge; int[] Ans; Scanner in = new Scanner(System.in); String[] s; w = in.nextInt(); n = in.nextInt(); Edge = new int[w+1][2]; Ans = new int[w+1]; for(int i=1;i<=w;i++)Ans[i] = i; for(int i=0;i<n;i++){ s = in.next().split(","); Edge[i][0] = Integer.valueOf(s[0]).intValue(); Edge[i][1] = Integer.valueOf(s[1]).intValue(); int h = Ans[Edge[i][0]]; Ans[Edge[i][0]] = Ans[Edge[i][1]]; Ans[Edge[i][1]] = h; } for(int i=1;i<=w;i++)System.out.println(Ans[i]); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 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, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 18, 18, 13, 13, 17, 30, 0, 13, 18, 18, 13, 13, 17, 14, 2, 13, 18, 18, 13, 13, 17, 30, 0, 13, 18, 18, 13, 13, 17, 0, 18, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 185, 8 ], [ 185, 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, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 36, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 43, 45 ], [ 36, 46 ], [ 46, 47 ], [ 47, 48 ], [ 36, 49 ], [ 50, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 53, 58 ], [ 50, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 60, 64 ], [ 59, 65 ], [ 65, 66 ], [ 66, 67 ], [ 65, 68 ], [ 68, 69 ], [ 68, 70 ], [ 50, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 72, 76 ], [ 71, 77 ], [ 77, 78 ], [ 78, 79 ], [ 77, 80 ], [ 80, 81 ], [ 80, 82 ], [ 11, 83 ], [ 83, 84 ], [ 83, 85 ], [ 86, 87 ], [ 86, 88 ], [ 11, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 89, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 96, 98 ], [ 89, 99 ], [ 99, 100 ], [ 100, 101 ], [ 89, 102 ], [ 103, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 103, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 107, 112 ], [ 112, 113 ], [ 112, 114 ], [ 114, 115 ], [ 114, 116 ], [ 107, 117 ], [ 117, 118 ], [ 118, 119 ], [ 107, 120 ], [ 121, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 125, 126 ], [ 126, 127 ], [ 126, 128 ], [ 125, 129 ], [ 122, 130 ], [ 130, 131 ], [ 131, 132 ], [ 131, 133 ], [ 133, 134 ], [ 134, 135 ], [ 134, 136 ], [ 133, 137 ], [ 122, 138 ], [ 138, 139 ], [ 139, 140 ], [ 139, 141 ], [ 141, 142 ], [ 142, 143 ], [ 142, 144 ], [ 141, 145 ], [ 138, 146 ], [ 146, 147 ], [ 147, 148 ], [ 147, 149 ], [ 149, 150 ], [ 150, 151 ], [ 150, 152 ], [ 149, 153 ], [ 103, 154 ], [ 154, 155 ], [ 155, 156 ], [ 155, 157 ], [ 154, 158 ], [ 11, 159 ], [ 159, 160 ], [ 160, 161 ], [ 161, 162 ], [ 161, 163 ], [ 159, 164 ], [ 164, 165 ], [ 164, 166 ], [ 166, 167 ], [ 166, 168 ], [ 159, 169 ], [ 169, 170 ], [ 170, 171 ], [ 159, 172 ], [ 173, 173 ], [ 173, 174 ], [ 174, 175 ], [ 175, 176 ], [ 176, 177 ], [ 176, 178 ], [ 174, 179 ], [ 179, 180 ], [ 179, 181 ], [ 9, 182 ], [ 182, 183 ], [ 0, 184 ], [ 184, 185 ], [ 184, 186 ] ]
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n // Here your code !\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int VerticalLineNum = Integer.parseInt(br.readLine());\n int HorizontalLineNum = Integer.parseInt(br.readLine());\n int[][] HorizontalLine = new int[HorizontalLineNum][2];\n \n for(int i = 0; i < HorizontalLine.length; i++){\n String[] FromTo = br.readLine().split(\",\");\n HorizontalLine[i][0] = Integer.parseInt(FromTo[0]);\n HorizontalLine[i][1] = Integer.parseInt(FromTo[1]);\n }\n \n int[] ResultLineNum = new int[VerticalLineNum + 1];\n for(int i = 1; i < VerticalLineNum + 1; i++){\n int CurrentLineNum = i;\n for(int hl = 0; hl < HorizontalLine.length; hl++){\n if(CurrentLineNum == HorizontalLine[hl][0]){\n CurrentLineNum = HorizontalLine[hl][1];\n }\n else if(CurrentLineNum == HorizontalLine[hl][1]){\n CurrentLineNum = HorizontalLine[hl][0];\n }\n }\n ResultLineNum[CurrentLineNum] = i;\n }\n \n for(int i = 1; i < ResultLineNum.length; i++){\n System.out.println(ResultLineNum[i]);\n }\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "public class Main {\n public static void main(String[] args) throws Exception {\n // Here your code !\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int VerticalLineNum = Integer.parseInt(br.readLine());\n int HorizontalLineNum = Integer.parseInt(br.readLine());\n int[][] HorizontalLine = new int[HorizontalLineNum][2];\n \n for(int i = 0; i < HorizontalLine.length; i++){\n String[] FromTo = br.readLine().split(\",\");\n HorizontalLine[i][0] = Integer.parseInt(FromTo[0]);\n HorizontalLine[i][1] = Integer.parseInt(FromTo[1]);\n }\n \n int[] ResultLineNum = new int[VerticalLineNum + 1];\n for(int i = 1; i < VerticalLineNum + 1; i++){\n int CurrentLineNum = i;\n for(int hl = 0; hl < HorizontalLine.length; hl++){\n if(CurrentLineNum == HorizontalLine[hl][0]){\n CurrentLineNum = HorizontalLine[hl][1];\n }\n else if(CurrentLineNum == HorizontalLine[hl][1]){\n CurrentLineNum = HorizontalLine[hl][0];\n }\n }\n ResultLineNum[CurrentLineNum] = i;\n }\n \n for(int i = 1; i < ResultLineNum.length; i++){\n System.out.println(ResultLineNum[i]);\n }\n }\n}", "Main", "public static void main(String[] args) throws Exception {\n // Here your code !\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int VerticalLineNum = Integer.parseInt(br.readLine());\n int HorizontalLineNum = Integer.parseInt(br.readLine());\n int[][] HorizontalLine = new int[HorizontalLineNum][2];\n \n for(int i = 0; i < HorizontalLine.length; i++){\n String[] FromTo = br.readLine().split(\",\");\n HorizontalLine[i][0] = Integer.parseInt(FromTo[0]);\n HorizontalLine[i][1] = Integer.parseInt(FromTo[1]);\n }\n \n int[] ResultLineNum = new int[VerticalLineNum + 1];\n for(int i = 1; i < VerticalLineNum + 1; i++){\n int CurrentLineNum = i;\n for(int hl = 0; hl < HorizontalLine.length; hl++){\n if(CurrentLineNum == HorizontalLine[hl][0]){\n CurrentLineNum = HorizontalLine[hl][1];\n }\n else if(CurrentLineNum == HorizontalLine[hl][1]){\n CurrentLineNum = HorizontalLine[hl][0];\n }\n }\n ResultLineNum[CurrentLineNum] = i;\n }\n \n for(int i = 1; i < ResultLineNum.length; i++){\n System.out.println(ResultLineNum[i]);\n }\n }", "main", "{\n // Here your code !\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int VerticalLineNum = Integer.parseInt(br.readLine());\n int HorizontalLineNum = Integer.parseInt(br.readLine());\n int[][] HorizontalLine = new int[HorizontalLineNum][2];\n \n for(int i = 0; i < HorizontalLine.length; i++){\n String[] FromTo = br.readLine().split(\",\");\n HorizontalLine[i][0] = Integer.parseInt(FromTo[0]);\n HorizontalLine[i][1] = Integer.parseInt(FromTo[1]);\n }\n \n int[] ResultLineNum = new int[VerticalLineNum + 1];\n for(int i = 1; i < VerticalLineNum + 1; i++){\n int CurrentLineNum = i;\n for(int hl = 0; hl < HorizontalLine.length; hl++){\n if(CurrentLineNum == HorizontalLine[hl][0]){\n CurrentLineNum = HorizontalLine[hl][1];\n }\n else if(CurrentLineNum == HorizontalLine[hl][1]){\n CurrentLineNum = HorizontalLine[hl][0];\n }\n }\n ResultLineNum[CurrentLineNum] = i;\n }\n \n for(int i = 1; i < ResultLineNum.length; i++){\n System.out.println(ResultLineNum[i]);\n }\n }", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "int VerticalLineNum = Integer.parseInt(br.readLine());", "VerticalLineNum", "Integer.parseInt(br.readLine())", "Integer.parseInt", "Integer", "br.readLine()", "br.readLine", "br", "int HorizontalLineNum = Integer.parseInt(br.readLine());", "HorizontalLineNum", "Integer.parseInt(br.readLine())", "Integer.parseInt", "Integer", "br.readLine()", "br.readLine", "br", "int[][] HorizontalLine = new int[HorizontalLineNum][2];", "HorizontalLine", "new int[HorizontalLineNum][2]", "HorizontalLineNum", "2", "for(int i = 0; i < HorizontalLine.length; i++){\n String[] FromTo = br.readLine().split(\",\");\n HorizontalLine[i][0] = Integer.parseInt(FromTo[0]);\n HorizontalLine[i][1] = Integer.parseInt(FromTo[1]);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < HorizontalLine.length", "i", "HorizontalLine.length", "HorizontalLine", "HorizontalLine.length", "i++", "i++", "i", "{\n String[] FromTo = br.readLine().split(\",\");\n HorizontalLine[i][0] = Integer.parseInt(FromTo[0]);\n HorizontalLine[i][1] = Integer.parseInt(FromTo[1]);\n }", "{\n String[] FromTo = br.readLine().split(\",\");\n HorizontalLine[i][0] = Integer.parseInt(FromTo[0]);\n HorizontalLine[i][1] = Integer.parseInt(FromTo[1]);\n }", "String[] FromTo = br.readLine().split(\",\");", "FromTo", "br.readLine().split(\",\")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\",\"", "HorizontalLine[i][0] = Integer.parseInt(FromTo[0])", "HorizontalLine[i][0]", "HorizontalLine[i]", "HorizontalLine", "i", "0", "Integer.parseInt(FromTo[0])", "Integer.parseInt", "Integer", "FromTo[0]", "FromTo", "0", "HorizontalLine[i][1] = Integer.parseInt(FromTo[1])", "HorizontalLine[i][1]", "HorizontalLine[i]", "HorizontalLine", "i", "1", "Integer.parseInt(FromTo[1])", "Integer.parseInt", "Integer", "FromTo[1]", "FromTo", "1", "int[] ResultLineNum = new int[VerticalLineNum + 1];", "ResultLineNum", "new int[VerticalLineNum + 1]", "VerticalLineNum + 1", "VerticalLineNum", "1", "for(int i = 1; i < VerticalLineNum + 1; i++){\n int CurrentLineNum = i;\n for(int hl = 0; hl < HorizontalLine.length; hl++){\n if(CurrentLineNum == HorizontalLine[hl][0]){\n CurrentLineNum = HorizontalLine[hl][1];\n }\n else if(CurrentLineNum == HorizontalLine[hl][1]){\n CurrentLineNum = HorizontalLine[hl][0];\n }\n }\n ResultLineNum[CurrentLineNum] = i;\n }", "int i = 1;", "int i = 1;", "i", "1", "i < VerticalLineNum + 1", "i", "VerticalLineNum + 1", "VerticalLineNum", "1", "i++", "i++", "i", "{\n int CurrentLineNum = i;\n for(int hl = 0; hl < HorizontalLine.length; hl++){\n if(CurrentLineNum == HorizontalLine[hl][0]){\n CurrentLineNum = HorizontalLine[hl][1];\n }\n else if(CurrentLineNum == HorizontalLine[hl][1]){\n CurrentLineNum = HorizontalLine[hl][0];\n }\n }\n ResultLineNum[CurrentLineNum] = i;\n }", "{\n int CurrentLineNum = i;\n for(int hl = 0; hl < HorizontalLine.length; hl++){\n if(CurrentLineNum == HorizontalLine[hl][0]){\n CurrentLineNum = HorizontalLine[hl][1];\n }\n else if(CurrentLineNum == HorizontalLine[hl][1]){\n CurrentLineNum = HorizontalLine[hl][0];\n }\n }\n ResultLineNum[CurrentLineNum] = i;\n }", "int CurrentLineNum = i;", "CurrentLineNum", "i", "for(int hl = 0; hl < HorizontalLine.length; hl++){\n if(CurrentLineNum == HorizontalLine[hl][0]){\n CurrentLineNum = HorizontalLine[hl][1];\n }\n else if(CurrentLineNum == HorizontalLine[hl][1]){\n CurrentLineNum = HorizontalLine[hl][0];\n }\n }", "int hl = 0;", "int hl = 0;", "hl", "0", "hl < HorizontalLine.length", "hl", "HorizontalLine.length", "HorizontalLine", "HorizontalLine.length", "hl++", "hl++", "hl", "{\n if(CurrentLineNum == HorizontalLine[hl][0]){\n CurrentLineNum = HorizontalLine[hl][1];\n }\n else if(CurrentLineNum == HorizontalLine[hl][1]){\n CurrentLineNum = HorizontalLine[hl][0];\n }\n }", "{\n if(CurrentLineNum == HorizontalLine[hl][0]){\n CurrentLineNum = HorizontalLine[hl][1];\n }\n else if(CurrentLineNum == HorizontalLine[hl][1]){\n CurrentLineNum = HorizontalLine[hl][0];\n }\n }", "if(CurrentLineNum == HorizontalLine[hl][0]){\n CurrentLineNum = HorizontalLine[hl][1];\n }\n else if(CurrentLineNum == HorizontalLine[hl][1]){\n CurrentLineNum = HorizontalLine[hl][0];\n }", "CurrentLineNum == HorizontalLine[hl][0]", "CurrentLineNum", "HorizontalLine[hl][0]", "HorizontalLine[hl]", "HorizontalLine", "hl", "0", "{\n CurrentLineNum = HorizontalLine[hl][1];\n }", "CurrentLineNum = HorizontalLine[hl][1]", "CurrentLineNum", "HorizontalLine[hl][1]", "HorizontalLine[hl]", "HorizontalLine", "hl", "1", "if(CurrentLineNum == HorizontalLine[hl][1]){\n CurrentLineNum = HorizontalLine[hl][0];\n }", "CurrentLineNum == HorizontalLine[hl][1]", "CurrentLineNum", "HorizontalLine[hl][1]", "HorizontalLine[hl]", "HorizontalLine", "hl", "1", "{\n CurrentLineNum = HorizontalLine[hl][0];\n }", "CurrentLineNum = HorizontalLine[hl][0]", "CurrentLineNum", "HorizontalLine[hl][0]", "HorizontalLine[hl]", "HorizontalLine", "hl", "0", "ResultLineNum[CurrentLineNum] = i", "ResultLineNum[CurrentLineNum]", "ResultLineNum", "CurrentLineNum", "i", "for(int i = 1; i < ResultLineNum.length; i++){\n System.out.println(ResultLineNum[i]);\n }", "int i = 1;", "int i = 1;", "i", "1", "i < ResultLineNum.length", "i", "ResultLineNum.length", "ResultLineNum", "ResultLineNum.length", "i++", "i++", "i", "{\n System.out.println(ResultLineNum[i]);\n }", "{\n System.out.println(ResultLineNum[i]);\n }", "System.out.println(ResultLineNum[i])", "System.out.println", "System.out", "System", "System.out", "ResultLineNum[i]", "ResultLineNum", "i", "String[] args", "args", "public class Main {\n public static void main(String[] args) throws Exception {\n // Here your code !\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int VerticalLineNum = Integer.parseInt(br.readLine());\n int HorizontalLineNum = Integer.parseInt(br.readLine());\n int[][] HorizontalLine = new int[HorizontalLineNum][2];\n \n for(int i = 0; i < HorizontalLine.length; i++){\n String[] FromTo = br.readLine().split(\",\");\n HorizontalLine[i][0] = Integer.parseInt(FromTo[0]);\n HorizontalLine[i][1] = Integer.parseInt(FromTo[1]);\n }\n \n int[] ResultLineNum = new int[VerticalLineNum + 1];\n for(int i = 1; i < VerticalLineNum + 1; i++){\n int CurrentLineNum = i;\n for(int hl = 0; hl < HorizontalLine.length; hl++){\n if(CurrentLineNum == HorizontalLine[hl][0]){\n CurrentLineNum = HorizontalLine[hl][1];\n }\n else if(CurrentLineNum == HorizontalLine[hl][1]){\n CurrentLineNum = HorizontalLine[hl][0];\n }\n }\n ResultLineNum[CurrentLineNum] = i;\n }\n \n for(int i = 1; i < ResultLineNum.length; i++){\n System.out.println(ResultLineNum[i]);\n }\n }\n}", "public class Main {\n public static void main(String[] args) throws Exception {\n // Here your code !\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int VerticalLineNum = Integer.parseInt(br.readLine());\n int HorizontalLineNum = Integer.parseInt(br.readLine());\n int[][] HorizontalLine = new int[HorizontalLineNum][2];\n \n for(int i = 0; i < HorizontalLine.length; i++){\n String[] FromTo = br.readLine().split(\",\");\n HorizontalLine[i][0] = Integer.parseInt(FromTo[0]);\n HorizontalLine[i][1] = Integer.parseInt(FromTo[1]);\n }\n \n int[] ResultLineNum = new int[VerticalLineNum + 1];\n for(int i = 1; i < VerticalLineNum + 1; i++){\n int CurrentLineNum = i;\n for(int hl = 0; hl < HorizontalLine.length; hl++){\n if(CurrentLineNum == HorizontalLine[hl][0]){\n CurrentLineNum = HorizontalLine[hl][1];\n }\n else if(CurrentLineNum == HorizontalLine[hl][1]){\n CurrentLineNum = HorizontalLine[hl][0];\n }\n }\n ResultLineNum[CurrentLineNum] = i;\n }\n \n for(int i = 1; i < ResultLineNum.length; i++){\n System.out.println(ResultLineNum[i]);\n }\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { // Here your code ! BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int VerticalLineNum = Integer.parseInt(br.readLine()); int HorizontalLineNum = Integer.parseInt(br.readLine()); int[][] HorizontalLine = new int[HorizontalLineNum][2]; for(int i = 0; i < HorizontalLine.length; i++){ String[] FromTo = br.readLine().split(","); HorizontalLine[i][0] = Integer.parseInt(FromTo[0]); HorizontalLine[i][1] = Integer.parseInt(FromTo[1]); } int[] ResultLineNum = new int[VerticalLineNum + 1]; for(int i = 1; i < VerticalLineNum + 1; i++){ int CurrentLineNum = i; for(int hl = 0; hl < HorizontalLine.length; hl++){ if(CurrentLineNum == HorizontalLine[hl][0]){ CurrentLineNum = HorizontalLine[hl][1]; } else if(CurrentLineNum == HorizontalLine[hl][1]){ CurrentLineNum = HorizontalLine[hl][0]; } } ResultLineNum[CurrentLineNum] = i; } for(int i = 1; i < ResultLineNum.length; i++){ System.out.println(ResultLineNum[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, 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, 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, 13, 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, 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 ], [ 0, 13 ], [ 13, 14 ], [ 13, 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 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 31, 34 ], [ 34, 35 ], [ 35, 36 ], [ 25, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 39, 42 ], [ 42, 43 ], [ 43, 44 ], [ 25, 45 ], [ 45, 46 ], [ 45, 47 ], [ 25, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 48, 53 ], [ 53, 54 ], [ 53, 55 ], [ 48, 56 ], [ 56, 57 ], [ 57, 58 ], [ 48, 59 ], [ 60, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 61, 64 ], [ 25, 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 ], [ 77, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 86, 87 ], [ 85, 88 ], [ 77, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 91, 93 ], [ 91, 94 ], [ 94, 95 ], [ 95, 96 ], [ 94, 97 ], [ 97, 98 ], [ 97, 99 ], [ 91, 100 ], [ 100, 101 ], [ 101, 102 ], [ 100, 103 ], [ 103, 104 ], [ 103, 105 ], [ 25, 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 ], [ 125, 126 ], [ 124, 127 ], [ 15, 128 ], [ 128, 129 ], [ 13, 130 ], [ 130, 131 ], [ 130, 132 ], [ 132, 133 ], [ 133, 134 ], [ 133, 135 ], [ 135, 136 ], [ 136, 137 ], [ 135, 138 ], [ 138, 139 ], [ 138, 140 ], [ 132, 141 ], [ 141, 142 ], [ 142, 143 ], [ 141, 144 ], [ 144, 145 ], [ 144, 146 ], [ 141, 147 ], [ 147, 148 ], [ 148, 149 ], [ 147, 150 ], [ 150, 151 ], [ 150, 152 ], [ 132, 153 ], [ 153, 154 ], [ 154, 155 ], [ 153, 156 ], [ 156, 157 ], [ 156, 158 ], [ 153, 159 ], [ 132, 160 ], [ 160, 161 ], [ 130, 162 ], [ 162, 163 ], [ 130, 164 ], [ 164, 165 ], [ 130, 166 ], [ 166, 167 ] ]
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\nimport java.util.List;\n\nclass Main {\n public static void main(String[] args) {\n try {\n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n \tint verticalLineNum = Integer.parseInt(br.readLine());\n \tint horizontalLineNum = Integer.parseInt(br.readLine());\n\n \tList<Integer> numberList = new ArrayList<>();\n\n \tfor(int i = 1; i <= verticalLineNum; i++) {\n \t\tnumberList.add(i);\n \t}\n\n \tfor(int j = 0; j < horizontalLineNum; j++) {\n \t\tString line = br.readLine();\n String[] dataSet = line.split(\",\");\n\n numberList = swap(numberList, Integer.parseInt(dataSet[0]), Integer.parseInt(dataSet[1]));\n \t}\n\n\n \tfor(int k = 0; k < verticalLineNum; k++) {\n \t\tSystem.out.println(numberList.get(k));\n \t}\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n\tprivate static List<Integer> swap(List<Integer> numberList, int a, int b) {\n\t\tint temp = numberList.get(a-1);\n\t\tnumberList.set(a-1, numberList.get(b-1));\n\t\tnumberList.set(b-1, temp);\n return numberList;\n\t}\n\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.List;", "List", "java.util", "class Main {\n public static void main(String[] args) {\n try {\n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n \tint verticalLineNum = Integer.parseInt(br.readLine());\n \tint horizontalLineNum = Integer.parseInt(br.readLine());\n\n \tList<Integer> numberList = new ArrayList<>();\n\n \tfor(int i = 1; i <= verticalLineNum; i++) {\n \t\tnumberList.add(i);\n \t}\n\n \tfor(int j = 0; j < horizontalLineNum; j++) {\n \t\tString line = br.readLine();\n String[] dataSet = line.split(\",\");\n\n numberList = swap(numberList, Integer.parseInt(dataSet[0]), Integer.parseInt(dataSet[1]));\n \t}\n\n\n \tfor(int k = 0; k < verticalLineNum; k++) {\n \t\tSystem.out.println(numberList.get(k));\n \t}\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n\tprivate static List<Integer> swap(List<Integer> numberList, int a, int b) {\n\t\tint temp = numberList.get(a-1);\n\t\tnumberList.set(a-1, numberList.get(b-1));\n\t\tnumberList.set(b-1, temp);\n return numberList;\n\t}\n\n}", "Main", "public static void main(String[] args) {\n try {\n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n \tint verticalLineNum = Integer.parseInt(br.readLine());\n \tint horizontalLineNum = Integer.parseInt(br.readLine());\n\n \tList<Integer> numberList = new ArrayList<>();\n\n \tfor(int i = 1; i <= verticalLineNum; i++) {\n \t\tnumberList.add(i);\n \t}\n\n \tfor(int j = 0; j < horizontalLineNum; j++) {\n \t\tString line = br.readLine();\n String[] dataSet = line.split(\",\");\n\n numberList = swap(numberList, Integer.parseInt(dataSet[0]), Integer.parseInt(dataSet[1]));\n \t}\n\n\n \tfor(int k = 0; k < verticalLineNum; k++) {\n \t\tSystem.out.println(numberList.get(k));\n \t}\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "main", "{\n try {\n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n \tint verticalLineNum = Integer.parseInt(br.readLine());\n \tint horizontalLineNum = Integer.parseInt(br.readLine());\n\n \tList<Integer> numberList = new ArrayList<>();\n\n \tfor(int i = 1; i <= verticalLineNum; i++) {\n \t\tnumberList.add(i);\n \t}\n\n \tfor(int j = 0; j < horizontalLineNum; j++) {\n \t\tString line = br.readLine();\n String[] dataSet = line.split(\",\");\n\n numberList = swap(numberList, Integer.parseInt(dataSet[0]), Integer.parseInt(dataSet[1]));\n \t}\n\n\n \tfor(int k = 0; k < verticalLineNum; k++) {\n \t\tSystem.out.println(numberList.get(k));\n \t}\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "try {\n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n \tint verticalLineNum = Integer.parseInt(br.readLine());\n \tint horizontalLineNum = Integer.parseInt(br.readLine());\n\n \tList<Integer> numberList = new ArrayList<>();\n\n \tfor(int i = 1; i <= verticalLineNum; i++) {\n \t\tnumberList.add(i);\n \t}\n\n \tfor(int j = 0; j < horizontalLineNum; j++) {\n \t\tString line = br.readLine();\n String[] dataSet = line.split(\",\");\n\n numberList = swap(numberList, Integer.parseInt(dataSet[0]), Integer.parseInt(dataSet[1]));\n \t}\n\n\n \tfor(int k = 0; k < verticalLineNum; k++) {\n \t\tSystem.out.println(numberList.get(k));\n \t}\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 \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n \tint verticalLineNum = Integer.parseInt(br.readLine());\n \tint horizontalLineNum = Integer.parseInt(br.readLine());\n\n \tList<Integer> numberList = new ArrayList<>();\n\n \tfor(int i = 1; i <= verticalLineNum; i++) {\n \t\tnumberList.add(i);\n \t}\n\n \tfor(int j = 0; j < horizontalLineNum; j++) {\n \t\tString line = br.readLine();\n String[] dataSet = line.split(\",\");\n\n numberList = swap(numberList, Integer.parseInt(dataSet[0]), Integer.parseInt(dataSet[1]));\n \t}\n\n\n \tfor(int k = 0; k < verticalLineNum; k++) {\n \t\tSystem.out.println(numberList.get(k));\n \t}\n\n }", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "int verticalLineNum = Integer.parseInt(br.readLine());", "verticalLineNum", "Integer.parseInt(br.readLine())", "Integer.parseInt", "Integer", "br.readLine()", "br.readLine", "br", "int horizontalLineNum = Integer.parseInt(br.readLine());", "horizontalLineNum", "Integer.parseInt(br.readLine())", "Integer.parseInt", "Integer", "br.readLine()", "br.readLine", "br", "List<Integer> numberList = new ArrayList<>();", "numberList", "new ArrayList<>()", "for(int i = 1; i <= verticalLineNum; i++) {\n \t\tnumberList.add(i);\n \t}", "int i = 1;", "int i = 1;", "i", "1", "i <= verticalLineNum", "i", "verticalLineNum", "i++", "i++", "i", "{\n \t\tnumberList.add(i);\n \t}", "{\n \t\tnumberList.add(i);\n \t}", "numberList.add(i)", "numberList.add", "numberList", "i", "for(int j = 0; j < horizontalLineNum; j++) {\n \t\tString line = br.readLine();\n String[] dataSet = line.split(\",\");\n\n numberList = swap(numberList, Integer.parseInt(dataSet[0]), Integer.parseInt(dataSet[1]));\n \t}", "int j = 0;", "int j = 0;", "j", "0", "j < horizontalLineNum", "j", "horizontalLineNum", "j++", "j++", "j", "{\n \t\tString line = br.readLine();\n String[] dataSet = line.split(\",\");\n\n numberList = swap(numberList, Integer.parseInt(dataSet[0]), Integer.parseInt(dataSet[1]));\n \t}", "{\n \t\tString line = br.readLine();\n String[] dataSet = line.split(\",\");\n\n numberList = swap(numberList, Integer.parseInt(dataSet[0]), Integer.parseInt(dataSet[1]));\n \t}", "String line = br.readLine();", "line", "br.readLine()", "br.readLine", "br", "String[] dataSet = line.split(\",\");", "dataSet", "line.split(\",\")", "line.split", "line", "\",\"", "numberList = swap(numberList, Integer.parseInt(dataSet[0]), Integer.parseInt(dataSet[1]))", "numberList", "swap(numberList, Integer.parseInt(dataSet[0]), Integer.parseInt(dataSet[1]))", "swap", "numberList", "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 < verticalLineNum; k++) {\n \t\tSystem.out.println(numberList.get(k));\n \t}", "int k = 0;", "int k = 0;", "k", "0", "k < verticalLineNum", "k", "verticalLineNum", "k++", "k++", "k", "{\n \t\tSystem.out.println(numberList.get(k));\n \t}", "{\n \t\tSystem.out.println(numberList.get(k));\n \t}", "System.out.println(numberList.get(k))", "System.out.println", "System.out", "System", "System.out", "numberList.get(k)", "numberList.get", "numberList", "k", "String[] args", "args", "private static List<Integer> swap(List<Integer> numberList, int a, int b) {\n\t\tint temp = numberList.get(a-1);\n\t\tnumberList.set(a-1, numberList.get(b-1));\n\t\tnumberList.set(b-1, temp);\n return numberList;\n\t}", "swap", "{\n\t\tint temp = numberList.get(a-1);\n\t\tnumberList.set(a-1, numberList.get(b-1));\n\t\tnumberList.set(b-1, temp);\n return numberList;\n\t}", "int temp = numberList.get(a-1);", "temp", "numberList.get(a-1)", "numberList.get", "numberList", "a-1", "a", "1", "numberList.set(a-1, numberList.get(b-1))", "numberList.set", "numberList", "a-1", "a", "1", "numberList.get(b-1)", "numberList.get", "numberList", "b-1", "b", "1", "numberList.set(b-1, temp)", "numberList.set", "numberList", "b-1", "b", "1", "temp", "return numberList;", "numberList", "List<Integer> numberList", "numberList", "int a", "a", "int b", "b" ]
import java.io.BufferedReader; import java.io.InputStreamReader; 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 verticalLineNum = Integer.parseInt(br.readLine()); int horizontalLineNum = Integer.parseInt(br.readLine()); List<Integer> numberList = new ArrayList<>(); for(int i = 1; i <= verticalLineNum; i++) { numberList.add(i); } for(int j = 0; j < horizontalLineNum; j++) { String line = br.readLine(); String[] dataSet = line.split(","); numberList = swap(numberList, Integer.parseInt(dataSet[0]), Integer.parseInt(dataSet[1])); } for(int k = 0; k < verticalLineNum; k++) { System.out.println(numberList.get(k)); } } catch (Exception e) { e.printStackTrace(); } } private static List<Integer> swap(List<Integer> numberList, int a, int b) { int temp = numberList.get(a-1); numberList.set(a-1, numberList.get(b-1)); numberList.set(b-1, temp); return numberList; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 20, 21 ], [ 20, 22 ], [ 8, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 23, 28 ], [ 28, 29 ], [ 28, 30 ], [ 23, 31 ], [ 31, 32 ], [ 32, 33 ], [ 23, 34 ], [ 35, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 36, 40 ], [ 8, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 44, 45 ], [ 8, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 62, 63 ], [ 58, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 67, 68 ], [ 66, 69 ], [ 58, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 73, 74 ], [ 72, 75 ], [ 75, 76 ], [ 75, 77 ], [ 58, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 81, 82 ], [ 80, 83 ], [ 83, 84 ], [ 83, 85 ], [ 58, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 88, 90 ], [ 58, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 91, 95 ], [ 95, 96 ], [ 95, 97 ], [ 58, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 98, 102 ], [ 8, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 103, 108 ], [ 108, 109 ], [ 108, 110 ], [ 103, 111 ], [ 111, 112 ], [ 112, 113 ], [ 103, 114 ], [ 115, 115 ], [ 115, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 118, 120 ], [ 116, 121 ], [ 121, 122 ], [ 121, 123 ], [ 6, 124 ], [ 124, 125 ] ]
[ "import java.util.Scanner;\nclass Main{\n\tpublic static void main(String[] a){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint w = scan.nextInt();\n\t\tint[] line = new int[w + 1];\n\t\tfor(int i = 1; i <= w; i++){\n\t\t\tline[i] = i;\n\t\t}\n\t\tint n = scan.nextInt();\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString str = scan.next();\n\t\t\tString[] spl = str.split(\",\");\n\t\t\tint num1 = Integer.parseInt(spl[0]);\n\t\t\tint num2 = Integer.parseInt(spl[1]);\n\t\t\tint sub = line[num1];\n\t\t\tline[num1] = line[num2];\n\t\t\tline[num2] = sub;\n\t\t}\n\t\tfor(int i = 1; i <= w; i++){\n\t\t\tSystem.out.println(line[i]);\n\t\t}\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\n\tpublic static void main(String[] a){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint w = scan.nextInt();\n\t\tint[] line = new int[w + 1];\n\t\tfor(int i = 1; i <= w; i++){\n\t\t\tline[i] = i;\n\t\t}\n\t\tint n = scan.nextInt();\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString str = scan.next();\n\t\t\tString[] spl = str.split(\",\");\n\t\t\tint num1 = Integer.parseInt(spl[0]);\n\t\t\tint num2 = Integer.parseInt(spl[1]);\n\t\t\tint sub = line[num1];\n\t\t\tline[num1] = line[num2];\n\t\t\tline[num2] = sub;\n\t\t}\n\t\tfor(int i = 1; i <= w; i++){\n\t\t\tSystem.out.println(line[i]);\n\t\t}\n\t}\n}", "Main", "public static void main(String[] a){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint w = scan.nextInt();\n\t\tint[] line = new int[w + 1];\n\t\tfor(int i = 1; i <= w; i++){\n\t\t\tline[i] = i;\n\t\t}\n\t\tint n = scan.nextInt();\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString str = scan.next();\n\t\t\tString[] spl = str.split(\",\");\n\t\t\tint num1 = Integer.parseInt(spl[0]);\n\t\t\tint num2 = Integer.parseInt(spl[1]);\n\t\t\tint sub = line[num1];\n\t\t\tline[num1] = line[num2];\n\t\t\tline[num2] = sub;\n\t\t}\n\t\tfor(int i = 1; i <= w; i++){\n\t\t\tSystem.out.println(line[i]);\n\t\t}\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint w = scan.nextInt();\n\t\tint[] line = new int[w + 1];\n\t\tfor(int i = 1; i <= w; i++){\n\t\t\tline[i] = i;\n\t\t}\n\t\tint n = scan.nextInt();\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString str = scan.next();\n\t\t\tString[] spl = str.split(\",\");\n\t\t\tint num1 = Integer.parseInt(spl[0]);\n\t\t\tint num2 = Integer.parseInt(spl[1]);\n\t\t\tint sub = line[num1];\n\t\t\tline[num1] = line[num2];\n\t\t\tline[num2] = sub;\n\t\t}\n\t\tfor(int i = 1; i <= w; i++){\n\t\t\tSystem.out.println(line[i]);\n\t\t}\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int w = scan.nextInt();", "w", "scan.nextInt()", "scan.nextInt", "scan", "int[] line = new int[w + 1];", "line", "new int[w + 1]", "w + 1", "w", "1", "for(int i = 1; i <= w; i++){\n\t\t\tline[i] = i;\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= w", "i", "w", "i++", "i++", "i", "{\n\t\t\tline[i] = i;\n\t\t}", "{\n\t\t\tline[i] = i;\n\t\t}", "line[i] = i", "line[i]", "line", "i", "i", "int n = scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "for(int i = 0; i < n; i++){\n\t\t\tString str = scan.next();\n\t\t\tString[] spl = str.split(\",\");\n\t\t\tint num1 = Integer.parseInt(spl[0]);\n\t\t\tint num2 = Integer.parseInt(spl[1]);\n\t\t\tint sub = line[num1];\n\t\t\tline[num1] = line[num2];\n\t\t\tline[num2] = sub;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tString str = scan.next();\n\t\t\tString[] spl = str.split(\",\");\n\t\t\tint num1 = Integer.parseInt(spl[0]);\n\t\t\tint num2 = Integer.parseInt(spl[1]);\n\t\t\tint sub = line[num1];\n\t\t\tline[num1] = line[num2];\n\t\t\tline[num2] = sub;\n\t\t}", "{\n\t\t\tString str = scan.next();\n\t\t\tString[] spl = str.split(\",\");\n\t\t\tint num1 = Integer.parseInt(spl[0]);\n\t\t\tint num2 = Integer.parseInt(spl[1]);\n\t\t\tint sub = line[num1];\n\t\t\tline[num1] = line[num2];\n\t\t\tline[num2] = sub;\n\t\t}", "String str = scan.next();", "str", "scan.next()", "scan.next", "scan", "String[] spl = str.split(\",\");", "spl", "str.split(\",\")", "str.split", "str", "\",\"", "int num1 = Integer.parseInt(spl[0]);", "num1", "Integer.parseInt(spl[0])", "Integer.parseInt", "Integer", "spl[0]", "spl", "0", "int num2 = Integer.parseInt(spl[1]);", "num2", "Integer.parseInt(spl[1])", "Integer.parseInt", "Integer", "spl[1]", "spl", "1", "int sub = line[num1];", "sub", "line[num1]", "line", "num1", "line[num1] = line[num2]", "line[num1]", "line", "num1", "line[num2]", "line", "num2", "line[num2] = sub", "line[num2]", "line", "num2", "sub", "for(int i = 1; i <= w; i++){\n\t\t\tSystem.out.println(line[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(line[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(line[i]);\n\t\t}", "System.out.println(line[i])", "System.out.println", "System.out", "System", "System.out", "line[i]", "line", "i", "String[] a", "a" ]
import java.util.Scanner; class Main{ public static void main(String[] a){ Scanner scan = new Scanner(System.in); int w = scan.nextInt(); int[] line = new int[w + 1]; for(int i = 1; i <= w; i++){ line[i] = i; } int n = scan.nextInt(); for(int i = 0; i < n; i++){ String str = scan.next(); String[] spl = str.split(","); int num1 = Integer.parseInt(spl[0]); int num2 = Integer.parseInt(spl[1]); int sub = line[num1]; line[num1] = line[num2]; line[num2] = sub; } for(int i = 1; i <= w; i++){ System.out.println(line[i]); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 0, 13, 17, 2, 13, 4, 18, 13, 1, 40, 13, 30, 30, 14, 2, 4, 18, 13, 13, 17, 30, 3, 41, 13, 4, 18, 13, 4, 18, 13, 17, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 17, 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, 30, 4, 18, 18, 13, 13, 18, 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 ], [ 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 ], [ 58, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 67, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 75, 76 ], [ 67, 77 ], [ 77, 78 ], [ 78, 79 ], [ 67, 80 ], [ 81, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 83, 88 ], [ 82, 89 ], [ 89, 90 ], [ 58, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 94, 95 ], [ 93, 96 ], [ 96, 97 ], [ 97, 98 ], [ 96, 99 ], [ 96, 100 ], [ 58, 101 ], [ 101, 102 ], [ 101, 103 ], [ 103, 104 ], [ 104, 105 ], [ 103, 106 ], [ 106, 107 ], [ 107, 108 ], [ 106, 109 ], [ 109, 110 ], [ 109, 111 ], [ 106, 112 ], [ 112, 113 ], [ 113, 114 ], [ 58, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 117, 119 ], [ 119, 120 ], [ 119, 121 ], [ 58, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 125, 126 ], [ 125, 127 ], [ 122, 128 ], [ 128, 129 ], [ 128, 130 ], [ 130, 131 ], [ 130, 132 ], [ 58, 133 ], [ 133, 134 ], [ 134, 135 ], [ 134, 136 ], [ 136, 137 ], [ 136, 138 ], [ 133, 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 ], [ 6, 161 ], [ 161, 162 ], [ 0, 163 ], [ 163, 164 ], [ 163, 165 ] ]
[ "import java.util.*;\n\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint[] k = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tk[i] = i+1;\n\t\t}\n\t\tint n = sc.nextInt();\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString s = sc.next();\n\t\t\tint h = 0;\n\t\t\tfor(h = 0; h < s.length(); h++){\n\t\t\t\tif(s.charAt(h) == ','){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint a = Integer.parseInt(s.substring(0,h));\n\t\t\tint b = Integer.parseInt(s.substring(h+1,s.length()));\n\t\t\t//swap(k[a-1], k[b-1]);\n\t\t\tint c = k[a-1];\n\t\t\tk[a-1] = k[b-1];\n\t\t\tk[b-1] = c;\n\t\t}\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(k[i]);\n\t\t}\n\t}\n}", "import java.util.*;", "util.*", "java", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint[] k = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tk[i] = i+1;\n\t\t}\n\t\tint n = sc.nextInt();\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString s = sc.next();\n\t\t\tint h = 0;\n\t\t\tfor(h = 0; h < s.length(); h++){\n\t\t\t\tif(s.charAt(h) == ','){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint a = Integer.parseInt(s.substring(0,h));\n\t\t\tint b = Integer.parseInt(s.substring(h+1,s.length()));\n\t\t\t//swap(k[a-1], k[b-1]);\n\t\t\tint c = k[a-1];\n\t\t\tk[a-1] = k[b-1];\n\t\t\tk[b-1] = c;\n\t\t}\n\t\tfor(int i = 0; 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 sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint[] k = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tk[i] = i+1;\n\t\t}\n\t\tint n = sc.nextInt();\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString s = sc.next();\n\t\t\tint h = 0;\n\t\t\tfor(h = 0; h < s.length(); h++){\n\t\t\t\tif(s.charAt(h) == ','){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint a = Integer.parseInt(s.substring(0,h));\n\t\t\tint b = Integer.parseInt(s.substring(h+1,s.length()));\n\t\t\t//swap(k[a-1], k[b-1]);\n\t\t\tint c = k[a-1];\n\t\t\tk[a-1] = k[b-1];\n\t\t\tk[b-1] = c;\n\t\t}\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(k[i]);\n\t\t}\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint[] k = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tk[i] = i+1;\n\t\t}\n\t\tint n = sc.nextInt();\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString s = sc.next();\n\t\t\tint h = 0;\n\t\t\tfor(h = 0; h < s.length(); h++){\n\t\t\t\tif(s.charAt(h) == ','){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint a = Integer.parseInt(s.substring(0,h));\n\t\t\tint b = Integer.parseInt(s.substring(h+1,s.length()));\n\t\t\t//swap(k[a-1], k[b-1]);\n\t\t\tint c = k[a-1];\n\t\t\tk[a-1] = k[b-1];\n\t\t\tk[b-1] = c;\n\t\t}\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(k[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[] k = new int[w];", "k", "new int[w]", "w", "for(int i = 0; i < w; i++){\n\t\t\tk[i] = i+1;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < w", "i", "w", "i++", "i++", "i", "{\n\t\t\tk[i] = i+1;\n\t\t}", "{\n\t\t\tk[i] = i+1;\n\t\t}", "k[i] = i+1", "k[i]", "k", "i", "i+1", "i", "1", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "for(int i = 0; i < n; i++){\n\t\t\tString s = sc.next();\n\t\t\tint h = 0;\n\t\t\tfor(h = 0; h < s.length(); h++){\n\t\t\t\tif(s.charAt(h) == ','){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint a = Integer.parseInt(s.substring(0,h));\n\t\t\tint b = Integer.parseInt(s.substring(h+1,s.length()));\n\t\t\t//swap(k[a-1], k[b-1]);\n\t\t\tint c = k[a-1];\n\t\t\tk[a-1] = k[b-1];\n\t\t\tk[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 = sc.next();\n\t\t\tint h = 0;\n\t\t\tfor(h = 0; h < s.length(); h++){\n\t\t\t\tif(s.charAt(h) == ','){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint a = Integer.parseInt(s.substring(0,h));\n\t\t\tint b = Integer.parseInt(s.substring(h+1,s.length()));\n\t\t\t//swap(k[a-1], k[b-1]);\n\t\t\tint c = k[a-1];\n\t\t\tk[a-1] = k[b-1];\n\t\t\tk[b-1] = c;\n\t\t}", "{\n\t\t\tString s = sc.next();\n\t\t\tint h = 0;\n\t\t\tfor(h = 0; h < s.length(); h++){\n\t\t\t\tif(s.charAt(h) == ','){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint a = Integer.parseInt(s.substring(0,h));\n\t\t\tint b = Integer.parseInt(s.substring(h+1,s.length()));\n\t\t\t//swap(k[a-1], k[b-1]);\n\t\t\tint c = k[a-1];\n\t\t\tk[a-1] = k[b-1];\n\t\t\tk[b-1] = c;\n\t\t}", "String s = sc.next();", "s", "sc.next()", "sc.next", "sc", "int h = 0;", "h", "0", "for(h = 0; h < s.length(); h++){\n\t\t\t\tif(s.charAt(h) == ','){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "h = 0;", "h = 0", "h", "0", "h < s.length()", "h", "s.length()", "s.length", "s", "h++", "h++", "h", "{\n\t\t\t\tif(s.charAt(h) == ','){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tif(s.charAt(h) == ','){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "if(s.charAt(h) == ','){\n\t\t\t\t\tbreak;\n\t\t\t\t}", "s.charAt(h) == ','", "s.charAt(h)", "s.charAt", "s", "h", "','", "{\n\t\t\t\t\tbreak;\n\t\t\t\t}", "break;", "int a = Integer.parseInt(s.substring(0,h));", "a", "Integer.parseInt(s.substring(0,h))", "Integer.parseInt", "Integer", "s.substring(0,h)", "s.substring", "s", "0", "h", "int b = Integer.parseInt(s.substring(h+1,s.length()));", "b", "Integer.parseInt(s.substring(h+1,s.length()))", "Integer.parseInt", "Integer", "s.substring(h+1,s.length())", "s.substring", "s", "h+1", "h", "1", "s.length()", "s.length", "s", "int c = k[a-1];", "c", "k[a-1]", "k", "a-1", "a", "1", "k[a-1] = k[b-1]", "k[a-1]", "k", "a-1", "a", "1", "k[b-1]", "k", "b-1", "b", "1", "k[b-1] = c", "k[b-1]", "k", "b-1", "b", "1", "c", "for(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(k[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(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 sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint[] k = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tk[i] = i+1;\n\t\t}\n\t\tint n = sc.nextInt();\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString s = sc.next();\n\t\t\tint h = 0;\n\t\t\tfor(h = 0; h < s.length(); h++){\n\t\t\t\tif(s.charAt(h) == ','){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint a = Integer.parseInt(s.substring(0,h));\n\t\t\tint b = Integer.parseInt(s.substring(h+1,s.length()));\n\t\t\t//swap(k[a-1], k[b-1]);\n\t\t\tint c = k[a-1];\n\t\t\tk[a-1] = k[b-1];\n\t\t\tk[b-1] = c;\n\t\t}\n\t\tfor(int i = 0; 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 sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint[] k = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tk[i] = i+1;\n\t\t}\n\t\tint n = sc.nextInt();\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString s = sc.next();\n\t\t\tint h = 0;\n\t\t\tfor(h = 0; h < s.length(); h++){\n\t\t\t\tif(s.charAt(h) == ','){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint a = Integer.parseInt(s.substring(0,h));\n\t\t\tint b = Integer.parseInt(s.substring(h+1,s.length()));\n\t\t\t//swap(k[a-1], k[b-1]);\n\t\t\tint c = k[a-1];\n\t\t\tk[a-1] = k[b-1];\n\t\t\tk[b-1] = c;\n\t\t}\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(k[i]);\n\t\t}\n\t}\n}", "Main" ]
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int[] k = new int[w]; for(int i = 0; i < w; i++){ k[i] = i+1; } int n = sc.nextInt(); for(int i = 0; i < n; i++){ String s = sc.next(); int h = 0; for(h = 0; h < s.length(); h++){ if(s.charAt(h) == ','){ break; } } int a = Integer.parseInt(s.substring(0,h)); int b = Integer.parseInt(s.substring(h+1,s.length())); //swap(k[a-1], k[b-1]); int c = k[a-1]; k[a-1] = k[b-1]; k[b-1] = c; } for(int i = 0; i < w; i++){ System.out.println(k[i]); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 2, 4, 18, 13, 4, 18, 13, 17, 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, 13, 42, 2, 40, 13, 17, 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, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 127, 8 ], [ 127, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 19, 20 ], [ 18, 21 ], [ 21, 22 ], [ 22, 23 ], [ 17, 24 ], [ 11, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 27, 30 ], [ 30, 31 ], [ 31, 32 ], [ 11, 33 ], [ 33, 34 ], [ 33, 35 ], [ 11, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 37, 42 ], [ 42, 43 ], [ 42, 44 ], [ 37, 45 ], [ 45, 46 ], [ 46, 47 ], [ 37, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 49, 53 ], [ 11, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 55, 58 ], [ 54, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 59, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 68, 69 ], [ 67, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 71, 74 ], [ 70, 75 ], [ 59, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 78, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 82, 85 ], [ 81, 86 ], [ 59, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 89, 91 ], [ 59, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 92, 96 ], [ 96, 97 ], [ 96, 98 ], [ 59, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 99, 103 ], [ 11, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 104, 109 ], [ 109, 110 ], [ 109, 111 ], [ 104, 112 ], [ 112, 113 ], [ 113, 114 ], [ 104, 115 ], [ 115, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 118, 120 ], [ 116, 121 ], [ 121, 122 ], [ 121, 123 ], [ 9, 124 ], [ 124, 125 ], [ 0, 126 ], [ 126, 127 ], [ 126, 128 ] ]
[ "import java.io.*;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\tint l=Integer.parseInt(s.nextLine())+1;\n\t\tint x=Integer.parseInt(s.nextLine());\n\t\tint[] p = new int[l];\n\t\tfor(int i=0;i<l;i++)p[i]=i;\n\t\twhile(x-->0){String str=s.nextLine();int a= Integer.parseInt(str.split(\",\")[0]);int b= Integer.parseInt(str.split(\",\")[1]);int t=p[a];p[a]=p[b];p[b]=t;}\n\t\tfor(int i=1;i<l;i++)System.out.println(p[i]);\n\t}\n}", "import java.io.*;", "io.*", "java", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\tint l=Integer.parseInt(s.nextLine())+1;\n\t\tint x=Integer.parseInt(s.nextLine());\n\t\tint[] p = new int[l];\n\t\tfor(int i=0;i<l;i++)p[i]=i;\n\t\twhile(x-->0){String str=s.nextLine();int a= Integer.parseInt(str.split(\",\")[0]);int b= Integer.parseInt(str.split(\",\")[1]);int t=p[a];p[a]=p[b];p[b]=t;}\n\t\tfor(int i=1;i<l;i++)System.out.println(p[i]);\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner s = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\tint l=Integer.parseInt(s.nextLine())+1;\n\t\tint x=Integer.parseInt(s.nextLine());\n\t\tint[] p = new int[l];\n\t\tfor(int i=0;i<l;i++)p[i]=i;\n\t\twhile(x-->0){String str=s.nextLine();int a= Integer.parseInt(str.split(\",\")[0]);int b= Integer.parseInt(str.split(\",\")[1]);int t=p[a];p[a]=p[b];p[b]=t;}\n\t\tfor(int i=1;i<l;i++)System.out.println(p[i]);\n\t}", "main", "{\n\t\tScanner s = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\tint l=Integer.parseInt(s.nextLine())+1;\n\t\tint x=Integer.parseInt(s.nextLine());\n\t\tint[] p = new int[l];\n\t\tfor(int i=0;i<l;i++)p[i]=i;\n\t\twhile(x-->0){String str=s.nextLine();int a= Integer.parseInt(str.split(\",\")[0]);int b= Integer.parseInt(str.split(\",\")[1]);int t=p[a];p[a]=p[b];p[b]=t;}\n\t\tfor(int i=1;i<l;i++)System.out.println(p[i]);\n\t}", "Scanner s = new Scanner(new BufferedReader(new InputStreamReader(System.in)));", "s", "new Scanner(new BufferedReader(new InputStreamReader(System.in)))", "int l=Integer.parseInt(s.nextLine())+1;", "l", "Integer.parseInt(s.nextLine())+1", "Integer.parseInt(s.nextLine())", "Integer.parseInt", "Integer", "s.nextLine()", "s.nextLine", "s", "1", "int x=Integer.parseInt(s.nextLine());", "x", "Integer.parseInt(s.nextLine())", "Integer.parseInt", "Integer", "s.nextLine()", "s.nextLine", "s", "int[] p = new int[l];", "p", "new int[l]", "l", "for(int i=0;i<l;i++)p[i]=i;", "int i=0;", "int i=0;", "i", "0", "i<l", "i", "l", "i++", "i++", "i", "p[i]=i;", "p[i]=i", "p[i]", "p", "i", "i", "while(x-->0){String str=s.nextLine();int a= Integer.parseInt(str.split(\",\")[0]);int b= Integer.parseInt(str.split(\",\")[1]);int t=p[a];p[a]=p[b];p[b]=t;}", "x-->0", "x--", "x", "0", "{String str=s.nextLine();int a= Integer.parseInt(str.split(\",\")[0]);int b= Integer.parseInt(str.split(\",\")[1]);int t=p[a];p[a]=p[b];p[b]=t;}", "String str=s.nextLine();", "str", "s.nextLine()", "s.nextLine", "s", "int a= Integer.parseInt(str.split(\",\")[0]);", "a", "Integer.parseInt(str.split(\",\")[0])", "Integer.parseInt", "Integer", "str.split(\",\")[0]", "str.split(\",\")", "str.split", "str", "\",\"", "0", "int b= Integer.parseInt(str.split(\",\")[1]);", "b", "Integer.parseInt(str.split(\",\")[1])", "Integer.parseInt", "Integer", "str.split(\",\")[1]", "str.split(\",\")", "str.split", "str", "\",\"", "1", "int t=p[a];", "t", "p[a]", "p", "a", "p[a]=p[b]", "p[a]", "p", "a", "p[b]", "p", "b", "p[b]=t", "p[b]", "p", "b", "t", "for(int i=1;i<l;i++)System.out.println(p[i]);", "int i=1;", "int i=1;", "i", "1", "i<l", "i", "l", "i++", "i++", "i", "System.out.println(p[i]);", "System.out.println(p[i])", "System.out.println", "System.out", "System", "System.out", "p[i]", "p", "i", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\tint l=Integer.parseInt(s.nextLine())+1;\n\t\tint x=Integer.parseInt(s.nextLine());\n\t\tint[] p = new int[l];\n\t\tfor(int i=0;i<l;i++)p[i]=i;\n\t\twhile(x-->0){String str=s.nextLine();int a= Integer.parseInt(str.split(\",\")[0]);int b= Integer.parseInt(str.split(\",\")[1]);int t=p[a];p[a]=p[b];p[b]=t;}\n\t\tfor(int i=1;i<l;i++)System.out.println(p[i]);\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\tint l=Integer.parseInt(s.nextLine())+1;\n\t\tint x=Integer.parseInt(s.nextLine());\n\t\tint[] p = new int[l];\n\t\tfor(int i=0;i<l;i++)p[i]=i;\n\t\twhile(x-->0){String str=s.nextLine();int a= Integer.parseInt(str.split(\",\")[0]);int b= Integer.parseInt(str.split(\",\")[1]);int t=p[a];p[a]=p[b];p[b]=t;}\n\t\tfor(int i=1;i<l;i++)System.out.println(p[i]);\n\t}\n}", "Main" ]
import java.io.*; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner s = new Scanner(new BufferedReader(new InputStreamReader(System.in))); int l=Integer.parseInt(s.nextLine())+1; int x=Integer.parseInt(s.nextLine()); int[] p = new int[l]; for(int i=0;i<l;i++)p[i]=i; while(x-->0){String str=s.nextLine();int a= Integer.parseInt(str.split(",")[0]);int b= Integer.parseInt(str.split(",")[1]);int t=p[a];p[a]=p[b];p[b]=t;} for(int i=1;i<l;i++)System.out.println(p[i]); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 38, 5, 13, 30, 4, 18, 18, 13, 13, 13, 30, 41, 13, 20, 41, 13, 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, 0, 13, 4, 18, 4, 18, 13, 17, 4, 13, 13, 2, 4, 18, 13, 18, 13, 17, 17, 2, 4, 18, 13, 18, 13, 17, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 12, 13, 30, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 23, 13, 23, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 13, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 13, 18 ], [ 9, 19 ], [ 19, 20 ], [ 20, 21 ], [ 20, 22 ], [ 19, 23 ], [ 23, 24 ], [ 19, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 27, 30 ], [ 30, 31 ], [ 31, 32 ], [ 19, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 35, 38 ], [ 38, 39 ], [ 39, 40 ], [ 19, 41 ], [ 41, 42 ], [ 41, 43 ], [ 19, 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 ], [ 59, 61 ], [ 58, 62 ], [ 62, 63 ], [ 62, 64 ], [ 19, 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 ], [ 86, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 90, 93 ], [ 93, 94 ], [ 93, 95 ], [ 89, 96 ], [ 86, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 98, 101 ], [ 101, 102 ], [ 101, 103 ], [ 97, 104 ], [ 19, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 105, 110 ], [ 110, 111 ], [ 110, 112 ], [ 105, 113 ], [ 113, 114 ], [ 114, 115 ], [ 105, 116 ], [ 117, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 120, 122 ], [ 118, 123 ], [ 123, 124 ], [ 123, 125 ], [ 6, 126 ], [ 126, 127 ], [ 4, 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 ], [ 128, 148 ], [ 148, 149 ], [ 128, 150 ], [ 150, 151 ], [ 128, 152 ], [ 152, 153 ] ]
[ "import java.io.*;\n\nclass Main {\n\tpublic static void main(String args[]) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString t[];\n\t\t\tint w = Integer.parseInt(reader.readLine());\n\t\t\tint n = Integer.parseInt(reader.readLine());\n\t\t\tint a[] = new int[w];\n\t\t\tfor(int i = 0;i < w;i++) {\n\t\t\t\ta[i] = i+1;\n\t\t\t}\n\t\t\tfor(int i = 0;i < n;i++) {\n\t\t\t\tt = reader.readLine().split(\",\");\n\t\t\t\tswap(a, Integer.parseInt(t[0])-1, Integer.parseInt(t[1])-1);\n\t\t\t}\n\t\t\tfor(int i = 0;i < w;i++) {\n\t\t\t\tSystem.out.println(a[i]);\n\t\t\t}\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}\n\tpublic static void swap(int a[], int i, int j) {\n\t\tint tmp = a[i];\n\t\ta[i] = a[j];\n\t\ta[j] = tmp;\n\t}\n}", "import java.io.*;", "io.*", "java", "class Main {\n\tpublic static void main(String args[]) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString t[];\n\t\t\tint w = Integer.parseInt(reader.readLine());\n\t\t\tint n = Integer.parseInt(reader.readLine());\n\t\t\tint a[] = new int[w];\n\t\t\tfor(int i = 0;i < w;i++) {\n\t\t\t\ta[i] = i+1;\n\t\t\t}\n\t\t\tfor(int i = 0;i < n;i++) {\n\t\t\t\tt = reader.readLine().split(\",\");\n\t\t\t\tswap(a, Integer.parseInt(t[0])-1, Integer.parseInt(t[1])-1);\n\t\t\t}\n\t\t\tfor(int i = 0;i < w;i++) {\n\t\t\t\tSystem.out.println(a[i]);\n\t\t\t}\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}\n\tpublic static void swap(int a[], int i, int j) {\n\t\tint tmp = a[i];\n\t\ta[i] = a[j];\n\t\ta[j] = tmp;\n\t}\n}", "Main", "public static void main(String args[]) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString t[];\n\t\t\tint w = Integer.parseInt(reader.readLine());\n\t\t\tint n = Integer.parseInt(reader.readLine());\n\t\t\tint a[] = new int[w];\n\t\t\tfor(int i = 0;i < w;i++) {\n\t\t\t\ta[i] = i+1;\n\t\t\t}\n\t\t\tfor(int i = 0;i < n;i++) {\n\t\t\t\tt = reader.readLine().split(\",\");\n\t\t\t\tswap(a, Integer.parseInt(t[0])-1, Integer.parseInt(t[1])-1);\n\t\t\t}\n\t\t\tfor(int i = 0;i < w;i++) {\n\t\t\t\tSystem.out.println(a[i]);\n\t\t\t}\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}", "main", "{\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString t[];\n\t\t\tint w = Integer.parseInt(reader.readLine());\n\t\t\tint n = Integer.parseInt(reader.readLine());\n\t\t\tint a[] = new int[w];\n\t\t\tfor(int i = 0;i < w;i++) {\n\t\t\t\ta[i] = i+1;\n\t\t\t}\n\t\t\tfor(int i = 0;i < n;i++) {\n\t\t\t\tt = reader.readLine().split(\",\");\n\t\t\t\tswap(a, Integer.parseInt(t[0])-1, Integer.parseInt(t[1])-1);\n\t\t\t}\n\t\t\tfor(int i = 0;i < w;i++) {\n\t\t\t\tSystem.out.println(a[i]);\n\t\t\t}\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}", "try {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString t[];\n\t\t\tint w = Integer.parseInt(reader.readLine());\n\t\t\tint n = Integer.parseInt(reader.readLine());\n\t\t\tint a[] = new int[w];\n\t\t\tfor(int i = 0;i < w;i++) {\n\t\t\t\ta[i] = i+1;\n\t\t\t}\n\t\t\tfor(int i = 0;i < n;i++) {\n\t\t\t\tt = reader.readLine().split(\",\");\n\t\t\t\tswap(a, Integer.parseInt(t[0])-1, Integer.parseInt(t[1])-1);\n\t\t\t}\n\t\t\tfor(int i = 0;i < w;i++) {\n\t\t\t\tSystem.out.println(a[i]);\n\t\t\t}\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(e);\n\t\t}", "catch(IOException e) {\n\t\t\tSystem.out.println(e);\n\t\t}", "IOException e", "{\n\t\t\tSystem.out.println(e);\n\t\t}", "System.out.println(e)", "System.out.println", "System.out", "System", "System.out", "e", "{\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString t[];\n\t\t\tint w = Integer.parseInt(reader.readLine());\n\t\t\tint n = Integer.parseInt(reader.readLine());\n\t\t\tint a[] = new int[w];\n\t\t\tfor(int i = 0;i < w;i++) {\n\t\t\t\ta[i] = i+1;\n\t\t\t}\n\t\t\tfor(int i = 0;i < n;i++) {\n\t\t\t\tt = reader.readLine().split(\",\");\n\t\t\t\tswap(a, Integer.parseInt(t[0])-1, Integer.parseInt(t[1])-1);\n\t\t\t}\n\t\t\tfor(int i = 0;i < w;i++) {\n\t\t\t\tSystem.out.println(a[i]);\n\t\t\t}\n\t\t}", "BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));", "reader", "new BufferedReader(new InputStreamReader(System.in))", "String t[];", "t", "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 a[] = new int[w];", "a", "new int[w]", "w", "for(int i = 0;i < w;i++) {\n\t\t\t\ta[i] = i+1;\n\t\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < w", "i", "w", "i++", "i++", "i", "{\n\t\t\t\ta[i] = i+1;\n\t\t\t}", "{\n\t\t\t\ta[i] = i+1;\n\t\t\t}", "a[i] = i+1", "a[i]", "a", "i", "i+1", "i", "1", "for(int i = 0;i < n;i++) {\n\t\t\t\tt = reader.readLine().split(\",\");\n\t\t\t\tswap(a, Integer.parseInt(t[0])-1, Integer.parseInt(t[1])-1);\n\t\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\t\tt = reader.readLine().split(\",\");\n\t\t\t\tswap(a, Integer.parseInt(t[0])-1, Integer.parseInt(t[1])-1);\n\t\t\t}", "{\n\t\t\t\tt = reader.readLine().split(\",\");\n\t\t\t\tswap(a, Integer.parseInt(t[0])-1, Integer.parseInt(t[1])-1);\n\t\t\t}", "t = reader.readLine().split(\",\")", "t", "reader.readLine().split(\",\")", "reader.readLine().split", "reader.readLine()", "reader.readLine", "reader", "\",\"", "swap(a, Integer.parseInt(t[0])-1, Integer.parseInt(t[1])-1)", "swap", "a", "Integer.parseInt(t[0])-1", "Integer.parseInt(t[0])", "Integer.parseInt", "Integer", "t[0]", "t", "0", "1", "Integer.parseInt(t[1])-1", "Integer.parseInt(t[1])", "Integer.parseInt", "Integer", "t[1]", "t", "1", "1", "for(int i = 0;i < w;i++) {\n\t\t\t\tSystem.out.println(a[i]);\n\t\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < w", "i", "w", "i++", "i++", "i", "{\n\t\t\t\tSystem.out.println(a[i]);\n\t\t\t}", "{\n\t\t\t\tSystem.out.println(a[i]);\n\t\t\t}", "System.out.println(a[i])", "System.out.println", "System.out", "System", "System.out", "a[i]", "a", "i", "String args[]", "args", "public static void swap(int a[], int i, int j) {\n\t\tint tmp = a[i];\n\t\ta[i] = a[j];\n\t\ta[j] = tmp;\n\t}", "swap", "{\n\t\tint tmp = a[i];\n\t\ta[i] = a[j];\n\t\ta[j] = tmp;\n\t}", "int tmp = a[i];", "tmp", "a[i]", "a", "i", "a[i] = a[j]", "a[i]", "a", "i", "a[j]", "a", "j", "a[j] = tmp", "a[j]", "a", "j", "tmp", "int a[]", "a", "int i", "i", "int j", "j" ]
import java.io.*; class Main { public static void main(String args[]) { try { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String t[]; int w = Integer.parseInt(reader.readLine()); int n = Integer.parseInt(reader.readLine()); int a[] = new int[w]; for(int i = 0;i < w;i++) { a[i] = i+1; } for(int i = 0;i < n;i++) { t = reader.readLine().split(","); swap(a, Integer.parseInt(t[0])-1, Integer.parseInt(t[1])-1); } for(int i = 0;i < w;i++) { System.out.println(a[i]); } } catch(IOException e) { System.out.println(e); } } public static void swap(int a[], int i, int j) { int tmp = a[i]; a[i] = a[j]; a[j] = tmp; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 38, 5, 13, 30, 30, 0, 13, 4, 18, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 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, 17, 4, 13, 2, 4, 18, 13, 18, 13, 17, 17, 2, 4, 18, 13, 18, 13, 17, 17, 13, 28, 13, 13, 30, 4, 18, 18, 13, 13, 17, 2, 13, 17, 23, 13, 12, 13, 30, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 23, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 145, 5 ], [ 145, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], [ 14, 15 ], [ 8, 16 ], [ 16, 17 ], [ 17, 18 ], [ 17, 19 ], [ 16, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 23, 26 ], [ 26, 27 ], [ 27, 28 ], [ 20, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 31, 34 ], [ 34, 35 ], [ 35, 36 ], [ 20, 37 ], [ 37, 38 ], [ 37, 39 ], [ 20, 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 ], [ 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 ], [ 79, 83 ], [ 71, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 87, 90 ], [ 90, 91 ], [ 90, 92 ], [ 86, 93 ], [ 84, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 95, 98 ], [ 98, 99 ], [ 98, 100 ], [ 94, 101 ], [ 84, 102 ], [ 20, 103 ], [ 103, 104 ], [ 103, 105 ], [ 103, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 107, 112 ], [ 107, 113 ], [ 113, 114 ], [ 113, 115 ], [ 6, 116 ], [ 116, 117 ], [ 145, 118 ], [ 118, 119 ], [ 118, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 123, 124 ], [ 123, 125 ], [ 120, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 126, 130 ], [ 130, 131 ], [ 130, 132 ], [ 120, 133 ], [ 133, 134 ], [ 134, 135 ], [ 134, 136 ], [ 133, 137 ], [ 118, 138 ], [ 138, 139 ], [ 118, 140 ], [ 140, 141 ], [ 118, 142 ], [ 142, 143 ], [ 0, 144 ], [ 144, 145 ], [ 144, 146 ] ]
[ "import java.io.*;\n\npublic class Main{\n public static void main(String[] args){\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n int w, n;\n try{\n w = Integer.parseInt(reader.readLine());\n n = Integer.parseInt(reader.readLine());\n int[] b = new int[w];\n for(int i = 0; i < w; i++){b[i] = i;}\n for(int i = 0; i < n; i++){\n String a = reader.readLine();\n String[] s = a.split(\",\", 0);\n swap(Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1, b);\n }\n for(int v: b) System.out.printf(\"%d\\n\", v + 1);\n }catch(Exception e){}\n }\n\n public static void swap(int a1, int a2, int[] b){\n int tmp = b[a1];\n b[a1] = b[a2];\n b[a2] = tmp;\n }\n}", "import java.io.*;", "io.*", "java", "public class Main{\n public static void main(String[] args){\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n int w, n;\n try{\n w = Integer.parseInt(reader.readLine());\n n = Integer.parseInt(reader.readLine());\n int[] b = new int[w];\n for(int i = 0; i < w; i++){b[i] = i;}\n for(int i = 0; i < n; i++){\n String a = reader.readLine();\n String[] s = a.split(\",\", 0);\n swap(Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1, b);\n }\n for(int v: b) System.out.printf(\"%d\\n\", v + 1);\n }catch(Exception e){}\n }\n\n public static void swap(int a1, int a2, int[] b){\n int tmp = b[a1];\n b[a1] = b[a2];\n b[a2] = tmp;\n }\n}", "Main", "public static void main(String[] args){\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n int w, n;\n try{\n w = Integer.parseInt(reader.readLine());\n n = Integer.parseInt(reader.readLine());\n int[] b = new int[w];\n for(int i = 0; i < w; i++){b[i] = i;}\n for(int i = 0; i < n; i++){\n String a = reader.readLine();\n String[] s = a.split(\",\", 0);\n swap(Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1, b);\n }\n for(int v: b) System.out.printf(\"%d\\n\", v + 1);\n }catch(Exception e){}\n }", "main", "{\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n int w, n;\n try{\n w = Integer.parseInt(reader.readLine());\n n = Integer.parseInt(reader.readLine());\n int[] b = new int[w];\n for(int i = 0; i < w; i++){b[i] = i;}\n for(int i = 0; i < n; i++){\n String a = reader.readLine();\n String[] s = a.split(\",\", 0);\n swap(Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1, b);\n }\n for(int v: b) System.out.printf(\"%d\\n\", v + 1);\n }catch(Exception e){}\n }", "BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));", "reader", "new BufferedReader(new InputStreamReader(System.in))", "int w", "w", "n;", "n", "try{\n w = Integer.parseInt(reader.readLine());\n n = Integer.parseInt(reader.readLine());\n int[] b = new int[w];\n for(int i = 0; i < w; i++){b[i] = i;}\n for(int i = 0; i < n; i++){\n String a = reader.readLine();\n String[] s = a.split(\",\", 0);\n swap(Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1, b);\n }\n for(int v: b) System.out.printf(\"%d\\n\", v + 1);\n }catch(Exception e){}", "catch(Exception e){}", "Exception e", "{}", "{\n w = Integer.parseInt(reader.readLine());\n n = Integer.parseInt(reader.readLine());\n int[] b = new int[w];\n for(int i = 0; i < w; i++){b[i] = i;}\n for(int i = 0; i < n; i++){\n String a = reader.readLine();\n String[] s = a.split(\",\", 0);\n swap(Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1, b);\n }\n for(int v: b) System.out.printf(\"%d\\n\", v + 1);\n }", "w = Integer.parseInt(reader.readLine())", "w", "Integer.parseInt(reader.readLine())", "Integer.parseInt", "Integer", "reader.readLine()", "reader.readLine", "reader", "n = Integer.parseInt(reader.readLine())", "n", "Integer.parseInt(reader.readLine())", "Integer.parseInt", "Integer", "reader.readLine()", "reader.readLine", "reader", "int[] b = new int[w];", "b", "new int[w]", "w", "for(int i = 0; i < w; i++){b[i] = i;}", "int i = 0;", "int i = 0;", "i", "0", "i < w", "i", "w", "i++", "i++", "i", "{b[i] = i;}", "{b[i] = i;}", "b[i] = i", "b[i]", "b", "i", "i", "for(int i = 0; i < n; i++){\n String a = reader.readLine();\n String[] s = a.split(\",\", 0);\n swap(Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1, b);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n String a = reader.readLine();\n String[] s = a.split(\",\", 0);\n swap(Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1, b);\n }", "{\n String a = reader.readLine();\n String[] s = a.split(\",\", 0);\n swap(Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1, b);\n }", "String a = reader.readLine();", "a", "reader.readLine()", "reader.readLine", "reader", "String[] s = a.split(\",\", 0);", "s", "a.split(\",\", 0)", "a.split", "a", "\",\"", "0", "swap(Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1, b)", "swap", "Integer.parseInt(s[0]) - 1", "Integer.parseInt(s[0])", "Integer.parseInt", "Integer", "s[0]", "s", "0", "1", "Integer.parseInt(s[1]) - 1", "Integer.parseInt(s[1])", "Integer.parseInt", "Integer", "s[1]", "s", "1", "1", "b", "for(int v: b) System.out.printf(\"%d\\n\", v + 1);", "int v", "b", "System.out.printf(\"%d\\n\", v + 1);", "System.out.printf(\"%d\\n\", v + 1)", "System.out.printf", "System.out", "System", "System.out", "\"%d\\n\"", "v + 1", "v", "1", "String[] args", "args", "public static void swap(int a1, int a2, int[] b){\n int tmp = b[a1];\n b[a1] = b[a2];\n b[a2] = tmp;\n }", "swap", "{\n int tmp = b[a1];\n b[a1] = b[a2];\n b[a2] = tmp;\n }", "int tmp = b[a1];", "tmp", "b[a1]", "b", "a1", "b[a1] = b[a2]", "b[a1]", "b", "a1", "b[a2]", "b", "a2", "b[a2] = tmp", "b[a2]", "b", "a2", "tmp", "int a1", "a1", "int a2", "a2", "int[] b", "b", "public class Main{\n public static void main(String[] args){\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n int w, n;\n try{\n w = Integer.parseInt(reader.readLine());\n n = Integer.parseInt(reader.readLine());\n int[] b = new int[w];\n for(int i = 0; i < w; i++){b[i] = i;}\n for(int i = 0; i < n; i++){\n String a = reader.readLine();\n String[] s = a.split(\",\", 0);\n swap(Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1, b);\n }\n for(int v: b) System.out.printf(\"%d\\n\", v + 1);\n }catch(Exception e){}\n }\n\n public static void swap(int a1, int a2, int[] b){\n int tmp = b[a1];\n b[a1] = b[a2];\n b[a2] = tmp;\n }\n}", "public class Main{\n public static void main(String[] args){\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n int w, n;\n try{\n w = Integer.parseInt(reader.readLine());\n n = Integer.parseInt(reader.readLine());\n int[] b = new int[w];\n for(int i = 0; i < w; i++){b[i] = i;}\n for(int i = 0; i < n; i++){\n String a = reader.readLine();\n String[] s = a.split(\",\", 0);\n swap(Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1, b);\n }\n for(int v: b) System.out.printf(\"%d\\n\", v + 1);\n }catch(Exception e){}\n }\n\n public static void swap(int a1, int a2, int[] b){\n int tmp = b[a1];\n b[a1] = b[a2];\n b[a2] = tmp;\n }\n}", "Main" ]
import java.io.*; public class Main{ public static void main(String[] args){ BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int w, n; try{ w = Integer.parseInt(reader.readLine()); n = Integer.parseInt(reader.readLine()); int[] b = new int[w]; for(int i = 0; i < w; i++){b[i] = i;} for(int i = 0; i < n; i++){ String a = reader.readLine(); String[] s = a.split(",", 0); swap(Integer.parseInt(s[0]) - 1, Integer.parseInt(s[1]) - 1, b); } for(int v: b) System.out.printf("%d\n", v + 1); }catch(Exception e){} } public static void swap(int a1, int a2, int[] b){ int tmp = b[a1]; b[a1] = b[a2]; b[a2] = tmp; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 2, 13, 17, 41, 13, 20, 13, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 0, 18, 18, 13, 13, 13, 13, 0, 18, 18, 13, 13, 13, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 18, 18, 13, 13, 13, 17, 30, 0, 13, 18, 18, 13, 13, 13, 14, 2, 18, 18, 13, 13, 13, 17, 30, 0, 13, 18, 18, 13, 13, 13, 0, 18, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 12, 13, 30, 41, 13, 20, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 192, 5 ], [ 192, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 26, 27 ], [ 26, 28 ], [ 8, 29 ], [ 29, 30 ], [ 29, 31 ], [ 33, 34 ], [ 33, 35 ], [ 8, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 36, 41 ], [ 41, 42 ], [ 41, 43 ], [ 36, 44 ], [ 44, 45 ], [ 45, 46 ], [ 36, 47 ], [ 48, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 51, 56 ], [ 48, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 60, 61 ], [ 59, 62 ], [ 62, 63 ], [ 62, 64 ], [ 48, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 68, 69 ], [ 67, 70 ], [ 70, 71 ], [ 70, 72 ], [ 48, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 74, 78 ], [ 73, 79 ], [ 48, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 81, 85 ], [ 80, 86 ], [ 8, 87 ], [ 87, 88 ], [ 87, 89 ], [ 90, 91 ], [ 90, 92 ], [ 8, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 93, 98 ], [ 98, 99 ], [ 98, 100 ], [ 93, 101 ], [ 101, 102 ], [ 102, 103 ], [ 93, 104 ], [ 105, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 105, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 109, 114 ], [ 114, 115 ], [ 114, 116 ], [ 109, 117 ], [ 117, 118 ], [ 118, 119 ], [ 109, 120 ], [ 121, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 124, 128 ], [ 123, 129 ], [ 122, 130 ], [ 130, 131 ], [ 131, 132 ], [ 131, 133 ], [ 133, 134 ], [ 134, 135 ], [ 134, 136 ], [ 133, 137 ], [ 122, 138 ], [ 138, 139 ], [ 139, 140 ], [ 140, 141 ], [ 141, 142 ], [ 141, 143 ], [ 140, 144 ], [ 139, 145 ], [ 138, 146 ], [ 146, 147 ], [ 147, 148 ], [ 147, 149 ], [ 149, 150 ], [ 150, 151 ], [ 150, 152 ], [ 149, 153 ], [ 105, 154 ], [ 154, 155 ], [ 155, 156 ], [ 155, 157 ], [ 154, 158 ], [ 8, 159 ], [ 159, 160 ], [ 160, 161 ], [ 161, 162 ], [ 161, 163 ], [ 159, 164 ], [ 164, 165 ], [ 164, 166 ], [ 159, 167 ], [ 167, 168 ], [ 168, 169 ], [ 159, 170 ], [ 171, 171 ], [ 171, 172 ], [ 172, 173 ], [ 173, 174 ], [ 174, 175 ], [ 174, 176 ], [ 172, 177 ], [ 177, 178 ], [ 177, 179 ], [ 192, 180 ], [ 180, 181 ], [ 180, 182 ], [ 182, 183 ], [ 183, 184 ], [ 183, 185 ], [ 182, 186 ], [ 186, 187 ], [ 187, 188 ], [ 180, 189 ], [ 189, 190 ], [ 0, 191 ], [ 191, 192 ], [ 191, 193 ] ]
[ "import java.util.*;\npublic class Main {\n\n\tpublic void doIt(){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint [][] list1 = new int[n][w+1];\n\t\tint [][] list2 = new int[n][w+1];\n\t\tfor(int i=0; i < n; i++){\n\t\t\tString [] input = sc.next().split(\",\");\n\t\t\tint input0 = Integer.parseInt(input[0]);\n\t\t\tint input1 = Integer.parseInt(input[1]);\n\t\t\tlist1[i][input0] = input1;\n\t\t\tlist2[i][input1] = input0;\n\t\t}\n\t\tint [] ans = new int[w+1];\n\t\tfor(int i=1; i <= w; i++){\n\t\t\tint patt = i;\n\t\t\tfor(int j=0; j < n; j++){\n\t\t\t\tif(list1[j][patt] != 0){\n\t\t\t\t\tpatt = list1[j][patt];\n\t\t\t\t}\n\t\t\t\telse if(list2[j][patt] != 0){\n\t\t\t\t\tpatt = list2[j][patt];\n\t\t\t\t}\n\t\t\t}\n\t\t\tans[patt] = i;\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\tpublic static void main(String[] args) {\n\t\tMain obj = new Main();\n\t\tobj.doIt();\n\t}\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\n\tpublic void doIt(){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint [][] list1 = new int[n][w+1];\n\t\tint [][] list2 = new int[n][w+1];\n\t\tfor(int i=0; i < n; i++){\n\t\t\tString [] input = sc.next().split(\",\");\n\t\t\tint input0 = Integer.parseInt(input[0]);\n\t\t\tint input1 = Integer.parseInt(input[1]);\n\t\t\tlist1[i][input0] = input1;\n\t\t\tlist2[i][input1] = input0;\n\t\t}\n\t\tint [] ans = new int[w+1];\n\t\tfor(int i=1; i <= w; i++){\n\t\t\tint patt = i;\n\t\t\tfor(int j=0; j < n; j++){\n\t\t\t\tif(list1[j][patt] != 0){\n\t\t\t\t\tpatt = list1[j][patt];\n\t\t\t\t}\n\t\t\t\telse if(list2[j][patt] != 0){\n\t\t\t\t\tpatt = list2[j][patt];\n\t\t\t\t}\n\t\t\t}\n\t\t\tans[patt] = i;\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\tpublic static void main(String[] args) {\n\t\tMain obj = new Main();\n\t\tobj.doIt();\n\t}\n}", "Main", "public void doIt(){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint [][] list1 = new int[n][w+1];\n\t\tint [][] list2 = new int[n][w+1];\n\t\tfor(int i=0; i < n; i++){\n\t\t\tString [] input = sc.next().split(\",\");\n\t\t\tint input0 = Integer.parseInt(input[0]);\n\t\t\tint input1 = Integer.parseInt(input[1]);\n\t\t\tlist1[i][input0] = input1;\n\t\t\tlist2[i][input1] = input0;\n\t\t}\n\t\tint [] ans = new int[w+1];\n\t\tfor(int i=1; i <= w; i++){\n\t\t\tint patt = i;\n\t\t\tfor(int j=0; j < n; j++){\n\t\t\t\tif(list1[j][patt] != 0){\n\t\t\t\t\tpatt = list1[j][patt];\n\t\t\t\t}\n\t\t\t\telse if(list2[j][patt] != 0){\n\t\t\t\t\tpatt = list2[j][patt];\n\t\t\t\t}\n\t\t\t}\n\t\t\tans[patt] = i;\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}", "doIt", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint [][] list1 = new int[n][w+1];\n\t\tint [][] list2 = new int[n][w+1];\n\t\tfor(int i=0; i < n; i++){\n\t\t\tString [] input = sc.next().split(\",\");\n\t\t\tint input0 = Integer.parseInt(input[0]);\n\t\t\tint input1 = Integer.parseInt(input[1]);\n\t\t\tlist1[i][input0] = input1;\n\t\t\tlist2[i][input1] = input0;\n\t\t}\n\t\tint [] ans = new int[w+1];\n\t\tfor(int i=1; i <= w; i++){\n\t\t\tint patt = i;\n\t\t\tfor(int j=0; j < n; j++){\n\t\t\t\tif(list1[j][patt] != 0){\n\t\t\t\t\tpatt = list1[j][patt];\n\t\t\t\t}\n\t\t\t\telse if(list2[j][patt] != 0){\n\t\t\t\t\tpatt = list2[j][patt];\n\t\t\t\t}\n\t\t\t}\n\t\t\tans[patt] = i;\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 = sc.nextInt();", "w", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int [][] list1 = new int[n][w+1];", "list1", "new int[n][w+1]", "n", "w+1", "w", "1", "int [][] list2 = new int[n][w+1];", "list2", "new int[n][w+1]", "n", "w+1", "w", "1", "for(int i=0; i < n; i++){\n\t\t\tString [] input = sc.next().split(\",\");\n\t\t\tint input0 = Integer.parseInt(input[0]);\n\t\t\tint input1 = Integer.parseInt(input[1]);\n\t\t\tlist1[i][input0] = input1;\n\t\t\tlist2[i][input1] = input0;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tString [] input = sc.next().split(\",\");\n\t\t\tint input0 = Integer.parseInt(input[0]);\n\t\t\tint input1 = Integer.parseInt(input[1]);\n\t\t\tlist1[i][input0] = input1;\n\t\t\tlist2[i][input1] = input0;\n\t\t}", "{\n\t\t\tString [] input = sc.next().split(\",\");\n\t\t\tint input0 = Integer.parseInt(input[0]);\n\t\t\tint input1 = Integer.parseInt(input[1]);\n\t\t\tlist1[i][input0] = input1;\n\t\t\tlist2[i][input1] = input0;\n\t\t}", "String [] input = sc.next().split(\",\");", "input", "sc.next().split(\",\")", "sc.next().split", "sc.next()", "sc.next", "sc", "\",\"", "int input0 = Integer.parseInt(input[0]);", "input0", "Integer.parseInt(input[0])", "Integer.parseInt", "Integer", "input[0]", "input", "0", "int input1 = Integer.parseInt(input[1]);", "input1", "Integer.parseInt(input[1])", "Integer.parseInt", "Integer", "input[1]", "input", "1", "list1[i][input0] = input1", "list1[i][input0]", "list1[i]", "list1", "i", "input0", "input1", "list2[i][input1] = input0", "list2[i][input1]", "list2[i]", "list2", "i", "input1", "input0", "int [] ans = new int[w+1];", "ans", "new int[w+1]", "w+1", "w", "1", "for(int i=1; i <= w; i++){\n\t\t\tint patt = i;\n\t\t\tfor(int j=0; j < n; j++){\n\t\t\t\tif(list1[j][patt] != 0){\n\t\t\t\t\tpatt = list1[j][patt];\n\t\t\t\t}\n\t\t\t\telse if(list2[j][patt] != 0){\n\t\t\t\t\tpatt = list2[j][patt];\n\t\t\t\t}\n\t\t\t}\n\t\t\tans[patt] = i;\n\t\t}", "int i=1;", "int i=1;", "i", "1", "i <= w", "i", "w", "i++", "i++", "i", "{\n\t\t\tint patt = i;\n\t\t\tfor(int j=0; j < n; j++){\n\t\t\t\tif(list1[j][patt] != 0){\n\t\t\t\t\tpatt = list1[j][patt];\n\t\t\t\t}\n\t\t\t\telse if(list2[j][patt] != 0){\n\t\t\t\t\tpatt = list2[j][patt];\n\t\t\t\t}\n\t\t\t}\n\t\t\tans[patt] = i;\n\t\t}", "{\n\t\t\tint patt = i;\n\t\t\tfor(int j=0; j < n; j++){\n\t\t\t\tif(list1[j][patt] != 0){\n\t\t\t\t\tpatt = list1[j][patt];\n\t\t\t\t}\n\t\t\t\telse if(list2[j][patt] != 0){\n\t\t\t\t\tpatt = list2[j][patt];\n\t\t\t\t}\n\t\t\t}\n\t\t\tans[patt] = i;\n\t\t}", "int patt = i;", "patt", "i", "for(int j=0; j < n; j++){\n\t\t\t\tif(list1[j][patt] != 0){\n\t\t\t\t\tpatt = list1[j][patt];\n\t\t\t\t}\n\t\t\t\telse if(list2[j][patt] != 0){\n\t\t\t\t\tpatt = list2[j][patt];\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(list1[j][patt] != 0){\n\t\t\t\t\tpatt = list1[j][patt];\n\t\t\t\t}\n\t\t\t\telse if(list2[j][patt] != 0){\n\t\t\t\t\tpatt = list2[j][patt];\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tif(list1[j][patt] != 0){\n\t\t\t\t\tpatt = list1[j][patt];\n\t\t\t\t}\n\t\t\t\telse if(list2[j][patt] != 0){\n\t\t\t\t\tpatt = list2[j][patt];\n\t\t\t\t}\n\t\t\t}", "if(list1[j][patt] != 0){\n\t\t\t\t\tpatt = list1[j][patt];\n\t\t\t\t}\n\t\t\t\telse if(list2[j][patt] != 0){\n\t\t\t\t\tpatt = list2[j][patt];\n\t\t\t\t}", "list1[j][patt] != 0", "list1[j][patt]", "list1[j]", "list1", "j", "patt", "0", "{\n\t\t\t\t\tpatt = list1[j][patt];\n\t\t\t\t}", "patt = list1[j][patt]", "patt", "list1[j][patt]", "list1[j]", "list1", "j", "patt", "if(list2[j][patt] != 0){\n\t\t\t\t\tpatt = list2[j][patt];\n\t\t\t\t}", "list2[j][patt] != 0", "list2[j][patt]", "list2[j]", "list2", "j", "patt", "0", "{\n\t\t\t\t\tpatt = list2[j][patt];\n\t\t\t\t}", "patt = list2[j][patt]", "patt", "list2[j][patt]", "list2[j]", "list2", "j", "patt", "ans[patt] = i", "ans[patt]", "ans", "patt", "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", "public static void main(String[] args) {\n\t\tMain obj = new Main();\n\t\tobj.doIt();\n\t}", "main", "{\n\t\tMain obj = new Main();\n\t\tobj.doIt();\n\t}", "Main obj = new Main();", "obj", "new Main()", "obj.doIt()", "obj.doIt", "obj", "String[] args", "args", "public class Main {\n\n\tpublic void doIt(){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint [][] list1 = new int[n][w+1];\n\t\tint [][] list2 = new int[n][w+1];\n\t\tfor(int i=0; i < n; i++){\n\t\t\tString [] input = sc.next().split(\",\");\n\t\t\tint input0 = Integer.parseInt(input[0]);\n\t\t\tint input1 = Integer.parseInt(input[1]);\n\t\t\tlist1[i][input0] = input1;\n\t\t\tlist2[i][input1] = input0;\n\t\t}\n\t\tint [] ans = new int[w+1];\n\t\tfor(int i=1; i <= w; i++){\n\t\t\tint patt = i;\n\t\t\tfor(int j=0; j < n; j++){\n\t\t\t\tif(list1[j][patt] != 0){\n\t\t\t\t\tpatt = list1[j][patt];\n\t\t\t\t}\n\t\t\t\telse if(list2[j][patt] != 0){\n\t\t\t\t\tpatt = list2[j][patt];\n\t\t\t\t}\n\t\t\t}\n\t\t\tans[patt] = i;\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\tpublic static void main(String[] args) {\n\t\tMain obj = new Main();\n\t\tobj.doIt();\n\t}\n}", "public class Main {\n\n\tpublic void doIt(){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint [][] list1 = new int[n][w+1];\n\t\tint [][] list2 = new int[n][w+1];\n\t\tfor(int i=0; i < n; i++){\n\t\t\tString [] input = sc.next().split(\",\");\n\t\t\tint input0 = Integer.parseInt(input[0]);\n\t\t\tint input1 = Integer.parseInt(input[1]);\n\t\t\tlist1[i][input0] = input1;\n\t\t\tlist2[i][input1] = input0;\n\t\t}\n\t\tint [] ans = new int[w+1];\n\t\tfor(int i=1; i <= w; i++){\n\t\t\tint patt = i;\n\t\t\tfor(int j=0; j < n; j++){\n\t\t\t\tif(list1[j][patt] != 0){\n\t\t\t\t\tpatt = list1[j][patt];\n\t\t\t\t}\n\t\t\t\telse if(list2[j][patt] != 0){\n\t\t\t\t\tpatt = list2[j][patt];\n\t\t\t\t}\n\t\t\t}\n\t\t\tans[patt] = i;\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\tpublic static void main(String[] args) {\n\t\tMain obj = new Main();\n\t\tobj.doIt();\n\t}\n}", "Main" ]
import java.util.*; public class Main { public void doIt(){ Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int n = sc.nextInt(); int [][] list1 = new int[n][w+1]; int [][] list2 = new int[n][w+1]; for(int i=0; i < n; i++){ String [] input = sc.next().split(","); int input0 = Integer.parseInt(input[0]); int input1 = Integer.parseInt(input[1]); list1[i][input0] = input1; list2[i][input1] = input0; } int [] ans = new int[w+1]; for(int i=1; i <= w; i++){ int patt = i; for(int j=0; j < n; j++){ if(list1[j][patt] != 0){ patt = list1[j][patt]; } else if(list2[j][patt] != 0){ patt = list2[j][patt]; } } ans[patt] = i; } for(int i=1; i <= w; i++){ System.out.println(ans[i]); } } public static void main(String[] args) { Main obj = new Main(); obj.doIt(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 18, 13, 2, 13, 17, 0, 18, 13, 2, 13, 17, 18, 13, 2, 13, 17, 0, 18, 13, 2, 13, 17, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 20, 13, 17, 41, 13, 20, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 18, 13, 13, 17, 0, 18, 18, 13, 13, 17, 4, 18, 13, 18, 18, 13, 13, 17, 0, 18, 18, 13, 13, 17, 4, 18, 13, 18, 18, 13, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 13, 13, 18, 18, 13, 13, 17, 18, 18, 13, 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 ], [ 215, 5 ], [ 215, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 11, 13 ], [ 13, 14 ], [ 13, 15 ], [ 8, 16 ], [ 16, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 19, 21 ], [ 16, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 24, 26 ], [ 8, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 30, 32 ], [ 27, 33 ], [ 6, 34 ], [ 34, 35 ], [ 6, 36 ], [ 36, 37 ], [ 6, 38 ], [ 38, 39 ], [ 215, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 42, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 49, 50 ], [ 42, 51 ], [ 51, 52 ], [ 51, 53 ], [ 42, 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 ], [ 69, 70 ], [ 69, 71 ], [ 68, 72 ], [ 72, 73 ], [ 72, 74 ], [ 42, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 78, 79 ], [ 42, 80 ], [ 80, 81 ], [ 80, 82 ], [ 42, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 84, 89 ], [ 89, 90 ], [ 89, 91 ], [ 84, 92 ], [ 92, 93 ], [ 93, 94 ], [ 84, 95 ], [ 96, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 97, 101 ], [ 101, 102 ], [ 102, 103 ], [ 42, 104 ], [ 104, 105 ], [ 104, 106 ], [ 42, 109 ], [ 109, 110 ], [ 109, 111 ], [ 42, 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 ], [ 128, 130 ], [ 127, 131 ], [ 131, 132 ], [ 132, 133 ], [ 133, 134 ], [ 133, 135 ], [ 131, 136 ], [ 126, 137 ], [ 137, 138 ], [ 138, 139 ], [ 139, 140 ], [ 139, 141 ], [ 138, 142 ], [ 137, 143 ], [ 143, 144 ], [ 144, 145 ], [ 143, 146 ], [ 146, 147 ], [ 147, 148 ], [ 147, 149 ], [ 146, 150 ], [ 126, 151 ], [ 151, 152 ], [ 152, 153 ], [ 153, 154 ], [ 153, 155 ], [ 152, 156 ], [ 151, 157 ], [ 157, 158 ], [ 158, 159 ], [ 157, 160 ], [ 160, 161 ], [ 161, 162 ], [ 161, 163 ], [ 160, 164 ], [ 42, 165 ], [ 165, 166 ], [ 166, 167 ], [ 167, 168 ], [ 167, 169 ], [ 165, 170 ], [ 170, 171 ], [ 170, 172 ], [ 165, 173 ], [ 173, 174 ], [ 174, 175 ], [ 165, 176 ], [ 177, 177 ], [ 177, 178 ], [ 178, 179 ], [ 178, 180 ], [ 178, 181 ], [ 181, 182 ], [ 182, 183 ], [ 182, 184 ], [ 181, 185 ], [ 178, 186 ], [ 186, 187 ], [ 187, 188 ], [ 187, 189 ], [ 186, 190 ], [ 42, 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 ], [ 204, 209 ], [ 209, 210 ], [ 209, 211 ], [ 40, 212 ], [ 212, 213 ], [ 0, 214 ], [ 214, 215 ], [ 214, 216 ] ]
[ "import java.util.Scanner;\n\npublic class Main{\n\tpublic static void swap(int[] m, int x, int y){\n\t\tint temp = m[x-1];\n\t\tm[x-1] = m[y-1];\n\t\tm[y-1] = temp;\n\t}\n\t\t\n\tpublic static void main(String[] args){\n\t\tScanner stdIn = new Scanner(System.in);\n\t\t\n\t\tint w = stdIn.nextInt();\n\t\tint[] m = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tm[i] = i+1;\n\t\t}\n\t\tint n = stdIn.nextInt();\n\t\tString[] str = new String[n];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tstr[i] = stdIn.next();\n\t\t}\n\t\tString[][] s = new String[n][2];\n\t\tint[][] line = new int[n][2];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\ts[i] = str[i].split(\",\");\n\t\t\tline[i][0] = Integer.parseInt(s[i][0]);\n\t\t\tline[i][1] = Integer.parseInt(s[i][1]);\n\t\t}\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tswap(m,line[i][0],line[i][1]);\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(m[i]);\n\t\t}\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n\tpublic static void swap(int[] m, int x, int y){\n\t\tint temp = m[x-1];\n\t\tm[x-1] = m[y-1];\n\t\tm[y-1] = temp;\n\t}\n\t\t\n\tpublic static void main(String[] args){\n\t\tScanner stdIn = new Scanner(System.in);\n\t\t\n\t\tint w = stdIn.nextInt();\n\t\tint[] m = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tm[i] = i+1;\n\t\t}\n\t\tint n = stdIn.nextInt();\n\t\tString[] str = new String[n];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tstr[i] = stdIn.next();\n\t\t}\n\t\tString[][] s = new String[n][2];\n\t\tint[][] line = new int[n][2];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\ts[i] = str[i].split(\",\");\n\t\t\tline[i][0] = Integer.parseInt(s[i][0]);\n\t\t\tline[i][1] = Integer.parseInt(s[i][1]);\n\t\t}\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tswap(m,line[i][0],line[i][1]);\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(m[i]);\n\t\t}\n\t}\n}", "Main", "public static void swap(int[] m, int x, int y){\n\t\tint temp = m[x-1];\n\t\tm[x-1] = m[y-1];\n\t\tm[y-1] = temp;\n\t}", "swap", "{\n\t\tint temp = m[x-1];\n\t\tm[x-1] = m[y-1];\n\t\tm[y-1] = temp;\n\t}", "int temp = m[x-1];", "temp", "m[x-1]", "m", "x-1", "x", "1", "m[x-1] = m[y-1]", "m[x-1]", "m", "x-1", "x", "1", "m[y-1]", "m", "y-1", "y", "1", "m[y-1] = temp", "m[y-1]", "m", "y-1", "y", "1", "temp", "int[] m", "m", "int x", "x", "int y", "y", "public static void main(String[] args){\n\t\tScanner stdIn = new Scanner(System.in);\n\t\t\n\t\tint w = stdIn.nextInt();\n\t\tint[] m = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tm[i] = i+1;\n\t\t}\n\t\tint n = stdIn.nextInt();\n\t\tString[] str = new String[n];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tstr[i] = stdIn.next();\n\t\t}\n\t\tString[][] s = new String[n][2];\n\t\tint[][] line = new int[n][2];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\ts[i] = str[i].split(\",\");\n\t\t\tline[i][0] = Integer.parseInt(s[i][0]);\n\t\t\tline[i][1] = Integer.parseInt(s[i][1]);\n\t\t}\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tswap(m,line[i][0],line[i][1]);\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(m[i]);\n\t\t}\n\t}", "main", "{\n\t\tScanner stdIn = new Scanner(System.in);\n\t\t\n\t\tint w = stdIn.nextInt();\n\t\tint[] m = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tm[i] = i+1;\n\t\t}\n\t\tint n = stdIn.nextInt();\n\t\tString[] str = new String[n];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tstr[i] = stdIn.next();\n\t\t}\n\t\tString[][] s = new String[n][2];\n\t\tint[][] line = new int[n][2];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\ts[i] = str[i].split(\",\");\n\t\t\tline[i][0] = Integer.parseInt(s[i][0]);\n\t\t\tline[i][1] = Integer.parseInt(s[i][1]);\n\t\t}\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tswap(m,line[i][0],line[i][1]);\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(m[i]);\n\t\t}\n\t}", "Scanner stdIn = new Scanner(System.in);", "stdIn", "new Scanner(System.in)", "int w = stdIn.nextInt();", "w", "stdIn.nextInt()", "stdIn.nextInt", "stdIn", "int[] m = new int[w];", "m", "new int[w]", "w", "for(int i = 0; i < w; i++){\n\t\t\tm[i] = i+1;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < w", "i", "w", "i++", "i++", "i", "{\n\t\t\tm[i] = i+1;\n\t\t}", "{\n\t\t\tm[i] = i+1;\n\t\t}", "m[i] = i+1", "m[i]", "m", "i", "i+1", "i", "1", "int n = stdIn.nextInt();", "n", "stdIn.nextInt()", "stdIn.nextInt", "stdIn", "String[] str = new String[n];", "str", "new String[n]", "n", "for(int i = 0; i < n; i++){\n\t\t\tstr[i] = stdIn.next();\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tstr[i] = stdIn.next();\n\t\t}", "{\n\t\t\tstr[i] = stdIn.next();\n\t\t}", "str[i] = stdIn.next()", "str[i]", "str", "i", "stdIn.next()", "stdIn.next", "stdIn", "String[][] s = new String[n][2];", "s", "new String[n][2]", "n", "2", "int[][] line = new int[n][2];", "line", "new int[n][2]", "n", "2", "for(int i = 0; i < n; i++){\n\t\t\ts[i] = str[i].split(\",\");\n\t\t\tline[i][0] = Integer.parseInt(s[i][0]);\n\t\t\tline[i][1] = Integer.parseInt(s[i][1]);\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\ts[i] = str[i].split(\",\");\n\t\t\tline[i][0] = Integer.parseInt(s[i][0]);\n\t\t\tline[i][1] = Integer.parseInt(s[i][1]);\n\t\t}", "{\n\t\t\ts[i] = str[i].split(\",\");\n\t\t\tline[i][0] = Integer.parseInt(s[i][0]);\n\t\t\tline[i][1] = Integer.parseInt(s[i][1]);\n\t\t}", "s[i] = str[i].split(\",\")", "s[i]", "s", "i", "str[i].split(\",\")", "str[i].split", "str[i]", "str", "i", "\",\"", "line[i][0] = Integer.parseInt(s[i][0])", "line[i][0]", "line[i]", "line", "i", "0", "Integer.parseInt(s[i][0])", "Integer.parseInt", "Integer", "s[i][0]", "s[i]", "s", "i", "0", "line[i][1] = Integer.parseInt(s[i][1])", "line[i][1]", "line[i]", "line", "i", "1", "Integer.parseInt(s[i][1])", "Integer.parseInt", "Integer", "s[i][1]", "s[i]", "s", "i", "1", "for(int i = 0; i < n; i++){\n\t\t\tswap(m,line[i][0],line[i][1]);\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tswap(m,line[i][0],line[i][1]);\n\t\t}", "{\n\t\t\tswap(m,line[i][0],line[i][1]);\n\t\t}", "swap(m,line[i][0],line[i][1])", "swap", "m", "line[i][0]", "line[i]", "line", "i", "0", "line[i][1]", "line[i]", "line", "i", "1", "for(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(m[i]);\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < w", "i", "w", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(m[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(m[i]);\n\t\t}", "System.out.println(m[i])", "System.out.println", "System.out", "System", "System.out", "m[i]", "m", "i", "String[] args", "args", "public class Main{\n\tpublic static void swap(int[] m, int x, int y){\n\t\tint temp = m[x-1];\n\t\tm[x-1] = m[y-1];\n\t\tm[y-1] = temp;\n\t}\n\t\t\n\tpublic static void main(String[] args){\n\t\tScanner stdIn = new Scanner(System.in);\n\t\t\n\t\tint w = stdIn.nextInt();\n\t\tint[] m = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tm[i] = i+1;\n\t\t}\n\t\tint n = stdIn.nextInt();\n\t\tString[] str = new String[n];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tstr[i] = stdIn.next();\n\t\t}\n\t\tString[][] s = new String[n][2];\n\t\tint[][] line = new int[n][2];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\ts[i] = str[i].split(\",\");\n\t\t\tline[i][0] = Integer.parseInt(s[i][0]);\n\t\t\tline[i][1] = Integer.parseInt(s[i][1]);\n\t\t}\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tswap(m,line[i][0],line[i][1]);\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(m[i]);\n\t\t}\n\t}\n}", "public class Main{\n\tpublic static void swap(int[] m, int x, int y){\n\t\tint temp = m[x-1];\n\t\tm[x-1] = m[y-1];\n\t\tm[y-1] = temp;\n\t}\n\t\t\n\tpublic static void main(String[] args){\n\t\tScanner stdIn = new Scanner(System.in);\n\t\t\n\t\tint w = stdIn.nextInt();\n\t\tint[] m = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tm[i] = i+1;\n\t\t}\n\t\tint n = stdIn.nextInt();\n\t\tString[] str = new String[n];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tstr[i] = stdIn.next();\n\t\t}\n\t\tString[][] s = new String[n][2];\n\t\tint[][] line = new int[n][2];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\ts[i] = str[i].split(\",\");\n\t\t\tline[i][0] = Integer.parseInt(s[i][0]);\n\t\t\tline[i][1] = Integer.parseInt(s[i][1]);\n\t\t}\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tswap(m,line[i][0],line[i][1]);\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(m[i]);\n\t\t}\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void swap(int[] m, int x, int y){ int temp = m[x-1]; m[x-1] = m[y-1]; m[y-1] = temp; } public static void main(String[] args){ Scanner stdIn = new Scanner(System.in); int w = stdIn.nextInt(); int[] m = new int[w]; for(int i = 0; i < w; i++){ m[i] = i+1; } int n = stdIn.nextInt(); String[] str = new String[n]; for(int i = 0; i < n; i++){ str[i] = stdIn.next(); } String[][] s = new String[n][2]; int[][] line = new int[n][2]; for(int i = 0; i < n; i++){ s[i] = str[i].split(","); line[i][0] = Integer.parseInt(s[i][0]); line[i][1] = Integer.parseInt(s[i][1]); } for(int i = 0; i < n; i++){ swap(m,line[i][0],line[i][1]); } for(int i = 0; i < w; i++){ System.out.println(m[i]); } } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 4, 18, 20, 23, 13, 12, 13, 30, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 2, 13, 17, 41, 13, 17, 42, 2, 13, 13, 30, 41, 13, 4, 18, 13, 41, 13, 17, 42, 40, 4, 18, 4, 18, 13, 13, 2, 13, 17, 17, 40, 13, 41, 13, 4, 18, 13, 4, 18, 13, 17, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 17, 4, 18, 13, 0, 18, 18, 13, 13, 13, 13, 0, 18, 18, 13, 13, 13, 13, 40, 13, 0, 13, 17, 41, 13, 20, 13, 42, 2, 13, 13, 30, 0, 18, 13, 2, 4, 13, 13, 13, 13, 17, 13, 40, 13, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 4, 18, 18, 13, 13, 18, 13, 13, 12, 13, 30, 41, 13, 17, 42, 2, 13, 13, 30, 14, 2, 18, 18, 13, 13, 13, 17, 0, 13, 18, 18, 13, 13, 13, 40, 13, 29, 13, 23, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 196, 5 ], [ 196, 6 ], [ 6, 7 ], [ 6, 8 ], [ 196, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 13, 14 ], [ 9, 15 ], [ 15, 16 ], [ 196, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 20, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 24, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 33, 34 ], [ 24, 35 ], [ 35, 36 ], [ 35, 37 ], [ 38, 39 ], [ 38, 40 ], [ 41, 42 ], [ 41, 43 ], [ 24, 44 ], [ 44, 45 ], [ 44, 46 ], [ 24, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 47, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 55, 56 ], [ 51, 57 ], [ 57, 58 ], [ 57, 59 ], [ 51, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 64, 67 ], [ 64, 68 ], [ 68, 69 ], [ 68, 70 ], [ 62, 71 ], [ 60, 72 ], [ 72, 73 ], [ 51, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 76, 79 ], [ 79, 80 ], [ 80, 81 ], [ 79, 82 ], [ 79, 83 ], [ 51, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 87, 88 ], [ 86, 89 ], [ 89, 90 ], [ 90, 91 ], [ 89, 92 ], [ 92, 93 ], [ 92, 94 ], [ 89, 95 ], [ 95, 96 ], [ 96, 97 ], [ 51, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 99, 103 ], [ 98, 104 ], [ 51, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 106, 110 ], [ 105, 111 ], [ 51, 112 ], [ 112, 113 ], [ 24, 114 ], [ 114, 115 ], [ 114, 116 ], [ 24, 117 ], [ 117, 118 ], [ 117, 119 ], [ 24, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 121, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 129, 130 ], [ 130, 131 ], [ 130, 132 ], [ 130, 133 ], [ 130, 134 ], [ 129, 135 ], [ 126, 136 ], [ 125, 137 ], [ 137, 138 ], [ 24, 139 ], [ 139, 140 ], [ 140, 141 ], [ 141, 142 ], [ 141, 143 ], [ 139, 144 ], [ 144, 145 ], [ 144, 146 ], [ 139, 147 ], [ 147, 148 ], [ 148, 149 ], [ 139, 150 ], [ 150, 151 ], [ 151, 152 ], [ 152, 153 ], [ 153, 154 ], [ 153, 155 ], [ 151, 156 ], [ 156, 157 ], [ 156, 158 ], [ 196, 159 ], [ 159, 160 ], [ 159, 161 ], [ 161, 162 ], [ 162, 163 ], [ 162, 164 ], [ 161, 165 ], [ 165, 166 ], [ 166, 167 ], [ 166, 168 ], [ 165, 169 ], [ 169, 170 ], [ 170, 171 ], [ 171, 172 ], [ 172, 173 ], [ 173, 174 ], [ 173, 175 ], [ 172, 176 ], [ 171, 177 ], [ 170, 178 ], [ 178, 179 ], [ 178, 180 ], [ 180, 181 ], [ 181, 182 ], [ 181, 183 ], [ 180, 184 ], [ 169, 185 ], [ 185, 186 ], [ 161, 187 ], [ 187, 188 ], [ 159, 189 ], [ 189, 190 ], [ 159, 191 ], [ 191, 192 ], [ 159, 193 ], [ 193, 194 ], [ 0, 195 ], [ 195, 196 ], [ 195, 197 ] ]
[ "import java.util.*;\npublic class Main{\n public static void main(String[] args){\n\tnew Main().run();\n }\n Scanner sc = new Scanner(System.in);\n\n void run(){\n\twhile(sc.hasNext()){\n\t int w = sc.nextInt();\n\t int n = sc.nextInt();\n\t int[][] lot = new int[n+1][w+1];\n\t int i=1;\n\t while(i<=n){\n\t\tString s = sc.next();\n\t\tint j=0;\n\t\twhile(!s.substring(j, j+1).equals(\",\")) j++;\n\t\tint a = Integer.parseInt(s.substring(0, j));\n\t\tint b = Integer.parseInt(s.substring(j+1, s.length()));\n\n\t\tlot[i][a] = b;\n\t\tlot[i][b] = a;\n\t\t\n\t\t//System.out.println(i+\" \"+lot[i][a]+\" \"+lot[i][b]);\n\t\ti++;\n\t }\n\n\t i=1;\n\t int[] ans = new int[w];\n\t while(i<=w){\n\t\tans[check(lot, i, n)-1] = i;\n\t\ti++;\n\t }\n\t for(i=0; i<w; i++)\n\t\tSystem.out.println(ans[i]);\n\t}\n }\n\n int check(int[][] lot, int i, int n){\n\tint k = 1;\n\twhile(k<=n){\n\t //System.out.println(\"*\"+i+\" \"+lot[k][i]);\n\t if(lot[k][i]!=0)\n\t\ti = lot[k][i];\n\t k++;\n\t}\n\t//System.out.println();\n\treturn i;\n }\n}", "import java.util.*;", "util.*", "java", "public class Main{\n public static void main(String[] args){\n\tnew Main().run();\n }\n Scanner sc = new Scanner(System.in);\n\n void run(){\n\twhile(sc.hasNext()){\n\t int w = sc.nextInt();\n\t int n = sc.nextInt();\n\t int[][] lot = new int[n+1][w+1];\n\t int i=1;\n\t while(i<=n){\n\t\tString s = sc.next();\n\t\tint j=0;\n\t\twhile(!s.substring(j, j+1).equals(\",\")) j++;\n\t\tint a = Integer.parseInt(s.substring(0, j));\n\t\tint b = Integer.parseInt(s.substring(j+1, s.length()));\n\n\t\tlot[i][a] = b;\n\t\tlot[i][b] = a;\n\t\t\n\t\t//System.out.println(i+\" \"+lot[i][a]+\" \"+lot[i][b]);\n\t\ti++;\n\t }\n\n\t i=1;\n\t int[] ans = new int[w];\n\t while(i<=w){\n\t\tans[check(lot, i, n)-1] = i;\n\t\ti++;\n\t }\n\t for(i=0; i<w; i++)\n\t\tSystem.out.println(ans[i]);\n\t}\n }\n\n int check(int[][] lot, int i, int n){\n\tint k = 1;\n\twhile(k<=n){\n\t //System.out.println(\"*\"+i+\" \"+lot[k][i]);\n\t if(lot[k][i]!=0)\n\t\ti = lot[k][i];\n\t k++;\n\t}\n\t//System.out.println();\n\treturn i;\n }\n}", "Main", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "public static void main(String[] args){\n\tnew Main().run();\n }", "main", "{\n\tnew Main().run();\n }", "new Main().run()", "new Main().run", "new Main()", "String[] args", "args", "void run(){\n\twhile(sc.hasNext()){\n\t int w = sc.nextInt();\n\t int n = sc.nextInt();\n\t int[][] lot = new int[n+1][w+1];\n\t int i=1;\n\t while(i<=n){\n\t\tString s = sc.next();\n\t\tint j=0;\n\t\twhile(!s.substring(j, j+1).equals(\",\")) j++;\n\t\tint a = Integer.parseInt(s.substring(0, j));\n\t\tint b = Integer.parseInt(s.substring(j+1, s.length()));\n\n\t\tlot[i][a] = b;\n\t\tlot[i][b] = a;\n\t\t\n\t\t//System.out.println(i+\" \"+lot[i][a]+\" \"+lot[i][b]);\n\t\ti++;\n\t }\n\n\t i=1;\n\t int[] ans = new int[w];\n\t while(i<=w){\n\t\tans[check(lot, i, n)-1] = i;\n\t\ti++;\n\t }\n\t for(i=0; i<w; i++)\n\t\tSystem.out.println(ans[i]);\n\t}\n }", "run", "{\n\twhile(sc.hasNext()){\n\t int w = sc.nextInt();\n\t int n = sc.nextInt();\n\t int[][] lot = new int[n+1][w+1];\n\t int i=1;\n\t while(i<=n){\n\t\tString s = sc.next();\n\t\tint j=0;\n\t\twhile(!s.substring(j, j+1).equals(\",\")) j++;\n\t\tint a = Integer.parseInt(s.substring(0, j));\n\t\tint b = Integer.parseInt(s.substring(j+1, s.length()));\n\n\t\tlot[i][a] = b;\n\t\tlot[i][b] = a;\n\t\t\n\t\t//System.out.println(i+\" \"+lot[i][a]+\" \"+lot[i][b]);\n\t\ti++;\n\t }\n\n\t i=1;\n\t int[] ans = new int[w];\n\t while(i<=w){\n\t\tans[check(lot, i, n)-1] = i;\n\t\ti++;\n\t }\n\t for(i=0; i<w; i++)\n\t\tSystem.out.println(ans[i]);\n\t}\n }", "while(sc.hasNext()){\n\t int w = sc.nextInt();\n\t int n = sc.nextInt();\n\t int[][] lot = new int[n+1][w+1];\n\t int i=1;\n\t while(i<=n){\n\t\tString s = sc.next();\n\t\tint j=0;\n\t\twhile(!s.substring(j, j+1).equals(\",\")) j++;\n\t\tint a = Integer.parseInt(s.substring(0, j));\n\t\tint b = Integer.parseInt(s.substring(j+1, s.length()));\n\n\t\tlot[i][a] = b;\n\t\tlot[i][b] = a;\n\t\t\n\t\t//System.out.println(i+\" \"+lot[i][a]+\" \"+lot[i][b]);\n\t\ti++;\n\t }\n\n\t i=1;\n\t int[] ans = new int[w];\n\t while(i<=w){\n\t\tans[check(lot, i, n)-1] = i;\n\t\ti++;\n\t }\n\t for(i=0; i<w; i++)\n\t\tSystem.out.println(ans[i]);\n\t}", "sc.hasNext()", "sc.hasNext", "sc", "{\n\t int w = sc.nextInt();\n\t int n = sc.nextInt();\n\t int[][] lot = new int[n+1][w+1];\n\t int i=1;\n\t while(i<=n){\n\t\tString s = sc.next();\n\t\tint j=0;\n\t\twhile(!s.substring(j, j+1).equals(\",\")) j++;\n\t\tint a = Integer.parseInt(s.substring(0, j));\n\t\tint b = Integer.parseInt(s.substring(j+1, s.length()));\n\n\t\tlot[i][a] = b;\n\t\tlot[i][b] = a;\n\t\t\n\t\t//System.out.println(i+\" \"+lot[i][a]+\" \"+lot[i][b]);\n\t\ti++;\n\t }\n\n\t i=1;\n\t int[] ans = new int[w];\n\t while(i<=w){\n\t\tans[check(lot, i, n)-1] = i;\n\t\ti++;\n\t }\n\t for(i=0; i<w; i++)\n\t\tSystem.out.println(ans[i]);\n\t}", "int w = sc.nextInt();", "w", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int[][] lot = new int[n+1][w+1];", "lot", "new int[n+1][w+1]", "n+1", "n", "1", "w+1", "w", "1", "int i=1;", "i", "1", "while(i<=n){\n\t\tString s = sc.next();\n\t\tint j=0;\n\t\twhile(!s.substring(j, j+1).equals(\",\")) j++;\n\t\tint a = Integer.parseInt(s.substring(0, j));\n\t\tint b = Integer.parseInt(s.substring(j+1, s.length()));\n\n\t\tlot[i][a] = b;\n\t\tlot[i][b] = a;\n\t\t\n\t\t//System.out.println(i+\" \"+lot[i][a]+\" \"+lot[i][b]);\n\t\ti++;\n\t }", "i<=n", "i", "n", "{\n\t\tString s = sc.next();\n\t\tint j=0;\n\t\twhile(!s.substring(j, j+1).equals(\",\")) j++;\n\t\tint a = Integer.parseInt(s.substring(0, j));\n\t\tint b = Integer.parseInt(s.substring(j+1, s.length()));\n\n\t\tlot[i][a] = b;\n\t\tlot[i][b] = a;\n\t\t\n\t\t//System.out.println(i+\" \"+lot[i][a]+\" \"+lot[i][b]);\n\t\ti++;\n\t }", "String s = sc.next();", "s", "sc.next()", "sc.next", "sc", "int j=0;", "j", "0", "while(!s.substring(j, j+1).equals(\",\")) j++;", "!s.substring(j, j+1).equals(\",\")", "s.substring(j, j+1).equals(\",\")", "s.substring(j, j+1).equals", "s.substring(j, j+1)", "s.substring", "s", "j", "j+1", "j", "1", "\",\"", "j++", "j", "int a = Integer.parseInt(s.substring(0, j));", "a", "Integer.parseInt(s.substring(0, j))", "Integer.parseInt", "Integer", "s.substring(0, j)", "s.substring", "s", "0", "j", "int b = Integer.parseInt(s.substring(j+1, s.length()));", "b", "Integer.parseInt(s.substring(j+1, s.length()))", "Integer.parseInt", "Integer", "s.substring(j+1, s.length())", "s.substring", "s", "j+1", "j", "1", "s.length()", "s.length", "s", "lot[i][a] = b", "lot[i][a]", "lot[i]", "lot", "i", "a", "b", "lot[i][b] = a", "lot[i][b]", "lot[i]", "lot", "i", "b", "a", "i++", "i", "i=1", "i", "1", "int[] ans = new int[w];", "ans", "new int[w]", "w", "while(i<=w){\n\t\tans[check(lot, i, n)-1] = i;\n\t\ti++;\n\t }", "i<=w", "i", "w", "{\n\t\tans[check(lot, i, n)-1] = i;\n\t\ti++;\n\t }", "ans[check(lot, i, n)-1] = i", "ans[check(lot, i, n)-1]", "ans", "check(lot, i, n)-1", "check(lot, i, n)", "check", "lot", "i", "n", "1", "i", "i++", "i", "for(i=0; i<w; i++)\n\t\tSystem.out.println(ans[i]);", "i=0;", "i=0", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "System.out.println(ans[i]);", "System.out.println(ans[i])", "System.out.println", "System.out", "System", "System.out", "ans[i]", "ans", "i", "int check(int[][] lot, int i, int n){\n\tint k = 1;\n\twhile(k<=n){\n\t //System.out.println(\"*\"+i+\" \"+lot[k][i]);\n\t if(lot[k][i]!=0)\n\t\ti = lot[k][i];\n\t k++;\n\t}\n\t//System.out.println();\n\treturn i;\n }", "check", "{\n\tint k = 1;\n\twhile(k<=n){\n\t //System.out.println(\"*\"+i+\" \"+lot[k][i]);\n\t if(lot[k][i]!=0)\n\t\ti = lot[k][i];\n\t k++;\n\t}\n\t//System.out.println();\n\treturn i;\n }", "int k = 1;", "k", "1", "while(k<=n){\n\t //System.out.println(\"*\"+i+\" \"+lot[k][i]);\n\t if(lot[k][i]!=0)\n\t\ti = lot[k][i];\n\t k++;\n\t}", "k<=n", "k", "n", "{\n\t //System.out.println(\"*\"+i+\" \"+lot[k][i]);\n\t if(lot[k][i]!=0)\n\t\ti = lot[k][i];\n\t k++;\n\t}", "if(lot[k][i]!=0)\n\t\ti = lot[k][i];", "lot[k][i]!=0", "lot[k][i]", "lot[k]", "lot", "k", "i", "0", "i = lot[k][i]", "i", "lot[k][i]", "lot[k]", "lot", "k", "i", "k++", "k", "return i;", "i", "int[][] lot", "lot", "int i", "i", "int n", "n", "public class Main{\n public static void main(String[] args){\n\tnew Main().run();\n }\n Scanner sc = new Scanner(System.in);\n\n void run(){\n\twhile(sc.hasNext()){\n\t int w = sc.nextInt();\n\t int n = sc.nextInt();\n\t int[][] lot = new int[n+1][w+1];\n\t int i=1;\n\t while(i<=n){\n\t\tString s = sc.next();\n\t\tint j=0;\n\t\twhile(!s.substring(j, j+1).equals(\",\")) j++;\n\t\tint a = Integer.parseInt(s.substring(0, j));\n\t\tint b = Integer.parseInt(s.substring(j+1, s.length()));\n\n\t\tlot[i][a] = b;\n\t\tlot[i][b] = a;\n\t\t\n\t\t//System.out.println(i+\" \"+lot[i][a]+\" \"+lot[i][b]);\n\t\ti++;\n\t }\n\n\t i=1;\n\t int[] ans = new int[w];\n\t while(i<=w){\n\t\tans[check(lot, i, n)-1] = i;\n\t\ti++;\n\t }\n\t for(i=0; i<w; i++)\n\t\tSystem.out.println(ans[i]);\n\t}\n }\n\n int check(int[][] lot, int i, int n){\n\tint k = 1;\n\twhile(k<=n){\n\t //System.out.println(\"*\"+i+\" \"+lot[k][i]);\n\t if(lot[k][i]!=0)\n\t\ti = lot[k][i];\n\t k++;\n\t}\n\t//System.out.println();\n\treturn i;\n }\n}", "public class Main{\n public static void main(String[] args){\n\tnew Main().run();\n }\n Scanner sc = new Scanner(System.in);\n\n void run(){\n\twhile(sc.hasNext()){\n\t int w = sc.nextInt();\n\t int n = sc.nextInt();\n\t int[][] lot = new int[n+1][w+1];\n\t int i=1;\n\t while(i<=n){\n\t\tString s = sc.next();\n\t\tint j=0;\n\t\twhile(!s.substring(j, j+1).equals(\",\")) j++;\n\t\tint a = Integer.parseInt(s.substring(0, j));\n\t\tint b = Integer.parseInt(s.substring(j+1, s.length()));\n\n\t\tlot[i][a] = b;\n\t\tlot[i][b] = a;\n\t\t\n\t\t//System.out.println(i+\" \"+lot[i][a]+\" \"+lot[i][b]);\n\t\ti++;\n\t }\n\n\t i=1;\n\t int[] ans = new int[w];\n\t while(i<=w){\n\t\tans[check(lot, i, n)-1] = i;\n\t\ti++;\n\t }\n\t for(i=0; i<w; i++)\n\t\tSystem.out.println(ans[i]);\n\t}\n }\n\n int check(int[][] lot, int i, int n){\n\tint k = 1;\n\twhile(k<=n){\n\t //System.out.println(\"*\"+i+\" \"+lot[k][i]);\n\t if(lot[k][i]!=0)\n\t\ti = lot[k][i];\n\t k++;\n\t}\n\t//System.out.println();\n\treturn i;\n }\n}", "Main" ]
import java.util.*; public class Main{ public static void main(String[] args){ new Main().run(); } Scanner sc = new Scanner(System.in); void run(){ while(sc.hasNext()){ int w = sc.nextInt(); int n = sc.nextInt(); int[][] lot = new int[n+1][w+1]; int i=1; while(i<=n){ String s = sc.next(); int j=0; while(!s.substring(j, j+1).equals(",")) j++; int a = Integer.parseInt(s.substring(0, j)); int b = Integer.parseInt(s.substring(j+1, s.length())); lot[i][a] = b; lot[i][b] = a; //System.out.println(i+" "+lot[i][a]+" "+lot[i][b]); i++; } i=1; int[] ans = new int[w]; while(i<=w){ ans[check(lot, i, n)-1] = i; i++; } for(i=0; i<w; i++) System.out.println(ans[i]); } } int check(int[][] lot, int i, int n){ int k = 1; while(k<=n){ //System.out.println("*"+i+" "+lot[k][i]); if(lot[k][i]!=0) i = lot[k][i]; k++; } //System.out.println(); return i; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 4, 13, 23, 13, 12, 13, 30, 41, 13, 20, 4, 18, 13, 17, 41, 13, 4, 18, 13, 41, 13, 4, 13, 13, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 41, 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, 0, 13, 18, 13, 2, 13, 17, 0, 18, 13, 2, 13, 17, 18, 13, 2, 13, 17, 0, 18, 13, 2, 13, 17, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 4, 18, 13, 29, 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, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 152, 5 ], [ 152, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 6, 11 ], [ 11, 12 ], [ 152, 13 ], [ 13, 14 ], [ 13, 15 ], [ 15, 16 ], [ 16, 17 ], [ 16, 18 ], [ 15, 19 ], [ 19, 20 ], [ 20, 21 ], [ 19, 22 ], [ 15, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 15, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 30, 32 ], [ 15, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 15, 38 ], [ 38, 39 ], [ 38, 40 ], [ 15, 41 ], [ 41, 42 ], [ 41, 43 ], [ 15, 44 ], [ 44, 45 ], [ 44, 46 ], [ 15, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 47, 52 ], [ 52, 53 ], [ 52, 54 ], [ 47, 55 ], [ 55, 56 ], [ 56, 57 ], [ 47, 58 ], [ 59, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 59, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 68, 69 ], [ 59, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 74, 76 ], [ 59, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 80, 82 ], [ 77, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 85, 87 ], [ 59, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 91, 93 ], [ 88, 94 ], [ 15, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 95, 100 ], [ 100, 101 ], [ 100, 102 ], [ 95, 103 ], [ 103, 104 ], [ 104, 105 ], [ 95, 106 ], [ 107, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 108, 113 ], [ 113, 114 ], [ 113, 115 ], [ 15, 116 ], [ 116, 117 ], [ 117, 118 ], [ 15, 119 ], [ 152, 120 ], [ 120, 121 ], [ 120, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 122, 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 ], [ 141, 143 ], [ 140, 144 ], [ 144, 145 ], [ 144, 146 ], [ 122, 147 ], [ 147, 148 ], [ 120, 149 ], [ 149, 150 ], [ 0, 151 ], [ 151, 152 ], [ 151, 153 ] ]
[ "import java.util.*;\n\npublic class Main{\n\n\tpublic static void main(String[] args) {\n\t\tscan();\n\t\t\n\t}\n\t//??\\????°???¨??¢??°\n\tpublic static void scan() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tscanner.useDelimiter(\"\\\\s*,\\\\s*|\\n\");\n\t\tint W = scanner.nextInt();\n\t\tint[] amida = Amida(W);\n\t\tint N = scanner.nextInt();\n\t\tint kari1 = 0;\n\t\tint kari2 = 0;\n\t\tint kari3 = 0;\n\t\tfor(int i = 0; i < N ; i++){\n\t\t\tkari1 = scanner.nextInt();\n\t\t\tkari2 = scanner.nextInt();\n\t\t\tkari3 = amida[kari1-1];\n\t\t\tamida[kari1-1] = amida[kari2-1];\n\t\t\tamida[kari2-1] = kari3;\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\tscanner.close();\n\t\treturn ;\n\t}\n\t\n\tpublic static int[] Amida(int W) {\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\t}\n\t\treturn amida;\n\t}\n\t\n\t\n}", "import java.util.*;", "util.*", "java", "public class Main{\n\n\tpublic static void main(String[] args) {\n\t\tscan();\n\t\t\n\t}\n\t//??\\????°???¨??¢??°\n\tpublic static void scan() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tscanner.useDelimiter(\"\\\\s*,\\\\s*|\\n\");\n\t\tint W = scanner.nextInt();\n\t\tint[] amida = Amida(W);\n\t\tint N = scanner.nextInt();\n\t\tint kari1 = 0;\n\t\tint kari2 = 0;\n\t\tint kari3 = 0;\n\t\tfor(int i = 0; i < N ; i++){\n\t\t\tkari1 = scanner.nextInt();\n\t\t\tkari2 = scanner.nextInt();\n\t\t\tkari3 = amida[kari1-1];\n\t\t\tamida[kari1-1] = amida[kari2-1];\n\t\t\tamida[kari2-1] = kari3;\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\tscanner.close();\n\t\treturn ;\n\t}\n\t\n\tpublic static int[] Amida(int W) {\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\t}\n\t\treturn amida;\n\t}\n\t\n\t\n}", "Main", "public static void main(String[] args) {\n\t\tscan();\n\t\t\n\t}", "main", "{\n\t\tscan();\n\t\t\n\t}", "scan()", "scan", "String[] args", "args", "//??\\????°???¨??¢??°\n\tpublic static void scan() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tscanner.useDelimiter(\"\\\\s*,\\\\s*|\\n\");\n\t\tint W = scanner.nextInt();\n\t\tint[] amida = Amida(W);\n\t\tint N = scanner.nextInt();\n\t\tint kari1 = 0;\n\t\tint kari2 = 0;\n\t\tint kari3 = 0;\n\t\tfor(int i = 0; i < N ; i++){\n\t\t\tkari1 = scanner.nextInt();\n\t\t\tkari2 = scanner.nextInt();\n\t\t\tkari3 = amida[kari1-1];\n\t\t\tamida[kari1-1] = amida[kari2-1];\n\t\t\tamida[kari2-1] = kari3;\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\tscanner.close();\n\t\treturn ;\n\t}", "scan", "{\n\t\tScanner scanner = new Scanner(System.in);\n\t\tscanner.useDelimiter(\"\\\\s*,\\\\s*|\\n\");\n\t\tint W = scanner.nextInt();\n\t\tint[] amida = Amida(W);\n\t\tint N = scanner.nextInt();\n\t\tint kari1 = 0;\n\t\tint kari2 = 0;\n\t\tint kari3 = 0;\n\t\tfor(int i = 0; i < N ; i++){\n\t\t\tkari1 = scanner.nextInt();\n\t\t\tkari2 = scanner.nextInt();\n\t\t\tkari3 = amida[kari1-1];\n\t\t\tamida[kari1-1] = amida[kari2-1];\n\t\t\tamida[kari2-1] = kari3;\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\tscanner.close();\n\t\treturn ;\n\t}", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "scanner.useDelimiter(\"\\\\s*,\\\\s*|\\n\")", "scanner.useDelimiter", "scanner", "\"\\\\s*,\\\\s*|\\n\"", "int W = scanner.nextInt();", "W", "scanner.nextInt()", "scanner.nextInt", "scanner", "int[] amida = Amida(W);", "amida", "Amida(W)", "Amida", "W", "int N = scanner.nextInt();", "N", "scanner.nextInt()", "scanner.nextInt", "scanner", "int kari1 = 0;", "kari1", "0", "int kari2 = 0;", "kari2", "0", "int kari3 = 0;", "kari3", "0", "for(int i = 0; i < N ; i++){\n\t\t\tkari1 = scanner.nextInt();\n\t\t\tkari2 = scanner.nextInt();\n\t\t\tkari3 = amida[kari1-1];\n\t\t\tamida[kari1-1] = amida[kari2-1];\n\t\t\tamida[kari2-1] = kari3;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < N", "i", "N", "i++", "i++", "i", "{\n\t\t\tkari1 = scanner.nextInt();\n\t\t\tkari2 = scanner.nextInt();\n\t\t\tkari3 = amida[kari1-1];\n\t\t\tamida[kari1-1] = amida[kari2-1];\n\t\t\tamida[kari2-1] = kari3;\n\t\t}", "{\n\t\t\tkari1 = scanner.nextInt();\n\t\t\tkari2 = scanner.nextInt();\n\t\t\tkari3 = amida[kari1-1];\n\t\t\tamida[kari1-1] = amida[kari2-1];\n\t\t\tamida[kari2-1] = kari3;\n\t\t}", "kari1 = scanner.nextInt()", "kari1", "scanner.nextInt()", "scanner.nextInt", "scanner", "kari2 = scanner.nextInt()", "kari2", "scanner.nextInt()", "scanner.nextInt", "scanner", "kari3 = amida[kari1-1]", "kari3", "amida[kari1-1]", "amida", "kari1-1", "kari1", "1", "amida[kari1-1] = amida[kari2-1]", "amida[kari1-1]", "amida", "kari1-1", "kari1", "1", "amida[kari2-1]", "amida", "kari2-1", "kari2", "1", "amida[kari2-1] = kari3", "amida[kari2-1]", "amida", "kari2-1", "kari2", "1", "kari3", "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", "scanner.close()", "scanner.close", "scanner", "return ;", "public static int[] Amida(int W) {\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\t}\n\t\treturn amida;\n\t}", "Amida", "{\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\t}\n\t\treturn amida;\n\t}", "int[] 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", "return amida;", "amida", "int W", "W", "public class Main{\n\n\tpublic static void main(String[] args) {\n\t\tscan();\n\t\t\n\t}\n\t//??\\????°???¨??¢??°\n\tpublic static void scan() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tscanner.useDelimiter(\"\\\\s*,\\\\s*|\\n\");\n\t\tint W = scanner.nextInt();\n\t\tint[] amida = Amida(W);\n\t\tint N = scanner.nextInt();\n\t\tint kari1 = 0;\n\t\tint kari2 = 0;\n\t\tint kari3 = 0;\n\t\tfor(int i = 0; i < N ; i++){\n\t\t\tkari1 = scanner.nextInt();\n\t\t\tkari2 = scanner.nextInt();\n\t\t\tkari3 = amida[kari1-1];\n\t\t\tamida[kari1-1] = amida[kari2-1];\n\t\t\tamida[kari2-1] = kari3;\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\tscanner.close();\n\t\treturn ;\n\t}\n\t\n\tpublic static int[] Amida(int W) {\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\t}\n\t\treturn amida;\n\t}\n\t\n\t\n}", "public class Main{\n\n\tpublic static void main(String[] args) {\n\t\tscan();\n\t\t\n\t}\n\t//??\\????°???¨??¢??°\n\tpublic static void scan() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tscanner.useDelimiter(\"\\\\s*,\\\\s*|\\n\");\n\t\tint W = scanner.nextInt();\n\t\tint[] amida = Amida(W);\n\t\tint N = scanner.nextInt();\n\t\tint kari1 = 0;\n\t\tint kari2 = 0;\n\t\tint kari3 = 0;\n\t\tfor(int i = 0; i < N ; i++){\n\t\t\tkari1 = scanner.nextInt();\n\t\t\tkari2 = scanner.nextInt();\n\t\t\tkari3 = amida[kari1-1];\n\t\t\tamida[kari1-1] = amida[kari2-1];\n\t\t\tamida[kari2-1] = kari3;\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\tscanner.close();\n\t\treturn ;\n\t}\n\t\n\tpublic static int[] Amida(int W) {\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\t}\n\t\treturn amida;\n\t}\n\t\n\t\n}", "Main" ]
import java.util.*; public class Main{ public static void main(String[] args) { scan(); } //??\????°???¨??¢??° public static void scan() { Scanner scanner = new Scanner(System.in); scanner.useDelimiter("\\s*,\\s*|\n"); int W = scanner.nextInt(); int[] amida = Amida(W); int N = scanner.nextInt(); int kari1 = 0; int kari2 = 0; int kari3 = 0; for(int i = 0; i < N ; i++){ kari1 = scanner.nextInt(); kari2 = scanner.nextInt(); kari3 = amida[kari1-1]; amida[kari1-1] = amida[kari2-1]; amida[kari2-1] = kari3; } for(int i = 0; i < W ; i++){ System.out.println(amida[i]); } scanner.close(); return ; } public static int[] Amida(int W) { int[] amida = new int[W]; for(int i = 0; i < W ; i++){ amida[i] = i+1; } return amida; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 0, 18, 13, 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, 0, 18, 13, 13, 18, 13, 2, 13, 17, 0, 18, 13, 2, 13, 17, 18, 13, 2, 13, 17, 0, 18, 13, 2, 13, 17, 18, 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 ], [ 146, 5 ], [ 146, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 25, 26 ], [ 25, 27 ], [ 8, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 28, 33 ], [ 33, 34 ], [ 33, 35 ], [ 28, 36 ], [ 36, 37 ], [ 37, 38 ], [ 28, 39 ], [ 40, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 41, 45 ], [ 45, 46 ], [ 45, 47 ], [ 8, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 48, 52 ], [ 8, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 53, 58 ], [ 58, 59 ], [ 58, 60 ], [ 53, 61 ], [ 61, 62 ], [ 62, 63 ], [ 53, 64 ], [ 65, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 68, 69 ], [ 69, 70 ], [ 65, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 74, 75 ], [ 73, 76 ], [ 65, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 80, 81 ], [ 79, 82 ], [ 82, 83 ], [ 82, 84 ], [ 65, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 88, 89 ], [ 87, 90 ], [ 90, 91 ], [ 90, 92 ], [ 65, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 93, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 99, 101 ], [ 65, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 105, 107 ], [ 102, 108 ], [ 108, 109 ], [ 108, 110 ], [ 110, 111 ], [ 110, 112 ], [ 65, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 116, 117 ], [ 116, 118 ], [ 113, 119 ], [ 119, 120 ], [ 119, 121 ], [ 8, 122 ], [ 122, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 122, 127 ], [ 127, 128 ], [ 127, 129 ], [ 122, 130 ], [ 130, 131 ], [ 131, 132 ], [ 122, 133 ], [ 134, 134 ], [ 134, 135 ], [ 135, 136 ], [ 136, 137 ], [ 137, 138 ], [ 137, 139 ], [ 135, 140 ], [ 140, 141 ], [ 140, 142 ], [ 6, 143 ], [ 143, 144 ], [ 0, 145 ], [ 145, 146 ], [ 145, 147 ] ]
[ "import java.util.Scanner;\n\npublic class Main{\n\tpublic static void main(String args[]) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tint[] s = new int[w + 1];\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\ts[i] = i + 1;\n\t\t}\n\t\ts[w] = 0;\n\t\tfor (int j = 0; j < n; j++) {\n\t\t\tString str = scan.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]);\n\t\t\tint b = Integer.parseInt(ab[1]);\n\t\t\ts[w] = s[a - 1];\n\t\t\ts[a - 1] = s[b - 1];\n\t\t\ts[b - 1] = s[w];\n\t\t}\n\t\tfor (int k = 0; k < w; k++) {\n\t\t\tSystem.out.println(s[k]);\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 scan = new Scanner(System.in);\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tint[] s = new int[w + 1];\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\ts[i] = i + 1;\n\t\t}\n\t\ts[w] = 0;\n\t\tfor (int j = 0; j < n; j++) {\n\t\t\tString str = scan.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]);\n\t\t\tint b = Integer.parseInt(ab[1]);\n\t\t\ts[w] = s[a - 1];\n\t\t\ts[a - 1] = s[b - 1];\n\t\t\ts[b - 1] = s[w];\n\t\t}\n\t\tfor (int k = 0; k < w; k++) {\n\t\t\tSystem.out.println(s[k]);\n\t\t}\n\t}\n}", "Main", "public static void main(String args[]) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tint[] s = new int[w + 1];\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\ts[i] = i + 1;\n\t\t}\n\t\ts[w] = 0;\n\t\tfor (int j = 0; j < n; j++) {\n\t\t\tString str = scan.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]);\n\t\t\tint b = Integer.parseInt(ab[1]);\n\t\t\ts[w] = s[a - 1];\n\t\t\ts[a - 1] = s[b - 1];\n\t\t\ts[b - 1] = s[w];\n\t\t}\n\t\tfor (int k = 0; k < w; k++) {\n\t\t\tSystem.out.println(s[k]);\n\t\t}\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[] s = new int[w + 1];\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\ts[i] = i + 1;\n\t\t}\n\t\ts[w] = 0;\n\t\tfor (int j = 0; j < n; j++) {\n\t\t\tString str = scan.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]);\n\t\t\tint b = Integer.parseInt(ab[1]);\n\t\t\ts[w] = s[a - 1];\n\t\t\ts[a - 1] = s[b - 1];\n\t\t\ts[b - 1] = s[w];\n\t\t}\n\t\tfor (int k = 0; k < w; k++) {\n\t\t\tSystem.out.println(s[k]);\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", "int[] s = new int[w + 1];", "s", "new int[w + 1]", "w + 1", "w", "1", "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", "s[w] = 0", "s[w]", "s", "w", "0", "for (int j = 0; j < n; j++) {\n\t\t\tString str = scan.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]);\n\t\t\tint b = Integer.parseInt(ab[1]);\n\t\t\ts[w] = s[a - 1];\n\t\t\ts[a - 1] = s[b - 1];\n\t\t\ts[b - 1] = s[w];\n\t\t}", "int j = 0;", "int j = 0;", "j", "0", "j < n", "j", "n", "j++", "j++", "j", "{\n\t\t\tString str = scan.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]);\n\t\t\tint b = Integer.parseInt(ab[1]);\n\t\t\ts[w] = s[a - 1];\n\t\t\ts[a - 1] = s[b - 1];\n\t\t\ts[b - 1] = s[w];\n\t\t}", "{\n\t\t\tString str = scan.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]);\n\t\t\tint b = Integer.parseInt(ab[1]);\n\t\t\ts[w] = s[a - 1];\n\t\t\ts[a - 1] = s[b - 1];\n\t\t\ts[b - 1] = s[w];\n\t\t}", "String str = scan.next();", "str", "scan.next()", "scan.next", "scan", "String[] ab = str.split(\",\");", "ab", "str.split(\",\")", "str.split", "str", "\",\"", "int a = Integer.parseInt(ab[0]);", "a", "Integer.parseInt(ab[0])", "Integer.parseInt", "Integer", "ab[0]", "ab", "0", "int b = Integer.parseInt(ab[1]);", "b", "Integer.parseInt(ab[1])", "Integer.parseInt", "Integer", "ab[1]", "ab", "1", "s[w] = s[a - 1]", "s[w]", "s", "w", "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] = s[w]", "s[b - 1]", "s", "b - 1", "b", "1", "s[w]", "s", "w", "for (int k = 0; k < w; k++) {\n\t\t\tSystem.out.println(s[k]);\n\t\t}", "int k = 0;", "int k = 0;", "k", "0", "k < w", "k", "w", "k++", "k++", "k", "{\n\t\t\tSystem.out.println(s[k]);\n\t\t}", "{\n\t\t\tSystem.out.println(s[k]);\n\t\t}", "System.out.println(s[k])", "System.out.println", "System.out", "System", "System.out", "s[k]", "s", "k", "String args[]", "args", "public 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[] s = new int[w + 1];\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\ts[i] = i + 1;\n\t\t}\n\t\ts[w] = 0;\n\t\tfor (int j = 0; j < n; j++) {\n\t\t\tString str = scan.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]);\n\t\t\tint b = Integer.parseInt(ab[1]);\n\t\t\ts[w] = s[a - 1];\n\t\t\ts[a - 1] = s[b - 1];\n\t\t\ts[b - 1] = s[w];\n\t\t}\n\t\tfor (int k = 0; k < w; k++) {\n\t\t\tSystem.out.println(s[k]);\n\t\t}\n\t}\n}", "public 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[] s = new int[w + 1];\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\ts[i] = i + 1;\n\t\t}\n\t\ts[w] = 0;\n\t\tfor (int j = 0; j < n; j++) {\n\t\t\tString str = scan.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]);\n\t\t\tint b = Integer.parseInt(ab[1]);\n\t\t\ts[w] = s[a - 1];\n\t\t\ts[a - 1] = s[b - 1];\n\t\t\ts[b - 1] = s[w];\n\t\t}\n\t\tfor (int k = 0; k < w; k++) {\n\t\t\tSystem.out.println(s[k]);\n\t\t}\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String args[]) { Scanner scan = new Scanner(System.in); int w = scan.nextInt(); int n = scan.nextInt(); int[] s = new int[w + 1]; for (int i = 0; i < w; i++) { s[i] = i + 1; } s[w] = 0; for (int j = 0; j < n; j++) { String str = scan.next(); String[] ab = str.split(","); int a = Integer.parseInt(ab[0]); int b = Integer.parseInt(ab[1]); s[w] = s[a - 1]; s[a - 1] = s[b - 1]; s[b - 1] = s[w]; } for (int k = 0; k < w; k++) { System.out.println(s[k]); } } }
[ 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, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 18, 13, 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, 0, 18, 13, 18, 13, 17, 2, 18, 13, 18, 13, 17, 18, 13, 18, 13, 17, 0, 18, 13, 18, 13, 17, 2, 18, 13, 18, 13, 17, 18, 13, 18, 13, 17, 0, 18, 13, 18, 13, 17, 2, 18, 13, 18, 13, 17, 18, 13, 18, 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 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 11, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 11, 25 ], [ 25, 26 ], [ 25, 27 ], [ 11, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 29, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 36, 38 ], [ 29, 39 ], [ 39, 40 ], [ 40, 41 ], [ 29, 42 ], [ 43, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 44, 48 ], [ 48, 49 ], [ 48, 50 ], [ 11, 51 ], [ 51, 52 ], [ 51, 53 ], [ 11, 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 ], [ 69, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 70, 74 ], [ 74, 75 ], [ 75, 76 ], [ 11, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 77, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 84, 86 ], [ 77, 87 ], [ 87, 88 ], [ 88, 89 ], [ 77, 90 ], [ 91, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 94, 99 ], [ 91, 100 ], [ 100, 101 ], [ 100, 102 ], [ 91, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 104, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 109, 112 ], [ 112, 113 ], [ 112, 114 ], [ 108, 115 ], [ 91, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 116, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 121, 124 ], [ 124, 125 ], [ 124, 126 ], [ 120, 127 ], [ 91, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 131, 132 ], [ 131, 133 ], [ 128, 134 ], [ 134, 135 ], [ 135, 136 ], [ 135, 137 ], [ 137, 138 ], [ 137, 139 ], [ 134, 140 ], [ 140, 141 ], [ 140, 142 ], [ 142, 143 ], [ 142, 144 ], [ 91, 145 ], [ 145, 146 ], [ 146, 147 ], [ 146, 148 ], [ 148, 149 ], [ 148, 150 ], [ 145, 151 ], [ 151, 152 ], [ 152, 153 ], [ 152, 154 ], [ 154, 155 ], [ 154, 156 ], [ 151, 157 ], [ 157, 158 ], [ 157, 159 ], [ 159, 160 ], [ 159, 161 ], [ 91, 162 ], [ 162, 163 ], [ 163, 164 ], [ 163, 165 ], [ 165, 166 ], [ 165, 167 ], [ 162, 168 ], [ 168, 169 ], [ 169, 170 ], [ 169, 171 ], [ 171, 172 ], [ 171, 173 ], [ 168, 174 ], [ 174, 175 ], [ 174, 176 ], [ 176, 177 ], [ 176, 178 ], [ 11, 179 ], [ 179, 180 ], [ 180, 181 ], [ 181, 182 ], [ 181, 183 ], [ 179, 184 ], [ 184, 185 ], [ 184, 186 ], [ 186, 187 ], [ 186, 188 ], [ 179, 189 ], [ 189, 190 ], [ 190, 191 ], [ 179, 192 ], [ 193, 193 ], [ 193, 194 ], [ 194, 195 ], [ 195, 196 ], [ 196, 197 ], [ 196, 198 ], [ 194, 199 ], [ 199, 200 ], [ 199, 201 ], [ 9, 202 ], [ 202, 203 ] ]
[ "import java.util.*;\nimport java.math.*;\n\nclass Main {\n public static void main (String[] args) {\n Scanner scanner = new Scanner(System.in);\n int vNum = scanner.nextInt();\n int hNum = scanner.nextInt();\n\n int[] v = new int[vNum];\n for (int ii = 0; ii < v.length; ii++) {\n v[ii] = ii + 1;\n }\n\n String[] h = new String[hNum];\n for (int ii = 0; ii < h.length; ii++) {\n h[ii] = scanner.next();\n }\n\n for (int ii = 0; ii < h.length; ii++) {\n String[] hs = h[ii].split(\",\");\n int[] hwork = new int[2];\n hwork[0] = Integer.parseInt(hs[0]) - 1;\n hwork[1] = Integer.parseInt(hs[1]) - 1;\n v[hwork[0]] = v[hwork[0]] + v[hwork[1]];\n v[hwork[1]] = v[hwork[0]] - v[hwork[1]];\n v[hwork[0]] = v[hwork[0]] - v[hwork[1]];\n }\n\n for (int ii = 0; ii < v.length; ii++) {\n System.out.println(v[ii]);\n }\n }\n}", "import java.util.*;", "util.*", "java", "import java.math.*;", "math.*", "java", "class Main {\n public static void main (String[] args) {\n Scanner scanner = new Scanner(System.in);\n int vNum = scanner.nextInt();\n int hNum = scanner.nextInt();\n\n int[] v = new int[vNum];\n for (int ii = 0; ii < v.length; ii++) {\n v[ii] = ii + 1;\n }\n\n String[] h = new String[hNum];\n for (int ii = 0; ii < h.length; ii++) {\n h[ii] = scanner.next();\n }\n\n for (int ii = 0; ii < h.length; ii++) {\n String[] hs = h[ii].split(\",\");\n int[] hwork = new int[2];\n hwork[0] = Integer.parseInt(hs[0]) - 1;\n hwork[1] = Integer.parseInt(hs[1]) - 1;\n v[hwork[0]] = v[hwork[0]] + v[hwork[1]];\n v[hwork[1]] = v[hwork[0]] - v[hwork[1]];\n v[hwork[0]] = v[hwork[0]] - v[hwork[1]];\n }\n\n for (int ii = 0; ii < v.length; ii++) {\n System.out.println(v[ii]);\n }\n }\n}", "Main", "public static void main (String[] args) {\n Scanner scanner = new Scanner(System.in);\n int vNum = scanner.nextInt();\n int hNum = scanner.nextInt();\n\n int[] v = new int[vNum];\n for (int ii = 0; ii < v.length; ii++) {\n v[ii] = ii + 1;\n }\n\n String[] h = new String[hNum];\n for (int ii = 0; ii < h.length; ii++) {\n h[ii] = scanner.next();\n }\n\n for (int ii = 0; ii < h.length; ii++) {\n String[] hs = h[ii].split(\",\");\n int[] hwork = new int[2];\n hwork[0] = Integer.parseInt(hs[0]) - 1;\n hwork[1] = Integer.parseInt(hs[1]) - 1;\n v[hwork[0]] = v[hwork[0]] + v[hwork[1]];\n v[hwork[1]] = v[hwork[0]] - v[hwork[1]];\n v[hwork[0]] = v[hwork[0]] - v[hwork[1]];\n }\n\n for (int ii = 0; ii < v.length; ii++) {\n System.out.println(v[ii]);\n }\n }", "main", "{\n Scanner scanner = new Scanner(System.in);\n int vNum = scanner.nextInt();\n int hNum = scanner.nextInt();\n\n int[] v = new int[vNum];\n for (int ii = 0; ii < v.length; ii++) {\n v[ii] = ii + 1;\n }\n\n String[] h = new String[hNum];\n for (int ii = 0; ii < h.length; ii++) {\n h[ii] = scanner.next();\n }\n\n for (int ii = 0; ii < h.length; ii++) {\n String[] hs = h[ii].split(\",\");\n int[] hwork = new int[2];\n hwork[0] = Integer.parseInt(hs[0]) - 1;\n hwork[1] = Integer.parseInt(hs[1]) - 1;\n v[hwork[0]] = v[hwork[0]] + v[hwork[1]];\n v[hwork[1]] = v[hwork[0]] - v[hwork[1]];\n v[hwork[0]] = v[hwork[0]] - v[hwork[1]];\n }\n\n for (int ii = 0; ii < v.length; ii++) {\n System.out.println(v[ii]);\n }\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int vNum = scanner.nextInt();", "vNum", "scanner.nextInt()", "scanner.nextInt", "scanner", "int hNum = scanner.nextInt();", "hNum", "scanner.nextInt()", "scanner.nextInt", "scanner", "int[] v = new int[vNum];", "v", "new int[vNum]", "vNum", "for (int ii = 0; ii < v.length; ii++) {\n v[ii] = ii + 1;\n }", "int ii = 0;", "int ii = 0;", "ii", "0", "ii < v.length", "ii", "v.length", "v", "v.length", "ii++", "ii++", "ii", "{\n v[ii] = ii + 1;\n }", "{\n v[ii] = ii + 1;\n }", "v[ii] = ii + 1", "v[ii]", "v", "ii", "ii + 1", "ii", "1", "String[] h = new String[hNum];", "h", "new String[hNum]", "hNum", "for (int ii = 0; ii < h.length; ii++) {\n h[ii] = scanner.next();\n }", "int ii = 0;", "int ii = 0;", "ii", "0", "ii < h.length", "ii", "h.length", "h", "h.length", "ii++", "ii++", "ii", "{\n h[ii] = scanner.next();\n }", "{\n h[ii] = scanner.next();\n }", "h[ii] = scanner.next()", "h[ii]", "h", "ii", "scanner.next()", "scanner.next", "scanner", "for (int ii = 0; ii < h.length; ii++) {\n String[] hs = h[ii].split(\",\");\n int[] hwork = new int[2];\n hwork[0] = Integer.parseInt(hs[0]) - 1;\n hwork[1] = Integer.parseInt(hs[1]) - 1;\n v[hwork[0]] = v[hwork[0]] + v[hwork[1]];\n v[hwork[1]] = v[hwork[0]] - v[hwork[1]];\n v[hwork[0]] = v[hwork[0]] - v[hwork[1]];\n }", "int ii = 0;", "int ii = 0;", "ii", "0", "ii < h.length", "ii", "h.length", "h", "h.length", "ii++", "ii++", "ii", "{\n String[] hs = h[ii].split(\",\");\n int[] hwork = new int[2];\n hwork[0] = Integer.parseInt(hs[0]) - 1;\n hwork[1] = Integer.parseInt(hs[1]) - 1;\n v[hwork[0]] = v[hwork[0]] + v[hwork[1]];\n v[hwork[1]] = v[hwork[0]] - v[hwork[1]];\n v[hwork[0]] = v[hwork[0]] - v[hwork[1]];\n }", "{\n String[] hs = h[ii].split(\",\");\n int[] hwork = new int[2];\n hwork[0] = Integer.parseInt(hs[0]) - 1;\n hwork[1] = Integer.parseInt(hs[1]) - 1;\n v[hwork[0]] = v[hwork[0]] + v[hwork[1]];\n v[hwork[1]] = v[hwork[0]] - v[hwork[1]];\n v[hwork[0]] = v[hwork[0]] - v[hwork[1]];\n }", "String[] hs = h[ii].split(\",\");", "hs", "h[ii].split(\",\")", "h[ii].split", "h[ii]", "h", "ii", "\",\"", "int[] hwork = new int[2];", "hwork", "new int[2]", "2", "hwork[0] = Integer.parseInt(hs[0]) - 1", "hwork[0]", "hwork", "0", "Integer.parseInt(hs[0]) - 1", "Integer.parseInt(hs[0])", "Integer.parseInt", "Integer", "hs[0]", "hs", "0", "1", "hwork[1] = Integer.parseInt(hs[1]) - 1", "hwork[1]", "hwork", "1", "Integer.parseInt(hs[1]) - 1", "Integer.parseInt(hs[1])", "Integer.parseInt", "Integer", "hs[1]", "hs", "1", "1", "v[hwork[0]] = v[hwork[0]] + v[hwork[1]]", "v[hwork[0]]", "v", "hwork[0]", "hwork", "0", "v[hwork[0]] + v[hwork[1]]", "v[hwork[0]]", "v", "hwork[0]", "hwork", "0", "v[hwork[1]]", "v", "hwork[1]", "hwork", "1", "v[hwork[1]] = v[hwork[0]] - v[hwork[1]]", "v[hwork[1]]", "v", "hwork[1]", "hwork", "1", "v[hwork[0]] - v[hwork[1]]", "v[hwork[0]]", "v", "hwork[0]", "hwork", "0", "v[hwork[1]]", "v", "hwork[1]", "hwork", "1", "v[hwork[0]] = v[hwork[0]] - v[hwork[1]]", "v[hwork[0]]", "v", "hwork[0]", "hwork", "0", "v[hwork[0]] - v[hwork[1]]", "v[hwork[0]]", "v", "hwork[0]", "hwork", "0", "v[hwork[1]]", "v", "hwork[1]", "hwork", "1", "for (int ii = 0; ii < v.length; ii++) {\n System.out.println(v[ii]);\n }", "int ii = 0;", "int ii = 0;", "ii", "0", "ii < v.length", "ii", "v.length", "v", "v.length", "ii++", "ii++", "ii", "{\n System.out.println(v[ii]);\n }", "{\n System.out.println(v[ii]);\n }", "System.out.println(v[ii])", "System.out.println", "System.out", "System", "System.out", "v[ii]", "v", "ii", "String[] args", "args" ]
import java.util.*; import java.math.*; class Main { public static void main (String[] args) { Scanner scanner = new Scanner(System.in); int vNum = scanner.nextInt(); int hNum = scanner.nextInt(); int[] v = new int[vNum]; for (int ii = 0; ii < v.length; ii++) { v[ii] = ii + 1; } String[] h = new String[hNum]; for (int ii = 0; ii < h.length; ii++) { h[ii] = scanner.next(); } for (int ii = 0; ii < h.length; ii++) { String[] hs = h[ii].split(","); int[] hwork = new int[2]; hwork[0] = Integer.parseInt(hs[0]) - 1; hwork[1] = Integer.parseInt(hs[1]) - 1; v[hwork[0]] = v[hwork[0]] + v[hwork[1]]; v[hwork[1]] = v[hwork[0]] - v[hwork[1]]; v[hwork[0]] = v[hwork[0]] - v[hwork[1]]; } for (int ii = 0; ii < v.length; ii++) { System.out.println(v[ii]); } } }
[ 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, 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, 18, 13, 13, 17, 41, 13, 39, 4, 18, 13, 18, 13, 17, 4, 18, 13, 18, 13, 17, 41, 13, 17, 0, 13, 18, 13, 2, 18, 13, 17, 17, 0, 18, 13, 2, 18, 13, 17, 17, 18, 13, 2, 18, 13, 17, 17, 0, 18, 13, 2, 18, 13, 17, 17, 13, 11, 1, 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 ], [ 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 ], [ 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 ], [ 44, 45 ], [ 8, 46 ], [ 46, 47 ], [ 46, 48 ], [ 8, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 50, 58 ], [ 58, 59 ], [ 59, 60 ], [ 50, 61 ], [ 62, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 63, 67 ], [ 67, 68 ], [ 67, 69 ], [ 8, 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 ], [ 87, 89 ], [ 85, 90 ], [ 82, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 94, 97 ], [ 97, 98 ], [ 97, 99 ], [ 93, 100 ], [ 100, 101 ], [ 101, 102 ], [ 100, 103 ], [ 103, 104 ], [ 103, 105 ], [ 82, 106 ], [ 106, 107 ], [ 106, 108 ], [ 82, 109 ], [ 109, 110 ], [ 109, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 113, 117 ], [ 82, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 121, 125 ], [ 118, 126 ], [ 126, 127 ], [ 126, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 128, 132 ], [ 82, 133 ], [ 133, 134 ], [ 134, 135 ], [ 134, 136 ], [ 136, 137 ], [ 137, 138 ], [ 137, 139 ], [ 136, 140 ], [ 133, 141 ], [ 8, 142 ], [ 142, 143 ], [ 143, 144 ], [ 144, 145 ], [ 144, 146 ], [ 142, 147 ], [ 147, 148 ], [ 147, 149 ], [ 149, 150 ], [ 149, 151 ], [ 142, 152 ], [ 152, 153 ], [ 153, 154 ], [ 142, 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\t// キーボード入力\n\t\tScanner stdIn = new Scanner( System.in );\n\t\tint w = stdIn.nextInt();//縦棒の数\n\t\tint n = stdIn.nextInt();//横棒の数\n\t\tString[] yoko = new String[n];\n\t\tfor(int i=0;i<n;i++){\n\t\t\tyoko[i] = stdIn.next();\n\t\t}\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\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] a = yoko[i].split(\",\");\n\t\t\tint[] b = {Integer.parseInt(a[0]),Integer.parseInt(a[1])};\n\t\t\tint temp = 0;\n\n\t\t\ttemp = amida[b[0]-1];\n\t\t\tamida[b[0]-1] = amida[b[1]-1];\n\t\t\tamida[b[1]-1] = temp;\n\t\t}\n\t\tfor(int i=0;i<amida.length;i++){\n\t\t\tSystem.out.println(amida[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\t// キーボード入力\n\t\tScanner stdIn = new Scanner( System.in );\n\t\tint w = stdIn.nextInt();//縦棒の数\n\t\tint n = stdIn.nextInt();//横棒の数\n\t\tString[] yoko = new String[n];\n\t\tfor(int i=0;i<n;i++){\n\t\t\tyoko[i] = stdIn.next();\n\t\t}\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\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] a = yoko[i].split(\",\");\n\t\t\tint[] b = {Integer.parseInt(a[0]),Integer.parseInt(a[1])};\n\t\t\tint temp = 0;\n\n\t\t\ttemp = amida[b[0]-1];\n\t\t\tamida[b[0]-1] = amida[b[1]-1];\n\t\t\tamida[b[1]-1] = temp;\n\t\t}\n\t\tfor(int i=0;i<amida.length;i++){\n\t\t\tSystem.out.println(amida[i]);\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\t// キーボード入力\n\t\tScanner stdIn = new Scanner( System.in );\n\t\tint w = stdIn.nextInt();//縦棒の数\n\t\tint n = stdIn.nextInt();//横棒の数\n\t\tString[] yoko = new String[n];\n\t\tfor(int i=0;i<n;i++){\n\t\t\tyoko[i] = stdIn.next();\n\t\t}\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\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] a = yoko[i].split(\",\");\n\t\t\tint[] b = {Integer.parseInt(a[0]),Integer.parseInt(a[1])};\n\t\t\tint temp = 0;\n\n\t\t\ttemp = amida[b[0]-1];\n\t\t\tamida[b[0]-1] = amida[b[1]-1];\n\t\t\tamida[b[1]-1] = temp;\n\t\t}\n\t\tfor(int i=0;i<amida.length;i++){\n\t\t\tSystem.out.println(amida[i]);\n\t\t}\n\t}", "main", "{\n\t\t// キーボード入力\n\t\tScanner stdIn = new Scanner( System.in );\n\t\tint w = stdIn.nextInt();//縦棒の数\n\t\tint n = stdIn.nextInt();//横棒の数\n\t\tString[] yoko = new String[n];\n\t\tfor(int i=0;i<n;i++){\n\t\t\tyoko[i] = stdIn.next();\n\t\t}\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\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] a = yoko[i].split(\",\");\n\t\t\tint[] b = {Integer.parseInt(a[0]),Integer.parseInt(a[1])};\n\t\t\tint temp = 0;\n\n\t\t\ttemp = amida[b[0]-1];\n\t\t\tamida[b[0]-1] = amida[b[1]-1];\n\t\t\tamida[b[1]-1] = temp;\n\t\t}\n\t\tfor(int i=0;i<amida.length;i++){\n\t\t\tSystem.out.println(amida[i]);\n\t\t}\n\t}", "Scanner stdIn = new Scanner( System.in );", "stdIn", "new Scanner( System.in )", "int w = stdIn.nextInt();", "w", "stdIn.nextInt()", "stdIn.nextInt", "stdIn", "int n = stdIn.nextInt();", "n", "stdIn.nextInt()", "stdIn.nextInt", "stdIn", "String[] yoko = new String[n];", "yoko", "new String[n]", "n", "for(int i=0;i<n;i++){\n\t\t\tyoko[i] = stdIn.next();\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t\t\tyoko[i] = stdIn.next();\n\t\t}", "{\n\t\t\tyoko[i] = stdIn.next();\n\t\t}", "yoko[i] = stdIn.next()", "yoko[i]", "yoko", "i", "stdIn.next()", "stdIn.next", "stdIn", "int[] 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\tString[] a = yoko[i].split(\",\");\n\t\t\tint[] b = {Integer.parseInt(a[0]),Integer.parseInt(a[1])};\n\t\t\tint temp = 0;\n\n\t\t\ttemp = amida[b[0]-1];\n\t\t\tamida[b[0]-1] = amida[b[1]-1];\n\t\t\tamida[b[1]-1] = temp;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t\t\tString[] a = yoko[i].split(\",\");\n\t\t\tint[] b = {Integer.parseInt(a[0]),Integer.parseInt(a[1])};\n\t\t\tint temp = 0;\n\n\t\t\ttemp = amida[b[0]-1];\n\t\t\tamida[b[0]-1] = amida[b[1]-1];\n\t\t\tamida[b[1]-1] = temp;\n\t\t}", "{\n\t\t\tString[] a = yoko[i].split(\",\");\n\t\t\tint[] b = {Integer.parseInt(a[0]),Integer.parseInt(a[1])};\n\t\t\tint temp = 0;\n\n\t\t\ttemp = amida[b[0]-1];\n\t\t\tamida[b[0]-1] = amida[b[1]-1];\n\t\t\tamida[b[1]-1] = temp;\n\t\t}", "String[] a = yoko[i].split(\",\");", "a", "yoko[i].split(\",\")", "yoko[i].split", "yoko[i]", "yoko", "i", "\",\"", "int[] b = {Integer.parseInt(a[0]),Integer.parseInt(a[1])};", "b", "{Integer.parseInt(a[0]),Integer.parseInt(a[1])}", "Integer.parseInt(a[0])", "Integer.parseInt", "Integer", "a[0]", "a", "0", "Integer.parseInt(a[1])", "Integer.parseInt", "Integer", "a[1]", "a", "1", "int temp = 0;", "temp", "0", "temp = amida[b[0]-1]", "temp", "amida[b[0]-1]", "amida", "b[0]-1", "b[0]", "b", "0", "1", "amida[b[0]-1] = amida[b[1]-1]", "amida[b[0]-1]", "amida", "b[0]-1", "b[0]", "b", "0", "1", "amida[b[1]-1]", "amida", "b[1]-1", "b[1]", "b", "1", "1", "amida[b[1]-1] = temp", "amida[b[1]-1]", "amida", "b[1]-1", "b[1]", "b", "1", "1", "temp", "for(int i=0;i<amida.length;i++){\n\t\t\tSystem.out.println(amida[i]);\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<amida.length", "i", "amida.length", "amida", "amida.length", "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) {\n\t\t// キーボード入力\n\t\tScanner stdIn = new Scanner( System.in );\n\t\tint w = stdIn.nextInt();//縦棒の数\n\t\tint n = stdIn.nextInt();//横棒の数\n\t\tString[] yoko = new String[n];\n\t\tfor(int i=0;i<n;i++){\n\t\t\tyoko[i] = stdIn.next();\n\t\t}\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\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] a = yoko[i].split(\",\");\n\t\t\tint[] b = {Integer.parseInt(a[0]),Integer.parseInt(a[1])};\n\t\t\tint temp = 0;\n\n\t\t\ttemp = amida[b[0]-1];\n\t\t\tamida[b[0]-1] = amida[b[1]-1];\n\t\t\tamida[b[1]-1] = temp;\n\t\t}\n\t\tfor(int i=0;i<amida.length;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) {\n\t\t// キーボード入力\n\t\tScanner stdIn = new Scanner( System.in );\n\t\tint w = stdIn.nextInt();//縦棒の数\n\t\tint n = stdIn.nextInt();//横棒の数\n\t\tString[] yoko = new String[n];\n\t\tfor(int i=0;i<n;i++){\n\t\t\tyoko[i] = stdIn.next();\n\t\t}\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\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] a = yoko[i].split(\",\");\n\t\t\tint[] b = {Integer.parseInt(a[0]),Integer.parseInt(a[1])};\n\t\t\tint temp = 0;\n\n\t\t\ttemp = amida[b[0]-1];\n\t\t\tamida[b[0]-1] = amida[b[1]-1];\n\t\t\tamida[b[1]-1] = temp;\n\t\t}\n\t\tfor(int i=0;i<amida.length;i++){\n\t\t\tSystem.out.println(amida[i]);\n\t\t}\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { // キーボード入力 Scanner stdIn = new Scanner( System.in ); int w = stdIn.nextInt();//縦棒の数 int n = stdIn.nextInt();//横棒の数 String[] yoko = new String[n]; for(int i=0;i<n;i++){ yoko[i] = stdIn.next(); } int[] amida = new int[w]; for(int i=0;i<w;i++){ amida[i] = i+1; } for(int i=0;i<n;i++){ String[] a = yoko[i].split(","); int[] b = {Integer.parseInt(a[0]),Integer.parseInt(a[1])}; int temp = 0; temp = amida[b[0]-1]; amida[b[0]-1] = amida[b[1]-1]; amida[b[1]-1] = temp; } for(int i=0;i<amida.length;i++){ System.out.println(amida[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, 17, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 2, 13, 17, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 2, 4, 18, 13, 18, 13, 17, 17, 41, 13, 2, 4, 18, 13, 18, 13, 17, 17, 0, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 4, 18, 18, 13, 13, 17, 18, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 140, 5 ], [ 140, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], [ 14, 15 ], [ 8, 16 ], [ 16, 17 ], [ 8, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 36, 41 ], [ 41, 42 ], [ 41, 43 ], [ 36, 44 ], [ 44, 45 ], [ 45, 46 ], [ 36, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 48, 52 ], [ 52, 53 ], [ 52, 54 ], [ 8, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 55, 60 ], [ 60, 61 ], [ 60, 62 ], [ 55, 63 ], [ 63, 64 ], [ 64, 65 ], [ 55, 66 ], [ 67, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 67, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 75, 78 ], [ 67, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 82, 85 ], [ 85, 86 ], [ 85, 87 ], [ 81, 88 ], [ 67, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 92, 95 ], [ 95, 96 ], [ 95, 97 ], [ 91, 98 ], [ 67, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 101, 103 ], [ 67, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 104, 108 ], [ 108, 109 ], [ 108, 110 ], [ 67, 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 ], [ 128, 134 ], [ 134, 135 ], [ 134, 136 ], [ 6, 137 ], [ 137, 138 ], [ 0, 139 ], [ 139, 140 ], [ 139, 141 ] ]
[ "import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n int num[],c,i,n,w;\n w = sc.nextInt();\n n = sc.nextInt();\n\n num = new int[30];\n\n for(i=0;i<w;i++) num[i] = i + 1;\n\n for (i=0;i<n;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 c = num[a];\n num[a] = num[b];\n num[b] = c;\n\t}\n\n for(i=0;i<w;i++) System.out.printf(\"%d\\n\",num[i]);\n\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n int num[],c,i,n,w;\n w = sc.nextInt();\n n = sc.nextInt();\n\n num = new int[30];\n\n for(i=0;i<w;i++) num[i] = i + 1;\n\n for (i=0;i<n;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 c = num[a];\n num[a] = num[b];\n num[b] = c;\n\t}\n\n for(i=0;i<w;i++) System.out.printf(\"%d\\n\",num[i]);\n\n }\n}", "Main", "public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n int num[],c,i,n,w;\n w = sc.nextInt();\n n = sc.nextInt();\n\n num = new int[30];\n\n for(i=0;i<w;i++) num[i] = i + 1;\n\n for (i=0;i<n;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 c = num[a];\n num[a] = num[b];\n num[b] = c;\n\t}\n\n for(i=0;i<w;i++) System.out.printf(\"%d\\n\",num[i]);\n\n }", "main", "{\n\tScanner sc = new Scanner(System.in);\n int num[],c,i,n,w;\n w = sc.nextInt();\n n = sc.nextInt();\n\n num = new int[30];\n\n for(i=0;i<w;i++) num[i] = i + 1;\n\n for (i=0;i<n;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 c = num[a];\n num[a] = num[b];\n num[b] = c;\n\t}\n\n for(i=0;i<w;i++) System.out.printf(\"%d\\n\",num[i]);\n\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int num[]", "num", "c", "c", "i", "i", "n", "n", "w;", "w", "w = sc.nextInt()", "w", "sc.nextInt()", "sc.nextInt", "sc", "n = sc.nextInt()", "n", "sc.nextInt()", "sc.nextInt", "sc", "num = new int[30]", "num", "new int[30]", "30", "for(i=0;i<w;i++) num[i] = i + 1;", "i=0;", "i=0", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "num[i] = i + 1;", "num[i] = i + 1", "num[i]", "num", "i", "i + 1", "i", "1", "for (i=0;i<n;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 c = num[a];\n num[a] = num[b];\n num[b] = c;\n\t}", "i=0;", "i=0", "i", "0", "i<n", "i", "n", "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 c = num[a];\n num[a] = num[b];\n num[b] = c;\n\t}", "{\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 c = num[a];\n num[a] = num[b];\n num[b] = c;\n\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", "c = num[a]", "c", "num[a]", "num", "a", "num[a] = num[b]", "num[a]", "num", "a", "num[b]", "num", "b", "num[b] = c", "num[b]", "num", "b", "c", "for(i=0;i<w;i++) System.out.printf(\"%d\\n\",num[i]);", "i=0;", "i=0", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "System.out.printf(\"%d\\n\",num[i]);", "System.out.printf(\"%d\\n\",num[i])", "System.out.printf", "System.out", "System", "System.out", "\"%d\\n\"", "num[i]", "num", "i", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n int num[],c,i,n,w;\n w = sc.nextInt();\n n = sc.nextInt();\n\n num = new int[30];\n\n for(i=0;i<w;i++) num[i] = i + 1;\n\n for (i=0;i<n;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 c = num[a];\n num[a] = num[b];\n num[b] = c;\n\t}\n\n for(i=0;i<w;i++) System.out.printf(\"%d\\n\",num[i]);\n\n }\n}", "public class Main{\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n int num[],c,i,n,w;\n w = sc.nextInt();\n n = sc.nextInt();\n\n num = new int[30];\n\n for(i=0;i<w;i++) num[i] = i + 1;\n\n for (i=0;i<n;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 c = num[a];\n num[a] = num[b];\n num[b] = c;\n\t}\n\n for(i=0;i<w;i++) System.out.printf(\"%d\\n\",num[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 num[],c,i,n,w; w = sc.nextInt(); n = sc.nextInt(); num = new int[30]; for(i=0;i<w;i++) num[i] = i + 1; for (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; c = num[a]; num[a] = num[b]; num[b] = c; } for(i=0;i<w;i++) System.out.printf("%d\n",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, 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 ], [ 136, 5 ], [ 136, 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 ], [ 65, 66 ], [ 66, 67 ], [ 63, 68 ], [ 60, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 72, 73 ], [ 71, 74 ], [ 74, 75 ], [ 74, 76 ], [ 60, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 80, 81 ], [ 79, 82 ], [ 82, 83 ], [ 82, 84 ], [ 60, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 89, 91 ], [ 60, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 95, 97 ], [ 92, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 100, 102 ], [ 60, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 106, 107 ], [ 106, 108 ], [ 103, 109 ], [ 8, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 110, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 117, 119 ], [ 110, 120 ], [ 120, 121 ], [ 121, 122 ], [ 110, 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.*;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner input=new Scanner(System.in);\n\t\tint hor=input.nextInt();\n\t\tint ver=input.nextInt();\n\t\t\n\t\tint[] num=new int[hor];\n\t\t\n\t\tfor(int i=0;i<num.length;i++){\n\t\t\tnum[i]=i+1;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<ver;i++){\n\t\t\tString[] str=input.next().split(\",\");\n/*\t\t\tSystem.out.println(str[0]+\" \"+str[1]);*/\n\t\t\tint a=Integer.parseInt(str[0]);\n\t\t\tint b=Integer.parseInt(str[1]);\n\t\t\tint change=num[a-1];\n\t\t\tnum[a-1]=num[b-1];\n\t\t\tnum[b-1]=change;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<num.length;i++){\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\t\t\n\t}\n\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner input=new Scanner(System.in);\n\t\tint hor=input.nextInt();\n\t\tint ver=input.nextInt();\n\t\t\n\t\tint[] num=new int[hor];\n\t\t\n\t\tfor(int i=0;i<num.length;i++){\n\t\t\tnum[i]=i+1;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<ver;i++){\n\t\t\tString[] str=input.next().split(\",\");\n/*\t\t\tSystem.out.println(str[0]+\" \"+str[1]);*/\n\t\t\tint a=Integer.parseInt(str[0]);\n\t\t\tint b=Integer.parseInt(str[1]);\n\t\t\tint change=num[a-1];\n\t\t\tnum[a-1]=num[b-1];\n\t\t\tnum[b-1]=change;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<num.length;i++){\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\t\t\n\t}\n\n}", "Main", "public static void main(String[] args){\n\t\tScanner input=new Scanner(System.in);\n\t\tint hor=input.nextInt();\n\t\tint ver=input.nextInt();\n\t\t\n\t\tint[] num=new int[hor];\n\t\t\n\t\tfor(int i=0;i<num.length;i++){\n\t\t\tnum[i]=i+1;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<ver;i++){\n\t\t\tString[] str=input.next().split(\",\");\n/*\t\t\tSystem.out.println(str[0]+\" \"+str[1]);*/\n\t\t\tint a=Integer.parseInt(str[0]);\n\t\t\tint b=Integer.parseInt(str[1]);\n\t\t\tint change=num[a-1];\n\t\t\tnum[a-1]=num[b-1];\n\t\t\tnum[b-1]=change;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<num.length;i++){\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\t\t\n\t}", "main", "{\n\t\tScanner input=new Scanner(System.in);\n\t\tint hor=input.nextInt();\n\t\tint ver=input.nextInt();\n\t\t\n\t\tint[] num=new int[hor];\n\t\t\n\t\tfor(int i=0;i<num.length;i++){\n\t\t\tnum[i]=i+1;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<ver;i++){\n\t\t\tString[] str=input.next().split(\",\");\n/*\t\t\tSystem.out.println(str[0]+\" \"+str[1]);*/\n\t\t\tint a=Integer.parseInt(str[0]);\n\t\t\tint b=Integer.parseInt(str[1]);\n\t\t\tint change=num[a-1];\n\t\t\tnum[a-1]=num[b-1];\n\t\t\tnum[b-1]=change;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<num.length;i++){\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\t\t\n\t}", "Scanner input=new Scanner(System.in);", "input", "new Scanner(System.in)", "int hor=input.nextInt();", "hor", "input.nextInt()", "input.nextInt", "input", "int ver=input.nextInt();", "ver", "input.nextInt()", "input.nextInt", "input", "int[] num=new int[hor];", "num", "new int[hor]", "hor", "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<ver;i++){\n\t\t\tString[] str=input.next().split(\",\");\n/*\t\t\tSystem.out.println(str[0]+\" \"+str[1]);*/\n\t\t\tint a=Integer.parseInt(str[0]);\n\t\t\tint b=Integer.parseInt(str[1]);\n\t\t\tint change=num[a-1];\n\t\t\tnum[a-1]=num[b-1];\n\t\t\tnum[b-1]=change;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<ver", "i", "ver", "i++", "i++", "i", "{\n\t\t\tString[] str=input.next().split(\",\");\n/*\t\t\tSystem.out.println(str[0]+\" \"+str[1]);*/\n\t\t\tint a=Integer.parseInt(str[0]);\n\t\t\tint b=Integer.parseInt(str[1]);\n\t\t\tint change=num[a-1];\n\t\t\tnum[a-1]=num[b-1];\n\t\t\tnum[b-1]=change;\n\t\t}", "{\n\t\t\tString[] str=input.next().split(\",\");\n/*\t\t\tSystem.out.println(str[0]+\" \"+str[1]);*/\n\t\t\tint a=Integer.parseInt(str[0]);\n\t\t\tint b=Integer.parseInt(str[1]);\n\t\t\tint change=num[a-1];\n\t\t\tnum[a-1]=num[b-1];\n\t\t\tnum[b-1]=change;\n\t\t}", "String[] str=input.next().split(\",\");", "str", "input.next().split(\",\")", "input.next().split", "input.next()", "input.next", "input", "\",\"", "int a=Integer.parseInt(str[0]);", "a", "Integer.parseInt(str[0])", "Integer.parseInt", "Integer", "str[0]", "str", "0", "int b=Integer.parseInt(str[1]);", "b", "Integer.parseInt(str[1])", "Integer.parseInt", "Integer", "str[1]", "str", "1", "int change=num[a-1];", "change", "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]=change", "num[b-1]", "num", "b-1", "b", "1", "change", "for(int i=0;i<num.length;i++){\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\tpublic static void main(String[] args){\n\t\tScanner input=new Scanner(System.in);\n\t\tint hor=input.nextInt();\n\t\tint ver=input.nextInt();\n\t\t\n\t\tint[] num=new int[hor];\n\t\t\n\t\tfor(int i=0;i<num.length;i++){\n\t\t\tnum[i]=i+1;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<ver;i++){\n\t\t\tString[] str=input.next().split(\",\");\n/*\t\t\tSystem.out.println(str[0]+\" \"+str[1]);*/\n\t\t\tint a=Integer.parseInt(str[0]);\n\t\t\tint b=Integer.parseInt(str[1]);\n\t\t\tint change=num[a-1];\n\t\t\tnum[a-1]=num[b-1];\n\t\t\tnum[b-1]=change;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<num.length;i++){\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\t\t\n\t}\n\n}", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner input=new Scanner(System.in);\n\t\tint hor=input.nextInt();\n\t\tint ver=input.nextInt();\n\t\t\n\t\tint[] num=new int[hor];\n\t\t\n\t\tfor(int i=0;i<num.length;i++){\n\t\t\tnum[i]=i+1;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<ver;i++){\n\t\t\tString[] str=input.next().split(\",\");\n/*\t\t\tSystem.out.println(str[0]+\" \"+str[1]);*/\n\t\t\tint a=Integer.parseInt(str[0]);\n\t\t\tint b=Integer.parseInt(str[1]);\n\t\t\tint change=num[a-1];\n\t\t\tnum[a-1]=num[b-1];\n\t\t\tnum[b-1]=change;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<num.length;i++){\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\t\t\n\t}\n\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args){ Scanner input=new Scanner(System.in); int hor=input.nextInt(); int ver=input.nextInt(); int[] num=new int[hor]; for(int i=0;i<num.length;i++){ num[i]=i+1; } for(int i=0;i<ver;i++){ String[] str=input.next().split(","); /* System.out.println(str[0]+" "+str[1]);*/ int a=Integer.parseInt(str[0]); int b=Integer.parseInt(str[1]); int change=num[a-1]; num[a-1]=num[b-1]; num[b-1]=change; } for(int i=0;i<num.length;i++){ System.out.println(num[i]); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 4, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 0, 18, 18, 13, 13, 17, 4, 18, 13, 18, 13, 17, 0, 18, 18, 13, 13, 17, 4, 18, 13, 18, 13, 17, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 18, 18, 13, 13, 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, 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, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 176, 5 ], [ 176, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 6, 11 ], [ 11, 12 ], [ 176, 13 ], [ 13, 14 ], [ 13, 15 ], [ 15, 16 ], [ 16, 17 ], [ 16, 18 ], [ 15, 19 ], [ 19, 20 ], [ 19, 21 ], [ 21, 22 ], [ 22, 23 ], [ 15, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 15, 29 ], [ 29, 30 ], [ 29, 31 ], [ 15, 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 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 46, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 55, 56 ], [ 54, 57 ], [ 46, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 59, 63 ], [ 58, 64 ], [ 64, 65 ], [ 65, 66 ], [ 64, 67 ], [ 67, 68 ], [ 67, 69 ], [ 46, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 71, 75 ], [ 70, 76 ], [ 76, 77 ], [ 77, 78 ], [ 76, 79 ], [ 79, 80 ], [ 79, 81 ], [ 15, 82 ], [ 82, 83 ], [ 82, 84 ], [ 15, 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 ], [ 99, 101 ], [ 98, 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 ], [ 119, 120 ], [ 119, 121 ], [ 118, 122 ], [ 115, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 126, 130 ], [ 115, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 134, 135 ], [ 135, 136 ], [ 135, 137 ], [ 134, 138 ], [ 131, 139 ], [ 139, 140 ], [ 140, 141 ], [ 140, 142 ], [ 142, 143 ], [ 143, 144 ], [ 143, 145 ], [ 142, 146 ], [ 98, 147 ], [ 147, 148 ], [ 148, 149 ], [ 148, 150 ], [ 150, 151 ], [ 150, 152 ], [ 147, 153 ], [ 15, 154 ], [ 154, 155 ], [ 155, 156 ], [ 156, 157 ], [ 156, 158 ], [ 154, 159 ], [ 159, 160 ], [ 159, 161 ], [ 154, 162 ], [ 162, 163 ], [ 163, 164 ], [ 154, 165 ], [ 166, 166 ], [ 166, 167 ], [ 167, 168 ], [ 168, 169 ], [ 169, 170 ], [ 169, 171 ], [ 167, 172 ], [ 172, 173 ], [ 172, 174 ], [ 0, 175 ], [ 175, 176 ], [ 175, 177 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tdoIt();\n\t}\n\tpublic static void doIt(){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[][] hor = new int[n][2];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString str = sc.next();\n\t\t\tString[] ss = str.split(\",\");\n\t\t\t//System.out.println(str);\n\t\t\thor[i][0] = Integer.parseInt(ss[0]);\n\t\t\t//System.out.println(hor[i][0]);\n\t\t\thor[i][1] = Integer.parseInt(ss[1]);\n\t\t\t//System.out.println(hor[i][1]);\n\t\t}\n\t\t\n\t\tint[] ver = new int[w];\n\t\tfor(int i = 1; i <= w; i++){\n\t\t\tint num = i;\n\t\t\tfor(int j = 0; j < n; j++){\n\t\t\t\tif(num == hor[j][0]){\n\t\t\t\t\tnum = hor[j][1];\n\t\t\t\t}\n\t\t\t\telse if(num == hor[j][1]){\n\t\t\t\t\tnum = hor[j][0];\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(num);\n\t\t\tver[num - 1] = i;\n\t\t}\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(ver[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// TODO Auto-generated method stub\n\t\tdoIt();\n\t}\n\tpublic static void doIt(){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[][] hor = new int[n][2];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString str = sc.next();\n\t\t\tString[] ss = str.split(\",\");\n\t\t\t//System.out.println(str);\n\t\t\thor[i][0] = Integer.parseInt(ss[0]);\n\t\t\t//System.out.println(hor[i][0]);\n\t\t\thor[i][1] = Integer.parseInt(ss[1]);\n\t\t\t//System.out.println(hor[i][1]);\n\t\t}\n\t\t\n\t\tint[] ver = new int[w];\n\t\tfor(int i = 1; i <= w; i++){\n\t\t\tint num = i;\n\t\t\tfor(int j = 0; j < n; j++){\n\t\t\t\tif(num == hor[j][0]){\n\t\t\t\t\tnum = hor[j][1];\n\t\t\t\t}\n\t\t\t\telse if(num == hor[j][1]){\n\t\t\t\t\tnum = hor[j][0];\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(num);\n\t\t\tver[num - 1] = i;\n\t\t}\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(ver[i]);\n\t\t}\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tdoIt();\n\t}", "main", "{\n\t\t// TODO Auto-generated method stub\n\t\tdoIt();\n\t}", "doIt()", "doIt", "String[] args", "args", "public static void doIt(){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[][] hor = new int[n][2];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString str = sc.next();\n\t\t\tString[] ss = str.split(\",\");\n\t\t\t//System.out.println(str);\n\t\t\thor[i][0] = Integer.parseInt(ss[0]);\n\t\t\t//System.out.println(hor[i][0]);\n\t\t\thor[i][1] = Integer.parseInt(ss[1]);\n\t\t\t//System.out.println(hor[i][1]);\n\t\t}\n\t\t\n\t\tint[] ver = new int[w];\n\t\tfor(int i = 1; i <= w; i++){\n\t\t\tint num = i;\n\t\t\tfor(int j = 0; j < n; j++){\n\t\t\t\tif(num == hor[j][0]){\n\t\t\t\t\tnum = hor[j][1];\n\t\t\t\t}\n\t\t\t\telse if(num == hor[j][1]){\n\t\t\t\t\tnum = hor[j][0];\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(num);\n\t\t\tver[num - 1] = i;\n\t\t}\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(ver[i]);\n\t\t}\n\t}", "doIt", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[][] hor = new int[n][2];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString str = sc.next();\n\t\t\tString[] ss = str.split(\",\");\n\t\t\t//System.out.println(str);\n\t\t\thor[i][0] = Integer.parseInt(ss[0]);\n\t\t\t//System.out.println(hor[i][0]);\n\t\t\thor[i][1] = Integer.parseInt(ss[1]);\n\t\t\t//System.out.println(hor[i][1]);\n\t\t}\n\t\t\n\t\tint[] ver = new int[w];\n\t\tfor(int i = 1; i <= w; i++){\n\t\t\tint num = i;\n\t\t\tfor(int j = 0; j < n; j++){\n\t\t\t\tif(num == hor[j][0]){\n\t\t\t\t\tnum = hor[j][1];\n\t\t\t\t}\n\t\t\t\telse if(num == hor[j][1]){\n\t\t\t\t\tnum = hor[j][0];\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(num);\n\t\t\tver[num - 1] = i;\n\t\t}\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(ver[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[][] hor = new int[n][2];", "hor", "new int[n][2]", "n", "2", "for(int i = 0; i < n; i++){\n\t\t\tString str = sc.next();\n\t\t\tString[] ss = str.split(\",\");\n\t\t\t//System.out.println(str);\n\t\t\thor[i][0] = Integer.parseInt(ss[0]);\n\t\t\t//System.out.println(hor[i][0]);\n\t\t\thor[i][1] = Integer.parseInt(ss[1]);\n\t\t\t//System.out.println(hor[i][1]);\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tString str = sc.next();\n\t\t\tString[] ss = str.split(\",\");\n\t\t\t//System.out.println(str);\n\t\t\thor[i][0] = Integer.parseInt(ss[0]);\n\t\t\t//System.out.println(hor[i][0]);\n\t\t\thor[i][1] = Integer.parseInt(ss[1]);\n\t\t\t//System.out.println(hor[i][1]);\n\t\t}", "{\n\t\t\tString str = sc.next();\n\t\t\tString[] ss = str.split(\",\");\n\t\t\t//System.out.println(str);\n\t\t\thor[i][0] = Integer.parseInt(ss[0]);\n\t\t\t//System.out.println(hor[i][0]);\n\t\t\thor[i][1] = Integer.parseInt(ss[1]);\n\t\t\t//System.out.println(hor[i][1]);\n\t\t}", "String str = sc.next();", "str", "sc.next()", "sc.next", "sc", "String[] ss = str.split(\",\");", "ss", "str.split(\",\")", "str.split", "str", "\",\"", "hor[i][0] = Integer.parseInt(ss[0])", "hor[i][0]", "hor[i]", "hor", "i", "0", "Integer.parseInt(ss[0])", "Integer.parseInt", "Integer", "ss[0]", "ss", "0", "hor[i][1] = Integer.parseInt(ss[1])", "hor[i][1]", "hor[i]", "hor", "i", "1", "Integer.parseInt(ss[1])", "Integer.parseInt", "Integer", "ss[1]", "ss", "1", "int[] ver = new int[w];", "ver", "new int[w]", "w", "for(int i = 1; i <= w; i++){\n\t\t\tint num = i;\n\t\t\tfor(int j = 0; j < n; j++){\n\t\t\t\tif(num == hor[j][0]){\n\t\t\t\t\tnum = hor[j][1];\n\t\t\t\t}\n\t\t\t\telse if(num == hor[j][1]){\n\t\t\t\t\tnum = hor[j][0];\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(num);\n\t\t\tver[num - 1] = i;\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= w", "i", "w", "i++", "i++", "i", "{\n\t\t\tint num = i;\n\t\t\tfor(int j = 0; j < n; j++){\n\t\t\t\tif(num == hor[j][0]){\n\t\t\t\t\tnum = hor[j][1];\n\t\t\t\t}\n\t\t\t\telse if(num == hor[j][1]){\n\t\t\t\t\tnum = hor[j][0];\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(num);\n\t\t\tver[num - 1] = i;\n\t\t}", "{\n\t\t\tint num = i;\n\t\t\tfor(int j = 0; j < n; j++){\n\t\t\t\tif(num == hor[j][0]){\n\t\t\t\t\tnum = hor[j][1];\n\t\t\t\t}\n\t\t\t\telse if(num == hor[j][1]){\n\t\t\t\t\tnum = hor[j][0];\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(num);\n\t\t\tver[num - 1] = i;\n\t\t}", "int num = i;", "num", "i", "for(int j = 0; j < n; j++){\n\t\t\t\tif(num == hor[j][0]){\n\t\t\t\t\tnum = hor[j][1];\n\t\t\t\t}\n\t\t\t\telse if(num == hor[j][1]){\n\t\t\t\t\tnum = hor[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(num == hor[j][0]){\n\t\t\t\t\tnum = hor[j][1];\n\t\t\t\t}\n\t\t\t\telse if(num == hor[j][1]){\n\t\t\t\t\tnum = hor[j][0];\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tif(num == hor[j][0]){\n\t\t\t\t\tnum = hor[j][1];\n\t\t\t\t}\n\t\t\t\telse if(num == hor[j][1]){\n\t\t\t\t\tnum = hor[j][0];\n\t\t\t\t}\n\t\t\t}", "if(num == hor[j][0]){\n\t\t\t\t\tnum = hor[j][1];\n\t\t\t\t}\n\t\t\t\telse if(num == hor[j][1]){\n\t\t\t\t\tnum = hor[j][0];\n\t\t\t\t}", "num == hor[j][0]", "num", "hor[j][0]", "hor[j]", "hor", "j", "0", "{\n\t\t\t\t\tnum = hor[j][1];\n\t\t\t\t}", "num = hor[j][1]", "num", "hor[j][1]", "hor[j]", "hor", "j", "1", "if(num == hor[j][1]){\n\t\t\t\t\tnum = hor[j][0];\n\t\t\t\t}", "num == hor[j][1]", "num", "hor[j][1]", "hor[j]", "hor", "j", "1", "{\n\t\t\t\t\tnum = hor[j][0];\n\t\t\t\t}", "num = hor[j][0]", "num", "hor[j][0]", "hor[j]", "hor", "j", "0", "ver[num - 1] = i", "ver[num - 1]", "ver", "num - 1", "num", "1", "i", "for(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(ver[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(ver[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(ver[i]);\n\t\t}", "System.out.println(ver[i])", "System.out.println", "System.out", "System", "System.out", "ver[i]", "ver", "i", "public class Main {\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tdoIt();\n\t}\n\tpublic static void doIt(){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[][] hor = new int[n][2];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString str = sc.next();\n\t\t\tString[] ss = str.split(\",\");\n\t\t\t//System.out.println(str);\n\t\t\thor[i][0] = Integer.parseInt(ss[0]);\n\t\t\t//System.out.println(hor[i][0]);\n\t\t\thor[i][1] = Integer.parseInt(ss[1]);\n\t\t\t//System.out.println(hor[i][1]);\n\t\t}\n\t\t\n\t\tint[] ver = new int[w];\n\t\tfor(int i = 1; i <= w; i++){\n\t\t\tint num = i;\n\t\t\tfor(int j = 0; j < n; j++){\n\t\t\t\tif(num == hor[j][0]){\n\t\t\t\t\tnum = hor[j][1];\n\t\t\t\t}\n\t\t\t\telse if(num == hor[j][1]){\n\t\t\t\t\tnum = hor[j][0];\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(num);\n\t\t\tver[num - 1] = i;\n\t\t}\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(ver[i]);\n\t\t}\n\t}\n\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tdoIt();\n\t}\n\tpublic static void doIt(){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[][] hor = new int[n][2];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString str = sc.next();\n\t\t\tString[] ss = str.split(\",\");\n\t\t\t//System.out.println(str);\n\t\t\thor[i][0] = Integer.parseInt(ss[0]);\n\t\t\t//System.out.println(hor[i][0]);\n\t\t\thor[i][1] = Integer.parseInt(ss[1]);\n\t\t\t//System.out.println(hor[i][1]);\n\t\t}\n\t\t\n\t\tint[] ver = new int[w];\n\t\tfor(int i = 1; i <= w; i++){\n\t\t\tint num = i;\n\t\t\tfor(int j = 0; j < n; j++){\n\t\t\t\tif(num == hor[j][0]){\n\t\t\t\t\tnum = hor[j][1];\n\t\t\t\t}\n\t\t\t\telse if(num == hor[j][1]){\n\t\t\t\t\tnum = hor[j][0];\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(num);\n\t\t\tver[num - 1] = i;\n\t\t}\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tSystem.out.println(ver[i]);\n\t\t}\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub doIt(); } public static void doIt(){ Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int n = sc.nextInt(); int[][] hor = new int[n][2]; for(int i = 0; i < n; i++){ String str = sc.next(); String[] ss = str.split(","); //System.out.println(str); hor[i][0] = Integer.parseInt(ss[0]); //System.out.println(hor[i][0]); hor[i][1] = Integer.parseInt(ss[1]); //System.out.println(hor[i][1]); } int[] ver = new int[w]; for(int i = 1; i <= w; i++){ int num = i; for(int j = 0; j < n; j++){ if(num == hor[j][0]){ num = hor[j][1]; } else if(num == hor[j][1]){ num = hor[j][0]; } } //System.out.println(num); ver[num - 1] = i; } for(int i = 0; i < w; i++){ System.out.println(ver[i]); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 17, 41, 13, 17, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 20, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 13, 0, 18, 13, 17, 4, 18, 13, 18, 13, 17, 0, 18, 13, 17, 4, 18, 13, 18, 13, 17, 4, 18, 13, 18, 13, 17, 18, 13, 17, 4, 18, 13, 18, 13, 17, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 2, 4, 18, 13, 13, 17, 23, 13, 12, 13, 30, 41, 13, 20, 17, 41, 13, 4, 18, 4, 18, 13, 17, 0, 18, 13, 17, 4, 18, 13, 18, 13, 17, 0, 18, 13, 17, 4, 18, 13, 18, 13, 17, 29, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 171, 8 ], [ 171, 9 ], [ 9, 10 ], [ 9, 11 ], [ 171, 12 ], [ 12, 13 ], [ 12, 14 ], [ 171, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 17, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 17, 28 ], [ 28, 29 ], [ 28, 30 ], [ 17, 31 ], [ 31, 32 ], [ 31, 33 ], [ 17, 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 ], [ 48, 51 ], [ 17, 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 ], [ 64, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 69, 73 ], [ 73, 74 ], [ 74, 75 ], [ 73, 76 ], [ 76, 77 ], [ 76, 78 ], [ 64, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 79, 83 ], [ 83, 84 ], [ 84, 85 ], [ 83, 86 ], [ 86, 87 ], [ 86, 88 ], [ 64, 89 ], [ 89, 90 ], [ 90, 91 ], [ 89, 92 ], [ 92, 93 ], [ 92, 94 ], [ 89, 95 ], [ 95, 96 ], [ 95, 97 ], [ 64, 98 ], [ 98, 99 ], [ 99, 100 ], [ 98, 101 ], [ 101, 102 ], [ 101, 103 ], [ 98, 104 ], [ 104, 105 ], [ 104, 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 ], [ 119, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 120, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 126, 129 ], [ 125, 130 ], [ 15, 131 ], [ 131, 132 ], [ 171, 133 ], [ 133, 134 ], [ 133, 135 ], [ 135, 136 ], [ 136, 137 ], [ 136, 138 ], [ 135, 140 ], [ 140, 141 ], [ 140, 142 ], [ 142, 143 ], [ 143, 144 ], [ 144, 145 ], [ 145, 146 ], [ 142, 147 ], [ 135, 148 ], [ 148, 149 ], [ 149, 150 ], [ 149, 151 ], [ 148, 152 ], [ 152, 153 ], [ 153, 154 ], [ 152, 155 ], [ 155, 156 ], [ 155, 157 ], [ 135, 158 ], [ 158, 159 ], [ 159, 160 ], [ 159, 161 ], [ 158, 162 ], [ 162, 163 ], [ 163, 164 ], [ 162, 165 ], [ 165, 166 ], [ 165, 167 ], [ 135, 168 ], [ 168, 169 ], [ 0, 170 ], [ 170, 171 ], [ 170, 172 ] ]
[ "import java.util.ArrayList;\nimport java.util.Scanner;\n\n\npublic class Main {\n\tprivate\tstatic\tScanner\t\t\t\tstdin = null;\n\tprivate\tstatic\tArrayList<Integer>\tlist = null;\n\n\tstatic {\n\t\tlist = new ArrayList<Integer>();\n\t\tstdin = new Scanner(System.in);\n\t}\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tint\t\tnLine = stdin.nextInt();\n\t\tint\t\tnCross = stdin.nextInt();\n\t\tint[]\taCross = null;\n\t\tint[]\taIndex = new int[2];\n\n\t\tfor(int i = 1; i <= nLine; i++) {\n\t\t\tlist.add(i);\n\t\t}\n\n\t\tfor(int nLoop = 1; nLoop <= nCross; nLoop++) {\n\t\t\taCross = parseCross();\n\t\t\taIndex[0] = list.indexOf(aCross[0]);\n\t\t\taIndex[1] = list.indexOf(aCross[1]);\n\t\t\tlist.set(aIndex[1], aCross[0]);\n\t\t\tlist.set(aIndex[0], aCross[1]);\n\t\t}\n\n\t\tfor(int i = 1; i <= nLine; i++) {\n\t\t\tSystem.out.println(list.indexOf(i) + 1);\n\t\t}\n\t}\n\n\tprivate static int[] parseCross() {\n\t\tint[]\t\taCross = new int[2];\n\t\tString[]\taNum = stdin.next().split(\",\");\n\n\t\taCross[0] = Integer.parseInt(aNum[0]);\n\t\taCross[1] = Integer.parseInt(aNum[1]);\n\n\t\treturn aCross;\n\t}\n}", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tprivate\tstatic\tScanner\t\t\t\tstdin = null;\n\tprivate\tstatic\tArrayList<Integer>\tlist = null;\n\n\tstatic {\n\t\tlist = new ArrayList<Integer>();\n\t\tstdin = new Scanner(System.in);\n\t}\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tint\t\tnLine = stdin.nextInt();\n\t\tint\t\tnCross = stdin.nextInt();\n\t\tint[]\taCross = null;\n\t\tint[]\taIndex = new int[2];\n\n\t\tfor(int i = 1; i <= nLine; i++) {\n\t\t\tlist.add(i);\n\t\t}\n\n\t\tfor(int nLoop = 1; nLoop <= nCross; nLoop++) {\n\t\t\taCross = parseCross();\n\t\t\taIndex[0] = list.indexOf(aCross[0]);\n\t\t\taIndex[1] = list.indexOf(aCross[1]);\n\t\t\tlist.set(aIndex[1], aCross[0]);\n\t\t\tlist.set(aIndex[0], aCross[1]);\n\t\t}\n\n\t\tfor(int i = 1; i <= nLine; i++) {\n\t\t\tSystem.out.println(list.indexOf(i) + 1);\n\t\t}\n\t}\n\n\tprivate static int[] parseCross() {\n\t\tint[]\t\taCross = new int[2];\n\t\tString[]\taNum = stdin.next().split(\",\");\n\n\t\taCross[0] = Integer.parseInt(aNum[0]);\n\t\taCross[1] = Integer.parseInt(aNum[1]);\n\n\t\treturn aCross;\n\t}\n}", "Main", "private\tstatic\tScanner\t\t\t\tstdin = null;", "stdin", "null", "private\tstatic\tArrayList<Integer>\tlist = null;", "list", "null", "/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tint\t\tnLine = stdin.nextInt();\n\t\tint\t\tnCross = stdin.nextInt();\n\t\tint[]\taCross = null;\n\t\tint[]\taIndex = new int[2];\n\n\t\tfor(int i = 1; i <= nLine; i++) {\n\t\t\tlist.add(i);\n\t\t}\n\n\t\tfor(int nLoop = 1; nLoop <= nCross; nLoop++) {\n\t\t\taCross = parseCross();\n\t\t\taIndex[0] = list.indexOf(aCross[0]);\n\t\t\taIndex[1] = list.indexOf(aCross[1]);\n\t\t\tlist.set(aIndex[1], aCross[0]);\n\t\t\tlist.set(aIndex[0], aCross[1]);\n\t\t}\n\n\t\tfor(int i = 1; i <= nLine; i++) {\n\t\t\tSystem.out.println(list.indexOf(i) + 1);\n\t\t}\n\t}", "main", "{\n\t\t// TODO Auto-generated method stub\n\t\tint\t\tnLine = stdin.nextInt();\n\t\tint\t\tnCross = stdin.nextInt();\n\t\tint[]\taCross = null;\n\t\tint[]\taIndex = new int[2];\n\n\t\tfor(int i = 1; i <= nLine; i++) {\n\t\t\tlist.add(i);\n\t\t}\n\n\t\tfor(int nLoop = 1; nLoop <= nCross; nLoop++) {\n\t\t\taCross = parseCross();\n\t\t\taIndex[0] = list.indexOf(aCross[0]);\n\t\t\taIndex[1] = list.indexOf(aCross[1]);\n\t\t\tlist.set(aIndex[1], aCross[0]);\n\t\t\tlist.set(aIndex[0], aCross[1]);\n\t\t}\n\n\t\tfor(int i = 1; i <= nLine; i++) {\n\t\t\tSystem.out.println(list.indexOf(i) + 1);\n\t\t}\n\t}", "int\t\tnLine = stdin.nextInt();", "nLine", "stdin.nextInt()", "stdin.nextInt", "stdin", "int\t\tnCross = stdin.nextInt();", "nCross", "stdin.nextInt()", "stdin.nextInt", "stdin", "int[]\taCross = null;", "aCross", "null", "int[]\taIndex = new int[2];", "aIndex", "new int[2]", "2", "for(int i = 1; i <= nLine; i++) {\n\t\t\tlist.add(i);\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= nLine", "i", "nLine", "i++", "i++", "i", "{\n\t\t\tlist.add(i);\n\t\t}", "{\n\t\t\tlist.add(i);\n\t\t}", "list.add(i)", "list.add", "list", "i", "for(int nLoop = 1; nLoop <= nCross; nLoop++) {\n\t\t\taCross = parseCross();\n\t\t\taIndex[0] = list.indexOf(aCross[0]);\n\t\t\taIndex[1] = list.indexOf(aCross[1]);\n\t\t\tlist.set(aIndex[1], aCross[0]);\n\t\t\tlist.set(aIndex[0], aCross[1]);\n\t\t}", "int nLoop = 1;", "int nLoop = 1;", "nLoop", "1", "nLoop <= nCross", "nLoop", "nCross", "nLoop++", "nLoop++", "nLoop", "{\n\t\t\taCross = parseCross();\n\t\t\taIndex[0] = list.indexOf(aCross[0]);\n\t\t\taIndex[1] = list.indexOf(aCross[1]);\n\t\t\tlist.set(aIndex[1], aCross[0]);\n\t\t\tlist.set(aIndex[0], aCross[1]);\n\t\t}", "{\n\t\t\taCross = parseCross();\n\t\t\taIndex[0] = list.indexOf(aCross[0]);\n\t\t\taIndex[1] = list.indexOf(aCross[1]);\n\t\t\tlist.set(aIndex[1], aCross[0]);\n\t\t\tlist.set(aIndex[0], aCross[1]);\n\t\t}", "aCross = parseCross()", "aCross", "parseCross()", "parseCross", "aIndex[0] = list.indexOf(aCross[0])", "aIndex[0]", "aIndex", "0", "list.indexOf(aCross[0])", "list.indexOf", "list", "aCross[0]", "aCross", "0", "aIndex[1] = list.indexOf(aCross[1])", "aIndex[1]", "aIndex", "1", "list.indexOf(aCross[1])", "list.indexOf", "list", "aCross[1]", "aCross", "1", "list.set(aIndex[1], aCross[0])", "list.set", "list", "aIndex[1]", "aIndex", "1", "aCross[0]", "aCross", "0", "list.set(aIndex[0], aCross[1])", "list.set", "list", "aIndex[0]", "aIndex", "0", "aCross[1]", "aCross", "1", "for(int i = 1; i <= nLine; i++) {\n\t\t\tSystem.out.println(list.indexOf(i) + 1);\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= nLine", "i", "nLine", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(list.indexOf(i) + 1);\n\t\t}", "{\n\t\t\tSystem.out.println(list.indexOf(i) + 1);\n\t\t}", "System.out.println(list.indexOf(i) + 1)", "System.out.println", "System.out", "System", "System.out", "list.indexOf(i) + 1", "list.indexOf(i)", "list.indexOf", "list", "i", "1", "String[] args", "args", "private static int[] parseCross() {\n\t\tint[]\t\taCross = new int[2];\n\t\tString[]\taNum = stdin.next().split(\",\");\n\n\t\taCross[0] = Integer.parseInt(aNum[0]);\n\t\taCross[1] = Integer.parseInt(aNum[1]);\n\n\t\treturn aCross;\n\t}", "parseCross", "{\n\t\tint[]\t\taCross = new int[2];\n\t\tString[]\taNum = stdin.next().split(\",\");\n\n\t\taCross[0] = Integer.parseInt(aNum[0]);\n\t\taCross[1] = Integer.parseInt(aNum[1]);\n\n\t\treturn aCross;\n\t}", "int[]\t\taCross = new int[2];", "aCross", "new int[2]", "2", "String[]\taNum = stdin.next().split(\",\");", "aNum", "stdin.next().split(\",\")", "stdin.next().split", "stdin.next()", "stdin.next", "stdin", "\",\"", "aCross[0] = Integer.parseInt(aNum[0])", "aCross[0]", "aCross", "0", "Integer.parseInt(aNum[0])", "Integer.parseInt", "Integer", "aNum[0]", "aNum", "0", "aCross[1] = Integer.parseInt(aNum[1])", "aCross[1]", "aCross", "1", "Integer.parseInt(aNum[1])", "Integer.parseInt", "Integer", "aNum[1]", "aNum", "1", "return aCross;", "aCross", "public class Main {\n\tprivate\tstatic\tScanner\t\t\t\tstdin = null;\n\tprivate\tstatic\tArrayList<Integer>\tlist = null;\n\n\tstatic {\n\t\tlist = new ArrayList<Integer>();\n\t\tstdin = new Scanner(System.in);\n\t}\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tint\t\tnLine = stdin.nextInt();\n\t\tint\t\tnCross = stdin.nextInt();\n\t\tint[]\taCross = null;\n\t\tint[]\taIndex = new int[2];\n\n\t\tfor(int i = 1; i <= nLine; i++) {\n\t\t\tlist.add(i);\n\t\t}\n\n\t\tfor(int nLoop = 1; nLoop <= nCross; nLoop++) {\n\t\t\taCross = parseCross();\n\t\t\taIndex[0] = list.indexOf(aCross[0]);\n\t\t\taIndex[1] = list.indexOf(aCross[1]);\n\t\t\tlist.set(aIndex[1], aCross[0]);\n\t\t\tlist.set(aIndex[0], aCross[1]);\n\t\t}\n\n\t\tfor(int i = 1; i <= nLine; i++) {\n\t\t\tSystem.out.println(list.indexOf(i) + 1);\n\t\t}\n\t}\n\n\tprivate static int[] parseCross() {\n\t\tint[]\t\taCross = new int[2];\n\t\tString[]\taNum = stdin.next().split(\",\");\n\n\t\taCross[0] = Integer.parseInt(aNum[0]);\n\t\taCross[1] = Integer.parseInt(aNum[1]);\n\n\t\treturn aCross;\n\t}\n}", "public class Main {\n\tprivate\tstatic\tScanner\t\t\t\tstdin = null;\n\tprivate\tstatic\tArrayList<Integer>\tlist = null;\n\n\tstatic {\n\t\tlist = new ArrayList<Integer>();\n\t\tstdin = new Scanner(System.in);\n\t}\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tint\t\tnLine = stdin.nextInt();\n\t\tint\t\tnCross = stdin.nextInt();\n\t\tint[]\taCross = null;\n\t\tint[]\taIndex = new int[2];\n\n\t\tfor(int i = 1; i <= nLine; i++) {\n\t\t\tlist.add(i);\n\t\t}\n\n\t\tfor(int nLoop = 1; nLoop <= nCross; nLoop++) {\n\t\t\taCross = parseCross();\n\t\t\taIndex[0] = list.indexOf(aCross[0]);\n\t\t\taIndex[1] = list.indexOf(aCross[1]);\n\t\t\tlist.set(aIndex[1], aCross[0]);\n\t\t\tlist.set(aIndex[0], aCross[1]);\n\t\t}\n\n\t\tfor(int i = 1; i <= nLine; i++) {\n\t\t\tSystem.out.println(list.indexOf(i) + 1);\n\t\t}\n\t}\n\n\tprivate static int[] parseCross() {\n\t\tint[]\t\taCross = new int[2];\n\t\tString[]\taNum = stdin.next().split(\",\");\n\n\t\taCross[0] = Integer.parseInt(aNum[0]);\n\t\taCross[1] = Integer.parseInt(aNum[1]);\n\n\t\treturn aCross;\n\t}\n}", "Main" ]
import java.util.ArrayList; import java.util.Scanner; public class Main { private static Scanner stdin = null; private static ArrayList<Integer> list = null; static { list = new ArrayList<Integer>(); stdin = new Scanner(System.in); } /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub int nLine = stdin.nextInt(); int nCross = stdin.nextInt(); int[] aCross = null; int[] aIndex = new int[2]; for(int i = 1; i <= nLine; i++) { list.add(i); } for(int nLoop = 1; nLoop <= nCross; nLoop++) { aCross = parseCross(); aIndex[0] = list.indexOf(aCross[0]); aIndex[1] = list.indexOf(aCross[1]); list.set(aIndex[1], aCross[0]); list.set(aIndex[0], aCross[1]); } for(int i = 1; i <= nLine; i++) { System.out.println(list.indexOf(i) + 1); } } private static int[] parseCross() { int[] aCross = new int[2]; String[] aNum = stdin.next().split(","); aCross[0] = Integer.parseInt(aNum[0]); aCross[1] = Integer.parseInt(aNum[1]); return aCross; } }
[ 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, 17, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 0, 13, 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 ], [ 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 ], [ 58, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 65, 66 ], [ 58, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 70, 71 ], [ 69, 72 ], [ 58, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 75, 78 ], [ 78, 79 ], [ 78, 80 ], [ 58, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 84, 85 ], [ 83, 86 ], [ 86, 87 ], [ 86, 88 ], [ 58, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 93, 95 ], [ 58, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 99, 101 ], [ 96, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 104, 106 ], [ 58, 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;\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 T[] = new int[w];\n\t\tfor(int i=0;i<w;i++){\n\t\t\t\tT[i]=i+1;\n\t\t\t\t//System.out.println(T[i]);\n\t\t\t}\n\t\tint n = sc.nextInt();\n\t\t\tfor(int i = 0;i<n;i++ ){\n\t\t\t\tint temp = 0;\n\t\t\t\tString A = sc.next();\n\t\t\t\tString[] fruit = A.split(\",\");\n\t\t\t\tint a = Integer.parseInt(fruit[0]);\n\t\t\t\tint b = Integer.parseInt(fruit[1]);\n\t\t\t\ttemp = T[a-1];\n\t\t\t\tT[a-1]=T[b-1];\n\t\t\t\tT[b-1]=temp;\n\t\t\t\t\n\t\t\t}\n\t\t\tfor(int i = 0;i<w;i++){\n\t\t\t\tSystem.out.println(T[i]);\n\t\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 T[] = new int[w];\n\t\tfor(int i=0;i<w;i++){\n\t\t\t\tT[i]=i+1;\n\t\t\t\t//System.out.println(T[i]);\n\t\t\t}\n\t\tint n = sc.nextInt();\n\t\t\tfor(int i = 0;i<n;i++ ){\n\t\t\t\tint temp = 0;\n\t\t\t\tString A = sc.next();\n\t\t\t\tString[] fruit = A.split(\",\");\n\t\t\t\tint a = Integer.parseInt(fruit[0]);\n\t\t\t\tint b = Integer.parseInt(fruit[1]);\n\t\t\t\ttemp = T[a-1];\n\t\t\t\tT[a-1]=T[b-1];\n\t\t\t\tT[b-1]=temp;\n\t\t\t\t\n\t\t\t}\n\t\t\tfor(int i = 0;i<w;i++){\n\t\t\t\tSystem.out.println(T[i]);\n\t\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 T[] = new int[w];\n\t\tfor(int i=0;i<w;i++){\n\t\t\t\tT[i]=i+1;\n\t\t\t\t//System.out.println(T[i]);\n\t\t\t}\n\t\tint n = sc.nextInt();\n\t\t\tfor(int i = 0;i<n;i++ ){\n\t\t\t\tint temp = 0;\n\t\t\t\tString A = sc.next();\n\t\t\t\tString[] fruit = A.split(\",\");\n\t\t\t\tint a = Integer.parseInt(fruit[0]);\n\t\t\t\tint b = Integer.parseInt(fruit[1]);\n\t\t\t\ttemp = T[a-1];\n\t\t\t\tT[a-1]=T[b-1];\n\t\t\t\tT[b-1]=temp;\n\t\t\t\t\n\t\t\t}\n\t\t\tfor(int i = 0;i<w;i++){\n\t\t\t\tSystem.out.println(T[i]);\n\t\t\t}\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint T[] = new int[w];\n\t\tfor(int i=0;i<w;i++){\n\t\t\t\tT[i]=i+1;\n\t\t\t\t//System.out.println(T[i]);\n\t\t\t}\n\t\tint n = sc.nextInt();\n\t\t\tfor(int i = 0;i<n;i++ ){\n\t\t\t\tint temp = 0;\n\t\t\t\tString A = sc.next();\n\t\t\t\tString[] fruit = A.split(\",\");\n\t\t\t\tint a = Integer.parseInt(fruit[0]);\n\t\t\t\tint b = Integer.parseInt(fruit[1]);\n\t\t\t\ttemp = T[a-1];\n\t\t\t\tT[a-1]=T[b-1];\n\t\t\t\tT[b-1]=temp;\n\t\t\t\t\n\t\t\t}\n\t\t\tfor(int i = 0;i<w;i++){\n\t\t\t\tSystem.out.println(T[i]);\n\t\t\t}\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int w = sc.nextInt();", "w", "sc.nextInt()", "sc.nextInt", "sc", "int T[] = new int[w];", "T", "new int[w]", "w", "for(int i=0;i<w;i++){\n\t\t\t\tT[i]=i+1;\n\t\t\t\t//System.out.println(T[i]);\n\t\t\t}", "int i=0;", "int i=0;", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "{\n\t\t\t\tT[i]=i+1;\n\t\t\t\t//System.out.println(T[i]);\n\t\t\t}", "{\n\t\t\t\tT[i]=i+1;\n\t\t\t\t//System.out.println(T[i]);\n\t\t\t}", "T[i]=i+1", "T[i]", "T", "i", "i+1", "i", "1", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "for(int i = 0;i<n;i++ ){\n\t\t\t\tint temp = 0;\n\t\t\t\tString A = sc.next();\n\t\t\t\tString[] fruit = A.split(\",\");\n\t\t\t\tint a = Integer.parseInt(fruit[0]);\n\t\t\t\tint b = Integer.parseInt(fruit[1]);\n\t\t\t\ttemp = T[a-1];\n\t\t\t\tT[a-1]=T[b-1];\n\t\t\t\tT[b-1]=temp;\n\t\t\t\t\n\t\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t\t\t\tint temp = 0;\n\t\t\t\tString A = sc.next();\n\t\t\t\tString[] fruit = A.split(\",\");\n\t\t\t\tint a = Integer.parseInt(fruit[0]);\n\t\t\t\tint b = Integer.parseInt(fruit[1]);\n\t\t\t\ttemp = T[a-1];\n\t\t\t\tT[a-1]=T[b-1];\n\t\t\t\tT[b-1]=temp;\n\t\t\t\t\n\t\t\t}", "{\n\t\t\t\tint temp = 0;\n\t\t\t\tString A = sc.next();\n\t\t\t\tString[] fruit = A.split(\",\");\n\t\t\t\tint a = Integer.parseInt(fruit[0]);\n\t\t\t\tint b = Integer.parseInt(fruit[1]);\n\t\t\t\ttemp = T[a-1];\n\t\t\t\tT[a-1]=T[b-1];\n\t\t\t\tT[b-1]=temp;\n\t\t\t\t\n\t\t\t}", "int temp = 0;", "temp", "0", "String A = sc.next();", "A", "sc.next()", "sc.next", "sc", "String[] fruit = A.split(\",\");", "fruit", "A.split(\",\")", "A.split", "A", "\",\"", "int a = Integer.parseInt(fruit[0]);", "a", "Integer.parseInt(fruit[0])", "Integer.parseInt", "Integer", "fruit[0]", "fruit", "0", "int b = Integer.parseInt(fruit[1]);", "b", "Integer.parseInt(fruit[1])", "Integer.parseInt", "Integer", "fruit[1]", "fruit", "1", "temp = T[a-1]", "temp", "T[a-1]", "T", "a-1", "a", "1", "T[a-1]=T[b-1]", "T[a-1]", "T", "a-1", "a", "1", "T[b-1]", "T", "b-1", "b", "1", "T[b-1]=temp", "T[b-1]", "T", "b-1", "b", "1", "temp", "for(int i = 0;i<w;i++){\n\t\t\t\tSystem.out.println(T[i]);\n\t\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "{\n\t\t\t\tSystem.out.println(T[i]);\n\t\t\t}", "{\n\t\t\t\tSystem.out.println(T[i]);\n\t\t\t}", "System.out.println(T[i])", "System.out.println", "System.out", "System", "System.out", "T[i]", "T", "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 T[] = new int[w];\n\t\tfor(int i=0;i<w;i++){\n\t\t\t\tT[i]=i+1;\n\t\t\t\t//System.out.println(T[i]);\n\t\t\t}\n\t\tint n = sc.nextInt();\n\t\t\tfor(int i = 0;i<n;i++ ){\n\t\t\t\tint temp = 0;\n\t\t\t\tString A = sc.next();\n\t\t\t\tString[] fruit = A.split(\",\");\n\t\t\t\tint a = Integer.parseInt(fruit[0]);\n\t\t\t\tint b = Integer.parseInt(fruit[1]);\n\t\t\t\ttemp = T[a-1];\n\t\t\t\tT[a-1]=T[b-1];\n\t\t\t\tT[b-1]=temp;\n\t\t\t\t\n\t\t\t}\n\t\t\tfor(int i = 0;i<w;i++){\n\t\t\t\tSystem.out.println(T[i]);\n\t\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 T[] = new int[w];\n\t\tfor(int i=0;i<w;i++){\n\t\t\t\tT[i]=i+1;\n\t\t\t\t//System.out.println(T[i]);\n\t\t\t}\n\t\tint n = sc.nextInt();\n\t\t\tfor(int i = 0;i<n;i++ ){\n\t\t\t\tint temp = 0;\n\t\t\t\tString A = sc.next();\n\t\t\t\tString[] fruit = A.split(\",\");\n\t\t\t\tint a = Integer.parseInt(fruit[0]);\n\t\t\t\tint b = Integer.parseInt(fruit[1]);\n\t\t\t\ttemp = T[a-1];\n\t\t\t\tT[a-1]=T[b-1];\n\t\t\t\tT[b-1]=temp;\n\t\t\t\t\n\t\t\t}\n\t\t\tfor(int i = 0;i<w;i++){\n\t\t\t\tSystem.out.println(T[i]);\n\t\t\t}\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String args[]){ Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int T[] = new int[w]; for(int i=0;i<w;i++){ T[i]=i+1; //System.out.println(T[i]); } int n = sc.nextInt(); for(int i = 0;i<n;i++ ){ int temp = 0; String A = sc.next(); String[] fruit = A.split(","); int a = Integer.parseInt(fruit[0]); int b = Integer.parseInt(fruit[1]); temp = T[a-1]; T[a-1]=T[b-1]; T[b-1]=temp; } for(int i = 0;i<w;i++){ System.out.println(T[i]); } } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 17, 41, 13, 41, 13, 20, 13, 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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 18, 18, 13, 13, 17, 13, 0, 13, 18, 18, 13, 13, 17, 14, 2, 18, 18, 13, 13, 17, 13, 0, 13, 18, 18, 13, 13, 17, 0, 18, 13, 2, 13, 17, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 12, 13, 30, 4, 18, 20, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 174, 5 ], [ 174, 6 ], [ 6, 7 ], [ 6, 8 ], [ 174, 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, 27 ], [ 27, 28 ], [ 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 ], [ 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 ], [ 11, 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 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 109, 113 ], [ 108, 114 ], [ 107, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 118, 119 ], [ 118, 120 ], [ 117, 121 ], [ 107, 122 ], [ 122, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 124, 128 ], [ 123, 129 ], [ 122, 130 ], [ 130, 131 ], [ 130, 132 ], [ 132, 133 ], [ 133, 134 ], [ 133, 135 ], [ 132, 136 ], [ 90, 137 ], [ 137, 138 ], [ 138, 139 ], [ 138, 140 ], [ 140, 141 ], [ 140, 142 ], [ 137, 143 ], [ 11, 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 ], [ 174, 165 ], [ 165, 166 ], [ 165, 167 ], [ 167, 168 ], [ 168, 169 ], [ 169, 170 ], [ 165, 171 ], [ 171, 172 ], [ 0, 173 ], [ 173, 174 ], [ 173, 175 ] ]
[ "import java.util.Scanner;\n\n\npublic class Main {\n\t\n\tScanner sc = new Scanner(System.in);\n\t\n\tvoid run() {\n\t\t\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint[][] h = new int [n][2];\n\t\t\n\t\tString[] s;\n\t\tint[] ans = new int [w];\n\t\t\n\t\tfor (int i=0;i<n;i++) {\n\t\t\ts = sc.next().split(\",\");\n\t\t\t\n\t\t\th[i][0] = Integer.parseInt(s[0]);\n\t\t\th[i][1] = Integer.parseInt(s[1]);\n\t\t\t\n\t\t}\n\t\t\n\t\tfor (int i=1;i<=w;i++) {\n\t\t\t\n\t\t\tint state = i;\n\t\t\t\n\t\t\tfor (int j=0;j<n;j++) {\n\t\t\t\t\n\t\t\t\tif ( h[j][0] == state )\n\t\t\t\t\tstate = h[j][1];\n\t\t\t\telse if ( h[j][1] == state )\n\t\t\t\t\tstate = h[j][0];\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tans[state-1] = i;\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\t\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\t\n\tScanner sc = new Scanner(System.in);\n\t\n\tvoid run() {\n\t\t\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint[][] h = new int [n][2];\n\t\t\n\t\tString[] s;\n\t\tint[] ans = new int [w];\n\t\t\n\t\tfor (int i=0;i<n;i++) {\n\t\t\ts = sc.next().split(\",\");\n\t\t\t\n\t\t\th[i][0] = Integer.parseInt(s[0]);\n\t\t\th[i][1] = Integer.parseInt(s[1]);\n\t\t\t\n\t\t}\n\t\t\n\t\tfor (int i=1;i<=w;i++) {\n\t\t\t\n\t\t\tint state = i;\n\t\t\t\n\t\t\tfor (int j=0;j<n;j++) {\n\t\t\t\t\n\t\t\t\tif ( h[j][0] == state )\n\t\t\t\t\tstate = h[j][1];\n\t\t\t\telse if ( h[j][1] == state )\n\t\t\t\t\tstate = h[j][0];\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tans[state-1] = i;\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\t\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n}", "Main", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "void run() {\n\t\t\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint[][] h = new int [n][2];\n\t\t\n\t\tString[] s;\n\t\tint[] ans = new int [w];\n\t\t\n\t\tfor (int i=0;i<n;i++) {\n\t\t\ts = sc.next().split(\",\");\n\t\t\t\n\t\t\th[i][0] = Integer.parseInt(s[0]);\n\t\t\th[i][1] = Integer.parseInt(s[1]);\n\t\t\t\n\t\t}\n\t\t\n\t\tfor (int i=1;i<=w;i++) {\n\t\t\t\n\t\t\tint state = i;\n\t\t\t\n\t\t\tfor (int j=0;j<n;j++) {\n\t\t\t\t\n\t\t\t\tif ( h[j][0] == state )\n\t\t\t\t\tstate = h[j][1];\n\t\t\t\telse if ( h[j][1] == state )\n\t\t\t\t\tstate = h[j][0];\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tans[state-1] = i;\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\t\n\t}", "run", "{\n\t\t\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint[][] h = new int [n][2];\n\t\t\n\t\tString[] s;\n\t\tint[] ans = new int [w];\n\t\t\n\t\tfor (int i=0;i<n;i++) {\n\t\t\ts = sc.next().split(\",\");\n\t\t\t\n\t\t\th[i][0] = Integer.parseInt(s[0]);\n\t\t\th[i][1] = Integer.parseInt(s[1]);\n\t\t\t\n\t\t}\n\t\t\n\t\tfor (int i=1;i<=w;i++) {\n\t\t\t\n\t\t\tint state = i;\n\t\t\t\n\t\t\tfor (int j=0;j<n;j++) {\n\t\t\t\t\n\t\t\t\tif ( h[j][0] == state )\n\t\t\t\t\tstate = h[j][1];\n\t\t\t\telse if ( h[j][1] == state )\n\t\t\t\t\tstate = h[j][0];\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tans[state-1] = i;\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\t\n\t}", "int w = sc.nextInt();", "w", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int[][] h = new int [n][2];", "h", "new int [n][2]", "n", "2", "String[] s;", "s", "int[] ans = new int [w];", "ans", "new int [w]", "w", "for (int i=0;i<n;i++) {\n\t\t\ts = sc.next().split(\",\");\n\t\t\t\n\t\t\th[i][0] = Integer.parseInt(s[0]);\n\t\t\th[i][1] = Integer.parseInt(s[1]);\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\ts = sc.next().split(\",\");\n\t\t\t\n\t\t\th[i][0] = Integer.parseInt(s[0]);\n\t\t\th[i][1] = Integer.parseInt(s[1]);\n\t\t\t\n\t\t}", "{\n\t\t\ts = sc.next().split(\",\");\n\t\t\t\n\t\t\th[i][0] = Integer.parseInt(s[0]);\n\t\t\th[i][1] = Integer.parseInt(s[1]);\n\t\t\t\n\t\t}", "s = sc.next().split(\",\")", "s", "sc.next().split(\",\")", "sc.next().split", "sc.next()", "sc.next", "sc", "\",\"", "h[i][0] = Integer.parseInt(s[0])", "h[i][0]", "h[i]", "h", "i", "0", "Integer.parseInt(s[0])", "Integer.parseInt", "Integer", "s[0]", "s", "0", "h[i][1] = Integer.parseInt(s[1])", "h[i][1]", "h[i]", "h", "i", "1", "Integer.parseInt(s[1])", "Integer.parseInt", "Integer", "s[1]", "s", "1", "for (int i=1;i<=w;i++) {\n\t\t\t\n\t\t\tint state = i;\n\t\t\t\n\t\t\tfor (int j=0;j<n;j++) {\n\t\t\t\t\n\t\t\t\tif ( h[j][0] == state )\n\t\t\t\t\tstate = h[j][1];\n\t\t\t\telse if ( h[j][1] == state )\n\t\t\t\t\tstate = h[j][0];\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tans[state-1] = i;\n\t\t}", "int i=1;", "int i=1;", "i", "1", "i<=w", "i", "w", "i++", "i++", "i", "{\n\t\t\t\n\t\t\tint state = i;\n\t\t\t\n\t\t\tfor (int j=0;j<n;j++) {\n\t\t\t\t\n\t\t\t\tif ( h[j][0] == state )\n\t\t\t\t\tstate = h[j][1];\n\t\t\t\telse if ( h[j][1] == state )\n\t\t\t\t\tstate = h[j][0];\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tans[state-1] = i;\n\t\t}", "{\n\t\t\t\n\t\t\tint state = i;\n\t\t\t\n\t\t\tfor (int j=0;j<n;j++) {\n\t\t\t\t\n\t\t\t\tif ( h[j][0] == state )\n\t\t\t\t\tstate = h[j][1];\n\t\t\t\telse if ( h[j][1] == state )\n\t\t\t\t\tstate = h[j][0];\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tans[state-1] = i;\n\t\t}", "int state = i;", "state", "i", "for (int j=0;j<n;j++) {\n\t\t\t\t\n\t\t\t\tif ( h[j][0] == state )\n\t\t\t\t\tstate = h[j][1];\n\t\t\t\telse if ( h[j][1] == state )\n\t\t\t\t\tstate = h[j][0];\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "int j=0;", "int j=0;", "j", "0", "j<n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\t\n\t\t\t\tif ( h[j][0] == state )\n\t\t\t\t\tstate = h[j][1];\n\t\t\t\telse if ( h[j][1] == state )\n\t\t\t\t\tstate = h[j][0];\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "{\n\t\t\t\t\n\t\t\t\tif ( h[j][0] == state )\n\t\t\t\t\tstate = h[j][1];\n\t\t\t\telse if ( h[j][1] == state )\n\t\t\t\t\tstate = h[j][0];\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "if ( h[j][0] == state )\n\t\t\t\t\tstate = h[j][1];\n\t\t\t\telse if ( h[j][1] == state )\n\t\t\t\t\tstate = h[j][0];", "h[j][0] == state", "h[j][0]", "h[j]", "h", "j", "0", "state", "state = h[j][1]", "state", "h[j][1]", "h[j]", "h", "j", "1", "if ( h[j][1] == state )\n\t\t\t\t\tstate = h[j][0];", "h[j][1] == state", "h[j][1]", "h[j]", "h", "j", "1", "state", "state = h[j][0]", "state", "h[j][0]", "h[j]", "h", "j", "0", "ans[state-1] = i", "ans[state-1]", "ans", "state-1", "state", "1", "i", "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", "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\t\n\tScanner sc = new Scanner(System.in);\n\t\n\tvoid run() {\n\t\t\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint[][] h = new int [n][2];\n\t\t\n\t\tString[] s;\n\t\tint[] ans = new int [w];\n\t\t\n\t\tfor (int i=0;i<n;i++) {\n\t\t\ts = sc.next().split(\",\");\n\t\t\t\n\t\t\th[i][0] = Integer.parseInt(s[0]);\n\t\t\th[i][1] = Integer.parseInt(s[1]);\n\t\t\t\n\t\t}\n\t\t\n\t\tfor (int i=1;i<=w;i++) {\n\t\t\t\n\t\t\tint state = i;\n\t\t\t\n\t\t\tfor (int j=0;j<n;j++) {\n\t\t\t\t\n\t\t\t\tif ( h[j][0] == state )\n\t\t\t\t\tstate = h[j][1];\n\t\t\t\telse if ( h[j][1] == state )\n\t\t\t\t\tstate = h[j][0];\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tans[state-1] = i;\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\t\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n}", "public class Main {\n\t\n\tScanner sc = new Scanner(System.in);\n\t\n\tvoid run() {\n\t\t\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint[][] h = new int [n][2];\n\t\t\n\t\tString[] s;\n\t\tint[] ans = new int [w];\n\t\t\n\t\tfor (int i=0;i<n;i++) {\n\t\t\ts = sc.next().split(\",\");\n\t\t\t\n\t\t\th[i][0] = Integer.parseInt(s[0]);\n\t\t\th[i][1] = Integer.parseInt(s[1]);\n\t\t\t\n\t\t}\n\t\t\n\t\tfor (int i=1;i<=w;i++) {\n\t\t\t\n\t\t\tint state = i;\n\t\t\t\n\t\t\tfor (int j=0;j<n;j++) {\n\t\t\t\t\n\t\t\t\tif ( h[j][0] == state )\n\t\t\t\t\tstate = h[j][1];\n\t\t\t\telse if ( h[j][1] == state )\n\t\t\t\t\tstate = h[j][0];\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tans[state-1] = i;\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\t\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { Scanner sc = new Scanner(System.in); void run() { int w = sc.nextInt(); int n = sc.nextInt(); int[][] h = new int [n][2]; String[] s; int[] ans = new int [w]; for (int i=0;i<n;i++) { s = sc.next().split(","); h[i][0] = Integer.parseInt(s[0]); h[i][1] = Integer.parseInt(s[1]); } for (int i=1;i<=w;i++) { int state = i; for (int j=0;j<n;j++) { if ( h[j][0] == state ) state = h[j][1]; else if ( h[j][1] == state ) state = h[j][0]; } ans[state-1] = i; } for (int i=0;i<w;i++) { System.out.println(ans[i]); } } public static void main(String[] args) { new Main().run(); } }
[ 7, 15, 13, 17, 15, 13, 17, 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, 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, 41, 13, 18, 13, 2, 13, 17, 0, 18, 13, 2, 13, 17, 18, 13, 2, 13, 17, 0, 18, 13, 2, 13, 17, 13, 28, 13, 13, 30, 30, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 117, 11 ], [ 117, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 17, 20 ], [ 14, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 14, 26 ], [ 26, 27 ], [ 26, 28 ], [ 14, 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 ], [ 14, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 53, 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 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 67, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 67, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 82, 84 ], [ 67, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 88, 90 ], [ 85, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 93, 95 ], [ 67, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 99, 101 ], [ 96, 102 ], [ 14, 103 ], [ 103, 104 ], [ 103, 105 ], [ 103, 106 ], [ 107, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 108, 113 ], [ 12, 114 ], [ 114, 115 ], [ 0, 116 ], [ 116, 117 ], [ 116, 118 ] ]
[ "import java.lang.System;\nimport java.lang.Exception;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in).useDelimiter(\"\\\\D\");\n\n int w = sc.nextInt();\n int[] ans = new int[w];\n for (int i = 0; i < w; i++) {\n ans[i] = i + 1;\n }\n\n // 並び替え\n int n = sc.nextInt();\n for (int i = 0; i < n; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n int tmp = ans[a - 1];\n ans[a - 1] = ans[b - 1];\n ans[b - 1] = tmp;\n }\n\n // 並び替え結果の出力\n for (int answer: ans) {\n System.out.println(answer);\n }\n }\n}", "import java.lang.System;", "System", "java.lang", "import java.lang.Exception;", "Exception", "java.lang", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in).useDelimiter(\"\\\\D\");\n\n int w = sc.nextInt();\n int[] ans = new int[w];\n for (int i = 0; i < w; i++) {\n ans[i] = i + 1;\n }\n\n // 並び替え\n int n = sc.nextInt();\n for (int i = 0; i < n; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n int tmp = ans[a - 1];\n ans[a - 1] = ans[b - 1];\n ans[b - 1] = tmp;\n }\n\n // 並び替え結果の出力\n for (int answer: ans) {\n System.out.println(answer);\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in).useDelimiter(\"\\\\D\");\n\n int w = sc.nextInt();\n int[] ans = new int[w];\n for (int i = 0; i < w; i++) {\n ans[i] = i + 1;\n }\n\n // 並び替え\n int n = sc.nextInt();\n for (int i = 0; i < n; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n int tmp = ans[a - 1];\n ans[a - 1] = ans[b - 1];\n ans[b - 1] = tmp;\n }\n\n // 並び替え結果の出力\n for (int answer: ans) {\n System.out.println(answer);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in).useDelimiter(\"\\\\D\");\n\n int w = sc.nextInt();\n int[] ans = new int[w];\n for (int i = 0; i < w; i++) {\n ans[i] = i + 1;\n }\n\n // 並び替え\n int n = sc.nextInt();\n for (int i = 0; i < n; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n int tmp = ans[a - 1];\n ans[a - 1] = ans[b - 1];\n ans[b - 1] = tmp;\n }\n\n // 並び替え結果の出力\n for (int answer: ans) {\n System.out.println(answer);\n }\n }", "Scanner sc = new Scanner(System.in).useDelimiter(\"\\\\D\");", "sc", "new Scanner(System.in).useDelimiter(\"\\\\D\")", "new Scanner(System.in).useDelimiter", "new Scanner(System.in)", "\"\\\\D\"", "int w = sc.nextInt();", "w", "sc.nextInt()", "sc.nextInt", "sc", "int[] ans = new int[w];", "ans", "new int[w]", "w", "for (int i = 0; i < w; i++) {\n ans[i] = i + 1;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < w", "i", "w", "i++", "i++", "i", "{\n ans[i] = i + 1;\n }", "{\n ans[i] = i + 1;\n }", "ans[i] = i + 1", "ans[i]", "ans", "i", "i + 1", "i", "1", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "for (int i = 0; i < n; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n int tmp = ans[a - 1];\n ans[a - 1] = ans[b - 1];\n ans[b - 1] = tmp;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n int a = sc.nextInt();\n int b = sc.nextInt();\n int tmp = ans[a - 1];\n ans[a - 1] = ans[b - 1];\n ans[b - 1] = tmp;\n }", "{\n int a = sc.nextInt();\n int b = sc.nextInt();\n int tmp = ans[a - 1];\n ans[a - 1] = ans[b - 1];\n ans[b - 1] = tmp;\n }", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "int b = sc.nextInt();", "b", "sc.nextInt()", "sc.nextInt", "sc", "int tmp = ans[a - 1];", "tmp", "ans[a - 1]", "ans", "a - 1", "a", "1", "ans[a - 1] = ans[b - 1]", "ans[a - 1]", "ans", "a - 1", "a", "1", "ans[b - 1]", "ans", "b - 1", "b", "1", "ans[b - 1] = tmp", "ans[b - 1]", "ans", "b - 1", "b", "1", "tmp", "for (int answer: ans) {\n System.out.println(answer);\n }", "int answer", "ans", "{\n System.out.println(answer);\n }", "{\n System.out.println(answer);\n }", "System.out.println(answer)", "System.out.println", "System.out", "System", "System.out", "answer", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in).useDelimiter(\"\\\\D\");\n\n int w = sc.nextInt();\n int[] ans = new int[w];\n for (int i = 0; i < w; i++) {\n ans[i] = i + 1;\n }\n\n // 並び替え\n int n = sc.nextInt();\n for (int i = 0; i < n; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n int tmp = ans[a - 1];\n ans[a - 1] = ans[b - 1];\n ans[b - 1] = tmp;\n }\n\n // 並び替え結果の出力\n for (int answer: ans) {\n System.out.println(answer);\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in).useDelimiter(\"\\\\D\");\n\n int w = sc.nextInt();\n int[] ans = new int[w];\n for (int i = 0; i < w; i++) {\n ans[i] = i + 1;\n }\n\n // 並び替え\n int n = sc.nextInt();\n for (int i = 0; i < n; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n int tmp = ans[a - 1];\n ans[a - 1] = ans[b - 1];\n ans[b - 1] = tmp;\n }\n\n // 並び替え結果の出力\n for (int answer: ans) {\n System.out.println(answer);\n }\n }\n}", "Main" ]
import java.lang.System; import java.lang.Exception; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in).useDelimiter("\\D"); int w = sc.nextInt(); int[] ans = new int[w]; for (int i = 0; i < w; i++) { ans[i] = i + 1; } // 並び替え int n = sc.nextInt(); for (int i = 0; i < n; i++) { int a = sc.nextInt(); int b = sc.nextInt(); int tmp = ans[a - 1]; ans[a - 1] = ans[b - 1]; ans[b - 1] = tmp; } // 並び替え結果の出力 for (int answer: ans) { System.out.println(answer); } } }
[ 7, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 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, 0, 13, 20, 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, 20, 4, 18, 13, 0, 13, 17, 0, 13, 17, 11, 1, 0, 13, 17, 2, 13, 4, 18, 13, 1, 40, 13, 30, 30, 14, 2, 4, 18, 13, 13, 17, 30, 0, 13, 17, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 2, 13, 2, 18, 13, 2, 2, 13, 17, 13, 17, 0, 13, 17, 40, 13, 3, 0, 18, 13, 13, 4, 18, 13, 13, 0, 13, 17, 11, 1, 0, 13, 2, 4, 18, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 13, 0, 13, 2, 2, 18, 13, 13, 17, 13, 0, 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, 4, 18, 13, 2, 18, 13, 13, 17, 4, 18, 13, 23, 13, 23, 13, 12, 13, 30, 4, 18, 20, 18, 13, 13, 18, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 267, 2 ], [ 267, 3 ], [ 3, 4 ], [ 3, 5 ], [ 5, 6 ], [ 6, 7 ], [ 6, 8 ], [ 5, 9 ], [ 9, 10 ], [ 5, 11 ], [ 11, 12 ], [ 5, 13 ], [ 13, 14 ], [ 5, 15 ], [ 15, 16 ], [ 5, 17 ], [ 17, 18 ], [ 5, 19 ], [ 19, 20 ], [ 5, 21 ], [ 21, 22 ], [ 5, 23 ], [ 23, 24 ], [ 5, 25 ], [ 25, 26 ], [ 5, 27 ], [ 27, 28 ], [ 5, 29 ], [ 29, 30 ], [ 5, 31 ], [ 31, 32 ], [ 5, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 5, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 5, 43 ], [ 43, 44 ], [ 43, 45 ], [ 5, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 47, 52 ], [ 52, 53 ], [ 52, 54 ], [ 47, 55 ], [ 55, 56 ], [ 56, 57 ], [ 47, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 59, 63 ], [ 5, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 64, 69 ], [ 69, 70 ], [ 69, 71 ], [ 64, 72 ], [ 72, 73 ], [ 73, 74 ], [ 64, 75 ], [ 76, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 80, 81 ], [ 76, 82 ], [ 82, 83 ], [ 82, 84 ], [ 85, 86 ], [ 86, 87 ], [ 76, 88 ], [ 88, 89 ], [ 88, 90 ], [ 76, 91 ], [ 91, 92 ], [ 91, 93 ], [ 76, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 94, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 102, 103 ], [ 94, 104 ], [ 104, 105 ], [ 105, 106 ], [ 94, 107 ], [ 108, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 111, 114 ], [ 110, 115 ], [ 109, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 116, 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 ], [ 133, 135 ], [ 135, 136 ], [ 135, 137 ], [ 137, 138 ], [ 138, 139 ], [ 138, 140 ], [ 141, 141 ], [ 141, 142 ], [ 141, 143 ], [ 141, 144 ], [ 137, 145 ], [ 132, 146 ], [ 146, 147 ], [ 146, 148 ], [ 116, 149 ], [ 149, 150 ], [ 116, 151 ], [ 109, 152 ], [ 152, 153 ], [ 153, 154 ], [ 153, 155 ], [ 152, 156 ], [ 156, 157 ], [ 157, 158 ], [ 156, 159 ], [ 76, 160 ], [ 160, 161 ], [ 160, 162 ], [ 76, 163 ], [ 163, 164 ], [ 164, 165 ], [ 165, 166 ], [ 165, 167 ], [ 167, 168 ], [ 168, 169 ], [ 169, 170 ], [ 167, 171 ], [ 163, 172 ], [ 172, 173 ], [ 172, 174 ], [ 163, 175 ], [ 175, 176 ], [ 176, 177 ], [ 163, 178 ], [ 179, 179 ], [ 179, 180 ], [ 180, 181 ], [ 181, 182 ], [ 181, 183 ], [ 180, 184 ], [ 184, 185 ], [ 185, 186 ], [ 184, 187 ], [ 179, 188 ], [ 188, 189 ], [ 188, 190 ], [ 190, 191 ], [ 191, 192 ], [ 192, 193 ], [ 192, 194 ], [ 191, 195 ], [ 190, 196 ], [ 179, 197 ], [ 197, 198 ], [ 197, 199 ], [ 76, 200 ], [ 200, 201 ], [ 200, 202 ], [ 202, 203 ], [ 202, 204 ], [ 204, 205 ], [ 204, 206 ], [ 76, 207 ], [ 207, 208 ], [ 208, 209 ], [ 208, 210 ], [ 210, 211 ], [ 210, 212 ], [ 207, 213 ], [ 213, 214 ], [ 213, 215 ], [ 215, 216 ], [ 215, 217 ], [ 76, 218 ], [ 218, 219 ], [ 219, 220 ], [ 219, 221 ], [ 221, 222 ], [ 221, 223 ], [ 218, 224 ], [ 5, 225 ], [ 225, 226 ], [ 226, 227 ], [ 227, 228 ], [ 227, 229 ], [ 225, 230 ], [ 230, 231 ], [ 230, 232 ], [ 225, 233 ], [ 233, 234 ], [ 234, 235 ], [ 225, 236 ], [ 236, 237 ], [ 237, 238 ], [ 238, 239 ], [ 237, 240 ], [ 240, 241 ], [ 241, 242 ], [ 241, 243 ], [ 240, 244 ], [ 5, 245 ], [ 245, 246 ], [ 246, 247 ], [ 3, 248 ], [ 248, 249 ], [ 3, 250 ], [ 250, 251 ], [ 267, 252 ], [ 252, 253 ], [ 252, 254 ], [ 254, 255 ], [ 255, 256 ], [ 256, 257 ], [ 255, 258 ], [ 258, 259 ], [ 258, 260 ], [ 255, 261 ], [ 261, 262 ], [ 261, 263 ], [ 252, 264 ], [ 264, 265 ], [ 0, 266 ], [ 266, 267 ], [ 266, 268 ] ]
[ "public class Main{\n public void run(java.io.InputStream in, java.io.PrintStream out){\n java.util.Scanner sc = new java.util.Scanner(in);\n/*answer*/\n int w, n;\n int[] a;\n int i, j, k, x, y, t, tmp;\n String str;\n char[] ch;\n\n w = sc.nextInt();\n n = sc.nextInt();\n a = new int[w];\n for(i = 0;i < w;i++)a[i] = i;\n\n for(i = 0;i < n;i++){\n str = sc.next();\n ch = new char[str.length()];\n x = 0; y = 0;\n\n for(j = 0;j < str.length();j++){\n if(str.charAt(j) == ','){\n t = 1;\n for(k = 0;k < j;k++){\n x += t * (int)(ch[j - 1 - k] - '0');\n t *= 10;\n }\n j++; break;\n }else ch[j] = str.charAt(j);\n }\n\n t = 1;\n for(k = str.length() - 1;k >= j;k--){\n ch[k] = str.charAt(k);\n y += (int)(ch[k] - '0') * t;\n t *= 10;\n }\n tmp = a[x - 1]; a[x - 1] = a[y - 1]; a[y - 1] = tmp;\n }\n\n for(i = 0;i < w;i++)out.println(a[i] + 1);\n\n sc.close();\n }\n public static void main(String[] args){\n (new Main()).run(System.in, System.out);\n }\n}", "public class Main{\n public void run(java.io.InputStream in, java.io.PrintStream out){\n java.util.Scanner sc = new java.util.Scanner(in);\n/*answer*/\n int w, n;\n int[] a;\n int i, j, k, x, y, t, tmp;\n String str;\n char[] ch;\n\n w = sc.nextInt();\n n = sc.nextInt();\n a = new int[w];\n for(i = 0;i < w;i++)a[i] = i;\n\n for(i = 0;i < n;i++){\n str = sc.next();\n ch = new char[str.length()];\n x = 0; y = 0;\n\n for(j = 0;j < str.length();j++){\n if(str.charAt(j) == ','){\n t = 1;\n for(k = 0;k < j;k++){\n x += t * (int)(ch[j - 1 - k] - '0');\n t *= 10;\n }\n j++; break;\n }else ch[j] = str.charAt(j);\n }\n\n t = 1;\n for(k = str.length() - 1;k >= j;k--){\n ch[k] = str.charAt(k);\n y += (int)(ch[k] - '0') * t;\n t *= 10;\n }\n tmp = a[x - 1]; a[x - 1] = a[y - 1]; a[y - 1] = tmp;\n }\n\n for(i = 0;i < w;i++)out.println(a[i] + 1);\n\n sc.close();\n }\n public static void main(String[] args){\n (new Main()).run(System.in, System.out);\n }\n}", "Main", "public void run(java.io.InputStream in, java.io.PrintStream out){\n java.util.Scanner sc = new java.util.Scanner(in);\n/*answer*/\n int w, n;\n int[] a;\n int i, j, k, x, y, t, tmp;\n String str;\n char[] ch;\n\n w = sc.nextInt();\n n = sc.nextInt();\n a = new int[w];\n for(i = 0;i < w;i++)a[i] = i;\n\n for(i = 0;i < n;i++){\n str = sc.next();\n ch = new char[str.length()];\n x = 0; y = 0;\n\n for(j = 0;j < str.length();j++){\n if(str.charAt(j) == ','){\n t = 1;\n for(k = 0;k < j;k++){\n x += t * (int)(ch[j - 1 - k] - '0');\n t *= 10;\n }\n j++; break;\n }else ch[j] = str.charAt(j);\n }\n\n t = 1;\n for(k = str.length() - 1;k >= j;k--){\n ch[k] = str.charAt(k);\n y += (int)(ch[k] - '0') * t;\n t *= 10;\n }\n tmp = a[x - 1]; a[x - 1] = a[y - 1]; a[y - 1] = tmp;\n }\n\n for(i = 0;i < w;i++)out.println(a[i] + 1);\n\n sc.close();\n }", "run", "{\n java.util.Scanner sc = new java.util.Scanner(in);\n/*answer*/\n int w, n;\n int[] a;\n int i, j, k, x, y, t, tmp;\n String str;\n char[] ch;\n\n w = sc.nextInt();\n n = sc.nextInt();\n a = new int[w];\n for(i = 0;i < w;i++)a[i] = i;\n\n for(i = 0;i < n;i++){\n str = sc.next();\n ch = new char[str.length()];\n x = 0; y = 0;\n\n for(j = 0;j < str.length();j++){\n if(str.charAt(j) == ','){\n t = 1;\n for(k = 0;k < j;k++){\n x += t * (int)(ch[j - 1 - k] - '0');\n t *= 10;\n }\n j++; break;\n }else ch[j] = str.charAt(j);\n }\n\n t = 1;\n for(k = str.length() - 1;k >= j;k--){\n ch[k] = str.charAt(k);\n y += (int)(ch[k] - '0') * t;\n t *= 10;\n }\n tmp = a[x - 1]; a[x - 1] = a[y - 1]; a[y - 1] = tmp;\n }\n\n for(i = 0;i < w;i++)out.println(a[i] + 1);\n\n sc.close();\n }", "java.util.Scanner sc = new java.util.Scanner(in);", "sc", "new java.util.Scanner(in)", "int w", "w", "n;", "n", "int[] a;", "a", "int i", "i", "j", "j", "k", "k", "x", "x", "y", "y", "t", "t", "tmp;", "tmp", "String str;", "str", "char[] ch;", "ch", "w = sc.nextInt()", "w", "sc.nextInt()", "sc.nextInt", "sc", "n = sc.nextInt()", "n", "sc.nextInt()", "sc.nextInt", "sc", "a = new int[w]", "a", "new int[w]", "w", "for(i = 0;i < w;i++)a[i] = i;", "i = 0;", "i = 0", "i", "0", "i < w", "i", "w", "i++", "i++", "i", "a[i] = i;", "a[i] = i", "a[i]", "a", "i", "i", "for(i = 0;i < n;i++){\n str = sc.next();\n ch = new char[str.length()];\n x = 0; y = 0;\n\n for(j = 0;j < str.length();j++){\n if(str.charAt(j) == ','){\n t = 1;\n for(k = 0;k < j;k++){\n x += t * (int)(ch[j - 1 - k] - '0');\n t *= 10;\n }\n j++; break;\n }else ch[j] = str.charAt(j);\n }\n\n t = 1;\n for(k = str.length() - 1;k >= j;k--){\n ch[k] = str.charAt(k);\n y += (int)(ch[k] - '0') * t;\n t *= 10;\n }\n tmp = a[x - 1]; a[x - 1] = a[y - 1]; a[y - 1] = tmp;\n }", "i = 0;", "i = 0", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n str = sc.next();\n ch = new char[str.length()];\n x = 0; y = 0;\n\n for(j = 0;j < str.length();j++){\n if(str.charAt(j) == ','){\n t = 1;\n for(k = 0;k < j;k++){\n x += t * (int)(ch[j - 1 - k] - '0');\n t *= 10;\n }\n j++; break;\n }else ch[j] = str.charAt(j);\n }\n\n t = 1;\n for(k = str.length() - 1;k >= j;k--){\n ch[k] = str.charAt(k);\n y += (int)(ch[k] - '0') * t;\n t *= 10;\n }\n tmp = a[x - 1]; a[x - 1] = a[y - 1]; a[y - 1] = tmp;\n }", "{\n str = sc.next();\n ch = new char[str.length()];\n x = 0; y = 0;\n\n for(j = 0;j < str.length();j++){\n if(str.charAt(j) == ','){\n t = 1;\n for(k = 0;k < j;k++){\n x += t * (int)(ch[j - 1 - k] - '0');\n t *= 10;\n }\n j++; break;\n }else ch[j] = str.charAt(j);\n }\n\n t = 1;\n for(k = str.length() - 1;k >= j;k--){\n ch[k] = str.charAt(k);\n y += (int)(ch[k] - '0') * t;\n t *= 10;\n }\n tmp = a[x - 1]; a[x - 1] = a[y - 1]; a[y - 1] = tmp;\n }", "str = sc.next()", "str", "sc.next()", "sc.next", "sc", "ch = new char[str.length()]", "ch", "new char[str.length()]", "str.length()", "str.length", "str", "x = 0", "x", "0", "y = 0", "y", "0", "for(j = 0;j < str.length();j++){\n if(str.charAt(j) == ','){\n t = 1;\n for(k = 0;k < j;k++){\n x += t * (int)(ch[j - 1 - k] - '0');\n t *= 10;\n }\n j++; break;\n }else ch[j] = str.charAt(j);\n }", "j = 0;", "j = 0", "j", "0", "j < str.length()", "j", "str.length()", "str.length", "str", "j++", "j++", "j", "{\n if(str.charAt(j) == ','){\n t = 1;\n for(k = 0;k < j;k++){\n x += t * (int)(ch[j - 1 - k] - '0');\n t *= 10;\n }\n j++; break;\n }else ch[j] = str.charAt(j);\n }", "{\n if(str.charAt(j) == ','){\n t = 1;\n for(k = 0;k < j;k++){\n x += t * (int)(ch[j - 1 - k] - '0');\n t *= 10;\n }\n j++; break;\n }else ch[j] = str.charAt(j);\n }", "if(str.charAt(j) == ','){\n t = 1;\n for(k = 0;k < j;k++){\n x += t * (int)(ch[j - 1 - k] - '0');\n t *= 10;\n }\n j++; break;\n }else ch[j] = str.charAt(j);", "str.charAt(j) == ','", "str.charAt(j)", "str.charAt", "str", "j", "','", "{\n t = 1;\n for(k = 0;k < j;k++){\n x += t * (int)(ch[j - 1 - k] - '0');\n t *= 10;\n }\n j++; break;\n }", "t = 1", "t", "1", "for(k = 0;k < j;k++){\n x += t * (int)(ch[j - 1 - k] - '0');\n t *= 10;\n }", "k = 0;", "k = 0", "k", "0", "k < j", "k", "j", "k++", "k++", "k", "{\n x += t * (int)(ch[j - 1 - k] - '0');\n t *= 10;\n }", "{\n x += t * (int)(ch[j - 1 - k] - '0');\n t *= 10;\n }", "x += t * (int)(ch[j - 1 - k] - '0')", "x", "t * (int)(ch[j - 1 - k] - '0')", "t", "(int)(ch[j - 1 - k] - '0')", "ch[j - 1 - k]", "ch", "j - 1 - k", "j - 1 - k", "j", "1", "k", "'0'", "t *= 10", "t", "10", "j++", "j", "break;", "ch[j] = str.charAt(j)", "ch[j]", "ch", "j", "str.charAt(j)", "str.charAt", "str", "j", "t = 1", "t", "1", "for(k = str.length() - 1;k >= j;k--){\n ch[k] = str.charAt(k);\n y += (int)(ch[k] - '0') * t;\n t *= 10;\n }", "k = str.length() - 1;", "k = str.length() - 1", "k", "str.length() - 1", "str.length()", "str.length", "str", "1", "k >= j", "k", "j", "k--", "k--", "k", "{\n ch[k] = str.charAt(k);\n y += (int)(ch[k] - '0') * t;\n t *= 10;\n }", "{\n ch[k] = str.charAt(k);\n y += (int)(ch[k] - '0') * t;\n t *= 10;\n }", "ch[k] = str.charAt(k)", "ch[k]", "ch", "k", "str.charAt(k)", "str.charAt", "str", "k", "y += (int)(ch[k] - '0') * t", "y", "(int)(ch[k] - '0') * t", "(int)(ch[k] - '0')", "ch[k]", "ch", "k", "'0'", "t", "t *= 10", "t", "10", "tmp = a[x - 1]", "tmp", "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] = tmp", "a[y - 1]", "a", "y - 1", "y", "1", "tmp", "for(i = 0;i < w;i++)out.println(a[i] + 1);", "i = 0;", "i = 0", "i", "0", "i < w", "i", "w", "i++", "i++", "i", "out.println(a[i] + 1);", "out.println(a[i] + 1)", "out.println", "out", "a[i] + 1", "a[i]", "a", "i", "1", "sc.close()", "sc.close", "sc", "java.io.InputStream in", "in", "java.io.PrintStream out", "out", "public static void main(String[] args){\n (new Main()).run(System.in, System.out);\n }", "main", "{\n (new Main()).run(System.in, System.out);\n }", "(new Main()).run(System.in, System.out)", "(new Main()).run", "(new Main())", "System.in", "System", "System.in", "System.out", "System", "System.out", "String[] args", "args", "public class Main{\n public void run(java.io.InputStream in, java.io.PrintStream out){\n java.util.Scanner sc = new java.util.Scanner(in);\n/*answer*/\n int w, n;\n int[] a;\n int i, j, k, x, y, t, tmp;\n String str;\n char[] ch;\n\n w = sc.nextInt();\n n = sc.nextInt();\n a = new int[w];\n for(i = 0;i < w;i++)a[i] = i;\n\n for(i = 0;i < n;i++){\n str = sc.next();\n ch = new char[str.length()];\n x = 0; y = 0;\n\n for(j = 0;j < str.length();j++){\n if(str.charAt(j) == ','){\n t = 1;\n for(k = 0;k < j;k++){\n x += t * (int)(ch[j - 1 - k] - '0');\n t *= 10;\n }\n j++; break;\n }else ch[j] = str.charAt(j);\n }\n\n t = 1;\n for(k = str.length() - 1;k >= j;k--){\n ch[k] = str.charAt(k);\n y += (int)(ch[k] - '0') * t;\n t *= 10;\n }\n tmp = a[x - 1]; a[x - 1] = a[y - 1]; a[y - 1] = tmp;\n }\n\n for(i = 0;i < w;i++)out.println(a[i] + 1);\n\n sc.close();\n }\n public static void main(String[] args){\n (new Main()).run(System.in, System.out);\n }\n}", "public class Main{\n public void run(java.io.InputStream in, java.io.PrintStream out){\n java.util.Scanner sc = new java.util.Scanner(in);\n/*answer*/\n int w, n;\n int[] a;\n int i, j, k, x, y, t, tmp;\n String str;\n char[] ch;\n\n w = sc.nextInt();\n n = sc.nextInt();\n a = new int[w];\n for(i = 0;i < w;i++)a[i] = i;\n\n for(i = 0;i < n;i++){\n str = sc.next();\n ch = new char[str.length()];\n x = 0; y = 0;\n\n for(j = 0;j < str.length();j++){\n if(str.charAt(j) == ','){\n t = 1;\n for(k = 0;k < j;k++){\n x += t * (int)(ch[j - 1 - k] - '0');\n t *= 10;\n }\n j++; break;\n }else ch[j] = str.charAt(j);\n }\n\n t = 1;\n for(k = str.length() - 1;k >= j;k--){\n ch[k] = str.charAt(k);\n y += (int)(ch[k] - '0') * t;\n t *= 10;\n }\n tmp = a[x - 1]; a[x - 1] = a[y - 1]; a[y - 1] = tmp;\n }\n\n for(i = 0;i < w;i++)out.println(a[i] + 1);\n\n sc.close();\n }\n public static void main(String[] args){\n (new Main()).run(System.in, System.out);\n }\n}", "Main" ]
public class Main{ public void run(java.io.InputStream in, java.io.PrintStream out){ java.util.Scanner sc = new java.util.Scanner(in); /*answer*/ int w, n; int[] a; int i, j, k, x, y, t, tmp; String str; char[] ch; w = sc.nextInt(); n = sc.nextInt(); a = new int[w]; for(i = 0;i < w;i++)a[i] = i; for(i = 0;i < n;i++){ str = sc.next(); ch = new char[str.length()]; x = 0; y = 0; for(j = 0;j < str.length();j++){ if(str.charAt(j) == ','){ t = 1; for(k = 0;k < j;k++){ x += t * (int)(ch[j - 1 - k] - '0'); t *= 10; } j++; break; }else ch[j] = str.charAt(j); } t = 1; for(k = str.length() - 1;k >= j;k--){ ch[k] = str.charAt(k); y += (int)(ch[k] - '0') * t; t *= 10; } tmp = a[x - 1]; a[x - 1] = a[y - 1]; a[y - 1] = tmp; } for(i = 0;i < w;i++)out.println(a[i] + 1); sc.close(); } public static void main(String[] args){ (new Main()).run(System.in, System.out); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 17, 12, 13, 30, 41, 13, 18, 13, 13, 38, 5, 13, 30, 30, 41, 13, 20, 41, 13, 4, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 13, 18, 13, 13, 41, 13, 4, 13, 4, 18, 4, 18, 13, 13, 0, 18, 13, 18, 13, 17, 18, 13, 18, 13, 17, 0, 18, 13, 18, 13, 17, 18, 13, 18, 13, 17, 28, 13, 13, 30, 30, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 20, 13, 4, 18, 13, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 18, 13, 2, 13, 17, 17, 29, 13, 23, 13, 12, 13, 30, 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, 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 ], [ 194, 11 ], [ 194, 12 ], [ 12, 13 ], [ 12, 14 ], [ 194, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 20, 22 ], [ 17, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 23, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 27, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 35, 38 ], [ 38, 39 ], [ 39, 40 ], [ 27, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 44, 45 ], [ 43, 46 ], [ 46, 47 ], [ 47, 48 ], [ 27, 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 ], [ 64, 67 ], [ 64, 68 ], [ 68, 69 ], [ 68, 70 ], [ 61, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 75, 80 ], [ 61, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 84, 86 ], [ 81, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 89, 91 ], [ 61, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 95, 97 ], [ 92, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 100, 102 ], [ 27, 103 ], [ 103, 104 ], [ 103, 105 ], [ 103, 106 ], [ 107, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 108, 113 ], [ 15, 114 ], [ 114, 115 ], [ 194, 116 ], [ 116, 117 ], [ 116, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 118, 123 ], [ 123, 124 ], [ 124, 125 ], [ 123, 126 ], [ 123, 127 ], [ 118, 128 ], [ 128, 129 ], [ 129, 130 ], [ 130, 131 ], [ 130, 132 ], [ 128, 133 ], [ 133, 134 ], [ 133, 135 ], [ 135, 136 ], [ 135, 137 ], [ 128, 138 ], [ 138, 139 ], [ 139, 140 ], [ 128, 141 ], [ 142, 142 ], [ 142, 143 ], [ 143, 144 ], [ 144, 145 ], [ 144, 146 ], [ 143, 147 ], [ 147, 148 ], [ 148, 149 ], [ 148, 150 ], [ 150, 151 ], [ 150, 152 ], [ 147, 153 ], [ 118, 154 ], [ 154, 155 ], [ 116, 156 ], [ 156, 157 ], [ 194, 158 ], [ 158, 159 ], [ 158, 160 ], [ 160, 161 ], [ 161, 162 ], [ 161, 163 ], [ 160, 165 ], [ 165, 166 ], [ 166, 167 ], [ 166, 168 ], [ 165, 169 ], [ 169, 170 ], [ 170, 171 ], [ 171, 172 ], [ 170, 173 ], [ 173, 174 ], [ 173, 175 ], [ 169, 176 ], [ 160, 177 ], [ 177, 178 ], [ 178, 179 ], [ 178, 180 ], [ 177, 181 ], [ 181, 182 ], [ 182, 183 ], [ 183, 184 ], [ 182, 185 ], [ 185, 186 ], [ 185, 187 ], [ 181, 188 ], [ 160, 189 ], [ 189, 190 ], [ 158, 191 ], [ 191, 192 ], [ 0, 193 ], [ 193, 194 ], [ 193, 195 ] ]
[ "import java.io.InputStream;\nimport java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n\n /** 区切り文字 */\n private static final String DELIMITER = \",\";\n\n /**\n * メインメソッド\n *\n * @param args\n */\n public static void main(String[] args) {\n // ローカルテスト用。提出時は\"System.in\"に修正。\n InputStream input = System.in;\n // File input = new File(\"D:/Temp/AOJ/0011_DrawingLots.txt\");\n\n try (Scanner scanner = new Scanner(input)) {\n int[] numbers = createFirstNumbers(Integer.parseInt(scanner\n .nextLine()));\n int loopNum = Integer.parseInt(scanner.nextLine());\n\n for (int i = 0; i < loopNum; i++) {\n // 入れ替え前の順番を一時的に記憶しておく。\n int[] copy = Arrays.copyOf(numbers, numbers.length);\n // 入れ替え対象の番号を、配列のインデックスで表す。\n int[] changeNums = convert(scanner.nextLine().split(DELIMITER));\n\n numbers[changeNums[0]] = copy[changeNums[1]];\n numbers[changeNums[1]] = copy[changeNums[0]];\n }\n\n for (int number : numbers) {\n System.out.println(number);\n }\n } catch (Exception e) {\n // 対応しない。\n }\n }\n\n /**\n * 最初の数字の並びを格納した配列を作成する。\n *\n * @param numberOfArray 配列の要素数\n * @return 1?の数字を格納した配列\n */\n private static int[] createFirstNumbers(int numberOfArray) {\n int[] result = new int[numberOfArray];\n Arrays.fill(result, 1);\n for (int i = 1; i < result.length; i++) {\n result[i] = result[i - 1] + 1;\n }\n\n return result;\n }\n\n /**\n * 入れ替え対象のインデックスを格納したString配列を、int配列に変換する。\n *\n * @param target\n * @return\n */\n private static int[] convert(String[] target) {\n int[] result = new int[2];\n result[0] = Integer.parseInt(target[0]) - 1;\n result[1] = Integer.parseInt(target[1]) - 1;\n\n return result;\n }\n}", "import java.io.InputStream;", "InputStream", "java.io", "import java.util.Arrays;", "Arrays", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n /** 区切り文字 */\n private static final String DELIMITER = \",\";\n\n /**\n * メインメソッド\n *\n * @param args\n */\n public static void main(String[] args) {\n // ローカルテスト用。提出時は\"System.in\"に修正。\n InputStream input = System.in;\n // File input = new File(\"D:/Temp/AOJ/0011_DrawingLots.txt\");\n\n try (Scanner scanner = new Scanner(input)) {\n int[] numbers = createFirstNumbers(Integer.parseInt(scanner\n .nextLine()));\n int loopNum = Integer.parseInt(scanner.nextLine());\n\n for (int i = 0; i < loopNum; i++) {\n // 入れ替え前の順番を一時的に記憶しておく。\n int[] copy = Arrays.copyOf(numbers, numbers.length);\n // 入れ替え対象の番号を、配列のインデックスで表す。\n int[] changeNums = convert(scanner.nextLine().split(DELIMITER));\n\n numbers[changeNums[0]] = copy[changeNums[1]];\n numbers[changeNums[1]] = copy[changeNums[0]];\n }\n\n for (int number : numbers) {\n System.out.println(number);\n }\n } catch (Exception e) {\n // 対応しない。\n }\n }\n\n /**\n * 最初の数字の並びを格納した配列を作成する。\n *\n * @param numberOfArray 配列の要素数\n * @return 1?の数字を格納した配列\n */\n private static int[] createFirstNumbers(int numberOfArray) {\n int[] result = new int[numberOfArray];\n Arrays.fill(result, 1);\n for (int i = 1; i < result.length; i++) {\n result[i] = result[i - 1] + 1;\n }\n\n return result;\n }\n\n /**\n * 入れ替え対象のインデックスを格納したString配列を、int配列に変換する。\n *\n * @param target\n * @return\n */\n private static int[] convert(String[] target) {\n int[] result = new int[2];\n result[0] = Integer.parseInt(target[0]) - 1;\n result[1] = Integer.parseInt(target[1]) - 1;\n\n return result;\n }\n}", "Main", "/** 区切り文字 */\n private static final String DELIMITER = \",\";", "DELIMITER", "\",\"", "/**\n * メインメソッド\n *\n * @param args\n */\n public static void main(String[] args) {\n // ローカルテスト用。提出時は\"System.in\"に修正。\n InputStream input = System.in;\n // File input = new File(\"D:/Temp/AOJ/0011_DrawingLots.txt\");\n\n try (Scanner scanner = new Scanner(input)) {\n int[] numbers = createFirstNumbers(Integer.parseInt(scanner\n .nextLine()));\n int loopNum = Integer.parseInt(scanner.nextLine());\n\n for (int i = 0; i < loopNum; i++) {\n // 入れ替え前の順番を一時的に記憶しておく。\n int[] copy = Arrays.copyOf(numbers, numbers.length);\n // 入れ替え対象の番号を、配列のインデックスで表す。\n int[] changeNums = convert(scanner.nextLine().split(DELIMITER));\n\n numbers[changeNums[0]] = copy[changeNums[1]];\n numbers[changeNums[1]] = copy[changeNums[0]];\n }\n\n for (int number : numbers) {\n System.out.println(number);\n }\n } catch (Exception e) {\n // 対応しない。\n }\n }", "main", "{\n // ローカルテスト用。提出時は\"System.in\"に修正。\n InputStream input = System.in;\n // File input = new File(\"D:/Temp/AOJ/0011_DrawingLots.txt\");\n\n try (Scanner scanner = new Scanner(input)) {\n int[] numbers = createFirstNumbers(Integer.parseInt(scanner\n .nextLine()));\n int loopNum = Integer.parseInt(scanner.nextLine());\n\n for (int i = 0; i < loopNum; i++) {\n // 入れ替え前の順番を一時的に記憶しておく。\n int[] copy = Arrays.copyOf(numbers, numbers.length);\n // 入れ替え対象の番号を、配列のインデックスで表す。\n int[] changeNums = convert(scanner.nextLine().split(DELIMITER));\n\n numbers[changeNums[0]] = copy[changeNums[1]];\n numbers[changeNums[1]] = copy[changeNums[0]];\n }\n\n for (int number : numbers) {\n System.out.println(number);\n }\n } catch (Exception e) {\n // 対応しない。\n }\n }", "InputStream input = System.in;", "input", "System.in", "System", "System.in", "try (Scanner scanner = new Scanner(input)) {\n int[] numbers = createFirstNumbers(Integer.parseInt(scanner\n .nextLine()));\n int loopNum = Integer.parseInt(scanner.nextLine());\n\n for (int i = 0; i < loopNum; i++) {\n // 入れ替え前の順番を一時的に記憶しておく。\n int[] copy = Arrays.copyOf(numbers, numbers.length);\n // 入れ替え対象の番号を、配列のインデックスで表す。\n int[] changeNums = convert(scanner.nextLine().split(DELIMITER));\n\n numbers[changeNums[0]] = copy[changeNums[1]];\n numbers[changeNums[1]] = copy[changeNums[0]];\n }\n\n for (int number : numbers) {\n System.out.println(number);\n }\n } catch (Exception e) {\n // 対応しない。\n }", "catch (Exception e) {\n // 対応しない。\n }", "Exception e", "{\n // 対応しない。\n }", "{\n int[] numbers = createFirstNumbers(Integer.parseInt(scanner\n .nextLine()));\n int loopNum = Integer.parseInt(scanner.nextLine());\n\n for (int i = 0; i < loopNum; i++) {\n // 入れ替え前の順番を一時的に記憶しておく。\n int[] copy = Arrays.copyOf(numbers, numbers.length);\n // 入れ替え対象の番号を、配列のインデックスで表す。\n int[] changeNums = convert(scanner.nextLine().split(DELIMITER));\n\n numbers[changeNums[0]] = copy[changeNums[1]];\n numbers[changeNums[1]] = copy[changeNums[0]];\n }\n\n for (int number : numbers) {\n System.out.println(number);\n }\n }", "Scanner scanner = new Scanner(input)", "Scanner scanner = new Scanner(input)", "new Scanner(input)", "int[] numbers = createFirstNumbers(Integer.parseInt(scanner\n .nextLine()));", "numbers", "createFirstNumbers(Integer.parseInt(scanner\n .nextLine()))", "createFirstNumbers", "Integer.parseInt(scanner\n .nextLine())", "Integer.parseInt", "Integer", "scanner\n .nextLine()", "scanner\n .nextLine", "scanner", "int loopNum = Integer.parseInt(scanner.nextLine());", "loopNum", "Integer.parseInt(scanner.nextLine())", "Integer.parseInt", "Integer", "scanner.nextLine()", "scanner.nextLine", "scanner", "for (int i = 0; i < loopNum; i++) {\n // 入れ替え前の順番を一時的に記憶しておく。\n int[] copy = Arrays.copyOf(numbers, numbers.length);\n // 入れ替え対象の番号を、配列のインデックスで表す。\n int[] changeNums = convert(scanner.nextLine().split(DELIMITER));\n\n numbers[changeNums[0]] = copy[changeNums[1]];\n numbers[changeNums[1]] = copy[changeNums[0]];\n }", "int i = 0;", "int i = 0;", "i", "0", "i < loopNum", "i", "loopNum", "i++", "i++", "i", "{\n // 入れ替え前の順番を一時的に記憶しておく。\n int[] copy = Arrays.copyOf(numbers, numbers.length);\n // 入れ替え対象の番号を、配列のインデックスで表す。\n int[] changeNums = convert(scanner.nextLine().split(DELIMITER));\n\n numbers[changeNums[0]] = copy[changeNums[1]];\n numbers[changeNums[1]] = copy[changeNums[0]];\n }", "{\n // 入れ替え前の順番を一時的に記憶しておく。\n int[] copy = Arrays.copyOf(numbers, numbers.length);\n // 入れ替え対象の番号を、配列のインデックスで表す。\n int[] changeNums = convert(scanner.nextLine().split(DELIMITER));\n\n numbers[changeNums[0]] = copy[changeNums[1]];\n numbers[changeNums[1]] = copy[changeNums[0]];\n }", "int[] copy = Arrays.copyOf(numbers, numbers.length);", "copy", "Arrays.copyOf(numbers, numbers.length)", "Arrays.copyOf", "Arrays", "numbers", "numbers.length", "numbers", "numbers.length", "int[] changeNums = convert(scanner.nextLine().split(DELIMITER));", "changeNums", "convert(scanner.nextLine().split(DELIMITER))", "convert", "scanner.nextLine().split(DELIMITER)", "scanner.nextLine().split", "scanner.nextLine()", "scanner.nextLine", "scanner", "DELIMITER", "numbers[changeNums[0]] = copy[changeNums[1]]", "numbers[changeNums[0]]", "numbers", "changeNums[0]", "changeNums", "0", "copy[changeNums[1]]", "copy", "changeNums[1]", "changeNums", "1", "numbers[changeNums[1]] = copy[changeNums[0]]", "numbers[changeNums[1]]", "numbers", "changeNums[1]", "changeNums", "1", "copy[changeNums[0]]", "copy", "changeNums[0]", "changeNums", "0", "for (int number : numbers) {\n System.out.println(number);\n }", "int number", "numbers", "{\n System.out.println(number);\n }", "{\n System.out.println(number);\n }", "System.out.println(number)", "System.out.println", "System.out", "System", "System.out", "number", "String[] args", "args", "/**\n * 最初の数字の並びを格納した配列を作成する。\n *\n * @param numberOfArray 配列の要素数\n * @return 1?の数字を格納した配列\n */\n private static int[] createFirstNumbers(int numberOfArray) {\n int[] result = new int[numberOfArray];\n Arrays.fill(result, 1);\n for (int i = 1; i < result.length; i++) {\n result[i] = result[i - 1] + 1;\n }\n\n return result;\n }", "createFirstNumbers", "{\n int[] result = new int[numberOfArray];\n Arrays.fill(result, 1);\n for (int i = 1; i < result.length; i++) {\n result[i] = result[i - 1] + 1;\n }\n\n return result;\n }", "int[] result = new int[numberOfArray];", "result", "new int[numberOfArray]", "numberOfArray", "Arrays.fill(result, 1)", "Arrays.fill", "Arrays", "result", "1", "for (int i = 1; i < result.length; i++) {\n result[i] = result[i - 1] + 1;\n }", "int i = 1;", "int i = 1;", "i", "1", "i < result.length", "i", "result.length", "result", "result.length", "i++", "i++", "i", "{\n result[i] = result[i - 1] + 1;\n }", "{\n result[i] = result[i - 1] + 1;\n }", "result[i] = result[i - 1] + 1", "result[i]", "result", "i", "result[i - 1] + 1", "result[i - 1]", "result", "i - 1", "i", "1", "1", "return result;", "result", "int numberOfArray", "numberOfArray", "/**\n * 入れ替え対象のインデックスを格納したString配列を、int配列に変換する。\n *\n * @param target\n * @return\n */\n private static int[] convert(String[] target) {\n int[] result = new int[2];\n result[0] = Integer.parseInt(target[0]) - 1;\n result[1] = Integer.parseInt(target[1]) - 1;\n\n return result;\n }", "convert", "{\n int[] result = new int[2];\n result[0] = Integer.parseInt(target[0]) - 1;\n result[1] = Integer.parseInt(target[1]) - 1;\n\n return result;\n }", "int[] result = new int[2];", "result", "new int[2]", "2", "result[0] = Integer.parseInt(target[0]) - 1", "result[0]", "result", "0", "Integer.parseInt(target[0]) - 1", "Integer.parseInt(target[0])", "Integer.parseInt", "Integer", "target[0]", "target", "0", "1", "result[1] = Integer.parseInt(target[1]) - 1", "result[1]", "result", "1", "Integer.parseInt(target[1]) - 1", "Integer.parseInt(target[1])", "Integer.parseInt", "Integer", "target[1]", "target", "1", "1", "return result;", "result", "String[] target", "target", "public class Main {\n\n /** 区切り文字 */\n private static final String DELIMITER = \",\";\n\n /**\n * メインメソッド\n *\n * @param args\n */\n public static void main(String[] args) {\n // ローカルテスト用。提出時は\"System.in\"に修正。\n InputStream input = System.in;\n // File input = new File(\"D:/Temp/AOJ/0011_DrawingLots.txt\");\n\n try (Scanner scanner = new Scanner(input)) {\n int[] numbers = createFirstNumbers(Integer.parseInt(scanner\n .nextLine()));\n int loopNum = Integer.parseInt(scanner.nextLine());\n\n for (int i = 0; i < loopNum; i++) {\n // 入れ替え前の順番を一時的に記憶しておく。\n int[] copy = Arrays.copyOf(numbers, numbers.length);\n // 入れ替え対象の番号を、配列のインデックスで表す。\n int[] changeNums = convert(scanner.nextLine().split(DELIMITER));\n\n numbers[changeNums[0]] = copy[changeNums[1]];\n numbers[changeNums[1]] = copy[changeNums[0]];\n }\n\n for (int number : numbers) {\n System.out.println(number);\n }\n } catch (Exception e) {\n // 対応しない。\n }\n }\n\n /**\n * 最初の数字の並びを格納した配列を作成する。\n *\n * @param numberOfArray 配列の要素数\n * @return 1?の数字を格納した配列\n */\n private static int[] createFirstNumbers(int numberOfArray) {\n int[] result = new int[numberOfArray];\n Arrays.fill(result, 1);\n for (int i = 1; i < result.length; i++) {\n result[i] = result[i - 1] + 1;\n }\n\n return result;\n }\n\n /**\n * 入れ替え対象のインデックスを格納したString配列を、int配列に変換する。\n *\n * @param target\n * @return\n */\n private static int[] convert(String[] target) {\n int[] result = new int[2];\n result[0] = Integer.parseInt(target[0]) - 1;\n result[1] = Integer.parseInt(target[1]) - 1;\n\n return result;\n }\n}", "public class Main {\n\n /** 区切り文字 */\n private static final String DELIMITER = \",\";\n\n /**\n * メインメソッド\n *\n * @param args\n */\n public static void main(String[] args) {\n // ローカルテスト用。提出時は\"System.in\"に修正。\n InputStream input = System.in;\n // File input = new File(\"D:/Temp/AOJ/0011_DrawingLots.txt\");\n\n try (Scanner scanner = new Scanner(input)) {\n int[] numbers = createFirstNumbers(Integer.parseInt(scanner\n .nextLine()));\n int loopNum = Integer.parseInt(scanner.nextLine());\n\n for (int i = 0; i < loopNum; i++) {\n // 入れ替え前の順番を一時的に記憶しておく。\n int[] copy = Arrays.copyOf(numbers, numbers.length);\n // 入れ替え対象の番号を、配列のインデックスで表す。\n int[] changeNums = convert(scanner.nextLine().split(DELIMITER));\n\n numbers[changeNums[0]] = copy[changeNums[1]];\n numbers[changeNums[1]] = copy[changeNums[0]];\n }\n\n for (int number : numbers) {\n System.out.println(number);\n }\n } catch (Exception e) {\n // 対応しない。\n }\n }\n\n /**\n * 最初の数字の並びを格納した配列を作成する。\n *\n * @param numberOfArray 配列の要素数\n * @return 1?の数字を格納した配列\n */\n private static int[] createFirstNumbers(int numberOfArray) {\n int[] result = new int[numberOfArray];\n Arrays.fill(result, 1);\n for (int i = 1; i < result.length; i++) {\n result[i] = result[i - 1] + 1;\n }\n\n return result;\n }\n\n /**\n * 入れ替え対象のインデックスを格納したString配列を、int配列に変換する。\n *\n * @param target\n * @return\n */\n private static int[] convert(String[] target) {\n int[] result = new int[2];\n result[0] = Integer.parseInt(target[0]) - 1;\n result[1] = Integer.parseInt(target[1]) - 1;\n\n return result;\n }\n}", "Main" ]
import java.io.InputStream; import java.util.Arrays; import java.util.Scanner; public class Main { /** 区切り文字 */ private static final String DELIMITER = ","; /** * メインメソッド * * @param args */ public static void main(String[] args) { // ローカルテスト用。提出時は"System.in"に修正。 InputStream input = System.in; // File input = new File("D:/Temp/AOJ/0011_DrawingLots.txt"); try (Scanner scanner = new Scanner(input)) { int[] numbers = createFirstNumbers(Integer.parseInt(scanner .nextLine())); int loopNum = Integer.parseInt(scanner.nextLine()); for (int i = 0; i < loopNum; i++) { // 入れ替え前の順番を一時的に記憶しておく。 int[] copy = Arrays.copyOf(numbers, numbers.length); // 入れ替え対象の番号を、配列のインデックスで表す。 int[] changeNums = convert(scanner.nextLine().split(DELIMITER)); numbers[changeNums[0]] = copy[changeNums[1]]; numbers[changeNums[1]] = copy[changeNums[0]]; } for (int number : numbers) { System.out.println(number); } } catch (Exception e) { // 対応しない。 } } /** * 最初の数字の並びを格納した配列を作成する。 * * @param numberOfArray 配列の要素数 * @return 1?の数字を格納した配列 */ private static int[] createFirstNumbers(int numberOfArray) { int[] result = new int[numberOfArray]; Arrays.fill(result, 1); for (int i = 1; i < result.length; i++) { result[i] = result[i - 1] + 1; } return result; } /** * 入れ替え対象のインデックスを格納したString配列を、int配列に変換する。 * * @param target * @return */ private static int[] convert(String[] target) { int[] result = new int[2]; result[0] = Integer.parseInt(target[0]) - 1; result[1] = Integer.parseInt(target[1]) - 1; return result; } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 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, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 2, 13, 17, 4, 18, 13, 2, 13, 17, 4, 18, 13, 2, 13, 17, 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, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 138, 8 ], [ 138, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 11, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 11, 23 ], [ 23, 24 ], [ 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 ], [ 36, 39 ], [ 39, 40 ], [ 39, 41 ], [ 11, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 11, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 47, 52 ], [ 52, 53 ], [ 52, 54 ], [ 47, 55 ], [ 55, 56 ], [ 56, 57 ], [ 47, 58 ], [ 59, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 59, 65 ], [ 65, 66 ], [ 65, 67 ], [ 59, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 70, 73 ], [ 73, 74 ], [ 74, 75 ], [ 59, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 78, 81 ], [ 81, 82 ], [ 82, 83 ], [ 59, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 87, 88 ], [ 86, 89 ], [ 89, 90 ], [ 89, 91 ], [ 59, 92 ], [ 92, 93 ], [ 93, 94 ], [ 92, 95 ], [ 95, 96 ], [ 95, 97 ], [ 92, 98 ], [ 98, 99 ], [ 99, 100 ], [ 98, 101 ], [ 101, 102 ], [ 101, 103 ], [ 59, 104 ], [ 104, 105 ], [ 105, 106 ], [ 104, 107 ], [ 107, 108 ], [ 107, 109 ], [ 104, 110 ], [ 11, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 111, 116 ], [ 116, 117 ], [ 116, 118 ], [ 118, 119 ], [ 119, 120 ], [ 111, 121 ], [ 121, 122 ], [ 122, 123 ], [ 111, 124 ], [ 125, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 128, 129 ], [ 128, 130 ], [ 126, 131 ], [ 131, 132 ], [ 132, 133 ], [ 131, 134 ], [ 9, 135 ], [ 135, 136 ], [ 0, 137 ], [ 137, 138 ], [ 137, 139 ] ]
[ "import java.util.*;\nimport java.text.*;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\tint w = in.nextInt();\n\t\tfor(int i=0; i<w; i++){\n\t\t\tlist.add(i+1);\n\t\t}\n\t\t\n\t\tint n = in.nextInt();\n\t\tfor(int i=0; i<n; i++){\n\t\t\tString tmp = in.next();\n\t\t\tStringTokenizer str = new StringTokenizer(tmp, \",\");\n\t\t\tint a = Integer.parseInt(str.nextToken());\n\t\t\tint b = Integer.parseInt(str.nextToken());\n\t\t\tint x = list.get(a-1);\n\t\t\tlist.set(a-1, list.get(b-1));\n\t\t\tlist.set(b-1, x);\n\t\t}\n\t\t\n\t\tfor(int i=0; i<list.size(); i++){\n\t\t\tSystem.out.println(list.get(i));\n\t\t}\n\t}\n}", "import java.util.*;", "util.*", "java", "import java.text.*;", "text.*", "java", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\tint w = in.nextInt();\n\t\tfor(int i=0; i<w; i++){\n\t\t\tlist.add(i+1);\n\t\t}\n\t\t\n\t\tint n = in.nextInt();\n\t\tfor(int i=0; i<n; i++){\n\t\t\tString tmp = in.next();\n\t\t\tStringTokenizer str = new StringTokenizer(tmp, \",\");\n\t\t\tint a = Integer.parseInt(str.nextToken());\n\t\t\tint b = Integer.parseInt(str.nextToken());\n\t\t\tint x = list.get(a-1);\n\t\t\tlist.set(a-1, list.get(b-1));\n\t\t\tlist.set(b-1, x);\n\t\t}\n\t\t\n\t\tfor(int i=0; i<list.size(); i++){\n\t\t\tSystem.out.println(list.get(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<Integer> list = new ArrayList<Integer>();\n\t\tint w = in.nextInt();\n\t\tfor(int i=0; i<w; i++){\n\t\t\tlist.add(i+1);\n\t\t}\n\t\t\n\t\tint n = in.nextInt();\n\t\tfor(int i=0; i<n; i++){\n\t\t\tString tmp = in.next();\n\t\t\tStringTokenizer str = new StringTokenizer(tmp, \",\");\n\t\t\tint a = Integer.parseInt(str.nextToken());\n\t\t\tint b = Integer.parseInt(str.nextToken());\n\t\t\tint x = list.get(a-1);\n\t\t\tlist.set(a-1, list.get(b-1));\n\t\t\tlist.set(b-1, x);\n\t\t}\n\t\t\n\t\tfor(int i=0; i<list.size(); i++){\n\t\t\tSystem.out.println(list.get(i));\n\t\t}\n\t}", "main", "{\n\t\tScanner in = new Scanner(System.in);\n\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\tint w = in.nextInt();\n\t\tfor(int i=0; i<w; i++){\n\t\t\tlist.add(i+1);\n\t\t}\n\t\t\n\t\tint n = in.nextInt();\n\t\tfor(int i=0; i<n; i++){\n\t\t\tString tmp = in.next();\n\t\t\tStringTokenizer str = new StringTokenizer(tmp, \",\");\n\t\t\tint a = Integer.parseInt(str.nextToken());\n\t\t\tint b = Integer.parseInt(str.nextToken());\n\t\t\tint x = list.get(a-1);\n\t\t\tlist.set(a-1, list.get(b-1));\n\t\t\tlist.set(b-1, x);\n\t\t}\n\t\t\n\t\tfor(int i=0; i<list.size(); i++){\n\t\t\tSystem.out.println(list.get(i));\n\t\t}\n\t}", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "ArrayList<Integer> list = new ArrayList<Integer>();", "list", "new ArrayList<Integer>()", "int w = in.nextInt();", "w", "in.nextInt()", "in.nextInt", "in", "for(int i=0; i<w; i++){\n\t\t\tlist.add(i+1);\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "{\n\t\t\tlist.add(i+1);\n\t\t}", "{\n\t\t\tlist.add(i+1);\n\t\t}", "list.add(i+1)", "list.add", "list", "i+1", "i", "1", "int n = in.nextInt();", "n", "in.nextInt()", "in.nextInt", "in", "for(int i=0; i<n; i++){\n\t\t\tString tmp = in.next();\n\t\t\tStringTokenizer str = new StringTokenizer(tmp, \",\");\n\t\t\tint a = Integer.parseInt(str.nextToken());\n\t\t\tint b = Integer.parseInt(str.nextToken());\n\t\t\tint x = list.get(a-1);\n\t\t\tlist.set(a-1, list.get(b-1));\n\t\t\tlist.set(b-1, x);\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t\t\tString tmp = in.next();\n\t\t\tStringTokenizer str = new StringTokenizer(tmp, \",\");\n\t\t\tint a = Integer.parseInt(str.nextToken());\n\t\t\tint b = Integer.parseInt(str.nextToken());\n\t\t\tint x = list.get(a-1);\n\t\t\tlist.set(a-1, list.get(b-1));\n\t\t\tlist.set(b-1, x);\n\t\t}", "{\n\t\t\tString tmp = in.next();\n\t\t\tStringTokenizer str = new StringTokenizer(tmp, \",\");\n\t\t\tint a = Integer.parseInt(str.nextToken());\n\t\t\tint b = Integer.parseInt(str.nextToken());\n\t\t\tint x = list.get(a-1);\n\t\t\tlist.set(a-1, list.get(b-1));\n\t\t\tlist.set(b-1, x);\n\t\t}", "String tmp = in.next();", "tmp", "in.next()", "in.next", "in", "StringTokenizer str = new StringTokenizer(tmp, \",\");", "str", "new StringTokenizer(tmp, \",\")", "int a = Integer.parseInt(str.nextToken());", "a", "Integer.parseInt(str.nextToken())", "Integer.parseInt", "Integer", "str.nextToken()", "str.nextToken", "str", "int b = Integer.parseInt(str.nextToken());", "b", "Integer.parseInt(str.nextToken())", "Integer.parseInt", "Integer", "str.nextToken()", "str.nextToken", "str", "int x = list.get(a-1);", "x", "list.get(a-1)", "list.get", "list", "a-1", "a", "1", "list.set(a-1, list.get(b-1))", "list.set", "list", "a-1", "a", "1", "list.get(b-1)", "list.get", "list", "b-1", "b", "1", "list.set(b-1, x)", "list.set", "list", "b-1", "b", "1", "x", "for(int i=0; i<list.size(); i++){\n\t\t\tSystem.out.println(list.get(i));\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<list.size()", "i", "list.size()", "list.size", "list", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(list.get(i));\n\t\t}", "{\n\t\t\tSystem.out.println(list.get(i));\n\t\t}", "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\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\tint w = in.nextInt();\n\t\tfor(int i=0; i<w; i++){\n\t\t\tlist.add(i+1);\n\t\t}\n\t\t\n\t\tint n = in.nextInt();\n\t\tfor(int i=0; i<n; i++){\n\t\t\tString tmp = in.next();\n\t\t\tStringTokenizer str = new StringTokenizer(tmp, \",\");\n\t\t\tint a = Integer.parseInt(str.nextToken());\n\t\t\tint b = Integer.parseInt(str.nextToken());\n\t\t\tint x = list.get(a-1);\n\t\t\tlist.set(a-1, list.get(b-1));\n\t\t\tlist.set(b-1, x);\n\t\t}\n\t\t\n\t\tfor(int i=0; i<list.size(); i++){\n\t\t\tSystem.out.println(list.get(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<Integer> list = new ArrayList<Integer>();\n\t\tint w = in.nextInt();\n\t\tfor(int i=0; i<w; i++){\n\t\t\tlist.add(i+1);\n\t\t}\n\t\t\n\t\tint n = in.nextInt();\n\t\tfor(int i=0; i<n; i++){\n\t\t\tString tmp = in.next();\n\t\t\tStringTokenizer str = new StringTokenizer(tmp, \",\");\n\t\t\tint a = Integer.parseInt(str.nextToken());\n\t\t\tint b = Integer.parseInt(str.nextToken());\n\t\t\tint x = list.get(a-1);\n\t\t\tlist.set(a-1, list.get(b-1));\n\t\t\tlist.set(b-1, x);\n\t\t}\n\t\t\n\t\tfor(int i=0; i<list.size(); i++){\n\t\t\tSystem.out.println(list.get(i));\n\t\t}\n\t}\n}", "Main" ]
import java.util.*; import java.text.*; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); ArrayList<Integer> list = new ArrayList<Integer>(); int w = in.nextInt(); for(int i=0; i<w; i++){ list.add(i+1); } int n = in.nextInt(); for(int i=0; i<n; i++){ String tmp = in.next(); StringTokenizer str = new StringTokenizer(tmp, ","); int a = Integer.parseInt(str.nextToken()); int b = Integer.parseInt(str.nextToken()); int x = list.get(a-1); list.set(a-1, list.get(b-1)); list.set(b-1, x); } for(int i=0; i<list.size(); i++){ System.out.println(list.get(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 public static void main(String[]args){\n \tScanner sc=new Scanner(System.in);\n \tint w=sc.nextInt();\n \tint n=sc.nextInt();\n \tint[] values=new int[w];\n \tfor(int i=0;i<values.length;i++){\n \t\tvalues[i]=i+1;\n \t}\n\n \tfor(int i=0;i<n;i++){\n \t\tString str=sc.next();\n \t\tString[] ab=str.split(\",\");\n \t\tint a=Integer.parseInt(ab[0])-1;\n \t\tint b=Integer.parseInt(ab[1])-1;\n \t\tint c=values[a];\n \t\tvalues[a]=values[b];\n \t\tvalues[b]=c;\n \t}\n \tfor(int i=0;i<w;i++){\n \t\tSystem.out.println(values[i]);\n \t}\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\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 \tint[] values=new int[w];\n \tfor(int i=0;i<values.length;i++){\n \t\tvalues[i]=i+1;\n \t}\n\n \tfor(int i=0;i<n;i++){\n \t\tString str=sc.next();\n \t\tString[] ab=str.split(\",\");\n \t\tint a=Integer.parseInt(ab[0])-1;\n \t\tint b=Integer.parseInt(ab[1])-1;\n \t\tint c=values[a];\n \t\tvalues[a]=values[b];\n \t\tvalues[b]=c;\n \t}\n \tfor(int i=0;i<w;i++){\n \t\tSystem.out.println(values[i]);\n \t}\n }\n}", "Main", "public static void main(String[]args){\n \tScanner sc=new Scanner(System.in);\n \tint w=sc.nextInt();\n \tint n=sc.nextInt();\n \tint[] values=new int[w];\n \tfor(int i=0;i<values.length;i++){\n \t\tvalues[i]=i+1;\n \t}\n\n \tfor(int i=0;i<n;i++){\n \t\tString str=sc.next();\n \t\tString[] ab=str.split(\",\");\n \t\tint a=Integer.parseInt(ab[0])-1;\n \t\tint b=Integer.parseInt(ab[1])-1;\n \t\tint c=values[a];\n \t\tvalues[a]=values[b];\n \t\tvalues[b]=c;\n \t}\n \tfor(int i=0;i<w;i++){\n \t\tSystem.out.println(values[i]);\n \t}\n }", "main", "{\n \tScanner sc=new Scanner(System.in);\n \tint w=sc.nextInt();\n \tint n=sc.nextInt();\n \tint[] values=new int[w];\n \tfor(int i=0;i<values.length;i++){\n \t\tvalues[i]=i+1;\n \t}\n\n \tfor(int i=0;i<n;i++){\n \t\tString str=sc.next();\n \t\tString[] ab=str.split(\",\");\n \t\tint a=Integer.parseInt(ab[0])-1;\n \t\tint b=Integer.parseInt(ab[1])-1;\n \t\tint c=values[a];\n \t\tvalues[a]=values[b];\n \t\tvalues[b]=c;\n \t}\n \tfor(int i=0;i<w;i++){\n \t\tSystem.out.println(values[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[] values=new int[w];", "values", "new int[w]", "w", "for(int i=0;i<values.length;i++){\n \t\tvalues[i]=i+1;\n \t}", "int i=0;", "int i=0;", "i", "0", "i<values.length", "i", "values.length", "values", "values.length", "i++", "i++", "i", "{\n \t\tvalues[i]=i+1;\n \t}", "{\n \t\tvalues[i]=i+1;\n \t}", "values[i]=i+1", "values[i]", "values", "i", "i+1", "i", "1", "for(int i=0;i<n;i++){\n \t\tString str=sc.next();\n \t\tString[] ab=str.split(\",\");\n \t\tint a=Integer.parseInt(ab[0])-1;\n \t\tint b=Integer.parseInt(ab[1])-1;\n \t\tint c=values[a];\n \t\tvalues[a]=values[b];\n \t\tvalues[b]=c;\n \t}", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n \t\tString str=sc.next();\n \t\tString[] ab=str.split(\",\");\n \t\tint a=Integer.parseInt(ab[0])-1;\n \t\tint b=Integer.parseInt(ab[1])-1;\n \t\tint c=values[a];\n \t\tvalues[a]=values[b];\n \t\tvalues[b]=c;\n \t}", "{\n \t\tString str=sc.next();\n \t\tString[] ab=str.split(\",\");\n \t\tint a=Integer.parseInt(ab[0])-1;\n \t\tint b=Integer.parseInt(ab[1])-1;\n \t\tint c=values[a];\n \t\tvalues[a]=values[b];\n \t\tvalues[b]=c;\n \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 c=values[a];", "c", "values[a]", "values", "a", "values[a]=values[b]", "values[a]", "values", "a", "values[b]", "values", "b", "values[b]=c", "values[b]", "values", "b", "c", "for(int i=0;i<w;i++){\n \t\tSystem.out.println(values[i]);\n \t}", "int i=0;", "int i=0;", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "{\n \t\tSystem.out.println(values[i]);\n \t}", "{\n \t\tSystem.out.println(values[i]);\n \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 public static void main(String[]args){\n \tScanner sc=new Scanner(System.in);\n \tint w=sc.nextInt();\n \tint n=sc.nextInt();\n \tint[] values=new int[w];\n \tfor(int i=0;i<values.length;i++){\n \t\tvalues[i]=i+1;\n \t}\n\n \tfor(int i=0;i<n;i++){\n \t\tString str=sc.next();\n \t\tString[] ab=str.split(\",\");\n \t\tint a=Integer.parseInt(ab[0])-1;\n \t\tint b=Integer.parseInt(ab[1])-1;\n \t\tint c=values[a];\n \t\tvalues[a]=values[b];\n \t\tvalues[b]=c;\n \t}\n \tfor(int i=0;i<w;i++){\n \t\tSystem.out.println(values[i]);\n \t}\n }\n}", "public class Main{\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 \tint[] values=new int[w];\n \tfor(int i=0;i<values.length;i++){\n \t\tvalues[i]=i+1;\n \t}\n\n \tfor(int i=0;i<n;i++){\n \t\tString str=sc.next();\n \t\tString[] ab=str.split(\",\");\n \t\tint a=Integer.parseInt(ab[0])-1;\n \t\tint b=Integer.parseInt(ab[1])-1;\n \t\tint c=values[a];\n \t\tvalues[a]=values[b];\n \t\tvalues[b]=c;\n \t}\n \tfor(int i=0;i<w;i++){\n \t\tSystem.out.println(values[i]);\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 c=values[a]; values[a]=values[b]; values[b]=c; } for(int i=0;i<w;i++){ System.out.println(values[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, 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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 17, 4, 18, 13, 17, 0, 13, 4, 18, 13, 4, 18, 13, 2, 4, 18, 13, 17, 17, 4, 18, 13, 0, 13, 17, 0, 13, 17, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 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 ], [ 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 ], [ 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 ], [ 67, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 75, 78 ], [ 78, 79 ], [ 79, 80 ], [ 78, 81 ], [ 78, 82 ], [ 82, 83 ], [ 83, 84 ], [ 82, 85 ], [ 67, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 89, 90 ], [ 88, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 95, 98 ], [ 94, 99 ], [ 91, 100 ], [ 100, 101 ], [ 101, 102 ], [ 67, 103 ], [ 103, 104 ], [ 103, 105 ], [ 67, 106 ], [ 106, 107 ], [ 106, 108 ], [ 67, 109 ], [ 109, 110 ], [ 109, 111 ], [ 111, 112 ], [ 111, 113 ], [ 67, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 114, 118 ], [ 118, 119 ], [ 118, 120 ], [ 67, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 121, 125 ], [ 11, 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 ], [ 9, 147 ], [ 147, 148 ], [ 0, 149 ], [ 149, 150 ], [ 149, 151 ] ]
[ "import java.io.*;\nimport java.util.*;\n\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\t//scan.useDelimiter(\",|?\\n\");\n\t\tint w=scan.nextInt();\n\t\tint n=scan.nextInt();\n\t\tString input;\n\t\tint a,b;\n\t\tint[] ans=new int[w];\n\t\tfor(int i=0;i<w;i++){\n\t\t\tans[i]=i+1;\n\t\t}\n\t\t//scan.useDelimiter(\",|?\\n\");-----How!?!?!?\n\t\tfor(int i=0;i<n;i++){\n\t\t\tinput = scan.next();\n\t\t\ta=Integer.parseInt(input.substring(0,input.indexOf(\",\")));\n\t\t\t//System.out.println(a);\n\t\t\tb=Integer.parseInt(input.substring(input.indexOf(\",\")+1,input.length()));\n\t\t\t//System.out.println(b);\n\t\t\ta-=1;\n\t\t\tb-=1;\n\t\t\tint temp=ans[a];\n\t\t\tans[a]=ans[b];\n\t\t\tans[b]=temp;\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}\n}", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\t//scan.useDelimiter(\",|?\\n\");\n\t\tint w=scan.nextInt();\n\t\tint n=scan.nextInt();\n\t\tString input;\n\t\tint a,b;\n\t\tint[] ans=new int[w];\n\t\tfor(int i=0;i<w;i++){\n\t\t\tans[i]=i+1;\n\t\t}\n\t\t//scan.useDelimiter(\",|?\\n\");-----How!?!?!?\n\t\tfor(int i=0;i<n;i++){\n\t\t\tinput = scan.next();\n\t\t\ta=Integer.parseInt(input.substring(0,input.indexOf(\",\")));\n\t\t\t//System.out.println(a);\n\t\t\tb=Integer.parseInt(input.substring(input.indexOf(\",\")+1,input.length()));\n\t\t\t//System.out.println(b);\n\t\t\ta-=1;\n\t\t\tb-=1;\n\t\t\tint temp=ans[a];\n\t\t\tans[a]=ans[b];\n\t\t\tans[b]=temp;\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}\n}", "Main", "public static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\t//scan.useDelimiter(\",|?\\n\");\n\t\tint w=scan.nextInt();\n\t\tint n=scan.nextInt();\n\t\tString input;\n\t\tint a,b;\n\t\tint[] ans=new int[w];\n\t\tfor(int i=0;i<w;i++){\n\t\t\tans[i]=i+1;\n\t\t}\n\t\t//scan.useDelimiter(\",|?\\n\");-----How!?!?!?\n\t\tfor(int i=0;i<n;i++){\n\t\t\tinput = scan.next();\n\t\t\ta=Integer.parseInt(input.substring(0,input.indexOf(\",\")));\n\t\t\t//System.out.println(a);\n\t\t\tb=Integer.parseInt(input.substring(input.indexOf(\",\")+1,input.length()));\n\t\t\t//System.out.println(b);\n\t\t\ta-=1;\n\t\t\tb-=1;\n\t\t\tint temp=ans[a];\n\t\t\tans[a]=ans[b];\n\t\t\tans[b]=temp;\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}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\t\t//scan.useDelimiter(\",|?\\n\");\n\t\tint w=scan.nextInt();\n\t\tint n=scan.nextInt();\n\t\tString input;\n\t\tint a,b;\n\t\tint[] ans=new int[w];\n\t\tfor(int i=0;i<w;i++){\n\t\t\tans[i]=i+1;\n\t\t}\n\t\t//scan.useDelimiter(\",|?\\n\");-----How!?!?!?\n\t\tfor(int i=0;i<n;i++){\n\t\t\tinput = scan.next();\n\t\t\ta=Integer.parseInt(input.substring(0,input.indexOf(\",\")));\n\t\t\t//System.out.println(a);\n\t\t\tb=Integer.parseInt(input.substring(input.indexOf(\",\")+1,input.length()));\n\t\t\t//System.out.println(b);\n\t\t\ta-=1;\n\t\t\tb-=1;\n\t\t\tint temp=ans[a];\n\t\t\tans[a]=ans[b];\n\t\t\tans[b]=temp;\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}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int w=scan.nextInt();", "w", "scan.nextInt()", "scan.nextInt", "scan", "int n=scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "String input;", "input", "int a", "a", "b;", "b", "int[] ans=new int[w];", "ans", "new int[w]", "w", "for(int i=0;i<w;i++){\n\t\t\tans[i]=i+1;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<w", "i", "w", "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", "for(int i=0;i<n;i++){\n\t\t\tinput = scan.next();\n\t\t\ta=Integer.parseInt(input.substring(0,input.indexOf(\",\")));\n\t\t\t//System.out.println(a);\n\t\t\tb=Integer.parseInt(input.substring(input.indexOf(\",\")+1,input.length()));\n\t\t\t//System.out.println(b);\n\t\t\ta-=1;\n\t\t\tb-=1;\n\t\t\tint temp=ans[a];\n\t\t\tans[a]=ans[b];\n\t\t\tans[b]=temp;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t\t\tinput = scan.next();\n\t\t\ta=Integer.parseInt(input.substring(0,input.indexOf(\",\")));\n\t\t\t//System.out.println(a);\n\t\t\tb=Integer.parseInt(input.substring(input.indexOf(\",\")+1,input.length()));\n\t\t\t//System.out.println(b);\n\t\t\ta-=1;\n\t\t\tb-=1;\n\t\t\tint temp=ans[a];\n\t\t\tans[a]=ans[b];\n\t\t\tans[b]=temp;\n\t\t}", "{\n\t\t\tinput = scan.next();\n\t\t\ta=Integer.parseInt(input.substring(0,input.indexOf(\",\")));\n\t\t\t//System.out.println(a);\n\t\t\tb=Integer.parseInt(input.substring(input.indexOf(\",\")+1,input.length()));\n\t\t\t//System.out.println(b);\n\t\t\ta-=1;\n\t\t\tb-=1;\n\t\t\tint temp=ans[a];\n\t\t\tans[a]=ans[b];\n\t\t\tans[b]=temp;\n\t\t}", "input = scan.next()", "input", "scan.next()", "scan.next", "scan", "a=Integer.parseInt(input.substring(0,input.indexOf(\",\")))", "a", "Integer.parseInt(input.substring(0,input.indexOf(\",\")))", "Integer.parseInt", "Integer", "input.substring(0,input.indexOf(\",\"))", "input.substring", "input", "0", "input.indexOf(\",\")", "input.indexOf", "input", "\",\"", "b=Integer.parseInt(input.substring(input.indexOf(\",\")+1,input.length()))", "b", "Integer.parseInt(input.substring(input.indexOf(\",\")+1,input.length()))", "Integer.parseInt", "Integer", "input.substring(input.indexOf(\",\")+1,input.length())", "input.substring", "input", "input.indexOf(\",\")+1", "input.indexOf(\",\")", "input.indexOf", "input", "\",\"", "1", "input.length()", "input.length", "input", "a-=1", "a", "1", "b-=1", "b", "1", "int temp=ans[a];", "temp", "ans[a]", "ans", "a", "ans[a]=ans[b]", "ans[a]", "ans", "a", "ans[b]", "ans", "b", "ans[b]=temp", "ans[b]", "ans", "b", "temp", "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", "String[] args", "args", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\t//scan.useDelimiter(\",|?\\n\");\n\t\tint w=scan.nextInt();\n\t\tint n=scan.nextInt();\n\t\tString input;\n\t\tint a,b;\n\t\tint[] ans=new int[w];\n\t\tfor(int i=0;i<w;i++){\n\t\t\tans[i]=i+1;\n\t\t}\n\t\t//scan.useDelimiter(\",|?\\n\");-----How!?!?!?\n\t\tfor(int i=0;i<n;i++){\n\t\t\tinput = scan.next();\n\t\t\ta=Integer.parseInt(input.substring(0,input.indexOf(\",\")));\n\t\t\t//System.out.println(a);\n\t\t\tb=Integer.parseInt(input.substring(input.indexOf(\",\")+1,input.length()));\n\t\t\t//System.out.println(b);\n\t\t\ta-=1;\n\t\t\tb-=1;\n\t\t\tint temp=ans[a];\n\t\t\tans[a]=ans[b];\n\t\t\tans[b]=temp;\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}\n}", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\t//scan.useDelimiter(\",|?\\n\");\n\t\tint w=scan.nextInt();\n\t\tint n=scan.nextInt();\n\t\tString input;\n\t\tint a,b;\n\t\tint[] ans=new int[w];\n\t\tfor(int i=0;i<w;i++){\n\t\t\tans[i]=i+1;\n\t\t}\n\t\t//scan.useDelimiter(\",|?\\n\");-----How!?!?!?\n\t\tfor(int i=0;i<n;i++){\n\t\t\tinput = scan.next();\n\t\t\ta=Integer.parseInt(input.substring(0,input.indexOf(\",\")));\n\t\t\t//System.out.println(a);\n\t\t\tb=Integer.parseInt(input.substring(input.indexOf(\",\")+1,input.length()));\n\t\t\t//System.out.println(b);\n\t\t\ta-=1;\n\t\t\tb-=1;\n\t\t\tint temp=ans[a];\n\t\t\tans[a]=ans[b];\n\t\t\tans[b]=temp;\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}\n}", "Main" ]
import java.io.*; import java.util.*; public class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); //scan.useDelimiter(",|?\n"); int w=scan.nextInt(); int n=scan.nextInt(); String input; int a,b; int[] ans=new int[w]; for(int i=0;i<w;i++){ ans[i]=i+1; } //scan.useDelimiter(",|?\n");-----How!?!?!? for(int i=0;i<n;i++){ input = scan.next(); a=Integer.parseInt(input.substring(0,input.indexOf(","))); //System.out.println(a); b=Integer.parseInt(input.substring(input.indexOf(",")+1,input.length())); //System.out.println(b); a-=1; b-=1; int temp=ans[a]; ans[a]=ans[b]; ans[b]=temp; } for(int i=0;i<w;i++){ System.out.println(ans[i]); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 2, 13, 17, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 4, 18, 13, 17, 40, 17, 41, 13, 2, 4, 18, 13, 18, 13, 17, 17, 41, 13, 2, 4, 18, 13, 18, 13, 17, 17, 4, 13, 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, 12, 13, 30, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 23, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 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 ], [ 8, 21 ], [ 21, 22 ], [ 22, 23 ], [ 23, 24 ], [ 23, 25 ], [ 21, 26 ], [ 26, 27 ], [ 26, 28 ], [ 21, 29 ], [ 29, 30 ], [ 30, 31 ], [ 21, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 33, 37 ], [ 37, 38 ], [ 37, 39 ], [ 8, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 8, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 45, 50 ], [ 50, 51 ], [ 50, 52 ], [ 45, 53 ], [ 53, 54 ], [ 54, 55 ], [ 45, 56 ], [ 57, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 60, 65 ], [ 60, 66 ], [ 66, 67 ], [ 57, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 71, 74 ], [ 74, 75 ], [ 74, 76 ], [ 70, 77 ], [ 57, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 81, 84 ], [ 84, 85 ], [ 84, 86 ], [ 80, 87 ], [ 57, 88 ], [ 88, 89 ], [ 88, 90 ], [ 88, 91 ], [ 88, 92 ], [ 8, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 93, 98 ], [ 98, 99 ], [ 98, 100 ], [ 93, 101 ], [ 101, 102 ], [ 102, 103 ], [ 93, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 105, 110 ], [ 110, 111 ], [ 110, 112 ], [ 6, 113 ], [ 113, 114 ], [ 142, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 118, 119 ], [ 118, 120 ], [ 120, 121 ], [ 120, 122 ], [ 117, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 123, 127 ], [ 127, 128 ], [ 127, 129 ], [ 117, 130 ], [ 130, 131 ], [ 131, 132 ], [ 131, 133 ], [ 130, 134 ], [ 115, 135 ], [ 135, 136 ], [ 115, 137 ], [ 137, 138 ], [ 115, 139 ], [ 139, 140 ], [ 0, 141 ], [ 141, 142 ], [ 141, 143 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n\tScanner scan = new Scanner(System.in);\n\t\n\tint w = scan.nextInt(); // 縦線の数\n\tint[] narabi = new int[w]; // 現在の阿弥陀の数字の並び\n\tfor (int i=0; i<w; i++)\n\t narabi[i] = i+1;\n\n\tint n = scan.nextInt(); // 横線の数\n for (int i=0; i<n; i++) { // 交換\n\t String[] str = scan.next().split(\",\",-1);\n\t int a = Integer.parseInt(str[0])-1;\n\t int b = Integer.parseInt(str[1])-1;\n\t swap(narabi, a, b);\n\t}\n\n\tfor (int i=0; i<w; i++)\n\t System.out.println(narabi[i]);\n\t\n }\n\n private static void swap(int[] array, int n1, int n2) {\n\tint tmp = array[n1];\n\tarray[n1] = array[n2];\n\tarray[n2] = tmp;\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n\tScanner scan = new Scanner(System.in);\n\t\n\tint w = scan.nextInt(); // 縦線の数\n\tint[] narabi = new int[w]; // 現在の阿弥陀の数字の並び\n\tfor (int i=0; i<w; i++)\n\t narabi[i] = i+1;\n\n\tint n = scan.nextInt(); // 横線の数\n for (int i=0; i<n; i++) { // 交換\n\t String[] str = scan.next().split(\",\",-1);\n\t int a = Integer.parseInt(str[0])-1;\n\t int b = Integer.parseInt(str[1])-1;\n\t swap(narabi, a, b);\n\t}\n\n\tfor (int i=0; i<w; i++)\n\t System.out.println(narabi[i]);\n\t\n }\n\n private static void swap(int[] array, int n1, int n2) {\n\tint tmp = array[n1];\n\tarray[n1] = array[n2];\n\tarray[n2] = tmp;\n }\n}", "Main", "public static void main(String[] args) {\n\tScanner scan = new Scanner(System.in);\n\t\n\tint w = scan.nextInt(); // 縦線の数\n\tint[] narabi = new int[w]; // 現在の阿弥陀の数字の並び\n\tfor (int i=0; i<w; i++)\n\t narabi[i] = i+1;\n\n\tint n = scan.nextInt(); // 横線の数\n for (int i=0; i<n; i++) { // 交換\n\t String[] str = scan.next().split(\",\",-1);\n\t int a = Integer.parseInt(str[0])-1;\n\t int b = Integer.parseInt(str[1])-1;\n\t swap(narabi, a, b);\n\t}\n\n\tfor (int i=0; i<w; i++)\n\t System.out.println(narabi[i]);\n\t\n }", "main", "{\n\tScanner scan = new Scanner(System.in);\n\t\n\tint w = scan.nextInt(); // 縦線の数\n\tint[] narabi = new int[w]; // 現在の阿弥陀の数字の並び\n\tfor (int i=0; i<w; i++)\n\t narabi[i] = i+1;\n\n\tint n = scan.nextInt(); // 横線の数\n for (int i=0; i<n; i++) { // 交換\n\t String[] str = scan.next().split(\",\",-1);\n\t int a = Integer.parseInt(str[0])-1;\n\t int b = Integer.parseInt(str[1])-1;\n\t swap(narabi, a, b);\n\t}\n\n\tfor (int i=0; i<w; i++)\n\t System.out.println(narabi[i]);\n\t\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int w = scan.nextInt();", "w", "scan.nextInt()", "scan.nextInt", "scan", "int[] narabi = new int[w];", "narabi", "new int[w]", "w", "for (int i=0; i<w; i++)\n\t narabi[i] = i+1;", "int i=0;", "int i=0;", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "narabi[i] = i+1;", "narabi[i] = i+1", "narabi[i]", "narabi", "i", "i+1", "i", "1", "int n = scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "for (int i=0; i<n; i++) { // 交換\n\t String[] str = scan.next().split(\",\",-1);\n\t int a = Integer.parseInt(str[0])-1;\n\t int b = Integer.parseInt(str[1])-1;\n\t swap(narabi, a, b);\n\t}", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{ // 交換\n\t String[] str = scan.next().split(\",\",-1);\n\t int a = Integer.parseInt(str[0])-1;\n\t int b = Integer.parseInt(str[1])-1;\n\t swap(narabi, a, b);\n\t}", "{ // 交換\n\t String[] str = scan.next().split(\",\",-1);\n\t int a = Integer.parseInt(str[0])-1;\n\t int b = Integer.parseInt(str[1])-1;\n\t swap(narabi, a, b);\n\t}", "String[] str = scan.next().split(\",\",-1);", "str", "scan.next().split(\",\",-1)", "scan.next().split", "scan.next()", "scan.next", "scan", "\",\"", "-1", "1", "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", "swap(narabi, a, b)", "swap", "narabi", "a", "b", "for (int i=0; i<w; i++)\n\t System.out.println(narabi[i]);", "int i=0;", "int i=0;", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "System.out.println(narabi[i]);", "System.out.println(narabi[i])", "System.out.println", "System.out", "System", "System.out", "narabi[i]", "narabi", "i", "String[] args", "args", "private static void swap(int[] array, int n1, int n2) {\n\tint tmp = array[n1];\n\tarray[n1] = array[n2];\n\tarray[n2] = tmp;\n }", "swap", "{\n\tint tmp = array[n1];\n\tarray[n1] = array[n2];\n\tarray[n2] = tmp;\n }", "int tmp = array[n1];", "tmp", "array[n1]", "array", "n1", "array[n1] = array[n2]", "array[n1]", "array", "n1", "array[n2]", "array", "n2", "array[n2] = tmp", "array[n2]", "array", "n2", "tmp", "int[] array", "array", "int n1", "n1", "int n2", "n2", "public class Main {\n public static void main(String[] args) {\n\tScanner scan = new Scanner(System.in);\n\t\n\tint w = scan.nextInt(); // 縦線の数\n\tint[] narabi = new int[w]; // 現在の阿弥陀の数字の並び\n\tfor (int i=0; i<w; i++)\n\t narabi[i] = i+1;\n\n\tint n = scan.nextInt(); // 横線の数\n for (int i=0; i<n; i++) { // 交換\n\t String[] str = scan.next().split(\",\",-1);\n\t int a = Integer.parseInt(str[0])-1;\n\t int b = Integer.parseInt(str[1])-1;\n\t swap(narabi, a, b);\n\t}\n\n\tfor (int i=0; i<w; i++)\n\t System.out.println(narabi[i]);\n\t\n }\n\n private static void swap(int[] array, int n1, int n2) {\n\tint tmp = array[n1];\n\tarray[n1] = array[n2];\n\tarray[n2] = tmp;\n }\n}", "public class Main {\n public static void main(String[] args) {\n\tScanner scan = new Scanner(System.in);\n\t\n\tint w = scan.nextInt(); // 縦線の数\n\tint[] narabi = new int[w]; // 現在の阿弥陀の数字の並び\n\tfor (int i=0; i<w; i++)\n\t narabi[i] = i+1;\n\n\tint n = scan.nextInt(); // 横線の数\n for (int i=0; i<n; i++) { // 交換\n\t String[] str = scan.next().split(\",\",-1);\n\t int a = Integer.parseInt(str[0])-1;\n\t int b = Integer.parseInt(str[1])-1;\n\t swap(narabi, a, b);\n\t}\n\n\tfor (int i=0; i<w; i++)\n\t System.out.println(narabi[i]);\n\t\n }\n\n private static void swap(int[] array, int n1, int n2) {\n\tint tmp = array[n1];\n\tarray[n1] = array[n2];\n\tarray[n2] = tmp;\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int w = scan.nextInt(); // 縦線の数 int[] narabi = new int[w]; // 現在の阿弥陀の数字の並び for (int i=0; i<w; i++) narabi[i] = i+1; int n = scan.nextInt(); // 横線の数 for (int i=0; i<n; i++) { // 交換 String[] str = scan.next().split(",",-1); int a = Integer.parseInt(str[0])-1; int b = Integer.parseInt(str[1])-1; swap(narabi, a, b); } for (int i=0; i<w; i++) System.out.println(narabi[i]); } private static void swap(int[] array, int n1, int n2) { int tmp = array[n1]; array[n1] = array[n2]; array[n2] = tmp; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 13, 41, 13, 4, 18, 13, 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, 4, 13, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 12, 13, 30, 41, 13, 0, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 23, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 143, 5 ], [ 143, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 20, 21 ], [ 20, 22 ], [ 8, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 23, 28 ], [ 28, 29 ], [ 28, 30 ], [ 23, 31 ], [ 31, 32 ], [ 32, 33 ], [ 23, 34 ], [ 35, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 36, 40 ], [ 8, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 44, 45 ], [ 8, 46 ], [ 46, 47 ], [ 47, 48 ], [ 8, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 49, 54 ], [ 54, 55 ], [ 54, 56 ], [ 49, 57 ], [ 57, 58 ], [ 58, 59 ], [ 49, 60 ], [ 61, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 64, 69 ], [ 61, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 73, 74 ], [ 72, 75 ], [ 75, 76 ], [ 75, 77 ], [ 61, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 81, 82 ], [ 80, 83 ], [ 83, 84 ], [ 83, 85 ], [ 61, 86 ], [ 86, 87 ], [ 86, 88 ], [ 86, 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 ], [ 109, 111 ], [ 6, 112 ], [ 112, 113 ], [ 143, 114 ], [ 114, 115 ], [ 114, 116 ], [ 116, 117 ], [ 117, 118 ], [ 116, 119 ], [ 119, 120 ], [ 119, 121 ], [ 121, 122 ], [ 121, 123 ], [ 116, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 124, 128 ], [ 128, 129 ], [ 128, 130 ], [ 116, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 131, 135 ], [ 114, 136 ], [ 136, 137 ], [ 114, 138 ], [ 138, 139 ], [ 114, 140 ], [ 140, 141 ], [ 0, 142 ], [ 142, 143 ], [ 142, 144 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n//\t\tsc.useDelimiter(\"\\\\r*\\\\n*,*\");\n//\t\tint a = sc.nextInt();\n//\t\tint b = sc.nextInt();\n//\t\tSystem.out.println(a);\n//\t\tSystem.out.println(b);\n\t\tint vl = sc.nextInt();\n\t\tint[] state = new int[vl+1];\n\t\tfor (int i=1; i <= vl; i++) {\n\t\t\tstate[i] = i;\n\t\t}\n\n\t\tint hl = sc.nextInt();\n\t\tsc.nextLine();\n\t\tfor (int i=0; i < hl; i++) {\n\t\t\tString[] line = sc.nextLine().split(\",\");\n\t\t\tint a = Integer.parseInt(line[0]);\n\t\t\tint b = Integer.parseInt(line[1]);\n\t\t\tamida(state, a, b);\n\t\t}\n\n\t\tfor (int i=1; i <= vl; i++) {\n\t\t\tSystem.out.println(state[i]);\n\t\t}\n\t}\n\n\tpublic static void amida(int[] state, int pa, int pb) {\n\t\tint temp;\n\t\ttemp = state[pa];\n\t\tstate[pa] = state[pb];\n\t\tstate[pb] = temp;\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n//\t\tsc.useDelimiter(\"\\\\r*\\\\n*,*\");\n//\t\tint a = sc.nextInt();\n//\t\tint b = sc.nextInt();\n//\t\tSystem.out.println(a);\n//\t\tSystem.out.println(b);\n\t\tint vl = sc.nextInt();\n\t\tint[] state = new int[vl+1];\n\t\tfor (int i=1; i <= vl; i++) {\n\t\t\tstate[i] = i;\n\t\t}\n\n\t\tint hl = sc.nextInt();\n\t\tsc.nextLine();\n\t\tfor (int i=0; i < hl; i++) {\n\t\t\tString[] line = sc.nextLine().split(\",\");\n\t\t\tint a = Integer.parseInt(line[0]);\n\t\t\tint b = Integer.parseInt(line[1]);\n\t\t\tamida(state, a, b);\n\t\t}\n\n\t\tfor (int i=1; i <= vl; i++) {\n\t\t\tSystem.out.println(state[i]);\n\t\t}\n\t}\n\n\tpublic static void amida(int[] state, int pa, int pb) {\n\t\tint temp;\n\t\ttemp = state[pa];\n\t\tstate[pa] = state[pb];\n\t\tstate[pb] = temp;\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n//\t\tsc.useDelimiter(\"\\\\r*\\\\n*,*\");\n//\t\tint a = sc.nextInt();\n//\t\tint b = sc.nextInt();\n//\t\tSystem.out.println(a);\n//\t\tSystem.out.println(b);\n\t\tint vl = sc.nextInt();\n\t\tint[] state = new int[vl+1];\n\t\tfor (int i=1; i <= vl; i++) {\n\t\t\tstate[i] = i;\n\t\t}\n\n\t\tint hl = sc.nextInt();\n\t\tsc.nextLine();\n\t\tfor (int i=0; i < hl; i++) {\n\t\t\tString[] line = sc.nextLine().split(\",\");\n\t\t\tint a = Integer.parseInt(line[0]);\n\t\t\tint b = Integer.parseInt(line[1]);\n\t\t\tamida(state, a, b);\n\t\t}\n\n\t\tfor (int i=1; i <= vl; i++) {\n\t\t\tSystem.out.println(state[i]);\n\t\t}\n\t}", "main", "{\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n//\t\tsc.useDelimiter(\"\\\\r*\\\\n*,*\");\n//\t\tint a = sc.nextInt();\n//\t\tint b = sc.nextInt();\n//\t\tSystem.out.println(a);\n//\t\tSystem.out.println(b);\n\t\tint vl = sc.nextInt();\n\t\tint[] state = new int[vl+1];\n\t\tfor (int i=1; i <= vl; i++) {\n\t\t\tstate[i] = i;\n\t\t}\n\n\t\tint hl = sc.nextInt();\n\t\tsc.nextLine();\n\t\tfor (int i=0; i < hl; i++) {\n\t\t\tString[] line = sc.nextLine().split(\",\");\n\t\t\tint a = Integer.parseInt(line[0]);\n\t\t\tint b = Integer.parseInt(line[1]);\n\t\t\tamida(state, a, b);\n\t\t}\n\n\t\tfor (int i=1; i <= vl; i++) {\n\t\t\tSystem.out.println(state[i]);\n\t\t}\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int vl = sc.nextInt();", "vl", "sc.nextInt()", "sc.nextInt", "sc", "int[] state = new int[vl+1];", "state", "new int[vl+1]", "vl+1", "vl", "1", "for (int i=1; i <= vl; i++) {\n\t\t\tstate[i] = i;\n\t\t}", "int i=1;", "int i=1;", "i", "1", "i <= vl", "i", "vl", "i++", "i++", "i", "{\n\t\t\tstate[i] = i;\n\t\t}", "{\n\t\t\tstate[i] = i;\n\t\t}", "state[i] = i", "state[i]", "state", "i", "i", "int hl = sc.nextInt();", "hl", "sc.nextInt()", "sc.nextInt", "sc", "sc.nextLine()", "sc.nextLine", "sc", "for (int i=0; i < hl; i++) {\n\t\t\tString[] line = sc.nextLine().split(\",\");\n\t\t\tint a = Integer.parseInt(line[0]);\n\t\t\tint b = Integer.parseInt(line[1]);\n\t\t\tamida(state, a, b);\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i < hl", "i", "hl", "i++", "i++", "i", "{\n\t\t\tString[] line = sc.nextLine().split(\",\");\n\t\t\tint a = Integer.parseInt(line[0]);\n\t\t\tint b = Integer.parseInt(line[1]);\n\t\t\tamida(state, a, b);\n\t\t}", "{\n\t\t\tString[] line = sc.nextLine().split(\",\");\n\t\t\tint a = Integer.parseInt(line[0]);\n\t\t\tint b = Integer.parseInt(line[1]);\n\t\t\tamida(state, a, b);\n\t\t}", "String[] line = sc.nextLine().split(\",\");", "line", "sc.nextLine().split(\",\")", "sc.nextLine().split", "sc.nextLine()", "sc.nextLine", "sc", "\",\"", "int a = Integer.parseInt(line[0]);", "a", "Integer.parseInt(line[0])", "Integer.parseInt", "Integer", "line[0]", "line", "0", "int b = Integer.parseInt(line[1]);", "b", "Integer.parseInt(line[1])", "Integer.parseInt", "Integer", "line[1]", "line", "1", "amida(state, a, b)", "amida", "state", "a", "b", "for (int i=1; i <= vl; i++) {\n\t\t\tSystem.out.println(state[i]);\n\t\t}", "int i=1;", "int i=1;", "i", "1", "i <= vl", "i", "vl", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(state[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(state[i]);\n\t\t}", "System.out.println(state[i])", "System.out.println", "System.out", "System", "System.out", "state[i]", "state", "i", "String[] args", "args", "public static void amida(int[] state, int pa, int pb) {\n\t\tint temp;\n\t\ttemp = state[pa];\n\t\tstate[pa] = state[pb];\n\t\tstate[pb] = temp;\n\t}", "amida", "{\n\t\tint temp;\n\t\ttemp = state[pa];\n\t\tstate[pa] = state[pb];\n\t\tstate[pb] = temp;\n\t}", "int temp;", "temp", "temp = state[pa]", "temp", "state[pa]", "state", "pa", "state[pa] = state[pb]", "state[pa]", "state", "pa", "state[pb]", "state", "pb", "state[pb] = temp", "state[pb]", "state", "pb", "temp", "int[] state", "state", "int pa", "pa", "int pb", "pb", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n//\t\tsc.useDelimiter(\"\\\\r*\\\\n*,*\");\n//\t\tint a = sc.nextInt();\n//\t\tint b = sc.nextInt();\n//\t\tSystem.out.println(a);\n//\t\tSystem.out.println(b);\n\t\tint vl = sc.nextInt();\n\t\tint[] state = new int[vl+1];\n\t\tfor (int i=1; i <= vl; i++) {\n\t\t\tstate[i] = i;\n\t\t}\n\n\t\tint hl = sc.nextInt();\n\t\tsc.nextLine();\n\t\tfor (int i=0; i < hl; i++) {\n\t\t\tString[] line = sc.nextLine().split(\",\");\n\t\t\tint a = Integer.parseInt(line[0]);\n\t\t\tint b = Integer.parseInt(line[1]);\n\t\t\tamida(state, a, b);\n\t\t}\n\n\t\tfor (int i=1; i <= vl; i++) {\n\t\t\tSystem.out.println(state[i]);\n\t\t}\n\t}\n\n\tpublic static void amida(int[] state, int pa, int pb) {\n\t\tint temp;\n\t\ttemp = state[pa];\n\t\tstate[pa] = state[pb];\n\t\tstate[pb] = temp;\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n//\t\tsc.useDelimiter(\"\\\\r*\\\\n*,*\");\n//\t\tint a = sc.nextInt();\n//\t\tint b = sc.nextInt();\n//\t\tSystem.out.println(a);\n//\t\tSystem.out.println(b);\n\t\tint vl = sc.nextInt();\n\t\tint[] state = new int[vl+1];\n\t\tfor (int i=1; i <= vl; i++) {\n\t\t\tstate[i] = i;\n\t\t}\n\n\t\tint hl = sc.nextInt();\n\t\tsc.nextLine();\n\t\tfor (int i=0; i < hl; i++) {\n\t\t\tString[] line = sc.nextLine().split(\",\");\n\t\t\tint a = Integer.parseInt(line[0]);\n\t\t\tint b = Integer.parseInt(line[1]);\n\t\t\tamida(state, a, b);\n\t\t}\n\n\t\tfor (int i=1; i <= vl; i++) {\n\t\t\tSystem.out.println(state[i]);\n\t\t}\n\t}\n\n\tpublic static void amida(int[] state, int pa, int pb) {\n\t\tint temp;\n\t\ttemp = state[pa];\n\t\tstate[pa] = state[pb];\n\t\tstate[pb] = temp;\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO ????????????????????????????????????????????? Scanner sc = new Scanner(System.in); // sc.useDelimiter("\\r*\\n*,*"); // int a = sc.nextInt(); // int b = sc.nextInt(); // System.out.println(a); // System.out.println(b); int vl = sc.nextInt(); int[] state = new int[vl+1]; for (int i=1; i <= vl; i++) { state[i] = i; } int hl = sc.nextInt(); sc.nextLine(); for (int i=0; i < hl; i++) { String[] line = sc.nextLine().split(","); int a = Integer.parseInt(line[0]); int b = Integer.parseInt(line[1]); amida(state, a, b); } for (int i=1; i <= vl; i++) { System.out.println(state[i]); } } public static void amida(int[] state, int pa, int pb) { int temp; temp = state[pa]; state[pa] = state[pb]; state[pb] = temp; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 4, 18, 13, 17, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 2, 4, 18, 13, 17, 41, 13, 2, 4, 18, 13, 17, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 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 ], [ 120, 5 ], [ 120, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ], [ 12, 15 ], [ 8, 16 ], [ 16, 17 ], [ 16, 18 ], [ 18, 19 ], [ 19, 20 ], [ 8, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 8, 26 ], [ 26, 27 ], [ 26, 28 ], [ 8, 30 ], [ 30, 31 ], [ 31, 32 ], [ 32, 33 ], [ 32, 34 ], [ 30, 35 ], [ 35, 36 ], [ 35, 37 ], [ 30, 38 ], [ 38, 39 ], [ 39, 40 ], [ 30, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 42, 46 ], [ 46, 47 ], [ 46, 48 ], [ 8, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 49, 54 ], [ 54, 55 ], [ 54, 56 ], [ 49, 57 ], [ 57, 58 ], [ 58, 59 ], [ 49, 60 ], [ 61, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 64, 68 ], [ 61, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 71, 75 ], [ 61, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 78, 80 ], [ 61, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 81, 85 ], [ 85, 86 ], [ 85, 87 ], [ 61, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 88, 92 ], [ 8, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 93, 98 ], [ 98, 99 ], [ 98, 100 ], [ 93, 101 ], [ 101, 102 ], [ 102, 103 ], [ 93, 104 ], [ 105, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 106, 111 ], [ 111, 112 ], [ 111, 113 ], [ 8, 114 ], [ 114, 115 ], [ 115, 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\tScanner scan = new Scanner(System.in);\n\t\tscan.useDelimiter(\"\\\\D+\");\n\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\t\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\tint x = scan.nextInt()-1;\n\t\t\tint y = scan.nextInt()-1;\n\t\t\t\n\t\t\tint t = a[x];\n\t\t\ta[x] = a[y];\n\t\t\ta[y] = t;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t\t\n\t\tscan.close();\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(\"\\\\D+\");\n\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\t\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\tint x = scan.nextInt()-1;\n\t\t\tint y = scan.nextInt()-1;\n\t\t\t\n\t\t\tint t = a[x];\n\t\t\ta[x] = a[y];\n\t\t\ta[y] = t;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t\t\n\t\tscan.close();\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tscan.useDelimiter(\"\\\\D+\");\n\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\t\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\tint x = scan.nextInt()-1;\n\t\t\tint y = scan.nextInt()-1;\n\t\t\t\n\t\t\tint t = a[x];\n\t\t\ta[x] = a[y];\n\t\t\ta[y] = t;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t\t\n\t\tscan.close();\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\t\tscan.useDelimiter(\"\\\\D+\");\n\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\t\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\tint x = scan.nextInt()-1;\n\t\t\tint y = scan.nextInt()-1;\n\t\t\t\n\t\t\tint t = a[x];\n\t\t\ta[x] = a[y];\n\t\t\ta[y] = t;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t\t\n\t\tscan.close();\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "scan.useDelimiter(\"\\\\D+\")", "scan.useDelimiter", "scan", "\"\\\\D+\"", "int w = scan.nextInt();", "w", "scan.nextInt()", "scan.nextInt", "scan", "int n = scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "int[] a = new int[w];", "a", "new int[w]", "w", "for(int i=0;i<w;i++)\n\t\t\ta[i] = i+1;", "int i=0;", "int i=0;", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "a[i] = i+1;", "a[i] = i+1", "a[i]", "a", "i", "i+1", "i", "1", "for(int i=0;i<n;i++) {\n\t\t\tint x = scan.nextInt()-1;\n\t\t\tint y = scan.nextInt()-1;\n\t\t\t\n\t\t\tint t = a[x];\n\t\t\ta[x] = a[y];\n\t\t\ta[y] = t;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t\t\tint x = scan.nextInt()-1;\n\t\t\tint y = scan.nextInt()-1;\n\t\t\t\n\t\t\tint t = a[x];\n\t\t\ta[x] = a[y];\n\t\t\ta[y] = t;\n\t\t}", "{\n\t\t\tint x = scan.nextInt()-1;\n\t\t\tint y = scan.nextInt()-1;\n\t\t\t\n\t\t\tint t = a[x];\n\t\t\ta[x] = a[y];\n\t\t\ta[y] = t;\n\t\t}", "int x = scan.nextInt()-1;", "x", "scan.nextInt()-1", "scan.nextInt()", "scan.nextInt", "scan", "1", "int y = scan.nextInt()-1;", "y", "scan.nextInt()-1", "scan.nextInt()", "scan.nextInt", "scan", "1", "int t = a[x];", "t", "a[x]", "a", "x", "a[x] = a[y]", "a[x]", "a", "x", "a[y]", "a", "y", "a[y] = t", "a[y]", "a", "y", "t", "for(int i=0;i<w;i++){\n\t\t\tSystem.out.println(a[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(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", "scan.close()", "scan.close", "scan", "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(\"\\\\D+\");\n\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\t\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\tint x = scan.nextInt()-1;\n\t\t\tint y = scan.nextInt()-1;\n\t\t\t\n\t\t\tint t = a[x];\n\t\t\ta[x] = a[y];\n\t\t\ta[y] = t;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t\t\n\t\tscan.close();\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(\"\\\\D+\");\n\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\t\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\tint x = scan.nextInt()-1;\n\t\t\tint y = scan.nextInt()-1;\n\t\t\t\n\t\t\tint t = a[x];\n\t\t\ta[x] = a[y];\n\t\t\ta[y] = t;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t\t\n\t\tscan.close();\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("\\D+"); int w = scan.nextInt(); int n = scan.nextInt(); int[] a = new int[w]; for(int i=0;i<w;i++) a[i] = i+1; for(int i=0;i<n;i++) { int x = scan.nextInt()-1; int y = scan.nextInt()-1; int t = a[x]; a[x] = a[y]; a[y] = t; } for(int i=0;i<w;i++){ System.out.println(a[i]); } scan.close(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 4, 18, 20, 17, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 18, 13, 2, 13, 17, 0, 18, 13, 2, 13, 17, 18, 13, 2, 13, 17, 0, 18, 13, 2, 13, 17, 13, 28, 13, 13, 30, 30, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 111, 5 ], [ 111, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 11, 14 ], [ 8, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 8, 25 ], [ 25, 26 ], [ 25, 27 ], [ 8, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 29, 34 ], [ 34, 35 ], [ 34, 36 ], [ 29, 37 ], [ 37, 38 ], [ 38, 39 ], [ 29, 40 ], [ 41, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 42, 46 ], [ 46, 47 ], [ 46, 48 ], [ 8, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 49, 54 ], [ 54, 55 ], [ 54, 56 ], [ 49, 57 ], [ 57, 58 ], [ 58, 59 ], [ 49, 60 ], [ 61, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 65, 66 ], [ 61, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 70, 71 ], [ 61, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 76, 78 ], [ 61, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 82, 84 ], [ 79, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 87, 89 ], [ 61, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 93, 95 ], [ 90, 96 ], [ 8, 97 ], [ 97, 98 ], [ 97, 99 ], [ 97, 100 ], [ 101, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 102, 107 ], [ 6, 108 ], [ 108, 109 ], [ 0, 110 ], [ 110, 111 ], [ 110, 112 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in).useDelimiter(\"\\\\D\");\n\t\tint w = s.nextInt();\n\t\tint n = s.nextInt();\n\t\tint[] l = new int[w];\n\t\tfor(int i = 0; i < w; ++i) {\n\t\t\tl[i] = i + 1;\n\t\t}\n\t\tfor(int i = 0; i < n; ++i) {\n\t\t\tint a = s.nextInt();\n\t\t\tint b = s.nextInt();\n\t\t\tint t = l[a - 1];\n\t\t\tl[a - 1] = l[b - 1];\n\t\t\tl[b - 1] = t;\n\t\t}\n\t\tfor(int i : l) {\n\t\t\tSystem.out.println(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).useDelimiter(\"\\\\D\");\n\t\tint w = s.nextInt();\n\t\tint n = s.nextInt();\n\t\tint[] l = new int[w];\n\t\tfor(int i = 0; i < w; ++i) {\n\t\t\tl[i] = i + 1;\n\t\t}\n\t\tfor(int i = 0; i < n; ++i) {\n\t\t\tint a = s.nextInt();\n\t\t\tint b = s.nextInt();\n\t\t\tint t = l[a - 1];\n\t\t\tl[a - 1] = l[b - 1];\n\t\t\tl[b - 1] = t;\n\t\t}\n\t\tfor(int i : l) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in).useDelimiter(\"\\\\D\");\n\t\tint w = s.nextInt();\n\t\tint n = s.nextInt();\n\t\tint[] l = new int[w];\n\t\tfor(int i = 0; i < w; ++i) {\n\t\t\tl[i] = i + 1;\n\t\t}\n\t\tfor(int i = 0; i < n; ++i) {\n\t\t\tint a = s.nextInt();\n\t\t\tint b = s.nextInt();\n\t\t\tint t = l[a - 1];\n\t\t\tl[a - 1] = l[b - 1];\n\t\t\tl[b - 1] = t;\n\t\t}\n\t\tfor(int i : l) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}", "main", "{\n\t\tScanner s = new Scanner(System.in).useDelimiter(\"\\\\D\");\n\t\tint w = s.nextInt();\n\t\tint n = s.nextInt();\n\t\tint[] l = new int[w];\n\t\tfor(int i = 0; i < w; ++i) {\n\t\t\tl[i] = i + 1;\n\t\t}\n\t\tfor(int i = 0; i < n; ++i) {\n\t\t\tint a = s.nextInt();\n\t\t\tint b = s.nextInt();\n\t\t\tint t = l[a - 1];\n\t\t\tl[a - 1] = l[b - 1];\n\t\t\tl[b - 1] = t;\n\t\t}\n\t\tfor(int i : l) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}", "Scanner s = new Scanner(System.in).useDelimiter(\"\\\\D\");", "s", "new Scanner(System.in).useDelimiter(\"\\\\D\")", "new Scanner(System.in).useDelimiter", "new Scanner(System.in)", "\"\\\\D\"", "int w = s.nextInt();", "w", "s.nextInt()", "s.nextInt", "s", "int n = s.nextInt();", "n", "s.nextInt()", "s.nextInt", "s", "int[] l = new int[w];", "l", "new int[w]", "w", "for(int i = 0; i < w; ++i) {\n\t\t\tl[i] = i + 1;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < w", "i", "w", "++i", "++i", "i", "{\n\t\t\tl[i] = i + 1;\n\t\t}", "{\n\t\t\tl[i] = i + 1;\n\t\t}", "l[i] = i + 1", "l[i]", "l", "i", "i + 1", "i", "1", "for(int i = 0; i < n; ++i) {\n\t\t\tint a = s.nextInt();\n\t\t\tint b = s.nextInt();\n\t\t\tint t = l[a - 1];\n\t\t\tl[a - 1] = l[b - 1];\n\t\t\tl[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 = s.nextInt();\n\t\t\tint b = s.nextInt();\n\t\t\tint t = l[a - 1];\n\t\t\tl[a - 1] = l[b - 1];\n\t\t\tl[b - 1] = t;\n\t\t}", "{\n\t\t\tint a = s.nextInt();\n\t\t\tint b = s.nextInt();\n\t\t\tint t = l[a - 1];\n\t\t\tl[a - 1] = l[b - 1];\n\t\t\tl[b - 1] = t;\n\t\t}", "int a = s.nextInt();", "a", "s.nextInt()", "s.nextInt", "s", "int b = s.nextInt();", "b", "s.nextInt()", "s.nextInt", "s", "int t = l[a - 1];", "t", "l[a - 1]", "l", "a - 1", "a", "1", "l[a - 1] = l[b - 1]", "l[a - 1]", "l", "a - 1", "a", "1", "l[b - 1]", "l", "b - 1", "b", "1", "l[b - 1] = t", "l[b - 1]", "l", "b - 1", "b", "1", "t", "for(int i : l) {\n\t\t\tSystem.out.println(i);\n\t\t}", "int i", "l", "{\n\t\t\tSystem.out.println(i);\n\t\t}", "{\n\t\t\tSystem.out.println(i);\n\t\t}", "System.out.println(i)", "System.out.println", "System.out", "System", "System.out", "i", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in).useDelimiter(\"\\\\D\");\n\t\tint w = s.nextInt();\n\t\tint n = s.nextInt();\n\t\tint[] l = new int[w];\n\t\tfor(int i = 0; i < w; ++i) {\n\t\t\tl[i] = i + 1;\n\t\t}\n\t\tfor(int i = 0; i < n; ++i) {\n\t\t\tint a = s.nextInt();\n\t\t\tint b = s.nextInt();\n\t\t\tint t = l[a - 1];\n\t\t\tl[a - 1] = l[b - 1];\n\t\t\tl[b - 1] = t;\n\t\t}\n\t\tfor(int i : l) {\n\t\t\tSystem.out.println(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).useDelimiter(\"\\\\D\");\n\t\tint w = s.nextInt();\n\t\tint n = s.nextInt();\n\t\tint[] l = new int[w];\n\t\tfor(int i = 0; i < w; ++i) {\n\t\t\tl[i] = i + 1;\n\t\t}\n\t\tfor(int i = 0; i < n; ++i) {\n\t\t\tint a = s.nextInt();\n\t\t\tint b = s.nextInt();\n\t\t\tint t = l[a - 1];\n\t\t\tl[a - 1] = l[b - 1];\n\t\t\tl[b - 1] = t;\n\t\t}\n\t\tfor(int i : l) {\n\t\t\tSystem.out.println(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).useDelimiter("\\D"); int w = s.nextInt(); int n = s.nextInt(); int[] l = new int[w]; for(int i = 0; i < w; ++i) { l[i] = i + 1; } for(int i = 0; i < n; ++i) { int a = s.nextInt(); int b = s.nextInt(); int t = l[a - 1]; l[a - 1] = l[b - 1]; l[b - 1] = t; } for(int i : l) { System.out.println(i); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 38, 5, 13, 30, 4, 18, 18, 13, 13, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 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, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 154, 5 ], [ 154, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 13, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 13, 18 ], [ 9, 19 ], [ 19, 20 ], [ 20, 21 ], [ 20, 22 ], [ 19, 23 ], [ 23, 24 ], [ 19, 25 ], [ 25, 26 ], [ 19, 27 ], [ 27, 28 ], [ 19, 29 ], [ 29, 30 ], [ 19, 31 ], [ 31, 32 ], [ 19, 33 ], [ 33, 34 ], [ 19, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 19, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 19, 45 ], [ 45, 46 ], [ 45, 47 ], [ 19, 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 ], [ 63, 64 ], [ 63, 65 ], [ 62, 66 ], [ 66, 67 ], [ 66, 68 ], [ 19, 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 ], [ 81, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 90, 91 ], [ 89, 92 ], [ 81, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 96, 99 ], [ 99, 100 ], [ 99, 101 ], [ 95, 102 ], [ 81, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 106, 109 ], [ 109, 110 ], [ 109, 111 ], [ 105, 112 ], [ 81, 113 ], [ 113, 114 ], [ 113, 115 ], [ 115, 116 ], [ 115, 117 ], [ 81, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 118, 122 ], [ 122, 123 ], [ 122, 124 ], [ 81, 125 ], [ 125, 126 ], [ 126, 127 ], [ 126, 128 ], [ 125, 129 ], [ 19, 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 ], [ 6, 151 ], [ 151, 152 ], [ 0, 153 ], [ 153, 154 ], [ 153, 155 ] ]
[ "import java.util.*;\n\npublic class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\ttry\n\t\t{\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tint w, n, a, b, tmp;\n\t\t\tString input;\n\n\t\t\tw = sc.nextInt();\n\t\t\tn = sc.nextInt();\n\n\t\t\tint[] lots = new int[w];\n\t\t\tfor(int i = 0; i < w; i++)\n\t\t\t{\n\t\t\t\tlots[i] = i + 1;\n\t\t\t}\n\n\t\t\tfor(int i = 0; i < n; i++)\n\t\t\t{\n\t\t\t\tinput = sc.next();\n\t\t\t\tString[] ab = input.split(\",\");\n\t\t\t\ta = Integer.parseInt(ab[0]) - 1;\n\t\t\t\tb = Integer.parseInt(ab[1]) - 1;\n\n\t\t\t\ttmp = lots[a];\n\t\t\t\tlots[a] = lots[b];\n\t\t\t\tlots[b] = tmp;\n\t\t\t}\n\n\t\t\tfor(int i = 0; i < w; i++)\n\t\t\t{\n\t\t\t\tSystem.out.println(lots[i]);\n\t\t\t}\n\t\t}\n\t\tcatch(InputMismatchException e)\n\t\t{\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}\n}", "import java.util.*;", "util.*", "java", "public class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\ttry\n\t\t{\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tint w, n, a, b, tmp;\n\t\t\tString input;\n\n\t\t\tw = sc.nextInt();\n\t\t\tn = sc.nextInt();\n\n\t\t\tint[] lots = new int[w];\n\t\t\tfor(int i = 0; i < w; i++)\n\t\t\t{\n\t\t\t\tlots[i] = i + 1;\n\t\t\t}\n\n\t\t\tfor(int i = 0; i < n; i++)\n\t\t\t{\n\t\t\t\tinput = sc.next();\n\t\t\t\tString[] ab = input.split(\",\");\n\t\t\t\ta = Integer.parseInt(ab[0]) - 1;\n\t\t\t\tb = Integer.parseInt(ab[1]) - 1;\n\n\t\t\t\ttmp = lots[a];\n\t\t\t\tlots[a] = lots[b];\n\t\t\t\tlots[b] = tmp;\n\t\t\t}\n\n\t\t\tfor(int i = 0; i < w; i++)\n\t\t\t{\n\t\t\t\tSystem.out.println(lots[i]);\n\t\t\t}\n\t\t}\n\t\tcatch(InputMismatchException e)\n\t\t{\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args)\n\t{\n\t\ttry\n\t\t{\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tint w, n, a, b, tmp;\n\t\t\tString input;\n\n\t\t\tw = sc.nextInt();\n\t\t\tn = sc.nextInt();\n\n\t\t\tint[] lots = new int[w];\n\t\t\tfor(int i = 0; i < w; i++)\n\t\t\t{\n\t\t\t\tlots[i] = i + 1;\n\t\t\t}\n\n\t\t\tfor(int i = 0; i < n; i++)\n\t\t\t{\n\t\t\t\tinput = sc.next();\n\t\t\t\tString[] ab = input.split(\",\");\n\t\t\t\ta = Integer.parseInt(ab[0]) - 1;\n\t\t\t\tb = Integer.parseInt(ab[1]) - 1;\n\n\t\t\t\ttmp = lots[a];\n\t\t\t\tlots[a] = lots[b];\n\t\t\t\tlots[b] = tmp;\n\t\t\t}\n\n\t\t\tfor(int i = 0; i < w; i++)\n\t\t\t{\n\t\t\t\tSystem.out.println(lots[i]);\n\t\t\t}\n\t\t}\n\t\tcatch(InputMismatchException e)\n\t\t{\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}", "main", "{\n\t\ttry\n\t\t{\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tint w, n, a, b, tmp;\n\t\t\tString input;\n\n\t\t\tw = sc.nextInt();\n\t\t\tn = sc.nextInt();\n\n\t\t\tint[] lots = new int[w];\n\t\t\tfor(int i = 0; i < w; i++)\n\t\t\t{\n\t\t\t\tlots[i] = i + 1;\n\t\t\t}\n\n\t\t\tfor(int i = 0; i < n; i++)\n\t\t\t{\n\t\t\t\tinput = sc.next();\n\t\t\t\tString[] ab = input.split(\",\");\n\t\t\t\ta = Integer.parseInt(ab[0]) - 1;\n\t\t\t\tb = Integer.parseInt(ab[1]) - 1;\n\n\t\t\t\ttmp = lots[a];\n\t\t\t\tlots[a] = lots[b];\n\t\t\t\tlots[b] = tmp;\n\t\t\t}\n\n\t\t\tfor(int i = 0; i < w; i++)\n\t\t\t{\n\t\t\t\tSystem.out.println(lots[i]);\n\t\t\t}\n\t\t}\n\t\tcatch(InputMismatchException e)\n\t\t{\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}", "try\n\t\t{\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tint w, n, a, b, tmp;\n\t\t\tString input;\n\n\t\t\tw = sc.nextInt();\n\t\t\tn = sc.nextInt();\n\n\t\t\tint[] lots = new int[w];\n\t\t\tfor(int i = 0; i < w; i++)\n\t\t\t{\n\t\t\t\tlots[i] = i + 1;\n\t\t\t}\n\n\t\t\tfor(int i = 0; i < n; i++)\n\t\t\t{\n\t\t\t\tinput = sc.next();\n\t\t\t\tString[] ab = input.split(\",\");\n\t\t\t\ta = Integer.parseInt(ab[0]) - 1;\n\t\t\t\tb = Integer.parseInt(ab[1]) - 1;\n\n\t\t\t\ttmp = lots[a];\n\t\t\t\tlots[a] = lots[b];\n\t\t\t\tlots[b] = tmp;\n\t\t\t}\n\n\t\t\tfor(int i = 0; i < w; i++)\n\t\t\t{\n\t\t\t\tSystem.out.println(lots[i]);\n\t\t\t}\n\t\t}\n\t\tcatch(InputMismatchException e)\n\t\t{\n\t\t\tSystem.out.println(e);\n\t\t}", "catch(InputMismatchException e)\n\t\t{\n\t\t\tSystem.out.println(e);\n\t\t}", "InputMismatchException e", "{\n\t\t\tSystem.out.println(e);\n\t\t}", "System.out.println(e)", "System.out.println", "System.out", "System", "System.out", "e", "{\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tint w, n, a, b, tmp;\n\t\t\tString input;\n\n\t\t\tw = sc.nextInt();\n\t\t\tn = sc.nextInt();\n\n\t\t\tint[] lots = new int[w];\n\t\t\tfor(int i = 0; i < w; i++)\n\t\t\t{\n\t\t\t\tlots[i] = i + 1;\n\t\t\t}\n\n\t\t\tfor(int i = 0; i < n; i++)\n\t\t\t{\n\t\t\t\tinput = sc.next();\n\t\t\t\tString[] ab = input.split(\",\");\n\t\t\t\ta = Integer.parseInt(ab[0]) - 1;\n\t\t\t\tb = Integer.parseInt(ab[1]) - 1;\n\n\t\t\t\ttmp = lots[a];\n\t\t\t\tlots[a] = lots[b];\n\t\t\t\tlots[b] = tmp;\n\t\t\t}\n\n\t\t\tfor(int i = 0; i < w; i++)\n\t\t\t{\n\t\t\t\tSystem.out.println(lots[i]);\n\t\t\t}\n\t\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int w", "w", "n", "n", "a", "a", "b", "b", "tmp;", "tmp", "String input;", "input", "w = sc.nextInt()", "w", "sc.nextInt()", "sc.nextInt", "sc", "n = sc.nextInt()", "n", "sc.nextInt()", "sc.nextInt", "sc", "int[] lots = new int[w];", "lots", "new int[w]", "w", "for(int i = 0; i < w; i++)\n\t\t\t{\n\t\t\t\tlots[i] = i + 1;\n\t\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < w", "i", "w", "i++", "i++", "i", "{\n\t\t\t\tlots[i] = i + 1;\n\t\t\t}", "{\n\t\t\t\tlots[i] = i + 1;\n\t\t\t}", "lots[i] = i + 1", "lots[i]", "lots", "i", "i + 1", "i", "1", "for(int i = 0; i < n; i++)\n\t\t\t{\n\t\t\t\tinput = sc.next();\n\t\t\t\tString[] ab = input.split(\",\");\n\t\t\t\ta = Integer.parseInt(ab[0]) - 1;\n\t\t\t\tb = Integer.parseInt(ab[1]) - 1;\n\n\t\t\t\ttmp = lots[a];\n\t\t\t\tlots[a] = lots[b];\n\t\t\t\tlots[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\tinput = sc.next();\n\t\t\t\tString[] ab = input.split(\",\");\n\t\t\t\ta = Integer.parseInt(ab[0]) - 1;\n\t\t\t\tb = Integer.parseInt(ab[1]) - 1;\n\n\t\t\t\ttmp = lots[a];\n\t\t\t\tlots[a] = lots[b];\n\t\t\t\tlots[b] = tmp;\n\t\t\t}", "{\n\t\t\t\tinput = sc.next();\n\t\t\t\tString[] ab = input.split(\",\");\n\t\t\t\ta = Integer.parseInt(ab[0]) - 1;\n\t\t\t\tb = Integer.parseInt(ab[1]) - 1;\n\n\t\t\t\ttmp = lots[a];\n\t\t\t\tlots[a] = lots[b];\n\t\t\t\tlots[b] = tmp;\n\t\t\t}", "input = sc.next()", "input", "sc.next()", "sc.next", "sc", "String[] ab = input.split(\",\");", "ab", "input.split(\",\")", "input.split", "input", "\",\"", "a = Integer.parseInt(ab[0]) - 1", "a", "Integer.parseInt(ab[0]) - 1", "Integer.parseInt(ab[0])", "Integer.parseInt", "Integer", "ab[0]", "ab", "0", "1", "b = Integer.parseInt(ab[1]) - 1", "b", "Integer.parseInt(ab[1]) - 1", "Integer.parseInt(ab[1])", "Integer.parseInt", "Integer", "ab[1]", "ab", "1", "1", "tmp = lots[a]", "tmp", "lots[a]", "lots", "a", "lots[a] = lots[b]", "lots[a]", "lots", "a", "lots[b]", "lots", "b", "lots[b] = tmp", "lots[b]", "lots", "b", "tmp", "for(int i = 0; i < w; i++)\n\t\t\t{\n\t\t\t\tSystem.out.println(lots[i]);\n\t\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < w", "i", "w", "i++", "i++", "i", "{\n\t\t\t\tSystem.out.println(lots[i]);\n\t\t\t}", "{\n\t\t\t\tSystem.out.println(lots[i]);\n\t\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{\n\tpublic static void main(String[] args)\n\t{\n\t\ttry\n\t\t{\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tint w, n, a, b, tmp;\n\t\t\tString input;\n\n\t\t\tw = sc.nextInt();\n\t\t\tn = sc.nextInt();\n\n\t\t\tint[] lots = new int[w];\n\t\t\tfor(int i = 0; i < w; i++)\n\t\t\t{\n\t\t\t\tlots[i] = i + 1;\n\t\t\t}\n\n\t\t\tfor(int i = 0; i < n; i++)\n\t\t\t{\n\t\t\t\tinput = sc.next();\n\t\t\t\tString[] ab = input.split(\",\");\n\t\t\t\ta = Integer.parseInt(ab[0]) - 1;\n\t\t\t\tb = Integer.parseInt(ab[1]) - 1;\n\n\t\t\t\ttmp = lots[a];\n\t\t\t\tlots[a] = lots[b];\n\t\t\t\tlots[b] = tmp;\n\t\t\t}\n\n\t\t\tfor(int i = 0; i < w; i++)\n\t\t\t{\n\t\t\t\tSystem.out.println(lots[i]);\n\t\t\t}\n\t\t}\n\t\tcatch(InputMismatchException e)\n\t\t{\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}\n}", "public class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\ttry\n\t\t{\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tint w, n, a, b, tmp;\n\t\t\tString input;\n\n\t\t\tw = sc.nextInt();\n\t\t\tn = sc.nextInt();\n\n\t\t\tint[] lots = new int[w];\n\t\t\tfor(int i = 0; i < w; i++)\n\t\t\t{\n\t\t\t\tlots[i] = i + 1;\n\t\t\t}\n\n\t\t\tfor(int i = 0; i < n; i++)\n\t\t\t{\n\t\t\t\tinput = sc.next();\n\t\t\t\tString[] ab = input.split(\",\");\n\t\t\t\ta = Integer.parseInt(ab[0]) - 1;\n\t\t\t\tb = Integer.parseInt(ab[1]) - 1;\n\n\t\t\t\ttmp = lots[a];\n\t\t\t\tlots[a] = lots[b];\n\t\t\t\tlots[b] = tmp;\n\t\t\t}\n\n\t\t\tfor(int i = 0; i < w; i++)\n\t\t\t{\n\t\t\t\tSystem.out.println(lots[i]);\n\t\t\t}\n\t\t}\n\t\tcatch(InputMismatchException e)\n\t\t{\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { try { Scanner sc = new Scanner(System.in); int w, n, a, b, tmp; String input; w = sc.nextInt(); n = sc.nextInt(); int[] lots = new int[w]; for(int i = 0; i < w; i++) { lots[i] = i + 1; } for(int i = 0; i < n; i++) { input = sc.next(); String[] ab = input.split(","); a = Integer.parseInt(ab[0]) - 1; b = Integer.parseInt(ab[1]) - 1; tmp = lots[a]; lots[a] = lots[b]; lots[b] = tmp; } for(int i = 0; i < w; i++) { System.out.println(lots[i]); } } catch(InputMismatchException e) { System.out.println(e); } } }
[ 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, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 20, 17, 41, 13, 4, 18, 13, 17, 17, 0, 18, 13, 17, 4, 18, 13, 18, 13, 17, 0, 18, 13, 17, 4, 18, 13, 18, 13, 17, 0, 13, 18, 13, 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, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 159, 11 ], [ 159, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 20, 23 ], [ 23, 24 ], [ 24, 25 ], [ 14, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 28, 31 ], [ 31, 32 ], [ 32, 33 ], [ 14, 34 ], [ 34, 35 ], [ 34, 36 ], [ 37, 38 ], [ 37, 39 ], [ 14, 40 ], [ 40, 41 ], [ 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 ], [ 57, 59 ], [ 56, 60 ], [ 14, 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 ], [ 73, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 86, 87 ], [ 85, 88 ], [ 85, 89 ], [ 73, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 90, 94 ], [ 94, 95 ], [ 95, 96 ], [ 94, 97 ], [ 97, 98 ], [ 97, 99 ], [ 73, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 100, 104 ], [ 104, 105 ], [ 105, 106 ], [ 104, 107 ], [ 107, 108 ], [ 107, 109 ], [ 73, 110 ], [ 110, 111 ], [ 110, 112 ], [ 112, 113 ], [ 112, 114 ], [ 114, 115 ], [ 114, 116 ], [ 73, 117 ], [ 117, 118 ], [ 118, 119 ], [ 118, 120 ], [ 120, 121 ], [ 120, 122 ], [ 117, 123 ], [ 123, 124 ], [ 123, 125 ], [ 125, 126 ], [ 125, 127 ], [ 73, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 131, 132 ], [ 131, 133 ], [ 128, 134 ], [ 14, 135 ], [ 135, 136 ], [ 136, 137 ], [ 137, 138 ], [ 137, 139 ], [ 135, 140 ], [ 140, 141 ], [ 140, 142 ], [ 135, 143 ], [ 143, 144 ], [ 144, 145 ], [ 135, 146 ], [ 147, 147 ], [ 147, 148 ], [ 148, 149 ], [ 149, 150 ], [ 150, 151 ], [ 150, 152 ], [ 148, 153 ], [ 153, 154 ], [ 153, 155 ], [ 12, 156 ], [ 156, 157 ], [ 0, 158 ], [ 158, 159 ], [ 158, 160 ] ]
[ "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\t\tint w = Integer.parseInt(br.readLine());\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tint hako[] = new int[w+1];\n\t\t\tint dami = 0;\n\t\t\t\n\t\t\tfor(int i = 1;i <= w;i++){\n\t\t\t\thako[i] = i;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0;i < n;i++){\n\t\t\t\tString line = br.readLine();\n\t\t\t\tint a[] = new int[2];\n\t\t\t\tString s[] = line.split(\",\",0);\n\t\t\t\ta[0] = Integer.parseInt(s[0]);\n\t\t\t\ta[1] = Integer.parseInt(s[1]);\n\t\t\t\t\n\t\t\t\tdami = hako[a[0]];\n\t\t\t\thako[a[0]] = hako[a[1]];\n\t\t\t\thako[a[1]] = dami;\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(hako[i]);\n\t\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 IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tint w = Integer.parseInt(br.readLine());\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tint hako[] = new int[w+1];\n\t\t\tint dami = 0;\n\t\t\t\n\t\t\tfor(int i = 1;i <= w;i++){\n\t\t\t\thako[i] = i;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0;i < n;i++){\n\t\t\t\tString line = br.readLine();\n\t\t\t\tint a[] = new int[2];\n\t\t\t\tString s[] = line.split(\",\",0);\n\t\t\t\ta[0] = Integer.parseInt(s[0]);\n\t\t\t\ta[1] = Integer.parseInt(s[1]);\n\t\t\t\t\n\t\t\t\tdami = hako[a[0]];\n\t\t\t\thako[a[0]] = hako[a[1]];\n\t\t\t\thako[a[1]] = dami;\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(hako[i]);\n\t\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\t\tint w = Integer.parseInt(br.readLine());\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tint hako[] = new int[w+1];\n\t\t\tint dami = 0;\n\t\t\t\n\t\t\tfor(int i = 1;i <= w;i++){\n\t\t\t\thako[i] = i;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0;i < n;i++){\n\t\t\t\tString line = br.readLine();\n\t\t\t\tint a[] = new int[2];\n\t\t\t\tString s[] = line.split(\",\",0);\n\t\t\t\ta[0] = Integer.parseInt(s[0]);\n\t\t\t\ta[1] = Integer.parseInt(s[1]);\n\t\t\t\t\n\t\t\t\tdami = hako[a[0]];\n\t\t\t\thako[a[0]] = hako[a[1]];\n\t\t\t\thako[a[1]] = dami;\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(hako[i]);\n\t\t\t}\n\t}", "main", "{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tint w = Integer.parseInt(br.readLine());\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tint hako[] = new int[w+1];\n\t\t\tint dami = 0;\n\t\t\t\n\t\t\tfor(int i = 1;i <= w;i++){\n\t\t\t\thako[i] = i;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0;i < n;i++){\n\t\t\t\tString line = br.readLine();\n\t\t\t\tint a[] = new int[2];\n\t\t\t\tString s[] = line.split(\",\",0);\n\t\t\t\ta[0] = Integer.parseInt(s[0]);\n\t\t\t\ta[1] = Integer.parseInt(s[1]);\n\t\t\t\t\n\t\t\t\tdami = hako[a[0]];\n\t\t\t\thako[a[0]] = hako[a[1]];\n\t\t\t\thako[a[1]] = dami;\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(hako[i]);\n\t\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 hako[] = new int[w+1];", "hako", "new int[w+1]", "w+1", "w", "1", "int dami = 0;", "dami", "0", "for(int i = 1;i <= w;i++){\n\t\t\t\thako[i] = i;\n\t\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= w", "i", "w", "i++", "i++", "i", "{\n\t\t\t\thako[i] = i;\n\t\t\t}", "{\n\t\t\t\thako[i] = i;\n\t\t\t}", "hako[i] = i", "hako[i]", "hako", "i", "i", "for(int i = 0;i < n;i++){\n\t\t\t\tString line = br.readLine();\n\t\t\t\tint a[] = new int[2];\n\t\t\t\tString s[] = line.split(\",\",0);\n\t\t\t\ta[0] = Integer.parseInt(s[0]);\n\t\t\t\ta[1] = Integer.parseInt(s[1]);\n\t\t\t\t\n\t\t\t\tdami = hako[a[0]];\n\t\t\t\thako[a[0]] = hako[a[1]];\n\t\t\t\thako[a[1]] = dami;\n\t\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\t\tString line = br.readLine();\n\t\t\t\tint a[] = new int[2];\n\t\t\t\tString s[] = line.split(\",\",0);\n\t\t\t\ta[0] = Integer.parseInt(s[0]);\n\t\t\t\ta[1] = Integer.parseInt(s[1]);\n\t\t\t\t\n\t\t\t\tdami = hako[a[0]];\n\t\t\t\thako[a[0]] = hako[a[1]];\n\t\t\t\thako[a[1]] = dami;\n\t\t\t}", "{\n\t\t\t\tString line = br.readLine();\n\t\t\t\tint a[] = new int[2];\n\t\t\t\tString s[] = line.split(\",\",0);\n\t\t\t\ta[0] = Integer.parseInt(s[0]);\n\t\t\t\ta[1] = Integer.parseInt(s[1]);\n\t\t\t\t\n\t\t\t\tdami = hako[a[0]];\n\t\t\t\thako[a[0]] = hako[a[1]];\n\t\t\t\thako[a[1]] = dami;\n\t\t\t}", "String line = br.readLine();", "line", "br.readLine()", "br.readLine", "br", "int a[] = new int[2];", "a", "new int[2]", "2", "String s[] = line.split(\",\",0);", "s", "line.split(\",\",0)", "line.split", "line", "\",\"", "0", "a[0] = Integer.parseInt(s[0])", "a[0]", "a", "0", "Integer.parseInt(s[0])", "Integer.parseInt", "Integer", "s[0]", "s", "0", "a[1] = Integer.parseInt(s[1])", "a[1]", "a", "1", "Integer.parseInt(s[1])", "Integer.parseInt", "Integer", "s[1]", "s", "1", "dami = hako[a[0]]", "dami", "hako[a[0]]", "hako", "a[0]", "a", "0", "hako[a[0]] = hako[a[1]]", "hako[a[0]]", "hako", "a[0]", "a", "0", "hako[a[1]]", "hako", "a[1]", "a", "1", "hako[a[1]] = dami", "hako[a[1]]", "hako", "a[1]", "a", "1", "dami", "for(int i = 1;i <= w;i++){\n\t\t\t\tSystem.out.println(hako[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(hako[i]);\n\t\t\t}", "{\n\t\t\t\tSystem.out.println(hako[i]);\n\t\t\t}", "System.out.println(hako[i])", "System.out.println", "System.out", "System", "System.out", "hako[i]", "hako", "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\t\tint w = Integer.parseInt(br.readLine());\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tint hako[] = new int[w+1];\n\t\t\tint dami = 0;\n\t\t\t\n\t\t\tfor(int i = 1;i <= w;i++){\n\t\t\t\thako[i] = i;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0;i < n;i++){\n\t\t\t\tString line = br.readLine();\n\t\t\t\tint a[] = new int[2];\n\t\t\t\tString s[] = line.split(\",\",0);\n\t\t\t\ta[0] = Integer.parseInt(s[0]);\n\t\t\t\ta[1] = Integer.parseInt(s[1]);\n\t\t\t\t\n\t\t\t\tdami = hako[a[0]];\n\t\t\t\thako[a[0]] = hako[a[1]];\n\t\t\t\thako[a[1]] = dami;\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(hako[i]);\n\t\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\t\tint w = Integer.parseInt(br.readLine());\n\t\t\tint n = Integer.parseInt(br.readLine());\n\t\t\tint hako[] = new int[w+1];\n\t\t\tint dami = 0;\n\t\t\t\n\t\t\tfor(int i = 1;i <= w;i++){\n\t\t\t\thako[i] = i;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0;i < n;i++){\n\t\t\t\tString line = br.readLine();\n\t\t\t\tint a[] = new int[2];\n\t\t\t\tString s[] = line.split(\",\",0);\n\t\t\t\ta[0] = Integer.parseInt(s[0]);\n\t\t\t\ta[1] = Integer.parseInt(s[1]);\n\t\t\t\t\n\t\t\t\tdami = hako[a[0]];\n\t\t\t\thako[a[0]] = hako[a[1]];\n\t\t\t\thako[a[1]] = dami;\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(hako[i]);\n\t\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 IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int w = Integer.parseInt(br.readLine()); int n = Integer.parseInt(br.readLine()); int hako[] = new int[w+1]; int dami = 0; for(int i = 1;i <= w;i++){ hako[i] = i; } for(int i = 0;i < n;i++){ String line = br.readLine(); int a[] = new int[2]; String s[] = line.split(",",0); a[0] = Integer.parseInt(s[0]); a[1] = Integer.parseInt(s[1]); dami = hako[a[0]]; hako[a[0]] = hako[a[1]]; hako[a[1]] = dami; } for(int i = 1;i <= w;i++){ System.out.println(hako[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, 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, 20, 17, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 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, 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 ], [ 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 ], [ 64, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 73, 74 ], [ 72, 75 ], [ 64, 76 ], [ 76, 77 ], [ 76, 78 ], [ 64, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 80, 85 ], [ 85, 86 ], [ 85, 87 ], [ 80, 88 ], [ 88, 89 ], [ 89, 90 ], [ 80, 91 ], [ 91, 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.*;\n\nclass Main{\n\tpublic static void main(String[] args)throws IOException{\n\t\tBufferedReader br=\n\t\t\t\tnew BufferedReader(new InputStreamReader(System.in));\n\t\tint n=Integer.parseInt(br.readLine());\n\t\tint m=Integer.parseInt(br.readLine());\n\t\tint[] line=new int[n];\n\t\tfor(int i=0;i<n;i++){\n\t\t\tline[i]=i+1;\n\t\t}\n\t\tfor(int i=0;i<m;i++){\n\t\t\tString buf2=br.readLine();\n\t\t\tString[] buf=buf2.split(\",\");\n\t\t\tint[] data=new int[2];\n\t\t\tfor(int j=0;j<2;j++)\tdata[j]=(Integer.parseInt(buf[j])-1);\n\t\tint temp=line[data[0]];\n\t\tline[data[0]]=line[data[1]];\n\t\tline[data[1]]=temp;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tSystem.out.println(line[i]);\n\t\t}\n\t}\n}", "import java.io.*;", "io.*", "java", "class Main{\n\tpublic static void main(String[] args)throws IOException{\n\t\tBufferedReader br=\n\t\t\t\tnew BufferedReader(new InputStreamReader(System.in));\n\t\tint n=Integer.parseInt(br.readLine());\n\t\tint m=Integer.parseInt(br.readLine());\n\t\tint[] line=new int[n];\n\t\tfor(int i=0;i<n;i++){\n\t\t\tline[i]=i+1;\n\t\t}\n\t\tfor(int i=0;i<m;i++){\n\t\t\tString buf2=br.readLine();\n\t\t\tString[] buf=buf2.split(\",\");\n\t\t\tint[] data=new int[2];\n\t\t\tfor(int j=0;j<2;j++)\tdata[j]=(Integer.parseInt(buf[j])-1);\n\t\tint temp=line[data[0]];\n\t\tline[data[0]]=line[data[1]];\n\t\tline[data[1]]=temp;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tSystem.out.println(line[i]);\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args)throws IOException{\n\t\tBufferedReader br=\n\t\t\t\tnew BufferedReader(new InputStreamReader(System.in));\n\t\tint n=Integer.parseInt(br.readLine());\n\t\tint m=Integer.parseInt(br.readLine());\n\t\tint[] line=new int[n];\n\t\tfor(int i=0;i<n;i++){\n\t\t\tline[i]=i+1;\n\t\t}\n\t\tfor(int i=0;i<m;i++){\n\t\t\tString buf2=br.readLine();\n\t\t\tString[] buf=buf2.split(\",\");\n\t\t\tint[] data=new int[2];\n\t\t\tfor(int j=0;j<2;j++)\tdata[j]=(Integer.parseInt(buf[j])-1);\n\t\tint temp=line[data[0]];\n\t\tline[data[0]]=line[data[1]];\n\t\tline[data[1]]=temp;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tSystem.out.println(line[i]);\n\t\t}\n\t}", "main", "{\n\t\tBufferedReader br=\n\t\t\t\tnew BufferedReader(new InputStreamReader(System.in));\n\t\tint n=Integer.parseInt(br.readLine());\n\t\tint m=Integer.parseInt(br.readLine());\n\t\tint[] line=new int[n];\n\t\tfor(int i=0;i<n;i++){\n\t\t\tline[i]=i+1;\n\t\t}\n\t\tfor(int i=0;i<m;i++){\n\t\t\tString buf2=br.readLine();\n\t\t\tString[] buf=buf2.split(\",\");\n\t\t\tint[] data=new int[2];\n\t\t\tfor(int j=0;j<2;j++)\tdata[j]=(Integer.parseInt(buf[j])-1);\n\t\tint temp=line[data[0]];\n\t\tline[data[0]]=line[data[1]];\n\t\tline[data[1]]=temp;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tSystem.out.println(line[i]);\n\t\t}\n\t}", "BufferedReader br=\n\t\t\t\tnew BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "int n=Integer.parseInt(br.readLine());", "n", "Integer.parseInt(br.readLine())", "Integer.parseInt", "Integer", "br.readLine()", "br.readLine", "br", "int m=Integer.parseInt(br.readLine());", "m", "Integer.parseInt(br.readLine())", "Integer.parseInt", "Integer", "br.readLine()", "br.readLine", "br", "int[] line=new int[n];", "line", "new int[n]", "n", "for(int i=0;i<n;i++){\n\t\t\tline[i]=i+1;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t\t\tline[i]=i+1;\n\t\t}", "{\n\t\t\tline[i]=i+1;\n\t\t}", "line[i]=i+1", "line[i]", "line", "i", "i+1", "i", "1", "for(int i=0;i<m;i++){\n\t\t\tString buf2=br.readLine();\n\t\t\tString[] buf=buf2.split(\",\");\n\t\t\tint[] data=new int[2];\n\t\t\tfor(int j=0;j<2;j++)\tdata[j]=(Integer.parseInt(buf[j])-1);\n\t\tint temp=line[data[0]];\n\t\tline[data[0]]=line[data[1]];\n\t\tline[data[1]]=temp;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<m", "i", "m", "i++", "i++", "i", "{\n\t\t\tString buf2=br.readLine();\n\t\t\tString[] buf=buf2.split(\",\");\n\t\t\tint[] data=new int[2];\n\t\t\tfor(int j=0;j<2;j++)\tdata[j]=(Integer.parseInt(buf[j])-1);\n\t\tint temp=line[data[0]];\n\t\tline[data[0]]=line[data[1]];\n\t\tline[data[1]]=temp;\n\t\t}", "{\n\t\t\tString buf2=br.readLine();\n\t\t\tString[] buf=buf2.split(\",\");\n\t\t\tint[] data=new int[2];\n\t\t\tfor(int j=0;j<2;j++)\tdata[j]=(Integer.parseInt(buf[j])-1);\n\t\tint temp=line[data[0]];\n\t\tline[data[0]]=line[data[1]];\n\t\tline[data[1]]=temp;\n\t\t}", "String buf2=br.readLine();", "buf2", "br.readLine()", "br.readLine", "br", "String[] buf=buf2.split(\",\");", "buf", "buf2.split(\",\")", "buf2.split", "buf2", "\",\"", "int[] data=new int[2];", "data", "new int[2]", "2", "for(int j=0;j<2;j++)\tdata[j]=(Integer.parseInt(buf[j])-1);", "int j=0;", "int j=0;", "j", "0", "j<2", "j", "2", "j++", "j++", "j", "data[j]=(Integer.parseInt(buf[j])-1);", "data[j]=(Integer.parseInt(buf[j])-1)", "data[j]", "data", "j", "(Integer.parseInt(buf[j])-1)", "Integer.parseInt(buf[j])", "Integer.parseInt", "Integer", "buf[j]", "buf", "j", "1", "int temp=line[data[0]];", "temp", "line[data[0]]", "line", "data[0]", "data", "0", "line[data[0]]=line[data[1]]", "line[data[0]]", "line", "data[0]", "data", "0", "line[data[1]]", "line", "data[1]", "data", "1", "line[data[1]]=temp", "line[data[1]]", "line", "data[1]", "data", "1", "temp", "for(int i=0;i<n;i++){\n\t\t\tSystem.out.println(line[i]);\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(line[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(line[i]);\n\t\t}", "System.out.println(line[i])", "System.out.println", "System.out", "System", "System.out", "line[i]", "line", "i", "String[] args", "args" ]
import java.io.*; class Main{ public static void main(String[] args)throws IOException{ BufferedReader br= new BufferedReader(new InputStreamReader(System.in)); int n=Integer.parseInt(br.readLine()); int m=Integer.parseInt(br.readLine()); int[] line=new int[n]; for(int i=0;i<n;i++){ line[i]=i+1; } for(int i=0;i<m;i++){ String buf2=br.readLine(); String[] buf=buf2.split(","); int[] data=new int[2]; for(int j=0;j<2;j++) data[j]=(Integer.parseInt(buf[j])-1); int temp=line[data[0]]; line[data[0]]=line[data[1]]; line[data[1]]=temp; } for(int i=0;i<n;i++){ System.out.println(line[i]); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 20, 13, 41, 13, 20, 13, 41, 13, 17, 41, 13, 17, 41, 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, 18, 13, 13, 2, 4, 18, 13, 18, 13, 17, 17, 0, 18, 13, 13, 2, 4, 18, 13, 18, 13, 17, 17, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 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 ], [ 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 ], [ 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 ], [ 11, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 45, 50 ], [ 50, 51 ], [ 50, 52 ], [ 45, 53 ], [ 53, 54 ], [ 54, 55 ], [ 45, 56 ], [ 57, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 61, 62 ], [ 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 ], [ 75, 76 ], [ 74, 77 ], [ 77, 78 ], [ 77, 79 ], [ 73, 80 ], [ 57, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 81, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 86, 89 ], [ 89, 90 ], [ 89, 91 ], [ 85, 92 ], [ 11, 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 ], [ 107, 109 ], [ 106, 110 ], [ 110, 111 ], [ 110, 112 ], [ 11, 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 ], [ 11, 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 ], [ 9, 172 ], [ 172, 173 ], [ 0, 174 ], [ 174, 175 ], [ 174, 176 ] ]
[ "import java.io.*;\nimport java.util.*;\n\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint a[] = new int[w];\n\t\tint b[] = new int[n];\n\t\tint c[] = new int[n];\n\t\tint temp = 0;\n\t\tint i = 0;\n\t\tString str;\n\t\tfor(i=0;i<n;i++){\n\t\t\tstr = sc.next();\n\t\t\tString[] bc = str.split(\",\");\n\t\t\tb[i] = Integer.parseInt(bc[0])-1;\n\t\t\tc[i] = Integer.parseInt(bc[1])-1;\n\t\t}\n\t\tfor(i=0;i<w;i++){\n\t\t\ta[i] = i + 1;\n\t\t}\n\t\tfor(i=0;i<n;i++){\n\t\t\ttemp = a[b[i]];\n\t\t\ta[b[i]] = a[c[i]];\n\t\t\ta[c[i]] = temp;\n\t\t}\n\t\tfor(i=0;i<w;i++){\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t}\n}", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint a[] = new int[w];\n\t\tint b[] = new int[n];\n\t\tint c[] = new int[n];\n\t\tint temp = 0;\n\t\tint i = 0;\n\t\tString str;\n\t\tfor(i=0;i<n;i++){\n\t\t\tstr = sc.next();\n\t\t\tString[] bc = str.split(\",\");\n\t\t\tb[i] = Integer.parseInt(bc[0])-1;\n\t\t\tc[i] = Integer.parseInt(bc[1])-1;\n\t\t}\n\t\tfor(i=0;i<w;i++){\n\t\t\ta[i] = i + 1;\n\t\t}\n\t\tfor(i=0;i<n;i++){\n\t\t\ttemp = a[b[i]];\n\t\t\ta[b[i]] = a[c[i]];\n\t\t\ta[c[i]] = temp;\n\t\t}\n\t\tfor(i=0;i<w;i++){\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint a[] = new int[w];\n\t\tint b[] = new int[n];\n\t\tint c[] = new int[n];\n\t\tint temp = 0;\n\t\tint i = 0;\n\t\tString str;\n\t\tfor(i=0;i<n;i++){\n\t\t\tstr = sc.next();\n\t\t\tString[] bc = str.split(\",\");\n\t\t\tb[i] = Integer.parseInt(bc[0])-1;\n\t\t\tc[i] = Integer.parseInt(bc[1])-1;\n\t\t}\n\t\tfor(i=0;i<w;i++){\n\t\t\ta[i] = i + 1;\n\t\t}\n\t\tfor(i=0;i<n;i++){\n\t\t\ttemp = a[b[i]];\n\t\t\ta[b[i]] = a[c[i]];\n\t\t\ta[c[i]] = temp;\n\t\t}\n\t\tfor(i=0;i<w;i++){\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint a[] = new int[w];\n\t\tint b[] = new int[n];\n\t\tint c[] = new int[n];\n\t\tint temp = 0;\n\t\tint i = 0;\n\t\tString str;\n\t\tfor(i=0;i<n;i++){\n\t\t\tstr = sc.next();\n\t\t\tString[] bc = str.split(\",\");\n\t\t\tb[i] = Integer.parseInt(bc[0])-1;\n\t\t\tc[i] = Integer.parseInt(bc[1])-1;\n\t\t}\n\t\tfor(i=0;i<w;i++){\n\t\t\ta[i] = i + 1;\n\t\t}\n\t\tfor(i=0;i<n;i++){\n\t\t\ttemp = a[b[i]];\n\t\t\ta[b[i]] = a[c[i]];\n\t\t\ta[c[i]] = temp;\n\t\t}\n\t\tfor(i=0;i<w;i++){\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int w = sc.nextInt();", "w", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int a[] = new int[w];", "a", "new int[w]", "w", "int b[] = new int[n];", "b", "new int[n]", "n", "int c[] = new int[n];", "c", "new int[n]", "n", "int temp = 0;", "temp", "0", "int i = 0;", "i", "0", "String str;", "str", "for(i=0;i<n;i++){\n\t\t\tstr = sc.next();\n\t\t\tString[] bc = str.split(\",\");\n\t\t\tb[i] = Integer.parseInt(bc[0])-1;\n\t\t\tc[i] = Integer.parseInt(bc[1])-1;\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\tString[] bc = str.split(\",\");\n\t\t\tb[i] = Integer.parseInt(bc[0])-1;\n\t\t\tc[i] = Integer.parseInt(bc[1])-1;\n\t\t}", "{\n\t\t\tstr = sc.next();\n\t\t\tString[] bc = str.split(\",\");\n\t\t\tb[i] = Integer.parseInt(bc[0])-1;\n\t\t\tc[i] = Integer.parseInt(bc[1])-1;\n\t\t}", "str = sc.next()", "str", "sc.next()", "sc.next", "sc", "String[] bc = str.split(\",\");", "bc", "str.split(\",\")", "str.split", "str", "\",\"", "b[i] = Integer.parseInt(bc[0])-1", "b[i]", "b", "i", "Integer.parseInt(bc[0])-1", "Integer.parseInt(bc[0])", "Integer.parseInt", "Integer", "bc[0]", "bc", "0", "1", "c[i] = Integer.parseInt(bc[1])-1", "c[i]", "c", "i", "Integer.parseInt(bc[1])-1", "Integer.parseInt(bc[1])", "Integer.parseInt", "Integer", "bc[1]", "bc", "1", "1", "for(i=0;i<w;i++){\n\t\t\ta[i] = i + 1;\n\t\t}", "i=0;", "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(i=0;i<n;i++){\n\t\t\ttemp = a[b[i]];\n\t\t\ta[b[i]] = a[c[i]];\n\t\t\ta[c[i]] = temp;\n\t\t}", "i=0;", "i=0", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t\t\ttemp = a[b[i]];\n\t\t\ta[b[i]] = a[c[i]];\n\t\t\ta[c[i]] = temp;\n\t\t}", "{\n\t\t\ttemp = a[b[i]];\n\t\t\ta[b[i]] = a[c[i]];\n\t\t\ta[c[i]] = temp;\n\t\t}", "temp = a[b[i]]", "temp", "a[b[i]]", "a", "b[i]", "b", "i", "a[b[i]] = a[c[i]]", "a[b[i]]", "a", "b[i]", "b", "i", "a[c[i]]", "a", "c[i]", "c", "i", "a[c[i]] = temp", "a[c[i]]", "a", "c[i]", "c", "i", "temp", "for(i=0;i<w;i++){\n\t\t\tSystem.out.println(a[i]);\n\t\t}", "i=0;", "i=0", "i", "0", "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", "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 a[] = new int[w];\n\t\tint b[] = new int[n];\n\t\tint c[] = new int[n];\n\t\tint temp = 0;\n\t\tint i = 0;\n\t\tString str;\n\t\tfor(i=0;i<n;i++){\n\t\t\tstr = sc.next();\n\t\t\tString[] bc = str.split(\",\");\n\t\t\tb[i] = Integer.parseInt(bc[0])-1;\n\t\t\tc[i] = Integer.parseInt(bc[1])-1;\n\t\t}\n\t\tfor(i=0;i<w;i++){\n\t\t\ta[i] = i + 1;\n\t\t}\n\t\tfor(i=0;i<n;i++){\n\t\t\ttemp = a[b[i]];\n\t\t\ta[b[i]] = a[c[i]];\n\t\t\ta[c[i]] = temp;\n\t\t}\n\t\tfor(i=0;i<w;i++){\n\t\t\tSystem.out.println(a[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 a[] = new int[w];\n\t\tint b[] = new int[n];\n\t\tint c[] = new int[n];\n\t\tint temp = 0;\n\t\tint i = 0;\n\t\tString str;\n\t\tfor(i=0;i<n;i++){\n\t\t\tstr = sc.next();\n\t\t\tString[] bc = str.split(\",\");\n\t\t\tb[i] = Integer.parseInt(bc[0])-1;\n\t\t\tc[i] = Integer.parseInt(bc[1])-1;\n\t\t}\n\t\tfor(i=0;i<w;i++){\n\t\t\ta[i] = i + 1;\n\t\t}\n\t\tfor(i=0;i<n;i++){\n\t\t\ttemp = a[b[i]];\n\t\t\ta[b[i]] = a[c[i]];\n\t\t\ta[c[i]] = temp;\n\t\t}\n\t\tfor(i=0;i<w;i++){\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t}\n}", "Main" ]
import java.io.*; import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int n = sc.nextInt(); int a[] = new int[w]; int b[] = new int[n]; int c[] = new int[n]; int temp = 0; int i = 0; String str; for(i=0;i<n;i++){ str = sc.next(); String[] bc = str.split(","); b[i] = Integer.parseInt(bc[0])-1; c[i] = Integer.parseInt(bc[1])-1; } for(i=0;i<w;i++){ a[i] = i + 1; } for(i=0;i<n;i++){ temp = a[b[i]]; a[b[i]] = a[c[i]]; a[c[i]] = temp; } for(i=0;i<w;i++){ System.out.println(a[i]); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 41, 13, 20, 41, 13, 17, 41, 13, 17, 41, 13, 17, 41, 13, 20, 41, 13, 20, 41, 13, 20, 41, 13, 20, 41, 13, 17, 41, 13, 17, 42, 2, 0, 13, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 17, 17, 14, 2, 13, 13, 30, 3, 14, 2, 18, 13, 13, 17, 30, 4, 18, 13, 2, 4, 18, 13, 18, 13, 17, 17, 4, 18, 13, 2, 4, 18, 13, 18, 13, 17, 17, 30, 14, 2, 13, 17, 30, 0, 13, 4, 18, 13, 18, 13, 17, 14, 2, 13, 17, 30, 0, 13, 4, 18, 13, 18, 13, 17, 40, 13, 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, 4, 18, 13, 13, 13, 30, 0, 13, 4, 18, 13, 13, 14, 2, 4, 18, 13, 13, 13, 30, 0, 13, 4, 18, 13, 13, 30, 4, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 2, 4, 18, 13, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 224, 14 ], [ 224, 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 ], [ 42, 44 ], [ 17, 45 ], [ 45, 46 ], [ 45, 47 ], [ 17, 48 ], [ 48, 49 ], [ 48, 50 ], [ 17, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 56, 57 ], [ 52, 58 ], [ 51, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 62, 65 ], [ 62, 66 ], [ 59, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 67, 71 ], [ 71, 72 ], [ 67, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 74, 78 ], [ 73, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 80, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 87, 88 ], [ 87, 89 ], [ 83, 90 ], [ 79, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 95, 98 ], [ 98, 99 ], [ 98, 100 ], [ 94, 101 ], [ 73, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 103, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 110, 111 ], [ 111, 112 ], [ 110, 113 ], [ 113, 114 ], [ 113, 115 ], [ 103, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 116, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 123, 124 ], [ 124, 125 ], [ 123, 126 ], [ 126, 127 ], [ 126, 128 ], [ 102, 129 ], [ 129, 130 ], [ 17, 131 ], [ 131, 132 ], [ 132, 133 ], [ 133, 134 ], [ 133, 135 ], [ 131, 136 ], [ 136, 137 ], [ 136, 138 ], [ 131, 139 ], [ 139, 140 ], [ 140, 141 ], [ 131, 142 ], [ 143, 143 ], [ 143, 144 ], [ 144, 145 ], [ 144, 146 ], [ 143, 147 ], [ 147, 148 ], [ 148, 149 ], [ 149, 150 ], [ 149, 151 ], [ 151, 152 ], [ 151, 153 ], [ 147, 154 ], [ 154, 155 ], [ 154, 156 ], [ 147, 157 ], [ 157, 158 ], [ 158, 159 ], [ 147, 160 ], [ 161, 161 ], [ 161, 162 ], [ 162, 163 ], [ 163, 164 ], [ 164, 165 ], [ 165, 166 ], [ 164, 167 ], [ 163, 168 ], [ 162, 169 ], [ 169, 170 ], [ 170, 171 ], [ 170, 172 ], [ 172, 173 ], [ 173, 174 ], [ 172, 175 ], [ 162, 176 ], [ 176, 177 ], [ 177, 178 ], [ 178, 179 ], [ 179, 180 ], [ 178, 181 ], [ 177, 182 ], [ 176, 183 ], [ 183, 184 ], [ 184, 185 ], [ 184, 186 ], [ 186, 187 ], [ 187, 188 ], [ 186, 189 ], [ 176, 190 ], [ 143, 191 ], [ 191, 192 ], [ 192, 193 ], [ 191, 194 ], [ 17, 195 ], [ 195, 196 ], [ 196, 197 ], [ 197, 198 ], [ 197, 199 ], [ 195, 200 ], [ 200, 201 ], [ 200, 202 ], [ 202, 203 ], [ 203, 204 ], [ 195, 205 ], [ 205, 206 ], [ 206, 207 ], [ 195, 208 ], [ 209, 209 ], [ 209, 210 ], [ 210, 211 ], [ 211, 212 ], [ 212, 213 ], [ 212, 214 ], [ 210, 215 ], [ 215, 216 ], [ 216, 217 ], [ 217, 218 ], [ 216, 219 ], [ 215, 220 ], [ 15, 221 ], [ 221, 222 ], [ 0, 223 ], [ 223, 224 ], [ 223, 225 ] ]
[ "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) throws NumberFormatException, IOException {\n\n\t\tString strLine =\"\";\n\t\tBufferedReader stdReader =\n\t\t\t\tnew BufferedReader(new InputStreamReader(System.in));\n\n\t\tint MAX_DETASET = 100;\n\t\tint cnt = 0;\n\n\t\tboolean nullflug = true;\n\t\tArrayList<Integer> lineList1 = new ArrayList<Integer>();\n\t\tArrayList<Integer> lineList2 = new ArrayList<Integer>();\n\t\tArrayList<Integer>\tnumberList = new ArrayList<Integer>();\n\t\tArrayList<Integer> tateyokoList = new ArrayList<Integer>();\n\n\t\tint lineMaxTate = 100;\n\t\tint lineMaxYoko = 100;\n\n\t\t//1. int?????????????????\\???????????????????????????\n\n\t\twhile((strLine = stdReader.readLine()) != null) {\n\n\t\t\tString[] temp = strLine.split(\",\",0);\n\n\t\t\tif(cnt > lineMaxYoko){\n\t\t\t\tbreak;\n\t\t\t}else if(temp.length > 1 ){//????????????????????????\n\t\t\t\tlineList1.add(Integer.parseInt(temp[0])-1);\n\t\t\t\tlineList2.add(Integer.parseInt(temp[1])-1);\n\n\t\t\t}else{\n\n\t\t\t\tif(cnt == 0){\n\t\t\t\t\tlineMaxTate = Integer.parseInt(temp[0]);\n\t\t\t\t}else if(cnt == 1){\n\t\t\t\t\tlineMaxYoko = Integer.parseInt(temp[0]);\n\n\t\t\t\t}\n\t\t\t\tcnt++;\n\t\t\t}\n\n\t\t}\n\n\n\n\n\n\t\t//2. ???????????????????????¨??????????????\\??£?????????????????????????????§???????????????\n\t\t// ????§??????????numberList???????´?\n\n\t\tfor(int j = 0; j< lineMaxTate; j++){\n\n\t\t\tint now = j;\n\n\t\t\tfor(int i = lineMaxYoko - 1; i >=0 ; i--){\n\n\t\t\t\tif(lineList1.get(i) == now){\n\n\t\t\t\t\tnow = lineList2.get(i);\n\n\t\t\t\t}else if (lineList2.get(i) == now){\n\n\t\t\t\t\tnow = lineList1.get(i);\n\n\t\t\t\t}else{ //????????????\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tnumberList.add(now);\n\t\t}\n\n\n\t\t//3. ??????\n\n\t\tfor(int i = 0; i < numberList.size(); i++){\n\n\t\t\tSystem.out.println(numberList.get(i)+1);\n\n\t\t}\n\n\n\t}\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", "public class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\n\t\tString strLine =\"\";\n\t\tBufferedReader stdReader =\n\t\t\t\tnew BufferedReader(new InputStreamReader(System.in));\n\n\t\tint MAX_DETASET = 100;\n\t\tint cnt = 0;\n\n\t\tboolean nullflug = true;\n\t\tArrayList<Integer> lineList1 = new ArrayList<Integer>();\n\t\tArrayList<Integer> lineList2 = new ArrayList<Integer>();\n\t\tArrayList<Integer>\tnumberList = new ArrayList<Integer>();\n\t\tArrayList<Integer> tateyokoList = new ArrayList<Integer>();\n\n\t\tint lineMaxTate = 100;\n\t\tint lineMaxYoko = 100;\n\n\t\t//1. int?????????????????\\???????????????????????????\n\n\t\twhile((strLine = stdReader.readLine()) != null) {\n\n\t\t\tString[] temp = strLine.split(\",\",0);\n\n\t\t\tif(cnt > lineMaxYoko){\n\t\t\t\tbreak;\n\t\t\t}else if(temp.length > 1 ){//????????????????????????\n\t\t\t\tlineList1.add(Integer.parseInt(temp[0])-1);\n\t\t\t\tlineList2.add(Integer.parseInt(temp[1])-1);\n\n\t\t\t}else{\n\n\t\t\t\tif(cnt == 0){\n\t\t\t\t\tlineMaxTate = Integer.parseInt(temp[0]);\n\t\t\t\t}else if(cnt == 1){\n\t\t\t\t\tlineMaxYoko = Integer.parseInt(temp[0]);\n\n\t\t\t\t}\n\t\t\t\tcnt++;\n\t\t\t}\n\n\t\t}\n\n\n\n\n\n\t\t//2. ???????????????????????¨??????????????\\??£?????????????????????????????§???????????????\n\t\t// ????§??????????numberList???????´?\n\n\t\tfor(int j = 0; j< lineMaxTate; j++){\n\n\t\t\tint now = j;\n\n\t\t\tfor(int i = lineMaxYoko - 1; i >=0 ; i--){\n\n\t\t\t\tif(lineList1.get(i) == now){\n\n\t\t\t\t\tnow = lineList2.get(i);\n\n\t\t\t\t}else if (lineList2.get(i) == now){\n\n\t\t\t\t\tnow = lineList1.get(i);\n\n\t\t\t\t}else{ //????????????\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tnumberList.add(now);\n\t\t}\n\n\n\t\t//3. ??????\n\n\t\tfor(int i = 0; i < numberList.size(); i++){\n\n\t\t\tSystem.out.println(numberList.get(i)+1);\n\n\t\t}\n\n\n\t}\n\n\n}", "Main", "public static void main(String[] args) throws NumberFormatException, IOException {\n\n\t\tString strLine =\"\";\n\t\tBufferedReader stdReader =\n\t\t\t\tnew BufferedReader(new InputStreamReader(System.in));\n\n\t\tint MAX_DETASET = 100;\n\t\tint cnt = 0;\n\n\t\tboolean nullflug = true;\n\t\tArrayList<Integer> lineList1 = new ArrayList<Integer>();\n\t\tArrayList<Integer> lineList2 = new ArrayList<Integer>();\n\t\tArrayList<Integer>\tnumberList = new ArrayList<Integer>();\n\t\tArrayList<Integer> tateyokoList = new ArrayList<Integer>();\n\n\t\tint lineMaxTate = 100;\n\t\tint lineMaxYoko = 100;\n\n\t\t//1. int?????????????????\\???????????????????????????\n\n\t\twhile((strLine = stdReader.readLine()) != null) {\n\n\t\t\tString[] temp = strLine.split(\",\",0);\n\n\t\t\tif(cnt > lineMaxYoko){\n\t\t\t\tbreak;\n\t\t\t}else if(temp.length > 1 ){//????????????????????????\n\t\t\t\tlineList1.add(Integer.parseInt(temp[0])-1);\n\t\t\t\tlineList2.add(Integer.parseInt(temp[1])-1);\n\n\t\t\t}else{\n\n\t\t\t\tif(cnt == 0){\n\t\t\t\t\tlineMaxTate = Integer.parseInt(temp[0]);\n\t\t\t\t}else if(cnt == 1){\n\t\t\t\t\tlineMaxYoko = Integer.parseInt(temp[0]);\n\n\t\t\t\t}\n\t\t\t\tcnt++;\n\t\t\t}\n\n\t\t}\n\n\n\n\n\n\t\t//2. ???????????????????????¨??????????????\\??£?????????????????????????????§???????????????\n\t\t// ????§??????????numberList???????´?\n\n\t\tfor(int j = 0; j< lineMaxTate; j++){\n\n\t\t\tint now = j;\n\n\t\t\tfor(int i = lineMaxYoko - 1; i >=0 ; i--){\n\n\t\t\t\tif(lineList1.get(i) == now){\n\n\t\t\t\t\tnow = lineList2.get(i);\n\n\t\t\t\t}else if (lineList2.get(i) == now){\n\n\t\t\t\t\tnow = lineList1.get(i);\n\n\t\t\t\t}else{ //????????????\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tnumberList.add(now);\n\t\t}\n\n\n\t\t//3. ??????\n\n\t\tfor(int i = 0; i < numberList.size(); i++){\n\n\t\t\tSystem.out.println(numberList.get(i)+1);\n\n\t\t}\n\n\n\t}", "main", "{\n\n\t\tString strLine =\"\";\n\t\tBufferedReader stdReader =\n\t\t\t\tnew BufferedReader(new InputStreamReader(System.in));\n\n\t\tint MAX_DETASET = 100;\n\t\tint cnt = 0;\n\n\t\tboolean nullflug = true;\n\t\tArrayList<Integer> lineList1 = new ArrayList<Integer>();\n\t\tArrayList<Integer> lineList2 = new ArrayList<Integer>();\n\t\tArrayList<Integer>\tnumberList = new ArrayList<Integer>();\n\t\tArrayList<Integer> tateyokoList = new ArrayList<Integer>();\n\n\t\tint lineMaxTate = 100;\n\t\tint lineMaxYoko = 100;\n\n\t\t//1. int?????????????????\\???????????????????????????\n\n\t\twhile((strLine = stdReader.readLine()) != null) {\n\n\t\t\tString[] temp = strLine.split(\",\",0);\n\n\t\t\tif(cnt > lineMaxYoko){\n\t\t\t\tbreak;\n\t\t\t}else if(temp.length > 1 ){//????????????????????????\n\t\t\t\tlineList1.add(Integer.parseInt(temp[0])-1);\n\t\t\t\tlineList2.add(Integer.parseInt(temp[1])-1);\n\n\t\t\t}else{\n\n\t\t\t\tif(cnt == 0){\n\t\t\t\t\tlineMaxTate = Integer.parseInt(temp[0]);\n\t\t\t\t}else if(cnt == 1){\n\t\t\t\t\tlineMaxYoko = Integer.parseInt(temp[0]);\n\n\t\t\t\t}\n\t\t\t\tcnt++;\n\t\t\t}\n\n\t\t}\n\n\n\n\n\n\t\t//2. ???????????????????????¨??????????????\\??£?????????????????????????????§???????????????\n\t\t// ????§??????????numberList???????´?\n\n\t\tfor(int j = 0; j< lineMaxTate; j++){\n\n\t\t\tint now = j;\n\n\t\t\tfor(int i = lineMaxYoko - 1; i >=0 ; i--){\n\n\t\t\t\tif(lineList1.get(i) == now){\n\n\t\t\t\t\tnow = lineList2.get(i);\n\n\t\t\t\t}else if (lineList2.get(i) == now){\n\n\t\t\t\t\tnow = lineList1.get(i);\n\n\t\t\t\t}else{ //????????????\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tnumberList.add(now);\n\t\t}\n\n\n\t\t//3. ??????\n\n\t\tfor(int i = 0; i < numberList.size(); i++){\n\n\t\t\tSystem.out.println(numberList.get(i)+1);\n\n\t\t}\n\n\n\t}", "String strLine =\"\";", "strLine", "\"\"", "BufferedReader stdReader =\n\t\t\t\tnew BufferedReader(new InputStreamReader(System.in));", "stdReader", "new BufferedReader(new InputStreamReader(System.in))", "int MAX_DETASET = 100;", "MAX_DETASET", "100", "int cnt = 0;", "cnt", "0", "boolean nullflug = true;", "nullflug", "true", "ArrayList<Integer> lineList1 = new ArrayList<Integer>();", "lineList1", "new ArrayList<Integer>()", "ArrayList<Integer> lineList2 = new ArrayList<Integer>();", "lineList2", "new ArrayList<Integer>()", "ArrayList<Integer>\tnumberList = new ArrayList<Integer>();", "numberList", "new ArrayList<Integer>()", "ArrayList<Integer> tateyokoList = new ArrayList<Integer>();", "tateyokoList", "new ArrayList<Integer>()", "int lineMaxTate = 100;", "lineMaxTate", "100", "int lineMaxYoko = 100;", "lineMaxYoko", "100", "while((strLine = stdReader.readLine()) != null) {\n\n\t\t\tString[] temp = strLine.split(\",\",0);\n\n\t\t\tif(cnt > lineMaxYoko){\n\t\t\t\tbreak;\n\t\t\t}else if(temp.length > 1 ){//????????????????????????\n\t\t\t\tlineList1.add(Integer.parseInt(temp[0])-1);\n\t\t\t\tlineList2.add(Integer.parseInt(temp[1])-1);\n\n\t\t\t}else{\n\n\t\t\t\tif(cnt == 0){\n\t\t\t\t\tlineMaxTate = Integer.parseInt(temp[0]);\n\t\t\t\t}else if(cnt == 1){\n\t\t\t\t\tlineMaxYoko = Integer.parseInt(temp[0]);\n\n\t\t\t\t}\n\t\t\t\tcnt++;\n\t\t\t}\n\n\t\t}", "(strLine = stdReader.readLine()) != null", "(strLine = stdReader.readLine())", "strLine", "stdReader.readLine()", "stdReader.readLine", "stdReader", "null", "{\n\n\t\t\tString[] temp = strLine.split(\",\",0);\n\n\t\t\tif(cnt > lineMaxYoko){\n\t\t\t\tbreak;\n\t\t\t}else if(temp.length > 1 ){//????????????????????????\n\t\t\t\tlineList1.add(Integer.parseInt(temp[0])-1);\n\t\t\t\tlineList2.add(Integer.parseInt(temp[1])-1);\n\n\t\t\t}else{\n\n\t\t\t\tif(cnt == 0){\n\t\t\t\t\tlineMaxTate = Integer.parseInt(temp[0]);\n\t\t\t\t}else if(cnt == 1){\n\t\t\t\t\tlineMaxYoko = Integer.parseInt(temp[0]);\n\n\t\t\t\t}\n\t\t\t\tcnt++;\n\t\t\t}\n\n\t\t}", "String[] temp = strLine.split(\",\",0);", "temp", "strLine.split(\",\",0)", "strLine.split", "strLine", "\",\"", "0", "if(cnt > lineMaxYoko){\n\t\t\t\tbreak;\n\t\t\t}else if(temp.length > 1 ){//????????????????????????\n\t\t\t\tlineList1.add(Integer.parseInt(temp[0])-1);\n\t\t\t\tlineList2.add(Integer.parseInt(temp[1])-1);\n\n\t\t\t}else{\n\n\t\t\t\tif(cnt == 0){\n\t\t\t\t\tlineMaxTate = Integer.parseInt(temp[0]);\n\t\t\t\t}else if(cnt == 1){\n\t\t\t\t\tlineMaxYoko = Integer.parseInt(temp[0]);\n\n\t\t\t\t}\n\t\t\t\tcnt++;\n\t\t\t}", "cnt > lineMaxYoko", "cnt", "lineMaxYoko", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "if(temp.length > 1 ){//????????????????????????\n\t\t\t\tlineList1.add(Integer.parseInt(temp[0])-1);\n\t\t\t\tlineList2.add(Integer.parseInt(temp[1])-1);\n\n\t\t\t}else{\n\n\t\t\t\tif(cnt == 0){\n\t\t\t\t\tlineMaxTate = Integer.parseInt(temp[0]);\n\t\t\t\t}else if(cnt == 1){\n\t\t\t\t\tlineMaxYoko = Integer.parseInt(temp[0]);\n\n\t\t\t\t}\n\t\t\t\tcnt++;\n\t\t\t}", "temp.length > 1", "temp.length", "temp", "temp.length", "1", "{//????????????????????????\n\t\t\t\tlineList1.add(Integer.parseInt(temp[0])-1);\n\t\t\t\tlineList2.add(Integer.parseInt(temp[1])-1);\n\n\t\t\t}", "lineList1.add(Integer.parseInt(temp[0])-1)", "lineList1.add", "lineList1", "Integer.parseInt(temp[0])-1", "Integer.parseInt(temp[0])", "Integer.parseInt", "Integer", "temp[0]", "temp", "0", "1", "lineList2.add(Integer.parseInt(temp[1])-1)", "lineList2.add", "lineList2", "Integer.parseInt(temp[1])-1", "Integer.parseInt(temp[1])", "Integer.parseInt", "Integer", "temp[1]", "temp", "1", "1", "{\n\n\t\t\t\tif(cnt == 0){\n\t\t\t\t\tlineMaxTate = Integer.parseInt(temp[0]);\n\t\t\t\t}else if(cnt == 1){\n\t\t\t\t\tlineMaxYoko = Integer.parseInt(temp[0]);\n\n\t\t\t\t}\n\t\t\t\tcnt++;\n\t\t\t}", "if(cnt == 0){\n\t\t\t\t\tlineMaxTate = Integer.parseInt(temp[0]);\n\t\t\t\t}else if(cnt == 1){\n\t\t\t\t\tlineMaxYoko = Integer.parseInt(temp[0]);\n\n\t\t\t\t}", "cnt == 0", "cnt", "0", "{\n\t\t\t\t\tlineMaxTate = Integer.parseInt(temp[0]);\n\t\t\t\t}", "lineMaxTate = Integer.parseInt(temp[0])", "lineMaxTate", "Integer.parseInt(temp[0])", "Integer.parseInt", "Integer", "temp[0]", "temp", "0", "if(cnt == 1){\n\t\t\t\t\tlineMaxYoko = Integer.parseInt(temp[0]);\n\n\t\t\t\t}", "cnt == 1", "cnt", "1", "{\n\t\t\t\t\tlineMaxYoko = Integer.parseInt(temp[0]);\n\n\t\t\t\t}", "lineMaxYoko = Integer.parseInt(temp[0])", "lineMaxYoko", "Integer.parseInt(temp[0])", "Integer.parseInt", "Integer", "temp[0]", "temp", "0", "cnt++", "cnt", "for(int j = 0; j< lineMaxTate; j++){\n\n\t\t\tint now = j;\n\n\t\t\tfor(int i = lineMaxYoko - 1; i >=0 ; i--){\n\n\t\t\t\tif(lineList1.get(i) == now){\n\n\t\t\t\t\tnow = lineList2.get(i);\n\n\t\t\t\t}else if (lineList2.get(i) == now){\n\n\t\t\t\t\tnow = lineList1.get(i);\n\n\t\t\t\t}else{ //????????????\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tnumberList.add(now);\n\t\t}", "int j = 0;", "int j = 0;", "j", "0", "j< lineMaxTate", "j", "lineMaxTate", "j++", "j++", "j", "{\n\n\t\t\tint now = j;\n\n\t\t\tfor(int i = lineMaxYoko - 1; i >=0 ; i--){\n\n\t\t\t\tif(lineList1.get(i) == now){\n\n\t\t\t\t\tnow = lineList2.get(i);\n\n\t\t\t\t}else if (lineList2.get(i) == now){\n\n\t\t\t\t\tnow = lineList1.get(i);\n\n\t\t\t\t}else{ //????????????\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tnumberList.add(now);\n\t\t}", "{\n\n\t\t\tint now = j;\n\n\t\t\tfor(int i = lineMaxYoko - 1; i >=0 ; i--){\n\n\t\t\t\tif(lineList1.get(i) == now){\n\n\t\t\t\t\tnow = lineList2.get(i);\n\n\t\t\t\t}else if (lineList2.get(i) == now){\n\n\t\t\t\t\tnow = lineList1.get(i);\n\n\t\t\t\t}else{ //????????????\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tnumberList.add(now);\n\t\t}", "int now = j;", "now", "j", "for(int i = lineMaxYoko - 1; i >=0 ; i--){\n\n\t\t\t\tif(lineList1.get(i) == now){\n\n\t\t\t\t\tnow = lineList2.get(i);\n\n\t\t\t\t}else if (lineList2.get(i) == now){\n\n\t\t\t\t\tnow = lineList1.get(i);\n\n\t\t\t\t}else{ //????????????\n\n\t\t\t\t}\n\n\t\t\t}", "int i = lineMaxYoko - 1;", "int i = lineMaxYoko - 1;", "i", "lineMaxYoko - 1", "lineMaxYoko", "1", "i >=0", "i", "0", "i--", "i--", "i", "{\n\n\t\t\t\tif(lineList1.get(i) == now){\n\n\t\t\t\t\tnow = lineList2.get(i);\n\n\t\t\t\t}else if (lineList2.get(i) == now){\n\n\t\t\t\t\tnow = lineList1.get(i);\n\n\t\t\t\t}else{ //????????????\n\n\t\t\t\t}\n\n\t\t\t}", "{\n\n\t\t\t\tif(lineList1.get(i) == now){\n\n\t\t\t\t\tnow = lineList2.get(i);\n\n\t\t\t\t}else if (lineList2.get(i) == now){\n\n\t\t\t\t\tnow = lineList1.get(i);\n\n\t\t\t\t}else{ //????????????\n\n\t\t\t\t}\n\n\t\t\t}", "if(lineList1.get(i) == now){\n\n\t\t\t\t\tnow = lineList2.get(i);\n\n\t\t\t\t}else if (lineList2.get(i) == now){\n\n\t\t\t\t\tnow = lineList1.get(i);\n\n\t\t\t\t}else{ //????????????\n\n\t\t\t\t}", "lineList1.get(i) == now", "lineList1.get(i)", "lineList1.get", "lineList1", "i", "now", "{\n\n\t\t\t\t\tnow = lineList2.get(i);\n\n\t\t\t\t}", "now = lineList2.get(i)", "now", "lineList2.get(i)", "lineList2.get", "lineList2", "i", "if (lineList2.get(i) == now){\n\n\t\t\t\t\tnow = lineList1.get(i);\n\n\t\t\t\t}else{ //????????????\n\n\t\t\t\t}", "lineList2.get(i) == now", "lineList2.get(i)", "lineList2.get", "lineList2", "i", "now", "{\n\n\t\t\t\t\tnow = lineList1.get(i);\n\n\t\t\t\t}", "now = lineList1.get(i)", "now", "lineList1.get(i)", "lineList1.get", "lineList1", "i", "{ //????????????\n\n\t\t\t\t}", "numberList.add(now)", "numberList.add", "numberList", "now", "for(int i = 0; i < numberList.size(); i++){\n\n\t\t\tSystem.out.println(numberList.get(i)+1);\n\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < numberList.size()", "i", "numberList.size()", "numberList.size", "numberList", "i++", "i++", "i", "{\n\n\t\t\tSystem.out.println(numberList.get(i)+1);\n\n\t\t}", "{\n\n\t\t\tSystem.out.println(numberList.get(i)+1);\n\n\t\t}", "System.out.println(numberList.get(i)+1)", "System.out.println", "System.out", "System", "System.out", "numberList.get(i)+1", "numberList.get(i)", "numberList.get", "numberList", "i", "1", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\n\t\tString strLine =\"\";\n\t\tBufferedReader stdReader =\n\t\t\t\tnew BufferedReader(new InputStreamReader(System.in));\n\n\t\tint MAX_DETASET = 100;\n\t\tint cnt = 0;\n\n\t\tboolean nullflug = true;\n\t\tArrayList<Integer> lineList1 = new ArrayList<Integer>();\n\t\tArrayList<Integer> lineList2 = new ArrayList<Integer>();\n\t\tArrayList<Integer>\tnumberList = new ArrayList<Integer>();\n\t\tArrayList<Integer> tateyokoList = new ArrayList<Integer>();\n\n\t\tint lineMaxTate = 100;\n\t\tint lineMaxYoko = 100;\n\n\t\t//1. int?????????????????\\???????????????????????????\n\n\t\twhile((strLine = stdReader.readLine()) != null) {\n\n\t\t\tString[] temp = strLine.split(\",\",0);\n\n\t\t\tif(cnt > lineMaxYoko){\n\t\t\t\tbreak;\n\t\t\t}else if(temp.length > 1 ){//????????????????????????\n\t\t\t\tlineList1.add(Integer.parseInt(temp[0])-1);\n\t\t\t\tlineList2.add(Integer.parseInt(temp[1])-1);\n\n\t\t\t}else{\n\n\t\t\t\tif(cnt == 0){\n\t\t\t\t\tlineMaxTate = Integer.parseInt(temp[0]);\n\t\t\t\t}else if(cnt == 1){\n\t\t\t\t\tlineMaxYoko = Integer.parseInt(temp[0]);\n\n\t\t\t\t}\n\t\t\t\tcnt++;\n\t\t\t}\n\n\t\t}\n\n\n\n\n\n\t\t//2. ???????????????????????¨??????????????\\??£?????????????????????????????§???????????????\n\t\t// ????§??????????numberList???????´?\n\n\t\tfor(int j = 0; j< lineMaxTate; j++){\n\n\t\t\tint now = j;\n\n\t\t\tfor(int i = lineMaxYoko - 1; i >=0 ; i--){\n\n\t\t\t\tif(lineList1.get(i) == now){\n\n\t\t\t\t\tnow = lineList2.get(i);\n\n\t\t\t\t}else if (lineList2.get(i) == now){\n\n\t\t\t\t\tnow = lineList1.get(i);\n\n\t\t\t\t}else{ //????????????\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tnumberList.add(now);\n\t\t}\n\n\n\t\t//3. ??????\n\n\t\tfor(int i = 0; i < numberList.size(); i++){\n\n\t\t\tSystem.out.println(numberList.get(i)+1);\n\n\t\t}\n\n\n\t}\n\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\n\t\tString strLine =\"\";\n\t\tBufferedReader stdReader =\n\t\t\t\tnew BufferedReader(new InputStreamReader(System.in));\n\n\t\tint MAX_DETASET = 100;\n\t\tint cnt = 0;\n\n\t\tboolean nullflug = true;\n\t\tArrayList<Integer> lineList1 = new ArrayList<Integer>();\n\t\tArrayList<Integer> lineList2 = new ArrayList<Integer>();\n\t\tArrayList<Integer>\tnumberList = new ArrayList<Integer>();\n\t\tArrayList<Integer> tateyokoList = new ArrayList<Integer>();\n\n\t\tint lineMaxTate = 100;\n\t\tint lineMaxYoko = 100;\n\n\t\t//1. int?????????????????\\???????????????????????????\n\n\t\twhile((strLine = stdReader.readLine()) != null) {\n\n\t\t\tString[] temp = strLine.split(\",\",0);\n\n\t\t\tif(cnt > lineMaxYoko){\n\t\t\t\tbreak;\n\t\t\t}else if(temp.length > 1 ){//????????????????????????\n\t\t\t\tlineList1.add(Integer.parseInt(temp[0])-1);\n\t\t\t\tlineList2.add(Integer.parseInt(temp[1])-1);\n\n\t\t\t}else{\n\n\t\t\t\tif(cnt == 0){\n\t\t\t\t\tlineMaxTate = Integer.parseInt(temp[0]);\n\t\t\t\t}else if(cnt == 1){\n\t\t\t\t\tlineMaxYoko = Integer.parseInt(temp[0]);\n\n\t\t\t\t}\n\t\t\t\tcnt++;\n\t\t\t}\n\n\t\t}\n\n\n\n\n\n\t\t//2. ???????????????????????¨??????????????\\??£?????????????????????????????§???????????????\n\t\t// ????§??????????numberList???????´?\n\n\t\tfor(int j = 0; j< lineMaxTate; j++){\n\n\t\t\tint now = j;\n\n\t\t\tfor(int i = lineMaxYoko - 1; i >=0 ; i--){\n\n\t\t\t\tif(lineList1.get(i) == now){\n\n\t\t\t\t\tnow = lineList2.get(i);\n\n\t\t\t\t}else if (lineList2.get(i) == now){\n\n\t\t\t\t\tnow = lineList1.get(i);\n\n\t\t\t\t}else{ //????????????\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tnumberList.add(now);\n\t\t}\n\n\n\t\t//3. ??????\n\n\t\tfor(int i = 0; i < numberList.size(); i++){\n\n\t\t\tSystem.out.println(numberList.get(i)+1);\n\n\t\t}\n\n\n\t}\n\n\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) throws NumberFormatException, IOException { String strLine =""; BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in)); int MAX_DETASET = 100; int cnt = 0; boolean nullflug = true; ArrayList<Integer> lineList1 = new ArrayList<Integer>(); ArrayList<Integer> lineList2 = new ArrayList<Integer>(); ArrayList<Integer> numberList = new ArrayList<Integer>(); ArrayList<Integer> tateyokoList = new ArrayList<Integer>(); int lineMaxTate = 100; int lineMaxYoko = 100; //1. int?????????????????\??????????????????????????? while((strLine = stdReader.readLine()) != null) { String[] temp = strLine.split(",",0); if(cnt > lineMaxYoko){ break; }else if(temp.length > 1 ){//???????????????????????? lineList1.add(Integer.parseInt(temp[0])-1); lineList2.add(Integer.parseInt(temp[1])-1); }else{ if(cnt == 0){ lineMaxTate = Integer.parseInt(temp[0]); }else if(cnt == 1){ lineMaxYoko = Integer.parseInt(temp[0]); } cnt++; } } //2. ???????????????????????¨??????????????\??£?????????????????????????????§??????????????? // ????§??????????numberList???????´? for(int j = 0; j< lineMaxTate; j++){ int now = j; for(int i = lineMaxYoko - 1; i >=0 ; i--){ if(lineList1.get(i) == now){ now = lineList2.get(i); }else if (lineList2.get(i) == now){ now = lineList1.get(i); }else{ //???????????? } } numberList.add(now); } //3. ?????? for(int i = 0; i < numberList.size(); i++){ System.out.println(numberList.get(i)+1); } } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 13, 0, 18, 36, 13, 13, 23, 13, 23, 13, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 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, 4, 18, 13, 20, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 2, 13, 17, 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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 4, 18, 13, 13, 18, 4, 18, 13, 13, 13, 30, 4, 18, 13, 13, 18, 4, 18, 13, 13, 13, 14, 2, 4, 18, 13, 13, 18, 4, 18, 13, 13, 13, 30, 4, 18, 13, 13, 18, 4, 18, 13, 13, 13, 4, 18, 13, 2, 4, 18, 13, 13, 17, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 4, 18, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 4, 8 ], [ 8, 9 ], [ 4, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 13, 14 ], [ 14, 15 ], [ 14, 16 ], [ 13, 17 ], [ 12, 18 ], [ 18, 19 ], [ 19, 20 ], [ 19, 21 ], [ 18, 22 ], [ 10, 23 ], [ 23, 24 ], [ 10, 25 ], [ 25, 26 ], [ 0, 27 ], [ 240, 28 ], [ 240, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 32, 34 ], [ 31, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 31, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 31, 45 ], [ 45, 46 ], [ 45, 47 ], [ 31, 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 ], [ 71, 74 ], [ 74, 75 ], [ 74, 76 ], [ 60, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 80, 81 ], [ 79, 82 ], [ 82, 83 ], [ 82, 84 ], [ 60, 85 ], [ 85, 86 ], [ 86, 87 ], [ 85, 88 ], [ 31, 89 ], [ 89, 90 ], [ 89, 91 ], [ 31, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 92, 97 ], [ 97, 98 ], [ 97, 99 ], [ 92, 100 ], [ 100, 101 ], [ 101, 102 ], [ 92, 103 ], [ 104, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 105, 108 ], [ 108, 109 ], [ 108, 110 ], [ 31, 111 ], [ 111, 112 ], [ 111, 113 ], [ 31, 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 ], [ 127, 130 ], [ 31, 131 ], [ 131, 132 ], [ 132, 133 ], [ 133, 134 ], [ 133, 135 ], [ 131, 136 ], [ 136, 137 ], [ 136, 138 ], [ 131, 139 ], [ 139, 140 ], [ 140, 141 ], [ 131, 142 ], [ 143, 143 ], [ 143, 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 ], [ 160, 161 ], [ 159, 162 ], [ 158, 163 ], [ 163, 164 ], [ 164, 165 ], [ 165, 166 ], [ 164, 167 ], [ 163, 168 ], [ 157, 169 ], [ 169, 170 ], [ 170, 171 ], [ 171, 172 ], [ 170, 173 ], [ 170, 174 ], [ 174, 175 ], [ 175, 176 ], [ 176, 177 ], [ 175, 178 ], [ 174, 179 ], [ 157, 180 ], [ 180, 181 ], [ 181, 182 ], [ 182, 183 ], [ 183, 184 ], [ 182, 185 ], [ 181, 186 ], [ 186, 187 ], [ 187, 188 ], [ 188, 189 ], [ 187, 190 ], [ 186, 191 ], [ 180, 192 ], [ 192, 193 ], [ 193, 194 ], [ 194, 195 ], [ 193, 196 ], [ 193, 197 ], [ 197, 198 ], [ 198, 199 ], [ 199, 200 ], [ 198, 201 ], [ 197, 202 ], [ 143, 203 ], [ 203, 204 ], [ 204, 205 ], [ 203, 206 ], [ 206, 207 ], [ 207, 208 ], [ 208, 209 ], [ 207, 210 ], [ 206, 211 ], [ 203, 212 ], [ 212, 213 ], [ 212, 214 ], [ 31, 215 ], [ 215, 216 ], [ 216, 217 ], [ 217, 218 ], [ 217, 219 ], [ 215, 220 ], [ 220, 221 ], [ 220, 222 ], [ 215, 223 ], [ 223, 224 ], [ 224, 225 ], [ 215, 226 ], [ 227, 227 ], [ 227, 228 ], [ 228, 229 ], [ 229, 230 ], [ 230, 231 ], [ 230, 232 ], [ 228, 233 ], [ 233, 234 ], [ 234, 235 ], [ 233, 236 ], [ 29, 237 ], [ 237, 238 ], [ 0, 239 ], [ 239, 240 ], [ 239, 241 ] ]
[ "import java.util.*;\nclass P\n{\n\tint a;\n\tint b;\n\tP(int a, int b)\n\t{\n\t\tthis.a = a;\n\t\tthis.b = b;\n\t}\n}\npublic class Main \n{\n\tpublic static void main(String[] args) \n\t{\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint w = stdIn.nextInt();\n\t\tint n = stdIn.nextInt();\n\t\tList<P> list = new ArrayList<P>();\n\t\tfor(int i = 0; i < n; ++i)\n\t\t{\n\t\t\tString[] str = stdIn.next().split(\",\");\n\t\t\tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\t\t\tlist.add(new P(a, b));\n\t\t}\n\t\tList<Integer> start = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tstart.add(i + 1);\n\t\t}\n\t\tList<Integer> end = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tend.add(0);\n\t\t}\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tfor(int j = 0; j < n; ++j)\n\t\t\t{\n\t\t\t\tif(start.get(i) == list.get(j).a)\n\t\t\t\t{\n\t\t\t\t\tstart.set(i, list.get(j).b);\n\t\t\t\t}\n\t\t\t\telse if(start.get(i) == list.get(j).b)\n\t\t\t\t{\n\t\t\t\t\tstart.set(i, list.get(j).a);\n\t\t\t\t}\n\t\t\t}\n\t\t\tend.set(start.get(i) - 1, i + 1);\n\t\t}\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tSystem.out.println(end.get(i));\n\t\t}\n\t}\n}", "import java.util.*;", "util.*", "java", "class P\n{\n\tint a;\n\tint b;\n\tP(int a, int b)\n\t{\n\t\tthis.a = a;\n\t\tthis.b = b;\n\t}\n}", "P", "int a;", "a", "int b;", "b", "P(int a, int b)\n\t{\n\t\tthis.a = a;\n\t\tthis.b = b;\n\t}", "P", "{\n\t\tthis.a = a;\n\t\tthis.b = b;\n\t}", "this.a = a", "this.a", "this", "this.a", "a", "this.b = b", "this.b", "this", "this.b", "b", "int a", "a", "int b", "b", "public class Main \n{\n\tpublic static void main(String[] args) \n\t{\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint w = stdIn.nextInt();\n\t\tint n = stdIn.nextInt();\n\t\tList<P> list = new ArrayList<P>();\n\t\tfor(int i = 0; i < n; ++i)\n\t\t{\n\t\t\tString[] str = stdIn.next().split(\",\");\n\t\t\tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\t\t\tlist.add(new P(a, b));\n\t\t}\n\t\tList<Integer> start = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tstart.add(i + 1);\n\t\t}\n\t\tList<Integer> end = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tend.add(0);\n\t\t}\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tfor(int j = 0; j < n; ++j)\n\t\t\t{\n\t\t\t\tif(start.get(i) == list.get(j).a)\n\t\t\t\t{\n\t\t\t\t\tstart.set(i, list.get(j).b);\n\t\t\t\t}\n\t\t\t\telse if(start.get(i) == list.get(j).b)\n\t\t\t\t{\n\t\t\t\t\tstart.set(i, list.get(j).a);\n\t\t\t\t}\n\t\t\t}\n\t\t\tend.set(start.get(i) - 1, i + 1);\n\t\t}\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tSystem.out.println(end.get(i));\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args) \n\t{\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint w = stdIn.nextInt();\n\t\tint n = stdIn.nextInt();\n\t\tList<P> list = new ArrayList<P>();\n\t\tfor(int i = 0; i < n; ++i)\n\t\t{\n\t\t\tString[] str = stdIn.next().split(\",\");\n\t\t\tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\t\t\tlist.add(new P(a, b));\n\t\t}\n\t\tList<Integer> start = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tstart.add(i + 1);\n\t\t}\n\t\tList<Integer> end = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tend.add(0);\n\t\t}\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tfor(int j = 0; j < n; ++j)\n\t\t\t{\n\t\t\t\tif(start.get(i) == list.get(j).a)\n\t\t\t\t{\n\t\t\t\t\tstart.set(i, list.get(j).b);\n\t\t\t\t}\n\t\t\t\telse if(start.get(i) == list.get(j).b)\n\t\t\t\t{\n\t\t\t\t\tstart.set(i, list.get(j).a);\n\t\t\t\t}\n\t\t\t}\n\t\t\tend.set(start.get(i) - 1, i + 1);\n\t\t}\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tSystem.out.println(end.get(i));\n\t\t}\n\t}", "main", "{\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint w = stdIn.nextInt();\n\t\tint n = stdIn.nextInt();\n\t\tList<P> list = new ArrayList<P>();\n\t\tfor(int i = 0; i < n; ++i)\n\t\t{\n\t\t\tString[] str = stdIn.next().split(\",\");\n\t\t\tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\t\t\tlist.add(new P(a, b));\n\t\t}\n\t\tList<Integer> start = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tstart.add(i + 1);\n\t\t}\n\t\tList<Integer> end = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tend.add(0);\n\t\t}\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tfor(int j = 0; j < n; ++j)\n\t\t\t{\n\t\t\t\tif(start.get(i) == list.get(j).a)\n\t\t\t\t{\n\t\t\t\t\tstart.set(i, list.get(j).b);\n\t\t\t\t}\n\t\t\t\telse if(start.get(i) == list.get(j).b)\n\t\t\t\t{\n\t\t\t\t\tstart.set(i, list.get(j).a);\n\t\t\t\t}\n\t\t\t}\n\t\t\tend.set(start.get(i) - 1, i + 1);\n\t\t}\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tSystem.out.println(end.get(i));\n\t\t}\n\t}", "Scanner stdIn = new Scanner(System.in);", "stdIn", "new Scanner(System.in)", "int w = stdIn.nextInt();", "w", "stdIn.nextInt()", "stdIn.nextInt", "stdIn", "int n = stdIn.nextInt();", "n", "stdIn.nextInt()", "stdIn.nextInt", "stdIn", "List<P> list = new ArrayList<P>();", "list", "new ArrayList<P>()", "for(int i = 0; i < n; ++i)\n\t\t{\n\t\t\tString[] str = stdIn.next().split(\",\");\n\t\t\tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\t\t\tlist.add(new P(a, b));\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "++i", "++i", "i", "{\n\t\t\tString[] str = stdIn.next().split(\",\");\n\t\t\tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\t\t\tlist.add(new P(a, b));\n\t\t}", "{\n\t\t\tString[] str = stdIn.next().split(\",\");\n\t\t\tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\t\t\tlist.add(new P(a, b));\n\t\t}", "String[] str = stdIn.next().split(\",\");", "str", "stdIn.next().split(\",\")", "stdIn.next().split", "stdIn.next()", "stdIn.next", "stdIn", "\",\"", "int a = Integer.parseInt(str[0]);", "a", "Integer.parseInt(str[0])", "Integer.parseInt", "Integer", "str[0]", "str", "0", "int b = Integer.parseInt(str[1]);", "b", "Integer.parseInt(str[1])", "Integer.parseInt", "Integer", "str[1]", "str", "1", "list.add(new P(a, b))", "list.add", "list", "new P(a, b)", "List<Integer> start = new ArrayList<Integer>();", "start", "new ArrayList<Integer>()", "for(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tstart.add(i + 1);\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < w", "i", "w", "++i", "++i", "i", "{\n\t\t\tstart.add(i + 1);\n\t\t}", "{\n\t\t\tstart.add(i + 1);\n\t\t}", "start.add(i + 1)", "start.add", "start", "i + 1", "i", "1", "List<Integer> end = new ArrayList<Integer>();", "end", "new ArrayList<Integer>()", "for(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tend.add(0);\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < w", "i", "w", "++i", "++i", "i", "{\n\t\t\tend.add(0);\n\t\t}", "{\n\t\t\tend.add(0);\n\t\t}", "end.add(0)", "end.add", "end", "0", "for(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tfor(int j = 0; j < n; ++j)\n\t\t\t{\n\t\t\t\tif(start.get(i) == list.get(j).a)\n\t\t\t\t{\n\t\t\t\t\tstart.set(i, list.get(j).b);\n\t\t\t\t}\n\t\t\t\telse if(start.get(i) == list.get(j).b)\n\t\t\t\t{\n\t\t\t\t\tstart.set(i, list.get(j).a);\n\t\t\t\t}\n\t\t\t}\n\t\t\tend.set(start.get(i) - 1, i + 1);\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < w", "i", "w", "++i", "++i", "i", "{\n\t\t\tfor(int j = 0; j < n; ++j)\n\t\t\t{\n\t\t\t\tif(start.get(i) == list.get(j).a)\n\t\t\t\t{\n\t\t\t\t\tstart.set(i, list.get(j).b);\n\t\t\t\t}\n\t\t\t\telse if(start.get(i) == list.get(j).b)\n\t\t\t\t{\n\t\t\t\t\tstart.set(i, list.get(j).a);\n\t\t\t\t}\n\t\t\t}\n\t\t\tend.set(start.get(i) - 1, i + 1);\n\t\t}", "{\n\t\t\tfor(int j = 0; j < n; ++j)\n\t\t\t{\n\t\t\t\tif(start.get(i) == list.get(j).a)\n\t\t\t\t{\n\t\t\t\t\tstart.set(i, list.get(j).b);\n\t\t\t\t}\n\t\t\t\telse if(start.get(i) == list.get(j).b)\n\t\t\t\t{\n\t\t\t\t\tstart.set(i, list.get(j).a);\n\t\t\t\t}\n\t\t\t}\n\t\t\tend.set(start.get(i) - 1, i + 1);\n\t\t}", "for(int j = 0; j < n; ++j)\n\t\t\t{\n\t\t\t\tif(start.get(i) == list.get(j).a)\n\t\t\t\t{\n\t\t\t\t\tstart.set(i, list.get(j).b);\n\t\t\t\t}\n\t\t\t\telse if(start.get(i) == list.get(j).b)\n\t\t\t\t{\n\t\t\t\t\tstart.set(i, list.get(j).a);\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(start.get(i) == list.get(j).a)\n\t\t\t\t{\n\t\t\t\t\tstart.set(i, list.get(j).b);\n\t\t\t\t}\n\t\t\t\telse if(start.get(i) == list.get(j).b)\n\t\t\t\t{\n\t\t\t\t\tstart.set(i, list.get(j).a);\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tif(start.get(i) == list.get(j).a)\n\t\t\t\t{\n\t\t\t\t\tstart.set(i, list.get(j).b);\n\t\t\t\t}\n\t\t\t\telse if(start.get(i) == list.get(j).b)\n\t\t\t\t{\n\t\t\t\t\tstart.set(i, list.get(j).a);\n\t\t\t\t}\n\t\t\t}", "if(start.get(i) == list.get(j).a)\n\t\t\t\t{\n\t\t\t\t\tstart.set(i, list.get(j).b);\n\t\t\t\t}\n\t\t\t\telse if(start.get(i) == list.get(j).b)\n\t\t\t\t{\n\t\t\t\t\tstart.set(i, list.get(j).a);\n\t\t\t\t}", "start.get(i) == list.get(j).a", "start.get(i)", "start.get", "start", "i", "list.get(j).a", "list.get(j)", "list.get", "list", "j", "list.get(j).a", "{\n\t\t\t\t\tstart.set(i, list.get(j).b);\n\t\t\t\t}", "start.set(i, list.get(j).b)", "start.set", "start", "i", "list.get(j).b", "list.get(j)", "list.get", "list", "j", "list.get(j).b", "if(start.get(i) == list.get(j).b)\n\t\t\t\t{\n\t\t\t\t\tstart.set(i, list.get(j).a);\n\t\t\t\t}", "start.get(i) == list.get(j).b", "start.get(i)", "start.get", "start", "i", "list.get(j).b", "list.get(j)", "list.get", "list", "j", "list.get(j).b", "{\n\t\t\t\t\tstart.set(i, list.get(j).a);\n\t\t\t\t}", "start.set(i, list.get(j).a)", "start.set", "start", "i", "list.get(j).a", "list.get(j)", "list.get", "list", "j", "list.get(j).a", "end.set(start.get(i) - 1, i + 1)", "end.set", "end", "start.get(i) - 1", "start.get(i)", "start.get", "start", "i", "1", "i + 1", "i", "1", "for(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tSystem.out.println(end.get(i));\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < w", "i", "w", "++i", "++i", "i", "{\n\t\t\tSystem.out.println(end.get(i));\n\t\t}", "{\n\t\t\tSystem.out.println(end.get(i));\n\t\t}", "System.out.println(end.get(i))", "System.out.println", "System.out", "System", "System.out", "end.get(i)", "end.get", "end", "i", "String[] args", "args", "public class Main \n{\n\tpublic static void main(String[] args) \n\t{\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint w = stdIn.nextInt();\n\t\tint n = stdIn.nextInt();\n\t\tList<P> list = new ArrayList<P>();\n\t\tfor(int i = 0; i < n; ++i)\n\t\t{\n\t\t\tString[] str = stdIn.next().split(\",\");\n\t\t\tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\t\t\tlist.add(new P(a, b));\n\t\t}\n\t\tList<Integer> start = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tstart.add(i + 1);\n\t\t}\n\t\tList<Integer> end = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tend.add(0);\n\t\t}\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tfor(int j = 0; j < n; ++j)\n\t\t\t{\n\t\t\t\tif(start.get(i) == list.get(j).a)\n\t\t\t\t{\n\t\t\t\t\tstart.set(i, list.get(j).b);\n\t\t\t\t}\n\t\t\t\telse if(start.get(i) == list.get(j).b)\n\t\t\t\t{\n\t\t\t\t\tstart.set(i, list.get(j).a);\n\t\t\t\t}\n\t\t\t}\n\t\t\tend.set(start.get(i) - 1, i + 1);\n\t\t}\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tSystem.out.println(end.get(i));\n\t\t}\n\t}\n}", "public class Main \n{\n\tpublic static void main(String[] args) \n\t{\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint w = stdIn.nextInt();\n\t\tint n = stdIn.nextInt();\n\t\tList<P> list = new ArrayList<P>();\n\t\tfor(int i = 0; i < n; ++i)\n\t\t{\n\t\t\tString[] str = stdIn.next().split(\",\");\n\t\t\tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\t\t\tlist.add(new P(a, b));\n\t\t}\n\t\tList<Integer> start = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tstart.add(i + 1);\n\t\t}\n\t\tList<Integer> end = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tend.add(0);\n\t\t}\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tfor(int j = 0; j < n; ++j)\n\t\t\t{\n\t\t\t\tif(start.get(i) == list.get(j).a)\n\t\t\t\t{\n\t\t\t\t\tstart.set(i, list.get(j).b);\n\t\t\t\t}\n\t\t\t\telse if(start.get(i) == list.get(j).b)\n\t\t\t\t{\n\t\t\t\t\tstart.set(i, list.get(j).a);\n\t\t\t\t}\n\t\t\t}\n\t\t\tend.set(start.get(i) - 1, i + 1);\n\t\t}\n\t\tfor(int i = 0; i < w; ++i)\n\t\t{\n\t\t\tSystem.out.println(end.get(i));\n\t\t}\n\t}\n}", "Main" ]
import java.util.*; class P { int a; int b; P(int a, int b) { this.a = a; this.b = b; } } public class Main { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int w = stdIn.nextInt(); int n = stdIn.nextInt(); List<P> list = new ArrayList<P>(); for(int i = 0; i < n; ++i) { String[] str = stdIn.next().split(","); int a = Integer.parseInt(str[0]); int b = Integer.parseInt(str[1]); list.add(new P(a, b)); } List<Integer> start = new ArrayList<Integer>(); for(int i = 0; i < w; ++i) { start.add(i + 1); } List<Integer> end = new ArrayList<Integer>(); for(int i = 0; i < w; ++i) { end.add(0); } for(int i = 0; i < w; ++i) { for(int j = 0; j < n; ++j) { if(start.get(i) == list.get(j).a) { start.set(i, list.get(j).b); } else if(start.get(i) == list.get(j).b) { start.set(i, list.get(j).a); } } end.set(start.get(i) - 1, i + 1); } for(int i = 0; i < w; ++i) { System.out.println(end.get(i)); } } }
[ 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\tint vertical = Integer.parseInt(br.readLine());\n\tint horizontal = Integer.parseInt(br.readLine());\n\n\t/*\n\t * for (int i = 0; i < horizontal; i++) {\n\t * \n\t * }\n\t */\n\n\t//\n\tList<int[]> inputArrays = new ArrayList<>();\n\tfor (int i = 0; i < horizontal; i++) {\n\t String[] queryStr = br.readLine().split(\",\");\n\t int[] query = new int[2];\n\t query[FIRST_NUMBER] = Integer.parseInt(queryStr[FIRST_NUMBER]);\n\t query[SECOND_NUMBER] = Integer.parseInt(queryStr[SECOND_NUMBER]);\n\t inputArrays.add(query);\n\t}\n\n\t//\n\tint[] outputArray = getDrawedArray(inputArrays, vertical, horizontal);\n\n\t//\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t System.out.println(outputArray[i]);\n\t}\n\n }\n\n private static int[] getDrawedArray(List<int[]> inputArrays, int amidaLength, int loopCount) {\n\t// ?????\\?????????????????????????????????????????????\n\t// outputArray[0]????????¨?????????\n\tint[] outputArray = new int[amidaLength + 1];\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t outputArray[i] = i;\n\t}\n\n\tfor (int[] query : inputArrays) {\n\t int mediator = 0;\n\n\t mediator = outputArray[query[FIRST_NUMBER]];\n\t outputArray[query[FIRST_NUMBER]] = outputArray[query[SECOND_NUMBER]];\n\t outputArray[query[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\tint vertical = Integer.parseInt(br.readLine());\n\tint horizontal = Integer.parseInt(br.readLine());\n\n\t/*\n\t * for (int i = 0; i < horizontal; i++) {\n\t * \n\t * }\n\t */\n\n\t//\n\tList<int[]> inputArrays = new ArrayList<>();\n\tfor (int i = 0; i < horizontal; i++) {\n\t String[] queryStr = br.readLine().split(\",\");\n\t int[] query = new int[2];\n\t query[FIRST_NUMBER] = Integer.parseInt(queryStr[FIRST_NUMBER]);\n\t query[SECOND_NUMBER] = Integer.parseInt(queryStr[SECOND_NUMBER]);\n\t inputArrays.add(query);\n\t}\n\n\t//\n\tint[] outputArray = getDrawedArray(inputArrays, vertical, horizontal);\n\n\t//\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t System.out.println(outputArray[i]);\n\t}\n\n }\n\n private static int[] getDrawedArray(List<int[]> inputArrays, int amidaLength, int loopCount) {\n\t// ?????\\?????????????????????????????????????????????\n\t// outputArray[0]????????¨?????????\n\tint[] outputArray = new int[amidaLength + 1];\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t outputArray[i] = i;\n\t}\n\n\tfor (int[] query : inputArrays) {\n\t int mediator = 0;\n\n\t mediator = outputArray[query[FIRST_NUMBER]];\n\t outputArray[query[FIRST_NUMBER]] = outputArray[query[SECOND_NUMBER]];\n\t outputArray[query[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\tint vertical = Integer.parseInt(br.readLine());\n\tint horizontal = Integer.parseInt(br.readLine());\n\n\t/*\n\t * for (int i = 0; i < horizontal; i++) {\n\t * \n\t * }\n\t */\n\n\t//\n\tList<int[]> inputArrays = new ArrayList<>();\n\tfor (int i = 0; i < horizontal; i++) {\n\t String[] queryStr = br.readLine().split(\",\");\n\t int[] query = new int[2];\n\t query[FIRST_NUMBER] = Integer.parseInt(queryStr[FIRST_NUMBER]);\n\t query[SECOND_NUMBER] = Integer.parseInt(queryStr[SECOND_NUMBER]);\n\t inputArrays.add(query);\n\t}\n\n\t//\n\tint[] outputArray = getDrawedArray(inputArrays, vertical, horizontal);\n\n\t//\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\tint vertical = Integer.parseInt(br.readLine());\n\tint horizontal = Integer.parseInt(br.readLine());\n\n\t/*\n\t * for (int i = 0; i < horizontal; i++) {\n\t * \n\t * }\n\t */\n\n\t//\n\tList<int[]> inputArrays = new ArrayList<>();\n\tfor (int i = 0; i < horizontal; i++) {\n\t String[] queryStr = br.readLine().split(\",\");\n\t int[] query = new int[2];\n\t query[FIRST_NUMBER] = Integer.parseInt(queryStr[FIRST_NUMBER]);\n\t query[SECOND_NUMBER] = Integer.parseInt(queryStr[SECOND_NUMBER]);\n\t inputArrays.add(query);\n\t}\n\n\t//\n\tint[] outputArray = getDrawedArray(inputArrays, vertical, horizontal);\n\n\t//\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[]> inputArrays = new ArrayList<>();", "inputArrays", "new ArrayList<>()", "for (int i = 0; i < horizontal; i++) {\n\t String[] queryStr = br.readLine().split(\",\");\n\t int[] query = new int[2];\n\t query[FIRST_NUMBER] = Integer.parseInt(queryStr[FIRST_NUMBER]);\n\t query[SECOND_NUMBER] = Integer.parseInt(queryStr[SECOND_NUMBER]);\n\t inputArrays.add(query);\n\t}", "int i = 0;", "int i = 0;", "i", "0", "i < horizontal", "i", "horizontal", "i++", "i++", "i", "{\n\t String[] queryStr = br.readLine().split(\",\");\n\t int[] query = new int[2];\n\t query[FIRST_NUMBER] = Integer.parseInt(queryStr[FIRST_NUMBER]);\n\t query[SECOND_NUMBER] = Integer.parseInt(queryStr[SECOND_NUMBER]);\n\t inputArrays.add(query);\n\t}", "{\n\t String[] queryStr = br.readLine().split(\",\");\n\t int[] query = new int[2];\n\t query[FIRST_NUMBER] = Integer.parseInt(queryStr[FIRST_NUMBER]);\n\t query[SECOND_NUMBER] = Integer.parseInt(queryStr[SECOND_NUMBER]);\n\t inputArrays.add(query);\n\t}", "String[] queryStr = br.readLine().split(\",\");", "queryStr", "br.readLine().split(\",\")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\",\"", "int[] query = new int[2];", "query", "new int[2]", "2", "query[FIRST_NUMBER] = Integer.parseInt(queryStr[FIRST_NUMBER])", "query[FIRST_NUMBER]", "query", "FIRST_NUMBER", "Integer.parseInt(queryStr[FIRST_NUMBER])", "Integer.parseInt", "Integer", "queryStr[FIRST_NUMBER]", "queryStr", "FIRST_NUMBER", "query[SECOND_NUMBER] = Integer.parseInt(queryStr[SECOND_NUMBER])", "query[SECOND_NUMBER]", "query", "SECOND_NUMBER", "Integer.parseInt(queryStr[SECOND_NUMBER])", "Integer.parseInt", "Integer", "queryStr[SECOND_NUMBER]", "queryStr", "SECOND_NUMBER", "inputArrays.add(query)", "inputArrays.add", "inputArrays", "query", "int[] outputArray = getDrawedArray(inputArrays, vertical, horizontal);", "outputArray", "getDrawedArray(inputArrays, vertical, horizontal)", "getDrawedArray", "inputArrays", "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", "private static int[] getDrawedArray(List<int[]> inputArrays, int amidaLength, int loopCount) {\n\t// ?????\\?????????????????????????????????????????????\n\t// outputArray[0]????????¨?????????\n\tint[] outputArray = new int[amidaLength + 1];\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t outputArray[i] = i;\n\t}\n\n\tfor (int[] query : inputArrays) {\n\t int mediator = 0;\n\n\t mediator = outputArray[query[FIRST_NUMBER]];\n\t outputArray[query[FIRST_NUMBER]] = outputArray[query[SECOND_NUMBER]];\n\t outputArray[query[SECOND_NUMBER]] = mediator;\n\n\t}\n\n\treturn outputArray;\n\n }", "getDrawedArray", "{\n\t// ?????\\?????????????????????????????????????????????\n\t// outputArray[0]????????¨?????????\n\tint[] outputArray = new int[amidaLength + 1];\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t outputArray[i] = i;\n\t}\n\n\tfor (int[] query : inputArrays) {\n\t int mediator = 0;\n\n\t mediator = outputArray[query[FIRST_NUMBER]];\n\t outputArray[query[FIRST_NUMBER]] = outputArray[query[SECOND_NUMBER]];\n\t outputArray[query[SECOND_NUMBER]] = mediator;\n\n\t}\n\n\treturn outputArray;\n\n }", "int[] outputArray = new int[amidaLength + 1];", "outputArray", "new int[amidaLength + 1]", "amidaLength + 1", "amidaLength", "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[] query : inputArrays) {\n\t int mediator = 0;\n\n\t mediator = outputArray[query[FIRST_NUMBER]];\n\t outputArray[query[FIRST_NUMBER]] = outputArray[query[SECOND_NUMBER]];\n\t outputArray[query[SECOND_NUMBER]] = mediator;\n\n\t}", "int[] query", "inputArrays", "{\n\t int mediator = 0;\n\n\t mediator = outputArray[query[FIRST_NUMBER]];\n\t outputArray[query[FIRST_NUMBER]] = outputArray[query[SECOND_NUMBER]];\n\t outputArray[query[SECOND_NUMBER]] = mediator;\n\n\t}", "{\n\t int mediator = 0;\n\n\t mediator = outputArray[query[FIRST_NUMBER]];\n\t outputArray[query[FIRST_NUMBER]] = outputArray[query[SECOND_NUMBER]];\n\t outputArray[query[SECOND_NUMBER]] = mediator;\n\n\t}", "int mediator = 0;", "mediator", "0", "mediator = outputArray[query[FIRST_NUMBER]]", "mediator", "outputArray[query[FIRST_NUMBER]]", "outputArray", "query[FIRST_NUMBER]", "query", "FIRST_NUMBER", "outputArray[query[FIRST_NUMBER]] = outputArray[query[SECOND_NUMBER]]", "outputArray[query[FIRST_NUMBER]]", "outputArray", "query[FIRST_NUMBER]", "query", "FIRST_NUMBER", "outputArray[query[SECOND_NUMBER]]", "outputArray", "query[SECOND_NUMBER]", "query", "SECOND_NUMBER", "outputArray[query[SECOND_NUMBER]] = mediator", "outputArray[query[SECOND_NUMBER]]", "outputArray", "query[SECOND_NUMBER]", "query", "SECOND_NUMBER", "mediator", "return outputArray;", "outputArray", "List<int[]> inputArrays", "inputArrays", "int amidaLength", "amidaLength", "int loopCount", "loopCount", "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\tint vertical = Integer.parseInt(br.readLine());\n\tint horizontal = Integer.parseInt(br.readLine());\n\n\t/*\n\t * for (int i = 0; i < horizontal; i++) {\n\t * \n\t * }\n\t */\n\n\t//\n\tList<int[]> inputArrays = new ArrayList<>();\n\tfor (int i = 0; i < horizontal; i++) {\n\t String[] queryStr = br.readLine().split(\",\");\n\t int[] query = new int[2];\n\t query[FIRST_NUMBER] = Integer.parseInt(queryStr[FIRST_NUMBER]);\n\t query[SECOND_NUMBER] = Integer.parseInt(queryStr[SECOND_NUMBER]);\n\t inputArrays.add(query);\n\t}\n\n\t//\n\tint[] outputArray = getDrawedArray(inputArrays, vertical, horizontal);\n\n\t//\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t System.out.println(outputArray[i]);\n\t}\n\n }\n\n private static int[] getDrawedArray(List<int[]> inputArrays, int amidaLength, int loopCount) {\n\t// ?????\\?????????????????????????????????????????????\n\t// outputArray[0]????????¨?????????\n\tint[] outputArray = new int[amidaLength + 1];\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t outputArray[i] = i;\n\t}\n\n\tfor (int[] query : inputArrays) {\n\t int mediator = 0;\n\n\t mediator = outputArray[query[FIRST_NUMBER]];\n\t outputArray[query[FIRST_NUMBER]] = outputArray[query[SECOND_NUMBER]];\n\t outputArray[query[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\tint vertical = Integer.parseInt(br.readLine());\n\tint horizontal = Integer.parseInt(br.readLine());\n\n\t/*\n\t * for (int i = 0; i < horizontal; i++) {\n\t * \n\t * }\n\t */\n\n\t//\n\tList<int[]> inputArrays = new ArrayList<>();\n\tfor (int i = 0; i < horizontal; i++) {\n\t String[] queryStr = br.readLine().split(\",\");\n\t int[] query = new int[2];\n\t query[FIRST_NUMBER] = Integer.parseInt(queryStr[FIRST_NUMBER]);\n\t query[SECOND_NUMBER] = Integer.parseInt(queryStr[SECOND_NUMBER]);\n\t inputArrays.add(query);\n\t}\n\n\t//\n\tint[] outputArray = getDrawedArray(inputArrays, vertical, horizontal);\n\n\t//\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t System.out.println(outputArray[i]);\n\t}\n\n }\n\n private static int[] getDrawedArray(List<int[]> inputArrays, int amidaLength, int loopCount) {\n\t// ?????\\?????????????????????????????????????????????\n\t// outputArray[0]????????¨?????????\n\tint[] outputArray = new int[amidaLength + 1];\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t outputArray[i] = i;\n\t}\n\n\tfor (int[] query : inputArrays) {\n\t int mediator = 0;\n\n\t mediator = outputArray[query[FIRST_NUMBER]];\n\t outputArray[query[FIRST_NUMBER]] = outputArray[query[SECOND_NUMBER]];\n\t outputArray[query[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()); /* * for (int i = 0; i < horizontal; i++) { * * } */ // List<int[]> inputArrays = new ArrayList<>(); for (int i = 0; i < horizontal; i++) { String[] queryStr = br.readLine().split(","); int[] query = new int[2]; query[FIRST_NUMBER] = Integer.parseInt(queryStr[FIRST_NUMBER]); query[SECOND_NUMBER] = Integer.parseInt(queryStr[SECOND_NUMBER]); inputArrays.add(query); } // int[] outputArray = getDrawedArray(inputArrays, vertical, horizontal); // for (int i = 1; i < outputArray.length; i++) { System.out.println(outputArray[i]); } } private static int[] getDrawedArray(List<int[]> inputArrays, int amidaLength, int loopCount) { // ?????\????????????????????????????????????????????? // outputArray[0]????????¨????????? int[] outputArray = new int[amidaLength + 1]; for (int i = 1; i < outputArray.length; i++) { outputArray[i] = i; } for (int[] query : inputArrays) { int mediator = 0; mediator = outputArray[query[FIRST_NUMBER]]; outputArray[query[FIRST_NUMBER]] = outputArray[query[SECOND_NUMBER]]; outputArray[query[SECOND_NUMBER]] = mediator; } return outputArray; } }
[ 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;\n\n\npublic class Main {\n public static void main(String[] args){\n \tScanner input = new Scanner(System.in);\n \tint n = input.nextInt();\n \tint m = input.nextInt();\n \tint[] num = new int[n];\n \tfor(int i = 0 ; i < n ; i++){\n \t\tnum[i] = (i+1);\n \t}\n \tfor(int i = 0 ; i < m ; i++){\n \t\tString[] s = input.next().split(\",\");\n \t\tint a = Integer.parseInt(s[0])-1;\n \t\tint b = Integer.parseInt(s[1])-1;\n \t\tint tmp = num[a];\n \t\tnum[a] = num[b];\n \t\tnum[b] = tmp;\n \t}\n \tfor(int i = 0 ; i < n ; i++){\n \t\tSystem.out.println(num[i]);\n \t}\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args){\n \tScanner input = new Scanner(System.in);\n \tint n = input.nextInt();\n \tint m = input.nextInt();\n \tint[] num = new int[n];\n \tfor(int i = 0 ; i < n ; i++){\n \t\tnum[i] = (i+1);\n \t}\n \tfor(int i = 0 ; i < m ; i++){\n \t\tString[] s = input.next().split(\",\");\n \t\tint a = Integer.parseInt(s[0])-1;\n \t\tint b = Integer.parseInt(s[1])-1;\n \t\tint tmp = num[a];\n \t\tnum[a] = num[b];\n \t\tnum[b] = tmp;\n \t}\n \tfor(int i = 0 ; i < n ; i++){\n \t\tSystem.out.println(num[i]);\n \t}\n }\n}", "Main", "public static void main(String[] args){\n \tScanner input = new Scanner(System.in);\n \tint n = input.nextInt();\n \tint m = input.nextInt();\n \tint[] num = new int[n];\n \tfor(int i = 0 ; i < n ; i++){\n \t\tnum[i] = (i+1);\n \t}\n \tfor(int i = 0 ; i < m ; i++){\n \t\tString[] s = input.next().split(\",\");\n \t\tint a = Integer.parseInt(s[0])-1;\n \t\tint b = Integer.parseInt(s[1])-1;\n \t\tint tmp = num[a];\n \t\tnum[a] = num[b];\n \t\tnum[b] = tmp;\n \t}\n \tfor(int i = 0 ; i < n ; i++){\n \t\tSystem.out.println(num[i]);\n \t}\n }", "main", "{\n \tScanner input = new Scanner(System.in);\n \tint n = input.nextInt();\n \tint m = input.nextInt();\n \tint[] num = new int[n];\n \tfor(int i = 0 ; i < n ; i++){\n \t\tnum[i] = (i+1);\n \t}\n \tfor(int i = 0 ; i < m ; i++){\n \t\tString[] s = input.next().split(\",\");\n \t\tint a = Integer.parseInt(s[0])-1;\n \t\tint b = Integer.parseInt(s[1])-1;\n \t\tint tmp = num[a];\n \t\tnum[a] = num[b];\n \t\tnum[b] = tmp;\n \t}\n \tfor(int i = 0 ; i < n ; i++){\n \t\tSystem.out.println(num[i]);\n \t}\n }", "Scanner input = new Scanner(System.in);", "input", "new Scanner(System.in)", "int n = input.nextInt();", "n", "input.nextInt()", "input.nextInt", "input", "int m = input.nextInt();", "m", "input.nextInt()", "input.nextInt", "input", "int[] num = new int[n];", "num", "new int[n]", "n", "for(int i = 0 ; i < n ; i++){\n \t\tnum[i] = (i+1);\n \t}", "int i = 0 ;", "int i = 0 ;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n \t\tnum[i] = (i+1);\n \t}", "{\n \t\tnum[i] = (i+1);\n \t}", "num[i] = (i+1)", "num[i]", "num", "i", "(i+1)", "i", "1", "for(int i = 0 ; i < m ; i++){\n \t\tString[] s = input.next().split(\",\");\n \t\tint a = Integer.parseInt(s[0])-1;\n \t\tint b = Integer.parseInt(s[1])-1;\n \t\tint tmp = num[a];\n \t\tnum[a] = num[b];\n \t\tnum[b] = tmp;\n \t}", "int i = 0 ;", "int i = 0 ;", "i", "0", "i < m", "i", "m", "i++", "i++", "i", "{\n \t\tString[] s = input.next().split(\",\");\n \t\tint a = Integer.parseInt(s[0])-1;\n \t\tint b = Integer.parseInt(s[1])-1;\n \t\tint tmp = num[a];\n \t\tnum[a] = num[b];\n \t\tnum[b] = tmp;\n \t}", "{\n \t\tString[] s = input.next().split(\",\");\n \t\tint a = Integer.parseInt(s[0])-1;\n \t\tint b = Integer.parseInt(s[1])-1;\n \t\tint tmp = num[a];\n \t\tnum[a] = num[b];\n \t\tnum[b] = tmp;\n \t}", "String[] s = input.next().split(\",\");", "s", "input.next().split(\",\")", "input.next().split", "input.next()", "input.next", "input", "\",\"", "int a = Integer.parseInt(s[0])-1;", "a", "Integer.parseInt(s[0])-1", "Integer.parseInt(s[0])", "Integer.parseInt", "Integer", "s[0]", "s", "0", "1", "int b = Integer.parseInt(s[1])-1;", "b", "Integer.parseInt(s[1])-1", "Integer.parseInt(s[1])", "Integer.parseInt", "Integer", "s[1]", "s", "1", "1", "int tmp = num[a];", "tmp", "num[a]", "num", "a", "num[a] = num[b]", "num[a]", "num", "a", "num[b]", "num", "b", "num[b] = tmp", "num[b]", "num", "b", "tmp", "for(int i = 0 ; i < n ; i++){\n \t\tSystem.out.println(num[i]);\n \t}", "int i = 0 ;", "int i = 0 ;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n \t\tSystem.out.println(num[i]);\n \t}", "{\n \t\tSystem.out.println(num[i]);\n \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 public static void main(String[] args){\n \tScanner input = new Scanner(System.in);\n \tint n = input.nextInt();\n \tint m = input.nextInt();\n \tint[] num = new int[n];\n \tfor(int i = 0 ; i < n ; i++){\n \t\tnum[i] = (i+1);\n \t}\n \tfor(int i = 0 ; i < m ; i++){\n \t\tString[] s = input.next().split(\",\");\n \t\tint a = Integer.parseInt(s[0])-1;\n \t\tint b = Integer.parseInt(s[1])-1;\n \t\tint tmp = num[a];\n \t\tnum[a] = num[b];\n \t\tnum[b] = tmp;\n \t}\n \tfor(int i = 0 ; i < n ; i++){\n \t\tSystem.out.println(num[i]);\n \t}\n }\n}", "public class Main {\n public static void main(String[] args){\n \tScanner input = new Scanner(System.in);\n \tint n = input.nextInt();\n \tint m = input.nextInt();\n \tint[] num = new int[n];\n \tfor(int i = 0 ; i < n ; i++){\n \t\tnum[i] = (i+1);\n \t}\n \tfor(int i = 0 ; i < m ; i++){\n \t\tString[] s = input.next().split(\",\");\n \t\tint a = Integer.parseInt(s[0])-1;\n \t\tint b = Integer.parseInt(s[1])-1;\n \t\tint tmp = num[a];\n \t\tnum[a] = num[b];\n \t\tnum[b] = tmp;\n \t}\n \tfor(int i = 0 ; i < n ; i++){\n \t\tSystem.out.println(num[i]);\n \t}\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner input = new Scanner(System.in); int n = input.nextInt(); int m = input.nextInt(); int[] num = new int[n]; for(int i = 0 ; i < n ; i++){ num[i] = (i+1); } for(int i = 0 ; i < m ; i++){ String[] s = input.next().split(","); int a = Integer.parseInt(s[0])-1; int b = Integer.parseInt(s[1])-1; int tmp = num[a]; num[a] = num[b]; num[b] = tmp; } for(int i = 0 ; i < n ; 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, 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 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 138, 8 ], [ 138, 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 ], [ 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 ], [ 61, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 75, 78 ], [ 78, 79 ], [ 78, 80 ], [ 61, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 84, 85 ], [ 83, 86 ], [ 86, 87 ], [ 86, 88 ], [ 61, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 93, 95 ], [ 61, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 99, 101 ], [ 96, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 104, 106 ], [ 61, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 110, 111 ], [ 110, 112 ], [ 107, 113 ], [ 11, 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 ], [ 9, 135 ], [ 135, 136 ], [ 0, 137 ], [ 137, 138 ], [ 137, 139 ] ]
[ "import java.util.Scanner;\nimport java.util.ArrayList;\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[] ac = new int[w];\n for(int i=0;i<w;i++){\n ac[i]=i+1;\n }\n for(int i=0;i<n;i++){\n String s=sc.next();\n String[] ab=s.split(\",\");\n int a=Integer.valueOf(ab[0]);\n int b=Integer.valueOf(ab[1]);\n int temp = ac[a-1];\n ac[a-1] = ac[b-1];\n ac[b-1] = temp; \n }\n for(int i=0;i<w;i++){\n System.out.println(ac[i]);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.ArrayList;", "ArrayList", "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[] ac = new int[w];\n for(int i=0;i<w;i++){\n ac[i]=i+1;\n }\n for(int i=0;i<n;i++){\n String s=sc.next();\n String[] ab=s.split(\",\");\n int a=Integer.valueOf(ab[0]);\n int b=Integer.valueOf(ab[1]);\n int temp = ac[a-1];\n ac[a-1] = ac[b-1];\n ac[b-1] = temp; \n }\n for(int i=0;i<w;i++){\n System.out.println(ac[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[] ac = new int[w];\n for(int i=0;i<w;i++){\n ac[i]=i+1;\n }\n for(int i=0;i<n;i++){\n String s=sc.next();\n String[] ab=s.split(\",\");\n int a=Integer.valueOf(ab[0]);\n int b=Integer.valueOf(ab[1]);\n int temp = ac[a-1];\n ac[a-1] = ac[b-1];\n ac[b-1] = temp; \n }\n for(int i=0;i<w;i++){\n System.out.println(ac[i]);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] ac = new int[w];\n for(int i=0;i<w;i++){\n ac[i]=i+1;\n }\n for(int i=0;i<n;i++){\n String s=sc.next();\n String[] ab=s.split(\",\");\n int a=Integer.valueOf(ab[0]);\n int b=Integer.valueOf(ab[1]);\n int temp = ac[a-1];\n ac[a-1] = ac[b-1];\n ac[b-1] = temp; \n }\n for(int i=0;i<w;i++){\n System.out.println(ac[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[] ac = new int[w];", "ac", "new int[w]", "w", "for(int i=0;i<w;i++){\n ac[i]=i+1;\n }", "int i=0;", "int i=0;", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "{\n ac[i]=i+1;\n }", "{\n ac[i]=i+1;\n }", "ac[i]=i+1", "ac[i]", "ac", "i", "i+1", "i", "1", "for(int i=0;i<n;i++){\n String s=sc.next();\n String[] ab=s.split(\",\");\n int a=Integer.valueOf(ab[0]);\n int b=Integer.valueOf(ab[1]);\n int temp = ac[a-1];\n ac[a-1] = ac[b-1];\n ac[b-1] = temp; \n }", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n String s=sc.next();\n String[] ab=s.split(\",\");\n int a=Integer.valueOf(ab[0]);\n int b=Integer.valueOf(ab[1]);\n int temp = ac[a-1];\n ac[a-1] = ac[b-1];\n ac[b-1] = temp; \n }", "{\n String s=sc.next();\n String[] ab=s.split(\",\");\n int a=Integer.valueOf(ab[0]);\n int b=Integer.valueOf(ab[1]);\n int temp = ac[a-1];\n ac[a-1] = ac[b-1];\n ac[b-1] = temp; \n }", "String s=sc.next();", "s", "sc.next()", "sc.next", "sc", "String[] ab=s.split(\",\");", "ab", "s.split(\",\")", "s.split", "s", "\",\"", "int a=Integer.valueOf(ab[0]);", "a", "Integer.valueOf(ab[0])", "Integer.valueOf", "Integer", "ab[0]", "ab", "0", "int b=Integer.valueOf(ab[1]);", "b", "Integer.valueOf(ab[1])", "Integer.valueOf", "Integer", "ab[1]", "ab", "1", "int temp = ac[a-1];", "temp", "ac[a-1]", "ac", "a-1", "a", "1", "ac[a-1] = ac[b-1]", "ac[a-1]", "ac", "a-1", "a", "1", "ac[b-1]", "ac", "b-1", "b", "1", "ac[b-1] = temp", "ac[b-1]", "ac", "b-1", "b", "1", "temp", "for(int i=0;i<w;i++){\n System.out.println(ac[i]);\n }", "int i=0;", "int i=0;", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "{\n System.out.println(ac[i]);\n }", "{\n System.out.println(ac[i]);\n }", "System.out.println(ac[i])", "System.out.println", "System.out", "System", "System.out", "ac[i]", "ac", "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[] ac = new int[w];\n for(int i=0;i<w;i++){\n ac[i]=i+1;\n }\n for(int i=0;i<n;i++){\n String s=sc.next();\n String[] ab=s.split(\",\");\n int a=Integer.valueOf(ab[0]);\n int b=Integer.valueOf(ab[1]);\n int temp = ac[a-1];\n ac[a-1] = ac[b-1];\n ac[b-1] = temp; \n }\n for(int i=0;i<w;i++){\n System.out.println(ac[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[] ac = new int[w];\n for(int i=0;i<w;i++){\n ac[i]=i+1;\n }\n for(int i=0;i<n;i++){\n String s=sc.next();\n String[] ab=s.split(\",\");\n int a=Integer.valueOf(ab[0]);\n int b=Integer.valueOf(ab[1]);\n int temp = ac[a-1];\n ac[a-1] = ac[b-1];\n ac[b-1] = temp; \n }\n for(int i=0;i<w;i++){\n System.out.println(ac[i]);\n }\n }\n}", "Main" ]
import java.util.Scanner; import java.util.ArrayList; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int n = sc.nextInt(); int[] ac = new int[w]; for(int i=0;i<w;i++){ ac[i]=i+1; } for(int i=0;i<n;i++){ String s=sc.next(); String[] ab=s.split(","); int a=Integer.valueOf(ab[0]); int b=Integer.valueOf(ab[1]); int temp = ac[a-1]; ac[a-1] = ac[b-1]; ac[b-1] = temp; } for(int i=0;i<w;i++){ System.out.println(ac[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, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 0, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 18, 13, 2, 13, 17, 0, 18, 13, 2, 13, 17, 18, 13, 2, 13, 17, 0, 18, 13, 2, 13, 17, 13, 28, 13, 13, 30, 30, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 144, 11 ], [ 144, 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 ], [ 25, 28 ], [ 14, 29 ], [ 29, 30 ], [ 29, 31 ], [ 14, 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 ], [ 14, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 56, 57 ], [ 14, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 61, 62 ], [ 60, 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 ], [ 76, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 84, 88 ], [ 76, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 94, 95 ], [ 94, 96 ], [ 76, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 100, 101 ], [ 99, 102 ], [ 102, 103 ], [ 102, 104 ], [ 76, 105 ], [ 105, 106 ], [ 105, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 109, 111 ], [ 76, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 115, 116 ], [ 115, 117 ], [ 112, 118 ], [ 118, 119 ], [ 118, 120 ], [ 120, 121 ], [ 120, 122 ], [ 76, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 126, 127 ], [ 126, 128 ], [ 123, 129 ], [ 14, 130 ], [ 130, 131 ], [ 130, 132 ], [ 130, 133 ], [ 134, 134 ], [ 134, 135 ], [ 135, 136 ], [ 136, 137 ], [ 137, 138 ], [ 137, 139 ], [ 135, 140 ], [ 12, 141 ], [ 141, 142 ], [ 0, 143 ], [ 143, 144 ], [ 143, 145 ] ]
[ "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 = br.readLine();\n\t\tint verticalLines = Integer.parseInt(str);\n\t\tint[] num = new int[verticalLines];\n\t\tfor (int i = 0; i < verticalLines; i++) {\n\t\t\tnum[i] = i + 1;\n\t\t}\n\t\tstr = br.readLine();\n\t\tint horizontalLines = Integer.parseInt(str);\n\t\tfor (int j = 0; j < horizontalLines; j++) {\n\t\t\tstr = br.readLine();\n\t\t\tString[] edge = str.split(\",\", 2);\n\t\t\tint startingPoint = Integer.parseInt(edge[0]);\n\t\t\tint destination = Integer.parseInt(edge[1]);\n\t\t\tint temporary = num[destination - 1];\n\t\t\tnum[destination - 1] = num[startingPoint - 1];\n\t\t\tnum[startingPoint - 1] = temporary;\n\t\t}\n\t\tfor (int number : num) {\n\t\t\tSystem.out.println(number);\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 IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str = br.readLine();\n\t\tint verticalLines = Integer.parseInt(str);\n\t\tint[] num = new int[verticalLines];\n\t\tfor (int i = 0; i < verticalLines; i++) {\n\t\t\tnum[i] = i + 1;\n\t\t}\n\t\tstr = br.readLine();\n\t\tint horizontalLines = Integer.parseInt(str);\n\t\tfor (int j = 0; j < horizontalLines; j++) {\n\t\t\tstr = br.readLine();\n\t\t\tString[] edge = str.split(\",\", 2);\n\t\t\tint startingPoint = Integer.parseInt(edge[0]);\n\t\t\tint destination = Integer.parseInt(edge[1]);\n\t\t\tint temporary = num[destination - 1];\n\t\t\tnum[destination - 1] = num[startingPoint - 1];\n\t\t\tnum[startingPoint - 1] = temporary;\n\t\t}\n\t\tfor (int number : num) {\n\t\t\tSystem.out.println(number);\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\tString str = br.readLine();\n\t\tint verticalLines = Integer.parseInt(str);\n\t\tint[] num = new int[verticalLines];\n\t\tfor (int i = 0; i < verticalLines; i++) {\n\t\t\tnum[i] = i + 1;\n\t\t}\n\t\tstr = br.readLine();\n\t\tint horizontalLines = Integer.parseInt(str);\n\t\tfor (int j = 0; j < horizontalLines; j++) {\n\t\t\tstr = br.readLine();\n\t\t\tString[] edge = str.split(\",\", 2);\n\t\t\tint startingPoint = Integer.parseInt(edge[0]);\n\t\t\tint destination = Integer.parseInt(edge[1]);\n\t\t\tint temporary = num[destination - 1];\n\t\t\tnum[destination - 1] = num[startingPoint - 1];\n\t\t\tnum[startingPoint - 1] = temporary;\n\t\t}\n\t\tfor (int number : num) {\n\t\t\tSystem.out.println(number);\n\t\t}\n\t}", "main", "{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str = br.readLine();\n\t\tint verticalLines = Integer.parseInt(str);\n\t\tint[] num = new int[verticalLines];\n\t\tfor (int i = 0; i < verticalLines; i++) {\n\t\t\tnum[i] = i + 1;\n\t\t}\n\t\tstr = br.readLine();\n\t\tint horizontalLines = Integer.parseInt(str);\n\t\tfor (int j = 0; j < horizontalLines; j++) {\n\t\t\tstr = br.readLine();\n\t\t\tString[] edge = str.split(\",\", 2);\n\t\t\tint startingPoint = Integer.parseInt(edge[0]);\n\t\t\tint destination = Integer.parseInt(edge[1]);\n\t\t\tint temporary = num[destination - 1];\n\t\t\tnum[destination - 1] = num[startingPoint - 1];\n\t\t\tnum[startingPoint - 1] = temporary;\n\t\t}\n\t\tfor (int number : num) {\n\t\t\tSystem.out.println(number);\n\t\t}\n\t}", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "String str = br.readLine();", "str", "br.readLine()", "br.readLine", "br", "int verticalLines = Integer.parseInt(str);", "verticalLines", "Integer.parseInt(str)", "Integer.parseInt", "Integer", "str", "int[] num = new int[verticalLines];", "num", "new int[verticalLines]", "verticalLines", "for (int i = 0; i < verticalLines; i++) {\n\t\t\tnum[i] = i + 1;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < verticalLines", "i", "verticalLines", "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", "str = br.readLine()", "str", "br.readLine()", "br.readLine", "br", "int horizontalLines = Integer.parseInt(str);", "horizontalLines", "Integer.parseInt(str)", "Integer.parseInt", "Integer", "str", "for (int j = 0; j < horizontalLines; j++) {\n\t\t\tstr = br.readLine();\n\t\t\tString[] edge = str.split(\",\", 2);\n\t\t\tint startingPoint = Integer.parseInt(edge[0]);\n\t\t\tint destination = Integer.parseInt(edge[1]);\n\t\t\tint temporary = num[destination - 1];\n\t\t\tnum[destination - 1] = num[startingPoint - 1];\n\t\t\tnum[startingPoint - 1] = temporary;\n\t\t}", "int j = 0;", "int j = 0;", "j", "0", "j < horizontalLines", "j", "horizontalLines", "j++", "j++", "j", "{\n\t\t\tstr = br.readLine();\n\t\t\tString[] edge = str.split(\",\", 2);\n\t\t\tint startingPoint = Integer.parseInt(edge[0]);\n\t\t\tint destination = Integer.parseInt(edge[1]);\n\t\t\tint temporary = num[destination - 1];\n\t\t\tnum[destination - 1] = num[startingPoint - 1];\n\t\t\tnum[startingPoint - 1] = temporary;\n\t\t}", "{\n\t\t\tstr = br.readLine();\n\t\t\tString[] edge = str.split(\",\", 2);\n\t\t\tint startingPoint = Integer.parseInt(edge[0]);\n\t\t\tint destination = Integer.parseInt(edge[1]);\n\t\t\tint temporary = num[destination - 1];\n\t\t\tnum[destination - 1] = num[startingPoint - 1];\n\t\t\tnum[startingPoint - 1] = temporary;\n\t\t}", "str = br.readLine()", "str", "br.readLine()", "br.readLine", "br", "String[] edge = str.split(\",\", 2);", "edge", "str.split(\",\", 2)", "str.split", "str", "\",\"", "2", "int startingPoint = Integer.parseInt(edge[0]);", "startingPoint", "Integer.parseInt(edge[0])", "Integer.parseInt", "Integer", "edge[0]", "edge", "0", "int destination = Integer.parseInt(edge[1]);", "destination", "Integer.parseInt(edge[1])", "Integer.parseInt", "Integer", "edge[1]", "edge", "1", "int temporary = num[destination - 1];", "temporary", "num[destination - 1]", "num", "destination - 1", "destination", "1", "num[destination - 1] = num[startingPoint - 1]", "num[destination - 1]", "num", "destination - 1", "destination", "1", "num[startingPoint - 1]", "num", "startingPoint - 1", "startingPoint", "1", "num[startingPoint - 1] = temporary", "num[startingPoint - 1]", "num", "startingPoint - 1", "startingPoint", "1", "temporary", "for (int number : num) {\n\t\t\tSystem.out.println(number);\n\t\t}", "int number", "num", "{\n\t\t\tSystem.out.println(number);\n\t\t}", "{\n\t\t\tSystem.out.println(number);\n\t\t}", "System.out.println(number)", "System.out.println", "System.out", "System", "System.out", "number", "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\tString str = br.readLine();\n\t\tint verticalLines = Integer.parseInt(str);\n\t\tint[] num = new int[verticalLines];\n\t\tfor (int i = 0; i < verticalLines; i++) {\n\t\t\tnum[i] = i + 1;\n\t\t}\n\t\tstr = br.readLine();\n\t\tint horizontalLines = Integer.parseInt(str);\n\t\tfor (int j = 0; j < horizontalLines; j++) {\n\t\t\tstr = br.readLine();\n\t\t\tString[] edge = str.split(\",\", 2);\n\t\t\tint startingPoint = Integer.parseInt(edge[0]);\n\t\t\tint destination = Integer.parseInt(edge[1]);\n\t\t\tint temporary = num[destination - 1];\n\t\t\tnum[destination - 1] = num[startingPoint - 1];\n\t\t\tnum[startingPoint - 1] = temporary;\n\t\t}\n\t\tfor (int number : num) {\n\t\t\tSystem.out.println(number);\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\tString str = br.readLine();\n\t\tint verticalLines = Integer.parseInt(str);\n\t\tint[] num = new int[verticalLines];\n\t\tfor (int i = 0; i < verticalLines; i++) {\n\t\t\tnum[i] = i + 1;\n\t\t}\n\t\tstr = br.readLine();\n\t\tint horizontalLines = Integer.parseInt(str);\n\t\tfor (int j = 0; j < horizontalLines; j++) {\n\t\t\tstr = br.readLine();\n\t\t\tString[] edge = str.split(\",\", 2);\n\t\t\tint startingPoint = Integer.parseInt(edge[0]);\n\t\t\tint destination = Integer.parseInt(edge[1]);\n\t\t\tint temporary = num[destination - 1];\n\t\t\tnum[destination - 1] = num[startingPoint - 1];\n\t\t\tnum[startingPoint - 1] = temporary;\n\t\t}\n\t\tfor (int number : num) {\n\t\t\tSystem.out.println(number);\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 IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str = br.readLine(); int verticalLines = Integer.parseInt(str); int[] num = new int[verticalLines]; for (int i = 0; i < verticalLines; i++) { num[i] = i + 1; } str = br.readLine(); int horizontalLines = Integer.parseInt(str); for (int j = 0; j < horizontalLines; j++) { str = br.readLine(); String[] edge = str.split(",", 2); int startingPoint = Integer.parseInt(edge[0]); int destination = Integer.parseInt(edge[1]); int temporary = num[destination - 1]; num[destination - 1] = num[startingPoint - 1]; num[startingPoint - 1] = temporary; } for (int number : num) { System.out.println(number); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 2, 13, 17, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 41, 13, 14, 2, 4, 18, 4, 18, 13, 17, 17, 17, 17, 30, 0, 13, 4, 18, 13, 4, 18, 13, 17, 17, 0, 13, 4, 18, 13, 4, 18, 13, 17, 4, 18, 13, 30, 0, 13, 4, 18, 13, 4, 18, 13, 17, 17, 0, 13, 4, 18, 13, 4, 18, 13, 17, 4, 18, 13, 0, 18, 18, 13, 13, 13, 13, 0, 18, 18, 13, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 18, 18, 13, 13, 13, 17, 30, 0, 13, 18, 18, 13, 13, 13, 0, 18, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 2, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 204, 5 ], [ 204, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 26, 27 ], [ 26, 28 ], [ 8, 29 ], [ 29, 30 ], [ 29, 31 ], [ 32, 33 ], [ 32, 34 ], [ 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 ], [ 48, 50 ], [ 50, 51 ], [ 51, 52 ], [ 47, 53 ], [ 53, 54 ], [ 47, 55 ], [ 55, 56 ], [ 47, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 61, 64 ], [ 61, 65 ], [ 59, 66 ], [ 58, 67 ], [ 57, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 72, 73 ], [ 71, 74 ], [ 74, 75 ], [ 75, 76 ], [ 74, 77 ], [ 74, 78 ], [ 68, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 81, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 84, 88 ], [ 88, 89 ], [ 89, 90 ], [ 57, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 95, 96 ], [ 94, 97 ], [ 97, 98 ], [ 98, 99 ], [ 97, 100 ], [ 97, 101 ], [ 91, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 105, 106 ], [ 104, 107 ], [ 107, 108 ], [ 108, 109 ], [ 107, 110 ], [ 107, 111 ], [ 111, 112 ], [ 112, 113 ], [ 47, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 115, 119 ], [ 114, 120 ], [ 47, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 122, 126 ], [ 121, 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 ], [ 141, 143 ], [ 140, 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 ], [ 160, 161 ], [ 160, 162 ], [ 159, 163 ], [ 158, 164 ], [ 157, 165 ], [ 165, 166 ], [ 166, 167 ], [ 166, 168 ], [ 168, 169 ], [ 169, 170 ], [ 169, 171 ], [ 168, 172 ], [ 140, 173 ], [ 173, 174 ], [ 174, 175 ], [ 174, 176 ], [ 173, 177 ], [ 8, 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 ], [ 198, 199 ], [ 198, 200 ], [ 6, 201 ], [ 201, 202 ], [ 0, 203 ], [ 203, 204 ], [ 203, 205 ] ]
[ "import java.util.*;\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[][] map = new int[n][w+1];\n\t\tint[] ans = new int[w+1];\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString s = sc.next();\n\t\t\tint a, b;\n\t\t\tif(s.substring(1,2).compareTo(\",\")==0){\n\t\t\t\ta = Integer.valueOf(s.substring(0,1));\n\t\t\t\tb = Integer.valueOf(s.substring(2,s.length()));\n\t\t\t}else{\n\t\t\t\ta = Integer.valueOf(s.substring(0,2));\n\t\t\t\tb = Integer.valueOf(s.substring(3,s.length()));\n\t\t\t}\n\t\t\tmap[i][a]=b;\n\t\t\tmap[i][b]=a;\n\t\t}\n\t\tfor(int i=1;i<=w;i++){\n\t\t\tint k = i;\n\t\t\tfor(int j=0;j<n;j++){\n\t\t\t\tif(map[j][k]>0){\n\t\t\t\t\tk = map[j][k];\n\t\t\t\t}\n\t\t\t}\n\t\t\tans[k] = i;\n\t\t}\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(ans[i+1]);\n\t\t}\n\t\t\n\t\t\n\t}\n}", "import java.util.*;", "util.*", "java", "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[][] map = new int[n][w+1];\n\t\tint[] ans = new int[w+1];\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString s = sc.next();\n\t\t\tint a, b;\n\t\t\tif(s.substring(1,2).compareTo(\",\")==0){\n\t\t\t\ta = Integer.valueOf(s.substring(0,1));\n\t\t\t\tb = Integer.valueOf(s.substring(2,s.length()));\n\t\t\t}else{\n\t\t\t\ta = Integer.valueOf(s.substring(0,2));\n\t\t\t\tb = Integer.valueOf(s.substring(3,s.length()));\n\t\t\t}\n\t\t\tmap[i][a]=b;\n\t\t\tmap[i][b]=a;\n\t\t}\n\t\tfor(int i=1;i<=w;i++){\n\t\t\tint k = i;\n\t\t\tfor(int j=0;j<n;j++){\n\t\t\t\tif(map[j][k]>0){\n\t\t\t\t\tk = map[j][k];\n\t\t\t\t}\n\t\t\t}\n\t\t\tans[k] = i;\n\t\t}\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(ans[i+1]);\n\t\t}\n\t\t\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 = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[][] map = new int[n][w+1];\n\t\tint[] ans = new int[w+1];\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString s = sc.next();\n\t\t\tint a, b;\n\t\t\tif(s.substring(1,2).compareTo(\",\")==0){\n\t\t\t\ta = Integer.valueOf(s.substring(0,1));\n\t\t\t\tb = Integer.valueOf(s.substring(2,s.length()));\n\t\t\t}else{\n\t\t\t\ta = Integer.valueOf(s.substring(0,2));\n\t\t\t\tb = Integer.valueOf(s.substring(3,s.length()));\n\t\t\t}\n\t\t\tmap[i][a]=b;\n\t\t\tmap[i][b]=a;\n\t\t}\n\t\tfor(int i=1;i<=w;i++){\n\t\t\tint k = i;\n\t\t\tfor(int j=0;j<n;j++){\n\t\t\t\tif(map[j][k]>0){\n\t\t\t\t\tk = map[j][k];\n\t\t\t\t}\n\t\t\t}\n\t\t\tans[k] = i;\n\t\t}\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(ans[i+1]);\n\t\t}\n\t\t\n\t\t\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[][] map = new int[n][w+1];\n\t\tint[] ans = new int[w+1];\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString s = sc.next();\n\t\t\tint a, b;\n\t\t\tif(s.substring(1,2).compareTo(\",\")==0){\n\t\t\t\ta = Integer.valueOf(s.substring(0,1));\n\t\t\t\tb = Integer.valueOf(s.substring(2,s.length()));\n\t\t\t}else{\n\t\t\t\ta = Integer.valueOf(s.substring(0,2));\n\t\t\t\tb = Integer.valueOf(s.substring(3,s.length()));\n\t\t\t}\n\t\t\tmap[i][a]=b;\n\t\t\tmap[i][b]=a;\n\t\t}\n\t\tfor(int i=1;i<=w;i++){\n\t\t\tint k = i;\n\t\t\tfor(int j=0;j<n;j++){\n\t\t\t\tif(map[j][k]>0){\n\t\t\t\t\tk = map[j][k];\n\t\t\t\t}\n\t\t\t}\n\t\t\tans[k] = i;\n\t\t}\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(ans[i+1]);\n\t\t}\n\t\t\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[][] map = new int[n][w+1];", "map", "new int[n][w+1]", "n", "w+1", "w", "1", "int[] ans = new int[w+1];", "ans", "new int[w+1]", "w+1", "w", "1", "for(int i=0;i<n;i++){\n\t\t\tString s = sc.next();\n\t\t\tint a, b;\n\t\t\tif(s.substring(1,2).compareTo(\",\")==0){\n\t\t\t\ta = Integer.valueOf(s.substring(0,1));\n\t\t\t\tb = Integer.valueOf(s.substring(2,s.length()));\n\t\t\t}else{\n\t\t\t\ta = Integer.valueOf(s.substring(0,2));\n\t\t\t\tb = Integer.valueOf(s.substring(3,s.length()));\n\t\t\t}\n\t\t\tmap[i][a]=b;\n\t\t\tmap[i][b]=a;\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, b;\n\t\t\tif(s.substring(1,2).compareTo(\",\")==0){\n\t\t\t\ta = Integer.valueOf(s.substring(0,1));\n\t\t\t\tb = Integer.valueOf(s.substring(2,s.length()));\n\t\t\t}else{\n\t\t\t\ta = Integer.valueOf(s.substring(0,2));\n\t\t\t\tb = Integer.valueOf(s.substring(3,s.length()));\n\t\t\t}\n\t\t\tmap[i][a]=b;\n\t\t\tmap[i][b]=a;\n\t\t}", "{\n\t\t\tString s = sc.next();\n\t\t\tint a, b;\n\t\t\tif(s.substring(1,2).compareTo(\",\")==0){\n\t\t\t\ta = Integer.valueOf(s.substring(0,1));\n\t\t\t\tb = Integer.valueOf(s.substring(2,s.length()));\n\t\t\t}else{\n\t\t\t\ta = Integer.valueOf(s.substring(0,2));\n\t\t\t\tb = Integer.valueOf(s.substring(3,s.length()));\n\t\t\t}\n\t\t\tmap[i][a]=b;\n\t\t\tmap[i][b]=a;\n\t\t}", "String s = sc.next();", "s", "sc.next()", "sc.next", "sc", "int a", "a", "b;", "b", "if(s.substring(1,2).compareTo(\",\")==0){\n\t\t\t\ta = Integer.valueOf(s.substring(0,1));\n\t\t\t\tb = Integer.valueOf(s.substring(2,s.length()));\n\t\t\t}else{\n\t\t\t\ta = Integer.valueOf(s.substring(0,2));\n\t\t\t\tb = Integer.valueOf(s.substring(3,s.length()));\n\t\t\t}", "s.substring(1,2).compareTo(\",\")==0", "s.substring(1,2).compareTo(\",\")", "s.substring(1,2).compareTo", "s.substring(1,2)", "s.substring", "s", "1", "2", "\",\"", "0", "{\n\t\t\t\ta = Integer.valueOf(s.substring(0,1));\n\t\t\t\tb = Integer.valueOf(s.substring(2,s.length()));\n\t\t\t}", "a = Integer.valueOf(s.substring(0,1))", "a", "Integer.valueOf(s.substring(0,1))", "Integer.valueOf", "Integer", "s.substring(0,1)", "s.substring", "s", "0", "1", "b = Integer.valueOf(s.substring(2,s.length()))", "b", "Integer.valueOf(s.substring(2,s.length()))", "Integer.valueOf", "Integer", "s.substring(2,s.length())", "s.substring", "s", "2", "s.length()", "s.length", "s", "{\n\t\t\t\ta = Integer.valueOf(s.substring(0,2));\n\t\t\t\tb = Integer.valueOf(s.substring(3,s.length()));\n\t\t\t}", "a = Integer.valueOf(s.substring(0,2))", "a", "Integer.valueOf(s.substring(0,2))", "Integer.valueOf", "Integer", "s.substring(0,2)", "s.substring", "s", "0", "2", "b = Integer.valueOf(s.substring(3,s.length()))", "b", "Integer.valueOf(s.substring(3,s.length()))", "Integer.valueOf", "Integer", "s.substring(3,s.length())", "s.substring", "s", "3", "s.length()", "s.length", "s", "map[i][a]=b", "map[i][a]", "map[i]", "map", "i", "a", "b", "map[i][b]=a", "map[i][b]", "map[i]", "map", "i", "b", "a", "for(int i=1;i<=w;i++){\n\t\t\tint k = i;\n\t\t\tfor(int j=0;j<n;j++){\n\t\t\t\tif(map[j][k]>0){\n\t\t\t\t\tk = map[j][k];\n\t\t\t\t}\n\t\t\t}\n\t\t\tans[k] = i;\n\t\t}", "int i=1;", "int i=1;", "i", "1", "i<=w", "i", "w", "i++", "i++", "i", "{\n\t\t\tint k = i;\n\t\t\tfor(int j=0;j<n;j++){\n\t\t\t\tif(map[j][k]>0){\n\t\t\t\t\tk = map[j][k];\n\t\t\t\t}\n\t\t\t}\n\t\t\tans[k] = i;\n\t\t}", "{\n\t\t\tint k = i;\n\t\t\tfor(int j=0;j<n;j++){\n\t\t\t\tif(map[j][k]>0){\n\t\t\t\t\tk = map[j][k];\n\t\t\t\t}\n\t\t\t}\n\t\t\tans[k] = i;\n\t\t}", "int k = i;", "k", "i", "for(int j=0;j<n;j++){\n\t\t\t\tif(map[j][k]>0){\n\t\t\t\t\tk = map[j][k];\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(map[j][k]>0){\n\t\t\t\t\tk = map[j][k];\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tif(map[j][k]>0){\n\t\t\t\t\tk = map[j][k];\n\t\t\t\t}\n\t\t\t}", "if(map[j][k]>0){\n\t\t\t\t\tk = map[j][k];\n\t\t\t\t}", "map[j][k]>0", "map[j][k]", "map[j]", "map", "j", "k", "0", "{\n\t\t\t\t\tk = map[j][k];\n\t\t\t\t}", "k = map[j][k]", "k", "map[j][k]", "map[j]", "map", "j", "k", "ans[k] = i", "ans[k]", "ans", "k", "i", "for(int i=0;i<w;i++){\n\t\t\tSystem.out.println(ans[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(ans[i+1]);\n\t\t}", "{\n\t\t\tSystem.out.println(ans[i+1]);\n\t\t}", "System.out.println(ans[i+1])", "System.out.println", "System.out", "System", "System.out", "ans[i+1]", "ans", "i+1", "i", "1", "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[][] map = new int[n][w+1];\n\t\tint[] ans = new int[w+1];\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString s = sc.next();\n\t\t\tint a, b;\n\t\t\tif(s.substring(1,2).compareTo(\",\")==0){\n\t\t\t\ta = Integer.valueOf(s.substring(0,1));\n\t\t\t\tb = Integer.valueOf(s.substring(2,s.length()));\n\t\t\t}else{\n\t\t\t\ta = Integer.valueOf(s.substring(0,2));\n\t\t\t\tb = Integer.valueOf(s.substring(3,s.length()));\n\t\t\t}\n\t\t\tmap[i][a]=b;\n\t\t\tmap[i][b]=a;\n\t\t}\n\t\tfor(int i=1;i<=w;i++){\n\t\t\tint k = i;\n\t\t\tfor(int j=0;j<n;j++){\n\t\t\t\tif(map[j][k]>0){\n\t\t\t\t\tk = map[j][k];\n\t\t\t\t}\n\t\t\t}\n\t\t\tans[k] = i;\n\t\t}\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(ans[i+1]);\n\t\t}\n\t\t\n\t\t\n\t}\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[][] map = new int[n][w+1];\n\t\tint[] ans = new int[w+1];\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString s = sc.next();\n\t\t\tint a, b;\n\t\t\tif(s.substring(1,2).compareTo(\",\")==0){\n\t\t\t\ta = Integer.valueOf(s.substring(0,1));\n\t\t\t\tb = Integer.valueOf(s.substring(2,s.length()));\n\t\t\t}else{\n\t\t\t\ta = Integer.valueOf(s.substring(0,2));\n\t\t\t\tb = Integer.valueOf(s.substring(3,s.length()));\n\t\t\t}\n\t\t\tmap[i][a]=b;\n\t\t\tmap[i][b]=a;\n\t\t}\n\t\tfor(int i=1;i<=w;i++){\n\t\t\tint k = i;\n\t\t\tfor(int j=0;j<n;j++){\n\t\t\t\tif(map[j][k]>0){\n\t\t\t\t\tk = map[j][k];\n\t\t\t\t}\n\t\t\t}\n\t\t\tans[k] = i;\n\t\t}\n\t\tfor(int i=0;i<w;i++){\n\t\t\tSystem.out.println(ans[i+1]);\n\t\t}\n\t\t\n\t\t\n\t}\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int n = sc.nextInt(); int[][] map = new int[n][w+1]; int[] ans = new int[w+1]; for(int i=0;i<n;i++){ String s = sc.next(); int a, b; if(s.substring(1,2).compareTo(",")==0){ a = Integer.valueOf(s.substring(0,1)); b = Integer.valueOf(s.substring(2,s.length())); }else{ a = Integer.valueOf(s.substring(0,2)); b = Integer.valueOf(s.substring(3,s.length())); } map[i][a]=b; map[i][b]=a; } for(int i=1;i<=w;i++){ int k = i; for(int j=0;j<n;j++){ if(map[j][k]>0){ k = map[j][k]; } } ans[k] = i; } for(int i=0;i<w;i++){ System.out.println(ans[i+1]); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 20, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 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, 4, 13, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 12, 13, 30, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 23, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 149, 5 ], [ 149, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 8, 11 ], [ 11, 12 ], [ 8, 13 ], [ 13, 14 ], [ 13, 15 ], [ 8, 16 ], [ 16, 17 ], [ 16, 18 ], [ 18, 19 ], [ 19, 20 ], [ 8, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 8, 26 ], [ 26, 27 ], [ 26, 28 ], [ 8, 30 ], [ 30, 31 ], [ 31, 32 ], [ 32, 33 ], [ 32, 34 ], [ 30, 35 ], [ 35, 36 ], [ 35, 37 ], [ 30, 38 ], [ 38, 39 ], [ 39, 40 ], [ 30, 41 ], [ 42, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 47, 49 ], [ 8, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 50, 58 ], [ 58, 59 ], [ 59, 60 ], [ 50, 61 ], [ 62, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 66, 67 ], [ 62, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 70, 73 ], [ 62, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 77, 80 ], [ 80, 81 ], [ 80, 82 ], [ 76, 83 ], [ 62, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 87, 90 ], [ 90, 91 ], [ 90, 92 ], [ 86, 93 ], [ 62, 94 ], [ 94, 95 ], [ 94, 96 ], [ 94, 97 ], [ 94, 98 ], [ 8, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 99, 104 ], [ 104, 105 ], [ 104, 106 ], [ 99, 107 ], [ 107, 108 ], [ 108, 109 ], [ 99, 110 ], [ 111, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 112, 117 ], [ 117, 118 ], [ 117, 119 ], [ 6, 120 ], [ 120, 121 ], [ 149, 122 ], [ 122, 123 ], [ 122, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 127, 128 ], [ 127, 129 ], [ 124, 130 ], [ 130, 131 ], [ 131, 132 ], [ 131, 133 ], [ 130, 134 ], [ 134, 135 ], [ 134, 136 ], [ 124, 137 ], [ 137, 138 ], [ 138, 139 ], [ 138, 140 ], [ 137, 141 ], [ 122, 142 ], [ 142, 143 ], [ 122, 144 ], [ 144, 145 ], [ 122, 146 ], [ 146, 147 ], [ 0, 148 ], [ 148, 149 ], [ 148, 150 ] ]
[ "import java.util.Scanner;\n\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tint w;\n\t\tint n;\n\t\t\n\t\t//データ入力の準備\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\t//あみだくじのサイズを入力\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\t\t\n\t\t//データ格納用配列の追加\n\t\tint[] data = new int[w];\n\t\tfor (int i = 0; i < w; i++){\n\t\t\tdata[i] = i + 1;\n\t\t}\n\t\t\n\t\t//あみだくじのswap\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\t\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\t\n\t\t\tswap(data,a,b);\n\t\t}\n\t\t\n\t\t//結果の出力\n\t\tfor (int i = 0; i < w; i++){\n\t\t\tSystem.out.println(data[i]);\n\t\t}\n\t}\n\t\n\tprivate static void swap(int[] data, int a, int b){\n\t\tint temp = data[a];\n\t\tdata[a] = data[b];\n\t\tdata[b] = temp;\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n\tpublic static void main(String[] args){\n\t\tint w;\n\t\tint n;\n\t\t\n\t\t//データ入力の準備\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\t//あみだくじのサイズを入力\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\t\t\n\t\t//データ格納用配列の追加\n\t\tint[] data = new int[w];\n\t\tfor (int i = 0; i < w; i++){\n\t\t\tdata[i] = i + 1;\n\t\t}\n\t\t\n\t\t//あみだくじのswap\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\t\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\t\n\t\t\tswap(data,a,b);\n\t\t}\n\t\t\n\t\t//結果の出力\n\t\tfor (int i = 0; i < w; i++){\n\t\t\tSystem.out.println(data[i]);\n\t\t}\n\t}\n\t\n\tprivate static void swap(int[] data, int a, int b){\n\t\tint temp = data[a];\n\t\tdata[a] = data[b];\n\t\tdata[b] = temp;\n\t}\n}", "Main", "public static void main(String[] args){\n\t\tint w;\n\t\tint n;\n\t\t\n\t\t//データ入力の準備\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\t//あみだくじのサイズを入力\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\t\t\n\t\t//データ格納用配列の追加\n\t\tint[] data = new int[w];\n\t\tfor (int i = 0; i < w; i++){\n\t\t\tdata[i] = i + 1;\n\t\t}\n\t\t\n\t\t//あみだくじのswap\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\t\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\t\n\t\t\tswap(data,a,b);\n\t\t}\n\t\t\n\t\t//結果の出力\n\t\tfor (int i = 0; i < w; i++){\n\t\t\tSystem.out.println(data[i]);\n\t\t}\n\t}", "main", "{\n\t\tint w;\n\t\tint n;\n\t\t\n\t\t//データ入力の準備\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\t//あみだくじのサイズを入力\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\t\t\n\t\t//データ格納用配列の追加\n\t\tint[] data = new int[w];\n\t\tfor (int i = 0; i < w; i++){\n\t\t\tdata[i] = i + 1;\n\t\t}\n\t\t\n\t\t//あみだくじのswap\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\t\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\t\n\t\t\tswap(data,a,b);\n\t\t}\n\t\t\n\t\t//結果の出力\n\t\tfor (int i = 0; i < w; i++){\n\t\t\tSystem.out.println(data[i]);\n\t\t}\n\t}", "int w;", "w", "int n;", "n", "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", "int[] data = new int[w];", "data", "new int[w]", "w", "for (int i = 0; i < w; i++){\n\t\t\tdata[i] = i + 1;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < w", "i", "w", "i++", "i++", "i", "{\n\t\t\tdata[i] = i + 1;\n\t\t}", "{\n\t\t\tdata[i] = i + 1;\n\t\t}", "data[i] = i + 1", "data[i]", "data", "i", "i + 1", "i", "1", "for (int i = 0; i < n; i++){\n\t\t\tString str = sc.next();\n\t\t\tString ab[] = str.split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\t\n\t\t\tswap(data,a,b);\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\t\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\t\n\t\t\tswap(data,a,b);\n\t\t}", "{\n\t\t\tString str = sc.next();\n\t\t\tString ab[] = str.split(\",\");\n\t\t\t\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\t\n\t\t\tswap(data,a,b);\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", "swap(data,a,b)", "swap", "data", "a", "b", "for (int i = 0; i < w; i++){\n\t\t\tSystem.out.println(data[i]);\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < w", "i", "w", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(data[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(data[i]);\n\t\t}", "System.out.println(data[i])", "System.out.println", "System.out", "System", "System.out", "data[i]", "data", "i", "String[] args", "args", "private static void swap(int[] data, int a, int b){\n\t\tint temp = data[a];\n\t\tdata[a] = data[b];\n\t\tdata[b] = temp;\n\t}", "swap", "{\n\t\tint temp = data[a];\n\t\tdata[a] = data[b];\n\t\tdata[b] = temp;\n\t}", "int temp = data[a];", "temp", "data[a]", "data", "a", "data[a] = data[b]", "data[a]", "data", "a", "data[b]", "data", "b", "data[b] = temp", "data[b]", "data", "b", "temp", "int[] data", "data", "int a", "a", "int b", "b", "public class Main{\n\tpublic static void main(String[] args){\n\t\tint w;\n\t\tint n;\n\t\t\n\t\t//データ入力の準備\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\t//あみだくじのサイズを入力\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\t\t\n\t\t//データ格納用配列の追加\n\t\tint[] data = new int[w];\n\t\tfor (int i = 0; i < w; i++){\n\t\t\tdata[i] = i + 1;\n\t\t}\n\t\t\n\t\t//あみだくじのswap\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\t\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\t\n\t\t\tswap(data,a,b);\n\t\t}\n\t\t\n\t\t//結果の出力\n\t\tfor (int i = 0; i < w; i++){\n\t\t\tSystem.out.println(data[i]);\n\t\t}\n\t}\n\t\n\tprivate static void swap(int[] data, int a, int b){\n\t\tint temp = data[a];\n\t\tdata[a] = data[b];\n\t\tdata[b] = temp;\n\t}\n}", "public class Main{\n\tpublic static void main(String[] args){\n\t\tint w;\n\t\tint n;\n\t\t\n\t\t//データ入力の準備\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\t//あみだくじのサイズを入力\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\t\t\n\t\t//データ格納用配列の追加\n\t\tint[] data = new int[w];\n\t\tfor (int i = 0; i < w; i++){\n\t\t\tdata[i] = i + 1;\n\t\t}\n\t\t\n\t\t//あみだくじのswap\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\t\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\t\n\t\t\tswap(data,a,b);\n\t\t}\n\t\t\n\t\t//結果の出力\n\t\tfor (int i = 0; i < w; i++){\n\t\t\tSystem.out.println(data[i]);\n\t\t}\n\t}\n\t\n\tprivate static void swap(int[] data, int a, int b){\n\t\tint temp = data[a];\n\t\tdata[a] = data[b];\n\t\tdata[b] = temp;\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args){ int w; int n; //データ入力の準備 Scanner sc = new Scanner(System.in); //あみだくじのサイズを入力 w = sc.nextInt(); n = sc.nextInt(); //データ格納用配列の追加 int[] data = new int[w]; for (int i = 0; i < w; i++){ data[i] = i + 1; } //あみだくじのswap 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; swap(data,a,b); } //結果の出力 for (int i = 0; i < w; i++){ System.out.println(data[i]); } } private static void swap(int[] data, int a, int b){ int temp = data[a]; data[a] = data[b]; data[b] = temp; } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 4, 13, 41, 13, 20, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 41, 13, 13, 28, 13, 4, 18, 13, 30, 30, 0, 13, 4, 18, 13, 13, 0, 18, 13, 2, 13, 17, 13, 28, 13, 13, 30, 30, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 0, 18, 13, 13, 20, 14, 2, 13, 17, 30, 4, 18, 13, 41, 13, 20, 29, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 13, 0, 18, 36, 13, 13, 23, 13, 23, 13, 12, 13, 30, 29, 13, 12, 13, 30, 0, 18, 36, 13, 13, 23, 13, 12, 13, 30, 29, 13, 12, 13, 30, 0, 18, 36, 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, 12, 13, 30, 14, 2, 13, 13, 30, 29, 13, 14, 2, 13, 13, 30, 29, 13, 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 ], [ 257, 11 ], [ 257, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 14, 19 ], [ 19, 20 ], [ 19, 21 ], [ 22, 23 ], [ 22, 24 ], [ 14, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 32, 34 ], [ 25, 35 ], [ 35, 36 ], [ 36, 37 ], [ 25, 38 ], [ 39, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 39, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 46, 47 ], [ 43, 48 ], [ 49, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 53, 54 ], [ 52, 55 ], [ 39, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 59, 61 ], [ 56, 62 ], [ 14, 63 ], [ 63, 64 ], [ 63, 65 ], [ 63, 66 ], [ 67, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 12, 74 ], [ 74, 75 ], [ 257, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 78, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 87, 88 ], [ 88, 89 ], [ 78, 90 ], [ 90, 91 ], [ 90, 92 ], [ 92, 93 ], [ 93, 94 ], [ 92, 95 ], [ 95, 96 ], [ 96, 97 ], [ 78, 98 ], [ 98, 99 ], [ 98, 100 ], [ 78, 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 ], [ 117, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 119, 124 ], [ 116, 125 ], [ 125, 126 ], [ 125, 127 ], [ 127, 128 ], [ 128, 129 ], [ 127, 130 ], [ 130, 131 ], [ 130, 132 ], [ 116, 133 ], [ 133, 134 ], [ 133, 135 ], [ 135, 136 ], [ 136, 137 ], [ 135, 138 ], [ 138, 139 ], [ 138, 140 ], [ 116, 141 ], [ 141, 142 ], [ 142, 143 ], [ 142, 144 ], [ 141, 145 ], [ 78, 146 ], [ 146, 147 ], [ 147, 148 ], [ 147, 149 ], [ 146, 150 ], [ 150, 151 ], [ 151, 152 ], [ 152, 153 ], [ 78, 154 ], [ 154, 155 ], [ 154, 156 ], [ 78, 157 ], [ 157, 158 ], [ 257, 159 ], [ 159, 160 ], [ 159, 161 ], [ 161, 162 ], [ 159, 163 ], [ 163, 164 ], [ 159, 165 ], [ 165, 166 ], [ 165, 167 ], [ 167, 168 ], [ 168, 169 ], [ 169, 170 ], [ 169, 171 ], [ 168, 172 ], [ 167, 173 ], [ 173, 174 ], [ 174, 175 ], [ 174, 176 ], [ 173, 177 ], [ 165, 178 ], [ 178, 179 ], [ 165, 180 ], [ 180, 181 ], [ 159, 182 ], [ 182, 183 ], [ 182, 184 ], [ 184, 185 ], [ 185, 186 ], [ 159, 187 ], [ 187, 188 ], [ 187, 189 ], [ 189, 190 ], [ 190, 191 ], [ 191, 192 ], [ 191, 193 ], [ 190, 194 ], [ 187, 195 ], [ 195, 196 ], [ 159, 197 ], [ 197, 198 ], [ 197, 199 ], [ 199, 200 ], [ 200, 201 ], [ 159, 202 ], [ 202, 203 ], [ 202, 204 ], [ 204, 205 ], [ 205, 206 ], [ 206, 207 ], [ 206, 208 ], [ 205, 209 ], [ 202, 210 ], [ 210, 211 ], [ 257, 212 ], [ 212, 213 ], [ 212, 214 ], [ 214, 215 ], [ 212, 216 ], [ 216, 217 ], [ 212, 218 ], [ 218, 219 ], [ 218, 220 ], [ 220, 221 ], [ 221, 222 ], [ 222, 223 ], [ 222, 224 ], [ 221, 225 ], [ 220, 226 ], [ 226, 227 ], [ 227, 228 ], [ 227, 229 ], [ 226, 230 ], [ 218, 231 ], [ 231, 232 ], [ 218, 233 ], [ 233, 234 ], [ 212, 235 ], [ 235, 236 ], [ 235, 237 ], [ 237, 238 ], [ 238, 239 ], [ 239, 240 ], [ 239, 241 ], [ 238, 242 ], [ 242, 243 ], [ 243, 244 ], [ 238, 245 ], [ 245, 246 ], [ 246, 247 ], [ 246, 248 ], [ 245, 249 ], [ 249, 250 ], [ 250, 251 ], [ 237, 252 ], [ 252, 253 ], [ 235, 254 ], [ 254, 255 ], [ 0, 256 ], [ 256, 257 ], [ 256, 258 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n /**\n * あみだくじの情報を受け取り、その結果を表示する。\n *\n * @param args\n */\n public static void main(String[] args) throws IOException {\n\n // 入力値を受け取る\n Lots lots = readLots();\n\n // あみだくじを左から順番に実施する\n int[] resultArray = new int[lots.numberOfVerticalLine];\n for (int i = 1; i <= lots.numberOfVerticalLine; i++) {\n int result = i;\n\n // 横棒すべてに対してジャンプできるかどうか判定する\n for (HorizontalLine horizontalLine : lots.getHorizontalLineArray()) {\n result = horizontalLine.jumpIfOnThisLine(result);\n }\n\n // 最終的にどこに着いたかを保持する\n resultArray[result - 1] = i;\n }\n\n // 結果を出力する\n for (int result : resultArray) {\n System.out.println(result);\n }\n\n }\n\n /**\n * 標準入力から空白区切りの数値を取得し、三角形を表す数値の2次元配列として返却する。\n *\n * @return 三角形を表す整数の2次元配列(6×データ数)\n */\n protected static Lots readLots() throws IOException {\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(\n System.in));\n\n // 最初に縦棒の数、横棒の数を取得する\n int numberOfVerticalLine = Integer.parseInt(reader.readLine());\n int numberOfHorizontalLine = Integer.parseInt(reader.readLine());\n\n // 1行につき、横棒の接続位置を表す2データを取り込む\n HorizontalLine[] horizontalLineArray = new HorizontalLine[numberOfHorizontalLine];\n for (int i = 0; i < horizontalLineArray.length; i++) {\n String[] numbers = reader.readLine().split(\",\");\n int left = Integer.parseInt(numbers[0]);\n int right = Integer.parseInt(numbers[1]);\n horizontalLineArray[i] = new HorizontalLine(left, right);\n }\n\n if (reader != null) {\n reader.close();\n }\n\n // 入力値をクラスにまとめて返却する\n Lots lots = new Lots(numberOfVerticalLine, horizontalLineArray);\n return lots;\n }\n\n /**\n * あみだくじを表すクラス\n *\n */\n static class Lots {\n\n /** 縦棒の数 */\n int numberOfVerticalLine;\n\n /** 横棒を表すペア数字の配列 */\n HorizontalLine[] horizontalLineArray;\n\n /**\n * コンストラクタ\n *\n * @param numberOfVerticalLine 縦棒の数\n * @param horizontalLineArray 横棒を表すペア数字の配列\n */\n public Lots(int numberOfVerticalLine, HorizontalLine[] horizontalLineArray) {\n this.numberOfVerticalLine = numberOfVerticalLine;\n this.horizontalLineArray = horizontalLineArray;\n }\n\n public int getNumberOfVerticalLine() {\n return numberOfVerticalLine;\n }\n\n public void setNumberOfVerticalLine(int numberOfVerticalLine) {\n this.numberOfVerticalLine = numberOfVerticalLine;\n }\n\n public HorizontalLine[] getHorizontalLineArray() {\n return horizontalLineArray;\n }\n\n public void setHorizontalLineArray(HorizontalLine[] horizontalLineArray) {\n this.horizontalLineArray = horizontalLineArray;\n }\n }\n\n /**\n * 横棒を表すクラス\n *\n */\n static class HorizontalLine {\n\n /** 左端 */\n private int left;\n\n /** 右端 */\n private int right;\n\n /**\n * コンストラクタ\n *\n * @param left 左端\n * @param right 右端\n */\n public HorizontalLine(int left, int right) {\n this.left = left;\n this.right = right;\n }\n\n /**\n * 横棒の上にある場合はもう一方に飛び、飛んだ先の番号を取得する。\n *\n * @param value 元の値\n * @return 飛べる場合は飛んだ先、飛べなかった場合は元の値\n */\n public int jumpIfOnThisLine(int value) {\n if (value == right) {\n return left;\n }\n else if (value == left) {\n return right;\n }\n return value;\n }\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "public class Main {\n\n /**\n * あみだくじの情報を受け取り、その結果を表示する。\n *\n * @param args\n */\n public static void main(String[] args) throws IOException {\n\n // 入力値を受け取る\n Lots lots = readLots();\n\n // あみだくじを左から順番に実施する\n int[] resultArray = new int[lots.numberOfVerticalLine];\n for (int i = 1; i <= lots.numberOfVerticalLine; i++) {\n int result = i;\n\n // 横棒すべてに対してジャンプできるかどうか判定する\n for (HorizontalLine horizontalLine : lots.getHorizontalLineArray()) {\n result = horizontalLine.jumpIfOnThisLine(result);\n }\n\n // 最終的にどこに着いたかを保持する\n resultArray[result - 1] = i;\n }\n\n // 結果を出力する\n for (int result : resultArray) {\n System.out.println(result);\n }\n\n }\n\n /**\n * 標準入力から空白区切りの数値を取得し、三角形を表す数値の2次元配列として返却する。\n *\n * @return 三角形を表す整数の2次元配列(6×データ数)\n */\n protected static Lots readLots() throws IOException {\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(\n System.in));\n\n // 最初に縦棒の数、横棒の数を取得する\n int numberOfVerticalLine = Integer.parseInt(reader.readLine());\n int numberOfHorizontalLine = Integer.parseInt(reader.readLine());\n\n // 1行につき、横棒の接続位置を表す2データを取り込む\n HorizontalLine[] horizontalLineArray = new HorizontalLine[numberOfHorizontalLine];\n for (int i = 0; i < horizontalLineArray.length; i++) {\n String[] numbers = reader.readLine().split(\",\");\n int left = Integer.parseInt(numbers[0]);\n int right = Integer.parseInt(numbers[1]);\n horizontalLineArray[i] = new HorizontalLine(left, right);\n }\n\n if (reader != null) {\n reader.close();\n }\n\n // 入力値をクラスにまとめて返却する\n Lots lots = new Lots(numberOfVerticalLine, horizontalLineArray);\n return lots;\n }\n\n /**\n * あみだくじを表すクラス\n *\n */\n static class Lots {\n\n /** 縦棒の数 */\n int numberOfVerticalLine;\n\n /** 横棒を表すペア数字の配列 */\n HorizontalLine[] horizontalLineArray;\n\n /**\n * コンストラクタ\n *\n * @param numberOfVerticalLine 縦棒の数\n * @param horizontalLineArray 横棒を表すペア数字の配列\n */\n public Lots(int numberOfVerticalLine, HorizontalLine[] horizontalLineArray) {\n this.numberOfVerticalLine = numberOfVerticalLine;\n this.horizontalLineArray = horizontalLineArray;\n }\n\n public int getNumberOfVerticalLine() {\n return numberOfVerticalLine;\n }\n\n public void setNumberOfVerticalLine(int numberOfVerticalLine) {\n this.numberOfVerticalLine = numberOfVerticalLine;\n }\n\n public HorizontalLine[] getHorizontalLineArray() {\n return horizontalLineArray;\n }\n\n public void setHorizontalLineArray(HorizontalLine[] horizontalLineArray) {\n this.horizontalLineArray = horizontalLineArray;\n }\n }\n\n /**\n * 横棒を表すクラス\n *\n */\n static class HorizontalLine {\n\n /** 左端 */\n private int left;\n\n /** 右端 */\n private int right;\n\n /**\n * コンストラクタ\n *\n * @param left 左端\n * @param right 右端\n */\n public HorizontalLine(int left, int right) {\n this.left = left;\n this.right = right;\n }\n\n /**\n * 横棒の上にある場合はもう一方に飛び、飛んだ先の番号を取得する。\n *\n * @param value 元の値\n * @return 飛べる場合は飛んだ先、飛べなかった場合は元の値\n */\n public int jumpIfOnThisLine(int value) {\n if (value == right) {\n return left;\n }\n else if (value == left) {\n return right;\n }\n return value;\n }\n }\n}", "Main", "/**\n * あみだくじの情報を受け取り、その結果を表示する。\n *\n * @param args\n */\n public static void main(String[] args) throws IOException {\n\n // 入力値を受け取る\n Lots lots = readLots();\n\n // あみだくじを左から順番に実施する\n int[] resultArray = new int[lots.numberOfVerticalLine];\n for (int i = 1; i <= lots.numberOfVerticalLine; i++) {\n int result = i;\n\n // 横棒すべてに対してジャンプできるかどうか判定する\n for (HorizontalLine horizontalLine : lots.getHorizontalLineArray()) {\n result = horizontalLine.jumpIfOnThisLine(result);\n }\n\n // 最終的にどこに着いたかを保持する\n resultArray[result - 1] = i;\n }\n\n // 結果を出力する\n for (int result : resultArray) {\n System.out.println(result);\n }\n\n }", "main", "{\n\n // 入力値を受け取る\n Lots lots = readLots();\n\n // あみだくじを左から順番に実施する\n int[] resultArray = new int[lots.numberOfVerticalLine];\n for (int i = 1; i <= lots.numberOfVerticalLine; i++) {\n int result = i;\n\n // 横棒すべてに対してジャンプできるかどうか判定する\n for (HorizontalLine horizontalLine : lots.getHorizontalLineArray()) {\n result = horizontalLine.jumpIfOnThisLine(result);\n }\n\n // 最終的にどこに着いたかを保持する\n resultArray[result - 1] = i;\n }\n\n // 結果を出力する\n for (int result : resultArray) {\n System.out.println(result);\n }\n\n }", "Lots lots = readLots();", "lots", "readLots()", "readLots", "int[] resultArray = new int[lots.numberOfVerticalLine];", "resultArray", "new int[lots.numberOfVerticalLine]", "lots.numberOfVerticalLine", "lots", "lots.numberOfVerticalLine", "for (int i = 1; i <= lots.numberOfVerticalLine; i++) {\n int result = i;\n\n // 横棒すべてに対してジャンプできるかどうか判定する\n for (HorizontalLine horizontalLine : lots.getHorizontalLineArray()) {\n result = horizontalLine.jumpIfOnThisLine(result);\n }\n\n // 最終的にどこに着いたかを保持する\n resultArray[result - 1] = i;\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= lots.numberOfVerticalLine", "i", "lots.numberOfVerticalLine", "lots", "lots.numberOfVerticalLine", "i++", "i++", "i", "{\n int result = i;\n\n // 横棒すべてに対してジャンプできるかどうか判定する\n for (HorizontalLine horizontalLine : lots.getHorizontalLineArray()) {\n result = horizontalLine.jumpIfOnThisLine(result);\n }\n\n // 最終的にどこに着いたかを保持する\n resultArray[result - 1] = i;\n }", "{\n int result = i;\n\n // 横棒すべてに対してジャンプできるかどうか判定する\n for (HorizontalLine horizontalLine : lots.getHorizontalLineArray()) {\n result = horizontalLine.jumpIfOnThisLine(result);\n }\n\n // 最終的にどこに着いたかを保持する\n resultArray[result - 1] = i;\n }", "int result = i;", "result", "i", "for (HorizontalLine horizontalLine : lots.getHorizontalLineArray()) {\n result = horizontalLine.jumpIfOnThisLine(result);\n }", "HorizontalLine horizontalLine", "lots.getHorizontalLineArray()", "lots.getHorizontalLineArray", "lots", "{\n result = horizontalLine.jumpIfOnThisLine(result);\n }", "{\n result = horizontalLine.jumpIfOnThisLine(result);\n }", "result = horizontalLine.jumpIfOnThisLine(result)", "result", "horizontalLine.jumpIfOnThisLine(result)", "horizontalLine.jumpIfOnThisLine", "horizontalLine", "result", "resultArray[result - 1] = i", "resultArray[result - 1]", "resultArray", "result - 1", "result", "1", "i", "for (int result : resultArray) {\n System.out.println(result);\n }", "int result", "resultArray", "{\n System.out.println(result);\n }", "{\n System.out.println(result);\n }", "System.out.println(result)", "System.out.println", "System.out", "System", "System.out", "result", "String[] args", "args", "/**\n * 標準入力から空白区切りの数値を取得し、三角形を表す数値の2次元配列として返却する。\n *\n * @return 三角形を表す整数の2次元配列(6×データ数)\n */\n protected static Lots readLots() throws IOException {\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(\n System.in));\n\n // 最初に縦棒の数、横棒の数を取得する\n int numberOfVerticalLine = Integer.parseInt(reader.readLine());\n int numberOfHorizontalLine = Integer.parseInt(reader.readLine());\n\n // 1行につき、横棒の接続位置を表す2データを取り込む\n HorizontalLine[] horizontalLineArray = new HorizontalLine[numberOfHorizontalLine];\n for (int i = 0; i < horizontalLineArray.length; i++) {\n String[] numbers = reader.readLine().split(\",\");\n int left = Integer.parseInt(numbers[0]);\n int right = Integer.parseInt(numbers[1]);\n horizontalLineArray[i] = new HorizontalLine(left, right);\n }\n\n if (reader != null) {\n reader.close();\n }\n\n // 入力値をクラスにまとめて返却する\n Lots lots = new Lots(numberOfVerticalLine, horizontalLineArray);\n return lots;\n }", "readLots", "{\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(\n System.in));\n\n // 最初に縦棒の数、横棒の数を取得する\n int numberOfVerticalLine = Integer.parseInt(reader.readLine());\n int numberOfHorizontalLine = Integer.parseInt(reader.readLine());\n\n // 1行につき、横棒の接続位置を表す2データを取り込む\n HorizontalLine[] horizontalLineArray = new HorizontalLine[numberOfHorizontalLine];\n for (int i = 0; i < horizontalLineArray.length; i++) {\n String[] numbers = reader.readLine().split(\",\");\n int left = Integer.parseInt(numbers[0]);\n int right = Integer.parseInt(numbers[1]);\n horizontalLineArray[i] = new HorizontalLine(left, right);\n }\n\n if (reader != null) {\n reader.close();\n }\n\n // 入力値をクラスにまとめて返却する\n Lots lots = new Lots(numberOfVerticalLine, horizontalLineArray);\n return lots;\n }", "BufferedReader reader = new BufferedReader(new InputStreamReader(\n System.in));", "reader", "new BufferedReader(new InputStreamReader(\n System.in))", "int numberOfVerticalLine = Integer.parseInt(reader.readLine());", "numberOfVerticalLine", "Integer.parseInt(reader.readLine())", "Integer.parseInt", "Integer", "reader.readLine()", "reader.readLine", "reader", "int numberOfHorizontalLine = Integer.parseInt(reader.readLine());", "numberOfHorizontalLine", "Integer.parseInt(reader.readLine())", "Integer.parseInt", "Integer", "reader.readLine()", "reader.readLine", "reader", "HorizontalLine[] horizontalLineArray = new HorizontalLine[numberOfHorizontalLine];", "horizontalLineArray", "new HorizontalLine[numberOfHorizontalLine]", "numberOfHorizontalLine", "for (int i = 0; i < horizontalLineArray.length; i++) {\n String[] numbers = reader.readLine().split(\",\");\n int left = Integer.parseInt(numbers[0]);\n int right = Integer.parseInt(numbers[1]);\n horizontalLineArray[i] = new HorizontalLine(left, right);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < horizontalLineArray.length", "i", "horizontalLineArray.length", "horizontalLineArray", "horizontalLineArray.length", "i++", "i++", "i", "{\n String[] numbers = reader.readLine().split(\",\");\n int left = Integer.parseInt(numbers[0]);\n int right = Integer.parseInt(numbers[1]);\n horizontalLineArray[i] = new HorizontalLine(left, right);\n }", "{\n String[] numbers = reader.readLine().split(\",\");\n int left = Integer.parseInt(numbers[0]);\n int right = Integer.parseInt(numbers[1]);\n horizontalLineArray[i] = new HorizontalLine(left, right);\n }", "String[] numbers = reader.readLine().split(\",\");", "numbers", "reader.readLine().split(\",\")", "reader.readLine().split", "reader.readLine()", "reader.readLine", "reader", "\",\"", "int left = Integer.parseInt(numbers[0]);", "left", "Integer.parseInt(numbers[0])", "Integer.parseInt", "Integer", "numbers[0]", "numbers", "0", "int right = Integer.parseInt(numbers[1]);", "right", "Integer.parseInt(numbers[1])", "Integer.parseInt", "Integer", "numbers[1]", "numbers", "1", "horizontalLineArray[i] = new HorizontalLine(left, right)", "horizontalLineArray[i]", "horizontalLineArray", "i", "new HorizontalLine(left, right)", "if (reader != null) {\n reader.close();\n }", "reader != null", "reader", "null", "{\n reader.close();\n }", "reader.close()", "reader.close", "reader", "Lots lots = new Lots(numberOfVerticalLine, horizontalLineArray);", "lots", "new Lots(numberOfVerticalLine, horizontalLineArray)", "return lots;", "lots", "static class Lots {\n\n /** 縦棒の数 */\n int numberOfVerticalLine;\n\n /** 横棒を表すペア数字の配列 */\n HorizontalLine[] horizontalLineArray;\n\n /**\n * コンストラクタ\n *\n * @param numberOfVerticalLine 縦棒の数\n * @param horizontalLineArray 横棒を表すペア数字の配列\n */\n public Lots(int numberOfVerticalLine, HorizontalLine[] horizontalLineArray) {\n this.numberOfVerticalLine = numberOfVerticalLine;\n this.horizontalLineArray = horizontalLineArray;\n }\n\n public int getNumberOfVerticalLine() {\n return numberOfVerticalLine;\n }\n\n public void setNumberOfVerticalLine(int numberOfVerticalLine) {\n this.numberOfVerticalLine = numberOfVerticalLine;\n }\n\n public HorizontalLine[] getHorizontalLineArray() {\n return horizontalLineArray;\n }\n\n public void setHorizontalLineArray(HorizontalLine[] horizontalLineArray) {\n this.horizontalLineArray = horizontalLineArray;\n }\n }", "Lots", "/** 縦棒の数 */\n int numberOfVerticalLine;", "numberOfVerticalLine", "/** 横棒を表すペア数字の配列 */\n HorizontalLine[] horizontalLineArray;", "horizontalLineArray", "/**\n * コンストラクタ\n *\n * @param numberOfVerticalLine 縦棒の数\n * @param horizontalLineArray 横棒を表すペア数字の配列\n */\n public Lots(int numberOfVerticalLine, HorizontalLine[] horizontalLineArray) {\n this.numberOfVerticalLine = numberOfVerticalLine;\n this.horizontalLineArray = horizontalLineArray;\n }", "Lots", "{\n this.numberOfVerticalLine = numberOfVerticalLine;\n this.horizontalLineArray = horizontalLineArray;\n }", "this.numberOfVerticalLine = numberOfVerticalLine", "this.numberOfVerticalLine", "this", "this.numberOfVerticalLine", "numberOfVerticalLine", "this.horizontalLineArray = horizontalLineArray", "this.horizontalLineArray", "this", "this.horizontalLineArray", "horizontalLineArray", "int numberOfVerticalLine", "numberOfVerticalLine", "HorizontalLine[] horizontalLineArray", "horizontalLineArray", "public int getNumberOfVerticalLine() {\n return numberOfVerticalLine;\n }", "getNumberOfVerticalLine", "{\n return numberOfVerticalLine;\n }", "return numberOfVerticalLine;", "numberOfVerticalLine", "public void setNumberOfVerticalLine(int numberOfVerticalLine) {\n this.numberOfVerticalLine = numberOfVerticalLine;\n }", "setNumberOfVerticalLine", "{\n this.numberOfVerticalLine = numberOfVerticalLine;\n }", "this.numberOfVerticalLine = numberOfVerticalLine", "this.numberOfVerticalLine", "this", "this.numberOfVerticalLine", "numberOfVerticalLine", "int numberOfVerticalLine", "numberOfVerticalLine", "public HorizontalLine[] getHorizontalLineArray() {\n return horizontalLineArray;\n }", "getHorizontalLineArray", "{\n return horizontalLineArray;\n }", "return horizontalLineArray;", "horizontalLineArray", "public void setHorizontalLineArray(HorizontalLine[] horizontalLineArray) {\n this.horizontalLineArray = horizontalLineArray;\n }", "setHorizontalLineArray", "{\n this.horizontalLineArray = horizontalLineArray;\n }", "this.horizontalLineArray = horizontalLineArray", "this.horizontalLineArray", "this", "this.horizontalLineArray", "horizontalLineArray", "HorizontalLine[] horizontalLineArray", "horizontalLineArray", "static class HorizontalLine {\n\n /** 左端 */\n private int left;\n\n /** 右端 */\n private int right;\n\n /**\n * コンストラクタ\n *\n * @param left 左端\n * @param right 右端\n */\n public HorizontalLine(int left, int right) {\n this.left = left;\n this.right = right;\n }\n\n /**\n * 横棒の上にある場合はもう一方に飛び、飛んだ先の番号を取得する。\n *\n * @param value 元の値\n * @return 飛べる場合は飛んだ先、飛べなかった場合は元の値\n */\n public int jumpIfOnThisLine(int value) {\n if (value == right) {\n return left;\n }\n else if (value == left) {\n return right;\n }\n return value;\n }\n }", "HorizontalLine", "/** 左端 */\n private int left;", "left", "/** 右端 */\n private int right;", "right", "/**\n * コンストラクタ\n *\n * @param left 左端\n * @param right 右端\n */\n public HorizontalLine(int left, int right) {\n this.left = left;\n this.right = right;\n }", "HorizontalLine", "{\n this.left = left;\n this.right = right;\n }", "this.left = left", "this.left", "this", "this.left", "left", "this.right = right", "this.right", "this", "this.right", "right", "int left", "left", "int right", "right", "/**\n * 横棒の上にある場合はもう一方に飛び、飛んだ先の番号を取得する。\n *\n * @param value 元の値\n * @return 飛べる場合は飛んだ先、飛べなかった場合は元の値\n */\n public int jumpIfOnThisLine(int value) {\n if (value == right) {\n return left;\n }\n else if (value == left) {\n return right;\n }\n return value;\n }", "jumpIfOnThisLine", "{\n if (value == right) {\n return left;\n }\n else if (value == left) {\n return right;\n }\n return value;\n }", "if (value == right) {\n return left;\n }\n else if (value == left) {\n return right;\n }", "value == right", "value", "right", "{\n return left;\n }", "return left;", "left", "if (value == left) {\n return right;\n }", "value == left", "value", "left", "{\n return right;\n }", "return right;", "right", "return value;", "value", "int value", "value", "public class Main {\n\n /**\n * あみだくじの情報を受け取り、その結果を表示する。\n *\n * @param args\n */\n public static void main(String[] args) throws IOException {\n\n // 入力値を受け取る\n Lots lots = readLots();\n\n // あみだくじを左から順番に実施する\n int[] resultArray = new int[lots.numberOfVerticalLine];\n for (int i = 1; i <= lots.numberOfVerticalLine; i++) {\n int result = i;\n\n // 横棒すべてに対してジャンプできるかどうか判定する\n for (HorizontalLine horizontalLine : lots.getHorizontalLineArray()) {\n result = horizontalLine.jumpIfOnThisLine(result);\n }\n\n // 最終的にどこに着いたかを保持する\n resultArray[result - 1] = i;\n }\n\n // 結果を出力する\n for (int result : resultArray) {\n System.out.println(result);\n }\n\n }\n\n /**\n * 標準入力から空白区切りの数値を取得し、三角形を表す数値の2次元配列として返却する。\n *\n * @return 三角形を表す整数の2次元配列(6×データ数)\n */\n protected static Lots readLots() throws IOException {\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(\n System.in));\n\n // 最初に縦棒の数、横棒の数を取得する\n int numberOfVerticalLine = Integer.parseInt(reader.readLine());\n int numberOfHorizontalLine = Integer.parseInt(reader.readLine());\n\n // 1行につき、横棒の接続位置を表す2データを取り込む\n HorizontalLine[] horizontalLineArray = new HorizontalLine[numberOfHorizontalLine];\n for (int i = 0; i < horizontalLineArray.length; i++) {\n String[] numbers = reader.readLine().split(\",\");\n int left = Integer.parseInt(numbers[0]);\n int right = Integer.parseInt(numbers[1]);\n horizontalLineArray[i] = new HorizontalLine(left, right);\n }\n\n if (reader != null) {\n reader.close();\n }\n\n // 入力値をクラスにまとめて返却する\n Lots lots = new Lots(numberOfVerticalLine, horizontalLineArray);\n return lots;\n }\n\n /**\n * あみだくじを表すクラス\n *\n */\n static class Lots {\n\n /** 縦棒の数 */\n int numberOfVerticalLine;\n\n /** 横棒を表すペア数字の配列 */\n HorizontalLine[] horizontalLineArray;\n\n /**\n * コンストラクタ\n *\n * @param numberOfVerticalLine 縦棒の数\n * @param horizontalLineArray 横棒を表すペア数字の配列\n */\n public Lots(int numberOfVerticalLine, HorizontalLine[] horizontalLineArray) {\n this.numberOfVerticalLine = numberOfVerticalLine;\n this.horizontalLineArray = horizontalLineArray;\n }\n\n public int getNumberOfVerticalLine() {\n return numberOfVerticalLine;\n }\n\n public void setNumberOfVerticalLine(int numberOfVerticalLine) {\n this.numberOfVerticalLine = numberOfVerticalLine;\n }\n\n public HorizontalLine[] getHorizontalLineArray() {\n return horizontalLineArray;\n }\n\n public void setHorizontalLineArray(HorizontalLine[] horizontalLineArray) {\n this.horizontalLineArray = horizontalLineArray;\n }\n }\n\n /**\n * 横棒を表すクラス\n *\n */\n static class HorizontalLine {\n\n /** 左端 */\n private int left;\n\n /** 右端 */\n private int right;\n\n /**\n * コンストラクタ\n *\n * @param left 左端\n * @param right 右端\n */\n public HorizontalLine(int left, int right) {\n this.left = left;\n this.right = right;\n }\n\n /**\n * 横棒の上にある場合はもう一方に飛び、飛んだ先の番号を取得する。\n *\n * @param value 元の値\n * @return 飛べる場合は飛んだ先、飛べなかった場合は元の値\n */\n public int jumpIfOnThisLine(int value) {\n if (value == right) {\n return left;\n }\n else if (value == left) {\n return right;\n }\n return value;\n }\n }\n}", "public class Main {\n\n /**\n * あみだくじの情報を受け取り、その結果を表示する。\n *\n * @param args\n */\n public static void main(String[] args) throws IOException {\n\n // 入力値を受け取る\n Lots lots = readLots();\n\n // あみだくじを左から順番に実施する\n int[] resultArray = new int[lots.numberOfVerticalLine];\n for (int i = 1; i <= lots.numberOfVerticalLine; i++) {\n int result = i;\n\n // 横棒すべてに対してジャンプできるかどうか判定する\n for (HorizontalLine horizontalLine : lots.getHorizontalLineArray()) {\n result = horizontalLine.jumpIfOnThisLine(result);\n }\n\n // 最終的にどこに着いたかを保持する\n resultArray[result - 1] = i;\n }\n\n // 結果を出力する\n for (int result : resultArray) {\n System.out.println(result);\n }\n\n }\n\n /**\n * 標準入力から空白区切りの数値を取得し、三角形を表す数値の2次元配列として返却する。\n *\n * @return 三角形を表す整数の2次元配列(6×データ数)\n */\n protected static Lots readLots() throws IOException {\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(\n System.in));\n\n // 最初に縦棒の数、横棒の数を取得する\n int numberOfVerticalLine = Integer.parseInt(reader.readLine());\n int numberOfHorizontalLine = Integer.parseInt(reader.readLine());\n\n // 1行につき、横棒の接続位置を表す2データを取り込む\n HorizontalLine[] horizontalLineArray = new HorizontalLine[numberOfHorizontalLine];\n for (int i = 0; i < horizontalLineArray.length; i++) {\n String[] numbers = reader.readLine().split(\",\");\n int left = Integer.parseInt(numbers[0]);\n int right = Integer.parseInt(numbers[1]);\n horizontalLineArray[i] = new HorizontalLine(left, right);\n }\n\n if (reader != null) {\n reader.close();\n }\n\n // 入力値をクラスにまとめて返却する\n Lots lots = new Lots(numberOfVerticalLine, horizontalLineArray);\n return lots;\n }\n\n /**\n * あみだくじを表すクラス\n *\n */\n static class Lots {\n\n /** 縦棒の数 */\n int numberOfVerticalLine;\n\n /** 横棒を表すペア数字の配列 */\n HorizontalLine[] horizontalLineArray;\n\n /**\n * コンストラクタ\n *\n * @param numberOfVerticalLine 縦棒の数\n * @param horizontalLineArray 横棒を表すペア数字の配列\n */\n public Lots(int numberOfVerticalLine, HorizontalLine[] horizontalLineArray) {\n this.numberOfVerticalLine = numberOfVerticalLine;\n this.horizontalLineArray = horizontalLineArray;\n }\n\n public int getNumberOfVerticalLine() {\n return numberOfVerticalLine;\n }\n\n public void setNumberOfVerticalLine(int numberOfVerticalLine) {\n this.numberOfVerticalLine = numberOfVerticalLine;\n }\n\n public HorizontalLine[] getHorizontalLineArray() {\n return horizontalLineArray;\n }\n\n public void setHorizontalLineArray(HorizontalLine[] horizontalLineArray) {\n this.horizontalLineArray = horizontalLineArray;\n }\n }\n\n /**\n * 横棒を表すクラス\n *\n */\n static class HorizontalLine {\n\n /** 左端 */\n private int left;\n\n /** 右端 */\n private int right;\n\n /**\n * コンストラクタ\n *\n * @param left 左端\n * @param right 右端\n */\n public HorizontalLine(int left, int right) {\n this.left = left;\n this.right = right;\n }\n\n /**\n * 横棒の上にある場合はもう一方に飛び、飛んだ先の番号を取得する。\n *\n * @param value 元の値\n * @return 飛べる場合は飛んだ先、飛べなかった場合は元の値\n */\n public int jumpIfOnThisLine(int value) {\n if (value == right) {\n return left;\n }\n else if (value == left) {\n return right;\n }\n return value;\n }\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { /** * あみだくじの情報を受け取り、その結果を表示する。 * * @param args */ public static void main(String[] args) throws IOException { // 入力値を受け取る Lots lots = readLots(); // あみだくじを左から順番に実施する int[] resultArray = new int[lots.numberOfVerticalLine]; for (int i = 1; i <= lots.numberOfVerticalLine; i++) { int result = i; // 横棒すべてに対してジャンプできるかどうか判定する for (HorizontalLine horizontalLine : lots.getHorizontalLineArray()) { result = horizontalLine.jumpIfOnThisLine(result); } // 最終的にどこに着いたかを保持する resultArray[result - 1] = i; } // 結果を出力する for (int result : resultArray) { System.out.println(result); } } /** * 標準入力から空白区切りの数値を取得し、三角形を表す数値の2次元配列として返却する。 * * @return 三角形を表す整数の2次元配列(6×データ数) */ protected static Lots readLots() throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader( System.in)); // 最初に縦棒の数、横棒の数を取得する int numberOfVerticalLine = Integer.parseInt(reader.readLine()); int numberOfHorizontalLine = Integer.parseInt(reader.readLine()); // 1行につき、横棒の接続位置を表す2データを取り込む HorizontalLine[] horizontalLineArray = new HorizontalLine[numberOfHorizontalLine]; for (int i = 0; i < horizontalLineArray.length; i++) { String[] numbers = reader.readLine().split(","); int left = Integer.parseInt(numbers[0]); int right = Integer.parseInt(numbers[1]); horizontalLineArray[i] = new HorizontalLine(left, right); } if (reader != null) { reader.close(); } // 入力値をクラスにまとめて返却する Lots lots = new Lots(numberOfVerticalLine, horizontalLineArray); return lots; } /** * あみだくじを表すクラス * */ static class Lots { /** 縦棒の数 */ int numberOfVerticalLine; /** 横棒を表すペア数字の配列 */ HorizontalLine[] horizontalLineArray; /** * コンストラクタ * * @param numberOfVerticalLine 縦棒の数 * @param horizontalLineArray 横棒を表すペア数字の配列 */ public Lots(int numberOfVerticalLine, HorizontalLine[] horizontalLineArray) { this.numberOfVerticalLine = numberOfVerticalLine; this.horizontalLineArray = horizontalLineArray; } public int getNumberOfVerticalLine() { return numberOfVerticalLine; } public void setNumberOfVerticalLine(int numberOfVerticalLine) { this.numberOfVerticalLine = numberOfVerticalLine; } public HorizontalLine[] getHorizontalLineArray() { return horizontalLineArray; } public void setHorizontalLineArray(HorizontalLine[] horizontalLineArray) { this.horizontalLineArray = horizontalLineArray; } } /** * 横棒を表すクラス * */ static class HorizontalLine { /** 左端 */ private int left; /** 右端 */ private int right; /** * コンストラクタ * * @param left 左端 * @param right 右端 */ public HorizontalLine(int left, int right) { this.left = left; this.right = right; } /** * 横棒の上にある場合はもう一方に飛び、飛んだ先の番号を取得する。 * * @param value 元の値 * @return 飛べる場合は飛んだ先、飛べなかった場合は元の値 */ public int jumpIfOnThisLine(int value) { if (value == right) { return left; } else if (value == left) { return right; } return value; } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 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, 41, 13, 20, 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, 18, 13, 13, 4, 18, 13, 18, 13, 17, 0, 18, 13, 13, 4, 18, 13, 18, 13, 17, 41, 13, 18, 13, 2, 18, 13, 13, 17, 0, 18, 13, 2, 18, 13, 13, 17, 18, 13, 2, 18, 13, 13, 17, 0, 18, 13, 2, 18, 13, 13, 17, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 160, 5 ], [ 160, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], [ 14, 15 ], [ 14, 16 ], [ 16, 17 ], [ 17, 18 ], [ 8, 19 ], [ 19, 20 ], [ 19, 21 ], [ 21, 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 ], [ 28, 36 ], [ 36, 37 ], [ 37, 38 ], [ 28, 39 ], [ 40, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 41, 45 ], [ 45, 46 ], [ 45, 47 ], [ 8, 48 ], [ 48, 49 ], [ 48, 50 ], [ 8, 52 ], [ 52, 53 ], [ 52, 54 ], [ 8, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 56, 61 ], [ 61, 62 ], [ 61, 63 ], [ 56, 64 ], [ 64, 65 ], [ 65, 66 ], [ 56, 67 ], [ 68, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 72, 73 ], [ 68, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 76, 79 ], [ 68, 80 ], [ 80, 81 ], [ 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 ], [ 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 ], [ 8, 154 ], [ 154, 155 ], [ 155, 156 ], [ 6, 157 ], [ 157, 158 ], [ 0, 159 ], [ 159, 160 ], [ 159, 161 ] ]
[ "import java.util.Scanner;\n\npublic class Main{\n\n\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String str;\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] tate = new int[w];\n for(int i=0;i<w;i++) {\n \ttate[i]=i+1;\n }\n int[] a = new int[n];\n int[] b = new int[n];\n for(int i=0;i<n;i++){\n \tstr = sc.next();\n \tString[] input = str.split(\",\");\n a[i]= Integer.parseInt(input[0]);\n b[i]= Integer.parseInt(input[1]);\n int t=tate[a[i]-1];\n tate[a[i]-1]=tate[b[i]-1];\n tate[b[i]-1]=t;\n }\n\n for(int i=0;i<w;i++){\n System.out.println(tate[i]);\n }\n sc.close();\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n\n\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String str;\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] tate = new int[w];\n for(int i=0;i<w;i++) {\n \ttate[i]=i+1;\n }\n int[] a = new int[n];\n int[] b = new int[n];\n for(int i=0;i<n;i++){\n \tstr = sc.next();\n \tString[] input = str.split(\",\");\n a[i]= Integer.parseInt(input[0]);\n b[i]= Integer.parseInt(input[1]);\n int t=tate[a[i]-1];\n tate[a[i]-1]=tate[b[i]-1];\n tate[b[i]-1]=t;\n }\n\n for(int i=0;i<w;i++){\n System.out.println(tate[i]);\n }\n sc.close();\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String str;\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] tate = new int[w];\n for(int i=0;i<w;i++) {\n \ttate[i]=i+1;\n }\n int[] a = new int[n];\n int[] b = new int[n];\n for(int i=0;i<n;i++){\n \tstr = sc.next();\n \tString[] input = str.split(\",\");\n a[i]= Integer.parseInt(input[0]);\n b[i]= Integer.parseInt(input[1]);\n int t=tate[a[i]-1];\n tate[a[i]-1]=tate[b[i]-1];\n tate[b[i]-1]=t;\n }\n\n for(int i=0;i<w;i++){\n System.out.println(tate[i]);\n }\n sc.close();\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n String str;\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] tate = new int[w];\n for(int i=0;i<w;i++) {\n \ttate[i]=i+1;\n }\n int[] a = new int[n];\n int[] b = new int[n];\n for(int i=0;i<n;i++){\n \tstr = sc.next();\n \tString[] input = str.split(\",\");\n a[i]= Integer.parseInt(input[0]);\n b[i]= Integer.parseInt(input[1]);\n int t=tate[a[i]-1];\n tate[a[i]-1]=tate[b[i]-1];\n tate[b[i]-1]=t;\n }\n\n for(int i=0;i<w;i++){\n System.out.println(tate[i]);\n }\n sc.close();\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "String str;", "str", "int w = sc.nextInt();", "w", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int[] tate = new int[w];", "tate", "new int[w]", "w", "for(int i=0;i<w;i++) {\n \ttate[i]=i+1;\n }", "int i=0;", "int i=0;", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "{\n \ttate[i]=i+1;\n }", "{\n \ttate[i]=i+1;\n }", "tate[i]=i+1", "tate[i]", "tate", "i", "i+1", "i", "1", "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 \tstr = sc.next();\n \tString[] input = str.split(\",\");\n a[i]= Integer.parseInt(input[0]);\n b[i]= Integer.parseInt(input[1]);\n int t=tate[a[i]-1];\n tate[a[i]-1]=tate[b[i]-1];\n tate[b[i]-1]=t;\n }", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n \tstr = sc.next();\n \tString[] input = str.split(\",\");\n a[i]= Integer.parseInt(input[0]);\n b[i]= Integer.parseInt(input[1]);\n int t=tate[a[i]-1];\n tate[a[i]-1]=tate[b[i]-1];\n tate[b[i]-1]=t;\n }", "{\n \tstr = sc.next();\n \tString[] input = str.split(\",\");\n a[i]= Integer.parseInt(input[0]);\n b[i]= Integer.parseInt(input[1]);\n int t=tate[a[i]-1];\n tate[a[i]-1]=tate[b[i]-1];\n tate[b[i]-1]=t;\n }", "str = sc.next()", "str", "sc.next()", "sc.next", "sc", "String[] input = str.split(\",\");", "input", "str.split(\",\")", "str.split", "str", "\",\"", "a[i]= Integer.parseInt(input[0])", "a[i]", "a", "i", "Integer.parseInt(input[0])", "Integer.parseInt", "Integer", "input[0]", "input", "0", "b[i]= Integer.parseInt(input[1])", "b[i]", "b", "i", "Integer.parseInt(input[1])", "Integer.parseInt", "Integer", "input[1]", "input", "1", "int t=tate[a[i]-1];", "t", "tate[a[i]-1]", "tate", "a[i]-1", "a[i]", "a", "i", "1", "tate[a[i]-1]=tate[b[i]-1]", "tate[a[i]-1]", "tate", "a[i]-1", "a[i]", "a", "i", "1", "tate[b[i]-1]", "tate", "b[i]-1", "b[i]", "b", "i", "1", "tate[b[i]-1]=t", "tate[b[i]-1]", "tate", "b[i]-1", "b[i]", "b", "i", "1", "t", "for(int i=0;i<w;i++){\n System.out.println(tate[i]);\n }", "int i=0;", "int i=0;", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "{\n System.out.println(tate[i]);\n }", "{\n System.out.println(tate[i]);\n }", "System.out.println(tate[i])", "System.out.println", "System.out", "System", "System.out", "tate[i]", "tate", "i", "sc.close()", "sc.close", "sc", "String[] args", "args", "public class Main{\n\n\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String str;\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] tate = new int[w];\n for(int i=0;i<w;i++) {\n \ttate[i]=i+1;\n }\n int[] a = new int[n];\n int[] b = new int[n];\n for(int i=0;i<n;i++){\n \tstr = sc.next();\n \tString[] input = str.split(\",\");\n a[i]= Integer.parseInt(input[0]);\n b[i]= Integer.parseInt(input[1]);\n int t=tate[a[i]-1];\n tate[a[i]-1]=tate[b[i]-1];\n tate[b[i]-1]=t;\n }\n\n for(int i=0;i<w;i++){\n System.out.println(tate[i]);\n }\n sc.close();\n }\n}", "public class Main{\n\n\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String str;\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] tate = new int[w];\n for(int i=0;i<w;i++) {\n \ttate[i]=i+1;\n }\n int[] a = new int[n];\n int[] b = new int[n];\n for(int i=0;i<n;i++){\n \tstr = sc.next();\n \tString[] input = str.split(\",\");\n a[i]= Integer.parseInt(input[0]);\n b[i]= Integer.parseInt(input[1]);\n int t=tate[a[i]-1];\n tate[a[i]-1]=tate[b[i]-1];\n tate[b[i]-1]=t;\n }\n\n for(int i=0;i<w;i++){\n System.out.println(tate[i]);\n }\n sc.close();\n }\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); String str; int w = sc.nextInt(); int n = sc.nextInt(); int[] tate = new int[w]; for(int i=0;i<w;i++) { tate[i]=i+1; } int[] a = new int[n]; int[] b = new int[n]; for(int i=0;i<n;i++){ str = sc.next(); String[] input = str.split(","); a[i]= Integer.parseInt(input[0]); b[i]= Integer.parseInt(input[1]); int t=tate[a[i]-1]; tate[a[i]-1]=tate[b[i]-1]; tate[b[i]-1]=t; } for(int i=0;i<w;i++){ System.out.println(tate[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, 13, 13, 41, 13, 4, 13, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 13, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 13, 28, 13, 13, 30, 30, 14, 2, 13, 18, 13, 17, 30, 0, 13, 18, 13, 17, 14, 2, 13, 18, 13, 17, 30, 0, 13, 18, 13, 17, 0, 18, 13, 2, 13, 17, 13, 28, 13, 13, 30, 30, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 17, 38, 5, 13, 30, 37, 20, 30, 41, 13, 4, 18, 13, 0, 13, 4, 18, 13, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 17, 38, 5, 13, 30, 37, 20, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 0, 18, 13, 17, 4, 18, 13, 18, 13, 17, 0, 18, 13, 17, 4, 18, 13, 18, 13, 17, 29, 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 ], [ 26, 28 ], [ 20, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 31, 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 ], [ 53, 54 ], [ 53, 55 ], [ 20, 56 ], [ 56, 57 ], [ 56, 58 ], [ 20, 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 ], [ 72, 76 ], [ 76, 77 ], [ 76, 78 ], [ 76, 79 ], [ 80, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 84, 86 ], [ 81, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 90, 92 ], [ 81, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 96, 98 ], [ 93, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 102, 103 ], [ 102, 104 ], [ 72, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 108, 110 ], [ 105, 111 ], [ 20, 112 ], [ 112, 113 ], [ 112, 114 ], [ 112, 115 ], [ 116, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 117, 122 ], [ 18, 123 ], [ 123, 124 ], [ 16, 125 ], [ 125, 126 ], [ 125, 127 ], [ 127, 128 ], [ 128, 129 ], [ 128, 130 ], [ 127, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 134, 135 ], [ 135, 136 ], [ 131, 137 ], [ 137, 138 ], [ 138, 139 ], [ 138, 140 ], [ 140, 141 ], [ 141, 142 ], [ 137, 143 ], [ 143, 144 ], [ 143, 145 ], [ 145, 146 ], [ 146, 147 ], [ 145, 148 ], [ 127, 149 ], [ 149, 150 ], [ 125, 151 ], [ 151, 152 ], [ 16, 153 ], [ 153, 154 ], [ 153, 155 ], [ 155, 156 ], [ 156, 157 ], [ 156, 158 ], [ 155, 160 ], [ 160, 161 ], [ 161, 162 ], [ 161, 163 ], [ 163, 164 ], [ 164, 165 ], [ 160, 166 ], [ 166, 167 ], [ 167, 168 ], [ 167, 169 ], [ 169, 170 ], [ 170, 171 ], [ 166, 172 ], [ 172, 173 ], [ 172, 174 ], [ 174, 175 ], [ 175, 176 ], [ 174, 177 ], [ 166, 178 ], [ 178, 179 ], [ 179, 180 ], [ 179, 181 ], [ 178, 182 ], [ 182, 183 ], [ 183, 184 ], [ 182, 185 ], [ 185, 186 ], [ 185, 187 ], [ 166, 188 ], [ 188, 189 ], [ 189, 190 ], [ 189, 191 ], [ 188, 192 ], [ 192, 193 ], [ 193, 194 ], [ 192, 195 ], [ 195, 196 ], [ 195, 197 ], [ 155, 198 ], [ 198, 199 ], [ 153, 200 ], [ 200, 201 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\nimport java.util.List;\n\nclass Main {\n\n\tpublic static void main(String[] args) {\n\n\t\t// ストリームを作成する\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\n\t\tint vertical = readNumber(reader);\n\t\tint horizontal = readNumber(reader);\n\n\t\t// 横棒リストを作る\n\t\tList<int[]> horizontalList = new ArrayList<int[]>();\n\t\tfor (int i = 0; i < horizontal; i++) {\n\t\t\thorizontalList.add(readPair(reader));\n\t\t}\n\n\t\t// 縦棒を左から順番にシミュレートして結果を配列に保持する\n\t\tint[] goal = new int[vertical];\n\t\tfor (int i = 1; i <= vertical; i++) {\n\t\t\tint result = i;\n\t\t\tfor (int[] horizontalBar : horizontalList) {\n\t\t\t\tif (result == horizontalBar[0]) {\n\t\t\t\t\tresult = horizontalBar[1];\n\t\t\t\t} else if (result == horizontalBar[1]) {\n\t\t\t\t\tresult = horizontalBar[0];\n\t\t\t\t}\n\t\t\t}\n\t\t\tgoal[result - 1] = i;\n\t\t}\n\n\t\t// 結果を表示する\n\t\tfor (int i : goal) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\n\t}\n\n\t/**\n\t * ストリームから1行読み込んで、数値として返す。\n\t *\n\t * @param reader\n\t * 入力ストリーム\n\t * @return 数値\n\t */\n\tprivate static int readNumber(BufferedReader reader) {\n\t\tint result = 0;\n\t\ttry {\n\t\t\tString line = reader.readLine();\n\t\t\tresult = Integer.parseInt(line);\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException();\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * ストリームから1行読み込んで、数値のペアとして返す。\n\t *\n\t * @param reader\n\t * 入力ストリーム\n\t * @return 数値のペア\n\t */\n\tprivate static int[] readPair(BufferedReader reader) {\n\t\tint[] result = new int[2];\n\t\ttry {\n\t\t\tString line = reader.readLine();\n\t\t\tString[] array = line.split(\",\");\n\t\t\tresult[0] = Integer.parseInt(array[0]);\n\t\t\tresult[1] = Integer.parseInt(array[1]);\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException();\n\t\t}\n\t\treturn result;\n\t}\n\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.List;", "List", "java.util", "class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\t// ストリームを作成する\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\n\t\tint vertical = readNumber(reader);\n\t\tint horizontal = readNumber(reader);\n\n\t\t// 横棒リストを作る\n\t\tList<int[]> horizontalList = new ArrayList<int[]>();\n\t\tfor (int i = 0; i < horizontal; i++) {\n\t\t\thorizontalList.add(readPair(reader));\n\t\t}\n\n\t\t// 縦棒を左から順番にシミュレートして結果を配列に保持する\n\t\tint[] goal = new int[vertical];\n\t\tfor (int i = 1; i <= vertical; i++) {\n\t\t\tint result = i;\n\t\t\tfor (int[] horizontalBar : horizontalList) {\n\t\t\t\tif (result == horizontalBar[0]) {\n\t\t\t\t\tresult = horizontalBar[1];\n\t\t\t\t} else if (result == horizontalBar[1]) {\n\t\t\t\t\tresult = horizontalBar[0];\n\t\t\t\t}\n\t\t\t}\n\t\t\tgoal[result - 1] = i;\n\t\t}\n\n\t\t// 結果を表示する\n\t\tfor (int i : goal) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\n\t}\n\n\t/**\n\t * ストリームから1行読み込んで、数値として返す。\n\t *\n\t * @param reader\n\t * 入力ストリーム\n\t * @return 数値\n\t */\n\tprivate static int readNumber(BufferedReader reader) {\n\t\tint result = 0;\n\t\ttry {\n\t\t\tString line = reader.readLine();\n\t\t\tresult = Integer.parseInt(line);\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException();\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * ストリームから1行読み込んで、数値のペアとして返す。\n\t *\n\t * @param reader\n\t * 入力ストリーム\n\t * @return 数値のペア\n\t */\n\tprivate static int[] readPair(BufferedReader reader) {\n\t\tint[] result = new int[2];\n\t\ttry {\n\t\t\tString line = reader.readLine();\n\t\t\tString[] array = line.split(\",\");\n\t\t\tresult[0] = Integer.parseInt(array[0]);\n\t\t\tresult[1] = Integer.parseInt(array[1]);\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException();\n\t\t}\n\t\treturn result;\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\n\t\t// ストリームを作成する\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\n\t\tint vertical = readNumber(reader);\n\t\tint horizontal = readNumber(reader);\n\n\t\t// 横棒リストを作る\n\t\tList<int[]> horizontalList = new ArrayList<int[]>();\n\t\tfor (int i = 0; i < horizontal; i++) {\n\t\t\thorizontalList.add(readPair(reader));\n\t\t}\n\n\t\t// 縦棒を左から順番にシミュレートして結果を配列に保持する\n\t\tint[] goal = new int[vertical];\n\t\tfor (int i = 1; i <= vertical; i++) {\n\t\t\tint result = i;\n\t\t\tfor (int[] horizontalBar : horizontalList) {\n\t\t\t\tif (result == horizontalBar[0]) {\n\t\t\t\t\tresult = horizontalBar[1];\n\t\t\t\t} else if (result == horizontalBar[1]) {\n\t\t\t\t\tresult = horizontalBar[0];\n\t\t\t\t}\n\t\t\t}\n\t\t\tgoal[result - 1] = i;\n\t\t}\n\n\t\t// 結果を表示する\n\t\tfor (int i : goal) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\n\t}", "main", "{\n\n\t\t// ストリームを作成する\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\n\t\tint vertical = readNumber(reader);\n\t\tint horizontal = readNumber(reader);\n\n\t\t// 横棒リストを作る\n\t\tList<int[]> horizontalList = new ArrayList<int[]>();\n\t\tfor (int i = 0; i < horizontal; i++) {\n\t\t\thorizontalList.add(readPair(reader));\n\t\t}\n\n\t\t// 縦棒を左から順番にシミュレートして結果を配列に保持する\n\t\tint[] goal = new int[vertical];\n\t\tfor (int i = 1; i <= vertical; i++) {\n\t\t\tint result = i;\n\t\t\tfor (int[] horizontalBar : horizontalList) {\n\t\t\t\tif (result == horizontalBar[0]) {\n\t\t\t\t\tresult = horizontalBar[1];\n\t\t\t\t} else if (result == horizontalBar[1]) {\n\t\t\t\t\tresult = horizontalBar[0];\n\t\t\t\t}\n\t\t\t}\n\t\t\tgoal[result - 1] = i;\n\t\t}\n\n\t\t// 結果を表示する\n\t\tfor (int i : goal) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\n\t}", "BufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));", "reader", "new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in))", "int vertical = readNumber(reader);", "vertical", "readNumber(reader)", "readNumber", "reader", "int horizontal = readNumber(reader);", "horizontal", "readNumber(reader)", "readNumber", "reader", "List<int[]> horizontalList = new ArrayList<int[]>();", "horizontalList", "new ArrayList<int[]>()", "for (int i = 0; i < horizontal; i++) {\n\t\t\thorizontalList.add(readPair(reader));\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < horizontal", "i", "horizontal", "i++", "i++", "i", "{\n\t\t\thorizontalList.add(readPair(reader));\n\t\t}", "{\n\t\t\thorizontalList.add(readPair(reader));\n\t\t}", "horizontalList.add(readPair(reader))", "horizontalList.add", "horizontalList", "readPair(reader)", "readPair", "reader", "int[] goal = new int[vertical];", "goal", "new int[vertical]", "vertical", "for (int i = 1; i <= vertical; i++) {\n\t\t\tint result = i;\n\t\t\tfor (int[] horizontalBar : horizontalList) {\n\t\t\t\tif (result == horizontalBar[0]) {\n\t\t\t\t\tresult = horizontalBar[1];\n\t\t\t\t} else if (result == horizontalBar[1]) {\n\t\t\t\t\tresult = horizontalBar[0];\n\t\t\t\t}\n\t\t\t}\n\t\t\tgoal[result - 1] = i;\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= vertical", "i", "vertical", "i++", "i++", "i", "{\n\t\t\tint result = i;\n\t\t\tfor (int[] horizontalBar : horizontalList) {\n\t\t\t\tif (result == horizontalBar[0]) {\n\t\t\t\t\tresult = horizontalBar[1];\n\t\t\t\t} else if (result == horizontalBar[1]) {\n\t\t\t\t\tresult = horizontalBar[0];\n\t\t\t\t}\n\t\t\t}\n\t\t\tgoal[result - 1] = i;\n\t\t}", "{\n\t\t\tint result = i;\n\t\t\tfor (int[] horizontalBar : horizontalList) {\n\t\t\t\tif (result == horizontalBar[0]) {\n\t\t\t\t\tresult = horizontalBar[1];\n\t\t\t\t} else if (result == horizontalBar[1]) {\n\t\t\t\t\tresult = horizontalBar[0];\n\t\t\t\t}\n\t\t\t}\n\t\t\tgoal[result - 1] = i;\n\t\t}", "int result = i;", "result", "i", "for (int[] horizontalBar : horizontalList) {\n\t\t\t\tif (result == horizontalBar[0]) {\n\t\t\t\t\tresult = horizontalBar[1];\n\t\t\t\t} else if (result == horizontalBar[1]) {\n\t\t\t\t\tresult = horizontalBar[0];\n\t\t\t\t}\n\t\t\t}", "int[] horizontalBar", "horizontalList", "{\n\t\t\t\tif (result == horizontalBar[0]) {\n\t\t\t\t\tresult = horizontalBar[1];\n\t\t\t\t} else if (result == horizontalBar[1]) {\n\t\t\t\t\tresult = horizontalBar[0];\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tif (result == horizontalBar[0]) {\n\t\t\t\t\tresult = horizontalBar[1];\n\t\t\t\t} else if (result == horizontalBar[1]) {\n\t\t\t\t\tresult = horizontalBar[0];\n\t\t\t\t}\n\t\t\t}", "if (result == horizontalBar[0]) {\n\t\t\t\t\tresult = horizontalBar[1];\n\t\t\t\t} else if (result == horizontalBar[1]) {\n\t\t\t\t\tresult = horizontalBar[0];\n\t\t\t\t}", "result == horizontalBar[0]", "result", "horizontalBar[0]", "horizontalBar", "0", "{\n\t\t\t\t\tresult = horizontalBar[1];\n\t\t\t\t}", "result = horizontalBar[1]", "result", "horizontalBar[1]", "horizontalBar", "1", "if (result == horizontalBar[1]) {\n\t\t\t\t\tresult = horizontalBar[0];\n\t\t\t\t}", "result == horizontalBar[1]", "result", "horizontalBar[1]", "horizontalBar", "1", "{\n\t\t\t\t\tresult = horizontalBar[0];\n\t\t\t\t}", "result = horizontalBar[0]", "result", "horizontalBar[0]", "horizontalBar", "0", "goal[result - 1] = i", "goal[result - 1]", "goal", "result - 1", "result", "1", "i", "for (int i : goal) {\n\t\t\tSystem.out.println(i);\n\t\t}", "int i", "goal", "{\n\t\t\tSystem.out.println(i);\n\t\t}", "{\n\t\t\tSystem.out.println(i);\n\t\t}", "System.out.println(i)", "System.out.println", "System.out", "System", "System.out", "i", "String[] args", "args", "/**\n\t * ストリームから1行読み込んで、数値として返す。\n\t *\n\t * @param reader\n\t * 入力ストリーム\n\t * @return 数値\n\t */\n\tprivate static int readNumber(BufferedReader reader) {\n\t\tint result = 0;\n\t\ttry {\n\t\t\tString line = reader.readLine();\n\t\t\tresult = Integer.parseInt(line);\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException();\n\t\t}\n\t\treturn result;\n\t}", "readNumber", "{\n\t\tint result = 0;\n\t\ttry {\n\t\t\tString line = reader.readLine();\n\t\t\tresult = Integer.parseInt(line);\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException();\n\t\t}\n\t\treturn result;\n\t}", "int result = 0;", "result", "0", "try {\n\t\t\tString line = reader.readLine();\n\t\t\tresult = Integer.parseInt(line);\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException();\n\t\t}", "catch (IOException e) {\n\t\t\tthrow new RuntimeException();\n\t\t}", "IOException e", "{\n\t\t\tthrow new RuntimeException();\n\t\t}", "throw new RuntimeException();", "new RuntimeException()", "{\n\t\t\tString line = reader.readLine();\n\t\t\tresult = Integer.parseInt(line);\n\t\t}", "String line = reader.readLine();", "line", "reader.readLine()", "reader.readLine", "reader", "result = Integer.parseInt(line)", "result", "Integer.parseInt(line)", "Integer.parseInt", "Integer", "line", "return result;", "result", "BufferedReader reader", "reader", "/**\n\t * ストリームから1行読み込んで、数値のペアとして返す。\n\t *\n\t * @param reader\n\t * 入力ストリーム\n\t * @return 数値のペア\n\t */\n\tprivate static int[] readPair(BufferedReader reader) {\n\t\tint[] result = new int[2];\n\t\ttry {\n\t\t\tString line = reader.readLine();\n\t\t\tString[] array = line.split(\",\");\n\t\t\tresult[0] = Integer.parseInt(array[0]);\n\t\t\tresult[1] = Integer.parseInt(array[1]);\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException();\n\t\t}\n\t\treturn result;\n\t}", "readPair", "{\n\t\tint[] result = new int[2];\n\t\ttry {\n\t\t\tString line = reader.readLine();\n\t\t\tString[] array = line.split(\",\");\n\t\t\tresult[0] = Integer.parseInt(array[0]);\n\t\t\tresult[1] = Integer.parseInt(array[1]);\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException();\n\t\t}\n\t\treturn result;\n\t}", "int[] result = new int[2];", "result", "new int[2]", "2", "try {\n\t\t\tString line = reader.readLine();\n\t\t\tString[] array = line.split(\",\");\n\t\t\tresult[0] = Integer.parseInt(array[0]);\n\t\t\tresult[1] = Integer.parseInt(array[1]);\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException();\n\t\t}", "catch (IOException e) {\n\t\t\tthrow new RuntimeException();\n\t\t}", "IOException e", "{\n\t\t\tthrow new RuntimeException();\n\t\t}", "throw new RuntimeException();", "new RuntimeException()", "{\n\t\t\tString line = reader.readLine();\n\t\t\tString[] array = line.split(\",\");\n\t\t\tresult[0] = Integer.parseInt(array[0]);\n\t\t\tresult[1] = Integer.parseInt(array[1]);\n\t\t}", "String line = reader.readLine();", "line", "reader.readLine()", "reader.readLine", "reader", "String[] array = line.split(\",\");", "array", "line.split(\",\")", "line.split", "line", "\",\"", "result[0] = Integer.parseInt(array[0])", "result[0]", "result", "0", "Integer.parseInt(array[0])", "Integer.parseInt", "Integer", "array[0]", "array", "0", "result[1] = Integer.parseInt(array[1])", "result[1]", "result", "1", "Integer.parseInt(array[1])", "Integer.parseInt", "Integer", "array[1]", "array", "1", "return result;", "result", "BufferedReader reader", "reader" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; class Main { public static void main(String[] args) { // ストリームを作成する BufferedReader reader = new BufferedReader(new InputStreamReader( System.in)); int vertical = readNumber(reader); int horizontal = readNumber(reader); // 横棒リストを作る List<int[]> horizontalList = new ArrayList<int[]>(); for (int i = 0; i < horizontal; i++) { horizontalList.add(readPair(reader)); } // 縦棒を左から順番にシミュレートして結果を配列に保持する int[] goal = new int[vertical]; for (int i = 1; i <= vertical; i++) { int result = i; for (int[] horizontalBar : horizontalList) { if (result == horizontalBar[0]) { result = horizontalBar[1]; } else if (result == horizontalBar[1]) { result = horizontalBar[0]; } } goal[result - 1] = i; } // 結果を表示する for (int i : goal) { System.out.println(i); } } /** * ストリームから1行読み込んで、数値として返す。 * * @param reader * 入力ストリーム * @return 数値 */ private static int readNumber(BufferedReader reader) { int result = 0; try { String line = reader.readLine(); result = Integer.parseInt(line); } catch (IOException e) { throw new RuntimeException(); } return result; } /** * ストリームから1行読み込んで、数値のペアとして返す。 * * @param reader * 入力ストリーム * @return 数値のペア */ private static int[] readPair(BufferedReader reader) { int[] result = new int[2]; try { String line = reader.readLine(); String[] array = line.split(","); result[0] = Integer.parseInt(array[0]); result[1] = Integer.parseInt(array[1]); } catch (IOException e) { throw new RuntimeException(); } return result; } }
[ 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, 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 ], [ 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 ], [ 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 ], [ 69, 72 ], [ 72, 73 ], [ 72, 74 ], [ 58, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 78, 79 ], [ 77, 80 ], [ 80, 81 ], [ 80, 82 ], [ 58, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 87, 89 ], [ 58, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 93, 95 ], [ 90, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 98, 100 ], [ 58, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 104, 106 ], [ 101, 107 ], [ 8, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 108, 113 ], [ 113, 114 ], [ 113, 115 ], [ 108, 116 ], [ 116, 117 ], [ 117, 118 ], [ 108, 119 ], [ 120, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 121, 126 ], [ 126, 127 ], [ 126, 128 ], [ 6, 129 ], [ 129, 130 ], [ 0, 131 ], [ 131, 132 ], [ 131, 133 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main (String[] args) {\n Scanner scanner = new Scanner(System.in);\n int w = scanner.nextInt();\n int n = scanner.nextInt();\n int[] numbers = new int[w];\n \n for (int i = 0; i < w; i++) {\n numbers[i] = i+1;\n }\n \n for (int i = 0; i < n; i++) {\n String op[] = scanner.next().split(\",\");\n int a = Integer.parseInt(op[0]);\n int b = Integer.parseInt(op[1]);\n int temp = numbers[a-1];\n numbers[a-1] = numbers[b-1];\n numbers[b-1] = temp;\n }\n for (int i = 0; i < w; i++) {\n System.out.println(numbers[i]);\n }\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main (String[] args) {\n Scanner scanner = new Scanner(System.in);\n int w = scanner.nextInt();\n int n = scanner.nextInt();\n int[] numbers = new int[w];\n \n for (int i = 0; i < w; i++) {\n numbers[i] = i+1;\n }\n \n for (int i = 0; i < n; i++) {\n String op[] = scanner.next().split(\",\");\n int a = Integer.parseInt(op[0]);\n int b = Integer.parseInt(op[1]);\n int temp = numbers[a-1];\n numbers[a-1] = numbers[b-1];\n numbers[b-1] = temp;\n }\n for (int i = 0; i < w; i++) {\n System.out.println(numbers[i]);\n }\n }\n}", "Main", "public static void main (String[] args) {\n Scanner scanner = new Scanner(System.in);\n int w = scanner.nextInt();\n int n = scanner.nextInt();\n int[] numbers = new int[w];\n \n for (int i = 0; i < w; i++) {\n numbers[i] = i+1;\n }\n \n for (int i = 0; i < n; i++) {\n String op[] = scanner.next().split(\",\");\n int a = Integer.parseInt(op[0]);\n int b = Integer.parseInt(op[1]);\n int temp = numbers[a-1];\n numbers[a-1] = numbers[b-1];\n numbers[b-1] = temp;\n }\n for (int i = 0; i < w; i++) {\n System.out.println(numbers[i]);\n }\n }", "main", "{\n Scanner scanner = new Scanner(System.in);\n int w = scanner.nextInt();\n int n = scanner.nextInt();\n int[] numbers = new int[w];\n \n for (int i = 0; i < w; i++) {\n numbers[i] = i+1;\n }\n \n for (int i = 0; i < n; i++) {\n String op[] = scanner.next().split(\",\");\n int a = Integer.parseInt(op[0]);\n int b = Integer.parseInt(op[1]);\n int temp = numbers[a-1];\n numbers[a-1] = numbers[b-1];\n numbers[b-1] = temp;\n }\n for (int i = 0; i < w; i++) {\n System.out.println(numbers[i]);\n }\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int w = scanner.nextInt();", "w", "scanner.nextInt()", "scanner.nextInt", "scanner", "int n = scanner.nextInt();", "n", "scanner.nextInt()", "scanner.nextInt", "scanner", "int[] numbers = new int[w];", "numbers", "new int[w]", "w", "for (int i = 0; i < w; i++) {\n numbers[i] = i+1;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < w", "i", "w", "i++", "i++", "i", "{\n numbers[i] = i+1;\n }", "{\n numbers[i] = i+1;\n }", "numbers[i] = i+1", "numbers[i]", "numbers", "i", "i+1", "i", "1", "for (int i = 0; i < n; i++) {\n String op[] = scanner.next().split(\",\");\n int a = Integer.parseInt(op[0]);\n int b = Integer.parseInt(op[1]);\n int temp = numbers[a-1];\n numbers[a-1] = numbers[b-1];\n numbers[b-1] = temp;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n String op[] = scanner.next().split(\",\");\n int a = Integer.parseInt(op[0]);\n int b = Integer.parseInt(op[1]);\n int temp = numbers[a-1];\n numbers[a-1] = numbers[b-1];\n numbers[b-1] = temp;\n }", "{\n String op[] = scanner.next().split(\",\");\n int a = Integer.parseInt(op[0]);\n int b = Integer.parseInt(op[1]);\n int temp = numbers[a-1];\n numbers[a-1] = numbers[b-1];\n numbers[b-1] = temp;\n }", "String op[] = scanner.next().split(\",\");", "op", "scanner.next().split(\",\")", "scanner.next().split", "scanner.next()", "scanner.next", "scanner", "\",\"", "int a = Integer.parseInt(op[0]);", "a", "Integer.parseInt(op[0])", "Integer.parseInt", "Integer", "op[0]", "op", "0", "int b = Integer.parseInt(op[1]);", "b", "Integer.parseInt(op[1])", "Integer.parseInt", "Integer", "op[1]", "op", "1", "int temp = numbers[a-1];", "temp", "numbers[a-1]", "numbers", "a-1", "a", "1", "numbers[a-1] = numbers[b-1]", "numbers[a-1]", "numbers", "a-1", "a", "1", "numbers[b-1]", "numbers", "b-1", "b", "1", "numbers[b-1] = temp", "numbers[b-1]", "numbers", "b-1", "b", "1", "temp", "for (int i = 0; i < w; i++) {\n System.out.println(numbers[i]);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < w", "i", "w", "i++", "i++", "i", "{\n System.out.println(numbers[i]);\n }", "{\n System.out.println(numbers[i]);\n }", "System.out.println(numbers[i])", "System.out.println", "System.out", "System", "System.out", "numbers[i]", "numbers", "i", "String[] args", "args", "public class Main {\n public static void main (String[] args) {\n Scanner scanner = new Scanner(System.in);\n int w = scanner.nextInt();\n int n = scanner.nextInt();\n int[] numbers = new int[w];\n \n for (int i = 0; i < w; i++) {\n numbers[i] = i+1;\n }\n \n for (int i = 0; i < n; i++) {\n String op[] = scanner.next().split(\",\");\n int a = Integer.parseInt(op[0]);\n int b = Integer.parseInt(op[1]);\n int temp = numbers[a-1];\n numbers[a-1] = numbers[b-1];\n numbers[b-1] = temp;\n }\n for (int i = 0; i < w; i++) {\n System.out.println(numbers[i]);\n }\n }\n}", "public class Main {\n public static void main (String[] args) {\n Scanner scanner = new Scanner(System.in);\n int w = scanner.nextInt();\n int n = scanner.nextInt();\n int[] numbers = new int[w];\n \n for (int i = 0; i < w; i++) {\n numbers[i] = i+1;\n }\n \n for (int i = 0; i < n; i++) {\n String op[] = scanner.next().split(\",\");\n int a = Integer.parseInt(op[0]);\n int b = Integer.parseInt(op[1]);\n int temp = numbers[a-1];\n numbers[a-1] = numbers[b-1];\n numbers[b-1] = temp;\n }\n for (int i = 0; i < w; i++) {\n System.out.println(numbers[i]);\n }\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main (String[] args) { Scanner scanner = new Scanner(System.in); int w = scanner.nextInt(); int n = scanner.nextInt(); int[] numbers = new int[w]; for (int i = 0; i < w; i++) { numbers[i] = i+1; } for (int i = 0; i < n; i++) { String op[] = scanner.next().split(","); int a = Integer.parseInt(op[0]); int b = Integer.parseInt(op[1]); int temp = numbers[a-1]; numbers[a-1] = numbers[b-1]; numbers[b-1] = temp; } for (int i = 0; i < w; i++) { System.out.println(numbers[i]); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 41, 13, 41, 13, 41, 13, 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, 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 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 26 ], [ 26, 27 ], [ 8, 28 ], [ 28, 29 ], [ 8, 30 ], [ 30, 31 ], [ 8, 32 ], [ 32, 33 ], [ 8, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 34, 39 ], [ 39, 40 ], [ 39, 41 ], [ 34, 42 ], [ 42, 43 ], [ 43, 44 ], [ 34, 45 ], [ 46, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 47, 51 ], [ 51, 52 ], [ 51, 53 ], [ 8, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 54, 59 ], [ 59, 60 ], [ 59, 61 ], [ 54, 62 ], [ 62, 63 ], [ 63, 64 ], [ 54, 65 ], [ 66, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 69, 74 ], [ 66, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 78, 79 ], [ 77, 80 ], [ 80, 81 ], [ 80, 82 ], [ 66, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 86, 87 ], [ 85, 88 ], [ 88, 89 ], [ 88, 90 ], [ 66, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 95, 97 ], [ 66, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 101, 103 ], [ 98, 104 ], [ 104, 105 ], [ 104, 106 ], [ 106, 107 ], [ 106, 108 ], [ 66, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 112, 113 ], [ 112, 114 ], [ 109, 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 ], [ 128, 128 ], [ 128, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 131, 133 ], [ 129, 134 ], [ 134, 135 ], [ 134, 136 ], [ 6, 137 ], [ 137, 138 ] ]
[ "import java.util.Scanner;\n\nclass Main{\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int M = scanner.nextInt();\n int P[] = new int[N];\n int a,b,x;\n String[] str;\n\n for(int i=0;i<M;i++){\n P[i] = i + 1;\n }\n\n for(int i=0;i<M;i++){\n str = scanner.next().split(\",\");\n \t\ta = Integer.parseInt(str[0]);\n \t\tb = Integer.parseInt(str[1]);\n x = P[a-1];\n P[a-1] = P[b-1];\n P[b-1] = x;\n }\n\n for(int i=0;i<M;i++){\n System.out.println(P[i]);\n }\n\n }\n}\n", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int M = scanner.nextInt();\n int P[] = new int[N];\n int a,b,x;\n String[] str;\n\n for(int i=0;i<M;i++){\n P[i] = i + 1;\n }\n\n for(int i=0;i<M;i++){\n str = scanner.next().split(\",\");\n \t\ta = Integer.parseInt(str[0]);\n \t\tb = Integer.parseInt(str[1]);\n x = P[a-1];\n P[a-1] = P[b-1];\n P[b-1] = x;\n }\n\n for(int i=0;i<M;i++){\n System.out.println(P[i]);\n }\n\n }\n}", "Main", "public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int M = scanner.nextInt();\n int P[] = new int[N];\n int a,b,x;\n String[] str;\n\n for(int i=0;i<M;i++){\n P[i] = i + 1;\n }\n\n for(int i=0;i<M;i++){\n str = scanner.next().split(\",\");\n \t\ta = Integer.parseInt(str[0]);\n \t\tb = Integer.parseInt(str[1]);\n x = P[a-1];\n P[a-1] = P[b-1];\n P[b-1] = x;\n }\n\n for(int i=0;i<M;i++){\n System.out.println(P[i]);\n }\n\n }", "main", "{\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int M = scanner.nextInt();\n int P[] = new int[N];\n int a,b,x;\n String[] str;\n\n for(int i=0;i<M;i++){\n P[i] = i + 1;\n }\n\n for(int i=0;i<M;i++){\n str = scanner.next().split(\",\");\n \t\ta = Integer.parseInt(str[0]);\n \t\tb = Integer.parseInt(str[1]);\n x = P[a-1];\n P[a-1] = P[b-1];\n P[b-1] = x;\n }\n\n for(int i=0;i<M;i++){\n System.out.println(P[i]);\n }\n\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int N = scanner.nextInt();", "N", "scanner.nextInt()", "scanner.nextInt", "scanner", "int M = scanner.nextInt();", "M", "scanner.nextInt()", "scanner.nextInt", "scanner", "int P[] = new int[N];", "P", "new int[N]", "N", "int a", "a", "b", "b", "x;", "x", "String[] str;", "str", "for(int i=0;i<M;i++){\n P[i] = i + 1;\n }", "int i=0;", "int i=0;", "i", "0", "i<M", "i", "M", "i++", "i++", "i", "{\n P[i] = i + 1;\n }", "{\n P[i] = i + 1;\n }", "P[i] = i + 1", "P[i]", "P", "i", "i + 1", "i", "1", "for(int i=0;i<M;i++){\n str = scanner.next().split(\",\");\n \t\ta = Integer.parseInt(str[0]);\n \t\tb = Integer.parseInt(str[1]);\n x = P[a-1];\n P[a-1] = P[b-1];\n P[b-1] = x;\n }", "int i=0;", "int i=0;", "i", "0", "i<M", "i", "M", "i++", "i++", "i", "{\n str = scanner.next().split(\",\");\n \t\ta = Integer.parseInt(str[0]);\n \t\tb = Integer.parseInt(str[1]);\n x = P[a-1];\n P[a-1] = P[b-1];\n P[b-1] = x;\n }", "{\n str = scanner.next().split(\",\");\n \t\ta = Integer.parseInt(str[0]);\n \t\tb = Integer.parseInt(str[1]);\n x = P[a-1];\n P[a-1] = P[b-1];\n P[b-1] = x;\n }", "str = scanner.next().split(\",\")", "str", "scanner.next().split(\",\")", "scanner.next().split", "scanner.next()", "scanner.next", "scanner", "\",\"", "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", "x = P[a-1]", "x", "P[a-1]", "P", "a-1", "a", "1", "P[a-1] = P[b-1]", "P[a-1]", "P", "a-1", "a", "1", "P[b-1]", "P", "b-1", "b", "1", "P[b-1] = x", "P[b-1]", "P", "b-1", "b", "1", "x", "for(int i=0;i<M;i++){\n System.out.println(P[i]);\n }", "int i=0;", "int i=0;", "i", "0", "i<M", "i", "M", "i++", "i++", "i", "{\n System.out.println(P[i]);\n }", "{\n System.out.println(P[i]);\n }", "System.out.println(P[i])", "System.out.println", "System.out", "System", "System.out", "P[i]", "P", "i", "String[] args", "args" ]
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner scanner = new Scanner(System.in); int N = scanner.nextInt(); int M = scanner.nextInt(); int P[] = new int[N]; int a,b,x; String[] str; for(int i=0;i<M;i++){ P[i] = i + 1; } for(int i=0;i<M;i++){ str = scanner.next().split(","); a = Integer.parseInt(str[0]); b = Integer.parseInt(str[1]); x = P[a-1]; P[a-1] = P[b-1]; P[b-1] = x; } for(int i=0;i<M;i++){ System.out.println(P[i]); } } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 41, 13, 17, 41, 13, 12, 13, 30, 41, 13, 4, 18, 13, 0, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 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 ], [ 129, 5 ], [ 129, 6 ], [ 6, 7 ], [ 6, 8 ], [ 129, 9 ], [ 9, 10 ], [ 9, 11 ], [ 129, 12 ], [ 12, 13 ], [ 129, 14 ], [ 14, 15 ], [ 14, 16 ], [ 16, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 16, 22 ], [ 22, 23 ], [ 22, 24 ], [ 25, 26 ], [ 25, 27 ], [ 16, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 28, 33 ], [ 33, 34 ], [ 33, 35 ], [ 28, 36 ], [ 36, 37 ], [ 37, 38 ], [ 28, 39 ], [ 40, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 41, 45 ], [ 16, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 49, 50 ], [ 16, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 51, 56 ], [ 56, 57 ], [ 56, 58 ], [ 51, 59 ], [ 59, 60 ], [ 60, 61 ], [ 51, 62 ], [ 63, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 66, 71 ], [ 63, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 75, 76 ], [ 74, 77 ], [ 77, 78 ], [ 77, 79 ], [ 63, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 83, 84 ], [ 82, 85 ], [ 85, 86 ], [ 85, 87 ], [ 63, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 90, 92 ], [ 63, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 93, 97 ], [ 97, 98 ], [ 97, 99 ], [ 63, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 100, 104 ], [ 16, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 105, 110 ], [ 110, 111 ], [ 110, 112 ], [ 105, 113 ], [ 113, 114 ], [ 114, 115 ], [ 105, 116 ], [ 117, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 120, 122 ], [ 118, 123 ], [ 123, 124 ], [ 123, 125 ], [ 14, 126 ], [ 126, 127 ], [ 0, 128 ], [ 128, 129 ], [ 128, 130 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static Scanner sc = new Scanner(System.in);\n public static long res = 0;\n public static int[] ary;\n public static void main(String[] args) throws Exception {\n int w = sc.nextInt();\n ary = new int[w+1];\n for (int i = 0; i <= w; i++) {\n ary[i] = i;\n }\n int n = sc.nextInt();\n for (int i = 0; i < n; i++) {\n String[] s = sc.next().split(\",\");\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n int t = ary[a];\n ary[a] = ary[b];\n ary[b] = t;\n }\n \n for (int i = 1; i <= w; i++) {\n System.out.println(ary[i]);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static Scanner sc = new Scanner(System.in);\n public static long res = 0;\n public static int[] ary;\n public static void main(String[] args) throws Exception {\n int w = sc.nextInt();\n ary = new int[w+1];\n for (int i = 0; i <= w; i++) {\n ary[i] = i;\n }\n int n = sc.nextInt();\n for (int i = 0; i < n; i++) {\n String[] s = sc.next().split(\",\");\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n int t = ary[a];\n ary[a] = ary[b];\n ary[b] = t;\n }\n \n for (int i = 1; i <= w; i++) {\n System.out.println(ary[i]);\n }\n }\n}", "Main", "public static Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "public static long res = 0;", "res", "0", "public static int[] ary;", "ary", "public static void main(String[] args) throws Exception {\n int w = sc.nextInt();\n ary = new int[w+1];\n for (int i = 0; i <= w; i++) {\n ary[i] = i;\n }\n int n = sc.nextInt();\n for (int i = 0; i < n; i++) {\n String[] s = sc.next().split(\",\");\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n int t = ary[a];\n ary[a] = ary[b];\n ary[b] = t;\n }\n \n for (int i = 1; i <= w; i++) {\n System.out.println(ary[i]);\n }\n }", "main", "{\n int w = sc.nextInt();\n ary = new int[w+1];\n for (int i = 0; i <= w; i++) {\n ary[i] = i;\n }\n int n = sc.nextInt();\n for (int i = 0; i < n; i++) {\n String[] s = sc.next().split(\",\");\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n int t = ary[a];\n ary[a] = ary[b];\n ary[b] = t;\n }\n \n for (int i = 1; i <= w; i++) {\n System.out.println(ary[i]);\n }\n }", "int w = sc.nextInt();", "w", "sc.nextInt()", "sc.nextInt", "sc", "ary = new int[w+1]", "ary", "new int[w+1]", "w+1", "w", "1", "for (int i = 0; i <= w; i++) {\n ary[i] = i;\n }", "int i = 0;", "int i = 0;", "i", "0", "i <= w", "i", "w", "i++", "i++", "i", "{\n ary[i] = i;\n }", "{\n ary[i] = i;\n }", "ary[i] = i", "ary[i]", "ary", "i", "i", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "for (int i = 0; i < n; i++) {\n String[] s = sc.next().split(\",\");\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n int t = ary[a];\n ary[a] = ary[b];\n ary[b] = t;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n String[] s = sc.next().split(\",\");\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n int t = ary[a];\n ary[a] = ary[b];\n ary[b] = t;\n }", "{\n String[] s = sc.next().split(\",\");\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n int t = ary[a];\n ary[a] = ary[b];\n ary[b] = t;\n }", "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", "int t = ary[a];", "t", "ary[a]", "ary", "a", "ary[a] = ary[b]", "ary[a]", "ary", "a", "ary[b]", "ary", "b", "ary[b] = t", "ary[b]", "ary", "b", "t", "for (int i = 1; i <= w; i++) {\n System.out.println(ary[i]);\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= w", "i", "w", "i++", "i++", "i", "{\n System.out.println(ary[i]);\n }", "{\n System.out.println(ary[i]);\n }", "System.out.println(ary[i])", "System.out.println", "System.out", "System", "System.out", "ary[i]", "ary", "i", "String[] args", "args", "public class Main {\n public static Scanner sc = new Scanner(System.in);\n public static long res = 0;\n public static int[] ary;\n public static void main(String[] args) throws Exception {\n int w = sc.nextInt();\n ary = new int[w+1];\n for (int i = 0; i <= w; i++) {\n ary[i] = i;\n }\n int n = sc.nextInt();\n for (int i = 0; i < n; i++) {\n String[] s = sc.next().split(\",\");\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n int t = ary[a];\n ary[a] = ary[b];\n ary[b] = t;\n }\n \n for (int i = 1; i <= w; i++) {\n System.out.println(ary[i]);\n }\n }\n}", "public class Main {\n public static Scanner sc = new Scanner(System.in);\n public static long res = 0;\n public static int[] ary;\n public static void main(String[] args) throws Exception {\n int w = sc.nextInt();\n ary = new int[w+1];\n for (int i = 0; i <= w; i++) {\n ary[i] = i;\n }\n int n = sc.nextInt();\n for (int i = 0; i < n; i++) {\n String[] s = sc.next().split(\",\");\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n int t = ary[a];\n ary[a] = ary[b];\n ary[b] = t;\n }\n \n for (int i = 1; i <= w; i++) {\n System.out.println(ary[i]);\n }\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static Scanner sc = new Scanner(System.in); public static long res = 0; public static int[] ary; public static void main(String[] args) throws Exception { int w = sc.nextInt(); ary = new int[w+1]; for (int i = 0; i <= w; i++) { ary[i] = i; } int n = sc.nextInt(); for (int i = 0; i < n; i++) { String[] s = sc.next().split(","); int a = Integer.parseInt(s[0]); int b = Integer.parseInt(s[1]); int t = ary[a]; ary[a] = ary[b]; ary[b] = t; } for (int i = 1; i <= w; i++) { System.out.println(ary[i]); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 41, 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, 0, 13, 4, 18, 13, 18, 13, 17, 0, 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, 4, 18, 13, 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 ], [ 11, 12 ], [ 11, 13 ], [ 8, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 8, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 21, 25 ], [ 6, 26 ], [ 26, 27 ], [ 6, 28 ], [ 28, 29 ], [ 6, 30 ], [ 30, 31 ], [ 153, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 34, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 34, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 46, 47 ], [ 34, 48 ], [ 48, 49 ], [ 34, 50 ], [ 50, 51 ], [ 34, 52 ], [ 52, 53 ], [ 52, 54 ], [ 34, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 56, 61 ], [ 61, 62 ], [ 61, 63 ], [ 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 ], [ 34, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 78, 83 ], [ 83, 84 ], [ 83, 85 ], [ 78, 86 ], [ 86, 87 ], [ 87, 88 ], [ 78, 89 ], [ 90, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 93, 98 ], [ 90, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 102, 103 ], [ 101, 104 ], [ 104, 105 ], [ 104, 106 ], [ 90, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 110, 111 ], [ 109, 112 ], [ 112, 113 ], [ 112, 114 ], [ 90, 115 ], [ 115, 116 ], [ 115, 117 ], [ 115, 118 ], [ 118, 119 ], [ 118, 120 ], [ 115, 121 ], [ 121, 122 ], [ 121, 123 ], [ 34, 124 ], [ 124, 125 ], [ 125, 126 ], [ 126, 127 ], [ 126, 128 ], [ 124, 129 ], [ 129, 130 ], [ 129, 131 ], [ 131, 132 ], [ 131, 133 ], [ 124, 134 ], [ 134, 135 ], [ 135, 136 ], [ 124, 137 ], [ 138, 138 ], [ 138, 139 ], [ 139, 140 ], [ 140, 141 ], [ 141, 142 ], [ 141, 143 ], [ 139, 144 ], [ 144, 145 ], [ 144, 146 ], [ 34, 147 ], [ 147, 148 ], [ 148, 149 ], [ 32, 150 ], [ 150, 151 ], [ 0, 152 ], [ 152, 153 ], [ 152, 154 ] ]
[ "import java.util.Scanner;\n\npublic class Main\n{\n\tprivate static void swap(int r[],int a,int b)\n\t{\n\t\tint tmp=r[a];\n\t\tr[a]=r[b];\n\t\tr[b]=tmp;\n\t}\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scan=new Scanner(System.in);\n\t\tint w=scan.nextInt();\n\t\tint n=scan.nextInt();\n\t\tint a,b;\n\t\tint[] r=new int[w];\n\t\tfor(int i=0;i<r.length;i++){\n\t\t\tr[i]=i+1;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] tmp=scan.next().split(\",\");\n\t\t\ta=Integer.parseInt(tmp[0]);\n\t\t\tb=Integer.parseInt(tmp[1]);\n\t\t\tswap(r,a-1,b-1);\n\t\t}\n\t\tfor(int i=0;i<r.length;i++){\n\t\t\tSystem.out.println(r[i]);\n\t\t}\n\t\tscan.close();\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main\n{\n\tprivate static void swap(int r[],int a,int b)\n\t{\n\t\tint tmp=r[a];\n\t\tr[a]=r[b];\n\t\tr[b]=tmp;\n\t}\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scan=new Scanner(System.in);\n\t\tint w=scan.nextInt();\n\t\tint n=scan.nextInt();\n\t\tint a,b;\n\t\tint[] r=new int[w];\n\t\tfor(int i=0;i<r.length;i++){\n\t\t\tr[i]=i+1;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] tmp=scan.next().split(\",\");\n\t\t\ta=Integer.parseInt(tmp[0]);\n\t\t\tb=Integer.parseInt(tmp[1]);\n\t\t\tswap(r,a-1,b-1);\n\t\t}\n\t\tfor(int i=0;i<r.length;i++){\n\t\t\tSystem.out.println(r[i]);\n\t\t}\n\t\tscan.close();\n\t}\n}", "Main", "private static void swap(int r[],int a,int b)\n\t{\n\t\tint tmp=r[a];\n\t\tr[a]=r[b];\n\t\tr[b]=tmp;\n\t}", "swap", "{\n\t\tint tmp=r[a];\n\t\tr[a]=r[b];\n\t\tr[b]=tmp;\n\t}", "int tmp=r[a];", "tmp", "r[a]", "r", "a", "r[a]=r[b]", "r[a]", "r", "a", "r[b]", "r", "b", "r[b]=tmp", "r[b]", "r", "b", "tmp", "int r[]", "r", "int a", "a", "int b", "b", "public static void main(String[] args)\n\t{\n\t\tScanner scan=new Scanner(System.in);\n\t\tint w=scan.nextInt();\n\t\tint n=scan.nextInt();\n\t\tint a,b;\n\t\tint[] r=new int[w];\n\t\tfor(int i=0;i<r.length;i++){\n\t\t\tr[i]=i+1;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] tmp=scan.next().split(\",\");\n\t\t\ta=Integer.parseInt(tmp[0]);\n\t\t\tb=Integer.parseInt(tmp[1]);\n\t\t\tswap(r,a-1,b-1);\n\t\t}\n\t\tfor(int i=0;i<r.length;i++){\n\t\t\tSystem.out.println(r[i]);\n\t\t}\n\t\tscan.close();\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 a,b;\n\t\tint[] r=new int[w];\n\t\tfor(int i=0;i<r.length;i++){\n\t\t\tr[i]=i+1;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] tmp=scan.next().split(\",\");\n\t\t\ta=Integer.parseInt(tmp[0]);\n\t\t\tb=Integer.parseInt(tmp[1]);\n\t\t\tswap(r,a-1,b-1);\n\t\t}\n\t\tfor(int i=0;i<r.length;i++){\n\t\t\tSystem.out.println(r[i]);\n\t\t}\n\t\tscan.close();\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 a", "a", "b;", "b", "int[] r=new int[w];", "r", "new int[w]", "w", "for(int i=0;i<r.length;i++){\n\t\t\tr[i]=i+1;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<r.length", "i", "r.length", "r", "r.length", "i++", "i++", "i", "{\n\t\t\tr[i]=i+1;\n\t\t}", "{\n\t\t\tr[i]=i+1;\n\t\t}", "r[i]=i+1", "r[i]", "r", "i", "i+1", "i", "1", "for(int i=0;i<n;i++){\n\t\t\tString[] tmp=scan.next().split(\",\");\n\t\t\ta=Integer.parseInt(tmp[0]);\n\t\t\tb=Integer.parseInt(tmp[1]);\n\t\t\tswap(r,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[] tmp=scan.next().split(\",\");\n\t\t\ta=Integer.parseInt(tmp[0]);\n\t\t\tb=Integer.parseInt(tmp[1]);\n\t\t\tswap(r,a-1,b-1);\n\t\t}", "{\n\t\t\tString[] tmp=scan.next().split(\",\");\n\t\t\ta=Integer.parseInt(tmp[0]);\n\t\t\tb=Integer.parseInt(tmp[1]);\n\t\t\tswap(r,a-1,b-1);\n\t\t}", "String[] tmp=scan.next().split(\",\");", "tmp", "scan.next().split(\",\")", "scan.next().split", "scan.next()", "scan.next", "scan", "\",\"", "a=Integer.parseInt(tmp[0])", "a", "Integer.parseInt(tmp[0])", "Integer.parseInt", "Integer", "tmp[0]", "tmp", "0", "b=Integer.parseInt(tmp[1])", "b", "Integer.parseInt(tmp[1])", "Integer.parseInt", "Integer", "tmp[1]", "tmp", "1", "swap(r,a-1,b-1)", "swap", "r", "a-1", "a", "1", "b-1", "b", "1", "for(int i=0;i<r.length;i++){\n\t\t\tSystem.out.println(r[i]);\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<r.length", "i", "r.length", "r", "r.length", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(r[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(r[i]);\n\t\t}", "System.out.println(r[i])", "System.out.println", "System.out", "System", "System.out", "r[i]", "r", "i", "scan.close()", "scan.close", "scan", "String[] args", "args", "public class Main\n{\n\tprivate static void swap(int r[],int a,int b)\n\t{\n\t\tint tmp=r[a];\n\t\tr[a]=r[b];\n\t\tr[b]=tmp;\n\t}\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scan=new Scanner(System.in);\n\t\tint w=scan.nextInt();\n\t\tint n=scan.nextInt();\n\t\tint a,b;\n\t\tint[] r=new int[w];\n\t\tfor(int i=0;i<r.length;i++){\n\t\t\tr[i]=i+1;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] tmp=scan.next().split(\",\");\n\t\t\ta=Integer.parseInt(tmp[0]);\n\t\t\tb=Integer.parseInt(tmp[1]);\n\t\t\tswap(r,a-1,b-1);\n\t\t}\n\t\tfor(int i=0;i<r.length;i++){\n\t\t\tSystem.out.println(r[i]);\n\t\t}\n\t\tscan.close();\n\t}\n}", "public class Main\n{\n\tprivate static void swap(int r[],int a,int b)\n\t{\n\t\tint tmp=r[a];\n\t\tr[a]=r[b];\n\t\tr[b]=tmp;\n\t}\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scan=new Scanner(System.in);\n\t\tint w=scan.nextInt();\n\t\tint n=scan.nextInt();\n\t\tint a,b;\n\t\tint[] r=new int[w];\n\t\tfor(int i=0;i<r.length;i++){\n\t\t\tr[i]=i+1;\n\t\t}\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString[] tmp=scan.next().split(\",\");\n\t\t\ta=Integer.parseInt(tmp[0]);\n\t\t\tb=Integer.parseInt(tmp[1]);\n\t\t\tswap(r,a-1,b-1);\n\t\t}\n\t\tfor(int i=0;i<r.length;i++){\n\t\t\tSystem.out.println(r[i]);\n\t\t}\n\t\tscan.close();\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { private static void swap(int r[],int a,int b) { int tmp=r[a]; r[a]=r[b]; r[b]=tmp; } public static void main(String[] args) { Scanner scan=new Scanner(System.in); int w=scan.nextInt(); int n=scan.nextInt(); int a,b; int[] r=new int[w]; for(int i=0;i<r.length;i++){ r[i]=i+1; } for(int i=0;i<n;i++){ String[] tmp=scan.next().split(","); a=Integer.parseInt(tmp[0]); b=Integer.parseInt(tmp[1]); swap(r,a-1,b-1); } for(int i=0;i<r.length;i++){ System.out.println(r[i]); } scan.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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 4, 18, 13, 17, 0, 18, 13, 13, 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, 0, 18, 13, 2, 4, 13, 13, 13, 13, 17, 13, 11, 1, 41, 13, 17, 41, 13, 18, 13, 13, 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, 41, 13, 18, 13, 13, 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, 29, 13, 23, 13, 23, 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 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 8, 28 ], [ 28, 29 ], [ 28, 30 ], [ 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 ], [ 49, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 51, 56 ], [ 48, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 57, 61 ], [ 61, 62 ], [ 62, 63 ], [ 61, 64 ], [ 64, 65 ], [ 64, 66 ], [ 48, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 67, 71 ], [ 71, 72 ], [ 72, 73 ], [ 71, 74 ], [ 74, 75 ], [ 74, 76 ], [ 8, 77 ], [ 77, 78 ], [ 77, 79 ], [ 8, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 81, 86 ], [ 86, 87 ], [ 86, 88 ], [ 81, 89 ], [ 89, 90 ], [ 90, 91 ], [ 81, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 97, 100 ], [ 97, 101 ], [ 96, 102 ], [ 93, 103 ], [ 8, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 105, 109 ], [ 109, 110 ], [ 109, 111 ], [ 111, 112 ], [ 111, 113 ], [ 104, 114 ], [ 114, 115 ], [ 114, 116 ], [ 104, 117 ], [ 117, 118 ], [ 118, 119 ], [ 104, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 121, 126 ], [ 126, 127 ], [ 126, 128 ], [ 6, 129 ], [ 129, 130 ], [ 183, 131 ], [ 131, 132 ], [ 131, 133 ], [ 133, 134 ], [ 134, 135 ], [ 135, 136 ], [ 136, 137 ], [ 136, 138 ], [ 135, 139 ], [ 139, 140 ], [ 139, 141 ], [ 141, 142 ], [ 141, 143 ], [ 134, 144 ], [ 144, 145 ], [ 144, 146 ], [ 134, 147 ], [ 147, 148 ], [ 148, 149 ], [ 134, 150 ], [ 151, 151 ], [ 151, 152 ], [ 152, 153 ], [ 153, 154 ], [ 154, 155 ], [ 154, 156 ], [ 153, 157 ], [ 152, 158 ], [ 158, 159 ], [ 158, 160 ], [ 160, 161 ], [ 160, 162 ], [ 152, 163 ], [ 163, 164 ], [ 164, 165 ], [ 165, 166 ], [ 165, 167 ], [ 164, 168 ], [ 163, 169 ], [ 169, 170 ], [ 169, 171 ], [ 171, 172 ], [ 171, 173 ], [ 133, 174 ], [ 174, 175 ], [ 131, 176 ], [ 176, 177 ], [ 131, 178 ], [ 178, 179 ], [ 131, 180 ], [ 180, 181 ], [ 0, 182 ], [ 182, 183 ], [ 182, 184 ] ]
[ "import java.util.*;\n\npublic class Main {\n\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int h = sc.nextInt();\n sc.nextLine();\n int w = sc.nextInt();\n sc.nextLine();\n int[] f = new int[w];\n int[] l = new int[w];\n for(int i = 0;i < w;i++){\n String[] s = sc.nextLine().split(\",\");\n f[i] = Integer.parseInt(s[0]);\n l[i] = Integer.parseInt(s[1]);\n }\n int[] result = new int[h];\n for(int i = 1;i <= h;i++) result[amida(f,l,i) - 1] = i;\n for(int i = 0,size = result.length;i < size;i++) System.out.println(result[i]);\n }\n\n static int amida(int[] f,int[] l,int index){\n for(int i = 0,size = f.length;i < size;i++){\n if(f[i] == index) index = l[i];\n else if(l[i] == index) index = f[i];\n }\n return index;\n }\n\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int h = sc.nextInt();\n sc.nextLine();\n int w = sc.nextInt();\n sc.nextLine();\n int[] f = new int[w];\n int[] l = new int[w];\n for(int i = 0;i < w;i++){\n String[] s = sc.nextLine().split(\",\");\n f[i] = Integer.parseInt(s[0]);\n l[i] = Integer.parseInt(s[1]);\n }\n int[] result = new int[h];\n for(int i = 1;i <= h;i++) result[amida(f,l,i) - 1] = i;\n for(int i = 0,size = result.length;i < size;i++) System.out.println(result[i]);\n }\n\n static int amida(int[] f,int[] l,int index){\n for(int i = 0,size = f.length;i < size;i++){\n if(f[i] == index) index = l[i];\n else if(l[i] == index) index = f[i];\n }\n return index;\n }\n\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int h = sc.nextInt();\n sc.nextLine();\n int w = sc.nextInt();\n sc.nextLine();\n int[] f = new int[w];\n int[] l = new int[w];\n for(int i = 0;i < w;i++){\n String[] s = sc.nextLine().split(\",\");\n f[i] = Integer.parseInt(s[0]);\n l[i] = Integer.parseInt(s[1]);\n }\n int[] result = new int[h];\n for(int i = 1;i <= h;i++) result[amida(f,l,i) - 1] = i;\n for(int i = 0,size = result.length;i < size;i++) System.out.println(result[i]);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int h = sc.nextInt();\n sc.nextLine();\n int w = sc.nextInt();\n sc.nextLine();\n int[] f = new int[w];\n int[] l = new int[w];\n for(int i = 0;i < w;i++){\n String[] s = sc.nextLine().split(\",\");\n f[i] = Integer.parseInt(s[0]);\n l[i] = Integer.parseInt(s[1]);\n }\n int[] result = new int[h];\n for(int i = 1;i <= h;i++) result[amida(f,l,i) - 1] = i;\n for(int i = 0,size = result.length;i < size;i++) System.out.println(result[i]);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int h = sc.nextInt();", "h", "sc.nextInt()", "sc.nextInt", "sc", "sc.nextLine()", "sc.nextLine", "sc", "int w = sc.nextInt();", "w", "sc.nextInt()", "sc.nextInt", "sc", "sc.nextLine()", "sc.nextLine", "sc", "int[] f = new int[w];", "f", "new int[w]", "w", "int[] l = new int[w];", "l", "new int[w]", "w", "for(int i = 0;i < w;i++){\n String[] s = sc.nextLine().split(\",\");\n f[i] = Integer.parseInt(s[0]);\n l[i] = Integer.parseInt(s[1]);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < w", "i", "w", "i++", "i++", "i", "{\n String[] s = sc.nextLine().split(\",\");\n f[i] = Integer.parseInt(s[0]);\n l[i] = Integer.parseInt(s[1]);\n }", "{\n String[] s = sc.nextLine().split(\",\");\n f[i] = Integer.parseInt(s[0]);\n l[i] = Integer.parseInt(s[1]);\n }", "String[] s = sc.nextLine().split(\",\");", "s", "sc.nextLine().split(\",\")", "sc.nextLine().split", "sc.nextLine()", "sc.nextLine", "sc", "\",\"", "f[i] = Integer.parseInt(s[0])", "f[i]", "f", "i", "Integer.parseInt(s[0])", "Integer.parseInt", "Integer", "s[0]", "s", "0", "l[i] = Integer.parseInt(s[1])", "l[i]", "l", "i", "Integer.parseInt(s[1])", "Integer.parseInt", "Integer", "s[1]", "s", "1", "int[] result = new int[h];", "result", "new int[h]", "h", "for(int i = 1;i <= h;i++) result[amida(f,l,i) - 1] = i;", "int i = 1;", "int i = 1;", "i", "1", "i <= h", "i", "h", "i++", "i++", "i", "result[amida(f,l,i) - 1] = i;", "result[amida(f,l,i) - 1] = i", "result[amida(f,l,i) - 1]", "result", "amida(f,l,i) - 1", "amida(f,l,i)", "amida", "f", "l", "i", "1", "i", "for(int i = 0,size = result.length;i < size;i++) System.out.println(result[i]);", "int i = 0,size = result.length;", "int i = 0", "i", "0", "size = result.length;", "size", "result.length", "result", "result.length", "i < size", "i", "size", "i++", "i++", "i", "System.out.println(result[i]);", "System.out.println(result[i])", "System.out.println", "System.out", "System", "System.out", "result[i]", "result", "i", "String[] args", "args", "static int amida(int[] f,int[] l,int index){\n for(int i = 0,size = f.length;i < size;i++){\n if(f[i] == index) index = l[i];\n else if(l[i] == index) index = f[i];\n }\n return index;\n }", "amida", "{\n for(int i = 0,size = f.length;i < size;i++){\n if(f[i] == index) index = l[i];\n else if(l[i] == index) index = f[i];\n }\n return index;\n }", "for(int i = 0,size = f.length;i < size;i++){\n if(f[i] == index) index = l[i];\n else if(l[i] == index) index = f[i];\n }", "int i = 0,size = f.length;", "int i = 0", "i", "0", "size = f.length;", "size", "f.length", "f", "f.length", "i < size", "i", "size", "i++", "i++", "i", "{\n if(f[i] == index) index = l[i];\n else if(l[i] == index) index = f[i];\n }", "{\n if(f[i] == index) index = l[i];\n else if(l[i] == index) index = f[i];\n }", "if(f[i] == index) index = l[i];\n else if(l[i] == index) index = f[i];", "f[i] == index", "f[i]", "f", "i", "index", "index = l[i]", "index", "l[i]", "l", "i", "if(l[i] == index) index = f[i];", "l[i] == index", "l[i]", "l", "i", "index", "index = f[i]", "index", "f[i]", "f", "i", "return index;", "index", "int[] f", "f", "int[] l", "l", "int index", "index", "public class Main {\n\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int h = sc.nextInt();\n sc.nextLine();\n int w = sc.nextInt();\n sc.nextLine();\n int[] f = new int[w];\n int[] l = new int[w];\n for(int i = 0;i < w;i++){\n String[] s = sc.nextLine().split(\",\");\n f[i] = Integer.parseInt(s[0]);\n l[i] = Integer.parseInt(s[1]);\n }\n int[] result = new int[h];\n for(int i = 1;i <= h;i++) result[amida(f,l,i) - 1] = i;\n for(int i = 0,size = result.length;i < size;i++) System.out.println(result[i]);\n }\n\n static int amida(int[] f,int[] l,int index){\n for(int i = 0,size = f.length;i < size;i++){\n if(f[i] == index) index = l[i];\n else if(l[i] == index) index = f[i];\n }\n return index;\n }\n\n}", "public class Main {\n\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int h = sc.nextInt();\n sc.nextLine();\n int w = sc.nextInt();\n sc.nextLine();\n int[] f = new int[w];\n int[] l = new int[w];\n for(int i = 0;i < w;i++){\n String[] s = sc.nextLine().split(\",\");\n f[i] = Integer.parseInt(s[0]);\n l[i] = Integer.parseInt(s[1]);\n }\n int[] result = new int[h];\n for(int i = 1;i <= h;i++) result[amida(f,l,i) - 1] = i;\n for(int i = 0,size = result.length;i < size;i++) System.out.println(result[i]);\n }\n\n static int amida(int[] f,int[] l,int index){\n for(int i = 0,size = f.length;i < size;i++){\n if(f[i] == index) index = l[i];\n else if(l[i] == index) index = f[i];\n }\n return index;\n }\n\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int h = sc.nextInt(); sc.nextLine(); int w = sc.nextInt(); sc.nextLine(); int[] f = new int[w]; int[] l = new int[w]; for(int i = 0;i < w;i++){ String[] s = sc.nextLine().split(","); f[i] = Integer.parseInt(s[0]); l[i] = Integer.parseInt(s[1]); } int[] result = new int[h]; for(int i = 1;i <= h;i++) result[amida(f,l,i) - 1] = i; for(int i = 0,size = result.length;i < size;i++) System.out.println(result[i]); } static int amida(int[] f,int[] l,int index){ for(int i = 0,size = f.length;i < size;i++){ if(f[i] == index) index = l[i]; else if(l[i] == index) index = f[i]; } return index; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 18, 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, 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, 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 ], [ 129, 5 ], [ 129, 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 ], [ 23, 25 ], [ 25, 26 ], [ 26, 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 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 42, 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 ], [ 59, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 68, 69 ], [ 67, 70 ], [ 59, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 74, 75 ], [ 73, 76 ], [ 76, 77 ], [ 76, 78 ], [ 59, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 81, 84 ], [ 84, 85 ], [ 84, 86 ], [ 59, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 89, 91 ], [ 59, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 92, 96 ], [ 96, 97 ], [ 96, 98 ], [ 59, 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 ], [ 111, 112 ], [ 111, 113 ], [ 104, 114 ], [ 114, 115 ], [ 115, 116 ], [ 104, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 120, 122 ], [ 118, 123 ], [ 123, 124 ], [ 123, 125 ], [ 6, 126 ], [ 126, 127 ], [ 0, 128 ], [ 128, 129 ], [ 128, 130 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w = sc.nextInt();\n\t\tint[] sticks = new int[w + 1];\n\t\tint n = sc.nextInt();\n\n\t\tfor (int i = 1; i < sticks.length; i++)\n\t\t\tsticks[i] = i;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString str = sc.next();\n\t\t\tString[] swaps = str.split(\",\");\n\t\t\tint a = Integer.parseInt(swaps[0]);\n\t\t\tint b = Integer.parseInt(swaps[1]);\n\t\t\tint temp = sticks[b];\n\t\t\tsticks[b] = sticks[a];\n\t\t\tsticks[a] = temp;\n\t\t}\n\t\tfor (int i = 1; i < sticks.length; i++)\n\t\t\tSystem.out.println(sticks[i]);\n\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w = sc.nextInt();\n\t\tint[] sticks = new int[w + 1];\n\t\tint n = sc.nextInt();\n\n\t\tfor (int i = 1; i < sticks.length; i++)\n\t\t\tsticks[i] = i;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString str = sc.next();\n\t\t\tString[] swaps = str.split(\",\");\n\t\t\tint a = Integer.parseInt(swaps[0]);\n\t\t\tint b = Integer.parseInt(swaps[1]);\n\t\t\tint temp = sticks[b];\n\t\t\tsticks[b] = sticks[a];\n\t\t\tsticks[a] = temp;\n\t\t}\n\t\tfor (int i = 1; i < sticks.length; i++)\n\t\t\tSystem.out.println(sticks[i]);\n\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w = sc.nextInt();\n\t\tint[] sticks = new int[w + 1];\n\t\tint n = sc.nextInt();\n\n\t\tfor (int i = 1; i < sticks.length; i++)\n\t\t\tsticks[i] = i;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString str = sc.next();\n\t\t\tString[] swaps = str.split(\",\");\n\t\t\tint a = Integer.parseInt(swaps[0]);\n\t\t\tint b = Integer.parseInt(swaps[1]);\n\t\t\tint temp = sticks[b];\n\t\t\tsticks[b] = sticks[a];\n\t\t\tsticks[a] = temp;\n\t\t}\n\t\tfor (int i = 1; i < sticks.length; i++)\n\t\t\tSystem.out.println(sticks[i]);\n\n\t}", "main", "{\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w = sc.nextInt();\n\t\tint[] sticks = new int[w + 1];\n\t\tint n = sc.nextInt();\n\n\t\tfor (int i = 1; i < sticks.length; i++)\n\t\t\tsticks[i] = i;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString str = sc.next();\n\t\t\tString[] swaps = str.split(\",\");\n\t\t\tint a = Integer.parseInt(swaps[0]);\n\t\t\tint b = Integer.parseInt(swaps[1]);\n\t\t\tint temp = sticks[b];\n\t\t\tsticks[b] = sticks[a];\n\t\t\tsticks[a] = temp;\n\t\t}\n\t\tfor (int i = 1; i < sticks.length; i++)\n\t\t\tSystem.out.println(sticks[i]);\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[] sticks = new int[w + 1];", "sticks", "new int[w + 1]", "w + 1", "w", "1", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "for (int i = 1; i < sticks.length; i++)\n\t\t\tsticks[i] = i;", "int i = 1;", "int i = 1;", "i", "1", "i < sticks.length", "i", "sticks.length", "sticks", "sticks.length", "i++", "i++", "i", "sticks[i] = i;", "sticks[i] = i", "sticks[i]", "sticks", "i", "i", "for (int i = 0; i < n; i++) {\n\t\t\tString str = sc.next();\n\t\t\tString[] swaps = str.split(\",\");\n\t\t\tint a = Integer.parseInt(swaps[0]);\n\t\t\tint b = Integer.parseInt(swaps[1]);\n\t\t\tint temp = sticks[b];\n\t\t\tsticks[b] = sticks[a];\n\t\t\tsticks[a] = temp;\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[] swaps = str.split(\",\");\n\t\t\tint a = Integer.parseInt(swaps[0]);\n\t\t\tint b = Integer.parseInt(swaps[1]);\n\t\t\tint temp = sticks[b];\n\t\t\tsticks[b] = sticks[a];\n\t\t\tsticks[a] = temp;\n\t\t}", "{\n\t\t\tString str = sc.next();\n\t\t\tString[] swaps = str.split(\",\");\n\t\t\tint a = Integer.parseInt(swaps[0]);\n\t\t\tint b = Integer.parseInt(swaps[1]);\n\t\t\tint temp = sticks[b];\n\t\t\tsticks[b] = sticks[a];\n\t\t\tsticks[a] = temp;\n\t\t}", "String str = sc.next();", "str", "sc.next()", "sc.next", "sc", "String[] swaps = str.split(\",\");", "swaps", "str.split(\",\")", "str.split", "str", "\",\"", "int a = Integer.parseInt(swaps[0]);", "a", "Integer.parseInt(swaps[0])", "Integer.parseInt", "Integer", "swaps[0]", "swaps", "0", "int b = Integer.parseInt(swaps[1]);", "b", "Integer.parseInt(swaps[1])", "Integer.parseInt", "Integer", "swaps[1]", "swaps", "1", "int temp = sticks[b];", "temp", "sticks[b]", "sticks", "b", "sticks[b] = sticks[a]", "sticks[b]", "sticks", "b", "sticks[a]", "sticks", "a", "sticks[a] = temp", "sticks[a]", "sticks", "a", "temp", "for (int i = 1; i < sticks.length; i++)\n\t\t\tSystem.out.println(sticks[i]);", "int i = 1;", "int i = 1;", "i", "1", "i < sticks.length", "i", "sticks.length", "sticks", "sticks.length", "i++", "i++", "i", "System.out.println(sticks[i]);", "System.out.println(sticks[i])", "System.out.println", "System.out", "System", "System.out", "sticks[i]", "sticks", "i", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w = sc.nextInt();\n\t\tint[] sticks = new int[w + 1];\n\t\tint n = sc.nextInt();\n\n\t\tfor (int i = 1; i < sticks.length; i++)\n\t\t\tsticks[i] = i;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString str = sc.next();\n\t\t\tString[] swaps = str.split(\",\");\n\t\t\tint a = Integer.parseInt(swaps[0]);\n\t\t\tint b = Integer.parseInt(swaps[1]);\n\t\t\tint temp = sticks[b];\n\t\t\tsticks[b] = sticks[a];\n\t\t\tsticks[a] = temp;\n\t\t}\n\t\tfor (int i = 1; i < sticks.length; i++)\n\t\t\tSystem.out.println(sticks[i]);\n\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w = sc.nextInt();\n\t\tint[] sticks = new int[w + 1];\n\t\tint n = sc.nextInt();\n\n\t\tfor (int i = 1; i < sticks.length; i++)\n\t\t\tsticks[i] = i;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString str = sc.next();\n\t\t\tString[] swaps = str.split(\",\");\n\t\t\tint a = Integer.parseInt(swaps[0]);\n\t\t\tint b = Integer.parseInt(swaps[1]);\n\t\t\tint temp = sticks[b];\n\t\t\tsticks[b] = sticks[a];\n\t\t\tsticks[a] = temp;\n\t\t}\n\t\tfor (int i = 1; i < sticks.length; i++)\n\t\t\tSystem.out.println(sticks[i]);\n\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[] sticks = new int[w + 1]; int n = sc.nextInt(); for (int i = 1; i < sticks.length; i++) sticks[i] = i; for (int i = 0; i < n; i++) { String str = sc.next(); String[] swaps = str.split(","); int a = Integer.parseInt(swaps[0]); int b = Integer.parseInt(swaps[1]); int temp = sticks[b]; sticks[b] = sticks[a]; sticks[a] = temp; } for (int i = 1; i < sticks.length; i++) System.out.println(sticks[i]); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 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, 0, 18, 13, 2, 13, 17, 13, 41, 13, 4, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 18, 13, 2, 13, 17, 0, 18, 13, 2, 13, 17, 18, 13, 2, 13, 17, 0, 18, 13, 2, 13, 17, 13, 28, 13, 13, 30, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 139, 14 ], [ 139, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 17, 21 ], [ 21, 22 ], [ 17, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 25, 28 ], [ 28, 29 ], [ 29, 30 ], [ 17, 31 ], [ 31, 32 ], [ 31, 33 ], [ 17, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 35, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 42, 44 ], [ 35, 45 ], [ 45, 46 ], [ 46, 47 ], [ 35, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 52, 54 ], [ 49, 55 ], [ 17, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 59, 60 ], [ 58, 61 ], [ 61, 62 ], [ 62, 63 ], [ 17, 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 ], [ 17, 126 ], [ 126, 127 ], [ 126, 128 ], [ 126, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 130, 135 ], [ 15, 136 ], [ 136, 137 ], [ 0, 138 ], [ 138, 139 ], [ 138, 140 ] ]
[ "\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Arrays;\n\npublic class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String readStr;\n \n int numOfVertialLine = Integer.parseInt(reader.readLine());\n int[] verticalLines = new int[numOfVertialLine];\n for (int i = 1; i <= verticalLines.length; i++)\n verticalLines[i-1] = i;\n \n int numOfChange = Integer.parseInt(reader.readLine());\n for (int i = 0; i < numOfChange; i++) {\n String[] changeStr = reader.readLine().split(\",\");\n int from = Integer.parseInt(changeStr[0]);\n int to = Integer.parseInt(changeStr[1]);\n int from_stack = verticalLines[from-1];\n verticalLines[from-1] = verticalLines[to-1];\n verticalLines[to-1] = from_stack;\n }\n \n for (int n : verticalLines)\n System.out.println(n);\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.Arrays;", "Arrays", "java.util", "public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String readStr;\n \n int numOfVertialLine = Integer.parseInt(reader.readLine());\n int[] verticalLines = new int[numOfVertialLine];\n for (int i = 1; i <= verticalLines.length; i++)\n verticalLines[i-1] = i;\n \n int numOfChange = Integer.parseInt(reader.readLine());\n for (int i = 0; i < numOfChange; i++) {\n String[] changeStr = reader.readLine().split(\",\");\n int from = Integer.parseInt(changeStr[0]);\n int to = Integer.parseInt(changeStr[1]);\n int from_stack = verticalLines[from-1];\n verticalLines[from-1] = verticalLines[to-1];\n verticalLines[to-1] = from_stack;\n }\n \n for (int n : verticalLines)\n System.out.println(n);\n \n }\n\n}", "Main", "public static void main(String[] args) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String readStr;\n \n int numOfVertialLine = Integer.parseInt(reader.readLine());\n int[] verticalLines = new int[numOfVertialLine];\n for (int i = 1; i <= verticalLines.length; i++)\n verticalLines[i-1] = i;\n \n int numOfChange = Integer.parseInt(reader.readLine());\n for (int i = 0; i < numOfChange; i++) {\n String[] changeStr = reader.readLine().split(\",\");\n int from = Integer.parseInt(changeStr[0]);\n int to = Integer.parseInt(changeStr[1]);\n int from_stack = verticalLines[from-1];\n verticalLines[from-1] = verticalLines[to-1];\n verticalLines[to-1] = from_stack;\n }\n \n for (int n : verticalLines)\n System.out.println(n);\n \n }", "main", "{\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String readStr;\n \n int numOfVertialLine = Integer.parseInt(reader.readLine());\n int[] verticalLines = new int[numOfVertialLine];\n for (int i = 1; i <= verticalLines.length; i++)\n verticalLines[i-1] = i;\n \n int numOfChange = Integer.parseInt(reader.readLine());\n for (int i = 0; i < numOfChange; i++) {\n String[] changeStr = reader.readLine().split(\",\");\n int from = Integer.parseInt(changeStr[0]);\n int to = Integer.parseInt(changeStr[1]);\n int from_stack = verticalLines[from-1];\n verticalLines[from-1] = verticalLines[to-1];\n verticalLines[to-1] = from_stack;\n }\n \n for (int n : verticalLines)\n System.out.println(n);\n \n }", "BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));", "reader", "new BufferedReader(new InputStreamReader(System.in))", "String readStr;", "readStr", "int numOfVertialLine = Integer.parseInt(reader.readLine());", "numOfVertialLine", "Integer.parseInt(reader.readLine())", "Integer.parseInt", "Integer", "reader.readLine()", "reader.readLine", "reader", "int[] verticalLines = new int[numOfVertialLine];", "verticalLines", "new int[numOfVertialLine]", "numOfVertialLine", "for (int i = 1; i <= verticalLines.length; i++)\n verticalLines[i-1] = i;", "int i = 1;", "int i = 1;", "i", "1", "i <= verticalLines.length", "i", "verticalLines.length", "verticalLines", "verticalLines.length", "i++", "i++", "i", "verticalLines[i-1] = i;", "verticalLines[i-1] = i", "verticalLines[i-1]", "verticalLines", "i-1", "i", "1", "i", "int numOfChange = Integer.parseInt(reader.readLine());", "numOfChange", "Integer.parseInt(reader.readLine())", "Integer.parseInt", "Integer", "reader.readLine()", "reader.readLine", "reader", "for (int i = 0; i < numOfChange; i++) {\n String[] changeStr = reader.readLine().split(\",\");\n int from = Integer.parseInt(changeStr[0]);\n int to = Integer.parseInt(changeStr[1]);\n int from_stack = verticalLines[from-1];\n verticalLines[from-1] = verticalLines[to-1];\n verticalLines[to-1] = from_stack;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < numOfChange", "i", "numOfChange", "i++", "i++", "i", "{\n String[] changeStr = reader.readLine().split(\",\");\n int from = Integer.parseInt(changeStr[0]);\n int to = Integer.parseInt(changeStr[1]);\n int from_stack = verticalLines[from-1];\n verticalLines[from-1] = verticalLines[to-1];\n verticalLines[to-1] = from_stack;\n }", "{\n String[] changeStr = reader.readLine().split(\",\");\n int from = Integer.parseInt(changeStr[0]);\n int to = Integer.parseInt(changeStr[1]);\n int from_stack = verticalLines[from-1];\n verticalLines[from-1] = verticalLines[to-1];\n verticalLines[to-1] = from_stack;\n }", "String[] changeStr = reader.readLine().split(\",\");", "changeStr", "reader.readLine().split(\",\")", "reader.readLine().split", "reader.readLine()", "reader.readLine", "reader", "\",\"", "int from = Integer.parseInt(changeStr[0]);", "from", "Integer.parseInt(changeStr[0])", "Integer.parseInt", "Integer", "changeStr[0]", "changeStr", "0", "int to = Integer.parseInt(changeStr[1]);", "to", "Integer.parseInt(changeStr[1])", "Integer.parseInt", "Integer", "changeStr[1]", "changeStr", "1", "int from_stack = verticalLines[from-1];", "from_stack", "verticalLines[from-1]", "verticalLines", "from-1", "from", "1", "verticalLines[from-1] = verticalLines[to-1]", "verticalLines[from-1]", "verticalLines", "from-1", "from", "1", "verticalLines[to-1]", "verticalLines", "to-1", "to", "1", "verticalLines[to-1] = from_stack", "verticalLines[to-1]", "verticalLines", "to-1", "to", "1", "from_stack", "for (int n : verticalLines)\n System.out.println(n);", "int n", "verticalLines", "System.out.println(n);", "System.out.println(n)", "System.out.println", "System.out", "System", "System.out", "n", "String[] args", "args", "public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String readStr;\n \n int numOfVertialLine = Integer.parseInt(reader.readLine());\n int[] verticalLines = new int[numOfVertialLine];\n for (int i = 1; i <= verticalLines.length; i++)\n verticalLines[i-1] = i;\n \n int numOfChange = Integer.parseInt(reader.readLine());\n for (int i = 0; i < numOfChange; i++) {\n String[] changeStr = reader.readLine().split(\",\");\n int from = Integer.parseInt(changeStr[0]);\n int to = Integer.parseInt(changeStr[1]);\n int from_stack = verticalLines[from-1];\n verticalLines[from-1] = verticalLines[to-1];\n verticalLines[to-1] = from_stack;\n }\n \n for (int n : verticalLines)\n System.out.println(n);\n \n }\n\n}", "public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String readStr;\n \n int numOfVertialLine = Integer.parseInt(reader.readLine());\n int[] verticalLines = new int[numOfVertialLine];\n for (int i = 1; i <= verticalLines.length; i++)\n verticalLines[i-1] = i;\n \n int numOfChange = Integer.parseInt(reader.readLine());\n for (int i = 0; i < numOfChange; i++) {\n String[] changeStr = reader.readLine().split(\",\");\n int from = Integer.parseInt(changeStr[0]);\n int to = Integer.parseInt(changeStr[1]);\n int from_stack = verticalLines[from-1];\n verticalLines[from-1] = verticalLines[to-1];\n verticalLines[to-1] = from_stack;\n }\n \n for (int n : verticalLines)\n System.out.println(n);\n \n }\n\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String readStr; int numOfVertialLine = Integer.parseInt(reader.readLine()); int[] verticalLines = new int[numOfVertialLine]; for (int i = 1; i <= verticalLines.length; i++) verticalLines[i-1] = i; int numOfChange = Integer.parseInt(reader.readLine()); for (int i = 0; i < numOfChange; i++) { String[] changeStr = reader.readLine().split(","); int from = Integer.parseInt(changeStr[0]); int to = Integer.parseInt(changeStr[1]); int from_stack = verticalLines[from-1]; verticalLines[from-1] = verticalLines[to-1]; verticalLines[to-1] = from_stack; } for (int n : verticalLines) System.out.println(n); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 41, 13, 17, 41, 13, 41, 13, 41, 13, 20, 41, 13, 38, 5, 13, 30, 4, 18, 18, 13, 13, 17, 30, 38, 5, 13, 30, 30, 4, 18, 13, 30, 14, 2, 17, 0, 13, 4, 18, 13, 30, 0, 13, 4, 18, 13, 13, 14, 2, 17, 0, 13, 4, 18, 13, 30, 0, 13, 4, 18, 13, 13, 0, 13, 20, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 17, 0, 13, 4, 18, 13, 30, 41, 13, 4, 18, 13, 17, 0, 18, 18, 13, 13, 17, 4, 18, 13, 18, 13, 17, 0, 18, 18, 13, 13, 17, 4, 18, 13, 18, 13, 17, 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, 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, 2, 13, 17, 3, 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 ], [ 261, 11 ], [ 261, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 14, 21 ], [ 21, 22 ], [ 14, 23 ], [ 23, 24 ], [ 14, 25 ], [ 25, 26 ], [ 25, 27 ], [ 14, 28 ], [ 28, 29 ], [ 14, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 34, 39 ], [ 30, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 41, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 30, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 56, 57 ], [ 50, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 62, 63 ], [ 61, 64 ], [ 49, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 65, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 76, 79 ], [ 49, 80 ], [ 80, 81 ], [ 80, 82 ], [ 49, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 85, 90 ], [ 90, 91 ], [ 90, 92 ], [ 85, 93 ], [ 93, 94 ], [ 94, 95 ], [ 85, 96 ], [ 97, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 101, 103 ], [ 103, 104 ], [ 104, 105 ], [ 98, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 110, 111 ], [ 109, 112 ], [ 106, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 114, 118 ], [ 113, 119 ], [ 119, 120 ], [ 120, 121 ], [ 119, 122 ], [ 122, 123 ], [ 122, 124 ], [ 106, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 126, 130 ], [ 125, 131 ], [ 131, 132 ], [ 132, 133 ], [ 131, 134 ], [ 134, 135 ], [ 134, 136 ], [ 49, 137 ], [ 137, 138 ], [ 137, 139 ], [ 49, 141 ], [ 141, 142 ], [ 142, 143 ], [ 143, 144 ], [ 143, 145 ], [ 141, 146 ], [ 146, 147 ], [ 146, 148 ], [ 141, 149 ], [ 149, 150 ], [ 150, 151 ], [ 141, 152 ], [ 153, 153 ], [ 153, 154 ], [ 154, 155 ], [ 155, 156 ], [ 155, 157 ], [ 154, 158 ], [ 158, 159 ], [ 158, 160 ], [ 153, 161 ], [ 161, 162 ], [ 162, 163 ], [ 163, 164 ], [ 163, 165 ], [ 161, 166 ], [ 166, 167 ], [ 166, 168 ], [ 161, 169 ], [ 169, 170 ], [ 170, 171 ], [ 161, 172 ], [ 173, 173 ], [ 173, 174 ], [ 174, 175 ], [ 175, 176 ], [ 176, 177 ], [ 177, 178 ], [ 177, 179 ], [ 176, 180 ], [ 175, 181 ], [ 181, 182 ], [ 181, 183 ], [ 174, 184 ], [ 184, 185 ], [ 185, 186 ], [ 186, 187 ], [ 186, 188 ], [ 185, 189 ], [ 189, 190 ], [ 190, 191 ], [ 190, 192 ], [ 189, 193 ], [ 174, 194 ], [ 194, 195 ], [ 195, 196 ], [ 196, 197 ], [ 197, 198 ], [ 197, 199 ], [ 196, 200 ], [ 195, 201 ], [ 201, 202 ], [ 201, 203 ], [ 194, 204 ], [ 204, 205 ], [ 205, 206 ], [ 206, 207 ], [ 206, 208 ], [ 205, 209 ], [ 209, 210 ], [ 210, 211 ], [ 210, 212 ], [ 209, 213 ], [ 49, 214 ], [ 214, 215 ], [ 215, 216 ], [ 216, 217 ], [ 216, 218 ], [ 214, 219 ], [ 219, 220 ], [ 219, 221 ], [ 214, 222 ], [ 222, 223 ], [ 223, 224 ], [ 214, 225 ], [ 226, 226 ], [ 226, 227 ], [ 227, 228 ], [ 228, 229 ], [ 229, 230 ], [ 229, 231 ], [ 227, 232 ], [ 232, 233 ], [ 232, 234 ], [ 227, 235 ], [ 235, 236 ], [ 236, 237 ], [ 227, 238 ], [ 239, 239 ], [ 239, 240 ], [ 240, 241 ], [ 241, 242 ], [ 242, 243 ], [ 242, 244 ], [ 241, 245 ], [ 245, 246 ], [ 245, 247 ], [ 240, 248 ], [ 248, 249 ], [ 249, 250 ], [ 250, 251 ], [ 251, 252 ], [ 251, 253 ], [ 249, 254 ], [ 254, 255 ], [ 254, 256 ], [ 248, 257 ], [ 12, 258 ], [ 258, 259 ], [ 0, 260 ], [ 260, 261 ], [ 260, 262 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\n\npublic class Main {\n\n\tpublic static void main(String[] a){\n\n\t\tint NumberOfColumn = 0;\n\t\tint NumberOfBar = 0;\n\t\tint[][] arr;\n\t\tint[] ans;\n\t\tBufferedReader bf = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString tmpString;\n\t\ttry {\n\t\t\tif(null != (tmpString = bf.readLine())){\n\t\t\t\tNumberOfColumn = Integer.parseInt(tmpString);\n\t\t\t}\n\t\t\tif(null != (tmpString = bf.readLine())){\n\t\t\t\tNumberOfBar = Integer.parseInt(tmpString);\n\t\t\t}\n\t\t\tarr = new int[NumberOfBar][2];\n\t\t\tfor(int i = 0; i < NumberOfBar; i++){\n\t\t\t\tif(null != (tmpString = bf.readLine())){\n\t\t\t\t\tString[] tmp = tmpString.split(\",\");\n\t\t\t\t\tarr[i][0] = Integer.parseInt(tmp[0]);\n\t\t\t\t\tarr[i][1] = Integer.parseInt(tmp[1]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tans = new int[NumberOfColumn];\n\t\t\tfor(int i = 0; i < NumberOfColumn; i++){\n\t\t\t\tans[i] = i + 1;\n\t\t\t\tfor(int j = 0; j < NumberOfBar; j++){\n\t\t\t\t\tif(arr[j][0] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][1];\n\t\t\t\t\t} else if(arr[j][1] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < NumberOfColumn; i++){\n\t\t\t\tfor(int j = 0; j < NumberOfColumn; j++ ){\n\t\t\t\t\tif(ans[j] == i + 1){\n\t\t\t\t\t\tSystem.out.println(j + 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"error\");\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tbf.close();\n\t\t\t} catch (IOException e) {\n\t\t\t}\n\t\t}\n\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[] a){\n\n\t\tint NumberOfColumn = 0;\n\t\tint NumberOfBar = 0;\n\t\tint[][] arr;\n\t\tint[] ans;\n\t\tBufferedReader bf = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString tmpString;\n\t\ttry {\n\t\t\tif(null != (tmpString = bf.readLine())){\n\t\t\t\tNumberOfColumn = Integer.parseInt(tmpString);\n\t\t\t}\n\t\t\tif(null != (tmpString = bf.readLine())){\n\t\t\t\tNumberOfBar = Integer.parseInt(tmpString);\n\t\t\t}\n\t\t\tarr = new int[NumberOfBar][2];\n\t\t\tfor(int i = 0; i < NumberOfBar; i++){\n\t\t\t\tif(null != (tmpString = bf.readLine())){\n\t\t\t\t\tString[] tmp = tmpString.split(\",\");\n\t\t\t\t\tarr[i][0] = Integer.parseInt(tmp[0]);\n\t\t\t\t\tarr[i][1] = Integer.parseInt(tmp[1]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tans = new int[NumberOfColumn];\n\t\t\tfor(int i = 0; i < NumberOfColumn; i++){\n\t\t\t\tans[i] = i + 1;\n\t\t\t\tfor(int j = 0; j < NumberOfBar; j++){\n\t\t\t\t\tif(arr[j][0] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][1];\n\t\t\t\t\t} else if(arr[j][1] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < NumberOfColumn; i++){\n\t\t\t\tfor(int j = 0; j < NumberOfColumn; j++ ){\n\t\t\t\t\tif(ans[j] == i + 1){\n\t\t\t\t\t\tSystem.out.println(j + 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"error\");\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tbf.close();\n\t\t\t} catch (IOException e) {\n\t\t\t}\n\t\t}\n\n\t}\n\n}", "Main", "public static void main(String[] a){\n\n\t\tint NumberOfColumn = 0;\n\t\tint NumberOfBar = 0;\n\t\tint[][] arr;\n\t\tint[] ans;\n\t\tBufferedReader bf = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString tmpString;\n\t\ttry {\n\t\t\tif(null != (tmpString = bf.readLine())){\n\t\t\t\tNumberOfColumn = Integer.parseInt(tmpString);\n\t\t\t}\n\t\t\tif(null != (tmpString = bf.readLine())){\n\t\t\t\tNumberOfBar = Integer.parseInt(tmpString);\n\t\t\t}\n\t\t\tarr = new int[NumberOfBar][2];\n\t\t\tfor(int i = 0; i < NumberOfBar; i++){\n\t\t\t\tif(null != (tmpString = bf.readLine())){\n\t\t\t\t\tString[] tmp = tmpString.split(\",\");\n\t\t\t\t\tarr[i][0] = Integer.parseInt(tmp[0]);\n\t\t\t\t\tarr[i][1] = Integer.parseInt(tmp[1]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tans = new int[NumberOfColumn];\n\t\t\tfor(int i = 0; i < NumberOfColumn; i++){\n\t\t\t\tans[i] = i + 1;\n\t\t\t\tfor(int j = 0; j < NumberOfBar; j++){\n\t\t\t\t\tif(arr[j][0] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][1];\n\t\t\t\t\t} else if(arr[j][1] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < NumberOfColumn; i++){\n\t\t\t\tfor(int j = 0; j < NumberOfColumn; j++ ){\n\t\t\t\t\tif(ans[j] == i + 1){\n\t\t\t\t\t\tSystem.out.println(j + 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"error\");\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tbf.close();\n\t\t\t} catch (IOException e) {\n\t\t\t}\n\t\t}\n\n\t}", "main", "{\n\n\t\tint NumberOfColumn = 0;\n\t\tint NumberOfBar = 0;\n\t\tint[][] arr;\n\t\tint[] ans;\n\t\tBufferedReader bf = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString tmpString;\n\t\ttry {\n\t\t\tif(null != (tmpString = bf.readLine())){\n\t\t\t\tNumberOfColumn = Integer.parseInt(tmpString);\n\t\t\t}\n\t\t\tif(null != (tmpString = bf.readLine())){\n\t\t\t\tNumberOfBar = Integer.parseInt(tmpString);\n\t\t\t}\n\t\t\tarr = new int[NumberOfBar][2];\n\t\t\tfor(int i = 0; i < NumberOfBar; i++){\n\t\t\t\tif(null != (tmpString = bf.readLine())){\n\t\t\t\t\tString[] tmp = tmpString.split(\",\");\n\t\t\t\t\tarr[i][0] = Integer.parseInt(tmp[0]);\n\t\t\t\t\tarr[i][1] = Integer.parseInt(tmp[1]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tans = new int[NumberOfColumn];\n\t\t\tfor(int i = 0; i < NumberOfColumn; i++){\n\t\t\t\tans[i] = i + 1;\n\t\t\t\tfor(int j = 0; j < NumberOfBar; j++){\n\t\t\t\t\tif(arr[j][0] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][1];\n\t\t\t\t\t} else if(arr[j][1] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < NumberOfColumn; i++){\n\t\t\t\tfor(int j = 0; j < NumberOfColumn; j++ ){\n\t\t\t\t\tif(ans[j] == i + 1){\n\t\t\t\t\t\tSystem.out.println(j + 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"error\");\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tbf.close();\n\t\t\t} catch (IOException e) {\n\t\t\t}\n\t\t}\n\n\t}", "int NumberOfColumn = 0;", "NumberOfColumn", "0", "int NumberOfBar = 0;", "NumberOfBar", "0", "int[][] arr;", "arr", "int[] ans;", "ans", "BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));", "bf", "new BufferedReader(new InputStreamReader(System.in))", "String tmpString;", "tmpString", "try {\n\t\t\tif(null != (tmpString = bf.readLine())){\n\t\t\t\tNumberOfColumn = Integer.parseInt(tmpString);\n\t\t\t}\n\t\t\tif(null != (tmpString = bf.readLine())){\n\t\t\t\tNumberOfBar = Integer.parseInt(tmpString);\n\t\t\t}\n\t\t\tarr = new int[NumberOfBar][2];\n\t\t\tfor(int i = 0; i < NumberOfBar; i++){\n\t\t\t\tif(null != (tmpString = bf.readLine())){\n\t\t\t\t\tString[] tmp = tmpString.split(\",\");\n\t\t\t\t\tarr[i][0] = Integer.parseInt(tmp[0]);\n\t\t\t\t\tarr[i][1] = Integer.parseInt(tmp[1]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tans = new int[NumberOfColumn];\n\t\t\tfor(int i = 0; i < NumberOfColumn; i++){\n\t\t\t\tans[i] = i + 1;\n\t\t\t\tfor(int j = 0; j < NumberOfBar; j++){\n\t\t\t\t\tif(arr[j][0] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][1];\n\t\t\t\t\t} else if(arr[j][1] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < NumberOfColumn; i++){\n\t\t\t\tfor(int j = 0; j < NumberOfColumn; j++ ){\n\t\t\t\t\tif(ans[j] == i + 1){\n\t\t\t\t\t\tSystem.out.println(j + 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"error\");\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tbf.close();\n\t\t\t} catch (IOException e) {\n\t\t\t}\n\t\t}", "catch (Exception e) {\n\t\t\tSystem.err.println(\"error\");\n\t\t}", "Exception e", "{\n\t\t\tSystem.err.println(\"error\");\n\t\t}", "System.err.println(\"error\")", "System.err.println", "System.err", "System", "System.err", "\"error\"", "{\n\t\t\ttry {\n\t\t\t\tbf.close();\n\t\t\t} catch (IOException e) {\n\t\t\t}\n\t\t}", "try {\n\t\t\t\tbf.close();\n\t\t\t} catch (IOException e) {\n\t\t\t}", "catch (IOException e) {\n\t\t\t}", "IOException e", "{\n\t\t\t}", "{\n\t\t\t\tbf.close();\n\t\t\t}", "bf.close()", "bf.close", "bf", "{\n\t\t\tif(null != (tmpString = bf.readLine())){\n\t\t\t\tNumberOfColumn = Integer.parseInt(tmpString);\n\t\t\t}\n\t\t\tif(null != (tmpString = bf.readLine())){\n\t\t\t\tNumberOfBar = Integer.parseInt(tmpString);\n\t\t\t}\n\t\t\tarr = new int[NumberOfBar][2];\n\t\t\tfor(int i = 0; i < NumberOfBar; i++){\n\t\t\t\tif(null != (tmpString = bf.readLine())){\n\t\t\t\t\tString[] tmp = tmpString.split(\",\");\n\t\t\t\t\tarr[i][0] = Integer.parseInt(tmp[0]);\n\t\t\t\t\tarr[i][1] = Integer.parseInt(tmp[1]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tans = new int[NumberOfColumn];\n\t\t\tfor(int i = 0; i < NumberOfColumn; i++){\n\t\t\t\tans[i] = i + 1;\n\t\t\t\tfor(int j = 0; j < NumberOfBar; j++){\n\t\t\t\t\tif(arr[j][0] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][1];\n\t\t\t\t\t} else if(arr[j][1] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < NumberOfColumn; i++){\n\t\t\t\tfor(int j = 0; j < NumberOfColumn; j++ ){\n\t\t\t\t\tif(ans[j] == i + 1){\n\t\t\t\t\t\tSystem.out.println(j + 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}", "if(null != (tmpString = bf.readLine())){\n\t\t\t\tNumberOfColumn = Integer.parseInt(tmpString);\n\t\t\t}", "null != (tmpString = bf.readLine())", "null", "(tmpString = bf.readLine())", "tmpString", "bf.readLine()", "bf.readLine", "bf", "{\n\t\t\t\tNumberOfColumn = Integer.parseInt(tmpString);\n\t\t\t}", "NumberOfColumn = Integer.parseInt(tmpString)", "NumberOfColumn", "Integer.parseInt(tmpString)", "Integer.parseInt", "Integer", "tmpString", "if(null != (tmpString = bf.readLine())){\n\t\t\t\tNumberOfBar = Integer.parseInt(tmpString);\n\t\t\t}", "null != (tmpString = bf.readLine())", "null", "(tmpString = bf.readLine())", "tmpString", "bf.readLine()", "bf.readLine", "bf", "{\n\t\t\t\tNumberOfBar = Integer.parseInt(tmpString);\n\t\t\t}", "NumberOfBar = Integer.parseInt(tmpString)", "NumberOfBar", "Integer.parseInt(tmpString)", "Integer.parseInt", "Integer", "tmpString", "arr = new int[NumberOfBar][2]", "arr", "new int[NumberOfBar][2]", "NumberOfBar", "2", "for(int i = 0; i < NumberOfBar; i++){\n\t\t\t\tif(null != (tmpString = bf.readLine())){\n\t\t\t\t\tString[] tmp = tmpString.split(\",\");\n\t\t\t\t\tarr[i][0] = Integer.parseInt(tmp[0]);\n\t\t\t\t\tarr[i][1] = Integer.parseInt(tmp[1]);\n\t\t\t\t}\n\t\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < NumberOfBar", "i", "NumberOfBar", "i++", "i++", "i", "{\n\t\t\t\tif(null != (tmpString = bf.readLine())){\n\t\t\t\t\tString[] tmp = tmpString.split(\",\");\n\t\t\t\t\tarr[i][0] = Integer.parseInt(tmp[0]);\n\t\t\t\t\tarr[i][1] = Integer.parseInt(tmp[1]);\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tif(null != (tmpString = bf.readLine())){\n\t\t\t\t\tString[] tmp = tmpString.split(\",\");\n\t\t\t\t\tarr[i][0] = Integer.parseInt(tmp[0]);\n\t\t\t\t\tarr[i][1] = Integer.parseInt(tmp[1]);\n\t\t\t\t}\n\t\t\t}", "if(null != (tmpString = bf.readLine())){\n\t\t\t\t\tString[] tmp = tmpString.split(\",\");\n\t\t\t\t\tarr[i][0] = Integer.parseInt(tmp[0]);\n\t\t\t\t\tarr[i][1] = Integer.parseInt(tmp[1]);\n\t\t\t\t}", "null != (tmpString = bf.readLine())", "null", "(tmpString = bf.readLine())", "tmpString", "bf.readLine()", "bf.readLine", "bf", "{\n\t\t\t\t\tString[] tmp = tmpString.split(\",\");\n\t\t\t\t\tarr[i][0] = Integer.parseInt(tmp[0]);\n\t\t\t\t\tarr[i][1] = Integer.parseInt(tmp[1]);\n\t\t\t\t}", "String[] tmp = tmpString.split(\",\");", "tmp", "tmpString.split(\",\")", "tmpString.split", "tmpString", "\",\"", "arr[i][0] = Integer.parseInt(tmp[0])", "arr[i][0]", "arr[i]", "arr", "i", "0", "Integer.parseInt(tmp[0])", "Integer.parseInt", "Integer", "tmp[0]", "tmp", "0", "arr[i][1] = Integer.parseInt(tmp[1])", "arr[i][1]", "arr[i]", "arr", "i", "1", "Integer.parseInt(tmp[1])", "Integer.parseInt", "Integer", "tmp[1]", "tmp", "1", "ans = new int[NumberOfColumn]", "ans", "new int[NumberOfColumn]", "NumberOfColumn", "for(int i = 0; i < NumberOfColumn; i++){\n\t\t\t\tans[i] = i + 1;\n\t\t\t\tfor(int j = 0; j < NumberOfBar; j++){\n\t\t\t\t\tif(arr[j][0] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][1];\n\t\t\t\t\t} else if(arr[j][1] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < NumberOfColumn", "i", "NumberOfColumn", "i++", "i++", "i", "{\n\t\t\t\tans[i] = i + 1;\n\t\t\t\tfor(int j = 0; j < NumberOfBar; j++){\n\t\t\t\t\tif(arr[j][0] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][1];\n\t\t\t\t\t} else if(arr[j][1] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tans[i] = i + 1;\n\t\t\t\tfor(int j = 0; j < NumberOfBar; j++){\n\t\t\t\t\tif(arr[j][0] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][1];\n\t\t\t\t\t} else if(arr[j][1] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "ans[i] = i + 1", "ans[i]", "ans", "i", "i + 1", "i", "1", "for(int j = 0; j < NumberOfBar; j++){\n\t\t\t\t\tif(arr[j][0] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][1];\n\t\t\t\t\t} else if(arr[j][1] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][0];\n\t\t\t\t\t}\n\t\t\t\t}", "int j = 0;", "int j = 0;", "j", "0", "j < NumberOfBar", "j", "NumberOfBar", "j++", "j++", "j", "{\n\t\t\t\t\tif(arr[j][0] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][1];\n\t\t\t\t\t} else if(arr[j][1] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][0];\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tif(arr[j][0] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][1];\n\t\t\t\t\t} else if(arr[j][1] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][0];\n\t\t\t\t\t}\n\t\t\t\t}", "if(arr[j][0] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][1];\n\t\t\t\t\t} else if(arr[j][1] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][0];\n\t\t\t\t\t}", "arr[j][0] == ans[i]", "arr[j][0]", "arr[j]", "arr", "j", "0", "ans[i]", "ans", "i", "{\n\t\t\t\t\t\tans[i] = arr[j][1];\n\t\t\t\t\t}", "ans[i] = arr[j][1]", "ans[i]", "ans", "i", "arr[j][1]", "arr[j]", "arr", "j", "1", "if(arr[j][1] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][0];\n\t\t\t\t\t}", "arr[j][1] == ans[i]", "arr[j][1]", "arr[j]", "arr", "j", "1", "ans[i]", "ans", "i", "{\n\t\t\t\t\t\tans[i] = arr[j][0];\n\t\t\t\t\t}", "ans[i] = arr[j][0]", "ans[i]", "ans", "i", "arr[j][0]", "arr[j]", "arr", "j", "0", "for(int i = 0; i < NumberOfColumn; i++){\n\t\t\t\tfor(int j = 0; j < NumberOfColumn; j++ ){\n\t\t\t\t\tif(ans[j] == i + 1){\n\t\t\t\t\t\tSystem.out.println(j + 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < NumberOfColumn", "i", "NumberOfColumn", "i++", "i++", "i", "{\n\t\t\t\tfor(int j = 0; j < NumberOfColumn; j++ ){\n\t\t\t\t\tif(ans[j] == i + 1){\n\t\t\t\t\t\tSystem.out.println(j + 1);\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 j = 0; j < NumberOfColumn; j++ ){\n\t\t\t\t\tif(ans[j] == i + 1){\n\t\t\t\t\t\tSystem.out.println(j + 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for(int j = 0; j < NumberOfColumn; j++ ){\n\t\t\t\t\tif(ans[j] == i + 1){\n\t\t\t\t\t\tSystem.out.println(j + 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}", "int j = 0;", "int j = 0;", "j", "0", "j < NumberOfColumn", "j", "NumberOfColumn", "j++", "j++", "j", "{\n\t\t\t\t\tif(ans[j] == i + 1){\n\t\t\t\t\t\tSystem.out.println(j + 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tif(ans[j] == i + 1){\n\t\t\t\t\t\tSystem.out.println(j + 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}", "if(ans[j] == i + 1){\n\t\t\t\t\t\tSystem.out.println(j + 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}", "ans[j] == i + 1", "ans[j]", "ans", "j", "i + 1", "i", "1", "{\n\t\t\t\t\t\tSystem.out.println(j + 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}", "System.out.println(j + 1)", "System.out.println", "System.out", "System", "System.out", "j + 1", "j", "1", "break;", "String[] a", "a", "public class Main {\n\n\tpublic static void main(String[] a){\n\n\t\tint NumberOfColumn = 0;\n\t\tint NumberOfBar = 0;\n\t\tint[][] arr;\n\t\tint[] ans;\n\t\tBufferedReader bf = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString tmpString;\n\t\ttry {\n\t\t\tif(null != (tmpString = bf.readLine())){\n\t\t\t\tNumberOfColumn = Integer.parseInt(tmpString);\n\t\t\t}\n\t\t\tif(null != (tmpString = bf.readLine())){\n\t\t\t\tNumberOfBar = Integer.parseInt(tmpString);\n\t\t\t}\n\t\t\tarr = new int[NumberOfBar][2];\n\t\t\tfor(int i = 0; i < NumberOfBar; i++){\n\t\t\t\tif(null != (tmpString = bf.readLine())){\n\t\t\t\t\tString[] tmp = tmpString.split(\",\");\n\t\t\t\t\tarr[i][0] = Integer.parseInt(tmp[0]);\n\t\t\t\t\tarr[i][1] = Integer.parseInt(tmp[1]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tans = new int[NumberOfColumn];\n\t\t\tfor(int i = 0; i < NumberOfColumn; i++){\n\t\t\t\tans[i] = i + 1;\n\t\t\t\tfor(int j = 0; j < NumberOfBar; j++){\n\t\t\t\t\tif(arr[j][0] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][1];\n\t\t\t\t\t} else if(arr[j][1] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < NumberOfColumn; i++){\n\t\t\t\tfor(int j = 0; j < NumberOfColumn; j++ ){\n\t\t\t\t\tif(ans[j] == i + 1){\n\t\t\t\t\t\tSystem.out.println(j + 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"error\");\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tbf.close();\n\t\t\t} catch (IOException e) {\n\t\t\t}\n\t\t}\n\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] a){\n\n\t\tint NumberOfColumn = 0;\n\t\tint NumberOfBar = 0;\n\t\tint[][] arr;\n\t\tint[] ans;\n\t\tBufferedReader bf = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString tmpString;\n\t\ttry {\n\t\t\tif(null != (tmpString = bf.readLine())){\n\t\t\t\tNumberOfColumn = Integer.parseInt(tmpString);\n\t\t\t}\n\t\t\tif(null != (tmpString = bf.readLine())){\n\t\t\t\tNumberOfBar = Integer.parseInt(tmpString);\n\t\t\t}\n\t\t\tarr = new int[NumberOfBar][2];\n\t\t\tfor(int i = 0; i < NumberOfBar; i++){\n\t\t\t\tif(null != (tmpString = bf.readLine())){\n\t\t\t\t\tString[] tmp = tmpString.split(\",\");\n\t\t\t\t\tarr[i][0] = Integer.parseInt(tmp[0]);\n\t\t\t\t\tarr[i][1] = Integer.parseInt(tmp[1]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tans = new int[NumberOfColumn];\n\t\t\tfor(int i = 0; i < NumberOfColumn; i++){\n\t\t\t\tans[i] = i + 1;\n\t\t\t\tfor(int j = 0; j < NumberOfBar; j++){\n\t\t\t\t\tif(arr[j][0] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][1];\n\t\t\t\t\t} else if(arr[j][1] == ans[i]){\n\t\t\t\t\t\tans[i] = arr[j][0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 0; i < NumberOfColumn; i++){\n\t\t\t\tfor(int j = 0; j < NumberOfColumn; j++ ){\n\t\t\t\t\tif(ans[j] == i + 1){\n\t\t\t\t\t\tSystem.out.println(j + 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"error\");\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tbf.close();\n\t\t\t} catch (IOException e) {\n\t\t\t}\n\t\t}\n\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[] a){ int NumberOfColumn = 0; int NumberOfBar = 0; int[][] arr; int[] ans; BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); String tmpString; try { if(null != (tmpString = bf.readLine())){ NumberOfColumn = Integer.parseInt(tmpString); } if(null != (tmpString = bf.readLine())){ NumberOfBar = Integer.parseInt(tmpString); } arr = new int[NumberOfBar][2]; for(int i = 0; i < NumberOfBar; i++){ if(null != (tmpString = bf.readLine())){ String[] tmp = tmpString.split(","); arr[i][0] = Integer.parseInt(tmp[0]); arr[i][1] = Integer.parseInt(tmp[1]); } } ans = new int[NumberOfColumn]; for(int i = 0; i < NumberOfColumn; i++){ ans[i] = i + 1; for(int j = 0; j < NumberOfBar; j++){ if(arr[j][0] == ans[i]){ ans[i] = arr[j][1]; } else if(arr[j][1] == ans[i]){ ans[i] = arr[j][0]; } } } for(int i = 0; i < NumberOfColumn; i++){ for(int j = 0; j < NumberOfColumn; j++ ){ if(ans[j] == i + 1){ System.out.println(j + 1); break; } } } } catch (Exception e) { System.err.println("error"); } finally { try { bf.close(); } catch (IOException e) { } } } }
[ 7, 15, 13, 17, 15, 13, 17, 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, 41, 13, 4, 18, 13, 17, 41, 13, 20, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 13, 4, 18, 13, 0, 18, 13, 13, 2, 4, 18, 13, 4, 18, 13, 2, 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 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 170, 11 ], [ 170, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 21, 22 ], [ 22, 23 ], [ 14, 24 ], [ 24, 25 ], [ 25, 26 ], [ 26, 27 ], [ 26, 28 ], [ 24, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 31, 33 ], [ 24, 34 ], [ 34, 35 ], [ 35, 36 ], [ 24, 37 ], [ 38, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 39, 43 ], [ 43, 44 ], [ 43, 45 ], [ 14, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 49, 50 ], [ 14, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 54, 55 ], [ 53, 56 ], [ 14, 57 ], [ 57, 58 ], [ 57, 59 ], [ 14, 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 ], [ 76, 79 ], [ 73, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 80, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 87, 89 ], [ 80, 90 ], [ 90, 91 ], [ 91, 92 ], [ 80, 93 ], [ 94, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 98, 99 ], [ 97, 100 ], [ 94, 101 ], [ 101, 102 ], [ 102, 103 ], [ 94, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 104, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 109, 112 ], [ 112, 113 ], [ 113, 114 ], [ 112, 115 ], [ 115, 116 ], [ 115, 117 ], [ 108, 118 ], [ 73, 119 ], [ 119, 120 ], [ 119, 121 ], [ 121, 122 ], [ 121, 123 ], [ 123, 124 ], [ 123, 125 ], [ 73, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 129, 130 ], [ 129, 131 ], [ 126, 132 ], [ 132, 133 ], [ 132, 134 ], [ 134, 135 ], [ 134, 136 ], [ 73, 137 ], [ 137, 138 ], [ 138, 139 ], [ 138, 140 ], [ 140, 141 ], [ 140, 142 ], [ 137, 143 ], [ 14, 144 ], [ 144, 145 ], [ 145, 146 ], [ 146, 147 ], [ 146, 148 ], [ 144, 149 ], [ 149, 150 ], [ 149, 151 ], [ 151, 152 ], [ 151, 153 ], [ 144, 154 ], [ 154, 155 ], [ 155, 156 ], [ 144, 157 ], [ 158, 158 ], [ 158, 159 ], [ 159, 160 ], [ 160, 161 ], [ 161, 162 ], [ 161, 163 ], [ 159, 164 ], [ 164, 165 ], [ 164, 166 ], [ 12, 167 ], [ 167, 168 ], [ 0, 169 ], [ 169, 170 ], [ 169, 171 ] ]
[ "import java.util.Scanner;\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\n\npublic class Main {\npublic static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int[] num = new int[in.nextInt()];\n for (int i = 0; i < num.length; i++) {\n\tnum[i] = i + 1;\n }\n int count = in.nextInt();\n Pattern pt = Pattern.compile(\"(\\\\d+),(\\\\d+)\");\n int line[] = new int[2];\n for (int i = 0; i < count; i++) {\n\tString next = in.next(pt);\n\tfor (int j = 0; j < line.length; j++) {\n\t Matcher matcher = pt.matcher(next);\n\t matcher.matches();\n\t line[j] = Integer.parseInt(matcher.group(j + 1)) - 1;\n\t}\n\tint change = num[line[0]];\n\tnum[line[0]] = num[line[1]];\n\tnum[line[1]] = change;\n }\n for (int i = 0; i < num.length; i++) {\n\tSystem.out.println(num[i]);\n }\n}\n}", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.regex.Matcher;", "Matcher", "java.util.regex", "import java.util.regex.Pattern;", "Pattern", "java.util.regex", "public class Main {\npublic static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int[] num = new int[in.nextInt()];\n for (int i = 0; i < num.length; i++) {\n\tnum[i] = i + 1;\n }\n int count = in.nextInt();\n Pattern pt = Pattern.compile(\"(\\\\d+),(\\\\d+)\");\n int line[] = new int[2];\n for (int i = 0; i < count; i++) {\n\tString next = in.next(pt);\n\tfor (int j = 0; j < line.length; j++) {\n\t Matcher matcher = pt.matcher(next);\n\t matcher.matches();\n\t line[j] = Integer.parseInt(matcher.group(j + 1)) - 1;\n\t}\n\tint change = num[line[0]];\n\tnum[line[0]] = num[line[1]];\n\tnum[line[1]] = change;\n }\n for (int i = 0; i < num.length; i++) {\n\tSystem.out.println(num[i]);\n }\n}\n}", "Main", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int[] num = new int[in.nextInt()];\n for (int i = 0; i < num.length; i++) {\n\tnum[i] = i + 1;\n }\n int count = in.nextInt();\n Pattern pt = Pattern.compile(\"(\\\\d+),(\\\\d+)\");\n int line[] = new int[2];\n for (int i = 0; i < count; i++) {\n\tString next = in.next(pt);\n\tfor (int j = 0; j < line.length; j++) {\n\t Matcher matcher = pt.matcher(next);\n\t matcher.matches();\n\t line[j] = Integer.parseInt(matcher.group(j + 1)) - 1;\n\t}\n\tint change = num[line[0]];\n\tnum[line[0]] = num[line[1]];\n\tnum[line[1]] = change;\n }\n for (int i = 0; i < num.length; i++) {\n\tSystem.out.println(num[i]);\n }\n}", "main", "{\n Scanner in = new Scanner(System.in);\n int[] num = new int[in.nextInt()];\n for (int i = 0; i < num.length; i++) {\n\tnum[i] = i + 1;\n }\n int count = in.nextInt();\n Pattern pt = Pattern.compile(\"(\\\\d+),(\\\\d+)\");\n int line[] = new int[2];\n for (int i = 0; i < count; i++) {\n\tString next = in.next(pt);\n\tfor (int j = 0; j < line.length; j++) {\n\t Matcher matcher = pt.matcher(next);\n\t matcher.matches();\n\t line[j] = Integer.parseInt(matcher.group(j + 1)) - 1;\n\t}\n\tint change = num[line[0]];\n\tnum[line[0]] = num[line[1]];\n\tnum[line[1]] = change;\n }\n for (int i = 0; i < num.length; i++) {\n\tSystem.out.println(num[i]);\n }\n}", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "int[] num = new int[in.nextInt()];", "num", "new int[in.nextInt()]", "in.nextInt()", "in.nextInt", "in", "for (int i = 0; i < num.length; i++) {\n\tnum[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\tnum[i] = i + 1;\n }", "{\n\tnum[i] = i + 1;\n }", "num[i] = i + 1", "num[i]", "num", "i", "i + 1", "i", "1", "int count = in.nextInt();", "count", "in.nextInt()", "in.nextInt", "in", "Pattern pt = Pattern.compile(\"(\\\\d+),(\\\\d+)\");", "pt", "Pattern.compile(\"(\\\\d+),(\\\\d+)\")", "Pattern.compile", "Pattern", "\"(\\\\d+),(\\\\d+)\"", "int line[] = new int[2];", "line", "new int[2]", "2", "for (int i = 0; i < count; i++) {\n\tString next = in.next(pt);\n\tfor (int j = 0; j < line.length; j++) {\n\t Matcher matcher = pt.matcher(next);\n\t matcher.matches();\n\t line[j] = Integer.parseInt(matcher.group(j + 1)) - 1;\n\t}\n\tint change = num[line[0]];\n\tnum[line[0]] = num[line[1]];\n\tnum[line[1]] = change;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < count", "i", "count", "i++", "i++", "i", "{\n\tString next = in.next(pt);\n\tfor (int j = 0; j < line.length; j++) {\n\t Matcher matcher = pt.matcher(next);\n\t matcher.matches();\n\t line[j] = Integer.parseInt(matcher.group(j + 1)) - 1;\n\t}\n\tint change = num[line[0]];\n\tnum[line[0]] = num[line[1]];\n\tnum[line[1]] = change;\n }", "{\n\tString next = in.next(pt);\n\tfor (int j = 0; j < line.length; j++) {\n\t Matcher matcher = pt.matcher(next);\n\t matcher.matches();\n\t line[j] = Integer.parseInt(matcher.group(j + 1)) - 1;\n\t}\n\tint change = num[line[0]];\n\tnum[line[0]] = num[line[1]];\n\tnum[line[1]] = change;\n }", "String next = in.next(pt);", "next", "in.next(pt)", "in.next", "in", "pt", "for (int j = 0; j < line.length; j++) {\n\t Matcher matcher = pt.matcher(next);\n\t matcher.matches();\n\t line[j] = Integer.parseInt(matcher.group(j + 1)) - 1;\n\t}", "int j = 0;", "int j = 0;", "j", "0", "j < line.length", "j", "line.length", "line", "line.length", "j++", "j++", "j", "{\n\t Matcher matcher = pt.matcher(next);\n\t matcher.matches();\n\t line[j] = Integer.parseInt(matcher.group(j + 1)) - 1;\n\t}", "{\n\t Matcher matcher = pt.matcher(next);\n\t matcher.matches();\n\t line[j] = Integer.parseInt(matcher.group(j + 1)) - 1;\n\t}", "Matcher matcher = pt.matcher(next);", "matcher", "pt.matcher(next)", "pt.matcher", "pt", "next", "matcher.matches()", "matcher.matches", "matcher", "line[j] = Integer.parseInt(matcher.group(j + 1)) - 1", "line[j]", "line", "j", "Integer.parseInt(matcher.group(j + 1)) - 1", "Integer.parseInt(matcher.group(j + 1))", "Integer.parseInt", "Integer", "matcher.group(j + 1)", "matcher.group", "matcher", "j + 1", "j", "1", "1", "int change = num[line[0]];", "change", "num[line[0]]", "num", "line[0]", "line", "0", "num[line[0]] = num[line[1]]", "num[line[0]]", "num", "line[0]", "line", "0", "num[line[1]]", "num", "line[1]", "line", "1", "num[line[1]] = change", "num[line[1]]", "num", "line[1]", "line", "1", "change", "for (int i = 0; i < num.length; i++) {\n\tSystem.out.println(num[i]);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < num.length", "i", "num.length", "num", "num.length", "i++", "i++", "i", "{\n\tSystem.out.println(num[i]);\n }", "{\n\tSystem.out.println(num[i]);\n }", "System.out.println(num[i])", "System.out.println", "System.out", "System", "System.out", "num[i]", "num", "i", "String[] args", "args", "public class Main {\npublic static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int[] num = new int[in.nextInt()];\n for (int i = 0; i < num.length; i++) {\n\tnum[i] = i + 1;\n }\n int count = in.nextInt();\n Pattern pt = Pattern.compile(\"(\\\\d+),(\\\\d+)\");\n int line[] = new int[2];\n for (int i = 0; i < count; i++) {\n\tString next = in.next(pt);\n\tfor (int j = 0; j < line.length; j++) {\n\t Matcher matcher = pt.matcher(next);\n\t matcher.matches();\n\t line[j] = Integer.parseInt(matcher.group(j + 1)) - 1;\n\t}\n\tint change = num[line[0]];\n\tnum[line[0]] = num[line[1]];\n\tnum[line[1]] = change;\n }\n for (int i = 0; i < num.length; i++) {\n\tSystem.out.println(num[i]);\n }\n}\n}", "public class Main {\npublic static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int[] num = new int[in.nextInt()];\n for (int i = 0; i < num.length; i++) {\n\tnum[i] = i + 1;\n }\n int count = in.nextInt();\n Pattern pt = Pattern.compile(\"(\\\\d+),(\\\\d+)\");\n int line[] = new int[2];\n for (int i = 0; i < count; i++) {\n\tString next = in.next(pt);\n\tfor (int j = 0; j < line.length; j++) {\n\t Matcher matcher = pt.matcher(next);\n\t matcher.matches();\n\t line[j] = Integer.parseInt(matcher.group(j + 1)) - 1;\n\t}\n\tint change = num[line[0]];\n\tnum[line[0]] = num[line[1]];\n\tnum[line[1]] = change;\n }\n for (int i = 0; i < num.length; i++) {\n\tSystem.out.println(num[i]);\n }\n}\n}", "Main" ]
import java.util.Scanner; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int[] num = new int[in.nextInt()]; for (int i = 0; i < num.length; i++) { num[i] = i + 1; } int count = in.nextInt(); Pattern pt = Pattern.compile("(\\d+),(\\d+)"); int line[] = new int[2]; for (int i = 0; i < count; i++) { String next = in.next(pt); for (int j = 0; j < line.length; j++) { Matcher matcher = pt.matcher(next); matcher.matches(); line[j] = Integer.parseInt(matcher.group(j + 1)) - 1; } int change = num[line[0]]; num[line[0]] = num[line[1]]; num[line[1]] = change; } for (int i = 0; i < num.length; 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, 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, 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, 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 ]
[ [ 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, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 29, 31 ], [ 27, 32 ], [ 32, 33 ], [ 32, 34 ], [ 27, 35 ], [ 35, 36 ], [ 36, 37 ], [ 27, 38 ], [ 39, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 42, 47 ], [ 39, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 49, 53 ], [ 48, 54 ], [ 54, 55 ], [ 55, 56 ], [ 54, 57 ], [ 57, 58 ], [ 57, 59 ], [ 39, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 61, 65 ], [ 60, 66 ], [ 66, 67 ], [ 67, 68 ], [ 66, 69 ], [ 69, 70 ], [ 69, 71 ], [ 8, 72 ], [ 72, 73 ], [ 72, 74 ], [ 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 ], [ 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 ], [ 108, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 113, 117 ], [ 108, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 121, 125 ], [ 118, 126 ], [ 126, 127 ], [ 126, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 128, 132 ], [ 108, 133 ], [ 133, 134 ], [ 134, 135 ], [ 134, 136 ], [ 136, 137 ], [ 137, 138 ], [ 137, 139 ], [ 136, 140 ], [ 133, 141 ], [ 8, 142 ], [ 142, 143 ], [ 143, 144 ], [ 144, 145 ], [ 144, 146 ], [ 142, 147 ], [ 147, 148 ], [ 147, 149 ], [ 142, 150 ], [ 150, 151 ], [ 151, 152 ], [ 142, 153 ], [ 154, 154 ], [ 154, 155 ], [ 155, 156 ], [ 156, 157 ], [ 157, 158 ], [ 157, 159 ], [ 155, 160 ], [ 160, 161 ], [ 160, 162 ], [ 6, 163 ], [ 163, 164 ] ]
[ "import java.util.*;\n\nclass Main{\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\n\tint w = sc.nextInt();\n\tint n = sc.nextInt();\n\n\tint[][] change = new int[n][2];\n\tfor(int i=0; i<n; i++){\n\t String[] s = (sc.next()).split(\",\");\n\t change[i][0] = Integer.parseInt(s[0]);\n\t change[i][1] = Integer.parseInt(s[1]);\n\t}\n\n\tint[] num = new int[w+1];\n\tfor(int i=1; i<=w; i++){\n\t num[i] = i;\n\t}\n\n\tfor(int i=0; i<n; i++){\n\t int temp = num[change[i][0]];\n\t num[change[i][0]] = num[change[i][1]];\n\t num[change[i][1]] = temp;\n\t}\n\n\tfor(int i=1; i<=w; i++){\n\t System.out.println(num[i]);\n\t}\n }\n}", "import java.util.*;", "util.*", "java", "class Main{\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\n\tint w = sc.nextInt();\n\tint n = sc.nextInt();\n\n\tint[][] change = new int[n][2];\n\tfor(int i=0; i<n; i++){\n\t String[] s = (sc.next()).split(\",\");\n\t change[i][0] = Integer.parseInt(s[0]);\n\t change[i][1] = Integer.parseInt(s[1]);\n\t}\n\n\tint[] num = new int[w+1];\n\tfor(int i=1; i<=w; i++){\n\t num[i] = i;\n\t}\n\n\tfor(int i=0; i<n; i++){\n\t int temp = num[change[i][0]];\n\t num[change[i][0]] = num[change[i][1]];\n\t num[change[i][1]] = temp;\n\t}\n\n\tfor(int i=1; i<=w; i++){\n\t System.out.println(num[i]);\n\t}\n }\n}", "Main", "public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\n\tint w = sc.nextInt();\n\tint n = sc.nextInt();\n\n\tint[][] change = new int[n][2];\n\tfor(int i=0; i<n; i++){\n\t String[] s = (sc.next()).split(\",\");\n\t change[i][0] = Integer.parseInt(s[0]);\n\t change[i][1] = Integer.parseInt(s[1]);\n\t}\n\n\tint[] num = new int[w+1];\n\tfor(int i=1; i<=w; i++){\n\t num[i] = i;\n\t}\n\n\tfor(int i=0; i<n; i++){\n\t int temp = num[change[i][0]];\n\t num[change[i][0]] = num[change[i][1]];\n\t num[change[i][1]] = temp;\n\t}\n\n\tfor(int i=1; i<=w; i++){\n\t System.out.println(num[i]);\n\t}\n }", "main", "{\n\tScanner sc = new Scanner(System.in);\n\n\tint w = sc.nextInt();\n\tint n = sc.nextInt();\n\n\tint[][] change = new int[n][2];\n\tfor(int i=0; i<n; i++){\n\t String[] s = (sc.next()).split(\",\");\n\t change[i][0] = Integer.parseInt(s[0]);\n\t change[i][1] = Integer.parseInt(s[1]);\n\t}\n\n\tint[] num = new int[w+1];\n\tfor(int i=1; i<=w; i++){\n\t num[i] = i;\n\t}\n\n\tfor(int i=0; i<n; i++){\n\t int temp = num[change[i][0]];\n\t num[change[i][0]] = num[change[i][1]];\n\t num[change[i][1]] = temp;\n\t}\n\n\tfor(int i=1; i<=w; i++){\n\t System.out.println(num[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[][] change = new int[n][2];", "change", "new int[n][2]", "n", "2", "for(int i=0; i<n; i++){\n\t String[] s = (sc.next()).split(\",\");\n\t change[i][0] = Integer.parseInt(s[0]);\n\t change[i][1] = Integer.parseInt(s[1]);\n\t}", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t String[] s = (sc.next()).split(\",\");\n\t change[i][0] = Integer.parseInt(s[0]);\n\t change[i][1] = Integer.parseInt(s[1]);\n\t}", "{\n\t String[] s = (sc.next()).split(\",\");\n\t change[i][0] = Integer.parseInt(s[0]);\n\t change[i][1] = Integer.parseInt(s[1]);\n\t}", "String[] s = (sc.next()).split(\",\");", "s", "(sc.next()).split(\",\")", "(sc.next()).split", "(sc.next())", "sc.next", "sc", "\",\"", "change[i][0] = Integer.parseInt(s[0])", "change[i][0]", "change[i]", "change", "i", "0", "Integer.parseInt(s[0])", "Integer.parseInt", "Integer", "s[0]", "s", "0", "change[i][1] = Integer.parseInt(s[1])", "change[i][1]", "change[i]", "change", "i", "1", "Integer.parseInt(s[1])", "Integer.parseInt", "Integer", "s[1]", "s", "1", "int[] num = new int[w+1];", "num", "new int[w+1]", "w+1", "w", "1", "for(int i=1; i<=w; i++){\n\t num[i] = i;\n\t}", "int i=1;", "int i=1;", "i", "1", "i<=w", "i", "w", "i++", "i++", "i", "{\n\t num[i] = i;\n\t}", "{\n\t num[i] = i;\n\t}", "num[i] = i", "num[i]", "num", "i", "i", "for(int i=0; i<n; i++){\n\t int temp = num[change[i][0]];\n\t num[change[i][0]] = num[change[i][1]];\n\t num[change[i][1]] = temp;\n\t}", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t int temp = num[change[i][0]];\n\t num[change[i][0]] = num[change[i][1]];\n\t num[change[i][1]] = temp;\n\t}", "{\n\t int temp = num[change[i][0]];\n\t num[change[i][0]] = num[change[i][1]];\n\t num[change[i][1]] = temp;\n\t}", "int temp = num[change[i][0]];", "temp", "num[change[i][0]]", "num", "change[i][0]", "change[i]", "change", "i", "0", "num[change[i][0]] = num[change[i][1]]", "num[change[i][0]]", "num", "change[i][0]", "change[i]", "change", "i", "0", "num[change[i][1]]", "num", "change[i][1]", "change[i]", "change", "i", "1", "num[change[i][1]] = temp", "num[change[i][1]]", "num", "change[i][1]", "change[i]", "change", "i", "1", "temp", "for(int i=1; i<=w; i++){\n\t System.out.println(num[i]);\n\t}", "int i=1;", "int i=1;", "i", "1", "i<=w", "i", "w", "i++", "i++", "i", "{\n\t System.out.println(num[i]);\n\t}", "{\n\t System.out.println(num[i]);\n\t}", "System.out.println(num[i])", "System.out.println", "System.out", "System", "System.out", "num[i]", "num", "i", "String[] args", "args" ]
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int n = sc.nextInt(); int[][] change = new int[n][2]; for(int i=0; i<n; i++){ String[] s = (sc.next()).split(","); change[i][0] = Integer.parseInt(s[0]); change[i][1] = Integer.parseInt(s[1]); } int[] num = new int[w+1]; for(int i=1; i<=w; i++){ num[i] = i; } for(int i=0; i<n; i++){ int temp = num[change[i][0]]; num[change[i][0]] = num[change[i][1]]; num[change[i][1]] = temp; } for(int i=1; i<=w; i++){ System.out.println(num[i]); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 38, 30, 41, 13, 20, 4, 13, 13, 23, 13, 12, 13, 30, 4, 18, 13, 17, 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, 42, 2, 40, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 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 ], [ 121, 5 ], [ 121, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 10, 11 ], [ 11, 12 ], [ 11, 13 ], [ 10, 14 ], [ 14, 15 ], [ 14, 16 ], [ 6, 17 ], [ 17, 18 ], [ 121, 19 ], [ 19, 20 ], [ 19, 21 ], [ 21, 22 ], [ 22, 23 ], [ 23, 24 ], [ 22, 25 ], [ 21, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 21, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 34, 35 ], [ 21, 36 ], [ 36, 37 ], [ 36, 38 ], [ 39, 40 ], [ 39, 41 ], [ 21, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 42, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 49, 51 ], [ 42, 52 ], [ 52, 53 ], [ 53, 54 ], [ 42, 55 ], [ 56, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 57, 61 ], [ 21, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 63, 66 ], [ 62, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 67, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 67, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 80, 82 ], [ 67, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 83, 87 ], [ 87, 88 ], [ 87, 89 ], [ 67, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 90, 94 ], [ 21, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 95, 100 ], [ 100, 101 ], [ 100, 102 ], [ 102, 103 ], [ 102, 104 ], [ 95, 105 ], [ 105, 106 ], [ 106, 107 ], [ 95, 108 ], [ 109, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 110, 115 ], [ 115, 116 ], [ 115, 117 ], [ 19, 118 ], [ 118, 119 ], [ 0, 120 ], [ 120, 121 ], [ 120, 122 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n try (Scanner in = new Scanner(System.in)) {\n solve(in);\n }\n }\n\n private static void solve(Scanner in) {\n in.useDelimiter(\"\\\\D\");\n int w = in.nextInt();\n int n = in.nextInt();\n int[] amida = new int[w + 1];\n for (int i = 1; i < amida.length; i++) {\n amida[i] = i;\n }\n while (n --> 0) {\n int a = in.nextInt();\n int b = in.nextInt();\n\n int tmp = amida[a];\n amida[a] = amida[b];\n amida[b] = tmp;\n }\n for (int i = 1; i < amida.length; i++) {\n System.out.println(amida[i]);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n public static void main(String[] args) {\n try (Scanner in = new Scanner(System.in)) {\n solve(in);\n }\n }\n\n private static void solve(Scanner in) {\n in.useDelimiter(\"\\\\D\");\n int w = in.nextInt();\n int n = in.nextInt();\n int[] amida = new int[w + 1];\n for (int i = 1; i < amida.length; i++) {\n amida[i] = i;\n }\n while (n --> 0) {\n int a = in.nextInt();\n int b = in.nextInt();\n\n int tmp = amida[a];\n amida[a] = amida[b];\n amida[b] = tmp;\n }\n for (int i = 1; i < amida.length; i++) {\n System.out.println(amida[i]);\n }\n }\n}", "Main", "public static void main(String[] args) {\n try (Scanner in = new Scanner(System.in)) {\n solve(in);\n }\n }", "main", "{\n try (Scanner in = new Scanner(System.in)) {\n solve(in);\n }\n }", "try (Scanner in = new Scanner(System.in)) {\n solve(in);\n }", "{\n solve(in);\n }", "Scanner in = new Scanner(System.in)", "Scanner in = new Scanner(System.in)", "new Scanner(System.in)", "solve(in)", "solve", "in", "String[] args", "args", "private static void solve(Scanner in) {\n in.useDelimiter(\"\\\\D\");\n int w = in.nextInt();\n int n = in.nextInt();\n int[] amida = new int[w + 1];\n for (int i = 1; i < amida.length; i++) {\n amida[i] = i;\n }\n while (n --> 0) {\n int a = in.nextInt();\n int b = in.nextInt();\n\n int tmp = amida[a];\n amida[a] = amida[b];\n amida[b] = tmp;\n }\n for (int i = 1; i < amida.length; i++) {\n System.out.println(amida[i]);\n }\n }", "solve", "{\n in.useDelimiter(\"\\\\D\");\n int w = in.nextInt();\n int n = in.nextInt();\n int[] amida = new int[w + 1];\n for (int i = 1; i < amida.length; i++) {\n amida[i] = i;\n }\n while (n --> 0) {\n int a = in.nextInt();\n int b = in.nextInt();\n\n int tmp = amida[a];\n amida[a] = amida[b];\n amida[b] = tmp;\n }\n for (int i = 1; i < amida.length; i++) {\n System.out.println(amida[i]);\n }\n }", "in.useDelimiter(\"\\\\D\")", "in.useDelimiter", "in", "\"\\\\D\"", "int w = in.nextInt();", "w", "in.nextInt()", "in.nextInt", "in", "int n = in.nextInt();", "n", "in.nextInt()", "in.nextInt", "in", "int[] amida = new int[w + 1];", "amida", "new int[w + 1]", "w + 1", "w", "1", "for (int i = 1; i < amida.length; i++) {\n amida[i] = i;\n }", "int i = 1;", "int i = 1;", "i", "1", "i < amida.length", "i", "amida.length", "amida", "amida.length", "i++", "i++", "i", "{\n amida[i] = i;\n }", "{\n amida[i] = i;\n }", "amida[i] = i", "amida[i]", "amida", "i", "i", "while (n --> 0) {\n int a = in.nextInt();\n int b = in.nextInt();\n\n int tmp = amida[a];\n amida[a] = amida[b];\n amida[b] = tmp;\n }", "n --> 0", "n --", "n", "0", "{\n int a = in.nextInt();\n int b = in.nextInt();\n\n int tmp = amida[a];\n amida[a] = amida[b];\n amida[b] = tmp;\n }", "int a = in.nextInt();", "a", "in.nextInt()", "in.nextInt", "in", "int b = in.nextInt();", "b", "in.nextInt()", "in.nextInt", "in", "int tmp = amida[a];", "tmp", "amida[a]", "amida", "a", "amida[a] = amida[b]", "amida[a]", "amida", "a", "amida[b]", "amida", "b", "amida[b] = tmp", "amida[b]", "amida", "b", "tmp", "for (int i = 1; i < amida.length; i++) {\n System.out.println(amida[i]);\n }", "int i = 1;", "int i = 1;", "i", "1", "i < amida.length", "i", "amida.length", "amida", "amida.length", "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", "Scanner in", "in", "public class Main {\n\n public static void main(String[] args) {\n try (Scanner in = new Scanner(System.in)) {\n solve(in);\n }\n }\n\n private static void solve(Scanner in) {\n in.useDelimiter(\"\\\\D\");\n int w = in.nextInt();\n int n = in.nextInt();\n int[] amida = new int[w + 1];\n for (int i = 1; i < amida.length; i++) {\n amida[i] = i;\n }\n while (n --> 0) {\n int a = in.nextInt();\n int b = in.nextInt();\n\n int tmp = amida[a];\n amida[a] = amida[b];\n amida[b] = tmp;\n }\n for (int i = 1; i < amida.length; i++) {\n System.out.println(amida[i]);\n }\n }\n}", "public class Main {\n\n public static void main(String[] args) {\n try (Scanner in = new Scanner(System.in)) {\n solve(in);\n }\n }\n\n private static void solve(Scanner in) {\n in.useDelimiter(\"\\\\D\");\n int w = in.nextInt();\n int n = in.nextInt();\n int[] amida = new int[w + 1];\n for (int i = 1; i < amida.length; i++) {\n amida[i] = i;\n }\n while (n --> 0) {\n int a = in.nextInt();\n int b = in.nextInt();\n\n int tmp = amida[a];\n amida[a] = amida[b];\n amida[b] = tmp;\n }\n for (int i = 1; i < amida.length; i++) {\n System.out.println(amida[i]);\n }\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { try (Scanner in = new Scanner(System.in)) { solve(in); } } private static void solve(Scanner in) { in.useDelimiter("\\D"); int w = in.nextInt(); int n = in.nextInt(); int[] amida = new int[w + 1]; for (int i = 1; i < amida.length; i++) { amida[i] = i; } while (n --> 0) { int a = in.nextInt(); int b = in.nextInt(); int tmp = amida[a]; amida[a] = amida[b]; amida[b] = tmp; } for (int i = 1; i < amida.length; i++) { System.out.println(amida[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, 0, 13, 4, 18, 13, 0, 13, 20, 13, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 0, 13, 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 ], [ 147, 5 ], [ 147, 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 ], [ 8, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 38, 43 ], [ 43, 44 ], [ 43, 45 ], [ 38, 46 ], [ 46, 47 ], [ 47, 48 ], [ 38, 49 ], [ 50, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 51, 55 ], [ 55, 56 ], [ 55, 57 ], [ 8, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 58, 63 ], [ 63, 64 ], [ 63, 65 ], [ 58, 66 ], [ 66, 67 ], [ 67, 68 ], [ 58, 69 ], [ 70, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 74, 75 ], [ 70, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 78, 81 ], [ 70, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 87, 88 ], [ 87, 89 ], [ 70, 90 ], [ 90, 91 ], [ 90, 92 ], [ 92, 93 ], [ 93, 94 ], [ 92, 95 ], [ 95, 96 ], [ 95, 97 ], [ 70, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 100, 102 ], [ 102, 103 ], [ 102, 104 ], [ 70, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 108, 110 ], [ 105, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 113, 115 ], [ 70, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 119, 120 ], [ 119, 121 ], [ 116, 122 ], [ 8, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 123, 128 ], [ 128, 129 ], [ 128, 130 ], [ 123, 131 ], [ 131, 132 ], [ 132, 133 ], [ 123, 134 ], [ 135, 135 ], [ 135, 136 ], [ 136, 137 ], [ 137, 138 ], [ 138, 139 ], [ 138, 140 ], [ 136, 141 ], [ 141, 142 ], [ 141, 143 ], [ 6, 144 ], [ 144, 145 ], [ 0, 146 ], [ 146, 147 ], [ 146, 148 ] ]
[ "import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int w,n,i,temp;\n int[] num;\n String line;\n\n w=scan.nextInt();\n n=scan.nextInt();\n num = new int[w];\n for(i=0;i<w;i++){\n num[i]=i+1;\n }\n\n for(i=0;i<n;i++){\n line=scan.next();\n String[] ab = line.split(\",\");\n int a = Integer.parseInt(ab[0]);\n int b = Integer.parseInt(ab[1]);\n\n temp=num[a-1];\n num[a-1]=num[b-1];\n num[b-1]=temp;\n }\n\n for(i=0;i<w;i++){\n System.out.println(num[i]);\n }\n\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int w,n,i,temp;\n int[] num;\n String line;\n\n w=scan.nextInt();\n n=scan.nextInt();\n num = new int[w];\n for(i=0;i<w;i++){\n num[i]=i+1;\n }\n\n for(i=0;i<n;i++){\n line=scan.next();\n String[] ab = line.split(\",\");\n int a = Integer.parseInt(ab[0]);\n int b = Integer.parseInt(ab[1]);\n\n temp=num[a-1];\n num[a-1]=num[b-1];\n num[b-1]=temp;\n }\n\n for(i=0;i<w;i++){\n System.out.println(num[i]);\n }\n\n }\n}", "Main", "public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int w,n,i,temp;\n int[] num;\n String line;\n\n w=scan.nextInt();\n n=scan.nextInt();\n num = new int[w];\n for(i=0;i<w;i++){\n num[i]=i+1;\n }\n\n for(i=0;i<n;i++){\n line=scan.next();\n String[] ab = line.split(\",\");\n int a = Integer.parseInt(ab[0]);\n int b = Integer.parseInt(ab[1]);\n\n temp=num[a-1];\n num[a-1]=num[b-1];\n num[b-1]=temp;\n }\n\n for(i=0;i<w;i++){\n System.out.println(num[i]);\n }\n\n }", "main", "{\n Scanner scan = new Scanner(System.in);\n int w,n,i,temp;\n int[] num;\n String line;\n\n w=scan.nextInt();\n n=scan.nextInt();\n num = new int[w];\n for(i=0;i<w;i++){\n num[i]=i+1;\n }\n\n for(i=0;i<n;i++){\n line=scan.next();\n String[] ab = line.split(\",\");\n int a = Integer.parseInt(ab[0]);\n int b = Integer.parseInt(ab[1]);\n\n temp=num[a-1];\n num[a-1]=num[b-1];\n num[b-1]=temp;\n }\n\n for(i=0;i<w;i++){\n System.out.println(num[i]);\n }\n\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int w", "w", "n", "n", "i", "i", "temp;", "temp", "int[] num;", "num", "String line;", "line", "w=scan.nextInt()", "w", "scan.nextInt()", "scan.nextInt", "scan", "n=scan.nextInt()", "n", "scan.nextInt()", "scan.nextInt", "scan", "num = new int[w]", "num", "new int[w]", "w", "for(i=0;i<w;i++){\n num[i]=i+1;\n }", "i=0;", "i=0", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "{\n num[i]=i+1;\n }", "{\n num[i]=i+1;\n }", "num[i]=i+1", "num[i]", "num", "i", "i+1", "i", "1", "for(i=0;i<n;i++){\n line=scan.next();\n String[] ab = line.split(\",\");\n int a = Integer.parseInt(ab[0]);\n int b = Integer.parseInt(ab[1]);\n\n temp=num[a-1];\n num[a-1]=num[b-1];\n num[b-1]=temp;\n }", "i=0;", "i=0", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n line=scan.next();\n String[] ab = line.split(\",\");\n int a = Integer.parseInt(ab[0]);\n int b = Integer.parseInt(ab[1]);\n\n temp=num[a-1];\n num[a-1]=num[b-1];\n num[b-1]=temp;\n }", "{\n line=scan.next();\n String[] ab = line.split(\",\");\n int a = Integer.parseInt(ab[0]);\n int b = Integer.parseInt(ab[1]);\n\n temp=num[a-1];\n num[a-1]=num[b-1];\n num[b-1]=temp;\n }", "line=scan.next()", "line", "scan.next()", "scan.next", "scan", "String[] ab = line.split(\",\");", "ab", "line.split(\",\")", "line.split", "line", "\",\"", "int a = Integer.parseInt(ab[0]);", "a", "Integer.parseInt(ab[0])", "Integer.parseInt", "Integer", "ab[0]", "ab", "0", "int b = Integer.parseInt(ab[1]);", "b", "Integer.parseInt(ab[1])", "Integer.parseInt", "Integer", "ab[1]", "ab", "1", "temp=num[a-1]", "temp", "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]=temp", "num[b-1]", "num", "b-1", "b", "1", "temp", "for(i=0;i<w;i++){\n System.out.println(num[i]);\n }", "i=0;", "i=0", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "{\n System.out.println(num[i]);\n }", "{\n System.out.println(num[i]);\n }", "System.out.println(num[i])", "System.out.println", "System.out", "System", "System.out", "num[i]", "num", "i", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int w,n,i,temp;\n int[] num;\n String line;\n\n w=scan.nextInt();\n n=scan.nextInt();\n num = new int[w];\n for(i=0;i<w;i++){\n num[i]=i+1;\n }\n\n for(i=0;i<n;i++){\n line=scan.next();\n String[] ab = line.split(\",\");\n int a = Integer.parseInt(ab[0]);\n int b = Integer.parseInt(ab[1]);\n\n temp=num[a-1];\n num[a-1]=num[b-1];\n num[b-1]=temp;\n }\n\n for(i=0;i<w;i++){\n System.out.println(num[i]);\n }\n\n }\n}", "public class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int w,n,i,temp;\n int[] num;\n String line;\n\n w=scan.nextInt();\n n=scan.nextInt();\n num = new int[w];\n for(i=0;i<w;i++){\n num[i]=i+1;\n }\n\n for(i=0;i<n;i++){\n line=scan.next();\n String[] ab = line.split(\",\");\n int a = Integer.parseInt(ab[0]);\n int b = Integer.parseInt(ab[1]);\n\n temp=num[a-1];\n num[a-1]=num[b-1];\n num[b-1]=temp;\n }\n\n for(i=0;i<w;i++){\n System.out.println(num[i]);\n }\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,i,temp; int[] num; String line; w=scan.nextInt(); n=scan.nextInt(); num = new int[w]; for(i=0;i<w;i++){ num[i]=i+1; } for(i=0;i<n;i++){ line=scan.next(); String[] ab = line.split(","); int a = Integer.parseInt(ab[0]); int b = Integer.parseInt(ab[1]); temp=num[a-1]; num[a-1]=num[b-1]; num[b-1]=temp; } for(i=0;i<w;i++){ System.out.println(num[i]); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 38, 5, 13, 30, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 0, 18, 13, 13, 13, 41, 13, 4, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 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 ], [ 153, 11 ], [ 153, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 19, 20 ], [ 19, 21 ], [ 21, 22 ], [ 22, 23 ], [ 23, 24 ], [ 22, 25 ], [ 18, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 29, 32 ], [ 32, 33 ], [ 33, 34 ], [ 26, 35 ], [ 35, 36 ], [ 35, 37 ], [ 38, 39 ], [ 38, 40 ], [ 26, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 41, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 48, 50 ], [ 41, 51 ], [ 51, 52 ], [ 52, 53 ], [ 41, 54 ], [ 55, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 56, 60 ], [ 26, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 64, 65 ], [ 63, 66 ], [ 66, 67 ], [ 67, 68 ], [ 26, 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 ], [ 81, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 90, 91 ], [ 89, 92 ], [ 89, 93 ], [ 81, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 97, 98 ], [ 96, 99 ], [ 99, 100 ], [ 99, 101 ], [ 81, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 105, 106 ], [ 104, 107 ], [ 107, 108 ], [ 107, 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 ], [ 26, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 127, 132 ], [ 132, 133 ], [ 132, 134 ], [ 134, 135 ], [ 134, 136 ], [ 127, 137 ], [ 137, 138 ], [ 138, 139 ], [ 127, 140 ], [ 141, 141 ], [ 141, 142 ], [ 142, 143 ], [ 143, 144 ], [ 144, 145 ], [ 144, 146 ], [ 142, 147 ], [ 147, 148 ], [ 147, 149 ], [ 12, 150 ], [ 150, 151 ], [ 0, 152 ], [ 152, 153 ], [ 152, 154 ] ]
[ "import java.io.*;\nimport java.math.BigInteger;\nimport java.util.*;\n\npublic class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n int w = Integer.parseInt(br.readLine());\n int[] x = new int[w+1];\n for (int i = 0; i < w+1; i++) {\n x[i] = i;\n }\n int n = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n String st = br.readLine();\n String[] s = st.split(\",\", 0);\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n int sw = x[a];\n x[a] = x[b];\n x[b] = sw;\n }\n for (int i = 1; i < w+1; i++) {\n System.out.println(x[i]);\n }\n } catch (Exception ex) {\n System.exit(0);\n }\n }\n}", "import java.io.*;", "io.*", "java", "import java.math.BigInteger;", "BigInteger", "java.math", "import java.util.*;", "util.*", "java", "public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n int w = Integer.parseInt(br.readLine());\n int[] x = new int[w+1];\n for (int i = 0; i < w+1; i++) {\n x[i] = i;\n }\n int n = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n String st = br.readLine();\n String[] s = st.split(\",\", 0);\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n int sw = x[a];\n x[a] = x[b];\n x[b] = sw;\n }\n for (int i = 1; i < w+1; i++) {\n System.out.println(x[i]);\n }\n } catch (Exception ex) {\n System.exit(0);\n }\n }\n}", "Main", "public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n int w = Integer.parseInt(br.readLine());\n int[] x = new int[w+1];\n for (int i = 0; i < w+1; i++) {\n x[i] = i;\n }\n int n = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n String st = br.readLine();\n String[] s = st.split(\",\", 0);\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n int sw = x[a];\n x[a] = x[b];\n x[b] = sw;\n }\n for (int i = 1; i < w+1; i++) {\n System.out.println(x[i]);\n }\n } catch (Exception ex) {\n System.exit(0);\n }\n }", "main", "{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n int w = Integer.parseInt(br.readLine());\n int[] x = new int[w+1];\n for (int i = 0; i < w+1; i++) {\n x[i] = i;\n }\n int n = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n String st = br.readLine();\n String[] s = st.split(\",\", 0);\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n int sw = x[a];\n x[a] = x[b];\n x[b] = sw;\n }\n for (int i = 1; i < w+1; i++) {\n System.out.println(x[i]);\n }\n } catch (Exception ex) {\n System.exit(0);\n }\n }", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "try {\n int w = Integer.parseInt(br.readLine());\n int[] x = new int[w+1];\n for (int i = 0; i < w+1; i++) {\n x[i] = i;\n }\n int n = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n String st = br.readLine();\n String[] s = st.split(\",\", 0);\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n int sw = x[a];\n x[a] = x[b];\n x[b] = sw;\n }\n for (int i = 1; i < w+1; i++) {\n System.out.println(x[i]);\n }\n } catch (Exception ex) {\n System.exit(0);\n }", "catch (Exception ex) {\n System.exit(0);\n }", "Exception ex", "{\n System.exit(0);\n }", "System.exit(0)", "System.exit", "System", "0", "{\n int w = Integer.parseInt(br.readLine());\n int[] x = new int[w+1];\n for (int i = 0; i < w+1; i++) {\n x[i] = i;\n }\n int n = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n String st = br.readLine();\n String[] s = st.split(\",\", 0);\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n int sw = x[a];\n x[a] = x[b];\n x[b] = sw;\n }\n for (int i = 1; i < w+1; i++) {\n System.out.println(x[i]);\n }\n }", "int w = Integer.parseInt(br.readLine());", "w", "Integer.parseInt(br.readLine())", "Integer.parseInt", "Integer", "br.readLine()", "br.readLine", "br", "int[] x = new int[w+1];", "x", "new int[w+1]", "w+1", "w", "1", "for (int i = 0; i < w+1; i++) {\n x[i] = i;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < w+1", "i", "w+1", "w", "1", "i++", "i++", "i", "{\n x[i] = i;\n }", "{\n x[i] = i;\n }", "x[i] = i", "x[i]", "x", "i", "i", "int n = Integer.parseInt(br.readLine());", "n", "Integer.parseInt(br.readLine())", "Integer.parseInt", "Integer", "br.readLine()", "br.readLine", "br", "for (int i = 0; i < n; i++) {\n String st = br.readLine();\n String[] s = st.split(\",\", 0);\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n int sw = x[a];\n x[a] = x[b];\n x[b] = sw;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n String st = br.readLine();\n String[] s = st.split(\",\", 0);\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n int sw = x[a];\n x[a] = x[b];\n x[b] = sw;\n }", "{\n String st = br.readLine();\n String[] s = st.split(\",\", 0);\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n int sw = x[a];\n x[a] = x[b];\n x[b] = sw;\n }", "String st = br.readLine();", "st", "br.readLine()", "br.readLine", "br", "String[] s = st.split(\",\", 0);", "s", "st.split(\",\", 0)", "st.split", "st", "\",\"", "0", "int a = Integer.parseInt(s[0]);", "a", "Integer.parseInt(s[0])", "Integer.parseInt", "Integer", "s[0]", "s", "0", "int b = Integer.parseInt(s[1]);", "b", "Integer.parseInt(s[1])", "Integer.parseInt", "Integer", "s[1]", "s", "1", "int sw = x[a];", "sw", "x[a]", "x", "a", "x[a] = x[b]", "x[a]", "x", "a", "x[b]", "x", "b", "x[b] = sw", "x[b]", "x", "b", "sw", "for (int i = 1; i < w+1; i++) {\n System.out.println(x[i]);\n }", "int i = 1;", "int i = 1;", "i", "1", "i < w+1", "i", "w+1", "w", "1", "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\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n int w = Integer.parseInt(br.readLine());\n int[] x = new int[w+1];\n for (int i = 0; i < w+1; i++) {\n x[i] = i;\n }\n int n = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n String st = br.readLine();\n String[] s = st.split(\",\", 0);\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n int sw = x[a];\n x[a] = x[b];\n x[b] = sw;\n }\n for (int i = 1; i < w+1; i++) {\n System.out.println(x[i]);\n }\n } catch (Exception ex) {\n System.exit(0);\n }\n }\n}", "public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n int w = Integer.parseInt(br.readLine());\n int[] x = new int[w+1];\n for (int i = 0; i < w+1; i++) {\n x[i] = i;\n }\n int n = Integer.parseInt(br.readLine());\n for (int i = 0; i < n; i++) {\n String st = br.readLine();\n String[] s = st.split(\",\", 0);\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n int sw = x[a];\n x[a] = x[b];\n x[b] = sw;\n }\n for (int i = 1; i < w+1; i++) {\n System.out.println(x[i]);\n }\n } catch (Exception ex) {\n System.exit(0);\n }\n }\n}", "Main" ]
import java.io.*; import java.math.BigInteger; import java.util.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); try { int w = Integer.parseInt(br.readLine()); int[] x = new int[w+1]; for (int i = 0; i < w+1; i++) { x[i] = i; } int n = Integer.parseInt(br.readLine()); for (int i = 0; i < n; i++) { String st = br.readLine(); String[] s = st.split(",", 0); int a = Integer.parseInt(s[0]); int b = Integer.parseInt(s[1]); int sw = x[a]; x[a] = x[b]; x[b] = sw; } for (int i = 1; i < w+1; i++) { System.out.println(x[i]); } } catch (Exception ex) { System.exit(0); } } }
[ 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, 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 ], [ 129, 5 ], [ 129, 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 ], [ 61, 67 ], [ 58, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 71, 74 ], [ 74, 75 ], [ 74, 76 ], [ 70, 77 ], [ 58, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 81, 84 ], [ 84, 85 ], [ 84, 86 ], [ 80, 87 ], [ 58, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 90, 92 ], [ 58, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 93, 97 ], [ 97, 98 ], [ 97, 99 ], [ 58, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 100, 104 ], [ 8, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 105, 110 ], [ 110, 111 ], [ 110, 112 ], [ 105, 113 ], [ 113, 114 ], [ 114, 115 ], [ 105, 116 ], [ 117, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 120, 122 ], [ 118, 123 ], [ 123, 124 ], [ 123, 125 ], [ 6, 126 ], [ 126, 127 ], [ 0, 128 ], [ 128, 129 ], [ 128, 130 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\n\t\tint[] array = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tarray[i] = i + 1;\n\t\t}\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString[] split = sc.next().split(\",\", 0);\n\t\t\tint a = Integer.valueOf(split[0]) - 1;\n\t\t\tint b = Integer.valueOf(split[1]) - 1;\n\t\t\tint tmp = array[a];\n\t\t\tarray[a] = array[b];\n\t\t\tarray[b] = tmp;\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\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\n\t\tint[] array = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tarray[i] = i + 1;\n\t\t}\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString[] split = sc.next().split(\",\", 0);\n\t\t\tint a = Integer.valueOf(split[0]) - 1;\n\t\t\tint b = Integer.valueOf(split[1]) - 1;\n\t\t\tint tmp = array[a];\n\t\t\tarray[a] = array[b];\n\t\t\tarray[b] = tmp;\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) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\n\t\tint[] array = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tarray[i] = i + 1;\n\t\t}\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString[] split = sc.next().split(\",\", 0);\n\t\t\tint a = Integer.valueOf(split[0]) - 1;\n\t\t\tint b = Integer.valueOf(split[1]) - 1;\n\t\t\tint tmp = array[a];\n\t\t\tarray[a] = array[b];\n\t\t\tarray[b] = tmp;\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\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\n\t\tint[] array = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tarray[i] = i + 1;\n\t\t}\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString[] split = sc.next().split(\",\", 0);\n\t\t\tint a = Integer.valueOf(split[0]) - 1;\n\t\t\tint b = Integer.valueOf(split[1]) - 1;\n\t\t\tint tmp = array[a];\n\t\t\tarray[a] = array[b];\n\t\t\tarray[b] = tmp;\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", "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\tString[] split = sc.next().split(\",\", 0);\n\t\t\tint a = Integer.valueOf(split[0]) - 1;\n\t\t\tint b = Integer.valueOf(split[1]) - 1;\n\t\t\tint tmp = array[a];\n\t\t\tarray[a] = array[b];\n\t\t\tarray[b] = tmp;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tString[] split = sc.next().split(\",\", 0);\n\t\t\tint a = Integer.valueOf(split[0]) - 1;\n\t\t\tint b = Integer.valueOf(split[1]) - 1;\n\t\t\tint tmp = array[a];\n\t\t\tarray[a] = array[b];\n\t\t\tarray[b] = tmp;\n\t\t}", "{\n\t\t\tString[] split = sc.next().split(\",\", 0);\n\t\t\tint a = Integer.valueOf(split[0]) - 1;\n\t\t\tint b = Integer.valueOf(split[1]) - 1;\n\t\t\tint tmp = array[a];\n\t\t\tarray[a] = array[b];\n\t\t\tarray[b] = tmp;\n\t\t}", "String[] split = sc.next().split(\",\", 0);", "split", "sc.next().split(\",\", 0)", "sc.next().split", "sc.next()", "sc.next", "sc", "\",\"", "0", "int a = Integer.valueOf(split[0]) - 1;", "a", "Integer.valueOf(split[0]) - 1", "Integer.valueOf(split[0])", "Integer.valueOf", "Integer", "split[0]", "split", "0", "1", "int b = Integer.valueOf(split[1]) - 1;", "b", "Integer.valueOf(split[1]) - 1", "Integer.valueOf(split[1])", "Integer.valueOf", "Integer", "split[1]", "split", "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\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\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\n\t\tint[] array = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tarray[i] = i + 1;\n\t\t}\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString[] split = sc.next().split(\",\", 0);\n\t\t\tint a = Integer.valueOf(split[0]) - 1;\n\t\t\tint b = Integer.valueOf(split[1]) - 1;\n\t\t\tint tmp = array[a];\n\t\t\tarray[a] = array[b];\n\t\t\tarray[b] = tmp;\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\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\n\t\tint[] array = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tarray[i] = i + 1;\n\t\t}\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString[] split = sc.next().split(\",\", 0);\n\t\t\tint a = Integer.valueOf(split[0]) - 1;\n\t\t\tint b = Integer.valueOf(split[1]) - 1;\n\t\t\tint tmp = array[a];\n\t\t\tarray[a] = array[b];\n\t\t\tarray[b] = tmp;\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) throws Exception { 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[] split = sc.next().split(",", 0); int a = Integer.valueOf(split[0]) - 1; int b = Integer.valueOf(split[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, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 13, 42, 2, 40, 13, 17, 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, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 132, 11 ], [ 132, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 20, 23 ], [ 23, 24 ], [ 24, 25 ], [ 14, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 28, 31 ], [ 31, 32 ], [ 32, 33 ], [ 14, 34 ], [ 34, 35 ], [ 34, 36 ], [ 37, 38 ], [ 37, 39 ], [ 14, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 40, 45 ], [ 45, 46 ], [ 45, 47 ], [ 40, 48 ], [ 48, 49 ], [ 49, 50 ], [ 40, 51 ], [ 52, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 53, 57 ], [ 14, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 59, 62 ], [ 58, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 67, 68 ], [ 63, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 72, 73 ], [ 71, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 75, 78 ], [ 74, 79 ], [ 63, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 83, 84 ], [ 82, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 86, 89 ], [ 85, 90 ], [ 63, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 93, 95 ], [ 63, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 96, 100 ], [ 100, 101 ], [ 100, 102 ], [ 63, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 103, 107 ], [ 14, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 108, 113 ], [ 113, 114 ], [ 113, 115 ], [ 108, 116 ], [ 116, 117 ], [ 117, 118 ], [ 108, 119 ], [ 120, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 121, 126 ], [ 126, 127 ], [ 126, 128 ], [ 12, 129 ], [ 129, 130 ], [ 0, 131 ], [ 131, 132 ], [ 131, 133 ] ]
[ "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\tint n = Integer.parseInt(br.readLine());\n\t\tint m = Integer.parseInt(br.readLine());\n\t\tint[] p = new int[n + 1];\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tp[i] = i;\n\t\t}\n\t\twhile (m-- > 0) {\n\t\t\tString s = br.readLine();\n\t\t\tint a = Integer.parseInt(s.split(\",\")[0]);\n\t\t\tint b = Integer.parseInt(s.split(\",\")[1]);\n\t\t\tint t = p[a];\n\t\t\tp[a] = p[b];\n\t\t\tp[b] = t;\n\t\t}\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tSystem.out.println(p[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 IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint m = Integer.parseInt(br.readLine());\n\t\tint[] p = new int[n + 1];\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tp[i] = i;\n\t\t}\n\t\twhile (m-- > 0) {\n\t\t\tString s = br.readLine();\n\t\t\tint a = Integer.parseInt(s.split(\",\")[0]);\n\t\t\tint b = Integer.parseInt(s.split(\",\")[1]);\n\t\t\tint t = p[a];\n\t\t\tp[a] = p[b];\n\t\t\tp[b] = t;\n\t\t}\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tSystem.out.println(p[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 n = Integer.parseInt(br.readLine());\n\t\tint m = Integer.parseInt(br.readLine());\n\t\tint[] p = new int[n + 1];\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tp[i] = i;\n\t\t}\n\t\twhile (m-- > 0) {\n\t\t\tString s = br.readLine();\n\t\t\tint a = Integer.parseInt(s.split(\",\")[0]);\n\t\t\tint b = Integer.parseInt(s.split(\",\")[1]);\n\t\t\tint t = p[a];\n\t\t\tp[a] = p[b];\n\t\t\tp[b] = t;\n\t\t}\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tSystem.out.println(p[i]);\n\t\t}\n\t}", "main", "{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tint m = Integer.parseInt(br.readLine());\n\t\tint[] p = new int[n + 1];\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tp[i] = i;\n\t\t}\n\t\twhile (m-- > 0) {\n\t\t\tString s = br.readLine();\n\t\t\tint a = Integer.parseInt(s.split(\",\")[0]);\n\t\t\tint b = Integer.parseInt(s.split(\",\")[1]);\n\t\t\tint t = p[a];\n\t\t\tp[a] = p[b];\n\t\t\tp[b] = t;\n\t\t}\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tSystem.out.println(p[i]);\n\t\t}\n\t}", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "int n = Integer.parseInt(br.readLine());", "n", "Integer.parseInt(br.readLine())", "Integer.parseInt", "Integer", "br.readLine()", "br.readLine", "br", "int m = Integer.parseInt(br.readLine());", "m", "Integer.parseInt(br.readLine())", "Integer.parseInt", "Integer", "br.readLine()", "br.readLine", "br", "int[] p = new int[n + 1];", "p", "new int[n + 1]", "n + 1", "n", "1", "for (int i = 1; i <= n; i++) {\n\t\t\tp[i] = i;\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "{\n\t\t\tp[i] = i;\n\t\t}", "{\n\t\t\tp[i] = i;\n\t\t}", "p[i] = i", "p[i]", "p", "i", "i", "while (m-- > 0) {\n\t\t\tString s = br.readLine();\n\t\t\tint a = Integer.parseInt(s.split(\",\")[0]);\n\t\t\tint b = Integer.parseInt(s.split(\",\")[1]);\n\t\t\tint t = p[a];\n\t\t\tp[a] = p[b];\n\t\t\tp[b] = t;\n\t\t}", "m-- > 0", "m--", "m", "0", "{\n\t\t\tString s = br.readLine();\n\t\t\tint a = Integer.parseInt(s.split(\",\")[0]);\n\t\t\tint b = Integer.parseInt(s.split(\",\")[1]);\n\t\t\tint t = p[a];\n\t\t\tp[a] = p[b];\n\t\t\tp[b] = t;\n\t\t}", "String s = br.readLine();", "s", "br.readLine()", "br.readLine", "br", "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", "int t = p[a];", "t", "p[a]", "p", "a", "p[a] = p[b]", "p[a]", "p", "a", "p[b]", "p", "b", "p[b] = t", "p[b]", "p", "b", "t", "for (int i = 1; i <= n; i++) {\n\t\t\tSystem.out.println(p[i]);\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(p[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(p[i]);\n\t\t}", "System.out.println(p[i])", "System.out.println", "System.out", "System", "System.out", "p[i]", "p", "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 n = Integer.parseInt(br.readLine());\n\t\tint m = Integer.parseInt(br.readLine());\n\t\tint[] p = new int[n + 1];\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tp[i] = i;\n\t\t}\n\t\twhile (m-- > 0) {\n\t\t\tString s = br.readLine();\n\t\t\tint a = Integer.parseInt(s.split(\",\")[0]);\n\t\t\tint b = Integer.parseInt(s.split(\",\")[1]);\n\t\t\tint t = p[a];\n\t\t\tp[a] = p[b];\n\t\t\tp[b] = t;\n\t\t}\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tSystem.out.println(p[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 n = Integer.parseInt(br.readLine());\n\t\tint m = Integer.parseInt(br.readLine());\n\t\tint[] p = new int[n + 1];\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tp[i] = i;\n\t\t}\n\t\twhile (m-- > 0) {\n\t\t\tString s = br.readLine();\n\t\t\tint a = Integer.parseInt(s.split(\",\")[0]);\n\t\t\tint b = Integer.parseInt(s.split(\",\")[1]);\n\t\t\tint t = p[a];\n\t\t\tp[a] = p[b];\n\t\t\tp[b] = t;\n\t\t}\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tSystem.out.println(p[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 IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); int m = Integer.parseInt(br.readLine()); int[] p = new int[n + 1]; for (int i = 1; i <= n; i++) { p[i] = i; } while (m-- > 0) { String s = br.readLine(); int a = Integer.parseInt(s.split(",")[0]); int b = Integer.parseInt(s.split(",")[1]); int t = p[a]; p[a] = p[b]; p[b] = t; } for (int i = 1; i <= n; i++) { System.out.println(p[i]); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 4, 18, 20, 17, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 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, 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 ], [ 111, 5 ], [ 111, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 11, 14 ], [ 8, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 8, 25 ], [ 25, 26 ], [ 25, 27 ], [ 28, 29 ], [ 28, 30 ], [ 8, 31 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 31, 36 ], [ 36, 37 ], [ 36, 38 ], [ 31, 39 ], [ 39, 40 ], [ 40, 41 ], [ 31, 42 ], [ 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 ], [ 60, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 73, 75 ], [ 60, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 76, 80 ], [ 80, 81 ], [ 80, 82 ], [ 60, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 83, 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 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 100, 105 ], [ 105, 106 ], [ 105, 107 ], [ 6, 108 ], [ 108, 109 ], [ 0, 110 ], [ 110, 111 ], [ 110, 112 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in).useDelimiter(\"\\\\s*,\\\\s*|\\\\n\");\n\t\t\n\t\tint VirticalLines = scan.nextInt();\n\t\tint hoirizontalLines = scan.nextInt();\n\n\t\tint[] lineNumber = new int[VirticalLines + 1];\n\t\tfor(int i = 1; i <= VirticalLines; i++) lineNumber[i] = i;\n\n\t\tfor(int i = 0; i < hoirizontalLines; i++) {\n\t\t\tint a = scan.nextInt();\n\t\t\tint b = scan.nextInt();\n\t\t\t\n\t\t\tint tmp = lineNumber[a];\n\t\t\tlineNumber[a] = lineNumber[b];\n\t\t\tlineNumber[b] = tmp;\n\t\t}\n\t\t\n\t\tfor(int i = 1; i <= VirticalLines; i++) System.out.println(lineNumber[i]);\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).useDelimiter(\"\\\\s*,\\\\s*|\\\\n\");\n\t\t\n\t\tint VirticalLines = scan.nextInt();\n\t\tint hoirizontalLines = scan.nextInt();\n\n\t\tint[] lineNumber = new int[VirticalLines + 1];\n\t\tfor(int i = 1; i <= VirticalLines; i++) lineNumber[i] = i;\n\n\t\tfor(int i = 0; i < hoirizontalLines; i++) {\n\t\t\tint a = scan.nextInt();\n\t\t\tint b = scan.nextInt();\n\t\t\t\n\t\t\tint tmp = lineNumber[a];\n\t\t\tlineNumber[a] = lineNumber[b];\n\t\t\tlineNumber[b] = tmp;\n\t\t}\n\t\t\n\t\tfor(int i = 1; i <= VirticalLines; i++) System.out.println(lineNumber[i]);\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in).useDelimiter(\"\\\\s*,\\\\s*|\\\\n\");\n\t\t\n\t\tint VirticalLines = scan.nextInt();\n\t\tint hoirizontalLines = scan.nextInt();\n\n\t\tint[] lineNumber = new int[VirticalLines + 1];\n\t\tfor(int i = 1; i <= VirticalLines; i++) lineNumber[i] = i;\n\n\t\tfor(int i = 0; i < hoirizontalLines; i++) {\n\t\t\tint a = scan.nextInt();\n\t\t\tint b = scan.nextInt();\n\t\t\t\n\t\t\tint tmp = lineNumber[a];\n\t\t\tlineNumber[a] = lineNumber[b];\n\t\t\tlineNumber[b] = tmp;\n\t\t}\n\t\t\n\t\tfor(int i = 1; i <= VirticalLines; i++) System.out.println(lineNumber[i]);\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in).useDelimiter(\"\\\\s*,\\\\s*|\\\\n\");\n\t\t\n\t\tint VirticalLines = scan.nextInt();\n\t\tint hoirizontalLines = scan.nextInt();\n\n\t\tint[] lineNumber = new int[VirticalLines + 1];\n\t\tfor(int i = 1; i <= VirticalLines; i++) lineNumber[i] = i;\n\n\t\tfor(int i = 0; i < hoirizontalLines; i++) {\n\t\t\tint a = scan.nextInt();\n\t\t\tint b = scan.nextInt();\n\t\t\t\n\t\t\tint tmp = lineNumber[a];\n\t\t\tlineNumber[a] = lineNumber[b];\n\t\t\tlineNumber[b] = tmp;\n\t\t}\n\t\t\n\t\tfor(int i = 1; i <= VirticalLines; i++) System.out.println(lineNumber[i]);\n\t}", "Scanner scan = new Scanner(System.in).useDelimiter(\"\\\\s*,\\\\s*|\\\\n\");", "scan", "new Scanner(System.in).useDelimiter(\"\\\\s*,\\\\s*|\\\\n\")", "new Scanner(System.in).useDelimiter", "new Scanner(System.in)", "\"\\\\s*,\\\\s*|\\\\n\"", "int VirticalLines = scan.nextInt();", "VirticalLines", "scan.nextInt()", "scan.nextInt", "scan", "int hoirizontalLines = scan.nextInt();", "hoirizontalLines", "scan.nextInt()", "scan.nextInt", "scan", "int[] lineNumber = new int[VirticalLines + 1];", "lineNumber", "new int[VirticalLines + 1]", "VirticalLines + 1", "VirticalLines", "1", "for(int i = 1; i <= VirticalLines; i++) lineNumber[i] = i;", "int i = 1;", "int i = 1;", "i", "1", "i <= VirticalLines", "i", "VirticalLines", "i++", "i++", "i", "lineNumber[i] = i;", "lineNumber[i] = i", "lineNumber[i]", "lineNumber", "i", "i", "for(int i = 0; i < hoirizontalLines; i++) {\n\t\t\tint a = scan.nextInt();\n\t\t\tint b = scan.nextInt();\n\t\t\t\n\t\t\tint tmp = lineNumber[a];\n\t\t\tlineNumber[a] = lineNumber[b];\n\t\t\tlineNumber[b] = tmp;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < hoirizontalLines", "i", "hoirizontalLines", "i++", "i++", "i", "{\n\t\t\tint a = scan.nextInt();\n\t\t\tint b = scan.nextInt();\n\t\t\t\n\t\t\tint tmp = lineNumber[a];\n\t\t\tlineNumber[a] = lineNumber[b];\n\t\t\tlineNumber[b] = tmp;\n\t\t}", "{\n\t\t\tint a = scan.nextInt();\n\t\t\tint b = scan.nextInt();\n\t\t\t\n\t\t\tint tmp = lineNumber[a];\n\t\t\tlineNumber[a] = lineNumber[b];\n\t\t\tlineNumber[b] = tmp;\n\t\t}", "int a = scan.nextInt();", "a", "scan.nextInt()", "scan.nextInt", "scan", "int b = scan.nextInt();", "b", "scan.nextInt()", "scan.nextInt", "scan", "int tmp = lineNumber[a];", "tmp", "lineNumber[a]", "lineNumber", "a", "lineNumber[a] = lineNumber[b]", "lineNumber[a]", "lineNumber", "a", "lineNumber[b]", "lineNumber", "b", "lineNumber[b] = tmp", "lineNumber[b]", "lineNumber", "b", "tmp", "for(int i = 1; i <= VirticalLines; i++) System.out.println(lineNumber[i]);", "int i = 1;", "int i = 1;", "i", "1", "i <= VirticalLines", "i", "VirticalLines", "i++", "i++", "i", "System.out.println(lineNumber[i]);", "System.out.println(lineNumber[i])", "System.out.println", "System.out", "System", "System.out", "lineNumber[i]", "lineNumber", "i", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in).useDelimiter(\"\\\\s*,\\\\s*|\\\\n\");\n\t\t\n\t\tint VirticalLines = scan.nextInt();\n\t\tint hoirizontalLines = scan.nextInt();\n\n\t\tint[] lineNumber = new int[VirticalLines + 1];\n\t\tfor(int i = 1; i <= VirticalLines; i++) lineNumber[i] = i;\n\n\t\tfor(int i = 0; i < hoirizontalLines; i++) {\n\t\t\tint a = scan.nextInt();\n\t\t\tint b = scan.nextInt();\n\t\t\t\n\t\t\tint tmp = lineNumber[a];\n\t\t\tlineNumber[a] = lineNumber[b];\n\t\t\tlineNumber[b] = tmp;\n\t\t}\n\t\t\n\t\tfor(int i = 1; i <= VirticalLines; i++) System.out.println(lineNumber[i]);\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in).useDelimiter(\"\\\\s*,\\\\s*|\\\\n\");\n\t\t\n\t\tint VirticalLines = scan.nextInt();\n\t\tint hoirizontalLines = scan.nextInt();\n\n\t\tint[] lineNumber = new int[VirticalLines + 1];\n\t\tfor(int i = 1; i <= VirticalLines; i++) lineNumber[i] = i;\n\n\t\tfor(int i = 0; i < hoirizontalLines; i++) {\n\t\t\tint a = scan.nextInt();\n\t\t\tint b = scan.nextInt();\n\t\t\t\n\t\t\tint tmp = lineNumber[a];\n\t\t\tlineNumber[a] = lineNumber[b];\n\t\t\tlineNumber[b] = tmp;\n\t\t}\n\t\t\n\t\tfor(int i = 1; i <= VirticalLines; i++) System.out.println(lineNumber[i]);\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in).useDelimiter("\\s*,\\s*|\\n"); int VirticalLines = scan.nextInt(); int hoirizontalLines = scan.nextInt(); int[] lineNumber = new int[VirticalLines + 1]; for(int i = 1; i <= VirticalLines; i++) lineNumber[i] = i; for(int i = 0; i < hoirizontalLines; i++) { int a = scan.nextInt(); int b = scan.nextInt(); int tmp = lineNumber[a]; lineNumber[a] = lineNumber[b]; lineNumber[b] = tmp; } for(int i = 1; i <= VirticalLines; i++) System.out.println(lineNumber[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, 41, 13, 17, 41, 13, 20, 41, 13, 17, 41, 13, 17, 42, 2, 0, 13, 4, 18, 13, 17, 30, 14, 2, 13, 17, 30, 40, 13, 0, 13, 4, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 4, 18, 13, 13, 14, 2, 13, 17, 30, 40, 13, 0, 13, 4, 18, 13, 13, 30, 41, 13, 4, 18, 13, 17, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 2, 13, 17, 41, 13, 4, 18, 13, 2, 13, 17, 4, 18, 13, 2, 13, 17, 13, 4, 18, 13, 2, 13, 17, 13, 11, 1, 41, 13, 17, 2, 13, 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 ], [ 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 ], [ 22, 28 ], [ 28, 29 ], [ 28, 30 ], [ 22, 31 ], [ 31, 32 ], [ 31, 33 ], [ 22, 34 ], [ 34, 35 ], [ 34, 36 ], [ 22, 37 ], [ 37, 38 ], [ 37, 39 ], [ 22, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 41, 47 ], [ 40, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 49, 53 ], [ 53, 54 ], [ 54, 55 ], [ 53, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 59, 60 ], [ 58, 61 ], [ 53, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 62, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 69, 71 ], [ 62, 72 ], [ 72, 73 ], [ 73, 74 ], [ 62, 75 ], [ 76, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 77, 80 ], [ 49, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 81, 85 ], [ 85, 86 ], [ 86, 87 ], [ 85, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 91, 92 ], [ 90, 93 ], [ 81, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 98, 99 ], [ 97, 100 ], [ 97, 101 ], [ 94, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 105, 106 ], [ 104, 107 ], [ 107, 108 ], [ 107, 109 ], [ 94, 110 ], [ 110, 111 ], [ 110, 112 ], [ 112, 113 ], [ 113, 114 ], [ 112, 115 ], [ 115, 116 ], [ 115, 117 ], [ 94, 118 ], [ 118, 119 ], [ 118, 120 ], [ 120, 121 ], [ 121, 122 ], [ 120, 123 ], [ 123, 124 ], [ 123, 125 ], [ 94, 126 ], [ 126, 127 ], [ 126, 128 ], [ 128, 129 ], [ 129, 130 ], [ 128, 131 ], [ 131, 132 ], [ 131, 133 ], [ 94, 134 ], [ 134, 135 ], [ 135, 136 ], [ 134, 137 ], [ 137, 138 ], [ 137, 139 ], [ 134, 140 ], [ 94, 141 ], [ 141, 142 ], [ 142, 143 ], [ 141, 144 ], [ 144, 145 ], [ 144, 146 ], [ 141, 147 ], [ 22, 148 ], [ 148, 149 ], [ 149, 150 ], [ 150, 151 ], [ 150, 152 ], [ 148, 153 ], [ 153, 154 ], [ 153, 155 ], [ 155, 156 ], [ 156, 157 ], [ 148, 158 ], [ 158, 159 ], [ 159, 160 ], [ 148, 161 ], [ 162, 162 ], [ 162, 163 ], [ 163, 164 ], [ 164, 165 ], [ 165, 166 ], [ 165, 167 ], [ 163, 168 ], [ 168, 169 ], [ 169, 170 ], [ 168, 171 ], [ 12, 172 ], [ 172, 173 ] ]
[ "import java.io.*;\nimport java.util.ArrayList;\nimport java.util.List;\n\nclass Main {\n public static void main(String[] args) {\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));// ??\\????????????????????????\n String line; // ??\\???????????????????????\\???\n int cnt = 0;\n List<Integer> numList = new ArrayList<Integer>();\n int row = 0;\n int column = 0;\n while ((line = br.readLine()) != null) {\n \tif(cnt == 0){\n \t\tcnt++;\n \t\trow = Integer.parseInt(line);\n \t\tfor(int i = 1; i < row+1; i++){\n \t\t\tnumList.add(i);\n \t\t}\n \t}else if(cnt == 1){\n \t\tcnt++;\n \t\tcolumn = Integer.parseInt(line);\n \t}else{\n \t\tString[] convertList = line.split(\",\", 0);\n \t\tint first = Integer.parseInt(convertList[0]);\n \t\tint second = Integer.parseInt(convertList[1]);\n \t\t\n \t\tint firstNum = numList.get(first - 1);\n \t\tint secondNum = numList.get(second - 1);\n \t\t\n \t\tnumList.set(first - 1, secondNum);\n \t\tnumList.set(second - 1, firstNum);\n \t} \t\n }\n for(int j = 0; j < numList.size(); j++){\n \t\tSystem.out.println(numList.get(j));\n \t}\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n}", "import java.io.*;", "io.*", "java", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.List;", "List", "java.util", "class Main {\n public static void main(String[] args) {\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));// ??\\????????????????????????\n String line; // ??\\???????????????????????\\???\n int cnt = 0;\n List<Integer> numList = new ArrayList<Integer>();\n int row = 0;\n int column = 0;\n while ((line = br.readLine()) != null) {\n \tif(cnt == 0){\n \t\tcnt++;\n \t\trow = Integer.parseInt(line);\n \t\tfor(int i = 1; i < row+1; i++){\n \t\t\tnumList.add(i);\n \t\t}\n \t}else if(cnt == 1){\n \t\tcnt++;\n \t\tcolumn = Integer.parseInt(line);\n \t}else{\n \t\tString[] convertList = line.split(\",\", 0);\n \t\tint first = Integer.parseInt(convertList[0]);\n \t\tint second = Integer.parseInt(convertList[1]);\n \t\t\n \t\tint firstNum = numList.get(first - 1);\n \t\tint secondNum = numList.get(second - 1);\n \t\t\n \t\tnumList.set(first - 1, secondNum);\n \t\tnumList.set(second - 1, firstNum);\n \t} \t\n }\n for(int j = 0; j < numList.size(); j++){\n \t\tSystem.out.println(numList.get(j));\n \t}\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n}", "Main", "public static void main(String[] args) {\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));// ??\\????????????????????????\n String line; // ??\\???????????????????????\\???\n int cnt = 0;\n List<Integer> numList = new ArrayList<Integer>();\n int row = 0;\n int column = 0;\n while ((line = br.readLine()) != null) {\n \tif(cnt == 0){\n \t\tcnt++;\n \t\trow = Integer.parseInt(line);\n \t\tfor(int i = 1; i < row+1; i++){\n \t\t\tnumList.add(i);\n \t\t}\n \t}else if(cnt == 1){\n \t\tcnt++;\n \t\tcolumn = Integer.parseInt(line);\n \t}else{\n \t\tString[] convertList = line.split(\",\", 0);\n \t\tint first = Integer.parseInt(convertList[0]);\n \t\tint second = Integer.parseInt(convertList[1]);\n \t\t\n \t\tint firstNum = numList.get(first - 1);\n \t\tint secondNum = numList.get(second - 1);\n \t\t\n \t\tnumList.set(first - 1, secondNum);\n \t\tnumList.set(second - 1, firstNum);\n \t} \t\n }\n for(int j = 0; j < numList.size(); j++){\n \t\tSystem.out.println(numList.get(j));\n \t}\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "main", "{\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));// ??\\????????????????????????\n String line; // ??\\???????????????????????\\???\n int cnt = 0;\n List<Integer> numList = new ArrayList<Integer>();\n int row = 0;\n int column = 0;\n while ((line = br.readLine()) != null) {\n \tif(cnt == 0){\n \t\tcnt++;\n \t\trow = Integer.parseInt(line);\n \t\tfor(int i = 1; i < row+1; i++){\n \t\t\tnumList.add(i);\n \t\t}\n \t}else if(cnt == 1){\n \t\tcnt++;\n \t\tcolumn = Integer.parseInt(line);\n \t}else{\n \t\tString[] convertList = line.split(\",\", 0);\n \t\tint first = Integer.parseInt(convertList[0]);\n \t\tint second = Integer.parseInt(convertList[1]);\n \t\t\n \t\tint firstNum = numList.get(first - 1);\n \t\tint secondNum = numList.get(second - 1);\n \t\t\n \t\tnumList.set(first - 1, secondNum);\n \t\tnumList.set(second - 1, firstNum);\n \t} \t\n }\n for(int j = 0; j < numList.size(); j++){\n \t\tSystem.out.println(numList.get(j));\n \t}\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "try {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));// ??\\????????????????????????\n String line; // ??\\???????????????????????\\???\n int cnt = 0;\n List<Integer> numList = new ArrayList<Integer>();\n int row = 0;\n int column = 0;\n while ((line = br.readLine()) != null) {\n \tif(cnt == 0){\n \t\tcnt++;\n \t\trow = Integer.parseInt(line);\n \t\tfor(int i = 1; i < row+1; i++){\n \t\t\tnumList.add(i);\n \t\t}\n \t}else if(cnt == 1){\n \t\tcnt++;\n \t\tcolumn = Integer.parseInt(line);\n \t}else{\n \t\tString[] convertList = line.split(\",\", 0);\n \t\tint first = Integer.parseInt(convertList[0]);\n \t\tint second = Integer.parseInt(convertList[1]);\n \t\t\n \t\tint firstNum = numList.get(first - 1);\n \t\tint secondNum = numList.get(second - 1);\n \t\t\n \t\tnumList.set(first - 1, secondNum);\n \t\tnumList.set(second - 1, firstNum);\n \t} \t\n }\n for(int j = 0; j < numList.size(); j++){\n \t\tSystem.out.println(numList.get(j));\n \t}\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 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));// ??\\????????????????????????\n String line; // ??\\???????????????????????\\???\n int cnt = 0;\n List<Integer> numList = new ArrayList<Integer>();\n int row = 0;\n int column = 0;\n while ((line = br.readLine()) != null) {\n \tif(cnt == 0){\n \t\tcnt++;\n \t\trow = Integer.parseInt(line);\n \t\tfor(int i = 1; i < row+1; i++){\n \t\t\tnumList.add(i);\n \t\t}\n \t}else if(cnt == 1){\n \t\tcnt++;\n \t\tcolumn = Integer.parseInt(line);\n \t}else{\n \t\tString[] convertList = line.split(\",\", 0);\n \t\tint first = Integer.parseInt(convertList[0]);\n \t\tint second = Integer.parseInt(convertList[1]);\n \t\t\n \t\tint firstNum = numList.get(first - 1);\n \t\tint secondNum = numList.get(second - 1);\n \t\t\n \t\tnumList.set(first - 1, secondNum);\n \t\tnumList.set(second - 1, firstNum);\n \t} \t\n }\n for(int j = 0; j < numList.size(); j++){\n \t\tSystem.out.println(numList.get(j));\n \t}\n }", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "String line;", "line", "int cnt = 0;", "cnt", "0", "List<Integer> numList = new ArrayList<Integer>();", "numList", "new ArrayList<Integer>()", "int row = 0;", "row", "0", "int column = 0;", "column", "0", "while ((line = br.readLine()) != null) {\n \tif(cnt == 0){\n \t\tcnt++;\n \t\trow = Integer.parseInt(line);\n \t\tfor(int i = 1; i < row+1; i++){\n \t\t\tnumList.add(i);\n \t\t}\n \t}else if(cnt == 1){\n \t\tcnt++;\n \t\tcolumn = Integer.parseInt(line);\n \t}else{\n \t\tString[] convertList = line.split(\",\", 0);\n \t\tint first = Integer.parseInt(convertList[0]);\n \t\tint second = Integer.parseInt(convertList[1]);\n \t\t\n \t\tint firstNum = numList.get(first - 1);\n \t\tint secondNum = numList.get(second - 1);\n \t\t\n \t\tnumList.set(first - 1, secondNum);\n \t\tnumList.set(second - 1, firstNum);\n \t} \t\n }", "(line = br.readLine()) != null", "(line = br.readLine())", "line", "br.readLine()", "br.readLine", "br", "null", "{\n \tif(cnt == 0){\n \t\tcnt++;\n \t\trow = Integer.parseInt(line);\n \t\tfor(int i = 1; i < row+1; i++){\n \t\t\tnumList.add(i);\n \t\t}\n \t}else if(cnt == 1){\n \t\tcnt++;\n \t\tcolumn = Integer.parseInt(line);\n \t}else{\n \t\tString[] convertList = line.split(\",\", 0);\n \t\tint first = Integer.parseInt(convertList[0]);\n \t\tint second = Integer.parseInt(convertList[1]);\n \t\t\n \t\tint firstNum = numList.get(first - 1);\n \t\tint secondNum = numList.get(second - 1);\n \t\t\n \t\tnumList.set(first - 1, secondNum);\n \t\tnumList.set(second - 1, firstNum);\n \t} \t\n }", "if(cnt == 0){\n \t\tcnt++;\n \t\trow = Integer.parseInt(line);\n \t\tfor(int i = 1; i < row+1; i++){\n \t\t\tnumList.add(i);\n \t\t}\n \t}else if(cnt == 1){\n \t\tcnt++;\n \t\tcolumn = Integer.parseInt(line);\n \t}else{\n \t\tString[] convertList = line.split(\",\", 0);\n \t\tint first = Integer.parseInt(convertList[0]);\n \t\tint second = Integer.parseInt(convertList[1]);\n \t\t\n \t\tint firstNum = numList.get(first - 1);\n \t\tint secondNum = numList.get(second - 1);\n \t\t\n \t\tnumList.set(first - 1, secondNum);\n \t\tnumList.set(second - 1, firstNum);\n \t}", "cnt == 0", "cnt", "0", "{\n \t\tcnt++;\n \t\trow = Integer.parseInt(line);\n \t\tfor(int i = 1; i < row+1; i++){\n \t\t\tnumList.add(i);\n \t\t}\n \t}", "cnt++", "cnt", "row = Integer.parseInt(line)", "row", "Integer.parseInt(line)", "Integer.parseInt", "Integer", "line", "for(int i = 1; i < row+1; i++){\n \t\t\tnumList.add(i);\n \t\t}", "int i = 1;", "int i = 1;", "i", "1", "i < row+1", "i", "row+1", "row", "1", "i++", "i++", "i", "{\n \t\t\tnumList.add(i);\n \t\t}", "{\n \t\t\tnumList.add(i);\n \t\t}", "numList.add(i)", "numList.add", "numList", "i", "if(cnt == 1){\n \t\tcnt++;\n \t\tcolumn = Integer.parseInt(line);\n \t}else{\n \t\tString[] convertList = line.split(\",\", 0);\n \t\tint first = Integer.parseInt(convertList[0]);\n \t\tint second = Integer.parseInt(convertList[1]);\n \t\t\n \t\tint firstNum = numList.get(first - 1);\n \t\tint secondNum = numList.get(second - 1);\n \t\t\n \t\tnumList.set(first - 1, secondNum);\n \t\tnumList.set(second - 1, firstNum);\n \t}", "cnt == 1", "cnt", "1", "{\n \t\tcnt++;\n \t\tcolumn = Integer.parseInt(line);\n \t}", "cnt++", "cnt", "column = Integer.parseInt(line)", "column", "Integer.parseInt(line)", "Integer.parseInt", "Integer", "line", "{\n \t\tString[] convertList = line.split(\",\", 0);\n \t\tint first = Integer.parseInt(convertList[0]);\n \t\tint second = Integer.parseInt(convertList[1]);\n \t\t\n \t\tint firstNum = numList.get(first - 1);\n \t\tint secondNum = numList.get(second - 1);\n \t\t\n \t\tnumList.set(first - 1, secondNum);\n \t\tnumList.set(second - 1, firstNum);\n \t}", "String[] convertList = line.split(\",\", 0);", "convertList", "line.split(\",\", 0)", "line.split", "line", "\",\"", "0", "int first = Integer.parseInt(convertList[0]);", "first", "Integer.parseInt(convertList[0])", "Integer.parseInt", "Integer", "convertList[0]", "convertList", "0", "int second = Integer.parseInt(convertList[1]);", "second", "Integer.parseInt(convertList[1])", "Integer.parseInt", "Integer", "convertList[1]", "convertList", "1", "int firstNum = numList.get(first - 1);", "firstNum", "numList.get(first - 1)", "numList.get", "numList", "first - 1", "first", "1", "int secondNum = numList.get(second - 1);", "secondNum", "numList.get(second - 1)", "numList.get", "numList", "second - 1", "second", "1", "numList.set(first - 1, secondNum)", "numList.set", "numList", "first - 1", "first", "1", "secondNum", "numList.set(second - 1, firstNum)", "numList.set", "numList", "second - 1", "second", "1", "firstNum", "for(int j = 0; j < numList.size(); j++){\n \t\tSystem.out.println(numList.get(j));\n \t}", "int j = 0;", "int j = 0;", "j", "0", "j < numList.size()", "j", "numList.size()", "numList.size", "numList", "j++", "j++", "j", "{\n \t\tSystem.out.println(numList.get(j));\n \t}", "{\n \t\tSystem.out.println(numList.get(j));\n \t}", "System.out.println(numList.get(j))", "System.out.println", "System.out", "System", "System.out", "numList.get(j)", "numList.get", "numList", "j", "String[] args", "args" ]
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));// ??\???????????????????????? String line; // ??\???????????????????????\??? int cnt = 0; List<Integer> numList = new ArrayList<Integer>(); int row = 0; int column = 0; while ((line = br.readLine()) != null) { if(cnt == 0){ cnt++; row = Integer.parseInt(line); for(int i = 1; i < row+1; i++){ numList.add(i); } }else if(cnt == 1){ cnt++; column = Integer.parseInt(line); }else{ String[] convertList = line.split(",", 0); int first = Integer.parseInt(convertList[0]); int second = Integer.parseInt(convertList[1]); int firstNum = numList.get(first - 1); int secondNum = numList.get(second - 1); numList.set(first - 1, secondNum); numList.set(second - 1, firstNum); } } for(int j = 0; j < numList.size(); j++){ System.out.println(numList.get(j)); } } catch (Exception e) { e.printStackTrace(); } } }
[ 7, 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, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 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, 4, 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, 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, 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 ], [ 188, 11 ], [ 188, 12 ], [ 12, 13 ], [ 12, 14 ], [ 188, 15 ], [ 15, 16 ], [ 15, 17 ], [ 188, 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 ], [ 43, 44 ], [ 43, 45 ], [ 20, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 53, 55 ], [ 46, 56 ], [ 56, 57 ], [ 57, 58 ], [ 46, 59 ], [ 60, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 61, 65 ], [ 20, 66 ], [ 66, 67 ], [ 66, 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 ], [ 81, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 94, 98 ], [ 98, 99 ], [ 99, 100 ], [ 98, 101 ], [ 101, 102 ], [ 101, 103 ], [ 81, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 104, 108 ], [ 108, 109 ], [ 109, 110 ], [ 108, 111 ], [ 111, 112 ], [ 111, 113 ], [ 81, 114 ], [ 114, 115 ], [ 115, 116 ], [ 114, 117 ], [ 20, 118 ], [ 118, 119 ], [ 118, 120 ], [ 118, 121 ], [ 20, 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 ], [ 18, 145 ], [ 145, 146 ], [ 188, 147 ], [ 147, 148 ], [ 147, 149 ], [ 149, 150 ], [ 150, 151 ], [ 150, 152 ], [ 150, 153 ], [ 154, 154 ], [ 154, 155 ], [ 155, 156 ], [ 155, 157 ], [ 154, 158 ], [ 158, 159 ], [ 158, 160 ], [ 160, 161 ], [ 160, 162 ], [ 162, 163 ], [ 162, 164 ], [ 154, 165 ], [ 165, 166 ], [ 166, 167 ], [ 166, 168 ], [ 168, 169 ], [ 168, 170 ], [ 165, 171 ], [ 171, 172 ], [ 171, 173 ], [ 173, 174 ], [ 173, 175 ], [ 154, 176 ], [ 176, 177 ], [ 177, 178 ], [ 177, 179 ], [ 179, 180 ], [ 179, 181 ], [ 176, 182 ], [ 147, 183 ], [ 183, 184 ], [ 147, 185 ], [ 185, 186 ], [ 0, 187 ], [ 187, 188 ], [ 187, 189 ] ]
[ "import java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\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) {\n\n\tScanner sc = new Scanner(System.in);\n\t// ?¨??????\\?????¨????????????????£?\n\tint arrayLength = Integer.parseInt(sc.nextLine());\n\tint loopCount = Integer.parseInt(sc.nextLine());\n\n\t// ?????\\???????????????\n\tint[] outputArray = new int[arrayLength + 1];\n\tfor (int i = 0; i < outputArray.length; i++) {\n\t outputArray[i] = i;\n\t}\n\n\t// ??\\????????????\n\tList<int[]> inputArrays = new ArrayList<>();\n\n\tfor (int i = 0; i < loopCount; i++) {\n\t String[] queryStr = sc.nextLine().split(\",\");\n\t int[] query = new int[2];\n\t query[FIRST_NUMBER] = Integer.parseInt(queryStr[FIRST_NUMBER]);\n\t query[SECOND_NUMBER] = Integer.parseInt(queryStr[SECOND_NUMBER]);\n\t inputArrays.add(query);\n\t}\n\n\t// lots???draw?????????????????????outputArray???????´???????\n\texchangeLine(inputArrays, outputArray);\n\n\t// ?????????????????????\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t System.out.println(outputArray[i]);\n\t}\n\n }\n\n private static void exchangeLine(List<int[]> inputArrays, int[] outputArray) {\n\n\tfor (int[] query : inputArrays) {\n\t int mediator = 0;\n\n\t mediator = outputArray[query[FIRST_NUMBER]];\n\t outputArray[query[FIRST_NUMBER]] = outputArray[query[SECOND_NUMBER]];\n\t outputArray[query[SECOND_NUMBER]] = mediator;\n\n\t}\n\n }\n}", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.List;", "List", "java.util", "import java.util.Scanner;", "Scanner", "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) {\n\n\tScanner sc = new Scanner(System.in);\n\t// ?¨??????\\?????¨????????????????£?\n\tint arrayLength = Integer.parseInt(sc.nextLine());\n\tint loopCount = Integer.parseInt(sc.nextLine());\n\n\t// ?????\\???????????????\n\tint[] outputArray = new int[arrayLength + 1];\n\tfor (int i = 0; i < outputArray.length; i++) {\n\t outputArray[i] = i;\n\t}\n\n\t// ??\\????????????\n\tList<int[]> inputArrays = new ArrayList<>();\n\n\tfor (int i = 0; i < loopCount; i++) {\n\t String[] queryStr = sc.nextLine().split(\",\");\n\t int[] query = new int[2];\n\t query[FIRST_NUMBER] = Integer.parseInt(queryStr[FIRST_NUMBER]);\n\t query[SECOND_NUMBER] = Integer.parseInt(queryStr[SECOND_NUMBER]);\n\t inputArrays.add(query);\n\t}\n\n\t// lots???draw?????????????????????outputArray???????´???????\n\texchangeLine(inputArrays, outputArray);\n\n\t// ?????????????????????\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t System.out.println(outputArray[i]);\n\t}\n\n }\n\n private static void exchangeLine(List<int[]> inputArrays, int[] outputArray) {\n\n\tfor (int[] query : inputArrays) {\n\t int mediator = 0;\n\n\t mediator = outputArray[query[FIRST_NUMBER]];\n\t outputArray[query[FIRST_NUMBER]] = outputArray[query[SECOND_NUMBER]];\n\t outputArray[query[SECOND_NUMBER]] = mediator;\n\n\t}\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) {\n\n\tScanner sc = new Scanner(System.in);\n\t// ?¨??????\\?????¨????????????????£?\n\tint arrayLength = Integer.parseInt(sc.nextLine());\n\tint loopCount = Integer.parseInt(sc.nextLine());\n\n\t// ?????\\???????????????\n\tint[] outputArray = new int[arrayLength + 1];\n\tfor (int i = 0; i < outputArray.length; i++) {\n\t outputArray[i] = i;\n\t}\n\n\t// ??\\????????????\n\tList<int[]> inputArrays = new ArrayList<>();\n\n\tfor (int i = 0; i < loopCount; i++) {\n\t String[] queryStr = sc.nextLine().split(\",\");\n\t int[] query = new int[2];\n\t query[FIRST_NUMBER] = Integer.parseInt(queryStr[FIRST_NUMBER]);\n\t query[SECOND_NUMBER] = Integer.parseInt(queryStr[SECOND_NUMBER]);\n\t inputArrays.add(query);\n\t}\n\n\t// lots???draw?????????????????????outputArray???????´???????\n\texchangeLine(inputArrays, outputArray);\n\n\t// ?????????????????????\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t System.out.println(outputArray[i]);\n\t}\n\n }", "main", "{\n\n\tScanner sc = new Scanner(System.in);\n\t// ?¨??????\\?????¨????????????????£?\n\tint arrayLength = Integer.parseInt(sc.nextLine());\n\tint loopCount = Integer.parseInt(sc.nextLine());\n\n\t// ?????\\???????????????\n\tint[] outputArray = new int[arrayLength + 1];\n\tfor (int i = 0; i < outputArray.length; i++) {\n\t outputArray[i] = i;\n\t}\n\n\t// ??\\????????????\n\tList<int[]> inputArrays = new ArrayList<>();\n\n\tfor (int i = 0; i < loopCount; i++) {\n\t String[] queryStr = sc.nextLine().split(\",\");\n\t int[] query = new int[2];\n\t query[FIRST_NUMBER] = Integer.parseInt(queryStr[FIRST_NUMBER]);\n\t query[SECOND_NUMBER] = Integer.parseInt(queryStr[SECOND_NUMBER]);\n\t inputArrays.add(query);\n\t}\n\n\t// lots???draw?????????????????????outputArray???????´???????\n\texchangeLine(inputArrays, outputArray);\n\n\t// ?????????????????????\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t System.out.println(outputArray[i]);\n\t}\n\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int arrayLength = Integer.parseInt(sc.nextLine());", "arrayLength", "Integer.parseInt(sc.nextLine())", "Integer.parseInt", "Integer", "sc.nextLine()", "sc.nextLine", "sc", "int loopCount = Integer.parseInt(sc.nextLine());", "loopCount", "Integer.parseInt(sc.nextLine())", "Integer.parseInt", "Integer", "sc.nextLine()", "sc.nextLine", "sc", "int[] outputArray = new int[arrayLength + 1];", "outputArray", "new int[arrayLength + 1]", "arrayLength + 1", "arrayLength", "1", "for (int i = 0; i < outputArray.length; i++) {\n\t outputArray[i] = i;\n\t}", "int i = 0;", "int i = 0;", "i", "0", "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", "List<int[]> inputArrays = new ArrayList<>();", "inputArrays", "new ArrayList<>()", "for (int i = 0; i < loopCount; i++) {\n\t String[] queryStr = sc.nextLine().split(\",\");\n\t int[] query = new int[2];\n\t query[FIRST_NUMBER] = Integer.parseInt(queryStr[FIRST_NUMBER]);\n\t query[SECOND_NUMBER] = Integer.parseInt(queryStr[SECOND_NUMBER]);\n\t inputArrays.add(query);\n\t}", "int i = 0;", "int i = 0;", "i", "0", "i < loopCount", "i", "loopCount", "i++", "i++", "i", "{\n\t String[] queryStr = sc.nextLine().split(\",\");\n\t int[] query = new int[2];\n\t query[FIRST_NUMBER] = Integer.parseInt(queryStr[FIRST_NUMBER]);\n\t query[SECOND_NUMBER] = Integer.parseInt(queryStr[SECOND_NUMBER]);\n\t inputArrays.add(query);\n\t}", "{\n\t String[] queryStr = sc.nextLine().split(\",\");\n\t int[] query = new int[2];\n\t query[FIRST_NUMBER] = Integer.parseInt(queryStr[FIRST_NUMBER]);\n\t query[SECOND_NUMBER] = Integer.parseInt(queryStr[SECOND_NUMBER]);\n\t inputArrays.add(query);\n\t}", "String[] queryStr = sc.nextLine().split(\",\");", "queryStr", "sc.nextLine().split(\",\")", "sc.nextLine().split", "sc.nextLine()", "sc.nextLine", "sc", "\",\"", "int[] query = new int[2];", "query", "new int[2]", "2", "query[FIRST_NUMBER] = Integer.parseInt(queryStr[FIRST_NUMBER])", "query[FIRST_NUMBER]", "query", "FIRST_NUMBER", "Integer.parseInt(queryStr[FIRST_NUMBER])", "Integer.parseInt", "Integer", "queryStr[FIRST_NUMBER]", "queryStr", "FIRST_NUMBER", "query[SECOND_NUMBER] = Integer.parseInt(queryStr[SECOND_NUMBER])", "query[SECOND_NUMBER]", "query", "SECOND_NUMBER", "Integer.parseInt(queryStr[SECOND_NUMBER])", "Integer.parseInt", "Integer", "queryStr[SECOND_NUMBER]", "queryStr", "SECOND_NUMBER", "inputArrays.add(query)", "inputArrays.add", "inputArrays", "query", "exchangeLine(inputArrays, outputArray)", "exchangeLine", "inputArrays", "outputArray", "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", "private static void exchangeLine(List<int[]> inputArrays, int[] outputArray) {\n\n\tfor (int[] query : inputArrays) {\n\t int mediator = 0;\n\n\t mediator = outputArray[query[FIRST_NUMBER]];\n\t outputArray[query[FIRST_NUMBER]] = outputArray[query[SECOND_NUMBER]];\n\t outputArray[query[SECOND_NUMBER]] = mediator;\n\n\t}\n\n }", "exchangeLine", "{\n\n\tfor (int[] query : inputArrays) {\n\t int mediator = 0;\n\n\t mediator = outputArray[query[FIRST_NUMBER]];\n\t outputArray[query[FIRST_NUMBER]] = outputArray[query[SECOND_NUMBER]];\n\t outputArray[query[SECOND_NUMBER]] = mediator;\n\n\t}\n\n }", "for (int[] query : inputArrays) {\n\t int mediator = 0;\n\n\t mediator = outputArray[query[FIRST_NUMBER]];\n\t outputArray[query[FIRST_NUMBER]] = outputArray[query[SECOND_NUMBER]];\n\t outputArray[query[SECOND_NUMBER]] = mediator;\n\n\t}", "int[] query", "inputArrays", "{\n\t int mediator = 0;\n\n\t mediator = outputArray[query[FIRST_NUMBER]];\n\t outputArray[query[FIRST_NUMBER]] = outputArray[query[SECOND_NUMBER]];\n\t outputArray[query[SECOND_NUMBER]] = mediator;\n\n\t}", "{\n\t int mediator = 0;\n\n\t mediator = outputArray[query[FIRST_NUMBER]];\n\t outputArray[query[FIRST_NUMBER]] = outputArray[query[SECOND_NUMBER]];\n\t outputArray[query[SECOND_NUMBER]] = mediator;\n\n\t}", "int mediator = 0;", "mediator", "0", "mediator = outputArray[query[FIRST_NUMBER]]", "mediator", "outputArray[query[FIRST_NUMBER]]", "outputArray", "query[FIRST_NUMBER]", "query", "FIRST_NUMBER", "outputArray[query[FIRST_NUMBER]] = outputArray[query[SECOND_NUMBER]]", "outputArray[query[FIRST_NUMBER]]", "outputArray", "query[FIRST_NUMBER]", "query", "FIRST_NUMBER", "outputArray[query[SECOND_NUMBER]]", "outputArray", "query[SECOND_NUMBER]", "query", "SECOND_NUMBER", "outputArray[query[SECOND_NUMBER]] = mediator", "outputArray[query[SECOND_NUMBER]]", "outputArray", "query[SECOND_NUMBER]", "query", "SECOND_NUMBER", "mediator", "List<int[]> inputArrays", "inputArrays", "int[] outputArray", "outputArray", "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) {\n\n\tScanner sc = new Scanner(System.in);\n\t// ?¨??????\\?????¨????????????????£?\n\tint arrayLength = Integer.parseInt(sc.nextLine());\n\tint loopCount = Integer.parseInt(sc.nextLine());\n\n\t// ?????\\???????????????\n\tint[] outputArray = new int[arrayLength + 1];\n\tfor (int i = 0; i < outputArray.length; i++) {\n\t outputArray[i] = i;\n\t}\n\n\t// ??\\????????????\n\tList<int[]> inputArrays = new ArrayList<>();\n\n\tfor (int i = 0; i < loopCount; i++) {\n\t String[] queryStr = sc.nextLine().split(\",\");\n\t int[] query = new int[2];\n\t query[FIRST_NUMBER] = Integer.parseInt(queryStr[FIRST_NUMBER]);\n\t query[SECOND_NUMBER] = Integer.parseInt(queryStr[SECOND_NUMBER]);\n\t inputArrays.add(query);\n\t}\n\n\t// lots???draw?????????????????????outputArray???????´???????\n\texchangeLine(inputArrays, outputArray);\n\n\t// ?????????????????????\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t System.out.println(outputArray[i]);\n\t}\n\n }\n\n private static void exchangeLine(List<int[]> inputArrays, int[] outputArray) {\n\n\tfor (int[] query : inputArrays) {\n\t int mediator = 0;\n\n\t mediator = outputArray[query[FIRST_NUMBER]];\n\t outputArray[query[FIRST_NUMBER]] = outputArray[query[SECOND_NUMBER]];\n\t outputArray[query[SECOND_NUMBER]] = mediator;\n\n\t}\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) {\n\n\tScanner sc = new Scanner(System.in);\n\t// ?¨??????\\?????¨????????????????£?\n\tint arrayLength = Integer.parseInt(sc.nextLine());\n\tint loopCount = Integer.parseInt(sc.nextLine());\n\n\t// ?????\\???????????????\n\tint[] outputArray = new int[arrayLength + 1];\n\tfor (int i = 0; i < outputArray.length; i++) {\n\t outputArray[i] = i;\n\t}\n\n\t// ??\\????????????\n\tList<int[]> inputArrays = new ArrayList<>();\n\n\tfor (int i = 0; i < loopCount; i++) {\n\t String[] queryStr = sc.nextLine().split(\",\");\n\t int[] query = new int[2];\n\t query[FIRST_NUMBER] = Integer.parseInt(queryStr[FIRST_NUMBER]);\n\t query[SECOND_NUMBER] = Integer.parseInt(queryStr[SECOND_NUMBER]);\n\t inputArrays.add(query);\n\t}\n\n\t// lots???draw?????????????????????outputArray???????´???????\n\texchangeLine(inputArrays, outputArray);\n\n\t// ?????????????????????\n\tfor (int i = 1; i < outputArray.length; i++) {\n\t System.out.println(outputArray[i]);\n\t}\n\n }\n\n private static void exchangeLine(List<int[]> inputArrays, int[] outputArray) {\n\n\tfor (int[] query : inputArrays) {\n\t int mediator = 0;\n\n\t mediator = outputArray[query[FIRST_NUMBER]];\n\t outputArray[query[FIRST_NUMBER]] = outputArray[query[SECOND_NUMBER]];\n\t outputArray[query[SECOND_NUMBER]] = mediator;\n\n\t}\n\n }\n}", "Main" ]
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main{ public static final int FIRST_NUMBER = 0; public static final int SECOND_NUMBER = 1; public static void main(String[] args) { Scanner sc = new Scanner(System.in); // ?¨??????\?????¨????????????????£? int arrayLength = Integer.parseInt(sc.nextLine()); int loopCount = Integer.parseInt(sc.nextLine()); // ?????\??????????????? int[] outputArray = new int[arrayLength + 1]; for (int i = 0; i < outputArray.length; i++) { outputArray[i] = i; } // ??\???????????? List<int[]> inputArrays = new ArrayList<>(); for (int i = 0; i < loopCount; i++) { String[] queryStr = sc.nextLine().split(","); int[] query = new int[2]; query[FIRST_NUMBER] = Integer.parseInt(queryStr[FIRST_NUMBER]); query[SECOND_NUMBER] = Integer.parseInt(queryStr[SECOND_NUMBER]); inputArrays.add(query); } // lots???draw?????????????????????outputArray???????´??????? exchangeLine(inputArrays, outputArray); // ????????????????????? for (int i = 1; i < outputArray.length; i++) { System.out.println(outputArray[i]); } } private static void exchangeLine(List<int[]> inputArrays, int[] outputArray) { for (int[] query : inputArrays) { int mediator = 0; mediator = outputArray[query[FIRST_NUMBER]]; outputArray[query[FIRST_NUMBER]] = outputArray[query[SECOND_NUMBER]]; outputArray[query[SECOND_NUMBER]] = mediator; } } }
[ 7, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 2, 4, 18, 13, 17, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 13, 41, 13, 41, 13, 41, 13, 17, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 17, 0, 13, 4, 18, 13, 18, 13, 17, 0, 13, 4, 18, 13, 18, 13, 17, 0, 13, 18, 13, 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, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 3, 4 ], [ 3, 5 ], [ 5, 6 ], [ 6, 7 ], [ 6, 8 ], [ 5, 9 ], [ 9, 10 ], [ 9, 11 ], [ 12, 13 ], [ 13, 14 ], [ 14, 15 ], [ 12, 16 ], [ 5, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 5, 22 ], [ 22, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 22, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 29, 31 ], [ 22, 32 ], [ 32, 33 ], [ 33, 34 ], [ 22, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 36, 40 ], [ 5, 41 ], [ 41, 42 ], [ 5, 43 ], [ 43, 44 ], [ 5, 45 ], [ 45, 46 ], [ 45, 47 ], [ 5, 48 ], [ 48, 49 ], [ 48, 50 ], [ 5, 51 ], [ 51, 52 ], [ 51, 53 ], [ 5, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 54, 59 ], [ 59, 60 ], [ 59, 61 ], [ 54, 62 ], [ 62, 63 ], [ 63, 64 ], [ 54, 65 ], [ 66, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 70, 71 ], [ 66, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 75, 76 ], [ 74, 77 ], [ 66, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 81, 82 ], [ 80, 83 ], [ 83, 84 ], [ 83, 85 ], [ 66, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 89, 90 ], [ 88, 91 ], [ 91, 92 ], [ 91, 93 ], [ 66, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 96, 98 ], [ 66, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 99, 103 ], [ 103, 104 ], [ 103, 105 ], [ 66, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 106, 110 ], [ 5, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 111, 116 ], [ 116, 117 ], [ 116, 118 ], [ 118, 119 ], [ 118, 120 ], [ 111, 121 ], [ 121, 122 ], [ 122, 123 ], [ 111, 124 ], [ 124, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 125, 130 ], [ 130, 131 ], [ 130, 132 ], [ 3, 133 ], [ 133, 134 ] ]
[ "class Main\n{\n\tpublic static void main( String[] args )\n\t{\n\t\tjava.util.Scanner sc = new java.util.Scanner( System.in );\n\t\t\n\t\tint[] street = new int[sc.nextInt()+1];\n\t\tint n = sc.nextInt();\n\t\t\n\t\tfor( int w = 1 ; w < street.length ; w++ )\n\t\t\tstreet[w] = w;\n\t\t\t\n\t\tString in;\n\t\tString[] sp;\n\t\tint work = 0;\n\t\tint change1 = 0;\n\t\tint change2 = 0;\n\t\tfor( int i = 0 ; i < n ; i++ )\n\t\t{\n\t\t\tin = sc.next();\n\t\t\tsp = in.split( \",\" );\n\t\t\tchange1 = Integer.parseInt(sp[0]);\n\t\t\tchange2 = Integer.parseInt(sp[1]);\n\t\t\t\n\t\t\twork = street[change1];\n\t\t\tstreet[change1] = street[change2];\n\t\t\tstreet[change2] = work;\n\t\t}\n\t\tfor( int w = 1 ; w < street.length ; w++ )\n\t\t\tSystem.out.println( street[w] );\n\t}\n}", "class Main\n{\n\tpublic static void main( String[] args )\n\t{\n\t\tjava.util.Scanner sc = new java.util.Scanner( System.in );\n\t\t\n\t\tint[] street = new int[sc.nextInt()+1];\n\t\tint n = sc.nextInt();\n\t\t\n\t\tfor( int w = 1 ; w < street.length ; w++ )\n\t\t\tstreet[w] = w;\n\t\t\t\n\t\tString in;\n\t\tString[] sp;\n\t\tint work = 0;\n\t\tint change1 = 0;\n\t\tint change2 = 0;\n\t\tfor( int i = 0 ; i < n ; i++ )\n\t\t{\n\t\t\tin = sc.next();\n\t\t\tsp = in.split( \",\" );\n\t\t\tchange1 = Integer.parseInt(sp[0]);\n\t\t\tchange2 = Integer.parseInt(sp[1]);\n\t\t\t\n\t\t\twork = street[change1];\n\t\t\tstreet[change1] = street[change2];\n\t\t\tstreet[change2] = work;\n\t\t}\n\t\tfor( int w = 1 ; w < street.length ; w++ )\n\t\t\tSystem.out.println( street[w] );\n\t}\n}", "Main", "public static void main( String[] args )\n\t{\n\t\tjava.util.Scanner sc = new java.util.Scanner( System.in );\n\t\t\n\t\tint[] street = new int[sc.nextInt()+1];\n\t\tint n = sc.nextInt();\n\t\t\n\t\tfor( int w = 1 ; w < street.length ; w++ )\n\t\t\tstreet[w] = w;\n\t\t\t\n\t\tString in;\n\t\tString[] sp;\n\t\tint work = 0;\n\t\tint change1 = 0;\n\t\tint change2 = 0;\n\t\tfor( int i = 0 ; i < n ; i++ )\n\t\t{\n\t\t\tin = sc.next();\n\t\t\tsp = in.split( \",\" );\n\t\t\tchange1 = Integer.parseInt(sp[0]);\n\t\t\tchange2 = Integer.parseInt(sp[1]);\n\t\t\t\n\t\t\twork = street[change1];\n\t\t\tstreet[change1] = street[change2];\n\t\t\tstreet[change2] = work;\n\t\t}\n\t\tfor( int w = 1 ; w < street.length ; w++ )\n\t\t\tSystem.out.println( street[w] );\n\t}", "main", "{\n\t\tjava.util.Scanner sc = new java.util.Scanner( System.in );\n\t\t\n\t\tint[] street = new int[sc.nextInt()+1];\n\t\tint n = sc.nextInt();\n\t\t\n\t\tfor( int w = 1 ; w < street.length ; w++ )\n\t\t\tstreet[w] = w;\n\t\t\t\n\t\tString in;\n\t\tString[] sp;\n\t\tint work = 0;\n\t\tint change1 = 0;\n\t\tint change2 = 0;\n\t\tfor( int i = 0 ; i < n ; i++ )\n\t\t{\n\t\t\tin = sc.next();\n\t\t\tsp = in.split( \",\" );\n\t\t\tchange1 = Integer.parseInt(sp[0]);\n\t\t\tchange2 = Integer.parseInt(sp[1]);\n\t\t\t\n\t\t\twork = street[change1];\n\t\t\tstreet[change1] = street[change2];\n\t\t\tstreet[change2] = work;\n\t\t}\n\t\tfor( int w = 1 ; w < street.length ; w++ )\n\t\t\tSystem.out.println( street[w] );\n\t}", "java.util.Scanner sc = new java.util.Scanner( System.in );", "sc", "new java.util.Scanner( System.in )", "int[] street = new int[sc.nextInt()+1];", "street", "new int[sc.nextInt()+1]", "sc.nextInt()+1", "sc.nextInt()", "sc.nextInt", "sc", "1", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "for( int w = 1 ; w < street.length ; w++ )\n\t\t\tstreet[w] = w;", "int w = 1 ;", "int w = 1 ;", "w", "1", "w < street.length", "w", "street.length", "street", "street.length", "w++", "w++", "w", "street[w] = w;", "street[w] = w", "street[w]", "street", "w", "w", "String in;", "in", "String[] sp;", "sp", "int work = 0;", "work", "0", "int change1 = 0;", "change1", "0", "int change2 = 0;", "change2", "0", "for( int i = 0 ; i < n ; i++ )\n\t\t{\n\t\t\tin = sc.next();\n\t\t\tsp = in.split( \",\" );\n\t\t\tchange1 = Integer.parseInt(sp[0]);\n\t\t\tchange2 = Integer.parseInt(sp[1]);\n\t\t\t\n\t\t\twork = street[change1];\n\t\t\tstreet[change1] = street[change2];\n\t\t\tstreet[change2] = work;\n\t\t}", "int i = 0 ;", "int i = 0 ;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tin = sc.next();\n\t\t\tsp = in.split( \",\" );\n\t\t\tchange1 = Integer.parseInt(sp[0]);\n\t\t\tchange2 = Integer.parseInt(sp[1]);\n\t\t\t\n\t\t\twork = street[change1];\n\t\t\tstreet[change1] = street[change2];\n\t\t\tstreet[change2] = work;\n\t\t}", "{\n\t\t\tin = sc.next();\n\t\t\tsp = in.split( \",\" );\n\t\t\tchange1 = Integer.parseInt(sp[0]);\n\t\t\tchange2 = Integer.parseInt(sp[1]);\n\t\t\t\n\t\t\twork = street[change1];\n\t\t\tstreet[change1] = street[change2];\n\t\t\tstreet[change2] = work;\n\t\t}", "in = sc.next()", "in", "sc.next()", "sc.next", "sc", "sp = in.split( \",\" )", "sp", "in.split( \",\" )", "in.split", "in", "\",\"", "change1 = Integer.parseInt(sp[0])", "change1", "Integer.parseInt(sp[0])", "Integer.parseInt", "Integer", "sp[0]", "sp", "0", "change2 = Integer.parseInt(sp[1])", "change2", "Integer.parseInt(sp[1])", "Integer.parseInt", "Integer", "sp[1]", "sp", "1", "work = street[change1]", "work", "street[change1]", "street", "change1", "street[change1] = street[change2]", "street[change1]", "street", "change1", "street[change2]", "street", "change2", "street[change2] = work", "street[change2]", "street", "change2", "work", "for( int w = 1 ; w < street.length ; w++ )\n\t\t\tSystem.out.println( street[w] );", "int w = 1 ;", "int w = 1 ;", "w", "1", "w < street.length", "w", "street.length", "street", "street.length", "w++", "w++", "w", "System.out.println( street[w] );", "System.out.println( street[w] )", "System.out.println", "System.out", "System", "System.out", "street[w]", "street", "w", "String[] args", "args" ]
class Main { public static void main( String[] args ) { java.util.Scanner sc = new java.util.Scanner( System.in ); int[] street = new int[sc.nextInt()+1]; int n = sc.nextInt(); for( int w = 1 ; w < street.length ; w++ ) street[w] = w; String in; String[] sp; int work = 0; int change1 = 0; int change2 = 0; for( int i = 0 ; i < n ; i++ ) { in = sc.next(); sp = in.split( "," ); change1 = Integer.parseInt(sp[0]); change2 = Integer.parseInt(sp[1]); work = street[change1]; street[change1] = street[change2]; street[change2] = work; } for( int w = 1 ; w < street.length ; w++ ) System.out.println( street[w] ); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 4, 18, 13, 13, 4, 18, 13, 13, 4, 18, 13, 13, 4, 18, 13, 13, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 38, 5, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 4, 13, 13, 2, 13, 17, 2, 13, 17, 28, 13, 13, 30, 30, 4, 18, 18, 13, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 141, 8 ], [ 141, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 14, 17 ], [ 11, 18 ], [ 18, 19 ], [ 19, 20 ], [ 18, 21 ], [ 18, 22 ], [ 22, 23 ], [ 23, 24 ], [ 22, 25 ], [ 11, 26 ], [ 26, 27 ], [ 27, 28 ], [ 26, 29 ], [ 26, 30 ], [ 9, 31 ], [ 31, 32 ], [ 9, 33 ], [ 33, 34 ], [ 9, 35 ], [ 35, 36 ], [ 141, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 39, 43 ], [ 43, 44 ], [ 43, 45 ], [ 39, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 46, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 54, 55 ], [ 50, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 59, 60 ], [ 50, 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 ], [ 75, 76 ], [ 74, 77 ], [ 50, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 78, 83 ], [ 83, 84 ], [ 83, 85 ], [ 78, 86 ], [ 86, 87 ], [ 87, 88 ], [ 78, 89 ], [ 90, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 93, 98 ], [ 90, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 102, 103 ], [ 101, 104 ], [ 104, 105 ], [ 104, 106 ], [ 90, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 110, 111 ], [ 109, 112 ], [ 112, 113 ], [ 112, 114 ], [ 90, 115 ], [ 115, 116 ], [ 115, 117 ], [ 115, 118 ], [ 118, 119 ], [ 118, 120 ], [ 115, 121 ], [ 121, 122 ], [ 121, 123 ], [ 50, 124 ], [ 124, 125 ], [ 124, 126 ], [ 124, 127 ], [ 128, 128 ], [ 128, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 131, 133 ], [ 129, 134 ], [ 39, 135 ], [ 135, 136 ], [ 136, 137 ], [ 37, 138 ], [ 138, 139 ], [ 0, 140 ], [ 140, 141 ], [ 140, 142 ] ]
[ "import java.util.ArrayList;\nimport java.util.Scanner;\n\npublic class Main {\n\n public static void swap(ArrayList<Integer> list, int a, int b){\n int c = list.get(a);\n list.set(a, list.get(b));\n list.set(b, c);\n }\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n ArrayList<Integer> list = new ArrayList<>();\n try {\n int w = sc.nextInt();\n int n = sc.nextInt();\n for(int i=1;i<=w;i++){\n list.add(i);\n }\n for(int i=0;i<n;i++){\n String[] s = sc.next().split(\",\");\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n swap(list, a-1, b-1);\n }\n for(Integer num : list){\n System.out.println(num);\n }\n } catch (Exception e) {\n }\n sc.close();\n }\n}", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n public static void swap(ArrayList<Integer> list, int a, int b){\n int c = list.get(a);\n list.set(a, list.get(b));\n list.set(b, c);\n }\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n ArrayList<Integer> list = new ArrayList<>();\n try {\n int w = sc.nextInt();\n int n = sc.nextInt();\n for(int i=1;i<=w;i++){\n list.add(i);\n }\n for(int i=0;i<n;i++){\n String[] s = sc.next().split(\",\");\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n swap(list, a-1, b-1);\n }\n for(Integer num : list){\n System.out.println(num);\n }\n } catch (Exception e) {\n }\n sc.close();\n }\n}", "Main", "public static void swap(ArrayList<Integer> list, int a, int b){\n int c = list.get(a);\n list.set(a, list.get(b));\n list.set(b, c);\n }", "swap", "{\n int c = list.get(a);\n list.set(a, list.get(b));\n list.set(b, c);\n }", "int c = list.get(a);", "c", "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, c)", "list.set", "list", "b", "c", "ArrayList<Integer> list", "list", "int a", "a", "int b", "b", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n ArrayList<Integer> list = new ArrayList<>();\n try {\n int w = sc.nextInt();\n int n = sc.nextInt();\n for(int i=1;i<=w;i++){\n list.add(i);\n }\n for(int i=0;i<n;i++){\n String[] s = sc.next().split(\",\");\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n swap(list, a-1, b-1);\n }\n for(Integer num : list){\n System.out.println(num);\n }\n } catch (Exception e) {\n }\n sc.close();\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n ArrayList<Integer> list = new ArrayList<>();\n try {\n int w = sc.nextInt();\n int n = sc.nextInt();\n for(int i=1;i<=w;i++){\n list.add(i);\n }\n for(int i=0;i<n;i++){\n String[] s = sc.next().split(\",\");\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n swap(list, a-1, b-1);\n }\n for(Integer num : list){\n System.out.println(num);\n }\n } catch (Exception e) {\n }\n sc.close();\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "ArrayList<Integer> list = new ArrayList<>();", "list", "new ArrayList<>()", "try {\n int w = sc.nextInt();\n int n = sc.nextInt();\n for(int i=1;i<=w;i++){\n list.add(i);\n }\n for(int i=0;i<n;i++){\n String[] s = sc.next().split(\",\");\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n swap(list, a-1, b-1);\n }\n for(Integer num : list){\n System.out.println(num);\n }\n } catch (Exception e) {\n }", "catch (Exception e) {\n }", "Exception e", "{\n }", "{\n int w = sc.nextInt();\n int n = sc.nextInt();\n for(int i=1;i<=w;i++){\n list.add(i);\n }\n for(int i=0;i<n;i++){\n String[] s = sc.next().split(\",\");\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n swap(list, a-1, b-1);\n }\n for(Integer num : list){\n System.out.println(num);\n }\n }", "int w = sc.nextInt();", "w", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "for(int i=1;i<=w;i++){\n list.add(i);\n }", "int i=1;", "int i=1;", "i", "1", "i<=w", "i", "w", "i++", "i++", "i", "{\n list.add(i);\n }", "{\n list.add(i);\n }", "list.add(i)", "list.add", "list", "i", "for(int i=0;i<n;i++){\n String[] s = sc.next().split(\",\");\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n swap(list, a-1, b-1);\n }", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n String[] s = sc.next().split(\",\");\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n swap(list, a-1, b-1);\n }", "{\n String[] s = sc.next().split(\",\");\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n swap(list, a-1, b-1);\n }", "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", "swap(list, a-1, b-1)", "swap", "list", "a-1", "a", "1", "b-1", "b", "1", "for(Integer num : list){\n System.out.println(num);\n }", "Integer num", "list", "{\n System.out.println(num);\n }", "{\n System.out.println(num);\n }", "System.out.println(num)", "System.out.println", "System.out", "System", "System.out", "num", "sc.close()", "sc.close", "sc", "String[] args", "args", "public class Main {\n\n public static void swap(ArrayList<Integer> list, int a, int b){\n int c = list.get(a);\n list.set(a, list.get(b));\n list.set(b, c);\n }\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n ArrayList<Integer> list = new ArrayList<>();\n try {\n int w = sc.nextInt();\n int n = sc.nextInt();\n for(int i=1;i<=w;i++){\n list.add(i);\n }\n for(int i=0;i<n;i++){\n String[] s = sc.next().split(\",\");\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n swap(list, a-1, b-1);\n }\n for(Integer num : list){\n System.out.println(num);\n }\n } catch (Exception e) {\n }\n sc.close();\n }\n}", "public class Main {\n\n public static void swap(ArrayList<Integer> list, int a, int b){\n int c = list.get(a);\n list.set(a, list.get(b));\n list.set(b, c);\n }\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n ArrayList<Integer> list = new ArrayList<>();\n try {\n int w = sc.nextInt();\n int n = sc.nextInt();\n for(int i=1;i<=w;i++){\n list.add(i);\n }\n for(int i=0;i<n;i++){\n String[] s = sc.next().split(\",\");\n int a = Integer.parseInt(s[0]);\n int b = Integer.parseInt(s[1]);\n swap(list, a-1, b-1);\n }\n for(Integer num : list){\n System.out.println(num);\n }\n } catch (Exception e) {\n }\n sc.close();\n }\n}", "Main" ]
import java.util.ArrayList; import java.util.Scanner; public class Main { public static void swap(ArrayList<Integer> list, int a, int b){ int c = list.get(a); list.set(a, list.get(b)); list.set(b, c); } public static void main(String[] args) { Scanner sc = new Scanner(System.in); ArrayList<Integer> list = new ArrayList<>(); try { int w = sc.nextInt(); int n = sc.nextInt(); for(int i=1;i<=w;i++){ list.add(i); } for(int i=0;i<n;i++){ String[] s = sc.next().split(","); int a = Integer.parseInt(s[0]); int b = Integer.parseInt(s[1]); swap(list, a-1, b-1); } for(Integer num : list){ System.out.println(num); } } catch (Exception e) { } sc.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 38, 5, 13, 30, 4, 18, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 41, 13, 4, 18, 13, 4, 18, 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, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 0, 18, 18, 13, 13, 13, 4, 18, 13, 18, 13, 13, 4, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 28, 13, 13, 30, 30, 4, 13, 13, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 28, 13, 13, 30, 30, 4, 18, 18, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 23, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 195, 8 ], [ 195, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 13, 14 ], [ 13, 15 ], [ 15, 16 ], [ 16, 17 ], [ 17, 18 ], [ 12, 19 ], [ 19, 20 ], [ 20, 21 ], [ 20, 22 ], [ 19, 23 ], [ 23, 24 ], [ 23, 25 ], [ 19, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 19, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 34, 35 ], [ 33, 36 ], [ 19, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 39, 42 ], [ 42, 43 ], [ 43, 44 ], [ 19, 45 ], [ 45, 46 ], [ 45, 47 ], [ 19, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 50, 58 ], [ 58, 59 ], [ 59, 60 ], [ 50, 61 ], [ 62, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 66, 67 ], [ 62, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 70, 73 ], [ 62, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 74, 79 ], [ 79, 80 ], [ 79, 81 ], [ 74, 82 ], [ 82, 83 ], [ 83, 84 ], [ 74, 85 ], [ 86, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 88, 92 ], [ 87, 93 ], [ 93, 94 ], [ 94, 95 ], [ 93, 96 ], [ 96, 97 ], [ 96, 98 ], [ 19, 99 ], [ 99, 100 ], [ 100, 101 ], [ 99, 102 ], [ 99, 103 ], [ 9, 104 ], [ 104, 105 ], [ 195, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 108, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 113, 118 ], [ 118, 119 ], [ 118, 120 ], [ 120, 121 ], [ 120, 122 ], [ 113, 123 ], [ 123, 124 ], [ 124, 125 ], [ 113, 126 ], [ 127, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 128, 132 ], [ 132, 133 ], [ 132, 134 ], [ 108, 135 ], [ 135, 136 ], [ 135, 137 ], [ 135, 138 ], [ 139, 139 ], [ 139, 140 ], [ 140, 141 ], [ 140, 142 ], [ 140, 143 ], [ 143, 144 ], [ 144, 145 ], [ 144, 146 ], [ 143, 147 ], [ 140, 148 ], [ 148, 149 ], [ 149, 150 ], [ 149, 151 ], [ 148, 152 ], [ 108, 153 ], [ 153, 154 ], [ 153, 155 ], [ 153, 156 ], [ 157, 157 ], [ 157, 158 ], [ 158, 159 ], [ 159, 160 ], [ 160, 161 ], [ 160, 162 ], [ 158, 163 ], [ 106, 164 ], [ 164, 165 ], [ 106, 166 ], [ 166, 167 ], [ 195, 168 ], [ 168, 169 ], [ 168, 170 ], [ 170, 171 ], [ 171, 172 ], [ 171, 173 ], [ 173, 174 ], [ 173, 175 ], [ 170, 176 ], [ 176, 177 ], [ 177, 178 ], [ 177, 179 ], [ 176, 180 ], [ 180, 181 ], [ 180, 182 ], [ 170, 183 ], [ 183, 184 ], [ 184, 185 ], [ 184, 186 ], [ 183, 187 ], [ 168, 188 ], [ 188, 189 ], [ 168, 190 ], [ 190, 191 ], [ 168, 192 ], [ 192, 193 ], [ 0, 194 ], [ 194, 195 ], [ 194, 196 ] ]
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\n//public class Problem0011_DrawingLots {\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\ttry {\n\t\t//\tProblem0011_DrawingLots test = new Problem0011_DrawingLots();\n\t\t\tMain test = new Main();\n\t\t\t\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString line = reader.readLine();\n\t\t\t\n\t\t\tint volume = Integer.parseInt(line);\n\t\t\tint swappingCount = Integer.parseInt(reader.readLine());\n\t\t\tint[][] swaps = new int[swappingCount][2];\n\t\t\t\n\t\t\tfor(int i = 0; i < swappingCount; i++) {\n\t\t\t\tline = reader.readLine();\n\t\t\t\tString[] textArray = line.split(\",\");\n\t\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\t\tswaps[i][j] = Integer.parseInt(textArray[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttest.showAnswer(volume, swaps);\n\t\t\t\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\tvoid showAnswer(int number, int[][] arrays) {\n\t\tint[] numbers = new int[number];\n\t\tfor(int i = 0; i < numbers.length; i++) {\n\t\t\tnumbers[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(int[] array : arrays) {\n\t\t\tswap(numbers, array[0]-1, array[1]-1);\n\t\t}\n\t\tfor(int positionNumber : numbers) {\n\t\t\tSystem.out.println(positionNumber);\n\t\t}\n\t}\n\tvoid swap(int[] target, int position1, int position2) {\n\t\tint temporary = target[position1];\n\t\ttarget[position1] = target[position2];\n\t\ttarget[position2] = temporary;\n\t}\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "public class Main {\n\tpublic static void main(String[] args) {\n\t\ttry {\n\t\t//\tProblem0011_DrawingLots test = new Problem0011_DrawingLots();\n\t\t\tMain test = new Main();\n\t\t\t\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString line = reader.readLine();\n\t\t\t\n\t\t\tint volume = Integer.parseInt(line);\n\t\t\tint swappingCount = Integer.parseInt(reader.readLine());\n\t\t\tint[][] swaps = new int[swappingCount][2];\n\t\t\t\n\t\t\tfor(int i = 0; i < swappingCount; i++) {\n\t\t\t\tline = reader.readLine();\n\t\t\t\tString[] textArray = line.split(\",\");\n\t\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\t\tswaps[i][j] = Integer.parseInt(textArray[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttest.showAnswer(volume, swaps);\n\t\t\t\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\tvoid showAnswer(int number, int[][] arrays) {\n\t\tint[] numbers = new int[number];\n\t\tfor(int i = 0; i < numbers.length; i++) {\n\t\t\tnumbers[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(int[] array : arrays) {\n\t\t\tswap(numbers, array[0]-1, array[1]-1);\n\t\t}\n\t\tfor(int positionNumber : numbers) {\n\t\t\tSystem.out.println(positionNumber);\n\t\t}\n\t}\n\tvoid swap(int[] target, int position1, int position2) {\n\t\tint temporary = target[position1];\n\t\ttarget[position1] = target[position2];\n\t\ttarget[position2] = temporary;\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\ttry {\n\t\t//\tProblem0011_DrawingLots test = new Problem0011_DrawingLots();\n\t\t\tMain test = new Main();\n\t\t\t\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString line = reader.readLine();\n\t\t\t\n\t\t\tint volume = Integer.parseInt(line);\n\t\t\tint swappingCount = Integer.parseInt(reader.readLine());\n\t\t\tint[][] swaps = new int[swappingCount][2];\n\t\t\t\n\t\t\tfor(int i = 0; i < swappingCount; i++) {\n\t\t\t\tline = reader.readLine();\n\t\t\t\tString[] textArray = line.split(\",\");\n\t\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\t\tswaps[i][j] = Integer.parseInt(textArray[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttest.showAnswer(volume, swaps);\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//\tProblem0011_DrawingLots test = new Problem0011_DrawingLots();\n\t\t\tMain test = new Main();\n\t\t\t\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString line = reader.readLine();\n\t\t\t\n\t\t\tint volume = Integer.parseInt(line);\n\t\t\tint swappingCount = Integer.parseInt(reader.readLine());\n\t\t\tint[][] swaps = new int[swappingCount][2];\n\t\t\t\n\t\t\tfor(int i = 0; i < swappingCount; i++) {\n\t\t\t\tline = reader.readLine();\n\t\t\t\tString[] textArray = line.split(\",\");\n\t\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\t\tswaps[i][j] = Integer.parseInt(textArray[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttest.showAnswer(volume, swaps);\n\t\t\t\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "try {\n\t\t//\tProblem0011_DrawingLots test = new Problem0011_DrawingLots();\n\t\t\tMain test = new Main();\n\t\t\t\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString line = reader.readLine();\n\t\t\t\n\t\t\tint volume = Integer.parseInt(line);\n\t\t\tint swappingCount = Integer.parseInt(reader.readLine());\n\t\t\tint[][] swaps = new int[swappingCount][2];\n\t\t\t\n\t\t\tfor(int i = 0; i < swappingCount; i++) {\n\t\t\t\tline = reader.readLine();\n\t\t\t\tString[] textArray = line.split(\",\");\n\t\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\t\tswaps[i][j] = Integer.parseInt(textArray[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttest.showAnswer(volume, swaps);\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//\tProblem0011_DrawingLots test = new Problem0011_DrawingLots();\n\t\t\tMain test = new Main();\n\t\t\t\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString line = reader.readLine();\n\t\t\t\n\t\t\tint volume = Integer.parseInt(line);\n\t\t\tint swappingCount = Integer.parseInt(reader.readLine());\n\t\t\tint[][] swaps = new int[swappingCount][2];\n\t\t\t\n\t\t\tfor(int i = 0; i < swappingCount; i++) {\n\t\t\t\tline = reader.readLine();\n\t\t\t\tString[] textArray = line.split(\",\");\n\t\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\t\tswaps[i][j] = Integer.parseInt(textArray[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttest.showAnswer(volume, swaps);\n\t\t\t\n\t\t}", "Main test = new Main();", "test", "new Main()", "BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));", "reader", "new BufferedReader(new InputStreamReader(System.in))", "String line = reader.readLine();", "line", "reader.readLine()", "reader.readLine", "reader", "int volume = Integer.parseInt(line);", "volume", "Integer.parseInt(line)", "Integer.parseInt", "Integer", "line", "int swappingCount = Integer.parseInt(reader.readLine());", "swappingCount", "Integer.parseInt(reader.readLine())", "Integer.parseInt", "Integer", "reader.readLine()", "reader.readLine", "reader", "int[][] swaps = new int[swappingCount][2];", "swaps", "new int[swappingCount][2]", "swappingCount", "2", "for(int i = 0; i < swappingCount; i++) {\n\t\t\t\tline = reader.readLine();\n\t\t\t\tString[] textArray = line.split(\",\");\n\t\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\t\tswaps[i][j] = Integer.parseInt(textArray[j]);\n\t\t\t\t}\n\t\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < swappingCount", "i", "swappingCount", "i++", "i++", "i", "{\n\t\t\t\tline = reader.readLine();\n\t\t\t\tString[] textArray = line.split(\",\");\n\t\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\t\tswaps[i][j] = Integer.parseInt(textArray[j]);\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tline = reader.readLine();\n\t\t\t\tString[] textArray = line.split(\",\");\n\t\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\t\tswaps[i][j] = Integer.parseInt(textArray[j]);\n\t\t\t\t}\n\t\t\t}", "line = reader.readLine()", "line", "reader.readLine()", "reader.readLine", "reader", "String[] textArray = line.split(\",\");", "textArray", "line.split(\",\")", "line.split", "line", "\",\"", "for(int j = 0; j < 2; j++) {\n\t\t\t\t\tswaps[i][j] = Integer.parseInt(textArray[j]);\n\t\t\t\t}", "int j = 0;", "int j = 0;", "j", "0", "j < 2", "j", "2", "j++", "j++", "j", "{\n\t\t\t\t\tswaps[i][j] = Integer.parseInt(textArray[j]);\n\t\t\t\t}", "{\n\t\t\t\t\tswaps[i][j] = Integer.parseInt(textArray[j]);\n\t\t\t\t}", "swaps[i][j] = Integer.parseInt(textArray[j])", "swaps[i][j]", "swaps[i]", "swaps", "i", "j", "Integer.parseInt(textArray[j])", "Integer.parseInt", "Integer", "textArray[j]", "textArray", "j", "test.showAnswer(volume, swaps)", "test.showAnswer", "test", "volume", "swaps", "String[] args", "args", "void showAnswer(int number, int[][] arrays) {\n\t\tint[] numbers = new int[number];\n\t\tfor(int i = 0; i < numbers.length; i++) {\n\t\t\tnumbers[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(int[] array : arrays) {\n\t\t\tswap(numbers, array[0]-1, array[1]-1);\n\t\t}\n\t\tfor(int positionNumber : numbers) {\n\t\t\tSystem.out.println(positionNumber);\n\t\t}\n\t}", "showAnswer", "{\n\t\tint[] numbers = new int[number];\n\t\tfor(int i = 0; i < numbers.length; i++) {\n\t\t\tnumbers[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(int[] array : arrays) {\n\t\t\tswap(numbers, array[0]-1, array[1]-1);\n\t\t}\n\t\tfor(int positionNumber : numbers) {\n\t\t\tSystem.out.println(positionNumber);\n\t\t}\n\t}", "int[] numbers = new int[number];", "numbers", "new int[number]", "number", "for(int i = 0; i < numbers.length; i++) {\n\t\t\tnumbers[i] = i+1;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < numbers.length", "i", "numbers.length", "numbers", "numbers.length", "i++", "i++", "i", "{\n\t\t\tnumbers[i] = i+1;\n\t\t}", "{\n\t\t\tnumbers[i] = i+1;\n\t\t}", "numbers[i] = i+1", "numbers[i]", "numbers", "i", "i+1", "i", "1", "for(int[] array : arrays) {\n\t\t\tswap(numbers, array[0]-1, array[1]-1);\n\t\t}", "int[] array", "arrays", "{\n\t\t\tswap(numbers, array[0]-1, array[1]-1);\n\t\t}", "{\n\t\t\tswap(numbers, array[0]-1, array[1]-1);\n\t\t}", "swap(numbers, array[0]-1, array[1]-1)", "swap", "numbers", "array[0]-1", "array[0]", "array", "0", "1", "array[1]-1", "array[1]", "array", "1", "1", "for(int positionNumber : numbers) {\n\t\t\tSystem.out.println(positionNumber);\n\t\t}", "int positionNumber", "numbers", "{\n\t\t\tSystem.out.println(positionNumber);\n\t\t}", "{\n\t\t\tSystem.out.println(positionNumber);\n\t\t}", "System.out.println(positionNumber)", "System.out.println", "System.out", "System", "System.out", "positionNumber", "int number", "number", "int[][] arrays", "arrays", "void swap(int[] target, int position1, int position2) {\n\t\tint temporary = target[position1];\n\t\ttarget[position1] = target[position2];\n\t\ttarget[position2] = temporary;\n\t}", "swap", "{\n\t\tint temporary = target[position1];\n\t\ttarget[position1] = target[position2];\n\t\ttarget[position2] = temporary;\n\t}", "int temporary = target[position1];", "temporary", "target[position1]", "target", "position1", "target[position1] = target[position2]", "target[position1]", "target", "position1", "target[position2]", "target", "position2", "target[position2] = temporary", "target[position2]", "target", "position2", "temporary", "int[] target", "target", "int position1", "position1", "int position2", "position2", "public class Main {\n\tpublic static void main(String[] args) {\n\t\ttry {\n\t\t//\tProblem0011_DrawingLots test = new Problem0011_DrawingLots();\n\t\t\tMain test = new Main();\n\t\t\t\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString line = reader.readLine();\n\t\t\t\n\t\t\tint volume = Integer.parseInt(line);\n\t\t\tint swappingCount = Integer.parseInt(reader.readLine());\n\t\t\tint[][] swaps = new int[swappingCount][2];\n\t\t\t\n\t\t\tfor(int i = 0; i < swappingCount; i++) {\n\t\t\t\tline = reader.readLine();\n\t\t\t\tString[] textArray = line.split(\",\");\n\t\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\t\tswaps[i][j] = Integer.parseInt(textArray[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttest.showAnswer(volume, swaps);\n\t\t\t\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\tvoid showAnswer(int number, int[][] arrays) {\n\t\tint[] numbers = new int[number];\n\t\tfor(int i = 0; i < numbers.length; i++) {\n\t\t\tnumbers[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(int[] array : arrays) {\n\t\t\tswap(numbers, array[0]-1, array[1]-1);\n\t\t}\n\t\tfor(int positionNumber : numbers) {\n\t\t\tSystem.out.println(positionNumber);\n\t\t}\n\t}\n\tvoid swap(int[] target, int position1, int position2) {\n\t\tint temporary = target[position1];\n\t\ttarget[position1] = target[position2];\n\t\ttarget[position2] = temporary;\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\ttry {\n\t\t//\tProblem0011_DrawingLots test = new Problem0011_DrawingLots();\n\t\t\tMain test = new Main();\n\t\t\t\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString line = reader.readLine();\n\t\t\t\n\t\t\tint volume = Integer.parseInt(line);\n\t\t\tint swappingCount = Integer.parseInt(reader.readLine());\n\t\t\tint[][] swaps = new int[swappingCount][2];\n\t\t\t\n\t\t\tfor(int i = 0; i < swappingCount; i++) {\n\t\t\t\tline = reader.readLine();\n\t\t\t\tString[] textArray = line.split(\",\");\n\t\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\t\tswaps[i][j] = Integer.parseInt(textArray[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttest.showAnswer(volume, swaps);\n\t\t\t\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\tvoid showAnswer(int number, int[][] arrays) {\n\t\tint[] numbers = new int[number];\n\t\tfor(int i = 0; i < numbers.length; i++) {\n\t\t\tnumbers[i] = i+1;\n\t\t}\n\t\t\n\t\tfor(int[] array : arrays) {\n\t\t\tswap(numbers, array[0]-1, array[1]-1);\n\t\t}\n\t\tfor(int positionNumber : numbers) {\n\t\t\tSystem.out.println(positionNumber);\n\t\t}\n\t}\n\tvoid swap(int[] target, int position1, int position2) {\n\t\tint temporary = target[position1];\n\t\ttarget[position1] = target[position2];\n\t\ttarget[position2] = temporary;\n\t}\n}", "Main" ]
import java.io.BufferedReader; import java.io.InputStreamReader; //public class Problem0011_DrawingLots { public class Main { public static void main(String[] args) { try { // Problem0011_DrawingLots test = new Problem0011_DrawingLots(); Main test = new Main(); BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String line = reader.readLine(); int volume = Integer.parseInt(line); int swappingCount = Integer.parseInt(reader.readLine()); int[][] swaps = new int[swappingCount][2]; for(int i = 0; i < swappingCount; i++) { line = reader.readLine(); String[] textArray = line.split(","); for(int j = 0; j < 2; j++) { swaps[i][j] = Integer.parseInt(textArray[j]); } } test.showAnswer(volume, swaps); } catch(Exception e) { e.printStackTrace(); } } void showAnswer(int number, int[][] arrays) { int[] numbers = new int[number]; for(int i = 0; i < numbers.length; i++) { numbers[i] = i+1; } for(int[] array : arrays) { swap(numbers, array[0]-1, array[1]-1); } for(int positionNumber : numbers) { System.out.println(positionNumber); } } void swap(int[] target, int position1, int position2) { int temporary = target[position1]; target[position1] = target[position2]; target[position2] = temporary; } }
[ 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, 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, 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, 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, 17, 18, 13, 13, 23, 13, 12, 13, 30, 41, 13, 17, 0, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 23, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 159, 5 ], [ 159, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 8, 31 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 31, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 38, 40 ], [ 31, 41 ], [ 41, 42 ], [ 42, 43 ], [ 31, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 46, 50 ], [ 50, 51 ], [ 50, 52 ], [ 8, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 53, 58 ], [ 58, 59 ], [ 58, 60 ], [ 53, 61 ], [ 61, 62 ], [ 62, 63 ], [ 53, 64 ], [ 65, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 68, 69 ], [ 69, 70 ], [ 65, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 74, 75 ], [ 73, 76 ], [ 73, 77 ], [ 65, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 81, 84 ], [ 84, 85 ], [ 84, 86 ], [ 80, 87 ], [ 65, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 94, 95 ], [ 94, 96 ], [ 90, 97 ], [ 65, 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 ], [ 118, 124 ], [ 124, 125 ], [ 124, 126 ], [ 6, 127 ], [ 127, 128 ], [ 159, 129 ], [ 129, 130 ], [ 129, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 131, 135 ], [ 135, 136 ], [ 135, 137 ], [ 137, 138 ], [ 137, 139 ], [ 131, 140 ], [ 140, 141 ], [ 141, 142 ], [ 141, 143 ], [ 140, 144 ], [ 144, 145 ], [ 144, 146 ], [ 131, 147 ], [ 147, 148 ], [ 148, 149 ], [ 148, 150 ], [ 147, 151 ], [ 129, 152 ], [ 152, 153 ], [ 129, 154 ], [ 154, 155 ], [ 129, 156 ], [ 156, 157 ], [ 0, 158 ], [ 158, 159 ], [ 158, 160 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] x = new int[w];\n\t\tString empty = sc.nextLine();\n\n\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\tx[i] = i + 1;\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString str = sc.nextLine();\n\t\t\tString ints[] = str.split(\",\", 0);\n\t\t\tint a = Integer.parseInt(ints[0]) - 1;\n\t\t\tint b = Integer.parseInt(ints[1]) - 1;\n\t\t\tSwap(a, b, x);\n\t\t}\n\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\tSystem.out.printf(\"%d\\n\", x[i]);\n\t\t}\n\t}\n\n\tprivate static void Swap(int a, int b, int[] x) {\n\t\t// TODO Auto-generated method stub\n\t\tint tmp = 0;\n\t\ttmp = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = tmp;\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] x = new int[w];\n\t\tString empty = sc.nextLine();\n\n\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\tx[i] = i + 1;\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString str = sc.nextLine();\n\t\t\tString ints[] = str.split(\",\", 0);\n\t\t\tint a = Integer.parseInt(ints[0]) - 1;\n\t\t\tint b = Integer.parseInt(ints[1]) - 1;\n\t\t\tSwap(a, b, x);\n\t\t}\n\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\tSystem.out.printf(\"%d\\n\", x[i]);\n\t\t}\n\t}\n\n\tprivate static void Swap(int a, int b, int[] x) {\n\t\t// TODO Auto-generated method stub\n\t\tint tmp = 0;\n\t\ttmp = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = tmp;\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] x = new int[w];\n\t\tString empty = sc.nextLine();\n\n\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\tx[i] = i + 1;\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString str = sc.nextLine();\n\t\t\tString ints[] = str.split(\",\", 0);\n\t\t\tint a = Integer.parseInt(ints[0]) - 1;\n\t\t\tint b = Integer.parseInt(ints[1]) - 1;\n\t\t\tSwap(a, b, x);\n\t\t}\n\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\tSystem.out.printf(\"%d\\n\", x[i]);\n\t\t}\n\t}", "main", "{\n\t\t// TODO Auto-generated method stub\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] x = new int[w];\n\t\tString empty = sc.nextLine();\n\n\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\tx[i] = i + 1;\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString str = sc.nextLine();\n\t\t\tString ints[] = str.split(\",\", 0);\n\t\t\tint a = Integer.parseInt(ints[0]) - 1;\n\t\t\tint b = Integer.parseInt(ints[1]) - 1;\n\t\t\tSwap(a, b, x);\n\t\t}\n\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\tSystem.out.printf(\"%d\\n\", x[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[] x = new int[w];", "x", "new int[w]", "w", "String empty = sc.nextLine();", "empty", "sc.nextLine()", "sc.nextLine", "sc", "for (int i = 0; i < x.length; i++) {\n\t\t\tx[i] = i + 1;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < x.length", "i", "x.length", "x", "x.length", "i++", "i++", "i", "{\n\t\t\tx[i] = i + 1;\n\t\t}", "{\n\t\t\tx[i] = i + 1;\n\t\t}", "x[i] = i + 1", "x[i]", "x", "i", "i + 1", "i", "1", "for (int i = 0; i < n; i++) {\n\t\t\tString str = sc.nextLine();\n\t\t\tString ints[] = str.split(\",\", 0);\n\t\t\tint a = Integer.parseInt(ints[0]) - 1;\n\t\t\tint b = Integer.parseInt(ints[1]) - 1;\n\t\t\tSwap(a, b, x);\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tString str = sc.nextLine();\n\t\t\tString ints[] = str.split(\",\", 0);\n\t\t\tint a = Integer.parseInt(ints[0]) - 1;\n\t\t\tint b = Integer.parseInt(ints[1]) - 1;\n\t\t\tSwap(a, b, x);\n\t\t}", "{\n\t\t\tString str = sc.nextLine();\n\t\t\tString ints[] = str.split(\",\", 0);\n\t\t\tint a = Integer.parseInt(ints[0]) - 1;\n\t\t\tint b = Integer.parseInt(ints[1]) - 1;\n\t\t\tSwap(a, b, x);\n\t\t}", "String str = sc.nextLine();", "str", "sc.nextLine()", "sc.nextLine", "sc", "String ints[] = str.split(\",\", 0);", "ints", "str.split(\",\", 0)", "str.split", "str", "\",\"", "0", "int a = Integer.parseInt(ints[0]) - 1;", "a", "Integer.parseInt(ints[0]) - 1", "Integer.parseInt(ints[0])", "Integer.parseInt", "Integer", "ints[0]", "ints", "0", "1", "int b = Integer.parseInt(ints[1]) - 1;", "b", "Integer.parseInt(ints[1]) - 1", "Integer.parseInt(ints[1])", "Integer.parseInt", "Integer", "ints[1]", "ints", "1", "1", "Swap(a, b, x)", "Swap", "a", "b", "x", "for (int i = 0; i < x.length; i++) {\n\t\t\tSystem.out.printf(\"%d\\n\", x[i]);\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < x.length", "i", "x.length", "x", "x.length", "i++", "i++", "i", "{\n\t\t\tSystem.out.printf(\"%d\\n\", x[i]);\n\t\t}", "{\n\t\t\tSystem.out.printf(\"%d\\n\", x[i]);\n\t\t}", "System.out.printf(\"%d\\n\", x[i])", "System.out.printf", "System.out", "System", "System.out", "\"%d\\n\"", "x[i]", "x", "i", "String[] args", "args", "private static void Swap(int a, int b, int[] x) {\n\t\t// TODO Auto-generated method stub\n\t\tint tmp = 0;\n\t\ttmp = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = tmp;\n\t}", "Swap", "{\n\t\t// TODO Auto-generated method stub\n\t\tint tmp = 0;\n\t\ttmp = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = tmp;\n\t}", "int tmp = 0;", "tmp", "0", "tmp = x[a]", "tmp", "x[a]", "x", "a", "x[a] = x[b]", "x[a]", "x", "a", "x[b]", "x", "b", "x[b] = tmp", "x[b]", "x", "b", "tmp", "int a", "a", "int b", "b", "int[] x", "x", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] x = new int[w];\n\t\tString empty = sc.nextLine();\n\n\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\tx[i] = i + 1;\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString str = sc.nextLine();\n\t\t\tString ints[] = str.split(\",\", 0);\n\t\t\tint a = Integer.parseInt(ints[0]) - 1;\n\t\t\tint b = Integer.parseInt(ints[1]) - 1;\n\t\t\tSwap(a, b, x);\n\t\t}\n\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\tSystem.out.printf(\"%d\\n\", x[i]);\n\t\t}\n\t}\n\n\tprivate static void Swap(int a, int b, int[] x) {\n\t\t// TODO Auto-generated method stub\n\t\tint tmp = 0;\n\t\ttmp = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = tmp;\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] x = new int[w];\n\t\tString empty = sc.nextLine();\n\n\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\tx[i] = i + 1;\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString str = sc.nextLine();\n\t\t\tString ints[] = str.split(\",\", 0);\n\t\t\tint a = Integer.parseInt(ints[0]) - 1;\n\t\t\tint b = Integer.parseInt(ints[1]) - 1;\n\t\t\tSwap(a, b, x);\n\t\t}\n\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\tSystem.out.printf(\"%d\\n\", x[i]);\n\t\t}\n\t}\n\n\tprivate static void Swap(int a, int b, int[] x) {\n\t\t// TODO Auto-generated method stub\n\t\tint tmp = 0;\n\t\ttmp = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = tmp;\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int n = sc.nextInt(); int[] x = new int[w]; String empty = sc.nextLine(); for (int i = 0; i < x.length; i++) { x[i] = i + 1; } for (int i = 0; i < n; i++) { String str = sc.nextLine(); String ints[] = str.split(",", 0); int a = Integer.parseInt(ints[0]) - 1; int b = Integer.parseInt(ints[1]) - 1; Swap(a, b, x); } for (int i = 0; i < x.length; i++) { System.out.printf("%d\n", x[i]); } } private static void Swap(int a, int b, int[] x) { // TODO Auto-generated method stub int tmp = 0; tmp = x[a]; x[a] = x[b]; x[b] = tmp; } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 17, 0, 13, 20, 2, 13, 17, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 2, 13, 17, 2, 13, 17, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 4, 18, 13, 17, 0, 13, 4, 18, 13, 0, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 2, 13, 17, 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 ], [ 147, 14 ], [ 147, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 17, 21 ], [ 21, 22 ], [ 17, 23 ], [ 23, 24 ], [ 17, 25 ], [ 25, 26 ], [ 17, 27 ], [ 27, 28 ], [ 17, 29 ], [ 29, 30 ], [ 17, 31 ], [ 31, 32 ], [ 17, 33 ], [ 33, 34 ], [ 17, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 17, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 17, 45 ], [ 45, 46 ], [ 46, 47 ], [ 45, 48 ], [ 17, 49 ], [ 49, 50 ], [ 49, 51 ], [ 52, 53 ], [ 52, 54 ], [ 17, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 55, 60 ], [ 60, 61 ], [ 60, 62 ], [ 55, 63 ], [ 63, 64 ], [ 64, 65 ], [ 55, 66 ], [ 67, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 71, 73 ], [ 68, 74 ], [ 74, 75 ], [ 74, 76 ], [ 17, 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 ], [ 96, 97 ], [ 95, 98 ], [ 89, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 102, 103 ], [ 89, 104 ], [ 104, 105 ], [ 104, 106 ], [ 106, 107 ], [ 106, 108 ], [ 89, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 109, 113 ], [ 113, 114 ], [ 113, 115 ], [ 89, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 116, 120 ], [ 17, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 121, 126 ], [ 126, 127 ], [ 126, 128 ], [ 121, 129 ], [ 129, 130 ], [ 130, 131 ], [ 121, 132 ], [ 133, 133 ], [ 133, 134 ], [ 134, 135 ], [ 135, 136 ], [ 136, 137 ], [ 136, 138 ], [ 134, 139 ], [ 139, 140 ], [ 139, 141 ], [ 141, 142 ], [ 141, 143 ], [ 15, 144 ], [ 144, 145 ], [ 0, 146 ], [ 146, 147 ], [ 146, 148 ] ]
[ "import java.io.*;\nimport java.lang.*;\nimport java.util.Scanner;\nimport java.util.Arrays;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w, n, i, tmp;\n\t\tint L,R;\n\t\tint list[];\n\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\n\t\tsc.useDelimiter(\",| |\\\\n\");\n\n\t\tlist = new int[w + 1];\n\t\tfor(i = 0; i < w; i++){\n\t\t\tlist[i + 1] = i + 1;\n\t\t}\n\n\t\tfor(i = 0; i < n; i++){\n\t\t\tL = sc.nextInt();\n\t\t\tsc.skip(\",\");\n\t\t\tR = sc.nextInt();\n\t\t\t//System.out.println(L + \",\" + R);\n\t\t\ttmp = list[L];\n\t\t\tlist[L] = list[R];\n\t\t\tlist[R] = tmp;\n\t\t}\n\n\t\tfor(i = 0; i < w; i++){\n\t\t\tSystem.out.println(list[i + 1]);\n\t\t}\n\t\t\n\t}\n}", "import java.io.*;", "io.*", "java", "import java.lang.*;", "lang.*", "java", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.Arrays;", "Arrays", "java.util", "public class Main {\n\tpublic static void main(String[] args) throws IOException{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w, n, i, tmp;\n\t\tint L,R;\n\t\tint list[];\n\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\n\t\tsc.useDelimiter(\",| |\\\\n\");\n\n\t\tlist = new int[w + 1];\n\t\tfor(i = 0; i < w; i++){\n\t\t\tlist[i + 1] = i + 1;\n\t\t}\n\n\t\tfor(i = 0; i < n; i++){\n\t\t\tL = sc.nextInt();\n\t\t\tsc.skip(\",\");\n\t\t\tR = sc.nextInt();\n\t\t\t//System.out.println(L + \",\" + R);\n\t\t\ttmp = list[L];\n\t\t\tlist[L] = list[R];\n\t\t\tlist[R] = tmp;\n\t\t}\n\n\t\tfor(i = 0; i < w; i++){\n\t\t\tSystem.out.println(list[i + 1]);\n\t\t}\n\t\t\n\t}\n}", "Main", "public static void main(String[] args) throws IOException{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w, n, i, tmp;\n\t\tint L,R;\n\t\tint list[];\n\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\n\t\tsc.useDelimiter(\",| |\\\\n\");\n\n\t\tlist = new int[w + 1];\n\t\tfor(i = 0; i < w; i++){\n\t\t\tlist[i + 1] = i + 1;\n\t\t}\n\n\t\tfor(i = 0; i < n; i++){\n\t\t\tL = sc.nextInt();\n\t\t\tsc.skip(\",\");\n\t\t\tR = sc.nextInt();\n\t\t\t//System.out.println(L + \",\" + R);\n\t\t\ttmp = list[L];\n\t\t\tlist[L] = list[R];\n\t\t\tlist[R] = tmp;\n\t\t}\n\n\t\tfor(i = 0; i < w; i++){\n\t\t\tSystem.out.println(list[i + 1]);\n\t\t}\n\t\t\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w, n, i, tmp;\n\t\tint L,R;\n\t\tint list[];\n\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\n\t\tsc.useDelimiter(\",| |\\\\n\");\n\n\t\tlist = new int[w + 1];\n\t\tfor(i = 0; i < w; i++){\n\t\t\tlist[i + 1] = i + 1;\n\t\t}\n\n\t\tfor(i = 0; i < n; i++){\n\t\t\tL = sc.nextInt();\n\t\t\tsc.skip(\",\");\n\t\t\tR = sc.nextInt();\n\t\t\t//System.out.println(L + \",\" + R);\n\t\t\ttmp = list[L];\n\t\t\tlist[L] = list[R];\n\t\t\tlist[R] = tmp;\n\t\t}\n\n\t\tfor(i = 0; i < w; i++){\n\t\t\tSystem.out.println(list[i + 1]);\n\t\t}\n\t\t\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int w", "w", "n", "n", "i", "i", "tmp;", "tmp", "int L", "L", "R;", "R", "int list[];", "list", "w = sc.nextInt()", "w", "sc.nextInt()", "sc.nextInt", "sc", "n = sc.nextInt()", "n", "sc.nextInt()", "sc.nextInt", "sc", "sc.useDelimiter(\",| |\\\\n\")", "sc.useDelimiter", "sc", "\",| |\\\\n\"", "list = new int[w + 1]", "list", "new int[w + 1]", "w + 1", "w", "1", "for(i = 0; i < w; i++){\n\t\t\tlist[i + 1] = i + 1;\n\t\t}", "i = 0;", "i = 0", "i", "0", "i < w", "i", "w", "i++", "i++", "i", "{\n\t\t\tlist[i + 1] = i + 1;\n\t\t}", "{\n\t\t\tlist[i + 1] = i + 1;\n\t\t}", "list[i + 1] = i + 1", "list[i + 1]", "list", "i + 1", "i", "1", "i + 1", "i", "1", "for(i = 0; i < n; i++){\n\t\t\tL = sc.nextInt();\n\t\t\tsc.skip(\",\");\n\t\t\tR = sc.nextInt();\n\t\t\t//System.out.println(L + \",\" + R);\n\t\t\ttmp = list[L];\n\t\t\tlist[L] = list[R];\n\t\t\tlist[R] = tmp;\n\t\t}", "i = 0;", "i = 0", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tL = sc.nextInt();\n\t\t\tsc.skip(\",\");\n\t\t\tR = sc.nextInt();\n\t\t\t//System.out.println(L + \",\" + R);\n\t\t\ttmp = list[L];\n\t\t\tlist[L] = list[R];\n\t\t\tlist[R] = tmp;\n\t\t}", "{\n\t\t\tL = sc.nextInt();\n\t\t\tsc.skip(\",\");\n\t\t\tR = sc.nextInt();\n\t\t\t//System.out.println(L + \",\" + R);\n\t\t\ttmp = list[L];\n\t\t\tlist[L] = list[R];\n\t\t\tlist[R] = tmp;\n\t\t}", "L = sc.nextInt()", "L", "sc.nextInt()", "sc.nextInt", "sc", "sc.skip(\",\")", "sc.skip", "sc", "\",\"", "R = sc.nextInt()", "R", "sc.nextInt()", "sc.nextInt", "sc", "tmp = list[L]", "tmp", "list[L]", "list", "L", "list[L] = list[R]", "list[L]", "list", "L", "list[R]", "list", "R", "list[R] = tmp", "list[R]", "list", "R", "tmp", "for(i = 0; i < w; i++){\n\t\t\tSystem.out.println(list[i + 1]);\n\t\t}", "i = 0;", "i = 0", "i", "0", "i < w", "i", "w", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(list[i + 1]);\n\t\t}", "{\n\t\t\tSystem.out.println(list[i + 1]);\n\t\t}", "System.out.println(list[i + 1])", "System.out.println", "System.out", "System", "System.out", "list[i + 1]", "list", "i + 1", "i", "1", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) throws IOException{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w, n, i, tmp;\n\t\tint L,R;\n\t\tint list[];\n\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\n\t\tsc.useDelimiter(\",| |\\\\n\");\n\n\t\tlist = new int[w + 1];\n\t\tfor(i = 0; i < w; i++){\n\t\t\tlist[i + 1] = i + 1;\n\t\t}\n\n\t\tfor(i = 0; i < n; i++){\n\t\t\tL = sc.nextInt();\n\t\t\tsc.skip(\",\");\n\t\t\tR = sc.nextInt();\n\t\t\t//System.out.println(L + \",\" + R);\n\t\t\ttmp = list[L];\n\t\t\tlist[L] = list[R];\n\t\t\tlist[R] = tmp;\n\t\t}\n\n\t\tfor(i = 0; i < w; i++){\n\t\t\tSystem.out.println(list[i + 1]);\n\t\t}\n\t\t\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) throws IOException{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w, n, i, tmp;\n\t\tint L,R;\n\t\tint list[];\n\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\n\t\tsc.useDelimiter(\",| |\\\\n\");\n\n\t\tlist = new int[w + 1];\n\t\tfor(i = 0; i < w; i++){\n\t\t\tlist[i + 1] = i + 1;\n\t\t}\n\n\t\tfor(i = 0; i < n; i++){\n\t\t\tL = sc.nextInt();\n\t\t\tsc.skip(\",\");\n\t\t\tR = sc.nextInt();\n\t\t\t//System.out.println(L + \",\" + R);\n\t\t\ttmp = list[L];\n\t\t\tlist[L] = list[R];\n\t\t\tlist[R] = tmp;\n\t\t}\n\n\t\tfor(i = 0; i < w; i++){\n\t\t\tSystem.out.println(list[i + 1]);\n\t\t}\n\t\t\n\t}\n}", "Main" ]
import java.io.*; import java.lang.*; import java.util.Scanner; import java.util.Arrays; public class Main { public static void main(String[] args) throws IOException{ Scanner sc = new Scanner(System.in); int w, n, i, tmp; int L,R; int list[]; w = sc.nextInt(); n = sc.nextInt(); sc.useDelimiter(",| |\\n"); list = new int[w + 1]; for(i = 0; i < w; i++){ list[i + 1] = i + 1; } for(i = 0; i < n; i++){ L = sc.nextInt(); sc.skip(","); R = sc.nextInt(); //System.out.println(L + "," + R); tmp = list[L]; list[L] = list[R]; list[R] = tmp; } for(i = 0; i < w; i++){ System.out.println(list[i + 1]); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 38, 5, 13, 30, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 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, 41, 13, 41, 13, 41, 13, 20, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 4, 18, 13, 17, 0, 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 ], [ 145, 5 ], [ 145, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ], [ 13, 15 ], [ 12, 16 ], [ 16, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 19, 22 ], [ 22, 23 ], [ 23, 24 ], [ 16, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 27, 30 ], [ 30, 31 ], [ 31, 32 ], [ 16, 33 ], [ 33, 34 ], [ 16, 35 ], [ 35, 36 ], [ 35, 37 ], [ 38, 39 ], [ 38, 40 ], [ 16, 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 ], [ 16, 59 ], [ 59, 60 ], [ 16, 61 ], [ 61, 62 ], [ 16, 63 ], [ 63, 64 ], [ 63, 65 ], [ 16, 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 ], [ 84, 85 ], [ 85, 86 ], [ 82, 87 ], [ 79, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 91, 92 ], [ 90, 93 ], [ 93, 94 ], [ 93, 95 ], [ 79, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 99, 100 ], [ 98, 101 ], [ 101, 102 ], [ 101, 103 ], [ 79, 104 ], [ 104, 105 ], [ 104, 106 ], [ 106, 107 ], [ 106, 108 ], [ 79, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 109, 113 ], [ 113, 114 ], [ 113, 115 ], [ 79, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 116, 120 ], [ 16, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 121, 126 ], [ 126, 127 ], [ 126, 128 ], [ 121, 129 ], [ 129, 130 ], [ 130, 131 ], [ 121, 132 ], [ 133, 133 ], [ 133, 134 ], [ 134, 135 ], [ 135, 136 ], [ 136, 137 ], [ 136, 138 ], [ 134, 139 ], [ 139, 140 ], [ 139, 141 ], [ 6, 142 ], [ 142, 143 ], [ 0, 144 ], [ 144, 145 ], [ 144, 146 ] ]
[ "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\ttry{\n\t\t\tint w=Integer.parseInt(br.readLine());\n\t\t\tint n=Integer.parseInt(br.readLine());\n\t\t\tint rep;\n\t\t\tint[] line=new int[w+1];\n\t\t\tfor(int i=1;i<=w;i++){\t//line[]に1〜wを代入\n\t\t\t\tline[i]=i;\n\t\t\t}\n\t\t\tint a,b;\n\t\t\tString[] str=new String[2];\n\t\t\tfor(int i=0;i<n;i++){\n\t\t\t\tstr=br.readLine().split(\",\");\n\t\t\t\ta=Integer.parseInt(str[0]);\n\t\t\t\tb=Integer.parseInt(str[1]);\n\t\t\t\trep=line[a];\t//line[a]とline[b]を入換\n\t\t\t\tline[a]=line[b];\n\t\t\t\tline[b]=rep;\n\t\t\t}\n\t\t\tfor(int i=1;i<=w;i++){\n\t\t\t\tSystem.out.println(line[i]);\n\t\t\t}\n\t\t}catch(Exception e){\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\ttry{\n\t\t\tint w=Integer.parseInt(br.readLine());\n\t\t\tint n=Integer.parseInt(br.readLine());\n\t\t\tint rep;\n\t\t\tint[] line=new int[w+1];\n\t\t\tfor(int i=1;i<=w;i++){\t//line[]に1〜wを代入\n\t\t\t\tline[i]=i;\n\t\t\t}\n\t\t\tint a,b;\n\t\t\tString[] str=new String[2];\n\t\t\tfor(int i=0;i<n;i++){\n\t\t\t\tstr=br.readLine().split(\",\");\n\t\t\t\ta=Integer.parseInt(str[0]);\n\t\t\t\tb=Integer.parseInt(str[1]);\n\t\t\t\trep=line[a];\t//line[a]とline[b]を入換\n\t\t\t\tline[a]=line[b];\n\t\t\t\tline[b]=rep;\n\t\t\t}\n\t\t\tfor(int i=1;i<=w;i++){\n\t\t\t\tSystem.out.println(line[i]);\n\t\t\t}\n\t\t}catch(Exception e){\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\ttry{\n\t\t\tint w=Integer.parseInt(br.readLine());\n\t\t\tint n=Integer.parseInt(br.readLine());\n\t\t\tint rep;\n\t\t\tint[] line=new int[w+1];\n\t\t\tfor(int i=1;i<=w;i++){\t//line[]に1〜wを代入\n\t\t\t\tline[i]=i;\n\t\t\t}\n\t\t\tint a,b;\n\t\t\tString[] str=new String[2];\n\t\t\tfor(int i=0;i<n;i++){\n\t\t\t\tstr=br.readLine().split(\",\");\n\t\t\t\ta=Integer.parseInt(str[0]);\n\t\t\t\tb=Integer.parseInt(str[1]);\n\t\t\t\trep=line[a];\t//line[a]とline[b]を入換\n\t\t\t\tline[a]=line[b];\n\t\t\t\tline[b]=rep;\n\t\t\t}\n\t\t\tfor(int i=1;i<=w;i++){\n\t\t\t\tSystem.out.println(line[i]);\n\t\t\t}\n\t\t}catch(Exception e){\n\t\t}\n\t}", "main", "{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\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 rep;\n\t\t\tint[] line=new int[w+1];\n\t\t\tfor(int i=1;i<=w;i++){\t//line[]に1〜wを代入\n\t\t\t\tline[i]=i;\n\t\t\t}\n\t\t\tint a,b;\n\t\t\tString[] str=new String[2];\n\t\t\tfor(int i=0;i<n;i++){\n\t\t\t\tstr=br.readLine().split(\",\");\n\t\t\t\ta=Integer.parseInt(str[0]);\n\t\t\t\tb=Integer.parseInt(str[1]);\n\t\t\t\trep=line[a];\t//line[a]とline[b]を入換\n\t\t\t\tline[a]=line[b];\n\t\t\t\tline[b]=rep;\n\t\t\t}\n\t\t\tfor(int i=1;i<=w;i++){\n\t\t\t\tSystem.out.println(line[i]);\n\t\t\t}\n\t\t}catch(Exception e){\n\t\t}\n\t}", "BufferedReader br=new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "try{\n\t\t\tint w=Integer.parseInt(br.readLine());\n\t\t\tint n=Integer.parseInt(br.readLine());\n\t\t\tint rep;\n\t\t\tint[] line=new int[w+1];\n\t\t\tfor(int i=1;i<=w;i++){\t//line[]に1〜wを代入\n\t\t\t\tline[i]=i;\n\t\t\t}\n\t\t\tint a,b;\n\t\t\tString[] str=new String[2];\n\t\t\tfor(int i=0;i<n;i++){\n\t\t\t\tstr=br.readLine().split(\",\");\n\t\t\t\ta=Integer.parseInt(str[0]);\n\t\t\t\tb=Integer.parseInt(str[1]);\n\t\t\t\trep=line[a];\t//line[a]とline[b]を入換\n\t\t\t\tline[a]=line[b];\n\t\t\t\tline[b]=rep;\n\t\t\t}\n\t\t\tfor(int i=1;i<=w;i++){\n\t\t\t\tSystem.out.println(line[i]);\n\t\t\t}\n\t\t}catch(Exception e){\n\t\t}", "catch(Exception e){\n\t\t}", "Exception e", "{\n\t\t}", "{\n\t\t\tint w=Integer.parseInt(br.readLine());\n\t\t\tint n=Integer.parseInt(br.readLine());\n\t\t\tint rep;\n\t\t\tint[] line=new int[w+1];\n\t\t\tfor(int i=1;i<=w;i++){\t//line[]に1〜wを代入\n\t\t\t\tline[i]=i;\n\t\t\t}\n\t\t\tint a,b;\n\t\t\tString[] str=new String[2];\n\t\t\tfor(int i=0;i<n;i++){\n\t\t\t\tstr=br.readLine().split(\",\");\n\t\t\t\ta=Integer.parseInt(str[0]);\n\t\t\t\tb=Integer.parseInt(str[1]);\n\t\t\t\trep=line[a];\t//line[a]とline[b]を入換\n\t\t\t\tline[a]=line[b];\n\t\t\t\tline[b]=rep;\n\t\t\t}\n\t\t\tfor(int i=1;i<=w;i++){\n\t\t\t\tSystem.out.println(line[i]);\n\t\t\t}\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 rep;", "rep", "int[] line=new int[w+1];", "line", "new int[w+1]", "w+1", "w", "1", "for(int i=1;i<=w;i++){\t//line[]に1〜wを代入\n\t\t\t\tline[i]=i;\n\t\t\t}", "int i=1;", "int i=1;", "i", "1", "i<=w", "i", "w", "i++", "i++", "i", "{\t//line[]に1〜wを代入\n\t\t\t\tline[i]=i;\n\t\t\t}", "{\t//line[]に1〜wを代入\n\t\t\t\tline[i]=i;\n\t\t\t}", "line[i]=i", "line[i]", "line", "i", "i", "int a", "a", "b;", "b", "String[] str=new String[2];", "str", "new String[2]", "2", "for(int i=0;i<n;i++){\n\t\t\t\tstr=br.readLine().split(\",\");\n\t\t\t\ta=Integer.parseInt(str[0]);\n\t\t\t\tb=Integer.parseInt(str[1]);\n\t\t\t\trep=line[a];\t//line[a]とline[b]を入換\n\t\t\t\tline[a]=line[b];\n\t\t\t\tline[b]=rep;\n\t\t\t}", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t\t\t\tstr=br.readLine().split(\",\");\n\t\t\t\ta=Integer.parseInt(str[0]);\n\t\t\t\tb=Integer.parseInt(str[1]);\n\t\t\t\trep=line[a];\t//line[a]とline[b]を入換\n\t\t\t\tline[a]=line[b];\n\t\t\t\tline[b]=rep;\n\t\t\t}", "{\n\t\t\t\tstr=br.readLine().split(\",\");\n\t\t\t\ta=Integer.parseInt(str[0]);\n\t\t\t\tb=Integer.parseInt(str[1]);\n\t\t\t\trep=line[a];\t//line[a]とline[b]を入換\n\t\t\t\tline[a]=line[b];\n\t\t\t\tline[b]=rep;\n\t\t\t}", "str=br.readLine().split(\",\")", "str", "br.readLine().split(\",\")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\",\"", "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", "rep=line[a]", "rep", "line[a]", "line", "a", "line[a]=line[b]", "line[a]", "line", "a", "line[b]", "line", "b", "line[b]=rep", "line[b]", "line", "b", "rep", "for(int i=1;i<=w;i++){\n\t\t\t\tSystem.out.println(line[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(line[i]);\n\t\t\t}", "{\n\t\t\t\tSystem.out.println(line[i]);\n\t\t\t}", "System.out.println(line[i])", "System.out.println", "System.out", "System", "System.out", "line[i]", "line", "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\ttry{\n\t\t\tint w=Integer.parseInt(br.readLine());\n\t\t\tint n=Integer.parseInt(br.readLine());\n\t\t\tint rep;\n\t\t\tint[] line=new int[w+1];\n\t\t\tfor(int i=1;i<=w;i++){\t//line[]に1〜wを代入\n\t\t\t\tline[i]=i;\n\t\t\t}\n\t\t\tint a,b;\n\t\t\tString[] str=new String[2];\n\t\t\tfor(int i=0;i<n;i++){\n\t\t\t\tstr=br.readLine().split(\",\");\n\t\t\t\ta=Integer.parseInt(str[0]);\n\t\t\t\tb=Integer.parseInt(str[1]);\n\t\t\t\trep=line[a];\t//line[a]とline[b]を入換\n\t\t\t\tline[a]=line[b];\n\t\t\t\tline[b]=rep;\n\t\t\t}\n\t\t\tfor(int i=1;i<=w;i++){\n\t\t\t\tSystem.out.println(line[i]);\n\t\t\t}\n\t\t}catch(Exception e){\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\ttry{\n\t\t\tint w=Integer.parseInt(br.readLine());\n\t\t\tint n=Integer.parseInt(br.readLine());\n\t\t\tint rep;\n\t\t\tint[] line=new int[w+1];\n\t\t\tfor(int i=1;i<=w;i++){\t//line[]に1〜wを代入\n\t\t\t\tline[i]=i;\n\t\t\t}\n\t\t\tint a,b;\n\t\t\tString[] str=new String[2];\n\t\t\tfor(int i=0;i<n;i++){\n\t\t\t\tstr=br.readLine().split(\",\");\n\t\t\t\ta=Integer.parseInt(str[0]);\n\t\t\t\tb=Integer.parseInt(str[1]);\n\t\t\t\trep=line[a];\t//line[a]とline[b]を入換\n\t\t\t\tline[a]=line[b];\n\t\t\t\tline[b]=rep;\n\t\t\t}\n\t\t\tfor(int i=1;i<=w;i++){\n\t\t\t\tSystem.out.println(line[i]);\n\t\t\t}\n\t\t}catch(Exception e){\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)); try{ int w=Integer.parseInt(br.readLine()); int n=Integer.parseInt(br.readLine()); int rep; int[] line=new int[w+1]; for(int i=1;i<=w;i++){ //line[]に1〜wを代入 line[i]=i; } int a,b; String[] str=new String[2]; for(int i=0;i<n;i++){ str=br.readLine().split(","); a=Integer.parseInt(str[0]); b=Integer.parseInt(str[1]); rep=line[a]; //line[a]とline[b]を入換 line[a]=line[b]; line[b]=rep; } for(int i=1;i<=w;i++){ System.out.println(line[i]); } }catch(Exception e){ } } }
[ 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, 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, 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, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 137, 5 ], [ 137, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 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 ], [ 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 ], [ 72, 75 ], [ 64, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 79, 82 ], [ 82, 83 ], [ 82, 84 ], [ 78, 85 ], [ 64, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 89, 92 ], [ 92, 93 ], [ 92, 94 ], [ 88, 95 ], [ 64, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 98, 100 ], [ 64, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 101, 105 ], [ 105, 106 ], [ 105, 107 ], [ 64, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 108, 112 ], [ 8, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 113, 118 ], [ 118, 119 ], [ 118, 120 ], [ 113, 121 ], [ 121, 122 ], [ 122, 123 ], [ 113, 124 ], [ 125, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 128, 129 ], [ 128, 130 ], [ 126, 131 ], [ 131, 132 ], [ 131, 133 ], [ 6, 134 ], [ 134, 135 ], [ 0, 136 ], [ 136, 137 ], [ 136, 138 ] ]
[ "import java.util.Scanner;\n\npublic class Main{\n public static void main(String[]argc){\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int a,b,c;\n int[] t = new int[w];\n for(int i=0;i<w;i++){\n t[i]=i+1;\n }\n for(int i=0;i<n;i++){\n String s = sc.next();\n String[] suuti = s.split(\",\");\n a = Integer.parseInt(suuti[0])-1;\n b = Integer.parseInt(suuti[1])-1;\n c = t[a];\n t[a] = t[b];\n t[b] = c;\n }\n for(int i=0;i<w;i++){\n System.out.println(t[i]);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n public static void main(String[]argc){\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int a,b,c;\n int[] t = new int[w];\n for(int i=0;i<w;i++){\n t[i]=i+1;\n }\n for(int i=0;i<n;i++){\n String s = sc.next();\n String[] suuti = s.split(\",\");\n a = Integer.parseInt(suuti[0])-1;\n b = Integer.parseInt(suuti[1])-1;\n c = t[a];\n t[a] = t[b];\n t[b] = c;\n }\n for(int i=0;i<w;i++){\n System.out.println(t[i]);\n }\n }\n}", "Main", "public static void main(String[]argc){\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int a,b,c;\n int[] t = new int[w];\n for(int i=0;i<w;i++){\n t[i]=i+1;\n }\n for(int i=0;i<n;i++){\n String s = sc.next();\n String[] suuti = s.split(\",\");\n a = Integer.parseInt(suuti[0])-1;\n b = Integer.parseInt(suuti[1])-1;\n c = t[a];\n t[a] = t[b];\n t[b] = c;\n }\n for(int i=0;i<w;i++){\n System.out.println(t[i]);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int a,b,c;\n int[] t = new int[w];\n for(int i=0;i<w;i++){\n t[i]=i+1;\n }\n for(int i=0;i<n;i++){\n String s = sc.next();\n String[] suuti = s.split(\",\");\n a = Integer.parseInt(suuti[0])-1;\n b = Integer.parseInt(suuti[1])-1;\n c = t[a];\n t[a] = t[b];\n t[b] = c;\n }\n for(int i=0;i<w;i++){\n System.out.println(t[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 a", "a", "b", "b", "c;", "c", "int[] t = new int[w];", "t", "new int[w]", "w", "for(int i=0;i<w;i++){\n t[i]=i+1;\n }", "int i=0;", "int i=0;", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "{\n t[i]=i+1;\n }", "{\n t[i]=i+1;\n }", "t[i]=i+1", "t[i]", "t", "i", "i+1", "i", "1", "for(int i=0;i<n;i++){\n String s = sc.next();\n String[] suuti = s.split(\",\");\n a = Integer.parseInt(suuti[0])-1;\n b = Integer.parseInt(suuti[1])-1;\n c = t[a];\n t[a] = t[b];\n t[b] = c;\n }", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n String s = sc.next();\n String[] suuti = s.split(\",\");\n a = Integer.parseInt(suuti[0])-1;\n b = Integer.parseInt(suuti[1])-1;\n c = t[a];\n t[a] = t[b];\n t[b] = c;\n }", "{\n String s = sc.next();\n String[] suuti = s.split(\",\");\n a = Integer.parseInt(suuti[0])-1;\n b = Integer.parseInt(suuti[1])-1;\n c = t[a];\n t[a] = t[b];\n t[b] = c;\n }", "String s = sc.next();", "s", "sc.next()", "sc.next", "sc", "String[] suuti = s.split(\",\");", "suuti", "s.split(\",\")", "s.split", "s", "\",\"", "a = Integer.parseInt(suuti[0])-1", "a", "Integer.parseInt(suuti[0])-1", "Integer.parseInt(suuti[0])", "Integer.parseInt", "Integer", "suuti[0]", "suuti", "0", "1", "b = Integer.parseInt(suuti[1])-1", "b", "Integer.parseInt(suuti[1])-1", "Integer.parseInt(suuti[1])", "Integer.parseInt", "Integer", "suuti[1]", "suuti", "1", "1", "c = t[a]", "c", "t[a]", "t", "a", "t[a] = t[b]", "t[a]", "t", "a", "t[b]", "t", "b", "t[b] = c", "t[b]", "t", "b", "c", "for(int i=0;i<w;i++){\n System.out.println(t[i]);\n }", "int i=0;", "int i=0;", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "{\n System.out.println(t[i]);\n }", "{\n System.out.println(t[i]);\n }", "System.out.println(t[i])", "System.out.println", "System.out", "System", "System.out", "t[i]", "t", "i", "String[]argc", "argc", "public class Main{\n public static void main(String[]argc){\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int a,b,c;\n int[] t = new int[w];\n for(int i=0;i<w;i++){\n t[i]=i+1;\n }\n for(int i=0;i<n;i++){\n String s = sc.next();\n String[] suuti = s.split(\",\");\n a = Integer.parseInt(suuti[0])-1;\n b = Integer.parseInt(suuti[1])-1;\n c = t[a];\n t[a] = t[b];\n t[b] = c;\n }\n for(int i=0;i<w;i++){\n System.out.println(t[i]);\n }\n }\n}", "public class Main{\n public static void main(String[]argc){\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int a,b,c;\n int[] t = new int[w];\n for(int i=0;i<w;i++){\n t[i]=i+1;\n }\n for(int i=0;i<n;i++){\n String s = sc.next();\n String[] suuti = s.split(\",\");\n a = Integer.parseInt(suuti[0])-1;\n b = Integer.parseInt(suuti[1])-1;\n c = t[a];\n t[a] = t[b];\n t[b] = c;\n }\n for(int i=0;i<w;i++){\n System.out.println(t[i]);\n }\n }\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[]argc){ Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int n = sc.nextInt(); int a,b,c; int[] t = new int[w]; for(int i=0;i<w;i++){ t[i]=i+1; } for(int i=0;i<n;i++){ String s = sc.next(); String[] suuti = s.split(","); a = Integer.parseInt(suuti[0])-1; b = Integer.parseInt(suuti[1])-1; c = t[a]; t[a] = t[b]; t[b] = c; } for(int i=0;i<w;i++){ System.out.println(t[i]); } } }
[ 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, 41, 13, 20, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 4, 18, 13, 17, 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 ], [ 132, 5 ], [ 132, 6 ], [ 6, 7 ], [ 6, 8 ], [ 132, 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 ], [ 46, 48 ], [ 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 ], [ 68, 69 ], [ 65, 70 ], [ 62, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 74, 77 ], [ 77, 78 ], [ 77, 79 ], [ 73, 80 ], [ 62, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 87, 88 ], [ 87, 89 ], [ 83, 90 ], [ 62, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 93, 95 ], [ 62, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 96, 100 ], [ 100, 101 ], [ 100, 102 ], [ 62, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 103, 107 ], [ 11, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 108, 113 ], [ 113, 114 ], [ 113, 115 ], [ 108, 116 ], [ 116, 117 ], [ 117, 118 ], [ 108, 119 ], [ 120, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 121, 126 ], [ 126, 127 ], [ 126, 128 ], [ 9, 129 ], [ 129, 130 ], [ 0, 131 ], [ 131, 132 ], [ 131, 133 ] ]
[ "import java.util.*;\n\npublic class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\tint w = sc.nextInt();\n\t\tint[] ints = new int[w];\n\t\tfor (int i=0; i<w; i++) {\n\t\t\tints[i] = i+1;\n\t\t}\n\t\tint n = sc.nextInt();\n\t\tString[] strs = new String[2];\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tstrs = sc.next().split(\",\");\n\t\t\tint L = Integer.parseInt(strs[0]) - 1;\n\t\t\tint R = Integer.parseInt(strs[1]) - 1;\n\t\t\tint temp = ints[L];\n\t\t\tints[L] = ints[R];\n\t\t\tints[R] = temp;\n\t\t}\n\t\tfor (int i=0; i<w; i++) {\n\t\t\tSystem.out.println(ints[i]);\n\t\t}\n\t}\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\tint w = sc.nextInt();\n\t\tint[] ints = new int[w];\n\t\tfor (int i=0; i<w; i++) {\n\t\t\tints[i] = i+1;\n\t\t}\n\t\tint n = sc.nextInt();\n\t\tString[] strs = new String[2];\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tstrs = sc.next().split(\",\");\n\t\t\tint L = Integer.parseInt(strs[0]) - 1;\n\t\t\tint R = Integer.parseInt(strs[1]) - 1;\n\t\t\tint temp = ints[L];\n\t\t\tints[L] = ints[R];\n\t\t\tints[R] = temp;\n\t\t}\n\t\tfor (int i=0; i<w; i++) {\n\t\t\tSystem.out.println(ints[i]);\n\t\t}\n\t}\n}", "Main", "static Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "public static void main(String[] args) {\n\t\tint w = sc.nextInt();\n\t\tint[] ints = new int[w];\n\t\tfor (int i=0; i<w; i++) {\n\t\t\tints[i] = i+1;\n\t\t}\n\t\tint n = sc.nextInt();\n\t\tString[] strs = new String[2];\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tstrs = sc.next().split(\",\");\n\t\t\tint L = Integer.parseInt(strs[0]) - 1;\n\t\t\tint R = Integer.parseInt(strs[1]) - 1;\n\t\t\tint temp = ints[L];\n\t\t\tints[L] = ints[R];\n\t\t\tints[R] = temp;\n\t\t}\n\t\tfor (int i=0; i<w; i++) {\n\t\t\tSystem.out.println(ints[i]);\n\t\t}\n\t}", "main", "{\n\t\tint w = sc.nextInt();\n\t\tint[] ints = new int[w];\n\t\tfor (int i=0; i<w; i++) {\n\t\t\tints[i] = i+1;\n\t\t}\n\t\tint n = sc.nextInt();\n\t\tString[] strs = new String[2];\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tstrs = sc.next().split(\",\");\n\t\t\tint L = Integer.parseInt(strs[0]) - 1;\n\t\t\tint R = Integer.parseInt(strs[1]) - 1;\n\t\t\tint temp = ints[L];\n\t\t\tints[L] = ints[R];\n\t\t\tints[R] = temp;\n\t\t}\n\t\tfor (int i=0; i<w; i++) {\n\t\t\tSystem.out.println(ints[i]);\n\t\t}\n\t}", "int w = sc.nextInt();", "w", "sc.nextInt()", "sc.nextInt", "sc", "int[] ints = new int[w];", "ints", "new int[w]", "w", "for (int i=0; i<w; i++) {\n\t\t\tints[i] = i+1;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "{\n\t\t\tints[i] = i+1;\n\t\t}", "{\n\t\t\tints[i] = i+1;\n\t\t}", "ints[i] = i+1", "ints[i]", "ints", "i", "i+1", "i", "1", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "String[] strs = new String[2];", "strs", "new String[2]", "2", "for (int i=0; i<n; i++) {\n\t\t\tstrs = sc.next().split(\",\");\n\t\t\tint L = Integer.parseInt(strs[0]) - 1;\n\t\t\tint R = Integer.parseInt(strs[1]) - 1;\n\t\t\tint temp = ints[L];\n\t\t\tints[L] = ints[R];\n\t\t\tints[R] = temp;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t\t\tstrs = sc.next().split(\",\");\n\t\t\tint L = Integer.parseInt(strs[0]) - 1;\n\t\t\tint R = Integer.parseInt(strs[1]) - 1;\n\t\t\tint temp = ints[L];\n\t\t\tints[L] = ints[R];\n\t\t\tints[R] = temp;\n\t\t}", "{\n\t\t\tstrs = sc.next().split(\",\");\n\t\t\tint L = Integer.parseInt(strs[0]) - 1;\n\t\t\tint R = Integer.parseInt(strs[1]) - 1;\n\t\t\tint temp = ints[L];\n\t\t\tints[L] = ints[R];\n\t\t\tints[R] = temp;\n\t\t}", "strs = sc.next().split(\",\")", "strs", "sc.next().split(\",\")", "sc.next().split", "sc.next()", "sc.next", "sc", "\",\"", "int L = Integer.parseInt(strs[0]) - 1;", "L", "Integer.parseInt(strs[0]) - 1", "Integer.parseInt(strs[0])", "Integer.parseInt", "Integer", "strs[0]", "strs", "0", "1", "int R = Integer.parseInt(strs[1]) - 1;", "R", "Integer.parseInt(strs[1]) - 1", "Integer.parseInt(strs[1])", "Integer.parseInt", "Integer", "strs[1]", "strs", "1", "1", "int temp = ints[L];", "temp", "ints[L]", "ints", "L", "ints[L] = ints[R]", "ints[L]", "ints", "L", "ints[R]", "ints", "R", "ints[R] = temp", "ints[R]", "ints", "R", "temp", "for (int i=0; i<w; i++) {\n\t\t\tSystem.out.println(ints[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(ints[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(ints[i]);\n\t\t}", "System.out.println(ints[i])", "System.out.println", "System.out", "System", "System.out", "ints[i]", "ints", "i", "String[] args", "args", "public class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\tint w = sc.nextInt();\n\t\tint[] ints = new int[w];\n\t\tfor (int i=0; i<w; i++) {\n\t\t\tints[i] = i+1;\n\t\t}\n\t\tint n = sc.nextInt();\n\t\tString[] strs = new String[2];\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tstrs = sc.next().split(\",\");\n\t\t\tint L = Integer.parseInt(strs[0]) - 1;\n\t\t\tint R = Integer.parseInt(strs[1]) - 1;\n\t\t\tint temp = ints[L];\n\t\t\tints[L] = ints[R];\n\t\t\tints[R] = temp;\n\t\t}\n\t\tfor (int i=0; i<w; i++) {\n\t\t\tSystem.out.println(ints[i]);\n\t\t}\n\t}\n}", "public class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\tint w = sc.nextInt();\n\t\tint[] ints = new int[w];\n\t\tfor (int i=0; i<w; i++) {\n\t\t\tints[i] = i+1;\n\t\t}\n\t\tint n = sc.nextInt();\n\t\tString[] strs = new String[2];\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tstrs = sc.next().split(\",\");\n\t\t\tint L = Integer.parseInt(strs[0]) - 1;\n\t\t\tint R = Integer.parseInt(strs[1]) - 1;\n\t\t\tint temp = ints[L];\n\t\t\tints[L] = ints[R];\n\t\t\tints[R] = temp;\n\t\t}\n\t\tfor (int i=0; i<w; i++) {\n\t\t\tSystem.out.println(ints[i]);\n\t\t}\n\t}\n}", "Main" ]
import java.util.*; public class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int w = sc.nextInt(); int[] ints = new int[w]; for (int i=0; i<w; i++) { ints[i] = i+1; } int n = sc.nextInt(); String[] strs = new String[2]; for (int i=0; i<n; i++) { strs = sc.next().split(","); int L = Integer.parseInt(strs[0]) - 1; int R = Integer.parseInt(strs[1]) - 1; int temp = ints[L]; ints[L] = ints[R]; ints[R] = temp; } for (int i=0; i<w; i++) { System.out.println(ints[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, 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 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 26, 31 ], [ 31, 32 ], [ 31, 33 ], [ 26, 34 ], [ 34, 35 ], [ 35, 36 ], [ 26, 37 ], [ 38, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 39, 43 ], [ 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 ], [ 69, 72 ], [ 72, 73 ], [ 72, 74 ], [ 58, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 78, 79 ], [ 77, 80 ], [ 80, 81 ], [ 80, 82 ], [ 58, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 87, 89 ], [ 58, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 93, 95 ], [ 90, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 98, 100 ], [ 58, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 104, 106 ], [ 101, 107 ], [ 8, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 108, 113 ], [ 113, 114 ], [ 113, 115 ], [ 108, 116 ], [ 116, 117 ], [ 117, 118 ], [ 108, 119 ], [ 120, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 121, 126 ], [ 126, 127 ], [ 126, 128 ], [ 6, 129 ], [ 129, 130 ] ]
[ "import java.util.Scanner;\n\nclass Main{\npublic static void main(String[] args){\nScanner sc=new Scanner(System.in);\nint w=sc.nextInt();\nint n=sc.nextInt();\nint[] k=new int[w];\nfor(int i=0;i<w;i++){\nk[i]=i+1;\n}\nfor(int j=0;j<n;j++){\nString[] line=sc.next().split(\",\");\nint p=Integer.parseInt(line[0]);\nint q=Integer.parseInt(line[1]);\nint r=k[p-1];\nk[p-1]=k[q-1];\nk[q-1]=r;\n}\nfor(int l=0;l<w;l++){\nSystem.out.println(k[l]);\n}\n}\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\npublic static void main(String[] args){\nScanner sc=new Scanner(System.in);\nint w=sc.nextInt();\nint n=sc.nextInt();\nint[] k=new int[w];\nfor(int i=0;i<w;i++){\nk[i]=i+1;\n}\nfor(int j=0;j<n;j++){\nString[] line=sc.next().split(\",\");\nint p=Integer.parseInt(line[0]);\nint q=Integer.parseInt(line[1]);\nint r=k[p-1];\nk[p-1]=k[q-1];\nk[q-1]=r;\n}\nfor(int l=0;l<w;l++){\nSystem.out.println(k[l]);\n}\n}\n}", "Main", "public static void main(String[] args){\nScanner sc=new Scanner(System.in);\nint w=sc.nextInt();\nint n=sc.nextInt();\nint[] k=new int[w];\nfor(int i=0;i<w;i++){\nk[i]=i+1;\n}\nfor(int j=0;j<n;j++){\nString[] line=sc.next().split(\",\");\nint p=Integer.parseInt(line[0]);\nint q=Integer.parseInt(line[1]);\nint r=k[p-1];\nk[p-1]=k[q-1];\nk[q-1]=r;\n}\nfor(int l=0;l<w;l++){\nSystem.out.println(k[l]);\n}\n}", "main", "{\nScanner sc=new Scanner(System.in);\nint w=sc.nextInt();\nint n=sc.nextInt();\nint[] k=new int[w];\nfor(int i=0;i<w;i++){\nk[i]=i+1;\n}\nfor(int j=0;j<n;j++){\nString[] line=sc.next().split(\",\");\nint p=Integer.parseInt(line[0]);\nint q=Integer.parseInt(line[1]);\nint r=k[p-1];\nk[p-1]=k[q-1];\nk[q-1]=r;\n}\nfor(int l=0;l<w;l++){\nSystem.out.println(k[l]);\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[] k=new int[w];", "k", "new int[w]", "w", "for(int i=0;i<w;i++){\nk[i]=i+1;\n}", "int i=0;", "int i=0;", "i", "0", "i<w", "i", "w", "i++", "i++", "i", "{\nk[i]=i+1;\n}", "{\nk[i]=i+1;\n}", "k[i]=i+1", "k[i]", "k", "i", "i+1", "i", "1", "for(int j=0;j<n;j++){\nString[] line=sc.next().split(\",\");\nint p=Integer.parseInt(line[0]);\nint q=Integer.parseInt(line[1]);\nint r=k[p-1];\nk[p-1]=k[q-1];\nk[q-1]=r;\n}", "int j=0;", "int j=0;", "j", "0", "j<n", "j", "n", "j++", "j++", "j", "{\nString[] line=sc.next().split(\",\");\nint p=Integer.parseInt(line[0]);\nint q=Integer.parseInt(line[1]);\nint r=k[p-1];\nk[p-1]=k[q-1];\nk[q-1]=r;\n}", "{\nString[] line=sc.next().split(\",\");\nint p=Integer.parseInt(line[0]);\nint q=Integer.parseInt(line[1]);\nint r=k[p-1];\nk[p-1]=k[q-1];\nk[q-1]=r;\n}", "String[] line=sc.next().split(\",\");", "line", "sc.next().split(\",\")", "sc.next().split", "sc.next()", "sc.next", "sc", "\",\"", "int p=Integer.parseInt(line[0]);", "p", "Integer.parseInt(line[0])", "Integer.parseInt", "Integer", "line[0]", "line", "0", "int q=Integer.parseInt(line[1]);", "q", "Integer.parseInt(line[1])", "Integer.parseInt", "Integer", "line[1]", "line", "1", "int r=k[p-1];", "r", "k[p-1]", "k", "p-1", "p", "1", "k[p-1]=k[q-1]", "k[p-1]", "k", "p-1", "p", "1", "k[q-1]", "k", "q-1", "q", "1", "k[q-1]=r", "k[q-1]", "k", "q-1", "q", "1", "r", "for(int l=0;l<w;l++){\nSystem.out.println(k[l]);\n}", "int l=0;", "int l=0;", "l", "0", "l<w", "l", "w", "l++", "l++", "l", "{\nSystem.out.println(k[l]);\n}", "{\nSystem.out.println(k[l]);\n}", "System.out.println(k[l])", "System.out.println", "System.out", "System", "System.out", "k[l]", "k", "l", "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[] k=new int[w]; for(int i=0;i<w;i++){ k[i]=i+1; } for(int j=0;j<n;j++){ String[] line=sc.next().split(","); int p=Integer.parseInt(line[0]); int q=Integer.parseInt(line[1]); int r=k[p-1]; k[p-1]=k[q-1]; k[q-1]=r; } for(int l=0;l<w;l++){ System.out.println(k[l]); } } }
[ 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, 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, 17, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 1, 40, 13, 30, 30, 14, 2, 4, 18, 13, 13, 17, 3, 40, 13, 41, 13, 4, 18, 13, 4, 18, 13, 17, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 17, 4, 13, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 12, 13, 30, 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, 23, 13, 23, 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 ], [ 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 ], [ 28, 36 ], [ 36, 37 ], [ 37, 38 ], [ 28, 39 ], [ 40, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 41, 45 ], [ 45, 46 ], [ 45, 47 ], [ 8, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 51, 52 ], [ 8, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 53, 58 ], [ 58, 59 ], [ 58, 60 ], [ 53, 61 ], [ 61, 62 ], [ 62, 63 ], [ 53, 64 ], [ 65, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 68, 69 ], [ 69, 70 ], [ 65, 71 ], [ 71, 72 ], [ 71, 73 ], [ 65, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 74, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 74, 84 ], [ 84, 85 ], [ 85, 86 ], [ 74, 87 ], [ 88, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 90, 95 ], [ 89, 96 ], [ 88, 97 ], [ 97, 98 ], [ 65, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 102, 103 ], [ 101, 104 ], [ 104, 105 ], [ 105, 106 ], [ 104, 107 ], [ 104, 108 ], [ 65, 109 ], [ 109, 110 ], [ 109, 111 ], [ 111, 112 ], [ 112, 113 ], [ 111, 114 ], [ 114, 115 ], [ 115, 116 ], [ 114, 117 ], [ 117, 118 ], [ 117, 119 ], [ 65, 120 ], [ 120, 121 ], [ 120, 122 ], [ 120, 123 ], [ 120, 124 ], [ 8, 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 ], [ 6, 146 ], [ 146, 147 ], [ 183, 148 ], [ 148, 149 ], [ 148, 150 ], [ 150, 151 ], [ 151, 152 ], [ 151, 153 ], [ 153, 154 ], [ 153, 155 ], [ 155, 156 ], [ 155, 157 ], [ 150, 158 ], [ 158, 159 ], [ 159, 160 ], [ 159, 161 ], [ 161, 162 ], [ 161, 163 ], [ 158, 164 ], [ 164, 165 ], [ 164, 166 ], [ 166, 167 ], [ 166, 168 ], [ 150, 169 ], [ 169, 170 ], [ 170, 171 ], [ 170, 172 ], [ 172, 173 ], [ 172, 174 ], [ 169, 175 ], [ 148, 176 ], [ 176, 177 ], [ 148, 178 ], [ 178, 179 ], [ 148, 180 ], [ 180, 181 ], [ 0, 182 ], [ 182, 183 ], [ 182, 184 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n\n Scanner scn = new Scanner(System.in);\n int w = scn.nextInt();\n int n = scn.nextInt();\n\n int[] array;\n array = new int[w];\n\n for(int i = 0; i < w; i++){\n array[i] = i + 1;\n }\n\n String emp = scn.nextLine();\n\n for(int i = 0; i < n; i++){\n\n String str = scn.nextLine();\n int count = 0;\n\n for(int j = 0; j < str.length(); j++){\n if(str.charAt(j) == ',') break;\n count++;\n }\n\n int a = Integer.parseInt(str.substring(0,count));\n int b = Integer.parseInt(str.substring(count + 1));\n Swap(a,b,array);\n }\n\n for(int k = 0; k < w; k++){\n System.out.println(array[k]);\n }\n }\n\n static void Swap(int a,int b, int[] array) {\n int tmp = array[a - 1];\n array[a - 1] = array[b - 1];\n array[b - 1] = tmp;\n }\n}\n", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n\n Scanner scn = new Scanner(System.in);\n int w = scn.nextInt();\n int n = scn.nextInt();\n\n int[] array;\n array = new int[w];\n\n for(int i = 0; i < w; i++){\n array[i] = i + 1;\n }\n\n String emp = scn.nextLine();\n\n for(int i = 0; i < n; i++){\n\n String str = scn.nextLine();\n int count = 0;\n\n for(int j = 0; j < str.length(); j++){\n if(str.charAt(j) == ',') break;\n count++;\n }\n\n int a = Integer.parseInt(str.substring(0,count));\n int b = Integer.parseInt(str.substring(count + 1));\n Swap(a,b,array);\n }\n\n for(int k = 0; k < w; k++){\n System.out.println(array[k]);\n }\n }\n\n static void Swap(int a,int b, int[] array) {\n int tmp = array[a - 1];\n array[a - 1] = array[b - 1];\n array[b - 1] = tmp;\n }\n}", "Main", "public static void main(String[] args) {\n\n Scanner scn = new Scanner(System.in);\n int w = scn.nextInt();\n int n = scn.nextInt();\n\n int[] array;\n array = new int[w];\n\n for(int i = 0; i < w; i++){\n array[i] = i + 1;\n }\n\n String emp = scn.nextLine();\n\n for(int i = 0; i < n; i++){\n\n String str = scn.nextLine();\n int count = 0;\n\n for(int j = 0; j < str.length(); j++){\n if(str.charAt(j) == ',') break;\n count++;\n }\n\n int a = Integer.parseInt(str.substring(0,count));\n int b = Integer.parseInt(str.substring(count + 1));\n Swap(a,b,array);\n }\n\n for(int k = 0; k < w; k++){\n System.out.println(array[k]);\n }\n }", "main", "{\n\n Scanner scn = new Scanner(System.in);\n int w = scn.nextInt();\n int n = scn.nextInt();\n\n int[] array;\n array = new int[w];\n\n for(int i = 0; i < w; i++){\n array[i] = i + 1;\n }\n\n String emp = scn.nextLine();\n\n for(int i = 0; i < n; i++){\n\n String str = scn.nextLine();\n int count = 0;\n\n for(int j = 0; j < str.length(); j++){\n if(str.charAt(j) == ',') break;\n count++;\n }\n\n int a = Integer.parseInt(str.substring(0,count));\n int b = Integer.parseInt(str.substring(count + 1));\n Swap(a,b,array);\n }\n\n for(int k = 0; k < w; k++){\n System.out.println(array[k]);\n }\n }", "Scanner scn = new Scanner(System.in);", "scn", "new Scanner(System.in)", "int w = scn.nextInt();", "w", "scn.nextInt()", "scn.nextInt", "scn", "int n = scn.nextInt();", "n", "scn.nextInt()", "scn.nextInt", "scn", "int[] array;", "array", "array = new int[w]", "array", "new int[w]", "w", "for(int i = 0; i < w; i++){\n array[i] = i + 1;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < w", "i", "w", "i++", "i++", "i", "{\n array[i] = i + 1;\n }", "{\n array[i] = i + 1;\n }", "array[i] = i + 1", "array[i]", "array", "i", "i + 1", "i", "1", "String emp = scn.nextLine();", "emp", "scn.nextLine()", "scn.nextLine", "scn", "for(int i = 0; i < n; i++){\n\n String str = scn.nextLine();\n int count = 0;\n\n for(int j = 0; j < str.length(); j++){\n if(str.charAt(j) == ',') break;\n count++;\n }\n\n int a = Integer.parseInt(str.substring(0,count));\n int b = Integer.parseInt(str.substring(count + 1));\n Swap(a,b,array);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\n String str = scn.nextLine();\n int count = 0;\n\n for(int j = 0; j < str.length(); j++){\n if(str.charAt(j) == ',') break;\n count++;\n }\n\n int a = Integer.parseInt(str.substring(0,count));\n int b = Integer.parseInt(str.substring(count + 1));\n Swap(a,b,array);\n }", "{\n\n String str = scn.nextLine();\n int count = 0;\n\n for(int j = 0; j < str.length(); j++){\n if(str.charAt(j) == ',') break;\n count++;\n }\n\n int a = Integer.parseInt(str.substring(0,count));\n int b = Integer.parseInt(str.substring(count + 1));\n Swap(a,b,array);\n }", "String str = scn.nextLine();", "str", "scn.nextLine()", "scn.nextLine", "scn", "int count = 0;", "count", "0", "for(int j = 0; j < str.length(); j++){\n if(str.charAt(j) == ',') break;\n count++;\n }", "int j = 0;", "int j = 0;", "j", "0", "j < str.length()", "j", "str.length()", "str.length", "str", "j++", "j++", "j", "{\n if(str.charAt(j) == ',') break;\n count++;\n }", "{\n if(str.charAt(j) == ',') break;\n count++;\n }", "if(str.charAt(j) == ',') break;", "str.charAt(j) == ','", "str.charAt(j)", "str.charAt", "str", "j", "','", "break;", "count++", "count", "int a = Integer.parseInt(str.substring(0,count));", "a", "Integer.parseInt(str.substring(0,count))", "Integer.parseInt", "Integer", "str.substring(0,count)", "str.substring", "str", "0", "count", "int b = Integer.parseInt(str.substring(count + 1));", "b", "Integer.parseInt(str.substring(count + 1))", "Integer.parseInt", "Integer", "str.substring(count + 1)", "str.substring", "str", "count + 1", "count", "1", "Swap(a,b,array)", "Swap", "a", "b", "array", "for(int k = 0; k < w; k++){\n System.out.println(array[k]);\n }", "int k = 0;", "int k = 0;", "k", "0", "k < w", "k", "w", "k++", "k++", "k", "{\n System.out.println(array[k]);\n }", "{\n System.out.println(array[k]);\n }", "System.out.println(array[k])", "System.out.println", "System.out", "System", "System.out", "array[k]", "array", "k", "String[] args", "args", "static void Swap(int a,int b, int[] array) {\n int tmp = array[a - 1];\n array[a - 1] = array[b - 1];\n array[b - 1] = tmp;\n }", "Swap", "{\n int tmp = array[a - 1];\n array[a - 1] = array[b - 1];\n array[b - 1] = tmp;\n }", "int tmp = array[a - 1];", "tmp", "array[a - 1]", "array", "a - 1", "a", "1", "array[a - 1] = array[b - 1]", "array[a - 1]", "array", "a - 1", "a", "1", "array[b - 1]", "array", "b - 1", "b", "1", "array[b - 1] = tmp", "array[b - 1]", "array", "b - 1", "b", "1", "tmp", "int a", "a", "int b", "b", "int[] array", "array", "public class Main {\n public static void main(String[] args) {\n\n Scanner scn = new Scanner(System.in);\n int w = scn.nextInt();\n int n = scn.nextInt();\n\n int[] array;\n array = new int[w];\n\n for(int i = 0; i < w; i++){\n array[i] = i + 1;\n }\n\n String emp = scn.nextLine();\n\n for(int i = 0; i < n; i++){\n\n String str = scn.nextLine();\n int count = 0;\n\n for(int j = 0; j < str.length(); j++){\n if(str.charAt(j) == ',') break;\n count++;\n }\n\n int a = Integer.parseInt(str.substring(0,count));\n int b = Integer.parseInt(str.substring(count + 1));\n Swap(a,b,array);\n }\n\n for(int k = 0; k < w; k++){\n System.out.println(array[k]);\n }\n }\n\n static void Swap(int a,int b, int[] array) {\n int tmp = array[a - 1];\n array[a - 1] = array[b - 1];\n array[b - 1] = tmp;\n }\n}", "public class Main {\n public static void main(String[] args) {\n\n Scanner scn = new Scanner(System.in);\n int w = scn.nextInt();\n int n = scn.nextInt();\n\n int[] array;\n array = new int[w];\n\n for(int i = 0; i < w; i++){\n array[i] = i + 1;\n }\n\n String emp = scn.nextLine();\n\n for(int i = 0; i < n; i++){\n\n String str = scn.nextLine();\n int count = 0;\n\n for(int j = 0; j < str.length(); j++){\n if(str.charAt(j) == ',') break;\n count++;\n }\n\n int a = Integer.parseInt(str.substring(0,count));\n int b = Integer.parseInt(str.substring(count + 1));\n Swap(a,b,array);\n }\n\n for(int k = 0; k < w; k++){\n System.out.println(array[k]);\n }\n }\n\n static void Swap(int a,int b, int[] array) {\n int tmp = array[a - 1];\n array[a - 1] = array[b - 1];\n array[b - 1] = tmp;\n }\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(); int n = scn.nextInt(); int[] array; array = new int[w]; for(int i = 0; i < w; i++){ array[i] = i + 1; } String emp = scn.nextLine(); for(int i = 0; i < n; i++){ String str = scn.nextLine(); int count = 0; for(int j = 0; j < str.length(); j++){ if(str.charAt(j) == ',') break; count++; } int a = Integer.parseInt(str.substring(0,count)); int b = Integer.parseInt(str.substring(count + 1)); Swap(a,b,array); } for(int k = 0; k < w; k++){ System.out.println(array[k]); } } static void Swap(int a,int b, int[] array) { int tmp = array[a - 1]; array[a - 1] = array[b - 1]; array[b - 1] = tmp; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 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, 4, 13, 13, 13, 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, 12, 13, 30, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 23, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 148, 5 ], [ 148, 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 ], [ 92, 95 ], [ 92, 96 ], [ 8, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 97, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 104, 106 ], [ 97, 107 ], [ 107, 108 ], [ 108, 109 ], [ 97, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 111, 116 ], [ 116, 117 ], [ 116, 118 ], [ 6, 119 ], [ 119, 120 ], [ 148, 121 ], [ 121, 122 ], [ 121, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 126, 127 ], [ 126, 128 ], [ 123, 129 ], [ 129, 130 ], [ 130, 131 ], [ 130, 132 ], [ 129, 133 ], [ 133, 134 ], [ 133, 135 ], [ 123, 136 ], [ 136, 137 ], [ 137, 138 ], [ 137, 139 ], [ 136, 140 ], [ 121, 141 ], [ 141, 142 ], [ 121, 143 ], [ 143, 144 ], [ 121, 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 w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] values = new int[w];\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tvalues[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString str = sc.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\tswap(values,a,b);\n\t\t}\n\t\tfor(int i = 0; i < values.length; i++)\n\t\tSystem.out.println(values[i]);\n\t}\n\tpublic static void swap(int[] values,int a,int b){\n\t\tint t=values[a];\n\t\tvalues[a]=values[b];\n\t\tvalues[b]=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[] values = new int[w];\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tvalues[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString str = sc.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\tswap(values,a,b);\n\t\t}\n\t\tfor(int i = 0; i < values.length; i++)\n\t\tSystem.out.println(values[i]);\n\t}\n\tpublic static void swap(int[] values,int a,int b){\n\t\tint t=values[a];\n\t\tvalues[a]=values[b];\n\t\tvalues[b]=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[] values = new int[w];\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tvalues[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString str = sc.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\tswap(values,a,b);\n\t\t}\n\t\tfor(int i = 0; i < values.length; i++)\n\t\tSystem.out.println(values[i]);\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] values = new int[w];\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tvalues[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString str = sc.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\tswap(values,a,b);\n\t\t}\n\t\tfor(int i = 0; i < values.length; i++)\n\t\tSystem.out.println(values[i]);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int w = sc.nextInt();", "w", "sc.nextInt()", "sc.nextInt", "sc", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int[] values = new int[w];", "values", "new int[w]", "w", "for (int i = 0; i < values.length; i++) {\n\t\t\tvalues[i] = i + 1;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < values.length", "i", "values.length", "values", "values.length", "i++", "i++", "i", "{\n\t\t\tvalues[i] = i + 1;\n\t\t}", "{\n\t\t\tvalues[i] = i + 1;\n\t\t}", "values[i] = i + 1", "values[i]", "values", "i", "i + 1", "i", "1", "for (int i = 0; i < n; i++) {\n\t\t\tString str = sc.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\tswap(values,a,b);\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\tswap(values,a,b);\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\tswap(values,a,b);\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", "swap(values,a,b)", "swap", "values", "a", "b", "for(int i = 0; i < values.length; i++)\n\t\tSystem.out.println(values[i]);", "int i = 0;", "int i = 0;", "i", "0", "i < values.length", "i", "values.length", "values", "values.length", "i++", "i++", "i", "System.out.println(values[i]);", "System.out.println(values[i])", "System.out.println", "System.out", "System", "System.out", "values[i]", "values", "i", "String[] args", "args", "public static void swap(int[] values,int a,int b){\n\t\tint t=values[a];\n\t\tvalues[a]=values[b];\n\t\tvalues[b]=t;\n\t}", "swap", "{\n\t\tint t=values[a];\n\t\tvalues[a]=values[b];\n\t\tvalues[b]=t;\n\t}", "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", "int[] values", "values", "int a", "a", "int b", "b", "public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] values = new int[w];\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tvalues[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString str = sc.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\tswap(values,a,b);\n\t\t}\n\t\tfor(int i = 0; i < values.length; i++)\n\t\tSystem.out.println(values[i]);\n\t}\n\tpublic static void swap(int[] values,int a,int b){\n\t\tint t=values[a];\n\t\tvalues[a]=values[b];\n\t\tvalues[b]=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[] values = new int[w];\n\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\tvalues[i] = i + 1;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString str = sc.next();\n\t\t\tString[] ab = str.split(\",\");\n\t\t\tint a = Integer.parseInt(ab[0]) - 1;\n\t\t\tint b = Integer.parseInt(ab[1]) - 1;\n\t\t\tswap(values,a,b);\n\t\t}\n\t\tfor(int i = 0; i < values.length; i++)\n\t\tSystem.out.println(values[i]);\n\t}\n\tpublic static void swap(int[] values,int a,int b){\n\t\tint t=values[a];\n\t\tvalues[a]=values[b];\n\t\tvalues[b]=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[] 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; swap(values,a,b); } for(int i = 0; i < values.length; i++) System.out.println(values[i]); } public static void swap(int[] values,int a,int b){ int t=values[a]; values[a]=values[b]; values[b]=t; } }