Sichuan University Programming Contest 2016 Final Warmup

D: Miss Zhao's Graph