Language: C++

 #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cctype>
#include <cassert>
#include <climits>
#include <string>
#include <bitset>
#include <cfloat>
#include <unordered_set>
#include <iomanip>
using namespace std;
typedef long double ld;
typedef long long int ll;
typedef unsigned long long int ull;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<char> vc;
typedef vector<bool> vb;
typedef vector<double> vd;
typedef vector<string> vs;
typedef vector<ll> vll;
typedef vector<pair<int,int> > vpii;
typedef vector<vector<int> > vvi;
typedef vector<vector<char> > vvc;
typedef vector<vector<string> > vvs;
typedef vector<vector<ll> > vvll;
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define irep(it, stl) for(auto it = stl.begin(); it != stl.end(); it++)
#define drep(i,n) for(int i = (n) - 1; i >= 0; --i)
#define fin(ans) cout << (ans) << endl
#define mp(p,q) make_pair(p, q)
#define pb(n) push_back(n)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define Sort(a) sort(a.begin(), a.end())
#define Rort(a) sort(a.rbegin(), a.rend())
#define MATHPI acos(-1)
int dx8[8] = {1, 0, -1, 0, 1, -1, -1, 1};
int dy8[8] = {0, 1, 0, -1, 1, 1, -1, -1};
int dx4[4] = {1, 0, -1, 0};
int dy4[4] = {0, 1, 0, -1};
template <class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;} return 0;}
template <class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;} return 0;}
template<typename A, size_t N, typename T> void Fill(A (&array)[N], const T &val){ fill((T*)array, (T*)(array+N), val); }
struct io{io(){ios::sync_with_stdio(false);cin.tie(0);}};
const int INF = INT_MAX;
const ll LLINF = 1LL<<60;
const ll MOD = 1000000007;
const double EPS = 1e-9;
template < typename T > inline string toString( const T &a ) { ostringstream oss; oss << a; return oss.str(); };

struct mint {
    ll x;
    mint(ll x=0):x((x%MOD+MOD)%MOD){}
    mint operator-() const { return mint(-x);}
    mint& operator+=(const mint a) {
        if ((x += a.x) >= MOD) x -= MOD;
        return *this;
    }
    mint& operator-=(const mint a) {
        if ((x += MOD-a.x) >= MOD) x -= MOD;
        return *this;
    }
    mint& operator*=(const mint a) { (x *= a.x) %= MOD; return *this;}
    mint operator+(const mint a) const { return mint(*this) += a;}
    mint operator-(const mint a) const { return mint(*this) -= a;}
    mint operator*(const mint a) const { return mint(*this) *= a;}
    mint pow(ll t) const {
        if (!t) return 1;
        mint a = pow(t>>1);
        a *= a;
        if (t&1) a *= *this;
            return a;
    }
    mint inv() const { return pow(MOD-2);}
    mint& operator/=(const mint a) { return *this *= a.inv();}
    mint operator/(const mint a) const { return mint(*this) /= a;}
    };
    istream& operator>>(istream& is, const mint& a) { return is >> a.x;}
    ostream& operator<<(ostream& os, const mint& a) { return os << a.x;}
int main()
{
   string K;
   int M;
   cin >> K >> M;
   int L = K.length();

   mint dp[10010][2][101];
   dp[0][0][0] = 1;

   rep(i,L){
       rep(mo,M){
          //moは余りの数
          rep(j,2){
             int D = K[i]-'0';
             rep(d,10){
                 dp[i+1][j || (d<D)][(mo+d)%M]+=dp[i][j][mo];
             }
          }
       }
   }

   fin(dp[0][0]+dp[L][1][0]-1);

}



Compiler output:
a.cc: In function 'int main()':
a.cc:112:16: error: no match for 'operator+' (operand types are 'mint [101]' and 'mint')
  112 |    fin(dp[0][0]+dp[L][1][0]-1);
      |        ~~~~~~~~^~~~~~~~~~~~
      |               |           |
      |               mint [101]  mint
a.cc:39:27: note: in definition of macro 'fin'
   39 | #define fin(ans) cout << (ans) << endl
      |                           ^~~
