```python
def max_sub_array_sum_repeated(a, n, k):
    """
    Finds the largest sum of a contiguous subarray in an array 'a' repeated 'k' times.

    Args:
        a (list): The input list of integers.
        n (int): The size of the list 'a'.
        k (int): The number of times to repeat the list 'a'.

    Returns:
        int: The maximum contiguous subarray sum in the repeated array.
    """

    def kadane(arr):
        """
        Standard Kadane's algorithm to find the maximum subarray sum.
        Handles arrays with all negative numbers correctly.
        """
        if not arr:
            return 0
        
        max_so_far = arr[0]
        current_max = arr[0]
        for i in range(1, len(arr)):
            x = arr[i]
            current_max = max(x, current_max + x)
            max_so_far = max(max_so_far, current_max)
        return max_so_far

    # The max subarray sum can be one of two cases:
    # 1. It's contained entirely within one repetition of 'a'.
    # 2. It spans across multiple repetitions of 'a'.

    # Case 1: Max sum within one repetition of 'a'.
    kadane_sum = kadane(a)

    if k == 1:
        return kadane_sum

    # Case 2: The sum spans across boundaries.
    # This involves a maximum suffix sum, a maximum prefix sum,
    # and potentially (k-2) full array sums in between.

    # Calculate max prefix sum. Initialize with 0 for the empty prefix.
    max_prefix_sum = 0
    current_prefix_sum = 0
    for x in a:
        current_prefix_sum += x
        max_prefix_sum = max(max_prefix_sum, current_prefix_sum)

    # Calculate max suffix sum. Initialize with 0 for the empty suffix.
    max_suffix_sum = 0
    current_suffix_sum = 0
    for i in range(n - 1, -1, -1):
        current_suffix_sum += a[i]
        max_suffix_sum = max(max_suffix_sum, current_suffix_sum)

    total_sum = sum(a)
    
    spanning_sum = 0
    if total_sum > 0:
        # If array sum is positive, it's always optimal to include all
        # (k-2) middle arrays for the spanning case.
        spanning_sum = max_suffix_sum + max_prefix_sum + (k - 2) * total_sum
    else:
        # If array sum is non-positive, we don't gain anything by including
        # middle arrays. The best spanning sum is just across two arrays.
        spanning_sum = max_suffix_sum + max_prefix_sum

    # The final answer is the maximum of the non-spanning and spanning cases.
    return max(kadane_sum, spanning_sum)
```