QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#50364 | #4675. Multiple Communications | zhouhuanyi | 0 | 5ms | 3688kb | C++11 | 1.2kb | 2022-09-25 17:30:18 | 2023-02-04 00:37:03 |
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');
}
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;
}
Details
Tip: Click on the bar to expand more detailed information
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