Cod sursa(job #2902846)

Utilizator BVLUBogdan Ivan BVLU Data 16 mai 2022 21:01:52
Problema Schi Scor 75
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.45 kb
#include <iostream>
#include <fstream>
#include <vector>

using namespace std;

ifstream f("schi.in");
ofstream g("schi.out");

int n;
vector <int> v;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    f >> n;
    for( int i = 1; i <= n; ++i )
    {
        int x;
        f >> x;
        v.insert( v.begin() + x - 1, i );
    }
    for( int i = 0; i < n; ++i )
        g << v[i] << "\n";
    f.close();
    g.close();
    return 0;
}