Can anyone help me with this?
Difference between en1 and en2, changed 8 character(s)
There are N numbers(1 to N), arranged in increasing order. There are q operation that has to be performed on permutation. In ith operation, we'll have Li, Ri(two indices) and we have to reverse the permutation from arr[Li] to arr[Ri].↵
At last, after performing all operations, we have to return value at kth position.↵

N<=10^9
  
q<=10^5
  
1<= Li, Ri <=N
  
k<=N
  

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English _amit.nehra_ 2023-11-28 07:12:45 8
en1 English _amit.nehra_ 2023-11-28 07:11:14 391 Initial revision (published)