제출 #1140390

#제출 시각아이디문제언어결과실행 시간메모리
1140390Zheing앵무새 (IOI11_parrots)C++20
컴파일 에러
0 ms0 KiB
#include "encoder.h" #include "encoderlib.h" void encode(int N, int M[]){ for(int i = 0; i < N; ++i) send(M[i] * 1000 + i); }
#include "decoder.h" #include "decoderlib.h" void decode(int N, int L, int X[]){ int i, b; vector<int> A(N); for(i = 0; i < L; ++i) { b = X[i] % 1000; int x = X[i] / 1000; A[x] = b; } for(int i = 0; i < N; ++i)output(A[i]); }

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

# 2번째 컴파일 단계

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:6:3: error: 'vector' was not declared in this scope
    6 |   vector<int> A(N);
      |   ^~~~~~
decoder.cpp:6:10: error: expected primary-expression before 'int'
    6 |   vector<int> A(N);
      |          ^~~
decoder.cpp:10:5: error: 'A' was not declared in this scope
   10 |     A[x] = b;
      |     ^
decoder.cpp:12:36: error: 'A' was not declared in this scope
   12 |   for(int i = 0; i < N; ++i)output(A[i]);
      |                                    ^