답안 #365285

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
365285 2021-02-11T11:30:13 Z Mlxa CONSUL (info1cup19_consul) C++14
컴파일 오류
0 ms 0 KB
#ifdef LC
#include "pch.h"
#else
#include <bits/stdc++.h>
#include "grader.h"
#endif
using namespace std;
using ll = long long;
#define int ll
#define all(x) x.begin(), x.end()
#define x first
#define y second
#define mp make_pair
#define mt make_tuple

int kth(int i);
int cnt(int x);
void say_answer(int a);

mt19937 rnd;

void solve(int n) {
	int q = 56;
	set<int> ind;
	set<int> was;
	while (q > 0) {
		int i = rnd() % n;
		while (ind.count(i)) {
			i = rnd() % n;
		}
		int v = kth(i);
		--q;
		if (was.count(v)) {
			continue;
		}
		int c = cnt(v);
		--q;
		if (3 * c > n) {
			say_answer(i);
			return;
		}
	}
}

#ifdef LC
signed main() {
    assert(freopen("input.txt", "r", stdin));
    ios::sync_with_stdio(0); cin.tie(0);
    
    return 0;
}
#endif

Compilation message

/tmp/cc3z4fYm.o: In function `solve(long long)':
consul.cpp:(.text+0xda): undefined reference to `kth(long long)'
consul.cpp:(.text+0x169): undefined reference to `cnt(long long)'
consul.cpp:(.text+0x182): undefined reference to `say_answer(long long)'
/tmp/ccc48MsI.o: In function `main':
grader.cpp:(.text.startup+0xa0): undefined reference to `solve(int)'
collect2: error: ld returned 1 exit status