제출 #1304497

#제출 시각아이디문제언어결과실행 시간메모리
1304497disfyyRace (IOI11_race)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; const ll N = 5e5 + 5; const ll NN = 5e3 + 5; const ll INF = 2e18 + 5; const ll MOD = 1e9 + 7; const ll P = 53; const double eps = 1e-9; ll a[N]; void solve() { ll n, k; cin >> n >> k; ll mx = (n - 1) * (n - 2); if(k > mx) { cout << -1; return; } for(int i = 0; i <= n - 2; i++) { cout << i << " " << i + 1 << '\n'; } for(int i = 1; i <= n - 1; i++) { if(k) { if(k >= n - 2) { cout << n - 2 << " "; k -= (n - 2); } else { cout << k << " "; } } else { cout << 0 << " "; } } } signed main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int test = 1; // cin >> test; for(int i = 1; i <= test; i++) { solve(); } return 0; }

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

/usr/bin/ld: /tmp/ccOj18c1.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccRS0KwL.o:race.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccOj18c1.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