#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main(int argc, char const *argv[]) { int N,P ; cin >> N >> P; vector A(N),B(N),C(N); for(int i=0;i> A[i] >> B[i] >> C[i]; } const int INF = 1e9; vector> dp(N+1,vector(P+1,INF));// auto chmin = [](int &x, int y) -> int { if(y < x)x = y; return x; }; dp[0][0] = 0; for(int i=0;i