OR of first half of the array [ n - i , n - 1 ] OR [ 0 , n / 2 - 1 - i ]
int first = ( query ( 1 , 0 , n - 1 , 0 , n / 2 - 1 - i , a ) | query ( 1 , 0 , n - 1 , n - i , n - 1 , a ) ) ; int temp = sec + first ;