Submission #720410

#TimeUsernameProblemLanguageResultExecution timeMemory
720410mseebacherKnapsack (NOI18_knapsack)C++17
0 / 100
3 ms444 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; struct Produkt{ ll v,w,k; }; void solve(){ int s,n; cin >> s >> n; vector<Produkt> p; for(int i = 0;i<n;i++){ cin >> p[i].v >> p[i].w >> p[i].k; } ll ans = s/p[0].w; cout << min(p[0].k,ans)*p[0].v; } int main(){ ios::sync_with_stdio(0); cin.tie(nullptr); cout << fixed << setprecision(8); solve(); }
#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...