結果

問題 No.182 新規性の虜
ユーザー kmtrc130kmtrc130
提出日時 2019-03-18 15:35:21
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 1,882 ms / 5,000 ms
コード長 760 bytes
コンパイル時間 3,110 ms
コンパイル使用メモリ 102,452 KB
実行使用メモリ 35,920 KB
最終ジャッジ日時 2023-09-25 12:52:34
合計ジャッジ時間 23,274 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
23,376 KB
testcase_01 AC 86 ms
25,304 KB
testcase_02 AC 84 ms
23,372 KB
testcase_03 AC 82 ms
23,400 KB
testcase_04 AC 85 ms
25,292 KB
testcase_05 AC 83 ms
23,292 KB
testcase_06 AC 84 ms
25,452 KB
testcase_07 AC 84 ms
23,448 KB
testcase_08 AC 990 ms
30,912 KB
testcase_09 AC 1,661 ms
35,628 KB
testcase_10 AC 1,439 ms
35,040 KB
testcase_11 AC 1,145 ms
31,464 KB
testcase_12 AC 490 ms
26,156 KB
testcase_13 AC 84 ms
23,424 KB
testcase_14 AC 85 ms
23,348 KB
testcase_15 AC 64 ms
24,404 KB
testcase_16 AC 84 ms
23,288 KB
testcase_17 AC 85 ms
25,448 KB
testcase_18 AC 1,253 ms
28,768 KB
testcase_19 AC 904 ms
27,412 KB
testcase_20 AC 548 ms
24,636 KB
testcase_21 AC 1,413 ms
29,264 KB
testcase_22 AC 698 ms
25,184 KB
testcase_23 AC 61 ms
22,400 KB
testcase_24 AC 1,882 ms
35,920 KB
testcase_25 AC 685 ms
28,512 KB
testcase_26 AC 247 ms
24,548 KB
testcase_27 AC 86 ms
21,316 KB
evil01.txt AC 1,953 ms
36,720 KB
evil02.txt AC 1,892 ms
38,732 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
{
    public void Solve()
    {
        int N = int.Parse(Console.ReadLine());
        string[] A = Console.ReadLine().Split(' ');

        List<string> aList = new List<string>();
        aList.AddRange(A);
        aList.Sort();

        HashSet<string> hs = new HashSet<string>();
        string chk = "";

        for (int i = 0; i < N; i++)
        {
            if (chk != aList[i])
            {
                chk = aList[i];
                hs.Add(aList[i]);
            }
            else { hs.Remove(aList[i]); }
        }

        Console.WriteLine(hs.Count());
    }

    static void Main()
    {
        var solver = new Program();
        solver.Solve();
    }
}
0