Cod sursa(job #2935413)
Utilizator | Data | 6 noiembrie 2022 18:21:30 | |
---|---|---|---|
Problema | Schi | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.43 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream in("schi.in");
ofstream out("schi.out");
int n;
int v[30001];
int main()
{
in >> n;
int poz = 1;
for(int i = 1; i <= n; i++)
{
int x;
in >> x;
for(int j = poz; j > x; j--)
v[j] = v[j - 1];
poz++;
v[x] = i;
}
for(int i = 1; i <= n; i++)
out << v[i] << '\n';
return 0;
}