Submission #153868

#TimeUsernameProblemLanguageResultExecution timeMemory
153868DiviaKarte (COCI15_karte)C++14
50 / 50
2 ms380 KiB
#include <iostream> using namespace std; //ifstream cin("karte.in"); //ofstream cout("karte.out"); int i,j,t,lipsa,nr; char s[2000]; int v[5][20]; int main() { cin.getline(s,1000); for(i=0;s[i];i+=3){ if(s[i]=='P')t=1; else if(s[i]=='K')t=2; else if(s[i]=='H')t=3; else if(s[i]=='T')t=4; nr=(s[i+1]-'0')*10+s[i+2]-'0'; if(v[t][nr]==1){cout<<"GRESKA";return 0;} v[t][nr]=1; } for(i=1;i<=4;i++){ lipsa=13; for(j=1;j<=13;j++) if(v[i][j])lipsa--; cout<<lipsa<<" "; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...