output_description: Print the sum of f(T) modulo 998244353.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N S
      A_1 A_2 ... A_N
attempt: from functools import lru_cache
  
  
  @lru_cache(maxsize=1000)
  def pow_r(x, n, mod=10**9 + 7):
      """
      O(log n)
      """
      if n == 0:  # exit case
          return 1
      if n % 2 == 0:  # standard case ① n is even
          return pow_r((x**2) % 1000000007, n // 2) % mod
      else:  # standard case ② n is odd
          return (x * pow_r((x**2) % 1000000007, (n - 1) // 2) % mod) % mod
  
  
  def resolve():
      N, S = map(int, input().split())
      A = map(int, input().split())
  
      dpt = [dict() for i in range(S + 1)]
  
      dpt[0][0] = 1
      mx = 0
      for i in A:
          for j in range(min(mx, S - i) + 1, -1, -1):
              if dpt[j]:
                  mx = max(j + i, mx)
              if i + j > S:
                  continue
              for k in dpt[j]:
                  if not k + 1 in dpt[j + i]:
                      dpt[j + i][k + 1] = 0
                  dpt[j + i][k + 1] += dpt[j][k]
      ans = 0
      for i in dpt[-1]:
          ans += (pow_r(2, N - i, mod=998244353) * dpt[-1][i]) % 998244353
      print(ans)
  
  
  resolve()
  
problem_description: Statement
  
  Given are a sequence of N positive integers A_1, A_2, \ldots, A_N and another
  positive integer S.  
  For a non-empty subset T of the set \\{1, 2, \ldots , N \\}, let us define
  f(T) as follows:  
  
    * f(T) is the number of different non-empty subsets \\{x_1, x_2, \ldots , x_k \\} of T such that A_{x_1}+A_{x_2}+\cdots +A_{x_k} = S.
  
  Find the sum of f(T) over all 2^N-1 subsets T of \\{1, 2, \ldots , N \\}.
  Since the sum can be enormous, print it modulo 998244353.
samples: [{"input": "3 4\n    2 2 4", "output": "6\n    \n\nFor each T, the value of f(T) is shown below. The sum of these values is 6.\n\n  * f(\\\\{1\\\\}) = 0\n  * f(\\\\{2\\\\}) = 0\n  * f(\\\\{3\\\\}) = 1 (One subset \\\\{3\\\\} satisfies the condition.)\n  * f(\\\\{1, 2\\\\}) = 1 (\\\\{1, 2\\\\})\n  * f(\\\\{2, 3\\\\}) = 1 (\\\\{3\\\\})\n  * f(\\\\{1, 3\\\\}) = 1 (\\\\{3\\\\})\n  * f(\\\\{1, 2, 3\\\\}) = 2 (\\\\{1, 2\\\\}, \\\\{3\\\\})\n\n* * *"}, {"input": "5 8\n    9 9 9 9 9", "output": "0\n    \n\n* * *"}, {"input": "10 10\n    3 1 4 1 5 9 2 6 5 3", "output": "3296"}]