C++ Clean and Simple Solution Faster Than 96%
\nclass Solution {\npublic:\n    vector<string> ambiguousCoordinates(string s) {\n        vector<string> res;\n        string s2 = s.substr(1, s.size()-2);\n   
```\nclass Solution {\npublic:\n    vector<string> ambiguousCoordinates(string s) {\n        vector<string> res;\n        string s2 = s.substr(1, s.size()-2);\n        int n = s2.size();\n        \n        for (int i = 1; i < n; i++) {\n            vector<string> first = getNumbers(s2.substr(0, i));\n            vector<string> second = getNumbers(s2.substr(i));\n            \n            for (int j = 0; j < first.size(); j++) {\n                for (int k = 0; k < second.size(); k++) {\n                    res.push_back("(" + first[j] + ", " + second[k] + ")");\n                }\n            }\n        }\n        return res;\n    }\n    \nprivate:\n    vector<string> getNumbers(string num) {\n        vector<string> res;\n        int n = num.size();\n        \n        if (n == 1) \n            return {num};\n        \n        if (num[0] != \'0\') \n            res.push_back(num);\n        \n        if (num[0] == \'0\') {\n            if (num.back() == \'0\') return {};\n            return {"0." + num.substr(1)};\n        }\n        \n        for (int i = 1; i < n; i++) {\n            if (num.substr(i).back() == \'0\') continue;\n            res.push_back(num.substr(0, i) + "." + num.substr(i));\n        }\n        \n        return res;\n    }\n};\n```\n**Like it? please upvote!**
['C']