Submission #1005637

#TimeUsernameProblemLanguageResultExecution timeMemory
1005637spensaGame (IOI14_game)C++14
100 / 100
775 ms61752 KiB
#include "game.h" #include <bits/stdc++.h> using namespace std; // #include <vector> int N; void initialize(int n) { N = n; } const int MXN = 1500 + 20; int par[MXN] = {0}; // int notpar[MXN]; // vector<vector<int>> notpar(MXN); set<int> notpar[MXN]; int hasEdge(int u, int v) { if(u>v){ int tmp = u; u = v; v = tmp; //swap(u, v); } // cout<<" "<<notpar[v].size()<<" "; int tmp = notpar[v].size(); // cout<<"\n"<<u<<" "<<v<<" "<<tmp<<"\n"; if(tmp>(v-2) && notpar[v].count(u)==0){ // cout<<"!!!\n"; par[v] = u; return 1; } notpar[v].insert(u); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...