답안 #991919

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
991919 2024-06-03T11:59:36 Z elesis Job Scheduling (IOI19_job) C++14
컴파일 오류
0 ms 0 KB
#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;
}

Compilation message

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);
      |           ^~~~~~~~~~~~~~~