Submission #965348

#TimeUsernameProblemLanguageResultExecution timeMemory
965348SyriusArranging Shoes (IOI19_shoes)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "shoes.h" using namespace std; // #define int long long #define ll long long #define ff first #define ss second #define pint pair < int , int > #define fast ios_base::sync_with_stdio(NULL); cin.tie(NULL) const int inf = 1e9 + 9; const int mxn = 2e5 + 2; const int mod = 1e9 + 7; int count_swaps(vector < int > v) { cout << (v.size() - 1) * v.size() / 2 << '\n'; }

Compilation message (stderr)

shoes.cpp:16:5: error: ambiguating new declaration of 'int count_swaps(std::vector<int>)'
   16 | int count_swaps(vector < int > v) {
      |     ^~~~~~~~~~~
In file included from shoes.cpp:2:
shoes.h:7:11: note: old declaration 'long long int count_swaps(std::vector<int>)'
    7 | long long count_swaps(std::vector<int> S);
      |           ^~~~~~~~~~~
shoes.cpp: In function 'int count_swaps(std::vector<int>)':
shoes.cpp:19:1: warning: no return statement in function returning non-void [-Wreturn-type]
   19 | }
      | ^