def findMaxIndices(nums):
    """
    Find all the indices corresponding to the max element in a list
    :param nums: List[int]
    :return: List[int]
    """
    res = []
    M = max(nums)
    for i in range(len(nums)):
        if nums[i] == M:
            res.append(i)
    return res