Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

Petr's blog

By Petr, history, 8 years ago, In English
  • Vote: I like it
  • +133
  • Vote: I do not like it

»
8 years ago, # |
  Vote: I like it -13 Vote: I do not like it

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

»
8 years ago, # |
  Vote: I like it +3 Vote: I do not like it

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

  • »
    »
    8 years ago, # ^ |
      Vote: I like it +7 Vote: I do not like it

    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 years ago, # ^ |
        Vote: I like it +38 Vote: I do not like it

      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.