QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#465877#7281. How to Avoid Disqualification in 75 Easy StepsForested10 1ms3616kbC++171.4kb2024-07-07 12:45:402024-07-07 12:45:40

Judging History

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

  • [2024-07-07 12:45:40]
  • 评测
  • 测评结果:10
  • 用时:1ms
  • 内存:3616kb
  • [2024-07-07 12:45:40]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

using i32 = int;
using i64 = long long;
template <typename T>
using V = vector<T>;
template <typename T>
using VV = V<V<T>>;

#define OVERRIDE4(a, b, c, d, ...) d
#define REP2(i, n) for (i32 i = 0; i < (i32)(n); ++i)
#define REP3(i, l, r) for (i32 i = (i32)(l); i < (i32)(r); ++i)
#define REP(...) OVERRIDE4(__VA_ARGS__, REP3, REP2)(__VA_ARGS__)
#define PER2(i, n) for (i32 i = (i32)(n) - 1; i >= 0; --i)
#define PER3(i, l, r) for (i32 i = (i32)(r) - 1; i >= (i32)(l); --i)
#define PER(...) OVERRIDE4(__VA_ARGS__, PER3, PER2)(__VA_ARGS__)
#define ALL(x) begin(x), end(x)
#define LEN(x) (i32)(size(x))

template <typename T>
bool chmin(T &x, const T &y) {
    if (x > y) {
        x = y;
        return true;
    }
    return false;
}
template <typename T>
bool chmax(T &x, const T &y) {
    if (x < y) {
        x = y;
        return true;
    }
    return false;
}

#include "avoid.h"

constexpr i32 L = 1000;

pair<i32, i32> scout(i32 r, i32 h) {
    assert(r == 10 && h == 1);
    REP(i, 10) {
        V<i32> p;
        REP(j, 1, L + 1) {
            if (j & (1 << i)) {
                p.push_back(j);
            }
        }
        send(p);
    }
    V<i32> ret = wait();
    i32 ans = 0;
    REP(i, 10) {
        if (ret[i]) {
            ans ^= 1 << i;
        }
    }
    return pair<i32, i32>(ans, ans);
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 10
Accepted

Test #1:

score: 10
Accepted
time: 0ms
memory: 3604kb

input:



output:


result:

ok Correct: 10 robot(s) used, 1 hour(s) passed

Test #2:

score: 0
Accepted
time: 1ms
memory: 3612kb

input:



output:


result:

ok Correct: 10 robot(s) used, 1 hour(s) passed

Test #3:

score: 0
Accepted
time: 1ms
memory: 3548kb

input:



output:


result:

ok Correct: 10 robot(s) used, 1 hour(s) passed

Test #4:

score: 0
Accepted
time: 1ms
memory: 3612kb

input:



output:


result:

ok Correct: 10 robot(s) used, 1 hour(s) passed

Test #5:

score: 0
Accepted
time: 1ms
memory: 3544kb

input:



output:


result:

ok Correct: 10 robot(s) used, 1 hour(s) passed

Test #6:

score: 0
Accepted
time: 1ms
memory: 3580kb

input:



output:


result:

ok Correct: 10 robot(s) used, 1 hour(s) passed

Test #7:

score: 0
Accepted
time: 0ms
memory: 3608kb

input:



output:


result:

ok Correct: 10 robot(s) used, 1 hour(s) passed

Test #8:

score: 0
Accepted
time: 1ms
memory: 3612kb

input:



output:


result:

ok Correct: 10 robot(s) used, 1 hour(s) passed

Test #9:

score: 0
Accepted
time: 0ms
memory: 3540kb

input:



output:


result:

ok Correct: 10 robot(s) used, 1 hour(s) passed

Test #10:

score: 0
Accepted
time: 0ms
memory: 3616kb

input:



output:


result:

ok Correct: 10 robot(s) used, 1 hour(s) passed

Subtask #2:

score: 0
Runtime Error

Test #11:

score: 0
Runtime Error

input:

\x14

output:


result:


Subtask #3:

score: 0
Runtime Error

Test #66:

score: 0
Runtime Error

input:

\x1e

output:


result:


Subtask #4:

score: 0
Runtime Error

Test #120:

score: 0
Runtime Error

input:

K

output:


result: