Sichuan University Programming Contest 2017 Final(team)

H: Double Profiles