Submission #907250

#TimeUsernameProblemLanguageResultExecution timeMemory
907250Captain_GeorgiaGame (IOI14_game)C++17
100 / 100
258 ms26732 KiB
#include "game.h" #include <bits/stdc++.h> using namespace std; const int mx = 1550; int dp[mx][mx], ind[mx]; void initialize(int n) { for(int i=0;i<n;i++) { for(int j=i+1;j<n;j++) { dp[i][j] = -1; } ind[i] = 0; } } int hasEdge(int l, int r) { if(l>r){ swap(l,r); } if(dp[l][r] != -1){ return dp[l][r]; } if(++ind[r] == r){ dp[l][r] = 1; } else{ dp[l][r] = 0; } return dp[l][r]; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...