# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
165812 | ArKCa | 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<bits/stdc++.h>
#define ll long long
#define mod 1000000007
#define pb push_back
#define pob pop_back
#define N 10
using namespace std;
char c;
int a,a1,a2,a3,a4;
int b1[20],b2[20],b3[20],b4[20];
int main(){
// freopen("a.gir","r",stdin);
// freopen("a.cik","w",stdout);
while(1){
scanf("%c",&c);
if(c=='\n')break;
scanf("%d",&a);
if(c=='P'){
a1++;
if(b1[a]==1){
printf("GRESKA\n");
return 0;
}
b1[a]=1;
}
else if(c=='K'){
a2++;
if(b2[a]==1){
printf("GRESKA\n");
return 0;
}
b2[a]=1;
}
else if(c=='H'){
a3++;
if(b3[a]==1){
printf("GRESKA\n");
return 0;
}
b3[a]=1;
}
else if(c=='T'){
a4++;
if(b4[a]==1){
printf("GRESKA\n");
return 0;
}
b4[a]=1;
}
}
printf("%d %d %d %d\n",13-a1,13-a2,13-a3,13-a4);
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |