|
|
back to boardDont know why was WA on test 11 program ural_1087; const maxlen=10000; var f,g:array [0..maxlen] of boolean; k:array [1..maxlen] of Integer; i,j,n,kk:integer; begin readln (n,kk); for i:=1 to kk do read (k[i]); fillchar (f,sizeof(f),false); fillchar (g,sizeof(g),false); g[0]:=true; f[0]:=true; for I:=0 to n Do for J:=1 to kK Do IF G[I] and (I+K[J]<=n) Then Begin G[I+K[J]]:=true; F[I+K[J]]:=F[I+K[J]] or (not f[I]); End; if f[n] then writelN (1) else writeln (2); end. Re: Dont know why was WA on test 11 test 11 is strange, either 'g' or ac. the judge is possibly wrong in this case. peace. Edited by author 30.10.2004 05:21 Re: Dont know why was WA on test 11 You got accepted at last!Could you tell me how you have done it? Re: Dont know why was WA on test 11 Posted by PSV 21 Oct 2006 02:24 Can anybody be shorter : 17 strings with out compressing in my prog Bp For my code mail me to _necro_@ukr.net Edited by author 21.10.2006 02:26 Edited by author 21.10.2006 02:26 Edited by author 21.10.2006 02:26 Edited by author 21.10.2006 02:26 Edited by author 21.10.2006 02:26 Edited by author 21.10.2006 02:26 |
|
|