-
Notifications
You must be signed in to change notification settings - Fork 68
/
Suborrays.cpp
61 lines (53 loc) · 1.42 KB
/
Suborrays.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// Created by Aman Khandelwal
#include<bits/stdc++.h>
using namespace std;
#define fastIO ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef vector<pll> vop;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<int> vi;
typedef pair<int, int> pii;
#define FOR(i,a,b) for(ll i=a; i<b; i++)
#define FORR(i,a,b) for(ll i=a; i>=b; i--)
#define adb(a) for(auto ii:a) cout << ii << " "; cout << endl;
#define adp(a) for(auto ii:a) cout << ii.F << " " << ii.S << endl;
#define PB push_back
#define MP make_pair
#define F first
#define S second
#define all(x) (x).begin(),(x).end()
#define endl "\n"
#define mem(a,b) memset(a, b, sizeof(a))
#define clr(x) memset(x, 0, sizeof(x))
#define mod 1000000007
#define PI 3.14159265358979323846
const ll MAXN = 100007;
const ll p = 1000000007;
#define MAX 10000003
#define INF INTMAX_MAX
ll power(ll a, ll b, ll m) { ll ans = 1; a = a % m; while (b) { if (b & 1) ans = (ans * a) % m; b /= 2; a = (a * a) % m; } return ans; }
ll lcm(ll a, ll b) { return (a * b) / __gcd(a, b); }
ll modInverse(ll a, ll m) { ll g = __gcd(a, m); return power(a, m - 2, m); }
bool cmp(const pll &a, const pll &b)
{
if (a.F != b.F) {
return a.F > b.F;
}
else
return a.S < b.S;
}
int main()
{
fastIO;
ll t; cin >> t;
while (t--)
{
ll n; cin >> n;
for (ll i = 1; i <= n; i++)
cout << i << " ";
cout << endl;
}
}