結果

問題 No.182 新規性の虜
ユーザー CroweaCrowea
提出日時 2019-01-29 16:59:11
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 72 ms / 5,000 ms
コード長 699 bytes
コンパイル時間 968 ms
コンパイル使用メモリ 113,116 KB
実行使用メモリ 39,128 KB
最終ジャッジ日時 2024-04-19 02:49:04
合計ジャッジ時間 3,297 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
25,308 KB
testcase_01 AC 29 ms
25,180 KB
testcase_02 AC 31 ms
25,312 KB
testcase_03 AC 32 ms
25,392 KB
testcase_04 AC 29 ms
25,436 KB
testcase_05 AC 30 ms
25,520 KB
testcase_06 AC 29 ms
25,356 KB
testcase_07 AC 29 ms
27,524 KB
testcase_08 AC 56 ms
34,652 KB
testcase_09 AC 72 ms
39,128 KB
testcase_10 AC 64 ms
34,292 KB
testcase_11 AC 60 ms
35,216 KB
testcase_12 AC 45 ms
27,740 KB
testcase_13 AC 30 ms
25,348 KB
testcase_14 AC 30 ms
27,400 KB
testcase_15 AC 29 ms
23,472 KB
testcase_16 AC 29 ms
27,272 KB
testcase_17 AC 29 ms
25,560 KB
testcase_18 AC 57 ms
32,912 KB
testcase_19 AC 51 ms
27,608 KB
testcase_20 AC 45 ms
26,928 KB
testcase_21 AC 62 ms
31,180 KB
testcase_22 AC 49 ms
27,888 KB
testcase_23 AC 29 ms
25,476 KB
testcase_24 AC 69 ms
38,720 KB
testcase_25 AC 60 ms
27,712 KB
testcase_26 AC 39 ms
26,532 KB
testcase_27 AC 29 ms
23,344 KB
evil01.txt AC 74 ms
38,268 KB
evil02.txt AC 74 ms
40,072 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 void Main(string[] args)
    {
        var N = int.Parse(Console.ReadLine());
        var arr = Console.ReadLine().Split(' ')
                                      .Select(x => int.Parse(x))
                                      .ToArray();
        var map = new Dictionary<int, int>();
        for (int i = 0; i < N; i++)
        {
            if  (map.ContainsKey(arr[i])) map[arr[i]]++;
            else map.Add(arr[i], 1);
        }

        int novelty = 0;
        foreach (var data in map)
        {
            if (data.Value == 1) novelty++;
        }
        Console.WriteLine(novelty);
    }
}
0