We invite you to participate in CodeChef’s Starters136, this Wednesday, 29nd May, rated for till 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: Shreyan Dominater069 Ray, S. Manuj DarkSparkle Nanthan, thisIsMorningstar, BallBreaker.

Tester: Apoorv tyr0Whiz Kumar.

Text Editorialists:Nishank IceKnight1093 Suresh.

Statement Verifier: Kanhaiya notsoloud1 Mohan.

Contest Admin : Shreyan Dominater069 Ray.

Div1 will have 6 problems. Div2, Div3, Div4 will have 7 problems.

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!

UPD : Sorry for the issue in XORNE0.

Top 5 :

I have submitted a problem idea around 20 days ago how long does it take get a response of rejection or selection of idea

Dominater round

what's the solution for rectangle game

its a simple nim game with 4 piles

Can anyone tell me , why this code is getting TLE? for problem code : LEXMAX

My codeyou have to remove all the elements simultaneously that gives max B[i]

suppose B[i — 1] = 5 and max possible B[i] is 5 then you have to remove 3 and 1 in one go

there can be multiple distinct elements which lead to max B[i]

Wow , Thanks :) FML , feels badge

AC CODEGAMERECT is very similar to this problem 104666D - Crimson Sexy Jalapeños

My post contest discussion stream discussing all the problems

Problem B video Editorial : (Sum of Modes) YOUTUBE VIDEO LINK --Click Here

Thanks for the Editorial. Clearly got the idea.

Thanks ! Glad to hear this.

Problem C LEXMAX

I got a WA on (third test) task 2 using tries for finding most compatible remaining element 2nd index onwards

https://www.codechef.com/viewsolution/1062347572

Can anyone point a test where it fails ( Codechef premium allows that ) ? Thanks

test casecorrect outputyour outputyou can learn about stress testing here

Here's a failing case:

`1 7 11`

. Your solution gives output`11 1 1`

while the actual answer is`11 3 1`

.The place where the solution goes wrong is in the

`query`

function: when`curBit`

is 0, it preferentially traverses to the left child. However, elements of the right child should also be checked.I'd also attempted using tries initially, but ended up with a simpler approach. Submission

Right right got it, Let me check yours

nice explanation, got ac. But isn't this n^2.log(n)

https://www.codechef.com/viewsolution/1062350047

The value of AND changes at most 30 times, so complexity is 30 * N * logN

Hey sorry to ping you , can you please look at my submission link . My basic idea , sort on the basis of the bit which are not zero.

Tried a couple of small cases, not sure why it fails

Thanks for your time. don't know maybe some tricky corner case

In the rect game problem , It is interpreted as a nim game. Can someone clarify the following doubt "Say I have 2 piles and two players are playing game of nim on it. Now if the first player has a winning strategy on both then as per theorem we know 1st player loses. But say 1st player plays a move such that after his move the state of both piles remains same i.e. both piles still remain in winning state and player 1 might win this way."

Is Problem SUMKMAX that easy? How did so many people in Div-2 and Div-3 solve this problem as compared to LEXMAX, which I thought was fairly easy. In Div-1, LEXMAX was solved by almost 3 times more contestants, but in Div-2/3 it is the opposite? Can't understand.

SUMKMAX has a one liner solution using some weird factorials, Not tough to guess that solution was floating in cheating groups.

Thank you so much for this amazing contest! I became 4* coder in this contest!!