I_Hate_Swaps's blog

By I_Hate_Swaps, history, 3 years ago, In English

Given a Tree with n vertices(1 <= n <= 2e5) and all the vertices have some values assigned to them , we need to find the sum of xor of the paths between all the pairs of vertices. Can Anyone Please Help me in this problem..

If You can't help atleast don't downvote ^_^

Full text and comments »

  • Vote: I like it
  • -17
  • Vote: I do not like it

By I_Hate_Swaps, 3 years ago, In English

Given two arrays a[n] , b[m] and q queries : In each query we have to update b[a[i]] to x for i = {l......r}

If not segment trees ,is there any efficient method to process such queries ?

Full text and comments »

  • Vote: I like it
  • +8
  • Vote: I do not like it

By I_Hate_Swaps, history, 3 years ago, In English

Please help me to solve this problem :

Given an array A containing n non-negative integers, check if there exists any subsequence of length exactly equal to K such that its sum is atleast S

Constraints:

1<=n<=1e5

1<=k<=n

0<=A[i]<=1e9

0<=S<=1e11

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it