Untitled
raw download clone
TEXT
views 44
,
size 591 b
//12132
#include<stdio.h>

long long int a[1000000];
long long int p[1000000];

int main(void)
{
    long long int n, q, sum, l, r, m;

    scanf("%lld%lld", &n, &q);

    for(int i=1; i<=n; i++){
        scanf("%lld", a[i]);
    }
    //prefix sum

     p[0] = 0;
    for(int i=1; i<=n; i++){
        p[i] = p[i-1] + a[i];
    }
    
    for(int i=0; i<q; i++){
        scanf("%lld%lld%lld", &l, &r, &m); //m = whole select numbers
        printf("%lld%lld%lld", l, r, m);
        //sum = p[m];
       // printf("%d", p[m]);
    }
   




    return 0;
}
close fullscreen
Login or Register to edit or fork this paste. It's free.