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;
namespace {
int n, l, r;
int cnt=0;
const int INF=1e9;
vector<int> v;
} // namespace
void InitA(int N, int L, int R) {
n = N;
l = L;
r = R;
v.resize(n);
}
void ReceiveA(bool x) {
int x1=x;
int p=cnt/10;
int p1=cnt%10;
v[p]+=(x1<<p1);
cnt++;
}
int Answer() {
int ans=l;
for(int i=l+1;i<=r;i++){
ans=(v[ans]<v[i]?ans:i);
}
return ans;
}
#include "Bruno.h"
#include <bits/stdc++.h>
using namespace std;
namespace {
int n;
vector<int> v(1000000);
int count;
} // namespace
void InitB(int N, vector<int> P) {
v=P;
n=N;
for(int i=0;i<N;i++){
for(int j=0;j<10;j++){
SendB((v[i]>>j)&1);
}
}
}
void ReceiveB(bool y) {
}
Compilation message (stderr)
Bruno.cpp:9:5: warning: '{anonymous}::count' defined but not used [-Wunused-variable]
9 | int count;
| ^~~~~
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |