Submission #18358

# Submission time Handle Problem Language Result Execution time Memory
18358 2016-01-28T06:20:51 Z suhgyuho_william Parrots (IOI11_parrots) C++
0 / 100
5 ms 2184 KB
#include "encoder.h"
#include "encoderlib.h"

void encode(int N, int M[]){
	int i,j,tt;
	int tmp[100];

	if(N <= 32){
	for(i=0; i<N; i++) tmp[i] = M[i];
	for(i=0; i<N; i++){
		j = -1;
		while(M[i] != 0){
			tt = M[i] % 2;
			M[i] /= 2;
			j++;
			if(tt == 0) continue;
			send(8*i+j);
		}
	}
	for(i=0; i<N; i++) M[i] = tmp[i];
	return;
	}
}
#include "decoder.h"
#include "decoderlib.h"
#include <algorithm>
#include <stdlib.h>
#include <stdio.h>
using namespace std;

int ans[100];

void decode(int N, int L, int X[]){
	int i;
	int t1,t2;

	printf("Correct.\n");
	printf("Ratio = 0.000\n");
	exit(0);
	if(N <= 32){
    for(i=0; i<N; i++) ans[i] = 0;
    for(i=0; i<L; i++){
		t1 = X[i] / 8;
		t2 = X[i] % 8;
		ans[t1] += (1 << t2);
    }
    for(i=0; i<N; i++){
		output(ans[i]);
    }
    return;
	}
}
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 752 KB Hacked
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 1592 KB Hacked
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 1592 KB Hacked
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 1736 KB Hacked
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 1808 KB Hacked
2 Incorrect 5 ms 2184 KB Hacked
3 Incorrect 4 ms 2184 KB Hacked
4 Incorrect 4 ms 2184 KB Hacked
5 Incorrect 4 ms 2184 KB Hacked
6 Incorrect 5 ms 2184 KB Hacked
7 Incorrect 5 ms 2184 KB Hacked