# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
930572 |
2024-02-20T06:55:56 Z |
vjudge1 |
Game (IOI14_game) |
C++17 |
|
0 ms |
0 KB |
#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 12, MOD = 998244353;
typedef long long ll;
#include "game.h"
int _n;
int read_int() {
int x;
assert(scanf("%d", &x) == 1);
return x;
}
void initialize(int n) {
_n = n;
}
int col[N];
int hasEdge(int u, int v) {
if(col[u] == _n - 2){
return 1;
}
if(col[v] == _n - 2){
return 1;
}
col[v]++;
col[u]++;
return 0;
}
int p[N];
int get(int v){
if(p[v] == v) return v;
return p[v] = get(p[v]);
}
void merge(int a,int b){
a = get(a);
b = get(b);
p[a] = b;
}
//int main() {
// int n, u, v;
// n = read_int();
// initialize(n);
// for(int i = 0;i < n;i++){
// p[i] = i;
// }
// for (int i = 0; i < n * (n - 1) / 2; i++) {
// u = read_int();
// v = read_int();
// if (hasEdge(u, v)) {
// puts("1");
// merge(u,v);
// }
// else puts("0");
//
// }
// return 0;
//}
Compilation message
/usr/bin/ld: /tmp/cclGHvek.o: in function `read_int()':
grader.cpp:(.text+0x0): multiple definition of `read_int()'; /tmp/ccvUZ2dj.o:game.cpp:(.text+0x0): first defined here
collect2: error: ld returned 1 exit status