Submission #246120

#TimeUsernameProblemLanguageResultExecution timeMemory
246120luisoncppParrots (IOI11_parrots)C++17
0 / 100
10 ms1148 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<<16)); } }
#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] >> 16); 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...