結果

問題 No.3419 Ars magna
コンテスト
ユーザー besukohu
提出日時 2026-01-11 15:16:25
言語 C++23
(gcc 15.2.0 + boost 1.89.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 760 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3,293 ms
コンパイル使用メモリ 336,160 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2026-01-11 15:16:30
合計ジャッジ時間 3,925 ms
ジャッジサーバーID
(参考情報)
judge6 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using a2 = array<ll, 2>;
using a3 = array<ll, 3>;

bool chmin(auto& a, const auto& b) { return a > b ? a = b, 1 : 0; }
bool chmax(auto& a, const auto& b) { return a < b ? a = b, 1 : 0; }

ll mod = 998244353;
const ll INF = 1e18;

ifstream in;
ofstream out;

int main(int argc, char** argv) {
    ios::sync_with_stdio(false);
    cin.tie(0);

    if(argc > 2) {
        in.open(argv[1]);
        cin.rdbuf(in.rdbuf());
        out.open(argv[2]);
        cout.rdbuf(out.rdbuf());
    }

    ll n;
    cin >> n;
    string s, t;
    cin >> s;
    t.resize(n);
    for(int i = 0; i < n; i++) {
        ll a;
        cin >> a;
        t[i] = s[a - 1];
    }
    cout << t << endl;

    return 0;
}
0