#include "bits/stdc++.h"
using namespace std;
#define all(x) (x).begin(), (x).end()
#define ll long long
#define vec vector
vec<ll> calculate_costs(vec<int> W, vec<int> A, vec<int> B, vec<int> E) {
int n = W.size();
int mind = INT_MAX;
int cost = 0;
for (int i = 0; i < n; i++)
mind = min(mind, A[i] - B[i]), cost += B[i];
if (n % 2 == 1) cost += mind;
vec<ll> res(n,(ll)cost);
return res;
}
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |