# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
708949 | kostia244 | Shopping (JOI21_shopping) | C++17 | 9 ms | 404 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 "Anna.h"
#include <bits/stdc++.h>
using namespace std;
namespace {
int N, L, R;
int best, pos;
} // namespace
void InitA(int N, int L, int R) {
::N = N;
::L = L;
::R = R;
best = pos = L;
for(int i = 0; i < 18; i++)
SendA((L >> i) & 1);
}
void ReceiveA(bool x) {
++pos;
if(pos <= R && x)
best = pos;
}
int Answer() {
return best;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |