Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF = 1e18;
const ll MOD = 998244353;
#define REP(i,j,n) for(int i=j;i<n;i++)
#define rep(i,n) REP(i,0,n)

template< typename T >
T mod_pow(T x, T n, const T &p) {
  T ret = 1;
  while(n > 0) {
    if(n & 1) (ret *= x) %= p;
    (x *= x) %= p;
    n >>= 1;
  }
  return ret;
}


// Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    int n,s;
    cin >> n >> s;
    int ary[n];
    rep(i,n) cin >> ary[i];

    vector<vector<int>> dp[3010][3010];
    // rep(i, 3010) rep(j,3010) dp[i][j];
    vector<int> y;
    y.push_back(0);
    dp[0][ary[0]].push_back(y);
    REP(i,1,n) rep(j,3010)
    {
        dp[i][j] = dp[i-1][j];
        if (j-ary[i]>=0){
            vector<vector<int> > tmpx = dp[i-1][j-ary[i]];
            tmpx.push_back(i);
            dp[i][j].push_back(tmpx);
        }
    }
    vector<vector<int> > ansdp = dp[n-1][s];
    ll ans = 0;
    for (auto itr = ansdp.begin();itr!=ansdp.end();++itr)
    {
        ll youso_su = *itr.length();
        ans += mod_pow(2, n-youso_su, MOD);
    }
    cout << ans << endl;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:41:27: error: no matching function for call to 'std::vector<std::vector<int> >::push_back(int&)'
   41 |             tmpx.push_back(i);
      |             ~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; value_type = std::vector<int>]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:35: note:   no known conversion for argument 1 from 'int' to 'const std::vector<std::vector<int> >::value_type&' {aka 'const std::vector<int>&'}
 1283 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; value_type = std::vector<int>]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:30: note:   no known conversion for argument 1 from 'int' to 'std::vector<std::vector<int> >::value_type&&' {aka 'std::vector<int>&&'}
 1300 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~
a.cc:42:31: error: no matching function for call to 'std::vector<std::vector<int> >::push_back(std::vector<std::vector<int> >&)'
   42 |             dp[i][j].push_back(tmpx);
      |             ~~~~~~~~~~~~~~~~~~^~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; value_type = std::vector<int>]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:35: note:   no known conversion for argument 1 from 'std::vector<std::vector<int> >' to 'const std::vector<std::vector<int> >::value_type&' {aka 'const std::vector<int>&'}
 1283 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; value_type = std::vector<int>]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:30: note:   no known conversion for argument 1 from 'std::vector<std::vector<int> >' to 'std::vector<std::vector<int> >::value_type&&' {aka 'std::vector<int>&&'}
 1300 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~
a.cc:49:28: error: 'class __gnu_cxx::__normal_iterator<std::vector<int>*, std::vector<std::vector<int> > >' has no member named 'length'
   49 |         ll youso_su = *itr.length();
      |                            ^~~~~~
a.cc:50:23: error: no matching function for call to 'mod_pow(int, ll, const ll&)'
   50 |         ans += mod_pow(2, n-youso_su, MOD);
      |                ~~~~~~~^~~~~~~~~~~~~~~~~~~~
a.cc:10:3: note: candidate: 'template<class T> T mod_pow(T, T, const T&)'
   10 | T mod_pow(T x, T n, const T &p) {
      |   ^~~~~~~
a.cc:10:3: note:   template argument deduction/substitution failed:
a.cc:50:23: note:   deduced conflicting types for parameter 'T' ('int' and 'long long int')
   50 |         ans += mod_pow(2, n-youso_su, MOD);
      |                ~~~~~~~^~~~~~~~~~~~~~~~~~~~