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:
Setters: Abdul AKMalice Nayeem Khalid, Nishank IceKnight1093 Suresh, Ashish Kryptonix Gangwar, Ronit bronit Bhatt
Tester: Takuki tabr Kurokawa
Contest Admin, Text Editorialist, and Statement Verifier: Nishank IceKnight1093 Suresh.
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!
Contest starts in 15 mins
last 15 min problem Completion (Easy) solve very fast...how to solve 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.
ConstructiveChef! The contest was fun..
anyone got any mail from CRED?