제출 #1082124

#제출 시각아이디문제언어결과실행 시간메모리
1082124logangd게임 (IOI14_game)C++14
42 / 100
1094 ms3724 KiB
#include "game.h" int N,ar[1500][1500],vs[1500],c=0; void initialize(int n) { N=n; for(int i=0;i<n;i++) for(int j=0;j<n;j++) if(i!=j)ar[i][j]=1; } bool dfs(int u,int v){ if(u==v)return 1; vs[u]=c; for(int i=0;i<N;i++) if(ar[u][i]&&vs[i]!=c) if(dfs(i,v))return 1; return 0; } int hasEdge(int u,int v){ c++; ar[u][v]=ar[v][u]=0; if(dfs(u,v))return 0; ar[u][v]=ar[v][u]=1; return 1; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...