# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
83671 | AdrienVannson | Werewolf (IOI18_werewolf) | C++17 | 1303 ms | 135624 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 <bits/stdc++.h>
#include "werewolf.h"
using namespace std;
template<int NB_NOEUDS>
class UnionFind
{
public:
UnionFind ()
{
for (int iNoeud=0; iNoeud<NB_NOEUDS; iNoeud++) {
representants[iNoeud] = iNoeud;
tailles[iNoeud] = 1;
}
}
int representant (const int iNoeud)
{
if (representants[iNoeud] == iNoeud) {
return iNoeud;
}
return representants[iNoeud] = representant(representants[iNoeud]);
}
int taille (const int iNoeud)
{
return tailles[representant(iNoeud)];
# | 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... |