結果

問題 No.182 新規性の虜
ユーザー huffman56huffman56
提出日時 2022-10-30 12:06:42
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 144 ms / 5,000 ms
コード長 727 bytes
コンパイル時間 3,766 ms
コンパイル使用メモリ 102,000 KB
実行使用メモリ 35,476 KB
最終ジャッジ日時 2023-09-21 10:50:15
合計ジャッジ時間 6,991 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
21,676 KB
testcase_01 AC 67 ms
21,720 KB
testcase_02 AC 67 ms
21,824 KB
testcase_03 AC 68 ms
23,724 KB
testcase_04 AC 67 ms
21,728 KB
testcase_05 AC 68 ms
21,672 KB
testcase_06 AC 69 ms
21,672 KB
testcase_07 AC 69 ms
21,688 KB
testcase_08 AC 117 ms
31,052 KB
testcase_09 AC 144 ms
35,476 KB
testcase_10 AC 133 ms
30,944 KB
testcase_11 AC 123 ms
31,568 KB
testcase_12 AC 96 ms
24,196 KB
testcase_13 AC 69 ms
19,680 KB
testcase_14 AC 69 ms
21,660 KB
testcase_15 AC 64 ms
19,576 KB
testcase_16 AC 67 ms
21,676 KB
testcase_17 AC 67 ms
21,696 KB
testcase_18 AC 120 ms
27,440 KB
testcase_19 AC 107 ms
24,044 KB
testcase_20 AC 94 ms
23,224 KB
testcase_21 AC 124 ms
27,776 KB
testcase_22 AC 101 ms
23,840 KB
testcase_23 AC 64 ms
21,728 KB
testcase_24 AC 127 ms
33,032 KB
testcase_25 AC 115 ms
26,488 KB
testcase_26 AC 84 ms
22,864 KB
testcase_27 AC 70 ms
21,604 KB
evil01.txt AC 139 ms
34,584 KB
evil02.txt AC 138 ms
37,480 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;

namespace SortItems
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = int.Parse(Console.ReadLine());
            var nums = Console.ReadLine().Split().Select(int.Parse).ToArray();
            Array.Sort(nums);
            var d = new Dictionary<int, int>();

            for (var i = 0; i < n; i++)
            {
                if (d.ContainsKey(nums[i]))
                {
                    d[nums[i]]++;
                }
                else
                {
                    d[nums[i]] = 1;
                }
            }

            Console.WriteLine(d.Count(x => x.Value == 1));

        }
    }
}
0