def score_formula1(f1, f2):
    """
    Score the SIMILARITY of 2 formulas.
    Inputs are list of characters; output is float or false.
    """
    if f1 == [] or f2 == []:
        return False
    elif abs(len(f1) - len(f2)) >= 2:
        score = -1000
    else:
        score = 0
        for piece1 in f1:
            if piece1 not in f2:
                score -= 5
            elif f1[piece1] == f2[piece1]:
                score += 3
            elif piece1 == 'C':
                score -= abs(f1[piece1] - f2[piece1])
            else:
                score -= abs(f1[piece1] - f2[piece1]) / 3
        for piece2 in f2:
            if piece2 not in f1:
                score -= 5
    return score
