Array mirror inverse

can someone tell me what am i doing wrong
maybe if you can share the code

CODE
https://ide.codingblocks.com/#/s/20275

QUESTION
https://hack.codingblocks.com/contests/c/474/204

you’re using wrong approach
you have to take n, the size of array a[]
and then n elements of array

  1. form another array b[] by using relation a[a[i]] = i
  2. compare ALL elements of b[] and a[]
  3. if they are equal then array is mirror inverse