TopCoder SRM 684 Div1 Medium DivFree、Div2 Medium DivFree2

ゴリ押し解法でも定数倍高速化で通せたのか…。 https://community.topcoder.com/stat?c=problem_statement&pm=14170