Python Segment Tree Cpp Performance Marine