제출 #1235241

#제출 시각아이디문제언어결과실행 시간메모리
1235241pcp앵무새 (IOI11_parrots)C++20
컴파일 에러
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);
}

컴파일 시 표준 에러 (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);
      |               ^~~