sugar.cpp: In function 'int32_t main()':
sugar.cpp:22:35: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
22 | for (int i = 0; i < ant.size(); i++) {
| ~~^~~~~~~~~~~~
sugar.cpp:24:34: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
24 | while (j < sugar.size() && sugar[j].first < ant[i].first - L) j++, remain = j < sugar.size() ? sugar[j].second : -1;
| ~~^~~~~~~~~~~~~~
sugar.cpp:24:103: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
24 | while (j < sugar.size() && sugar[j].first < ant[i].first - L) j++, remain = j < sugar.size() ? sugar[j].second : -1;
| ~~^~~~~~~~~~~~~~
sugar.cpp:25:34: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
25 | while (j < sugar.size() && (sugar[j].first - ant[i].first) <= L && total_ants > 0) {
| ~~^~~~~~~~~~~~~~
sugar.cpp:31:61: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
31 | remain = remain = j < sugar.size() ? sugar[j].second : -1;
| ~~^~~~~~~~~~~~~~
sugar.cpp:31:48: warning: operation on 'remain' may be undefined [-Wsequence-point]
31 | remain = remain = j < sugar.size() ? sugar[j].second : -1;
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~