제출 #709508

#제출 시각아이디문제언어결과실행 시간메모리
709508Hacv16Parrots (IOI11_parrots)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
#include "encoder.h"
using namespace std;

void encode(int n, int m[]){
    for(int i = 0; i < n; i++)
        for(int j = 0; j < 8; j++)
            send((i << 4) | (j << 1) | (bool)(m[i] & (1 << j)));
}
#include <bits/stdc++.h>
#include "decoder.h"
using namespace std;

void decode(int n, int l, int x[]){
    sort(x, x + l);

    for(int i = 0; i < l; i += 8){
        int cur = 0;

        for(int j = 0; j < 8; j++)
            cur |= ((x[i + j] & 1) << j);

        output(cur);
    }
}

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

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:8:13: error: 'send' was not declared in this scope
    8 |             send((i << 4) | (j << 1) | (bool)(m[i] & (1 << j)));
      |             ^~~~

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:14:9: error: 'output' was not declared in this scope
   14 |         output(cur);
      |         ^~~~~~