

def __init__(self, rows, cols):
    self.pi = [(- 1) for _ in xrange((rows * cols))]
    self.sz = [(- 1) for _ in xrange((rows * cols))]
    self.count = 0

dataset/ETHPy150Open algorhythms/LintCode/Number of Islands II.py UnionFind.__init__/original