結果

問題 No.601 Midpoint Erase
ユーザー bluemegane
提出日時 2018-10-09 11:35:21
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 800 bytes
コンパイル時間 879 ms
コンパイル使用メモリ 104,064 KB
実行使用メモリ 22,144 KB
最終ジャッジ日時 2024-10-12 16:19:38
合計ジャッジ時間 3,111 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 16 WA * 7
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class Hello
{
    public static void Main()
    {
        var a = new int[4];
        var n = int.Parse(Console.ReadLine().Trim());
        for (int i = 0; i < n; i++)
        {
            string[] line = Console.ReadLine().Trim().Split(' ');
            var b = int.Parse(line[0]);
            var b2 = int.Parse(line[1]);
            if (b % 2 == 0 && 2 % 2 == 0) a[0]++;
            else if (b % 2 == 0 && 2 % 2 == 1) a[1]++;
            else if (b % 2 == 1 && 2 % 2 == 0) a[2]++;
            else if (b % 2 == 1 && 2 % 2 == 1) a[3]++;
        }
        Console.WriteLine(getAns(a));

    }
    public static string getAns (int[] a)
    {
        var p = 0;
        for (int i = 0; i < 4; i++)
            p += a[i] / 2;
        return p % 2 == 0 ? "Bob" : "Alice";
    }
}
0