# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
14825 | minsu | Parrots (IOI11_parrots) | C++14 | 7 ms | 2280 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]%8;
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... |