def hasIntersectionCost(criterion, frRow, exRow):
    """Returns 1 if the two do not share an answer on the specified question, else 0"""
    frQ = criterion['frQ']
    exQ = criterion['exQ']
    if 'singleFr' in criterion and criterion['singleFr']:
        frSet = set([frRow[frQ]])
    else:
        frSet = set(frRow[frQ].split(','))
    if 'singleEx' in criterion and criterion['singleEx']:
        exSet = set([exRow[exQ]])
    else:
        exSet = set(exRow[exQ].split(','))
    return int(len(frSet.intersection(exSet)) == 0)