12ms C++ solution using DFS
\n    vector<double> util(vector<double> a,vector<double> b){\n        vector<double> r;\n        for(int i=0;i<a.size();i++){\n            for(int j=0;j<b.size
```\n    vector<double> util(vector<double> a,vector<double> b){\n        vector<double> r;\n        for(int i=0;i<a.size();i++){\n            for(int j=0;j<b.size();j++){\n                r.push_back(a[i]+b[j]);\n                r.push_back(a[i]*b[j]);\n                r.push_back(a[i]/b[j]);\n                r.push_back(a[i]-b[j]);\n                r.push_back(b[j]/a[i]);\n                r.push_back(b[j]-a[i]);\n            }\n        }\n        return r;\n    }\n    bool judgePoint24(vector<int>& n) {\n        double epsilon=pow(10,-6);\n        vector<double> a,b,c,x,y,z;\n        bool f;\n        for(int i=0;i<3;i++){\n            for(int j=i+1;j<4;j++){\n                a=util({(double)n[i]},{(double)n[j]});\n                f=true;\n                for(int k=0;k<4;k++){\n                    if(k!=i&&k!=j){\n                        if(f){\n                            b={(double)n[k]};\n                            f=false;\n                        }\n                        else c={(double)n[k]};\n                    }\n                }\n                x=util(a,util(b,c));\n                y=util(util(a,b),c);\n                z=util(util(a,c),b);\n                for(int l=0;l<x.size();l++){\n                    if(abs(x[l]-24)<epsilon)return true;\n                }\n                for(int l=0;l<y.size();l++){\n                    if(abs(y[l]-24)<epsilon)return true;\n                }\n                for(int l=0;l<z.size();l++){\n                    if(abs(z[l]-24)<epsilon)return true;\n                }                \n            }\n        }\n        return false;\n    }\n```
['Depth-First Search', 'C']