제출 #827182

#제출 시각아이디문제언어결과실행 시간메모리
827182LeSonnn마상시합 토너먼트 (IOI12_tournament)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #define task "tournament" using namespace std; typedef long long ll; typedef pair <int, int> ii; #define fi first #define se second const int N = 1e6 + 9; ll n, m, k; set<ll> s; void progress() { cin >> n >> m; for (int i = 1; i <= n; i++) { s.insert(i); } vector <ll> ans(n + 1), res; for ( ; m--;) { ll l, r, w; cin >> l >> r >> w; auto it = s.lower_bound(l); res.clear(); while (it != s.end() && *it <= r) { if (*it != w) { ans[*it] = w; res.emplace_back(*it); } it++; } for (auto i : res) { s.erase(i); } } for (int i = 1; i <= n; i++) { cout << ans[i] << " "; } } signed main() { // Author : Shyn_ ios_base::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL); ll nt(1); // cin >> nt; for ( ; nt--;) { progress(); } return 0; } /* LCG */

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

/usr/bin/ld: /tmp/ccFP4HFI.o: in function `main':
tournament.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccfVdMKH.o:grader.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccfVdMKH.o: in function `main':
grader.cpp:(.text.startup+0x118): undefined reference to `GetBestPosition(int, int, int, int*, int*, int*)'
collect2: error: ld returned 1 exit status