Sichuan University Programming Contest 2019 Preliminary

F: Ӽ׾ħպ