제출 #901971

#제출 시각아이디문제언어결과실행 시간메모리
901971Faisal_Saqib게임 (IOI14_game)C++17
0 / 100
1 ms348 KiB
// #pragma once #include <map> #include "game.h" using namespace std; const int N=100; int deg[N]; map<pair<int,int>,int> done; int l=0; void initialize(int n) { l=(n*(n-1))/2; done.clear(); for(int i=0;i<=n;i++) deg[i]=n-1; } int hasEdge(int u, int v) { l--; if(l==0) return 0; if(done.find({u,v})==done.end()) { deg[u]--; deg[v]--; if(deg[u]==0 or deg[v]==0) { done[{u,v}]=done[{v,u}]=1; } else { done[{u,v}]=done[{v,u}]=0; } } return done[{u,v}]; // We have }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...