Submission #1015417

#TimeUsernameProblemLanguageResultExecution timeMemory
1015417MuhammetBoxes with souvenirs (IOI15_boxes)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#include "boxes.h"
#include "grader.cpp"
 
#define N 10005
#define ll long long
 
using namespace std;

ll p[N], s[N];

ll delivery(int n, int k, int l, int a[]) {
	sort(a,a+n);
	for(int i = 0; i < n; i++){
		p[i+1] = a[i] + p[max(i-k+1,0)];
	}
	for(int i = n-1; i >= 0; i--){
		s[i+1] = (l-a[i]+1) + s[min(i+k+1,n+1)];
	}
	ll ans = LLONG_MAX;
	for(ll i = 0; i <= n; i++){
		for(ll j = i + 1; j <= n+1; j++){
			ans = min(ans,2*(p[i] + s[j]) + ((j-i-1+k-1)/k)*(l+1));
		}
	}
	return ans;
}

Compilation message (stderr)

boxes.cpp:3:10: fatal error: grader.cpp: No such file or directory
    3 | #include "grader.cpp"
      |          ^~~~~~~~~~~~
compilation terminated.