ARRAYS-IS ARRAY MIRROR INVERSE Wrong output

Question link - https://hack.codingblocks.com/contests/c/509/204
I Don’t know what i am doing wrong cuz last 2 test cases are passing and first 2 are failing.
https://ide.codingblocks.com/s/33125

  1. This code will fail for N>=10 as it will exceed range of int and wont be stored in AS or BS.
  2. Inverse of array doesnt mean its reverse. Inverse means like we do for functions.
    For eg:
    f(1)=0 f(2)=1 f(0)=2
    then its inverse is
    g(0)=1 g(1)=2 g(2)=0