#include "sphinx.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define vi vector<int>
#define vll vector<ll>
#define str string
#define vd void
#define vb vector<bool>
#define F first
#define S second
#define lbr '\n'
#define all(x) x.begin(), x.end()
const ll INF = 1E15;
vi find_colours(int n, vi x, vi y) {
vi res(n, 0), vc(n, -1), a(n, 0);
ll m = x.size();
for (int i=0; i<m; i++) {
a[x[i]] = y[i];
a[y[i]] = x[i];
}
ll r = perform_experiment(vc);
for (int i=0; i<n; i++) {
for (int j=0; j<n; j++) {
vc[a[i]] = j;
ll aux = perform_experiment(vc);
if (aux == r) {
res[i] = j;
vc[a[i]]=-1;
break;
}
}
}
return res;
}
| # | 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... |