Submission #670740

#TimeUsernameProblemLanguageResultExecution timeMemory
670740zzzzzzzzzzzzzzz앱 (KOI13_app)Cpython 3
0 / 21
774 ms3228 KiB
n,m=map(int,input().split()) a=list(map(int,input().split())) #메모리 c=list(map(int,input().split())) #가격 dp=[0]*10001 dp[0]=0 for i in range(n): for j in range(10001): if(c[i]+j>10000):break dp[c[i]+j]=max(dp[c[i]+j],dp[j]+a[i]) for i in range(10001): if(dp[i]>=m):print(i);break
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...