結果

問題 No.182 新規性の虜
ユーザー oooooba
提出日時 2021-01-23 19:45:28
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 58 ms / 5,000 ms
コード長 556 bytes
コンパイル時間 977 ms
コンパイル使用メモリ 108,392 KB
最終ジャッジ日時 2025-01-18 07:38:24
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <array>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <numeric>
#include <optional>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <vector>

using namespace std;

int main() {
    unordered_map<int32_t, int32_t> mp;
    int32_t n;
    cin >> n;
    for (auto i = 0; i < n; ++i) {
        int32_t a;
        cin >> a;
        ++mp[a];
    }
    int32_t ans = 0;
    for (auto &p : mp) {
        if (p.second == 1)
            ++ans;
    }
    cout << ans << endl;
    return 0;
}
0