Wrong answer on submission


why is this code not getting submitted for this problem

plz correct the code along with explainations…

dont forward the editorial…dont

Reply at the earliest

@S19LPPP0202
Your logic is correct but there are few mistakes in your code. I am telling you those mistakes, correct them

  1. Bi and Fi can be upto 10^9, So their sum stored in count can exceed integeral range. Thus make a[] array, count, y and z as long long int.
  2. while call get() function you start loop from idx, but idx is i+1 (as you have returned i+1 not i). So for next call i should start from idx-1. Thus intialise idx with 1 and while calling get() function call get(m,idx-1);

@S19LPPP0202
I have updated your code and it is giving AC. Please check here and mark this doubt as resolved
https://ide.codingblocks.com/s/261820

This is related to egg dropping problem…

How to print for every floor ??like I want to print what shall be worst case for floor 1 floor 2 etc out of which we take minimum…
In the link shared by u we return the final ans only…

for every floor,try to break every egg from that floor and take the maximum of the two cases-
a)egg breaks
b)egg doesn’t break
How to print this so that I can verify my and for each floor…??
Plz reply this is imp doubt for me …

@S19LPPP0202
Please raise separate doubt for the same and mark this doubt as resolved if you have no more doubt regarding this question.

@S19LPPP0202
I think this doubt has resolved, please mark this doubt as resolved.


plz reply to this doubt as well…this is a new doubt through a seperate link…click on it to reply… i will mark this doubt as resolved…it is a doubt not solved for a long time pl.z…

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.