結果

問題 No.601 Midpoint Erase
ユーザー fal_rndfal_rnd
提出日時 2017-12-01 00:04:53
言語 Java21
(openjdk 21)
結果
AC  
実行時間 785 ms / 2,000 ms
コード長 418 bytes
コンパイル時間 3,508 ms
コンパイル使用メモリ 74,528 KB
実行使用メモリ 64,576 KB
最終ジャッジ日時 2023-08-24 18:31:25
合計ジャッジ時間 12,734 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
55,888 KB
testcase_01 AC 145 ms
55,720 KB
testcase_02 AC 130 ms
55,464 KB
testcase_03 AC 619 ms
62,180 KB
testcase_04 AC 663 ms
63,796 KB
testcase_05 AC 592 ms
58,596 KB
testcase_06 AC 464 ms
60,608 KB
testcase_07 AC 640 ms
62,976 KB
testcase_08 AC 600 ms
61,452 KB
testcase_09 AC 653 ms
62,800 KB
testcase_10 AC 405 ms
60,684 KB
testcase_11 AC 785 ms
64,576 KB
testcase_12 AC 573 ms
60,408 KB
testcase_13 AC 129 ms
55,796 KB
testcase_14 AC 127 ms
55,800 KB
testcase_15 AC 130 ms
55,468 KB
testcase_16 AC 136 ms
56,040 KB
testcase_17 AC 127 ms
55,720 KB
testcase_18 AC 145 ms
55,824 KB
testcase_19 AC 146 ms
55,704 KB
testcase_20 AC 140 ms
54,052 KB
testcase_21 AC 137 ms
55,788 KB
testcase_22 AC 145 ms
55,796 KB
testcase_23 AC 136 ms
55,708 KB
testcase_24 AC 134 ms
55,720 KB
testcase_25 AC 140 ms
55,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.Scanner;

public class Main{
	static Scanner s=new Scanner(System.in);
	static int gInt(){
		return s.nextInt();
	}
	public static void main(String[]$){
		int n=gInt();
		int[]c=new int[4];
		for(int i=0;i<n;++i) {
			int x=gInt(),y=gInt();
			x=x%2*2;
			y=y%2;
			++c[x+y];
		}
		int sum=Arrays.stream(c).map(i->i/2).sum();
		System.out.println(sum%2==0?"Bob":"Alice");
	}
}
0