QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#428376 | #7281. How to Avoid Disqualification in 75 Easy Steps | SmilingBraniac# | 0 | 1ms | 3848kb | C++14 | 1.1kb | 2024-06-01 19:08:54 | 2024-06-01 19:09:01 |
answer
#include "avoid.h"
#include <vector>
using namespace std;
pair<int, int> scout(int r, int h) {
for (int i = 0; i < 10; ++i) {
vector<int> y, n;
for(int j = 1; j <= 1000; ++j) {
if ((j >> i) & 1) y.push_back(j);
else n.push_back(j);
}
send(y);
send(n);
}
vector<int> w = wait();
vector<int> bad;
int a = 0, b = 0;
for (int i = 0; i < 10; ++i) {
if (w[2 * i] + w[2 * i + 1] == 2) bad.push_back(i);
else if (w[2 * i]) a += 1 << i, b += 1 << i;
}
for (int k = 0; k < bad.size() - 1; ++k) {
int x = bad[k], y = bad[k + 1];
vector<int> v;
for (int j = 1; j <= 1000; ++j)
if (((j >> x) & 1) && ((j >> y) & 1)) v.push_back(j);
send(v);
}
if (!bad.empty()) w = wait();
if (!bad.empty()) a += 1 << bad[0];
int l = 0;
for (int k = 1; k < bad.size(); ++k) {
if (!w[k - 1]) l ^= 1;
if (l) b += 1 << bad[k];
else a += 1 << bad[k];
}
return {a, b};
}
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: 3608kb
input:
output:
result:
wrong answer Not correct
Subtask #2:
score: 0
Wrong Answer
Test #11:
score: 0
Wrong Answer
time: 1ms
memory: 3776kb
input:
\x14
output:
result:
wrong answer Not correct
Subtask #3:
score: 0
Runtime Error
Test #66:
score: 10
Accepted
time: 1ms
memory: 3616kb
input:
\x1e
output:
result:
ok Correct: 29 robot(s) used, 2 hour(s) passed
Test #67:
score: 0
Accepted
time: 1ms
memory: 3480kb
input:
\x1e
output:
result:
ok Correct: 29 robot(s) used, 2 hour(s) passed
Test #68:
score: 0
Accepted
time: 1ms
memory: 3556kb
input:
\x1e
output:
result:
ok Correct: 29 robot(s) used, 2 hour(s) passed
Test #69:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
\x1e
output:
result:
ok Correct: 26 robot(s) used, 2 hour(s) passed
Test #70:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
\x1e
output:
result:
ok Correct: 26 robot(s) used, 2 hour(s) passed
Test #71:
score: 0
Accepted
time: 1ms
memory: 3608kb
input:
\x1e
output:
result:
ok Correct: 26 robot(s) used, 2 hour(s) passed
Test #72:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
\x1e
output:
result:
ok Correct: 23 robot(s) used, 2 hour(s) passed
Test #73:
score: 0
Accepted
time: 1ms
memory: 3840kb
input:
\x1e
output:
result:
ok Correct: 23 robot(s) used, 2 hour(s) passed
Test #74:
score: 0
Accepted
time: 0ms
memory: 3844kb
input:
\x1e
output:
result:
ok Correct: 21 robot(s) used, 2 hour(s) passed
Test #75:
score: 0
Accepted
time: 1ms
memory: 3596kb
input:
\x1e
output:
result:
ok Correct: 20 robot(s) used, 2 hour(s) passed
Test #76:
score: 0
Accepted
time: 1ms
memory: 3588kb
input:
\x1e
output:
result:
ok Correct: 22 robot(s) used, 2 hour(s) passed
Test #77:
score: 0
Accepted
time: 1ms
memory: 3576kb
input:
\x1e
output:
result:
ok Correct: 29 robot(s) used, 2 hour(s) passed
Test #78:
score: 0
Accepted
time: 1ms
memory: 3580kb
input:
\x1e
output:
result:
ok Correct: 24 robot(s) used, 2 hour(s) passed
Test #79:
score: 0
Accepted
time: 1ms
memory: 3616kb
input:
\x1e
output:
result:
ok Correct: 22 robot(s) used, 2 hour(s) passed
Test #80:
score: 0
Accepted
time: 1ms
memory: 3620kb
input:
\x1e
output:
result:
ok Correct: 22 robot(s) used, 2 hour(s) passed
Test #81:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
\x1e
output:
result:
ok Correct: 23 robot(s) used, 2 hour(s) passed
Test #82:
score: 0
Accepted
time: 1ms
memory: 3804kb
input:
\x1e
output:
result:
ok Correct: 20 robot(s) used, 2 hour(s) passed
Test #83:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
\x1e
output:
result:
ok Correct: 21 robot(s) used, 2 hour(s) passed
Test #84:
score: 0
Accepted
time: 1ms
memory: 3496kb
input:
\x1e
output:
result:
ok Correct: 21 robot(s) used, 2 hour(s) passed
Test #85:
score: 0
Accepted
time: 1ms
memory: 3620kb
input:
\x1e
output:
result:
ok Correct: 22 robot(s) used, 2 hour(s) passed
Test #86:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
\x1e
output:
result:
ok Correct: 22 robot(s) used, 2 hour(s) passed
Test #87:
score: 0
Accepted
time: 1ms
memory: 3552kb
input:
\x1e
output:
result:
ok Correct: 26 robot(s) used, 2 hour(s) passed
Test #88:
score: 0
Accepted
time: 1ms
memory: 3612kb
input:
\x1e
output:
result:
ok Correct: 29 robot(s) used, 2 hour(s) passed
Test #89:
score: 0
Accepted
time: 0ms
memory: 3548kb
input:
\x1e
output:
result:
ok Correct: 22 robot(s) used, 2 hour(s) passed
Test #90:
score: 0
Accepted
time: 1ms
memory: 3548kb
input:
\x1e
output:
result:
ok Correct: 24 robot(s) used, 2 hour(s) passed
Test #91:
score: 0
Accepted
time: 1ms
memory: 3848kb
input:
\x1e
output:
result:
ok Correct: 23 robot(s) used, 2 hour(s) passed
Test #92:
score: 0
Accepted
time: 0ms
memory: 3548kb
input:
\x1e
output:
result:
ok Correct: 22 robot(s) used, 2 hour(s) passed
Test #93:
score: 0
Accepted
time: 1ms
memory: 3560kb
input:
\x1e
output:
result:
ok Correct: 23 robot(s) used, 2 hour(s) passed
Test #94:
score: -10
Runtime Error
input:
\x1e
output:
result:
Subtask #4:
score: 0
Wrong Answer
Test #120:
score: 0
Wrong Answer
time: 1ms
memory: 3600kb
input:
K
output:
result:
wrong answer Not correct