제출 #698527

#제출 시각아이디문제언어결과실행 시간메모리
698527MrM7mdPermutation (APIO22_perm)C++17
컴파일 에러
0 ms0 KiB
#include "perm.h"
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define int long long
#define endl '\n'
const int N=1e6;
const int H=1e7;

vector<int> construct_permutation(int x){
   int k=log2(x);
   if((1<<k)!=x)k++;
   vector<int>ans;
   for(int i=0;i<k;i++)ans.push_back(i);
   return ans;
}

컴파일 시 표준 에러 (stderr) 메시지

perm.cpp:11:13: error: ambiguating new declaration of 'std::vector<long long int> construct_permutation(long long int)'
   11 | vector<int> construct_permutation(int x){
      |             ^~~~~~~~~~~~~~~~~~~~~
In file included from perm.cpp:1:
perm.h:3:18: note: old declaration 'std::vector<int> construct_permutation(long long int)'
    3 | std::vector<int> construct_permutation(long long k);
      |                  ^~~~~~~~~~~~~~~~~~~~~