# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
900291 | Sir_Ahmed_Imran | Parrots (IOI11_parrots) | C++17 | 3 ms | 1332 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.
///~~~LOTA~~~///
#include "encoder.h"
#include "encoderlib.h"
#include <bits/stdc++.h>
using namespace std;
#define nl '\n'
#define ff first
#define ss second
#define ll long long
#define append push_back
#define pii pair<int,int>
#define all(x) (x).begin(),(x).end()
#define MAXN 100000
void encode(int n,int m[64]){
int pwr[8];
for(int i=pwr[0]=1;i<8;i++)
pwr[i]=pwr[i-1]*2;
for(int i=0;i<n;i++)
for(int j=0;j<8;j++)
if(m[i]&pwr[j])
send(j+i*8);
}
///~~~LOTA~~~///
#include "decoder.h"
#include "decoderlib.h"
#include <bits/stdc++.h>
using namespace std;
#define nl '\n'
#define ff first
#define ss second
#define ll long long
#define append push_back
#define pii pair<int,int>
#define all(x) (x).begin(),(x).end()
#define MAXN 100000
void decode(int n,int m,int x[64]){
int o,p,q,a[n],pwr[8];
for(int i=pwr[0]=1;i<8;i++)
pwr[i]=pwr[i-1]*2;
for(int i=0;i<n;i++)
a[i]=0;
for(int i=0;i<m;i++){
p=x[i]%8;
q=x[i]/8;
a[q]+=pwr[p];
}
for(int i=0;i<n;i++)
output(a[i]);
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |