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 <iostream>
#include <fstream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#define pb push_back
using namespace std;
const int maxn = 1505;
int n, r;
int a[maxn][maxn];
void initialize(int n) {
::n = n;
r = n * (n - 1) / 2;
for(int i = 0; i < n; i ++) {
for(int j = 0; j < n; j ++)
a[i][j] = -1;
}
}
int done[maxn];
int hasEdge(int x, int y) {
/*
if(done[x] < n - 2 && done[y] < n - 2) {
done[x] ++;
done[y] ++;
return 0;
} else {
done[x] ++;
done[y] ++;
return 1;
}
*/
if(x > y)
swap(x, y);
if(done[y] == y - 1)
return 1;
else {
done[y] ++;
return 0;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |