답안 #991916

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
991916 2024-06-03T11:57:47 Z elesis Job Scheduling (IOI19_job) C++14
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.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;
}
int main()
{
	int n;
	cin>>n;
	vector <int> p(n),u(n),d(n);
	for(int i=0;i<n;i++)
	{
		cin>>p[i]>>u[i]>>d[i];
	}
	//cout << p[1] << "\n";
	cout << scheduling_cost(p,u,d) << "\n";
	return 0;
}

Compilation message

/usr/bin/ld: /tmp/ccnf0Hm8.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cc1QKyBb.o:job.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status