def doubleclick(x, y, bombs, cal, flags):
    """
    Shortcut for double click
    :param x: horizontal position of the click
    :param y: vertical position of the click
    :param bombs: list of bomb positions
    :param cal: number of the position
    :param flags: list of flags
    :return: status after the double click (0 for wrong judgment, 1 for right judgment, -1 for invalid double click),
             list of positions to expand (empty list for status 0 or -1)
    """
    tests = [(m, n) for m in (x - 1, x, x + 1) for n in (y - 1, y, y + 1) if (m, n) not in flags]
    if cal == 9 - len(tests):
        for t in tests:
            if t in bombs:
                return 0, []
        return 1, tests
    return -1, []