Submission #634424

#TimeUsernameProblemLanguageResultExecution timeMemory
634424ahmed_shafikReversing a Sequence (IOI16_reverse)C++17
Compilation error
0 ms0 KiB
#include "reverse.h" std::vector<long long> reverse(std::vector<long long> a) { return vector<long long>a; }

Compilation message (stderr)

reverse.cpp: In function 'std::vector<long long int> reverse(std::vector<long long int>)':
reverse.cpp:5:10: error: 'vector' was not declared in this scope
    5 |   return vector<long long>a;
      |          ^~~~~~
reverse.cpp:5:10: note: suggested alternatives:
In file included from /usr/include/c++/10/vector:67,
                 from reverse.h:3,
                 from reverse.cpp:1:
/usr/include/c++/10/bits/stl_vector.h:389:11: note:   'std::vector'
  389 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
In file included from reverse.h:3,
                 from reverse.cpp:1:
/usr/include/c++/10/vector:86:13: note:   'std::pmr::vector'
   86 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
reverse.cpp:5:17: error: expected primary-expression before 'long'
    5 |   return vector<long long>a;
      |                 ^~~~
reverse.cpp:5:17: error: expected ';' before 'long'
    5 |   return vector<long long>a;
      |                 ^~~~
      |                 ;
reverse.cpp:5:26: error: expected unqualified-id before '>' token
    5 |   return vector<long long>a;
      |                          ^