QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#428376#7281. How to Avoid Disqualification in 75 Easy StepsSmilingBraniac#0 1ms3848kbC++141.1kb2024-06-01 19:08:542024-06-01 19:09:01

Judging History

你现在查看的是最新测评结果

  • [2024-06-01 19:09:01]
  • 评测
  • 测评结果:0
  • 用时:1ms
  • 内存:3848kb
  • [2024-06-01 19:08:54]
  • 提交

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};
}

詳細信息

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