Submission #209523

#TimeUsernameProblemLanguageResultExecution timeMemory
209523model_codeKnapsack (NOI18_knapsack)Cpython 2
37 / 100
1103 ms81272 KiB
S, N = map(int, raw_input().split()) dp = [0]*(S+1) for _ in range(N): V, W, K = map(int, raw_input().split()) for k in range(K): for s in range(S, W-1, -1): dp[s] = max(dp[s], dp[s-W] + V) print (max(dp))
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...