結果

問題 No.182 新規性の虜
ユーザー 明智重蔵明智重蔵
提出日時 2015-09-12 10:59:31
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 136 ms / 5,000 ms
コード長 1,305 bytes
コンパイル時間 2,788 ms
コンパイル使用メモリ 107,204 KB
実行使用メモリ 43,904 KB
最終ジャッジ日時 2023-08-27 07:31:41
合計ジャッジ時間 6,802 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
21,948 KB
testcase_01 AC 64 ms
21,948 KB
testcase_02 AC 62 ms
21,820 KB
testcase_03 AC 60 ms
21,916 KB
testcase_04 AC 64 ms
21,816 KB
testcase_05 AC 65 ms
23,908 KB
testcase_06 AC 64 ms
23,848 KB
testcase_07 AC 65 ms
23,936 KB
testcase_08 AC 108 ms
34,368 KB
testcase_09 AC 136 ms
43,904 KB
testcase_10 AC 132 ms
41,328 KB
testcase_11 AC 110 ms
36,812 KB
testcase_12 AC 83 ms
25,936 KB
testcase_13 AC 65 ms
21,944 KB
testcase_14 AC 64 ms
21,892 KB
testcase_15 AC 64 ms
21,888 KB
testcase_16 AC 65 ms
21,812 KB
testcase_17 AC 65 ms
23,804 KB
testcase_18 AC 102 ms
32,776 KB
testcase_19 AC 95 ms
24,068 KB
testcase_20 AC 83 ms
25,176 KB
testcase_21 AC 110 ms
35,596 KB
testcase_22 AC 87 ms
26,012 KB
testcase_23 AC 62 ms
21,936 KB
testcase_24 AC 129 ms
43,040 KB
testcase_25 AC 94 ms
27,744 KB
testcase_26 AC 78 ms
22,996 KB
testcase_27 AC 65 ms
21,880 KB
evil01.txt AC 172 ms
49,944 KB
evil02.txt AC 157 ms
48,320 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;

class Program
{
    static string InputPattern = "Input4";

    static List<string> GetInputList()
    {
        var WillReturn = new List<string>();

        if (InputPattern == "Input1") {
            WillReturn.Add("5");
            WillReturn.Add("1 1 2 3 3");
            //1
            //新規性がありそうなものは2のみです。
        }
        else if (InputPattern == "Input2") {
            WillReturn.Add("6");
            WillReturn.Add("1 1 1 1 1 1");
            //0
            //全く新規性がなさそうなこともあります。
        }
        else if (InputPattern == "Input3") {
            WillReturn.Add("6");
            WillReturn.Add("1 2 3 4 5 6");
            //6
            //全て新規性がありそうなこともあります。
        }
        else {
            string wkStr;
            while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr);
        }
        return WillReturn;
    }

    static void Main()
    {
        List<string> InputList = GetInputList();
        int[] AArr = InputList[1].Split(' ').Select(X => int.Parse(X)).ToArray();

        var Tmp = AArr.GroupBy(X => X).Where(X => X.Count() == 1);
        Console.WriteLine(Tmp.Count());
    }
}
0