Submission #42718

#TimeUsernameProblemLanguageResultExecution timeMemory
42718theknife2001Karte (COCI15_karte)C++14
50 / 50
2 ms704 KiB
#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 timeMemoryGrader output
Fetching results...