| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1288111 | LIA | How to Avoid Disqualification in 75 Easy Steps (CEOI23_avoid) | C++17 | 0 ms | 0 KiB |
#include "avoid.h"
#include <vector>
#include <bits/stdc++.h>
using namespace std;
#include "sample_grader.cpp"
#define ll int
#define vll vector<ll>
std::pair<int, int> scout(int r, int h) {
ll ans = 0;
vector<vector<ll>> ask(r);
for (ll i = 1; i <= 1000; ++i) {
for (ll j = 0; j < 9; ++j) {
if (i & (1LL << j)) {
ask[j].push_back(i);
}
}
}
for (auto it : ask) {
send(it);
}
vll ansi = wait();
for (ll i = 0; i < 9; ++i) {
if (ansi[i] == 1)
ans |= (1LL << i);
}
return {ans, ans};
}
