//#include<fstream>
#include<iostream>
#define fin cin
#define fout cout
using namespace std;
//ifstream fin("karte.in");
//ofstream fout("karte.out");
int i,ok,nr,f[4][14],sol[4];
char c[1001];
int main()
{
fin>>c;
for(i=0;c[i];i+=3)
{
if(c[i]=='P') ok=0;
if(c[i]=='K') ok=1;
if(c[i]=='H') ok=2;
if(c[i]=='T') ok=3;
nr=(c[i+1]-'0')*10+c[i+2]-'0';
if(f[ok][nr]==1)
{
fout<<"GRESKA";
return 0;
}
f[ok][nr]=1;sol[ok]--;
}
for(i=0;i<=3;i++)
fout<<13+sol[i]<<" "
; return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
256 KB |
Output is correct |
2 |
Correct |
2 ms |
360 KB |
Output is correct |
3 |
Correct |
2 ms |
376 KB |
Output is correct |
4 |
Correct |
2 ms |
348 KB |
Output is correct |
5 |
Correct |
2 ms |
376 KB |
Output is correct |
6 |
Correct |
2 ms |
256 KB |
Output is correct |
7 |
Correct |
2 ms |
252 KB |
Output is correct |
8 |
Correct |
2 ms |
256 KB |
Output is correct |
9 |
Correct |
2 ms |
256 KB |
Output is correct |
10 |
Correct |
2 ms |
256 KB |
Output is correct |