結果

問題 No.601 Midpoint Erase
ユーザー 夕叢霧香(ゆうむらきりか)夕叢霧香(ゆうむらきりか)
提出日時 2017-12-01 00:03:29
言語 Java21
(openjdk 21)
結果
AC  
実行時間 265 ms / 2,000 ms
コード長 1,756 bytes
コンパイル時間 2,533 ms
コンパイル使用メモリ 74,196 KB
実行使用メモリ 57,988 KB
最終ジャッジ日時 2023-08-24 18:30:39
合計ジャッジ時間 6,047 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
50,060 KB
testcase_01 AC 45 ms
49,620 KB
testcase_02 AC 44 ms
49,472 KB
testcase_03 AC 231 ms
57,716 KB
testcase_04 AC 235 ms
56,652 KB
testcase_05 AC 200 ms
55,776 KB
testcase_06 AC 164 ms
55,100 KB
testcase_07 AC 236 ms
57,356 KB
testcase_08 AC 219 ms
56,604 KB
testcase_09 AC 238 ms
57,544 KB
testcase_10 AC 142 ms
55,340 KB
testcase_11 AC 265 ms
57,988 KB
testcase_12 AC 194 ms
55,416 KB
testcase_13 AC 44 ms
49,704 KB
testcase_14 AC 43 ms
49,600 KB
testcase_15 AC 44 ms
49,536 KB
testcase_16 AC 45 ms
49,452 KB
testcase_17 AC 43 ms
49,500 KB
testcase_18 AC 46 ms
49,588 KB
testcase_19 AC 48 ms
49,832 KB
testcase_20 AC 45 ms
49,380 KB
testcase_21 AC 45 ms
49,468 KB
testcase_22 AC 45 ms
49,540 KB
testcase_23 AC 44 ms
49,448 KB
testcase_24 AC 44 ms
49,424 KB
testcase_25 AC 45 ms
49,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;


class Main {
    public static void main(String[] args) {
        MyScanner sc = new MyScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out));
        int[][]c=new int[2][2];
        int n=sc.nextInt();
        for(int i=0;i<n;++i){
            int x=sc.nextInt();
            int y=sc.nextInt();
            c[x%2][y%2]++;
        }
        int t=c[0][0]/2+c[0][1]/2+c[1][0]/2+c[1][1]/2;
        out.println(t%2==0?"Bob":"Alice");
        out.close();
    }
    // http://codeforces.com/blog/entry/7018
    //-----------PrintWriter for faster output---------------------------------
    public static PrintWriter out;
    //-----------MyScanner class for faster input----------
    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;
        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
        int nextInt() {
            return Integer.parseInt(next());
        }
        long nextLong() {
            return Long.parseLong(next());
        }
        double nextDouble() {
            return Double.parseDouble(next());
        }
        String nextLine(){
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}
0