結果
| 問題 | No.182 新規性の虜 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-10-30 12:06:42 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 66 ms / 5,000 ms |
| コード長 | 727 bytes |
| 記録 | |
| コンパイル時間 | 1,768 ms |
| コンパイル使用メモリ | 107,312 KB |
| 実行使用メモリ | 33,024 KB |
| 最終ジャッジ日時 | 2026-03-28 19:28:39 |
| 合計ジャッジ時間 | 3,476 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Collections.Generic;
using System.Linq;
namespace SortItems
{
class Program
{
static void Main(string[] args)
{
var n = int.Parse(Console.ReadLine());
var nums = Console.ReadLine().Split().Select(int.Parse).ToArray();
Array.Sort(nums);
var d = new Dictionary<int, int>();
for (var i = 0; i < n; i++)
{
if (d.ContainsKey(nums[i]))
{
d[nums[i]]++;
}
else
{
d[nums[i]] = 1;
}
}
Console.WriteLine(d.Count(x => x.Value == 1));
}
}
}