평범한 배낭

    [골5] 12865 - 평범한 배낭

    #include #include #include using namespace std; #pragma region 입출력 속도향상 #define FAST_IO() \ {\ ios::sync_with_stdio(false);\ cin.tie(NULL); \ cout.tie(NULL); \ }\ #pragma endregion vector w, v; vector dp; int main() { FAST_IO(); int n, k; cin >> n >> k; w.resize(n + 1); v.resize(n + 1); dp.resize(n + 1, vector(k + 1)); for (int i = 1; i > w[i] >> v[i]; for (int i = 1; i