ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1087. The Time to Take Stones

Dont know why was WA on test 11
Posted by Chossing 10 Jun 2004 21:25
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
Posted by Csaba Noszaly 30 Oct 2004 05:08
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
Posted by Chen Xing 21 Mar 2005 20:44
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