Submission #1140404

#TimeUsernameProblemLanguageResultExecution timeMemory
1140404ZheingParrots (IOI11_parrots)C++20
Compilation error
0 ms0 KiB
#include "encoder.h" #include "encoderlib.h" void encode(int N, int M[]) { int i; for(i=0; i<N; i++) send(M[i]*1000 + i); }
#include "decoder.h" #include "decoderlib.h" #include<vector> 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]); }

Compilation message (stderr)

# 2번째 컴파일 단계

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:7:3: error: 'vector' was not declared in this scope
    7 |   vector<int> A(N);
      |   ^~~~~~
decoder.cpp:7:3: note: suggested alternatives:
In file included from /usr/include/c++/11/vector:67,
                 from decoder.cpp:3:
/usr/include/c++/11/bits/stl_vector.h:389:11: note:   'std::vector'
  389 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
In file included from decoder.cpp:3:
/usr/include/c++/11/vector:86:13: note:   'std::pmr::vector'
   86 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
decoder.cpp:7:10: error: expected primary-expression before 'int'
    7 |   vector<int> A(N);
      |          ^~~
decoder.cpp:11:5: error: 'A' was not declared in this scope
   11 |     A[x] = b;
      |     ^
decoder.cpp:13:36: error: 'A' was not declared in this scope
   13 |   for(int i = 0; i < N; ++i)output(A[i]);
      |                                    ^