結果

問題 No.2184 A○B問題
ユーザー ttkkggww
提出日時 2023-01-13 21:35:50
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 403 bytes
コンパイル時間 1,820 ms
コンパイル使用メモリ 195,980 KB
最終ジャッジ日時 2025-02-10 02:15:20
ジャッジサーバーID
(参考情報)
judge3 / 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