This is some text.
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define ll long long int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t; cin >> t; while (t--) { int n; cin >> n; cout << 1 << " "; for (int i = 2; i <= n - 1; ++i) { cout << (i ^ 1) << " "; } if ((n - 1) % 2 == 0) { cout << n - 1 << " "; } else { cout << n << " "; } cout << endl; } return 0; }
The rest of the text. I don't know why I can pass just by swapping the first and last numbers in the output.
Codeforces Round 1094 Solution Discussion