Submission #1097050

#TimeUsernameProblemLanguageResultExecution timeMemory
1097050vjudge1Knapsack (NOI18_knapsack)C++17
12 / 100
1 ms600 KiB
#include<bits/stdc++.h> using namespace std; const int N = 1e5 + 9; using ll = long long; void solve() { int s, n; cin >> s >> n; assert(n == 1); int v, w, k; cin >> v >> w >> k; cout << min(k, s / w) * v << '\n'; } int32_t main() { ios_base::sync_with_stdio(0); cin.tie(0); int t = 1; // cin >> t; while (t--) { solve(); } return 0; }
#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...