제출 #1337178

#제출 시각아이디문제언어결과실행 시간메모리
1337178aritro_나일강 (IOI24_nile)C++20
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
#define endl '\n'
#define pb push_back
#define ff first
#define ss second
#define all(a) a.begin(),a.end()

vector<int> calclate_costs(vector<int>w,vector<int>a,vector<int>b,vector<int>e){
    int n=a.size();
    int cost=0;
    for(int i=1;i<n;i+=2) cost+=(b[i]+b[i-1]);
    vector<int> ans(n);
    for(int i=0;i<n;i++) ans[i]=cost;
    return ans;
}

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

/usr/bin/ld: /tmp/ccAt232s.o: in function `main':
grader.cpp:(.text.startup+0x2ff): undefined reference to `calculate_costs(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status