Пожалуйста, подпишитесь на официальный канал Codeforces в Telegram по ссылке https://t.me/codeforces_official. ×

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

Автор Petr, история, 8 лет назад, По-английски
  • Проголосовать: нравится
  • +133
  • Проголосовать: не нравится

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

When I see your blog, I look 'Top contributors' list immediately. And I saw you are not first..

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

You said "let's assume we'll pick an odd-sized subset for now" and forgot to prove why it's optimal.

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

    You're right, thanks for pointing this out! It's not necessarily optimal, one has to consider the even-sized subsets as well, but the solution is really similar for that case so I don't think digging into it would add much now :)

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

      Actually in that problem one may prove that even-size subset can always be replaced with an odd-size subset without making the simple skewness smaller. Just consider removing the second middle element from the set.