Https://ide.codingblocks.com/s/230646

this error comes again n again in codes pliz tell me specifically how to correct it also my qns is how to calculate fibo in less than o(1) as in this qns i cal in o(1) but a[i] is appr10^9 which exceeds dp wala concept .8279454261 if poss call me for better clearifications of my error.

hey @sgdon142
Segmentation fault is a specific kind of error caused by accessing memory that β€œdoes not belong to you.”
You can refer this for more detail:

This question utilizes a property of fib numbers that GCD(fib(a),fib(b))=fib(GCD(a,b)).
You need to create a segment tree on the A[i]'s GCD.

You may refer to this code.