-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgr.java
57 lines (48 loc) · 1.3 KB
/
gr.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import java.util.*;
import java.io.*;
// public class Solution
class Solution
{
static BufferedReader br;
static String nextIntBuffer[];
static int nextIntBase;
static int nextInt() throws IOException {
return Integer.parseInt(next());
}
static long nextLong() throws IOException {
return Long.parseLong(next());
}
static String next() throws IOException {
if(nextIntBase>=nextIntBuffer.length) {
nextIntBase =0;
nextIntBuffer = br.readLine().split(" ");
}
return nextIntBuffer[nextIntBase++];
}
public static <T1 extends Comparable<T1> ,T2 extends Comparable<T2> > Pair<T1,T2> mp(T1 a,T2 b) {
return new Pair<T1,T2>(a,b);
}
public static void main(String[] args) throws IOException {
br=new BufferedReader(new InputStreamReader(System.in));
nextIntBuffer = new String[0];
ArrayList<Integer> G[] = (ArrayList<Integer>[])new ArrayList[10];
int t=nextInt();
for(int i=0;i<t;i++) {
}
System.out.println("Case #"+(t+1)+": ");
}
}
class Pair<T1 extends Comparable<T1>, T2 extends Comparable<T2> > implements Comparable<Pair<T1,T2> > {
T1 a;
T2 b;
public Pair(T1 x, T2 y) {
a = x; b = y;
}
@Override
public int compareTo(Pair<T1,T2> other) {
int comp1 = a.compareTo(other.a);
if(comp1!=0)
return comp1;
return b.compareTo(other.b);
}
}