Language: C++

#include <bits/stdc++.h>

using namespace std;

template<long long sz = 1000000007LL>
struct mint{
private:
	long long value;
	inline mint<sz> mpow(mint<sz> a, long long b){
		if (b == 0) return mint<sz>(1);
		mint<sz> tmp = mpow(a, b / 2);
		if (b % 2) return tmp * tmp * a;
		return tmp * tmp;
	}
public:
	mint(long long value) : value((value % sz + sz) % sz) {}
	mint() : value(0) {}
	long long get(void) { return this->value; }
	constexpr mint<sz> operator+ (mint<sz> obj) const noexcept {
		return mint<sz>(this->value + obj.get());
	}
	constexpr mint<sz> operator+ (long long obj) const noexcept {
		return (*this) + mint<sz>(obj); 
	}
	constexpr mint<sz> operator- (mint<sz> obj) const noexcept {
		return mint<sz>((this->value - obj.get() + sz) % sz);
	}
	constexpr mint<sz> operator- (long long obj) const noexcept {
		return (*this) - mint<sz>(obj); 
	}
	constexpr mint<sz> operator* (mint<sz> obj) const noexcept {
		return mint<sz>(this->value * obj.get() % sz);
	}
	constexpr mint<sz> operator* (long long obj) const noexcept {
		return (*this) * mint<sz>(obj); 
	}
	constexpr mint<sz> operator/ (mint<sz> obj){
		return (*this) * mpow(obj, sz - 2);
	}
	constexpr mint<sz> operator/ (long long obj){ return (*this) / mint<sz>(obj); }
	constexpr mint<sz>& operator+= (mint<sz> obj) const noexcept {
		return *this = (*this) + obj;
	}
	constexpr mint<sz>& operator+= (long long obj) const noexcept {
		return *this = (*this) + obj;
	}
	constexpr mint<sz>& operator-= (mint<sz> obj) const noexcept {
		return *this = (*this) - obj;
	}
	constexpr mint<sz>& operator-= (long long obj) const noexcept{
		return *this = (*this) - obj;
	}
	constexpr mint<sz>& operator*= (mint<sz> obj) const noexcept {
		return *this = (*this) * obj;
	}
	constexpr mint<sz>& operator*= (long long obj) const noexcept {
		return *this = (*this) * obj;
	}
	constexpr mint<sz>& operator/= (mint<sz> obj){
		return *this = (*this) / obj;
	}
	constexpr mint<sz>& operator/= (long long obj){
		return *this = (*this) / obj;
	}
	friend constexpr ostream& operator<< (ostream& os, const mint<sz>& data){
		return os << data.value;
	}
};

int main(void){
	int N, S; cin >> N >> S;
	vector<int> A(N);
	for (auto& ai : A) cin >> ai;
	vector<vector<mint<998244353LL>>> dp(N + 1, vector<mint<998244353LL>>(S + 1));
	dp[0][0] = mint<998244353LL>(1);
	for (int i = 1; i <= N; ++i){
		for (int j = 0; j <= S; ++j){
			dp[i][j] += dp[i - 1][j] * 2;
			if (j >= A[i - 1])
				dp[i][j] += dp[i - 1][j - A[i - 1]];
		}
	}
	cout << dp[N][S] << endl;
	return 0;
}

Compiler output:
a.cc: In instantiation of 'constexpr mint<sz>& mint<sz>::operator+=(mint<sz>) const [with long long int sz = 998244353]':
a.cc:78:31:   required from here
   78 |                         dp[i][j] += dp[i - 1][j] * 2;
      |                                                    ^
a.cc:42:30: error: passing 'const mint<998244353>' as 'this' argument discards qualifiers [-fpermissive]
   42 |                 return *this = (*this) + obj;
      |                        ~~~~~~^~~~~~~~~~~~~~~
a.cc:6:8: note:   in call to 'constexpr mint<998244353>& mint<998244353>::operator=(mint<998244353>&&)'
    6 | struct mint{
      |        ^~~~
a.cc:42:42: error: binding reference of type 'mint<998244353>&' to 'const mint<998244353>' discards qualifiers
   42 |                 return *this = (*this) + obj;
      |                                          ^~~