QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#50367 | #4675. Multiple Communications | zhouhuanyi | 0 | 5ms | 3532kb | C++11 | 1.2kb | 2022-09-25 17:32:17 | 2023-02-04 00:37:09 |
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,res;
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) res=res+(((delta[i]>>j)&1)?'0':'1');
}
cout<<res<<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: 5ms
memory: 3532kb
First Run Input
Alice 111101001110010010001100100110111010100101011011100010101101001000010111100100110100000111101101111110010010000110000110111000111101010101011000000011011110000001000101110110101110010011110110110000100101110111000010010101010110011010001101100111001010100011001000100101100101010110000100001110...
First Run Output
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
Second Run Input
Bob 00000011100010001101011001011110011000101110001001000111010100011010001011101011100001110101110110110101111101110000110101010101000111101000110110001000010010100100100000110101000110110110111110100000101111101010100111000111100011000011111000000110000101101101001100111010001110110001101011101111...
Second Run Output
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
Third Run Input
Clara 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
Third Run Output
99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 ...
Manager to Checker
WA You answered 0 (out of 100) questions correctly
result:
wrong answer WA