QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#48863 | #4675. Multiple Communications | zqyyy | 0 | 19ms | 3640kb | C++14 | 1.5kb | 2022-09-16 17:14:17 | 2023-02-04 00:32:31 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
inline int read() {
int f=1, r=0; char c=getchar();
while (!isdigit(c)) f^=c=='-', c=getchar();
while (isdigit(c)) r=r*10+(c&15), c=getchar();
return f?r:-r;
}
template<class T> inline void ckmin(T &x, T y) {if (y<x) x=y;}
template<class T> inline void ckmax(T &x, T y) {if (x<y) x=y;}
const int N=100, M=1000;
mt19937 RAND(114514);
inline int rnd() {return uniform_int_distribution<int>(0, 1)(RAND);}
int A[M], B[M], b[30][M], c[M];
inline void init() {
for (int i=0; i<30; i++)
for (int j=0; j<M; j++) b[i][j]=rnd();
}
int main() {
#ifndef ONLINE_JUDGE
freopen("1.in", "r", stdin);
freopen("1.out", "w", stdout);
#endif
ios::sync_with_stdio(false), cin.tie(0);
string str; cin>>str, init();
if (str!="Clara") {
for (int i=0; i<N; i++) {
cin>>str;
for (int j=0; j<30; j++) {
int x=0;
for (int k=0; k<M; k++) if (b[j][k] && (str[k]&1)) x++;
cout<<(x&1);
}
}
return 0;
}
cin>>str;
for (int i=0; i<N; i++)
for (int j=0; j<30; j++) A[i]<<1, A[i]+=str[i*30+j]&1;
cin>>str;
for (int i=0; i<N; i++)
for (int j=0; j<30; j++) B[i]<<1, B[i]+=str[i*30+j]&1;
for (int q=0; q<N; q++) {
cin>>str; int v=0;
for (int i=0; i<30; i++) {
int x=0;
for (int j=0; j<M; j++)
if (b[i][j] && (str[j]&1)) x++;
v<<=1, v+=x&1;
}
for (int i=0; i<N; i++)
for (int j=0; j<N; j++)
if ((A[i]^B[j])==v) {cout<<i<<" "<<j<<'\n'; goto end;}
end:;
}
return 0;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 19ms
memory: 3640kb
First Run Input
Alice 111101001110010010001100100110111010100101011011100010101101001000010111100100110100000111101101111110010010000110000110111000111101010101011000000011011110000001000101110110101110010011110110110000100101110111000010010101010110011010001101100111001010100011001000100101100101010110000100001110...
First Run Output
110110100111000011000111100110010010110011010110100011111101110011101000001010011001100110111101110101011110011110011111101010010110001111011011000000000100000001000110011001001110010111111000101010011011011100001100111000011010001110011110000100001101011101101000001000010010101011100000111000111101...
Second Run Input
Bob 00000011100010001101011001011110011000101110001001000111010100011010001011101011100001110101110110110101111101110000110101010101000111101000110110001000010010100100100000110101000110110110111110100000101111101010100111000111100011000011111000000110000101101101001100111010001110110001101011101111...
Second Run Output
011111110000001101101010011100111010100011110110111001000000111110011010011100000011101010100110110100101011101101001100001110011011001111101011110001001010000111011110110000100111110100101100011001100001110000100011110010111010011110101011101010010000101001000011000111011110001101010111111101000000...
Third Run Input
Clara 110110100111000011000111100110010010110011010110100011111101110011101000001010011001100110111101110101011110011110011111101010010110001111011011000000000100000001000110011001001110010111111000101010011011011100001100111000011010001110011110000100001101011101101000001000010010101011100000111000...
Third Run Output
Manager to Checker
WA Wrong Answer on Third Run: failed to read your solution
result:
wrong answer WA