Submission #65967

# Submission time Handle Problem Language Result Execution time Memory
65967 2018-08-09T07:55:21 Z llllilll Parrots (IOI11_parrots) C++14
0 / 100
16 ms 2712 KB
#include "encoder.h"
#include "encoderlib.h"

void encode(int N, int M[])
{
	for (int i = 0; i < N; i++) {
		int msg = 0;
		msg += (i << 2);

		int tmp = M[i];
		for (int j = 3; j >= 0; j--) {
			int cnt = tmp % 4;

			for (int k = 1; k <= cnt; k++) {
				send(msg + j);
			}
			tmp >>= 2;
		}
	}
}
#include "decoder.h"
#include "decoderlib.h"
int origin[64];

void decode(int N, int L, int X[])
{
	for (int i = 0; i < L; i++) {
		int idx = X[i] >> 2;
		int idx_inner = X[i] % 4;

		origin[idx] += 1 << (3 - idx_inner) * 2;
	}
	
	
	int i, b;
	for(i=0; i < N; i++) {
		b = origin[i];
		output(b);
	}
}
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 780 KB Error : Output is wrong
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 1004 KB Error : Encoded message too long
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 1400 KB Error : Encoded message too long
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 1400 KB Error : Encoded message too long
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 2400 KB Error : Output is wrong
2 Incorrect 7 ms 2400 KB Error : Output is wrong
3 Incorrect 9 ms 2400 KB Error : Output is wrong
4 Incorrect 13 ms 2400 KB Error : Output is wrong
5 Incorrect 13 ms 2464 KB Error : Output is wrong
6 Incorrect 13 ms 2496 KB Error : Output is wrong
7 Incorrect 16 ms 2712 KB Error : Output is wrong