Untitled

mail@pastecode.io avatar
unknown
plain_text
6 months ago
559 B
1
Indexable
Never
#include <stdio.h>
int main()
{
    int t, n;
    scanf("%d", &t);
    while (t--)
    {
        int s = 0;
        scanf("%d", &n);
        int a[n];
        for (int i = 0; i < n; i++)
        {
            scanf("%d", &a[i]);
        }
        ///int mn=a[1]+a[2]+2-1;
        for (int i = 0; i < n; i++)
        {
            for (int j = i + 1; j < n; j++)
            {
                s=a[i]+a[j]+(j+1)-(i+1);
                printf("%d\n", s);
            }
        }
        ////printf("%d\n", mn);
    }

    return 0;
}