blocks.cpp:11:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main() {
^
blocks.cpp: In function 'int main()':
blocks.cpp:22:17: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
st.push({dp[i & 1 ^ 1][i - 1], a[i]});
~~^~~
blocks.cpp:23:23: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
dp[i & 1][i] = dp[i & 1 ^ 1][i - 1] + a[i];
~~^~~
blocks.cpp:25:17: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
int c = dp[i & 1 ^ 1][j - 1];
~~^~~
blocks.cpp:12:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &n, &k);
~~~~~^~~~~~~~~~~~~~~~~
blocks.cpp:14:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &a[i]);
~~~~~^~~~~~~~~~~~~