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,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
20,
41,
13,
17,
42,
40,
4,
1... | [
[
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.ArrayDeque;\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\n\t\tint n = sc.nextInt();\n\t\tint q = sc.nextInt();\n\n\t\tQueue<Process> Q = new ArrayDeque<>();\n\n\t\tfor (int i=0; ... | import java.util.ArrayDeque;
import java.util.Queue;
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();
Queue<Process> Q = new ArrayDeque<>();
for (int i=0; i<n; i++) {
Q.add(new Proce... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
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,
4,
18,
13,
20,
41,
13,
17,
42,
2,
4,
18,
13,
17,
30,
14... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
635,
11
],
[
635,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.*;\nimport java.io.*;\nimport java.math.*;\n\npublic class Main {\n\n\tvoid solve (FastScanner in, PrintWriter out, Methods ms) {\n\n\t\tint n = in.nextInt(), q = in.nextInt();\n\t\tArrayDeque<Process> dq = new ArrayDeque<>();\n\t\tfor (int i=0; i<n; i++) dq.addLast(new Process(in.next(), in.nextI... | import java.util.*;
import java.io.*;
import java.math.*;
public class Main {
void solve (FastScanner in, PrintWriter out, Methods ms) {
int n = in.nextInt(), q = in.nextInt();
ArrayDeque<Process> dq = new ArrayDeque<>();
for (int i=0; i<n; i++) dq.addLast(new Process(in.next(), in.nextInt()));
int time ... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
18,
4,
18,
13,
17,
17,
41,
13,
4,
18,
13,
18,
4,
18,
13,
17,
17,
41,
13,
17,
41,
13,
20,
42,
4,
18,
13,
30,
4,
18,
13,
4,
18... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
152,
5
],
[
152,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.*;\npublic class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tString input = s.nextLine();\n\t\tInteger number = Integer.parseInt(input.split(\" \")[0]);\n\t\tInteger quantum = Integer.parseInt(input.split(\" \")... | import java.util.*;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
String input = s.nextLine();
Integer number = Integer.parseInt(input.split(" ")[0]);
Integer quantum = Integer.parseInt(input.split(" ")[1]);
Integer current_time = ... |
[
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,
0,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
17,
4,
18,
13,
17,
41,
13,
4,
18,
13,
4,
18,
13,
2,
4,
18,... | [
[
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;\n\nclass Main{\n public static void main(String[] args) throws IOException{\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\tString... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayDeque;
import java.util.Deque;
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line;
line = ... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
18,
4,
18,
13,
17,
17,
41,
13,
4,
18,
13,
18,
4,
18,
13,
17,
17,
41,
13,
17,
41,
13,
20,
42,
4,
18,
13,
30,
4,
18,
13,
4,
18... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
178,
5
],
[
178,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.*;\npublic class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tString input = s.nextLine();\n\t\tInteger number = Integer.parseInt(input.split(\" \")[0]);\n\t\tInteger quantum = Integer.parseInt(input.split(\" \")... | import java.util.*;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
String input = s.nextLine();
Integer number = Integer.parseInt(input.split(" ")[0]);
Integer quantum = Integer.parseInt(input.split(" ")[1]);
Integer current_time = ... |
[
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,
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
],
[
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 void main(String[] args) throws IOException {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tBufferedReade... | 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 void main(String[] args) throws IOException {
// TODO ?????????????????????????????????????????????
BufferedReader br = new BufferedR... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
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
],
[
253,
8
],
[
253,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
]... | [
"import java.io.*;\nimport java.util.*;\n\npublic class Main {\n\n public static void main(String[] args) throws Exception {\n FastScanner sc = new FastScanner(System.in);\n int n = sc.nextInt();\n int q = sc.nextInt();\n int totalTime = 0;\n ArrayDeque<Process> queue = new Arr... | import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
FastScanner sc = new FastScanner(System.in);
int n = sc.nextInt();
int q = sc.nextInt();
int totalTime = 0;
ArrayDeque<Process> queue = new ArrayDeque<Process... |
[
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
],
[
291,
11
],
[
291,
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 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] nq = br.readLine().split(\" \... | 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[] nq = br.readLine().split(" ");
int... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
41,
13,
17,
11,
1,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
... | [
"import java.util.Queue;\nimport java.util.ArrayDeque;\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextIn... | import java.util.Queue;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt(); // プロセス数
int ... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
17,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
0,
18,
36,
13,
13,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
220,
8
],
[
220,
9
],
[
9,
10
],
[
220,
11
],
[
11,
12
],
[
11,
13
],
[
220,
14
... | [
"import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n public static int quantum;\n public static int currentTime = 0;\n public Main() {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int quantum = scan.nextInt();\n\n Queue queue = ne... | import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static int quantum;
public static int currentTime = 0;
public Main() {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int quantum = scan.nextInt();
Queue queue = new Queue(100000 +... |
[
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
],
[
132,
11
],
[
132,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.ArrayDeque;\nimport java.util.Deque;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint n = scanner.nextInt();\n\t\tint time = scanner.nextInt();\n\t\tint total=0;\n\t\tDeque<Integer> queue = new Arr... | import java.util.ArrayDeque;
import java.util.Deque;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int time = scanner.nextInt();
int total=0;
Deque<Integer> queue = new ArrayDeque<Integer>();
Dequ... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
20,
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
],
[
186,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.ArrayDeque;\nimport java.util.Deque;\n\npublic class Main {\n\tprivate static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tString[] li... | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayDeque;
import java.util.Deque;
public class Main {
private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
public static void main(String[] args) throws Exception {
String[] list = br.readLine()... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
20,
13,
41,
13,
20,
13,
41,
13,
20,
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
],
[
139,
5
],
[
139,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.*;\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 int time = 0;\n int [] T = new int[n];\n String [] Name = new String[n];\n Queue<Integer>... | import java.util.*;
public class Main {
public static void main(String [] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int q = sc.nextInt();
int time = 0;
int [] T = new int[n];
String [] Name = new String[n];
Queue<Integer> L = new Array... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
6,
13,
41,
13,
17,
41,
13,
41,
13,
41,
13,
20,
13,
12,
13,
30,
0,
13,
17,
0,
13,
17,
29,
12,
13,
30,
29,
2,
13,
13,
12,
13,
30,
29,
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
],
[
13,
14
],
... | [
"import java.util.Scanner;\nimport java.lang.Math;\nimport java.lang.System;\nimport java.io.*;\nclass Process{\n String n;\n int t;\n}\nclass Main{\n private static int max = 100005;\n private static int head, tail;\n private static Process[] q=new Process[max];\n\n public static void initialize(){\n head... | import java.util.Scanner;
import java.lang.Math;
import java.lang.System;
import java.io.*;
class Process{
String n;
int t;
}
class Main{
private static int max = 100005;
private static int head, tail;
private static Process[] q=new Process[max];
public static void initialize(){
head = 0;
tail = 0;... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
12,
13,
30,
41,
13,
0,
13,
17,
42,
40,
4,
18,
13,
30,
0,
13,
4,
18,
13,
14,
40,
4,
18,
13,
13,
4,
18,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
164,
11
],
[
164,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.Scanner;\nimport java.util.Queue;\nimport java.util.LinkedList;\n\npublic class Main{\n\tprivate static int timer = 0;\n\n\tpublic static void processor(Queue<Process> p, int q){\n\t\tProcess x;\n\t\ttimer = 0;\n\t\twhile(!p.isEmpty()){\n\t\t\tx = p.remove();\n\t\t\tif(!x.handle(q)) p.add(x);\n\t\... | import java.util.Scanner;
import java.util.Queue;
import java.util.LinkedList;
public class Main{
private static int timer = 0;
public static void processor(Queue<Process> p, int q){
Process x;
timer = 0;
while(!p.isEmpty()){
x = p.remove();
if(!x.handle(q)) p.add(x);
}
}
public static void main(S... |
[
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,
20,
13,
41,
13,
20,
13,
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
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.util.Scanner;\nimport java.util.ArrayDeque;\nimport java.util.Queue;\n\nclass Main{\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n Queue<Integer> queue = new ArrayDeque<>();\n \n int n = sc.nextInt();\n int q = sc.nextInt();\n ... | import java.util.Scanner;
import java.util.ArrayDeque;
import java.util.Queue;
class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
Queue<Integer> queue = new ArrayDeque<>();
int n = sc.nextInt();
int q = sc.nextInt();
String name... |
[
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,
17,
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
],
[
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,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
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,
11,
1,
41,
13,
17,
2,
... | [
[
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.*;\nclass Main{\n\tpublic static void main(String[]args){\n\t\tScanner in=new Scanner(System.in);\n\t\tPrintWriter out=new PrintWriter(System.out, true);\n\t\tString str[]=in.nextLine().split(\" \");\n\t\tint n=Integer.parseInt(str[0]);\n\t\tint q=Integer.parseInt(str[1]);\n\t\t... | import java.util.*;
import java.io.*;
class Main{
public static void main(String[]args){
Scanner in=new Scanner(System.in);
PrintWriter out=new PrintWriter(System.out, true);
String str[]=in.nextLine().split(" ");
int n=Integer.parseInt(str[0]);
int q=Integer.parseInt(str[1]);
HashMap<String, Integer> map=... |
[
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,
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
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[... | [
"import java.util.*;\n\nclass Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint q = sc.nextInt();\n\t\t\n\t\tQueue<String> qProcess = new LinkedList<String>();\n\t\tQueue<Integer> qTime = new LinkedList<Integer>();\n\t\t\n\t\tint totalTi... | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int q = sc.nextInt();
Queue<String> qProcess = new LinkedList<String>();
Queue<Integer> qTime = new LinkedList<Integer>();
int totalTime = 0;
for (int i = 0; i < ... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
20,
38,
5,
13,
30,
30,
41,
13,
4,
18,
13,
0,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
224,
11
],
[
224,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main{\n\n\n\n\n\tpublic static void main(String[] args){\n\n\t\tString array[];\n\n\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n\n\t\ttry{\n\t\tString str=reader.readLi... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main{
public static void main(String[] args){
String array[];
BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
try{
String str=reader.readLine();
array=str.split(" ");
... |
[
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
],
[
194,
11
],
[
194,
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 sc = new Scanner(System.in);\n\n\t\tString[] S = sc.nextLine().split(\" \");\n\t\tint n = Integer.parseInt(S[0]);\n\t\tint quantum = Integer.parseInt(S[... | import java.util.ArrayDeque;
import java.util.Queue;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String[] S = sc.nextLine().split(" ");
int n = Integer.parseInt(S[0]);
int quantum = Integer.parseInt(S[1]);
Queue<Node> queue =... |
[
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,
4,
18,
13,
20,
41,
13,
17,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
205,
5
],
[
205,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int q = scanner.nextInt();\n Queue queue = new Queue();\n for (int i = 0; i < n; i++) {\n queue.enq... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int q = scanner.nextInt();
Queue queue = new Queue();
for (int i = 0; i < n; i++) {
queue.enqueue(new Proce... |
[
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,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
4,
18,
13,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
151,
5
],
[
151,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"\n\nimport java.util.*;\n\npublic class Main {\n\tpublic static void main(String args[]) {\n\t\tQueue<ItemPair> list = new LinkedList<ItemPair>();\n\t\tScanner k = new Scanner(System.in);\n\t\t\n\t\tint processes = k.nextInt();\n\t\tint quantum = k.nextInt();\n\t\t\n\t\t//Fill the queue\n\t\tfor(int x = 0; x < pro... |
import java.util.*;
public class Main {
public static void main(String args[]) {
Queue<ItemPair> list = new LinkedList<ItemPair>();
Scanner k = new Scanner(System.in);
int processes = k.nextInt();
int quantum = k.nextInt();
//Fill the queue
for(int x = 0; x < processes; x++) {
String inputName ... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
4,
13,
0,
18,
36,
13,
13,
0,
18,
36,
13,
13,
23,
13,
23,
13,
12,
13,
30,
0,
18,
36,
13,
13,
23,
13,
6,
13,
12,
13,
30,
41,
13,
20,
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
],
[
12,
13
],
[
10,
14
],
... | [
"import java.util.LinkedList;\nimport java.util.Queue;\nimport java.util.Scanner;\n\nclass Process {\n\tString name;\n\tint time;\n\n\tpublic Process(String name, int time) {\n\t\tsuper();\n\t\tthis.name = name;\n\t\tthis.time = time;\n\t}\n\n\tpublic void proceed(int q) {\n\t\tthis.time -= q;\n\t}\n\n}\n\npublic c... | import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;
class Process {
String name;
int time;
public Process(String name, int time) {
super();
this.name = name;
this.time = time;
}
public void proceed(int q) {
this.time -= q;
}
}
public class Main {
public static void main(S... |
[
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,
42,
2,
13,
17,
30,
4,
18,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
40,
13,
42,
40... | [
[
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.*;\n\npublic class Main{\n\tpublic static void main(String args[]) {\n\t\tQueue<String> p = new LinkedList<>();\n\t\tQueue<Integer> values = new LinkedList<>();\n\t\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint q = in.nextInt();\t\t\n\t\t\n\t\tint time = 0;\n\t\t\n\... | import java.util.*;
public class Main{
public static void main(String args[]) {
Queue<String> p = new LinkedList<>();
Queue<Integer> values = new LinkedList<>();
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int q = in.nextInt();
int time = 0;
in.nextLine();
while(n > 0) {
p.... |
[
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,
0,
18,
36,
13,
13,
23,
13,
12,
13,
30,
29,
13,
6,
13,
12,
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.io.*;\nimport 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 int getTime() {\n return time;\n }\n\n public void setTime(int time) {\n ... | import java.io.*;
import java.util.*;
class Process {
private String name;
private int time;
public Process(String name, int time) {
this.name = name;
this.time = time;
}
public int getTime() {
return time;
}
public void setTime(int time) {
this.time = time;
}... |
[
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,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
17,
41,
13,
20,
41,
13,
4,
18,
13,
0,
13,
4,
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.util.Deque;\nimport java.util.LinkedList;\nimport java.util.List;\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.List;\n\nclass Main {\n\n\tpublic static void main(String[] args) {\... | import java.util.Deque;
import java.util.LinkedList;
import java.util.List;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
class Main {
public static void main(String[] args) {
int n,q;
int t... |
[
7,
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,
12,
13,
30,
0,
18,
36,
13,
13,
23,
13,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
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
],
[
12,
14
],
... | [
"/*\n * http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_3_B&lang=jp\n */\nimport java.util.*;\n\nclass Task {\n\tString name;\n\tint time;\n\tint endTime;\n\tTask(String name, int time) {\n\t\tthis.name = name;\n\t\tthis.time = time;\n\t}\n\tvoid setEndTime(int x) {\n\t\tthis.endTime = x;\n\t}\n}\n\n... | /*
* http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_3_B&lang=jp
*/
import java.util.*;
class Task {
String name;
int time;
int endTime;
Task(String name, int time) {
this.name = name;
this.time = time;
}
void setEndTime(int x) {
this.endTime = x;
}
}
public class Main {
void run() {
... |
[
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,
4,
18,
13,
17,
4,
18,
13,
17,
41,
13,
4,
18,
13,
4,
18,
13,
2,
4,
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
],
... | [
"\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayDeque;\nimport java.util.Deque;\n\n\npublic class Main{\n\n public static void main(String[] args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(Sys... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayDeque;
import java.util.Deque;
public class Main{
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
... |
[
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,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
20,
4,
18,
13,
41,
13,
17,
42,
40,
4,
18,
13,
30,
41... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
163,
5
],
[
163,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.*;\npublic class Main\n{\n\tpublic static class process\n\t{\n\t\tString name;\n\t\tint time;\n\t\tpublic process(String n, int t)\n\t\t{\n\t\t\tname=n;\n\t\t\ttime=t;\n\t\t}\n\t\tpublic String getName()\n\t\t{\n\t\t\treturn this.name;\n\t\t}\n\t\t\n\t\tpublic int getTime()\n\t\t{\n\t\t\treturn th... | import java.util.*;
public class Main
{
public static class process
{
String name;
int time;
public process(String n, int t)
{
name=n;
time=t;
}
public String getName()
{
return this.name;
}
public int getTime()
{
return this.time;
}
public void run(int t)
{
if(this.time... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.io.*;\nimport java.util.*;\nimport java.lang.*;\n\nclass Main{\n public static void main(String[] args) throws IOException{\n Scanner scan=new Scanner(System.in);\n int n=Integer.parseInt(scan.next());\n int q=Integer.parseInt(scan.next());\n int sumTime=0;\n Queue<Process> queue=new Ar... | import java.io.*;
import java.util.*;
import java.lang.*;
class Main{
public static void main(String[] args) throws IOException{
Scanner scan=new Scanner(System.in);
int n=Integer.parseInt(scan.next());
int q=Integer.parseInt(scan.next());
int sumTime=0;
Queue<Process> queue=new ArrayDeque<Proces... |
[
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,
41,
13,
17,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
13,
0,
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
],
[
12,
13
],
[
10,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\nclass Tuple{\n String name;\n int time;\n Tuple(String name, int time){\n this.name = name;\n this.time = time;\n }\n}\n\nclass myQueue{\n int size = 100000;\n Tuple[] data;\n int he... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Tuple{
String name;
int time;
Tuple(String name, int time){
this.name = name;
this.time = time;
}
}
class myQueue{
int size = 100000;
Tuple[] data;
int head;
int tail;
... |
[
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,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
... | [
[
0,
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.ArrayList;\nimport java.util.LinkedList;\nimport java.util.List;\nimport java.util.Queue;\nimport java.util.Scanner;\n\npublic class Main\n{\n static class Process {\n private String name;\n private int time;\n\n public Process(String name, int time)\n {\n ... | import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import java.util.Scanner;
public class Main
{
static class Process {
private String name;
private int time;
public Process(String name, int time)
{
this.name = name;
... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
4,
18,
13,
30,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
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
],
[
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\tpublic static void main(String[] args) {\n\n\t\t// Queueはインターフェースなので、実装クラスのArrayDequeで実装\n\t\tQueue<Process> queue = new ArrayDeque<>();\n\... | 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 void main(String[] args) {
// Queueはインターフェースなので、実装クラスのArrayDequeで実装
Queue<Process> queue = new ArrayDeque<>();
try (BufferedReader... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
4... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
213,
8
],
[
213,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
]... | [
"import java.util.LinkedList;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tQueue queue = new Queue();\n\t\tint n = sc.nextInt();\n\t\tint q = sc.nextInt();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString name = sc.next(... | import java.util.LinkedList;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
Queue queue = new Queue();
int n = sc.nextInt();
int q = sc.nextInt();
for (int i = 0; i < n; i++) {
String name = sc.next();
int cpuTime = sc.nextIn... |
[
7,
15,
13,
17,
6,
13,
41,
13,
17,
41,
13,
17,
41,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
20,
0,
13,
2,
4,
18,
13,
17,
0,
13,
4,
18,
13,
0,
13,
20,
17,
0,
13,
20,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
4,
9
],
[
9,
10
],
[
9,
11
],
[
4,
12
],
[
12,
13
],
[
4,
14
],
[
... | [
"import java.util.*;\n\nclass Queue {\n static int top = 0;\n static int time = 0;\n static int n, q;\n static String[] label;\n static int[] value;\n public static void main() {\n Scanner sc = new Scanner(System.in);\n n = sc.nextInt()-1;\n q = sc.nextInt();\n label = ... | import java.util.*;
class Queue {
static int top = 0;
static int time = 0;
static int n, q;
static String[] label;
static int[] value;
public static void main() {
Scanner sc = new Scanner(System.in);
n = sc.nextInt()-1;
q = sc.nextInt();
label = new String[100000... |
[
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,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
284,
5
],
[
284,
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) throws Exception {\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int q = in.nextInt();\n String[] line = new String[n];\n Queue tasks = new Queue();\n in.nextLine();\n... | import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int q = in.nextInt();
String[] line = new String[n];
Queue tasks = new Queue();
in.nextLine();
for (in... |
[
7,
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,
13,
4,
18,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
118,
8
],
[
118,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
]... | [
"import java.util.LinkedList;\nimport java.util.Scanner;\n\n\n\npublic class Main{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner in = new Scanner(System.in);\n\t\tLinkedList<String> qName = new LinkedList<>();\n\t\tLinkedList<Integer> qTime = new LinkedList<>();\n\t\t\n\t\tint amount = in.nextInt();\n... | import java.util.LinkedList;
import java.util.Scanner;
public class Main{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
LinkedList<String> qName = new LinkedList<>();
LinkedList<Integer> qTime = new LinkedList<>();
int amount = in.nextInt();
int quantum = in.nextInt();
... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
41,
13,
17,
41,
13,
40,
17,
41,
13,
20,
17,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
11,
1,
41,
13,
17,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
213,
11
],
[
213,
12
],
[
12,
13
],
[
12,
14
],... | [
"\nimport javax.xml.crypto.Data;\nimport java.util.*;\nimport java.io.*;\n\npublic class Main {\n public static int SENTINEL = 100000007;\n public static int MAX = 10007;\n public static int NIL = -1;\n\n public static int[] dp = new int[100];\n\n\n public static void main(String[] args) throws IOExc... |
import javax.xml.crypto.Data;
import java.util.*;
import java.io.*;
public class Main {
public static int SENTINEL = 100000007;
public static int MAX = 10007;
public static int NIL = -1;
public static int[] dp = new int[100];
public static void main(String[] args) throws IOException {
... |
[
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
],
[
113,
5
],
[
113,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"\nimport java.util.*;\n\n/**\n * B\n */\npublic class Main {\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n Queue<String> name_array = new ArrayDeque<String>();\n Queue<Integer> time_array = new ArrayDeque<Integer>();\n\n int n = sc.nextInt();\n... |
import java.util.*;
/**
* B
*/
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
Queue<String> name_array = new ArrayDeque<String>();
Queue<Integer> time_array = new ArrayDeque<Integer>();
int n = sc.nextInt();
int q = sc.... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
41,
13,
20,
41,
13,
17,
41,
13,
4,
18,
13,
41,
13,
17,
42,
2,
13,
13,
30,
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.util.Deque;\nimport java.util.LinkedList;\nimport java.util.Scanner;\nimport java.util.ArrayDeque;\nimport java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sca = new Scanner(System.in);\n int n = sca.nextInt();\n Deque<Integer> quu = new L... | import java.util.Deque;
import java.util.LinkedList;
import java.util.Scanner;
import java.util.ArrayDeque;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sca = new Scanner(System.in);
int n = sca.nextInt();
Deque<Integer> quu = new LinkedList<>();
... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
4,
18,
20,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
132,
11
],
[
132,
12
],
[
12,
13
],
[
12,
14
],... | [
"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\tnew Main().run();\n\t}\n\n\tvoid run() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint q = sc.nextInt();\n\n\t\tDeque<String> na... | import java.util.ArrayDeque;
import java.util.Deque;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
new Main().run();
}
void run() {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int q = sc.nextInt();
Deque<String> nameQueue = new ArrayDeque<String>(... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
41,
13,
17,
41,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
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
],
[
124,
11
],
[
124,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.ArrayDeque;\nimport java.util.Deque;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String args[]) {\n\t\tint n, q, t;\n\t\tint t_sum = 0;\n\t\tString pros;\n\t\tDeque<String> name = new ArrayDeque<>();\n\t\tDeque<Integer> time = new ArrayDeque<>();\n\n\t\tScanner sc ... | import java.util.ArrayDeque;
import java.util.Deque;
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
int n, q, t;
int t_sum = 0;
String pros;
Deque<String> name = new ArrayDeque<>();
Deque<Integer> time = new ArrayDeque<>();
Scanner sc = new Scanner(System.in);
n... |
[
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,
4,
18,
13,
41,
13,
4,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
181,
8
],
[
181,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
]... | [
"import java.util.ArrayList;\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\tArrayList<Task> tasks = new ArrayList<>();\n\n\t\tint n = Integer.parseInt(sc.next());\n\t\tint q = Integer.parseInt(sc.next());\n\n\t\tfor (int ... | import java.util.ArrayList;
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
ArrayList<Task> tasks = new ArrayList<>();
int n = Integer.parseInt(sc.next());
int q = Integer.parseInt(sc.next());
for (int i = 0; i < n; i++) {
Stri... |
[
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
],
[
110,
5
],
[
110,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.*;\n\npublic class Main{\n public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n Queue<String> name = new LinkedList<>();\n Queue<Integer> time = new LinkedList<>();\n int a = in.nextInt();\n int b = in.nextInt();\n int timer... | import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
Queue<String> name = new LinkedList<>();
Queue<Integer> time = new LinkedList<>();
int a = in.nextInt();
int b = in.nextInt();
int timer = 0;
... |
[
7,
15,
13,
17,
6,
13,
41,
13,
41,
13,
6,
13,
41,
13,
41,
13,
41,
13,
41,
13,
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,
17,
13,
29,
13,
12... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
4,
8
],
[
8,
9
],
[
0,
10
],
[
181,
11
],
[
181,
12
],
[
12,
13
],
[
181,
14
]... | [
"import java.util.Scanner;\n\nclass Pair {\n String name;\n int time;\n}\n\npublic class Main {\n static int LEN;\n static int head;\n static int tail;\n static Pair[] pairs;\n\n // データの追加\n public static void enqueue(Pair x) {\n pairs[tail] = x;\n tail = (tail + 1) % LEN;\n ... | import java.util.Scanner;
class Pair {
String name;
int time;
}
public class Main {
static int LEN;
static int head;
static int tail;
static Pair[] pairs;
// データの追加
public static void enqueue(Pair x) {
pairs[tail] = x;
tail = (tail + 1) % LEN;
}
// データを取り出す
... |
[
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,
20,
4,
18,
13,
13,
41,
13,
17,
41,
13,
17,
41,
13,
20,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
145,
5
],
[
145,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.*;\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 Queue<Process> queue = new ArrayDeque<Process>();\n for(int i=0; i<n; i++) {\n Process p = ... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int q = sc.nextInt();
Queue<Process> queue = new ArrayDeque<Process>();
for(int i=0; i<n; i++) {
Process p = new Process(sc... |
[
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,
4,
18,
13,
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
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\nclass Main {\n\n public static void main(String args[]) throws IOException{\n\t BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t String[] string = br.readLine().split(\" \");\n in... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main {
public static void main(String args[]) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String[] string = br.readLine().split(" ");
int n = Integer.pars... |
[
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,
4,
18,
13,
41,
13,
20,
41,
13,
20,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
131,
8
],
[
131,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
]... | [
"import java.util.Scanner;\nimport java.util.LinkedList;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\tint nProcesses = input.nextInt();\n\t\tint quantum = input.nextInt();\n\t\tinput.nextLine(); // Clear \\n.\n\t\t\n\t\tLinkedList<Integer> queu... | import java.util.Scanner;
import java.util.LinkedList;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int nProcesses = input.nextInt();
int quantum = input.nextInt();
input.nextLine(); // Clear \n.
LinkedList<Integer> queue = new LinkedList<>();
... |
[
7,
15,
13,
17,
6,
13,
41,
13,
41,
13,
6,
13,
41,
13,
41,
13,
41,
13,
17,
41,
13,
20,
13,
12,
13,
30,
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,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
4,
8
],
[
8,
9
],
[
0,
10
],
[
215,
11
],
[
215,
12
],
[
12,
13
],
[
215,
14
]... | [
"import java.util.Scanner;\n\nclass Process {\n String name;\n int time;\n}\n\npublic class Main {\n private static int head, tail;\n private final static int MAX = 100000;\n private static Process[] Queue = new Process[MAX];\n\n public static void main(final String[] args) {\n Scanner sc = new Scanner(Sys... | import java.util.Scanner;
class Process {
String name;
int time;
}
public class Main {
private static int head, tail;
private final static int MAX = 100000;
private static Process[] Queue = new Process[MAX];
public static void main(final String[] args) {
Scanner sc = new Scanner(System.in);
int n... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
17,
41,
13,
41,
13,
20,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
13,
0,
13,
17,
41,
13,
20,
2,
13,
17,
41,
13,
20,
2... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
182,
5
],
[
182,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
8,
11
],
[
11,
12
],
[
8,
13
],
[
13,
14
],... | [
"import java.util.Scanner;\npublic class Main{\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tint i,n,q,tail,head,hz,notime=0;\n\t\tString hzn;\n\tScanner sc = new Scanner(System.in);\n\tn=sc.nextInt();\n\tq=sc.nextInt();\n\ttail=n;\n\t//System.out.println(tail);\n\thead=... | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
// TODO Auto-generated method stub
int i,n,q,tail,head,hz,notime=0;
String hzn;
Scanner sc = new Scanner(System.in);
n=sc.nextInt();
q=sc.nextInt();
tail=n;
//System.out.println(tail);
head=0;
String name[]=new Strin... |
[
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,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
20,
0,
18,
13,
13,
4,
18,
13,
0,
18,
13,
13,
4,
18,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
117,
5
],
[
117,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tclass Process {\n\t\t\tprivate String name;\n\t\t\tprivate long time;\n\t\t}\n\t\tQueue<Process> queue = new LinkedList<Process>();\t\t\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tlong n = scanner.nextLong();\... | import java.util.*;
public class Main {
public static void main(String[] args) {
class Process {
private String name;
private long time;
}
Queue<Process> queue = new LinkedList<Process>();
Scanner scanner = new Scanner(System.in);
long n = scanner.nextLong();
long q = scanner.nextLong();
... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
29,
4,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
13,
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.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.ArrayDeque;\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.Queue;\n\n/**\n * Created by ??\\??? on 2016/12/7.\n */\n\npublic class Main {\n static int si(String s){\n return Integer.parseInt(s);\n ... | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayDeque;
import java.util.HashMap;
import java.util.Map;
import java.util.Queue;
/**
* Created by ??\??? on 2016/12/7.
*/
public class Main {
static int si(String s){
return Integer.parseInt(s);
}
static void ru... |
[
7,
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,
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,
17,
11,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
161,
11
],
[
161,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.LinkedList;\nimport java.util.Queue;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\n\t\tScanner cin = new Scanner(System.in);\n\t\twhile (cin.hasNext()) {\n\t\t\tString[] str = cin.nextLine().split(\" \");\n\t\t\tint rundex = Integer.parseInt(str[0... | import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);
while (cin.hasNext()) {
String[] str = cin.nextLine().split(" ");
int rundex = Integer.parseInt(str[0]);
int step = Integer.pa... |
[
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,
6,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
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.io.InputStream;\nimport java.io.IOException;\nimport java.io.PrintWriter;\nimport java.util.ArrayDeque;\nimport java.util.Deque;\nimport java.util.InputMismatchException;\nimport java.util.NoSuchElementException;\nimport java.util.PriorityQueue;\n \npublic class Main{\n \n static InputReader ... | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.Deque;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.util.PriorityQueue;
public class Main{
static InputReader ir;
static P... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
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,
20,
42,
2,
4,
18... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
131,
11
],
[
131,
12
],
[
12,
13
],
[
12,
14
],... | [
"\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\t// write your code here\n Scanner scanner=new Scanner(System.in);\n Deque<Task> deque=new ArrayDeque<>();\n long time=0;\n int n=s... |
import java.util.ArrayDeque;
import java.util.Deque;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// write your code here
Scanner scanner=new Scanner(System.in);
Deque<Task> deque=new ArrayDeque<>();
long time=0;
int n=scanner.nextInt();
... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
... | [
[
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
],... | [
"import java.util.AbstractMap;\nimport java.util.ArrayDeque;\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\n\t\tint n = sc.nextInt();\n\t\tint q = sc.nextInt();\n\... | import java.util.AbstractMap;
import java.util.ArrayDeque;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO ?????????????????????????????????????????????
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int q = sc.nextInt();
sc.nextLine();
String[... |
[
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,
4,
18,
13,
20,
4,
18,
4,
18,
13,
13,
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
],... | [
"\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\n\n\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint q = sc.nextInt();\n\t\tList<List<String>> list = new ArrayList <>();\n\t\tfor(int ... |
import java.util.ArrayList;
import java.util.List;
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();
List<List<String>> list = new ArrayList <>();
for(int i = 0; i < n; i++) {
list.a... |
[
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
],
[
113,
11
],
[
113,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.ArrayDeque;\nimport java.util.Queue;\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 quant = sc.nextInt();\n\n Queue<String> qTask = new ArrayDeque<>();\... | import java.util.ArrayDeque;
import java.util.Queue;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int quant = sc.nextInt();
Queue<String> qTask = new ArrayDeque<>();
Queue<I... |
[
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,
4,
18,
13,
18,
13,
17,
41,
13,
20,
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
],
[
173,
8
],
[
173,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
]... | [
"import java.util.Scanner;\nimport java.util.ArrayList;\npublic class Main {\n public static void main (String[] args) {\n\tScanner scan = new Scanner(System.in);\n\tString[] initial = scan.nextLine().split(\" \");\n\tint n = Integer.parseInt(initial[0]);\n\tint q = Integer.parseInt(initial[1]);\n\tArrayList<Pro... | import java.util.Scanner;
import java.util.ArrayList;
public class Main {
public static void main (String[] args) {
Scanner scan = new Scanner(System.in);
String[] initial = scan.nextLine().split(" ");
int n = Integer.parseInt(initial[0]);
int q = Integer.parseInt(initial[1]);
ArrayList<Process> processes = ne... |
[
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,
17,
41,
13,
20,
13,
41,
13,
20,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
221,
11
],
[
221,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.ArrayDeque;\nimport java.util.Deque;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\t//標準入力受け取り////////////////////////////////\n\t\tString[] nandqueue = scan.nextLine().split(\" \");\n\t\tint N = ... | 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);
//標準入力受け取り////////////////////////////////
String[] nandqueue = scan.nextLine().split(" ");
int N = Integer.parseInt(nandqueue[0... |
[
7,
15,
13,
17,
6,
13,
41,
13,
17,
41,
13,
41,
13,
41,
13,
20,
13,
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,
0,
18,
13,
13,
20,
11,
1,
41,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
190,
5
],
[
190,
6
],
[
6,
7
],
[
6,
8
],
[
190,
9
],
[
9,
10
],
[
190,
11
],
[
11,
12
],
[
190,
13
],
[
13,
1... | [
"import java.util.Scanner;\n\n/**\n * キュー\n * @author nobu\n * @see <a href=\"http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_3_B&lang=ja\">ALDS1_3_B</a>\n */\npublic class Main {\n\n\tprivate static final int LEN = 100005;\n\tprivate static int head, tail;\n\tprivate static P Q[] = new P[LEN];\n\n\t... | import java.util.Scanner;
/**
* キュー
* @author nobu
* @see <a href="http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_3_B&lang=ja">ALDS1_3_B</a>
*/
public class Main {
private static final int LEN = 100005;
private static int head, tail;
private static P Q[] = new P[LEN];
public static void main(... |
[
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,
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
],
[
219,
8
],
[
219,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
]... | [
"import java.io.PrintWriter;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n PrintWriter pw = new PrintWriter(System.out);\n\n int n = sc.nextInt();\n int q = sc.nextInt();\n\n Queue queue = n... | import java.io.PrintWriter;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
PrintWriter pw = new PrintWriter(System.out);
int n = sc.nextInt();
int q = sc.nextInt();
Queue queue = new Queue(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,
12,
13,
30,
29,
13,
12,
13,
30,
0,
18,
36,
13,
13,
23,
13,
12,
13,
30,
29,
13,
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.ArrayList;\nimport java.util.Scanner;\n\n\nclass Process{\n\t\n\tprivate String name;\n\tprivate int time;\n\tpublic Process(String name,int time){\n\t\tthis.name = name;\n\t\tthis.time = time;\n\t}\n\t\n\tpublic String getName() {\n\t\treturn name;\n\t}\n\tpublic void setName(String name) {\n\t\t... | import java.util.ArrayList;
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 String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getTim... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
41,
13,
20,
41,
13,
41,
13,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.util.*;\nimport java.io.*;\n\nclass Main{\n public static void main(String[] args) throws IOException{\n\tScanner scan = new Scanner(System.in);\n\tint n = scan.nextInt();\n\tint reg = scan.nextInt();\n\tQueue<String> method = new LinkedList<String>();\n\tQueue<Integer> time = new LinkedList<Integer... | import java.util.*;
import java.io.*;
class Main{
public static void main(String[] args) throws IOException{
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int reg = scan.nextInt();
Queue<String> method = new LinkedList<String>();
Queue<Integer> time = new LinkedList<Integer>();
int i;
int t... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
20,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
172,
5
],
[
172,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.*;\n\npublic class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString[] info = sc.nextLine().split(\" \");\n\t\tQueue<Process> entries = new LinkedList<>();\n\t\tint size = Integer.parseInt(info[0]);\n\t\tint runtime = Integer.parseInt(info[1])... | import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
String[] info = sc.nextLine().split(" ");
Queue<Process> entries = new LinkedList<>();
int size = Integer.parseInt(info[0]);
int runtime = Integer.parseInt(info[1]);
for(int i = 0; i < siz... |
[
7,
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,
4,
18,
13,
18,
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
],
[
195,
8
],
[
195,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
]... | [
"import java.io.*;\nimport java.util.*;\n\npublic class Main {\n\tpublic static void main(String [] args) throws NumberFormatException, IOException{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tPrintWriter pr=new PrintWriter(System.out);\n\t\tArrayList<task> ar=new ArrayList<tas... | import java.io.*;
import java.util.*;
public class Main {
public static void main(String [] args) throws NumberFormatException, IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
PrintWriter pr=new PrintWriter(System.out);
ArrayList<task> ar=new ArrayList<task>();
String[] s=... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
17,
41,
13,
17,
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... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
134,
11
],
[
134,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.ArrayDeque;\nimport java.util.Queue;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint num, quantum = 0;\n\t\tint time = 0; // time;総時間数\n\t\tQueue<String> qName = new ArrayDeque<String>();\n\t\tQueue<... | 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);
int num, quantum = 0;
int time = 0; // time;総時間数
Queue<String> qName = new ArrayDeque<String>();
Queue<Integer> qTime = new Array... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
38,
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,
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.ArrayDeque;\nimport java.util.Deque;\nimport java.util.Scanner;\nclass Main {\n\tpublic static void main(String[] args){\n\t\ttry(Scanner sc = new Scanner(System.in)){\n\t\t\tDeque<Process> process=new ArrayDeque<>();\n\t\t\tint n=Integer.parseInt(sc.next());\n\t\t\tint q=Integer.parseInt(sc.next(... | import java.util.ArrayDeque;
import java.util.Deque;
import java.util.Scanner;
class Main {
public static void main(String[] args){
try(Scanner sc = new Scanner(System.in)){
Deque<Process> process=new ArrayDeque<>();
int n=Integer.parseInt(sc.next());
int q=Integer.parseInt(sc.next());
for(int i=0;i<n;i+... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
20,
41,
13,
17,
42,
40,
4,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
133,
11
],
[
133,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.ArrayDeque;\nimport java.util.Queue;\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 quant = sc.nextInt();\n\n Queue<TimeTask> que = new ArrayDeque<>();\... | import java.util.ArrayDeque;
import java.util.Queue;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int quant = sc.nextInt();
Queue<TimeTask> que = new ArrayDeque<>();
for (in... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
13,
23,... | [
[
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.ArrayList;\nimport java.util.Scanner;\n\nclass Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint q = sc.nextInt();\n\t\tOrique oq = new Orique();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\toq.inque(sc.next(), sc.nextInt(... | import java.util.ArrayList;
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();
Orique oq = new Orique();
for (int i = 0; i < n; i++) {
oq.inque(sc.next(), sc.nextInt());
}
oq.RoundRobinSchedu... |
[
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,
4,
18,
13,
20,
41,
13,
20,
41,
13,
17,
42,
2,
4,
18,
13,
17,
30... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
132,
5
],
[
132,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.*;\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 ArrayDeque<Proc> queue = new ArrayDeque<>();\n for (int i = 0; i < n; i++) {\n queue.add(ne... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int q = sc.nextInt();
ArrayDeque<Proc> queue = new ArrayDeque<>();
for (int i = 0; i < n; i++) {
queue.add(new Proc(sc.next... |
[
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
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.util.Scanner;\nimport java.util.ArrayDeque;\nimport java.util.Deque;\n\n\nclass Main {\n public static void main(String[] args) {\n //input\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int q = sc.nextInt();\n Deque<MyProcess> d = new ArrayDeque<MyProcess>();\n for... | import java.util.Scanner;
import java.util.ArrayDeque;
import java.util.Deque;
class Main {
public static void main(String[] args) {
//input
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int q = sc.nextInt();
Deque<MyProcess> d = new ArrayDeque<MyProcess>();
for(int i = 0; i < n... |
[
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,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
17,
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
],
[
12,
13
],
[
12,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.ArrayDeque;\n\nclass Main {\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tArrayDeque<Process> queue = new ArrayDeque<Process>();\n... | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayDeque;
class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
ArrayDeque<Process> queue = new ArrayDeque<Process>();
String[] str01 = ... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
42,
2,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
18,
13,
13,
0,
13,
13,
0,
18,
13,
13,
13,
14,
... | [
[
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.ArrayList;\nimport java.util.List;\nimport java.util.LinkedList;\nimport java.util.Scanner;\nimport java.util.Queue;\n\nclass Main {\n\n public static class Process {\n\n public String name;\n public int time;\n\n public Process(String name, int time) {\n this.name = name;\n th... | import java.util.ArrayList;
import java.util.List;
import java.util.LinkedList;
import java.util.Scanner;
import java.util.Queue;
class Main {
public static class Process {
public String name;
public int time;
public Process(String name, int time) {
this.name = name;
this.time = time;
... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
0,
13,
4,
18,
13,
41,
13,
4,
18,
13,
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,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
189,
8
],
[
189,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
]... | [
"import java.io.*;\nimport java.util.*;\n\n\n\npublic class Main{\n public static void main(String[] args)throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String str;\n\n str = br.readLine();\n String[] strs = str.split(\"\\\\s\");\n ... | import java.io.*;
import java.util.*;
public class Main{
public static void main(String[] args)throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str;
str = br.readLine();
String[] strs = str.split("\\s");
int n = Integer.... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
18,
13,
13,
2,
17,
13,
30,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
17,
17,
41,
13,
4,
18,
13,
2,
17,
18,
13,
17,
41,
13,
4,
18,
13,
2,
17,
18,
13,
17,
41,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
13,
14
],
... | [
"import java.io.*;\n\nclass Main{\n\tpublic static void main(String[] args){\n\t\ttry{\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString wk[] = br.readLine().split(\" \", 0);\n\t\t\tint n = Integer.parseInt(\"\"+wk[0]);\n\t\t\tint q = Integer.parseInt(\"\"+wk[1]);\n\t\t\... | import java.io.*;
class Main{
public static void main(String[] args){
try{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String wk[] = br.readLine().split(" ", 0);
int n = Integer.parseInt(""+wk[0]);
int q = Integer.parseInt(""+wk[1]);
String name[] = new String[n+1];
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,
41,
13,
20,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
193,
5
],
[
193,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.Scanner;\n\n\npublic class Main {\n\n\tpublic static void main(String[] args){\n\t\tScanner stdIn = new Scanner(System.in);\n\n\t\tint n = stdIn.nextInt();\n\t\tint q = stdIn.nextInt();\n String [] a = new String[n];\n int [] b = new int[n];\n String [] aa = new String[n];\n ... | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner stdIn = new Scanner(System.in);
int n = stdIn.nextInt();
int q = stdIn.nextInt();
String [] a = new String[n];
int [] b = new int[n];
String [] aa = new String[n];
int [] bb = new int... |
[
7,
15,
13,
17,
6,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
20,
13,
41,
13,
17,
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,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
204,
5
],
[
204,
6
],
[
6,
7
],
[
6,
8
],
[
204,
9
],
[
9,
10
],
[
9,
11
],
[
204,
12
],
[
12,
13
],
[
12,
14
... | [
"import java.util.*;\n\npublic class Main {\n static int head = 0;\n static int tail = 0;\n static final int MAX = 100000;\n static int[] Q = new int[MAX];\n static int NOW = 0;\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt()... | import java.util.*;
public class Main {
static int head = 0;
static int tail = 0;
static final int MAX = 100000;
static int[] Q = new int[MAX];
static int NOW = 0;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int q ... |
[
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 s=new Scanner(System.in);\n\tint i,n,m,gt=0;\n\n\tQueue<String>q=new LinkedList<String>();\n\tQueue<Integer>time=new LinkedList<Integer>();\n\n\tn=s.nextInt();\n\tm=s.nextInt();\n\n\tfor... | import java.util.*;
import java.io.*;
class Main{
public static void main(String[] args) throws IOException{
Scanner s=new Scanner(System.in);
int i,n,m,gt=0;
Queue<String>q=new LinkedList<String>();
Queue<Integer>time=new LinkedList<Integer>();
n=s.nextInt();
m=s.nextInt();
for(i=0;i<n;i++){
q.add(... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
42,
2,
4,
18,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
138,
5
],
[
138,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
9,
12
],
[
13,
13
],
[
13,
14
],... | [
"\nimport java.util.*;\n\n\n\n/*\n * Aizuuuuuuu\n * \n */\npublic class Main {\n\tpublic static void print(ArrayList<String> list) {\n\t\tfor (String i :list) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}\n\tpublic static void main(String[] args) {\n\t\tint globalTime = 0;\n\t\t\n\t\tScanner sc = new Scanner(System.i... |
import java.util.*;
/*
* Aizuuuuuuu
*
*/
public class Main {
public static void print(ArrayList<String> list) {
for (String i :list) {
System.out.println(i);
}
}
public static void main(String[] args) {
int globalTime = 0;
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int q ... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
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,
20,
42,
2,
4,
18,
13,
17,
30,
41... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
117,
5
],
[
117,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
... | [
"\nimport java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n Queue<Prosess> queue = new ArrayDeque<>();\n int N = sc.nextInt();\n int q = sc.nextInt();\n int time = 0;\n\n for (int i = 0; i < N; i++) {\n ... |
import java.util.*;
public class Main {
public static void main(String[] args) {
try (Scanner sc = new Scanner(System.in)) {
Queue<Prosess> queue = new ArrayDeque<>();
int N = sc.nextInt();
int q = sc.nextInt();
int time = 0;
for (int i = 0; i < N; i++) {
queue.offer(new P... |
[
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
],
[
113,
11
],
[
113,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.Deque;\nimport java.util.LinkedList;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tDeque<Integer> queue = new LinkedList<>();\n\t\tDeque<String> names = new LinkedList<>();\n\t\tint time = 0;\n\t\tint n ... | import java.util.Deque;
import java.util.LinkedList;
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> names = new LinkedList<>();
int time = 0;
int n = sc.nextInt();
int q = ... |
[
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,
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
],
[
13,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayDeque;\nimport java.util.Deque;\n\nclass Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayDeque;
import java.util.Deque;
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,
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,
3... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
290,
8
],
[
290,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
]... | [
"\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n static class Proc {\n public String name;\n public int time;\n\n public Proc(String name, int time) {\n this.name = name;\n this.time = time;\n }\n\n public int r... |
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
static class Proc {
public String name;
public int time;
public Proc(String name, int time) {
this.name = name;
this.time = time;
}
public int run(int quantum) {
... |
[
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,
4,
18,
13,
41,
13,
20,
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
],
[
140,
11
],
[
140,
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\t// TODO Auto-generated method stub\n\n\t\tScanner scan=new Scanner(System.in);\n\t\tint n=scan.nextInt();\n\t\tint tm=scan.nextInt();\n\t\tString stmp=scan.ne... |
import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scan=new Scanner(System.in);
int n=scan.nextInt();
int tm=scan.nextInt();
String stmp=scan.nextLine();
Queue<Integer> q=... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
41,
13,
20,
38,
5,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
38,
5,
13,
30,
30,
41,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
164,
5
],
[
164,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tint n = 0, q = 0;\n\t\tScanner scanner = new Scanner(System.in);\n\t\ttry {\n\t\t\tn = scanner.nextInt();\n\t\t\tq = scanner.nextInt();\n\t\t} catch (Exception e) {\n\t\t}\n\t\tArrayList<Queue> qu = new ArrayList<Queue>();\... | import java.util.*;
public class Main {
public static void main(String[] args) {
int n = 0, q = 0;
Scanner scanner = new Scanner(System.in);
try {
n = scanner.nextInt();
q = scanner.nextInt();
} catch (Exception e) {
}
ArrayList<Queue> qu = new ArrayList<Queue>();
for (int i = 0; i < n; i++) {
... |
[
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 S=new Scanner(System.in);\n\tint i,n,m,t=0;\n\tQueue<String>P=new LinkedList<String>();\n\tQueue<Integer>T=new LinkedList<Integer>();\n\tn=S.nextInt();\n\tm=S.nextInt();\n\tfor(i=0;i<n;i... | import java.util.*;
import java.io.*;
class Main{
public static void main(String[] args) throws IOException{
Scanner S=new Scanner(System.in);
int i,n,m,t=0;
Queue<String>P=new LinkedList<String>();
Queue<Integer>T=new LinkedList<Integer>();
n=S.nextInt();
m=S.nextInt();
for(i=0;i<n;i++){
P.add(S.next(... |
[
7,
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,
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,
... | [
[
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
],
[... | [
"\nimport java.util.*;\nimport java.lang.*;\n\nclass Process {\n String id;\n int time;\n Process(String x, int t) {\n id = x;\n time = t;\n }\n}\n\n\npublic class Main {\n \n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n \n int... |
import java.util.*;
import java.lang.*;
class Process {
String id;
int time;
Process(String x, int t) {
id = x;
time = t;
}
}
public class Main {
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int n = sc.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,
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,
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.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayDeque;\nimport java.util.Deque;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException, NumberFormatException {\n\t\t// TODO ?????????????????????????????????????????... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayDeque;
import java.util.Deque;
public class Main {
public static void main(String[] args) throws IOException, NumberFormatException {
// TODO ?????????????????????????????????????????????
BufferedRe... |
[
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
],
[
140,
5
],
[
140,
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\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\tint num = in.nextInt();\n\t\tint quantum = in.nextInt();\n\t\t\n\t\tQueue<String> names = new LinkedList<String>();\n\t\tQueue<Integer> times = new LinkedList<Integer>();\n\... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int num = in.nextInt();
int quantum = in.nextInt();
Queue<String> names = new LinkedList<String>();
Queue<Integer> times = new LinkedList<Integer>();
for(int i = 0; i < num; i++)... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
20,
4,
18,
4,
18,
13,
2,
4,
18,
13,
17,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
140,
5
],
[
140,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
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 n = sc.nextInt();\n int q = sc.nextInt();\n List<Map<String, Integer>> queue = new ArrayList<>();\n int second = 0;\n for(int i = 0; i < n; i++) {\n queue.add... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int q = sc.nextInt();
List<Map<String, Integer>> queue = new ArrayList<>();
int second = 0;
for(int i = 0; i < n; i++) {
queue.add(new HashMap<>(... |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
17,
41,
13,
17,
41,
13,
20,
13,
41,
13,
20,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
12,
13,
30,
0,
18,
13,
13,
13,
14,
2,
13,
2,
13,
17,
0,
13,
17,
40,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
210,
5
],
[
210,
6
],
[
6,
7
],
[
6,
8
],
[
210,
9
],
[
9,
10
],
[
9,
11
],
[
210,
12
],
[
12,
13
],
[
12,
14
... | [
"import java.util.*;\n\npublic class Main {\n Scanner sc = new Scanner(System.in);\n \n\tint n = 100001 ; int total = 0 ;\n\tint[] time = new int[n];\n\tString[] name = new String[n];\n\tint topInt = 0 ,topString=0; //キューの先頭\n\tint bottomInt = 0 ,bottomString=0;//キューの末尾 +1\n\t\n\tvoid enQueueInt(int m){\n\t\... | import java.util.*;
public class Main {
Scanner sc = new Scanner(System.in);
int n = 100001 ; int total = 0 ;
int[] time = new int[n];
String[] name = new String[n];
int topInt = 0 ,topString=0; //キューの先頭
int bottomInt = 0 ,bottomString=0;//キューの末尾 +1
void enQueueInt(int m){
time[bottomInt] = m ;
i... |
[
7,
15,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
0,
18,
36,
13,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
13,
0,
13,
20,
13,
0,
13,
17,
0,
13,
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.util.Scanner;\n\nclass Process{\n\tint time;\n\tString name;\n\tpublic Process(String name,int time){\n\t\tthis.time = time;\n\t\tthis.name = name;\n\t}\n}\n\nclass Queue{\n\tprivate Process[] queArray;\n\tprivate int front;\n\tprivate int rear;\n\tprivate int maxSize;\n\tprivate int nItems;\n\t\n\tpub... | import java.util.Scanner;
class Process{
int time;
String name;
public Process(String name,int time){
this.time = time;
this.name = name;
}
}
class Queue{
private Process[] queArray;
private int front;
private int rear;
private int maxSize;
private int nItems;
public Queue(int size){
maxSize = size;... |
[
7,
15,
13,
17,
6,
13,
41,
13,
17,
12,
13,
30,
41,
13,
17,
42,
40,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
18,
13,
13,
14,
40,
2,
2,
13,
13,
17,
30,
4,
18,
13,
13,
0,
18,
13,
13,
2,
13,
13,
0,
13,
13,
9,
30,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
238,
5
],
[
238,
6
],
[
6,
7
],
[
6,
8
],
[
238,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
... | [
"import java.util.Scanner;\n\npublic class Main {\n public static int MAX = 100001;\n public static class Task{\n String name;\n int t;\n }\n public static class MyQueue {\n int head, tail = 0;\n Task[] a = new Task[MAX];\n public boolean isFull(){\n return ... | import java.util.Scanner;
public class Main {
public static int MAX = 100001;
public static class Task{
String name;
int t;
}
public static class MyQueue {
int head, tail = 0;
Task[] a = new Task[MAX];
public boolean isFull(){
return head == (tail + 1... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
19,
18,
20,
11,
1,
41,
13,
17,
2,
13,
4,
18,
20,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
19,
18,
20,
4,
18,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
222,
5
],
[
222,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.Scanner;\n\n\npublic class Main{\n\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tString[] one = s.nextLine().split(\" \");\n\t\tQueueImpl qqq = new Main().new QueueImpl();\n\t\tfor(int i=0 ; i<new Integer(one[0]).intValue() ; i++){\n\t\t\tString[] two = ... | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
String[] one = s.nextLine().split(" ");
QueueImpl qqq = new Main().new QueueImpl();
for(int i=0 ; i<new Integer(one[0]).intValue() ; i++){
String[] two = s.nextLine().split(" ");
P... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
... | [
[
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
],
[
166,
14
],
... | [
"import java.io.IOException;\nimport java.util.ArrayDeque;\nimport java.util.Queue;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tQueue<DataS> queue = new ArrayDeque<>();\n\t\tint n = scan.nextInt... | import java.io.IOException;
import java.util.ArrayDeque;
import java.util.Queue;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
Scanner scan = new Scanner(System.in);
Queue<DataS> queue = new ArrayDeque<>();
int n = scan.nextInt();
int q = scan.next... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
41,
13,
17,
12,
13,
30,
42,
40,
4,
18,
13,
30,
41,
13,
4,
18,
13,
0,
13,
4,
18,
13,
13,
14,
2,
18,
13,
13,
17,
4,
18,
13,
13,
4,
18,
18,
13,
13,
2,
2,... | [
[
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.*;\nimport java.io.*;\n\nclass Main{\n static ArrayDeque<Elem> dq;\n static int size;\n static int max;\n static int time = 0;\n\n static class Elem{\n String s;\n Integer i;\n public Elem(String s, Integer i){\n ... | import java.util.*;
import java.io.*;
class Main{
static ArrayDeque<Elem> dq;
static int size;
static int max;
static int time = 0;
static class Elem{
String s;
Integer i;
public Elem(String s, Integer i){
... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
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... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
117,
8
],
[
117,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
]... | [
"import java.util.LinkedList;\nimport java.util.Scanner;\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 clock = scan.nextInt();\n int time = 0;\n LinkedList<String> names = new LinkedList... | import java.util.LinkedList;
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int clock = scan.nextInt();
int time = 0;
LinkedList<String> names = new LinkedList<>();
... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
41,
13,
17,
41,
13,
20,
17,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
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
],
[
245,
11
],
[
245,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tstatic int head = 0;\n\tstatic int tail = 0;\n\tstatic Process[] queue = new Process[100005];\n\n\tpublic static void main(String[] args) {\n\t\ttry (BufferedReader br = new BufferedReader(new I... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
static int head = 0;
static int tail = 0;
static Process[] queue = new Process[100005];
public static void main(String[] args) {
try (BufferedReader br = new BufferedReader(new InputStreamReader(Syst... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.