|
|
вернуться в форумFirst DP formula like 1 + min max (a[i - 1, k-1], a[n - i,k ]) is NOT GOOD! In pascal it gets TLE! Take more clever formula!!! You can simply optimize this formula, assuming that min and max are convex functions. or binary search the intersection of (e eggs, f-th floor) #define T1(i) c[e][(i)-1] #define T2(i) c[e-1][f-(i)] |
|
|