답안 #841504

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
841504 2023-09-01T15:50:40 Z CBNK30_theviet A Plus B (IOI23_aplusb) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
#define fastio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define fileio freopen(VietWasHere".inp", "r", stdin); freopen(VietWasHere".out", "w", stdout);
#define getbit(i, j) ((i >> (j)) & 1)
#define cntbit(x) (__builtin_popcountll(x))
#define ll long long
#define pb push_back
#define sz(x) x.size()
#define all(x) x.begin(), x.end()

#define VietWasHere "khongon"
#define mxn 100005

using namespace std;

using str = string; // Yes, python go brrr
using vi = vector<int>;
using pii = pair<int, int>;
using pli = pair<ll, int>;
using pil = pair<int, ll>;

const ll INF = 1e9;
const ll MOD = 1e9 + 7;
const ll INFLL = 1e18;

int n, a[mxn], b[mxn];
vector<int> g;

signed main()
{
    fastio;
//    fileio;

    /* Here we go */

    cin >> n;
    for(int i = 1; i <= n; i++) cin >> a[i];
    for(int j = 1; j <= n; j++) cin >> b[j];

    g.pb(a[1] + b[1]);
    for(int i = 2; i <= n; i++) g.pb(a[i] + b[1]);
    for(int j = 2; j <= n; j++) g.pb(b[j] + a[1]);

    sort(all(g));
    for(int i = 0; i < n; i++) cout << g[i] << ' ';

    return 0;
}

Compilation message

/usr/bin/ld: /tmp/ccw8ioKB.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccgIcF4y.o:aplusb.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccw8ioKB.o: in function `main':
grader.cpp:(.text.startup+0x271): undefined reference to `smallest_sums(int, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status