Sichuan University Programming Contest 2016 Preliminary

B: shuaishuai¡¯s problem