結果
問題 | No.3132 暗号メッセージ |
ユーザー |
|
提出日時 | 2025-05-02 21:30:36 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 1,110 bytes |
コンパイル時間 | 2,073 ms |
コンパイル使用メモリ | 196,844 KB |
実行使用メモリ | 6,272 KB |
最終ジャッジ日時 | 2025-05-02 21:30:39 |
合計ジャッジ時間 | 2,779 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 |
ソースコード
#ifndef INCLUDED_MAIN #define INCLUDED_MAIN #include __FILE__ int main(){ int n; cin>>n; vector<int> d(n); rep(i,n) cin>>d[i]; sort(all(d)); rep(i,n) d[i]%=26; rep(i,n) cout<<char('A'+d[i]); cout<<nl; } /////// library zone /////// #else #include <bits/stdc++.h> using namespace std; #define rep(i,n) for(ll i=0;i<n;i++) #define srep(i,l,r) for(ll i=l;i<=r;i++) using ll = long long; using ld = long double; const ll mod=998244353; #define vout(v) for(auto i :v) cout<<i<<" "; #define INF 9223300000000000000ll #define Winf 5e12 #define nl "\n" #define all(a) a.begin(),a.end() #define rall(a) a.rbegin(),a.rend() #define vl vector<ll> ll extgcd(ll a, ll b, ll &x, ll &y) { // ax+by=gcd(a,b) -> x,yを格納 if (b==0) { x=1; y=0; return a; } ll d=extgcd(b,a%b,y,x); y-=a/b*x; return d; } ll modinv(ll a, ll mod) { //拡張Euclidによるmodでの逆元, a*u+b(mod)*v=1を解く ll b=mod,u=1,v=0; while (b) { ll t=a/b; a-=t*b; swap(a,b); u-=t*v; swap(u,v); } u%=mod; if (u < 0) u+=mod; return u; } #endif