結果

問題 No.182 新規性の虜
コンテスト
ユーザー @abcde
提出日時 2019-02-08 20:07:15
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 58 ms / 5,000 ms
コード長 413 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 920 ms
コンパイル使用メモリ 185,868 KB
実行使用メモリ 9,728 KB
最終ジャッジ日時 2026-03-17 15:45:18
合計ジャッジ時間 2,752 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
using namespace std;
typedef long long LL;

int main() {
    
    // 1. 入力情報取得.
    int N;
    cin >> N;
    map<LL, int> m;
    for(int i = 0; i < N; i++){
        LL a;
        cin >> a;
        m[a]++;
    }
    
    // 2. 新規性は?
    int ans = 0;
    for(auto &p : m) if(p.second == 1) ans++;
    
    // 3. 後処理.
    cout << ans << endl;
    return 0;
    
}
0