E - 気温の変動幅 / Temperature Fluctuation Range Editorial by Yoyoyo8128

ユーザ解説

std::multisetを使うと楽に実装することが出来ます。

実装例(C++)