# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
153849 | AldeaDanut | Karte (COCI15_karte) | C++14 | 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>
using namespace std;
char s[1010],x,y;
int v[5][15],i,j,n;
int main(){
cin.get(s,1001);
while(s[j]!=0){
i=(s[j+1]-'0')*10+(s[j+2]-'0');
if(s[j]=='P'){
if(v[1][i]==1){
cout<<"GRESKA";
return 0;
}
v[1][0]++;
v[1][i]=1;
}
if(s[j]=='K'){
if(v[2][i]==1){
cout<<"GRESKA";
return 0;
}
v[2][0]++;
v[2][i]=1;
}
if(s[j]=='H'){
if(v[3][i]==1){
cout<<"GRESKA";
return 0;
}
v[3][0]++;
v[3][i]=1;
}
if(s[j]=='T'){
if(v[4][i]==1){
cout<<"GRESKA";
return 0;
}
v[4][0]++;
v[4][i]=1;
}
j+=3;
}
cout<<13-v[1][0]<<" "<<13-v[2][0]<<" "<<13-v[3][0]<<" "<<13-v[4][0];
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |