Submission #246106

#TimeUsernameProblemLanguageResultExecution timeMemory
246106luisoncppParrots (IOI11_parrots)C++17
Compilation error
0 ms0 KiB
#include <algorithm> #include <iostream> #include <vector> #include <cstdint> #include <cstdlib> #include <cassert> #include <queue> #include <unordered_map> template<typename T> using Vec = std::vector<T>; void encode(int N, int* message) { int out = 0; for (int i = 0; i < N; ++i) { if (message[i] == 1) { out |= (1<<i); } } send(out); }
#include <algorithm> #include <iostream> #include <vector> #include <cstdint> #include <cstdlib> #include <cassert> #include <queue> #include <unordered_map> template<typename T> using Vec = std::vector<T>; void decode(int N, int L, int* X) { int x = X[0]; for (int i = 0; i < N; ++i) { if (x & (1<<i)) { output(1); } else { output(0); } } }

Compilation message (stderr)

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:20:2: error: 'send' was not declared in this scope
  send(out);
  ^~~~
encoder.cpp:20:2: note: suggested alternative: 'setns'
  send(out);
  ^~~~
  setns

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:17:4: error: 'output' was not declared in this scope
    output(1);
    ^~~~~~
decoder.cpp:17:4: note: suggested alternative: 'getpt'
    output(1);
    ^~~~~~
    getpt
decoder.cpp:19:4: error: 'output' was not declared in this scope
    output(0);
    ^~~~~~
decoder.cpp:19:4: note: suggested alternative: 'getpt'
    output(0);
    ^~~~~~
    getpt