Untitled
unknown
plain_text
a year ago
601 B
3
Indexable
#define ll long long #define pb push_back #include <bits/stdc++.h> using namespace std; void solve(){ ll n; cin>>n; vector<ll>a,b; if(n%4!=0){cout<<"No"<<"\n"; return;} cout<<"yes"<<"\n"; ll i=1; while(i<n){ if(i<=n/2){ a.pb(i++); b.pb(i++); }else{ b.pb(i++); a.pb(i++); } } for(auto i:a) cout<<i<<" "; cout<<endl; for(auto i:b) cout<<i<<" "; cout<<"\n"; } signed main() { ios_base::sync_with_stdio(0); cin.tie(0);cout.tie(0); int t; cin>>t; while(t--) solve(); }
Editor is loading...
Leave a Comment