/ SeriousOJ /

Record Detail

Compile Error

foo.c:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.

Code

#include<bits/stdc++.h>
using namespace  std;
using ll = long long;
 
signed main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
 
    int t; cin >> t;
    while(t--) {
        int n; cin >> n;
        map<char,int>mp;
        string s; cin >> s;
        for(int i = 0; i < n; i++) {
            mp[s[i]]++;
        }

        int ans = 0;
        for (auto u : mp) {
            if(u.second > 1) {
                ans += u.second;
            }
        }

        cout << ans << '\n';
    }
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1038 Do not touch my string
Contest
Brain Booster #3
Language
C99 (GCC 13.2.0)
Submit At
2024-05-06 15:26:38
Judged At
2024-11-11 03:34:23
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes