def check_exam(arr1, arr2):
    """
    Marks an exam checking whether the students answers to the solution.
    :param arr1: array of strings containing correct solutions.
    :param arr2: array of strings containing student answers.
    :return: the score for this array of answers, giving +4 for each correct answer, -1 for each incorrect answer,
             and +0 for each blank answer(empty string).
    """
    score = 0
    for x in range(len(arr1)):
        if arr1[x] == arr2[x]:
            score += 4
        elif arr1[x] != arr2[x] and arr2[x] != "":
            score -= 1
    if score < 0:
        return 0
    return score