Submission #411836

#TimeUsernameProblemLanguageResultExecution timeMemory
411836jeqchoParrots (IOI11_parrots)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; typedef vector<int> vi; typedef vector<pair<int,int>> vpi; #define FOR(i,a,b) for (int i = (a); i < (b); ++i) #define F0R(i,a) FOR(i,0,a) #define ROF(i,a,b) for (int i = (b)-1; i >= (a); --i) #define R0F(i,a) ROF(i,0,a) #define trav(a,x) for (auto& a: x) #define pb push_back #define rsz resize #define sz(x) int(x.size()) #define all(x) begin(x), end(x) #define fi first #define se second int N; int L; int const n=5e4+3; int X[n]; multiset<int> x; // subtask 1,2 void init(int N1, int L1, int X1[]) { L=L1; N = N1; F0R(i,N) { X[i]=X1[i]; x.insert(X1[i]); } } int update(int idx, int y) { x.erase(x.find(X[idx])); x.insert(y); X[idx]=y; int cnt=0; int b=-1; while(x.upper_bound(b)!=x.end()) { ++cnt; b=*x.upper_bound(b)+L; } return cnt; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccL3jNFM.o: in function `main':
grader_encoder.cpp:(.text.startup+0x162): undefined reference to `encode(int, int*)'
collect2: error: ld returned 1 exit status

/usr/bin/ld: /tmp/cc5foJcy.o: in function `main':
grader_decoder.cpp:(.text.startup+0x1ef): undefined reference to `decode(int, int, int*)'
collect2: error: ld returned 1 exit status