제출 #349988

#제출 시각아이디문제언어결과실행 시간메모리
349988idk321앵무새 (IOI11_parrots)C++11
컴파일 에러
0 ms0 KiB
#include "decoder.h" #include "decoderlib.h" #include <bits/stdc++.h> using namespace std; void decode(int n, int l, int x[]) { vector<int> freq(256); vector<int> res(n, -1); for (int i = 0; i < l; i++) { freq[x[i]]++; } vector<int> v; vector<int> ind; for (int i = 0; i < 256; i++) { for (int j = 0; j < freq[i] / 2; j++)v.push_back(i); if (freq[i] % 2 == 1) ind.push_back(i % 16); } sort(v.begin(), v.end()); for (int i = 0; i < n - 1; i++) { //cout << ind[i] << endl; res[ind[i]] = v[i]; } for (int i = 0; i < n; i++) { if (res[i] == -1) res[i] = v[n - 1]; } for (int i : res) output(i); }

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

/tmp/cc3YZ58G.o: In function `decode(int, int, int*)':
encoder.cpp:(.text+0x2eb): undefined reference to `output(int)'
/tmp/ccfuAiFI.o: In function `main':
grader_encoder.cpp:(.text.startup+0x17c): undefined reference to `encode(int, int*)'
collect2: error: ld returned 1 exit status

/tmp/ccrDHI2S.o: In function `main':
grader_decoder.cpp:(.text.startup+0x21f): undefined reference to `decode(int, int, int*)'
collect2: error: ld returned 1 exit status