# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
42718 | theknife2001 | Karte (COCI15_karte) | C++14 | 2 ms | 704 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;
string s;
set<pair<char , string> > st;
map <char , int >mp;
int main()
{
cin>>s;
int n=s.size();
char c;
string t;
for(int i=0;i<n;i+=3)
{
c=s[i];
t="";
t.push_back(s[i+1]);
t.push_back(s[i+2]);
if(st.find({c,t})!=st.end())
{
cout<<"GRESKA"<<endl;
return 0;
}
st.insert({c,t});
mp[c]++;
}
cout<<13-mp['P']<<' '<<13-mp['K']<<' '<<13-mp['H']<<' '<<13-mp['T']<<endl;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |