#include <bits/stdc++.h>
using namespace std;
// #define int long long
long long scheduling_cost(std::vector<int> p, std::vector<int> u, std::vector<int> d) {
int n = p.size();
long long ans = 0;
long long currtime = 0;
for(int b=0;b<n;b++){
currtime+=d[b];
ans+=currtime*u[b];
}
return ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
344 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
5 |
Correct |
9 ms |
2140 KB |
Output is correct |
6 |
Correct |
20 ms |
4156 KB |
Output is correct |
7 |
Correct |
27 ms |
6224 KB |
Output is correct |
8 |
Correct |
36 ms |
8268 KB |
Output is correct |
9 |
Correct |
36 ms |
8272 KB |
Output is correct |
10 |
Correct |
38 ms |
8120 KB |
Output is correct |
11 |
Correct |
0 ms |
344 KB |
Output is correct |
12 |
Correct |
36 ms |
8272 KB |
Output is correct |
13 |
Correct |
36 ms |
8272 KB |
Output is correct |
14 |
Correct |
36 ms |
8276 KB |
Output is correct |
15 |
Correct |
40 ms |
8260 KB |
Output is correct |
16 |
Correct |
45 ms |
8404 KB |
Output is correct |
17 |
Correct |
36 ms |
8136 KB |
Output is correct |
18 |
Correct |
37 ms |
8272 KB |
Output is correct |
19 |
Correct |
42 ms |
8276 KB |
Output is correct |
20 |
Correct |
38 ms |
8244 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
344 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
5 |
Correct |
9 ms |
2140 KB |
Output is correct |
6 |
Correct |
20 ms |
4156 KB |
Output is correct |
7 |
Correct |
27 ms |
6224 KB |
Output is correct |
8 |
Correct |
36 ms |
8268 KB |
Output is correct |
9 |
Correct |
36 ms |
8272 KB |
Output is correct |
10 |
Correct |
38 ms |
8120 KB |
Output is correct |
11 |
Correct |
0 ms |
344 KB |
Output is correct |
12 |
Correct |
36 ms |
8272 KB |
Output is correct |
13 |
Correct |
36 ms |
8272 KB |
Output is correct |
14 |
Correct |
36 ms |
8276 KB |
Output is correct |
15 |
Correct |
40 ms |
8260 KB |
Output is correct |
16 |
Correct |
45 ms |
8404 KB |
Output is correct |
17 |
Correct |
36 ms |
8136 KB |
Output is correct |
18 |
Correct |
37 ms |
8272 KB |
Output is correct |
19 |
Correct |
42 ms |
8276 KB |
Output is correct |
20 |
Correct |
38 ms |
8244 KB |
Output is correct |
21 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
22 |
Halted |
0 ms |
0 KB |
- |