Submission #1227503

#TimeUsernameProblemLanguageResultExecution timeMemory
1227503shiocanNile (IOI24_nile)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include <cstdlib> #include <stdlib.h> using namespace std; #define ull unsigned long long #define ld long double #define ll long long #define int long long #define pii pair<int, int> #define all(v) v.begin(), v.end() int mod = 1e9 + 7; // const int inf = 1e18; const int N = 1e5 + 50, K = 22; // #include "nile.h" vector<int> calculate_costs(vector<int> w, vector<int> a, vector<int> b, vector<int> e){ int n = a.size(); int q = e.size(); vector<int> ans(q); int sum = 0; for(auto i : b) sum += i; if(n % 2){ int mn = 1e18; for(int i = 0; i < n; i++) mn = min(mn, (ll)a[i] - b[i]); sum += mn; } for(int i = 0; i < q; i++) ans[i] = sum; return ans; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccwMRT82.o: in function `main':
grader.cpp:(.text.startup+0x30e): 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