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 <bits/stdc++.h>
using namespace std;
vector<int> find_split(int n, int a, int b, int c, vector<int> p, vector<int> q) {
vector<int> g(n);
vector<vector<int>> adj(n, vector<int> (n, 3));
queue<int> nx;
nx.push(0);
while (!nx.empty()) {
int att = nx.front(); nx.pop();
for (int i : adj[att]) {
if (b == 0) break;
if (g[i] == 2) continue;
nx.push(i);
g[i] = 2;
b--;
}
if (b == 0) break;
}
for (int i = 0; i < n; i++) {
if (g[i] == 3) {
g[i] = 1; break;
}
}
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... |