結果

問題 No.182 新規性の虜
ユーザー gemy
提出日時 2023-11-23 17:44:32
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 74 ms / 5,000 ms
コード長 375 bytes
コンパイル時間 1,990 ms
コンパイル使用メモリ 201,448 KB
最終ジャッジ日時 2025-02-17 23:27:46
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
int main() {
    // Input
    int N;
    cin >> N;
    vector<int> A(N);
    rep(i, N) cin >> A[i];

    // Count
    map<int, int> cnt;
    rep(i, N) ++cnt[A[i]];

    // Output
    int ans = 0;
    for (const auto& [i, n] : cnt) if (n == 1) ++ans;
    cout << ans << endl;
}
0