candies.cpp: In function 'bool del(int)':
candies.cpp:22:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
candies.cpp: In function 'int main()':
candies.cpp:45:19: error: 'inf' was not declared in this scope
a[pos] = max(-inf, a[prf[pos]] + a[nxt[pos]] - a[pos]);
^~~
candies.cpp:45:19: note: suggested alternative: 'linf'
a[pos] = max(-inf, a[prf[pos]] + a[nxt[pos]] - a[pos]);
^~~
linf
candies.cpp:28:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen("A.INP", "r", stdin);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~
candies.cpp:29:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen("A.OUT", "w", stdout);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~