제출 #1036905

#제출 시각아이디문제언어결과실행 시간메모리
1036905aaaaaarroz앵무새 (IOI11_parrots)C++17
컴파일 에러
0 ms0 KiB
#include "encoder.h"
#include "encoderlib.h"
#include<bits/stdc++.h>
using namespace std;
void encode(int N, int M[])
{
  int i;
  for(i=0; i<N; i++)
	int nuevoi=(i<<9);
	M[i]|=nuevoi;
    send(M[i]);
}

컴파일 시 표준 에러 (stderr) 메시지

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:8:3: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
    8 |   for(i=0; i<N; i++)
      |   ^~~
encoder.cpp:10:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   10 |  M[i]|=nuevoi;
      |  ^
encoder.cpp:9:6: warning: unused variable 'nuevoi' [-Wunused-variable]
    9 |  int nuevoi=(i<<9);
      |      ^~~~~~
encoder.cpp:10:8: error: 'nuevoi' was not declared in this scope
   10 |  M[i]|=nuevoi;
      |        ^~~~~~

/usr/bin/ld: /tmp/ccrEPMw1.o: in function `main':
grader_decoder.cpp:(.text.startup+0x1ef): undefined reference to `decode(int, int, int*)'
collect2: error: ld returned 1 exit status