Tle CHEFLKJ SEG-TREE

Anyone plzz tell me why i am getting tle??I think its similar to tester solution…!!

Problem

Tester’s Sloution

My Solution

Explain How’s My solution complexity is Worse than required??