fork download
  1. // بسم الله الرحمن الرحيم
  2.  
  3. #include <bits/stdc++.h>
  4. using namespace std;
  5.  
  6. template <typename T> ostream &operator<<(ostream &os, vector<T> &v) { for (auto &i : v) os << i << ' '; return os; }
  7. template <typename T> istream &operator>>(istream &is, vector<T> &v) { for (auto &i : v) is >> i; return is; }
  8. #define endl '\n'
  9. #define int long long
  10. #define ull unsigned long long
  11. #define pii pair<int, int>
  12. #define vi vector<int>
  13. #define all(v) v.begin(), v.end()
  14. #define allr(v) v.rbegin(), v.rend()
  15. #define Num_of_Digits(n) ((int(log10(n)) + 1))
  16. mt19937_64 rnd(chrono::steady_clock::now().time_since_epoch().count());
  17. // rnd() -> generates a random number
  18.  
  19. #define ElgamalyHowaAmaly ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); cout << fixed << setprecision(10)
  20.  
  21.  
  22. void solve1()
  23. {
  24. int n; cin >> n;
  25. if(n % 2 == 0) cout << -1 << endl;
  26. else {
  27. for(int i = n; i >= 1; --i) cout << i << ' ' ;
  28. cout << endl;
  29. }
  30. }
  31.  
  32. signed main(){
  33.  
  34. ElgamalyHowaAmaly;
  35.  
  36. int t = 1;
  37. cin >> t;
  38. for(int test = 1; test <= t; ++test)
  39. {
  40. solve1();
  41. }
  42. return 0;
  43. }
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
-1