git reimport
This commit is contained in:
21
dcj/tasks/query_of_death/query_of_death.java.1
Normal file
21
dcj/tasks/query_of_death/query_of_death.java.1
Normal file
@@ -0,0 +1,21 @@
|
||||
// Sample input 1, in Java.
|
||||
public class query_of_death {
|
||||
public query_of_death() {
|
||||
}
|
||||
|
||||
static int isthenodebroken = 0;
|
||||
static int testvs[] = {1, 1, 0};
|
||||
|
||||
public static long GetLength() {
|
||||
return 3L;
|
||||
}
|
||||
|
||||
public static long GetValue(long i) {
|
||||
if (i < 0L || i >= GetLength())
|
||||
throw new IllegalArgumentException("Invalid argument");
|
||||
int val = (int)(testvs[(int)i]^((int)(Math.random() * 2 + 1) % (isthenodebroken + 1)));
|
||||
if (i == 1)
|
||||
isthenodebroken = 1;
|
||||
return val;
|
||||
}
|
||||
}
|
21
dcj/tasks/query_of_death/query_of_death.java.2
Normal file
21
dcj/tasks/query_of_death/query_of_death.java.2
Normal file
@@ -0,0 +1,21 @@
|
||||
// Sample input 2, in Java.
|
||||
public class query_of_death {
|
||||
public query_of_death() {
|
||||
}
|
||||
|
||||
static int isthenodebroken = 0;
|
||||
static int testvs[] = {1, 1, 1};
|
||||
|
||||
public static long GetLength() {
|
||||
return 3L;
|
||||
}
|
||||
|
||||
public static long GetValue(long i) {
|
||||
if (i < 0L || i >= GetLength())
|
||||
throw new IllegalArgumentException("Invalid argument");
|
||||
int val = (int)(testvs[(int)i]^((int)(Math.random() * 2 + 1) % (isthenodebroken + 1)));
|
||||
if (i == 0)
|
||||
isthenodebroken = 1;
|
||||
return val;
|
||||
}
|
||||
}
|
21
dcj/tasks/query_of_death/query_of_death.java.3
Normal file
21
dcj/tasks/query_of_death/query_of_death.java.3
Normal file
@@ -0,0 +1,21 @@
|
||||
// Sample input 3, in Java.
|
||||
public class query_of_death {
|
||||
public query_of_death() {
|
||||
}
|
||||
|
||||
static int isthenodebroken = 0;
|
||||
static int testvs[] = {1, 0, 1, 0, 1};
|
||||
|
||||
public static long GetLength() {
|
||||
return 5L;
|
||||
}
|
||||
|
||||
public static long GetValue(long i) {
|
||||
if (i < 0L || i >= GetLength())
|
||||
throw new IllegalArgumentException("Invalid argument");
|
||||
int val = (int)(testvs[(int)i]^((int)(Math.random() * 2 + 1) % (isthenodebroken + 1)));
|
||||
if (i == 4)
|
||||
isthenodebroken = 1;
|
||||
return val;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user