QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#884499#4675. Multiple CommunicationsSymbolize0 5ms3712kbC++141.7kb2025-02-06 08:53:312025-02-06 08:53:36

Judging History

This is the latest submission verdict.

  • [2025-02-06 08:53:36]
  • Judged
  • Verdict: 0
  • Time: 5ms
  • Memory: 3712kb
  • [2025-02-06 08:53:31]
  • Submitted

answer

/*
	Luogu name: Symbolize
	Luogu uid: 672793
*/
#include<bits/stdc++.h>
#define int long long
#define pii pair<int,int>
#define x first
#define y second
#define rep1(i,l,r) for(register int i=l;i<=r;++i)
#define rep2(i,l,r) for(register int i=l;i>=r;--i)
#define rep3(i,x,y,z) for(register int i=x[y];~i;i=z[i])
#define rep4(i,x) for(auto i:x)
#define debug() puts("----------")
const int N=1e2+10;
const int M=1e3+10;
const int inf=0x3f3f3f3f3f3f3f3f;
using namespace std;
mt19937 rnd(0);
int n,w[M],a[N],b[N]; 
int read()
{
	int x=0,f=1;
	char ch=getchar();
	while(ch<'0'||ch>'9')
	{
		if(ch=='-') f=-1;
		ch=getchar();
	}
	while(ch>='0'&&ch<='9')
	{
		x=(x<<1)+(x<<3)+(ch^48);
		ch=getchar();
	}
	return f*x;
}
signed main()
{
//	freopen(".in","r",stdin);
//	freopen(".out","w",stdout);
	rep1(i,1,1000) w[i]=rnd()%((1<<30)-1);
	string s;
	cin>>s;
	if(s=="Alice"||s=="Bob")
	{
		rep1(x,1,100)
		{
			int s=0;
			rep1(i,0,999)
			{
				char ch;
				cin>>ch;
				if(ch=='1') s^=w[i];
			}
			rep1(i,0,29)
			{
				if(s&(1<<i)) putchar('1');
				else putchar('0');
			}
			putchar('\n');
		}
	}
	else
	{
		rep1(x,1,100) 
		{
			rep1(i,0,29)
			{
				char ch;
				cin>>ch;
				if(ch=='1') a[x]|=(1<<i);
			}
		}
		rep1(x,1,100) 
		{
			rep1(i,0,29)
			{
				char ch;
				cin>>ch;
				if(ch=='1') b[x]|=(1<<i);
			}
		}
		rep1(x,1,100)
		{
			int c=0;
			rep1(i,0,999)
			{
				char ch;
				cin>>ch;
				if(ch=='1') c^=w[i];
			}
			bool res=0;
			rep1(x,1,100)
			{
				rep1(y,1,100)
				{
					if(a[x]^b[y]==c)
					{
						cout<<x<<' '<<y<<"\n";
						res=1;
						break;
					}
				}
				if(res) break;
			}
		}
	}
	return 0;
}

详细

Test #1:

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

First Run Input

Alice
111101001110010010001100100110111010100101011011100010101101001000010111100100110100000111101101111110010010000110000110111000111101010101011000000011011110000001000101110110101110010011110110110000100101110111000010010101010110011010001101100111001010100011001000100101100101010110000100001110...

First Run Output

000100111100100101111011000100

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