hellow friends like i was solving the g problem of codeforces latest div 4 and everyone uses deque but i have a querry can n;t we use vector so i tried the approach and it geeting wa ! can any one help me to understnad can;t we use a vector in thsi problem ? if yes where my code is failing ?
the submission :316105508
Thanks for the help :)(in advacne )



