제출 #1365118

#제출 시각아이디문제언어결과실행 시간메모리
1365118haiphong5g0나일강 (IOI24_nile)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
#define task "TEST"
#define task2 "A"
#define pl pair<ll, ll>
#define VI vector<ll>
#define pf push_front
#define pb push_back
#define pob pop_back
#define pof pop_front
#define mp make_pair
#define fi first
#define se second
#define FOR(i, a, b, c) for (int i=a; i<=b; i+=c)
#define FORE(i, a, b, c) for (int i=a; i>=b; i+=c)
using namespace std;
using ll = long long;
using ull = unsigned long long;
const int Mod = 1e9+7;
const int maxn = 2e5;
const ll Inf = 1e16;
ll n, q;
VI calculate_costs(VI W, VI A, VI B, VI E) {
    q = E.size(); n = W.size();
    ll sum = 0;
    FOR(i, 0, n-1, 1) sum += A[i];
    FOR(i, 0, q-1, 1) cout << sum << '\n';
}
void Read()
{
    
}
void Solve()
{
    
}
/*int main()
{
    if (fopen (task".inp", "r")) {
        freopen (task".inp", "r", stdin);
        freopen (task".out", "w", stdout);
    }
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    int t;
    for (cin >> t; t--;)
    {
        Read(); Solve();
    }
}*/

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

nile.cpp: In function 'std::vector<long long int> calculate_costs(std::vector<long long int>, std::vector<long long int>, std::vector<long long int>, std::vector<long long int>)':
nile.cpp:27:1: warning: no return statement in function returning non-void [-Wreturn-type]
   27 | }
      | ^
/usr/bin/ld: /tmp/ccaVQ1SD.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