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 <bits/stdc++.h>
#include "game.h"
using namespace std;
vector<vector<int>> lft;
vector<int> cnt ;
void initialize(int n){
lft.resize(n,vector<int>(n,-1)) ;
cnt.resize(n) ;
for(int i=0;i<n;i++) cnt[i]=n-1-i ;
return ;
}
int hasEdge(int a , int b){
if(a>b) swap(a,b);
if(lft[a][b]!=-1){
return lft[a][b];
}
cnt[a]--;
if(cnt[a]){
lft[a][b]=0 ;
return lft[a][b];
}
lft[a][b]=1;
return 1 ;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |