#include #include using namespace std; const int lim = 1 << 15; bool dp[2][lim]; int main(){ int N; cin >> N; int cur = 0, nxt = 1; dp[cur][0] = true; for(int t=0;t> A; memset(dp[nxt], false, sizeof(dp[nxt])); for(int m=0;m