Submission #580742

#TimeUsernameProblemLanguageResultExecution timeMemory
580742vladiliusArranging Shoes (IOI19_shoes)C++17
Compilation error
0 ms0 KiB
#include "shoes.h"
#include <bits/stdc++.h>
#include <vector>
#include "grader.cpp"
using namespace std;

int count_swaps(vector<int> l){
    int n = (int) l.size();
    if (n == 2){
        if (l[0] < l[1]){
            return 0;
        }
        else {
            return 1;
        }
    }
    return -1;
}

Compilation message (stderr)

shoes.cpp:7:5: error: ambiguating new declaration of 'int count_swaps(std::vector<int>)'
    7 | int count_swaps(vector<int> l){
      |     ^~~~~~~~~~~
In file included from shoes.cpp:1:
shoes.h:7:11: note: old declaration 'long long int count_swaps(std::vector<int>)'
    7 | long long count_swaps(std::vector<int> S);
      |           ^~~~~~~~~~~