QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#403436 | #5156. Going in Circles | ucup-team1716 | WA | 10ms | 3640kb | C++14 | 710b | 2024-05-02 13:00:18 | 2024-05-02 13:00:19 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
const int L = 25;
bool s[L + 5];
bool rd[20005];
bool check(int l, int r) {
assert(r - l + 1 == L);
for (int i = l; i <= r; ++i) {
if (rd[i] != s[i - l + 1]) {
return false;
}
}
return true;
}
int main() {
srand((ull)time(0) ^ (ull)(new char));
for (int i = 1; i <= L; ++i) {
s[i] = rand() % 2;
}
for (int i = 1; ; ++i) {
cin >> rd[i];
if (i >= L + 3 && check(i - L + 1, i)) {
cout << "! " << i - L << endl;
return 0;
}
if (i <= L && rd[i] != s[(i - 1) % L + 1]) {
cout << "? flip" << endl;
}
cout << "? right" << endl;
}
return 0;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 10ms
memory: 3640kb
input:
0 1 1 0 0 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 0 1 1 0 1 0 1 1 0 1 1 0 1 0 0 1 1 0 1 0 1 0 1 0 0 1 0 0 0 0 0 0 0 1 1 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 1 1 1 1 0 0 1 0 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 0 0 1 0 0 0 0 0 0 0 1 1 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 1 1 1 1 0 0 1 0 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 0 0 ...
output:
? flip ? right ? flip ? right ? right ? flip ? right ? right ? right ? right ? right ? flip ? right ? flip ? right ? flip ? right ? flip ? right ? right ? flip ? right ? flip ? right ? right ? flip ? right ? flip ? right ? flip ? right ? right ? flip ? right ? right ? flip ? right ? flip ? right ? f...
result:
wrong answer Wrong answer: incorrect guess 20016 (ans: 5000). Queries used: 20056