You are viewing a single comment's thread. Return to all comments →
C code
#include <stdio.h> #include <stdlib.h> int main() { int n; scanf("%d", &n); int* a = (int*) malloc(sizeof(int)*n); int* b = (int*) malloc(sizeof(int)*n); for (int i = 0; i < n; i++) { scanf("%d", a+i); b[a[i]-1] = i+1; } for (int i = 0; i < n; i++) printf("%d\n", b[b[i]-1]); return 0; }
Seems like cookies are disabled on this browser, please enable them to open this website
Sequence Equation
You are viewing a single comment's thread. Return to all comments →
C code