이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
/*
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... |