add ac SegmentTree and BIT code from hdu