#include "Anna.h"
#include "bits/stdc++.h"
using namespace std;
namespace {
int n, l, r, ans;
} // namespace
void InitA(int N, int L, int R) {
::n = N;
::l = L;
::r = R;
for (int i = 0; i < 20; ++i) SendA((l >> i) & 1);
}
void ReceiveA(bool x) {
if (l <= r && x) ans = l;
++l;
}
int Answer() {
return ans;
}
#include "Bruno.h"
#include "bits/stdc++.h"
using namespace std;
namespace {
int n, l, cnt, ans = 2e9;
vector<int> p;
} // namespace
void InitB(int N, vector<int> P) {
::n = N;
::p = P;
}
void ReceiveB(bool y) {
if (y) l |= 1 << cnt;
++cnt;
if (cnt < 20) return;
for (int i = l; i < n; ++i) {
if (ans <= p[i]) {
SendB(0);
continue;
}
ans = p[i];
SendB(1);
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Failed |
0 ms |
200 KB |
Expected integer, but "Wrong" found (Anna) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Failed |
0 ms |
200 KB |
Expected integer, but "Wrong" found (Anna) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Failed |
0 ms |
200 KB |
Expected integer, but "Wrong" found (Anna) |
2 |
Halted |
0 ms |
0 KB |
- |