Submission #799250

#TimeUsernameProblemLanguageResultExecution timeMemory
799250LiudasParrots (IOI11_parrots)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "encoder.h" #include "encoderlib.h" #include "decoder.h" #include "decoderlib.h" using namespace std; /* int ord[100000] = {0}, seq[1000000] = {0}; int p = 0, pp = 0; void send(int x){ ord[p++] = x; } void output(int x){ seq[pp++] = x; } */ void encode(int N, int M[]){ for(int i = 0; i < N; i ++){ send(1000 * i + M[i]); } } void decode(int N, int L, int X[]){ map<int, int> arr; for(int i = 0; i < L; i++){ arr[X[i]]++; } for(int i = 0; i < N; i ++){ for(auto [l, r] : arr){ if(l / 1000 == i){ output(l % 1000); break; } } } }
#include <bits/stdc++.h> #include "encoder.h" #include "encoderlib.h" #include "decoder.h" #include "decoderlib.h" using namespace std; /* int ord[100000] = {0}, seq[1000000] = {0}; int p = 0, pp = 0; void send(int x){ ord[p++] = x; } void output(int x){ seq[pp++] = x; } */ void encode(int N, int M[]){ for(int i = 0; i < N; i ++){ send(1000 * i + M[i]); } } void decode(int N, int L, int X[]){ map<int, int> arr; for(int i = 0; i < L; i++){ arr[X[i]]++; } for(int i = 0; i < N; i ++){ for(auto [l, r] : arr){ if(l / 1000 == i){ output(l % 1000); break; } } } }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccITHCic.o: in function `decode(int, int, int*)':
encoder.cpp:(.text+0x3d5): undefined reference to `output(int)'
collect2: error: ld returned 1 exit status

/usr/bin/ld: /tmp/ccOWFyhY.o: in function `encode(int, int*)':
decoder.cpp:(.text+0x1ff): undefined reference to `send(int)'
collect2: error: ld returned 1 exit status