| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 268475 | mayhoubsaleh | Karte (COCI15_karte) | C++14 | 1 ms | 384 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 <bits/stdc++.h>
#define ll long long
#define pb push_back
#define IOS ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace std;
const ll maxn=5e5+100;
const ll inf=1e9+10;
char c[]={'P','K', 'H', 'T'};
string s;
map<char,int>cnt;
map<string,bool>vis;
int main()
{
    IOS
    cin>>s;
    for(int i=0;i<s.size();i+=3){
        string t=s.substr(i,3);
        if(vis[t]){
            cout<<"GRESKA"<<endl;
            return 0;
        }
        vis[t]=1;
        cnt[t[0]]++;
    }
    for(int i=0;i<4;i++){
        cout<<13-cnt[c[i]]<<' ';
    }
    cout<<endl;
    return 0;
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
