48 lines
929 B
Java
48 lines
929 B
Java
package chelper;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.Collections;
|
|
import java.util.List;
|
|
|
|
import io.InputReader;
|
|
import io.OutputWriter;
|
|
import misc.SimpleSavingChelperSolution;
|
|
|
|
|
|
public class BUDDYNIM extends SimpleSavingChelperSolution {
|
|
|
|
public void solve(int testNumber, InputReader in, OutputWriter out) {
|
|
wrapSolve(testNumber, in, out);
|
|
}
|
|
|
|
@Override
|
|
public void solve(int testNumber) {
|
|
int n = in.nextInt();
|
|
int m = in.nextInt();
|
|
|
|
List<Integer> a = new ArrayList<>();
|
|
for (int i = 0; i < n; i++) {
|
|
int e = in.nextInt();
|
|
if (e > 0) {
|
|
a.add(e);
|
|
}
|
|
}
|
|
Collections.sort(a);
|
|
|
|
List<Integer> b = new ArrayList<>();
|
|
for (int i = 0; i < m; i++) {
|
|
int e = in.nextInt();
|
|
if (e > 0) {
|
|
b.add(e);
|
|
}
|
|
}
|
|
Collections.sort(b);
|
|
|
|
if (a.equals(b)) {
|
|
out.println("Bob");
|
|
} else {
|
|
out.println("Alice");
|
|
}
|
|
}
|
|
}
|