이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "game.h"
#define st first
#define nd second
#define mp make_pair
#define pb push_back
#define mod 1000000007
#define N 1000005
using namespace std;
typedef long long ll;
int n, deg[N];
void initialize(int nn){
n = nn;
}
int hasEdge(int u, int v){u++;v++;
int don = (deg[u] >= n - 2 or deg[v] >= n - 2);
deg[u]++;deg[v]++;
return don;
}
// int read_int() {
// int x;
// assert(scanf("%d", &x) == 1);
// return x;
// }
// int main() {
// freopen("in.txt", "r", stdin);
// freopen("out.txt", "w", stdout);
// int n, u, v;
// n = read_int();
// initialize(n);
// for (int i = 0; i < n * (n - 1) / 2; i++) {
// u = read_int();
// v = read_int();
// printf("%d\n", hasEdge(u, v));
// }
// 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... |