제출 #348614

#제출 시각아이디문제언어결과실행 시간메모리
348614tengiz05철로 (IOI14_rail)C++17
컴파일 에러
0 ms0 KiB
#include "elephants.h"
#ifndef EVAL
#include "grader.cpp"
#endif
#include <bits/stdc++.h>
using namespace std;
int n, len;
int a[50005];
set<int> s;
void init(int N, int L, int X[]){
	n=N;
	len = L;
	for(int i=0;i<n;i++)a[i] = X[i];
	for(int i=0;i<n;i++)s.insert(a[i]);
}

int update(int i, int y){
	int ans = 1;
	s.erase(a[i]);
	a[i] = y;
	s.insert(a[i]);
	int lst=*s.begin();
	for(auto x : s){
		if(x == lst)continue;
		if(x-lst > len){
			ans++;
			lst=x;
		}
	}
	return ans;
}

컴파일 시 표준 에러 (stderr) 메시지

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