sequence.cpp: In function 'void compute(long long int, long long int, long long int, long long int, long long int)':
sequence.cpp:42:18: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
if (dp[k & 1 ^ 1][i] + (pref[md] - pref[i]) * (pref[n] - pref[md]) > dp[k & 1][md] )
^
sequence.cpp:44:34: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
dp[k & 1][md] = dp[k & 1 ^ 1][i] + (pref[md] - pref[i]) * (pref[n] - pref[md]);
^
sequence.cpp: At global scope:
sequence.cpp:54:7: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main ()
^
sequence.cpp: In function 'int main()':
sequence.cpp:63:27: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
scanf("%d", &ar[i]), pref[i] = pref[i - 1] + ar[i];
^
sequence.cpp:74:30: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
printf("%d ", p[k][n]);
^
sequence.cpp:63:59: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &ar[i]), pref[i] = pref[i - 1] + ar[i];
^