結果

問題 No.601 Midpoint Erase
コンテスト
ユーザー uafr_cs
提出日時 2017-12-01 22:39:08
言語 Java
(openjdk 27 + ACL)
コンパイル:
javac -J-Duser.language=en -encoding UTF8 -cp /opt/aclib/ac_library.jar _filename_
実行:
java -ea -Xmx700m -Xss256M -DONLINE_JUDGE=true -cp .:/opt/aclib/ac_library.jar _class_
結果
AC  
実行時間 505 ms / 2,000 ms
+ 77µs
コード長 565 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,598 ms
コンパイル使用メモリ 86,076 KB
実行使用メモリ 55,756 KB
最終ジャッジ日時 2026-10-06 08:07:46
合計ジャッジ時間 9,134 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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");
		
	}
}
0