結果

問題 No.601 Midpoint Erase
ユーザー uafr_csuafr_cs
提出日時 2017-12-01 22:39:08
言語 Java21
(openjdk 21)
結果
AC  
実行時間 758 ms / 2,000 ms
コード長 565 bytes
コンパイル時間 3,182 ms
コンパイル使用メモリ 71,980 KB
実行使用メモリ 64,844 KB
最終ジャッジ日時 2023-08-24 18:41:52
合計ジャッジ時間 12,305 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
56,036 KB
testcase_01 AC 137 ms
55,520 KB
testcase_02 AC 124 ms
55,960 KB
testcase_03 AC 592 ms
61,816 KB
testcase_04 AC 617 ms
62,880 KB
testcase_05 AC 542 ms
60,804 KB
testcase_06 AC 450 ms
60,704 KB
testcase_07 AC 614 ms
62,640 KB
testcase_08 AC 582 ms
61,180 KB
testcase_09 AC 625 ms
62,572 KB
testcase_10 AC 393 ms
60,892 KB
testcase_11 AC 758 ms
64,844 KB
testcase_12 AC 564 ms
60,600 KB
testcase_13 AC 123 ms
55,520 KB
testcase_14 AC 122 ms
55,864 KB
testcase_15 AC 124 ms
55,796 KB
testcase_16 AC 130 ms
56,156 KB
testcase_17 AC 123 ms
55,820 KB
testcase_18 AC 137 ms
55,748 KB
testcase_19 AC 137 ms
55,996 KB
testcase_20 AC 131 ms
55,928 KB
testcase_21 AC 132 ms
55,504 KB
testcase_22 AC 135 ms
55,552 KB
testcase_23 AC 125 ms
55,996 KB
testcase_24 AC 127 ms
55,664 KB
testcase_25 AC 130 ms
55,868 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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