Submission #98541

# Submission time Handle Problem Language Result Execution time Memory
98541 2019-02-23T22:21:40 Z dalgerok Bridž (COCI17_bridz) C++17
50 / 50
4 ms 384 KB
#include<bits/stdc++.h>
using namespace std;




int main(){
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    int test;
    cin >> test;
    map < char, int > q;
    while(test--){
        string s;
        cin >> s;
        for(auto it : s){
            q[it] += 1;
        }
    }
    cout << q['A'] * 4 + q['K'] * 3 + q['Q'] * 2 + q['J'] * 1 << "\n";
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 384 KB Output is correct
2 Correct 2 ms 384 KB Output is correct
3 Correct 2 ms 384 KB Output is correct
4 Correct 2 ms 384 KB Output is correct
5 Correct 3 ms 384 KB Output is correct
6 Correct 3 ms 384 KB Output is correct
7 Correct 2 ms 384 KB Output is correct
8 Correct 3 ms 356 KB Output is correct
9 Correct 3 ms 384 KB Output is correct
10 Correct 4 ms 384 KB Output is correct