knapsack1 [C++] SWEA 0/1 Knapsack 출처https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AWBJAVpqrzQDFAWr 풀이#include using namespace std;int main() { ios::sync_with_stdio(false); cin.tie(NULL); int T, N, K, V, C; cin >> T; for (int t = 1; t > N >> K; vector> knapsack(N + 1, vector(K + 1, 0)); vector> solution; for (int n = 0; n > V >> C; solution.push_back(make_pair(V, C)); } for (int i = 1; i k.. 2024. 11. 15. 이전 1 다음