Sichuan University Programming Contest 2017 Final(team)

I: Greed King