foo.cc: In function 'int main()':
foo.cc:22:12: error: 'w' was not declared in this scope
22 | if(j >= w[i])
| ^
foo.cc:23:48: warning: pointer to a function used in arithmetic [-Wpointer-arith]
23 | dp[i][j] = max(dp[i-1][j-time[i]]+subject[i], dp[i-1][j]);
| ^
foo.cc:23:41: error: invalid operands of types 'int' and 'time_t(time_t*) throw ()' {aka 'long int(long int*)'} to binary 'operator-'
23 | dp[i][j] = max(dp[i-1][j-time[i]]+subject[i], dp[i-1][j]);
| ~^~~~~~~~
| | |
| int time_t(time_t*) throw () {aka long int(long int*)}
[Hydro](https://hydro.ac)提供评测服务