답안 #634424

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
634424 2022-08-24T11:26:41 Z ahmed_shafik 뒤집기 (IOI16_reverse) C++17
컴파일 오류
0 ms 0 KB
#include "reverse.h"
 
std::vector<long long> reverse(std::vector<long long> a)
{
  return vector<long long>a;
}

Compilation message

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;
      |                          ^