Submission #795952

# Submission time Handle Problem Language Result Execution time Memory
795952 2023-07-28T00:46:57 Z hgmhc Parrots (IOI11_parrots) C++17
17 / 100
1 ms 736 KB
#include "encoder.h"
#include "encoderlib.h"

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

static int ans[8];

void decode(int N, int L, int X[])
{
  int i, b;
  for(i=0; i<L; i++) {
    b = X[i];
    for (int j = 0; j < N; ++j) if (b>>j&1) {
      ans[j] = b>>15&1;
    }
  }
  for (int i = 0; i < 8; ++i)
    output(ans[i]);
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 644 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 524 KB Error : Bad encoded integer
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 596 KB Error : Bad encoded integer
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 736 KB Error : Bad encoded integer
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 512 KB Error : Bad encoded integer
2 Incorrect 1 ms 520 KB Error : Bad encoded integer
3 Incorrect 0 ms 520 KB Error : Bad encoded integer
4 Incorrect 1 ms 520 KB Error : Bad encoded integer
5 Incorrect 0 ms 616 KB Error : Bad encoded integer
6 Incorrect 1 ms 532 KB Error : Bad encoded integer
7 Incorrect 0 ms 524 KB Error : Bad encoded integer