QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#319230 | #4912. WereYouLast | Unknown1508 | 10 | 1ms | 5144kb | C++20 | 450b | 2024-02-02 10:33:52 | 2024-02-02 10:33:53 |
Judging History
answer
// Function signatures
bool query(int);
void modify(int, bool);
// Main function
bool WereYouLast(int n, int m){
if (n == (1 << 10) && m == 10){
// Subtask 1
int crr = 0;
for (int i = 0; i < m; i++){
if (query(i+1)) crr += (1 << i);
}
if (crr == n-1) return true;
crr++;
for (int i = 0; i < m; i++){
if ((crr >> i) & 1) modify(i+1, true);
else modify(i+1, false);
}
return false;
}
return true;
}
详细
Subtask #1:
score: 10
Accepted
Test #1:
score: 10
Accepted
time: 1ms
memory: 3816kb
input:
1024 10
output:
12345876 10 10
result:
ok Correct Answer. C1 = 10. C2 = 10.
Subtask #2:
score: 0
Wrong Answer
Test #2:
score: 0
Wrong Answer
time: 1ms
memory: 5144kb
input:
65536 100000
output:
12345876 -3 1 12345876 -3 1
result:
wrong answer Wrong Answer At Query 1.
Subtask #3:
score: 0
Wrong Answer
Test #3:
score: 0
Wrong Answer
time: 1ms
memory: 5024kb
input:
1048576 100000
output:
12345876 -3 1 12345876 -3 1
result:
wrong answer Wrong Answer At Query 1.
Subtask #4:
score: 0
Wrong Answer
Test #4:
score: 0
Wrong Answer
time: 0ms
memory: 5024kb
input:
67108864 100000
output:
12345876 -3 1 12345876 -3 1
result:
wrong answer Wrong Answer At Query 1.