제출 #223962

#제출 시각아이디문제언어결과실행 시간메모리
223962Kenzo_1114앵무새 (IOI11_parrots)C++14
컴파일 에러
0 ms0 KiB
void encode(int n, int m[]) { for(int i = 0; i < n; i++) { for(int k = 7; k >= 0; k--) if(m[i] & (1 << k)) send(k + 8 * i); } }
void decode(int n, int l, int x[]) { int id = 0; for(int i = 0; i < n; i++) { int num = 0; for(int k = 7; k >= 0; k--) if(id < l && x[id] == k + 8 * i) num += (1 << k), id++; output(num); } }

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

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:6:24: error: 'send' was not declared in this scope
    if(m[i] & (1 << k)) send(k + 8 * i);
                        ^~~~
encoder.cpp:6:24: note: suggested alternative: 'signed'
    if(m[i] & (1 << k)) send(k + 8 * i);
                        ^~~~
                        signed

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:10:3: error: 'output' was not declared in this scope
   output(num);
   ^~~~~~