QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#492032#4912. WereYouLasttx3440 4340ms4976kbC++14327b2024-07-26 08:31:242024-07-26 08:31:24

Judging History

你现在查看的是最新测评结果

  • [2024-07-26 08:31:24]
  • 评测
  • 测评结果:0
  • 用时:4340ms
  • 内存:4976kb
  • [2024-07-26 08:31:24]
  • 提交

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.