C++ Solution with explanation
\n    /*\n     * input: "(123)"\n     * First we will assign commas\n     *               123\n     *                |\n     *            ----------\n     *    
```\n    /*\n     * input: "(123)"\n     * First we will assign commas\n     *               123\n     *                |\n     *            ----------\n     *           |          |\n     *         1, 23       12, 3\n     *\n     * Now we have 2 pairs after putting comma. Now try tp put the \n     * decimal point\n     *\n     *         1, 2.3       1.2, 3\n     * So there are total 4 combinations (1, 23), (1, 2.3), (12, 3), (1.2, 3)\n     * While applying decimal point, we need to exclude the nos that are "00"\n     * "0.0", "0.00", "1.0", "001", "00.01", ".1"\n    */\n\n    //Function that will generate all nos (including decimal)\n    void generateNumbers(string s, vector<string>& out) {\n        // If the string has only one character then there won\'t be any\n        // decimal point, so pushing the num and returning\n        if (s.length() == 1) {\n            out.push_back(s);\n            return;\n        }\n        \n        // Check if the first char is zero or not\n        if (s[0] != \'0\') {\n            // The first char is not zero, so we have a valid number and one\n            // combination, push it to res\n            // Eg: s = 12 for input 123, then 12 is one combination of input.\n            out.push_back(s);\n        }\n        else {\n            // First char is zero, check if the last char is zero, if so the\n            // number had extraneous zeros which is not valid. If last char is\n            // not zero then we add a decimal point after the first char and\n            // return from the function\n            // Eg: s = "01230" return empty vecctor\n            //     s = "01234" return 0.1234\n            if (s.back() != \'0\') {\n                out.push_back("0." + s.substr(1));\n            }\n            \n            return;\n        }\n\n        // Check if the last char is 0, if so return\n        // Eg: s = "10" skip as 1.0 not allowed\n        if (s.back() == \'0\') {\n            return;\n        }\n        \n        // Now that we have valid numbers, loop all characters and find the\n        // decimal combinations.\n        for (int i = 1; i < s.length(); i++) {\n            out.push_back(s.substr(0, i) + "." + s.substr(i));\n        }\n        \n        return;\n    }\n    \n    vector<string> ambiguousCoordinates(string s) {\n        // Generate a string by excluding open and close\n        // brackets\n        string s2 = s.substr(1, s.length() - 2);\n        \n        // Variable to store the length of input\n        int n = s2.length();\n        \n        // Vector to store result\n        vector<string> res;\n        // Left and right vectors are for storing the number combinations for\n        // left and right values\n        vector<string> left;\n        vector<string> right;\n        \n        // Traverse each char in string starting from 1 as we need\n        // at least one char\n        for (int i = 1; i < n; i++) {\n            // Generate the left half and right half ie.., if input is 123\n            // below logic will generate it as 1 and 23\n            // Send it to generate numbers function to get the decimal nos\n            // out of it\n            generateNumbers(s2.substr(0, i), left);            \n            generateNumbers(s2.substr(i), right);\n            \n            // Now that we have all combinations for this number, put it in\n            // result by adding space between nos and open and close brackets\n            for (string& lnum : left) {\n                for (string& rnum : right) {\n                    res.push_back("(" + lnum + ", " + rnum + ")");\n                }\n            }\n            // Clear the vectors for the next set of generated nums\n            left.clear();\n            right.clear();\n        }\n        \n        // return the result\n        return res;\n    }\n```
[]