結果

問題 No.2184 A○B問題
ユーザー ttkkggwwttkkggww
提出日時 2023-01-13 21:35:50
言語 C++17(gcc12)
(gcc 12.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 403 bytes
コンパイル時間 2,359 ms
コンパイル使用メモリ 202,096 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-24 16:43:37
合計ジャッジ時間 3,210 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
int n;
vector<int> a,b;

void solve(){
	for(auto &i:a)i--;
	for(auto &i:b)i--;
	for(int i = 0;i<n;i++){
		if(i)cout<<' ';
		cout<<a[b[i]]+1;
	}
	cout<<endl;
}

signed main(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	n= 5;
	a=  vector<int>(n);
	b =  vector<int>(n);
	for(auto &i:a)cin >> i;
	for(auto &i:b)cin >> i;
	solve();
}
0