#include #include #include #include using namespace std; #define REP(i,a,b) for(i=a;i> n; for(i=0;i> w; for(j=sum;j>-1;j--) { if(dp[j]) dp[j+w] = 1; } sum += w; } /* 入力終了! */ if(sum%2 == 0 && dp[sum/2] == 1) cout << "possible" << endl; else cout << "impossible" << endl; return 0; }