# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1099893 | model_code | Sphinx's Riddle (IOI24_sphinx) | C++17 | 59 ms | 868 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.
// correct/GA_subtask4.cpp
#include "sphinx.h"
using namespace std;
std::vector<int> find_colours(int N, std::vector<int> X, std::vector<int> Y) {
vector<int> res(N);
int M = X.size();
for (int i = 0; i < N; i++) {
int l = 0;
int u = N;
while (l + 1 < u) {
vector<int> v(N, l);
v[i] = -1;
int m = (l + u) / 2;
for (int k = 0; k < m - l; k++) {
v[k + (k >= i)] = l + k;
}
int n = perform_experiment(v);
(n == m - l ? u : l) = m;
}
res[i] = l;
}
return res;
}
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... |