This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
// Driver code
int main()
{
int W;
int n;
cin>>W>>n;
int v[n];
int we[n];
int x;
for (int i = 0; i < n; i++)
{
cin>>v[i];
cin>>we[i];
cin>>x;
}
if(n==1){
if(W/we[0]<x){
cout<<v[0]*(W/we[0]);
}else{
cout<<v[0]*x;
}
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |