bob.cpp: In function 'int64_t rectangle_count(std::vector<long int>)':
bob.cpp:78:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
78 | for (int i = 0; i < histogram.size(); i++) {
| ~~^~~~~~~~~~~~~~~~~~
bob.cpp:80:29: warning: comparison of integer expressions of different signedness: '__gnu_cxx::__alloc_traits<std::allocator<long int>, long int>::value_type' {aka 'long int'} and 'std::vector<std::vector<long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
80 | while (histogram[i] >= height.size()) {
bob.cpp:86:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
86 | for (int i = 0; i < height.size(); i++) {
| ~~^~~~~~~~~~~~~~~
bob.cpp: In function 'int main()':
bob.cpp:130:37: warning: narrowing conversion of 'his.std::vector<long int>::operator[](((std::vector<long int>::size_type)c))' from '__gnu_cxx::__alloc_traits<std::allocator<long int>, long int>::value_type' {aka 'long int'} to 'int' [-Wnarrowing]
130 | h.push_back({his[c]});
| ^
bob.cpp:130:37: warning: narrowing conversion of 'his.std::vector<long int>::operator[](((std::vector<long int>::size_type)c))' from '__gnu_cxx::__alloc_traits<std::allocator<long int>, long int>::value_type' {aka 'long int'} to 'int' [-Wnarrowing]
bob.cpp:136:36: error: could not convert 'vec' from 'vector<int>' to 'vector<long int>'
136 | ans += rectangle_count(vec);
| ^~~
| |
| vector<int>