QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#310820 | #4675. Multiple Communications | 11d10xy | 0 | 4ms | 3556kb | C++14 | 894b | 2024-01-21 18:30:57 | 2024-01-21 18:30:58 |
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;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 4ms
memory: 3556kb
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
11 8 68 89 74 70 28 58 53 98 29 9 95 31 99 37 84 44 2 25 39 25 76 92 77 67 74 95 12 3 85 64 56 78 42 21 93 20 17 93 95 7 44 3 32 7 30 58 76 16 43 26 100 39 37 49 51 94 74 82 21 31 57 55 12 37 45 74 24 78 17 100 2 66 84 23 75 36 5 5 30 65 17 36 39 68 53 49 26 73 70 69 2 83 63 75 77 97 74 95
Manager to Checker
WA Wrong Answer on Third Run: failed to read your solution
result:
wrong answer WA