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