Submission #1235224

#TimeUsernameProblemLanguageResultExecution timeMemory
1235224luvlorndevParrots (IOI11_parrots)C++20
Compilation error
0 ms0 KiB
#include "encoder.h"
#include "encoderlib.h"
#include <bits/stdc++.h>
using namespace std;

void encode(int n, int n[]) {
  for(int i = 0; i < n; i++) {
    send((i*256) + m[i]);
  }
}
#include "decoder.h"
#include "decoderlib.h"
#include <bits/stdc++.h>
using namespace std;

void decode(int n, int l, int x[])
{
  vector<int> msg(n);
  for (int i = 0; i < l; i++) {
    int b = x[i] ;
    msg[b/256] = b%256;
  }
  for (int i = 0; i < msg.size(); i++) {
    output(msg[i]);
  }
}

Compilation message (stderr)

# 1번째 컴파일 단계

encoder.cpp:6:24: error: conflicting declaration 'int* n'
    6 | void encode(int n, int n[]) {
      |                    ~~~~^~~
encoder.cpp:6:17: note: previous declaration as 'int n'
    6 | void encode(int n, int n[]) {
      |             ~~~~^
encoder.cpp: In function 'void encode(...)':
encoder.cpp:8:20: error: 'm' was not declared in this scope
    8 |     send((i*256) + m[i]);
      |                    ^