QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#492143 | #4912. WereYouLast | CrazyFungi | Compile Error | / | / | C++14 | 539b | 2024-07-26 09:50:32 | 2024-07-26 09:50:39 |
Judging History
answer
bool query(int);
void modify(int,bool);
bool WereYouLast(int n,int m){
int p[6];
for(int i=1;i<=5;++i) p[i]=query(i);
int z=0;
for(int i=1;i<=5;++i) z|=p[i]<<5-i;
if(z==__lg(n)) return 1;
if(query(z+5)){
modify(z+5,0);
for(int i=1;i<=5;++i) modify(i,0);
}
else{
modify(z+5,1);
for(int i=5;i>=1;--i){
if(!p[i]){
modify(i,1);
break;
}
else modify(i,0);
}
}
return 0;
}
Details
answer.code: In function ‘bool WereYouLast(int, int)’: answer.code:9:11: error: ‘__lg’ was not declared in this scope 9 | if(z==__lg(n)) return 1; | ^~~~