I couldn't understand the problem statement
![:oops:](./images/smilies/icon_redface.gif)
Can anybody tell me what it says?????
Moderator: Board moderators
Don't be mistaken. This is NOT an easy problem. Note that the total number of submissions is really low when compared to other problems from the same set. The high solving rate only says "once you get it, it's unlikely you will make a mistake in coding it".Niaz wrote:Now the problem is clear to me. But, still have one more question about the solution. How did you find that the starting position would be 14! Would you please explain a little about your algorithm? As the solving rate is very high, I guess, this is an easy problem but stuck over there.
Code: Select all
AC
Code: Select all
63 9223372036854775807
Code: Select all
10 786599
60 1844674407370955161
You can try this instead of binary search:DRONZER wrote: for k=2, it seems we have just the sequnce 1,2,3,4...
what for k=3, 4, ... ?
I use similar method to solve this problem. First, I build a f(b,t) table for all possible combinations of b and t according to problem description. Then for each k and n, I use binary search to find the answer.bill8124 wrote:You can try this instead of binary search:DRONZER wrote: for k=2, it seems we have just the sequnce 1,2,3,4...
what for k=3, 4, ... ?
f(b,t)=f(b-1, t-1)+1+f(b, t-1)
f: the highest floor you can definitely find the floor where the water balloon will burst
b: water balloons you have
t: the number of times you can try
then it becomes a dynamic programming problem
hope this helps!
---
last post was June 2006 ....kerker
I solved this problem because of submission mistake XD
(I sent the code of 10924 to 10934..)
What about this input? Is this input valid?35 4564996047803285891
63 10200434957544002416
6 8594083207451185996
26 11596953366899797872
94 13934715367743307893
100 2427617038504671597
13 5662331197191996410
83 3251182759881391873
56 9830927489542347198
59 14389584202107743284
0 0