제출 #251685

#제출 시각아이디문제언어결과실행 시간메모리
251685VEGAnnKarte (COCI15_karte)C++14
50 / 50
1 ms396 KiB
#include <bits/stdc++.h>
#define sz(x) ((int)x.size())
#define i2 array<int,2>
#define c2 array<char,2>
using namespace std;
typedef long long ll;
const int N = 1000100;
const int C = 22;
const int md = 10007;
string suits = "PKHT";
set<c2> mem[4];

int mult(int x, int y) { return (x * y) % md; }

void SUM(int &x, int y){
    x += y;
    if (x >= md)
        x -= md;
}

int main() {
#ifdef _LOCAL
    freopen("in.txt","r",stdin); // freopen("output.txt","w",stdout);
#else
//    freopen("mining.in","r",stdin); freopen("mining.out","w",stdout);
    ios_base::sync_with_stdio(0); cin.tie(0);
#endif

    char c1, C2, c3;

    while (cin >> c1 >> C2 >> c3){
        int ps = suits.find(c1);

        if (mem[ps].find({C2, c3}) != mem[ps].end()){
            cout << "GRESKA";
            return 0;
        }

        mem[ps].insert({C2, c3});
    }

    for (int i = 0; i < 4; i++)
        cout << 13 - sz(mem[i]) << " ";

    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...