結果

問題 No.3132 暗号メッセージ
ユーザー ATM
提出日時 2025-05-02 21:31:02
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,768 bytes
コンパイル時間 3,828 ms
コンパイル使用メモリ 254,092 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-05-02 21:31:08
合計ジャッジ時間 4,622 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:34: warning: "all" redefined
   34 | #define all(x) (x).begin(), (x).end()
      | 
main.cpp:11: note: this is the location of the previous definition
   11 | #define all(a) a.begin(), a.end()
      | 

ソースコード

diff #

#include "bits/stdc++.h"
#include "atcoder/all"
using namespace std;
using namespace atcoder;
#define CPP_STR(x) CPP_STR_I(x)
#define CPP_CAT(x, y) CPP_CAT_I(x, y)
#define CPP_STR_I(args...) #args
#define CPP_CAT_I(x, y) x##y
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define vec vector
#define all(a) a.begin(), a.end()
#define pb push_back 
using i64 = int64_t;
using f64 = double;

constexpr i64 INF = 1'010'000'000'000'000'017LL;

constexpr i64 MOD = 998244353LL;

constexpr f64 EPS = 1e-12;

constexpr f64 PI = 3.14159265358979323846;

#define M5 100007
#define M9 1000000000

#define F first
#define S second

// util {{{
#define FOR(i, start, end) for (i64 i = (start), CPP_CAT(i, xxxx_end) = (end); i < CPP_CAT(i, xxxx_end); ++i)
#define REP(i, n) FOR(i, 0, n)

#define all(x) (x).begin(), (x).end()
#define ll long long int
#define VI vector<ll>
#define VVI vector<VI>
template <typename C>
i64 SIZE(const C &c)
{
    return static_cast<i64>(c.size());
}

template <typename T, size_t N>
i64 SIZE(const T (&)[N]) { return static_cast<i64>(N); }

template <typename T, typename U, typename Comp = less<>>
bool chmax(T &xmax, const U &x, Comp comp = {})
{
    if (comp(xmax, x))
    {
        xmax = x;
        return true;
    }
    return false;
}

template <typename T, typename U, typename Comp = less<>>
bool chmin(T &xmin, const U &x, Comp comp = {})
{
    if (comp(x, xmin))
    {
        xmin = x;
        return true;
    }
    return false;
}

int main() {
	ll n;cin>>n;
	vec<ll>d(n);
	rep(i,n)cin>>d[i];
	vec<ll>a(n),b(n);
	rep(i,n){
		a[i]=d[i]%26;
		b[i]=d[i]/26;
	}
	vec<ll>v(n);
	iota(all(v),0);
	auto comp=[&](ll l,ll r){
		return b[l]<b[r];
	};
	sort(all(v),comp);
	for(auto i:v){
		char x='A'+a[i];
		cout<<x;
	}
	cout<<endl;
}

0