saptarshikuar2003's blog

By saptarshikuar2003, history, 4 days ago, In English

problem link:- https://codeforces.net/problemset/problem/1973/B

here we have to determine the smallest possible value of k for which the below condition should be right that is for any i and j , 1<=i,j<=n...

a(i)|a(i+1)|.....|a(i+k-1)=a(j)|a(j+1)|.....|a(j+k-1)

Here the main Idea used is Binary search on answer......

If the segment of length k is working according to the conditions the k+1 will also be a right ans......

but how this occurs according to me-------

for a segment which not is capable to keep the bits same throughout all the subarrays of length k that means some integer in the array which can contribute to further to maintain the bits same

hence if it is not possible for k then it is also not possible for k-1......

hence binary search on answer........

am I thinking right.....????

»
3 days ago, # |
  Vote: I like it 0 Vote: I do not like it

please someone please clarify this.......