|
|
вернуться в форумWA on #1 Послано cyc 16 июл 2009 14:29 I have a std program and i almostly have the same way of it, but i got WA. what's the secret of test#1? my way is DP. for i:=2 to n+1 do for j:=1 to i-1 do if (map[j,i]>0)and(f[j]+1<f[i]) then begin f[i]:=f[j]+1; fro[i]:=j; end; my way is right, but i made a mistake in output.i have got AC. Edited by author 16.07.2009 14:47 Edited by author 16.07.2009 14:47 Edited by author 16.07.2009 14:47 |
|
|