|
|
вернуться в форумPlease Help. I use right DP but I have WA3... [code deleted] Edited by moderator 24.11.2019 13:21 Re: Please Help. I use right DP but I have WA3... Послано wwwwww 12 янв 2006 23:53 You have overflow: ... up:=1; for down:=1 to n do begin sum:=b[j,down]-b[j,up-1]-b[i-1,down]+b[i-1,up-1]; ... In first step b[j,up-1] = b[j][0] but b is array[1..maxn,1..maxn] of longint (0 is invalid) Re: Please Help. I use right DP but I have WA3... Thanks, but after chaging a,b:array[1..maxn,1..maxn] of longint to a,b:array[0..maxn,0..maxn] of longint i also have WA3 Re: Please Help. I use right DP but I have WA3... Послано Loch 16 янв 2006 16:49 Thanks, I got AC. My problem: I wroute : up:=down; But need : up:=down+1; |
|
|