Submission #1325467

#TimeUsernameProblemLanguageResultExecution timeMemory
1325467x_aArranging Shoes (IOI19_shoes)C++20
Compilation error
0 ms0 KiB
#include "shoes.h" #include <bits/stdc++.h> long long count_swaps(vector<int> s) { int n = s.size(); if(s[0] < 0) return 0; return 1; }

Compilation message (stderr)

shoes.cpp:4:23: error: 'long long int count_swaps' redeclared as different kind of entity
    4 | long long 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:4:23: error: 'vector' was not declared in this scope
    4 | long long count_swaps(vector<int> s) {
      |                       ^~~~~~
shoes.cpp:4:23: note: suggested alternatives:
In file included from /usr/include/c++/13/vector:66,
                 from shoes.h:5:
/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:4:30: error: expected primary-expression before 'int'
    4 | long long count_swaps(vector<int> s) {
      |                              ^~~