QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#819012#9237. Messagedongyc666#0 4ms3908kbC++171.0kb2024-12-18 11:38:452024-12-18 11:38:49

Judging History

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

  • [2024-12-18 11:38:49]
  • 评测
  • 测评结果:0
  • 用时:4ms
  • 内存:3908kb
  • [2024-12-18 11:38:45]
  • 提交

answer

#include<bits/stdc++.h>
#include "message.h"
using namespace std;

#define pb emplace_back
void send_message(vector<bool> Ans,vector<bool> C){
	mt19937 rnd(114514);
	int s1=0,s2=0;
	for(int i=0;i<31;i++)s1|=C[i]<<i;
	while(s1!=s2){
		int x=rnd();
		vector<bool>arr(31,0);
		for(int j=0;j<31;j++)arr[j]=x>>j&1;
		vector<bool>tmp=send_packet(arr);
		for(int j=0;j<31;j++)
			if(tmp[j]!=(x>>j&1))s2|=1<<j;
	}
	Ans.push_back(1);
	while(Ans.size()<1025)Ans.pb(0);
	int S=Ans.size(),now=0;
	for(int i=1;i<=65;i++){
		vector<bool>arr(31,0);
		for(int j=0;j<31;j++)
			if(!C[j]&&now<S)arr[j]=Ans[now++];
		send_packet(arr);
	}
//	puts("-----");
}
vector<bool> receive_message(vector<vector<bool> > R){
	mt19937 rnd(114514);
	int s=0;
	for(int i=0;i<R.size()-65;i++){
		int x=rnd();
		for(int j=0;j<31;j++)
			if(R[i][j]!=((x>>j)&1))s|=1<<j;
	}
	vector<bool>Ans;
	for(int i=R.size()-65;i<R.size();i++)
		for(int j=0;j<31;j++)
			if(!((s>>j)&1))Ans.pb(R[i][j]);
	while(!Ans.back())Ans.pop_back();
	Ans.pop_back();
	return Ans;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 4ms
memory: 3908kb

Manager to Aisha


Aisha to Manager


Manager to Basma


Basma to Manager


Manager to Checker

0
ing with message 'Used too many days'
Sending secret with code DIE to mgr2sol[0]
Sending secret with code DIE to mgr2sol[1]
Quitting with result code 1

result:

wrong output format Extra information in the output file

Subtask #2:

score: 0
Wrong Answer

Test #8:

score: 0
Wrong Answer
time: 1ms
memory: 3780kb

Manager to Aisha


Aisha to Manager


Manager to Basma


Basma to Manager


Manager to Checker

0
ing with message 'Used too many days'
Sending secret with code DIE to mgr2sol[0]
Sending secret with code DIE to mgr2sol[1]
Quitting with result code 1

result:

wrong output format Extra information in the output file