結果
| 問題 |
No.601 Midpoint Erase
|
| コンテスト | |
| ユーザー |
htensai
|
| 提出日時 | 2019-11-14 11:41:44 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 851 ms / 2,000 ms |
| コード長 | 747 bytes |
| コンパイル時間 | 2,151 ms |
| コンパイル使用メモリ | 73,792 KB |
| 実行使用メモリ | 56,180 KB |
| 最終ジャッジ日時 | 2024-09-21 21:22:35 |
| 合計ジャッジ時間 | 13,441 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 |
ソースコード
import java.util.*;
public class Main {
public static void main (String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int typeEE = 0;
int typeEO = 0;
int typeOE = 0;
int typeOO = 0;
for (int i = 0; i < n; i++) {
int x =sc.nextInt();
int y =sc.nextInt();
if (x % 2 == 0) {
if (y % 2 == 0) {
typeEE++;
} else {
typeEO++;
}
} else {
if (y % 2 == 0) {
typeOE++;
} else {
typeOO++;
}
}
}
int count = typeEE /2 + typeEO / 2 + typeOE / 2 + typeOO / 2;
if (count % 2 == 0) {
System.out.println("Bob");
} else {
System.out.println("Alice");
}
}
}
htensai