# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
743302 |
2023-05-17T09:42:51 Z |
vjudge1 |
Lasers (NOI19_lasers) |
C++17 |
|
0 ms |
0 KB |
#include<bits/stdc++.h>
#include "ricehub.h"
using namespace std;
int besthub(int R, int L, int X[], long long B)
{
long long mx = -1;
for(int i=1;i<=L;++i)
{
priority_queue<long long,vector<long long>,greater<long long>> pq;
for(int j=0;j<R;++j)
{
long long dist = abs(i-X[j]);
pq.push(dist);
}
long long cost = 0,rice = 0;
while(!pq.empty())
{
// cout << "+" << pq.top() << '\n';
if(cost+pq.top() <= B)
{
cost += pq.top();
++rice;
}
else break;
pq.pop();
}
mx = max(mx,rice);
}
return mx;
}
Compilation message
lasers.cpp:2:10: fatal error: ricehub.h: No such file or directory
2 | #include "ricehub.h"
| ^~~~~~~~~~~
compilation terminated.