Positive AND
You are given an array A consisting of N non-negative integers.
In one operation you can select any one element from the array and increment it by 1
Task
You need to answer Q queries. In each query you are given two integer L and R, you need to determine the minimum number of operations you
need to perform such that (AL & AL+1 & ... & AR-1 & AR) is strictly greater than zero (where & is bitwise AND operator),
Notes
• Each query is independent which means it does not change the given array A
• 1 Based Indexing is followed.
Answers
Answered by
0
Explanation:
ytth bcuz giving gghjgfj n crusty fbbdruj
Similar questions