Help me in solving MAXDISTPERM problem

My issue

consider when n=3 ;
why is it that -
1 2 3
3 2 1
is a wrong answer ?

My code

#include <bits/stdc++.h>
using namespace std;

#define ll long long int 
#define endl '\n'
#define fastio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
void solve () {
    ll n;
    cin>>n;
    for (ll i=01;i<=n;i++)
    cout<<i<<" ";
    cout<<endl;
    for(ll i=n;i>0;i--) 
    cout<<i<<" ";
    cout<<endl;
}
int main() {
	fastio();
	int t;
	cin >>t;
	while(t--) {
	    solve();
	}
}

Problem Link: Maximum Distance Permutations Practice Coding Problem

minimum distace of (A[i] -B[i]) is 0 in your case
but we have to find maximum value possible
1 2 3
3 1 2
here minimum distance is 1 which is greater than 0