Submission #1051729

#TimeUsernameProblemLanguageResultExecution timeMemory
1051729user736482Parrots (IOI11_parrots)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include "decoder.h" #include "decoderlib.h" #include "encoder.h" #include "encoderlib.h" using namespace std; //int enc[256]; void encode(int n,int v[]){ for(int i=0;i<n;i++){ for(int j=0;j<8;j++){ if(v[i]&(1<<j)){ // cout<<(2*(7-j+8*i)+(1)); //enc[7-j+8*i]=(2*(7-j+8*i)+(1));} send(2*(7-j+8*i)+(1));} else{ //cout<<2*(7-j+8*i); //enc[(7-j+8*i)]=2*(7-j+8*i);} send(2*(7-j+8*i);} //cout<<" "; } } }
#include<bits/stdc++.h> #include "decoder.h" #include "decoderlib.h" #include "encoder.h" #include "encoderlib.h" using namespace std; void decode(int n,int l,int v[]){ sort(v,v+l); for(int i=0;i<n;i++){ int k=0; for(int j=0;j<8;j++){ k*=2; if(v[j+8*i]%2==1) k++; } //cout<<k<<" "; send(k); } }

Compilation message (stderr)

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:18:33: error: expected ')' before ';' token
   18 |                 send(2*(7-j+8*i);}
      |                     ~           ^
      |                                 )

/usr/bin/ld: /tmp/ccQiMYDC.o: in function `decode(int, int, int*)':
decoder.cpp:(.text+0x444): undefined reference to `send(int)'
collect2: error: ld returned 1 exit status