#include "job.h"
#include <bits/stdc++.h>
using namespace std;
using lint = long long;
lint scheduling_cost(vector<int> p, vector<int> u, vector<int> d) {
int n = p.size();
lint ans = 0;
if (accumulate(begin(p), end(p), 0ll) == 0) {
sort(begin(u), end(u));
lint t = 0;
for (int i = 0; i < n; i++) {
ans += (t + d[i]) * u[i];
}
} else {
lint t = 0;
for (int i = 0; i < n; i++) {
ans += (t + d[i]) * u[i];
}
}
return ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |