제출 #974652

#제출 시각아이디문제언어결과실행 시간메모리
974652lucri게임 (IOI14_game)C++17
0 / 100
2 ms4444 KiB
#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]=false; return mu[u][v]; } #endif
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...