結果

問題 No.182 新規性の虜
ユーザー ldsyb
提出日時 2016-02-27 14:37:08
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 72 ms / 5,000 ms
コード長 378 bytes
コンパイル時間 1,658 ms
コンパイル使用メモリ 65,884 KB
実行使用メモリ 10,368 KB
最終ジャッジ日時 2024-12-27 02:01:43
合計ジャッジ時間 2,359 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <map>
//#include <algorithm>
using namespace std;

int main(){
   int ans = 0,n;
   cin >> n;
   long long a[n];
   for(int i = 0;i < n;i++) cin >> a[i];
   //stable_sort(a,a + n);
   map<long long,int> m;
   for(int i = 0;i < n;i++) m[a[i]]++;
   for(auto itr = m.begin();itr != m.end();itr++) if(itr->second == 1) ans++;
   cout << ans << endl;
}
0