結果

問題 No.601 Midpoint Erase
ユーザー tentententen
提出日時 2020-10-14 09:13:12
言語 Java21
(openjdk 21)
結果
AC  
実行時間 783 ms / 2,000 ms
コード長 487 bytes
コンパイル時間 4,335 ms
コンパイル使用メモリ 76,448 KB
実行使用メモリ 64,524 KB
最終ジャッジ日時 2023-09-28 00:30:12
合計ジャッジ時間 13,753 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
55,536 KB
testcase_01 AC 139 ms
55,960 KB
testcase_02 AC 123 ms
55,792 KB
testcase_03 AC 618 ms
62,068 KB
testcase_04 AC 652 ms
62,656 KB
testcase_05 AC 580 ms
60,260 KB
testcase_06 AC 462 ms
60,244 KB
testcase_07 AC 635 ms
62,828 KB
testcase_08 AC 600 ms
60,844 KB
testcase_09 AC 665 ms
62,888 KB
testcase_10 AC 404 ms
60,544 KB
testcase_11 AC 783 ms
64,524 KB
testcase_12 AC 578 ms
60,732 KB
testcase_13 AC 123 ms
55,640 KB
testcase_14 AC 123 ms
56,012 KB
testcase_15 AC 125 ms
55,600 KB
testcase_16 AC 129 ms
55,616 KB
testcase_17 AC 121 ms
55,768 KB
testcase_18 AC 142 ms
56,012 KB
testcase_19 AC 140 ms
55,900 KB
testcase_20 AC 134 ms
55,908 KB
testcase_21 AC 134 ms
56,160 KB
testcase_22 AC 144 ms
55,756 KB
testcase_23 AC 127 ms
55,916 KB
testcase_24 AC 131 ms
55,860 KB
testcase_25 AC 132 ms
55,564 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	public static void main (String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int n = sc.nextInt();
    	int[] counts = new int[4];
    	for (int i = 0; i < n; i++) {
    	    counts[sc.nextInt() % 2 + sc.nextInt() % 2 * 2]++;
    	}
    	int sum = 0;
    	for (int x : counts) {
    	    sum += x / 2;
    	}
    	if (sum % 2 == 0) {
    	    System.out.println("Bob");
    	} else {
    	    System.out.println("Alice");
    	}
	}
}
0