結果
問題 | No.2184 A○B問題 |
ユーザー |
![]() |
提出日時 | 2023-01-14 12:21:41 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 381 bytes |
コンパイル時間 | 3,762 ms |
コンパイル使用メモリ | 166,732 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-25 19:26:19 |
合計ジャッジ時間 | 3,515 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 WA * 18 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main(){vector<int> hA(5);vector<int> hB(5);for(int i=0; i<5; i++){cin >> hA.at(i);}for(int i=0; i<5; i++){cin >> hB.at(i);}for(int i=0; i<5; i++){if(i+1 != hA.at(i)) hB.at(i)=hA.at(hA.at(i)-1);}for(auto x:hB){cout << x << " ";}return 0;}