結果

問題 No.3132 暗号メッセージ
ユーザー mkzkm
提出日時 2025-05-02 21:24:54
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,441 bytes
コンパイル時間 1,853 ms
コンパイル使用メモリ 198,296 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2025-05-02 21:24:57
合計ジャッジ時間 2,581 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define mod99 998244353
#define mod107 1000000007
#define endl "\n"
#define rep(i,n) for (int i = 0; (i) < (n); ++i)
#define prep(i,a,n) for (int i = (a); i < (n); ++i)
#define rrep(i,n) for (int i = n-1; i >= 0; --i)
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(), a.rend()
#define si(x) ((int)(x).size())
//#define YN(bool) if(bool){cout<<"YES"<<endl;}else{cout<<"NO"<<endl;}
#define yn(bool) if(bool){cout<<"Yes"<<endl;}else{cout<<"No"<<endl;}
#define PRE(x) cout << fixed << setprecision(x)
#define YES cout << "Yes\n"
#define NO cout << "No\n"
template <typename T> inline T gcd(T a,T b) {return (b==0)?a:gcd(b,a%b);}
template <typename T> inline T lcm(T a, T b) {return a/gcd(a,b)*b;}
template<class T>bool chmax(T &a, T b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, T b) { if (b<a) { a=b; return 1; } return 0; }
int dx[4]={1,0,-1,0};int dy[4]={0,1,0,-1};using ull = unsigned long long;
string ABC = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
//string abc = "abcdefghijklmnopqrstuvwxyz";
bool issubsquence(string s,string t){
  ll i=0;
  for(char c:t){
    if(i<si(s)&&s[i]==c) i++;
   }
  return i==si(s);
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  
  ll n;cin >> n;
  vector<ll> d(n);
  rep(i,n) cin >> d[i];
  sort(all(d));
  rep(i,n) d[i] %= 26;
  rep(i,n) {
    cout << ABC[d[i]];
  }
  cout << endl;
}
0