Sichuan University Programming Contest 2012 Preliminary(team)

G: lentty's diary