Submission #18650

# Submission time Handle Problem Language Result Execution time Memory
18650 2016-02-13T10:07:22 Z ggoh Parrots (IOI11_parrots) C++
Compilation error
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