| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 704692 | delrey | Karte (COCI15_karte) | C++14 | 1 ms | 296 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>
using namespace std;
bool k[4][20];
int kn[4] = {13, 13, 13, 13};
int main()
{
    string s;
    cin>>s;
    int n = s.length();
    for(int i = 0; i < n; i += 3)
    {
        int num = (s[i + 1] - '0') * 10 + (s[i + 2] - '0'), suit;
        if(s[i] == 'P')
            suit = 0;
        if(s[i] == 'K')
            suit = 1;
        if(s[i] == 'H')
            suit = 2;
        if(s[i] == 'T')
            suit = 3;
        if(k[suit][num])
        {
            cout<<"GRESKA"<<endl;
            return 0;
        }
        k[suit][num] = true;
        kn[suit]--;
    }
    for(int i = 0; i < 4; i++)
        cout<<kn[i]<<" ";
    return 0;
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
