/SUKHO - Công thức sức khỏe (ACMVN 9-2014)

<Problem>

http://ntucoder.net/Problem/Details/59
              Uses Crt;
      Var n,m,k:longint;
          i,j:longint;
          a,f:array[0..1000000] of int64;
      Begin
          readln(n,m,k);
          for i:=1 to n do read(a[i]);
          f[0]:=1;
          for i:=1 to n do
           begin
               for j:=m downto a[i] do
                 begin
                     f[j]:=f[j]+f[j-a[i]];
                     if f[m]>=k then break;
                 end;
           end;
          if f[m]>=k then writeln('ENOUGH') else writeln(f[m]);
          readln;
      End.