結果
問題 |
No.2184 A○B問題
|
ユーザー |
|
提出日時 | 2023-01-13 21:47:24 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 772 bytes |
コンパイル時間 | 1,014 ms |
コンパイル使用メモリ | 111,516 KB |
最終ジャッジ日時 | 2025-02-10 02:25:20 |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
ソースコード
#include <algorithm> #include <climits> #include <cctype> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <set> #include <sstream> #include <numeric> #include <string> #include <vector> #include <queue> int main() { std::map<int, int> f1; std::map<int, int> f2; std::string line1; std::getline(std::cin, line1); std::istringstream iss1{ line1 }; int ai; int i = 1; while (iss1 >> ai) { f1[i] = ai; i++; } std::string line2; std::getline(std::cin, line2); std::istringstream iss2{ line2 }; int aj; int j = 1; while (iss2 >> aj) { f2[j] = aj; j++; } std::map<int, int> f3; for (int k = 1; k < j; k++) { f3[k] = f1[f2[k]]; } for (auto c : f3) { std::cout << c.second << " "; } std::cout << '\n'; }