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

Автор Alt_of_Charon, история, 23 месяца назад, По-английски

This submission was wrong but still got AC

what if in the latter part we have a vector where a total of two pairs are in there incorrect position and one pair is set up in that vector such that it will pass the loop of checking whether after swapping we will get the same element which we store in the auxiliary sorted copy of the initial vector. That should fail the test cases right? But it didn't.

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

»
23 месяца назад, # |
Rev. 2   Проголосовать: нравится +3 Проголосовать: не нравится

yes, you're right

here's test case

1

2 4

2 1 3 3

1 1 3 2