๐Ÿ“ฆ gopikrishna000 / templates-latest

๐Ÿ“„ 9.cpp ยท 126 lines
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126#include <bits/stdc++.h>
using namespace std;

//https://codeforces.com/blog/entry/96344
// #pragma GCC optimize("O3","unroll-loops")
// #pragma GCC target("avx2,bmi,bmi2,popcnt,lzcnt")

long long ccccc = 0;
#ifdef LOCAL
#include "../debug.h"
#define tle ccccc++;assert(ccccc<1e7)
#else
#define wd(x...)
#define tle
#define __stime()
#define __etime()
#endif

using i64 = long long;
using i32 = int32_t;

// #define int long long

/*------------shortcuts----------*/
#define fio ios_base::sync_with_stdio(false); cin.tie(NULL)
#define preci(x) cout<<fixed<<setprecision((x));cerr<<fixed<<setprecision((x))
#define unique(a) (a).erase(std::unique((a).begin(),(a).end()),(a).end())
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define pii pair<int,int>
#define aii array<int,2>
#define ai(i) array<int,(i)>
#define vvi vector<vector<int>>
#define vi vector<int>
#define vil vector<long long>
#define vii vector<pair<int,int>>
#define viil vector<pair<long long,long long>>
#define si set<int>
#define up(x) ceil(1.0*x)
#define down(x) floor(1.0*x)
#define mii map<int,int>
template<class T> bool chmin(T &a, const T &b) {if (a > b) {a = b; return 1;} else return 0;}
template<class T> bool chmax(T &a, const T &b) {if (a < b) {a = b; return 1;} else return 0;}

//#define sum(a)     ( accumulate ((a).begin(), (a).end(), 0ll))
#define mine(a)    (*min_element((a).begin(), (a).end()))
#define maxe(a)    (*max_element((a).begin(), (a).end()))
#define mini(a)    ( min_element((a).begin(), (a).end()) - (a).begin())
#define maxi(a)    ( max_element((a).begin(), (a).end()) - (a).begin())
#define lb(a, x) ( lower_bound((a).begin(), (a).end(), (x)) )
#define ub(a, x) ( upper_bound((a).begin(), (a).end(), (x)) )
template <typename T, typename S> T ceil(T x, S y) {
	assert(y);
	return (y < 0 ? ceil(-x, -y) : (x > 0 ? (x + y - 1) / y : x / y));
}

template <typename T, typename S> T floor(T x, S y) {
	assert(y);
	return (y < 0 ? floor(-x, -y) : (x > 0 ? x / y : x / y - (x % y == 0 ? 0 : 1)));
}
/*------------shortcuts----------*/

void print(auto &arr) {
	for (int i = 0; i < arr.size(); i++)
		cout << arr[i] << " ";
	cout << "\n";
}
void yesno(int x) {if (x) cout << "YES\n"; else cout << "NO\n";}


#define all(x) (x).begin(), (x).end()
long long mod = 1e9 + 7 ;

const double EPS = 1e-9;
bool isEqual(double x, double y) {
	return abs(x - y) <= EPS;
	// return abs(x-y)/max(1.0,y) <= EPS;
}


int32_t main() {
	// your code goes here
	fio;
//preci(12);
//dsu(n);

#ifdef LOCAL
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	freopen("error.txt", "w", stderr);
#endif

//__stime();

	int t = 1;
	cin >> t;

	auto solve = [&](int T) -> void{
		// printf("Case #%d: \n",testcase);
		int n;
		cin >> n;
		vector<int> arr(n);
		for (int i = 0; i < n; i++) {
			cin >> arr[i];
		}
		


		// yesno(ans);
		// cout << ans << "\n";
	};


	for (int i = 1; i <= t; i++) {
		solve(i);
	}

//__etime();

	return 0;
}