C++ || Simple solution
\nclass Solution {\npublic:\n    int numberOfBeams(vector<string>& bank) {\n        vector<int> v;\n        for(string b:bank)\n        {\n            int count
```\nclass Solution {\npublic:\n    int numberOfBeams(vector<string>& bank) {\n        vector<int> v;\n        for(string b:bank)\n        {\n            int count=0;\n            for(int i=0;i<b.size();i++)\n            {\n                if(b[i]==\'1\')\n                    count++;\n            }\n            if(count>0)\n                v.push_back(count);\n        }\n        int result=0;\n        for(int i=1;i<v.size();i++)\n            result+=v[i]*v[i-1];\n        return result;\n    }\n};\n```
['C', 'C++']