#include #include void gen1(long * restrict a, size_t n, long v) { size_t i; for (i=0; ia[i-1]) r += a[i]; return r; } long comb2(long *a, long *b, long * restrict c, long * restrict d, long * restrict e, size_t n, long v, long inc) { size_t i; long r1=0; long r2=LONG_MAX; for (i=1; ia[i-1]) r1 += a[i]; /* operation must be associative */ if (a[i]c[i]) e[i] = a[i-1]+a[i]+a[i+1]; } return r1*r2; }