# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
900275 | boyliguanhan | Parrots (IOI11_parrots) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "decoder.h"
#include "decoderlib.h"
#include<bits/stdc++.h>
using namespace std;
void decode(int N, int L, int X[]) {
int res[N]{},cnt[256]{}, inv=0;
for(int i = 0; i < L; i++) {
cnt[X[i]]++,res[X[i]/4] += 1 << (X[i]&3)*2;
if(cnt[X[i]]==4)
res[0]-=4,inv=1;
}
for(auto i: res)
output(inv?255-i:i);
}