candies.cpp: In function 'int main()':
candies.cpp:21:25: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
for (int i = 1; i <= n + 1 >> 1); ++i) {
~~^~~
candies.cpp:21:33: error: expected ';' before ')' token
for (int i = 1; i <= n + 1 >> 1); ++i) {
^
candies.cpp:21:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
for (int i = 1; i <= n + 1 >> 1); ++i) {
^~~
candies.cpp:21:36: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
for (int i = 1; i <= n + 1 >> 1); ++i) {
^~
candies.cpp:21:38: error: 'i' was not declared in this scope
for (int i = 1; i <= n + 1 >> 1); ++i) {
^
candies.cpp:20:5: warning: unused variable 'ans' [-Wunused-variable]
ll ans = 0;
^~~
candies.cpp:14:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
~~~~~^~~~~~~~~~
candies.cpp:16:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld", &a[i]);
~~~~~^~~~~~~~~~~~~~~