strange_device.cpp: In function 'int32_t main()':
strange_device.cpp:43:23: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
43 | for (int i = 0; i < sorted.size(); i++) co[i+1] = sorted[i];
| ~~^~~~~~~~~~~~~~~
strange_device.cpp:45:23: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
45 | for (int i = 0; i < ends.size(); i++) {
| ~~^~~~~~~~~~~~~
strange_device.cpp:53:23: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
53 | for (int i = 1; i <= sorted.size(); i++) d[i] += d[i-1];
| ~~^~~~~~~~~~~~~~~~
strange_device.cpp:54:23: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
54 | for (int i = 1; i < sorted.size(); i++) {
| ~~^~~~~~~~~~~~~~~
strange_device.cpp:44:9: warning: unused variable 'mx' [-Wunused-variable]
44 | int mx = 0;
| ^~