QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#322678 | #4675. Multiple Communications | socpite | 0 | 6ms | 3628kb | C++23 | 1.5kb | 2024-02-07 15:15:33 | 2024-02-07 15:15:34 |
answer
#include<bits/stdc++.h>
using namespace std;
mt19937 rng(69420);
int h[1000];
int a[100], b[100];
void get_pair(int num){
for(int j = 0; j < 100; j++){
for(int k = 0; k < 100; k++){
if(a[j]^b[k] == num){
cout << j+1 << " " << k+1 << "\n";
return;
}
}
}
}
int main(){
string type;
cin >> type;
for(int i = 0; i < 1000; i++){
h[i] = rng()%(1<<30);
}
if(type != "Clara"){
for(int i = 0; i < 100; i++){
int num = 0;
for(int j = 0; j < 1000; j++){
char x;
cin >> x;
if(x == '1')num^=h[j];
}
for(int j = 0; j < 30; j++)cout << (num>>j&1);
}
}
else {
for(int i = 0; i < 100; i++){
for(int j = 0; j < 30; j++){
char x;
cin >> x;
a[i]^=(x-'0')<<j;
}
}
for(int i = 0; i < 100; i++){
for(int j = 0; j < 30; j++){
char x;
cin >> x;
b[i]^=(x-'0')<<j;
}
}
for(int i = 0; i < 100; i++){
int num = 0;
for(int j = 0; j < 1000; j++){
char x;
cin >> x;
if(x == '1')num^=h[j];
}
get_pair(num);
}
}
// cout << score << endl;
}
详细
Test #1:
score: 0
Wrong Answer
time: 6ms
memory: 3628kb
First Run Input
Alice 111101001110010010001100100110111010100101011011100010101101001000010111100100110100000111101101111110010010000110000110111000111101010101011000000011011110000001000101110110101110010011110110110000100101110111000010010101010110011010001101100111001010100011001000100101100101010110000100001110...
First Run Output
110110001110110110110110011101100000010010110111111010010110101110011000101000010110010111000110111100110100000011011010110110101011110000010100101011100011001000111011110101001111100010110001111111101001001001100010111011000010101100111101100110101000010010001011111100011101100110101101110111001010...
Second Run Input
Bob 00000011100010001101011001011110011000101110001001000111010100011010001011101011100001110101110110110101111101110000110101010101000111101000110110001000010010100100100000110101000110110110111110100000101111101010100111000111100011000011111000000110000101101101001100111010001110110001101011101111...
Second Run Output
100110001000000100010111100101100000001101101100110101110101111000100110001100010011101111110110010000000010111010011001101110011101101100101110100001111001110000101000110000111000011101000010000101001111100000111111011111111110010100101010110000100101001100111001011110011011101001110111111010010111...
Third Run Input
Clara 110110001110110110110110011101100000010010110111111010010110101110011000101000010110010111000110111100110100000011011010110110101011110000010100101011100011001000111011110101001111100010110001111111101001001001100010111011000010101100111101100110101000010010001011111100011101100110101101110111...
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