結果
問題 | No.182 新規性の虜 |
ユーザー |
|
提出日時 | 2019-09-04 23:25:04 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 90 ms / 5,000 ms |
コード長 | 578 bytes |
コンパイル時間 | 2,225 ms |
コンパイル使用メモリ | 180,020 KB |
実行使用メモリ | 10,240 KB |
最終ジャッジ日時 | 2024-12-30 01:01:55 |
合計ジャッジ時間 | 4,652 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
/** @file 182.cpp @title No.182 新規性の虜 - yukicoder @url https://yukicoder.me/problems/no/182 **/ #include <bits/stdc++.h> using namespace std; typedef long long LL; #define ALL(obj) (obj).begin(), (obj).end() #define REP(i, N) for (int i = 0; i < (N); ++i) int main() { LL N; cin >> N; vector<LL> A(N, 0); map<LL, LL> m; REP(i, N) { cin >> A[i]; m[A[i]]++; } sort(ALL(A)); A.erase(unique(ALL(A)), A.end()); LL ans = 0; REP(i, (int)A.size()) { if (m[A[i]] == 1) { ans++; } } cout << ans << endl; return 0; }