User:Jeff/Zones solution

using namespace std; pair solve(vector, int, vector , vector ); int main { for (int i(1); ; ++i) { int n, toBuild; cin >> n >> toBuild; if (n == 0) return 0; vector towerPop(n); for (int j(0); j < n; ++j) cin >> towerPop[j]; int m;    cin >> m;     vector areaMask(m, 0), areaPop(m); for (int j(0); j < m; ++j) { int t;      cin >> t;       for (int k(0); k < t; ++k) { int x;        cin >> x;         areaMask[j] |= (1<<(x-1)); }      cin >> areaPop[j]; }    pair ans(solve(towerPop, toBuild, areaMask, areaPop)); if (i > 1) cout << endl; cout << "Case Number "< solve(vector towerPop, int toBuild,    vector areaMask, vector areaPop) { int n(towerPop.size), m(areaMask.size); int maxCust(0), bestMask(0); for (int i(0); i < (1< 1) tempPop -= areaPop[j]*(tempCount-1); }    if (tempPop > maxCust) { maxCust = tempPop; bestMask = i;    } }  vector ans; for (int i(0); i < n; ++i) { if (bestMask & (1<<(n-i-1))) continue; ans.push_back(i+1); }  return make_pair(maxCust, ans); }
 * 1) include
 * 2) include