# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
836195 | unnick | Minerals (JOI19_minerals) | C++14 | 26 ms | 2564 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 "minerals.h"
#include <vector>
using namespace std;
int baseline = 0;
bool cpair(int i) {
int tmp = Query(i);
bool tmp2 = tmp == baseline;
baseline = tmp;
return tmp2;
}
vector<int> fst;
vector<int> snd;
void search(bool filled, int l, int h, vector<int> v) {
if (h-l == 1) {
Answer(fst[l], v[0]);
return;
}
int m = (l+h)/2;
vector<int> lv;
vector<int> hv;
for (int i = l; i < m; i++) cpair(fst[i]);
for (int i = 0; i < h-l; i++) {
if (cpair(v[i]) != filled) {
lv.push_back(v[i]);
} else {
hv.push_back(v[i]);
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |