# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
153879 | mihnea_anghel | Karte (COCI15_karte) | C++17 | 2 ms | 376 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 <iostream>
#include <cstring>
using namespace std;
char s[1100], x;
int n, i, nr, a[200][20];
int main()
{
/// P K H T
cin>>s;
for ( i=0; s[i]; i+=3 ){
x = s[i];
nr = (s[i+1]-'0')*10+(s[i+2]-'0');
if ( a[x-'A'][nr] != 0 ){
cout<<"GRESKA"; return 0;
}
a[x-'A'][nr] = 1; a[x-'A'][0]++;
}
cout<<13-a['P'-'A'][0]<<" "<<13-a['K'-'A'][0]<<" "<<13-a['H'-'A'][0]<<" "<<13-a['T'-'A'][0];
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |