C++ | Brute Force
\nclass Solution {\npublic:\n    bool ans=0;\n    void gun(vector<float> v,vector<char> ch){\n        if(ans) return;\n        if(v.size()==1){\n            if(
```\nclass Solution {\npublic:\n    bool ans=0;\n    void gun(vector<float> v,vector<char> ch){\n        if(ans) return;\n        if(v.size()==1){\n            if(abs(24-v[0])<0.1) ans=1;\n            return;\n        }\n        for(int i=0;i<v.size()-1;i++){\n            if(ans) return;\n            vector<float> tmpv=v;\n            vector<char> tmpc=ch;\n            float n;\n            if(tmpc[i]==\'+\')\n                n=v[i]+v[i+1]; \n            else if(tmpc[i]==\'-\')\n                 n=v[i]-v[i+1];\n            else if(tmpc[i]==\'*\')\n                n=v[i]*v[i+1];\n            else\n            \n                n=v[i]/v[i+1]; \n                tmpv.erase(tmpv.begin()+i);\n                tmpv.erase(tmpv.begin()+i);\n                tmpv.insert(tmpv.begin()+i,n);\n                tmpc.erase(tmpc.begin()+i);\n                gun(tmpv,tmpc);\n        }\n    }\n    void fun(int mask,vector<float> val,vector<char> oper,vector<int>& cards){\n        if(ans) return;\n        if(val.size()==3){\n            for(int i=0;i<4;i++){\n                if((mask&(1<<i))==0){\n                    val.push_back(cards[i]);\n                    gun(val,oper);\n                }\n            }\n            return;\n        }\n        for(int i=0;i<4;i++){\n            if(ans) return;\n            if((mask&(1<<i))==0){\n                val.push_back(cards[i]);\n                \n                for(int j=0;j<4;j++){\n                    if(j==0) {oper.push_back(\'+\');fun(mask|(1<<i),val,oper,cards);}\n                    else if(j==1) {oper.push_back(\'-\');fun(mask|(1<<i),val,oper,cards);}\n                    else if(j==2) {oper.push_back(\'*\');fun(mask|(1<<i),val,oper,cards);}\n                    else {oper.push_back(\'/\');fun(mask|(1<<i),val,oper,cards);}\n                    oper.pop_back();\n                }\n                val.pop_back();\n            }\n            \n        }\n    }\n    bool judgePoint24(vector<int>& cards) {\n       fun(0,{},{},cards); \n        return ans;\n    }\n};\n```
['C', 'C++']