結果

問題 No.182 新規性の虜
ユーザー kmtrc130kmtrc130
提出日時 2017-05-17 13:34:32
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 1,795 ms / 5,000 ms
コード長 676 bytes
コンパイル時間 3,026 ms
コンパイル使用メモリ 102,456 KB
実行使用メモリ 37,116 KB
最終ジャッジ日時 2023-08-27 15:12:15
合計ジャッジ時間 20,704 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
23,376 KB
testcase_01 AC 75 ms
21,352 KB
testcase_02 AC 77 ms
25,400 KB
testcase_03 AC 77 ms
25,256 KB
testcase_04 AC 76 ms
21,324 KB
testcase_05 AC 76 ms
23,368 KB
testcase_06 AC 79 ms
25,348 KB
testcase_07 AC 77 ms
23,268 KB
testcase_08 AC 949 ms
30,944 KB
testcase_09 AC 1,562 ms
35,548 KB
testcase_10 AC 1,370 ms
32,996 KB
testcase_11 AC 1,091 ms
31,700 KB
testcase_12 AC 463 ms
28,172 KB
testcase_13 AC 80 ms
25,268 KB
testcase_14 AC 79 ms
23,376 KB
testcase_15 AC 58 ms
24,432 KB
testcase_16 AC 78 ms
23,480 KB
testcase_17 AC 80 ms
23,488 KB
testcase_18 AC 1,179 ms
28,768 KB
testcase_19 AC 846 ms
27,600 KB
testcase_20 AC 516 ms
26,608 KB
testcase_21 AC 1,316 ms
31,264 KB
testcase_22 AC 650 ms
25,192 KB
testcase_23 AC 58 ms
22,444 KB
testcase_24 AC 1,795 ms
37,116 KB
testcase_25 AC 647 ms
28,460 KB
testcase_26 AC 233 ms
24,496 KB
testcase_27 AC 75 ms
21,376 KB
evil01.txt AC 1,782 ms
37,660 KB
evil02.txt AC 1,805 ms
37,592 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)
    {
        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());
    }
}
0