QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#310817 | #4675. Multiple Communications | 11d10xy | 0 | 4ms | 3560kb | C++14 | 892b | 2024-01-21 18:27:23 | 2024-01-21 18:27:23 |
answer
#include<bits/stdc++.h>
using namespace std;
using u64=unsigned long long;
u64 h(u64 i){return(i*i+998244853)^-i;}
u64 val(){
string s;cin>>s;
u64 v=0;
for(int i=0;i<1000;i++)if(s[i]=='1')v^=h(i);
return v;
}
int main(){
string a;cin>>a;
if(a=="Clara"s){
string A,B;
cin>>A>>B;
u64 ha[100]{},hb[100]{};
for(int i=0;i<100;i++)for(int k=0;k<30;k++)ha[i]|=A[i*30+k]-'0'<<k;
for(int i=0;i<100;i++)for(int k=0;k<30;k++)hb[i]|=B[i*30+k]-'0'<<k;
for(int i=0;i<100;i++){
u64 x=val();
for(int j=0,flg=0;!flg&&j<100;j++)for(int k=0;!flg&&k<100;k++)
if(x==ha[j]^hb[k]){
cout<<j+1<<' '<<k+1<<endl;
flg=1;
}
}
}else{
for(int i=0;i<100;i++){
u64 x=val();
for(int k=0;k<30;k++)putchar('0'+(x>>k&1));
}
}
return 0;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 4ms
memory: 3560kb
First Run Input
Alice 111101001110010010001100100110111010100101011011100010101101001000010111100100110100000111101101111110010010000110000110111000111101010101011000000011011110000001000101110110101110010011110110110000100101110111000010010101010110011010001101100111001010100011001000100101100101010110000100001110...
First Run Output
101101011000010000110001110111011001010010100100001111111111000110010101010001010000000000101001011011111110001110001000111001001111011001000001110111100111111000101000010001110111111101111010110111111110001000001111111011011110011111111111011100111011100011001111111111110011001110001000110001110111...
Second Run Input
Bob 00000011100010001101011001011110011000101110001001000111010100011010001011101011100001110101110110110101111101110000110101010101000111101000110110001000010010100100100000110101000110110110111110100000101111101010100111000111100011000011111000000110000101101101001100111010001110110001101011101111...
Second Run Output
010110000010001111010000000000101100001010000111111110001000011111000100011010100000000000001110010010001001011111111111101111010100101000110001110111101101001000000101011110001000110101001111011000000001110111101101000000010010010001110111110000100100011101110001110111011110011110011010101111111111...
Third Run Input
Clara 101101011000010000110001110111011001010010100100001111111111000110010101010001010000000000101001011011111110001110001000111001001111011001000001110111100111111000101000010001110111111101111010110111111110001000001111111011011110011111111111011100111011100011001111111111110011001110001000110001...
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