結果

問題 No.182 新規性の虜
ユーザー NoNo
提出日時 2015-06-09 15:02:52
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 106 ms / 5,000 ms
コード長 1,453 bytes
コンパイル時間 4,435 ms
コンパイル使用メモリ 106,172 KB
実行使用メモリ 36,784 KB
最終ジャッジ日時 2023-08-27 07:20:47
合計ジャッジ時間 6,877 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
20,552 KB
testcase_01 AC 56 ms
20,672 KB
testcase_02 AC 53 ms
22,724 KB
testcase_03 AC 51 ms
20,624 KB
testcase_04 AC 54 ms
20,632 KB
testcase_05 AC 53 ms
20,760 KB
testcase_06 AC 54 ms
22,692 KB
testcase_07 AC 54 ms
18,508 KB
testcase_08 AC 82 ms
28,748 KB
testcase_09 AC 99 ms
36,784 KB
testcase_10 AC 92 ms
30,860 KB
testcase_11 AC 88 ms
27,308 KB
testcase_12 AC 72 ms
23,812 KB
testcase_13 AC 54 ms
20,776 KB
testcase_14 AC 54 ms
18,628 KB
testcase_15 AC 52 ms
22,576 KB
testcase_16 AC 54 ms
22,556 KB
testcase_17 AC 53 ms
20,588 KB
testcase_18 AC 85 ms
29,452 KB
testcase_19 AC 80 ms
26,284 KB
testcase_20 AC 74 ms
25,076 KB
testcase_21 AC 90 ms
30,424 KB
testcase_22 AC 76 ms
23,392 KB
testcase_23 AC 57 ms
20,696 KB
testcase_24 AC 106 ms
33,804 KB
testcase_25 AC 82 ms
26,912 KB
testcase_26 AC 64 ms
21,840 KB
testcase_27 AC 55 ms
20,740 KB
evil01.txt AC 106 ms
37,092 KB
evil02.txt AC 106 ms
38,228 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;
using System.Text;
using System.Threading.Tasks;

namespace foryuki
{
    class Program
    {
        static void Main(string[] args)
        {
            int N = int.Parse(Console.ReadLine());
            string[] s = Console.ReadLine().Split();
            var dic = new Dictionary<string, string>();
            var li = new List<string>();

            for (int i = 0; i < N; i++)
            {
                if (dic.ContainsKey(s[i]))
                {
                    li.Add(s[i]);
                }
                else
                {
                    dic.Add(s[i], s[i]);
                }
            }

            foreach (var item in li)
            {
                dic.Remove(item);
            }

            Console.WriteLine(dic.Count);
        }


        //-------------------------------------------------------------

        static int[] ConvertStringArrayToIntArray(string[] str)
        {
            int[] b = Array.ConvertAll<string, int>(str, delegate(string value)
                {
                    return int.Parse(value);
                });
            return b;
        }

        static List<int> ConvertStringArrayToIntList(string[] str)
        {
            var list = new List<int>();
            foreach (var c in str)
            {
                list.Add(int.Parse(c));
            }
            return list;
        }
    }
}
0