QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#75325 | #4675. Multiple Communications | wangzhe_0477 | Compile Error | / | / | C++17 | 1.5kb | 2023-02-04 20:52:21 | 2023-02-04 20:52:23 |
Judging History
你现在查看的是最新测评结果
- [2023-08-10 23:21:45]
- System Update: QOJ starts to keep a history of the judgings of all the submissions.
- [2023-02-04 20:52:23]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-02-04 20:52:21]
- 提交
answer
#include <bits/stdc++.h>
template<typename T>
using UID = std::uniform_int_distribution<T>;
std::string tag;
int a[1005], x[105], y[105];
std::mt19937_64 random_base(1919810);
int main() {
for (int i = 0; i < 1000; i++) a[i] = UID<int>(0, (1 << 30) - 1)(random_base);
std::cin >> tag;
if (tag == "Alice" || tag == "Bob") {
std::string ans{""};
for (int i = 0; i < 100; i++) {
std::string s;
std::cin >> s;
int now = 0;
for (int j = 0; j < 1000; j++)
if (s[j] == '1')
now ^= a[j];
for (int j = 0; j < 30; j++) ans += '0' + (now >> j & 1);
}
std::cout << ans;
}
else {
std::string a, b;
std::cin >> a >> b;
for (int i = 0; i < 100; i++) {
for (int j = 0; j < 30; j++) {
if (a[i * 30 + j] == '1') x[i] |= 1 << j;
if (b[i * 30 + j] == '1') y[i] |= 1 << j;
}
}
for (int i = 0; i < 100; i++) {
std::string s;
std::cin >> s;
int now = 0;
for (int j = 0; j < 1000; j++)
if (s[j] == '1')
now ^= a[j];
for (int j = 0; j < 100; j++)
for (int k = 0; k < 100; k++)
if (now ^ x[j] ^ y[k] == 0) {
printf("%d %d\n", j + 1, k + 1);
goto OUT;
}
OUT:
}
}
return 0;
}
详细
answer.code: In function ‘int main()’: answer.code:49:9: error: expected primary-expression before ‘}’ token 49 | } | ^