結果

問題 No.182 新規性の虜
ユーザー imulanimulan
提出日時 2016-01-22 15:30:23
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 66 ms / 5,000 ms
コード長 814 bytes
コンパイル時間 860 ms
コンパイル使用メモリ 79,444 KB
実行使用メモリ 8,160 KB
最終ジャッジ日時 2023-08-27 09:26:16
合計ジャッジ時間 2,711 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 35 ms
5,980 KB
testcase_09 AC 66 ms
7,296 KB
testcase_10 AC 55 ms
6,948 KB
testcase_11 AC 43 ms
6,192 KB
testcase_12 AC 16 ms
4,684 KB
testcase_13 AC 1 ms
4,380 KB
testcase_14 AC 2 ms
4,376 KB
testcase_15 AC 2 ms
4,376 KB
testcase_16 AC 2 ms
4,380 KB
testcase_17 AC 1 ms
4,380 KB
testcase_18 AC 26 ms
4,376 KB
testcase_19 AC 19 ms
4,376 KB
testcase_20 AC 13 ms
4,380 KB
testcase_21 AC 29 ms
4,376 KB
testcase_22 AC 16 ms
4,380 KB
testcase_23 AC 2 ms
4,376 KB
testcase_24 AC 49 ms
8,160 KB
testcase_25 AC 9 ms
4,376 KB
testcase_26 AC 7 ms
4,380 KB
testcase_27 AC 2 ms
4,380 KB
evil01.txt AC 52 ms
8,060 KB
evil02.txt AC 52 ms
8,048 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <algorithm>
#include <set>
#include <sstream>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cctype>
#include <climits>
using namespace std;

typedef long long ll;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) for(int i=0;i<(n);++i)
#define foreach(itr,c) for(__typeof(c.begin()) itr=c.begin(); itr!=c.end(); itr++)

int main(int argc, char const *argv[]) {
  int n;
  cin >>n;

  map<int,int> mp;
  REP(i,n){
    int a;
    scanf(" %d", &a);

    if(mp.find(a)==mp.end()){
      mp[a]=1;
    }
    else ++mp[a];
  }

  int ans=0;
  foreach(it,mp){
    if(it->second==1) ++ans;
  }

  std::cout << ans << std::endl;
  return 0;
}
0