atcoder ABC002D other impls
hena 10