def attacks(attack_time, rest_time, cur_time):
    """
    Return True if attack occurs, and False otherwise.
    
    :param attack_time: number of minutes dog attacks
    :param rest_time: number of minutes dog rests
    :param cur_time: time person arrives
    :return: True if person is attacked, False otherwise
    """
    n = 0
    upper = attack_time
    lower = 0
    attack = True
    while cur_time > upper:
        upper = (n + 1) * attack_time + n * rest_time
        lower = n * (attack_time + rest_time)
        n += 1
        
        if lower < cur_time <= upper:
            attack = True
        else:
            attack = False
    
    return attack