#include <bits/stdc++.h>
#include "sphinx.h"
using namespace std;
vector<int> find_colours(int N, vector<int> X, vector<int> Y) {
vector<int> G(N, 0);
for (int i = 0; i < N; i++) {
int l = 0, r = N + 1;
while (l + 1 < r) {
int mid = (l + r) / 2;
vector<int> E(N, -1);
int cnt = l;
int unique = 1;
for (int j = 0; j < N; j++) {
if (i == j) continue;
E[j] = cnt;
cnt++;
if (cnt > mid) cnt = mid;
else unique++;
}
int x = perform_experiment(E);
if (x == unique) l = mid;
else r = mid;
}
G[i] = l;
}
return G;
}
# | 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... |