結果

問題 No.182 新規性の虜
ユーザー r2en_r2en_
提出日時 2017-07-06 02:53:47
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
RE  
実行時間 -
コード長 402 bytes
コンパイル時間 608 ms
コンパイル使用メモリ 69,176 KB
実行使用メモリ 7,584 KB
最終ジャッジ日時 2024-04-15 18:29:57
合計ジャッジ時間 4,178 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 4 ms
7,216 KB
testcase_01 AC 4 ms
7,296 KB
testcase_02 AC 4 ms
7,244 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 4 ms
7,112 KB
testcase_18 AC 23 ms
7,508 KB
testcase_19 AC 18 ms
7,360 KB
testcase_20 AC 13 ms
7,272 KB
testcase_21 AC 26 ms
7,424 KB
testcase_22 AC 15 ms
7,228 KB
testcase_23 AC 6 ms
7,168 KB
testcase_24 AC 33 ms
7,584 KB
testcase_25 AC 19 ms
7,472 KB
testcase_26 RE -
testcase_27 AC 4 ms
7,108 KB
evil01.txt RE -
evil02.txt RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n); i++)
#define rep2(i,n) for(int i = 1; i <= (n); i++)

int main(){
    int cnt = 0;
    vector<int>v(1000000,0);

    int n = 0; cin >> n;
    vector<int>a(n,0);

    rep(i,n){ cin >> a[i]; }
    rep(i,n){ v[a[i]] += 1; }
    rep2(i,n){ if(v[i] == 1){cnt+=1;} }

    cout << cnt << endl;
    return 0;
}
0