QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#555781#9237. Messagezhouhuanyi#0 195ms4088kbC++171.5kb2024-09-10 09:48:222024-09-10 09:48:25

Judging History

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

  • [2024-09-10 09:48:25]
  • 评测
  • 测评结果:0
  • 用时:195ms
  • 内存:4088kb
  • [2024-09-10 09:48:22]
  • 提交

answer

#include "message.h"
#include<iostream>
#include<cstdio>
#include<cstdlib>
using namespace std;
const __int128 mod=((__int128)(1)<<69)-19;
bool rd[11][31],used[31],delta[1025];
unsigned long long seed;
bool get_rand()
{
	seed^=(seed<<7);
	seed^=(seed<<13);
	seed^=(seed>>19);
	return seed&1;
}
void send_message(std::vector<bool> M, std::vector<bool> C)
{
	int ps=-1;
	vector<bool>p;
	seed=998244353;
	for (int i=0;i<M.size();++i) delta[i]=M[i];
	delta[M.size()]=1;
	for (int i=1;i<=10;++i)
		for (int j=0;j<=30;++j)
			rd[i][j]=get_rand();
	for (int i=1;i<=10;++i)
	{
		p.clear();
		for (int j=0;j<=30;++j)
		{
			if (C[j]) p.push_back(get_rand());
			else p.push_back(rd[i][j]);
		}
		send_packet(p);
	}
	for (int i=1;i<=66;++i)
	{
		p.clear();
		for (int j=0;j<=30;++j)
		{
			if (C[j]) p.push_back(get_rand());
			else if (ps+1<=1024) p.push_back(delta[++ps]);
			else p.push_back(get_rand());
		}
		send_packet(p);
	}
	return;
}
std::vector<bool> receive_message(std::vector<std::vector<bool>> R)
{
	int ps=-1;
	vector<bool>p;
	seed=998244353;
	for (int i=1;i<=10;++i)
		for (int j=0;j<=30;++j)
			rd[i][j]=get_rand();
	for (int i=0;i<=30;++i) used[i]=1;
	for (int i=1;i<=10;++i)
		for (int j=0;j<=30;++j)
			used[j]&=(R[i-1][j]==rd[i][j]);
	for (int i=1;i<=66;++i)
		for (int j=0;j<=30;++j)
			if (used[j]&&ps+1<=1024)
				delta[++ps]=R[i+9][j];
	for (int i=ps;i>=0;--i)
		if (delta[i])
		{
			for (int j=0;j<=i-1;++j) p.push_back(delta[j]);
			break;
		}
	return p;
}

详细

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 195ms
memory: 4088kb

Manager to Aisha


Aisha to Manager


Manager to Basma


Basma to Manager


Manager to Checker

0
ing with message 'decoded message is incorrect'
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: 171ms
memory: 4024kb

Manager to Aisha


Aisha to Manager


Manager to Basma


Basma to Manager


Manager to Checker

0
ing with message 'decoded message is incorrect'
Sending secret with code DIE to mgr2sol[1]
Quitting with result code 1

result:

wrong output format Extra information in the output file