제출 #201671

#제출 시각아이디문제언어결과실행 시간메모리
201671DavidDamian게임 (IOI14_game)C++11
42 / 100
12 ms888 KiB
#include "game.h" #include<bits/stdc++.h> using namespace std; int n; void initialize(int N) { n=N; } vector<int> nodes; vector<int> adjList[1505]; void dfs(int u,int e) { nodes.push_back(u); for(int v: adjList[u]){ if(e==v) continue; dfs(v,u); } } int asked[100][100]; int hasEdge(int u, int v) { nodes.clear(); asked[u][v]=1; asked[v][u]=1; adjList[u].push_back(v); adjList[v].push_back(u); dfs(u,-1); for(int i: nodes){ for(int j: nodes){ if(i==j) continue; if(asked[i][j]==0){ adjList[u].pop_back(); adjList[v].pop_back(); return 0; } } } return 1; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...