This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #include <iostream> | |
| #include <cstring> | |
| #include <cstdlib> | |
| #include <string> | |
| #include <vector> | |
| #include <algorithm> | |
| using namespace std; | |
| int lamps, opsToDo; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | bool isBalanced(const string message) { | |
| int paransOpen = 0; | |
| int maybeOpen = 0; | |
| int maybeClosed = 0; | |
| char prevChar = 0; | |
| string::const_iterator iter; | |
| for (iter = message.begin(); iter < message.end(); iter++) { | |
| if (*iter == '(') { | |
| if (prevChar == ':') { | 
NewerOlder