#include "teams.h"
//#include "grader.cpp"
#include <bits/stdc++.h>
#define ll long long
#define mp make_pair
#define pb push_back
#define pii pair<int,int>
using namespace std;
vector<pii> arr;
void init(int N, int A[], int B[]) {
for(int i = 0; i < N; i++){
arr.pb(mp(A[i], B[i]));
}
// sort(arr.begin(), arr.end(), comp);
}
class comp{
public:
bool operator()(pii& a, pii& b){
if(a.second == b.second) return a.first > b.first;
else return a.second > b.second;
}
};
int can(int M, int K[]) {
vector<int> teams;
for(int i = 0; i < M; i++)
teams.pb(K[i]);
sort(teams.begin(), teams.end());
priority_queue<pii, vector<pii>, comp> pq;
for(int i = 0; i< arr.size(); i++)
pq.push(arr[i]);
for(int i = 0; i < teams.size(); i++){
int taken = 0;
vector<pii> reuse;
while(!pq.empty() && taken < teams[i]){
pii now = pq.top();
pq.pop();
if(teams[i] < now.first || teams[i] > now.second) reuse.pb(now);
taken++;
}
if(taken < i) return 0;
for(auto t : reuse)
pq.push(t);
}
return 1;
}
Compilation message
dreaming.cpp:1:10: fatal error: teams.h: No such file or directory
1 | #include "teams.h"
| ^~~~~~~~~
compilation terminated.