C++ short clean code
\nclass Solution {\npublic:\n    vector<int> threeEqualParts(vector<int> &A) {\n        vector<int> vi;\n        for (int i = 0; i < A.size(); ++i) if (A[i] == 
```\nclass Solution {\npublic:\n    vector<int> threeEqualParts(vector<int> &A) {\n        vector<int> vi;\n        for (int i = 0; i < A.size(); ++i) if (A[i] == 1) vi.push_back(i);\n        if (vi.size() == 0) return vector{0, 2};\n        if (vi.size() % 3 != 0) return vector{-1, -1};\n        int len = A.size() - vi[vi.size() / 3 * 2];\n        int a = vi[0], b = vi[vi.size() / 3], c = vi[vi.size() / 3 * 2];\n        for (int i = 0; i < len; ++i)\n            if (A[a + i] != A[b + i] || A[a + i] != A[c + i]) return vector{-1, -1};\n        return vector{a + len - 1, b + len};\n    }\n};\n```
[]