結果

問題 No.182 新規性の虜
ユーザー swdamdrswdamdr
提出日時 2017-01-25 15:20:25
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 1,174 ms / 5,000 ms
コード長 622 bytes
コンパイル時間 2,105 ms
コンパイル使用メモリ 104,096 KB
実行使用メモリ 37,720 KB
最終ジャッジ日時 2023-08-27 14:18:52
合計ジャッジ時間 10,958 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
22,616 KB
testcase_01 AC 57 ms
24,528 KB
testcase_02 AC 59 ms
22,496 KB
testcase_03 AC 57 ms
22,540 KB
testcase_04 AC 57 ms
24,412 KB
testcase_05 AC 60 ms
22,548 KB
testcase_06 AC 57 ms
22,388 KB
testcase_07 AC 58 ms
22,412 KB
testcase_08 AC 83 ms
30,688 KB
testcase_09 AC 99 ms
37,720 KB
testcase_10 AC 93 ms
35,292 KB
testcase_11 AC 89 ms
33,276 KB
testcase_12 AC 75 ms
27,632 KB
testcase_13 AC 57 ms
20,464 KB
testcase_14 AC 59 ms
22,412 KB
testcase_15 AC 57 ms
22,404 KB
testcase_16 AC 57 ms
24,408 KB
testcase_17 AC 58 ms
22,548 KB
testcase_18 AC 1,136 ms
27,940 KB
testcase_19 AC 1,097 ms
26,824 KB
testcase_20 AC 875 ms
24,040 KB
testcase_21 AC 1,174 ms
30,244 KB
testcase_22 AC 1,025 ms
26,676 KB
testcase_23 AC 56 ms
22,504 KB
testcase_24 AC 100 ms
35,152 KB
testcase_25 AC 83 ms
24,784 KB
testcase_26 AC 68 ms
23,776 KB
testcase_27 AC 56 ms
22,420 KB
evil01.txt AC 103 ms
37,656 KB
evil02.txt AC 106 ms
38,820 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.Linq;
using System.Collections.Generic;

class Program
{
    static void Main(string[] args)
    {
        int n = int.Parse(Console.ReadLine());
        string[] s = Console.ReadLine().Split();
        List<string> lst = new List<string>();
        HashSet<string> hs = new HashSet<string>();

        for (int i = 0; i < n; i++)
        {
            if (hs.Add(s[i]))
            {
                lst.Add(s[i]);
            }
            else
            {
                lst.Remove(s[i]);
            }
        }

        Console.WriteLine(lst.Count);
        Console.ReadLine();
    }
}

0