You are required to implement the function maximize_distinct_mittens(n, m, c) which maximizes the number of distinct types of mittens that can be distributed among n individuals. The function will take into account the existing collection of mittens categorized by their colors and provide an optimal distribution method.
Input:
The function will receive three parameters:
n (int): The number of individuals who will receive mittens.
m (int): The maximum number of different colors available for mittens.
c (list of int): A list containing the colors of the mittens available, where each integer in the list represents a specific color.
Output:
The function should return a tuple containing:
max_distinct (int): The maximum number of distinct mitten colors that can be achieved after distribution.
distribution (list of tuples): A list where each tuple contains two integers:
The first integer represents the color of the mittens that will be distributed to each individual in order.
The second integer represents the original color of the mittens that are available, allowing for an optimal pairing.
Implementation:
Your solution must be implemented in a file called /app/solution.py. Ensure that your code is clean, well-commented, and follows Python conventions for clarity and maintainability.