結果

問題 No.24 数当てゲーム
ユーザー curryudon08curryudon08
提出日時 2020-06-22 17:26:51
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 63 ms / 5,000 ms
コード長 635 bytes
コンパイル時間 2,182 ms
コンパイル使用メモリ 102,528 KB
実行使用メモリ 23,712 KB
最終ジャッジ日時 2023-09-16 19:16:07
合計ジャッジ時間 3,529 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
21,680 KB
testcase_01 AC 61 ms
23,712 KB
testcase_02 AC 63 ms
21,708 KB
testcase_03 AC 62 ms
23,704 KB
testcase_04 AC 61 ms
19,736 KB
testcase_05 AC 63 ms
21,748 KB
testcase_06 AC 62 ms
21,704 KB
testcase_07 AC 62 ms
21,788 KB
testcase_08 AC 62 ms
21,640 KB
testcase_09 AC 63 ms
21,840 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.Linq;

namespace _0024
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = int.Parse(Console.ReadLine());

            var l = Enumerable.Range(0,10);
            for(var i = 0; i < n; i++){
                var t = Console.ReadLine().Split();
                var r = t[4];
                var s = t.Take(4).Select(x => int.Parse(x));
                if(r.Equals("YES")){
                    l = s.Intersect(l);
                }else{
                    l = l.Except(s);
                }
            }

            Console.WriteLine(l.First());
        }
    }
}
0