Submission #456283

#TimeUsernameProblemLanguageResultExecution timeMemory
456283IdkwhoamiVisiting Singapore (NOI20_visitingsingapore)C++17
10 / 100
1 ms292 KiB
#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 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...