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;
#define ll long long
int main(){
ll k, n, m, A, B;
cin >> k >> n >> m >> A >> B;
vector<ll> val(k), v(n), w(m);
for(ll i = 0;i<k;i++)cin >> val[i];
for(ll i = 0;i<n;i++)cin >> v[i];
for(ll i = 0;i<m;i++)cin >> w[i];
if(k == 1){
if(m <= n)cout << m*val[0];
else cout << n*val[0] + A + (m - n)*B;
}
}
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |