# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
255483 | babo | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++14 | 2231 ms | 48056 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.
int encode(int n,int x,int y){
int i;
int xx[10]={};
int yy[10]={};
int xc[10]={};
int yc[10]={};
for(i=0;i<10;i++)
{
xx[i]=(x^(1<<i))?1:0;
yy[i]=(y^(1<<i))?1:0;
}
for(i=0;i<10;i++)
{
xc[i]=xx[i]!=xx[(i+1)%10]?1:0;
yc[i]=yy[i]!=yy[(i+1)%10]?1:0;
}
for(i=0;i<10;i++)
if(xc[i]&&!yc[i]) return i+1;
if(x==0) return 11;
return 12;
}
int decode(int n,int q,int h){
if(h==11) return q==0;
if(h==12) return q==1023;
int i;
int qq[10]={};
for(i=0;i<10;i++)
{
qq[i]=(q^(1<<i))?1:0;
}
return qq[h-1]!=qq[h%10];
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |