Problem Statement
Chris is organising a TV show called "Next Attractive Person in
Programming World". There are N contestants and they are already
lined up and waiting to be a part of the TV show.
P Р
Chris has assigned each contestant a score. Interestingly, men only get
an odd score and women only get an even score. The lower the score,
the more attractive the person is. Chris wants a good impression for the
TV show and wants to rearrange the ordering of the contestants. He
wants to let lower score people appear first on the show.
However, as the backstage is crowded, Chris can only swap people
that are adjacent to each other within the line. Also, people with the
same sex will refuse to exchange their positions.
After swapping multiple people, you have finalized the ordering and
want to estimate the effect of the TV show. To do so, you decide to use
Answers
Answered by
0
Answer:
tiaoad7rucuh5g6guf9fph0
Similar questions