結果

問題 No.24 数当てゲーム
ユーザー _matumo__matumo_
提出日時 2018-07-25 19:32:52
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 64 ms / 5,000 ms
コード長 955 bytes
コンパイル時間 2,224 ms
コンパイル使用メモリ 104,508 KB
実行使用メモリ 23,692 KB
最終ジャッジ日時 2023-09-09 05:18:45
合計ジャッジ時間 3,527 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
21,608 KB
testcase_01 AC 63 ms
21,608 KB
testcase_02 AC 63 ms
21,720 KB
testcase_03 AC 64 ms
23,692 KB
testcase_04 AC 62 ms
21,604 KB
testcase_05 AC 62 ms
21,768 KB
testcase_06 AC 62 ms
21,624 KB
testcase_07 AC 62 ms
21,808 KB
testcase_08 AC 62 ms
21,772 KB
testcase_09 AC 62 ms
21,548 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace YukiCoder
{
    class Program
    {
        static void Main(string[] args)
        {


            int N = int.Parse(Console.ReadLine());
            bool[] bN = new bool[10];

            for (int i = 0; i < N; i++)
            {
                bool[] bY = new bool[10];
                var vs = Console.ReadLine().Split().ToList();
                var vn = vs.Take(4).Select(int.Parse).ToList();
                if (vs[4] == "YES")
                {
                    vn.ForEach(n => bY[n] = true);
                    for (int j = 0; j < 10; j++)
                    {
                        if (!bY[j]) bN[j] = true;
                    }
                }
                else vn.ForEach(n => bN[n] = true);
            }
            for (int i = 0; i < 10; i++) if (!bN[i]) Console.WriteLine(i);
            //Console.ReadLine();
        }
    }
}
0