제출 #303259

#제출 시각아이디문제언어결과실행 시간메모리
303259sofapuden게임 (IOI14_game)C++14
0 / 100
1 ms256 KiB
#include "game.h" #include <bits/stdc++.h> using namespace std; map<int,int> M; map<int,int> S; int x; int ans = 0; void initialize(int n) { x = n; } int hasEdge(int u, int v) { if(ans == x-2)return 0; M[u]++; M[v]++; if(M[u] == x-1 && S[u]<=1){ S[u]++; S[v]++; ans++; return 1; } if(M[v] == x-1 && S[v]<=1){ S[u]++; S[v]++; ans++; return 1; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...