結果

問題 No.601 Midpoint Erase
ユーザー bluemeganebluemegane
提出日時 2018-10-09 11:35:21
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 800 bytes
コンパイル時間 2,085 ms
コンパイル使用メモリ 103,936 KB
実行使用メモリ 22,016 KB
最終ジャッジ日時 2024-04-20 19:03:51
合計ジャッジ時間 4,116 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 20 ms
17,792 KB
testcase_01 AC 21 ms
17,664 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 80 ms
21,760 KB
testcase_05 AC 62 ms
21,632 KB
testcase_06 AC 46 ms
21,888 KB
testcase_07 AC 81 ms
21,888 KB
testcase_08 AC 72 ms
21,888 KB
testcase_09 WA -
testcase_10 AC 36 ms
20,608 KB
testcase_11 AC 100 ms
21,888 KB
testcase_12 WA -
testcase_13 AC 23 ms
17,536 KB
testcase_14 AC 24 ms
17,792 KB
testcase_15 AC 22 ms
17,664 KB
testcase_16 AC 22 ms
17,920 KB
testcase_17 AC 21 ms
17,664 KB
testcase_18 AC 20 ms
17,664 KB
testcase_19 AC 21 ms
17,664 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 21 ms
17,664 KB
testcase_23 AC 20 ms
17,664 KB
testcase_24 AC 21 ms
17,792 KB
testcase_25 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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