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)
| ~~^~~~~~~~~~~~~~~~~~
elephants.cpp: In function 'int update(int, int)':
elephants.cpp:128:60: error: no matching function for call to 'sort(std::vector<int>::iterator, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)'
128 | std::sort(nums[bucket].begin(), nums[bucket].back());
| ^
In file included from /usr/include/c++/10/algorithm:62,
from elephants.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:4849:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)'
4849 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
| ^~~~
/usr/include/c++/10/bits/stl_algo.h:4849:5: note: template argument deduction/substitution failed:
elephants.cpp:128:60: note: deduced conflicting types for parameter '_RAIter' ('__gnu_cxx::__normal_iterator<int*, std::vector<int> >' and 'int')
128 | std::sort(nums[bucket].begin(), nums[bucket].back());
| ^
In file included from /usr/include/c++/10/algorithm:62,
from elephants.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:4880:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
4880 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
| ^~~~
/usr/include/c++/10/bits/stl_algo.h:4880:5: note: template argument deduction/substitution failed:
elephants.cpp:128:60: note: deduced conflicting types for parameter '_RAIter' ('__gnu_cxx::__normal_iterator<int*, std::vector<int> >' and 'int')
128 | std::sort(nums[bucket].begin(), nums[bucket].back());
| ^
In file included from /usr/include/c++/10/algorithm:74,
from elephants.cpp:2:
/usr/include/c++/10/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
| ^~~~
/usr/include/c++/10/pstl/glue_algorithm_defs.h:292:1: note: template argument deduction/substitution failed:
elephants.cpp:128:60: note: candidate expects 4 arguments, 2 provided
128 | std::sort(nums[bucket].begin(), nums[bucket].back());
| ^
In file included from /usr/include/c++/10/algorithm:74,
from elephants.cpp:2:
/usr/include/c++/10/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
| ^~~~
/usr/include/c++/10/pstl/glue_algorithm_defs.h:296:1: note: template argument deduction/substitution failed:
elephants.cpp:128:60: note: candidate expects 3 arguments, 2 provided
128 | std::sort(nums[bucket].begin(), nums[bucket].back());
| ^