結果
| 問題 |
No.601 Midpoint Erase
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-10-21 13:26:54 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 860 ms / 2,000 ms |
| コード長 | 580 bytes |
| コンパイル時間 | 2,073 ms |
| コンパイル使用メモリ | 75,328 KB |
| 実行使用メモリ | 65,852 KB |
| 最終ジャッジ日時 | 2024-11-19 03:22:49 |
| 合計ジャッジ時間 | 12,075 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 |
ソースコード
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt(), x, y, sum = 0, tmp[] = new int[4];
for (int i = 0; i < N; ++i) {
x = sc.nextInt();
y = sc.nextInt();
if (x % 2 == 0 && y % 2 == 0) ++tmp[0];
else if (x % 2 == 0 && y % 2 == 1) ++tmp[1];
else if (x % 2 == 1 && y % 2 == 0) ++tmp[2];
else ++tmp[3];
}
sc.close();
for (int i = 0; i < 4; ++i) sum += tmp[i] / 2;
if (sum % 2 == 0) System.out.print("Bob");
else System.out.print("Alice");
}
}