In file included from /usr/include/c++/14/string:48,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:627:5: note: candidate: 'template<class _Iterator> constexpr std::reverse_iterator<_Iterator> std::operator+(typename reverse_iterator<_Iterator>::difference_type, const reverse_iterator<_Iterator>&)'
  627 |     operator+(typename reverse_iterator<_Iterator>::difference_type __n,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:627:5: note:   template argument deduction/substitution failed:
a.cc:112:27: note:   'mint' is not derived from 'const std::reverse_iterator<_Iterator>'
  112 |    fin(dp[0][0]+dp[L][1][0]-1);
      |                           ^
a.cc:39:27: note: in definition of macro 'fin'
   39 | #define fin(ans) cout << (ans) << endl
      |                           ^~~
/usr/include/c++/14/bits/stl_iterator.h:1798:5: note: candidate: 'template<class _Iterator> constexpr std::move_iterator<_IteratorL> std::operator+(typename move_iterator<_IteratorL>::difference_type, const move_iterator<_IteratorL>&)'
 1798 |     operator+(typename move_iterator<_Iterator>::difference_type __n,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1798:5: note:   template argument deduction/substitution failed:
a.cc:112:27: note:   'mint' is not derived from 'const std::move_iterator<_IteratorL>'
  112 |    fin(dp[0][0]+dp[L][1][0]-1);
      |                           ^
a.cc:39:27: note: in definition of macro 'fin'
   39 | #define fin(ans) cout << (ans) << endl
      |                           ^~~
In file included from /usr/include/c++/14/string:54:
/usr/include/c++/14/bits/basic_string.h:3598:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 3598 |     operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3598:5: note:   template argument deduction/substitution failed:
a.cc:112:27: note:   mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'mint [101]'
  112 |    fin(dp[0][0]+dp[L][1][0]-1);
      |                           ^
a.cc:39:27: note: in definition of macro 'fin'
   39 | #define fin(ans) cout << (ans) << endl
      |                           ^~~
/usr/include/c++/14/bits/basic_string.h:3616:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 3616 |     operator+(const _CharT* __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3616:5: note:   template argument deduction/substitution failed:
a.cc:112:27: note:   'mint' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
  112 |    fin(dp[0][0]+dp[L][1][0]-1);
      |                           ^
a.cc:39:27: note: in definition of macro 'fin'
   39 | #define fin(ans) cout << (ans) << endl
      |                           ^~~
/usr/include/c++/14/bits/basic_string.h:3635:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(_CharT, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 3635 |     operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs)
      |     ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3635:5: note:   template argument deduction/substitution failed:
a.cc:112:27: note:   'mint' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
  112 |    fin(dp[0][0]+dp[L][1][0]-1);
      |                           ^
a.cc:39:27: note: in definition of macro 'fin'
   39 | #define fin(ans) cout << (ans) << endl
      |                           ^~~
/usr/include/c++/14/bits/basic_string.h:3652:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
 3652 |     operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3652:5: note:   template argument deduction/substitution failed:
a.cc:112:27: note:   mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'mint [101]'
  112 |    fin(dp[0][0]+dp[L][1][0]-1);
      |                           ^
a.cc:39:27: note: in definition of macro 'fin'
   39 | #define fin(ans) cout << (ans) << endl
      |                           ^~~
/usr/include/c++/14/bits/basic_string.h:3670:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)'
 3670 |     operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)
      |     ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3670:5: note:   template argument deduction/substitution failed:
a.cc:112:27: note:   mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'mint [101]'
  112 |    fin(dp[0][0]+dp[L][1][0]-1);
      |                           ^
a.cc:39:27: note: in definition of macro 'fin'
   39 | #define fin(ans) cout << (ans) << endl
      |                           ^~~
/usr/include/c++/14/bits/basic_string.h:3682:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 3682 |     operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3682:5: note:   template argument deduction/substitution failed:
a.cc:112:27: note:   mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'mint [101]'
  112 |    fin(dp[0][0]+dp[L][1][0]-1);
      |                           ^
a.cc:39:27: note: in definition of macro 'fin'
   39 | #define fin(ans) cout << (ans) << endl
      |                           ^~~
/usr/include/c++/14/bits/basic_string.h:3689:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
 3689 |     operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3689:5: note:   template argument deduction/substitution failed:
a.cc:112:27: note:   mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'mint [101]'
  112 |    fin(dp[0][0]+dp[L][1][0]-1);
      |                           ^
a.cc:39:27: note: in definition of macro 'fin'
   39 | #define fin(ans) cout << (ans) << endl
      |                           ^~~
/usr/include/c++/14/bits/basic_string.h:3696:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
 3696 |     operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3696:5: note:   template argument deduction/substitution failed:
a.cc:112:27: note:   mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'mint [101]'
  112 |    fin(dp[0][0]+dp[L][1][0]-1);
      |                           ^
a.cc:39:27: note: in definition of macro 'fin'
   39 | #define fin(ans) cout << (ans) << endl
      |                           ^~~
/usr/include/c++/14/bits/basic_string.h:3719:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
 3719 |     operator+(const _CharT* __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3719:5: note:   template argument deduction/substitution failed:
a.cc:112:27: note:   'mint' is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
  112 |    fin(dp[0][0]+dp[L][1][0]-1);
      |                           ^
a.cc:39:27: note: in definition of macro 'fin'
   39 | #define fin(ans) cout << (ans) << endl
      |                           ^~~
/usr/include/c++/14/bits/basic_string.h:3726:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(_CharT, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
 3726 |     operator+(_CharT __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3726:5: note:   template argument deduction/substitution failed:
a.cc:112:27: note:   'mint' is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
  112 |    fin(dp[0][0]+dp[L][1][0]-1);
      |                           ^
a.cc:39:27: note: in definition of macro 'fin'
   39 | #define fin(ans) cout << (ans) << endl
      |                           ^~~
/usr/include/c++/14/bits/basic_str