void count(int array[], int i, int n, int temp, int sum) { if (i > n) return; if (temp + array[i] == sum) { flag = true; return; } count(array, i + 1, n, temp + array[i], sum); count(array, i + 1, n, temp, sum); }
int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int n; while (cin >> n) { int array[n]; int sum = 0; flag = false; for (int i = 0; i < n; i++) { cin >> array[i]; sum += array[i]; } sort(array, array + n); if (sum % 2) { cout << "Sorry,I can't!" << endl; continue; } count(array, 0, n - 1, 0, sum / 2); if (flag) cout << "Of course,I can!" << endl; else cout << "Sorry,I can't!" << endl; } return 0; }