Submission #246111

#TimeUsernameProblemLanguageResultExecution timeMemory
246111luisoncppParrots (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> #include "encoder.h" #include "encoderlib.h" 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> #include "encoder.h" #include "encoderlib.h" 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)

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