Submission #18343

# Submission time Handle Problem Language Result Execution time Memory
18343 2016-01-27T08:47:12 Z suhgyuho_william Parrots (IOI11_parrots) C++
17 / 100
4 ms 1736 KB
#include "encoder.h"
#include "encoderlib.h"

void encode(int N, int M[])
{
  int i,t;
  t = 0;
  for(i=0; i<N; i++) t += (M[i]*(1 << i));
  send(t);
}
#include "decoder.h"
#include "decoderlib.h"

void decode(int N, int L, int X[])
{
  int i, b;
  b = X[0];
  for(i=0; i<N; i++){
	if(b%2 == 1) output(1);
    else output(0);
    b /= 2;
  }
}
# Verdict Execution time Memory Grader output
1 Correct 4 ms 752 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 1736 KB Error : Output is wrong
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 1736 KB Error : Bad encoded integer
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 1736 KB Error : Bad encoded integer
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 1736 KB Error : Bad encoded integer
2 Incorrect 4 ms 1736 KB Error : Bad encoded integer
3 Incorrect 4 ms 1736 KB Error : Bad encoded integer
4 Incorrect 4 ms 1736 KB Error : Bad encoded integer
5 Incorrect 4 ms 1736 KB Error : Bad encoded integer
6 Incorrect 4 ms 1736 KB Error : Bad encoded integer
7 Incorrect 4 ms 1736 KB Error : Bad encoded integer