1 solutions

  • 0
    @ 2026-11-14 11:34:11

    C++ :

    #include <bits/stdc++.h>
    using namespace std;
    int a[20005];
    int b[20];
    int main(){
        int n;
        cin >> n;
        for (int i = 1;i<=n;i++) cin >> a[i];
        
        for (int i = 0;i<10;i++) {
            cin >> b[i];
        }
        
        for (int i = 1;i<=n;i++){
            cout << b[a[i]] << " ";
        }
        
        return 0;
    }
    
    • 1

    Information

    ID
    130
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    10
    Tags
    # Submissions
    1
    Accepted
    1
    Uploaded By