Submission #668091

# Submission time Handle Problem Language Result Execution time Memory
668091 2022-12-02T18:15:13 Z Trumling Rice Hub (IOI11_ricehub) C++14
Compilation error
0 ms 0 KB
#include "robots.h"
#include<bits/stdc++.h>
using namespace std;
 
typedef long long ll;
#define pb push_back
#define F first
#define S second
#define enter cout<<'\n';
 

int putaway(int a, int b, int t, int x[], int y[], int w[], int s[]) 
{
sort(x,x+a);
sort(w,w+t);

if(x[a-1]<=w[t-1])
return -1;


int idx=0;
int arr[a];
for(int i=0;i<a;i++)
{
	while(idx<t && w[idx]<x[i])
	{
		idx++;
	}
	arr[i]=idx;
}
int ans=999999999;
int l=1,r=t;

while(l<r)
{
	int left=t;
	int minus=0;
	int time=(l+r)/2;
	for(int i=0;i<a;i++)
	{
		left-=min(time,(arr[i]-minus));
		minus+=min(time,(arr[i]-minus));
	}
	if(left==0)
	{
		ans=min(ans,time);
		r=time;
	}
	else
	l=time+1;
}
return ans;
}

Compilation message

ricehub.cpp:1:10: fatal error: robots.h: No such file or directory
    1 | #include "robots.h"
      |          ^~~~~~~~~~
compilation terminated.