QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#884506#4675. Multiple CommunicationsSymbolize0 6ms3712kbC++141.7kb2025-02-06 08:54:482025-02-06 08:54:52

Judging History

This is the latest submission verdict.

  • [2025-02-06 08:54:52]
  • Judged
  • Verdict: 0
  • Time: 6ms
  • Memory: 3712kb
  • [2025-02-06 08:54:48]
  • 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: 6ms
memory: 3712kb

First Run Input

Alice
111101001110010010001100100110111010100101011011100010101101001000010111100100110100000111101101111110010010000110000110111000111101010101011000000011011110000001000101110110101110010011110110110000100101110111000010010101010110011010001101100111001010100011001000100101100101010110000100001110...

First Run Output

000100111100100101111011000100110001101110110111110011000010010111111010101000010110100010100011101000100000000110001001110011011000001001101100011101101011111111000010001110101111111011000011101000110000011000001110001011000101111000011011000001110010110011100011111100001101010101110101011000110011...

Second Run Input

Bob
00000011100010001101011001011110011000101110001001000111010100011010001011101011100001110101110110110101111101110000110101010101000111101000110110001000010010100100100000110101000110110110111110100000101111101010100111000111100011000011111000000110000101101101001100111010001110110001101011101111...

Second Run Output

110010100000111100111110011111101101001101111100101011110001011010001010101110110010111000110111001101000101100100011001011010111001111011101100001000000110010110100100010100101111111011111111001000111100100011100001100111100000010110000111101101010011001011110100110100010110111111101101111001101100...

Third Run Input

Clara
000100111100100101111011000100110001101110110111110011000010010111111010101000010110100010100011101000100000000110001001110011011000001001101100011101101011111111000010001110101111111011000011101000110000011000001110001011000101111000011011000001110010110011100011111100001101010101110101011000...

Third Run Output

1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
...

Manager to Checker

WA
You answered 0 (out of 100) questions correctly

result:

wrong answer WA