# Where are editorial for Lunchtime96

The problem editorial is not updated until now.
plz many it fast.

Hard problems editorial are not updated .

No idea about them. But I can share brief hints of problems you want.

Edit â†’ For n=2, a[1] + a[2] = r1 * b[1] + r2 * b[2] will this hold?

For N=2 there are just 2 cases -
R1=A1/B1 and R2=A2/B2 in this case if R1>=R2 answer is zero.
Otherwise R1=R2=r.
We can write error as (A1-rB1)^2+(A2-rB2)^2.
In this case, itâ€™s a quadratic equation in r. You can check on the internet how to find the minimum.

A hint for subtasks 3 and 4

Divide into consecutive blocks of equal r values. Then for each block [L, R], its contribution assuming same r for all indices in [L, R], is a quadratic in r. Then the value of r for the block [L, R] must be the one that gives the lowest possible value for this quadratic, else we can shift to the left or right to improve the objective, while maintaining the non-increasing property.

Should it be A1/B1 ?

Yeah. Updated.

why not any other case

Error must be non zero if first case doesnâ€™t holds. Check hint once. Making both equal is the only way to minimize error otherwise we change one of them by epsilon to reduce error.

Can you give hints for Interactive MST CodeChef: Practical coding for everyone This problem

Can you explain the third approach a bit for TRTOKENS problem , mainly what is offset
PS: I know small to large merge .

1 Like

I am sorry for that. The editorials for the remaining 3 problems would get delayed more than expected this time.

Since Starter and Lunchtime were on consecutive days plus was also involved in one of the problems as a setter. And for the upcoming two days, I have a very busy schedule - interviews and onboarding things. WIll get free by Wednesday Evening from all the stuff and I assure you that the editorials for the remaining problems will get out within this week.

Apology for the delay !!

Where are editorialďĽź

Even I am not quite sure about what this offset is about. The editorialist also hasnâ€™t mentioned anything about it either.