QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#492030#4912. WereYouLasttx3440 4345ms4988kbC++14501b2024-07-26 08:30:242024-07-26 08:30:26

Judging History

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

  • [2024-07-26 08:30:26]
  • 评测
  • 测评结果:0
  • 用时:4345ms
  • 内存:4988kb
  • [2024-07-26 08:30:24]
  • 提交

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;
}

详细

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.