結果

問題 No.182 新規性の虜
ユーザー りあんりあん
提出日時 2015-04-17 21:42:48
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 115 ms / 5,000 ms
コード長 1,872 bytes
コンパイル時間 2,953 ms
コンパイル使用メモリ 106,836 KB
実行使用メモリ 33,468 KB
最終ジャッジ日時 2023-08-27 07:13:13
合計ジャッジ時間 6,893 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
22,548 KB
testcase_01 AC 63 ms
22,568 KB
testcase_02 AC 65 ms
22,680 KB
testcase_03 AC 64 ms
22,496 KB
testcase_04 AC 65 ms
24,552 KB
testcase_05 AC 65 ms
24,620 KB
testcase_06 AC 64 ms
22,656 KB
testcase_07 AC 65 ms
22,588 KB
testcase_08 AC 100 ms
29,712 KB
testcase_09 AC 115 ms
33,468 KB
testcase_10 AC 109 ms
31,300 KB
testcase_11 AC 102 ms
30,076 KB
testcase_12 AC 85 ms
24,840 KB
testcase_13 AC 65 ms
22,784 KB
testcase_14 AC 64 ms
22,644 KB
testcase_15 AC 63 ms
20,504 KB
testcase_16 AC 65 ms
24,644 KB
testcase_17 AC 65 ms
22,524 KB
testcase_18 AC 100 ms
28,600 KB
testcase_19 AC 94 ms
25,384 KB
testcase_20 AC 84 ms
24,220 KB
testcase_21 AC 103 ms
29,012 KB
testcase_22 AC 87 ms
25,044 KB
testcase_23 AC 63 ms
22,596 KB
testcase_24 AC 112 ms
32,840 KB
testcase_25 AC 98 ms
29,188 KB
testcase_26 AC 78 ms
21,640 KB
testcase_27 AC 64 ms
22,604 KB
evil01.txt AC 121 ms
36,440 KB
evil02.txt AC 119 ms
34,432 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.IO;
using System.Text;

namespace Solver
{
    class Program
    {
        const int M = 1000000007;
        static void Main()
        {
            var sw = new System.IO.StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
            Scan sc = new Scan();
            var set = new HashSet<int>();
            var s = new HashSet<int>();
            int n = sc.Int();
            int[] a = sc.IntArray();

            foreach (int i in a)
                if (!set.Add(i))
                    s.Add(i);

            sw.WriteLine(set.Count - s.Count);
            sw.Flush();
        }
    }

    class Scan
    {
        public int Int()
        {
            return int.Parse(Console.ReadLine().Trim());
        }
        public long Long()
        {
            return long.Parse(Console.ReadLine().Trim());
        }
        public string Str()
        {
            return Console.ReadLine().Trim();
        }

        public int[] IntArray()
        {
            return Console.ReadLine().Trim().Split().Select(int.Parse).ToArray();
        }
        public void IntTwi(out int a, out int b)
        {
            int[] arr = IntArray();
            a = arr[0];
            b = arr[1];
        }
        public void LongTwi(out long a, out long b)
        {
            long[] arr = LongArray();
            a = arr[0];
            b = arr[1];
        }
        public void StrTwi(out string a, out string b)
        {
            string[] arr = StrArray();
            a = arr[0];
            b = arr[1];
        }

        public long[] LongArray()
        {
            return Console.ReadLine().Trim().Split().Select(long.Parse).ToArray();
        }
        public string[] StrArray()
        {
            return Console.ReadLine().Trim().Split();
        }
    }
}
0