This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#ifndef _GAME_H
#define _GAME_H
bool mu[1510][1510],rf[1510][1510];
int N;
void initialize(int n)
{
N=n;
for(int i=0;i<n;++i)
{
for(int j=0;j<n;++j)
mu[i][j]=true;
mu[i][i]=false;
}
}
int hasEdge(int u, int v)
{
for(int i=0;i<N;++i)
{
for(int j=0;j<N;++j)
rf[i][j]=mu[i][j];
}
rf[u][v]=rf[v][u]=false;
for(int k=0;k<N;++k)
for(int i=0;i<N;++i)
for(int j=0;j<N;++j)
if(rf[i][k]&&rf[k][j])
rf[i][j]=true;
if(rf[u][v]==true)
mu[u][v]=mu[v][u]=false;
return mu[u][v];
}
#endif
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |