Python 36 ms, 100%
\nclass RLEIterator:\n\n    def __init__(self, A):\n        """\n        :type A: List[int]\n        """\n        global a\n        a = []\n        for x in ran
```\nclass RLEIterator:\n\n    def __init__(self, A):\n        """\n        :type A: List[int]\n        """\n        global a\n        a = []\n        for x in range(int(len(A)/2)):\n            if A[2*x] != 0:\n                a.insert(0, [A[2*x],A[2*x+1]])\n\n    def next(self, n):\n        """\n        :type n: int\n        :rtype: int\n        """\n        global a\n        while n > 0:\n            if a:\n                i = a.pop()\n                if i[0] >= n:\n                    i[0] -= n\n                    if i[0] != 0:\n                        a.append(i)\n                    return i[1]\n                else:\n                    n-= i[0] \n            else:\n                return -1\n```\n\nCould probably make it much cleaner, but I don\'t really know what I did. Let me know if you guys figure it out.
[]