QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#403428 | #5156. Going in Circles | ucup-team1716 | WA | 6ms | 3644kb | C++14 | 712b | 2024-05-02 12:36:36 | 2024-05-02 12:36:36 |
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) {
if (check(i - L + 1, i)) {
cout << "! " << i - L << endl;
return 0;
}
}
if (rd[i] != s[(i - 1) % L + 1]) {
cout << "? flip" << endl;
}
cout << "? right" << endl;
}
return 0;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 6ms
memory: 3644kb
input:
0 1 1 0 0 0 1 0 1 1 0 0 1 1 1 0 1 0 1 0 0 0 1 0 0 1 0 1 0 1 1 0 1 0 1 1 0 0 1 1 0 1 0 1 0 0 1 0 1 0 1 1 0 0 1 0 0 0 0 1 0 1 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 1 0 0 1 1 0 1 0 1 1 0 1 1 0 0 1 1 0 0 1 0 1 1 0 1 0 1 0 1 1 0 0 1 1 0 1 0 0 1 1 0 1 0 0 1 0 1 0 0 0 0 0 1 0 1 1 0 1 0 1 0 0 1 1 0 1 1 0 0 0 ...
output:
? flip ? right ? flip ? right ? right ? right ? right ? flip ? right ? flip ? right ? right ? right ? right ? flip ? right ? flip ? right ? flip ? right ? right ? right ? flip ? right ? right ? flip ? right ? flip ? right ? right ? flip ? right ? flip ? right ? right ? flip ? right ? flip ? right ? ...
result:
wrong answer Wrong answer: used too many queries. Queries used: 26001 (10501 too many, terminated)