Sichuan University Programming Contest 2017 Preliminary

B: ¥Թ