QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#319229 | #4912. WereYouLast | Unknown1508 | 0 | 1ms | 5108kb | C++20 | 444b | 2024-02-02 10:33:09 | 2024-02-02 10:33:10 |
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)) crr += (1 << i);
}
if (crr == n-1) return true;
crr++;
for (int i = 0; i < m; i++){
if ((crr >> i) & 1) modify(i, true);
else modify(i, false);
}
return false;
}
return true;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3852kb
input:
1024 10
output:
12345876 -2 0
result:
wrong answer Invalid Operation At Position 0.
Subtask #2:
score: 0
Wrong Answer
Test #2:
score: 0
Wrong Answer
time: 0ms
memory: 4964kb
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: 5108kb
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: 1ms
memory: 4956kb
input:
67108864 100000
output:
12345876 -3 1 12345876 -3 1
result:
wrong answer Wrong Answer At Query 1.