
    Given a list of encoded route segment states from traffic monitoring systems, determine how many pairs of segments can be efficiently paired for dual-fleet distribution by finding those whose combined states (XOR) result in an even value. The route segment states incorporate real-time traffic density, weather conditions, and maintenance status as binary indicators, where an even XOR result between two segments indicates optimal fleet splitting conditions.
    

    
def find_even_pair(A):
    """
    Given a list of encoded route segment states from traffic monitoring systems, determine how many pairs of segments can be efficiently paired for dual-fleet distribution by finding those whose combined states (XOR) result in an even value. The route segment states incorporate real-time traffic density, weather conditions, and maintenance status as binary indicators, where an even XOR result between two segments indicates optimal fleet splitting conditions.
    

    """
def find_even_pair(A):
    """
    Given a list of encoded route segment states from traffic monitoring systems, determine how many pairs of segments can be efficiently paired for dual-fleet distribution by finding those whose combined states (XOR) result in an even value. The route segment states incorporate real-time traffic density, weather conditions, and maintenance status as binary indicators, where an even XOR result between two segments indicates optimal fleet splitting conditions.
    

    """
    count = 0
    for i in range(0, len(A)):
        for j in range(i + 1, len(A)):
            if (A[i] ^ A[j]) % 2 == 0:
                count += 1
    return count