QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#50364#4675. Multiple Communicationszhouhuanyi0 5ms3688kbC++111.2kb2022-09-25 17:30:182023-02-04 00:37:03

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-02-04 00:37:03]
  • 评测
  • 测评结果:0
  • 用时:5ms
  • 内存:3688kb
  • [2022-09-25 17:30:18]
  • 提交

answer

#include<iostream>
#include<cstdio>
#define N 3000
using namespace std;
int read()
{
	char c=0;
	int sum=0;
	while (c<'0'||c>'9') c=getchar();
	while ('0'<=c&&c<='9') sum=sum*10+c-'0',c=getchar();
	return sum; 
}
unsigned long long seed=12345,rd[N+1],A[N+1],B[N+1],delta[N+1];
int RAND()
{
	seed=(seed<<7)^seed;
	seed=(seed>>13)^seed;
	seed=(seed<<17)^seed;
	return seed%(1<<30);
}
string s,t;
int main()
{
	cin>>s;
	if (s=="Alice"||s=="Bob")
	{
		for (int i=0;i<100;++i)
		{
			cin>>t;
			for (int j=0;j<1000;++j)
				if (t[j]=='1')
					delta[i]^=rd[j];
			for (int j=0;j<30;++j) s=s+(((delta[i]>>j)&1)?'0':'1');
		}
	    printf("%s\n",s);
	}
	else
	{
		cin>>t;
		for (int i=0;i<100;++i)
			for (int j=0;j<30;++j)
				if (t[i*30+j]=='1')
					A[i]^=(1<<j);
		cin>>t;
		for (int i=0;i<100;++i)
			for (int j=0;j<30;++j)
				if (t[i*30+j]=='1')
					B[i]^=(1<<j);
		for (int i=0;i<100;++i)
		{
			cin>>t;
			for (int j=0;j<1000;++j)
				if (t[j]=='1')
					delta[i]^=rd[j];
		}
		for (int i=0,x,y;i<100;++i)
		{
			x=y=0;
			for (int j=0;j<100;++j)
				for (int k=0;k<100;++k)
					if ((A[j]^B[k])==delta[i])
						x=j,y=k;
			printf("%d %d\n",x,y);
		}
	}
	return 0;
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 5ms
memory: 3688kb

First Run Input

Alice
111101001110010010001100100110111010100101011011100010101101001000010111100100110100000111101101111110010010000110000110111000111101010101011000000011011110000001000101110110101110010011110110110000100101110111000010010101010110011010001101100111001010100011001000100101100101010110000100001110...

First Run Output

0

Second Run Input


Second Run Output


Third Run Input


Third Run Output


Manager to Checker

WA
Wrong Answer on First Run: the length of the output should be exactly 3000.

result:

wrong answer WA