結果

問題 No.182 新規性の虜
ユーザー marutin
提出日時 2015-06-16 00:09:00
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
MLE  
実行時間 -
コード長 319 bytes
コンパイル時間 1,797 ms
コンパイル使用メモリ 164,428 KB
実行使用メモリ 731,520 KB
最終ジャッジ日時 2024-07-06 21:28:59
合計ジャッジ時間 8,706 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other MLE * 1 -- * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main() {
  int n; cin >> n;
  map<int, int> A;
  int a_max = 0;
  for (int i = 0; i < n; ++i) {
    int a; cin >> a;
    a_max = max(a_max, a);
    A[a]++;
  }

  int ans = 0;
  for (int i = 0; i <= a_max; ++i) {
    if (A[i] == 1) ans++;
  }
  cout << ans << endl;
}
0