QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#492032 | #4912. WereYouLast | tx344 | 0 | 4340ms | 4976kb | C++14 | 327b | 2024-07-26 08:31:24 | 2024-07-26 08:31:24 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
bool query(int);
void modify(int,bool);
bool WereYouLast(int n,int m)
{
int x=0;
for(int i=0;i<5;i++)x|=1<<query(i+1);
if((1<<x)==n)return 1;
bool flg=query(x+6);
modify(x+6,!flg);
x=(flg||(1<<x+1)==n)?x+1:0;
for(int i=0;i<5;i++)modify(i+1,x>>i&1);
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3816kb
input:
1024 10
output:
12345876 -3 1024 12345876 -3 1024
result:
wrong answer Wrong Answer At Query 1024.
Subtask #2:
score: 0
Wrong Answer
Test #2:
score: 0
Wrong Answer
time: 2ms
memory: 4976kb
input:
65536 100000
output:
12345876 -3 65536 12345876 -3 65536
result:
wrong answer Wrong Answer At Query 65536.
Subtask #3:
score: 0
Wrong Answer
Test #3:
score: 0
Wrong Answer
time: 69ms
memory: 4976kb
input:
1048576 100000
output:
12345876 -3 1048576 12345876 -3 1048576
result:
wrong answer Wrong Answer At Query 1048576.
Subtask #4:
score: 0
Wrong Answer
Test #4:
score: 0
Wrong Answer
time: 4340ms
memory: 4908kb
input:
67108864 100000
output:
12345876 -3 67108864 12345876 -3 67108864
result:
wrong answer Wrong Answer At Query 67108864.