#include using namespace std; #include using namespace atcoder; using mint=modint998244353; //1000000007; using ll=long long; using pp=pair; #define sr string #define vc vector #define fi first #define se second #define rep(i,n) for(ll i=0;i<(ll)n;i++) #define pb push_back #define all(v) v.begin(),v.end() #define pque priority_queue #define bpc(a) __builtin_popcount(a) int main(){ ll n,k;cin>>n>>k; vcv; for(ll i=1;i<10;i++){ ll a;cin>>a; rep(j,a)v.pb(i); } vcten(n); ten[0]=1; rep(i,n-1)ten[i+1]=ten[i]*10; vc dp(1<(k,0)); dp[0][0]=1; rep(i,n){ vc pre(1<(k,0)); swap(pre,dp); rep(j,1<>x&1)dp[j|1<