BZOJ 1227. [SDOI2009]虔诚的墓主人

某岛 at 
http://www.lydsy.com/JudgeOnline/problem.php?id=1227 离散化、树状数组。……