-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathA_Make_It_Zero.cpp
66 lines (61 loc) · 1.24 KB
/
A_Make_It_Zero.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
62
63
64
65
66
#include <bits/stdc++.h>
using namespace std;
#define mod 1000000007 // 1e9+7
#define ll long long int
#define read(arr, n) \
for (ll i = 0; i < n; i++) \
cin >> arr[i];
#define print(arr, n) \
for (ll i = 0; i < n; i++) \
cout << arr[i] << ' '; \
cout << endl;
#define fori(s, e, g) for (ll i = s; i <= e; i += g)
#define ford(s, e, g) for (ll i = s; i >= e; i -= g)
#define p(temp) cout << temp << endl
ll sum(ll arr[], ll n)
{
ll s = 0;
for (ll i = 0; i < n; i++)
s += arr[i];
return s;
}
ll maxi(ll arr[], ll n)
{
ll m = -1e18;
for (ll i = 0; i < n; i++)
m = max(m, arr[i]);
return m;
}
ll mini(ll arr[], ll n)
{
ll m = 1e18;
for (ll i = 0; i < n; i++)
m = min(m, arr[i]);
return m;
}
bool getParity(ll a, ll b) { return ((a ^ b) & 1); } // true for same, false for different
void print_vect(vector<ll> &vect)
{
for (auto it : vect)
cout << it << ' ';
cout << endl;
}
// space for helper functions
void solve()
{
ll n;
cin >> n;
ll arr[n];
read(arr, n);
p(2);
cout << 1 << " " << n << endl;
cout << 1 << " " << n << endl;
}
int main()
{
ll tc;
cin >> tc;
while (tc--)
solve();
return 0;
}