Submission #552030

#TimeUsernameProblemLanguageResultExecution timeMemory
552030razvanGame (IOI14_game)C++14
100 / 100
283 ms16964 KiB
#include "game.h" #include <iostream> #include <fstream> #include <cstdio> #include <algorithm> #include <vector> #include <string> #include <map> #define pb push_back using namespace std; const int maxn = 1505; int n, r; int a[maxn][maxn]; void initialize(int n) { ::n = n; r = n * (n - 1) / 2; for(int i = 0; i < n; i ++) { for(int j = 0; j < n; j ++) a[i][j] = -1; } } int done[maxn]; int hasEdge(int x, int y) { /* if(done[x] < n - 2 && done[y] < n - 2) { done[x] ++; done[y] ++; return 0; } else { done[x] ++; done[y] ++; return 1; } */ if(x > y) swap(x, y); if(done[y] == y - 1) return 1; else { done[y] ++; return 0; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...