#include #include #include #include #include #include #include long int maximumValue(int a_size, int* a) { // Return the maximum value of f among all subsegments [l..r]. long int i , j , gcd , max,c,b, sum=0 , ans=0; long int n=-32767 ; for(i=0;ib) max=c; else max=b; while (c != b) { if (c > b) { c = c - b; } else { b = b - c; } } gcd=c; ans=gcd*(sum-max); if(n