Submission #1023568

#TimeUsernameProblemLanguageResultExecution timeMemory
1023568HappyCapybaraGame (IOI14_game)C++17
15 / 100
1 ms600 KiB
#include "game.h" #include<bits/stdc++.h> using namespace std; int N, x; vector<int> w; vector<vector<int>> am; void initialize(int n){ N = n; w.resize(N, N-1); am.resize(N, vector<int>(N, 1)); x = 0; } int hasEdge(int u, int v){ if (w[u] == 1 || w[v] == 1){ return 1; } if ((x == 2) && (w[u] == 2 || w[v] == 2)) return 1; w[u]--; w[v]--; //cout << w[u] << "\n"; if (w[u] == 1) x++; if (w[v] == 1) x++; //cout << x << "\n"; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...