제출 #386100

#제출 시각아이디문제언어결과실행 시간메모리
386100Azimjon게임 (IOI14_game)C++17
0 / 100
2 ms364 KiB
#include "game.h" #include <bits/stdc++.h> using namespace std; int n; vector<vector<int>> g; void initialize(int n) { ::n = n; g.assign(n, vector<int>(n, -1)); for (int i = 0; i < n; i++) { g[i][i] = 0; } } int hasEdge(int u, int v) { bool us, vs; us = vs = 0; int bu, bv; bu = bv = 0; for (int i = 0; i < n; i++) { us = us || (g[u][i] == 1); vs = vs || (g[v][i] == 1); bu += (g[u][i] == -1); bv += (g[v][i] == -1); } if (g[u][v] == -1 && (!us && !vs)) { g[u][v] = g[v][u] = 1; return 1; } g[u][v] = g[v][u] = 0; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...