Main.cpp: In function 'int main()':
Main.cpp:32:29: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
32 | for(int i=0; i+1<a.size(); i++) {
| ~~~^~~~~~~~~
Main.cpp:37:35: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
37 | for(int j=i+1; j+1<a.size(); j++) res2 += d - a[j+1] + a[j];
| ~~~^~~~~~~~~
Main.cpp:42:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
42 | for(int i=0; i<a.size(); i++) {
| ~^~~~~~~~~
Main.cpp:45:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
45 | if(i + 1 < a.size() && a[i+1] - a[i-1] < d) res2 += d - a[i] + a[i-1];
| ~~~~~~^~~~~~~~~~
Main.cpp:47:35: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
47 | for(int j=i+1; j+1<a.size(); j++) res2 += d - a[j+1] + a[j];
| ~~~^~~~~~~~~