# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
251685 | VEGAnn | Karte (COCI15_karte) | C++14 | 1 ms | 396 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 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 |
---|---|---|---|---|
Fetching results... |