ABC 162 F - Select Half
https://atcoder.jp/contests/abc162/tasks/abc162_f