I tried to solve this problem: Optimal insertion using persistent segment tree. It gives me MLE for some reasons that I don't understand. Could anyone help me. My submission: Code
I tried to solve this problem: Optimal insertion using persistent segment tree. It gives me MLE for some reasons that I don't understand. Could anyone help me. My submission: Code