We invite you to participate in CodeChef’s June Lunchtime, this Saturday, 26th June, from 7:30 PM — 10:30 PM IST.
There will be 7 problems in Division 3 and 6 problems in Division 1/2.
Joining us on the problem setting panel are:
Contest Admins: Ashish Ashishgup Gupta and Jatin jtnydv25 Yadav
Head Admin: Alex Um_nik Danilyuk
Tester: Felipe fmota Mota
Setters: Daanish Mahajan, Jatin jtnydv25 Yadav, Bharat Singla, Lakshay lakshyaj21 Jain, Divyam divyamsingal01 Singal, Ritika kairakal Gupta, Nishan Retarded_Ape Singh, Pranav ExplodingFreeze Rajagopalan
Statement Verifier: Riley Monogon Borgard
Editorialist: Aman Retired_cherry Dwivedi
Video Editorialists: Chirayu Chirayu Jain, Prachi agarwal19 Agarwal, Darshan darshancool25 Lokhande, Yashodhan ay21 Agnihotri, Shivam Bohra, Aryan Agarwala, Meet myth_gemphir Singh Gambhir, Rajarshi RestingRajarshi Basu
Mandarin Translator: Huang Ying
Russian Translator: Fedor Mediocrity Korobeinikov
Bengali Translator: Sakib SakibAbrar Abrar
Vietnamese Translator: Team VNOI
Problem Submission: If you have original problem ideas, and you’re interested in them being used in CodeChef's contests, you can share them here.
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.
The video editorials of the problems will be available on our YouTube Channel as soon as the contest ends. Subscribe to get notifications about our new editorials.
Admin Note: This Lunchtime has a replay of some of the problems used in IOITC Day 2/3 (Final Selection round of Indian IOI Team). Thanks to all the testers who tested the IOITC as well!
Good luck and have fun!
Reminder that contest starts in 90 minutes
aryanc, the dalal of Codeforces.
$$$\geqslant w \leqslant$$$
Thanks for the compliment.
As a participant of Indian TST, I feel the quality of problems is one of the highest compared to all other OIs this year.
Less than 2 minutes
Div3 and Div1 problems are interchanged. It should be fixed soon.
Hope you guys will do plag check this time :\
You are expecting too much from codechef!
Nice problemset.
Why is below code giving TLE verdict for "From rational to binary" problem ??
~~~~~
~~~~~
Contest isn't over :)
Edit: Now that contest is over, endl $$$10^6$$$ times means the buffer being flushed $$$10^6$$$ times which is far too much for 1 second.
My last ~1.5 hours of the contest: :( internal error occurred in the system
If this was on an interactive problem, internal error = WA on Codechef usually.
How to do Node Marking ?
I first calculated $$$single[\cdot]$$$, where $$$single[p]$$$ denotes the least number of colorings needed to color exactly $$$p$$$ nodes in a single tree (calculated using some DP on a tree). Then we calculate the total answer in a knapsack-like manner using those calculated values.
Ah, I had a intuition that we need to do something knapsack-ish, but I was never close to even 10 % of solution.
Also, How to calculate single[p] ?
You can calculate it in one more knapsack-like DP on the tree -- try to construct the solution for the node given the solution for all its sons.
Do you mind posting your solution? The editorial doesn't make sense to me.
Editorials
I calculated the DP in another way in problem NDMRK since I was scared the tree DP wouldn't be $$$O(N * K)$$$.
Run an euler tree and store the ranges that each node's subtree covers and sort these ranges by start point. Note that we have the special property that for any two ranges, one wholly covers the other or their intersection is empty.
Now let $$$dp[i][j]$$$ be the minimum number of ranges to select in the last $$$i$$$ ranges to color exactly $$$j$$$ nodes. Transitions here are extremely simple:
Set $$$dp[i][j]$$$ to the minimum of these two values. Since transitions are $$$O(1)$$$, this dp runs in $$$O(N * K)$$$. The rest of the solution proceeds as the editorial does. Here is my code.