Submission #246121

#TimeUsernameProblemLanguageResultExecution timeMemory
246121luisoncppParrots (IOI11_parrots)C++17
34 / 100
10 ms1536 KiB
#include <algorithm> #include <iostream> #include <vector> #include <cstdint> #include <cstdlib> #include <cassert> #include <queue> #include <unordered_map> #define PARROTS #ifndef PARROTS_MAIN #include "encoder.h" #include "encoderlib.h" #endif template<typename T> using Vec = std::vector<T>; void encode(int N, int* message) { for (int i = 0; i < N; ++i) { send(message[i] | (i<<8)); } }
#include <algorithm> #include <iostream> #include <vector> #include <cstdint> #include <cstdlib> #include <cassert> #include <queue> #include <unordered_map> #ifndef PARROTS_MAIN #include "decoder.h" #include "decoderlib.h" #endif #ifndef PARROTS template<typename T> using Vec = std::vector<T>; #endif void decode(int N, int L, int* X) { Vec<int> decoded(N); for (int i = 0; i < N; ++i) { int index = (X[i] >> 8); int value = (X[i] & 255); decoded[index] = value; } for (auto num : decoded) { output(num); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...