knapsack.cpp: In function 'int main()':
knapsack.cpp:35:19: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
35 | for(register int i = 1, v, w, k; i <= n; ++i){
| ^
knapsack.cpp:35:26: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
35 | for(register int i = 1, v, w, k; i <= n; ++i){
| ^
knapsack.cpp:35:29: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
35 | for(register int i = 1, v, w, k; i <= n; ++i){
| ^
knapsack.cpp:35:32: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
35 | for(register int i = 1, v, w, k; i <= n; ++i){
| ^
knapsack.cpp:41:19: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
41 | for(register int i = 1; i <= 2000; ++i) dp[i] = -inf;
| ^
knapsack.cpp:43:19: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
43 | for(register int i = 1; i <= s; ++i){
| ^
knapsack.cpp:52:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
52 | for(register int j = s; j >= i; --j) dp[j] = max(dp[j], dp[j - i] + v);
| ^