#include <iostream>
using namespace std;
int a[5][14], val, t, i, j, sol;
char c[1001];
int main()
{
cin>>c;
for (i=0; c[i]!=0; i+=3)
{
if (c[i+1]=='0')
val=c[i+2]-'0';
else
val=10+c[i+2]-'0';
if (c[i]=='P')
t=1;
if (c[i]=='K')
t=2;
if (c[i]=='H')
t=3;
if (c[i]=='T')
t=4;
a[t][val]++;
if (a[t][val]>=2)
{
cout<<"GRESKA";
return 0;
}
}
for (i=1; i<=4; i++)
{
sol=13;
for (j=1; j<=13; j++)
if (a[i][j]!=0)
sol--;
cout<<sol<<" ";
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
252 KB |
Output is correct |
2 |
Correct |
2 ms |
256 KB |
Output is correct |
3 |
Correct |
2 ms |
256 KB |
Output is correct |
4 |
Correct |
2 ms |
376 KB |
Output is correct |
5 |
Correct |
2 ms |
376 KB |
Output is correct |
6 |
Correct |
2 ms |
376 KB |
Output is correct |
7 |
Correct |
3 ms |
376 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 |
376 KB |
Output is correct |