結果
| 問題 | No.182 新規性の虜 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-10-30 12:06:42 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 64 ms / 5,000 ms |
| + 410µs | |
| コード長 | 727 bytes |
| 記録 | |
| コンパイル時間 | 494 ms |
| コンパイル使用メモリ | 108,032 KB |
| 実行使用メモリ | 32,896 KB |
| 最終ジャッジ日時 | 2026-08-10 18:57:24 |
| 合計ジャッジ時間 | 3,550 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_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));
}
}
}