# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
824217 | rnl42 | Game (IOI14_game) | C++14 | 1 ms | 340 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.
#include "game.h"
#include <bits/stdc++.h>
using namespace std;
struct UF {
vector<int> pere;
void init(int n) {
pere.resize(n);
iota(pere.begin(), pere.end(), 0);
}
int root(int x) {
return x == pere[x] ? x : pere[x] = root(pere[x]);
}
void merge(int x, int y) {
pere[root(x)] = root(y);
}
};
UF uf;
vector<int> non_explore;
vector<vector<int>> graphe;
void initialize(int n) {
uf.init(n);
non_explore.assign(n, n-1);
graphe.assign(n, vector<int>(n, -1));
for (int i=0; i < n; i++) {
graphe[i][i] = 2;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |