제출 #965349

#제출 시각아이디문제언어결과실행 시간메모리
965349SyriusArranging Shoes (IOI19_shoes)C++14
컴파일 에러
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) {

	return (v.size() - 1) * v.size() / 2;
}

컴파일 시 표준 에러 (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);
      |           ^~~~~~~~~~~