|
|
back to boardI do not know how to solve it in C++. Posted by Martin 15 Mar 2010 10:30 No matter when I used double or long double, my code still got TLE. Opt[Now][j][0] = Opt[Pre][j][0] + Opt[Pre][j][1] + Opt[Pre][j][3]; Opt[Now][j][1] = Opt[Pre][j - 1][0] + Opt[Pre][j - 1][2] + Opt[Pre][j - 1][1]; Opt[Now][j][2] = Opt[Pre][j][2] + Opt[Pre][j][3]; Opt[Now][j][3] = Opt[Pre][j - 1][2] + Opt[Pre][j - 1][3]; I had to write a Pascal code using extended and got AC. Could anyone tell me how to AC in C++? Re: I do not know how to solve it in C++. I know solution which can be written on all allowable languages. I suppose, this solution won't get TLE. Becouse it is O(1). Re: I do not know how to solve it in C++. I know solution which can be written on all allowable languages. I suppose, this solution won't get TLE. Becouse it is O(1). |
|
|