| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1369303 | FaresSTH | Parrots (IOI11_parrots) | C++20 | 0 ms | 0 KiB |
#include"bits/stdc++.h"
#include "decoder.h"
#include "decoderlib.h"
#include "encoder.h"
#include "encoderlib.h"
using namespace std;
using ll=long long;
#define S second
#define F first
void encode(int n, int a[]) {
for(int i=0;i<n;i++){
for(int j=0;j<8;j++){
send((i<<4)+(j<<1)+(1&(a[i]>>j)));
}
}
}
void decode(int n, int m, int a[]) {
sort(a,a+m);
int res[n]={};
for(int i=0;i<m;i++){
res[a[i]>>4]=(res[a[i]>>4]<<1)+(i&a[i]);
}
for(int i=0;i<n;i++)output(res[i]);
}
#include"bits/stdc++.h"
#include "decoder.h"
#include "decoderlib.h"
using namespace std;
using ll=long long;
#define S second
#define F first
void decode(int n, int m, int a[]) {
sort(a,a+m);
int res[n]={};
for(int i=0;i<m;i++){
res[a[i]>>4]=(res[a[i]>>4]<<1)+(i&a[i]);
}
for(int i=0;i<n;i++)output(res[i]);
}
