제출 #727622

#제출 시각아이디문제언어결과실행 시간메모리
727622mgl_diamondTeams (IOI15_teams)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #define all(x) (x).begin(),(x).end() #define sz(x) (int)(x).size() #define C make_pair #define vec vector #define ins push_back #define fi first #define se second using namespace std; using ll = long long; using ii = pair<int, int>; int n; multiset<ii> avail; void init(int N, int A[], int B[]) { n = N; for(int i=0; i<n; ++i) avail.insert({A[i], B[i]}); } bool can(int M, int K[]) { sort(K, K+M); for(int i=0; i<M; ++i) { vec<ii> cands; for(auto x : avail) if (x.fi <= K[i] && x.se >= K[i]) cands.emplace_back(x.se, x.fi); if (i > sz(cands)) return 0; sort(all(cands)); for(int j=0; j<i; ++j) avail.erase(avail.find({cands[j].se, cands[j].fi})); } return 1; } int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); }

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

/usr/bin/ld: /tmp/cc4hPObS.o: in function `main':
grader.c:(.text.startup+0x0): multiple definition of `main'; /tmp/ccILLOpT.o:teams.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status