제출 #481301

#제출 시각아이디문제언어결과실행 시간메모리
481301unknownnnn앵무새 (IOI11_parrots)C++14
컴파일 에러
0 ms0 KiB
#include "encoder.h" #include "encoderlib.h" #include <iostream> using namespace std; void encode(int n,int m[]) { int j=0; for(int i=0 ; i<n ; i++) { m[i]=(m[i]+j); j+=2; } for(int i=0 ; i<n ; i++) { send(m[i]); } }
#include "encoder.h" #include "encoderlib.h" #include <iostream> using namespace std; void decode(int n, int l, int m[]) { int niza[n]; for(int i=0 ; i<l ; i++) { int pozicija=m[i]/2; novaniza[pozicija]=m[i]%2; } for(int i=0 ; i<n ; i++) { output(novaniza[i]); } }

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

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:13:9: error: 'novaniza' was not declared in this scope
   13 |         novaniza[pozicija]=m[i]%2;
      |         ^~~~~~~~
decoder.cpp:17:16: error: 'novaniza' was not declared in this scope
   17 |         output(novaniza[i]);
      |                ^~~~~~~~
decoder.cpp:17:9: error: 'output' was not declared in this scope
   17 |         output(novaniza[i]);
      |         ^~~~~~
decoder.cpp:9:9: warning: unused variable 'niza' [-Wunused-variable]
    9 |     int niza[n];
      |         ^~~~