# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1051272 | vjudge1 | Shopping (JOI21_shopping) | C++17 | 0 ms | 0 KiB |
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 "Bruno.h"
#include <vector>
namespace {
int N;
int variable_example[1000000];
int count;
bool FunctionExample(bool P) {
return !P;
}
} // namespace
void InitB(int N, std::vector<int> P) {
::N = N;
for(int i = 0; i < N; i++) {
variable_example[i] = P[i];
}
count = 0;
}
int stuf;
void ReceiveB(bool y) {
stuf=stuf*2+y;
if(++count==18){
int curmn=1e9;
for(int i=stuf;i<N;i++)
if(variable_example[i]<curmn)
curmn=variable_example[i],SendB(1);
else SendB(0);
}
}