Submission #251685

# Submission time Handle Problem Language Result Execution time Memory
251685 2020-07-22T07:24:44 Z VEGAnn Karte (COCI15_karte) C++14
50 / 50
1 ms 396 KB
#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 time Memory Grader output
1 Correct 0 ms 384 KB Output is correct
2 Correct 0 ms 384 KB Output is correct
3 Correct 1 ms 384 KB Output is correct
4 Correct 0 ms 384 KB Output is correct
5 Correct 0 ms 396 KB Output is correct
6 Correct 1 ms 384 KB Output is correct
7 Correct 0 ms 384 KB Output is correct
8 Correct 0 ms 384 KB Output is correct
9 Correct 0 ms 384 KB Output is correct
10 Correct 0 ms 384 KB Output is correct