or a combination of more than one of these may be needed to arrive at the right solution. However, it should not involve looking into research papers for the problems to be solved. A novice programmer should not be able to solve this, without putting in a lot of effort to learn those ...
The Link -;http://www.codechef.com/viewsolution/6928522 3rd Approach Further optimization, I banged my head a little bit more and got to know about Cartesian Trees from Stanford CS166. I learn that there are only a limited number of block types for RMQ for a size b, there are 4^b ...
I was so much excited that I had given a post to express my feeling after solving this problem. After that some people asked me on codeforces or facebook, how I had solved the problem. So, I had decided to write a post regarding my solution idea of this problem. Before staring the ...
The solution can easily be framed in a recursive manner - N heads = if 1st flip is a head then N-1 more heads, else N more heads. The probability of 1st head is 1/2. Thus E[N] = (1/2)(E[N-1]+1)+ (1/2)(E[N] + 1) ...
While checking some solutions in python, I noticed that tests of this problem are also very weak, for instance, see this submission: https://www.codechef.com/viewsolution/17348967 . It returned answer is n0 + 1 if n > 40000 and brute-forced otherwise. You can observe that answe...
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 themhere. Joining me on the problem setting panel are: Tester: AlexanderscanhexMorozov Statement Verifier: JakubXellos ...
To flaunt your ratings in your friend circle? I have never heard of anything like a "Rating Cap" for selecting candidates. As for the YouTube creators, they undermine the competition, and I despise it when my rating could have increased more, but now after so many have solved it, I wil...
In this month's codechef long challenge many of the solutions have already been leaked by YouTube channels and many of these solution videos have more than10k viewsand one video has5k views in a span of just 1 or 2 days This is highly discouraging to all the people who want to enjoy ...