Can anyone help me with this?

Правка en2, от _amit.nehra_, 2023-11-28 07:12:45

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

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский _amit.nehra_ 2023-11-28 07:12:45 8
en1 Английский _amit.nehra_ 2023-11-28 07:11:14 391 Initial revision (published)