# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
14826 | minsu | Parrots (IOI11_parrots) | C++14 | 6 ms | 2272 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;
void encode(int N, int M[])
{
for(int i=0; i<N; i++){
int a = M[i] / 100;
int b = M[i] / 10 % 10;
int c = M[i] % 10;
while( a!=0 || b!=0 || c!=0 ){
int s = i<<3;
if(a) s |= 4, a--;
if(b) s |= 2, b--;
if(c) s |= 1, c--;
send( s );
}
}
send( (N-1)<<3 );
}
#include "decoder.h"
#include "decoderlib.h"
#include <bits/stdc++.h>
using namespace std;
void decode(int N, int L, int X[])
{
int i, b, n=0;
vector<int> m(111);
for(i=0; i<L; i++) {
m[ X[i]>>3 ] += (X[i]&4)*100 + (X[i]&2)*10 + (X[i]&1);
n = max( n, X[i]>>3 );
}
for(i=0; i<=n; i++)
output( m[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... |