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

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

Question

in this 1375C - Уничтожение элементов problem, if he gave me an array, not Permutation, the answer will change or it will be the same thing.

My submission: 175308852

My Idea

My observation is the answer doesn't rely on any element except the first and last one in the array. so, I asked something "If there are multiple numbers of $$$A_1$$$ or $$$A_n$$$, Will something happen?"

My answer is "I don't think so", as if I can erase $$$A_i$$$ $$$(1 \le i \le n)$$$ so I can erase all duplicates of $$$A_i$$$.

Can you ensure that this is correct? or proof it?

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