Блог пользователя soda_bottle

Автор soda_bottle, история, 3 года назад, По-английски

Problem E — Can anyone tell me how to get the answer in 4 moves for the following input? 8 6 6 1 6 3 1 8 8 10, AC program outputs 4. Link to problem — https://codeforces.com/contest/1481/problem/E

  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится

»
3 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Is there an error with the official solution?

»
3 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Initially: $$$a = [8,6,6,1,6,3,1,8,8,10]$$$.

Move $$$8$$$ from the front to the back, $$$a = [6,6,1,6,3,1,8,8,10,8]$$$.

Move $$$10$$$ to the back, $$$a = [6,6,1,6,3,1,8,8,8,10]$$$.

Move $$$1$$$ to the back, $$$a = [6,6,6,3,1,8,8,8,10,1]$$$.

Move the other $$$1$$$ to the back, $$$a = [6,6,6,3,8,8,8,10,1,1]$$$.