QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#50365 | #4675. Multiple Communications | zhouhuanyi | 0 | 4ms | 3632kb | C++11 | 1.2kb | 2022-09-25 17:30:48 | 2023-02-04 00:37:05 |
Judging History
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');
}
cout<<s<<endl;
}
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: 4ms
memory: 3632kb
First Run Input
Alice 111101001110010010001100100110111010100101011011100010101101001000010111100100110100000111101101111110010010000110000110111000111101010101011000000011011110000001000101110110101110010011110110110000100101110111000010010101010110011010001101100111001010100011001000100101100101010110000100001110...
First Run Output
Alice1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
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