node_ids
listlengths
4
1.4k
edge_index
listlengths
1
2.22k
text
listlengths
4
1.4k
source
stringlengths
14
427k
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 130, 5 ], [ 130, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint sousuu = sc.nextInt(),henkan_suu = sc.nextInt();\n\t\tint[] jyun = new int[sousuu];\n\t\tfor(int i=0;i<sousuu;i++) jyun[i]=i+1;\n\n\t\tfor(int i=0;i<henkan_suu;i++){\n\t\t...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int sousuu = sc.nextInt(),henkan_suu = sc.nextInt(); int[] jyun = new int[sousuu]; for(int i=0;i<sousuu;i++) jyun[i]=i+1; for(int i=0;i<henkan_suu;i++){ String s = sc.next(); St...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 4, 18, 20, 17, 41, 13, 41, 13, 41, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 127, 5 ], [ 127, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 11, 14 ]...
[ "import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in).useDelimiter(\"\\\\D\");\n\t\tint ax, by, i;\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] tate = new int[w];\n\t\tfor (i = 0; i < w; i++) {\n\t\t\ttate[i] = i + 1;\n\t...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in).useDelimiter("\\D"); int ax, by, i; int w = sc.nextInt(); int n = sc.nextInt(); int[] tate = new int[w]; for (i = 0; i < w; i++) { tate[i] = i + 1; } for (i = 0; i < n; i++) { ax ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 2, 13, 17, 11, 1, 41, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 142, 5 ], [ 142, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], ...
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int w, n;\n int[] amida;\n\n w = sc.nextInt();\n n = sc.nextInt();\n amida = new int[w];\n for(int j=0;j<w;j++)\n amida[j]=j+...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int w, n; int[] amida; w = sc.nextInt(); n = sc.nextInt(); amida = new int[w]; for(int j=0;j<w;j++) amida[j]=j+1; for(in...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 0, 18, 13, 13, 13, 11, 1,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 143, 11 ], [ 143, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.*;\nimport java.lang.*;\nimport java.math.*;\n\npublic class Main {\n\tScanner sc = new Scanner(System.in);\n\tvoid run(){\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] ret = new int[w+1];\n\t\tfor(int i =0 ; i < w+1; i++) ret[i] = i;\n\t\tfor(int k = 0; k< n ; k++){\n\t\t\tStr...
import java.util.*; import java.lang.*; import java.math.*; public class Main { Scanner sc = new Scanner(System.in); void run(){ int w = sc.nextInt(); int n = sc.nextInt(); int[] ret = new int[w+1]; for(int i =0 ; i < w+1; i++) ret[i] = i; for(int k = 0; k< n ; k++){ String ts = sc.next(); ts = ts.r...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 0, 18, 13, 17, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 13, 41, 13, 41, 13, 41, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.io.*;\n\nclass Main {\n public static void main(String[] args)throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \n \n int w = Integer.parseInt(br.readLine());\n int[] amida = new int[w+1];\n amida[0]...
import java.io.*; class Main { public static void main(String[] args)throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int w = Integer.parseInt(br.readLine()); int[] amida = new int[w+1]; amida[0]=0; ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 38, 5, 13, 30, 4, 18, 18, 13, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 4...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 154, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {...
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); try { S...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 151, 5 ], [ 151, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.*;\n\npublic class Main{\n\tpublic static void main(String args[]){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint[] nums = new int[w];\n\t\tfor(int i = 0; i < w; i++){\n\t\t\tnums[i] = i+1;\t\n\t\t}\n\t\tint n = sc.nextInt();\n\t\tfor(int i = 0; i < n; i++){\n\t\t\t...
import java.util.*; public class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int[] nums = new int[w]; for(int i = 0; i < w; i++){ nums[i] = i+1; } int n = sc.nextInt(); for(int i = 0; i < n; i++){ String input = sc.next(); String[] r...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.util.Scanner;\n\nclass Main {\n/*\n static int DrawingLots(int j, int i, int[][] ab, int n) {\n for (; j < n; j++) {\n if (ab[j][0] == i) return DrawingLots(j+1, ab[j][1], ab, n);\n else if (ab[j][1] == i) return DrawingLots(j+1, ab[j][0], ab, n);\n }\n return i;\n }\n*/\npublic ...
import java.util.Scanner; class Main { /* static int DrawingLots(int j, int i, int[][] ab, int n) { for (; j < n; j++) { if (ab[j][0] == i) return DrawingLots(j+1, ab[j][1], ab, n); else if (ab[j][1] == i) return DrawingLots(j+1, ab[j][0], ab, n); } return i; } */ public static void main(...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 150, 11 ], [ 150, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint w = Integer.parseInt(br...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int w = Integer.parseInt(br.readLine()); i...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 4, 18, 20, 17, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 11, 1, 41, 13, 17, 2, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 127, 5 ], [ 127, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 11, 14 ]...
[ "import java.util.Scanner;\npublic class Main {\n public static void main(String[] arg){\n Scanner sc = new Scanner(System.in).useDelimiter(\"[,\\n]\");\n int w = sc.nextInt();\n int n = sc.nextInt();\n int num[] = new int[w];\n for(int i=0;i<w;i++){\n num[i]=i+1;\n ...
import java.util.Scanner; public class Main { public static void main(String[] arg){ Scanner sc = new Scanner(System.in).useDelimiter("[,\n]"); int w = sc.nextInt(); int n = sc.nextInt(); int num[] = new int[w]; for(int i=0;i<w;i++){ num[i]=i+1; } ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 148, 8 ], [ 148, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.util.ArrayList;\nimport java.util.Scanner;\n\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tArrayList<Integer> w_list = new ArrayList<Integer>();\n\t\t\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\t\n\t\tfor(int i =...
import java.util.ArrayList; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); ArrayList<Integer> w_list = new ArrayList<Integer>(); int w = sc.nextInt(); int n = sc.nextInt(); for(int i = 0; i < w; i++){ w_list.add(i + 1...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 0, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 29, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 2, 4, 18, 13, 4, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 137, 8 ], [ 137, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.io.*;\nimport java.util.*;\n\npublic class Main {\n\t\n\tpublic static int[] swap (int[] sticks, int s, int g) {\n\t\t\n\t\tint work = 0;\n\t\t\n\t\twork = sticks[g];\n\t\tsticks[g] = sticks[s];\n\t\tsticks[s] = work;\n\t\t\n\t\treturn sticks;\n\t\t\n\t}\n\t\n\tpublic static void main(String[] args) th...
import java.io.*; import java.util.*; public class Main { public static int[] swap (int[] sticks, int s, int g) { int work = 0; work = sticks[g]; sticks[g] = sticks[s]; sticks[s] = work; return sticks; } public static void main(String[] args) throws IOException { BufferedReader br = ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 4, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 41, 13, 17, 0, 13, 4, 18, 13, 4, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 130, 8 ], [ 130, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "\nimport java.io.*;\nimport java.util.*;\n\npublic class Main {\n\n public static void main(String[] argv) throws IOException {\n //*\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\n int[] lines = new int[Integer.parseInt(in.readLine())];\n for (int i =...
import java.io.*; import java.util.*; public class Main { public static void main(String[] argv) throws IOException { //* BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); int[] lines = new int[Integer.parseInt(in.readLine())]; for (int i = 0; i < lines.le...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 0, 13, 4, 18, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 0, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 144, 5 ], [ 144, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], ...
[ "import java.util.Scanner;\npublic class Main {\n public static void main (String[] args) {\n\tScanner scan = new Scanner(System.in);\n\tint w, n, a, b, tmp;\n\tint[] lots;\n\tString[] input;\n\tw = Integer.parseInt(scan.nextLine());\n\tn = Integer.parseInt(scan.nextLine());\n\tlots = new int[w + 1];\n\tfor (int...
import java.util.Scanner; public class Main { public static void main (String[] args) { Scanner scan = new Scanner(System.in); int w, n, a, b, tmp; int[] lots; String[] input; w = Integer.parseInt(scan.nextLine()); n = Integer.parseInt(scan.nextLine()); lots = new int[w + 1]; for (int i = 1; i <= w; i++) { ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 188, 8 ], [ 188, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.util.*;\nimport java.math.*;\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n \n int stick = sc.nextInt();\n int bar = sc.nextInt();\n\n int[] amida = new int[stick];\n\n for(int i = 0; i < stick; i++){\n ...
import java.util.*; import java.math.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int stick = sc.nextInt(); int bar = sc.nextInt(); int[] amida = new int[stick]; for(int i = 0; i < stick; i++){ amida[i] = ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 2, 40, 13, 13, 30, 4, 18, 13, 13, 11, 1, 0, 13, 4, 18, 13, 4, 18, 13, 2, 40, 13, 17, 30, 30, 41, 13, 4, 18, 4, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.util.*;class Main{public static void main(String[] a){Scanner s=new Scanner(System.in);List<Integer>l=new ArrayList<Integer>();int t=s.nextInt(),i=0;for(;i++<t;)l.add(i);for(t=s.nextInt(),s.nextLine();t-->0;){String[]e=s.nextLine().split(\",\");Collections.swap(l, new Integer(e[0])-1, new Integer(e[1])...
import java.util.*;class Main{public static void main(String[] a){Scanner s=new Scanner(System.in);List<Integer>l=new ArrayList<Integer>();int t=s.nextInt(),i=0;for(;i++<t;)l.add(i);for(t=s.nextInt(),s.nextLine();t-->0;){String[]e=s.nextLine().split(",");Collections.swap(l, new Integer(e[0])-1, new Integer(e[1])-1);}fo...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 0, 13, 4, 18, 13, 41, 13, 20, 13, 0, 13, 4, 18, 13, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], [ ...
[ "import java.util.Scanner;\nclass Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint w, n, a, b, i, swap;\n\t\tString str;\n\t\tw = scan.nextInt();\n\t\tint[] amidakuji = new int[w];\n\t\tn = scan.nextInt();\n\t\tfor (i = 0; i < w; i ++) amidakuji[i] = i;\n\t\tfo...
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int w, n, a, b, i, swap; String str; w = scan.nextInt(); int[] amidakuji = new int[w]; n = scan.nextInt(); for (i = 0; i < w; i ++) amidakuji[i] = i; for (i = 0; i < n; i ++) { str ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 20, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 2, 13, 17, 11, 1, 41, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.util.*;\n\nclass Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[w];\n\t\tString[] st = new String[2];\n\t\tfor(int i = 0; i < a.length; i++)\n\t\t\ta[i] = i + 1;\n\t\t\n\t\tfor(int i...
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int n = sc.nextInt(); int[] a = new int[w]; String[] st = new String[2]; for(int i = 0; i < a.length; i++) a[i] = i + 1; for(int i = 0; i < n; i++){ String str = sc...
[ 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, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 134, 5 ], [ 134, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] arg){\n Scanner sc = new Scanner(System.in);\n int z = sc.nextInt();\n int[] w = new int[z];\n for(int i = 0; i < z; i++){\n w[i] = i+1;\n }\n int n = sc.nextInt();\n f...
import java.util.Scanner; public class Main { public static void main(String[] arg){ Scanner sc = new Scanner(System.in); int z = sc.nextInt(); int[] w = new int[z]; for(int i = 0; i < z; i++){ w[i] = i+1; } int n = sc.nextInt(); for(int j = 0; j<...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.util.*;\n\nclass Main {\n public static void main (String [] args) {\n\n Scanner sc = new Scanner(System.in);\n\n int w = sc.nextInt();\n int n = sc.nextInt();\n\n int[] member = new int[w];\n for (int m = 0; m < w; m++) {\n member[m] = m;\n }\n\n...
import java.util.*; class Main { public static void main (String [] args) { Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int n = sc.nextInt(); int[] member = new int[w]; for (int m = 0; m < w; m++) { member[m] = m; } for (int t =...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 2, 13, 17, 13, 42, 2, 17, 40,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 137, 5 ], [ 137, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ],...
[ "import java.util.*;\n\npublic class Main\n{\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\n\twhile(sc.hasNext()){\n\t int w = sc.nextInt();\n\t int n = sc.nextInt();\n\n\t int[] lots = new int[w];\n\t for(int i = 1; i <= w; ++i){\n\t\tlots[i-1] = i;\n\t }\n\n...
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); while(sc.hasNext()){ int w = sc.nextInt(); int n = sc.nextInt(); int[] lots = new int[w]; for(int i = 1; i <= w; ++i){ lots[i-1] = i; } while(0 < n--){ String[...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 4, 18, 20, 23, 13, 12, 13, 30, 41, 13, 4, 13, 4, 13, 4, 18, 13, 41, 13, 4, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 192, 14 ], ...
[ "import static java.lang.Integer.parseInt;\nimport static java.lang.System.out;\nimport java.io.File;\nimport java.util.Scanner;\n\npublic class Main extends BaseExe {\n\n public static void main(String[] args) {\n new Main().exeSysIn();\n }\n\n @Override\n protected void execute(Scanner scan) {\...
import static java.lang.Integer.parseInt; import static java.lang.System.out; import java.io.File; import java.util.Scanner; public class Main extends BaseExe { public static void main(String[] args) { new Main().exeSysIn(); } @Override protected void execute(Scanner scan) { int[] lot...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 137, 8 ], [ 137, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.util.ArrayList;\nimport java.util.Scanner;\n\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t//.useDelimiter\n\t\t\n\t\tint w = sc.nextInt();\t\t\n\t\tint n = sc.nextInt();\n\t\t\n\t\tArrayList<Intege...
import java.util.ArrayList; import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner sc = new Scanner(System.in); //.useDelimiter int w = sc.nextInt(); int n = sc.nextInt(); ArrayList<Integer> line_number = new ArrayList<Integer>()...
[ 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, ...
[ [ 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 ],...
[ "import java.util.Scanner;\n\npublic class Main{\n public static void main (String[] args) {\n Scanner sc =new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] a = new int[w];\n for(int i=0;i<w;i++){\n a[i]=i+1;\n }\n for(int i=0;i<n;i++){\n String line = s...
import java.util.Scanner; public class Main{ public static void main (String[] args) { Scanner sc =new Scanner(System.in); int w = sc.nextInt(); int n = sc.nextInt(); int[] a = new int[w]; for(int i=0;i<w;i++){ a[i]=i+1; } for(int i=0;i<n;i++){ String line = sc.next(); S...
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 0, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 13, 0, 13, 20,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 176, 5 ], [ 176, 6 ], [ 6, 7 ], [ 176, 8 ], [ 8, 9 ], [ 176, 10 ], [ 10, 11 ], [ 176, 12 ], [ 12, 13 ], [ 12, ...
[ "\n\nimport java.util.Scanner;\n\npublic class Main {\n\n\tint[] a;\n\tint[] x;\n\tint[] y;\n\n\tpublic void run() {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\n\t\ta = new int[w + 1];\n\t\tfor (int i = 1; i <= w; i++) {\n\t\t\ta[i] = i;\n\t\t}\n\n\t\tx = new...
import java.util.Scanner; public class Main { int[] a; int[] x; int[] y; public void run() { Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int n = sc.nextInt(); a = new int[w + 1]; for (int i = 1; i <= w; i++) { a[i] = i; } x = new int[n]; y = new int[n]; String[] str = ne...
[ 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,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 130, 5 ], [ 130, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[w];\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\ta[i] = i+1;\n\t\t}\n\t\t\n\t\tfor (int i = 0 ; i ...
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int n = sc.nextInt(); int[] a = new int[w]; for(int i = 0 ; i < a.length ; i++){ a[i] = i+1; } for (int i = 0 ; i < n ; i++){ String str = sc.next();...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 4, 18, 20, 17, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 13, 4, 18, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\nimport java.util.regex.*;\n\nclass Main {\n\n public static void main(String[] args){\n\n\tScanner stdin = new Scanner(System.in).useDelimiter(\"[ \\t,\\n]\");\n\tint n = stdin.nextInt();\n\tint line = stdin.nextInt();\n\n\tint[] nums = new int[n + 1];\n\tfor(int i = 1; i <= n; i++){\...
import java.util.Scanner; import java.util.regex.*; class Main { public static void main(String[] args){ Scanner stdin = new Scanner(System.in).useDelimiter("[ \t,\n]"); int n = stdin.nextInt(); int line = stdin.nextInt(); int[] nums = new int[n + 1]; for(int i = 1; i <= n; i++){ nums[i] = i; } stdi...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.util.Scanner;\n\nclass Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int[] arr = new int[w+1];\n for(int i=0; i<=w; i++) {\n arr[i] = i;\n }\n int n = sc.nextInt();\n String drop = sc.nextLine();\n for(in...
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int[] arr = new int[w+1]; for(int i=0; i<=w; i++) { arr[i] = i; } int n = sc.nextInt(); String drop = sc.nextLine(); for(int i=0; i<n; i++) ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 4, 13, 13, 18, 13, 13, 18, 13, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.io.PrintStream;\n\nclass Main {\n\n public static void main(String[] args) throws IOException {\n doit(args, System.in, System.out);\n }\n\n static void doit(Stri...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintStream; class Main { public static void main(String[] args) throws IOException { doit(args, System.in, System.out); } static void doit(String[] args, InputS...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 41, 13, 20, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 161, 14 ], ...
[ "import java.util.*;\nimport java.io.*;\nimport java.awt.geom.*;\nimport java.math.*;\n\npublic class Main {\n\n\tstatic final Scanner in = new Scanner(System.in);\n\tstatic final PrintWriter out = new PrintWriter(System.out,false);\n\n\tstatic void solve() {\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\...
import java.util.*; import java.io.*; import java.awt.geom.*; import java.math.*; public class Main { static final Scanner in = new Scanner(System.in); static final PrintWriter out = new PrintWriter(System.out,false); static void solve() { int w = in.nextInt(); int n = in.nextInt(); int[] x = new int[w]; ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 41, 13, 4, 18, 13, 11, 1, 41, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 138, 5 ], [ 138, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ],...
[ "import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(sc.hasNext()) {\n\t\tint b=sc.nextInt();\n\t\tint []a=new int[b];\n\t\tfor(int i=0;i<b;i++) {\n\t\t\ta[i]=i+1;\n\t\t\t//System.out.print(a[i]);\n\t\t}//\n\t\tint s=sc.nextIn...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); while(sc.hasNext()) { int b=sc.nextInt(); int []a=new int[b]; for(int i=0;i<b;i++) { a[i]=i+1; //System.out.print(a[i]); }// int s=sc.nextInt(); for(int i=0;i<s;i++) { S...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 13, 41, 13, 4, 18, 13, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 112, 5 ], [ 112, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint points[] = new int[w + 1];\n\t\tfor (int i = 1; i <= w; ++i)\n\t\t\tpoints[i] = i;\n\t\tint n = sc.nextInt();\n\t\tsc.useDelimiter(\",|\\n\");\n...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int points[] = new int[w + 1]; for (int i = 1; i <= w; ++i) points[i] = i; int n = sc.nextInt(); sc.useDelimiter(",|\n"); for (int i = 0; i < n; ++i) { ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 4, 18, 13, 17, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 2, 13, 17, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 140, 5 ], [ 140, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ],...
[ "import java.util.*;\n\npublic class Main{\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n sc.useDelimiter(\",|\\n\");\n\n int w=sc.nextInt();\n int string[] = new int[w];\n\n for(int i=0; i<w; i++) string[i] = i+1;\n\n int n=sc.nextInt();\n int a[] = new in...
import java.util.*; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); sc.useDelimiter(",|\n"); int w=sc.nextInt(); int string[] = new int[w]; for(int i=0; i<w; i++) string[i] = i+1; int n=sc.nextInt(); int a[] = new int [n]; int b[] = ...
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 20, 17, 41, 13, 20, 17, 41, 13, 20, 17, 12, 13, 30, 42, 4, 13, 30, 4, 13, 23, 13, 12, 13, 30, 14, 40, 4, 18, 13, 29, 17, 0, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 196, 5 ], [ 196, 6 ], [ 6, 7 ], [ 6, 8 ], [ 196, 9 ], [ 9, 10 ], [ 196, 11 ], [ 11, 12 ], [ 196, 13 ], [ 13, 1...
[ "import java.util.Scanner;\n\n\npublic class Main{\n\n\tstatic Scanner sc = new Scanner(System.in);\n\t\n\tstatic int tmp, n, w, com;\n\tstatic String str[];\n\tstatic int a[] = new int[30], b[] = new int[30], line[] = new int[30];\n\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\twhile(read()){\n\t\t\tsol...
import java.util.Scanner; public class Main{ static Scanner sc = new Scanner(System.in); static int tmp, n, w, com; static String str[]; static int a[] = new int[30], b[] = new int[30], line[] = new int[30]; public static void main(String[] args) { while(read()){ solve(); } } public static bo...
[ 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, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.util.Scanner;\nclass Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint w = scan.nextInt();\n\t\tint[] x = new int[w];\n\t\tfor(int i = 0;i < w;i++){\n\t\t\tx[i] = i+1;\n\t\t}\n\t\tint n = scan.nextInt();\n\t\tfor(int i = 0;i < n;i++){\n\t\t\tString st...
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); int w = scan.nextInt(); int[] x = new int[w]; for(int i = 0;i < w;i++){ x[i] = i+1; } int n = scan.nextInt(); for(int i = 0;i < n;i++){ String str = scan.next(); String[] strAry =...
[ 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, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.util.Scanner;\nclass Main{\n public static void main(String[] a){\n Scanner stdin = new Scanner(System.in);\n int lt = stdin.nextInt();\n int[] line = new int[lt + 1];\n for(int i = 1; i <= lt; i++){\n line[i] = i;\n }\n int n = stdin.nextInt();\n...
import java.util.Scanner; class Main{ public static void main(String[] a){ Scanner stdin = new Scanner(System.in); int lt = stdin.nextInt(); int[] line = new int[lt + 1]; for(int i = 1; i <= lt; i++){ line[i] = i; } int n = stdin.nextInt(); for(int...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 20, 0, 18, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 205, 5 ], [ 205, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.*;\npublic class Main \n{\n\tpublic static void main(String[] args) \n\t{\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint w = stdIn.nextInt();\n\t\tint n = stdIn.nextInt();\n\t\tList<Pair> list = new ArrayList<Pair>();\n\t\tfor (int i = 0; i < n; i++) \n\t\t{\n\t\t\tString str = stdIn.next()...
import java.util.*; public class Main { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int w = stdIn.nextInt(); int n = stdIn.nextInt(); List<Pair> list = new ArrayList<Pair>(); for (int i = 0; i < n; i++) { String str = stdIn.next(); String[] arr = str.split(","...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 143, 11 ], [ 143, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.InputStreamReader;\nimport java.io.BufferedReader;\nimport java.io.IOException;\n\npublic class Main {\n public static void main(String args[] ) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int w = Integer.parseInt(br.readLine());\n int...
import java.io.InputStreamReader; import java.io.BufferedReader; import java.io.IOException; public class Main { public static void main(String args[] ) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int w = Integer.parseInt(br.readLine()); int n = Integer....
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 41, 13, 41, 13, 11, 1, 41...
[ [ 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 ],...
[ "import java.util.Scanner;\npublic class Main{\n \n public static void main(String[] args){\n\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] stick = new int[w];\n for(int i = 0; i < stick.length; i++){\n ...
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int n = sc.nextInt(); int[] stick = new int[w]; for(int i = 0; i < stick.length; i++){ stick[i...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 147, 5 ], [ 147, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main{\n\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint lot[] = new int[w];\n\n\t\tString bar;\n\t\tString s[];\n\t\tint a;\n\t\tint b;\n\t\tint save;\n\n\t\tfor (int i = 0;...
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int n = sc.nextInt(); int lot[] = new int[w]; String bar; String s[]; int a; int b; int save; for (int i = 0; i < w; i++){ lot[i] = i + 1; } fo...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 41, 13, 4, 18, 13, 4, 18, 13, 11, 1, 41, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.io.*;\n\nclass Main{\n\tpublic static void main(String[] argv) throws IOException, NumberFormatException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tint lineNum = Integer.parseInt(br.readLine());\n\t\tint[] lines = new int[lineNum];\n\t\tfor(int i=0; i<lin...
import java.io.*; class Main{ public static void main(String[] argv) throws IOException, NumberFormatException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int lineNum = Integer.parseInt(br.readLine()); int[] lines = new int[lineNum]; for(int i=0; i<lineNum; i++){ lines[i] ...
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 13, 0, 18, 36, 13, 13, 23, 13, 23, 13, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, ...
[ [ 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 ], ...
[ "import java.util.*;\n\nclass Pair {\n\tpublic Pair(int f, int s) {\n\t\tthis.f = f;\n\t\tthis.s = s;\n\t}\n\tpublic int f, s;\n}\n\nclass Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint w = scanner.nextInt();\n\t\tint n = scanner.nextInt();\n\t\tPair[] pai...
import java.util.*; class Pair { public Pair(int f, int s) { this.f = f; this.s = s; } public int f, s; } class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int w = scanner.nextInt(); int n = scanner.nextInt(); Pair[] pairs = new Pair[n]; for (int i = 0; ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 13, 11, 1, 41, 13, 17, 2,...
[ [ 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 ]...
[ "import java.util.Scanner;\nimport java.util.StringTokenizer;\n\npublic class Main\n{\n\tpublic static void main(String arg[])\n\t{\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\tint ans[]= new int[w+1];\n\t\tfor(int i = 1; i <= w; i++)\n\t\t{\n\...
import java.util.Scanner; import java.util.StringTokenizer; public class Main { public static void main(String arg[]) { Scanner scan = new Scanner(System.in); int w = scan.nextInt(); int n = scan.nextInt(); int ans[]= new int[w+1]; for(int i = 1; i <= w; i++) { ans [i]= i; } for(int i=0; i <...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 20, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 4, 18...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 225, 5 ], [ 225, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n//import java.io.*;\n//import java.util.Arrays;\npublic class Main {\n\tpublic static void main(String[] args) throws java.io.IOException {\n\t\tScanner scan = new Scanner(System.in);\n\t\t//InputStreamReader is = new InputStreamReader(System.in);\n\t\t//BufferedReader br = new BufferedR...
import java.util.Scanner; //import java.io.*; //import java.util.Arrays; public class Main { public static void main(String[] args) throws java.io.IOException { Scanner scan = new Scanner(System.in); //InputStreamReader is = new InputStreamReader(System.in); //BufferedReader br = new BufferedReader(is); //Stri...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 140, 8 ], [ 140, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.util.Scanner;\nimport java.util.ArrayList;\n\npublic class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner in = new Scanner(System.in);\n\t\tArrayList<Integer> array = new ArrayList<Integer>();\n\n\t\tint w = in.nextInt();\n\t\tint n = in.nextInt();\n\n\t\tfor (int i = 1; i <= w; i++) {...
import java.util.Scanner; import java.util.ArrayList; public class Main { public static void main(String args[]) { Scanner in = new Scanner(System.in); ArrayList<Integer> array = new ArrayList<Integer>(); int w = in.nextInt(); int n = in.nextInt(); for (int i = 1; i <= w; i++) { array.add(i); } //...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 41, 13, 4, 18, 13, 11, 1, 41, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 159, 5 ], [ 159, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ],...
[ "import java.util.Scanner;\npublic class Main {\npublic static void main(String[] args) {\n\tScanner sc=new Scanner(System.in);\n\twhile(sc.hasNext()) {\n\tint b=sc.nextInt();\n\tint []a=new int[b];\n\tfor(int i=0;i<b;i++) {\n\t\ta[i]=i+1;\n\t}\n\tint s=sc.nextInt();\n\tfor(int i=0;i<s;i++) {\n\t\t String str = s...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); while(sc.hasNext()) { int b=sc.nextInt(); int []a=new int[b]; for(int i=0;i<b;i++) { a[i]=i+1; } int s=sc.nextInt(); for(int i=0;i<s;i++) { String str = sc.next(); String Str[] =...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 41, 13, 41, 13, 41, 13, 2, 17, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 4, 18, 13, 4, 18, 13, 42, 2, 13, 13, 0, 18, 13, 13, 40, 13, 11, 1, 2, 40,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.io.*;class Main{public static void main(String[]g)throws Exception{BufferedReader B=new BufferedReader(new InputStreamReader(System.in));Integer i=0,o,m,l=1+i.valueOf(B.readLine()),w[]=new Integer[l],n=i.valueOf(B.readLine());while(i<l)w[i]=i++;for(;n-->0;w[m]=i){g=B.readLine().split(\",\");i=w[o=i.val...
import java.io.*;class Main{public static void main(String[]g)throws Exception{BufferedReader B=new BufferedReader(new InputStreamReader(System.in));Integer i=0,o,m,l=1+i.valueOf(B.readLine()),w[]=new Integer[l],n=i.valueOf(B.readLine());while(i<l)w[i]=i++;for(;n-->0;w[m]=i){g=B.readLine().split(",");i=w[o=i.valueOf(g[...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 12, 13, 30, 4, 13, 4, 13, 23, 13, 12, 13, 30, 11, 1, 41, 13, 17, 2, 13, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 222, 8 ], [ 222, 9 ], [ 9, 10 ], [ 9, 11 ], [ 222, 12 ], [ 12, 13 ], [ 12, 14 ...
[ "import java.util.ArrayList;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tstatic Scanner sc = new Scanner(System.in);\n\tstatic int w = Integer.parseInt(sc.nextLine());\n\tstatic int[] res = new int[w];\n\tstatic int n = Integer.parseInt(sc.nextLine());\n\tstatic ArrayList<HorizLine> hL = new ArrayList<Ho...
import java.util.ArrayList; import java.util.Scanner; public class Main { static Scanner sc = new Scanner(System.in); static int w = Integer.parseInt(sc.nextLine()); static int[] res = new int[w]; static int n = Integer.parseInt(sc.nextLine()); static ArrayList<HorizLine> hL = new ArrayList<HorizLine>(); publi...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 4, 18, 13, 0, 13, 20, 2, 13, 17, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 2, 13, 17, 2, 13, 17, 41, 13, 4, 18, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 135, 5 ], [ 135, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], ...
[ "import java.util.Scanner;\npublic class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint ary[], t, i;\n\t\tint w = sc.nextInt();\n\t\tary = new int[w + 1];\n\t\tfor(i = 0; i < w; i++)\n\t\t\tary[i + 1] = i + 1;\n\t\tint n = sc.nextInt();\n\t\tfor(i = 0; i < n; i+...
import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int ary[], t, i; int w = sc.nextInt(); ary = new int[w + 1]; for(i = 0; i < w; i++) ary[i + 1] = i + 1; int n = sc.nextInt(); for(i = 0; i < n; i++){ String[] s = sc.next().spl...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 11, 1, 41, 13, 17, 2, ...
[ [ 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 ],...
[ "import java.util.*;\n\npublic class Main{\n public static void main(String[] args){\n Scanner in = new Scanner(System.in);\n int w = in.nextInt();\n int n = in.nextInt(); in.nextLine();\n int[] a = new int[w];\n for(int i = 0; i < w; i++){\n a[i] = i + 1;\n }...
import java.util.*; public class Main{ public static void main(String[] args){ Scanner in = new Scanner(System.in); int w = in.nextInt(); int n = in.nextInt(); in.nextLine(); int[] a = new int[w]; for(int i = 0; i < w; i++){ a[i] = i + 1; } for(in...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 41, 13, 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, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.io.*;\nclass Main {\n public static void main(String... args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String s = br.readLine();\n int w = Integer.parseInt(s);\n int[] nums = new int[w];\n for(int i = 0; i < w; i++) {\n nums...
import java.io.*; class Main { public static void main(String... args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String s = br.readLine(); int w = Integer.parseInt(s); int[] nums = new int[w]; for(int i = 0; i < w; i++) { nums[i] = i+1; ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 41, 13, 4, 18, 13, 11, 1, 0, 13, 17, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 139, 5 ], [ 139, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n\n int i;\n int swap;\n\n int n=sc.nextInt();\n int[] numarr=new int[n];\n for(i=0;i<n;i++){\n numarr[i]=i+1;\n }\n i...
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int i; int swap; int n=sc.nextInt(); int[] numarr=new int[n]; for(i=0;i<n;i++){ numarr[i]=i+1; } int m=sc.nextInt(); ...
[ 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, ...
[ [ 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 ], [...
[ "import java.util.*;\nclass Main{\n\n public static void main(String args[]){\n\tint w,n;\n\tint[][] Edge;\n\tint[] Ans;\n\tScanner in = new Scanner(System.in);\n\tString[] s;\n\n\tw = in.nextInt();\n\tn = in.nextInt();\n\tEdge = new int[w+1][2];\n\tAns = new int[w+1];\n\tfor(int i=0;i<n;i++){\n\t s = in.next...
import java.util.*; class Main{ public static void main(String args[]){ int w,n; int[][] Edge; int[] Ans; Scanner in = new Scanner(System.in); String[] s; w = in.nextInt(); n = in.nextInt(); Edge = new int[w+1][2]; Ans = new int[w+1]; for(int i=0;i<n;i++){ s = in.next().split(","); Edge[i][0] ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 14, 2, 13, 13, 30, 29, 4, 18, 4, 18, 13, 13, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 13, 30, 0, 13, 13, 0, 13, 13, 4, 18, 13, 4, 18, 13, 17, 13, 4, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 210, 5 ], [ 210, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], ...
[ "import java.util.Scanner;\n\n\npublic class Main {\n\n\tstatic String swap(String s, int i, int j) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint a, b;\n\t\tif (i == j) { return sb.append(s).toString();\n\t\t} else if (i < j) { a = i; b = j;\n\t\t} else { a = j; b = i; }\n\t\tsb.append(s.substring(0, a));...
import java.util.Scanner; public class Main { static String swap(String s, int i, int j) { StringBuilder sb = new StringBuilder(); int a, b; if (i == j) { return sb.append(s).toString(); } else if (i < j) { a = i; b = j; } else { a = j; b = i; } sb.append(s.substring(0, a)); sb.append(s.charAt(b)); ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 13, 42, 2, 40, 13, 17, 30, 41, 13, 4, 18,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 115, 5 ], [ 115, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint[] a = new int[w+1];\n\t\tfor(int i=1; i<=w; i++) a[i]=i;\n\t\t\n\t\twhile(n-- != 0) {\n\t\t\tString[] s = sc.ne...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int n = sc.nextInt(); int[] a = new int[w+1]; for(int i=1; i<=w; i++) a[i]=i; while(n-- != 0) { String[] s = sc.next().split(","); int x = Integer.p...
[ 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, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 131, 5 ], [ 131, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\n\npublic class Main \n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tint w = scanner.nextInt();\n\t\tint n = scanner.nextInt();\n\t\t\n\t\tint[] m = new int[w];\n\t\tfor(int i=0; i<w; i++)\n\t\t{\n\t\t\tm[i] = i+1;\n\t\t}\n\t\...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int w = scanner.nextInt(); int n = scanner.nextInt(); int[] m = new int[w]; for(int i=0; i<w; i++) { m[i] = i+1; } for(int i=0; i<n; i++) { String s = 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, 17, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 188, 5 ], [ 188, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w=sc.nextInt();\n\t\tint n=sc.nextInt();\n\t\tint[][] list=new int[n][2];\n\t\tint[] answer=new int[w];\n\n\t\tfor(int i=0; i<n; i++){\n\t\t\tString str=sc.next();\n\t\t...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int w=sc.nextInt(); int n=sc.nextInt(); int[][] list=new int[n][2]; int[] answer=new int[w]; for(int i=0; i<n; i++){ String str=sc.next(); String[] ab=str.split(","); list...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 155, 5 ], [ 155, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], ...
[ "import java.util.*;\n\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w;\n\t\tint n;\n\t\tint a,b;\n\t\tshort tmp;\n\t\t\n\t\tw = sc.nextInt();\n\t\tn = sc.nextInt();\n\t\t\n\t\tint[] data = new int[w];\n\t\t\n\t\tfor(int i=0;i<w;i++){\n\t\t\tdata[i...
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int w; int n; int a,b; short tmp; w = sc.nextInt(); n = sc.nextInt(); int[] data = new int[w]; for(int i=0;i<w;i++){ data[i] = i+1; } for(int i=0;i<n;i++){ String[] ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 11, 1, 41, 13, 17, 2, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.util.*;\n\nclass Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] lot = new int[w];\n\t\tsc.nextLine();\n\t\tfor(int i = 0 ; i < w ; i++){\n\t\t\tlot[i] = i+1;\n\t\t}\n\t\tfor(int i = 0; i < n; i+...
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int n = sc.nextInt(); int[] lot = new int[w]; sc.nextLine(); for(int i = 0 ; i < w ; i++){ lot[i] = i+1; } for(int i = 0; i < n; i++){ swap(lot, sc.nextLine().split(...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 126, 5 ], [ 126, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.*;\npublic class Main {\n\tpublic static void main(String args[]){\n\t\tScanner s=new Scanner(System.in);\n\t\tint n=s.nextInt();\n\t\tint[] m=new int[n];\n\t\tfor(int i=0;i<n;i++)m[i]=i;\n\t\tint b=s.nextInt();\n\t\tfor(int i=0;i<b;i++){\n String[] str=s.next().split(\",\");\n ...
import java.util.*; public class Main { public static void main(String args[]){ Scanner s=new Scanner(System.in); int n=s.nextInt(); int[] m=new int[n]; for(int i=0;i<n;i++)m[i]=i; int b=s.nextInt(); for(int i=0;i<b;i++){ String[] str=s.next().split(","); int q=Integer.parseInt(str[...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 41, 13, 4, 18, 13, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 135, 8 ], [ 135, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.util.*;\nimport java.io.*;\npublic class Main{\n public static void main(String[] args)throws IOException{\n\tInputStreamReader isr = new InputStreamReader(System.in);\n\t\tBufferedReader br=new BufferedReader(isr);\n\t\tString ad=br.readLine();\n\t\tString bd=br.readLine();\n\t\tint w = Integer.pars...
import java.util.*; import java.io.*; public class Main{ public static void main(String[] args)throws IOException{ InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br=new BufferedReader(isr); String ad=br.readLine(); String bd=br.readLine(); int w = Integer.parseInt(ad); int n = In...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 0, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 185, 11 ], [ 185, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t//Input Initialize\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tstr = b...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { //Input Initialize BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str; str = br.readLine(); int Nver...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 11, 1, 41, 13, 17, 2,...
[ [ 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 ],...
[ "import java.util.Scanner;\n\npublic class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\tint w = sc.nextInt();\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = 0;\n\t\t\t\tint[] num = new int[w];\n\t\t\t\t\tfor(int i=0; i<w; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tnum[i] ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int n = sc.nextInt(); int x = 0; int[] num = new int[w]; for(int i=0; i<w; i++) { num[i] = i+1; } for(int i=0; i<n; i++) { ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 4, 18, 13, 41, 13, 41, 13, 41, 13, 41, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 1...
[ [ 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 ],...
[ "import java.util.Scanner;\n\npublic class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint[] lot_num = new int[w];\n\t\tint n = sc.nextInt();\n\t\tint a,b,swap;\n\t\tString str;\n\n\t\tfor(int i=0; i<w; i++){\n\t\t\tlot_num[i] = i+1;\n\...
import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int[] lot_num = new int[w]; int n = sc.nextInt(); int a,b,swap; String str; for(int i=0; i<w; i++){ lot_num[i] = i+1; } for(int i=0; i<n; i++){ s...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 20, 13, 41, 13, 20, 13, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.*;\nimport java.io.*;\n\nclass Main\n{\n public static void main(String[] args)\n {\n Scanner scan = new Scanner(System.in);\n int w = scan.nextInt(), n = scan.nextInt();\n int[] a = new int[n], b = new int[n];\n int[] ans = new int[w];\n\n scan.useDelimite...
import java.util.*; import java.io.*; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int w = scan.nextInt(), n = scan.nextInt(); int[] a = new int[n], b = new int[n]; int[] ans = new int[w]; scan.useDelimiter(",|\n"); ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 13, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 2, 13, 17, 1, 40, 13, 30, 0, 18, 13, 13, 13, 11, 1, 2, 13, 17, 1, 40, 13, 30, 30, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 118, 5 ], [ 118, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.*;public class Main{public static void main(String[] args) {Scanner sc =new Scanner(System.in);int n=sc.nextInt(),c=n,m=sc.nextInt();int num[]=new int[n+1];for(;n>0;n--) num[n]=n;for(;m>0;m--){String []s=sc.next().split(\",\");int a=Integer.parseInt(s[0]),b=Integer.parseInt(s[1]),t=num[a];num[a]=n...
import java.util.*;public class Main{public static void main(String[] args) {Scanner sc =new Scanner(System.in);int n=sc.nextInt(),c=n,m=sc.nextInt();int num[]=new int[n+1];for(;n>0;n--) num[n]=n;for(;m>0;m--){String []s=sc.next().split(",");int a=Integer.parseInt(s[0]),b=Integer.parseInt(s[1]),t=num[a];num[a]=num[b];n...
[ 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,...
[ [ 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 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\n public void DL() {\n Scanner s = new Scanner(System.in);\n int w = s.nextInt();\n int n = s.nextInt();\n int[][] list1 = new int[n][w + 1];\n int[][] list2 = new int[n][w + 1];\n\n for (int i = 0; i < n; i++) {\n ...
import java.util.Scanner; public class Main { public void DL() { Scanner s = new Scanner(System.in); int w = s.nextInt(); int n = s.nextInt(); int[][] list1 = new int[n][w + 1]; int[][] list2 = new int[n][w + 1]; for (int i = 0; i < n; i++) { String[] 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, 4, 18, 13, 17, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 132, 5 ], [ 132, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 11, 13 ], [ 8, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n public static void swap(int[] array, int x, int y) {\n int temp = array[x];\n array[x] = array[y];\n array[y] = temp;\n }\n\n public static void main(String args[]) {\n Scanner sc = new Scanner(System.in);\n sc.useDelimiter(\"[\\\\s,]\");\n\n ...
import java.util.Scanner; public class Main { public static void swap(int[] array, int x, int y) { int temp = array[x]; array[x] = array[y]; array[y] = temp; } public static void main(String args[]) { Scanner sc = new Scanner(System.in); sc.useDelimiter("[\\s,]"); int w = sc.nextInt(); ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2,...
[ [ 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 ],...
[ "import java.util.Scanner;\n\npublic class Main{\n public static void main(String arg[]){\n Scanner sc=new Scanner(System.in);\n int w=sc.nextInt();\n int n=sc.nextInt();\n String[] data=new String[w];\n for(int i=0;i<n;i++)data[i]=sc.next();\n int[] ans=new int[w];\n ...
import java.util.Scanner; public class Main{ public static void main(String arg[]){ Scanner sc=new Scanner(System.in); int w=sc.nextInt(); int n=sc.nextInt(); String[] data=new String[w]; for(int i=0;i<n;i++)data[i]=sc.next(); int[] ans=new int[w]; for(int i=...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 4, 18, 13, 13, 41, 13, 4, 13, 13, 0, 13, 4, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.List;\n\nclass Main {\n\t/**\n\t * ??\\?????????????????? / ????????????????????????\n\t */\n\tpublic static void main(String[] args) throws Except...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Arrays; import java.util.List; class Main { /** * ??\?????????????????? / ???????????????????????? */ public static void main(String[] args) throws Exception { // ??\??????...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 38, 5, 13, 30, 29, 30, 38, 5, 13, 30, 29, 30, 4, 18, 13, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\nimport java.util.List;\n\nclass Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System....
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; class Main { /** * @param args */ public static void main(String[] args) { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); try{ int ver...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 0...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 166, 5 ], [ 166, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint w = stdIn.nextInt();\n\t\tint n = stdIn.nextInt();\n\t\tint[] a = new int[n];\n\t\tint[] b = new int[n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tString tmp = stdIn.nex...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int w = stdIn.nextInt(); int n = stdIn.nextInt(); int[] a = new int[n]; int[] b = new int[n]; for(int i = 0; i < n; i++) { String tmp = stdIn.next(); String[] tmp2 = tmp.spl...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 18, 13, 13, 41, 13, 39, 39, 17, 17, 17, 40, 17, 39, 17, 40, 17, 17, 17, 41, 13, 20, 41, 13, 41, 13, 41, 13, 12, 13, 30, 41, 13, 17, 11, 1, 41, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 195, 14 ], ...
[ "\nimport java.util.*;\n\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\npublic class Main {//change to Main\n static int INF = Integer.MAX_VALUE;\n static int[][] near = {{0,0,1,-1},{1,-1,0,0}};\n static BufferedReader in = new BufferedReader(new In...
import java.util.*; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main {//change to Main static int INF = Integer.MAX_VALUE; static int[][] near = {{0,0,1,-1},{1,-1,0,0}}; static BufferedReader in = new BufferedReader(new InputStreamReader...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 41, 13, 4, 18, 13, 41, 13, 20, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ], [...
[ "import java.util.Scanner;\n\nclass Main{\n public static void main(String[] args){\n \tScanner scan = new Scanner(System.in);\n \t\n \twhile (scan.hasNextInt()){\n \t\tint numverline = scan.nextInt();\n \t\tint[] verline = new int[numverline];\n \t\tfor(int i = 0; i < numverline; i++){\n \t...
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); while (scan.hasNextInt()){ int numverline = scan.nextInt(); int[] verline = new int[numverline]; for(int i = 0; i < numverline; i++){ verline[i] = i+1; ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 0, 18, 13, 13, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 126, 5 ], [ 126, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main{\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int[] a = new int[w+1];\n for(int i = 1; i < w+1; i++) a[i]=i;\n int n = sc.nextInt();\n for(int i = 0; i < n; i++){\n ...
import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int[] a = new int[w+1]; for(int i = 1; i < w+1; i++) a[i]=i; int n = sc.nextInt(); for(int i = 0; i < n; i++){ String[] s = s...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 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,...
[ [ 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 ],...
[ "\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main{\n\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\t// TODO Auto-generated method stub\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main{ public static void main(String[] args) throws NumberFormatException, IOException { // TODO Auto-generated method stub BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int w...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 17, 12, 13, 30, 41, 13, 20, 41, 13, 17, 41, 13, 17, 38, 5, 13, 30, 4, 18, 13, 30, 38, 5, 13, 30, 4, 18, 13, 30, 4, 18, 13, 30, 0, 13, 4, 18, 13, 4, 18, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 161, 11 ], [ 161, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n private static final String REGIX_COMMA = \",\";\n\n public static void main(String[] args) {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n i...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { private static final String REGIX_COMMA = ","; public static void main(String[] args) { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); int wide = 0; ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 4, 18, 13, 17, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 11, 1, 41, 13, 17,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ], [...
[ "import java.util.Scanner;\n\nclass Main {\n public static void main (String args[]) {\n\tScanner scan = new Scanner(System.in);\n\tscan.useDelimiter(\",|\\n\");\n\tint n = scan.nextInt();\n\tint m = scan.nextInt();\n\tint[] seq = new int[n];\n\n\tfor (int i=0; i<n; i++) {\n\t seq[i] = i+1;\n\t}\n\n fo...
import java.util.Scanner; class Main { public static void main (String args[]) { Scanner scan = new Scanner(System.in); scan.useDelimiter(",|\n"); int n = scan.nextInt(); int m = scan.nextInt(); int[] seq = new int[n]; for (int i=0; i<n; i++) { seq[i] = i+1; } for (int i=0; i<m; i++) { i...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 2, 13, 17, 41, 13, 41, 13, 41, 13, 17, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.util.*;\n\n\nclass Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tMain main = new Main();\n\t\tint w = scan.nextInt();\n\t\tint n = scan.nextInt();\n\t\t\n\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < w; i++) {...
import java.util.*; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); Main main = new Main(); int w = scan.nextInt(); int n = scan.nextInt(); ArrayList<Integer> list = new ArrayList<Integer>(); for(int i = 0; i < w; i++) { list.add(i + 1); } int ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 20, 17, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 150, 5 ], [ 150, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], ...
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n // 標準入力からデータを読み込む準備\n Scanner sc = new Scanner(System.in);\n // あみだくじ貰ったリストに応じてスワップする。\n int w, n, a, b, i;// w(整数),n(整数),a,bはスワップの横棒(i番目)\n int fdata[] = new int[30];\n w = sc.nextI...
import java.util.*; public class Main { public static void main(String[] args) { // 標準入力からデータを読み込む準備 Scanner sc = new Scanner(System.in); // あみだくじ貰ったリストに応じてスワップする。 int w, n, a, b, i;// w(整数),n(整数),a,bはスワップの横棒(i番目) int fdata[] = new int[30]; w = sc.nextInt(); ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 17, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 41, 13, 0, 13, 20, 13, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 146, 5 ], [ 146, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ],...
[ "\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n while (sc.hasNext()) {\n int i = 0;\n int w = sc.nextInt();\n int n = sc.nextInt();\n String rem;\n int[] ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (sc.hasNext()) { int i = 0; int w = sc.nextInt(); int n = sc.nextInt(); String rem; int[] array; ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 20, 17, 41, 13, 20, 17, 41, 13, 41, 13, 41, 13, 41, 13, 20, 17, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], [ ...
[ "import java.util.Scanner;\n\nclass Main {\n\tpublic static void main(String args[]){\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint vertical;\n\t\tint cross;\n\t\tint[] num = new int[30];\n\t\tint[] change = new int[2];\n\t\tint i,tmp;\n\t\tString Line;\n\t\tString splitLine[] = new String[2];\n\t\t\n\...
import java.util.Scanner; class Main { public static void main(String args[]){ Scanner scan = new Scanner(System.in); int vertical; int cross; int[] num = new int[30]; int[] change = new int[2]; int i,tmp; String Line; String splitLine[] = new String[2]; vertical = scan.nextInt(); cross = sc...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 2, 13, 17, 41, 13, 41, 13, 41, 13, 41, 13, 11, 1...
[ [ 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 ],...
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt(), n = sc.nextInt();\n int[] num = new int[w];\n for (int i=0; i<w; i++) num[i] = i+1;\n\n int a, b, tmp;\n String s;\n ...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int w = sc.nextInt(), n = sc.nextInt(); int[] num = new int[w]; for (int i=0; i<w; i++) num[i] = i+1; int a, b, tmp; String s; for (int i=0;...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 41, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 11, 1, 41...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.util.Scanner;\n\nclass Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint size = in.nextInt();\n\t\tint n = in.nextInt();\n\t\tint[] lines = new int[size];\n\t\tint a, b;\n\t\tfor (int i = 0; i < lines.length; i++) {\n\t\t\tlines[i] = i + 1;\n\t\t}\n\t...
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int size = in.nextInt(); int n = in.nextInt(); int[] lines = new int[size]; int a, b; for (int i = 0; i < lines.length; i++) { lines[i] = i + 1; } for (int i = 0; i < n; i++) { St...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 20, 13, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 11, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 152, 5 ], [ 152, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], ...
[ "import java.util.*;\n\npublic class Main{\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint[] mem;\n\t\tint n,time,i;\n\t\t\n\t\tn = sc.nextInt();\n\t\ttime = sc.nextInt();\n\t\tmem = new int[n];\n\t\t\n\t\tfor (i=0 ; i<n ; i++) {\n\t\t\tmem[i] = i+1;\n\t\t}\n\t\t...
import java.util.*; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] mem; int n,time,i; n = sc.nextInt(); time = sc.nextInt(); mem = new int[n]; for (i=0 ; i<n ; i++) { mem[i] = i+1; } for (i=0 ; i<time ; i++) { String reader; ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 2, 13, 17, 2, 13, 17, 11, 1, 0, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 142, 5 ], [ 142, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], ...
[ "\nimport java.util.Scanner;\n\npublic class Main{\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint i;\n\t\tint w = scanner.nextInt();\n\t\tint n = scanner.nextInt();\n\t\tint[] box = new int[w + 1];\n\n\t\tfor (i = 0; i < w; i++) {\n...
import java.util.Scanner; public class Main{ public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner scanner = new Scanner(System.in); int i; int w = scanner.nextInt(); int n = scanner.nextInt(); int[] box = new int[w + 1]; for (i = 0; i < w; i++) { box[i + 1] = i + 1; } for ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 0, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 41, 13, 41, 13, 20, 13, 11, 1, 0, 13, 17, 2, 13, 13, 1,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.io.*;\nimport java.util.*;\n\nclass Main{\n public static void main(String[] args)throws IOException{\n InputStreamReader isr =new InputStreamReader(System.in);\n \t\tBufferedReader reader =new BufferedReader(isr);\n \t\n /*???????????¬??°w???????????????*/\n String buf = r...
import java.io.*; import java.util.*; class Main{ public static void main(String[] args)throws IOException{ InputStreamReader isr =new InputStreamReader(System.in); BufferedReader reader =new BufferedReader(isr); /*???????????¬??°w???????????????*/ String buf = reader.readLine();...
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 4, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "\nimport java.util.*;\n\nclass Main {\n\tScanner sc = new Scanner(System.in);\n\n\tpublic void run() {\n\t\tint w=sc.nextInt();\n\t\tint n=sc.nextInt();\n\t\tint [] data=new int[w+1];\n\t\tfor(int i=1;i<=w;i++){\n\t\t\tdata[i]=i;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<n;i++){\n\t\t\tString bar=sc.next();\n\t\t\tString[] ...
import java.util.*; class Main { Scanner sc = new Scanner(System.in); public void run() { int w=sc.nextInt(); int n=sc.nextInt(); int [] data=new int[w+1]; for(int i=1;i<=w;i++){ data[i]=i; } for(int i=0;i<n;i++){ String bar=sc.next(); String[] bs=bar.split(","); int a1=Integer.parseInt(...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 41, 13, 17, 41, 13, 17, 0, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 182, 11 ], [ 182, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n \npublic class Main {\n \n public static void main(String[] args) throws IOException {\n \n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \n // ?????£???????¬???°\n ...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); // ?????£???????¬???° int vertical = ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 17, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 2, 13, 17, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, ...
[ [ 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 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int[] array = new int[30];\n\n int w = scanner.nextInt();\n for (int i = 0; i < w; ++i) array[i] = i + 1;\n\n int n = scanner.nextInt();\n\n for (int i = 0; i...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int[] array = new int[30]; int w = scanner.nextInt(); for (int i = 0; i < w; ++i) array[i] = i + 1; int n = scanner.nextInt(); for (int i = 0; i < n; ++i) { ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 13, 11, 1, 41,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 131, 8 ], [ 131, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.util.Scanner;\nimport java.util.Arrays;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int w = sc.nextInt();\n int n = sc.nextInt();\n int[] num = new int[w+1];\n sc.nextLine();\n for(int i=1; i<=w; i...
import java.util.Scanner; import java.util.Arrays; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int n = sc.nextInt(); int[] num = new int[w+1]; sc.nextLine(); for(int i=1; i<=w; i++){ ...
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 20, 4, 18, 13, 17, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 4, 18, 13, 17, 11, 1,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 167, 5 ], [ 167, 6 ], [ 6, 7 ], [ 6, 8 ], [ 167, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ...
[ "import java.util.Scanner;\n\npublic class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\n\tpublic static void main(String[] args) {\n\t\t//?????°??????\n\t\tint vertical = sc.nextInt(); //???????????¬??°\n\t\tString[][] cross = new String[sc.nextInt()][2]; //?¨?????????¬??°\n\t\tString[] ans = new String...
import java.util.Scanner; public class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { //?????°?????? int vertical = sc.nextInt(); //???????????¬??° String[][] cross = new String[sc.nextInt()][2]; //?¨?????????¬??° String[] ans = new String[vertical]; //?¨?????...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 17, 4, 18,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 213, 5 ], [ 213, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main{\n\t\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tBridge[] b = new Bridge[n];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tString in = sc.next();\n\t\t\tint x = Integer.parse...
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int w = sc.nextInt(); int n = sc.nextInt(); Bridge[] b = new Bridge[n]; for(int i = 0; i < n; i++){ String in = sc.next(); int x = Integer.parseInt(in.substring(0, in.indexOf(","...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 38, 30, 4, 18, 13, 30, 0, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 41, 13, 4, 18, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 131, 5 ], [ 131, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ],...
[ "\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = null;\n\t\ttry {\n\t\t\tsc = new Scanner(System.in);\n\t\t\t// 縦線の数\n\t\t\tint w = sc.nextInt();\n\t\t\t// あみだのスタートライン\n\t\t\tint[] nums = new int[w];\n\t\t\tfor (int i = 0; i < w; i++) {\n\t\t\t\tnum...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = null; try { sc = new Scanner(System.in); // 縦線の数 int w = sc.nextInt(); // あみだのスタートライン int[] nums = new int[w]; for (int i = 0; i < w; i++) { nums[i] = i + 1; } // 横線の数 int n = sc.n...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 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, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 141, 11 ], [ 141, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\nimport java.lang.Math;\nimport java.util.Random;\n\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n//\t\tRandom rnd = new Random();\n\t\tint w = sc.nextInt();\n\t\tint n = sc.nextInt();\n\t\tint[] values = new int[w];\n\t\tfor(int...
import java.util.Scanner; import java.lang.Math; import java.util.Random; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); // Random rnd = new Random(); int w = sc.nextInt(); int n = sc.nextInt(); int[] values = new int[w]; for(int i=0; i<values.length; i++){ ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 134, 11 ], [ 134, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.BufferedReader;\n\npublic class Main{\n public static void main(String[] args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n int w = Integer.parseInt(br.readLine());...
import java.io.IOException; import java.io.InputStreamReader; import java.io.BufferedReader; public class Main{ public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int w = Integer.parseInt(br.readLine()); int ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 0, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 0, 13, 4, 18, 13, 11, 1, 41, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 139, 5 ], [ 139, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], ...
[ "import java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n Scanner sc =new Scanner(System.in);\n int n,m;\n n=sc.nextInt();\n int []x =new int [n];\n for(int j=0;j<x.length;j++){\n\t\t\tx[j]=j+1;\n }\n m=sc.nextInt();\n\n for...
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc =new Scanner(System.in); int n,m; n=sc.nextInt(); int []x =new int [n]; for(int j=0;j<x.length;j++){ x[j]=j+1; } m=sc.nextInt(); for(int i=0;i<m;i++){ ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 4, 18, 13, 17, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 2, 13, 17, 41, 13, 4, 18, 13, 41, 13, 41, 13, 41, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 129, 5 ], [ 129, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n sc.useDelimiter(\",|\\n\");\n int w=sc.nextInt();\n int array[]=new int[w];\n for(int i=0;i<w;i++) array[i]=i+1;\n int n=sc.nextInt();\n int a,b,c;\n for(int i=0...
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); sc.useDelimiter(",|\n"); int w=sc.nextInt(); int array[]=new int[w]; for(int i=0;i<w;i++) array[i]=i+1; int n=sc.nextInt(); int a,b,c; for(int i=0;i<n;i++){ a=...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 18, 13, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.io.*;\n\nclass Main {\n public static void main (String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int N = Integer.parseInt(br.readLine());\n String[] elements = br.readLine().split(\" \");\n int[] A = new int[...
import java.io.*; class Main { public static void main (String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int N = Integer.parseInt(br.readLine()); String[] elements = br.readLine().split(" "); int[] A = new int[N]; fo...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 4, 13, 0, 13, 4, 13, 12, 13, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 18, 13, 13, 41, 13, 2, 13, 17...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 288, 11 ], [ 288, 12 ], [ 12, 13 ], [ 288, 14 ]...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\t\n\tstatic int N;\n\tstatic int[] A;\n\t\n\tstatic void input() throws IOException {\n\t\tN = readInt();\n\t\tA = readMultiInt();\n\t}\n\t\n\tstatic void process() {\n\t\tfor (int i = 0; i < N; ...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { static int N; static int[] A; static void input() throws IOException { N = readInt(); A = readMultiInt(); } static void process() { for (int i = 0; i < N; i++) { int n = A[i]; int j =...