Submission #331068

#TimeUsernameProblemLanguageResultExecution timeMemory
331068monkey8Teams (IOI15_teams)C++17
Compilation error
0 ms0 KiB
#include "horses.h"
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <cstdio>
#include <utility> 
#include <queue>
#include <math.h>
#include <set>
#include <bitset>
#include <cmath>
#include <bitset>
#include <iterator>
#include <limits>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
vector<pii> students;
int N;
void init(int n, int a[], int b[]) {
	N = n;
	for(int i = 0; i < n; i++)
		students.push_back(pii(a[i], b[i]));
	sort(students.begin(), students.end());
}

int can(int m, int k[]) {
	sort(k, k + m);
	priority_queue<int> pq;
	int idx = 0;
	for(int i = 0; i < m; i++) {
		while(idx < N && students[idx].first <= k[i]) {
			pq.push(-students[idx].second);
			idx++;
		}
		while(!pq.empty() && -pq.top() < k[i])
			pq.pop();
		if(pq.size() < k[i]) return 0;
		else {
			for(int j = 0; j < k[i]; j++)
				pq.pop();
		}
	}
	return 1;
}

Compilation message (stderr)

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