# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
131222 | arthurconmy | Parrots (IOI11_parrots) | C++14 | 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.
/* Arthur Conmy / arthurconmy */
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <map>
#include <queue>
#include <bitset>
#include <random>
#include <stack>
#include <deque>
#include <chrono>
#include "decoder.h"
#include "decoderlib.h"
#include "encoder.h"
#include "encoderlib.h"
using namespace std;
void encode(int N, int M[])
{
for(int i=0; i<N; i++)
{
for(int j=0; j<8; j++)
{
if(1<<j & M[i]) send((8*i) + j);
}
}
}
void decode(int N, int L, int X[])
{
vector<int> ans(N);
for(int ind=0; ind<L; ind++)
{
int i=int(X[ind]/8);
int j=X[ind]%8;
ans[i]+=1<<j;
}
for(auto u:ans) output(u);
}