Someone please help me =((

Правка en4, от DPlayerGod, 2022-04-26 03:19:08

Hope someone will be able to give me an idea about this problem :

John has N movie discs placed in a stack, which are numbered 1, 2 ... n from the top. For every time he takes a disc, John will skillfully pull the disc he wants to watch from the stack. And after using it later, he put this plate on top again, messing up the order. Now he has m discs to watch in turn, where on the stack he wants to watch it each time he watches the ith disc ? ****

Sample Input

5 3
4 4 5

Sample Output

4 1 5 

Note : n, m <= 1e5.

Thank you so much!

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en6 Английский DPlayerGod 2022-04-26 03:22:10 0 (published)
en5 Английский DPlayerGod 2022-04-26 03:20:42 10
en4 Английский DPlayerGod 2022-04-26 03:19:08 521
en3 Английский DPlayerGod 2022-04-26 03:06:59 21 Tiny change: 'PTIT122K/)' -> 'PTIT122K/).Thank you so much!'
en2 Английский DPlayerGod 2022-04-26 03:05:57 25 Tiny change: 'roblem : [Your text to link here...](https://' -> 'roblem : [](https://'
en1 Английский DPlayerGod 2022-04-26 03:04:06 164 Initial revision (saved to drafts)