candies.cpp:13:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main() {
^
candies.cpp: In function 'int main()':
candies.cpp:31:47: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
dp[j & 1][i] = max(dp[j & 1][i], dp[j & 1 ^ 1][i - 2] + a[i]);
~~^~~
candies.cpp:14:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
~~~~~^~~~~~~~~~
candies.cpp:17:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld", &a[i]);
~~~~~^~~~~~~~~~~~~~~