| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 541986 | Olympia | Karte (COCI15_karte) | C++17 | 1 ms | 212 KiB | 
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <vector>
#include <algorithm>
#include <iostream>
#include <set>
#include <cmath>
#include <map>
#include <random>
#include <cassert>
#include <ctime>
#include <cstdlib>
#include <limits.h>
#include <queue>
using namespace std;
int main() {
    //freopen("inp.txt", "r", stdin);
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    string s;
    cin >> s;
    map<int,set<pair<char,char>>> cnt;
    int ans = 0;
    for (int i = 0; i < s.length(); i += 3) {
        if (s[i] == 'P') {
            cnt[0].insert({s[i + 1], s[i + 2]});
        } else if (s[i] == 'K') {
            cnt[1].insert({s[i + 1], s[i + 2]});
        } else if (s[i] == 'H') {
            cnt[2].insert({s[i + 1], s[i + 2]});
        } else if (s[i] == 'T') {
            cnt[3].insert({s[i + 1], s[i + 2]});
        }
    }
    ans = 0;
    for (int i = 0; i < 4; i++) {
        //cout << 13 - cnt[i].size() << ' ';
        ans += cnt[i].size();
    }
    if (ans != s.length()/3) {
        cout << "GRESKA\n";
        return 0;
    }
    for (int i = 0; i < 4; i++) {
        cout << 13 - cnt[i].size() << ' ';
//        ans += cnt[i].size();
    }
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
