降順のソート

どこかで読んだ気がするのですが



こうするより

#include <algorithm>
#include <functional>

std::sort(v.begin(), v.end(), std::greater<Type>());

こうした方がいいんじゃないかと

#include <algorithm>

std::sort(v.rbegin(), v.rend());



最近は後者を好んで使用しています