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;
int a,b,c,d,e,i,j,ii,jj,zx,xc,msh[1509],zm[1509],k[1509],cnt,bo[1509];
int B[1509][1509];
void initialize(int n) {
a=n;
}
void dfs(int q){
bo[q]=cnt;e++;
for(int h=0; h<a; h++){
if(h!=q&&bo[h]!=cnt&&B[q][h]==0) dfs(h);
}
}
int hasEdge(int qqa, int qqb) {
c=qqa;d=qqb;
cnt++;
B[c][d]=1;
B[d][c]=1;
e=0;
dfs(1);
if(e==a){
return 0;
}else{
B[c][d]=0;
B[d][c]=0;
return 1;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |