結果

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

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
using namespace std;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int N; cin >> N;
    string s; cin >> s;
    vector<char> answer(N);
    for(int i=0; i<N; i++){
        int p; cin >> p;
        answer.at(i) = s.at(p-1);
    }
    
    for(auto a : answer) cout << a; cout << endl;
}
0