結果
| 問題 | No.601 Midpoint Erase | 
| コンテスト | |
| ユーザー |  uafr_cs | 
| 提出日時 | 2017-12-01 22:39:08 | 
| 言語 | Java (openjdk 23) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 740 ms / 2,000 ms | 
| コード長 | 565 bytes | 
| コンパイル時間 | 2,251 ms | 
| コンパイル使用メモリ | 74,244 KB | 
| 実行使用メモリ | 53,652 KB | 
| 最終ジャッジ日時 | 2024-12-23 03:22:06 | 
| 合計ジャッジ時間 | 12,298 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 23 | 
ソースコード
import java.util.Arrays;
import java.util.LinkedList;
import java.util.Scanner;
public class Main {
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		final int N = sc.nextInt();
		
		long[][] count = new long[2][2];
		
		for(int i = 0; i < N; i++){
			final int x = sc.nextInt();
			final int y = sc.nextInt();
			
			count[y % 2][x % 2]++;
		}
		
		long all = 0;
		for(final long[] cs : count){
			for(final long c : cs){
				all += (c * (c - 1)) / 2;
			}
		}
		
		System.out.println(all % 2 == 0 ? "Bob" : "Alice");
		
	}
}
            
            
            
        