// // main.cpp // Q19 // // Created by AkihiroKOBAYASHI on 7/6/15. // Copyright (c) 2015 Akhr5884. All rights reserved. // #include int *w; int sum; int n; int check; void judge(int nowWeight, int nowNumber) { if(check != 1) { if(nowWeight == sum-nowWeight) { check = 1; return; } else if(nowWeight > sum - nowWeight || nowNumber == n) { return; } else { // add judge(nowWeight, nowNumber + 1); // not add judge(nowWeight + w[nowNumber], nowNumber + 1); } } return; } int main(int argc, const char * argv[]) { std::cin >> n; w = (int*)malloc(sizeof(w) * n); int count = 0; sum = 0; while (count < n) { int wi; std::cin >> wi; w[count] = wi; sum += wi; count++; } check = 0; judge(0, 0); if(check == 1) { std::cout << "possible" << "\n"; } else { std::cout << "impossible" << "\n"; } return 0; }