sequence.cpp:9:22: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
9 | const int inf = 1e18 + 7;
| ~~~~~^~~
sequence.cpp: In function 'void solve(int, int, int, int, int)':
sequence.cpp:27:14: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
27 | int mid = l + r >> 1;
| ~~^~~
sequence.cpp:30:26: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
30 | best = max(best, {dp[j & 1 ^ 1][pos - 1] + cost(pos, mid), pos});
| ~~^~~
sequence.cpp: In function 'int main()':
sequence.cpp:44:13: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
44 | freopen("sequence.in", "r", stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
sequence.cpp:45:13: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
45 | freopen("sequence.out", "w", stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~