QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#187558 | #4912. WereYouLast | Crysfly | 10 | 1853ms | 5020kb | C++20 | 496b | 2023-09-24 18:03:19 | 2023-09-24 18:03:20 |
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((1<<(p-1))==n) return 1;
if(query(p)) {
modify(p,0);
++p;
return WereYouLast(n,100000-p+1);
}else{
modify(p,1);
return 0;
}
return 1;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 10
Accepted
Test #1:
score: 10
Accepted
time: 1ms
memory: 3580kb
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: 0ms
memory: 4676kb
input:
65536 100000
output:
12345876 16 16
result:
points 0.0 Correct Answer. C1 = 16. C2 = 16.
Subtask #3:
score: 0
Wrong Answer
Test #3:
score: 0
Wrong Answer
time: 30ms
memory: 5020kb
input:
1048576 100000
output:
12345876 20 20
result:
points 0.0 Correct Answer. C1 = 20. C2 = 20.
Subtask #4:
score: 0
Wrong Answer
Test #4:
score: 0
Wrong Answer
time: 1853ms
memory: 4796kb
input:
67108864 100000
output:
12345876 26 26
result:
points 0.0 Correct Answer. C1 = 26. C2 = 26.