Submission #734487

#TimeUsernameProblemLanguageResultExecution timeMemory
734487Alexabcde1Parrots (IOI11_parrots)C++14
Compilation error
0 ms0 KiB
#include "encoder.h" #include "encoderlib.h" void encode(int N, vector<int> M) { for(int i=0; i<N; i++) { for (int j=0;j<=7;j++){ if (M[i]%2==1){ send((i<<4)+(j<<1)+1); } M[i]/=2; } } }
#include "decoder.h" #include "decoderlib.h" void decode(int N, int L, vector<int> X) { int i, b,ans[20]={0}; for(int i=0; i<L; i++) { int pos=(X[i]>>4); int val=(1<<((X[i]%16)>>1)); ans[pos] += val; } for (int i=0;i<N;i++) { output(ans[i]); } }

Compilation message (stderr)

encoder.cpp:3:20: error: 'vector' has not been declared
    3 | void encode(int N, vector<int> M)
      |                    ^~~~~~
encoder.cpp:3:26: error: expected ',' or '...' before '<' token
    3 | void encode(int N, vector<int> M)
      |                          ^
encoder.cpp: In function 'void encode(int, int)':
encoder.cpp:7:11: error: 'M' was not declared in this scope
    7 |       if (M[i]%2==1){
      |           ^
encoder.cpp:10:7: error: 'M' was not declared in this scope
   10 |       M[i]/=2;
      |       ^

decoder.cpp:4:27: error: 'vector' has not been declared
    4 | void decode(int N, int L, vector<int> X)
      |                           ^~~~~~
decoder.cpp:4:33: error: expected ',' or '...' before '<' token
    4 | void decode(int N, int L, vector<int> X)
      |                                 ^
decoder.cpp: In function 'void decode(int, int, int)':
decoder.cpp:8:13: error: 'X' was not declared in this scope
    8 |    int pos=(X[i]>>4);
      |             ^
decoder.cpp:6:7: warning: unused variable 'i' [-Wunused-variable]
    6 |   int i, b,ans[20]={0};
      |       ^
decoder.cpp:6:10: warning: unused variable 'b' [-Wunused-variable]
    6 |   int i, b,ans[20]={0};
      |          ^