Language: C++

#include <bits/stdc++.h>
using namespace std;
#define min(a,b) ((a)<(b)?(a):(b))
#define max(a,b) ((a)>(b)?(a):(b))
#define REP(i,n) for(int i=0;i<n;i++)
#define FOR(i,n1,n2) for(int i=n1;i<n2;i++)
#define speed_up    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
typedef pair<int,int> Pi;
typedef long long int ll;
const int INF=(ll)(1LL<<31)-1;
const ll INFl=(ll)9223372036854775807;
const int MAX=10000;
const ll MOD=(ll)1e9+7;
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a/gcd(a, b)*b;}
int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};

template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val){
    std::fill( (T*)array, (T*)(array+N), val );
}

#include <bits/stdc++.h>
using namespace std;
#define min(a,b) ((a)<(b)?(a):(b))
#define max(a,b) ((a)>(b)?(a):(b))
#define REP(i,n) for(int i=0;i<n;i++)
#define FOR(i,n1,n2) for(int i=n1;i<n2;i++)
#define speed_up    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
typedef pair<int,int> Pi;
typedef long long int ll;
const int INF=(ll)(1LL<<31)-1;
const ll INFl=(ll)9223372036854775807;
const int MAX=10000;
const ll MOD=(ll)1e9+7;
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a/gcd(a, b)*b;}
int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};

template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val){
    std::fill( (T*)array, (T*)(array+N), val );
}

int m,k;

int main(){
	cin>>m>>k;
	if(k!=0){
		if(m==3||m==7||m==15){
			if((k<m)&&(k==1||k==3||k==7||k==15)){
				cout<<k<<" ";
				for(int i=m;i>=0;i--){
					if(i!=k)
						cout<<i<<" ";
				}
				cout<<k<<" ";
				for(int i=0;i<=m;i++){
					if(i!=k)
					cout<<i<<" ";
				}
				cout<<endl;
				return 0;
			}
		}
	}else{
		for(int i=0;i<=m;i++){
			cout<<i<<" "<<i<<" ";
		}
		cout<<endl;
		return 0;
	}
	cout<<-1<<endl;
	return 0;
}




Compiler output:
a.cc:32:11: error: redefinition of 'const int INF'
   32 | const int INF=(ll)(1LL<<31)-1;
      |           ^~~
a.cc:10:11: note: 'const int INF' previously defined here
   10 | const int INF=(ll)(1LL<<31)-1;
      |           ^~~
a.cc:33:10: error: redefinition of 'const ll INFl'
   33 | const ll INFl=(ll)9223372036854775807;
      |          ^~~~
a.cc:11:10: note: 'const ll INFl' previously defined here
   11 | const ll INFl=(ll)9223372036854775807;
      |          ^~~~
a.cc:34:11: error: redefinition of 'const int MAX'
   34 | const int MAX=10000;
      |           ^~~
a.cc:12:11: note: 'const int MAX' previously defined here
   12 | const int MAX=10000;
      |           ^~~
a.cc:35:10: error: redefinition of 'const ll MOD'
   35 | const ll MOD=(ll)1e9+7;
      |          ^~~
a.cc:13:10: note: 'const ll MOD' previously defined here
   13 | const ll MOD=(ll)1e9+7;
      |          ^~~
a.cc:36:4: error: redefinition of 'll gcd(ll, ll)'
   36 | ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
      |    ^~~
a.cc:14:4: note: 'll gcd(ll, ll)' previously defined here
   14 | ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
      |    ^~~
a.cc:37:4: error: redefinition of 'll lcm(ll, ll)'
   37 | ll lcm(ll a,ll b){return a/gcd(a, b)*b;}
      |    ^~~
a.cc:15:4: note: 'll lcm(ll, ll)' previously defined here
   15 | ll lcm(ll a,ll b){return a/gcd(a, b)*b;}
      |    ^~~
a.cc:38:5: error: redefinition of 'int dx [4]'
   38 | int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};
      |     ^~
a.cc:16:5: note: 'int dx [4]' previously defined here
   16 | int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};
      |     ^~
a.cc:38:22: error: redefinition of 'int dy [4]'
   38 | int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};
      |                      ^~
a.cc:16:22: note: 'int dy [4]' previously defined here
   16 | int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};
      |                      ^~
a.cc:41:6: error: redefinition of 'template<class A, long unsigned int N, class T> void Fill(A (&)[N], const T&)'
   41 | void Fill(A (&array)[N], const T &val){
      |      ^~~~
a.cc:19:6: note: 'template<class A, long unsigned int N, class T> void Fill(A (&)[N], const T&)' previously declared here
   19 | void Fill(A (&array)[N], const T &val){
      |      ^~~~