제출 #991919

#제출 시각아이디문제언어결과실행 시간메모리
991919elesisJob Scheduling (IOI19_job)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include <job.h> using namespace std; int scheduling_cost(vector<int> p, vector<int> u, vector<int> d) { int t = 0 ; int n = p.size(); int ans = 0; for(int i=0;i<n;i++) { ans += t*u[i]; t+=d[i]; } return ans; }

컴파일 시 표준 에러 (stderr) 메시지

job.cpp:4:5: error: ambiguating new declaration of 'int scheduling_cost(std::vector<int>, std::vector<int>, std::vector<int>)'
    4 | int scheduling_cost(vector<int> p, vector<int> u, vector<int> d)
      |     ^~~~~~~~~~~~~~~
In file included from job.cpp:2:
job.h:7:11: note: old declaration 'long long int scheduling_cost(std::vector<int>, std::vector<int>, std::vector<int>)'
    7 | long long scheduling_cost(std::vector<int> U, std::vector<int> D, std::vector<int> P);
      |           ^~~~~~~~~~~~~~~