QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#187661 | #4912. WereYouLast | Crysfly | Compile Error | / | / | C++20 | 510b | 2023-09-24 20:11:34 | 2023-09-24 20:11:34 |
Judging History
answer
// what is matter? never mind.
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
bool query(int);
void modify(int,bool);
bool WereYouLast(int n,int m){
if(n==(1<<10)){
int p=1;
while(p<=10 && query(p)) modify(p,0),++p;
if(p==11)return 1;
modify(p,1);
return 0;
}
int t=0,x=0;
For(i,0,4)if(query(i+1))t|=(1<<i);
if((1<<t)==n)return 1;
bool bo=query(t+6);
if(!bo) modify(t+6,1),t=0;
else modify(t+6,0),t++;
For(i,0,4) modify(i+1,t>>i&1);
return 0;
}
Details
answer.code: In function ‘bool WereYouLast(int, int)’: answer.code:17:13: error: ‘i’ was not declared in this scope 17 | For(i,0,4)if(query(i+1))t|=(1<<i); | ^ answer.code:17:9: error: ‘For’ was not declared in this scope 17 | For(i,0,4)if(query(i+1))t|=(1<<i); | ^~~