fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. #define pb push_back
  5. #define all(x) x.begin(), x.end()
  6. #include <ext/pb_ds/assoc_container.hpp>
  7. #include <ext/pb_ds/tree_policy.hpp>
  8. using namespace __gnu_pbds;
  9. template <typename T> using o_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
  10. template <typename T, typename R> using o_map = tree<T, R, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
  11. typedef long long ll;
  12.  
  13. #define inf 1e9
  14. #define MOD 1000000007
  15. #define vint vector<int>
  16. #define vll vector<ll>
  17. #define no cout << "NO" << endl;
  18.  
  19. void solve() {
  20. ll n ;cin >> n ;
  21. cout << 1 << " " ;
  22. for (int i = n ; i > 1 ; i -- ) cout << i <<" ";
  23. cout << endl ;
  24. }
  25.  
  26.  
  27.  
  28.  
  29. int main() {
  30. ios::sync_with_stdio(false);
  31. cin.tie(nullptr);
  32.  
  33. #ifndef ONLINE_JUDGE
  34. freopen("input.txt", "r", stdin);
  35. freopen("output.txt", "w", stdout);
  36. #endif
  37.  
  38.  
  39. int t = 1 ;
  40. cin >> t;
  41. while (t--) {
  42. solve();
  43. }
  44.  
  45. return 0;
  46. }
Success #stdin #stdout 0.01s 5296KB
stdin
Standard input is empty
stdout
1