Submission #1235241

#TimeUsernameProblemLanguageResultExecution timeMemory
1235241pcp앵무새 (IOI11_parrots)C++20
Compilation error
0 ms0 KiB
#include "encoder.h"
#include "encoderlib.h"

void encode(int N, int M[])
{
  int i;
  for(i=0; i<N; i++){
    int b = M[i];
    for (int i = 0; i <= 7;++i){
      int x = pow(2,i);
      if (x>b)send(M[i] +  9*i );
    }

  }
    
}
#include "decoder.h"
#include "decoderlib.h"
#include <vector>


using namespace std;

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

  vector<int> msg(N,0);

  for(i=0; i<L; i++) {
    b = X[i] ;

    msg[b/9] += pow(2,(b%9));
    
  }

  for (int c : msg)output(c);
}

Compilation message (stderr)

# 1번째 컴파일 단계

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:10:15: error: 'pow' was not declared in this scope
   10 |       int x = pow(2,i);
      |               ^~~