C++ 0ms solution
\nclass Solution {\npublic:\n    string removeOuterParentheses(string S) {\n        int count = 0;\n        std::string str;\n        for (char c : S) {\n      
```\nclass Solution {\npublic:\n    string removeOuterParentheses(string S) {\n        int count = 0;\n        std::string str;\n        for (char c : S) {\n            if (c == \'(\') {\n                if (count++) {\n                    str += \'(\';\n                }\n            } else {\n                if (--count) {\n                    str += \')\';\n                }\n            }\n        }\n        return str;\n    }\n};\n```
['C']