Submission #348614

#TimeUsernameProblemLanguageResultExecution timeMemory
348614tengiz05철로 (IOI14_rail)C++17
Compilation error
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; }

Compilation message (stderr)

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