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 <vector>
#include <cstring>
using namespace std;
namespace A {
const int N = 1000000;
int aa[N];
int n, l, r, h, i;
}
using namespace A;
void InitA(int N, int L, int R) {
n = N, l = L, r = R;
memset(aa, 0, n * sizeof *aa);
}
void ReceiveA(bool x) {
i = 0, h = 0;
if (x)
aa[i] |= 1 << h;
if (++h == 10)
i++, h = 0;
}
int Answer() {
int i_ = -1;
for (int i = l; i <= r; i++)
if (i_ == -1 || aa[i_] > aa[i])
i_ = i;
return i_;
}
#include "Bruno.h"
#include <vector>
using namespace std;
namespace B {
int n;
}
using namespace B;
typedef vector<int> vi;
void InitB(int N, vi pp) {
n = N;
for (int i = 0; i < n; i++)
for (int h = 0; h < 10; h++)
SendB(pp[i] >> h & 1);
}
void ReceiveB(bool y) { }
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |