// Parens.cc // ECNA 2012 - Parencedence! #include #include using namespace std; const bool DEBUG = false; #define IFDB if (DEBUG) #define FOR(i,n) for(int i=0;i>operators; FOR(i,operators) cin>>nums[i]>>ops[i]; cin>>nums[operators]; } // ------ void PrintExp(int n, int nums[], char ops[]){ cout<<"exp: ("<best){ best = value; bestop = i; } } return best; } // ------ int main(){ string line; char myline[80]; int n, result1 , result2, bestop, caseno=1; cin>>n; FOR(i,n){ GetExp(); result1 = Max(operators, nums, ops, bestop); cout<<"Case "<-1*result2) cout<<"Player 1 wins"; else if (result1<-1*result2) cout<<"Player 2 wins"; else //tie cout<<"Tie"; cout<