Submission #601154

#TimeUsernameProblemLanguageResultExecution timeMemory
601154ThegeekKnight16Parrots (IOI11_parrots)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "encoder.h" using namespace std; void encode(int N, int M[]) { int R = 0; for (int i = 0; i < N; i++) { R += (M[i] << i); } send(R); }
#include <bits/stdc++.h> #include "decoder.h" using namespace std; void decode(int N, int L, int X[]) { int M[N+10]; for (int i = 0; i < N; i++) { M[i] = ((X[i] && (1 << i)) > 0); } for (int i = 0; i < N; i++) output(M[i]); }

Compilation message (stderr)

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:12:5: error: 'send' was not declared in this scope
   12 |     send(R);
      |     ^~~~

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:10:29: warning: '<<' in boolean context, did you mean '<'? [-Wint-in-bool-context]
   10 |         M[i] = ((X[i] && (1 << i)) > 0);
      |                          ~~~^~~~~
decoder.cpp:13:33: error: 'output' was not declared in this scope
   13 |     for (int i = 0; i < N; i++) output(M[i]);
      |                                 ^~~~~~