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, 41, 13, 41, 13, 41, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 0, 13, 20, 17, 4, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 209, 5 ], [ 209, 6 ], [ 6, 7 ], [ 209, 8 ], [ 8, 9 ], [ 209, 10 ], [ 10, 11 ], [ 209, 12 ], [ 12, 13 ], [ 12, ...
[ "import java.util.Scanner;\n\npublic class Main {\n \n static Pair[] queue;\n static int head;\n static int tail;\n\n public static void main(String[] args) {\n \n Scanner sc = new Scanner(System.in);\n \n int n = Integer.parseInt(sc.next());\n int q = Integer.parse...
import java.util.Scanner; public class Main { static Pair[] queue; static int head; static int tail; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.next()); int q = Integer.parseInt(sc.next()); ...
[ 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, 38, 5, 13, 30, 4, 18, 18, 13, 13, 13, 30, 41, 13, 4, 18, 4, 18, 13, 17, 4...
[ [ 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.io.*;\n\nclass Ps {\n\tString name;\n\tInteger t;\n\t\n\tpublic Ps( String name, Integer t )\n\t{\n\t\tthis.name = name;\n\t\tthis.t = t;\n\t}\n}\n \nclass Main {\n public static void main(String[] args) {\n BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n ...
import java.io.*; class Ps { String name; Integer t; public Ps( String name, Integer t ) { this.name = name; this.t = t; } } class Main { public static void main(String[] args) { BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) ); try { String[] ...
[ 7, 15, 13, 17, 6, 13, 41, 13, 17, 41, 13, 12, 13, 30, 0, 13, 13, 0, 13, 13, 23, 13, 23, 13, 12, 13, 30, 4, 18, 18, 13, 13, 2, 2, 13, 17, 13, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 41, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 4, 9 ], [ 9, 10 ], [ 4, 11 ], [ 11, 12 ], [ 11, 13 ], [ 13, 14 ], ...
[ "import java.util.Scanner;\nclass Queue{\n\tString name=\"\";\n\tint time;\n\tpublic Queue(String str,int t) {\n\t\tname=str;\n\t\ttime=t;\n\t}\n\tpublic void Show() {\n\t\tSystem.out.println(name+\" \"+time);\n\t}\n}\n\npublic class Main{\n public static void main(String[] args){\n Scanner scan=new Scann...
import java.util.Scanner; class Queue{ String name=""; int time; public Queue(String str,int t) { name=str; time=t; } public void Show() { System.out.println(name+" "+time); } } public class Main{ public static void main(String[] args){ Scanner scan=new Scanner(System.in); int i,j,n,q,t...
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 12, 13, 30, 29, 18, 36, 13, 12, 13, 30, 29, 18, 36, 13, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, ...
[ [ 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.*;\nclass Process{\n public String name;\n public int time;\n public String getName(){\n\treturn this.name;\n }\n public int getTime(){\n\treturn this.time;\n }\n}\nclass Main{\n\n public static void main(String[] args) {\n\tScanner sc = new Scanner(System.in);\n\tint n = sc.n...
import java.util.*; class Process{ public String name; public int time; public String getName(){ return this.name; } public int getTime(){ return this.time; } } class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(),q = sc.nextInt(...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 4, 18, 20, 23, 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, 41, 13, 13, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 322, 5 ], [ 322, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 10, 11 ], [ 6, 12 ], [ 12, 13 ], [ 322, 14 ...
[ "import java.util.Scanner;\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tnew Main().run();\n\t}\n\tpublic void run(){\n\t\tScanner scan = new Scanner(System.in);\n\t\twhile(scan.hasNext()){\n\t\t\tint n = scan.nextInt();\n\t\t\tint sTime = scan.nextInt();\n\t\t\tProcess[] schedule = new Proces...
import java.util.Scanner; public class Main{ public static void main(String[] args){ new Main().run(); } public void run(){ Scanner scan = new Scanner(System.in); while(scan.hasNext()){ int n = scan.nextInt(); int sTime = scan.nextInt(); Process[] schedule = new Process[n]; int count = n; int j ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 192, 11 ], [ 192, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString[] tmp = br.readLine().split(\" \");\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)); String[] tmp = br.readLine().split(" "); int n = Integer.parse...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, ...
[ [ 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 ], [ 185, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.LinkedList;\nimport java.util.Queue;\n\npublic class Main {\n\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] l = b...
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.LinkedList; import java.util.Queue; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] l = br.readLine().s...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 17, 41, 13, 20, 41, 13, 20, 41, 13, 20, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41...
[ [ 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 ], [ 11, 14 ]...
[ "import java.io.*;\nimport java.util.*;\n\npublic class Main {\n public static void main(String args[]) {\n int n, q, time = 0;\n Queue<String> queueName = new ArrayDeque<String>();\n Queue<Integer> queueTime = new ArrayDeque<Integer>();\n Scanner sc = new Scanner(System.in);\n\n ...
import java.io.*; import java.util.*; public class Main { public static void main(String args[]) { int n, q, time = 0; Queue<String> queueName = new ArrayDeque<String>(); Queue<Integer> queueTime = new ArrayDeque<Integer>(); Scanner sc = new Scanner(System.in); n = sc.nextI...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 20, 41, 13, 17, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 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 ], [ 117, 11 ], [ 117, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.ArrayDeque;\nimport java.util.Queue;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tQueue<String> nameQueue = new ArrayDeque<>();\n\t\tQueue<Integer> timeQueue = new ArrayDeque<>();\n\t\tint time = 0;...
import java.util.ArrayDeque; import java.util.Queue; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); Queue<String> nameQueue = new ArrayDeque<>(); Queue<Integer> timeQueue = new ArrayDeque<>(); int time = 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, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 0, 18, 13, 13, 4,...
[ [ 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 scanner = new Scanner(System.in);\n\t\tint num = scanner.nextInt();//要素数\n\t\tint time = scanner.nextInt();//要素数\n\t\tint[] array = new int[num];\n\t\tString[] pro = new String[num];\n\t\t\n\t\tfor(int i = 0; i < n...
import java.util.Scanner; class Main { public static void main(String args[]) { Scanner scanner = new Scanner(System.in); int num = scanner.nextInt();//要素数 int time = scanner.nextInt();//要素数 int[] array = new int[num]; String[] pro = new String[num]; for(int i = 0; i < num; i ++ ){ pro[i] = scanne...
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 17, 0, 18, 36, 13, 17, 0, 18, 36, 13, 13, 0, 18, 36, 13, 17, 0, 18, 36, 13, 20, 2, 13, 17, 0, 18, 36, 13, 2, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 4, 8 ], [ 8, 9 ], [ 4, 10 ], [ 10, 11 ], [ 4, 12 ], [ 12, 13 ], [ 4, 14 ], [...
[ "import java.io.*;\nclass Que {\n int queStart;\n int queTail;\n int procTime;\n String[] arry;\n int elapsedTime;\n int max;\n public Que(int procTime, int maxLen) {\n this.queStart = 0;\n this.queTail = 0;\n this.procTime = procTime;\n this.elapsedTime = 0;\n thi...
import java.io.*; class Que { int queStart; int queTail; int procTime; String[] arry; int elapsedTime; int max; public Que(int procTime, int maxLen) { this.queStart = 0; this.queTail = 0; this.procTime = procTime; this.elapsedTime = 0; this.arry = new Strin...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 41, 13, 20, 2, 13, 17, 41, 13, 20, 2, 13, 17, 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 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 11, 14 ], ...
[ "import java.io.IOException;\nimport java.util.Scanner;\nclass Main{\n\tpublic static void main(String[] args)throws NumberFormatException, IOException{\n//\t\tSystem.out.println(\" \");\n\t\tmathClass keisan;\n\t\tScanner scan = new Scanner(System.in);\n\t\tint queueAmount = scan.nextInt();\n\t\tint qTime = scan.n...
import java.io.IOException; import java.util.Scanner; class Main{ public static void main(String[] args)throws NumberFormatException, IOException{ // System.out.println(" "); mathClass keisan; Scanner scan = new Scanner(System.in); int queueAmount = scan.nextInt(); int qTime = scan.nextInt(); int totalTime ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 17, 1, 40, 13, 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 ], [ 13, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayDeque;\nimport java.util.Deque;\nimport java.util.regex.Pattern;\n\npublic class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedRea...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayDeque; import java.util.Deque; import java.util.regex.Pattern; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputS...
[ 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, 41, 13, 17, 41, 13, 2, 13, 17, 41, 13, 17, 41, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 146, 5 ], [ 146, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n \tint n = scan.nextInt();\n \tint q = scan.nextInt();\n \tint[] tqueue = new int[n];\n \tString[] nqueue = new String[n];\n \tint start = 0;\n \tint end = n...
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int q = scan.nextInt(); int[] tqueue = new int[n]; String[] nqueue = new String[n]; int start = 0; int end = n - 1; int now =...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 143, 5 ], [ 143, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "\nimport java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scin = new Scanner(System.in);\n\t\tString[] baseInput = scin.nextLine().split(\" \");\n\t\t\n\t\tint numberOfProcesses = Integer.parseInt(baseInput[0]);\n\t\tint timeSlotLength = Integer.parseInt(baseInput[1]);\n...
import java.util.*; public class Main { public static void main(String[] args) { Scanner scin = new Scanner(System.in); String[] baseInput = scin.nextLine().split(" "); int numberOfProcesses = Integer.parseInt(baseInput[0]); int timeSlotLength = Integer.parseInt(baseInput[1]); Queue<String> queue = n...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 17, 12, 13, 30, 41, 13, 20, 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, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 139, 14 ], ...
[ "import java.util.ArrayDeque;\nimport java.util.Arrays;\nimport java.util.Deque;\nimport java.util.Scanner;\n\npublic class Main {\n\tint time = 0;\n\tvoid run() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tDeque<Integer> Qi = new ArrayDeque<>();\n\t\tDeque<String> Qs = new ArrayDeque<>();\n\t\tint n = sc.nextI...
import java.util.ArrayDeque; import java.util.Arrays; import java.util.Deque; import java.util.Scanner; public class Main { int time = 0; void run() { Scanner sc = new Scanner(System.in); Deque<Integer> Qi = new ArrayDeque<>(); Deque<String> Qs = new ArrayDeque<>(); int n = sc.nextInt(); int q = sc.nextInt...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 17, 41, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, ...
[ [ 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 ], ...
[ "/* package whatever; // don't place package name! */\n\nimport java.util.*;\nimport java.lang.*;\nimport java.lang.reflect.Array;\nimport java.io.*;\n\n/* Name of the class has to be \"Main\" only if the class is public. */\nclass Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n...
/* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.lang.reflect.Array; import java.io.*; /* Name of the class has to be "Main" only if the class is public. */ class Main { public static void main (String[] args) throws java.lang.Exception { BufferedReader br =...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 20, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 119, 5 ], [ 119, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.*;\n\npublic class Main{\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int timenow = 0;\n int n = sc.nextInt();\n int q = sc.nextInt();\n String[] names = new String[n];\n int[] times = new int[n];\n LinkedLis...
import java.util.*; public class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int timenow = 0; int n = sc.nextInt(); int q = sc.nextInt(); String[] names = new String[n]; int[] times = new int[n]; LinkedList<Integer> queu...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 20, 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 ], [ 260, 11 ], [ 260, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\nimport java.util.Arrays;\nimport java.util.StringJoiner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String[] processInfo = scanner.nextLine().split(\" \");\n \n int processCount = Integer....
import java.util.Scanner; import java.util.Arrays; import java.util.StringJoiner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String[] processInfo = scanner.nextLine().split(" "); int processCount = Integer.parseInt(process...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 20, 41, 13, 17, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 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 ], ...
[ "\n\nimport java.util.Deque;\nimport java.util.HashMap;\nimport java.util.LinkedList;\nimport java.util.Queue;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t\n\t\tDeque<Integer> queue = new LinkedList<>();\n\t\tDeque<St...
import java.util.Deque; import java.util.HashMap; import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); Deque<Integer> queue = new LinkedList<>(); Deque<String> name = new LinkedList<...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 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, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 168, 11 ], [ 168, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\nimport java.util.Queue;\nimport java.util.ArrayDeque;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tString input = in.nextLine();\n\t\tScanner setsinput = new Scanner(input);\n\t\tint n = setsinput.nextInt();\n\t\tint qu...
import java.util.Scanner; import java.util.Queue; import java.util.ArrayDeque; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); String input = in.nextLine(); Scanner setsinput = new Scanner(input); int n = setsinput.nextInt(); int quantum_time = setsinput.nex...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 17, 41, 13, 17, 12, 13, 30, 41, 13, 20, 38, 5, 13, 30, 4, 18, 13, 30, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, ...
[ [ 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.ArrayDeque;\nimport java.util.Queue;\n\npublic class Main {\n\n\tpublic static final int BIG_NUM = 2000000000;\n\tpublic static final int MOD = 1000000007;\n\n\tpublic static void main(String[] args) ...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayDeque; import java.util.Queue; public class Main { public static final int BIG_NUM = 2000000000; public static final int MOD = 1000000007; public static void main(String[] args) { BufferedReader...
[ 7, 6, 13, 41, 13, 41, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 20, 2, 13, 17, 0, 13, 20, 2, 13, 17, 11, 1, 0, 13, ...
[ [ 0, 1 ], [ 256, 2 ], [ 256, 3 ], [ 3, 4 ], [ 256, 5 ], [ 5, 6 ], [ 256, 7 ], [ 7, 8 ], [ 7, 9 ], [ 9, 10 ], [ 10, 11 ], [ 10, 12 ], [ 9, 13 ], [ 13, 14...
[ "public class Main{\n static int head, tail;\n public void run(java.io.InputStream in, java.io.PrintStream out){\n java.util.Scanner sc = new java.util.Scanner(in);\n/*answer*/\n int n, q;\n String[] name;\n int[] time;\n int i, t, a;\n String s;\n\n n = sc.nextInt();\n q = sc.nextInt();\n...
public class Main{ static int head, tail; public void run(java.io.InputStream in, java.io.PrintStream out){ java.util.Scanner sc = new java.util.Scanner(in); /*answer*/ int n, q; String[] name; int[] time; int i, t, a; String s; n = sc.nextInt(); q = sc.nextInt(); name = new Str...
[ 7, 15, 13, 17, 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, 12, 13, 30, 29, 13, 12, 13, 30, 29, 13, 6, 13, 41, 13, 41, 13, 17, 41, 13, 17, 12, 13, 30, 0, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 9, 10 ], [ 7, 11 ], [ 11, 12 ], [ 7, 13 ], [ 13, 14 ], [...
[ "import java.util.Scanner;\nimport java.nio.*;\n\nclass Queue{\n private String name;\n private int time;\n\n public Queue(String name, int time){\n this.name = name;\n this.time = time;\n }\n\n public String getName(){\n return name;\n }\n\n public int getTime(){\n ...
import java.util.Scanner; import java.nio.*; class Queue{ private String name; private int time; public Queue(String name, int time){ this.name = name; this.time = time; } public String getName(){ return name; } public int getTime(){ return time; } } ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 0, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 169, 5 ], [ 169, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n Scanner s=new Scanner(System.in);\n int n=s.nextInt();\n int q=s.nextInt();\n String name[]=new String[n+1];\n int time[]=new int[n+1];\n for(int i=0;i<n;i++){\n name[i]...
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner s=new Scanner(System.in); int n=s.nextInt(); int q=s.nextInt(); String name[]=new String[n+1]; int time[]=new int[n+1]; for(int i=0;i<n;i++){ name[i]=s.next(); ...
[ 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, 41, 13, 20, 11, 1, 41, ...
[ [ 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 process {\n public String name;\n public int time;\n \n public process(String name,int time){\n this.name = name;\n this.time = time;\n }\n}\n\npublic class Main {\n \n public static void main(String[] args) {\n \n Scanner sc = new Scanner(Syste...
import java.util.*; class process { public String name; public int time; public process(String name,int time){ this.name = name; this.time = time; } } public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int ...
[ 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, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 20, 41, 13, 20, 11, 1, 41, 13, 17, 2, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 163, 8 ], [ 163, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.util.ArrayList;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line1 = sc.nextLine();\n\t\tString[] li1 = line1.split(\" \");\n\t\tint n = In...
import java.util.ArrayList; import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO ????????????????????????????????????????????? Scanner sc = new Scanner(System.in); String line1 = sc.nextLine(); String[] li1 = line1.split(" "); int n = Integer.parseInt(li1[0]); in...
[ 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, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 4, 18, 13, 4, 18, 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 ], [...
[ "\nimport java.util.*;\n\nclass Main{\n\n\tpublic static void main(String[] args){\n\t\tScanner sc= new Scanner(System.in);\n\t\tint n= sc.nextInt(), q= sc.nextInt();\n\n\t\tDeque<String> P = new ArrayDeque<String>();\n\t\tDeque<Integer> T = new ArrayDeque<Integer>();\n\n\t\tfor(int i=0; i<n; i++){\n\t\t\tP.add( s...
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc= new Scanner(System.in); int n= sc.nextInt(), q= sc.nextInt(); Deque<String> P = new ArrayDeque<String>(); Deque<Integer> T = new ArrayDeque<Integer>(); for(int i=0; i<n; i++){ P.add( sc.next() ); T.add( sc.nextI...
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 17, 41, 13, 12, 13, 30, 0, 13, 17, 12, 13, 30, 0, 18, 13, 40, 13, 13, 23, 13, 12, 13, 30, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 18, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 4, 10 ], [ 10, 11 ], [ 4, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], ...
[ "import java.util.Scanner;\n\nclass Queue{\n Process[] a = new Process[100001];\n int top;\n\n Queue(){\n top = 0;\n }\n\n void enqueue(Process p){\n a[++top] = p;\n }\n\n Process dequeue(){\n Process p = new Process(a[1]);\n for(int i = 1; i < top; i++){\n a[i] = a[i+1];\n }\n top--;\...
import java.util.Scanner; class Queue{ Process[] a = new Process[100001]; int top; Queue(){ top = 0; } void enqueue(Process p){ a[++top] = p; } Process dequeue(){ Process p = new Process(a[1]); for(int i = 1; i < top; i++){ a[i] = a[i+1]; } top--; return p; } boo...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 20, 17, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 2, 2, 4, 18, 13, 17, 4, 18, 13, 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 ], [...
[ "\nimport java.util.*;\n\n\nclass Main\n{\n public static void main(String[] args)throws Exception\n {\n Scanner sc = new Scanner(System.in);\n Deque <String> que = new ArrayDeque <>(); \n String []s = new String [2]; \n int n = sc.nextInt();\n int quan = sc.nextInt();\n ...
import java.util.*; class Main { public static void main(String[] args)throws Exception { Scanner sc = new Scanner(System.in); Deque <String> que = new ArrayDeque <>(); String []s = new String [2]; int n = sc.nextInt(); int quan = sc.nextInt(); for(int i = 0...
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 41, 13, 41, 13, 17, 41, 13, 20, 41, 13, 0, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 0, 13, 4, 18, 13, 18, 13, 17, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 4, 8 ], [ 8, 9 ], [ 4, 10 ], [ 10, 11 ], [ 0, 12 ], [ 198, 13 ], [ 198, 14 ], ...
[ "import java.util.*;\nclass Processe{\n\tString processesName;\n\tint Times;\n\tint endtime;\n}\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tQueue<Processe> queue = new LinkedList<Processe>();\n\t\tQueue<Processe> queue2 = new LinkedList<Processe>();\n\t\tint n;\n\t\tint q;\n\t\tint endtime...
import java.util.*; class Processe{ String processesName; int Times; int endtime; } public class Main{ public static void main(String[] args){ Queue<Processe> queue = new LinkedList<Processe>(); Queue<Processe> queue2 = new LinkedList<Processe>(); int n; int q; int endtime = 0; Scanner scanner = new S...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 12, 13, 30, 29, 13, 12, 13, 30, 29, 13, 12, 13, 30, 0, 18, 36, 13, 13, 23, 13, 12, 13, 30, 0, 18, 36, 13, 13, 0, 18, 36, 13, 13, 23, 13, 23, 13, 6, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 10, 14 ], ...
[ "import java.util.ArrayDeque;\nimport java.util.Deque;\nimport java.util.Scanner;\n\nclass Processees {\n\tprivate String name;\n\tprivate int time;\n\n\tpublic String getName() {\n\t\treturn name;\n\t}\n\n\tpublic int getTime() {\n\t\treturn time;\n\t};\n\n\tpublic void setTime(int time) {\n\t\tthis.time = time;\n...
import java.util.ArrayDeque; import java.util.Deque; import java.util.Scanner; class Processees { private String name; private int time; public String getName() { return name; } public int getTime() { return time; }; public void setTime(int time) { this.time = time; } public Processees(String name, ...
[ 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, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 4, 18...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\nimport java.util.Deque;\nimport java.util.ArrayDeque;\n\nclass Main {\n public static void main(String... args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int q = sc.nextInt();\n Deque<String> names = new ArrayDeque<String>(50000);\n Deque<Integer>...
import java.util.Scanner; import java.util.Deque; import java.util.ArrayDeque; class Main { public static void main(String... args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int q = sc.nextInt(); Deque<String> names = new ArrayDeque<String>(50000); Deque<Integer> times = new Ar...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 17, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 41, 13, 20, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 202, 11 ], [ 202, 12 ], [ 12, 13 ], [ 202, 14 ]...
[ "import java.util.Scanner;\nimport java.util.LinkedList;\nimport java.util.Queue;\n\npublic class Main{\n\tString name;\n\tint time;\n\tstatic int totalTime = 0;\n\n\n\t\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner in = new Scanner(System.in);\n\t\tString line = in.nextLine(); \n\t\tString[] words =...
import java.util.Scanner; import java.util.LinkedList; import java.util.Queue; public class Main{ String name; int time; static int totalTime = 0; public static void main(String[] args) { Scanner in = new Scanner(System.in); String line = in.nextLine(); String[] words = line.split(" "); Problem curr...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 20, 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 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\nimport java.util.ArrayDeque;\nimport java.util.Queue;\nclass Main {\n public static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tString[] t = scan.nextLine().split(\"\\\\s\");\n\t\tint num = Integer.parseInt(t[0]);\n\t\tint Dectime = Integer.parseInt(t[1]...
import java.util.Scanner; import java.util.ArrayDeque; import java.util.Queue; class Main { public static void main(String[] args){ Scanner scan = new Scanner(System.in); String[] t = scan.nextLine().split("\\s"); int num = Integer.parseInt(t[0]); int Dectime = Integer.parseInt(t[1]); Queue<Process> qu...
[ 7, 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, 41, 13, 41, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 285, 8 ], [ 285, 9 ], [ 9, 10 ], [ 9, 11 ], [ 285, 12 ], [ 12, 13 ], [ 12, 14 ...
[ "import java.nio.*;\nimport java.util.*;\n\npublic class Main {\n static Scanner sc = new Scanner(System.in);\n\n public static void main(String[] args) throws Exception {\n int n = sc.nextInt();\n int q = sc.nextInt();\n\n Queue queue = new Queue(n);\n\n String s;\n int t;\n for (int i = 0; i <...
import java.nio.*; import java.util.*; public class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) throws Exception { int n = sc.nextInt(); int q = sc.nextInt(); Queue queue = new Queue(n); String s; int t; for (int i = 0; i < n; i++) { s ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 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 ], [ 116, 11 ], [ 116, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.LinkedList;\nimport java.util.Queue;\nimport 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 timecount =0;\n\t\tint count = sc.nextInt();\n\t\tint max = sc.nextInt();\n\n\t\tQueue<String> queName = new Lin...
import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int timecount =0; int count = sc.nextInt(); int max = sc.nextInt(); Queue<String> queName = new LinkedList<String>(); Queue<I...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 20, 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.*;\n\npublic class Main {\n\tclass Process {\n\t\tString name;\n\t\tint time;\n\t\tProcess(String name, int time) {\n\t\t\tthis.name = name;\n\t\t\tthis.time = time;\n\t\t}\n\t}\n\tvoid run() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint n = scanner.nextInt();\n\t\tint q = scanner.next...
import java.util.*; public class Main { class Process { String name; int time; Process(String name, int time) { this.name = name; this.time = time; } } void run() { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int q = scanner.nextInt(); Queue<Process> que = new LinkedLi...
[ 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, 17, 41, 13, 20, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 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 ], [ 118, 11 ], [ 118, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.ArrayDeque;\nimport java.util.Deque;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tfinal int t = scan.nextInt();\n\t\tint totalTime = 0;\n\n\t\tDeque<String> queueName = ...
import java.util.ArrayDeque; import java.util.Deque; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); final int t = scan.nextInt(); int totalTime = 0; Deque<String> queueName = new ArrayDeque<String>(); ...
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 13, 0, 13, 13, 23, 13, 23, 13, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 4, 8 ], [ 8, 9 ], [ 4, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 13, 14 ], ...
[ "import java.util.*;\nclass Pair{\n\tint t;\n\tString name;\n\tpublic Pair(int val,String str){\n\t\tt = val;\n\t\tname = str; \n\t}\n}\npublic class Main {\n\tpublic static void main(String args[]){\n\t\tScanner sc =new Scanner(System.in);\n\t\tint n,quantum;\n\t\tn = sc.nextInt();\n\t\tquantum = sc.nextInt();\n\t...
import java.util.*; class Pair{ int t; String name; public Pair(int val,String str){ t = val; name = str; } } public class Main { public static void main(String args[]){ Scanner sc =new Scanner(System.in); int n,quantum; n = sc.nextInt(); quantum = sc.nextInt(); Queue<Pair> queue = new LinkedList<Pa...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 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, 12, 13, 30, 29, 13, 12, 13, 30, 0, 18, 36, 13, 13, 23, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], ...
[ "import java.io.IOException;\nimport java.io.InputStream;\nimport java.util.LinkedList;\nimport java.util.Queue;\nimport java.util.Scanner;\n\nclass Process {\n private String name;\n private int time;\n \n public Process(String name, int time) {\n this.name = name;\n this.time = time;\n }\n \...
import java.io.IOException; import java.io.InputStream; import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; class Process { private String name; private int time; public Process(String name, int time) { this.name = name; this.time = time; } public int getTi...
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 20, 0, 18, 13, 13, 4, 18, 13, 0,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 4, 8 ], [ 8, 9 ], [ 0, 10 ], [ 127, 11 ], [ 127, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.*;\n\nclass Task {\n String name;\n int time;\n}\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n int quantum = sc.nextInt();\n\n Queue<Task> que = new ArrayDeque<>();\n\n ...
import java.util.*; class Task { String name; int time; } public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int quantum = sc.nextInt(); Queue<Task> que = new ArrayDeque<>(); for (int i = 0; i <...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, ...
[ [ 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 ], [ 184, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\nimport java.util.ArrayDeque;\n\npublic class Main{\n\n public static void main(String[] args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] t...
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.util.ArrayDeque; public class Main{ public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] t = br.readLine...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 38, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 275, 11 ], [ 275, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n public static void main(String[] args) throws IOException {\n \n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n String[] line = br.readLine().sp...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) { String[] line = br.readLine().split(" "); ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 41, 13, 20, 41, 13, 17, 41, 13, 20, 17, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 41, 13, 20, 41, 13, 20, 41, 13, 20, 11, 1, 41, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.List;\nimport java.util.ArrayList;\n\nimport java.util.Scanner;\nclass Main{\n static public void main(String[] av){\n int sum=0;\n\n Scanner sc =new Scanner(System.in);\n // int n =sc.nextInt();\nint ch =1;\nint[] a= new int[100];\n\n //String s= sc.next();\n int n =...
import java.util.List; import java.util.ArrayList; import java.util.Scanner; class Main{ static public void main(String[] av){ int sum=0; Scanner sc =new Scanner(System.in); // int n =sc.nextInt(); int ch =1; int[] a= new int[100]; //String s= sc.next(); int n = sc.nextInt(); ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 20, 41, 13, 17, 41, 13, 41, 13, 17, 41, 13, 17, 41, 13, 17, 41, 13, 17, 41, 13, 17, ...
[ [ 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;\nimport java.util.StringTokenizer;\n\nclass Main{\n\n\tpublic static void main(String[] args) {\n\n\t\tList<Integer> time=new ArrayList<Integer>();\t\t//キューの処理にかかる時間\n...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; class Main{ public static void main(String[] args) { List<Integer> time=new ArrayList<Integer>(); //キューの処理にかかる時間 List<String> cue_nm=...
[ 7, 15, 13, 17, 6, 13, 41, 13, 17, 41, 13, 20, 13, 41, 13, 17, 41, 13, 17, 12, 13, 30, 29, 2, 13, 13, 12, 13, 30, 29, 2, 13, 2, 2, 13, 17, 13, 12, 13, 30, 14, 4, 13, 30, 37, 20, 0, 18, 13, 13, 13, 0, 13, 2, 2,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 255, 5 ], [ 255, 6 ], [ 6, 7 ], [ 6, 8 ], [ 255, 9 ], [ 9, 10 ], [ 9, 11 ], [ 255, 13 ], [ 13, 14 ], [ 13, 15 ...
[ "import java.util.Scanner;\n\npublic class Main {\n\n static class P{\n String name;\n int time;\n }\n\n static int len = 100001;\n static P[] Q = new P[len];\n\n static int head = 0;\n static int tail = 0;\n\n static boolean isEmpty(){\n return head == tail;\n }\n\n ...
import java.util.Scanner; public class Main { static class P{ String name; int time; } static int len = 100001; static P[] Q = new P[len]; static int head = 0; static int tail = 0; static boolean isEmpty(){ return head == tail; } static boolean isFull(){...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 4, 18, 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.*;\npublic class Main{\n\tpublic static void main(String args[]){\n\t Scanner input = new Scanner(System.in);\n\t \n\t Queue<Integer>num = new LinkedList<Integer>();\n\t Queue<String> p = new LinkedList<String>();\n\t int number = input.nextInt();\n\t int time = input.nextInt();\...
import java.util.*; public class Main{ public static void main(String args[]){ Scanner input = new Scanner(System.in); Queue<Integer>num = new LinkedList<Integer>(); Queue<String> p = new LinkedList<String>(); int number = input.nextInt(); int time = input.nextInt(); int timer = 0; ...
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 6, 13, 41, 13, 17, 41, 13, 20, 13, 41, 13, 17, 41, 13, 17, 12, 13, 30, 0, 18, 13, 13, 13, 0, 13, 2, 2, 13, 17, 13, 23, 13, 12, 13, 30, 41, 13, 18, 13, 13, 0, 13, 2, 2, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 4, 8 ], [ 8, 9 ], [ 0, 10 ], [ 162, 11 ], [ 162, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Scanner;\n\nclass Task{\n String name;\n int time;\n}\n\npublic class Main {\n\n static final int len = 100005;\n static Task[] num = new Task[len];\n\n static int head = 0;\n static int tail = 0;\n\n // ??????????????????????????????\n public static void enqueue(Task task)...
import java.util.Scanner; class Task{ String name; int time; } public class Main { static final int len = 100005; static Task[] num = new Task[len]; static int head = 0; static int tail = 0; // ?????????????????????????????? public static void enqueue(Task task){ num[tail] =...
[ 7, 15, 13, 17, 6, 13, 41, 13, 17, 41, 13, 17, 41, 13, 17, 41, 13, 17, 12, 13, 30, 29, 8, 2, 2, 13, 13, 13, 17, 17, 12, 13, 30, 29, 8, 2, 2, 13, 13, 17, 17, 17, 12, 13, 30, 14, 4, 13, 37, 20, 0, 18, 13, 2, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 272, 5 ], [ 272, 6 ], [ 6, 7 ], [ 6, 8 ], [ 272, 9 ], [ 9, 10 ], [ 9, 11 ], [ 272, 12 ], [ 12, 13 ], [ 12, 14 ...
[ "\nimport java.util.Scanner;\n\npublic class Main {\n\t\n\tpublic static int size = 5;\n\tpublic static int interval = 100;\n\t\n\tpublic static int head=0, tail=0;\n\t\n\tpublic static boolean isFull() {\n\t\treturn (tail-head >= size) ? true : false;\n\t}\n\t\n\tpublic static boolean isEmpty() {\n\t\treturn (tail...
import java.util.Scanner; public class Main { public static int size = 5; public static int interval = 100; public static int head=0, tail=0; public static boolean isFull() { return (tail-head >= size) ? true : false; } public static boolean isEmpty() { return (tail-head <=0 ) ? true : false; } p...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 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, 20, 41, 13, 17, ...
[ [ 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 ], [ 306, 14 ], ...
[ "import java.util.List;\nimport java.util.ArrayList;\nimport java.util.HashMap;\n\nimport java.util.Scanner;\n\npublic class Main {\n private static Scanner sc = new Scanner(System.in);\n public static void main(String[] args) {\n Queue<Pair<String, Integer>> queue = new Queue<>();\n \n i...
import java.util.List; import java.util.ArrayList; import java.util.HashMap; import java.util.Scanner; public class Main { private static Scanner sc = new Scanner(System.in); public static void main(String[] args) { Queue<Pair<String, Integer>> queue = new Queue<>(); int n = sc.nextIn...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 4, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 20, 13, 41, 13, 20, 13, 41, 13, 17, 4, 18, 13, 13, 17, 11, 1, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 139, 5 ], [ 139, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 6, 11 ], [ 11, 12 ], [ 139, 13 ], [ 13, 14 ...
[ "import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tALDS1_3_B();\n\t}\n\n\tpublic static void ALDS1_3_B() {\n\n\t\tclass Pair{\n\t\t\tprivate String name;\n\t\t\tprivate int time;\n\t\t\t\n\t\t\tpublic Pair(String name, int time) {\n\t\t\t\tthis.name = name;\n\t\t\t\tthis.ti...
import java.util.*; public class Main { public static void main(String[] args) { ALDS1_3_B(); } public static void ALDS1_3_B() { class Pair{ private String name; private int time; public Pair(String name, int time) { this.name = name; this.time = time; } String getName(){ retur...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 20, 11, 1, 41, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 171, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.LinkedList;\nimport java.util.Queue;\n\npublic class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString line = br.readLin...
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.LinkedList; import java.util.Queue; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line = br.readLine(); String[] arr...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 20, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 18, 13, 17, 1, 4...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 137, 11 ], [ 137, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "\n\nimport java.util.LinkedList;\nimport java.util.Queue;\nimport 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\tString[] in = sc.nextLine().split(\" \");\n\n\t\tint cut = Integer.parseInt(in[1]);\n\t\tQueue<Integer> qu = new L...
import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String[] in = sc.nextLine().split(" "); int cut = Integer.parseInt(in[1]); Queue<Integer> qu = new LinkedList<Integer>(); Queue...
[ 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, 41, 13, 20, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 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 ], [ 151, 11 ], [ 151, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.ArrayDeque;\nimport java.util.Deque;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int q = sc.nextInt();\n Deque<String> name = new ArrayDeque<>();\n ...
import java.util.ArrayDeque; import java.util.Deque; import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int q = sc.nextInt(); Deque<String> name = new ArrayDeque<>(); Deque<Integer>...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 20, 41, 13, 4, 18, 13, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 3...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 236, 8 ], [ 236, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws Exception{\n\t\tBufferedReader r = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str[] = r.readLine().split(\" \");\n\t\tint max = Integer.parseInt(str[0])...
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception{ BufferedReader r = new BufferedReader(new InputStreamReader(System.in)); String str[] = r.readLine().split(" "); int max = Integer.parseInt(str[0]); Queue q = new Queu...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], ...
[ "import java.io.*;\nimport java.util.*;\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Stack;\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\nimport java.util.Queue;\nimport java.util.ArrayDeque;\nimport java.util.Map;\nimport jav...
import java.io.*; import java.util.*; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Stack; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.Queue; import java.util.ArrayDeque; import java.util.Map; import java.util.LinkedLis...
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 20, 13, 0, 18, 36, 13, 13, 0, 18, 36, 13, 2, 13, 17, 0, 18, 36, 13, 17, 23, 13, 12, 13, 30, 40, 18, 36, 13, 40, 18, 36, 13, 14, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 4, 8 ], [ 8, 9 ], [ 4, 10 ], [ 10, 11 ], [ 4, 12 ], [ 12, 13 ], [ 4, 14 ], [...
[ "import java.util.Scanner;\n\nclass Queue {\n int[] data;\n int maxLen;\n int lastEnqueue;\n int queueSize;\n\n public Queue(int maxLen) {\n this.data = new int[maxLen];\n this.maxLen = maxLen;\n this.lastEnqueue = maxLen - 1;\n this.queueSize = 0;\n }\n\n public voi...
import java.util.Scanner; class Queue { int[] data; int maxLen; int lastEnqueue; int queueSize; public Queue(int maxLen) { this.data = new int[maxLen]; this.maxLen = maxLen; this.lastEnqueue = maxLen - 1; this.queueSize = 0; } public void enqueue(int num) {...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 20, 4, 18, 13, 13, 42, 17, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 252, 5 ], [ 252, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "\nimport java.util.Scanner;\n\n/*\n * ??\\?????????\n5 100\np1 150\np2 80\np3 200\np4 350\np5 20\n */\npublic class Main{\n\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int totalTime = 0;\n int n = scanner.nextInt();\n int q = scanner.nextIn...
import java.util.Scanner; /* * ??\????????? 5 100 p1 150 p2 80 p3 200 p4 350 p5 20 */ public class Main{ public static void main(String[] args){ Scanner scanner = new Scanner(System.in); int totalTime = 0; int n = scanner.nextInt(); int q = scanner.nextInt(); in...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 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, 0, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 9, 10 ], [ 7, 11 ], [ 11, 12 ], [ 7, 13 ], [ 13, 14 ], [...
[ "import java.io.*;\nimport java.util.*;\nclass P{\n\tP(String n,int t){\n\t\tthis.n=n;\n\t\tthis.t=t;\n\t}\n\tpublic String n;\n\tpublic int t,e;\n}\npublic class Main{\n\tpublic static void main(String[] args)throws Exception{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tString...
import java.io.*; import java.util.*; class P{ P(String n,int t){ this.n=n; this.t=t; } public String n; public int t,e; } public class Main{ public static void main(String[] args)throws Exception{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String l[]; l=br.readLine().split("...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 20, 17, 41, 13, 20, 17, 41, 13, 20, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 11, 1, 0, 13, 17, 2, 13, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 159, 11 ], [ 159, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.LinkedList;\nimport java.util.Queue;\nimport java.util.Scanner;\n\npublic class Main {\n public static void solve(){\n Scanner scan = new Scanner(System.in);\n int n, q, i, t;\n String[] names = new String[100001];\n int[] times = new int[100001];\n Queue<Inte...
import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main { public static void solve(){ Scanner scan = new Scanner(System.in); int n, q, i, t; String[] names = new String[100001]; int[] times = new int[100001]; Queue<Integer> processLis...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 4, 18, 13, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 123, 5 ], [ 123, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.*;\n\npublic class Main{\t\n\npublic static void main(String[] args) {\n\tQueue<String> name = new LinkedList<String>();\n\tQueue<Integer> time = new LinkedList<Integer>();\n\t\n\tScanner in = new Scanner(System.in);\n\t\n\tint elems = in.nextInt();\n\tint timer = in.nextInt();\n\tint timePassed =...
import java.util.*; public class Main{ public static void main(String[] args) { Queue<String> name = new LinkedList<String>(); Queue<Integer> time = new LinkedList<Integer>(); Scanner in = new Scanner(System.in); int elems = in.nextInt(); int timer = in.nextInt(); int timePassed = 0; in.nextLine(); Str...
[ 7, 15, 13, 17, 6, 13, 41, 13, 17, 41, 13, 17, 41, 13, 17, 41, 13, 20, 17, 41, 13, 20, 17, 12, 13, 30, 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, 41, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 149, 5 ], [ 149, 6 ], [ 6, 7 ], [ 6, 8 ], [ 149, 9 ], [ 9, 10 ], [ 9, 11 ], [ 149, 12 ], [ 12, 13 ], [ 12, 14 ...
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static int head1 = 0;\n\tpublic static int head2 = 0;\n\tpublic static int tail = 0;\n\tpublic static String[] queue1 = new String[1000000];\n\tpublic static int[] queue2 = new int[1000000];\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner stdI...
import java.util.Scanner; public class Main { public static int head1 = 0; public static int head2 = 0; public static int tail = 0; public static String[] queue1 = new String[1000000]; public static int[] queue2 = new int[1000000]; public static void main(String[] args) { Scanner stdIn = new Scanner(System.i...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 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, 4, 18, 13, 17, 41, 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.util.Scanner;\n\n\nimport java.util.*;\nimport java.util.LinkedList;\nimport java.util.Queue;\n\nclass Pair{\n\tpublic String key;\n\tpublic int value;\n\tpublic Pair(String name, int number) {\n\t\tthis.key = name;\n\t\tthis.value = number;\n\t}\n}\n\npublic class Main {\n\n\tpublic static void main(S...
import java.util.Scanner; import java.util.*; import java.util.LinkedList; import java.util.Queue; class Pair{ public String key; public int value; public Pair(String name, int number) { this.key = name; this.value = number; } } public class Main { public static void main(String[] args) { Scanner sc = n...
[ 7, 15, 13, 17, 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, 41, 13, 20, 12, 13, 30, 41, 13, 20, 41, 13, 17, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 9, 10 ], [ 7, 11 ], [ 11, 12 ], [ 7, 13 ], [ 13, 14 ], [...
[ "import java.util.LinkedList;\nimport java.util.Scanner;\n\nclass Task {\n\tpublic String name;\n\tpublic int time;\n\t\n\tTask(String name, int time) {\n\t\tthis.name = name;\n\t\tthis.time = time;\n\t}\n}\npublic class Main{\n\tstatic LinkedList<Task> queue = new LinkedList<>();\n\t\n\tpublic static void main(Str...
import java.util.LinkedList; import java.util.Scanner; class Task { public String name; public int time; Task(String name, int time) { this.name = name; this.time = time; } } public class Main{ static LinkedList<Task> queue = new LinkedList<>(); public static void main(String[] args) { Scanner sc = new...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 38, 5, 13, 30, 4, 18, 18, 13, 13, 13, 30, 41, 13, 20, 41, 13, 17, 41, 13, 17, 41, 13, 17, 41, 13, 41, 13, 20, 41, 13, 20, 41, 13, 41, 13, 17, 42, 2, 0, 13, 4, 18, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 13, 14 ], ...
[ "import java.io.*;\nimport java.util.*;\n\n\nclass Main{\n public void run(){\n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){\n int count = 0;\n int n = 0,q = 0;\n String line;\n Deque<String> name = new ArrayDeque<>();\n ...
import java.io.*; import java.util.*; class Main{ public void run(){ try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){ int count = 0; int n = 0,q = 0; String line; Deque<String> name = new ArrayDeque<>(); Deque<Intege...
[ 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, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 4, 18, 13, 4, 18,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 113, 5 ], [ 113, 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 scan=new Scanner(System.in);\n int n=scan.nextInt();\n int quantam=scan.nextInt();\n int erapsedTime=0;\n ArrayList<String> pname=new ArrayList<String>();\n ArrayList<Integer> ...
import java.util.*; public class Main{ public static void main(String[] args){ Scanner scan=new Scanner(System.in); int n=scan.nextInt(); int quantam=scan.nextInt(); int erapsedTime=0; ArrayList<String> pname=new ArrayList<String>(); ArrayList<Integer> ptime=new Arra...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 20, 41, 13, 20, 41, 13, 42, ...
[ [ 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 ], [ 231, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\n\n\npublic class Main {\n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\t//????????????????????????\n\t\tBufferedReader bf = new BufferedReader(new ...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class Main { public static void main(String[] args) throws NumberFormatException, IOException { //???????????????????????? BufferedReader bf = new BufferedReader(new InputStreamReader(S...
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 13, 0, 13, 13, 0, 13, 17, 23, 13, 23, 13, 6, 13, 41, 13, 20, 41, 13, 13, 12, 13, 30, 41, 13, 18, 13, 13, 14, 2, 13, 13, 30, 0, 13, 13, 0, 18, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 4, 8 ], [ 8, 9 ], [ 4, 10 ], [ 10, 11 ], [ 4, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\n\nclass Data{\n\tString name;\n\tint time;\n\tData next;\n\t\n\tData(String s,int t){\n\t\tname=s;\n\t\ttime=t;\n\t\tnext=null;\n\t}\n}\n\npublic class Main {\n\tstatic Data first=new Data(\"\",0);\n\tstatic Data attention=first;\n\t\n\tstatic Data dequeue(){\n\t\tData tmp=first.next;\n\...
import java.util.Scanner; class Data{ String name; int time; Data next; Data(String s,int t){ name=s; time=t; next=null; } } public class Main { static Data first=new Data("",0); static Data attention=first; static Data dequeue(){ Data tmp=first.next; if(attention==tmp){ attention=first; } ...
[ 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, 17, 41, 13, 17, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 123, 8 ], [ 123, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.util.Scanner;\nimport java.util.LinkedList;\n\npublic class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tLinkedList<String> processes = new LinkedList<>();\n\t\tint numProcesses = scanner.nextInt();\n\t\tint quantum = scanner.nextInt();\n\t\...
import java.util.Scanner; import java.util.LinkedList; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); LinkedList<String> processes = new LinkedList<>(); int numProcesses = scanner.nextInt(); int quantum = scanner.nextInt(); int timestamp = 0; Strin...
[ 7, 15, 13, 17, 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, 38, 5, 13, 30, 4, 18, 18, 13, 13, 13, 30, 41, 13, 4, 18, 4, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 9, 10 ], [ 7, 11 ], [ 11, 12 ], [ 7, 13 ], [ 13, 14 ], [...
[ "import java.io.*;\nimport java.util.*;\n\nclass Ps {\n String name;\n Integer t;\n \n public Ps( String name, Integer t )\n {\n this.name = name;\n this.t = t;\n }\n}\n\nclass Main {\n public static void main(String[] args) {\n BufferedReader kb = new BufferedReader( new ...
import java.io.*; import java.util.*; class Ps { String name; Integer t; public Ps( String name, Integer t ) { this.name = name; this.t = t; } } class Main { public static void main(String[] args) { BufferedReader kb = new BufferedReader( new InputStreamReader( Sy...
[ 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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 145, 11 ], [ 145, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.LinkedList;\nimport java.util.Queue;\nimport java.util.Scanner;\n\npublic class Main {\n\tclass Process {\n\t\tString name;\n\t\tint time;\n\t\tProcess(String name, int time) {\n\t\t\tthis.name = name;\n\t\t\tthis.time = time;\n\t\t}\n\t}\n\tvoid run() {\n\t\tScanner scan = new Scanner(System.in);...
import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main { class Process { String name; int time; Process(String name, int time) { this.name = name; this.time = time; } } void run() { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int q = s...
[ 7, 15, 13, 17, 6, 13, 41, 13, 17, 41, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 13, 0, 13, 17, 0, 13, 17, 12, 13, 30, 29, 2, 13, 13, 12, 13, 30, 0, 18, 13, 13, 13, 14, 2, 2, 13, 17, 13, 0, 13, 17, 40, 13, 23...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 4, 9 ], [ 9, 10 ], [ 4, 11 ], [ 11, 12 ], [ 4, 13 ], [ 13, 14 ], [...
[ "import java.util.*;\n\nclass IntQue{\n final int MAX=100000;\n int[] q;\n int head,tail;\n IntQue(){\n q=new int[MAX];\n head=0;tail=0;\n }\n boolean isEmpty(){\n return head==tail;\n }\n void enqueue(int time){\n q[tail]=time;\n if(tail+1==MAX) tail=0;\n ...
import java.util.*; class IntQue{ final int MAX=100000; int[] q; int head,tail; IntQue(){ q=new int[MAX]; head=0;tail=0; } boolean isEmpty(){ return head==tail; } void enqueue(int time){ q[tail]=time; if(tail+1==MAX) tail=0; else tail++; ...
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 41, 13, 17, 0, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 0, 13, 20, 17, 0, 13, 17, 0, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 4, 8 ], [ 8, 9 ], [ 4, 10 ], [ 10, 11 ], [ 4, 12 ], [ 12, 13 ], [ 4, 14 ], [...
[ "import java.util.Scanner;\n\nclass Main {\n\n static Scanner scan;\n static P[] p;\n static int head;\n static int tail;\n\n public static void main(String[] args) {\n\tint elaps = 0;\n\t\n\t// get from std in: n, q\n\tscan = new Scanner(System.in);\n\tfinal int n = scan.nextInt();\n\tfinal int q = ...
import java.util.Scanner; class Main { static Scanner scan; static P[] p; static int head; static int tail; public static void main(String[] args) { int elaps = 0; // get from std in: n, q scan = new Scanner(System.in); final int n = scan.nextInt(); final int q = scan.nextInt(); // creat...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 41, 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 ], [ 128, 11 ], [ 128, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.LinkedList;\nimport java.util.Queue;\nimport java.util.Scanner;\n\n// You cant store primitive types in queue?\n\npublic class Main{\n public static void main(String[] args) {\n Queue<String> q = new LinkedList<>();\n\n Scanner input1 = new Scanner(System.in);\n int length ...
import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; // You cant store primitive types in queue? public class Main{ public static void main(String[] args) { Queue<String> q = new LinkedList<>(); Scanner input1 = new Scanner(System.in); int length = input1.nextInt...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 0, 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.List;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str = br....
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 4, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 20, 41, 13, 20, 41, 13, 17, 41, 13, 17...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.lang.StringBuffer;\n\n/*Question\n/?????? namei ??¨????????????????????? timei ????????? n ???????????????????????????????????????????????§????????????\n/??????????????????????????±??...
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.List; import java.util.ArrayList; import java.lang.StringBuffer; /*Question /?????? namei ??¨????????????????????? timei ????????? n ???????????????????????????????????????????????§???????????? /??????????????????????????±?????\?????????...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 17, 41, 13, 20, 41, 13, 20, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18,...
[ [ 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 public static void main(String[] args) throws IOException{\n\tScanner sc = new Scanner(System.in);\n\n\tint i;\n\tint n;\n\tint t;\n\tint gettime = 0;\n\t\n\tQueue<String> p = new LinkedList<String>();\n\tQueue<Integer> time = new LinkedList<Integer>();\n\...
import java.util.*; import java.io.*; class Main{ public static void main(String[] args) throws IOException{ Scanner sc = new Scanner(System.in); int i; int n; int t; int gettime = 0; Queue<String> p = new LinkedList<String>(); Queue<Integer> time = new LinkedList<Integer>(); n = sc.nextInt(); t = sc...
[ 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, 41, 13, 20, 13, 41, 13, 20, 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 ], [ 124, 11 ], [ 124, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.LinkedList;\nimport java.util.Queue;\nimport java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int c = sc.nextInt(), ms = sc.nextInt();\n String[] name = new String[c];\n int[] time = new i...
import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int c = sc.nextInt(), ms = sc.nextInt(); String[] name = new String[c]; int[] time = new int[c]; ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 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.File;\nimport java.io.FileNotFoundException;\nimport java.lang.management.ManagementFactory;\nimport java.lang.management.ThreadMXBean;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.Comparator;\nimport java.util.List;\nimport java.util.PriorityQueue;\nimport java.util...
import java.io.File; import java.io.FileNotFoundException; import java.lang.management.ManagementFactory; import java.lang.management.ThreadMXBean; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.PriorityQueue; import java.util.Scanner; pub...
[ 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, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 17, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 4, 18, 13, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.util.*;\n\nclass Main{\n public static void main(String[] args){\n Queue<String> queue = new ArrayDeque<String>();\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt(); //処理する数\n int q = sc.nextInt(); //クオンタム\n int sum = 0; //処理した数\n int sumTime = 0; //合計処理時間...
import java.util.*; class Main{ public static void main(String[] args){ Queue<String> queue = new ArrayDeque<String>(); Scanner sc = new Scanner(System.in); int n = sc.nextInt(); //処理する数 int q = sc.nextInt(); //クオンタム int sum = 0; //処理した数 int sumTime = 0; //合計処理時間 for(int i...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 0, 18, 13, 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.util.Scanner;\n\nclass Main {\n\tpublic static void main(String args[]) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint num = scanner.nextInt();//要素数\n\t\tint time = scanner.nextInt();//要素数\n\t\tint[] array = new int[num];\n\t\tString[] pro = new String[num];\n\t\t\n\t\t//配列作り\n\t\tfor(int ...
import java.util.Scanner; class Main { public static void main(String args[]) { Scanner scanner = new Scanner(System.in); int num = scanner.nextInt();//要素数 int time = scanner.nextInt();//要素数 int[] array = new int[num]; String[] pro = new String[num]; //配列作り for(int i = 0; i < num; i ++ ){ pro[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, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], ...
[ "import java.util.Scanner;\nimport java.util.Arrays;\nimport java.util.Deque;\nimport java.util.ArrayDeque;\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\n\nclass Main{\n\tpublic static void main(String[] args)throws Exception{\n\t\tScanner scanner = new Scanner(System.in);\n\t\tDeque<String>...
import java.util.Scanner; import java.util.Arrays; import java.util.Deque; import java.util.ArrayDeque; import java.io.BufferedReader; import java.io.InputStreamReader; class Main{ public static void main(String[] args)throws Exception{ Scanner scanner = new Scanner(System.in); Deque<String> name_stack = new Arr...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 4, 18, 13, 17, 41, 13, 20, 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 ], [ 147, 14 ], ...
[ "\nimport java.util.Scanner;\nimport java.util.LinkedList;\nimport java.util.Queue; \nimport java.util.*;\n\npublic class Main {\n\n\tpublic static void main(String argv[]) {\n\n Scanner in = new Scanner(System.in);\n int numTask = in.nextInt();\n int maxTime = in.nextInt();\n int curr=0...
import java.util.Scanner; import java.util.LinkedList; import java.util.Queue; import java.util.*; public class Main { public static void main(String argv[]) { Scanner in = new Scanner(System.in); int numTask = in.nextInt(); int maxTime = in.nextInt(); int curr=0; in.skip("...
[ 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, 12, 13, 30, 0, 18, 36, 13, 13, 23, 13, 12, 13, 30, 29, 13, 12, 13, 30, 0, 18, 36, 13, 13, 23, 13, 12, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 4, 8 ], [ 8, 9 ], [ 4, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 13, 14 ], ...
[ "import java.util.*;\n\nclass process {\n private String name;\n private int time;\n\n public process(String name,int time){\n this.name = name;\n this.time = time;\n }\n\n public void setName(String name) {\n this.name = name;\n }\n\n public String getName() {\n return name;\n }\n\n public voi...
import java.util.*; class process { private String name; private int time; public process(String name,int time){ this.name = name; this.time = time; } public void setName(String name) { this.name = name; } public String getName() { return name; } public void setTime(int time) { ...
[ 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, 2, 13, 17, 41, 13, 17, 41, 13, 20, 13, 41, 13, 20, 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 ], [ 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[] args){\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n int q = sc.nextInt();\n\n int s = 0;\n int g = n-1;\n\n int tt = 0;\n\n String[] name = new String[n];\n int[] time = new int[n];\n\n for(i...
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int q = sc.nextInt(); int s = 0; int g = n-1; int tt = 0; String[] name = new String[n]; int[] time = new int[n]; for(int i=0; i<n; i++){ ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 13, 0, 13, 13, 23, 13, 23, 13, 6, 13, 41, 13, 41, 13, 41, 13, 17, 41, 13, 17, 12, 13, 30, 0, 13, 2, 13, 17, 0, 13, 20, 13, 23, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 10, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\nclass Process {\n String name;\n int time;\n\n Process(String s, int n) {\n name = s;\n time = n;\n }\n}\n\n// I want to use Generics but General type array T[] cannot define.\n// add(i, elm)...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; class Process { String name; int time; Process(String s, int n) { name = s; time = n; } } // I want to use Generics but General type array T[] cannot define. // add(i, elm) of List<T> shift el...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 20, 17, 0, 18, 13, 17...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 142, 8 ], [ 142, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.util.Queue;\nimport java.util.*;\n\npublic class Main {\n public static void main(String[] wjy){\n Scanner in = new Scanner(System.in);\n Queue<String[]> input = new ArrayDeque<String[]>();\n int num = Integer.parseInt(in.next()) ;\n int quan = Integer.pa...
import java.util.Queue; import java.util.*; public class Main { public static void main(String[] wjy){ Scanner in = new Scanner(System.in); Queue<String[]> input = new ArrayDeque<String[]>(); int num = Integer.parseInt(in.next()) ; int quan = Integer.parseInt(in.nex...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 2, 2, 4, 18, 13, 17, 4, 18, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 242, 11 ], [ 242, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "\nimport java.util.LinkedList; \nimport java.util.Queue;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\n\t\tQueue<String> qu = new LinkedList<>();\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint amt = scan.nextInt();\n\t\tint quant = scan.nextInt();\n\t\t\n\...
import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main { public static void main(String[] args) { Queue<String> qu = new LinkedList<>(); Scanner scan = new Scanner(System.in); int amt = scan.nextInt(); int quant = scan.nextInt(); for(int i=0; i<amt; i++){ ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 4, 18, 13, 4, 18,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 107, 5 ], [ 107, 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\t\n\t\tLinkedList<String> names = new LinkedList<String>();\n\t\tLinkedList<Integer> times = new LinkedList<Integer>();\n\t\tScanner in = new Scanner(System.in);\n\t\tint numLines = in.nextInt();\n\t\tint t = in.nextInt();\n\...
import java.util.*; public class Main { public static void main(String [] args) { LinkedList<String> names = new LinkedList<String>(); LinkedList<Integer> times = new LinkedList<Integer>(); Scanner in = new Scanner(System.in); int numLines = in.nextInt(); int t = in.nextInt(); int totalTime = 0; for...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 18, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 155, 11 ], [ 155, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.LinkedList;\nimport java.util.Queue;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tQueue<String[]> tasks = new LinkedList<String[]>(), finished = new LinkedList<String[]>();\n\t\tScanner sc = new Scanner(System.in);\n\t\tString[] l1 = sc.nextL...
import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main { public static void main(String[] args) { Queue<String[]> tasks = new LinkedList<String[]>(), finished = new LinkedList<String[]>(); Scanner sc = new Scanner(System.in); String[] l1 = sc.nextLine().split(" "); i...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 42, 40, 4, 18, 13, 30, 41, 13, 4, 18, 13, 14, 2, 18, 13, 13, 13, 30, 0, 13, 13, 0, 18, 13, 13, 13, 4, 18, 13, 13, 30, 0, 13, 18, 13, 13, 4...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 136, 11 ], [ 136, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "\nimport java.util.LinkedList;\nimport java.util.Queue;\nimport java.util.Scanner;\n\npublic class Main {\n\tstatic class NameTime {\n\t\tString name;\n\t\tint time;\n\t\t\n\t}\n\t\n\tpublic static void queue1(Queue<NameTime> q, int t) {\n\t\tint time = 0;\n\t\twhile (!q.isEmpty()) {\n\t\t\tNameTime nt = q.remove(...
import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main { static class NameTime { String name; int time; } public static void queue1(Queue<NameTime> q, int t) { int time = 0; while (!q.isEmpty()) { NameTime nt = q.remove(); if (nt.time > t) { time += ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 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 ], [ 126, 11 ], [ 126, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.Queue;\nimport java.util.ArrayDeque;\nimport java.util.Scanner;\n\npublic class Main {\n\t\n\tpublic static void main(String arg[]){\n\t\tScanner sc = new Scanner(System.in);\n\t\tQueue<Integer> queue = new ArrayDeque<Integer>();\n\t\tQueue<String> name = new ArrayDeque<String>();\n\t\tint N = sc....
import java.util.Queue; import java.util.ArrayDeque; import java.util.Scanner; public class Main { public static void main(String arg[]){ Scanner sc = new Scanner(System.in); Queue<Integer> queue = new ArrayDeque<Integer>(); Queue<String> name = new ArrayDeque<String>(); int N = sc.nextInt(); int q = sc.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, 17, 41, 13, 20, 17, 41, 13, 20, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 4, 1...
[ [ 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) throws Exception {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint count = sc.nextInt();\n\t\tint q = sc.nextInt();\n\n\t\tint totalTime = 0;\n\t\tString[] queue = new String[200000];\n\t\tint[] restTime = new int[200...
import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int count = sc.nextInt(); int q = sc.nextInt(); int totalTime = 0; String[] queue = new String[200000]; int[] restTime = new int[200000]; for(int i = 0; i < co...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 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, 4, 18, 13, 4, 18...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 158, 11 ], [ 158, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "\nimport java.util.LinkedList;\nimport java.util.Queue;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tQueue <String> N = new LinkedList<>();\n\t\tQueue <Integer> Q = new LinkedList<>();\n Scanner sc = new Scanner(System.in);\n \n int n = s...
import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main { public static void main(String[] args) { Queue <String> N = new LinkedList<>(); Queue <Integer> Q = new LinkedList<>(); Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int tas...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 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, ...
[ [ 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 ], [ 184, 14 ], ...
[ "import java.io.PrintWriter;\nimport java.util.ArrayDeque;\nimport java.util.Deque;\nimport java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n int q = sc.nextInt();\n\n Deque<Process> procs = new Arra...
import java.io.PrintWriter; import java.util.ArrayDeque; import java.util.Deque; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int q = sc.nextInt(); Deque<Process> procs = new ArrayDeque<>(); fo...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 20, 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 ], [ 154, 11 ], [ 154, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.util.LinkedList;\nimport java.util.Queue;\nimport java.util.Scanner;\n\npublic class Main{\n\n public static void main(String args[]) {\n Scanner scan = new Scanner(System.in);\n String[] row = scan.nextLine().split(\" \");\n\n int n = Integer.parseInt(row[0]);\n int q = ...
import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main{ public static void main(String args[]) { Scanner scan = new Scanner(System.in); String[] row = scan.nextLine().split(" "); int n = Integer.parseInt(row[0]); int q = Integer.parseInt(r...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 17, 41, 13, 17, 12, 13, 30, 41, 13, 20, 41, 13, 17, 38, 5, 13, 30, 4, 18, 13, 5, 13, 30, 4, 18, 13, 30, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 276, 11 ], [ 276, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static final int BIG_NUM = 2000000000;\n\tpublic static final int MOD = 1000000007;\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tBufferedReader br = new...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static final int BIG_NUM = 2000000000; public static final int MOD = 1000000007; public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ BufferedReader br = new BufferedReader(new In...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 41, 13, 20, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 20, 2, 13, 17, 0, 13, 0, 13, 0, 13, 0, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 242, 8 ], [ 242, 9 ], [ 9, 10 ], [ 242, 11 ], [ 11, 12 ], [ 242, 13 ], [ 13, 14 ...
[ "import java.io.IOException;\nimport java.util.Scanner;\npublic class Main {\n\n\tprivate static int max; // 要素の数\n\tprivate static int run; // 処理速度\n\tprivate static Object q[]; // queue\n\tprivate static String end[]; // 処理済み\n\tprivate static int count; // 処理済み数\n\tprivate static int front; // 先頭\n\tprivate stat...
import java.io.IOException; import java.util.Scanner; public class Main { private static int max; // 要素の数 private static int run; // 処理速度 private static Object q[]; // queue private static String end[]; // 処理済み private static int count; // 処理済み数 private static int front; // 先頭 private static int rear; // 末尾 pr...
[ 7, 15, 13, 17, 15, 13, 17, 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, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 10, 14 ], ...
[ "import java.util.LinkedList;\nimport java.util.Queue;\nimport java.util.Scanner;\n class Node{\n\t\n\tString name;\n\tint time;\n\t\n\tpublic Node(String name, int time) {\n\t\tthis.name = name;\n\t\tthis.time = time;\n\t}\n}\n\npublic class Main{\n\t\n\tpublic static void main(String[] args) {\n\t\tQueue<Node> q ...
import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; class Node{ String name; int time; public Node(String name, int time) { this.name = name; this.time = time; } } public class Main{ public static void main(String[] args) { Queue<Node> q = new LinkedList<>(); Queue<String...