제출 #726623

#제출 시각아이디문제언어결과실행 시간메모리
726623btkhgRace (IOI11_race)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; using pl = pair<ll, ll>; vector<pl> v; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int n; cin >> n; for(int i=0;i<n;i++) { int a,b; cin >> a >> b; v.push_back({b, a}); } sort(v.begin(), v.end()); ll cur = 0; for(int i=0;i<n;i++) { cur += v[i].second; if(cur > v[i].first) { cout << "No"; return 0; } } cout << "Yes"; }

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

/usr/bin/ld: /tmp/ccH1xgAZ.o: in function `main':
race.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccDDCiHZ.o:grader.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccDDCiHZ.o: in function `main':
grader.cpp:(.text.startup+0x28): undefined reference to `best_path(int, int, int (*) [2], int*)'
collect2: error: ld returned 1 exit status