結果

問題 No.182 新規性の虜
ユーザー kichirb3
提出日時 2018-03-02 00:35:06
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 58 ms / 5,000 ms
コード長 439 bytes
コンパイル時間 729 ms
コンパイル使用メモリ 77,568 KB
実行使用メモリ 7,944 KB
最終ジャッジ日時 2024-12-26 06:30:43
合計ジャッジ時間 2,902 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

// No.182 新規性の虜
// https://yukicoder.me/problems/no/182
//
#include <iostream>
#include <unordered_map>
using namespace std;

int main() {
    int N;
    cin >> N;

    unordered_map<int, int> numbers;
    for (auto i = 0; i < N; ++i) {
        int tmp;
        cin >> tmp;
        numbers[tmp]++;
    }

    int ans = 0;
    for (auto n: numbers) {
        if (n.second == 1)
            ++ans;
    }
    cout << ans << endl;
}
0