結果

問題 No.3419 Ars magna
コンテスト
ユーザー startcpp
提出日時 2026-01-11 13:31:29
言語 C++14
(gcc 15.2.0 + boost 1.90.0)
コンパイル:
g++-15 -O2 -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 2,000 ms
+ 426µs
コード長 568 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 476 ms
コンパイル使用メモリ 102,208 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2026-07-20 04:56:44
合計ジャッジ時間 1,423 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <tuple>
#include <cstdio>
#include <cmath>
#include <cassert>
#include <atcoder/modint>
#define rep(i, n) for(i = 0; i < n; i++)
#define int long long
using namespace std;
using namespace atcoder;
using mint = modint998244353;

int n;
string s;
int p[100];

signed main() {
	int i;

	cin >> n >> s;
	rep(i, n) cin >> p[i];

	rep(i, n) {
		p[i]--;
		cout << s[p[i]];
	}
	cout << endl;
	return 0;
}
0