题解和做题记录请转队伍wiki
https://acm.ecnu.edu.cn/wiki/index.php?title=2012-2013_ACM-ICPC_Northeastern_European_Regional_Contest_(NEERC_12)#Problem_L