wiring.cpp: In function 'long long int min_total_length(std::vector<int>, std::vector<int>)':
wiring.cpp:12:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
12 | for (int i = 0; i < a.size(); i++) {
| ~~^~~~~~~~~~
wiring.cpp:15:12: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
15 | while (j < a.size() && a[i].second == a[j].second) {
| ~~^~~~~~~~~~
wiring.cpp:32:20: 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 = 1; i < pref.size(); i++) pref[i] = min(pref[i], pref[i - 1]);
| ~~^~~~~~~~~~~~~
wiring.cpp:36:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
36 | for (int i = 1; i < v.size(); i++) {
| ~~^~~~~~~~~~
wiring.cpp:40:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
40 | for (int take = 0; take <= v[i].size(); take++) {
| ~~~~~^~~~~~~~~~~~~~
wiring.cpp:41:35: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
41 | dp[take] = min(dp[take], (take < pref.size() ? pref[take] : pref.back()) + sum - 1LL * take * v[i - 1].back());
| ~~~~~^~~~~~~~~~~~~
wiring.cpp:42:35: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
42 | dp[take] = min(dp[take], (take < suf.size() ? suf[take] : inf) + sum - 1LL * take * v[i][0]);
| ~~~~~^~~~~~~~~~~~
wiring.cpp:43:13: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
43 | if (take < v[i].size()) sum += v[i][take];
| ~~~~~^~~~~~~~~~~~~
wiring.cpp:50:13: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
50 | if (take < v[i].size()) sum += v[i][take];
| ~~~~~^~~~~~~~~~~~~
wiring.cpp:52:14: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
52 | if (i + 1 < v.size()) suf[idx] += 1LL * (v[i].size() - take) * v[i + 1][0];
| ~~~~~~^~~~~~~~~~
wiring.cpp:55:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
55 | for (int j = 1; j < pref.size(); j++) pref[j] = min(pref[j], pref[j - 1]);
| ~~^~~~~~~~~~~~~
wiring.cpp:57:13: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
57 | if (i + 1 == v.size()) {
| ~~~~~~^~~~~~~~~~~
wiring.cpp:7:25: warning: control reaches end of non-void function [-Wreturn-type]
7 | vector<pair<int, int>> a;
| ^