# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1171567 | nuutsnoynton | Karte (COCI15_karte) | C11 | 0 ms | 0 KiB |
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair < ll, ll >;
const ll N = 1e3 + 2;
int main() {
ll n, m, r, x, y, lo1, hi1, cnt, s, i, j, ans, t;
string str;
cin >> str;
string str1, str2, str3, str4;
str1 = str.substr(0, 3);
str2 = str.substr(3, 3);
str3 = str.substr(6, 3);
str4 = str.substr(9, 3);
if ( str1 == str2 || str1 == str3 || str1 == str4 || str2 == str3 || str2 == str4 || str3 == str4){
cout << "GRESKA" ;
return 0;
}
map < char, ll > a;
a[str1[0]] ++;
a[str2[0]] ++;
a[str3[0]] ++;
a[str4[0]] ++;
cout << 13-a['P'] << " " << 13-a['K'] << " " <<13- a['H'] << " " << 13-a['T'] << " ";
}