Sichuan University Programming Contest 2016 Preliminary

A: 牛老师的problem