ABC 103 D - Islands War
https://atcoder.jp/contests/abc103/tasks/abc103_d
貪欲法
の典型であるところの
区間スケジューリング問題
で解ける問題。