unsigned getMaxCoin(unsigned n) { IntVector::const_reverse_iterator coin_it(coins.rbegin()); for (; coin_it != coins.rend(); ++coin_it) { // std::cout<<*coin_it<<std::endl; if (n >= *coin_it) { return *coin_it; } } throw std::logic_error("Cannot find coin smaller than n"); }
inline IndexedList::const_iterator IndexedList::end() const { return _list.rend(); }
inline IndexedList::iterator IndexedList::end() { return _list.rend(); }