QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#492030 | #4912. WereYouLast | tx344 | 0 | 4345ms | 4988kb | C++14 | 501b | 2024-07-26 08:30:24 | 2024-07-26 08:30:26 |
Judging History
answer
#include<bits/stdc++.h>
#define ll long long
#define Int __int128
#define ld double
#define fi first
#define se second
#define PII pair<int,int>
#define PLI pair<ll,int>
#define PLL pair<ll,ll>
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: 1ms
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: 4984kb
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: 67ms
memory: 4936kb
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: 4345ms
memory: 4988kb
input:
67108864 100000
output:
12345876 -3 67108864 12345876 -3 67108864
result:
wrong answer Wrong Answer At Query 67108864.