QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#428357 | #7281. How to Avoid Disqualification in 75 Easy Steps | SmilingBraniac# | 0 | 1ms | 3868kb | C++14 | 1.0kb | 2024-06-01 19:03:46 | 2024-06-01 19:03:47 |
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);
}
w = wait();
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};
}
詳細信息
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3640kb
input:
output:
result:
wrong answer Not correct
Subtask #2:
score: 0
Wrong Answer
Test #11:
score: 0
Wrong Answer
time: 1ms
memory: 3632kb
input:
\x14
output:
result:
wrong answer Not correct
Subtask #3:
score: 0
Runtime Error
Test #66:
score: 10
Accepted
time: 1ms
memory: 3632kb
input:
\x1e
output:
result:
ok Correct: 29 robot(s) used, 2 hour(s) passed
Test #67:
score: 10
Accepted
time: 1ms
memory: 3628kb
input:
\x1e
output:
result:
ok Correct: 29 robot(s) used, 2 hour(s) passed
Test #68:
score: 10
Accepted
time: 1ms
memory: 3632kb
input:
\x1e
output:
result:
ok Correct: 29 robot(s) used, 2 hour(s) passed
Test #69:
score: 10
Accepted
time: 1ms
memory: 3636kb
input:
\x1e
output:
result:
ok Correct: 26 robot(s) used, 2 hour(s) passed
Test #70:
score: 10
Accepted
time: 1ms
memory: 3640kb
input:
\x1e
output:
result:
ok Correct: 26 robot(s) used, 2 hour(s) passed
Test #71:
score: 10
Accepted
time: 1ms
memory: 3608kb
input:
\x1e
output:
result:
ok Correct: 26 robot(s) used, 2 hour(s) passed
Test #72:
score: 10
Accepted
time: 1ms
memory: 3632kb
input:
\x1e
output:
result:
ok Correct: 23 robot(s) used, 2 hour(s) passed
Test #73:
score: 10
Accepted
time: 1ms
memory: 3868kb
input:
\x1e
output:
result:
ok Correct: 23 robot(s) used, 2 hour(s) passed
Test #74:
score: 10
Accepted
time: 1ms
memory: 3576kb
input:
\x1e
output:
result:
ok Correct: 21 robot(s) used, 2 hour(s) passed
Test #75:
score: 10
Accepted
time: 1ms
memory: 3636kb
input:
\x1e
output:
result:
ok Correct: 20 robot(s) used, 2 hour(s) passed
Test #76:
score: 10
Accepted
time: 1ms
memory: 3668kb
input:
\x1e
output:
result:
ok Correct: 22 robot(s) used, 2 hour(s) passed
Test #77:
score: 10
Accepted
time: 1ms
memory: 3584kb
input:
\x1e
output:
result:
ok Correct: 29 robot(s) used, 2 hour(s) passed
Test #78:
score: 10
Accepted
time: 1ms
memory: 3568kb
input:
\x1e
output:
result:
ok Correct: 24 robot(s) used, 2 hour(s) passed
Test #79:
score: 10
Accepted
time: 1ms
memory: 3572kb
input:
\x1e
output:
result:
ok Correct: 22 robot(s) used, 2 hour(s) passed
Test #80:
score: 10
Accepted
time: 1ms
memory: 3636kb
input:
\x1e
output:
result:
ok Correct: 22 robot(s) used, 2 hour(s) passed
Test #81:
score: 10
Accepted
time: 1ms
memory: 3796kb
input:
\x1e
output:
result:
ok Correct: 23 robot(s) used, 2 hour(s) passed
Test #82:
score: 10
Accepted
time: 0ms
memory: 3640kb
input:
\x1e
output:
result:
ok Correct: 20 robot(s) used, 2 hour(s) passed
Test #83:
score: 10
Accepted
time: 1ms
memory: 3644kb
input:
\x1e
output:
result:
ok Correct: 21 robot(s) used, 2 hour(s) passed
Test #84:
score: 10
Accepted
time: 1ms
memory: 3572kb
input:
\x1e
output:
result:
ok Correct: 21 robot(s) used, 2 hour(s) passed
Test #85:
score: 10
Accepted
time: 0ms
memory: 3800kb
input:
\x1e
output:
result:
ok Correct: 22 robot(s) used, 2 hour(s) passed
Test #86:
score: 10
Accepted
time: 1ms
memory: 3520kb
input:
\x1e
output:
result:
ok Correct: 22 robot(s) used, 2 hour(s) passed
Test #87:
score: 10
Accepted
time: 1ms
memory: 3564kb
input:
\x1e
output:
result:
ok Correct: 26 robot(s) used, 2 hour(s) passed
Test #88:
score: 10
Accepted
time: 1ms
memory: 3608kb
input:
\x1e
output:
result:
ok Correct: 29 robot(s) used, 2 hour(s) passed
Test #89:
score: 10
Accepted
time: 0ms
memory: 3612kb
input:
\x1e
output:
result:
ok Correct: 22 robot(s) used, 2 hour(s) passed
Test #90:
score: 10
Accepted
time: 1ms
memory: 3800kb
input:
\x1e
output:
result:
ok Correct: 24 robot(s) used, 2 hour(s) passed
Test #91:
score: 10
Accepted
time: 1ms
memory: 3520kb
input:
\x1e
output:
result:
ok Correct: 23 robot(s) used, 2 hour(s) passed
Test #92:
score: 10
Accepted
time: 1ms
memory: 3636kb
input:
\x1e
output:
result:
ok Correct: 22 robot(s) used, 2 hour(s) passed
Test #93:
score: 10
Accepted
time: 1ms
memory: 3868kb
input:
\x1e
output:
result:
ok Correct: 23 robot(s) used, 2 hour(s) passed
Test #94:
score: 0
Runtime Error
input:
\x1e
output:
result:
Subtask #4:
score: 0
Wrong Answer
Test #120:
score: 0
Wrong Answer
time: 1ms
memory: 3568kb
input:
K
output:
result:
wrong answer Not correct