This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
/*
I find it wholesome to be alone the greater part of the time.
To be in company, even with the best, is soon wearisome and dissipating.
I love to be alone.
I never found the companion that was so companionable as solitude.
*/
#include <bits/stdc++.h>
#define pb push_back
#define fi first
#define se second
#define faster ios_base::sync_with_stdio(0); cin.tie(0);
#include "game.h"
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair <int, int>;
const int maxN = 1e5 + 1;
//const int Mod = 1e9 + 7;
//const int inf =
int n;
int cnt[maxN];
int m;
int c;
int req = n - 1;
void initialize(int _n){
n = _n;
m = n * (n - 1) / 2;
}
int hasEdge(int u, int v){
++c;
++cnt[u];
++cnt[v];
if (c >= m - req || cnt[u] == n - 1 || cnt[v] == n - 1){
--req;
return 1;
}
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... |