제출 #1119015

#제출 시각아이디문제언어결과실행 시간메모리
1119015dsyz게임 (IOI14_game)C++17
0 / 100
2 ms592 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; #define MAXN (1000005) ll N; vector<vector<ll> > edges; void initialize(int n) { N = n; for(ll i = 0;i < N;i++){ vector<ll> col; for(ll i = 0;i < N;i++){ col.push_back(1); } edges.push_back(col); } for(ll i = 0;i < N;i++){ edges[i][i] = 0; } } int hasEdge(int u, int v) { ll connectedtou = 0, connectedtov = 0; for(ll i = 0;i < N;i++){ if(edges[u][i] == 1){ connectedtou++; } } for(ll i = 0;i < N;i++){ if(edges[v][i] == 1){ connectedtov++; } } if(connectedtou == 1 || connectedtov == 1){ return 1; }else{ edges[u][v] = 0; edges[v][u] = 0; return 0; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...