結果

問題 No.182 新規性の虜
ユーザー ldsyb
提出日時 2016-02-27 14:36:49
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 66 ms / 5,000 ms
コード長 374 bytes
コンパイル時間 1,723 ms
コンパイル使用メモリ 73,492 KB
実行使用メモリ 10,324 KB
最終ジャッジ日時 2024-12-27 02:00:24
合計ジャッジ時間 2,799 ms
ジャッジサーバーID
(参考情報)
judge2 / 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