#include #include #include #include #include #include #include using namespace std; int donations[200][1500]; string phrases[400]; int phrasevalue[400]; string line; int stopvotes[20]; float stoptime[20]; float travel[20][20]; int currvalue; list currviolators; list::iterator iter; int bestsofar; int currdoner; int curramount; int currcand; float totaltime; int numstops; int bestvotes; int self; int numvotes[200]; int value,value2; int numppl; bool poss; int findlargest() { int val = -1; int index; for(int i = 0;i val) { val = numvotes[i]; index = i; } } // cout<>sets; for(int i = 0; i>numppl; getline(infile,instring); stringstream ssout2(instring); ssout2>>self; for(int j = 0;j>numvotes[j]; } poss = true; value = findlargest(); self += value/2; value = value/2; int k; for(int j = 0;j<(numppl/2);j++) { value2 = findsmallest(); value += value2/2; if(value > self) poss = false; value2 = value2/2; value = findlargest(); if(value2 > self) { poss = false; } value2 += value/2; value = value/2; k = j; } /* if(k*2 < numppl-1) { value2 = findsmallest(); value += value2/2; if(value > self) poss = false; }*/ if(poss) cout<<"Possible"<