제출 #1317141

#제출 시각아이디문제언어결과실행 시간메모리
1317141belmostefaArranging Shoes (IOI19_shoes)C++20
컴파일 에러
0 ms0 KiB
#include<vector> long long count_swaps(vector<int>S){ if(S[0]<0){ return 0; }else{ return 1; } }

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

shoes.cpp:2:23: error: 'vector' was not declared in this scope
    2 | long long count_swaps(vector<int>S){
      |                       ^~~~~~
shoes.cpp:2:23: note: suggested alternatives:
In file included from /usr/include/c++/13/vector:66,
                 from shoes.cpp:1:
/usr/include/c++/13/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/13/vector:86:13: note:   'std::pmr::vector'
   86 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
shoes.cpp:2:30: error: expected primary-expression before 'int'
    2 | long long count_swaps(vector<int>S){
      |                              ^~~