結果

問題 No.182 新規性の虜
ユーザー YSRKEN
提出日時 2016-01-16 23:18:13
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 27 ms / 5,000 ms
コード長 397 bytes
コンパイル時間 628 ms
コンパイル使用メモリ 68,884 KB
実行使用メモリ 7,840 KB
最終ジャッジ日時 2024-12-26 20:07:03
合計ジャッジ時間 2,016 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <unordered_map>
using namespace std;
int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    unordered_map<int, int> hash;
    for(int i = 0; i < n; ++i){
        int temp;
        cin >> temp;
        ++hash[temp];
    }
    int sum = 0;
    for(auto &data : hash){
        sum += (data.second == 1);
    }
    cout << sum << endl;
}
0