#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;
while (l + 1 < r) {
int mid = (l + r) / 2;
vector<int> E(N, -1);
int cnt = l;
set<int> unique;
for (int j = 0; j < N; j++) {
if (i == j) continue;
E[j] = cnt;
unique.insert(cnt);
cnt = min(cnt + 1, mid);
}
int x = perform_experiment(E);
if (x == unique.size()) r = mid + 1;
else l = mid + 1;
}
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... |