結果

問題 No.1475 時計の歯車Easy
ユーザー highjump
提出日時 2021-04-11 18:34:41
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 5 ms / 2,000 ms
コード長 1,944 bytes
コンパイル時間 2,213 ms
コンパイル使用メモリ 130,596 KB
最終ジャッジ日時 2025-01-20 16:09:48
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 42
権限があれば一括ダウンロードができます

ソースコード

diff #

#pragma GCC optimize("Ofast")
#include <iostream>
#include <stdio.h>
#include <string>
#include <vector>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <iomanip>
#include <cctype>
#include <sstream>
#include <stack>
#include <deque>
#include <queue>
#include <list>
#include <set>
#include <map>
#include <unordered_map>  
#include <atcoder/segtree>
#include <atcoder/fenwicktree>

using namespace std;
using namespace atcoder;

using ll = long long;
using P = pair<ll, ll>;
using PQ = priority_queue<ll>;
using PQG = priority_queue<ll, vector<ll>, greater<ll>>;
using PQP = priority_queue<P>;
using PQPG = priority_queue<P, vector<P>, greater<P>>;
template <class T>
using V = vector<T>;
template <class T>
using VV = V<V<T>>;

#define REP(i,n) for(ll i=0;i<ll(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=ll(a);i<=ll(b);i++)
#define FORD(i,a,b) for(ll i=ll(a);i>=ll(b);i--)
#define PB push_back
#define MP make_pair
#define SZ(x) ll(x.size())
#define ALL(x) x.begin(),x.end()
#define NIL -1
#define INF 1000100010001000
#define CINF 1ll<<63-1
#define MOD 1000000007
#define PI 3.14159265358979323846
#define endl "\n"
#define EPS 1e-9
#define YES cout << "YES" << endl
#define NO cout << "NO" << endl
#define Yes cout << "Yes" << endl
#define No cout << "No" << endl

template <class T, class U>
bool chmin(T& t, const U& u) {
    if (t > u) {
        t = u;
        return true;
    }
    else return false;
}

template <class T, class U>
bool chmax(T& t, const U& u) {
    if (t < u) {
        t = u;
        return true;
    }
    else return false;
}



signed main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(15);

    ll n; cin >> n;
    REP(i, n) {
        ll k; cin >> k;
        V<ll> a(k);
        REP(j, k)cin >> a[j];
        sort(ALL(a));
        reverse(ALL(a));
        REP(j, k)cout << a[j] << " ";
        cout << endl;
    }
}



0