-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTemplate.java
More file actions
116 lines (94 loc) · 2.07 KB
/
Copy pathTemplate.java
File metadata and controls
116 lines (94 loc) · 2.07 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
import java.util.*;
<<<<<<< HEAD
<<<<<<< HEAD
public class Template {
static Scanner input = new Scanner(System.in);
static int mod = 1000000007;
public static void main(String[] args) {
input.close();
}
public static int modulo(int dividend) {
while (dividend >= mod)
dividend -= mod;
return dividend;
}
public static int combination(int n, int r) {
int ans = 1;
for (int i = 1; i <= r; i++) {
ans *= (n - i + 1);
ans /= i;
}
return ans;
}
}
// class Pair {
// public int first, second;
// Pair() {
// }
// Pair(int x, int y) {
// this.first = x;
// this.second = y;
// }
// }
// class PairComparator implements Comparator<Pair> {
// // sorts by first element in ascending order
// @Override
// public int compare(Pair p1, Pair p2) {
// if (p1.first == p2.first)
// return p1.second < p2.second ? 1 : -1;
// else if (p1.first < p2.first) {
// return 1;
// }
// return -1;
// }
// }
=======
public class Main {
=======
public class Template {
>>>>>>> 85ebdaa... Dump
static Scanner input = new Scanner(System.in);
static int mod = 1000000007;
public static void main(String[] args) {
input.close();
}
<<<<<<< HEAD
}
>>>>>>> 654079d... Dump
=======
public static int modulo(int dividend) {
while (dividend >= mod)
dividend -= mod;
return dividend;
}
public static int combination(int n, int r) {
int ans = 1;
for (int i = 1; i <= r; i++) {
ans *= (n - i + 1);
ans /= i;
}
return ans;
}
}
// class Pair {
// public int first, second;
// Pair() {
// }
// Pair(int x, int y) {
// this.first = x;
// this.second = y;
// }
// }
// class PairComparator implements Comparator<Pair> {
// // sorts by first element in ascending order
// @Override
// public int compare(Pair p1, Pair p2) {
// if (p1.first == p2.first)
// return p1.second < p2.second ? 1 : -1;
// else if (p1.first < p2.first) {
// return 1;
// }
// return -1;
// }
// }
>>>>>>> 85ebdaa... Dump