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 v1[mx][mx], v2[mx];
void initialize(int n) {
for(int i=0; i<n; ++i){
for(int j=i+1; j<n; ++j){
v1[i][j] = -1;
}
v2[i] = 0;
}
}
int hasEdge(int l, int r) {
if(v1[l][r] != -1){
return v1[l][r];
}
if(++v2[r] == r){
v1[l][r] = 1;
}
else{
v1[l][r] = 0;
}
return v1[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... |