제출 #315495

#제출 시각아이디문제언어결과실행 시간메모리
315495qpwoeirut게임 (IOI14_game)C++17
0 / 100
0 ms384 KiB
#include "game.h" const int MN = 1501; int N; int mat[MN][MN]; int ct[MN]; void initialize(int n) { N = n; for (int i=0; i<N; ++i) { for (int j=0; j<N; ++j) { mat[i][j] = -1; } ct[i] = 0; mat[i][i] = 1; } } int hasEdge(int u, int v) { if (mat[u][v] != -1) return mat[u][v]; ++ct[u]; ++ct[v]; mat[u][v] = (ct[u] == N-1) || (ct[v] == N-1); mat[v][u] = mat[u][v]; return mat[u][v]; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...