File tree 1 file changed +14
-13
lines changed
1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -71,13 +71,15 @@ class Rand {
71
71
72
72
// Returns an random int value in the range [from, to] inclusive
73
73
int Int(int from, int to) {
74
- assert(from <= to);
74
+ if (from == to) return from;
75
+ assert(from < to);
75
76
return rand() % (to - from) + from;
76
77
}
77
78
78
79
// Returns an random long long value in the range [from, to] inclusive
79
80
long long Long(long long from, long long to) {
80
- assert(from <= to);
81
+ if (from == to) return from;
82
+ assert(from < to);
81
83
return rand() % (to - from) + from;
82
84
}
83
85
@@ -214,17 +216,16 @@ import java.io.*;
214
216
* {{end}}
215
217
*/
216
218
public class Main {
217
-
218
- void solve(Scanner in, PrintWriter out) {
219
-
220
- }
221
-
222
- public static void main(String[] args) {
223
- try(Scanner in = new Scanner(System.in);
224
- PrintWriter out = new PrintWriter(System.out)) {
225
- new Main().solve(in, out);
226
- }
227
- }
219
+ void solve(Scanner in, PrintWriter out) {
220
+
221
+ }
222
+
223
+ public static void main(String[] args) {
224
+ try(Scanner in = new Scanner(System.in);
225
+ PrintWriter out = new PrintWriter(System.out)) {
226
+ new Main().solve(in, out);
227
+ }
228
+ }
228
229
}
229
230
`
230
231
You can’t perform that action at this time.
0 commit comments