Problem Link Ref Link #include <iostream> #include <vector> using namespace std; struct node { int vol,profit, p; }; int main() { int t, n, vmax; long dp[32001][61]; node parent[62]; vector<node> child[62]; cin >> t; while(t--) { cin >> vmax >> n; for(int i = 0; i < 62; i++) { parent[i].vol = -1; child[i].clear(); } for(int i = 1; i <= n; i++) { node temp; cin >> temp.vol >> temp.profit >> temp.p; ...