#include typedef long long ll; using namespace std; const ll MOD = 1e9+7; const ll MAX= 1000001; int main(){ int n; cin>>n; int a[n]; int dp[1<<14]; for(int i=0; i>a[i]; } for(int mask=0; mask<(1<