# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
171713 | Nodir_Bobiev | Game (IOI14_game) | C++14 | 2 ms | 400 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>
# define FILE
using namespace std;
int n,cnt[2000][2000];
int p[2000], sz[2000];
int get( int x ){
if( p[x] == x )return x;
else return p[x] = get( p[x] );
}
void unin( int x, int y ){
x = get( x );
y = get( y );
p[x] = y;
sz[y] += sz[x];
for( int i = 0; i < n; i ++ ){
cnt[y][i] += cnt[x][i];
cnt[i][y] += cnt[x][i];
}
}
void initialize( int m ){
n = m;
for( int i = 0; i < n; i ++ ){
p[i] = i;
sz[i] = 1;
}
}
bool hasEdge( int u, int v ){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |