Submission #1204694

#TimeUsernameProblemLanguageResultExecution timeMemory
1204694aritro_Nile (IOI24_nile)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define int ll vector<int> calculate_costs(vector<int>w,vector<int>a,vector<int>b,vector<int>e){ int n=w.size(); int q=e.size(); int sum=0; for(int i=0;i<n;i++) sum+=b[i]; if(n%2==0){ vector<int> ans(q,0); for(int i=0;i<q;i++) ans[i]=sum; return ans; } int cost=1e18; for(int i=0;i<n;i++){ cost=min(cost,a[i]-b[i]); } cost+=sum; vector<int> ans(q,0); for(int i=0;i<q;i++) ans[i]=cost; return ans; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccpTED1h.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