Submission #248584

#TimeUsernameProblemLanguageResultExecution timeMemory
248584davi_bartDancing Elephants (IOI11_elephants)C++14
Compilation error
0 ms0 KiB
#pragma GCC optimize("O3") #include <bits/stdc++.h> #include "elephants.h" using namespace std; typedef long long ll; #define int ll mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); int n; vector<int> v(200010); set<int> k; int dim; void init(int N, int L, int X[]){ n=N; for(int i=0;i<N;i++){ v[i]=X[i]; k.insert(X[i]); } dim=L; } int update(int i,int y){ k.erase(v[i]); v[i]=y; k.insert(v[i]); int tot=0; int pos=*k.begin(); for(int x:k){ if(x-pos<=dim)continue; tot++; pos=x; } return tot; }

Compilation message (stderr)

/tmp/cccLkGJy.o: In function `main':
grader.cpp:(.text.startup+0x1d): undefined reference to `init(int, int, int*)'
grader.cpp:(.text.startup+0x3f): undefined reference to `update(int, int)'
collect2: error: ld returned 1 exit status