### yashChandnani's blog

By yashChandnani, history, 13 months ago,

We invite you to participate in CodeChef’s August Lunchtime, this Saturday, 29th August, from 7:30 pm to 10:30 pm IST.

The contest features 6 problems and is 3 hours long.

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.

Joining me on the problem setting panel are:

• Setters: Rithvik Chatterjee, Ritesh rishup132 Gupta, Ramanan ramzz S, Sawarnik Sawarnik Kaushal

• Admin : Teja teja349 Vardhan Reddy

• Tester: Yash yashChandnani Chandnani

• Editorialist: Ishmeet Psychik Singh Saggu

• Statement Verifier: Jakub Xellos Safin

• Mandarin Translator: Gedi gediiiiiii Zheng

• Vietnamese Translator: Team VNOI

• Russian Translator: Fedor Fedosik Korobeinikov

• Bengali Translator: Mohammad solaimanope Solaiman

• Hindi Translator: Akash Shrivastava

Prizes:

Top 10 Indian and top 10 Global school students from ranklist will receive certificates and CodeChef laddus, with which they can claim cool CodeChef goodies. Know more here.

Good luck and have fun!

• +110

 » 13 months ago, # |   -58 my contest ! my love Codechef ! my 6 star swag !
•  » » 13 months ago, # ^ |   +23 Dude, stop shitposting. This is Codeforces and not Crapforces.
•  » » » 13 months ago, # ^ | ← Rev. 2 →   -32 you don't talk to 6 star king like that, i am a legendary grandmaster can't you see
 » 13 months ago, # | ← Rev. 2 →   -7
 » 13 months ago, # |   +2 hoping not to see Internal Server Error this time :p
 » 13 months ago, # | ← Rev. 2 →   +32 Atcoder abc177: 5:30pm to 7:10pmCC lunchtime: 7:30pm to 10:30pmFacebook Hackercup Round 2: 10:30pm onwardsSacrifices have to be made today. :(
 » 13 months ago, # |   +60 List of things learnt from today's contest : codechef lunchtime occurs at dinner time
 » 13 months ago, # | ← Rev. 3 →   +28 I would like to post the stuff I did in case it helps anyone.Problem ARRGAME: For Nayeon to have any chance of winning he must pick biggest block of zeros (which must be unique). Let mx = length of this biggest block. If mx is even, Tzuyu can pick position adjacent to Nayeon and win. If length of block is odd, Nayeon can pick middle position to neutralize this strategy. So to win Tzuyu would have to pick another block of zeros with length > (mx+1)/2.Problem ALIENIN: Binary Search the answer to find max cool down.Problem CNTGRP: First we build tree, then remaining edges must be between nodes with same level in tree. To build tree each node with level ai must be connected with some node with level ai-1 => if number of nodes with level ai-1 is f[ai-1] then we have f[ai-1] ways to choose. Just multiply these for all nodes. Now compute number of possible edges between nodes of same level, we must choose m-(n-1) such edges. Compute binomial coefficient and multiply with answer.Problem SHENQ: I only did partial 50 points. Doing small test cases gives the necessary insight. There are four cases to consider: elements even/odd, length even/odd. You can find formula to solve in O(1) for each case.
•  » » 13 months ago, # ^ |   0 In the problem of alien invasion, the cool down time was a floating point value. How do we know when to stop it? I am confused in that.
•  » » » 13 months ago, # ^ |   0 You only need to get a few decimal points corrects (check output section).So you can do binary search while length of interval is bigger than 1e-7.
 » 13 months ago, # |   0 what is wrong with my code for https://www.codechef.com/LTIME87A/problems/CNTGRPmy code — https://pastebin.com/0xn1TUXzI am getting partial score. thanks in advance
•  » » 13 months ago, # ^ | ← Rev. 2 →   +14 you can't calculate nCr like that, since n can be very largeinstead, first find n!/(n-r)! which is equal to n * (n-1) * .... * (n-r+1) and modInverse(r!) and multiply them ( since r will be < 2e5 here )
•  » » » 13 months ago, # ^ | ← Rev. 2 →   +8 wow I didn't even think about it like that guess I have much to learn.. thanks for your help. I got AC thanks again.
 » 13 months ago, # | ← Rev. 2 →   +21 Idea for Elevator? I tried using dp, where dp[i][0] denotes least number of changes until the ith point(considering only non -1 values) and currently going down and dp[i][1] is for currently going up. But I thought there were a lot of cases to handle and I couldn't simplify.
 » 13 months ago, # |   +35 This was one of the best contests i have seen in recent times. The problemset was well balanced, covering lot of topics. Kudos to problemsetters and testers !
 » 13 months ago, # | ← Rev. 2 →   +2 NEED HELP FOR ELOMAXcan someone give me a counter case where my code fails ? I’m simply finding the score of each player after the ith round and maintaining 4 arrays separately for bestrank so far , bestrating so far, and month number for bestrating and bestrank. I guess my method is simple brute force with simple implementation, am i missing something ?
 » 13 months ago, # |   0 how to solve Ratings and Rankings this problem ?
•  » » 13 months ago, # ^ | ← Rev. 2 →   +1 I can tell you what i did to solve it. First lets construct a matrix rank[i][j] which tells us the rank of the person i after jth month. Then just iterate thorugh the entire row for person i to find the minimum rank and maximum rating if they occur at the different index then update the count else move to next person.
 » 13 months ago, # |   0 Can you tell me what is the first testcase in each subtask for the task CHEFPART? It seems to have some other special case besides appearance of one bit in the single number.
•  » » 13 months ago, # ^ |   +27 Unfortunately, one of the edge cases in CHEFPART was handled wrongly in the official solution, as you had figured out. This has been fixed, all non-AC solutions rejudged, and we will recalculate the ratings for the 2 users who have been affected by this. Apologies for the mistake!
•  » » » 13 months ago, # ^ |   0 You should change your handle to I_Am_Always_Sorry
•  » » » 13 months ago, # ^ |   +8 One of them is me) Actually I would be able to finish with full solution, if I know that my approach passes first subtask, but anyway I'm happy with 6th place)
 » 13 months ago, # |   -67 very easy contest. Solved EverythingIn my brainI wanted to take part i would become 7 star but then i remembered the love of my life. my 6 star and i don't want to lose it. then i didn't give contest. and not because i was unable to solve any questions