# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
60689 | mhnd | 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.
#include "encoder.h"
#include "encoderlib.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int N = 1e5+50;
const ll oo = 1e18;
const ll mod = 1e9+7;
void encode(int N, int M[]) {
for(int i=0;i<N;i++){
for(int k=10;k>=0;k--){
if((M[i]>>k)&1){
send(16*k+i)
}
}
}
}
#include "decoder.h"
#include "decoderlib.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int N = 1e5+50;
const ll oo = 1e18;
const ll mod = 1e9+7;
int num[65];
void decode(int N, int L, int X[]){
for(int i=0;i<L;i++){
num[X[i]%16] += (1<<(X[i]/16));
}
for(int i=0;i<N;i++)output(num[i]);
}