답안 #18650

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
18650 2016-02-13T10:07:22 Z ggoh 앵무새 (IOI11_parrots) C++
컴파일 오류
0 ms 0 KB
#include "encoder.h"
#include "decoder.h"
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<vector>
#include<queue>
void encode(int N,int M[])
{
    int t,u;
    for(int i=0;i<N;i++)
    {
        u=M[i];t=0;
        while(u)
        {
            if(u%2)send(32*t+i);
            u/=2;
            t++;
        }
    }
}
#include "encoder.h"
#include "decoder.h"
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<vector>
#include<queue>
void decode(int N,int L,int X[])
{
    int ans,ch[256]={};
    for(int i=0;i<L;i++)ch[X[i]]++;
    for(int i=0;i<N;i++)
    {
        ans=0;
        for(int j=0;j<8;j++)
        {
            if(ch[32*j+i])ans+=(1<<j);
        }
        output(ans);
    }
}

Compilation message

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:16:20: error: 'send' was not declared in this scope
             if(u%2)send(32*t+i);
                    ^~~~
encoder.cpp:16:20: note: suggested alternative: 'srand'
             if(u%2)send(32*t+i);
                    ^~~~
                    srand

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:19:9: error: 'output' was not declared in this scope
         output(ans);
         ^~~~~~
decoder.cpp:19:9: note: suggested alternative: 'getpt'
         output(ans);
         ^~~~~~
         getpt