This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "Anna.h"
#include "bits/stdc++.h"
using namespace std;
int ans;
void InitA(int n, int l, int r) {
for (int i = 0; i < 9; ++i) SendA(bool(l & (1<<i)));
for (int i = 0; i < 9; ++i) SendA(bool(r & (1<<i)));
}
void ReceiveA(bool x) {
for (int i = 0; i <= 9; ++i) ans |= 1<<i;
}
int Answer() {
return ans;
}
#include "Bruno.h"
#include "bits/stdc++.h"
using namespace std;
int l, r, cnt1, cnt2, ans = 2e9;
void InitB(int n, vector<int> p) {
for (int i = l; i <= r; ++i) ans = min(ans, p[i]);
for (int i = 0; i <= 9; ++i) SendB(bool(ans & (1<<i)));
}
void ReceiveB(bool x) {
if (cnt1 == 9) {
r |= 1<<cnt2;
++cnt2;
}
l |= 1<<cnt1;
++cnt1;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |