Main.cpp: In function 'int main()':
Main.cpp:17:45: warning: overflow in conversion from 'double' to 'int' changes value from '1.7976931348623157e+308' to '2147483647' [-Woverflow]
17 | double dp[n + 1][k - x + 1]; memset(dp, DBL_MAX, sizeof(dp));
| ^~~~~~~
Main.cpp:21:92: error: 'g' was not declared in this scope
21 | if (j < k - x) dp[i + 1][j + 1] = min(dp[i + 1][j + 1], dp[i][j] + (double) st[i].a / (g + 1));
| ^
Main.cpp:22:58: error: 'g' was not declared in this scope
22 | dp[i + 1][j] = min(dp[i + 1][j], dp[i][j] + (i - j < g ? (double) st[i].b / (i - j + 1) : .0));
| ^