QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#187554 | #4912. WereYouLast | Crysfly | 10 | 2ms | 4984kb | C++20 | 488b | 2023-09-24 18:02:25 | 2023-09-24 18:02:26 |
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 p=100000-m+1;
if(p==16) return 1;
if(query(p)) {
modify(p,0);
++p;
return WereYouLast(n,100000-p+1);
}else{
modify(p,1);
return 0;
}
return 1;
}
詳細信息
Subtask #1:
score: 10
Accepted
Test #1:
score: 10
Accepted
time: 0ms
memory: 3840kb
input:
1024 10
output:
12345876 10 10
result:
ok Correct Answer. C1 = 10. C2 = 10.
Subtask #2:
score: 0
Wrong Answer
Test #2:
score: 0
Wrong Answer
time: 2ms
memory: 4984kb
input:
65536 100000
output:
12345876 -3 32768 12345876 -3 32768
result:
wrong answer Wrong Answer At Query 32768.
Subtask #3:
score: 0
Wrong Answer
Test #3:
score: 0
Wrong Answer
time: 2ms
memory: 4984kb
input:
1048576 100000
output:
12345876 -3 32768 12345876 -3 32768
result:
wrong answer Wrong Answer At Query 32768.
Subtask #4:
score: 0
Wrong Answer
Test #4:
score: 0
Wrong Answer
time: 2ms
memory: 4984kb
input:
67108864 100000
output:
12345876 -3 32768 12345876 -3 32768
result:
wrong answer Wrong Answer At Query 32768.