# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1078133 | 12345678 | Karte (COCI15_karte) | C++17 | 1 ms | 456 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;
int n, mp[100], cnt[5];
string str;
set<string> s;
int main()
{
cin.tie(NULL)->sync_with_stdio(false);
mp['P']=0, mp['K']=1, mp['H']=2, mp['T']=3;
cin>>str;
n=str.size();
for (int i=0; i<n; i+=3)
{
string tmp=to_string(str[i])+to_string(str[i+1])+to_string(str[i+2]);
if (s.find(tmp)!=s.end()) return cout<<"GRESKA", 0;
s.insert(tmp);
cnt[mp[str[i]]]++;
}
for (int i=0; i<4; i++) cout<<13-cnt[i]<<' ';
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |