#include "bits/stdc++.h" using namespace std; typedef long long ll; #define INF (1<<30) #define INFLL (1ll<<60) typedef pair P; typedef pair E; #define MOD (1000000007ll) #define l_ength size void mul_mod(ll& a, ll b){ a *= b; a %= MOD; } void add_mod(ll& a, ll b){ b += MOD; a += b; a %= MOD; } int n; ll memo[33400],m[20]; bool done[33400]; ll dp(int st){ int i; ll s=0ll; if(done[st]){ return memo[st]; } for(i=0; i> n; for(i=0; i> m[i]; } cout << (dp((1<