-
Notifications
You must be signed in to change notification settings - Fork 2
/
1312B.cpp
55 lines (46 loc) · 1.38 KB
/
1312B.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
// Author : Mars_Coder
#define _USE_MATH_DEFINES
#include<bits/stdc++.h>
using namespace std;
#define ln "\n" // no flush, oppos of endl
#define _flush endl
#define stop_sync ios::sync_with_stdio(false) // not to use c-stye io
#define untie_ios cin.tie(nullptr) // no flush
#define lli long long int
#define vi vector<int>
#define vii vector<lli>
#define vss vector<string>
#define pb push_back
#define ppb pop_back
#define sz(x) ((x).size())
#define all(x) (x).begin(), (x).end()
#define bin_sc(a, x) binary_search(all(a), x)
#define lbd(a, x) lower_bound(all(a), x) // an iter.
#define ubd(a, x) upper_bound(all(a), x) // an iter.
#define eq_seg(a, x) equal_range(all(a), x) // a pair of lb, ub
#define FIXED(x) cout << fixed << setprecision(x)
const long double PI = acos(-1.0L);
int main(void){
#ifndef ONLINE_JUDGE
//freopen("generator.txt", "r", stdin);
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
freopen("error.txt", "w", stderr);
#endif
int t, n;
cin >> t;
while(t--){
cin >> n;
vi a(n);
for(auto &i: a) cin >> i;
sort(all(a));
reverse(all(a));
for(auto i: a) cout << i << ' ';
cout << ln;
}
return 0;
}
/*
some familiar issues:
----> [look at global variables and their values]
*/