답안 #417341

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
417341 2021-06-03T14:58:12 Z rama_pang Job Scheduling (IOI19_job) C++17
0 / 100
95 ms 8236 KB
#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];
      t += d[i];
    }
  } else {
    lint t = 0;
    for (int i = 0; i < n; i++) {
      ans += (t + d[i]) * u[i];
      t += d[i];
    }
  }
	return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 16 ms 2124 KB Output is correct
6 Correct 44 ms 4128 KB Output is correct
7 Correct 51 ms 6132 KB Output is correct
8 Correct 76 ms 8100 KB Output is correct
9 Correct 95 ms 8092 KB Output is correct
10 Correct 81 ms 8236 KB Output is correct
11 Incorrect 1 ms 204 KB Output isn't correct
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 276 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 16 ms 2124 KB Output is correct
6 Correct 44 ms 4128 KB Output is correct
7 Correct 51 ms 6132 KB Output is correct
8 Correct 76 ms 8100 KB Output is correct
9 Correct 95 ms 8092 KB Output is correct
10 Correct 81 ms 8236 KB Output is correct
11 Incorrect 1 ms 204 KB Output isn't correct
12 Halted 0 ms 0 KB -