제출 #399557

#제출 시각아이디문제언어결과실행 시간메모리
399557mshandilya게임 (IOI14_game)C++14
0 / 100
1 ms308 KiB
#include <bits/stdc++.h> #include "game.h" using namespace std; int nodes; std::vector<int> to_ask; std::vector<bool> connected; void initialize(int n) { nodes = n; to_ask.assign(n, n-1); connected.assign(n, false); } int hasEdge(int u, int v) { if((to_ask[u]==1 and !connected[u]) or (to_ask[v]==1 and !connected[v])) { to_ask[u]--; to_ask[v]--; connected[u] = true; connected[v] = true; return 1; } else { to_ask[u]--; to_ask[v]--; return 0; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...