제출 #1007601

#제출 시각아이디문제언어결과실행 시간메모리
1007601nomuluun앵무새 (IOI11_parrots)C++14
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; void encode(int N, int M[]){ for(int i=0; i<n; i++){ if(M[i]==1)send(i); } } void decode(int N, int L, int X[]){ bool b[N+5]; for(int i=0; i<L; i++){ b[X[i]]=1; } for(int i=0; i<N; i++){ if(b[i]==1)output(1); else output(0); } }

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

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:4:20: error: 'n' was not declared in this scope
    4 |     for(int i=0; i<n; i++){
      |                    ^
encoder.cpp:5:20: error: 'send' was not declared in this scope
    5 |         if(M[i]==1)send(i);
      |                    ^~~~
encoder.cpp: In function 'void decode(int, int, int*)':
encoder.cpp:14:20: error: 'output' was not declared in this scope
   14 |         if(b[i]==1)output(1);
      |                    ^~~~~~
encoder.cpp:15:14: error: 'output' was not declared in this scope
   15 |         else output(0);
      |              ^~~~~~

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