nile.cpp: In function 'std::vector<long long int> calculate_costs(std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)':
nile.cpp:19:14: error: 'id' was not declared in this scope; did you mean 'ii'?
19 | sort(all(id) , [](int x , int y){
| ^~
nile.cpp:4:16: note: in definition of macro 'all'
4 | #define all(v) v.begin() , v.end()
| ^
nile.cpp: In lambda function:
nile.cpp:20:16: error: 'w' is not captured
20 | return w[x] < w[y];
| ^
nile.cpp:19:21: note: the lambda has no capture-default
19 | sort(all(id) , [](int x , int y){
| ^
nile.cpp:18:47: note: 'std::vector<int> w' declared here
18 | vector<long long> calculate_costs(vector<int> w , vector<int> a , vector<int> b , vector<int> e){
| ~~~~~~~~~~~~^
nile.cpp:20:23: error: 'w' is not captured
20 | return w[x] < w[y];
| ^
nile.cpp:19:21: note: the lambda has no capture-default
19 | sort(all(id) , [](int x , int y){
| ^
nile.cpp:18:47: note: 'std::vector<int> w' declared here
18 | vector<long long> calculate_costs(vector<int> w , vector<int> a , vector<int> b , vector<int> e){
| ~~~~~~~~~~~~^
nile.cpp: In function 'std::vector<long long int> calculate_costs(std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)':
nile.cpp:44:9: error: 'res' was not declared in this scope
44 | res.push_back(dp[sz(w)]);
| ^~~
nile.cpp:46:12: error: 'res' was not declared in this scope
46 | return res;
| ^~~