제출 #1015980

#제출 시각아이디문제언어결과실행 시간메모리
1015980SulA마술쇼 (APIO24_show)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; vector<pair<int, int>> Alice() { long long x = setN(5000); vector<pair<int,int>> tree; for (int i = 1; i <= x; i++) { if (i != x) { tree.push_back({i, x}); } } return tree; }
#include <bits/stdc++.h> using namespace std; long long Bob(vector<pair<int,int>> tree) { int cnt[5001] = {}; for (auto [u,v] : tree) { cnt[u]++, cnt[v]++; } return int(max_element(cnt, cnt+5001) - cnt); }

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

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