답안 #94264

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
94264 2019-01-17T08:39:12 Z Scayre 코끼리 (Dancing Elephants) (IOI11_elephants) C++14
컴파일 오류
0 ms 0 KB
#include "grader.h"
#include <map>
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <bitset>
#include <cstdio>
#include <limits>
#include <complex>
#include <vector>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <fstream>
#include <numeric>
#include <sstream>
#include <cassert>
#include <iomanip>
#include <iostream>
#include <algorithm>

using namespace std;

#define ll long long

const int MXN = 5e5 + 7;

set<int> s;

int a[MXN];

int Lm;

int update(int id, int nv) {
	s.erase(a[id]);
	a[id]=nv;
	s.insert(nv);
	int cur=(*s.begin());
	int ans=0;
	while(1){
		auto pos=s.upper_bound(cur+Lm);
		if(pos!=s.end() && *pos>cur+Lm && *pos!=0){
			ans++;
			cur=*pos;
		}
		else break;
	}
    return ans+1;
}

void init(int n, int l, int xs[]) {
	for(int i=0;i<n;i++){
		a[i]=xs[i];
		s.insert(xs[i]);
	}
	Lm=l;
    return;
}

Compilation message

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