We invite you to participate in CodeChef’s Starters 191, this Wednesday, 18th June, rated for 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:
Contest Admin: Shreyan Dominater069 Ray
Statement Verifier and Tester: Sushil SmolBrain Raaja.
Text Editorialist : Nishank IceKnight1093 Suresh.
Setters: Shreyan Dominater069 Ray, Sushil SmolBrain Raaja.
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!








Contest starts in ~25min.
My thoughts on Grid Path (Hard):
Let $$$\text{cost}(i, j)$$$ denote the cost of moving the first $$$j$$$ (or the last $$$j$$$) '1's in the $$$i$$$-th row to valid positions.
We observe that:
This implies that the total cost function is convex.
I used a Fenwick Tree combined with binary search to maintain it, and applied ternary search to find the optimal answer.
Unfortunately, I didn't handle the edge cases properly. And the complexity of $$$O(q \log^3 n)$$$ only passes the first 7 test cases. I believe that direct binary search in data structure can be $$$O(q \log^2 n)$$$.
i also tried this approach ... i made it very complex .. 4 bit ..one for positon in each row and then also for number of ones..then i needed ordered statistic for finding the index with k ones in the left. Not Able to debug :{...can u share your code My code...
what could be the rating of the problem ( Add 1 or 2 ) comparing with cf ?
between 1300 and 1500
Can anyone please drop the sudocode for problem add 1 or 2
is there any greedy solution for coloured array ?
I upsolved it using greedy + max bipartite matching.
yeah I also wanted to know, my simple greedy was failing for obvious reasons, I knew but still tried XD
I really like the way problems are described.. No nonsense and stories and to the point.. Nice problems..
loved the problem Grid Path (easy) :)