結果

問題 No.182 新規性の虜
ユーザー nao109nao109
提出日時 2023-08-16 14:22:43
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 65 ms / 5,000 ms
コード長 374 bytes
コンパイル時間 2,082 ms
コンパイル使用メモリ 204,456 KB
実行使用メモリ 8,060 KB
最終ジャッジ日時 2023-08-16 14:22:47
合計ジャッジ時間 4,408 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 1 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 37 ms
5,960 KB
testcase_09 AC 65 ms
7,464 KB
testcase_10 AC 56 ms
6,752 KB
testcase_11 AC 45 ms
6,336 KB
testcase_12 AC 18 ms
4,536 KB
testcase_13 AC 1 ms
4,376 KB
testcase_14 AC 1 ms
4,380 KB
testcase_15 AC 1 ms
4,376 KB
testcase_16 AC 2 ms
4,376 KB
testcase_17 AC 1 ms
4,380 KB
testcase_18 AC 28 ms
4,380 KB
testcase_19 AC 22 ms
4,376 KB
testcase_20 AC 14 ms
4,376 KB
testcase_21 AC 32 ms
4,376 KB
testcase_22 AC 18 ms
4,376 KB
testcase_23 AC 1 ms
4,376 KB
testcase_24 AC 54 ms
8,060 KB
testcase_25 AC 15 ms
4,380 KB
testcase_26 AC 9 ms
4,380 KB
testcase_27 AC 2 ms
4,384 KB
evil01.txt AC 64 ms
8,040 KB
evil02.txt AC 61 ms
8,040 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define fi first
#define se second
int main(){
    int n;
    cin >> n;
    map<int, int> cnt;
    for(int i = 0; i < n; i++){
        int a;
        cin >> a;
        cnt[a]++;
    }

    int ans = 0;
    for(auto [i, cnt] : cnt){
        if(cnt == 1) ans++;
    }
    cout << ans << endl;
    return 0;
}
0