#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; const long long modc=998244353; int main(){ long long N, M, s, k, C, ans=0; M = 1LL<<12; cin >> N; vector S(N+1); for (int i=1; i<=N; i++){ cin >> k; s = 0; for (int j=0; j> C; C--; s += 1LL<> dp(N+1, vector(M)); dp[0][0] = 1; for (int i=1; i<=N; i++){ for (int j=0; j