Please make discord server, people will be easily get notified when you are streaming.
@giaok-p1y Жыл бұрын
genious
@aryanjoshi81442 жыл бұрын
thank thank thank 😊you so much
@TECHADVICETEAM2 жыл бұрын
In B Why are we not takinh help from elements which are in sorted place? There might be chance that they can help to make X greater
@rajatsingh95372 жыл бұрын
because we are performing and operation and while performing and if any bit is 0 the in X it will always be 0 hence it will not be the maximum X
@TECHADVICETEAM2 жыл бұрын
@@rajatsingh9537 ok got it
@rachitagrawal50682 жыл бұрын
Thanks for explaining D :)
@gauravchhetri64417 ай бұрын
aww he looks so cute .. :
@ayushanandtripathi3522 жыл бұрын
for (int i = 1; i < int(ones.size()); i++) { std::cout
@Mutant232 жыл бұрын
this is basically connecting last even edges root to all the other remaining roots as one[0] is the first odd edge root and one[0]-1 is the first even edge root and +n is done just for the modulo thing. suppose the string is 01001 then you will connect the first 0 with other remaining zeroes which comes before 1 so basically you will connect the (1-1)+1 --> with (4-1)+1
@cheforces40532 жыл бұрын
sombody explain how B is done ex - 0 1 2 3 6 5 4 8 7 4&6 is clearly not equal to 4&6&8&7
@divakarchouhan6122 жыл бұрын
Basically, we have to sort the array and have to find the maximum X and the only way of sorting is if a[i]&a[j]=X. suppose the array is 1 2 3 6 4 5. Now the element 6,4 and 5 are in the wrong positions so to sort them we have to swap them but to put 4 in the correct position we have to swap 4 and 6 and 4&6=x1 now to put 5 and 6 to their correct position we have to swap them i.e 5&6=x2. as we know x1 may or may not be the same. But we want a single value of X and it must be maximum so basically, to find the maximum value of x we have to calculate the '&' of all the elements that are in their wrong positions i.e ans=6&4&5.
@cheforces40532 жыл бұрын
@@divakarchouhan612 yeah thanks man
@ashfaqurrahmanpapon83642 жыл бұрын
problem no:C n-5:: 2 2 3 4 4 how it possible?
@vardhmanjain16302 жыл бұрын
arr = 2 4 3 4 2 , ans = 3 , both side 2,3,4
@divakarchouhan6122 жыл бұрын
Problem no C: Can anyone explain how this test case will give the correct answer for the above approach The test case is: n=7 2 2 5 5 7 6 4 According to my understanding of the explained logic, the answer will be 4 i.e. 2 repeating elements and 2 elements whose freq. is 1 whereas the correct answer will be 3. Can anyone explain?