Submission #667495

#TimeUsernameProblemLanguageResultExecution timeMemory
667495coding_snorlaxArranging Shoes (IOI19_shoes)C++14
Compilation error
0 ms0 KiB
#include "shoes.h" long long int count_swaps(vector<int> s){ long long int num=((long long int)s.size())/2; return num*(num-1)/2; }

Compilation message (stderr)

shoes.cpp:2:27: error: 'long long int count_swaps' redeclared as different kind of entity
    2 | long long int count_swaps(vector<int> s){
      |                           ^~~~~~
In file included from shoes.cpp:1:
shoes.h:7:11: note: previous declaration 'long long int count_swaps(std::vector<int>)'
    7 | long long count_swaps(std::vector<int> S);
      |           ^~~~~~~~~~~
shoes.cpp:2:27: error: 'vector' was not declared in this scope; did you mean 'std::vector'?
    2 | long long int count_swaps(vector<int> s){
      |                           ^~~~~~
      |                           std::vector
In file included from /usr/include/c++/10/vector:67,
                 from shoes.h:5,
                 from shoes.cpp:1:
/usr/include/c++/10/bits/stl_vector.h:389:11: note: 'std::vector' declared here
  389 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
shoes.cpp:2:34: error: expected primary-expression before 'int'
    2 | long long int count_swaps(vector<int> s){
      |                                  ^~~