Submission #254668

#TimeUsernameProblemLanguageResultExecution timeMemory
254668SortingParrots (IOI11_parrots)C++14
81 / 100
4 ms1536 KiB
#include "encoder.h" #include "encoderlib.h" #include <bits/stdc++.h> using namespace std; void encode(int N, int M[]){ for(int i = 0; i < N; ++i){ for(int j = 0; j <= 7; ++j){ if(M[i] & (1 << j)) send(i * 8 + j); } } }
#include "decoder.h" #include "decoderlib.h" #include <bits/stdc++.h> using namespace std; static bool e[256]; void decode(int N, int L, int X[]){ for(int i = 0; i < 256; ++i) e[i] = false; for(int i = 0; i < L; ++i) e[X[i]] = true; for(int i = 0; i < N; ++i){ int curr = 0; for(int j = 0; j <= 7; ++j){ if(e[i * 8 + j]) curr += (1 << j); } output(curr); } }
#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...