0_0_36635604_24952.cpp: In function 'int main()':
0_0_36635604_24952.cpp:122:33: error: 'qim' was not declared in this scope
ans = (1ll*qim(A,1,n,p,B)-1ll*ksm(A,-1,n,p,B)+ p)%p;
^
0_0_36635604_24952.cpp:122:53: error: too many arguments to function 'long long int ksm(long long int, long long int, long long int)'
ans = (1ll*qim(A,1,n,p,B)-1ll*ksm(A,-1,n,p,B)+ p)%p;
^
0_0_36635604_24952.cpp:39:11: note: declared here
inline LL ksm(LL x,LL y,LL b)
^
|