Submission #788366

#TimeUsernameProblemLanguageResultExecution timeMemory
788366mindiyakGame (IOI14_game)C++14
100 / 100
258 ms15048 KiB
#include "game.h" #include <iostream> #include <vector> #include <set> using namespace std; int N; vector<int> connected(1502,0); void initialize(int n) { N = n; } int hasEdge(int u, int v) { if(u==v){ return 1; } // cout << "u size " << asked[u].size() << " " << u << " " << v << " " << find_parent(u) << endl; // if(find_parent(u) == v) // return 1; // if(find_parent(v) == u) // return 1; if(u<v){ swap(u,v); } connected[u]++; // connected[v]++; // cout << "u-"<<u << " v-" << v << " c[u]-" << connected[u] << " c[v]-" << connected[v] << endl; if(connected[u] == u){ return 1; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...