elephants.cpp: In function 'void fix(int)':
elephants.cpp:33:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
33 | if (ptr == nums[idx].size())
| ~~~~^~~~~~~~~~~~~~~~~~~
elephants.cpp: In function 'void erase(int, int)':
elephants.cpp:46:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
46 | for (int i = 0 ; i < nums[idx].size() ; ++i)
| ~~^~~~~~~~~~~~~~~~~~
elephants.cpp: In function 'void insert(int, int)':
elephants.cpp:61:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
61 | for (int i = 0 ; i < nums[idx].size() ; ++i)
| ~~^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/10/cassert:44,
from elephants.cpp:5:
elephants.cpp: In function 'int update(int, int)':
elephants.cpp:144:56: error: request for member 'first' in 'nums[bucket].std::vector<int>::operator[](((std::vector<int>::size_type)r))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
144 | assert(dp[bucket][r].second == nums[bucket][r].first + len);
| ^~~~~