Inverse

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#include <stdio.h>
int main() {
freopen("inverse.in", "r", stdin);
freopen("inverse.out", "w", stdout);
int n;
scanf("%d\n", &n);
int p[n+1], inv[n+1];
for(int i=1; i<=n; i++) scanf("%d", &p[i]);
for(int i=1; i<=n; i++) {
inv[p[i]]=i;
}
for(int i=1; i<=n; i++) printf("%d ", inv[i]);
return 0;
}