IceKnight1093's blog

By IceKnight1093, 3 months ago, In English

We invite you to participate in CodeChef’s Starters 152, this Wednesday, 18th September, rated upto 6 stars (i.e. for users with rating < 2500).

Time: 8:00 PM — 10:00 PM IST

Joining us on the problem setting panel are:

Written editorials will be available for all on discuss.codechef.com. Pro users can find the editorials directly on the problem pages after the contest. The video editorials of the problems will be available only to Pro users.

Also, if you have some original and engaging problem ideas, and you’re interested in them being used in CodeChef's contests, you can share them here.

Hope to see you participating. Good luck!


Congratulations to the top 5 in Div1!

  1. liympanda

  2. DylanSmith

  3. Dragokj03

  4. GOTKAKO

  5. EnofTaiPeople

  • Vote: I like it
  • +54
  • Vote: I do not like it

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Contest starts in 15 mins

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

last 15 min problem Completion (Easy) solve very fast...how to solve it?

  • »
    »
    3 months ago, # ^ |
    Rev. 2   Vote: I like it +1 Vote: I do not like it

    The first necessary observation, which is that for each block (adjacent even odd index in array), [0,1],[2,3],[4,5], etc. The way to get the maximum sum is always pair a number in range [1,2*N] with a number in range[N + 1, 2*N].

    There is a useful observation, split the numbers from 1 to 2 * N, and label from 1 to N as lower and N + 1 to 2 * N as upper. It is guaranteed that the lower and upper will be those for each block of size 2. And then you can use combinatorics and counting. You count how many lower and upper numbers you have to assign, and do lower * (lower — 1) * (lower — 2) *... *1 and upper! as well. There are some blocks that are just 0 though, [0,0], for those you can use a lower and upper but also you can do [U,L] or [L,U], so just count these [0,0] blocks and do 2^(zero_blocks). So you can get this in the end lower! * upper! * 2^zero_blocks. Where I described how to get lower, upper, and zero_blocks clearly I hope.

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

ConstructiveChef! The contest was fun..

»
3 months ago, # |
  Vote: I like it +1 Vote: I do not like it

anyone got any mail from CRED?