제출 #1196982

#제출 시각아이디문제언어결과실행 시간메모리
1196982b00legen마술쇼 (APIO24_show)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
using ll = long long;

vector<pair<int, int> > Alice(){
	ll x = setN(5000);
	vector<pair<int, int> >res;
	for (int i = 1; i <= 5000; i++) {
		if (x == i)
		continue;
		else
		res.push_back({i, x});
	}
	return res;
}
#include <bits/stdc++.h>
using namespace std;
using ll = long long;

ll Bob(vector<pair<int, int> >V) {
	int cnt[5001];
	for (int i = 0; i <= 5000; i++)
	cnt[i] = 0;
	for (size_t i = 0; i < V.size(); i++) {
		cnt[V[i].first]++;
		cnt[V[i].second]++;
	}
	ll res = 0;
	for (int i = 1; i <= 5000; i++)
	if (cnt[res] < cnt[i])
	res = i;
	return res;
}

컴파일 시 표준 에러 (stderr) 메시지

# 1번째 컴파일 단계

Alice.cpp: In function 'std::vector<std::pair<int, int> > Alice()':
Alice.cpp:6:16: error: 'setN' was not declared in this scope
    6 |         ll x = setN(5000);
      |                ^~~~