# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
70345 | Angelos | Game (IOI14_game) | C++11 | 0 ms | 0 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 "grader.h"
#include "game.h"
#include <bits/stdc++.h>
#define MAXN 1010
int R[MAXN] , S[MAXN][MAXN] , sz[MAXN] , dis[MAXN] , N;
using namespace std;
void initialize(int n) {
memset(dis , 0 , sizeof dis);
N = n;
for(int i=0; i<n; i++) R[i] = i , sz[i] = 1;
for(int i=0; i<n; i++)
for(int j=0; j<n; j++)
S[i][j] = (i != j) ? 1 : 0;
}
int fat(int x){
if(R[x] == x) return x;
R[x] = fat(R[x]);
return R[x];
}