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:40: error: 'num' was not declared in this scope; did you mean 'nums'?
144 | assert(dp[bucket][r].second == num[bucket][r].first + len);
| ^~~