#include #include #include #include #include using namespace std; int main(int argc, const char * argv[]) { int Max = 10000; int n; cin >> n; int w[n]; int sum = 0; bool dp[Max]; for (int i = 0; i < Max; i++) { dp[i] = false; } for (int i = 0; i < n; i++) { cin >> w[i]; sum += w[i]; } //片方が0の状態は必ず実現可能 dp[0] = true; for (int i = 0; i < n; i++) { //それぞれの荷物について for (int j = Max - 1 - w[i]; j >= 0; j--) { // dp[j+w[i]] |= dp[j]; } } if(sum % 2 == 1 || !dp[sum/2]){cout << "impossible";} else{cout << "possible";} cout << "\n"; }