제출 #1171916

#제출 시각아이디문제언어결과실행 시간메모리
1171916daniyar228A + B (IOI24_aplusb)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O3")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#define sz size()
#define all(x) x.begin(), x.end()
#define F first
#define S second
#define print(x) cout << x << '\n'
typedef long long i64;
typedef pair<i64,i64> pii;
const i64 INF = 1e12;
signed sum(i64 a, i64 b){
    return a + b;
}
signed main() {
    ios_base::sync_with_stdio(0); cin.tie(0);
    // freopen("pairup.in","r",stdin); freopen("pairup.out","w",stdout);
    i64 a, b; cin >> a >> b; cout << sum(a, b);
}

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

/usr/bin/ld: /tmp/ccCKLwwv.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccH37m5W.o:aplusb.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccCKLwwv.o: in function `main':
grader.cpp:(.text.startup+0x160): undefined reference to `sum(int, int)'
collect2: error: ld returned 1 exit status