QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#506409 | #4912. WereYouLast | LCat90 | 0 | 1ms | 4980kb | C++14 | 366b | 2024-08-05 17:14:27 | 2024-08-05 17:14:28 |
answer
//
bool query(int);
void modify(int, bool);
bool WereYouLast(int n, int m) {
int x = 0;
for (int i = 0; i < 5; i++) x |= query(i + 1) << i;
if ((1 << x) == n) return true;
// bool f = query(x + 6);
// modify(x + 6, !f);
// if (f || (1 << x + 1) == n)
x++;
// else x = 0;
for (int i = 0; i < 5; i++) modify(i + 1, x >> i & 1);
return false;
}
详细
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3824kb
input:
1024 10
output:
12345876 -3 11 12345876 -3 11
result:
wrong answer Wrong Answer At Query 11.
Subtask #2:
score: 0
Wrong Answer
Test #2:
score: 0
Wrong Answer
time: 1ms
memory: 4964kb
input:
65536 100000
output:
12345876 -3 17 12345876 -3 17
result:
wrong answer Wrong Answer At Query 17.
Subtask #3:
score: 0
Wrong Answer
Test #3:
score: 0
Wrong Answer
time: 1ms
memory: 4980kb
input:
1048576 100000
output:
12345876 -3 21 12345876 -3 21
result:
wrong answer Wrong Answer At Query 21.
Subtask #4:
score: 0
Wrong Answer
Test #4:
score: 0
Wrong Answer
time: 1ms
memory: 4980kb
input:
67108864 100000
output:
12345876 -3 27 12345876 -3 27
result:
wrong answer Wrong Answer At Query 27.