[Python] BinarySearch O(nlogn) slow but viable solution
\nclass Solution:\n    def threeEqualParts(self, arr: List[int]) -> List[int]:\n        n = len(arr)\n        ps = []\n        cur = 0\n        for x in arr:\n 
```\nclass Solution:\n    def threeEqualParts(self, arr: List[int]) -> List[int]:\n        n = len(arr)\n        ps = []\n        cur = 0\n        for x in arr:\n            cur <<= 1\n            cur += x\n            ps.append(cur)\n        # print(ps[-1])\n        for i in range(n-1):\n            a = ps[i]\n            l,r = i+1,n-1\n            cnt = 0\n            while l<r:\n                cnt += 1\n                mid = (l+r)//2\n                b = ps[mid]-(ps[i] << (mid-i))\n                if b<a:\n                    l = mid + 1\n                elif b>a:\n                    r = mid\n                else:\n                    c = ps[n-1]-(ps[mid] << (n-1-mid))\n                    if c==b:\n                        return [i,mid+1]\n                    else:\n                        l = r\n        return [-1,-1]\n```
[]