added prim, binary search, updated BIT, added c++ helpers