# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
524488 | Adominator | Karte (COCI15_karte) | C++17 | 1 ms | 332 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;
typedef long long ll;
#define ar array
#define vo vector
#define pb push_back
#define all(x) begin(x), end(x)
#define sz(x) (ll)(x).size()
#define rep(i, a, b) for(ll i=a; i<b; i++)
#define repd(i, a, b) for(ll i=a; i>=b; i--)
int main() {
cin.tie(0)->sync_with_stdio(0);
string s;
cin >> s;
vo<set<ll>> A(4);
map<char, ll> mp;
mp['P']=0, mp['K']=1, mp['H']=2, mp['T']=3;
rep(i, 0, sz(s)) {
ll cur=mp[s[i]];
ll val=10*s[i+1]+s[i+2];
i+=2;
if(A[cur].find(val)!=A[cur].end()) {
cout << "GRESKA\n";
return 0;
}
A[cur].insert(val);
}
for(auto i: A)
cout << 13-sz(i) << " ";
cout << "\n";
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |