boxes.cpp: In function 'long long int delivery(int, int, int, int*)':
boxes.cpp:23:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=K-1 ; i<lst1.size() ; idx1=i, i+=K) res+=2*lst1[i];
~^~~~~~~~~~~~
boxes.cpp:24:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=K-1 ; i<lst2.size() ; idx2=i, i+=K) res+=2*(L-lst1[i]);
~^~~~~~~~~~~~
boxes.cpp:25:29: warning: conversion to 'int' from 'std::vector<int>::size_type {aka long unsigned int}' may alter its value [-Wconversion]
int rm1=lst1.size()-idx1-1, rm2=lst2.size()-idx2-1;
~~~~~~~~~~~~~~~~^~
boxes.cpp:25:53: warning: conversion to 'int' from 'std::vector<int>::size_type {aka long unsigned int}' may alter its value [-Wconversion]
int rm1=lst1.size()-idx1-1, rm2=lst2.size()-idx2-1;
~~~~~~~~~~~~~~~~^~
boxes.cpp:26:18: error: 'l' was not declared in this scope
int v1=0, v2=l, v3=l;
^
boxes.cpp:35:13: error: 'v3' was not declared in this scope
v3+=2*lst1[idx1+x];
^~
boxes.cpp:35:13: note: suggested alternative: 'v2'
v3+=2*lst1[idx1+x];
^~
v2
boxes.cpp:38:24: error: 'v3' was not declared in this scope
res+=min(v1,min(v2,v3));
^~
boxes.cpp:38:24: note: suggested alternative: 'v2'
res+=min(v1,min(v2,v3));
^~
v2