I learned segment tree yesterday and tried to solve these following problems
399D - Painting The Wall
61E - Enemy is weak
459D - Pashmak and Parmida's problem
My solutions just barely pass the time limit.
81148972(needed faster I/O)
How can I strengthen this segment tree so that my solution fits into time limit completely.