제출 #779469

#제출 시각아이디문제언어결과실행 시간메모리
779469Dakto게임 (IOI14_game)C++17
0 / 100
1079 ms212 KiB
#include<bits/stdc++.h> using namespace std; int n; vector<set<int>> gr; void initialize(int N){ n=N; gr.resize(n); for(int i=0; i<n; i++){ for(int j=i+1; j<n; j++){ gr[i].insert(j); gr[j].insert(i); } } } int hasEdge(int u, int v){ vector<bool> seen(n,0); queue<int> q; q.push(u); seen[u]=1; while(!q.empty()){ auto t=q.front(); if(t==v){ gr[u].erase(v); gr[v].erase(u); return 0; } for(auto i:gr[t]){ if(t==u && i==v) continue; if(!seen[i]){ seen[i]=1; q.push(i); } } } return 1; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...