Submission #235558

#TimeUsernameProblemLanguageResultExecution timeMemory
235558DavidDamianParrots (IOI11_parrots)C++11
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; void encode(int N, int M[]) { int idx=0; for(int i=0;i<N;i++){ for(int bit=0;bit<8;bit++){ if(M[i]&(1<<bit)) send(idx+bit); } idx+=8; } }
#include "decoder.h" #include "decoderlib.h" #include<bits/stdc++.h> using namespace std; void decode(int N, int L, int X[]) { vector<int> binary(8*N,0); sort(X,X+L); for(int i=0;i<L;i++){ binary[X[i]]=1; } for(int i=0;i<8*N;i+=8){ int number=0; for(int bit=0;bit<8;bit++){ if(binary[i+bit]) number+=(1<<bit); } output(number); } }

Compilation message (stderr)

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:9:17: error: 'send' was not declared in this scope
                 send(idx+bit);
                 ^~~~
encoder.cpp:9:17: note: suggested alternative: 'setns'
                 send(idx+bit);
                 ^~~~
                 setns