QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#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;
}
详细
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); | ^~~