結果

問題 No.182 新規性の虜
ユーザー nao109nao109
提出日時 2023-08-16 14:22:43
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 79 ms / 5,000 ms
コード長 374 bytes
コンパイル時間 2,213 ms
コンパイル使用メモリ 208,344 KB
実行使用メモリ 8,192 KB
最終ジャッジ日時 2024-05-03 22:41:04
合計ジャッジ時間 3,907 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 46 ms
5,760 KB
testcase_09 AC 79 ms
7,424 KB
testcase_10 AC 64 ms
6,912 KB
testcase_11 AC 50 ms
6,272 KB
testcase_12 AC 20 ms
5,376 KB
testcase_13 AC 2 ms
5,376 KB
testcase_14 AC 2 ms
5,376 KB
testcase_15 AC 2 ms
5,376 KB
testcase_16 AC 2 ms
5,376 KB
testcase_17 AC 2 ms
5,376 KB
testcase_18 AC 31 ms
5,376 KB
testcase_19 AC 23 ms
5,376 KB
testcase_20 AC 15 ms
5,376 KB
testcase_21 AC 35 ms
5,376 KB
testcase_22 AC 19 ms
5,376 KB
testcase_23 AC 2 ms
5,376 KB
testcase_24 AC 55 ms
8,192 KB
testcase_25 AC 17 ms
5,376 KB
testcase_26 AC 9 ms
5,376 KB
testcase_27 AC 2 ms
5,376 KB
evil01.txt AC 67 ms
8,064 KB
evil02.txt AC 67 ms
8,064 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