#include "bits/stdc++.h" #define ALL(obj) (obj).begin(),(obj).end() #define RALL(obj) (obj).rbegin(),(obj).rend() #define REP(i, n) for(int i = 0; i < (int)(n); i++) #define REPR(i, n) for(int i = (int)(n); i >= 0; i--) #define FOR(i,n,m) for(int i = (int)(n); i < int(m); i++) using namespace std; typedef long long ll; const int MOD = 1e9 + 7; const int INF = MOD - 1; const ll LLINF = 4e18; int bit_count(int n) { int cnt = 0; while (n != 0) { if (n % 2 == 1) cnt++; n >>= 1; } return cnt; } // まだ使っってないものがS ll power(int S, int n,vector& dp,const vector& a) { if (dp[S] >= 0) return dp[S]; if (S == (1<> n; vector dp(1 << n,-1); vector a(n); REP(i, n) { cin >> a[i]; } cout << power(0, n, dp, a) << endl; getchar(); getchar(); }