Language: C++

#include "bits/stdc++.h"

using namespace std;

typedef long double ld;
typedef long long ll;

#define sz(x) (int)(x).size()
#define pb push_back
#define mp make_pair
#define f first
#define s second

template<typename T, typename U> bool ckmin(T &a, U b){ return b < a ? a = b, true : false; }
template<typename T, typename U> bool ckmax(T &a, U b){ return b > a ? a = b, true : false; }

const ll MOD = 998244353;

ll n, ops;
string s;
vector<ll> size;
vector<vector<vector<ll>>> dp;
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cin >> s >> ops;
    n = sz(s); ckmin(ops, n);
    reverse(s.begin(), s.end());
    for(int i = 0; i < n; ++i){
        size.pb(0);
        while(i < n && s[i] != '0'){
            size.back()++;
            i++;
        }
    }
    if(s.back() == '0') size.pb(0);
    // for(auto i : size) cout << i << " ";
    // cout << "\n";
    dp.assign(sz(size) + 1, vector<vector<ll>>(ops + 1, vector<ll>(ops + 1, 0)));
    dp[0][0][0] = 1;
    for(ll i = 0; i < sz(size); ++i){
        for(ll j = 0; j <= ops; ++j){
            for(ll k = 0; k <= j; ++k){
                for(ll x = 0; x + k <= j; ++x){
                    dp[i + 1][j][k] += dp[i][j][x + k];
                    dp[i + 1][j][k] %= MOD;
                }
                for (ll x = 1; x <= min(min(size[i], j), k); ++x){
					dp[i + 1][j][k] += dp[i][j - x][k - x];
					dp[i + 1][j][k] %= MOD;
				}
            }
        }
    }
    ll res = 0;
    for(int i = 0; i <= ops; ++i){
        res += dp[sz(size)][i][0];
        res %= MOD;
    }
    cout << res;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:9: error: reference to 'size' is ambiguous
   30 |         size.pb(0);
      |         ^~~~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:21:12: note:                 'std::vector<long long int> size'
   21 | vector<ll> size;
      |            ^~~~
a.cc:32:13: error: reference to 'size' is ambiguous
   32 |             size.back()++;
      |             ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:21:12: note:                 'std::vector<long long int> size'
   21 | vector<ll> size;
      |            ^~~~
a.cc:36:25: error: reference to 'size' is ambiguous
   36 |     if(s.back() == '0') size.pb(0);
      |                         ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:21:12: note:                 'std::vector<long long int> size'
   21 | vector<ll> size;
      |            ^~~~
a.cc:39:18: error: reference to 'size' is ambiguous
   39 |     dp.assign(sz(size) + 1, vector<vector<ll>>(ops + 1, vector<ll>(ops + 1, 0)));
      |                  ^~~~
a.cc:8:21: note: in definition of macro 'sz'
    8 | #define sz(x) (int)(x).size()
      |                     ^
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:21:12: note:                 'std::vector<long long int> size'
   21 | vector<ll> size;
      |            ^~~~
a.cc:41:26: error: reference to 'size' is ambiguous
   41 |     for(ll i = 0; i < sz(size); ++i){
      |                          ^~~~
a.cc:8:21: note: in definition of macro 'sz'
    8 | #define sz(x) (int)(x).size()
      |                     ^
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:21:12: note:                 'std::vector<long long int> size'
   21 | vector<ll> size;
      |            ^~~~
a.cc:48:45: error: reference to 'size' is ambiguous
   48 |                 for (ll x = 1; x <= min(min(size[i], j), k); ++x){
      |                                             ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:21:12: note:                 'std::vector<long long int> size'
   21 | vector<ll> size;
      |            ^~~~
a.cc:57:22: error: reference to 'size' is ambiguous
   57 |         res += dp[sz(size)][i][0];
      |                      ^~~~
a.cc:8:21: note: in definition of macro 'sz'
    8 | #define sz(x) (int)(x).size()
      |                     ^
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:21:12: note:                 'std::vector<long long int> size'
   21 | vector<ll> size;
      |            ^~~~