Submission #1051722

#TimeUsernameProblemLanguageResultExecution timeMemory
1051722user736482Parrots (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:15:13: error: expected '}' before 'else'
   15 |             else{
      |             ^~~~
encoder.cpp:11:28: note: to match this '{'
   11 |             if(v[i]&(1<<j)){
      |                            ^
encoder.cpp:18:33: error: expected ')' before ';' token
   18 |                 send(2*(7-j+8*i);
      |                     ~           ^
      |                                 )
encoder.cpp:23:1: error: expected '}' at end of input
   23 | }
      | ^
encoder.cpp:8:27: note: to match this '{'
    8 | void encode(int n,int v[]){
      |                           ^

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