-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathProblemOne.java
More file actions
46 lines (36 loc) · 1.18 KB
/
ProblemOne.java
File metadata and controls
46 lines (36 loc) · 1.18 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
import java.io.IOException;
import java.util.Random;
public class ProblemOne implements ProblemConfigData {
private static final Random RANDOM = new Random();
public static void main(String[] args) throws IOException, InterruptedException {
TestCaseGenerator generator = new TestCaseGenerator(true, new ProblemOne());
generator.generate();
}
@Override
public String getWorkingDirectory() {
return "/src/ProblemOne";
}
//Inputs and Outputs directories can be relative to working directory.
@Override
public String getInputsDirectory() {
return "./in";
}
//Inputs and Outputs directories can be relative to working directory.
@Override
public String getOutputsDirectory() {
return "./out";
}
@Override
public int getNumberOfTestCases() {
return 10;
}
@Override
public String generateInput(int index) {
return (RANDOM.nextInt(101) - 50) + " " + (RANDOM.nextInt(101) - 50);
}
//Because solution.py is in the working directory, we can run it directly
@Override
public String getSolutionRunCommand(int index) {
return "python solution.py";
}
}