結果
問題 | No.2827 Enter User Name to Play |
ユーザー |
|
提出日時 | 2024-08-02 21:21:06 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 1,526 bytes |
コンパイル時間 | 1,487 ms |
コンパイル使用メモリ | 167,636 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-08-02 21:21:13 |
合計ジャッジ時間 | 2,250 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
#include <bits/stdc++.h> #define uint128 __uint128_t #define int128 __int128 #define ld long double #define ll long long #define ull unsigned ll #define uint unsigned int #define sint short int #define llong ll #define ullong ull #define ldouble ld #define eb emplace_back #define pub push_back #define pob pop_back #define puf push_front #define pof pop_front #define fst first #define snd second #define pii pair<int, int> #define pil pair<ll, int> #define pli pair<int, ll> #define pll pair<ll, ll> #define tiii tuple<int, int, int> #define pld pair<ld, ld> #define vi vector<int> #define vll vector<ll> #define all(x) x.begin(), x.end() using namespace std; mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count()); ll RandInt(ll B) { return (ull)rng() % B; } ll floor_div(ll x, ll y) { assert(y != 0); if (y < 0) { y = -y; x = -x; } if (x >= 0) return x / y; return (x + 1) / y - 1; } ll ceil_div(ll x, ll y) { assert(y != 0); if (y < 0) { y = -y; x = -x; } if (x <= 0) return x / y; return (x - 1) / y + 1; } template<typename T> T sqr(T x) { return x * x; } void solve() { int n; cin >> n; string s; cin >> s; for(int i = 1; i <= n; ++i) { int p; cin >> p; cout << s[p - 1]; } cout << '\n'; } int main() { ios_base::sync_with_stdio(0); cin.tie(NULL); int tests = 1; //cin >> tests; for(int test = 1; test <= tests; ++test) { solve(); } return 0; }