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

Автор rng_58, история, 7 лет назад, По-английски

Recently I solved an interesting constructive task. Can you solve it? I'll reveal the source a bit later.

N(N + 1) soccer players stand in a row. The height of the i-th player is hi. No two of them are of the same height.

Sir Alex wants to remove N(N−1) players from this row leaving a new row of 2N players in which the following N conditions hold:

  • No one stands between the two tallest players,
  • No one stands between the third and fourth tallest players,
  • No one stands between the two shortest players.

Find one possible way to achieve this.

Constraints: 2 ≤ N ≤ 500, 1 ≤ hi ≤ 109, hi are pairwise distinct.

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

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

Hm, hm, what the source could be, I have no idea ;p. Hunter's problem seems even more interesting to me (however I have no idea about it)

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

I saw this in the morning (IMO P5). This could very well be the second easiest/easiest problem on an IOI?

Rough Idea
  • »
    »
    7 лет назад, # ^ |
      Проголосовать: нравится +22 Проголосовать: не нравится

    I feel like you are very much underestimating the difficulty of this problem.

    In my opinion, most of the easy and medium IOI problems don't really require you to come up with new ideas or solution approaches, but instead just make observations or optimizations. (Not to say they aren't good problems.)

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

      Yeah, now that I think about it, this is not very IOI-ey (definitely not the easy IOI problems). It feels like one of those random elegant POI problems though.

    • »
      »
      »
      7 лет назад, # ^ |
        Проголосовать: нравится +13 Проголосовать: не нравится

      Definitely not easiest, but I think this makes a easy~med IOI problem — for example, 15 sorting / 16 messy. They all require us to come up with new ideas, even though it's simple. I think this problem have similar difficulty.

      People near me generally agreed that this one was kinda easy, although I didn't asked them to compare with other problems.

      • »
        »
        »
        »
        7 лет назад, # ^ |
        Rev. 2   Проголосовать: нравится +5 Проголосовать: не нравится

        Hmm, for me sorting is very standard good IOI problem, does not require much innovative idea. Anyway I agree it's as hard as 16 messy, 3rd easiest problem out of 6.

        I wonder where he found this elegant problem...

        UPD: Finally I realized the problem is originally from IMO this year :p

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

I was stuck on this problem for maybe 2 hours, then I saw rng_58's post and solved it in 10 minutes after that.

I'm not sure how to interpret this. (Maybe it's time for me to change up my problem solving strategy.)

  • »
    »
    7 лет назад, # ^ |
      Проголосовать: нравится +31 Проголосовать: не нравится

    One is never solving these problems ex nihilo. Cultural ideas about the nature of the competition very much play a role in how one thinks about them.

    Since this is the IMO people expect the answer to take a certain form and never consider the question "if I wanted to compute this reasonably quickly what would I do"?

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

a somewhat different solution than the one in the above comments.

Spoiler