Cod sursa(job #3245909)

Utilizator MihneaStoicaMihnea Teodor Stoica MihneaStoica Data 1 octombrie 2024 08:37:52
Problema Schi Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.49 kb
#include <bits/stdc++.h>
#define int short

using namespace std;

vector<int> v;

int32_t main()
{
#ifndef LOCAL
    freopen("schi.in", "r", stdin);
    freopen("schi.out", "w", stdout);
#endif // LOCAL
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    int n; cin >> n;
    for (int i = 1; i <= n; i ++) {
        int pos; cin >> pos;
        v.insert(v.begin() + pos - 1, i);
    }
    for (auto x : v) {
        cout << x << '\n';
    }
}