結果

問題 No.182 新規性の虜
ユーザー tadanoningen
提出日時 2020-09-16 06:38:42
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 364 bytes
コンパイル時間 670 ms
コンパイル使用メモリ 76,932 KB
実行使用メモリ 8,704 KB
最終ジャッジ日時 2024-06-22 03:02:46
合計ジャッジ時間 2,831 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<map>

using namespace std;

int main(){
    int n;
    cin >> n;
    int A[n];
    for(int i=0;i < n;i++) cin >> A[i];
    map<int,int> cnt;
    for(int i =0;i < n;i++){
        cnt[A[i]]++;
    }
    
    int ans = 0;
    for(int i=0;i < cnt.size();i++){
        if(cnt[A[i]] == 1) ans++;
    }
    cout << ans << endl;
    return 0;
}
0