This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |